Class AbstractJcrNodeParser<O>
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.apache.sling.feature.cpconverter.shared.AbstractJcrNodeParser<O>
-
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
- Direct Known Subclasses:
XmlConfigurationEntryHandler.JcrConfigurationHandler
public abstract class AbstractJcrNodeParser<O> extends DefaultHandler
-
-
Constructor Summary
Constructors Constructor Description AbstractJcrNodeParser(String primaryType)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract O
getParsingResult()
protected String
getPrimaryType()
protected abstract void
onJcrRootElement(String uri, String localName, String qName, Attributes attributes)
protected void
onJcrRootNode(String uri, String localName, String qName, Attributes attributes, String primaryType)
O
parse(InputStream input)
void
startElement(String uri, String localName, String qName, Attributes attributes)
-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Constructor Detail
-
AbstractJcrNodeParser
public AbstractJcrNodeParser(String primaryType)
-
-
Method Detail
-
parse
public O parse(InputStream input) throws Exception
- Throws:
Exception
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
getPrimaryType
protected final String getPrimaryType()
-
onJcrRootNode
protected void onJcrRootNode(String uri, String localName, String qName, Attributes attributes, String primaryType) throws SAXException
- Throws:
SAXException
-
onJcrRootElement
protected abstract void onJcrRootElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
- Throws:
SAXException
-
getParsingResult
protected abstract O getParsingResult()
-
-