org.jrdf.parser.ntriples
Class NTriplesParser
java.lang.Object
org.jrdf.parser.ntriples.NTriplesParser
- All Implemented Interfaces:
- Parser, StatementHandlerConfiguration
public class NTriplesParser
- extends Object
- implements Parser, StatementHandlerConfiguration
Method Summary |
void |
parse(InputStream in,
String baseURI)
Parses the data from the supplied InputStream, using the supplied
BASE_URI to resolve any relative URI references. |
void |
parse(Reader reader,
String baseURI)
Parses the data from the supplied Reader, using the supplied
BASE_URI to resolve any relative URI references. |
void |
setStatementHandler(StatementHandler statementHandler)
Sets the StatementHandler that will be notified of statements that
are parsed by this parser. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NTriplesParser
public NTriplesParser(TripleParser tripleFactory,
RegexMatcherFactory newRegexFactory)
setStatementHandler
public void setStatementHandler(StatementHandler statementHandler)
- Description copied from interface:
StatementHandlerConfiguration
- Sets the StatementHandler that will be notified of statements that
are parsed by this parser.
- Specified by:
setStatementHandler
in interface StatementHandlerConfiguration
- Parameters:
statementHandler
- the StatementHandler.
parse
public void parse(InputStream in,
String baseURI)
throws IOException,
ParseException,
StatementHandlerException
- Description copied from interface:
Parser
- Parses the data from the supplied InputStream, using the supplied
BASE_URI to resolve any relative URI references.
- Specified by:
parse
in interface Parser
- Parameters:
in
- The InputStream from which to read the data.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.
ParseException
- If the parser has found an unrecoverable
parse error.
StatementHandlerException
- If the configured statement handler
has encountered an unrecoverable error.
parse
public void parse(Reader reader,
String baseURI)
throws IOException,
ParseException,
StatementHandlerException
- Description copied from interface:
Parser
- Parses the data from the supplied Reader, using the supplied
BASE_URI to resolve any relative URI references.
- Specified by:
parse
in interface Parser
- Parameters:
reader
- The Reader from which to read the data.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.
ParseException
- If the parser has found an unrecoverable
parse error.
StatementHandlerException
- If the configured statement handler
has encountered an unrecoverable error.