MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

ch.ethz.mxquery.sms.MMimpl
Class UpdateTokenBuffer

java.lang.Object
  extended by ch.ethz.mxquery.sms.MMimpl.UpdateTokenBuffer
All Implemented Interfaces:
Source, StreamStore

public class UpdateTokenBuffer
extends java.lang.Object
implements StreamStore


Constructor Summary
UpdateTokenBuffer(boolean sync, WindowBuffer container)
           
 
Method Summary
 void buffer(Token tok, int event)
          Materialize the given token into the store instance
 void bufferItem(Token[] items, int size)
           
 void bufferToken(Token tok)
           
 int compare(Source store)
           
 Source copySource(Context ctx, java.util.Vector nestedPredCtxStack)
           
 Token get(int pos)
          Get Token at given position
 int getCurrentTokenId()
           
 Window getIterator(Context ctx)
          Returns Iterator that points on the first token in the store.
 int getMyId()
          Returns the store id (mostly for debugging)
 java.lang.String getURI()
          Returns the URI of the source.
 void newItem()
          Specify the beginning of a new item
 void setIterator(XDMIterator it)
          For pull stores, add the iterator from which they should pull their data
 int size()
           
 boolean update(Token[] tokens, IntegerList positions, int itemS, boolean sum)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateTokenBuffer

public UpdateTokenBuffer(boolean sync,
                         WindowBuffer container)
Method Detail

buffer

public void buffer(Token tok,
                   int event)
Description copied from interface: StreamStore
Materialize the given token into the store instance

Specified by:
buffer in interface StreamStore

newItem

public void newItem()
Description copied from interface: StreamStore
Specify the beginning of a new item

Specified by:
newItem in interface StreamStore

bufferToken

public void bufferToken(Token tok)

getCurrentTokenId

public int getCurrentTokenId()

bufferItem

public void bufferItem(Token[] items,
                       int size)

update

public boolean update(Token[] tokens,
                      IntegerList positions,
                      int itemS,
                      boolean sum)
               throws MXQueryException
Throws:
MXQueryException

size

public int size()

get

public Token get(int pos)
Description copied from interface: StreamStore
Get Token at given position

Specified by:
get in interface StreamStore
Parameters:
pos - Unique id given to the token inside this store instance (token position
Returns:
the Token at the given position

getMyId

public int getMyId()
Description copied from interface: StreamStore
Returns the store id (mostly for debugging)

Specified by:
getMyId in interface StreamStore
Returns:
id of the store given at creation time

compare

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

copySource

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

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

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

setIterator

public void setIterator(XDMIterator it)
Description copied from interface: StreamStore
For pull stores, add the iterator from which they should pull their data

Specified by:
setIterator in interface StreamStore

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich