Class ConnectorFactory

java.lang.Object
cz.cvut.kbss.ontodriver.jena.connector.ConnectorFactory
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
InferenceConnectorFactory, ReadCommittedConnectorFactory, SnapshotConnectorFactory

public abstract class ConnectorFactory extends Object implements Closeable
  • Constructor Details

    • ConnectorFactory

      public ConnectorFactory()
  • Method Details

    • close

      public void close() throws JenaDriverException
      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:
      JenaDriverException
    • 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
    • createConnector

      public abstract StorageConnector createConnector()
      Creates a storage connector.
      Returns:
      storage connector
    • createInferredConnector

      public InferredStorageConnector createInferredConnector(StorageConnector connector)
      Creates an inference-supporting storage connector.

      The connector parameter is required because both connector need to be kept in sync so that non-inferred data are consistent across both connectors.

      Parameters:
      connector - Existing storage connector
      Returns:
      New inference-supporting storage connector
    • reloadStorage

      public abstract void reloadStorage()
      Reloads data from storage if it is a file-based one.

      Does nothing for other types of storage.

    • setDataset

      public abstract void setDataset(org.apache.jena.query.Dataset dataset)
      Sets dataset on the underlying connector.

      Not that this operation is supported only for in-memory storage.

      Parameters:
      dataset - Dataset to set