Class TrivialInferencer
- All Implemented Interfaces:
org.eclipse.rdf4j.query.algebra.evaluation.federation.FederatedServiceResolverClient,org.eclipse.rdf4j.sail.NotifyingSail,org.eclipse.rdf4j.sail.Sail,org.eclipse.rdf4j.sail.StackableSail
Sail implementation that manages trivial inferences (i.e. symmetric and inverse properties).
Upon the addition of a triple s p o:
- if
pis anowl:SymmetricProperty, then this sail also adds the tripleo p s(swapping the subject and object of the original triple) - if
phas inversep'orp'has inversep, then this sails also adds the tripleo p' s(swapping the subject and object of the original triple, and using the inverse property as predicate)
Upon the deletion of a triple s p o, this sail also deletes the triple that would have been
materialized according to the rules above.
Materialization of trivial inferences is done upon each triple addition/removal.
This sail caches schema-level definitions, such as the inverse of a property and the fact that it is symmetric.
Within a transaction, this sail performs its reasoning activities using a snapshot of the cache describing
its state before the transaction happens. Consequently, every schema-level change within a transaction will
not affect materialization during that transaction. This limitation shouldn't be a problem in most cases,
in which the TBox and ABox are modified in different transactions. This
limitation frees the sail from the need to store a temporary copy of all triple edits within a transaction,
just in case some of these edits use a predicate whose definition is changed within the same transaction.
- Author:
- Manuel Fiorelli
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.eclipse.rdf4j.sail.helpers.NotifyingSailWrapper
addSailChangedListener, getBaseSail, removeSailChangedListener, setBaseSailMethods inherited from class org.eclipse.rdf4j.sail.helpers.SailWrapper
getCollectionFactory, getDataDir, getDefaultIsolationLevel, getFederatedServiceResolver, getSupportedIsolationLevels, getValueFactory, isWritable, setDataDir, setFederatedServiceResolver, verifyBaseSailSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.rdf4j.sail.Sail
getCollectionFactory, getDataDir, getDefaultIsolationLevel, getSupportedIsolationLevels, getValueFactory, isWritable, setDataDir
-
Constructor Details
-
TrivialInferencer
-
-
Method Details
-
init
public void init() throws org.eclipse.rdf4j.sail.SailException- Specified by:
initin interfaceorg.eclipse.rdf4j.sail.Sail- Overrides:
initin classorg.eclipse.rdf4j.sail.helpers.SailWrapper- Throws:
org.eclipse.rdf4j.sail.SailException
-
shutDown
public void shutDown() throws org.eclipse.rdf4j.sail.SailException- Specified by:
shutDownin interfaceorg.eclipse.rdf4j.sail.Sail- Overrides:
shutDownin classorg.eclipse.rdf4j.sail.helpers.SailWrapper- Throws:
org.eclipse.rdf4j.sail.SailException
-
getConnection
- Specified by:
getConnectionin interfaceorg.eclipse.rdf4j.sail.NotifyingSail- Specified by:
getConnectionin interfaceorg.eclipse.rdf4j.sail.Sail- Overrides:
getConnectionin classorg.eclipse.rdf4j.sail.helpers.NotifyingSailWrapper- Throws:
org.eclipse.rdf4j.sail.SailException
-
getSchemaCache
protected org.eclipse.rdf4j.repository.Repository getSchemaCache() -
rebuildCache
protected void rebuildCache() -
invalidateCache
protected void invalidateCache()
-