Package org.apache.commons.rdf.rdf4j
Interface RDF4JGraphLike<T extends TripleLike>
-
- All Superinterfaces:
java.lang.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>, java.lang.AutoCloseable
Marker interface for RDF4J implementations of GraphLike.This is a common interface for
RDF4JGraphandRDF4JDatasetwhich provides access to the underlying RDF4JModeland/orRepository.At least one of
asModel()orasRepository()will always beOptional.isPresent().- See Also:
RDF4JDataset,RDF4JGraph
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Optional<org.eclipse.rdf4j.model.Model>asModel()Return the corresponding RDF4JModel, if present.java.util.Optional<org.eclipse.rdf4j.repository.Repository>asRepository()Return the corresponding RDF4JRepository, if present.
-
-
-
Method Detail
-
asModel
java.util.Optional<org.eclipse.rdf4j.model.Model> asModel()
Return the corresponding RDF4JModel, 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
java.util.Optional<org.eclipse.rdf4j.repository.Repository> asRepository()
Return the corresponding RDF4JRepository, 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.
-
-