| org.openrdf.rio.RDFParser
All known Subclasses: org.openrdf.rio.helpers.RDFParserBase,
RDFParser | public interface RDFParser (Code) | | An interface for RDF parsers. All implementing classes should define a public
zero-argument constructor to allow them to be created through reflection.
|
Inner Class :public enum DatatypeHandling | |
Method Summary | |
public RDFFormat | getRDFFormat() Gets the RDF format that this parser can parse. | public void | parse(InputStream in, String baseURI) Parses the data from the supplied InputStream, using the supplied baseURI
to resolve any relative URI references. | public void | parse(Reader reader, String baseURI) Parses the data from the supplied Reader, using the supplied baseURI to
resolve any relative URI references. | public void | setDatatypeHandling(DatatypeHandling datatypeHandling) Sets the datatype handling mode. | public void | setParseErrorListener(ParseErrorListener el) Sets the ParseErrorListener that will be notified of any errors that this
parser finds during parsing. | public void | setParseLocationListener(ParseLocationListener ll) Sets the ParseLocationListener that will be notified of the parser's
progress during the parse process. | public void | setPreserveBNodeIDs(boolean preserveBNodeIDs) Set whether the parser should preserve bnode identifiers specified in the
source (default is false). | public void | setRDFHandler(RDFHandler handler) Sets the RDFHandler that will handle the parsed RDF data. | public void | setStopAtFirstError(boolean stopAtFirstError) Sets whether the parser should stop immediately if it finds an error in
the data (default value is true). | public void | setValueFactory(ValueFactory valueFactory) Sets the ValueFactory that the parser will use to create Value objects for
the parsed RDF data. | public void | setVerifyData(boolean verifyData) Sets whether the parser should verify the data it parses (default value is
true). |
getRDFFormat | public RDFFormat getRDFFormat()(Code) | | Gets the RDF format that this parser can parse.
|
parse | public void parse(InputStream in, String baseURI) throws IOException, RDFParseException, RDFHandlerException(Code) | | Parses the data from the supplied InputStream, using the supplied baseURI
to resolve any relative URI references.
Parameters: in - The InputStream from which to read the data. Parameters: baseURI - The URI associated with the data in the InputStream. throws: IOException - If an I/O error occurred while data was read from the InputStream. throws: RDFParseException - If the parser has found an unrecoverable parse error. throws: RDFHandlerException - If the configured statement handler has encountered anunrecoverable error. |
parse | public void parse(Reader reader, String baseURI) throws IOException, RDFParseException, RDFHandlerException(Code) | | Parses the data from the supplied Reader, using the supplied baseURI to
resolve any relative URI references.
Parameters: reader - The Reader from which to read the data. Parameters: baseURI - The URI associated with the data in the InputStream. throws: IOException - If an I/O error occurred while data was read from the InputStream. throws: RDFParseException - If the parser has found an unrecoverable parse error. throws: RDFHandlerException - If the configured statement handler has encountered anunrecoverable error. |
setDatatypeHandling | public void setDatatypeHandling(DatatypeHandling datatypeHandling)(Code) | | Sets the datatype handling mode. There are three modes for handling
datatyped literals: ignore, verifyand
normalize. If set to ignore, no special action
will be taken to handle datatyped literals. If set to verify,
any literals with known (XML Schema built-in) datatypes are checked to see
if their values are valid. If set to normalize, the literal
values are not only checked, but also normalized to their canonical
representation. The default value is verify.
Parameters: datatypeHandling - A datatype handling option. |
setParseErrorListener | public void setParseErrorListener(ParseErrorListener el)(Code) | | Sets the ParseErrorListener that will be notified of any errors that this
parser finds during parsing.
|
setParseLocationListener | public void setParseLocationListener(ParseLocationListener ll)(Code) | | Sets the ParseLocationListener that will be notified of the parser's
progress during the parse process.
|
setPreserveBNodeIDs | public void setPreserveBNodeIDs(boolean preserveBNodeIDs)(Code) | | Set whether the parser should preserve bnode identifiers specified in the
source (default is false).
|
setRDFHandler | public void setRDFHandler(RDFHandler handler)(Code) | | Sets the RDFHandler that will handle the parsed RDF data.
|
setStopAtFirstError | public void setStopAtFirstError(boolean stopAtFirstError)(Code) | | Sets whether the parser should stop immediately if it finds an error in
the data (default value is true).
|
setValueFactory | public void setValueFactory(ValueFactory valueFactory)(Code) | | Sets the ValueFactory that the parser will use to create Value objects for
the parsed RDF data.
Parameters: valueFactory - The value factory that the parser should use. |
setVerifyData | public void setVerifyData(boolean verifyData)(Code) | | Sets whether the parser should verify the data it parses (default value is
true).
|
|
|