Class AbstractRepositoryGraphLike<T extends TripleLike>

java.lang.Object
org.apache.commons.rdf.rdf4j.impl.AbstractRepositoryGraphLike<T>
All Implemented Interfaces:
AutoCloseable, GraphLike<T>, RDF4JGraphLike<T>
Direct Known Subclasses:
RepositoryDatasetImpl, RepositoryGraphImpl

abstract class AbstractRepositoryGraphLike<T extends TripleLike> extends Object implements RDF4JGraphLike<T>
  • Field Details

    • repository

      protected final org.eclipse.rdf4j.repository.Repository repository
    • includeInferred

      protected final boolean includeInferred
    • handleInitAndShutdown

      protected final boolean handleInitAndShutdown
    • rdf4jTermFactory

      protected final RDF4J rdf4jTermFactory
    • salt

      protected final UUID salt
  • Constructor Details

    • AbstractRepositoryGraphLike

      AbstractRepositoryGraphLike(org.eclipse.rdf4j.repository.Repository repository, UUID salt, boolean handleInitAndShutdown, boolean includeInferred)
  • Method Details

    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception
    • asTripleLike

      protected abstract T asTripleLike(org.eclipse.rdf4j.model.Statement s)
    • getRepositoryConnection

      protected org.eclipse.rdf4j.repository.RepositoryConnection getRepositoryConnection()
    • asRepository

      public Optional<org.eclipse.rdf4j.repository.Repository> asRepository()
      Description copied from interface: RDF4JGraphLike
      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.

      Specified by:
      asRepository in interface RDF4JGraphLike<T extends TripleLike>
      Returns:
      The corresponding RDF4J Repository.
    • asModel

      public Optional<org.eclipse.rdf4j.model.Model> asModel()
      Description copied from interface: RDF4JGraphLike
      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.

      Specified by:
      asModel in interface RDF4JGraphLike<T extends TripleLike>
      Returns:
      The corresponding RDF4J Model.