lux.xquery
Class Variable
java.lang.Object
lux.xpath.AbstractExpression
lux.xquery.Variable
- All Implemented Interfaces:
- Visitable
public class Variable
- extends AbstractExpression
Variable
public Variable(QName qname)
Variable
public Variable(QName qname,
String typeDesc)
accept
public AbstractExpression accept(ExpressionVisitor visitor)
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
getQName
public QName getQName()
getPrecedence
public int getPrecedence()
- Specified by:
getPrecedence in class AbstractExpression
- Returns:
- a number indicating the *outer* precedence of this expression.
Expressions with lower precedence numbers have lower
precedence, ie bind more loosely, than expressions with higher
precedence. Expressions with no sub-expressions are assigned a high
precedence. Complex expressions can be seen as having an inner and an outer
precedence; for example function call expressions behave as a comma with regard
to their sub-expressions, the arguments, and like parentheses to their enclosing expression.
isDocumentOrdered
public boolean isDocumentOrdered()
- Overrides:
isDocumentOrdered in class AbstractExpression
- Returns:
- whether this expression is proven to return results in document order. This method
returns true iff all its subs return true, or it has none. Warning: incorrect results may occur if
document-ordering is falsely asserted.
setName
public void setName(QName name2)
setValue
public void setValue(AbstractExpression value)
getValue
public AbstractExpression getValue()
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.
getLastContextStep
public AbstractExpression getLastContextStep()
- Description copied from class:
AbstractExpression
- This method is called by the optimizer in order to determine an element or attribute QName (or wildcard) against which
some expression is being compared, in order to generate an appropriate text query.
- Overrides:
getLastContextStep in class AbstractExpression
- Returns:
- the last context step of the value expression.
getBindingContext
public VariableContext getBindingContext()
- Description copied from class:
AbstractExpression
- If this expression depends "directly" on a variable, return that variable's binding context: a for or let clause,
or a global variable definition. This recurses through variables, so if there are aliases it retrieves the ultimate
context. We need to define directly dependent precisely; what it's used for is to determine with an order by
expression is dependent on a for-variable, and ultimately whether an order by optimization can be applied.
- Overrides:
getBindingContext in class AbstractExpression
- Returns:
- the binding context (for or let clause, or global definition) of this variable.
Will be null if the variable represents a function argument.
setBindingContext
public void setBindingContext(VariableContext context)
Copyright © 2013. All Rights Reserved.