Package org.apache.commons.rdfrdf4j.impl
Class InternalRDF4JFactory
java.lang.Object
org.apache.commons.rdfrdf4j.impl.InternalRDF4JFactory
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateBlankNodeImpl
(org.eclipse.rdf4j.model.BNode bNode, UUID salt) Constructs aRDF4JBlankNode
from a RDF4JBNode
.createIRIImpl
(org.eclipse.rdf4j.model.IRI iri) Constructs aRDF4JIRI
from a RDF4JIRI
.createLiteralImpl
(org.eclipse.rdf4j.model.Literal literal) Constructs aRDF4JLiteral
from a RDF4JLiteral
.createModelGraphImpl
(org.eclipse.rdf4j.model.Model model, RDF4J rdf4jTermFactory) Constructs aRDF4JGraph
from a RDF4JModel
.createQuadImpl
(org.eclipse.rdf4j.model.Statement statement, UUID salt) Constructs aRDF4JQuad
from a RDF4JStatement
.createRepositoryDatasetImpl
(org.eclipse.rdf4j.repository.Repository repository, boolean handleInitAndShutdown, boolean includeInferred) Constructs aRDF4JDataset
from a RDF4JRepository
.createRepositoryGraphImpl
(org.eclipse.rdf4j.repository.Repository repository, boolean handleInitAndShutdown, boolean includeInferred, org.eclipse.rdf4j.model.Resource... contextMask) Constructs aRDF4JGraph
from a RDF4JModel
.createTripleImpl
(org.eclipse.rdf4j.model.Statement statement, UUID salt) Constructs aRDF4JTriple
from a RDF4JStatement
.
-
Constructor Details
-
InternalRDF4JFactory
public InternalRDF4JFactory()
-
-
Method Details
-
createBlankNodeImpl
Constructs aRDF4JBlankNode
from a RDF4JBNode
.- Parameters:
bNode
- RDF4JBNode
to adaptsalt
-UUID
to use forBlankNode.uniqueReference()
in combination withBNode.getID()
- Returns:
- Adapted
RDF4JBlankNode
-
createIRIImpl
Constructs aRDF4JIRI
from a RDF4JIRI
.- Parameters:
iri
- RDF4JIRI
to adapt- Returns:
- Adapted
RDF4JIRI
-
createLiteralImpl
Constructs aRDF4JLiteral
from a RDF4JLiteral
.- Parameters:
literal
- RDF4JLiteral
- Returns:
- Adapted
RDF4JLiteral
-
createModelGraphImpl
Constructs aRDF4JGraph
from a RDF4JModel
.Changes in the graph will be reflected in the model, and vice versa.
- Parameters:
model
- RDF4JModel
to adaptrdf4jTermFactory
- factory to use for adapting graph triples- Returns:
- Adapted
RDF4JGraph
-
createQuadImpl
Constructs aRDF4JQuad
from a RDF4JStatement
. -
createRepositoryDatasetImpl
public RDF4JDataset createRepositoryDatasetImpl(org.eclipse.rdf4j.repository.Repository repository, boolean handleInitAndShutdown, boolean includeInferred) Constructs aRDF4JDataset
from a RDF4JRepository
.Changes in the dataset will be reflected in the repsitory, and vice versa.
- Parameters:
repository
- RDF4JRepository
to adapthandleInitAndShutdown
- Iftrue
, theRDF4JDataset
will initialize the repository (if needed), and shut it down onDataset.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 aRDF4JGraph
from a RDF4JModel
.Changes in the graph will be reflected in the model, and vice versa.
- Parameters:
repository
- RDF4JRepository
to adapthandleInitAndShutdown
- Iftrue
, theRDF4JGraph
will initialize the repository (if needed), and shut it down onGraph.close()
.includeInferred
- If true, any inferred quads are included in the datasetcontextMask
- Zero or moreResource
s contexts. The array may contain the valuenull
for the default graph - however care must be taken to not provide a null-array(Resource[]) null
.- Returns:
- Adapted
RDF4JGraph
-
createTripleImpl
Constructs aRDF4JTriple
from a RDF4JStatement
.- Parameters:
statement
- RDF4JStatement
to adaptsalt
-UUID
for adapting anyBNode
s- Returns:
- Adapted
RDF4JTriple
-