Interface DataSource

All Superinterfaces:
Closeable
All Known Subinterfaces:
ReloadableDataSource
All Known Implementing Classes:
JenaDataSource, OwlapiDataSource, Rdf4jDataSource, VirtuosoDataSource

public interface DataSource extends Closeable
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 Details

    • getConnection

      Connection getConnection() throws OntoDriverException
      Requests a connection to the underlying data source.
      Returns:
      A Connection to the data source
      Throws:
      OntoDriverException - If an ontology access error occurs
      IllegalStateException - If called on a closed data source
    • setStorageProperties

      void setStorageProperties(OntologyStorageProperties storageProperties) throws OntoDriverException
      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

      void setProperties(Map<String,String> properties) throws OntoDriverException
      Sets additional configuration properties on the data source.
      Parameters:
      properties - Map of properties
      Throws:
      OntoDriverException - If an ontology access error occurs