|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
edu.unika.aifb.rdf.api.syntax.RDFParser
public class RDFParser
This class parses the RDF according to the syntax specified in http://www.w3.org/TR/rdf-syntax-grammar/.
Field Summary |
---|
Fields inherited from interface edu.unika.aifb.rdf.api.util.RDFConstants |
---|
ATTR_ABOUT, ATTR_ABOUT_EACH, ATTR_ABOUT_EACH_PREFIX, ATTR_BAG_ID, ATTR_DATATYPE, ATTR_ID, ATTR_NODE_ID, ATTR_PARSE_TYPE, ATTR_RESOURCE, ELT_ALT, ELT_BAG, ELT_DESCRIPTION, ELT_LI, ELT_RDF, ELT_SEQ, ELT_TYPE, KAONNS, PARSE_TYPE_COLLECTION, PARSE_TYPE_LITERAL, PARSE_TYPE_RESOURCE, RDF_ABOUT, RDF_BAG, RDF_DATATYPE, RDF_DESCRIPTION, RDF_FIRST, RDF_ID, RDF_LI, RDF_LIST, RDF_NIL, RDF_NODE_ID, RDF_OBJECT, RDF_PARSE_TYPE, RDF_PREDICATE, RDF_PROPERTY, RDF_RDF, RDF_RESOURCE, RDF_REST, RDF_STATEMENT, RDF_SUBJECT, RDF_TYPE, RDF_XMLLITERAL, RDFNS, RDFS_CLASS, RDFS_COMMENT, RDFS_DOMAIN, RDFS_LABEL, RDFS_RANGE, RDFS_SUBCLASSOF, RDFS_SUBPROPERTYOF, RDFSNS, XMLLANG, XMLNS |
Constructor Summary | |
---|---|
RDFParser()
Creates a RDF parser. |
Method Summary | |
---|---|
void |
characters(char[] data,
int start,
int length)
Called when character content is parsed. |
void |
endDocument()
Called when document parsing is ended. |
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
Called when element parsing is ended. |
void |
error(org.xml.sax.SAXParseException e)
Called when error is encountered. |
void |
fatalError(org.xml.sax.SAXParseException e)
Called when a fatal error is encountered. |
boolean |
isAnonymousNodeURI(java.lang.String uri)
Tests whether supplied URI was generated by this parser in order to label an anonymous node. |
void |
parse(org.xml.sax.InputSource source,
RDFConsumer consumer)
Parses RDF from given input source. |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Called when processing instruction is parsed. |
void |
setDocumentLocator(org.xml.sax.Locator locator)
Called to receive a document locator. |
void |
setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
Sets the error handler. |
void |
startDocument()
Called when document parsing is started. |
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
Called when an element is started. |
void |
warning(org.xml.sax.SAXParseException e)
Called when warning is encountered. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
endPrefixMapping, ignorableWhitespace, notationDecl, resolveEntity, skippedEntity, startPrefixMapping, unparsedEntityDecl |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RDFParser()
Method Detail |
---|
public void parse(org.xml.sax.InputSource source, RDFConsumer consumer) throws org.xml.sax.SAXException, java.io.IOException
source
- specifies where RDF comes fromconsumer
- receives notifications about RDF parsing events
org.xml.sax.SAXException
java.io.IOException
public void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator
in interface org.xml.sax.ContentHandler
setDocumentLocator
in class org.xml.sax.helpers.DefaultHandler
locator
- the document locatorpublic void setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
errorHandler
- the error handlerpublic void warning(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
warning
in interface org.xml.sax.ErrorHandler
warning
in class org.xml.sax.helpers.DefaultHandler
e
- the exception
org.xml.sax.SAXException
public void error(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
error
in interface org.xml.sax.ErrorHandler
error
in class org.xml.sax.helpers.DefaultHandler
e
- the exception
org.xml.sax.SAXException
public void fatalError(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
fatalError
in interface org.xml.sax.ErrorHandler
fatalError
in class org.xml.sax.helpers.DefaultHandler
e
- the exception
org.xml.sax.SAXException
public void startDocument()
startDocument
in interface org.xml.sax.ContentHandler
startDocument
in class org.xml.sax.helpers.DefaultHandler
public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.ContentHandler
endDocument
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
namespaceURI
- the URI of the namespacelocalName
- the local name of the elementqName
- the Q-name of the elementatts
- the attributes
org.xml.sax.SAXException
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
namespaceURI
- the URI of the namespacelocalName
- the local name of the elementqName
- the Q-name of the element
org.xml.sax.SAXException
public void characters(char[] data, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
data
- the data buffer containing the charactersstart
- the start index of character textlength
- the length of the character text
org.xml.sax.SAXException
public void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException
processingInstruction
in interface org.xml.sax.ContentHandler
processingInstruction
in class org.xml.sax.helpers.DefaultHandler
target
- the name of the processing instructiondata
- the argument to the processing instruction
org.xml.sax.SAXException
public boolean isAnonymousNodeURI(java.lang.String uri)
uri
- the URI
true
if the URI was generated by this parser to label an anonymous node
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |