public interface RDFParser
| Modifier and Type | Interface and Description |
|---|---|
static class |
RDFParser.DatatypeHandling |
| Modifier and Type | Method and Description |
|---|---|
ParserConfig |
getParserConfig()
Retrieves the current parser configuration as a single object.
|
RDFFormat |
getRDFFormat()
Gets the RDF format that this parser can parse.
|
Collection<ParserSetting<?>> |
getSupportedSettings() |
void |
parse(InputStream in,
String baseURI)
Parses the data from the supplied InputStream, using the supplied baseURI
to resolve any relative URI references.
|
void |
parse(Reader reader,
String baseURI)
Parses the data from the supplied Reader, using the supplied baseURI to
resolve any relative URI references.
|
void |
setDatatypeHandling(RDFParser.DatatypeHandling datatypeHandling)
Sets the datatype handling mode.
|
void |
setParseErrorListener(ParseErrorListener el)
Sets the ParseErrorListener that will be notified of any errors that this
parser finds during parsing.
|
void |
setParseLocationListener(ParseLocationListener ll)
Sets the ParseLocationListener that will be notified of the parser's
progress during the parse process.
|
void |
setParserConfig(ParserConfig config)
Sets all supplied parser configuration options.
|
void |
setPreserveBNodeIDs(boolean preserveBNodeIDs)
Set whether the parser should preserve bnode identifiers specified in the
source (default is false).
|
void |
setRDFHandler(RDFHandler handler)
Sets the RDFHandler that will handle the parsed RDF data.
|
void |
setStopAtFirstError(boolean stopAtFirstError)
Sets whether the parser should stop immediately if it finds an error in
the data (default value is true).
|
void |
setValueFactory(ValueFactory valueFactory)
Sets the ValueFactory that the parser will use to create Value objects for
the parsed RDF data.
|
void |
setVerifyData(boolean verifyData)
Sets whether the parser should verify the data it parses (default value is
true).
|
RDFFormat getRDFFormat()
void setValueFactory(ValueFactory valueFactory)
valueFactory - The value factory that the parser should use.void setRDFHandler(RDFHandler handler)
void setParseErrorListener(ParseErrorListener el)
void setParseLocationListener(ParseLocationListener ll)
void setParserConfig(ParserConfig config)
config - a parser configuration object.ParserConfig getParserConfig()
Collection<ParserSetting<?>> getSupportedSettings()
ParserSettings that are supported by this
RDFParser.void setVerifyData(boolean verifyData)
void setPreserveBNodeIDs(boolean preserveBNodeIDs)
void setStopAtFirstError(boolean stopAtFirstError)
void setDatatypeHandling(RDFParser.DatatypeHandling datatypeHandling)
datatypeHandling - A datatype handling option.void parse(InputStream in, String baseURI) throws IOException, RDFParseException, RDFHandlerException
in - The InputStream from which to read the data.baseURI - The URI associated with the data in the InputStream.IOException - If an I/O error occurred while data was read from the InputStream.RDFParseException - If the parser has found an unrecoverable parse error.RDFHandlerException - If the configured statement handler has encountered an
unrecoverable error.void parse(Reader reader, String baseURI) throws IOException, RDFParseException, RDFHandlerException
reader - The Reader from which to read the data.baseURI - The URI associated with the data in the InputStream.IOException - If an I/O error occurred while data was read from the InputStream.RDFParseException - If the parser has found an unrecoverable parse error.RDFHandlerException - If the configured statement handler has encountered an
unrecoverable error.Copyright © 2001-2013 Aduna. All Rights Reserved.