MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

ch.ethz.mxquery.sms.MMimpl
Class IndexInPlaceStore

java.lang.Object
  extended by ch.ethz.mxquery.sms.MMimpl.InPlaceStore
      extended by ch.ethz.mxquery.sms.MMimpl.IndexInPlaceStore
All Implemented Interfaces:
Source, IndexInterface, IndexRead, IndexUpdate, ReadInterface, StreamStore

public class IndexInPlaceStore
extends InPlaceStore
implements IndexRead


Field Summary
 
Fields inherited from class ch.ethz.mxquery.sms.MMimpl.InPlaceStore
id
 
Constructor Summary
IndexInPlaceStore(int id, WindowBuffer container)
           
 
Method Summary
 void buffer(Token tok, int event)
          Materialize the given token into the store instance
 Token get(int pos)
          Get Token at given position
 void newItem()
          Specify the beginning of a new item
 IndexSchema registerIndex(IndexSchema schema)
          Index schema registration for read/update operations
 XDMIterator retrieve(IndexSchema schema, Token[] tokens)
           
 void setDefaultValues(Token[] tokens)
           
 void setIterator(XDMIterator it)
          For pull stores, add the iterator from which they should pull their data
 void update(IndexSchema schema, Token[] toks, Token[] forIndex)
          Update the store with new data
 
Methods inherited from class ch.ethz.mxquery.sms.MMimpl.InPlaceStore
compare, copySource, getIterator, getMyId, getURI
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexInPlaceStore

public IndexInPlaceStore(int id,
                         WindowBuffer container)
Method Detail

setDefaultValues

public void setDefaultValues(Token[] tokens)

update

public void update(IndexSchema schema,
                   Token[] toks,
                   Token[] forIndex)
            throws MXQueryException
Description copied from interface: IndexUpdate
Update the store with new data

Specified by:
update in interface IndexUpdate
Parameters:
schema - Index schema used in finding the items that are to be updated
toks - Iterator with data to be updated
forIndex - Actual values for the attributes to be used in searching
Throws:
MXQueryException

retrieve

public XDMIterator retrieve(IndexSchema schema,
                            Token[] tokens)
                     throws MXQueryException
Specified by:
retrieve in interface IndexRead
Returns:
iterator with requested data
Throws:
MXQueryException

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

newItem

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

Specified by:
newItem in interface StreamStore

buffer

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

Specified by:
buffer in interface StreamStore
Throws:
MXQueryException

registerIndex

public IndexSchema registerIndex(IndexSchema schema)
Description copied from interface: IndexInterface
Index schema registration for read/update operations

Specified by:
registerIndex in interface IndexInterface
Parameters:
schema - for index construction
Returns:
-1 if error, else unique index id value ( id >= 0)

setIterator

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

Specified by:
setIterator in interface StreamStore
Throws:
MXQueryException

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich