public class NQuadsParser extends NTriplesParser
N-Quads RDF format, extending the Rio N-Triples parser. A
specification of N-Quads can be found here. This parser is not
thread-safe, therefore its public methods are synchronized.RDFParser.DatatypeHandling| Modifier and Type | Field and Description |
|---|---|
protected Resource |
context |
lineNo, object, predicate, reader, subjectrdfHandler, valueFactory| Constructor and Description |
|---|
NQuadsParser() |
| Modifier and Type | Method and Description |
|---|---|
RDFFormat |
getRDFFormat()
Gets the RDF format that this parser can parse.
|
void |
parse(InputStream inputStream,
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.
|
protected int |
parseContext(int c) |
assertLineTerminates, clear, createLiteral, createURI, getSupportedSettings, parseNodeID, parseObject, parsePredicate, parseSubject, parseUriRef, peekCodePoint, readCodePoint, reportError, reportError, reportFatalError, reportFatalError, reportWarning, skipLine, skipLine, skipToEndOfLine, skipWhitespace, throwEOFException, unreadclearBNodeIDMap, createBNode, createBNode, createLiteral, createLiteral, createNode, createNode, createStatement, createStatement, datatypeHandling, getNamespace, getParseErrorListener, getParseLocationListener, getParserConfig, getRDFHandler, initializeNamespaceTableFromConfiguration, preserveBNodeIDs, reportError, reportError, reportError, reportFatalError, reportFatalError, reportFatalError, reportLocation, reportWarning, resolveURI, set, setBaseURI, setBaseURI, setDatatypeHandling, setNamespace, setParseErrorListener, setParseLocationListener, setParserConfig, setPreserveBNodeIDs, setRDFHandler, setStopAtFirstError, setValueFactory, setVerifyData, stopAtFirstError, verifyDataprotected Resource context
public RDFFormat getRDFFormat()
RDFParsergetRDFFormat in interface RDFParsergetRDFFormat in class NTriplesParserpublic void parse(InputStream inputStream, String baseURI) throws IOException, RDFParseException, RDFHandlerException
RDFParserparse in interface RDFParserparse in class NTriplesParserinputStream - The InputStream from which to read the data.baseURI - The URI associated with the data in the InputStream. May be null. Parsers for syntax
formats that do not support relative URIs will ignore this argument.
Note that if the data contains an embedded base URI, that embedded base URI will overrule the value supplied here (see RFC 3986 section 5.1 for details).
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.public void parse(Reader reader, String baseURI) throws IOException, RDFParseException, RDFHandlerException
RDFParserparse in interface RDFParserparse in class NTriplesParserreader - The Reader from which to read the data.baseURI - The URI associated with the data in the InputStream. May be null. Parsers for syntax
formats that do not support relative URIs will ignore this argument.
Note that if the data contains an embedded base URI, that embedded base URI will overrule the value supplied here (see RFC 3986 section 5.1 for details).
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.protected int parseContext(int c)
throws IOException,
RDFParseException
IOExceptionRDFParseExceptionCopyright © 2015-2021 Eclipse Foundation. All Rights Reserved.