MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

ch.ethz.mxquery.xdmio
Interface StoreSet

All Known Implementing Classes:
LLStoreSet

public interface StoreSet

Interface of classes that contain a collection of stores.


Method Summary
 void addCollection(java.lang.String uri, java.util.Vector coll)
          Add a collection to the storeset
 void addStoreToSerialize(UpdateableStore store, java.lang.String uri)
          Adds a store to the list of stores to be serialized at PUL apply
 void cleanTransationStores(long transactionID)
          Remove all temporary stores that are connected to the give transaction ID
 StoreSet copy()
          Create a shallow copy of this Store Set, retaining all the contained stores and collections
 FullTextStore createFulltextStore(java.lang.String uri, XDMIterator initialDataIterator)
          Creates a full text store Note: An additional version of this function will be implemented later, where the types of full-text indexes can be chosen (currently, all indexes are always generated)
 Source createStore(java.lang.String uri, XDMIterator initialDataIterator, boolean maybeSerialized)
          Creates a Store with the passed URI.
 Source createStore(XDMIterator initialDataIterator)
          Creates a Store with an automatically generated URI.
 StreamStore createStreamStore(int type, java.lang.String uri)
          Create a stream store, in which the XDM data can be possibly infinite, contents are lazily materialized and there are optimizations for access patterns and other parameters In this version, the store type is explicitly requested
 StreamStore createStreamStore(StreamStoreSettings sts, java.lang.String uri)
          Create a stream store, in which the XDM data can be possibly infinite, contents are lazily materialized and there are optimizations for access patterns and other parameters In this version, the store type is explicitly requested
 UpdateableStore createTransactionStore(long transactionID)
          Creates a temporary Store that belongs to a particular transaction, e.g.
 UpdateableStore createUpdateableStore(java.lang.String uri, XDMIterator initialDataIterator, boolean newIds, boolean serializeable)
          Creates an updateable store.
 void deleteCollection(java.lang.String uri)
          Delete a collection
 void freeRessources()
          Discard all stores and collections that have been generated inside this store set
 ActiveStore[] getActiveStores()
          Get all active stores in this store set, i.e.
 Source[] getAllStores()
          Returns all stores
 XDMIterator[] getCollection(java.lang.String uri)
          Get the contents of a collection
 FullTextStore[] getFulltextStores()
          Retrieve all fulltext stores in this store set
 UpdateableStore getNewStoreForItem(Identifier item, java.lang.String uri, boolean serializeable)
          Create a new updateable store (copy) for an existing item
 Identifier getParentId(Identifier identifier)
          Returns the Identifier of the event with the passed identifier.
 Source getStore(java.lang.String uri)
          Returns the Store which has the passed URI as identifier
 StreamStore[] getStreamStores()
          Retrieve all streams/stream stores associated with this store set
 UpdateableStore[] getUpdateableStores()
          Returns all updateable stores
 boolean hasParent(Identifier identifier)
          Returns true if the event with the passed identifier has a parent.
 boolean isUseFulltextStores()
          Check if fulltext stores are used
 boolean isUseUpdateStores()
          Check if updateable stores are used
 void removeStore(Source store)
          Remove store from this store set
 void serializeStores(boolean backup, java.lang.String baseURI)
          Serialize the stores in this storeset into an XML file.
 void setSerializeStores(boolean serializeStores)
           
 void setUseFulltextStores(boolean fulltextStores)
          Stores created without additional parameters should support fulltext operations
 void setUseUpdateStores(boolean updateStores)
          Stores created without additional parameters should be updateable
 

Method Detail

createStore

Source createStore(XDMIterator initialDataIterator)
                   throws MXQueryException
Creates a Store with an automatically generated URI.

Parameters:
initialDataIterator - TODO
Returns:
created data source
Throws:
MXQueryException

createTransactionStore

UpdateableStore createTransactionStore(long transactionID)
Creates a temporary Store that belongs to a particular transaction, e.g. for data to be inserted/snapshots

Parameters:
transactionID - Identifier for a transaction
Returns:
Store instance associated with transaction and store set

cleanTransationStores

void cleanTransationStores(long transactionID)
Remove all temporary stores that are connected to the give transaction ID

Parameters:
transactionID -

createStore

Source createStore(java.lang.String uri,
                   XDMIterator initialDataIterator,
                   boolean maybeSerialized)
                   throws MXQueryException
Creates a Store with the passed URI.

Parameters:
uri -
initialDataIterator - Iterator to load the initial contents of this store from
maybeSerialized - TODO
Returns:
created data source
Throws:
MXQueryException

createUpdateableStore

UpdateableStore createUpdateableStore(java.lang.String uri,
                                      XDMIterator initialDataIterator,
                                      boolean newIds,
                                      boolean serializeable)
Creates an updateable store. The contents are materialized completely on the first request for data

Parameters:
uri - identifier of store, for serializeable stores the location URI
initialDataIterator - source of initial
newIds - Shall new node IDs be assigned ?
serializeable - shall this store be considered for serialization/persistence to disk
Returns:
A Updateable store instance. If the identifier already exists, the existing store will be used

getNewStoreForItem

UpdateableStore getNewStoreForItem(Identifier item,
                                   java.lang.String uri,
                                   boolean serializeable)
                                   throws MXQueryException
