Package org.odftoolkit.odfdom.pkg.rdfa
Class SAXRDFaParser
- java.lang.Object
-
- net.rootdev.javardfa.Parser
-
- org.odftoolkit.odfdom.pkg.rdfa.SAXRDFaParser
-
- All Implemented Interfaces:
ContentHandler
,ErrorHandler
public class SAXRDFaParser extends net.rootdev.javardfa.Parser
A RDFa parser for SAX
-
-
Field Summary
Fields Modifier and Type Field Description protected org.odftoolkit.odfdom.pkg.rdfa.EvalContext
context
protected XMLEventFactory
eventFactory
protected URIExtractor
extractor
protected net.rootdev.javardfa.literal.LiteralCollector
literalCollector
protected Locator
locator
protected Set<net.rootdev.javardfa.Setting>
settings
protected JenaSink
sink
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
beginRDFaElement(String arg0, String localname, String qname, Attributes arg3)
void
characters(char[] arg0, int arg1, int arg2)
static SAXRDFaParser
createInstance(JenaSink sink)
void
emitTriples(String subj, Collection<String> props, String obj)
void
emitTriplesDatatypeLiteral(String subj, Collection<String> props, String lex, String datatype)
void
emitTriplesPlainLiteral(String subj, Collection<String> props, String lex, String language)
void
endDocument()
void
endElement(String arg0, String localname, String qname)
void
endPrefixMapping(String arg0)
protected void
endRDFaElement(String arg0, String localname, String qname)
void
ignorableWhitespace(char[] arg0, int arg1, int arg2)
protected org.odftoolkit.odfdom.pkg.rdfa.EvalContext
parse(org.odftoolkit.odfdom.pkg.rdfa.EvalContext context, StartElement element)
void
processingInstruction(String arg0, String arg1)
void
setBase(String base)
Set the base uri of the DOM.void
setDocumentLocator(Locator arg0)
void
skippedEntity(String arg0)
void
startDocument()
void
startElement(String arg0, String localname, String qname, Attributes arg3)
void
startPrefixMapping(String arg0, String arg1)
protected void
writeCharacters(String value)
-
-
-
Field Detail
-
eventFactory
protected XMLEventFactory eventFactory
-
sink
protected JenaSink sink
-
settings
protected Set<net.rootdev.javardfa.Setting> settings
-
literalCollector
protected net.rootdev.javardfa.literal.LiteralCollector literalCollector
-
extractor
protected URIExtractor extractor
-
locator
protected Locator locator
-
context
protected org.odftoolkit.odfdom.pkg.rdfa.EvalContext context
-
-
Method Detail
-
createInstance
public static SAXRDFaParser createInstance(JenaSink sink)
-
emitTriples
public void emitTriples(String subj, Collection<String> props, String obj)
- Overrides:
emitTriples
in classnet.rootdev.javardfa.Parser
-
emitTriplesPlainLiteral
public void emitTriplesPlainLiteral(String subj, Collection<String> props, String lex, String language)
- Overrides:
emitTriplesPlainLiteral
in classnet.rootdev.javardfa.Parser
-
emitTriplesDatatypeLiteral
public void emitTriplesDatatypeLiteral(String subj, Collection<String> props, String lex, String datatype)
- Overrides:
emitTriplesDatatypeLiteral
in classnet.rootdev.javardfa.Parser
-
setDocumentLocator
public void setDocumentLocator(Locator arg0)
- Specified by:
setDocumentLocator
in interfaceContentHandler
- Overrides:
setDocumentLocator
in classnet.rootdev.javardfa.Parser
-
startDocument
public void startDocument() throws SAXException
- Specified by:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classnet.rootdev.javardfa.Parser
- Throws:
SAXException
-
endDocument
public void endDocument() throws SAXException
- Specified by:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in classnet.rootdev.javardfa.Parser
- Throws:
SAXException
-
startPrefixMapping
public void startPrefixMapping(String arg0, String arg1) throws SAXException
- Specified by:
startPrefixMapping
in interfaceContentHandler
- Overrides:
startPrefixMapping
in classnet.rootdev.javardfa.Parser
- Throws:
SAXException
-
endPrefixMapping
public void endPrefixMapping(String arg0) throws SAXException
- Specified by:
endPrefixMapping
in interfaceContentHandler
- Overrides:
endPrefixMapping
in classnet.rootdev.javardfa.Parser
- Throws:
SAXException
-
startElement
public void startElement(String arg0, String localname, String qname, Attributes arg3) throws SAXException
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classnet.rootdev.javardfa.Parser
- Throws:
SAXException
-
endElement
public void endElement(String arg0, String localname, String qname) throws SAXException
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classnet.rootdev.javardfa.Parser
- Throws:
SAXException
-
characters
public void characters(char[] arg0, int arg1, int arg2) throws SAXException
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classnet.rootdev.javardfa.Parser
- Throws:
SAXException
-
ignorableWhitespace
public void ignorableWhitespace(char[] arg0, int arg1, int arg2) throws SAXException
- Specified by:
ignorableWhitespace
in interfaceContentHandler
- Overrides:
ignorableWhitespace
in classnet.rootdev.javardfa.Parser
- Throws:
SAXException
-
processingInstruction
public void processingInstruction(String arg0, String arg1) throws SAXException
- Specified by:
processingInstruction
in interfaceContentHandler
- Overrides:
processingInstruction
in classnet.rootdev.javardfa.Parser
- Throws:
SAXException
-
skippedEntity
public void skippedEntity(String arg0) throws SAXException
- Specified by:
skippedEntity
in interfaceContentHandler
- Overrides:
skippedEntity
in classnet.rootdev.javardfa.Parser
- Throws:
SAXException
-
beginRDFaElement
protected void beginRDFaElement(String arg0, String localname, String qname, Attributes arg3)
-
writeCharacters
protected void writeCharacters(String value)
-
setBase
public void setBase(String base)
Set the base uri of the DOM.- Overrides:
setBase
in classnet.rootdev.javardfa.Parser
-
parse
protected org.odftoolkit.odfdom.pkg.rdfa.EvalContext parse(org.odftoolkit.odfdom.pkg.rdfa.EvalContext context, StartElement element) throws XMLStreamException
- Throws:
XMLStreamException
-
-