Class AbstractRepositoryGraphLike<T extends TripleLike>
- java.lang.Object
-
- org.apache.commons.rdf.rdf4j.impl.AbstractRepositoryGraphLike<T>
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,GraphLike<T>
,RDF4JGraphLike<T>
- Direct Known Subclasses:
RepositoryDatasetImpl
,RepositoryGraphImpl
abstract class AbstractRepositoryGraphLike<T extends TripleLike> extends java.lang.Object implements RDF4JGraphLike<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
handleInitAndShutdown
protected boolean
includeInferred
protected RDF4J
rdf4jTermFactory
protected org.eclipse.rdf4j.repository.Repository
repository
protected java.util.UUID
salt
-
Constructor Summary
Constructors Constructor Description AbstractRepositoryGraphLike(org.eclipse.rdf4j.repository.Repository repository, java.util.UUID salt, boolean handleInitAndShutdown, boolean includeInferred)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete 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.protected abstract T
asTripleLike(org.eclipse.rdf4j.model.Statement s)
void
close()
protected org.eclipse.rdf4j.repository.RepositoryConnection
getRepositoryConnection()
-
-
-
Field Detail
-
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 java.util.UUID salt
-
-
Method Detail
-
close
public void close() throws java.lang.Exception
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
java.lang.Exception
-
asTripleLike
protected abstract T asTripleLike(org.eclipse.rdf4j.model.Statement s)
-
getRepositoryConnection
protected org.eclipse.rdf4j.repository.RepositoryConnection getRepositoryConnection()
-
asRepository
public java.util.Optional<org.eclipse.rdf4j.repository.Repository> asRepository()
Description copied from interface:RDF4JGraphLike
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.
- Specified by:
asRepository
in interfaceRDF4JGraphLike<T extends TripleLike>
- Returns:
- The corresponding RDF4J Repository.
-
asModel
public java.util.Optional<org.eclipse.rdf4j.model.Model> asModel()
Description copied from interface:RDF4JGraphLike
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.
- Specified by:
asModel
in interfaceRDF4JGraphLike<T extends TripleLike>
- Returns:
- The corresponding RDF4J Model.
-
-