|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.co.agena.minerva.model.scenario.ScenarioList
public class ScenarioList
This class holds a list of Scenarios.
Field Summary | |
---|---|
static double |
version
|
Fields inherited from interface uk.co.agena.minerva.util.model.Writable |
---|
FIELD_SEPARATOR |
Constructor Summary | |
---|---|
ScenarioList()
Creates an empty ScenarioList. |
|
ScenarioList(java.util.List scenarios)
Creates a new ScenarioList with the supplied List of Scenarios. |
Method Summary | |
---|---|
void |
addScenario(Scenario scenario)
Adds the supplied Scenario to this ScenarioList. |
java.util.List |
getAllObservations()
Returns a List of all Observations in all stored Scenarios. |
java.util.List |
getObservationsConnectedToExtendedNode(int exnID)
Returns a List of all Obsevations that are connected to the ExtendedNode with the given ID. |
Scenario |
getScenario(int id)
Returns the Scenario with the supplied ID. |
Scenario |
getScenarioAtIndex(int index)
|
java.util.List |
getScenarios()
Return the complete List of Scenarios. |
java.util.List |
getScenariosConnectedToExtendedBN(int exBNID)
Returns a List of Scenarios that have one or more Observations within them connected to the specified Extended BN. |
Scenario |
getScenarioWithName(java.lang.String name)
|
double |
getVersion()
Returns the version of the class. |
int |
read(java.util.List strings,
int currentLineNumber)
|
void |
removeAllScenarios()
Removes all the Scenarios in this ScenarioList. |
void |
removeNonNumericObservationsForNode(int connExtendedBNID,
int connExtendedNodeID)
Removes all Non-numeric Observations from any Scenarios that are related to the supplied ExtendedBN and ExtendedNode IDs. |
void |
removeObservationsForExtendedBN(ExtendedBN exBN)
This method will remove all observations that are connected to the specified extended BN from the scenarios contained within the list. |
void |
removeObservationsForNode(int connExtendedBNID,
int connExtendedNodeID)
Removes all Observations from any Scenarios that are related to the supplied ExtendedBN and ExtendedNode IDs. |
void |
removeObservationsForNodeWithParameter(int connExtendedBNID,
int connExtendedNodeID,
java.lang.String parameterName)
This method will remove all observations that are connected to the specified node and have the specified expression name from the scebario list |
Scenario |
removeScenario(int id)
Removes the Scenario with the supplied ID if it is found. |
Scenario |
removeScenario(Scenario scenario)
Removes the specified scenario from the model |
void |
resetAllScenarios()
Removes all Observations from all Scenarios. |
void |
setScenarios(java.util.List scenarios)
Set the list of Scenarios that this holds. |
void |
setVersion(double version)
Sets the version number of the class. |
void |
updateParameterExpressionName(int extendedBNID,
int extendedNodeID,
java.lang.String oldName,
java.lang.String newName)
This method will update all observations that are connected to the specified parameter in the specified node with the latest name of the parameter |
java.util.List |
write()
Writes the object in question to a List of Strings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static double version
Constructor Detail |
---|
public ScenarioList()
public ScenarioList(java.util.List scenarios)
scenarios
- the List of Scenarios used to create the ScenarioListMethod Detail |
---|
public void addScenario(Scenario scenario)
scenario
- the Scenario to be addedpublic Scenario removeScenario(int id) throws ScenarioNotFoundException
id
- the ID of the Scenario that is to be removed
ScenarioNotFoundException
- if the Scenario does not exist in the ScenarioListpublic Scenario removeScenario(Scenario scenario) throws ScenarioNotFoundException
scenario
-
ScenarioNotFoundException
public void removeObservationsForNode(int connExtendedBNID, int connExtendedNodeID)
connExtendedBNID
- the ID of the ExtendedBN associated with the ObservationconnExtendedNodeID
- the ID of the ExtendedNode associated with the Observationpublic void removeObservationsForExtendedBN(ExtendedBN exBN)
exBN
- public void removeNonNumericObservationsForNode(int connExtendedBNID, int connExtendedNodeID)
connExtendedBNID
- the ID of the ExtendedBN associated with the ObservationconnExtendedNodeID
- the ID of the ExtendedNode associated with the Observationpublic void removeObservationsForNodeWithParameter(int connExtendedBNID, int connExtendedNodeID, java.lang.String parameterName)
connExtendedBNID
- connExtendedNodeID
- parameterName
- public void removeAllScenarios()
public void updateParameterExpressionName(int extendedBNID, int extendedNodeID, java.lang.String oldName, java.lang.String newName)
extendedBNID
- extendedNodeID
- oldName
- newName
- public Scenario getScenario(int id) throws ScenarioNotFoundException
id
- the ID of the required Scenario
ScenarioNotFoundException
- if the Scenario is not found in the listpublic Scenario getScenarioAtIndex(int index)
public Scenario getScenarioWithName(java.lang.String name)
public java.util.List getScenarios()
public void setScenarios(java.util.List scenarios)
scenarios
- the new List of Scenarios for this ScenarioListpublic void resetAllScenarios()
public java.util.List getScenariosConnectedToExtendedBN(int exBNID)
exBNID
- the ExtendedBN ID that the Scenarios may or may not be connected
to
public java.util.List getObservationsConnectedToExtendedNode(int exnID)
exnID
- The id of the ExtendedNode we want to find the Observations for.
public java.util.List getAllObservations()
public java.util.List write() throws MinervaReadWriteException
Writable
write
in interface Writable
MinervaReadWriteException
- if therepublic int read(java.util.List strings, int currentLineNumber) throws MinervaReadWriteException
read
in interface Writable
MinervaReadWriteException
public double getVersion()
Writable
getVersion
in interface Writable
public void setVersion(double version)
Writable
setVersion
in interface Writable
version
- the version number
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |