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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.eclipse.rdf4j.rio.ParserConfig
    Gets the RDF4J ParserConfig to use.
    void
    setParserConfig(org.eclipse.rdf4j.rio.ParserConfig parserConfig)
    Sets an RDF4J ParserConfig to use

    Methods 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

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RDF4JParser

      public RDF4JParser()
  • Method Details

    • getParserConfig

      public org.eclipse.rdf4j.rio.ParserConfig getParserConfig()
      Gets the RDF4J ParserConfig 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 set setParserConfig(ParserConfig).

      Returns:
      The RDF4J ParserConfig
    • setParserConfig

      public void setParserConfig(org.eclipse.rdf4j.rio.ParserConfig parserConfig)
      Sets an RDF4J ParserConfig to use
      Parameters:
      parserConfig - Parser configuration