Package org.smooks.engine.delivery
Class SmooksContentHandler
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.xml.sax.ext.DefaultHandler2
-
- org.smooks.engine.delivery.SmooksContentHandler
-
- All Implemented Interfaces:
SAXEventReplay
,ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
,DeclHandler
,EntityResolver2
,LexicalHandler
- Direct Known Subclasses:
DOMBuilderContentHandler
,SaxNgContentHandler
public abstract class SmooksContentHandler extends DefaultHandler2 implements SAXEventReplay
Abstract SAX Content Handler.- Author:
- tom.fennelly@gmail.com
-
-
Constructor Summary
Constructors Constructor Description SmooksContentHandler(ExecutionContext executionContext, SmooksContentHandler parentContentHandler)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
close()
void
detachHandler()
void
endElement(String uri, String localName, String qName)
abstract void
endElement(EndElementEvent endEvent)
ExecutionContext
getExecutionContext()
static SmooksContentHandler
getHandler(ExecutionContext executionContext)
NamespaceDeclarationStack
getNamespaceDeclarationStack()
SmooksContentHandler
getNestedContentHandler()
SmooksContentHandler
getParentContentHandler()
void
replay(ContentHandler handler)
Replay the last SAX event onto the supplied SAXContentHandler
instance.void
replayStartElement()
void
resetNestedContentHandler()
void
startElement(String uri, String localName, String qName, Attributes attributes)
abstract void
startElement(StartElementEvent startEvent)
-
Methods inherited from class org.xml.sax.ext.DefaultHandler2
attributeDecl, comment, elementDecl, endCDATA, endDTD, endEntity, externalEntityDecl, getExternalSubset, internalEntityDecl, resolveEntity, resolveEntity, startCDATA, startDTD, startEntity
-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Constructor Detail
-
SmooksContentHandler
public SmooksContentHandler(ExecutionContext executionContext, SmooksContentHandler parentContentHandler)
-
-
Method Detail
-
getNamespaceDeclarationStack
public NamespaceDeclarationStack getNamespaceDeclarationStack()
-
replayStartElement
public void replayStartElement()
-
startElement
public final void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
startElement
public abstract void startElement(StartElementEvent startEvent) throws SAXException
- Throws:
SAXException
-
endElement
public final void endElement(String uri, String localName, String qName) throws SAXException
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
-
endElement
public abstract void endElement(EndElementEvent endEvent) throws SAXException
- Throws:
SAXException
-
replay
public void replay(ContentHandler handler) throws SmooksException
Description copied from interface:SAXEventReplay
Replay the last SAX event onto the supplied SAXContentHandler
instance.- Specified by:
replay
in interfaceSAXEventReplay
- Parameters:
handler
- The handler on whic to replay the last event.- Throws:
SmooksException
- Error replaying last event.
-
getHandler
public static SmooksContentHandler getHandler(ExecutionContext executionContext)
-
detachHandler
public void detachHandler()
-
getExecutionContext
public ExecutionContext getExecutionContext()
-
getParentContentHandler
public SmooksContentHandler getParentContentHandler()
-
getNestedContentHandler
public SmooksContentHandler getNestedContentHandler()
-
resetNestedContentHandler
public void resetNestedContentHandler()
-
close
public abstract void close()
-
-