Package weka.core.metastore
Interface MetaStore
-
- All Known Implementing Classes:
XMLFileBasedMetaStore
public interface MetaStoreInterface for metastore implementations. The metastore is a simple storage place that can be used, as an example, for storing named configuration settings (e.g. general application settings, reusable database connections etc.).- Version:
- $Revision$
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcreateStore(String storeName)Create a named storeObjectgetEntry(String storeName, String name, Class<?> clazz)Get a named entry from the storeSet<String>listMetaStoreEntries(String storeName)Get a list of all entries in a named storeSet<String>listMetaStoreEntries(String storeName, String prefix)Get a list of all named entries starting with the given prefixSet<String>listMetaStores()Get a list of all named meta storesvoidstoreEntry(String storeName, String name, Object toStore)Store a named entry
-
-
-
Method Detail
-
listMetaStores
Set<String> listMetaStores() throws IOException
Get a list of all named meta stores- Returns:
- a list of meta stores
- Throws:
IOException- if a problem occurs
-
listMetaStoreEntries
Set<String> listMetaStoreEntries(String storeName) throws IOException
Get a list of all entries in a named store- Parameters:
storeName- the name of the store to get entries for- Returns:
- a list of all entries in the named store
- Throws:
IOException- if a problem occurs
-
listMetaStoreEntries
Set<String> listMetaStoreEntries(String storeName, String prefix) throws IOException
Get a list of all named entries starting with the given prefix- Parameters:
storeName- the name of the store to get entries forprefix- the prefix with which to search for entries- Returns:
- a list of entries
- Throws:
IOException- if a problem occurs
-
createStore
void createStore(String storeName) throws IOException
Create a named store- Parameters:
storeName- the name of the store to create- Throws:
IOException- if a problem occurs
-
getEntry
Object getEntry(String storeName, String name, Class<?> clazz) throws IOException
Get a named entry from the store- Parameters:
storeName- the name of the store to usename- the full name of the entry to retrieveclazz- the expected class of the entry when deserialized- Returns:
- the deserialized entry or null if the name does not exist in the store
- Throws:
IOException- if the deserialized entry does not match the expected class
-
storeEntry
void storeEntry(String storeName, String name, Object toStore) throws IOException
Store a named entry- Parameters:
storeName- the name of the store to usename- the full name of the entry to storetoStore- a beans compliant object to store- Throws:
IOException- if a problem occurs
-
-