Class InstanceOfPredicate
- java.lang.Object
-
- net.ontopia.topicmaps.query.impl.basic.AbstractInstanceOfPredicate
-
- 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
Fields Modifier and Type Field Description protected Map
superTypeCache
protected TypeHierarchyUtils
typeutils
-
Fields inherited from class net.ontopia.topicmaps.query.impl.basic.AbstractInstanceOfPredicate
index, topicmap
-
-
Constructor Summary
Constructors Constructor Description InstanceOfPredicate(TopicMapIF topicmap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Collection
getClasses(TopicIF instance)
INTERNAL: Should return all applicable types of the given topic.protected Collection
getInstances(TopicIF klass)
INTERNAL: Should return all instances of the topic, as seen by the specific predicate.String
getName()
INTERNAL: Returns the name of the predicate.protected Collection
getSubtypes(TopicIF type)
protected Collection
getSupertypes(TopicIF type)
INTERNAL: Should return all supertypes of the given class, including the class itself.protected 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
-
-
-
-
Field Detail
-
typeutils
protected TypeHierarchyUtils typeutils
-
superTypeCache
protected Map superTypeCache
-
-
Constructor Detail
-
InstanceOfPredicate
public InstanceOfPredicate(TopicMapIF topicmap)
-
-
Method Detail
-
getName
public 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 classAbstractInstanceOfPredicate
-
getClasses
protected 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 classAbstractInstanceOfPredicate
-
getInstances
protected 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 classAbstractInstanceOfPredicate
-
getTypes
protected Collection getTypes()
Description copied from class:AbstractInstanceOfPredicate
INTERNAL: Should return all topic types, as seen by the specific predicate.- Specified by:
getTypes
in classAbstractInstanceOfPredicate
-
getSupertypes
protected 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 classAbstractInstanceOfPredicate
-
getSubtypes
protected Collection getSubtypes(TopicIF type)
-
-