|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.ifremer.isisfish.datastore.ResultStorage
public class ResultStorage
Cette classe permet de conserver des résultats de simulation. Elle permet ensuite de les récupérer. Created: 29 sept. 2004
| Field Summary | |
|---|---|
protected java.util.Set<java.lang.String> |
availableResult
contains all available result as string: String(date + ':' + name) |
protected org.apache.commons.collections.map.ReferenceMap |
cache
cache to maintains some result. key: String(date + ':' + name), value: matrix TODO: cache will be more efficient if it keep at min the number of result by year |
protected org.apache.commons.collections.map.ReferenceMap |
cacheContext
|
protected java.util.Set<java.lang.String> |
enabledResult
result enabled |
protected SimulationStorage |
simulation
|
| Constructor Summary | |
|---|---|
ResultStorage(SimulationStorage simulation)
Les ResultStorage ne doivent pas etre instancier directement, mais recuperer a partir d'un SimulationStorage.getResultStorage() |
|
| Method Summary | |
|---|---|
void |
addActiveRule(Date date,
Rule rule)
|
protected void |
addAvailableResult(Date date,
java.lang.String name)
Ajoute un resultat comme etant disponible pour une date donnée. |
void |
addResult(boolean force,
Date date,
org.nuiton.math.matrix.MatrixND mat)
|
void |
addResult(boolean force,
Date date,
Population pop,
org.nuiton.math.matrix.MatrixND mat)
|
void |
addResult(boolean force,
Date date,
java.lang.String name,
org.nuiton.math.matrix.MatrixND mat)
|
void |
addResult(boolean force,
Date date,
java.lang.String name,
Population pop,
org.nuiton.math.matrix.MatrixND mat)
|
void |
addResult(Date date,
org.nuiton.math.matrix.MatrixND mat)
|
void |
addResult(Date date,
Population pop,
org.nuiton.math.matrix.MatrixND mat)
|
void |
addResult(Date date,
java.lang.String name,
org.nuiton.math.matrix.MatrixND mat)
|
void |
addResult(Date date,
java.lang.String name,
Population pop,
org.nuiton.math.matrix.MatrixND mat)
|
void |
addResult(SimulationContext context,
Date date,
java.lang.String name,
org.nuiton.math.matrix.MatrixND mat)
|
void |
afterSimulation(SimulationContext context)
called after simulation |
void |
beforeSimulation(SimulationContext context)
called before simulation |
protected void |
doAddResult(Date date,
java.lang.String name,
org.nuiton.math.matrix.MatrixND mat)
|
protected void |
doAddResult(Date date,
java.lang.String name,
org.nuiton.math.matrix.MatrixND mat,
org.nuiton.topia.TopiaContext tx)
|
protected java.util.Set<java.lang.String> |
getAvailableResult()
Retourne le nom de tous les resultats disponibles le nom est constitué de la date et du nom du resultat. |
protected org.nuiton.math.matrix.MatrixND |
getInCache(Date date,
java.lang.String name)
|
protected org.nuiton.math.matrix.MatrixND |
getInCache(java.lang.String name)
|
Date |
getLastDate()
Get last simulation date. |
org.nuiton.math.matrix.MatrixND |
getMatrix(Date date,
Population pop,
java.lang.String name)
Retourne la matrice stocke pour un pas de temps |
org.nuiton.math.matrix.MatrixND |
getMatrix(Date date,
java.lang.String name)
|
org.nuiton.math.matrix.MatrixND |
getMatrix(Date date,
java.lang.String name,
org.nuiton.topia.TopiaContext tx)
Retourne la matrice stocke pour un pas de temps. |
org.nuiton.math.matrix.MatrixND |
getMatrix(Population pop,
java.lang.String name)
Retourne une matrice contenant tous les pas de temps. |
org.nuiton.math.matrix.MatrixND |
getMatrix(SimulationContext context,
Date date,
java.lang.String name)
Retourne la matrice stocke pour un pas de temps |
org.nuiton.math.matrix.MatrixND |
getMatrix(SimulationContext context,
java.lang.String name)
Retourne une matrice contenant tous les pas de temps. |
org.nuiton.math.matrix.MatrixND |
getMatrix(java.lang.String name)
Retourne une matrice contenant tous les pas de temps. |
org.nuiton.math.matrix.MatrixND |
getMatrix(java.lang.String name,
org.nuiton.topia.TopiaContext tx)
Retourne une matrice contenant tous les pas de temps. |
java.util.List<java.lang.String> |
getResultName()
Retourne la liste de tous les résultats. |
protected boolean |
isAvailableResult(Date date,
java.lang.String name)
Verifie si un resultat est disponible pour une date donnée |
boolean |
isEnabled(java.lang.String name)
Permet de savoir si lorsque l'on ajoutera ce resultat, il sera sauvé ou non. |
protected void |
putInCache(Date date,
java.lang.String name,
org.nuiton.math.matrix.MatrixND mat,
org.nuiton.topia.TopiaContext context)
|
protected void |
putInCache(java.lang.String name,
org.nuiton.math.matrix.MatrixND mat,
org.nuiton.topia.TopiaContext context)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected SimulationStorage simulation
protected transient org.apache.commons.collections.map.ReferenceMap cacheContext
protected transient org.apache.commons.collections.map.ReferenceMap cache
protected transient java.util.Set<java.lang.String> availableResult
protected transient java.util.Set<java.lang.String> enabledResult
| Constructor Detail |
|---|
public ResultStorage(SimulationStorage simulation)
SimulationStorage.getResultStorage()
| Method Detail |
|---|
protected void putInCache(Date date,
java.lang.String name,
org.nuiton.math.matrix.MatrixND mat,
org.nuiton.topia.TopiaContext context)
protected void putInCache(java.lang.String name,
org.nuiton.math.matrix.MatrixND mat,
org.nuiton.topia.TopiaContext context)
protected org.nuiton.math.matrix.MatrixND getInCache(Date date,
java.lang.String name)
protected org.nuiton.math.matrix.MatrixND getInCache(java.lang.String name)
protected java.util.Set<java.lang.String> getAvailableResult()
protected boolean isAvailableResult(Date date,
java.lang.String name)
date - name -
true if result is available
protected void addAvailableResult(Date date,
java.lang.String name)
date - name - public boolean isEnabled(java.lang.String name)
Export.getNecessaryResult()Export.getNecessaryResult()Rule.getNecessaryResult()AnalysePlan.getNecessaryResult()
name - result name
true if result is enabled
public void addResult(Date date,
org.nuiton.math.matrix.MatrixND mat)
throws IsisFishException
IsisFishException
public void addResult(Date date,
Population pop,
org.nuiton.math.matrix.MatrixND mat)
throws IsisFishException
IsisFishException
public void addResult(boolean force,
Date date,
org.nuiton.math.matrix.MatrixND mat)
throws IsisFishException
IsisFishException
public void addResult(boolean force,
Date date,
Population pop,
org.nuiton.math.matrix.MatrixND mat)
throws IsisFishException
IsisFishException
public void addResult(Date date,
java.lang.String name,
Population pop,
org.nuiton.math.matrix.MatrixND mat)
throws IsisFishException
IsisFishException
public void addResult(Date date,
java.lang.String name,
org.nuiton.math.matrix.MatrixND mat)
throws IsisFishException
IsisFishException
public void addResult(boolean force,
Date date,
java.lang.String name,
Population pop,
org.nuiton.math.matrix.MatrixND mat)
throws IsisFishException
IsisFishException
public void addResult(boolean force,
Date date,
java.lang.String name,
org.nuiton.math.matrix.MatrixND mat)
throws IsisFishException
IsisFishException
protected void doAddResult(Date date,
java.lang.String name,
org.nuiton.math.matrix.MatrixND mat)
throws IsisFishException
IsisFishException
protected void doAddResult(Date date,
java.lang.String name,
org.nuiton.math.matrix.MatrixND mat,
org.nuiton.topia.TopiaContext tx)
throws IsisFishException
IsisFishException
public void addActiveRule(Date date,
Rule rule)
throws IsisFishException
IsisFishExceptionpublic java.util.List<java.lang.String> getResultName()
public org.nuiton.math.matrix.MatrixND getMatrix(Date date,
Population pop,
java.lang.String name)
date - le pas de temps que l'on souhaitepop - la population pour lequelle on souhaite le resultatname - le nom des resultats dont on veut la matrice
public org.nuiton.math.matrix.MatrixND getMatrix(Date date,
java.lang.String name)
public org.nuiton.math.matrix.MatrixND getMatrix(Date date,
java.lang.String name,
org.nuiton.topia.TopiaContext tx)
date - le pas de temps que l'on souhaitename - le nom des resultats dont on veut la matricetx - TopiaContext a utiliser pour recuperer les resultats et donc les semantiques
null si aucune matrice ne correspond a
la demande.
public org.nuiton.math.matrix.MatrixND getMatrix(Population pop,
java.lang.String name)
pop - la population pour lequel on souhaite la matricename - le nom des resultats dont on veut une matrice globale.public org.nuiton.math.matrix.MatrixND getMatrix(java.lang.String name)
name - le nom des resultats dont on veut une matrice globale.
public org.nuiton.math.matrix.MatrixND getMatrix(java.lang.String name,
org.nuiton.topia.TopiaContext tx)
name - le nom des resultats dont on veut une matrice globale.tx - TopiaContext a utiliser pour recuperer les resultats et donc les semantiquespublic Date getLastDate()
public void addResult(SimulationContext context,
Date date,
java.lang.String name,
org.nuiton.math.matrix.MatrixND mat)
throws IsisFishException
addResult in interface SimulationResultListenerIsisFishException
public org.nuiton.math.matrix.MatrixND getMatrix(SimulationContext context,
Date date,
java.lang.String name)
SimulationResultGetter
getMatrix in interface SimulationResultGetterdate - le pas de temps que l'on souhaitename - le nom des resultats dont on veut la matrice
public org.nuiton.math.matrix.MatrixND getMatrix(SimulationContext context,
java.lang.String name)
SimulationResultGetter
getMatrix in interface SimulationResultGettername - le nom des resultats dont on veut une matrice globale.public void afterSimulation(SimulationContext context)
SimulationListener
afterSimulation in interface SimulationListenerpublic void beforeSimulation(SimulationContext context)
SimulationListener
beforeSimulation in interface SimulationListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||