public Node filter(Source source) throws SmooksException { Node deliveryNode; if (source == null) { throw new IllegalArgumentException("null 'source' arg passed in method call."); } try { DOMParser parser = new DOMParser(executionContext); Document document = parser.parse(source); deliveryNode = filter(document); } catch (Exception cause) { throw new SmooksException("Unable to filter InputStream for target profile [" + executionContext.getTargetProfiles().getBaseProfile() + "].", cause); } return deliveryNode; }
/** * Phase the supplied input reader. * <p/> * Simply parses the input reader into a W3C DOM and calls {@link #filter(Document)}. * * @param source The source of markup to be filtered. * @return Node representing filtered document. */ public Node filter(Source source) { Node deliveryNode; if (source == null) { throw new IllegalArgumentException("null 'source' arg passed in method call."); } try { DOMParser parser = new DOMParser(executionContext); Document document = parser.parse(source); deliveryNode = filter(document); } catch (Exception cause) { throw new SmooksException("Unable to filter InputStream for target profile [" + executionContext.getTargetProfiles().getBaseProfile() + "].", cause); } return deliveryNode; }
/** * Phase the supplied input reader. * <p/> * Simply parses the input reader into a W3C DOM and calls {@link #filter(Document)}. * * @param source The source of markup to be filtered. * @return Node representing filtered document. */ public Node filter(Source source) { Node deliveryNode; if (source == null) { throw new IllegalArgumentException("null 'source' arg passed in method call."); } try { DOMParser parser = new DOMParser(executionContext); Document document = parser.parse(source); deliveryNode = filter(document); } catch (Exception cause) { throw new SmooksException("Unable to filter InputStream for target profile [" + executionContext.getTargetProfiles().getBaseProfile() + "].", cause); } return deliveryNode; }
/** * Phase the supplied input reader. * <p/> * Simply parses the input reader into a W3C DOM and calls {@link #filter(Document)}. * * @param source The source of markup to be filtered. * @return Node representing filtered document. */ public Node filter(Source source) { Node deliveryNode; if (source == null) { throw new IllegalArgumentException("null 'source' arg passed in method call."); } try { DOMParser parser = new DOMParser(executionContext); Document document = parser.parse(source); deliveryNode = filter(document); } catch (Exception cause) { throw new SmooksException("Unable to filter InputStream for target profile [" + executionContext.getTargetProfiles().getBaseProfile() + "].", cause); } return deliveryNode; }