Package cz.cvut.kbss.ontodriver
Interface DataSource
- All Superinterfaces:
Closeable
- All Known Subinterfaces:
ReloadableDataSource
- All Known Implementing Classes:
JenaDataSource
,OwlapiDataSource
,Rdf4jDataSource
,VirtuosoDataSource
Represents an ontology data source.
This could be either a single ontology or a storage with multiple named graphs or ontology modules.
The implementations are required to have a public no-arg constructor. Connection settings are passed through the setter methods.
-
Method Summary
Modifier and TypeMethodDescriptionRequests a connection to the underlying data source.void
setProperties
(Map<String, String> properties) Sets additional configuration properties on the data source.void
setStorageProperties
(OntologyStorageProperties storageProperties) Sets storage properties for this data source.
-
Method Details
-
getConnection
Requests a connection to the underlying data source.- Returns:
- A
Connection
to the data source - Throws:
OntoDriverException
- If an ontology access error occursIllegalStateException
- If called on a closed data source
-
setStorageProperties
Sets 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.
- Parameters:
storageProperties
- The properties to use- Throws:
OntoDriverException
- If an ontology access error occurs
-
setProperties
Sets additional configuration properties on the data source.- Parameters:
properties
- Map of properties- Throws:
OntoDriverException
- If an ontology access error occurs
-