org.exist.xpath
Class Function

java.lang.Object
  extended byorg.exist.xpath.PathExpr
      extended byorg.exist.xpath.Function
All Implemented Interfaces:
Expression
Direct Known Subclasses:
FunBoolean, FunCeiling, FunContains, FunCount, FunEndsWith, FunFalse, FunFloor, FunId, FunKeywordMatch, FunKeywordMatchAll, FunLast, FunName, FunNot, FunNumber, FunPosition, FunRound, FunStartsWith, FunString, FunStrLength, FunSubstring, FunSum, FunTrue

public abstract class Function
extends PathExpr

Description of the Class

Author:
Wolfgang Meier

Field Summary
protected  java.lang.String name
           
 
Fields inherited from class org.exist.xpath.PathExpr
docs, inPredicate, keepVirtual, LOG, pool, steps
 
Constructor Summary
Function(BrokerPool pool)
          Constructor for the Function object
Function(BrokerPool pool, java.lang.String name)
          Constructor for the Function object
 
Method Summary
 void addArgument(Expression expr)
          Adds a feature to the Argument attribute of the Function object
static Function createFunction(BrokerPool pool, java.lang.String name)
          Description of the Method
abstract  Value eval(DocumentSet docs, NodeSet context, NodeProxy node)
          Description of the Method
 Expression getArgument(int pos)
          Gets the argument attribute of the Function object
 int getArgumentCount()
          Gets the argumentCount attribute of the Function object
 java.lang.String getName()
          Gets the name attribute of the Function object
 java.lang.String pprint()
          Description of the Method
 
Methods inherited from class org.exist.xpath.PathExpr
add, add, addDocument, addPath, addPredicate, getDocumentSet, getExpression, getLength, preselect, preselect, returnsType, setDocumentSet, setFirstExpression, setInPredicate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
Constructor Detail

Function

public Function(BrokerPool pool,
                java.lang.String name)
Constructor for the Function object

Parameters:
name - Description of the Parameter

Function

public Function(BrokerPool pool)
Constructor for the Function object

Method Detail

createFunction

public static Function createFunction(BrokerPool pool,
                                      java.lang.String name)
Description of the Method

Parameters:
name - Description of the Parameter
Returns:
Description of the Return Value

addArgument

public void addArgument(Expression expr)
Adds a feature to the Argument attribute of the Function object

Parameters:
expr - The feature to be added to the Argument attribute

eval

public abstract Value eval(DocumentSet docs,
                           NodeSet context,
                           NodeProxy node)
Description of the Method

Specified by:
eval in interface Expression
Overrides:
eval in class PathExpr
Parameters:
docs - Description of the Parameter
context - Description of the Parameter
node - Description of the Parameter
Returns:
Description of the Return Value

getArgument

public Expression getArgument(int pos)
Gets the argument attribute of the Function object

Parameters:
pos - Description of the Parameter
Returns:
The argument value

getArgumentCount

public int getArgumentCount()
Gets the argumentCount attribute of the Function object

Returns:
The argumentCount value

getName

public java.lang.String getName()
Gets the name attribute of the Function object

Returns:
The name value

pprint

public java.lang.String pprint()
Description of the Method

Specified by:
pprint in interface Expression
Overrides:
pprint in class PathExpr
Returns:
Description of the Return Value


Copyright (C) Wolfgang Meier. All rights reserved.