|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.expr.flwor.Clause com.saxonica.expr.flwor.WindowClause
public class WindowClause
Implements an XQuery 3.0 sliding or tumbling window clause within a FLWOR expression
Nested Class Summary | |
---|---|
protected static class |
WindowClause.Window
Information about a window: the items making up the window, as well as the variables relating to the start and end of the window, and the status of the winoow in relation to the processing of the current input sequence. |
Field Summary | |
---|---|
static int |
END_ITEM
|
static int |
END_ITEM_POSITION
|
static int |
END_NEXT_ITEM
|
static int |
END_PREVIOUS_ITEM
|
static int |
START_ITEM
|
static int |
START_ITEM_POSITION
|
static int |
START_NEXT_ITEM
|
static int |
START_PREVIOUS_ITEM
|
static int |
WINDOW_VAR
|
Fields inherited from class net.sf.saxon.expr.flwor.Clause |
---|
COUNT, FOR, GROUPBYCLAUSE, LET, ORDERBYCLAUSE, WHERE, WINDOW |
Constructor Summary | |
---|---|
WindowClause()
|
Method Summary | |
---|---|
Clause |
copy()
|
void |
explain(ExpressionPresenter out)
Diagnostic print of expression structure. |
int |
getClauseKey()
Get a keyword identifying what kind of clause this is |
Expression |
getEndCondition()
|
TuplePull |
getPullStream(TuplePull base,
XPathContext context)
Get a pull-mode tuple stream that implements the functionality of this clause, taking its input from another tuple stream which this clause modifies |
TuplePush |
getPushStream(TuplePush destination,
XPathContext context)
Get a push-mode tuple stream that implements the functionality of this clause, supplying its output to another tuple stream |
LocalVariableBinding[] |
getRangeVariables()
Get the variables bound by this clause |
Expression |
getSequence()
|
Expression |
getStartCondition()
|
LocalVariableBinding |
getVariableBinding(int role)
|
boolean |
isIncludeUnclosedWindows()
|
boolean |
isSlidingWindow()
|
boolean |
isTumblingWindow()
|
protected static ValueRepresentation |
makeValue(Item item)
|
protected boolean |
matchesEnd(WindowClause.Window window,
Item previous,
Item current,
Item next,
int position,
XPathContext context)
Determine whether the current item is the last item in a window |
protected boolean |
matchesStart(Item previous,
Item current,
Item next,
int position,
XPathContext context)
Determine whether the current item is the start of a new window |
void |
processSubExpressions(ExpressionProcessor processor)
Process the subexpressions of this clause |
void |
setEndCondition(Expression endCondition)
|
void |
setIncludeUnclosedWindows(boolean include)
|
void |
setIsSlidingWindow(boolean sliding)
|
void |
setSequence(Expression sequence)
|
void |
setStartCondition(Expression startCondition)
|
void |
setVariableBinding(int role,
LocalVariableBinding binding)
|
Methods inherited from class net.sf.saxon.expr.flwor.Clause |
---|
gatherVariableReferences, optimize, refineVariableType, typeCheck |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int WINDOW_VAR
public static final int START_ITEM
public static final int START_ITEM_POSITION
public static final int START_PREVIOUS_ITEM
public static final int START_NEXT_ITEM
public static final int END_ITEM
public static final int END_ITEM_POSITION
public static final int END_PREVIOUS_ITEM
public static final int END_NEXT_ITEM
Constructor Detail |
---|
public WindowClause()
Method Detail |
---|
public int getClauseKey()
Clause
getClauseKey
in class Clause
public void setIsSlidingWindow(boolean sliding)
public boolean isSlidingWindow()
public boolean isTumblingWindow()
public void setIncludeUnclosedWindows(boolean include)
public boolean isIncludeUnclosedWindows()
public void setSequence(Expression sequence)
public Expression getSequence()
public void setStartCondition(Expression startCondition)
public Expression getStartCondition()
public void setEndCondition(Expression endCondition)
public Expression getEndCondition()
public void setVariableBinding(int role, LocalVariableBinding binding) throws XPathException
XPathException
public LocalVariableBinding getVariableBinding(int role)
public Clause copy()
copy
in class Clause
public TuplePull getPullStream(TuplePull base, XPathContext context)
getPullStream
in class Clause
base
- the input tuple streamcontext
- the dynamic evaluation context
public TuplePush getPushStream(TuplePush destination, XPathContext context)
getPushStream
in class Clause
destination
- the output tuple streamcontext
- the dynamic evaluation context
public void processSubExpressions(ExpressionProcessor processor) throws XPathException
processSubExpressions
in class Clause
processor
- the expression processor used to process the subexpressions
XPathException
- if any error is detectedpublic LocalVariableBinding[] getRangeVariables()
getRangeVariables
in class Clause
public void explain(ExpressionPresenter out)
explain
in class Clause
out
- the expression presenter used to display the structureprotected boolean matchesStart(Item previous, Item current, Item next, int position, XPathContext context) throws XPathException
previous
- the item before the current item (null if the current item is the first)current
- the current itemnext
- the item after the current item (null if the current item is the last)position
- the position of the current item in the input sequencecontext
- the dynamic evaluation context
XPathException
protected boolean matchesEnd(WindowClause.Window window, Item previous, Item current, Item next, int position, XPathContext context) throws XPathException
window
- the window in questionprevious
- the item before the current item (null if the current item is the first)current
- the current itemnext
- the item after the current item (null if the current item is the last)position
- the position of the current item in the input sequencecontext
- the dynamic evaluation context
XPathException
protected static ValueRepresentation makeValue(Item item)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |