Package net.ontopia.topicmaps.query.spi
Class JavaPredicate
- java.lang.Object
-
- net.ontopia.topicmaps.query.spi.JavaPredicate
-
- All Implemented Interfaces:
BasicPredicateIF
,PredicateIF
- Direct Known Subclasses:
FilterPredicate
,ProcessPredicate
public abstract class JavaPredicate extends Object implements BasicPredicateIF
INTERNAL: Abstract predicate class that works as a common superclass for the real predicate classes. Don't subclass this one directly; instead, subclass one of its subclasses, FilterPredicate or ProcessPredicated, depending on what kind of predicate you want.
-
-
Constructor Summary
Constructors Constructor Description JavaPredicate()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description int
getCost(boolean[] boundparams)
INTERNAL.String
getModuleURI()
String
getName()
INTERNAL: Returns the name of the predicate.Map
getParameters()
String
getPredicateName()
String
getSignature()
INTERNAL: Returns a string representing the signature of the predicate.TopicMapIF
getTopicMap()
abstract QueryMatches
satisfy(QueryMatches matches, Object[] arguments)
INTERNAL: Internal machinery.void
setModuleURI(String moduleURI)
void
setParameters(Map parameters)
void
setPredicateName(String predicateName)
void
setTopicMap(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.- Specified by:
getName
in interfacePredicateIF
-
getSignature
public String getSignature()
Description copied from interface:PredicateIF
INTERNAL: 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:
getSignature
in interfacePredicateIF
-
getCost
public int getCost(boolean[] boundparams)
Description copied from interface:PredicateIF
INTERNAL.- Specified by:
getCost
in interfacePredicateIF
-
getModuleURI
public String getModuleURI()
-
setModuleURI
public void setModuleURI(String moduleURI)
-
getPredicateName
public String getPredicateName()
-
setPredicateName
public void setPredicateName(String predicateName)
-
getTopicMap
public TopicMapIF getTopicMap()
-
setTopicMap
public void setTopicMap(TopicMapIF topicmap)
-
getParameters
public Map getParameters()
-
setParameters
public void setParameters(Map parameters)
-
satisfy
public abstract QueryMatches satisfy(QueryMatches matches, Object[] arguments) throws InvalidQueryException
INTERNAL: Internal machinery.- Specified by:
satisfy
in interfaceBasicPredicateIF
- Throws:
InvalidQueryException
-
-