fr.ifremer.isisfish.simulator
Class AnalysePlanContext

java.lang.Object
  extended by fr.ifremer.isisfish.simulator.AnalysePlanContext

public class AnalysePlanContext
extends Object

AnalysePlanContext.java Created: 1 mars 07 20:19:31

Version:
$Revision: 2682 $ Last update: $Date: 2009-10-21 14:18:45 +0200 (mer., 21 oct. 2009) $ by : $Author: chatellier $
Author:
poussin

Field Summary
protected  String id
          Simulation id.
protected  int number
          Analyse plan number.
protected  SimulationParameter param
          Simulation parameters.
protected  Map<String,Object> values
          Additionnal context values.
 
Constructor Summary
AnalysePlanContext(String id, SimulationParameter param)
           
 
Method Summary
 String getId()
          Get id.
 SimulationStorage getLastSimulation()
          Get last simulation storage.
 int getNumber()
          Deprecated. use nextSimulation.getParameter().getAnalysePlanNumber()
 SimulationParameter getParam()
          Get simulation parameters.
 SimulationStorage getSimulation(int number)
          Get SimulationStorage for specified analyse plan number.
 Object getValue(String key)
          Get plan context value.
 void incNumber()
          Must be call when new simulation is generated from plan.
 void setValue(String key, Object value)
          Set plan context value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected String id
Simulation id.


number

protected int number
Analyse plan number.


param

protected SimulationParameter param
Simulation parameters.


values

protected Map<String,Object> values
Additionnal context values.

Constructor Detail

AnalysePlanContext

public AnalysePlanContext(String id,
                          SimulationParameter param)
Method Detail

getId

public String getId()
Get id.

Returns:
the id

getNumber

public int getNumber()
Deprecated. use nextSimulation.getParameter().getAnalysePlanNumber()

Get current analyze plan simulation count. Warning, in after simulation, refer to generated simulation count, not ended simulation number. Depreciated, but no remove this method, it's just to not be used by user script.

Returns:
the number

incNumber

public void incNumber()
Must be call when new simulation is generated from plan.


getParam

public SimulationParameter getParam()
Get simulation parameters.

Returns:
simulation parameters

getValue

public Object getValue(String key)
Get plan context value. Used in script.

Parameters:
key - key
Returns:
value for key.

setValue

public void setValue(String key,
                     Object value)
Set plan context value. Used in script.

Parameters:
key - key
value - value

getLastSimulation

public SimulationStorage getLastSimulation()
Get last simulation storage. Used in script.

Returns:
last simulation storage

getSimulation

public SimulationStorage getSimulation(int number)
Get SimulationStorage for specified analyse plan number.

Parameters:
number - number
Returns:
SimulationStorage


Copyright © 1999-2010 CodeLutin. All Rights Reserved.