public class MainModel extends Object implements RunnableService
| Modifier and Type | Field and Description |
|---|---|
static String |
IDENTIFIER |
| Constructor and Description |
|---|
MainModel(StorageEngine engine,
MainController mainController,
Properties properties)
Constructs a new main model.
|
| Modifier and Type | Method and Description |
|---|---|
AlgorithmList |
getAlgorithmList()
Returns an algorithm list (all algorithms are wrapped in an AlgorithmList)
Attention: Implementation depends on the assumption that the list of algorithm
will not change during runtime.
|
List<Class<? extends Algorithm>> |
getAlgorithms()
Returns a list of all available algorithms.
|
List<Configuration> |
getConfigurations()
Returns a list of configurations.
|
GestureSetList |
getGestureSetList()
Returns a gesture set list (all gesture sets are wrapped in a
GestureSetList)
|
List<GestureSet> |
getGestureSets()
Returns a list with all gesture sets.
|
String |
getIdentifier()
Returns the identifier of the service.
|
String |
getProjectName() |
Properties |
getProperties() |
String |
getProperty(String key)
Returns the property value of the given key.
|
IStorageManager |
getStorageManager()
Returns the Storage Manager TODO: Investigate design! Should be
encapsulated.
|
TestSetList |
getTestSetList() |
List<TestSet> |
getTestSets()
Returns a list with all test sets.
|
boolean |
isActive() |
void |
removeProperty(String key)
Removes a property.
|
void |
reset()
Resets the service.
|
void |
setProjectName(String projectName) |
void |
setProperty(String key,
String value)
Add / Set a property.
|
void |
setStorageEngine(StorageEngine storageEngine)
Sets the storage manager.
|
void |
start()
Starts the service.
|
void |
stop()
Stops the service.
|
public static final String IDENTIFIER
public MainModel(StorageEngine engine, MainController mainController, Properties properties)
engine - the storage engine to be used.mainController - the main controller of the application.proeprties - the propertiespublic List<GestureSet> getGestureSets()
public List<TestSet> getTestSets()
public List<Class<? extends Algorithm>> getAlgorithms()
public List<Configuration> getConfigurations()
public GestureSetList getGestureSetList()
public TestSetList getTestSetList()
public AlgorithmList getAlgorithmList()
public String getIdentifier()
ServicegetIdentifier in interface Servicepublic void reset()
RunnableServicereset in interface RunnableServicepublic void start()
RunnableServicestart in interface RunnableServicepublic void stop()
RunnableServicestop in interface RunnableServicepublic IStorageManager getStorageManager()
public void setStorageEngine(StorageEngine storageEngine)
storageEngine - public void setProperty(String key, String value)
key - value - public String getProperty(String key)
key - the key of the property.public void removeProperty(String key)
key - public Properties getProperties()
public boolean isActive()
public void setProjectName(String projectName)
public String getProjectName()
Copyright © 2007-2012 Global Information Systems Group, ETH Zurich. All Rights Reserved.