Package org.apache.commons.rdfrdf4j
Use the RDF4J
to convert between Commons RDF and RDF4J types, for
instance RDF4J.asQuad(org.eclipse.rdf4j.model.Statement)
converts a
RDF4J Statement
to a
Quad
. Converted RDF terms implement the
RDF4JTerm
interface, and converted statements the
RDF4JTripleLike
interface, which provide convenience access to the
underlying RDF4J implementations.
RDF4J Model
s and
Repository
instances can be adapted to
Commons RDF Graph
and Dataset
, e.g. using
RDF4J.asGraph(org.eclipse.rdf4j.model.Model)
or
RDF4J.asDataset(org.eclipse.rdf4j.repository.Repository, RDF4J.Option...)
The returned adapted graph/dataset is directly mapped, so changes are
propagated both ways. For convenience, the marker interface
RDF4JGraph
and RDF4JDataset
provide access to the underlying
RDF4J implementations.
The RDF4JParser
can be used to parse RDF files using RDF4j. It should
be most efficient if used with AbstractRDFParser.target(Dataset)
and an
adapted RDF4JDataset
, or AbstractRDFParser.target(Graph)
and a an
adapted RDF4JGraph
-
ClassDescriptionAn
Iterable
which should beAutoCloseable.close()
d after use.RDF4J implementation of RDF.Marker interface for RDF4J implementations of Commons RDFBlankNode
.Marker interface for RDF4J implementations of Commons RDFBlankNodeOrIRI
(e.g.Marker interface for RDF4J implementations of Dataset.Marker interface for RDF4J implementations of Graph.RDF4JGraphLike<T extends org.apache.commons.rdf.api.TripleLike>Marker interface for RDF4J implementations of GraphLike.Marker interface for RDF4J implementations of Commons RDFIRI
.Marker interface for RDF4J implementations of Commons RDFLiteral
.Marker interface for RDF4J implementations of Quad.Marker interface for RDF4J implementations of RDFTerm.Marker interface for RDF4J implementations of Triple.Marker interface for RDF4J implementations ofTripleLike
statements.