org.semanticweb.elk.reasoner.indexing.hierarchy
Class IndexedClassExpression

java.lang.Object
  extended by org.semanticweb.elk.reasoner.indexing.hierarchy.IndexedObject
      extended by org.semanticweb.elk.reasoner.indexing.hierarchy.IndexedClassExpression
All Implemented Interfaces:
Comparable<IndexedClassExpression>
Direct Known Subclasses:
IndexedClassEntity, IndexedDataHasValue, IndexedObjectComplementOf, IndexedObjectIntersectionOf, IndexedObjectSomeValuesFrom, IndexedObjectUnionOf

public abstract class IndexedClassExpression
extends IndexedObject
implements Comparable<IndexedClassExpression>

Represents all occurrences of an ElkClassExpression in an ontology.

Author:
"Frantisek Simancik", "Markus Kroetzsch", "Yevgeny Kazakov", Pavel Klinov

Field Summary
protected static org.apache.log4j.Logger LOGGER_
           
 
Constructor Summary
IndexedClassExpression()
           
 
Method Summary
abstract  void accept(DecompositionRuleApplicationVisitor visitor, Context context)
           
abstract
<O> O
accept(IndexedClassExpressionVisitor<O> visitor)
           
<O> O
accept(IndexedObjectVisitor<O> visitor)
           
 void checkOccurrenceNumbers()
          verifies that occurrence numbers are not negative
 int compareTo(IndexedClassExpression o)
           
 LinkRule<Context> getCompositionRuleHead()
           
 Context getContext()
           
 int hashCode()
          Get an integer hash code to be used for this object.
 boolean occurs()
          This method should always return true apart from intermediate steps during the indexing.
 boolean occursNegatively()
           
 boolean occursPositively()
           
 String printOccurrenceNumbers()
           
 void resetContext()
          Resets the corresponding context to null.
 boolean setContext(Context context)
          Sets the corresponding context if none was yet assigned.
 
Methods inherited from class org.semanticweb.elk.reasoner.indexing.hierarchy.IndexedObject
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

LOGGER_

protected static final org.apache.log4j.Logger LOGGER_
Constructor Detail

IndexedClassExpression

public IndexedClassExpression()
Method Detail

occurs

public boolean occurs()
This method should always return true apart from intermediate steps during the indexing.

Specified by:
occurs in class IndexedObject
Returns:
true if the represented class expression occurs in the ontology

occursNegatively

public boolean occursNegatively()
Returns:
true if the represented class expression occurs negatively in the ontology

occursPositively

public boolean occursPositively()
Returns:
true if the represented class expression occurs positively in the ontology

printOccurrenceNumbers

public String printOccurrenceNumbers()
Returns:
the string representation for the occurrence numbers of this IndexedClassExpression

checkOccurrenceNumbers

public void checkOccurrenceNumbers()
verifies that occurrence numbers are not negative


getContext

public Context getContext()
Returns:
The corresponding context, null if none was assigned.

setContext

public boolean setContext(Context context)
Sets the corresponding context if none was yet assigned.

Parameters:
context - the Context which will be assigned to this IndexedClassExpression
Returns:
true if the operation succeeded.

resetContext

public void resetContext()
Resets the corresponding context to null.


hashCode

public final int hashCode()
Get an integer hash code to be used for this object.

Overrides:
hashCode in class Object
Returns:
Hash code.

compareTo

public int compareTo(IndexedClassExpression o)
Specified by:
compareTo in interface Comparable<IndexedClassExpression>

getCompositionRuleHead

public LinkRule<Context> getCompositionRuleHead()
Returns:
the first composition rule assigned to this IndexedClassExpression, 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.

accept

public <O> O accept(IndexedObjectVisitor<O> visitor)
Specified by:
accept in class IndexedObject

accept

public abstract <O> O accept(IndexedClassExpressionVisitor<O> visitor)

accept

public abstract void accept(DecompositionRuleApplicationVisitor visitor,
                            Context context)


Copyright © 2011-2013 Department of Computer Science, University of Oxford. All Rights Reserved.