lux.xpath
Class Subsequence
java.lang.Object
lux.xpath.AbstractExpression
lux.xpath.Subsequence
- All Implemented Interfaces:
- Visitable
public class Subsequence
- extends AbstractExpression
represents numeric literal predicates like [1]; last-predicates like
[last()] and calls to the subsequence(expr,integer,integer) function.
- Author:
- sokolov
| Methods inherited from class lux.xpath.AbstractExpression |
acceptSubs, appendSub, getBindingContext, getLastContextStep, getSubs, getSuper, getTail, getType, isAbsolute, isDocumentOrdered, replaceRoot, setSubs, toString |
Subsequence
public Subsequence(AbstractExpression sequence,
AbstractExpression start,
AbstractExpression length)
Subsequence
public Subsequence(AbstractExpression sequence,
AbstractExpression start)
accept
public AbstractExpression accept(ExpressionVisitor visitor)
getSequence
public AbstractExpression getSequence()
setSequence
public void setSequence(AbstractExpression ae)
getStartExpr
public AbstractExpression getStartExpr()
setStartExpr
public void setStartExpr(AbstractExpression ae)
getLengthExpr
public AbstractExpression getLengthExpr()
setLengthExpr
public void setLengthExpr(AbstractExpression ae)
- Parameters:
ae - the expression to use as the length expression
- Throws:
ArrayIndexOutOfBoundsException - if there wasn't already a length expression
getRoot
public AbstractExpression getRoot()
- Overrides:
getRoot in class AbstractExpression
- Returns:
- the root of this expression: this will either be a Root(/), a function returning document nodes,
or null.
getPrecedence
public int getPrecedence()
- Specified by:
getPrecedence in class AbstractExpression
- Returns:
- the precedence of comma (,) or predicate ([]), depending
on the child expressions.
toString
public void toString(StringBuilder buf)
- Description copied from class:
AbstractExpression
- Each subclass must implement the toString(StringBuilder) method by
rendering itself as a syntatically valid XPath/XQuery expression in
the given buffer.
- Specified by:
toString in class AbstractExpression
Copyright © 2013. All Rights Reserved.