Class DataStorageRegistry
- java.lang.Object
-
- fr.ens.biologie.genomique.aozan.aozan3.recipe.DataStorageRegistry
-
public class DataStorageRegistry extends Object
This class define a registry for data storages.- Since:
- 3.0
- Author:
- Laurent Jourdren
-
-
Constructor Summary
Constructors Constructor Description DataStorageRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(String name, DataStorage storage)
Add a storage to the registryboolean
exists(String name)
Test if a storage exists.DataStorage
get(String name)
Get a data storage from its nameSet<String>
names()
Get the names of registered storages.boolean
remove(String name)
Remove a data storage.
-
-
-
Method Detail
-
add
public void add(String name, DataStorage storage)
Add a storage to the registry- Parameters:
name
-storage
-
-
get
public DataStorage get(String name) throws Aozan3Exception
Get a data storage from its name- Parameters:
name
- name of the data storage- Returns:
- a DataStorage object
- Throws:
Aozan3Exception
- if the data storage does not exists
-
remove
public boolean remove(String name)
Remove a data storage.- Parameters:
name
- name of the data storage to remove- Returns:
- true if the storage has been removed
-
exists
public boolean exists(String name)
Test if a storage exists.- Parameters:
name
- name of the storage- Returns:
- true if the storage exists
-
-