Package cz.cvut.kbss.ontodriver.rdf4j
Class Rdf4jDataSource
java.lang.Object
cz.cvut.kbss.ontodriver.rdf4j.Rdf4jDataSource
- All Implemented Interfaces:
Closeable,DataSource
DataSource implementation representing the RDF4J OntoDriver.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this resource releasing any sub-resources it holds.Requests a connection to the underlying data source.booleanisOpen()Retrieves status of this resource.voidsetProperties(Map<String, String> properties) Sets additional configuration properties on the data source.voidsetRepository(org.eclipse.rdf4j.repository.Repository repository) Sets the underlying repository.voidsetStorageProperties(OntologyStorageProperties storageProperties) Sets storage properties for this data source.
-
Constructor Details
-
Rdf4jDataSource
public Rdf4jDataSource()
-
-
Method Details
-
close
Description copied from interface:CloseableCloses this resource releasing any sub-resources it holds.After closing the resource is not usable any more and calling methods on it (except
closeandisOpen) will result inIllegalStateException.Calling
closeon already closed resource does nothing.- Specified by:
closein interfaceCloseable- Throws:
OntoDriverException- If an ontology access error occurs.
-
isOpen
public boolean isOpen()Description copied from interface:CloseableRetrieves status of this resource. -
getConnection
Description copied from interface:DataSourceRequests a connection to the underlying data source.- Specified by:
getConnectionin interfaceDataSource- Returns:
- A
Connectionto the data source - Throws:
Rdf4jDriverException
-
setStorageProperties
Description copied from interface:DataSourceSets storage properties for this data source.Note that if the data source is already connected to the underlying storage, the outcome of this method is not specified and is likely to have no effect.
- Specified by:
setStoragePropertiesin interfaceDataSource- Parameters:
storageProperties- The properties to use
-
setProperties
Description copied from interface:DataSourceSets additional configuration properties on the data source.- Specified by:
setPropertiesin interfaceDataSource- Parameters:
properties- Map of properties
-
setRepository
public void setRepository(org.eclipse.rdf4j.repository.Repository repository) throws Rdf4jDriverException Sets the underlying repository.Note that this functionality is supported only for in-memory stores.
- Parameters:
repository- The new repository- Throws:
Rdf4jDriverException- When setting repository fails
-