| java.lang.Object com.hp.hpl.jena.reasoner.rulesys.Functor
Functor | public class Functor implements ClauseEntry(Code) | | A functor comprises a functor name and a list of
arguments. The arguments are Nodes of any type except functor nodes
(there is no functor nesting). Functors play three roles in rules -
in heads they represent actions (procedural attachement); in bodies they
represent builtin predicates; in TriplePatterns they represent embedded
structured literals that are used to cache matched subgraphs such as
restriction specifications.
author: Dave Reynolds version: $Revision: 1.24 $ on $Date: 2008/01/02 12:07:47 $ |
Inner Class :public static class FunctorDatatype extends BaseDatatype | |
acceptFilter | final public static Filter acceptFilter(Code) | | A static Filter instance that detects triples with Functor objects
|
args | protected Node[] args(Code) | | Argument list - an array of nodes
|
implementor | protected Builtin implementor(Code) | | A built in that implements the functor
|
logger | protected static Log logger(Code) | | |
Functor | public Functor(String name, List args)(Code) | | Constructor.
Parameters: name - the name of the functor Parameters: args - a list of nodes defining the arguments |
Functor | public Functor(String name, Node[] args)(Code) | | Constructor.
Parameters: name - the name of the functor Parameters: args - an array of nodes defining the arguments, this will not be copied so beware ofaccidental structure sharing |
Functor | public Functor(String name, List args, BuiltinRegistry registry)(Code) | | Constructor
Parameters: name - the name of the functor Parameters: args - a list of nodes defining the arguments Parameters: registry - a table of builtins to consult to check for implementations of this functor when used as a rule clause |
equals | public boolean equals(Object obj)(Code) | | Equality is based on structural comparison
|
evalAsBodyClause | public boolean evalAsBodyClause(RuleContext context)(Code) | | Execute the given built in as a body clause.
Parameters: context - an execution context giving access to other relevant data true if the functor has an implementation and that implementation returns true when evaluated |
getArgLength | public int getArgLength()(Code) | | Return the length of the functor argument array.
|
getArgs | public Node[] getArgs()(Code) | | Return the functor aguments as an array of nodes
|
getBoundArgs | public Node[] getBoundArgs(BindingEnvironment env)(Code) | | Return a new Node array containing the bound versions of this Functor's arguments
|
getImplementor | public Builtin getImplementor()(Code) | | Return the Builtin that implements this functor
the Builtin or null if there isn't one |
getName | public String getName()(Code) | | Return the functor name
|
hashCode | public int hashCode()(Code) | | hash function override
|
isFunctor | public static boolean isFunctor(Node n)(Code) | | tests that a given Node represents a functor
|
isGround | public boolean isGround()(Code) | | Returns true if the functor is fully ground, no variables
|
isGround | public boolean isGround(BindingEnvironment env)(Code) | | Returns true if the functor is fully ground in the given environment
|
makeFunctorNode | public static Node makeFunctorNode(String name, Node[] args)(Code) | | Create a functor and wrap it up as a Literal node
Parameters: name - the name of the functor Parameters: args - an array of nodes defining the arguments, this will not be copied so beware ofaccidental structure sharing |
makeFunctorNode | public static Node makeFunctorNode(Functor f)(Code) | | Wrap a functor as a Literal node
Parameters: f - the functor data structure to be wrapped in a node. |
safeEvalAsBodyClause | public boolean safeEvalAsBodyClause(RuleContext context)(Code) | | Execute the given built in as a body clause, only if it is side-effect-free.
Parameters: context - an execution context giving access to other relevant data true if the functor has an implementation and that implementation returns true when evaluated |
sameAs | public boolean sameAs(Object o)(Code) | | Compare Functors, taking into account variable indices.
The equality function ignores differences between variables.
|
setImplementor | public void setImplementor(Builtin implementor)(Code) | | Set the Builtin that implements this functor.
|
toString | public String toString()(Code) | | Printable string describing the functor
|
|
|