Create a new updateable store (copy) for an existing item

Parameters:
item - the node identifier of the item
uri - identifier of store, for serializeable stores the location URI
serializeable - shall this store be considered for serialization/persistence to disk
Returns:
A new updateable store for this item
Throws:
MXQueryException

removeStore

void removeStore(Source store)
Remove store from this store set

Parameters:
store -

createFulltextStore

FullTextStore createFulltextStore(java.lang.String uri,
                                  XDMIterator initialDataIterator)
                                  throws MXQueryException
Creates a full text store Note: An additional version of this function will be implemented later, where the types of full-text indexes can be chosen (currently, all indexes are always generated)

Parameters:
uri - identifier of store
Returns:
A fulltext store If the identifier already exists, the existing store will be used
Throws:
MXQueryException

createStreamStore

StreamStore createStreamStore(int type,
                              java.lang.String uri)
                              throws MXQueryException
Create a stream store, in which the XDM data can be possibly infinite, contents are lazily materialized and there are optimizations for access patterns and other parameters In this version, the store type is explicitly requested

Parameters:
type - A SMS store type
uri - the identifier of this stream
Returns:
A stream store fullfilling the requested paramers
Throws:
MXQueryException

createStreamStore

StreamStore createStreamStore(StreamStoreSettings sts,
                              java.lang.String uri)
                              throws MXQueryException
Create a stream store, in which the XDM data can be possibly infinite, contents are lazily materialized and there are optimizations for access patterns and other parameters In this version, the store type is explicitly requested

Parameters:
sts - the stream store settings for this store
uri - the identifier for this store
Returns:
a stream store with the requested properties
Throws:
MXQueryException

getStore

Source getStore(java.lang.String uri)
Returns the Store which has the passed URI as identifier

Parameters:
uri - The identifier of the store
Returns:
Store Data Source, if uri present, otherwise null

getAllStores

Source[] getAllStores()
Returns all stores

Returns:
a sequence of all stores in the store set

getUpdateableStores

UpdateableStore[] getUpdateableStores()
Returns all updateable stores

Returns:
a sequence of all updateable stores in the store set

getFulltextStores

FullTextStore[] getFulltextStores()
Retrieve all fulltext stores in this store set

Returns:
all fulltext stores in the store set

getStreamStores

StreamStore[] getStreamStores()
Retrieve all streams/stream stores associated with this store set

Returns:
all stream stores in this store set

getActiveStores

ActiveStore[] getActiveStores()
Get all active stores in this store set, i.e. all stores that gather there their input under their own control, not by the calling expressions

Returns:
all active stores in the store set

getParentId

Identifier getParentId(Identifier identifier)
                       throws MXQueryException
Returns the Identifier of the event with the passed identifier.

Parameters:
identifier -
Returns:
parent identifier
Throws:
MXQueryException

hasParent

boolean hasParent(Identifier identifier)
                  throws MXQueryException
Returns true if the event with the passed identifier has a parent.

Parameters:
identifier -
Returns:
true for has parent
Throws:
MXQueryException

addStoreToSerialize

void addStoreToSerialize(UpdateableStore store,
                         java.lang.String uri)
Adds a store to the list of stores to be serialized at PUL apply

Parameters:
store - Store to serialize
uri - Location where to store the contents of the store

serializeStores

void serializeStores(boolean backup,
                     java.lang.String baseURI)
                     throws MXQueryException
Serialize the stores in this storeset into an XML file. This affects only stores that serializable and have been modified

Parameters:
backup - Create backup file of the overwritten files
Throws:
MXQueryException

setSerializeStores

void setSerializeStores(boolean serializeStores)
Parameters:
serializeStores - if true, stores to be serialized should be collected, otherwise they are not

setUseUpdateStores

void setUseUpdateStores(boolean updateStores)
Stores created without additional parameters should be updateable

Parameters:
updateStores -

isUseUpdateStores

boolean isUseUpdateStores()
Check if updateable stores are used

Returns:
true, if updateable stores are used by default

setUseFulltextStores

void setUseFulltextStores(boolean fulltextStores)
Stores created without additional parameters should support fulltext operations

Parameters:
fulltextStores - if true, use fulltext Stores,

isUseFulltextStores

boolean isUseFulltextStores()
Check if fulltext stores are used

Returns:
true, if fulltext stores are used by default

freeRessources

void freeRessources()
Discard all stores and collections that have been generated inside this store set


copy

StoreSet copy()
Create a shallow copy of this Store Set, retaining all the contained stores and collections

Returns:
a copy of the store set

getCollection

XDMIterator[] getCollection(java.lang.String uri)
Get the contents of a collection

Parameters:
uri - The identifier of the collection
Returns:
null if collection does not exist, the set of iterator

addCollection

void addCollection(java.lang.String uri,
                   java.util.Vector coll)
                   throws MXQueryException
Add a collection to the storeset

Parameters:
uri - Collection identifier
coll - Vector of iterators representing the contents of the collection
Throws:
MXQueryException

deleteCollection

void deleteCollection(java.lang.String uri)
                      throws MXQueryException
Delete a collection

Parameters:
uri - Collection identifier
Throws:
MXQueryException

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich