net.ontopia.topicmaps.query.impl.basic
Class InstanceOfPredicate

java.lang.Object
  extended by net.ontopia.topicmaps.query.impl.basic.AbstractInstanceOfPredicate
      extended by net.ontopia.topicmaps.query.impl.basic.InstanceOfPredicate
All Implemented Interfaces:
BasicPredicateIF, PredicateIF
Direct Known Subclasses:
InstanceOfPredicate

public class InstanceOfPredicate
extends AbstractInstanceOfPredicate

INTERNAL: Implements the 'instance-of' predicate using the indexes.


Field Summary
protected  java.util.Map superTypeCache
           
protected  TypeHierarchyUtils typeutils
           
 
Fields inherited from class net.ontopia.topicmaps.query.impl.basic.AbstractInstanceOfPredicate
index, topicmap
 
Constructor Summary
InstanceOfPredicate(TopicMapIF topicmap)
           
 
Method Summary
protected  java.util.Collection getClasses(TopicIF instance)
          INTERNAL: Should return all applicable types of the given topic.
protected  java.util.Collection getInstances(TopicIF klass)
          INTERNAL: Should return all instances of the topic, as seen by the specific predicate.
 java.lang.String getName()
          INTERNAL: Returns the name of the predicate.
protected  java.util.Collection getSubtypes(TopicIF type)
           
protected  java.util.Collection getSupertypes(TopicIF type)
          INTERNAL: Should return all supertypes of the given class, including the class itself.
protected  java.util.Collection getTypes()
          INTERNAL: Should return all topic types, as seen by the specific predicate.
protected  void start()
          INTERNAL: Called before the evaluation of a new query, to allow resetting of internal caches etc.
 
Methods inherited from class net.ontopia.topicmaps.query.impl.basic.AbstractInstanceOfPredicate
getCost, getDirectInstances, getSignature, satisfy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

typeutils

protected TypeHierarchyUtils typeutils

superTypeCache

protected java.util.Map superTypeCache
Constructor Detail

InstanceOfPredicate

public InstanceOfPredicate(TopicMapIF topicmap)
Method Detail

getName

public java.lang.String getName()
Description copied from interface: PredicateIF
INTERNAL: Returns the name of the predicate. This will usually be the name of the predicate within its module ('instance-of', '/=', 'starts-with'), but some virtual predicates cannot be reached from the syntax and may return names that will not parse.


start

protected void start()
Description copied from class: AbstractInstanceOfPredicate
INTERNAL: Called before the evaluation of a new query, to allow resetting of internal caches etc.

Specified by:
start in class AbstractInstanceOfPredicate

getClasses

protected java.util.Collection getClasses(TopicIF instance)
Description copied from class: AbstractInstanceOfPredicate
INTERNAL: Should return all applicable types of the given topic. In 'instance-of' this includes the supertypes of the topic's types.

Specified by:
getClasses in class AbstractInstanceOfPredicate

getInstances

protected java.util.Collection getInstances(TopicIF klass)
Description copied from class: AbstractInstanceOfPredicate
INTERNAL: Should return all instances of the topic, as seen by the specific predicate.

Specified by:
getInstances in class AbstractInstanceOfPredicate

getTypes

protected java.util.Collection getTypes()
Description copied from class: AbstractInstanceOfPredicate
INTERNAL: Should return all topic types, as seen by the specific predicate.

Specified by:
getTypes in class AbstractInstanceOfPredicate

getSupertypes

protected java.util.Collection getSupertypes(TopicIF type)
Description copied from class: AbstractInstanceOfPredicate
INTERNAL: Should return all supertypes of the given class, including the class itself. In 'direct-instance-of' this should just be the class itself.

Specified by:
getSupertypes in class AbstractInstanceOfPredicate

getSubtypes

protected java.util.Collection getSubtypes(TopicIF type)


Copyright © 2000-2012 Ontopia.