Skip navigation links

Package org.apache.commons.rdf.rdf4j

Commons RDF integration with RDF4J.

See: Description

Package org.apache.commons.rdf.rdf4j Description

Commons RDF integration with RDF4J.

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 Models 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 RDF4JParser#target(Dataset) and an adapted RDF4JDataset, or RDF4JParser#target(Graph) and a an adapted RDF4JGraph

Skip navigation links

Copyright © 2015–2017 The Apache Software Foundation. All rights reserved.