MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

ch.ethz.mxquery.sms.interfaces
Interface RandomRead

All Superinterfaces:
ReadInterface
All Known Implementing Classes:
IndexFIFOStore, LazyRandomFIFOStore, LazySequentialFIFOStore, RandomFIFOStore, RandomFIFOStoreSchema, SeqFIFOStore, SharedRandomFIFOStore, SharedSeqFIFOStore

public interface RandomRead
extends ReadInterface


Method Summary
 Token get(int tokenId, int eNode)
          Returns a token for a specific Token id if it is not outside the end node id
 int getAttributePosFromNodeId(java.lang.String attrName, int nodeId)
          For an attribute given by name, tries to guess the token id in the buffer
 int getAttributePosFromTokenId(java.lang.String attrName, int activeTokenId)
          For an attribute given by name, tries to guess the token id in the buffer
 int getNodeIdFromTokenId(int lastKnowNodeId, int activetokenId)
          Returns the node id for a given token id
 int getTokenIdForNode(int nodeId)
          Gets the first token id for a given node id
 boolean hasNode(int node)
          Checks if the node with the given id exits
 

Method Detail

getTokenIdForNode

int getTokenIdForNode(int nodeId)
                      throws MXQueryException
Gets the first token id for a given node id

Parameters:
nodeId -
Returns:
first element id
Throws:
MXQueryException

hasNode

boolean hasNode(int node)
                throws MXQueryException
Checks if the node with the given id exits

Parameters:
node -
Returns:
true if a with the given id exists
Throws:
MXQueryException

get

Token get(int tokenId,
          int eNode)
          throws MXQueryException
Returns a token for a specific Token id if it is not outside the end node id

Parameters:
tokenId -
eNode -
Returns:
the token, if it falls into the requested rane
Throws:
MXQueryException

getNodeIdFromTokenId

int getNodeIdFromTokenId(int lastKnowNodeId,
                         int activetokenId)
                         throws MXQueryException
Returns the node id for a given token id

Parameters:
lastKnowNodeId - Ist jus a hint to find the token id faster. If you have no clue use 0
activetokenId -
Returns:
the token Id
Throws:
MXQueryException

getAttributePosFromTokenId

int getAttributePosFromTokenId(java.lang.String attrName,
                               int activeTokenId)
                               throws MXQueryException
For an attribute given by name, tries to guess the token id in the buffer

Parameters:
attrName - - name of the attribute
activeTokenId - - last known token id
Returns:
the supposed position for the attribute given as parameter or -1 if no knowledge is available at the time of request
Throws:
MXQueryException

getAttributePosFromNodeId

int getAttributePosFromNodeId(java.lang.String attrName,
                              int nodeId)
                              throws MXQueryException
For an attribute given by name, tries to guess the token id in the buffer

Parameters:
attrName - - name of the attribute
nodeId - - last known node id
Returns:
the supposed position for the attribute given as parameter or -1 if no knowledge is available at the time of request
Throws:
MXQueryException

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich