ch.ethz.mxquery.bindings
Class WindowIterator
java.lang.Object
ch.ethz.mxquery.model.Iterator
ch.ethz.mxquery.model.Window
ch.ethz.mxquery.bindings.WindowIterator
- All Implemented Interfaces:
- IndexIterator, XDMIterator, Traversable
- Direct Known Subclasses:
- WindowEmptySequenceIterator, WindowSequenceIterator, WindowTokenIterator
public abstract class WindowIterator
- extends Window
Implements the WindowInterface and provides the functionalities the WindowItem- and the WindowSequence-Iterator have
in common
Method Summary |
void |
destroyWindow()
Deregister a window in the window buffer (and gives the items free for garbage collection if
their are not used by other windows). |
boolean |
equals(java.lang.Object other)
|
abstract int |
getStartNode()
Returns the first node id of the window |
Source |
getStore()
|
int |
getWindowId()
Every window has a unique id given by the buffer the window is working on. |
int |
hashCode()
|
boolean |
isWindowInUse()
If a window is not in use it is a schema for other windows. |
void |
setContext(Context context)
|
void |
setWindowInUse(boolean windowInUse)
Specifies if a window can be used again. |
Methods inherited from class ch.ethz.mxquery.model.Window |
getEndPosition, getNewEarlyParallelWindowInterface, getNewEarlyWindowInterface, getNewItemWindow, getNewWindow, getNextWindowStartPosition, getPosition, getUnderlyingWindow, increasePosition, isExprParameter, isWindow, jumpToNextAttribute, setPosition |
Methods inherited from class ch.ethz.mxquery.model.Iterator |
addPredicates, close, copy, copyInts, copyIterators, copyQNames, copyStrings, copyTypeInfos, getAllSubIters, getAllSubItersRecursive, getContext, getExpressionCategoryType, getLoc, getPendingUpdateList, getPredicates, getStaticType, getSubIters, hasPredicates, isConstModePreserve, isOpen, isResettable, removePredicates, reset, setConstModePreserve, setContext, setLoc, setOrderByExpr, setParam, setResettable, setReturnExpr, setSubIters, setSubIters, setSubIters, setWhereExpr, traverse, traverseIteratorTree |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
WindowIterator
public WindowIterator(WindowBuffer mat,
int windowId)
getStartNode
public abstract int getStartNode()
- Description copied from class:
Window
- Returns the first node id of the window
- Specified by:
getStartNode
in class Window
- Returns:
- returns the first node id of this window
destroyWindow
public void destroyWindow()
- Deregister a window in the window buffer (and gives the items free for garbage collection if
their are not used by other windows).
Important: Never use a window again after destroying it!
- Specified by:
destroyWindow
in class Window
equals
public boolean equals(java.lang.Object other)
- Specified by:
equals
in class Window
getWindowId
public int getWindowId()
- Description copied from class:
Window
- Every window has a unique id given by the buffer the window is working on.
- Specified by:
getWindowId
in class Window
- Returns:
- the identifier of this window
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
setContext
public void setContext(Context context)
throws MXQueryException
- Throws:
MXQueryException
isWindowInUse
public boolean isWindowInUse()
- Description copied from class:
Window
- If a window is not in use it is a schema for other windows.
E.g. a LET/FOR/FORSEQ binds a window to a variable the window is not in use yet.
But in the moment the first variable reference is using the window the window is in used
- Specified by:
isWindowInUse
in class Window
- Returns:
- true if the window is use, false otherwise
setWindowInUse
public void setWindowInUse(boolean windowInUse)
- Description copied from class:
Window
- Specifies if a window can be used again.
This method is normally only used by the variable iterator. Be carefully with it, as
it is mainly responsible to allow proper garbage collection.
- Specified by:
setWindowInUse
in class Window
getStore
public Source getStore()
- Specified by:
getStore
in class Window
MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich