Class StorageConnector
java.lang.Object
cz.cvut.kbss.ontodriver.rdf4j.connector.StorageConnector
- All Implemented Interfaces:
Closeable
,Rdf4jConnectionProvider
,Wrapper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.rdf4j.repository.RepositoryConnection
void
close()
Closes this resource releasing any sub-resources it holds.org.eclipse.rdf4j.model.ValueFactory
void
boolean
isOpen()
Retrieves status of this resource.void
setRepository
(org.eclipse.rdf4j.repository.Repository newRepository) Replaces the currently open repository with the specified one.<T> T
Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.
-
Constructor Details
-
StorageConnector
- Throws:
Rdf4jDriverException
-
-
Method Details
-
initializeRepository
- Throws:
Rdf4jDriverException
-
setRepository
public void setRepository(org.eclipse.rdf4j.repository.Repository newRepository) Replaces the currently open repository with the specified one.Note that this functionality is only supported for in-memory stores.
- Parameters:
newRepository
- The new repository to set
-
getValueFactory
public org.eclipse.rdf4j.model.ValueFactory getValueFactory()- Specified by:
getValueFactory
in interfaceRdf4jConnectionProvider
-
acquireConnection
public org.eclipse.rdf4j.repository.RepositoryConnection acquireConnection() throws Rdf4jDriverException- Specified by:
acquireConnection
in interfaceRdf4jConnectionProvider
- Throws:
Rdf4jDriverException
-
close
Description copied from interface:Closeable
Closes this resource releasing any sub-resources it holds.After closing the resource is not usable any more and calling methods on it (except
close
andisOpen
) will result inIllegalStateException
.Calling
close
on already closed resource does nothing.- Specified by:
close
in interfaceCloseable
- Throws:
OntoDriverException
- If an ontology access error occurs.
-
isOpen
public boolean isOpen()Description copied from interface:Closeable
Retrieves status of this resource. -
unwrap
Description copied from interface:Wrapper
Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy. If the receiver implements the interface then the result is the receiver or a proxy for the receiver. If the receiver is a wrapper and the wrapped object implements the interface then the result is the wrapped object or a proxy for the wrapped object. Otherwise return the the result of calling unwrap recursively on the wrapped object or a proxy for that result. If the receiver is not a wrapper and does not implement the interface, then anOntoDriverException
is thrown.- Specified by:
unwrap
in interfaceWrapper
- Type Parameters:
T
- The type of the class modeled by this Class object- Parameters:
cls
- The type of the required result- Returns:
- An object implementing the interface
- Throws:
OntoDriverException
- If no matching object is found
-