Class OwlapiDataSource

java.lang.Object
cz.cvut.kbss.ontodriver.owlapi.OwlapiDataSource
All Implemented Interfaces:
Closeable, DataSource, ReloadableDataSource

public class OwlapiDataSource extends Object implements ReloadableDataSource
Main entry point to this OWLAPI-based OntoDriver.
Author:
ledvima1
  • Constructor Details

    • OwlapiDataSource

      public OwlapiDataSource()
  • Method Details

    • getConnection

      public Connection getConnection() throws OntoDriverException
      Description copied from interface: DataSource
      Requests a connection to the underlying data source.
      Specified by:
      getConnection in interface DataSource
      Returns:
      A Connection to the data source
      Throws:
      OntoDriverException - If an ontology access error occurs
    • setStorageProperties

      public void setStorageProperties(OntologyStorageProperties storageProperties)
      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 interface DataSource
      Parameters:
      storageProperties - The properties to use
    • setProperties

      public void setProperties(Map<String,String> properties)
      Description copied from interface: DataSource
      Sets additional configuration properties on the data source.
      Specified by:
      setProperties in interface DataSource
      Parameters:
      properties - Map of properties
    • reload

      public void reload() throws OntoDriverException
      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 interface ReloadableDataSource
      Throws:
      OntoDriverException - If an error occurs when reloading data
    • close

      public void close() throws OntoDriverException
      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 and isOpen) will result in IllegalStateException.

      Calling close on already closed resource does nothing.

      Specified by:
      close in interface Closeable
      Throws:
      OntoDriverException - If an ontology access error occurs.
    • isOpen

      public boolean isOpen()
      Description copied from interface: Closeable
      Retrieves status of this resource.
      Specified by:
      isOpen in interface Closeable
      Returns:
      true if the resource is open, false otherwise