Interface RDF4JGraphLike<T extends TripleLike>

All Superinterfaces:
AutoCloseable, GraphLike<T>
All Known Subinterfaces:
RDF4JDataset, RDF4JGraph
All Known Implementing Classes:
AbstractRepositoryGraphLike, ModelGraphImpl, RepositoryDatasetImpl, RepositoryGraphImpl

public interface RDF4JGraphLike<T extends TripleLike> extends GraphLike<T>, AutoCloseable
Marker interface for RDF4J implementations of GraphLike.

This is a common interface for RDF4JGraph and RDF4JDataset which provides access to the underlying RDF4J Model and/or Repository.

At least one of asModel() or asRepository() will always be Optional.isPresent().

See Also:
  • Method Details

    • asModel

      Optional<org.eclipse.rdf4j.model.Model> asModel()
      Return the corresponding RDF4J Model, if present.

      The return value is Optional.isPresent() if this is backed by a Model.

      Changes to the Model are reflected in both directions.

      Returns:
      The corresponding RDF4J Model.
    • asRepository

      Optional<org.eclipse.rdf4j.repository.Repository> asRepository()
      Return the corresponding RDF4J Repository, if present.

      The return value is Optional.isPresent() if this is backed by a Repository.

      Changes to the Repository are reflected in both directions.

      Returns:
      The corresponding RDF4J Repository.