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 MapsuperTypeCacheprotected TypeHierarchyUtilstypeutils-
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 CollectiongetClasses(TopicIF instance)INTERNAL: Should return all applicable types of the given topic.protected CollectiongetInstances(TopicIF klass)INTERNAL: Should return all instances of the topic, as seen by the specific predicate.StringgetName()INTERNAL: Returns the name of the predicate.protected CollectiongetSubtypes(TopicIF type)protected CollectiongetSupertypes(TopicIF type)INTERNAL: Should return all supertypes of the given class, including the class itself.protected CollectiongetTypes()INTERNAL: Should return all topic types, as seen by the specific predicate.protected voidstart()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:PredicateIFINTERNAL: 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:AbstractInstanceOfPredicateINTERNAL: Called before the evaluation of a new query, to allow resetting of internal caches etc.- Specified by:
startin classAbstractInstanceOfPredicate
-
getClasses
protected Collection getClasses(TopicIF instance)
Description copied from class:AbstractInstanceOfPredicateINTERNAL: Should return all applicable types of the given topic. In 'instance-of' this includes the supertypes of the topic's types.- Specified by:
getClassesin classAbstractInstanceOfPredicate
-
getInstances
protected Collection getInstances(TopicIF klass)
Description copied from class:AbstractInstanceOfPredicateINTERNAL: Should return all instances of the topic, as seen by the specific predicate.- Specified by:
getInstancesin classAbstractInstanceOfPredicate
-
getTypes
protected Collection getTypes()
Description copied from class:AbstractInstanceOfPredicateINTERNAL: Should return all topic types, as seen by the specific predicate.- Specified by:
getTypesin classAbstractInstanceOfPredicate
-
getSupertypes
protected Collection getSupertypes(TopicIF type)
Description copied from class:AbstractInstanceOfPredicateINTERNAL: 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:
getSupertypesin classAbstractInstanceOfPredicate
-
getSubtypes
protected Collection getSubtypes(TopicIF type)
-
-