Package cz.cvut.kbss.ontodriver.owlapi
Class OwlapiDataSource
java.lang.Object
cz.cvut.kbss.ontodriver.owlapi.OwlapiDataSource
- All Implemented Interfaces:
Closeable
,DataSource
,ReloadableDataSource
Main entry point to this OWLAPI-based OntoDriver.
- Author:
- ledvima1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes this resource releasing any sub-resources it holds.Requests a connection to the underlying data source.boolean
isOpen()
Retrieves status of this resource.void
reload()
Reloads data from the underlying storage, if possible.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.
-
Constructor Details
-
OwlapiDataSource
public OwlapiDataSource()
-
-
Method Details
-
getConnection
Description copied from interface:DataSource
Requests a connection to the underlying data source.- Specified by:
getConnection
in interfaceDataSource
- Returns:
- A
Connection
to the data source - Throws:
OntoDriverException
- If an ontology access error occurs
-
setStorageProperties
Description copied from interface:DataSource
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.
- Specified by:
setStorageProperties
in interfaceDataSource
- Parameters:
storageProperties
- The properties to use
-
setProperties
Description copied from interface:DataSource
Sets additional configuration properties on the data source.- Specified by:
setProperties
in interfaceDataSource
- Parameters:
properties
- Map of properties
-
reload
Description copied from interface:ReloadableDataSource
Reloads data from the underlying storage, if possible.Does nothing if the underlying storage does not support reloading or it is not necessary (e.g. when connected to a remote triple store).
- Specified by:
reload
in interfaceReloadableDataSource
- Throws:
OntoDriverException
- If an error occurs when reloading data
-
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.
-