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:
DefaultEntryParser,MixinParser,PrimaryTypeParser
public abstract class AbstractJcrNodeParser<O> extends DefaultHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected StringdetectedPrimaryTypestatic StringJCR_ROOT
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractJcrNodeParser(@NotNull String... primaryTypes)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract OgetParsingResult()protected abstract voidonJcrRootElement(String uri, String localName, String qName, Attributes attributes)protected voidonJcrRootNode(String uri, String localName, String qName, Attributes attributes, String primaryType)Oparse(InputStream input)voidstartElement(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
-
-
-
-
Field Detail
-
JCR_ROOT
public static final String JCR_ROOT
- See Also:
- Constant Field Values
-
detectedPrimaryType
protected String detectedPrimaryType
-
-
Constructor Detail
-
AbstractJcrNodeParser
protected AbstractJcrNodeParser(@NotNull @NotNull String... primaryTypes)
-
-
Method Detail
-
parse
public O parse(InputStream input) throws IOException
- Throws:
IOException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
onJcrRootNode
protected void onJcrRootNode(String uri, String localName, String qName, Attributes attributes, String primaryType)
-
onJcrRootElement
protected abstract void onJcrRootElement(String uri, String localName, String qName, Attributes attributes)
-
getParsingResult
protected abstract O getParsingResult()
-
-