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

java.lang.Object
  extended by org.semanticweb.elk.reasoner.indexing.hierarchy.IndexedObject
      extended by org.semanticweb.elk.reasoner.indexing.hierarchy.IndexedClassExpression
          extended by org.semanticweb.elk.reasoner.indexing.hierarchy.IndexedClassEntity
              extended by org.semanticweb.elk.reasoner.indexing.hierarchy.IndexedClass
All Implemented Interfaces:
Comparable<IndexedClassExpression>

public class IndexedClass
extends IndexedClassEntity

Represents all occurrences of an ElkClass in an ontology.

Author:
Frantisek Simancik, "Yevgeny Kazakov"

Nested Class Summary
static class IndexedClass.OwlThingContextInitializationRule
          Adds owl:Thing to the context.
 
Field Summary
protected  ElkClass elkClass
          The indexed ElkClass
protected static org.apache.log4j.Logger LOGGER_
           
protected  int occurrenceNo
          This counts how many times this object occurred in the ontology.
 
Constructor Summary
protected IndexedClass(ElkClass elkClass)
          Creates an object representing the given ElkClass.
 
Method Summary
 void accept(DecompositionRuleApplicationVisitor visitor, Context context)
           
<O> O
accept(IndexedClassEntityVisitor<O> visitor)
           
<O> O
accept(IndexedClassVisitor<O> visitor)
           
 void checkOccurrenceNumbers()
          verifies that occurrence numbers are not negative
 ElkClass getElkClass()
           
 boolean occurs()
          This method should always return true apart from intermediate steps during the indexing.
 String printOccurrenceNumbers()
           
 String toStringStructural()
           
protected  void updateOccurrenceNumbers(ModifiableOntologyIndex index, int increment, int positiveIncrement, int negativeIncrement)
          Non-recursively.
 
Methods inherited from class org.semanticweb.elk.reasoner.indexing.hierarchy.IndexedClassEntity
accept
 
Methods inherited from class org.semanticweb.elk.reasoner.indexing.hierarchy.IndexedClassExpression
accept, compareTo, getCompositionRuleHead, getContext, hashCode, occursNegatively, occursPositively, resetContext, setContext
 
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_

elkClass

protected final ElkClass elkClass
The indexed ElkClass


occurrenceNo

protected int occurrenceNo
This counts how many times this object occurred in the ontology. Because of declaration axioms, this number might differ from the sum of the negative and the positive occurrences counts

Constructor Detail

IndexedClass

protected IndexedClass(ElkClass elkClass)
Creates an object representing the given ElkClass.

Method Detail

getElkClass

public ElkClass getElkClass()
Returns:
The represented ElkClass.

accept

public <O> O accept(IndexedClassVisitor<O> visitor)

accept

public <O> O accept(IndexedClassEntityVisitor<O> visitor)
Specified by:
accept in class IndexedClassEntity

updateOccurrenceNumbers

protected void updateOccurrenceNumbers(ModifiableOntologyIndex index,
                                       int increment,
                                       int positiveIncrement,
                                       int negativeIncrement)
Description copied from class: IndexedClassExpression
Non-recursively. The recursion is implemented in indexing visitors.


printOccurrenceNumbers

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

checkOccurrenceNumbers

public void checkOccurrenceNumbers()
Description copied from class: IndexedClassExpression
verifies that occurrence numbers are not negative

Overrides:
checkOccurrenceNumbers in class IndexedClassExpression

occurs

public boolean occurs()
Description copied from class: IndexedClassExpression
This method should always return true apart from intermediate steps during the indexing.

Overrides:
occurs in class IndexedClassExpression
Returns:
true if the represented class expression occurs in the ontology

accept

public void accept(DecompositionRuleApplicationVisitor visitor,
                   Context context)
Specified by:
accept in class IndexedClassExpression

toStringStructural

public String toStringStructural()
Returns:
a structural string representation of the object


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