org.exist.xpath
Class FunContains

java.lang.Object
  extended byorg.exist.xpath.PathExpr
      extended byorg.exist.xpath.Function
          extended byorg.exist.xpath.FunContains
All Implemented Interfaces:
Expression
Direct Known Subclasses:
FunNear

public class FunContains
extends Function

Description of the Class

Author:
Wolfgang Meier

Field Summary
protected  java.util.ArrayList containsExpr
           
protected  NodeSet[][] hits
           
protected  PathExpr path
           
protected  java.lang.String[] terms
           
protected  int type
           
 
Fields inherited from class org.exist.xpath.Function
name
 
Fields inherited from class org.exist.xpath.PathExpr
docs, inPredicate, keepVirtual, pool, steps
 
Constructor Summary
FunContains(BrokerPool pool, int type)
          Constructor for the FunContains object
FunContains(BrokerPool pool, PathExpr path, java.lang.String arg)
          Constructor for the FunContains object
 
Method Summary
 void addTerm(java.lang.String arg)
          Adds a feature to the Term attribute of the FunContains object
 Value eval(DocumentSet docs, NodeSet context, NodeProxy node)
          Description of the Method
 java.lang.String pprint()
          Description of the Method
 DocumentSet preselect(DocumentSet in_docs)
          Description of the Method
protected  void processQuery(DocumentSet in_docs)
          Description of the Method
 int returnsType()
          Description of the Method
 void setInPredicate(boolean inPredicate)
          This method is called to inform the expression object that it is executed inside an XPath predicate.
 void setPath(PathExpr path)
          Sets the path attribute of the FunContains object
 
Methods inherited from class org.exist.xpath.Function
addArgument, createFunction, getArgument, getArgumentCount, getName
 
Methods inherited from class org.exist.xpath.PathExpr
add, add, addDocument, addPath, addPredicate, getDocumentSet, getExpression, getLength, preselect, setDocumentSet, setFirstExpression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

containsExpr

protected java.util.ArrayList containsExpr

hits

protected NodeSet[][] hits

path

protected PathExpr path

terms

protected java.lang.String[] terms

type

protected int type
Constructor Detail

FunContains

public FunContains(BrokerPool pool,
                   int type)
Constructor for the FunContains object

Parameters:
type - Description of the Parameter

FunContains

public FunContains(BrokerPool pool,
                   PathExpr path,
                   java.lang.String arg)
Constructor for the FunContains object

Parameters:
path - Description of the Parameter
arg - Description of the Parameter
Method Detail

addTerm

public void addTerm(java.lang.String arg)
Adds a feature to the Term attribute of the FunContains object

Parameters:
arg - The feature to be added to the Term attribute

eval

public Value eval(DocumentSet docs,
                  NodeSet context,
                  NodeProxy node)
Description copied from class: Function
Description of the Method

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

pprint

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

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

preselect

public DocumentSet preselect(DocumentSet in_docs)
Description of the Method

Specified by:
preselect in interface Expression
Overrides:
preselect in class PathExpr
Parameters:
in_docs - Description of the Parameter
Returns:
Description of the Return Value

processQuery

protected void processQuery(DocumentSet in_docs)
Description of the Method

Parameters:
in_docs - Description of the Parameter

returnsType

public int returnsType()
Description of the Method

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

setPath

public void setPath(PathExpr path)
Sets the path attribute of the FunContains object

Parameters:
path - The new path value

setInPredicate

public void setInPredicate(boolean inPredicate)
Description copied from interface: Expression
This method is called to inform the expression object that it is executed inside an XPath predicate.

Specified by:
setInPredicate in interface Expression
Overrides:
setInPredicate in class PathExpr


Copyright (C) Wolfgang Meier. All rights reserved.