Class Operation
java.lang.Object
org.loboevolution.apache.xpath.Expression
org.loboevolution.apache.xpath.operations.Operation
- All Implemented Interfaces:
SourceLocator,ExpressionNode,XPathVisitable
The baseclass for a binary operation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ExpressionThe left operand expression.protected ExpressionThe right operand expression. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcallVisitors(XPathVisitor visitor) This will traverse the hierarchy, calling the visitor for each member.booleanTell if this expression or it's subexpressions can traverse outside the current subtree.booleandeepEquals(Expression expr) Compare this object with another object and see if they are equal, include the sub heararchy.execute(XPathContext xctxt) Execute an expression in the XPath runtime context, and return the result of the expression.Apply the operation to two operands, and return the result.voidsetLeftRight(Expression l, Expression r) Set the left and right operand expressions for this operation.Methods inherited from class org.loboevolution.apache.xpath.Expression
asIterator, asNode, assertion, bool, error, execute, execute, execute, exprGetParent, exprSetParent, getColumnNumber, getExpressionOwner, getLineNumber, getPublicId, getSystemId, isSameClass, isStableNumber, num
-
Field Details
-
m_left
The left operand expression. -
m_right
The right operand expression.
-
-
Constructor Details
-
Operation
public Operation()
-
-
Method Details
-
canTraverseOutsideSubtree
public boolean canTraverseOutsideSubtree()Tell if this expression or it's subexpressions can traverse outside the current subtree.- Overrides:
canTraverseOutsideSubtreein classExpression- Returns:
- true if traversal outside the context node's subtree can occur.
-
setLeftRight
Set the left and right operand expressions for this operation.- Parameters:
l- The left expression operand.r- The right expression operand.
-
execute
Execute an expression in the XPath runtime context, and return the result of the expression.- Specified by:
executein classExpression- Parameters:
xctxt- The XPath runtime context.- Returns:
- The result of the expression in the form of a
XObject. - Throws:
TransformerException- if a runtime exception occurs.
-
operate
Apply the operation to two operands, and return the result.- Parameters:
left- non-null reference to the evaluated left operand.right- non-null reference to the evaluated right operand.- Returns:
- non-null reference to the XObject that represents the result of the operation.
- Throws:
TransformerException- in case of error
-
callVisitors
This will traverse the hierarchy, calling the visitor for each member. If the called visitor method returns false, the subtree should not be called.- Parameters:
visitor- The visitor whose appropriate method will be called.
-
deepEquals
Compare this object with another object and see if they are equal, include the sub heararchy.- Specified by:
deepEqualsin classExpression- Parameters:
expr- Another expression object.- Returns:
- true if this objects class and the expr object's class are the same, and the data contained within both objects are considered equal.
-