public abstract class AbstractInstanceOfPredicate extends Object implements BasicPredicateIF
Modifier and Type | Field and Description |
---|---|
protected ClassInstanceIndexIF |
index |
protected TopicMapIF |
topicmap |
Constructor and Description |
---|
AbstractInstanceOfPredicate(TopicMapIF topicmap) |
Modifier and Type | Method and Description |
---|---|
protected abstract Collection |
getClasses(TopicIF instance)
INTERNAL: Should return all applicable types of the given topic.
|
int |
getCost(boolean[] boundparams)
INTERNAL.
|
protected Collection |
getDirectInstances(TopicIF classes)
INTERNAL: Should return all instances of the topic, as seen by the
specific predicate.
|
protected abstract Collection |
getInstances(TopicIF klass)
INTERNAL: Should return all instances of the topic, as seen by the
specific predicate.
|
String |
getSignature()
INTERNAL: Returns a string representing the signature of the
predicate.
|
protected abstract Collection |
getSupertypes(TopicIF type)
INTERNAL: Should return all supertypes of the given class,
including the class itself.
|
protected abstract Collection |
getTypes()
INTERNAL: Should return all topic types, as seen by the specific
predicate.
|
QueryMatches |
satisfy(QueryMatches result,
Object[] arguments) |
protected abstract void |
start()
INTERNAL: Called before the evaluation of a new query, to allow
resetting of internal caches etc.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName
protected TopicMapIF topicmap
protected ClassInstanceIndexIF index
public AbstractInstanceOfPredicate(TopicMapIF topicmap)
public String getSignature()
PredicateIF
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.
getSignature
in interface PredicateIF
public int getCost(boolean[] boundparams)
PredicateIF
getCost
in interface PredicateIF
public QueryMatches satisfy(QueryMatches result, Object[] arguments) throws InvalidQueryException
satisfy
in interface BasicPredicateIF
InvalidQueryException
protected abstract void start()
protected abstract Collection getClasses(TopicIF instance)
protected abstract Collection getInstances(TopicIF klass)
protected abstract Collection getTypes()
protected abstract Collection getSupertypes(TopicIF type)
protected Collection getDirectInstances(TopicIF classes)