lux.xquery
Class FLWOR

java.lang.Object
  extended by lux.xpath.AbstractExpression
      extended by lux.xquery.FLWOR
All Implemented Interfaces:
Visitable

public class FLWOR
extends AbstractExpression


Nested Class Summary
 
Nested classes/interfaces inherited from class lux.xpath.AbstractExpression
AbstractExpression.Type
 
Field Summary
 
Fields inherited from class lux.xpath.AbstractExpression
subs, sup
 
Constructor Summary
FLWOR(AbstractExpression returnExpression, FLWORClause... clauses)
           
 
Method Summary
 AbstractExpression accept(ExpressionVisitor visitor)
           
 FLWORClause[] getClauses()
           
 AbstractExpression getLastContextStep()
          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.
 int getPrecedence()
           
 AbstractExpression getReturnExpression()
           
 AbstractExpression getRoot()
           
 AbstractExpression replaceRoot(AbstractExpression replacement)
          If this has absolute subexpressions, replace them with the replacement expression (see Root.replaceRoot(AbstractExpression)
 void toString(StringBuilder buf)
          Each subclass must implement the toString(StringBuilder) method by rendering itself as a syntatically valid XPath/XQuery expression in the given buffer.
 
Methods inherited from class lux.xpath.AbstractExpression
acceptSubs, appendSub, getBindingContext, getSubs, getSuper, getTail, getType, isAbsolute, isDocumentOrdered, setSubs, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FLWOR

public FLWOR(AbstractExpression returnExpression,
             FLWORClause... clauses)
Method Detail

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

getReturnExpression

public AbstractExpression getReturnExpression()

getClauses

public FLWORClause[] getClauses()

replaceRoot

public AbstractExpression replaceRoot(AbstractExpression replacement)
Description copied from class: AbstractExpression
If this has absolute subexpressions, replace them with the replacement expression (see Root.replaceRoot(AbstractExpression)

Overrides:
replaceRoot in class AbstractExpression
Parameters:
replacement - the expression to use in place of '/'
Returns:
this

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:
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.

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 return expression.


Copyright © 2013. All Rights Reserved.