MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

ch.ethz.mxquery.iterators
Class XMLContent

java.lang.Object
  extended by ch.ethz.mxquery.model.Iterator
      extended by ch.ethz.mxquery.model.CurrentBasedIterator
          extended by ch.ethz.mxquery.iterators.XMLContent
All Implemented Interfaces:
Source, XDMIterator, Traversable

public class XMLContent
extends CurrentBasedIterator
implements Source


Field Summary
 
Fields inherited from interface ch.ethz.mxquery.model.XDMIterator
EXPR_CATEGORY_SEQUENTIAL, EXPR_CATEGORY_SIMPLE, EXPR_CATEGORY_UPDATING, EXPR_CATEGORY_VACUOUS, EXPR_PARAM_CHEAPEVAL, EXPR_PARAM_VARIABLE, EXPR_PARAM_WINDOW, EXPR_PARAM_XDMGEN
 
Constructor Summary
XMLContent(Context ctx, XDMIterator[] subIters, boolean[] enclExpr, int depth, QueryLocation location, XDMScope nsScope, boolean compElemConst)
           
 
Method Summary
 int compare(Source store)
           
static QName computeElemQName(XQStaticContext context, XDMIterator it, QueryLocation loc)
           
 XDMIterator copy(Context parentIterContext, XQStaticContext prevParentIterContext, boolean copyContext, java.util.Vector nestedPredCtxStack)
          Copies the Iterator.
 Source copySource(Context ctx, java.util.Vector nestedPredCtxStack)
           
 Window getIterator(Context ctx)
          Returns Iterator that points on the first token in the store.
 java.lang.String getURI()
          Returns the URI of the source.
 Token next()
          Produces the next XDM token This method typically implements the base functionality of an Iterator and computes the value of the next token.
 void setResettable(boolean r)
          Set this Iterator (and its subiterators) resetable.
 
Methods inherited from class ch.ethz.mxquery.model.Iterator
addPredicates, close, copyInts, copyIterators, copyQNames, copyStrings, copyTypeInfos, getAllSubIters, getAllSubItersRecursive, getContext, getExpressionCategoryType, getLoc, getPendingUpdateList, getPredicates, getStaticType, getSubIters, hasPredicates, isConstModePreserve, isExprParameter, isOpen, isResettable, removePredicates, reset, setConstModePreserve, setContext, setLoc, setOrderByExpr, setParam, setReturnExpr, setSubIters, setSubIters, setSubIters, setWhereExpr, traverse, traverseIteratorTree
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLContent

public XMLContent(Context ctx,
                  XDMIterator[] subIters,
                  boolean[] enclExpr,
                  int depth,
                  QueryLocation location,
                  XDMScope nsScope,
                  boolean compElemConst)
           throws MXQueryException
Throws:
MXQueryException
Method Detail

next

public Token next()
           throws MXQueryException
Description copied from interface: XDMIterator
Produces the next XDM token This method typically implements the base functionality of an Iterator and computes the value of the next token.

Specified by:
next in interface XDMIterator
Returns:
The XDM token representing the next fragment of the XDM instance
Throws:
MXQueryException

computeElemQName

public static QName computeElemQName(XQStaticContext context,
                                     XDMIterator it,
                                     QueryLocation loc)
                              throws MXQueryException
Throws:
MXQueryException

setResettable

public void setResettable(boolean r)
                   throws MXQueryException
Description copied from interface: XDMIterator
Set this Iterator (and its subiterators) resetable. Resetable iterators may require more space (trading buffered data against recomputation)

Specified by:
setResettable in interface XDMIterator
Overrides:
setResettable in class Iterator
Parameters:
r - true make this iterator resetable, false make it not resetable
Throws:
MXQueryException

compare

public int compare(Source store)
Specified by:
compare in interface Source

getURI

public java.lang.String getURI()
Description copied from interface: Source
Returns the URI of the source.

Specified by:
getURI in interface Source
Returns:
a String representing the URI/Identifier of this source

copy

public XDMIterator copy(Context parentIterContext,
                        XQStaticContext prevParentIterContext,
                        boolean copyContext,
                        java.util.Vector nestedPredCtxStack)
                 throws MXQueryException
Description copied from interface: XDMIterator
Copies the Iterator. The context is copied (if necessary) here. The subIterators are copied (if existing) here.

Specified by:
copy in interface XDMIterator
Overrides:
copy in class Iterator
Parameters:
parentIterContext - The new parent context
prevParentIterContext - The previous context of the parent iterator
copyContext - Copy the context or use the parent context
nestedPredCtxStack - The Stack of nested predicate context, needed for nested rewritten predicates
Returns:
A copy of this Iterator
Throws:
MXQueryException

copySource

public Source copySource(Context ctx,
                         java.util.Vector nestedPredCtxStack)
                  throws MXQueryException
Specified by:
copySource in interface Source
Throws:
MXQueryException

getIterator

public Window getIterator(Context ctx)
                   throws MXQueryException
Description copied from interface: Source
Returns Iterator that points on the first token in the store.

Specified by:
getIterator in interface Source
Returns:
Iterator a (Window) Iterator to access the contents of this source
Throws:
MXQueryException

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich