org.ucl.xpath.ast
Class FilterExpr

java.lang.Object
  extended byorg.ucl.xpath.ast.XPathNode
      extended byorg.ucl.xpath.ast.Expr
          extended byorg.ucl.xpath.ast.StepExpr
              extended byorg.ucl.xpath.ast.FilterExpr

public class FilterExpr
extends StepExpr

A filter expression consists simply of a primary expression followed by zero or more predicates. The result of the filter expression consists of all the items returned by the primary expression for which all the predicates are true. If no predicates are specified, the result is simply the result of the primary expression. This result may contain nodes, atomic values, or any combination of these. The ordering of the items returned by a filter expression is the same as their order in the result of the primary expression. Context positions are assigned to items based on their ordinal position in the result sequence. The first context position is 1.


Constructor Summary
FilterExpr(PrimaryExpr pexpr, java.util.Collection exprs)
          Constructor of FilterExpr.
 
Method Summary
 java.lang.Object accept(XPathVisitor v)
          Support for Visitor interface.
 java.util.Iterator iterator()
          Get the next predicate.
 int predicate_count()
          Count the number of predicates.
 PrimaryExpr primary()
          Get the primary expression.
 void set_primary(PrimaryExpr e)
          Set a new primary expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterExpr

public FilterExpr(PrimaryExpr pexpr,
                  java.util.Collection exprs)
Constructor of FilterExpr.

Parameters:
pexpr - is copied to _pexpr.
exprs - is copied to _exprs. g_xsint is created as a new XSInteger as a result.
Method Detail

accept

public java.lang.Object accept(XPathVisitor v)
Support for Visitor interface.

Specified by:
accept in class XPathNode
Returns:
Result of Visitor operation.

primary

public PrimaryExpr primary()
Get the primary expression.

Returns:
The primary expression.

iterator

public java.util.Iterator iterator()
Get the next predicate.

Returns:
The next predicate.

set_primary

public void set_primary(PrimaryExpr e)
Set a new primary expression.

Parameters:
e - is set as the new primary expression.

predicate_count

public int predicate_count()
Count the number of predicates.

Returns:
The size of the collection of predicates.