Class RDF4JParser
java.lang.Object
org.apache.commons.rdf.simple.experimental.AbstractRDFParser<RDF4JParser>
org.apache.commons.rdfrdf4j.experimental.RDF4JParser
- All Implemented Interfaces:
Cloneable
,org.apache.commons.rdf.experimental.RDFParser
public class RDF4JParser
extends org.apache.commons.rdf.simple.experimental.AbstractRDFParser<RDF4JParser>
RDF4J-based parser.
This can handle the RDF syntaxes RDFSyntax.JSONLD
,
RDFSyntax.NQUADS
, RDFSyntax.NTRIPLES
,
RDFSyntax.RDFXML
, RDFSyntax.TRIG
and RDFSyntax.TURTLE
- additional syntaxes can be supported by including the corresponding
rdf4j-rio-* module on the classpath.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.commons.rdf.experimental.RDFParser
org.apache.commons.rdf.experimental.RDFParser.ParseResult
-
Field Summary
Fields inherited from class org.apache.commons.rdf.simple.experimental.AbstractRDFParser
threadGroup
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.rdf4j.rio.ParserConfig
Gets the RDF4JParserConfig
to use.void
setParserConfig
(org.eclipse.rdf4j.rio.ParserConfig parserConfig) Sets an RDF4JParserConfig
to useMethods inherited from class org.apache.commons.rdf.simple.experimental.AbstractRDFParser
base, base, clone, contentType, contentType, getBase, getContentType, getContentTypeSyntax, getRdfTermFactory, getSourceFile, getSourceInputStream, getSourceIri, getTarget, getTargetDataset, getTargetGraph, parse, rdfTermFactory, source, source, source, source, target, target, target
-
Constructor Details
-
RDF4JParser
public RDF4JParser()
-
-
Method Details
-
getParserConfig
public org.eclipse.rdf4j.rio.ParserConfig getParserConfig()Gets the RDF4JParserConfig
to use.If no parser config is set, the default configuration is provided.
Note: The parser config is mutable - changes in the returned config is reflected in this instance of the parser. To avoid mutation, create a new
ParserConfig
and setsetParserConfig(ParserConfig)
.- Returns:
- The RDF4J
ParserConfig
-
setParserConfig
public void setParserConfig(org.eclipse.rdf4j.rio.ParserConfig parserConfig) Sets an RDF4JParserConfig
to use- Parameters:
parserConfig
- Parser configuration
-