Class AbstractInstanceOfPredicate
java.lang.Object
net.ontopia.topicmaps.query.impl.basic.AbstractInstanceOfPredicate
- All Implemented Interfaces:
BasicPredicateIF,PredicateIF
- Direct Known Subclasses:
DirectInstanceOfPredicate,InstanceOfPredicate
INTERNAL: Common superclass for the two instance-of predicates.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract CollectiongetClasses(TopicIF instance) INTERNAL: Should return all applicable types of the given topic.intgetCost(boolean[] boundparams) INTERNAL.protected CollectiongetDirectInstances(TopicIF classes) INTERNAL: Should return all instances of the topic, as seen by the specific predicate.protected abstract CollectiongetInstances(TopicIF klass) INTERNAL: Should return all instances of the topic, as seen by the specific predicate.INTERNAL: Returns a string representing the signature of the predicate.protected abstract CollectiongetSupertypes(TopicIF type) INTERNAL: Should return all supertypes of the given class, including the class itself.protected abstract CollectiongetTypes()INTERNAL: Should return all topic types, as seen by the specific predicate.satisfy(QueryMatches result, Object[] arguments) protected abstract voidstart()INTERNAL: Called before the evaluation of a new query, to allow resetting of internal caches etc.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.ontopia.topicmaps.query.parser.PredicateIF
getName
-
Field Details
-
topicmap
-
index
-
-
Constructor Details
-
AbstractInstanceOfPredicate
-
-
Method Details
-
getSignature
Description copied from interface:PredicateIFINTERNAL: Returns a string representing the signature of the predicate. The string consists of a whitespace-separated list of arguments, where each argument is made up of tokens representing the type or cardinality of that argument.The instance-of predicate would have a signature of "t t", while /= would have ". .", and in would have ". .+". For full details, see topicmaps.impl.utils.ArgumentValidator.
- Specified by:
getSignaturein interfacePredicateIF
-
getCost
public int getCost(boolean[] boundparams) Description copied from interface:PredicateIFINTERNAL.- Specified by:
getCostin interfacePredicateIF
-
satisfy
- Specified by:
satisfyin interfaceBasicPredicateIF- Throws:
InvalidQueryException
-
start
protected abstract void start()INTERNAL: Called before the evaluation of a new query, to allow resetting of internal caches etc. -
getClasses
INTERNAL: Should return all applicable types of the given topic. In 'instance-of' this includes the supertypes of the topic's types. -
getInstances
INTERNAL: Should return all instances of the topic, as seen by the specific predicate. -
getTypes
INTERNAL: Should return all topic types, as seen by the specific predicate. -
getSupertypes
INTERNAL: Should return all supertypes of the given class, including the class itself. In 'direct-instance-of' this should just be the class itself. -
getDirectInstances
INTERNAL: Should return all instances of the topic, as seen by the specific predicate.
-