org.milyn.delivery
Class AbstractParser
java.lang.Object
org.milyn.delivery.AbstractParser
- Direct Known Subclasses:
- DOMParser, SAXParser
public class AbstractParser
- extends Object
Abstract Parser.
- Author:
- tom.fennelly@gmail.com
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ORG_XML_SAX_DRIVER
public static final String ORG_XML_SAX_DRIVER
- See Also:
- Constant Field Values
FEATURE_ON
public static final String FEATURE_ON
- See Also:
- Constant Field Values
FEATURE_OFF
public static final String FEATURE_OFF
- See Also:
- Constant Field Values
AbstractParser
public AbstractParser(ExecutionContext execContext,
SmooksResourceConfiguration saxDriverConfig)
- Public constructor.
- Parameters:
execContext - The Smooks Container Request that the parser is being instantiated on behalf of.saxDriverConfig - SAX Parser configuration. See .cdrl Configuration.
AbstractParser
public AbstractParser(ExecutionContext execContext)
getExecContext
protected ExecutionContext getExecContext()
getSaxDriverConfig
protected SmooksResourceConfiguration getSaxDriverConfig()
getSAXParserConfiguration
public static SmooksResourceConfiguration getSAXParserConfiguration(ContentDeliveryConfig deliveryConfig)
- Get the SAX Parser configuration for the profile associated with the supplied delivery configuration.
- Parameters:
deliveryConfig - Content delivery configuration.
- Returns:
- Returns the SAX Parser configuration for the profile associated with the supplied delivery
configuration, or null if no parser configuration is specified.
getReader
protected Reader getReader(Source source,
ExecutionContext executionContext)
createInputSource
protected InputSource createInputSource(XMLReader inputReader,
Source source,
ExecutionContext executionContext)
getInputStream
protected InputStream getInputStream(Source source)
getWriter
protected Writer getWriter(Result result,
ExecutionContext executionContext)
createXMLReader
protected XMLReader createXMLReader(DefaultHandler2 handler)
throws SAXException
- Throws:
SAXException
isFeatureOn
public static boolean isFeatureOn(String name,
SmooksResourceConfiguration saxDriverConfig)
throws SAXException
- Throws:
SAXException
isFeatureOff
public static boolean isFeatureOff(String name,
SmooksResourceConfiguration saxDriverConfig)
throws SAXException
- Throws:
SAXException
Copyright © 2009. All Rights Reserved.