Package weka.core.metastore
Class XMLFileBasedMetaStore
java.lang.Object
weka.core.metastore.XMLFileBasedMetaStore
- All Implemented Interfaces:
MetaStore
A simple default implementation of MetaStore that uses Weka's XML
serialization mechanism to persist entries as XML files in
${WEKA_HOME}/wekaMetaStore
- Version:
- $Revision: 14281 $
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createStore
(String storeName) Create a named storeGet a named entry from the storelistMetaStoreEntries
(String storeName) Get a list of all entries in a named storelistMetaStoreEntries
(String storeName, String prefix) Get a list of all named entries starting with the given prefixGet a list of all named meta storesvoid
storeEntry
(String storeName, String name, Object toStore) Store a named entry
-
Field Details
-
DEFAULT_STORE_LOCATION
The default location for the XML files
-
-
Constructor Details
-
XMLFileBasedMetaStore
public XMLFileBasedMetaStore()
-
-
Method Details
-
listMetaStores
Description copied from interface:MetaStore
Get a list of all named meta stores- Specified by:
listMetaStores
in interfaceMetaStore
- Returns:
- a list of meta stores
- Throws:
IOException
- if a problem occurs
-
listMetaStoreEntries
Description copied from interface:MetaStore
Get a list of all entries in a named store- Specified by:
listMetaStoreEntries
in interfaceMetaStore
- 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
Description copied from interface:MetaStore
Get a list of all named entries starting with the given prefix- Specified by:
listMetaStoreEntries
in interfaceMetaStore
- 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
-
getEntry
Description copied from interface:MetaStore
Get a named entry from the store- Specified by:
getEntry
in interfaceMetaStore
- 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
-
createStore
Description copied from interface:MetaStore
Create a named store- Specified by:
createStore
in interfaceMetaStore
- Parameters:
storeName
- the name of the store to create- Throws:
IOException
- if a problem occurs
-
storeEntry
Description copied from interface:MetaStore
Store a named entry- Specified by:
storeEntry
in interfaceMetaStore
- 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
-