Class InternalRDF4JFactory

java.lang.Object
org.apache.commons.rdfrdf4j.impl.InternalRDF4JFactory

public abstract class InternalRDF4JFactory extends Object
Factory for RDF4JTerm instances.

Internal class: This "abstract" class is intended for internal use by Commons RDF and may change in any minor update. Use instead RDF4J methods like RDF4J.createBlankNode(), RDF4J.asRDFTerm(org.eclipse.rdf4j.model.Value) and RDF4J.asGraph(Repository, Option...)

This class exists as a public bridge between the packages org.apache.commons.rdfrdf4j and org.apache.commons.rdfrdf4j.impl by exposing the package-public constructors.

See Also:
  • Constructor Details

    • InternalRDF4JFactory

      public InternalRDF4JFactory()
  • Method Details

    • createBlankNodeImpl

      public RDF4JBlankNode createBlankNodeImpl(org.eclipse.rdf4j.model.BNode bNode, UUID salt)
      Constructs a RDF4JBlankNode from a RDF4J BNode.
      Parameters:
      bNode - RDF4J BNode to adapt
      salt - UUID to use for BlankNode.uniqueReference() in combination with BNode.getID()
      Returns:
      Adapted RDF4JBlankNode
    • createIRIImpl

      public RDF4JIRI createIRIImpl(org.eclipse.rdf4j.model.IRI iri)
      Constructs a RDF4JIRI from a RDF4J IRI.
      Parameters:
      iri - RDF4J IRI to adapt
      Returns:
      Adapted RDF4JIRI
    • createLiteralImpl

      public RDF4JLiteral createLiteralImpl(org.eclipse.rdf4j.model.Literal literal)
      Constructs a RDF4JLiteral from a RDF4J Literal.
      Parameters:
      literal - RDF4J Literal
      Returns:
      Adapted RDF4JLiteral
    • createModelGraphImpl

      public RDF4JGraph createModelGraphImpl(org.eclipse.rdf4j.model.Model model, RDF4J rdf4jTermFactory)
      Constructs a RDF4JGraph from a RDF4J Model.

      Changes in the graph will be reflected in the model, and vice versa.

      Parameters:
      model - RDF4J Model to adapt
      rdf4jTermFactory - factory to use for adapting graph triples
      Returns:
      Adapted RDF4JGraph
    • createQuadImpl

      public RDF4JQuad createQuadImpl(org.eclipse.rdf4j.model.Statement statement, UUID salt)
      Constructs a RDF4JQuad from a RDF4J Statement.
      Parameters:
      statement - RDF4J Statement to adapt
      salt - UUID for adapting any BNodes
      Returns:
      Adapted RDF4JQuad
    • createRepositoryDatasetImpl

      public RDF4JDataset createRepositoryDatasetImpl(org.eclipse.rdf4j.repository.Repository repository, boolean handleInitAndShutdown, boolean includeInferred)
      Constructs a RDF4JDataset from a RDF4J Repository.

      Changes in the dataset will be reflected in the repsitory, and vice versa.

      Parameters:
      repository - RDF4J Repository to adapt
      handleInitAndShutdown - If true, the RDF4JDataset will initialize the repository (if needed), and shut it down on Dataset.close().
      includeInferred - If true, any inferred quads are included in the dataset
      Returns:
      Adapted RDF4JDataset
    • createRepositoryGraphImpl

      public RDF4JGraph createRepositoryGraphImpl(org.eclipse.rdf4j.repository.Repository repository, boolean handleInitAndShutdown, boolean includeInferred, org.eclipse.rdf4j.model.Resource... contextMask)
      Constructs a RDF4JGraph from a RDF4J Model.

      Changes in the graph will be reflected in the model, and vice versa.

      Parameters:
      repository - RDF4J Repository to adapt
      handleInitAndShutdown - If true, the RDF4JGraph will initialize the repository (if needed), and shut it down on Graph.close().
      includeInferred - If true, any inferred quads are included in the dataset
      contextMask - Zero or more Resources contexts. The array may contain the value null for the default graph - however care must be taken to not provide a null-array (Resource[]) null.
      Returns:
      Adapted RDF4JGraph
    • createTripleImpl

      public RDF4JTriple createTripleImpl(org.eclipse.rdf4j.model.Statement statement, UUID salt)
      Constructs a RDF4JTriple from a RDF4J Statement.
      Parameters:
      statement - RDF4J Statement to adapt
      salt - UUID for adapting any BNodes
      Returns:
      Adapted RDF4JTriple