|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
A general interface for RDF parsers.
| Field Summary | |
static int |
DT_IGNORE
Constant indicating that datatypes semantics should be ignored. |
static int |
DT_NORMALIZE
Constant indicating that values of datatyped literals should be normalized to their canonical representation. |
static int |
DT_VERIFY
Constant indicating that values of datatyped literals should be verified. |
| Method Summary | |
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(int datatypeHandling)
Sets the datatype handling mode. |
void |
setNamespaceListener(NamespaceListener nl)
Sets the NamespaceListener that will be notified of any namespace declarations that the parser finds during parsing. |
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 |
setPreserveBNodeIds(boolean preserveBNodeIds)
Set whether the parser should preserve bnode identifiers specified in the source (default is false). |
void |
setStatementHandler(StatementHandler sh)
Sets the StatementHandler that will be notified of statements that are parsed by this parser. |
void |
setStopAtFirstError(boolean stopAtFirstError)
Sets whether the parser should stop immediately if it finds an error in the data (default value is true). |
void |
setVerifyData(boolean verifyData)
Sets whether the parser should verify the data it parses (default value is true). |
| Field Detail |
public static final int DT_IGNORE
public static final int DT_VERIFY
public static final int DT_NORMALIZE
| Method Detail |
public void setStatementHandler(StatementHandler sh)
sh - the StatementHandler.public void setParseErrorListener(ParseErrorListener el)
el - the error listener.public void setParseLocationListener(ParseLocationListener ll)
ll - the parser location listener.public void setNamespaceListener(NamespaceListener nl)
nl - the namespace listener.public void setVerifyData(boolean verifyData)
verifyData - true to verify the data parsed in.public void setPreserveBNodeIds(boolean preserveBNodeIds)
preserveBNodeIds - true to presever blank node identifier.public void setStopAtFirstError(boolean stopAtFirstError)
stopAtFirstError - true if an error should stop parsing.public void setDatatypeHandling(int datatypeHandling)
datatypeHandling - One of the constants
DT_IGNORE, DT_VERIFY or
DT_NORMALIZE.DT_IGNORE,
DT_VERIFY,
DT_NORMALIZE
public void parse(InputStream in,
String baseURI)
throws IOException,
ParseException,
StatementHandlerException
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.
ParseException - If the parser has found an unrecoverable
parse error.
StatementHandlerException - If the configured statement handler
has encountered an unrecoverable error.
public void parse(Reader reader,
String baseURI)
throws IOException,
ParseException,
StatementHandlerException
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.
ParseException - If the parser has found an unrecoverable
parse error.
StatementHandlerException - If the configured statement handler
has encountered an unrecoverable error.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||