All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.kvisco.xsl.FilterBase

com.kvisco.xsl.FilterBase

public abstract class FilterBase
implements MatchExpr
Author:
Keith Visco (kvisco@ziplink.net)

Variable Index

 o ANCESTOR_OP
 o NO_OP
 o PARENT_OP

Constructor Index

 o FilterBase()
Creates a new FilterBase

Method Index

 o addPredicate(Expr)
Adds the given Expression to this FilterBase's predicate List.
 o evaluate(Node, ProcessorState)
Evaluates this FilterBase using the given context node, and ProcessorState
 o evaluatePredicates(NodeSet, ProcessorState)
Evaluates the PredicateExpr of this FilterBase against the given Node.
 o getAncestryOp()
 o getDefaultPriority()
Determines the priority of a PatternExpr as follows:
  - From the 19990421 XSL Working Draft -
  + If the Pattern has the form of a QName optionally preceded by
    the 
  
 o getPredicates()
Returns the List of predicates of this FilterBase
 o matches(Node, Node, ProcessorState)
Determines if the given node is matched by this MatchExpr with respect to the given context node.
 o matches(Node, Node, ProcessorState)
Determines if the given node is matched by this MatchExpr with respect to the given context node.
 o removePredicate(Expr)
Removes the given predicate from this FilterBase
 o setAncestryOp(int)
Sets the AncestryOp for this FilterBase
 o toString()
Returns the String representation of this FilterBase

Variables

 o NO_OP
 public static final int NO_OP
 o ANCESTOR_OP
 public static final int ANCESTOR_OP
 o PARENT_OP
 public static final int PARENT_OP

Constructors

 o FilterBase
 public FilterBase()
Creates a new FilterBase

Methods

 o addPredicate
 public void addPredicate(Expr expr)
Adds the given Expression to this FilterBase's predicate List.

Parameters:
expr - the Expr to add to the predicate list
 o getDefaultPriority
 public abstract int getDefaultPriority()
Determines the priority of a PatternExpr as follows:
  - From the 19990421 XSL Working Draft -
  + If the Pattern has the form of a QName optionally preceded by
    the @ character, then the priority is 0.
  + Otherwise if the pattern consists of just a NodeTest then the
    priority is -1
  + Otherwise the priority is 1
 

Returns:
the priority for this PatternExpr
 o evaluate
 public abstract NodeSet evaluate(Node context,
                                  ProcessorState ps) throws InvalidExprException
Evaluates this FilterBase using the given context node, and ProcessorState

Parameters:
context - the context node for evaluation
ps - the current ProcessorState
 o evaluatePredicates
 public void evaluatePredicates(NodeSet nodes,
                                ProcessorState ps) throws InvalidExprException
Evaluates the PredicateExpr of this FilterBase against the given Node.

Parameters:
nodes - the current NodeSet
ps - the current ProcessorState
 o getAncestryOp
 public int getAncestryOp()
 o getPredicates
 public List getPredicates()
Returns the List of predicates of this FilterBase

Returns:
the List of predicates of this FilterBase
 o matches
 public abstract boolean matches(Node node,
                                 Node context,
                                 ProcessorState ps) throws InvalidExprException
Determines if the given node is matched by this MatchExpr with respect to the given context node.

Parameters:
node - the node to determine a match for
context - the Node which represents the current context
ps - the current ProcessorState
Returns:
true if the given node is matched by this MatchExpr
 o removePredicate
 public void removePredicate(Expr expr)
Removes the given predicate from this FilterBase

Parameters:
expr - the Expr to remove from the predicate list
 o setAncestryOp
 public void setAncestryOp(int ancestryOp)
Sets the AncestryOp for this FilterBase

Parameters:
ancestryOp - the ancestry operator to use when evaluating expressions
 o toString
 public String toString()
Returns the String representation of this FilterBase

Returns:
the String representation of this FilterBase

All Packages  Class Hierarchy  This Package  Previous  Next  Index