|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Context
An object representing an elementary unit of computation for saturation of an
IndexedClassExpression, stored as a root of the
Context. This interface specifies method that can be used to access
the result of the computation in addition to the methods used by a
RuleApplicationFactory to perform the computation concurrently.
RuleApplicationFactory| Method Detail |
|---|
IndexedClassExpression getRoot()
IndexedClassExpression for which this Context
is assigned. This may never been null.Set<IndexedClassExpression> getSubsumers()
IndexedClassExpressions that subsume the root
IndexedClassExpressionMultimap<IndexedPropertyChain,Context> getBackwardLinksByObjectProperty()
Contexts from which there exists an (implied)
"existential relation" with this Context indexed by the
IndexedPropertyChain of this relation. For example, if
the input ontology contains an axiom
SubClassOf(:A ObjectSomeValuesFrom(:r :B) then an
existential link between the context with root :A and the
context with root :B with property :r will be
created. For technical reasons, this link is stored in the
context for :B, as a "backward link" <:r, :A>
indexed by :r in the Multimap returned by this
method. The returned Multimap is not thread safe and
should be accessed from at most one thread at a time. This is
never null.LinkRule<BackwardLink> getBackwardLinkRuleHead()
Context, or
null if there no such rules; all other rules can be
obtained by traversing over Link.next(); this method
should be used to access the rules without modifying them.Chain<ModifiableLinkRule<BackwardLink>> getBackwardLinkRuleChain()
Chain view of all backward link rules assigned to
this Context; this is always not null. This
method can be used for convenient search and modification
(addition and deletion) of the rules using the methods of the
Chain interface without without worrying about
null values.boolean addBackwardLink(BackwardLink link)
BackwardLink to this Context.
link - the BackwardLink being added to this Context
true if this Context has changed as the result
this method, i.e., the given BackwardLink has not been
added before to this Context. This method is not thread
safe.boolean removeBackwardLink(BackwardLink link)
boolean containsBackwardLink(BackwardLink link)
boolean addSubsumer(IndexedClassExpression expression)
IndexedClassExpression to the subsumers of the
root IndexedClassExpression of this Context.
expression - the IndexedClassExpression to be added as a susbumer
of the root IndexedClassExpression of this
Context.
true if the set of subsumers of this Context has
changed as the result of calling this method, i.e., the input
IndexedClassExpression was not a subsumer before. This
method is not thread safe.boolean removeSubsumer(IndexedClassExpression expression)
IndexedClassExpression from the subsumers of
the root IndexedClassExpression of this Context.
expression - the IndexedClassExpression to be removed from the
subsumers of the root in this Context
true if the set of subsumers of this Context has
changed as the result of calling this method, i.e., the input
IndexedClassExpression was a subsumer before. This method
is not thread safe.boolean containsSubsumer(IndexedClassExpression expression)
IndexedClassExpression is a subsumer of
the root IndexedClassExpression of this Context.
expression - the IndexedClassExpression to be tested for this
Context
true if the given IndexedClassExpression is a
subsumer of the root in this Context. This method is not
thread safe.boolean addDisjointnessAxiom(IndexedDisjointnessAxiom axiom)
IndexedDisjointnessAxiom to this
Context.
axiom - the IndexedDisjointnessAxiom to be added to this
Context
true if adding the axiom changes the state of this
Context, i.e., some rules need to be appliedboolean removeDisjointnessAxiom(IndexedDisjointnessAxiom axiom)
IndexedDisjointnessAxiom from
this Context.
axiom - the IndexedDisjointnessAxiom to be removed from this
Context
true if the state of this Context has changed as
the result of calling this method, i.e., the context has
contained this IndexedDisjointnessAxiomboolean containsDisjointnessAxiom(IndexedDisjointnessAxiom axiom)
axiom - the IndexedDisjointnessAxiom to be checked for
occurrences in this Context
true if the given IndexedDisjointnessAxiom occurs
in this Contextboolean inconsistencyDisjointnessAxiom(IndexedDisjointnessAxiom axiom)
axiom - the IndexedDisjointnessAxiom to be checked for causing
inconsistency in this Context
true if the given IndexedDisjointnessAxiom causes
inconsistency of this Contextboolean addToDo(Conclusion conclusion)
Conclusion to be processed within this
Context. The method returns true when this is the first
unprocessed conclusion added to the context after it is being created or
cleared (that is, takeToDo() has returned null). If
several threads call this method at the same time for the same
Context then at most one of these method returns true,
unless takeToDo() is called as well.
conclusion - the Conclusion added to be processed within this
Context
true when the added conclusion is the first unprocessed
conclusion for this contexttakeToDo()Conclusion takeToDo()
Conclusions of this
context. This method is thread safe and can be used concurrently with the
method addToDo(Conclusion).
Conclusion of this context, if there is
one, or null if there is no such ConclusionaddToDo(Conclusion)boolean isInconsistent()
true if a contradiction has not been derived for the root
IndexedClassExpressionboolean isSaturated()
true if all Conclusions for this Context,
as determined by the function
Conclusion.getSourceContext(Context), are already
computed.boolean setInconsistent(boolean consistent)
Context to the given value.
boolean setSaturated(boolean saturated)
Context as saturated. This means that all all
Conclusions for this Context are already computed.
Contextboolean isEmpty()
true if the context is emptyvoid removeLinks()
Context from the chain of contexts
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||