public class Workspace
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
Variables
Map of variable name to object
|
Constructor and Description |
---|
Workspace()
Create a Workspace with an empty variable list
|
Modifier and Type | Method and Description |
---|---|
void |
addVariable(java.lang.String Name,
java.lang.Object obj)
Adds a variable to the workspace.
|
BaseAttributeSelector |
getAttributeSelector(java.lang.String Name)
Get an BaseAttributeSelector out of the Workspace
|
BaseClusterer |
getClusterer(java.lang.String Name)
Get an BaseClusterer out of the Workspace
|
Dataset |
getDataset(java.lang.String Name)
Get a dataset out of the variable list
|
BaseModel |
getModel(java.lang.String Name)
Get a model out of the workspace
|
java.lang.Object |
getObject(java.lang.String Name)
Gets an object that has been created by the user
|
java.util.Set<java.lang.String> |
getVariableNames()
Get the names of all variables stored in this class
|
boolean |
hasVariable(java.lang.String Name)
Test whether the user has created a variable
|
java.lang.String |
printWorkspace()
Prints a table containing all variables currently in Workspace.
|
void |
removeVariable(java.lang.String Name)
Removes a variable from the workspace
|
protected java.util.Map<java.lang.String,java.lang.Object> Variables
public java.util.Set<java.lang.String> getVariableNames()
public Dataset getDataset(java.lang.String Name) throws java.lang.Exception
Name
- Name of variable to be returnjava.lang.Exception
- If Name is not in set or is not a Dataset Objectpublic BaseModel getModel(java.lang.String Name) throws java.lang.Exception
Name
- Name of model to be returnedjava.lang.Exception
- If Name is not in set or is not a BaseModel Objectpublic BaseAttributeSelector getAttributeSelector(java.lang.String Name) throws java.lang.Exception
Name
- Name of BaseAttributeSelector to be returnedjava.lang.Exception
- If Name is not in set, or not an BaseAttributeSelectorpublic BaseClusterer getClusterer(java.lang.String Name) throws java.lang.Exception
Name
- Name of BaseClusterer to be returnedjava.lang.Exception
- If Name is not in set, or not an BaseClustererpublic boolean hasVariable(java.lang.String Name)
Name
- Name of variablepublic void removeVariable(java.lang.String Name)
Name
- Variable to be removedpublic void addVariable(java.lang.String Name, java.lang.Object obj) throws java.lang.Exception
Workspace
.Name
- Name of variableobj
- Pointer to variablejava.lang.Exception
- if variable has already been assignedpublic java.lang.Object getObject(java.lang.String Name) throws java.lang.Exception
Name
- name of variable to retrievejava.lang.Exception
- if variable does not existpublic java.lang.String printWorkspace()
Name Type About
<Variable name> <Variable type> <About variable>
...