public class NTriplesParser extends AbstractRDFParser
RDFParser.DatatypeHandling| Modifier and Type | Field and Description |
|---|---|
protected int |
currentIndex |
protected char[] |
lineChars |
protected long |
lineNo |
protected org.eclipse.rdf4j.model.Value |
object |
protected org.eclipse.rdf4j.model.IRI |
predicate |
protected BufferedReader |
reader |
protected org.eclipse.rdf4j.model.Resource |
subject |
rdfHandler, valueFactory| Constructor and Description |
|---|
NTriplesParser()
Creates a new NTriplesParser that will use a
SimpleValueFactory to create object for resources, bNodes
and literals. |
NTriplesParser(org.eclipse.rdf4j.model.ValueFactory valueFactory)
Creates a new NTriplesParser that will use the supplied ValueFactory to create RDF model objects.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertLineTerminates()
Verifies that there is only whitespace or comments until the end of the line.
|
protected void |
clear() |
protected org.eclipse.rdf4j.model.IRI |
createURI(String uri) |
RDFFormat |
getRDFFormat() |
Collection<RioSetting<?>> |
getSupportedSettings() |
protected void |
handleStatement(boolean ignoredAnError) |
void |
parse(InputStream in,
String baseURI) |
void |
parse(Reader reader,
String baseURI) |
protected org.eclipse.rdf4j.model.IRI |
parseIRI() |
protected org.eclipse.rdf4j.model.Resource |
parseNode() |
protected void |
parseObject() |
protected void |
parsePredicate() |
protected void |
parseStatement() |
protected void |
parseSubject() |
protected void |
reportError(Exception e,
RioSetting<Boolean> setting) |
protected void |
reportError(String msg,
RioSetting<Boolean> setting)
Overrides
AbstractRDFParser.reportError(String, RioSetting), adding line number information to the error. |
protected void |
reportFatalError(Exception e)
Overrides
AbstractRDFParser.reportFatalError(Exception), adding line number information to the error. |
protected void |
reportFatalError(String msg)
Overrides
AbstractRDFParser.reportFatalError(String), adding line number information to the error. |
protected void |
reportWarning(String msg)
Overrides
AbstractRDFParser.reportWarning(String), adding line number information to the error. |
protected boolean |
shouldParseLine() |
protected void |
skipWhitespace(boolean throwEOF) |
protected void |
throwEOFException() |
clearBNodeIDMap, 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 BufferedReader reader
protected char[] lineChars
protected int currentIndex
protected long lineNo
protected org.eclipse.rdf4j.model.Resource subject
protected org.eclipse.rdf4j.model.IRI predicate
protected org.eclipse.rdf4j.model.Value object
public NTriplesParser()
SimpleValueFactory to create object for resources, bNodes
and literals.public NTriplesParser(org.eclipse.rdf4j.model.ValueFactory valueFactory)
valueFactory - A ValueFactory.public RDFFormat getRDFFormat()
public void parse(InputStream in, String baseURI) throws IOException, RDFParseException, RDFHandlerException
public void parse(Reader reader, String baseURI) throws IOException, RDFParseException, RDFHandlerException
protected void parseStatement()
throws RDFParseException,
RDFHandlerException
RDFParseExceptionRDFHandlerExceptionprotected void skipWhitespace(boolean throwEOF)
protected boolean shouldParseLine()
protected void parseSubject()
protected void parsePredicate()
protected void parseObject()
protected void assertLineTerminates()
throws RDFParseException
RDFParseExceptionprotected void handleStatement(boolean ignoredAnError)
protected org.eclipse.rdf4j.model.IRI parseIRI()
protected org.eclipse.rdf4j.model.Resource parseNode()
protected org.eclipse.rdf4j.model.IRI createURI(String uri) throws RDFParseException
createURI in class AbstractRDFParserRDFParseExceptionprotected void reportWarning(String msg)
AbstractRDFParser.reportWarning(String), adding line number information to the error.reportWarning in class AbstractRDFParserprotected void reportError(String msg, RioSetting<Boolean> setting) throws RDFParseException
AbstractRDFParser.reportError(String, RioSetting), adding line number information to the error.reportError in class AbstractRDFParserRDFParseExceptionprotected void reportError(Exception e, RioSetting<Boolean> setting) throws RDFParseException
reportError in class AbstractRDFParserRDFParseExceptionprotected void reportFatalError(String msg) throws RDFParseException
AbstractRDFParser.reportFatalError(String), adding line number information to the error.reportFatalError in class AbstractRDFParserRDFParseExceptionprotected void reportFatalError(Exception e) throws RDFParseException
AbstractRDFParser.reportFatalError(Exception), adding line number information to the error.reportFatalError in class AbstractRDFParserRDFParseExceptionprotected void throwEOFException()
throws RDFParseException
RDFParseExceptionprotected void clear()
clear in class AbstractRDFParserpublic Collection<RioSetting<?>> getSupportedSettings()
getSupportedSettings in interface RDFParsergetSupportedSettings in class AbstractRDFParserCopyright © 2015-2021 Eclipse Foundation. All Rights Reserved.