Isis-fish-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
August 2008
- 4 participants
- 45 discussions
Author: bpoussin
Date: 2008-08-19 13:30:52 +0000 (Tue, 19 Aug 2008)
New Revision: 1304
Added:
branches/isis-fish-3.2.1/
Log:
Creation de la branche pour la migration de swixat vers jaxx
Copied: branches/isis-fish-3.2.1 (from rev 1303, trunk/isis-fish)
1
0
r1303 - in trunk/isis-fish: . src/resources src/resources/i18n src/xmi
by bpoussin@users.labs.libre-entreprise.org 18 Aug '08
by bpoussin@users.labs.libre-entreprise.org 18 Aug '08
18 Aug '08
Author: bpoussin
Date: 2008-08-18 13:44:18 +0000 (Mon, 18 Aug 2008)
New Revision: 1303
Modified:
trunk/isis-fish/pom.xml
trunk/isis-fish/src/resources/IsisFish_init.properties
trunk/isis-fish/src/resources/i18n/isis-fish-en_GB.properties
trunk/isis-fish/src/resources/i18n/isis-fish-fr_FR.properties
trunk/isis-fish/src/xmi/isis-fish.zargo
Log:
gros nettoyage apres fusion avec la branche 3.2. (migration de schema, nouvelle equation, calcul en maille)
- retour des bon fichiers de langue
- commit du .zargo et pom.xml
Modified: trunk/isis-fish/pom.xml
===================================================================
--- trunk/isis-fish/pom.xml 2008-08-18 13:42:57 UTC (rev 1302)
+++ trunk/isis-fish/pom.xml 2008-08-18 13:44:18 UTC (rev 1303)
@@ -421,7 +421,7 @@
<plugin>
<groupId>lutinplugin</groupId>
<artifactId>maven-i18n-plugin</artifactId>
- <version>0.3</version>
+ <version>0.4</version>
<configuration>
<bundles>
<param>fr_FR</param>
@@ -552,15 +552,14 @@
<version>0.7-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
- <!-- librairie commandline -->
+ <!-- librairie commandline
<dependency>
<groupId>org.codelutin.commandline</groupId>
<artifactId>commandline-ui</artifactId>
<version>0.6</version>
<scope>compile</scope>
- <!--scope>compile</scope-->
</dependency>
-
+-->
<!--
<dependency>
<groupId>lutinlib</groupId>
@@ -661,14 +660,14 @@
<version>2.0</version>
<scope>compile</scope>
</dependency>
-
+<!--
<dependency>
<groupId>org.netbeans.lib</groupId>
<artifactId>cvsclient</artifactId>
<version>20051129</version>
<scope>compile</scope>
</dependency>
-
+-->
<dependency>
<groupId>bsh</groupId>
<artifactId>bsh</artifactId>
@@ -851,7 +850,7 @@
</dependency>
<!-- ssj pour les calculs stockastiques -->
- <!--dependency>
+ <dependency>
<groupId>ssj</groupId>
<artifactId>ssj</artifactId>
<version>2.0</version>
@@ -893,12 +892,12 @@
<scope>compile</scope>
</dependency>
- <dependency>
+ <dependency>
<groupId>ssj</groupId>
<artifactId>optimization</artifactId>
<version>20060613</version>
<scope>compile</scope>
- </dependency-->
+ </dependency>
<!-- fin ssj pour les calculs stockastiques -->
Modified: trunk/isis-fish/src/resources/IsisFish_init.properties
===================================================================
--- trunk/isis-fish/src/resources/IsisFish_init.properties 2008-08-18 13:42:57 UTC (rev 1302)
+++ trunk/isis-fish/src/resources/IsisFish_init.properties 2008-08-18 13:44:18 UTC (rev 1303)
@@ -21,7 +21,7 @@
###
-### les propriétés de la configuration principal obligatoires pour commandline
+### les propri\u00E9t\u00E9s de la configuration principal obligatoires pour commandline
###
#main.config.definition.configFileName=java.io.File:.isis-config-3
@@ -40,7 +40,7 @@
#main.config.modifiers.version=final,static,mandatory
###
-### les propriétés de la configuration principal
+### les propri\u00E9t\u00E9s de la configuration principal
###
main.config.definition.compileDirectory=java.io.File:isis-build
@@ -103,10 +103,10 @@
main.config.definition.simulationServer=java.net.URL:http://simulateur.ifremer.fr:9090
main.config.modifiers.simulationServer=mandatory
-main.config.definition.simulationShowOnlyError=java.lang.Boolean:true
+main.config.definition.simulationShowOnlyError=java.lang.Boolean:false
main.config.modifiers.simulationShowOnlyError=
-main.config.definition.simulationShowOnlyQueue=java.lang.Boolean:true
+main.config.definition.simulationShowOnlyQueue=java.lang.Boolean:false
main.config.modifiers.simulationShowOnlyQueue=
main.config.definition.smtpServer=java.lang.String:smtp
@@ -120,7 +120,7 @@
###
-### les propriétés de la configuration vcs
+### les propri\u00E9t\u00E9s de la configuration vcs
###
vcs.config.definition.localDatabasePath=java.io.File:isis-database-3
vcs.config.modifiers.localDatabasePath=mandatory
@@ -168,7 +168,7 @@
vcs.config.modifiers.userName=mandatory
###
-### les propriétés de la configuration h2
+### les propri\u00E9t\u00E9s de la configuration h2
###
# On utilise pas cglib pour eviter les OutOfMemory: PermGen
h2.config.definition.h2BytecodeProvider=java.lang.String:javassist
@@ -258,5 +258,5 @@
h2.config.definition.storageData=java.lang.String:data
h2.config.modifiers.storageData=final,mandatory,static,transient
-h2.config.definition.updateschemaDatabase=java.lang.Boolean:false
+h2.config.definition.updateschemaDatabase=java.lang.Boolean:true
h2.config.modifiers.updateschemaDatabase=final,mandatory,static,transient
Modified: trunk/isis-fish/src/resources/i18n/isis-fish-en_GB.properties
===================================================================
--- trunk/isis-fish/src/resources/i18n/isis-fish-en_GB.properties 2008-08-18 13:42:57 UTC (rev 1302)
+++ trunk/isis-fish/src/resources/i18n/isis-fish-en_GB.properties 2008-08-18 13:44:18 UTC (rev 1303)
@@ -1,78 +1,17 @@
-=
-\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ new\ JInternalFrame(simulation.getName(),\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ true,\ //resizable\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ true,\ //closable\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ true,\ //maximizable\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ true);//iconifiable\ \ \ \ \ \ \ \ \ \ \ \ intFrame.setContentPane(resEdit.getRootPane());\ \ \ \ \ \ \ \ \ \ \ \ intFrame.setVisible(true);\ \ \ \ \ \ \ \ \ \ \ \ //\t\ \ \ \ intFrame.pack();\ \ \ \ \ \ \ \ \ \ \ \ intFrame.setSize(new\ Dimension(800,700));\ \ \ \ \ \ \ \ \ \ \ \ getDesktopPane().add(intFrame);\ \ \ \ \ \ \ \ \ \ \ \ try{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ intFrame.setSelected(true);\ \ \ \ \ \ \ \ \ \ \ \ }\ catch\ (PropertyVetoException\ eee)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ log.warn("Error\ dans\ l\ internalFrame\ ",\ eee);\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ }\ \ \ \ public\ void\ on_voirSimulationLogButton_clicked()\ {\ \ \ \ \ \ \ \ String\ name\ =
-\ (String)getSimulation().getSelectedItem();\ \ \ \ \ \ \ \ if\ (name\ \!=
-\ (String)getSimulation().getSelectedItem();\ \ \ \ \ \ \ \ try\ {\ \ \ \ \ \ \ \ \ \ \ \ SimulationLoggerUtil.showSimulationLogConsole(name);\ \ \ \ \ \ \ \ }\ catch\ (Exception\ e)\ {\ \ \ \ \ \ \ \ \ \ \ \ //\ ignore\ ?\ \ \ \ \ \ \ \ }\ \ \ \ }\ \ \ \ public\ void\ on_filterSimulationLogButton_clicked()\ {\ \ \ \ \ \ \ \ try\ {\ \ \ \ \ \ \ \ \ \ \ \ List<String>\ result\ =
-\ -5643196187139951889L;\ \ \ \ public\ SimulationException(String\ msg)\ {\ \ \ \ \ \ \ \ super(msg);\ \ \ \ }\ \ \ \ public\ SimulationException(String\ msg,\ Throwable\ e)\ {\ \ \ \ \ \ \ \ super(msg,\ e);\ \ \ \ }}\ //\ SimulationException/*\ *\#\#%\ *\ Copyright\ (C)\ 2007\ *\ \ \ \ \ Ifremer,\ Code\ Lutin,\ C\uFFFDdric\ Pineau,\ Benjamin\ Poussin\ *\ *\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or\ *\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License\ *\ as\ published\ by\ the\ Free\ Software\ Foundation;\ either\ version\ 2\ *\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.\ *\ *\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,\ *\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of\ *\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the\ *\ GNU\ General\ Public\ License\ for\ more\ details.\ *\ *\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License\ *\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software\ *\ Foundation,\ Inc.,\ 59\ Temple\ Place\ -\ Suite\ 330,\ Boston,\ MA\ \ 02111-1307,\ USA.\ *\#\#%*//*\ *\ *\ SimulationResultListener.java\ *\ *\ Created\:\ 13\ nov.\ 07\ 11\:59\:53\ *\ *\ @author\ poussin\ *\ @version\ $Revision\:\ 739\ $\ *\ *\ Last\ update\:\ $Date\:\ 2007-11-20\ 18\:46\:38\ +0100\ (mar,\ 20\ nov\ 2007)\ $\ *\ by\ \:\ $Author\:\ bpoussin\ $\ */package\ fr.ifremer.isisfish.simulator;import\ org.codelutin.math.matrix.MatrixND;import\ fr.ifremer.isisfish.IsisFishException;import\ fr.ifremer.isisfish.types.Date;/**\ *\ @author\ poussin\ *\ */public\ interface\ SimulationResultListener\ extends\ SimulationListener\ {\ \ \ \ \ \ \ \ public\ void\ addResult(SimulationContext\ context,\ \ \ \ \ \ \ \ \ \ \ \ Date\ date,\ String\ name,\ MatrixND\ mat)\ throws\ IsisFishException;\ \ \ \ }/*\ *\#\#%\ *\ Copyright\ (C)\ 2006\ *\ \ \ \ \ Ifremer,\ Code\ Lutin,\ C\uFFFDdric\ Pineau,\ Benjamin\ Poussin\ *\ *\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or\ *\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License\ *\ as\ published\ by\ the\ Free\ Software\ Foundation;\ either\ version\ 2\ *\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.\ *\ *\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,\ *\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of\ *\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the\ *\ GNU\ General\ Public\ License\ for\ more\ details.\ *\ *\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License\ *\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software\ *\ Foundation,\ Inc.,\ 59\ Temple\ Place\ -\ Suite\ 330,\ Boston,\ MA\ \ 02111-1307,\ USA.\ *\#\#%*//*\ *\ *\ SimulationQueueEvent.java\ *\ *\ Created\:\ 17\ ao\uFFFDt\ 2006\ 22\:00\:41\ *\ *\ @author\ poussin\ *\ @version\ $Revision\:\ 217\ $\ *\ *\ Last\ update\:\ $Date\:\ 2006-08-21\ 17\:43\:41\ +0200\ (lun,\ 21\ ao\u00FB\ 2006)\ $\ *\ by\ \:\ $Author\:\ bpoussin\ $\ */package\ fr.ifremer.isisfish.simulator;import\ java.util.EventObject;/**\ *\ @author\ poussin\ *\ */public\ class\ SimulationQueueEvent\ extends\ EventObject\ {\ \ \ \ /**\ simulation\ id\ */\ \ \ \ protected\ String\ id;\ \ \ \ \ \ \ \ /**\ \ \ \ \ *\ @param\ source\ \ \ \ \ */\ \ \ \ public\ SimulationQueueEvent(Object\ source,\ String\ id)\ {\ \ \ \ \ \ \ \ super(source);\ \ \ \ \ \ \ \ this.id\ =
-\ 0)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ this\ is\ the\ all\ levels\ reader\ to\ create,\ depends\ on\ no\ others\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ reader\ =
-\ 0;\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ //log.debug("\ offset\:"\ +\ offset\ +\ "\ width\:"\ +\ model.nbLinesInEditor);\ \ \ \ \ \ \ \ String[]\ result;\ \ \ \ \ \ \ \ //\ obtain\ lines\ from\ reader\ \ \ \ \ \ \ \ result\ =
-\ 4449196856169240128L;\ \ \ \ public\ SimulatorServerBadIdException(String\ msg)\ {\ \ \ \ \ \ \ \ super(msg);\ \ \ \ }\ \ \ \ public\ SimulatorServerBadIdException(String\ msg,\ Throwable\ e)\ {\ \ \ \ \ \ \ \ super(msg,\ e);\ \ \ \ }}\ //\ SimulatorServerBadIdException/*\ *\#\#%\ *\ Copyright\ (C)\ 2002-2005\ Code\ Lutin,\ C\uFFFDdric\ Pineau,\ \ \ \ \ Benjamin\ Poussin\ *\ *\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or\ *\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License\ *\ as\ published\ by\ the\ Free\ Software\ Foundation;\ either\ version\ 2\ *\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.\ *\ *\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,\ *\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of\ *\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the\ *\ GNU\ General\ Public\ License\ for\ more\ details.\ *\ *\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License\ *\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software\ *\ Foundation,\ Inc.,\ 59\ Temple\ Place\ -\ Suite\ 330,\ Boston,\ MA\ \ 02111-1307,\ USA.\ *\#\#%*//*\ *\ *\ SimulationException.java\ *\ *\ Created\:\ Wed\ Aug\ 14\ 2002\ *\ *\ @author\ \ <poussin at codelutin.com>\ *\ @version\ $Revision\:\ 167\ $\ *\ *\ Mise\ a\ jour\:\ $Date\:\ 2006-01-23\ 15\:00\:17\ +0100\ (lun,\ 23\ jan\ 2006)\ $\ *\ par\ \:\ $Author\:\ bpoussin\ $\ */package\ fr.ifremer.isisfish.simulator;public\ class\ SimulationException\ extends\ RuntimeException\ {\ //\ SimulationException\ \ \ \ /**\ \ */\ \ \ \ private\ static\ final\ long\ serialVersionUID\ =
-\ IsisConfig.Module.REGION;\ \ \ \ \ \ \ \ if\ (create)\ {\ \ \ \ \ \ \ \ \ \ \ \ doCheckoutModule(handler,module,category);\ \ \ \ \ \ \ \ }\ else\ {\ \ \ \ \ \ \ \ \ \ \ \ File\ f\ =
-\ IsisConfig.getResultExportDirectory(rootDirectory);\ \ \ \ \ \ \ \ \ \ \ \ exportDir.mkdirs();\ \ \ \ \ \ \ \ \ \ \ \ ExportHelper.doExport(simulation,\ exportDir,\ parameters.getExportNames(),\ rootDirectory);\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ /*\ (non-Javadoc)\ \ \ \ \ *\ @see\ fr.ifremer.isisfish.simulator.SimulationListener\#beforeSimulation(fr.ifremer.isisfish.simulator.SimulationContext)\ \ \ \ \ */\ \ \ \ public\ void\ beforeSimulation(SimulationContext\ context)\ {\ \ \ \ }}/*\ *\#\#%\ *\ Copyright\ (C)\ 2006\ *\ \ \ \ \ Ifremer,\ Code\ Lutin,\ C\uFFFDdric\ Pineau,\ Benjamin\ Poussin\ *\ *\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or\ *\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License\ *\ as\ published\ by\ the\ Free\ Software\ Foundation;\ either\ version\ 2\ *\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.\ *\ *\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,\ *\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of\ *\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the\ *\ GNU\ General\ Public\ License\ for\ more\ details.\ *\ *\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License\ *\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software\ *\ Foundation,\ Inc.,\ 59\ Temple\ Place\ -\ Suite\ 330,\ Boston,\ MA\ \ 02111-1307,\ USA.\ *\#\#%*//*\ *\ *\ MetierMonitor.java\ *\ *\ Created\:\ 21\ ao\uFFFDt\ 2006\ 15\:43\:19\ *\ *\ @author\ poussin\ *\ @version\ $Revision\:\ 652\ $\ *\ *\ Last\ update\:\ $Date\:\ 2007-11-08\ 15\:04\:16\ +0100\ (jeu,\ 08\ nov\ 2007)\ $\ *\ by\ \:\ $Author\:\ ruchaud\ $\ */package\ fr.ifremer.isisfish.simulator;import\ static\ org.codelutin.i18n.I18n.n_;import\ java.util.ArrayList;import\ java.util.Collection;import\ java.util.HashMap;import\ java.util.HashSet;import\ java.util.List;import\ java.util.Map;import\ java.util.Set;import\ org.apache.commons.collections.MapIterator;import\ org.apache.commons.collections.keyvalue.MultiKey;import\ org.apache.commons.collections.map.MultiKeyMap;import\ org.apache.commons.logging.Log;import\ org.apache.commons.logging.LogFactory;import\ org.codelutin.math.matrix.MatrixFactory;import\ org.codelutin.math.matrix.MatrixND;import\ org.codelutin.topia.TopiaContext;import\ org.codelutin.topia.TopiaException;import\ fr.ifremer.isisfish.IsisFishRuntimeException;import\ fr.ifremer.isisfish.entities.Metier;import\ fr.ifremer.isisfish.entities.SetOfVessels;import\ fr.ifremer.isisfish.entities.Strategy;import\ fr.ifremer.isisfish.entities.StrategyMonthInfo;import\ fr.ifremer.isisfish.types.Date;import\ fr.ifremer.isisfish.types.Month;/**\ *\ ATTENTION\:\ l'implantation\ de\ cette\ classe\ n'est\ peut-etre\ pas\ correct.\ Il\ faut\ *\ absolument\ verifier\ le\ FIXME,\ mais\ il\ est\ difficile\ de\ le\ faire\ car\ *\ la\ plupart\ des\ methodes\ de\ cette\ objets\ ne\ semble\ plus\ utilis\uFFFD\ dans\ la\ *\ version\ 2.3.x\ de\ isis\ *\ \ *\ @author\ poussin\ */public\ class\ MetierMonitor\ {\ \ \ \ /**\ to\ use\ log\ facility,\ just\ put\ in\ your\ code\:\ log.info(\\"...\\=
-\ IsisContext.get().getMainConfig().getDefaultMapFile();\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ String\ shp\ =
-\ LogLevelUtil.getLogLevels(levels);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ create\ the\ levels\ reader\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ reader\ =
-\ Session.getDefaultInstance(props,\ null);\ \ \ \ \ \ \ \ //\ --\ Create\ a\ new\ message\ --\ \ \ \ \ \ \ \ Message\ msg\ =
-\ SimulationFilterUtil.createFilterModel(value);\ \ \ \ \ \ \ \ //\ to\ used\ directly\ model.getFilteredResult()\ in\ xml\ \ \ \ \ \ \ \ //\ we\ must\ fill\ filterModel\ result\ with\ original\ items\ \ \ \ \ \ \ \ filterModel.selectAll();\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ getSimulation().setEditable(false);\ \ \ \ \ \ \ \ model\ =
-\ SimulationFilterUtil.filterSimulation(filterModel);\ \ \ \ \ \ \ \ \ \ \ \ model.removeAllElements();\ \ \ \ \ \ \ \ \ \ \ \ for\ (String\ s\ \:\ result)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ model.addElement(s);\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ catch\ (Exception\ e)\ {\ \ \ \ \ \ \ \ \ \ \ \ log.warn(I18n._("could\ not\ filter\ on\ simulations=
-\ SimulationStorage.getSimulation(name);\ \ \ \ \ \ \ \ \ \ \ \ ResultEdit\ resEdit\ =
-\ SimulationStorage.getSimulation(name);\ \ \ \ \ \ \ \ \ \ \ \ try\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ storage.delete(false);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ initSimulation();\ \ \ \ \ \ \ \ \ \ \ \ }\ catch\ (Exception\ eee)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ log.warn("Can't\ delete\ simulation",\ eee);\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ }\ \ \ \ public\ void\ on_openWindowButton_clicked(){\ \ \ \ \ \ \ \ String\ name\ =
-\ System.getProperties();\ \ \ \ \ \ \ \ //\ --\ Attaching\ to\ default\ Session,\ or\ we\ could\ start\ a\ new\ one\ --\ \ \ \ \ \ \ \ props.put("mail.smtp.host",\ smtpServer);\ \ \ \ \ \ \ \ Session\ session\ =
-\ context.getSimulationStorage();\ \ \ \ \ \ \ \ SimulationParameter\ parameters\ =
-\ e.getId();\ \ \ \ \ \ \ \ SimulationControl\ control\ =
-\ e.getUnitsToScroll();\ \ \ \ \ \ \ \ long\ newOffset;\ \ \ \ \ \ \ \ newOffset\ =
-\ evt.getPropertyName();\ \ \ \ \ \ \ \ if\ (properyName.equals(LogConsole.DISPOSE_CHANGED_PROPERTY))\ {\ \ \ \ \ \ \ \ \ \ \ \ //\ ui\ required\ a\ dispose\ \ \ \ \ \ \ \ \ \ \ \ try\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ close();\ \ \ \ \ \ \ \ \ \ \ \ }\ catch\ (Exception\ e)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ log.warn(_("isisfish.error.log.console.dispose"\ ,this,e.getMessage()));\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ return;\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ //log.info(properyName\ +\ "\ \:\ "\ +\ evt.getNewValue());\ \ \ \ \ \ \ \ if\ (properyName.equals(RESET_CHANGED_PROPERTY))\ {\ \ \ \ \ \ \ \ \ \ \ \ //\ reset\ filter\ model\ \ \ \ \ \ \ \ \ \ \ \ model.setLevels(0);\ \ \ \ \ \ \ \ \ \ \ \ model.setSearchText("=
-\ false;\ \ \ \ }\ \ \ \ public\ void\ propertyChange(PropertyChangeEvent\ evt)\ {\ \ \ \ \ \ \ \ String\ properyName\ =
-\ filename\ +\ ".shp";\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ String\ ssx\ =
-\ filename\ +\ ".ssx";\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ addShapeLayer(filename,\ shp,\ ssx,\ "ff000000",\ "ffbdde83=
-\ from;\ \ \ \ \ \ \ \ this.logFile\ =
-\ getRowCount();\ \ \ \ \ \ \ \ fireTableRowsInserted(row,\ row);\ \ \ \ \ \ \ \ SimulationControl\ control\ =
-\ getSimulationControl(e.getId());\ \ \ \ \ \ \ \ control.addPropertyChangeListener(this);\ \ \ \ }\ \ \ \ /*\ (non-Javadoc)\ \ \ \ \ *\ @see\ SimulationQueueListener\#simulationRemoved(fr.ifremer.isisfish.simulator.SimulationQueueEvent)\ \ \ \ \ */\ \ \ \ public\ void\ simulationWillBeRemoved(SimulationQueueEvent\ e)\ {\ \ \ \ \ \ \ \ String\ id\ =
-\ getSimulationControl(e.getId());\ \ \ \ \ \ \ \ if\ (control\ \!=
-\ getSimulationIndex(id);\ \ \ \ \ \ \ \ if\ (isRowIndexValid(row))\ {\ \ \ \ \ \ \ \ \ \ \ \ fireTableRowsDeleted(row,\ row);\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ progress.remove(id);\ \ \ \ }\ \ \ \ /*\ (non-Javadoc)\ \ \ \ \ *\ @see\ SimulationQueueListener\#simulationStart(fr.ifremer.isisfish.simulator.SimulationQueueEvent)\ \ \ \ \ */\ \ \ \ public\ void\ simulationStart(SimulationQueueEvent\ e)\ {\ \ \ \ \ \ \ \ //\ nothing\ to\ do\ \ \ \ }\ \ \ \ /*\ (non-Javadoc)\ \ \ \ *\ @see\ SimulationQueueListener\#simulationStop(fr.ifremer.isisfish.simulator.SimulationQueueEvent)\ \ \ \ */\ \ \ \ public\ void\ simulationStop(SimulationQueueEvent\ e)\ {\ \ \ \ \ \ \ \ //\ nothing\ to\ do\ \ \ \ }}\ //\ SimulationQueueModel/*\ *\#\#%\ *\ Copyright\ (C)\ 2007\ *\ \ \ \ \ Ifremer,\ Code\ Lutin,\ C\uFFFDdric\ Pineau,\ Benjamin\ Poussin\ *\ *\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or\ *\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License\ *\ as\ published\ by\ the\ Free\ Software\ Foundation;\ either\ version\ 2\ *\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.\ *\ *\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,\ *\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of\ *\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the\ *\ GNU\ General\ Public\ License\ for\ more\ details.\ *\ *\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License\ *\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software\ *\ Foundation,\ Inc.,\ 59\ Temple\ Place\ -\ Suite\ 330,\ Boston,\ MA\ \ 02111-1307,\ USA.\ *\#\#%*//*\ *\ *\ SimulationExportResultWrapper.java\ *\ *\ Created\:\ 14\ nov.\ 07\ 00\:22\:51\ *\ *\ @author\ poussin\ *\ @version\ $Revision\:\ 1128\ $\ *\ *\ Last\ update\:\ $Date\:\ 2008-01-08\ 20\:21\:28\ +0100\ (mar,\ 08\ jan\ 2008)\ $\ *\ by\ \:\ $Author\:\ tchemit\ $\ */package\ fr.ifremer.isisfish.simulator;import\ java.io.File;import\ fr.ifremer.isisfish.IsisConfig;import\ fr.ifremer.isisfish.datastore.SimulationStorage;import\ fr.ifremer.isisfish.export.ExportHelper;/**\ *\ @author\ poussin\ *\ */public\ class\ SimulationExportResultWrapper\ implements\ SimulationListener\ {\ \ \ \ /*\ (non-Javadoc)\ \ \ \ \ *\ @see\ fr.ifremer.isisfish.simulator.SimulationListener\#afterSimulation(fr.ifremer.isisfish.simulator.SimulationContext)\ \ \ \ \ */\ \ \ \ public\ void\ afterSimulation(SimulationContext\ context)\ {\ \ \ \ \ \ \ \ SimulationStorage\ simulation\ =
-\ getSimulationNames();\ \ \ \ \ \ \ \ //\ create\ filter\ model\ \ \ \ \ \ \ \ filterModel\ =
-\ id;\ \ \ \ }\ \ \ \ \ \ \ \ /**\ \ \ \ \ *\ @return\ Returns\ the\ id.\ \ \ \ \ */\ \ \ \ public\ String\ getId()\ {\ \ \ \ \ \ \ \ return\ this.id;\ \ \ \ }\ \ \ \ }/*\ *\#\#%\ *\ Copyright\ (C)\ 2006\ *\ \ \ \ \ Ifremer,\ Code\ Lutin,\ C\uFFFDdric\ Pineau,\ Benjamin\ Poussin\ *\ *\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or\ *\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License\ *\ as\ published\ by\ the\ Free\ Software\ Foundation;\ either\ version\ 2\ *\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.\ *\ *\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,\ *\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of\ *\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the\ *\ GNU\ General\ Public\ License\ for\ more\ details.\ *\ *\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License\ *\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software\ *\ Foundation,\ Inc.,\ 59\ Temple\ Place\ -\ Suite\ 330,\ Boston,\ MA\ \ 02111-1307,\ USA.\ *\#\#%*//*\ *\ *\ PopulationMonitor.java\ *\ *\ Created\:\ 21\ ao\uFFFDt\ 2006\ 15\:41\:18\ *\ *\ @author\ poussin\ *\ @version\ $Revision\:\ 428\ $\ *\ *\ Last\ update\:\ $Date\:\ 2007-10-15\ 14\:56\:13\ +0200\ (lun,\ 15\ oct\ 2007)\ $\ *\ by\ \:\ $Author\:\ bpoussin\ $\ */package\ fr.ifremer.isisfish.simulator;import\ java.util.ArrayList;import\ java.util.HashMap;import\ java.util.List;import\ java.util.Map;import\ org.apache.commons.collections.MapIterator;import\ org.apache.commons.collections.keyvalue.MultiKey;import\ org.apache.commons.collections.map.MultiKeyMap;import\ org.apache.commons.logging.Log;import\ org.apache.commons.logging.LogFactory;import\ org.codelutin.math.matrix.MatrixFactory;import\ org.codelutin.math.matrix.MatrixIterator;import\ org.codelutin.math.matrix.MatrixND;import\ fr.ifremer.isisfish.entities.Population;import\ fr.ifremer.isisfish.entities.PopulationGroup;import\ fr.ifremer.isisfish.entities.PopulationSeasonInfo;import\ fr.ifremer.isisfish.entities.Species;import\ fr.ifremer.isisfish.entities.Zone;import\ fr.ifremer.isisfish.types.Date;import\ fr.ifremer.isisfish.types.Month;/**\ *\ \ *\ @author\ poussin\ */public\ class\ PopulationMonitor\ {\ \ \ \ \ \ \ \ /**\ to\ use\ log\ facility,\ just\ put\ in\ your\ code\:\ log.info(\\"...\\=
-\ levels\ +\ "";\ \ \ \ \ \ \ \ LevelsLineReader\ reader\ =
-\ levelsReader;\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ if\ (reader\ =
-\ logFile;\ \ \ \ \ \ \ \ this.simulationFile\ =
-\ model.getFirstLinePosition()\ +\ unitsToScroll;\ \ \ \ \ \ \ \ if\ (unitsToScroll\ >\ 0)\ {\ \ \ \ \ \ \ \ \ \ \ \ if\ (model.isEOF())\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ nothing\ to\ do\ we\ are\ already\ at\ the\ tail\ of\ the\ stream\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ return;\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ else\ {\ \ \ \ \ \ \ \ \ \ \ \ if\ (model.isBOF())\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ nothing\ to\ do\ we\ are\ already\ at\ the\ head\ of\ the\ stream\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ return;\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ try\ {\ \ \ \ \ \ \ \ \ \ \ \ dontAdjust\ =
-\ module.getClazz().getMethod("checkout",String.class);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ method.invoke(module.getClazz(),category);\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ catch\ (Exception\ eee)\ {\ \ \ \ \ \ \ \ \ \ \ \ log.warn(org.codelutin.i18n.I18n._("isisfish.error.checkout.module",\ f.getAbsolutePath()),\ eee);\ \ \ \ \ \ \ \ }\ \ \ \ }\ \ \ \ public\ static\ void\ doCheckoutRegion(VCSHandler\ handler,\ \ String\ category,boolean\ create)\ {\ \ \ \ \ \ \ \ IsisConfig.Module\ module\ =
-\ new\ DefaultComboBoxModel(value.toArray());\ \ \ \ \ \ \ \ getSimulation().setModel(model);\ \ \ \ \ \ \ \ getSimulation().setSelectedItem(null);\ \ \ \ }\ \ \ \ public\ void\ on_Resultat_destroy_event(){\ \ \ \ \ \ \ \ dispose();\ \ \ \ }\ \ \ \ public\ void\ on_simulation_selection_notify_event(ItemEvent\ e){\ \ \ \ \ \ \ \ //\tsetSelectedSimulation((Simulation)getSimulation().getSelectedItem());\ \ \ \ }\ \ \ \ /**\ \ \ \ *\ Get\ the\ value\ of\ selectedSimulation.\ \ \ \ *\ @return\ value\ of\ selectedSimulation.\ \ \ \ */\ \ \ \ //\ \ \ \ public\ Simulation\ getSelectedSimulation()\ {\ \ \ \ \ \ \ \ //return\ selectedSimulation;\ \ \ \ //}\ \ \ \ /**\ \ \ \ *\ Set\ the\ value\ of\ selectedSimulation.\ \ \ \ *\ @param\ v\ \ Value\ to\ assign\ to\ selectedSimulation.\ \ \ \ */\ \ \ \ //public\ void\ setSelectedSimulation(Simulation\ v)\ {\ \ \ \ \ \ \ \ //this.selectedSimulation\ =
-\ new\ File(module.getDirectory(),category);\ \ \ \ \ \ \ \ \ \ \ \ try\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ (\!f.exists()||\ \!VCSHelper.isFileInWorkingCopy(f,\ handler,true))\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ fr.ifremer.isisfish.datastore.RegionStorage.checkout(\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ handler.getLocalDatabasePath(),\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ module.value()\ +\ "/"\ +category\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ );\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ }\ catch\ (Exception\ eee)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ log.warn(org.codelutin.i18n.I18n._("isisfish.error.checkout.module",\ f.getAbsolutePath()),\ eee);\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ }}/*\ *\#\#%*\ Copyright\ (C)\ 2002,\ 2003,\ 2004,\ 2005,\ 2006,\ 2007\ Code\ Lutin,*\ Benjamin\ Poussin,\ Tony\ Chemit***\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or*\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License*\ as\ published\ by\ the\ Free\ Software\ Foundation;\ either\ version\ 2*\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.**\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,*\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of*\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the*\ GNU\ General\ Public\ License\ for\ more\ details.**\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License*\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software*\ Foundation,\ Inc.,\ 59\ Temple\ Place\ -\ Suite\ 330,\ Boston,\ MA\ \ 02111-1307,\ USA.*\#\#%*/package\ fr.ifremer.isisfish.versionning.vcsSvn;import\ fr.ifremer.isisfish.versionning.IsisVcsConfig;import\ static\ org.codelutin.i18n.I18n._;import\ org.codelutin.vcs.AbstractVCSHandler;import\ org.codelutin.vcs.VCSConfig;import\ org.codelutin.vcs.VCSException;import\ org.codelutin.vcs.VCSHelper;import\ static\ org.codelutin.vcs.VCSHelper.isFileInCheckedDir;import\ org.codelutin.vcs.VCSRuntimeException;import\ org.codelutin.vcs.VCSState;import\ static\ org.codelutin.vcs.VCSState.OUT_OF_DATE;import\ static\ org.codelutin.vcs.VCSState.OUT_OF_DATE_AND_MODIFIED;import\ static\ org.codelutin.vcs.VCSState.UP_TO_DATE;import\ org.codelutin.vcs.VCSStatus;import\ org.tmatesoft.svn.core.ISVNDirEntryHandler;import\ org.tmatesoft.svn.core.ISVNLogEntryHandler;import\ org.tmatesoft.svn.core.SVNCommitInfo;import\ org.tmatesoft.svn.core.SVNDirEntry;import\ org.tmatesoft.svn.core.SVNException;import\ org.tmatesoft.svn.core.SVNLogEntry;import\ org.tmatesoft.svn.core.SVNNodeKind;import\ org.tmatesoft.svn.core.SVNURL;import\ org.tmatesoft.svn.core.io.SVNRepository;import\ org.tmatesoft.svn.core.wc.ISVNOptions;import\ org.tmatesoft.svn.core.wc.SVNClientManager;import\ org.tmatesoft.svn.core.wc.SVNRevision;import\ org.tmatesoft.svn.core.wc.SVNStatus;import\ org.tmatesoft.svn.core.wc.SVNStatusType;import\ static\ org.tmatesoft.svn.core.wc.SVNStatusType.*;import\ org.tmatesoft.svn.core.wc.SVNWCClient;import\ org.tmatesoft.svn.core.wc.SVNWCUtil;import\ java.io.ByteArrayOutputStream;import\ java.io.File;import\ java.io.IOException;import\ java.util.ArrayList;import\ java.util.Arrays;import\ java.util.Collection;import\ java.util.Collections;import\ java.util.Iterator;import\ java.util.List;/**\ *\ VCSHandler\ implementation\ for\ svn\ *\ *\ @author\ chemit\ */public\ final\ class\ SVNHandler\ extends\ AbstractVCSHandler\ {\ \ \ \ protected\ SVNURL\ repositoryURL;\ \ \ \ protected\ SVNRepository\ repository;\ \ \ \ protected\ SVNClientManager\ ourClientManager;\ \ \ \ protected\ SVNWCClient\ ourWcClient;\ \ \ \ public\ SVNHandler(VCSConfig\ config)\ {\ \ \ \ \ \ \ \ super(config,\ ".svn",\ "entries=
-\ new\ File(module.getDirectory(),category);\ \ \ \ \ \ \ \ try\ {\ \ \ \ \ \ \ \ \ \ \ \ if\ (\!f.exists()||\ \!VCSHelper.isFileInWorkingCopy(f,\ handler,true))\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Method\ method\ =
-\ new\ File(readerDirectory,\ "offsets_"\ +\ levels);\ \ \ \ \ \ \ \ \ \ \ \ FileOffsetReader\ offsetReader\ =
-\ new\ FileOffsetReader(offsetFile);\ \ \ \ \ \ \ \ \ \ \ \ if\ (levels\ =
-\ new\ LevelsLineReader(getLevelReader(0),\ offsetReader,\ logLevels);\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ reader.setId(levelsStr);\ \ \ \ \ \ \ \ \ \ \ \ levelsReaders.add(reader);\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ if\ (\!reader.isOpen())\ {\ \ \ \ \ \ \ \ \ \ \ \ //\ open\ reader\ \ \ \ \ \ \ \ \ \ \ \ reader.open();\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ log.info(reader);\ \ \ \ \ \ \ \ return\ reader;\ \ \ \ }\ \ \ \ protected\ void\ openReader(LineReader\ reader)\ throws\ IOException\ {\ \ \ \ \ \ \ \ this.reader\ =
-\ new\ LevelsLineReader(model.getLogFile(),\ offsetReader);\ \ \ \ \ \ \ \ \ \ \ \ }\ else\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ other\ level\ readers\ depens\ on\ all\ levels\ reader\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ LogLevel[]\ logLevels\ =
-\ new\ LogMail(\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ statusBar,\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ model.getFrom(),\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ model.getLogFile(),\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ model.getLogFile().getParentFile(),\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ model.getSmtpServer());\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ logMail.setVisible(true);\ \ \ \ }}/**\ \#\#%\ Copyright\ (C)\ 2002,\ 2003,\ 2004,\ 2005,\ 2006,\ 2007\ Code\ Lutin,*\ Benjamin\ Poussin,\ Tony\ Chemit***\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or*\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License*\ as\ published\ by\ the\ Free\ Software\ Foundation;\ either\ version\ 2*\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.**\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,*\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of*\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the*\ GNU\ General\ Public\ License\ for\ more\ details.**\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License*\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software*\ Foundation,\ Inc.,\ 59\ Temple\ Place\ -\ Suite\ 330,\ Boston,\ MA\ \ 02111-1307,\ USA.*\ \#\#%\ */package\ fr.ifremer.isisfish.logging.console;import\ javax.swing.event.ChangeEvent;import\ javax.swing.event.ChangeListener;import\ javax.swing.event.EventListenerList;import\ java.io.File;import\ java.util.ArrayList;import\ java.util.List;/**\ *\ This\ class\ is\ the\ model\ used\ in\ LogConsole.\ *\ <p/>\ *\ The\ model\ deals\ with\ ChangeEvent\ to\ notify\ ui,\ model\ has\ changed.\ *\ *\ @author\ chemit\ */public\ class\ LogConsoleModel\ {\ \ \ \ /**\ to\ use\ log\ facility,\ just\ put\ in\ your\ code\:\ log.info(\\"...\\=
-\ new\ MimeMessage(session);\ \ \ \ \ \ \ \ //\ --\ Set\ the\ FROM\ and\ TO\ fields\ --\ \ \ \ \ \ \ \ msg.setFrom(new\ InternetAddress(from));\ \ \ \ \ \ \ \ msg.setRecipients(Message.RecipientType.TO,\ InternetAddress.parse(to,\ false));\ \ \ \ \ \ \ \ MimeMultipart\ bodyMime\ =
-\ new\ MimeMultipart("mixed=
-\ new\ PatternLineReader(parent,\ new\ MemoryOffsetReader(5000),\ searchText,\ 0);\ \ \ \ \ \ \ \ reader.setId(parent.getId()\ +\ "\:"\ +\ searchText);\ \ \ \ \ \ \ \ log.info(reader);\ \ \ \ \ \ \ \ return\ reader;\ \ \ \ }\ \ \ \ //TODO\ Improve\ algorithm\ \:\ always\ try\ to\ find\ the\ closest\ reader\ to\ use\ \ \ \ protected\ LineReader\ getLevelReader(int\ levels)\ throws\ IOException\ {\ \ \ \ \ \ \ \ String\ levelsStr\ =
-\ new\ ResultEdit(simulation);\ \ \ \ \ \ \ \ \ \ \ \ JInternalFrame\ intFrame\ =
-\ null\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ &&\ parameters.getExportNames().size()\ >\ 0)\ {\ \ \ \ \ \ \ \ \ \ \ \ File\ exportDir\ =
-\ null\ &&\ reader.isOpen())\ {\ \ \ \ \ \ \ \ \ \ \ \ try\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ reader.close();\ \ \ \ \ \ \ \ \ \ \ \ }\ catch\ (IOException\ e)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ log.warn(I18n._("could\ not\ close\ reader\ {0}",\ reader));\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ @Override\ \ \ \ protected\ void\ finalize()\ throws\ Throwable\ {\ \ \ \ \ \ \ \ super.finalize();\ \ \ \ \ \ \ \ close();\ \ \ \ }\ \ \ \ /**\ \ \ \ \ *\ read\ the\ required\ frame\ from\ current\ reader\ \ \ \ \ *\ \ \ \ \ *\ @param\ offset\ the\ offset\ to\ use\ \ \ \ \ *\ @throws\ IOException\ if\ any\ problem\ while\ reading\ \ \ \ \ */\ \ \ \ public\ void\ read(long\ offset)\ throws\ IOException\ {\ \ \ \ \ \ \ \ if\ (offset\ <\ 0)\ {\ \ \ \ \ \ \ \ \ \ \ \ offset\ =
-\ null)\ try\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ reader.close();\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\ catch\ (IOException\ e)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //TODO\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ }\ \ \ \ public\ Properties\ getData()\ {\ \ \ \ \ \ \ \ return\ data;\ \ \ \ }\ \ \ \ public\ String\ getName()\ {\ \ \ \ \ \ \ \ return\ name;\ \ \ \ }}/*\ *\#\#%\ *\ Copyright\ (C)\ 2006\ *\ \ \ \ \ Ifremer,\ Code\ Lutin,\ C\uFFFDdric\ Pineau,\ Benjamin\ Poussin\ *\ *\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or\ *\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License\ *\ as\ published\ by\ the\ Free\ Software\ Foundation;\ either\ version\ 2\ *\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.\ *\ *\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,\ *\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of\ *\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the\ *\ GNU\ General\ Public\ License\ for\ more\ details.\ *\ *\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License\ *\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software\ *\ Foundation,\ Inc.,\ 59\ Temple\ Place\ -\ Suite\ 330,\ Boston,\ MA\ \ 02111-1307,\ USA.\ *\#\#%*//*\ *\ *\ SimulationQueueModel.java\ *\ *\ Created\:\ 18\ ao\uFFFDt\ 2006\ 00\:05\:41\ *\ *\ @author\ poussin\ *\ @version\ $Revision\:\ 602\ $\ *\ *\ Last\ update\:\ $Date\:\ 2007-11-01\ 21\:39\:12\ +0100\ (jeu,\ 01\ nov\ 2007)\ $\ *\ by\ \:\ $Author\:\ tchemit\ $\ */package\ fr.ifremer.isisfish.simulator;/**\ @author\ poussin\ */public\ class\ SimulationQueueModel\ extends\ AbstractSimulationQueueModel\ {\ \ \ \ /*\ (non-Javadoc)\ \ \ \ \ *\ @see\ AbstractSimulationQueueModel()\ \ \ \ \ */\ \ \ \ public\ SimulationQueueModel()\ {\ \ \ \ \ \ \ \ super();\ \ \ \ }\ \ \ \ /*\ (non-Javadoc)\ \ \ \ \ *\ @see\ AbstractSimulationQueueModel(SimulationManager)\ \ \ \ \ */\ \ \ \ public\ SimulationQueueModel(SimulationManager\ queue)\ {\ \ \ \ \ \ \ \ super(queue);\ \ \ \ }\ \ \ \ /*\ (non-Javadoc)\ \ \ \ \ *\ @see\ AbstractSimulationQueueModel at getSimulationIds()\ \ \ \ \ */\ \ \ \ protected\ java.util.List<String>\ getSimulationIds()\ {\ \ \ \ \ \ \ \ return\ getQueue().ids;\ \ \ \ }\ \ \ \ /*\ (non-Javadoc)\ \ \ \ \ *\ @see\ AbstractSimulationQueueModel at getQueueItemsAsMap()\ \ \ \ \ */\ \ \ \ protected\ java.util.Map<String,\ SimulationManager.QueueItem>\ getQueueItemsAsMap()\ {\ \ \ \ \ \ \ \ return\ getQueue().map;\ \ \ \ }\ \ \ \ /*\ (non-Javadoc)\ \ \ \ \ *\ @see\ SimulationQueueListener\#simulationAdded(fr.ifremer.isisfish.simulator.SimulationQueueEvent)\ \ \ \ \ */\ \ \ \ public\ void\ simulationAdded(SimulationQueueEvent\ e)\ {\ \ \ \ \ \ \ \ int\ row\ =
-\ null)\ {\ \ \ \ \ \ \ \ \ \ \ \ File\ offsetFile\ =
-\ null)\ {\ \ \ \ \ \ \ \ \ \ \ \ control.removePropertyChangeListener(this);\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ int\ row\ =
-\ null){\ \ \ \ \ \ \ \ \ \ \ \ SimulationStorage\ simulation\ =
-\ null){\ \ \ \ \ \ \ \ \ \ \ \ SimulationStorage\ storage\ =
-\ null;\ \ \ \ \ \ \ \ for\ (LineReaderUtil.LevelsLineReader\ levelsReader\ \:\ levelsReaders)\ {\ \ \ \ \ \ \ \ \ \ \ \ if\ (levelsReader.getId().equals(levelsStr))\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ reader\ =
-\ reader.readLine(offset,\ model.nbLinesInEditor);\ \ \ \ \ \ \ \ //\ mark\ the\ new\ first\ position\ \ \ \ \ \ \ \ model.setFirstLinePosition(offset);\ \ \ \ \ \ \ \ //\ add\ lines\ in\ model\ \ \ \ \ \ \ \ model.allItems.clear();\ \ \ \ \ \ \ \ model.allItems.addAll(Arrays.asList(result));\ \ \ \ \ \ \ \ //\ notify\ ui\ that\ model\ changed\ \ \ \ \ \ \ \ model.fireStateChanged();\ \ \ \ }\ \ \ \ public\ void\ mouseWheelMoved(MouseWheelEvent\ e)\ {\ \ \ \ \ \ \ \ int\ unitsToScroll\ =
-\ reader;\ \ \ \ \ \ \ \ if\ (\!this.reader.isOpen())\ {\ \ \ \ \ \ \ \ \ \ \ \ //\ open\ reader\ \ \ \ \ \ \ \ \ \ \ \ this.reader.open();\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ //\ save\ the\ number\ of\ lines\ of\ reader\ in\ model\ \ \ \ \ \ \ \ model.nbLines\ =
-\ simulation.getDirectory();\ \ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ //\ Export\ des\ r\uFFFDsultats\ \ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ if\ (parameters.getExportNames()\ \!=
-\ simulation.getParameter();\ \ \ \ \ \ \ \ File\ rootDirectory\ =
-\ simulationFile;\ \ \ \ \ \ \ \ this.smtpServer\ =
-\ smtpServer;\ \ \ \ \ \ \ \ this.statusBar\ =
-\ statusBar;\ \ \ \ \ \ \ \ sendMail.addActionListener(new\ ActionListener()\ {\ \ \ \ \ \ \ \ \ \ \ \ public\ void\ actionPerformed(ActionEvent\ e)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ try\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ sendMail(mailTo.getText(),\ content.getText(),\ sendAll.isSelected());\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ statusBar.setStatus(_("isisfish.log.mail.send"\ ,\ to));\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\ catch\ (Exception\ eee)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ statusBar.setStatus(_("isisfish.log.mail.failed",\ smtpServer));\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\ finally\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ dispose();\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ });\ \ \ \ }\ \ \ \ public\ void\ setTo(String\ to)\ {\ \ \ \ \ \ \ \ this.to\ =
-\ statusBar;\ \ \ \ }\ \ \ \ public\ void\ openLogMail()\ {\ \ \ \ \ \ \ \ if\ (logMail=
-\ this.reader.getNbLines();\ \ \ \ }\ \ \ \ public\ void\ addPropertyChangeListener(PropertyChangeListener\ listener)\ {\ \ \ \ \ \ \ \ propertyListeners.addPropertyChangeListener(listener);\ \ \ \ }\ \ \ \ public\ void\ addPropertyChangeListener(String\ propertyName,\ PropertyChangeListener\ listener)\ {\ \ \ \ \ \ \ \ propertyListeners.addPropertyChangeListener(propertyName,\ listener);\ \ \ \ }\ \ \ \ public\ void\ removePropertyChangeListener(PropertyChangeListener\ listener)\ {\ \ \ \ \ \ \ \ propertyListeners.removePropertyChangeListener(listener);\ \ \ \ }\ \ \ \ public\ void\ removePropertyChangeListener(String\ propertyName,\ PropertyChangeListener\ listener)\ {\ \ \ \ \ \ \ \ propertyListeners.removePropertyChangeListener(propertyName,\ listener);\ \ \ \ }\ \ \ \ public\ StatusBar\ getStatusBar()\ {\ \ \ \ \ \ \ \ return\ statusBar;\ \ \ \ }\ \ \ \ public\ void\ setStatusBar(StatusBar\ statusBar)\ {\ \ \ \ \ \ \ \ this.statusBar\ =
-\ to;\ \ \ \ }\ \ \ \ /**\ \ \ \ \ *\ Send\ an\ email\ using\ the\ given\ informations\ (stmpServer,\ toAddress,\ \ \ \ \ *\ fromAddress,\ subject\ and\ body).\ \ \ \ \ *\ \ \ \ \ *\ @param\ to\ \ \ \ \ \ \ adr\ to\ send\ the\ mail\ \ \ \ \ *\ @param\ text\ \ \ \ \ message\ text\ \ \ \ \ *\ @param\ selected\ if\ <code>true</code>\ send\ all\ simulation\ zip,\ \ \ \ \ *\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ or\ just\ the\ file\ \ \ \ \ *\ @throws\ java.io.IOException\ \ \ \ \ \ \ \ \ \ \ if\ any\ problem\ while\ creatingthe\ zip\ \ \ \ \ *\ @throws\ javax.mail.MessagingException\ if\ any\ problem\ while\ creating\ \ \ \ \ *\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ the\ message\ or\ while\ the\ send\ \ \ \ \ */\ \ \ \ public\ void\ sendMail(String\ to,\ String\ text,\ boolean\ selected)\ throws\ IOException,\ MessagingException\ {\ \ \ \ \ \ \ \ Properties\ props\ =
-\ true;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ read(e.getValue());\ \ \ \ \ \ \ \ \ \ \ \ }\ catch\ (IOException\ e1)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ log.warn(I18n._("could\ not\ read\ at\ offset\ {0}\ for\ reason\ {1}",\ e.getValue(),\ e1.getMessage()));\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ dontAdjust\ =
-\ true;\ \ \ \ \ \ \ \ \ \ \ \ read(newOffset);\ \ \ \ \ \ \ \ }\ catch\ (IOException\ e1)\ {\ \ \ \ \ \ \ \ \ \ \ \ log.warn(I18n._("could\ not\ read\ at\ offset\ {0}\ for\ reason\ {1}",\ newOffset,\ e1.getMessage()));\ \ \ \ \ \ \ \ }\ \ \ \ }\ \ \ \ public\ void\ adjustmentValueChanged(AdjustmentEvent\ e)\ {\ \ \ \ \ \ \ \ if\ (\!e.getValueIsAdjusting()\ &&\ \!dontAdjust)\ {\ \ \ \ \ \ \ \ \ \ \ \ try\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //TODO\ Fix\ bug\ \:sometimes\ when\ going\ at\ tail,\ it\ goes\ head\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //TODO\ (the\ offset\ must\ not\ be\ good...)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //log.info("value\:"+e.getValue());\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ dontAdjust\ =
-\ v;\ \ \ \ //}\ \ \ \ public\ void\ on_supprimerSimulationButton_clicked(){\ \ \ \ \ \ \ \ String\ name\ =
-Checkout\ pom.xml\ to\ {0}",\ file.getPath()));\ \ \ \ \ \ \ \ vcsHandler.update(file);\ \ \ \ \ \ \ \ getContext().setQuit(true);\ \ \ \ }}\ /*\ *\ \#\#%\ Copyright\ (C)\ 2002,\ 2003,\ 2004,\ 2005,\ 2006,\ 2007\ Code\ Lutin,*\ Benjamin\ Poussin,\ Tony\ Chemit***\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or*\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License*\ as\ published\ by\ the\ Free\ Software\ Foundation;\ either\ version\ 2*\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.**\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,*\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of*\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the*\ GNU\ General\ Public\ License\ for\ more\ details.**\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License*\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software*\ Foundation,\ Inc.,\ 59\ Temple\ Place\ -\ Suite\ 330,\ Boston,\ MA\ \ 02111-1307,\ USA.*\ \#\#%\ */package\ fr.ifremer.isisfish.commandline.actions;import\ fr.ifremer.isisfish.IsisConfig;import\ fr.ifremer.isisfish.datastore.AnalysePlanStorage;import\ fr.ifremer.isisfish.datastore.ExportStorage;import\ fr.ifremer.isisfish.datastore.FormuleStorage;import\ fr.ifremer.isisfish.datastore.RuleStorage;import\ fr.ifremer.isisfish.datastore.ScriptStorage;import\ fr.ifremer.isisfish.datastore.SimulatorStorage;import\ java.io.File;import\ java.util.ArrayList;import\ java.util.List;import\ java.util.regex.Pattern;/**\ *\ The\ class\ to\ define\ all\ actions\ on\ scripts\ or\ data\ (region,\ simulations)\ \ that\ *\ IsisFish\ can\ launch\ at\ init\ time.\ *\ *\ @author\ chemit\ */public\ class\ ScriptUtil\ {\ \ \ \ /**\ \ \ \ \ *\ Pour\ v\uFFFDrifier\ q'un\ fichier\ existe.\ \ \ \ \ *\ \ \ \ \ *\ @param\ file\ \ the\ file\ dont\ on\ doit\ v\uFFFDrifier\ l'existence\ \ \ \ \ *\ @param\ force\ flag\ pour\ d\uFFFDclancher\ une\ exception,\ si\ fichier\ non\ trouv\uFFFD.\ \ \ \ \ */\ \ \ \ public\ static\ void\ checkNotFileExist(File\ file,\ boolean\ force)\ {\ \ \ \ \ \ \ \ if\ (file.exists()\ &&\ \!force)\ {\ \ \ \ \ \ \ \ \ \ \ \ //\ fatal\ error\ \ \ \ \ \ \ \ \ \ \ \ throw\ new\ IllegalArgumentException("destination\ already\ exists\ "\ +\ file\ +\ "\ use\ \\'force\\'\ argument\ to\ force\ overwrite=
+Can't\ add\ result\ '%1$s'\ at\ date\ %2$s=Can't add result '%1$s' at date %2$s
+Can't\ evaluate\ simulation\ prescript=Can't evaluate simulation prescript
+Can't\ get\ result\:\ %1$s=Can't get result\: %1$s
+Can't\ create\ simulation\ logger=Can't create simulation logger
+Can't\ instanciate\ export\ %1$s=Can't instanciate export %1$s
+Checkout\ pom.xml\ to\ %1$s=
Info=Info
-could\ not\ close\ reader\ {0}",\ levelsReader));\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ if\ (reader\ \!=
-could\ not\ create\ simulation\ filter\ model\ for\ reason\ {0}",e.getMessage()),e);\ \ \ \ \ \ \ \ }\ \ \ \ }\ \ \ \ private\ void\ initSimulation()\ throws\ IOException,\ ParseException\ {\ \ \ \ \ \ \ \ //\ keep\ in\ context\ list\ of\ old\ simulation\ names\ (for\ filter\ process)\ \ \ \ \ \ \ \ java.util.List<String>\ value\ =
-filter\ loaded\ in\ {0}\ ms\ \:\ found\ {1}\ lines.",\ (System.currentTimeMillis()\ -\ t0),\ reader.getNbLines()));\ \ \ \ \ \ \ \ }\ catch\ (IOException\ e)\ {\ \ \ \ \ \ \ \ \ \ \ \ log.warn("could\ not\ open\ reader\ ["\ +\ this.reader\ +\ "]\ for\ reason\ "\ +\ e.getMessage());\ \ \ \ \ \ \ \ }\ \ \ \ }\ \ \ \ protected\ LineReader\ getPatternReader(String\ searchText,\ LineReader\ parent)\ {\ \ \ \ \ \ \ \ LineReader\ reader;\ \ \ \ \ \ \ \ reader\ =
+Region\ %1$s\ allready\ exist\ in\ repository.\ Can't\ import=
+could\ not\ close\ reader\ %1$s=could not close reader %1$s
+could\ not\ create\ simulation\ filter\ model\ for\ reason\ %1$s=could not create simulation filter model for reason %1$s
+could\ not\ filter\ on\ simulations=could not filter on simulations
+could\ not\ found\ log\ file\ %1$s=could not found log file %1$s
+could\ not\ read\ at\ offset\ %1$s\ for\ reason\ %2$s=could not read at offset %1$s for reason %2$s
+filter\ loaded\ in\ %1$s\ ms\ \:\ found\ %2$s\ lines.=filter loaded in %1$s ms \: found %2$s lines.
isisfish.about.site=site
isisfish.about.text=text
isisfish.about.title=title
@@ -85,12 +24,14 @@
isisfish.advancedParams.simulationCache=cache simulation
isisfish.advancedParams.simulationStatistique=static simulation
isisfish.advancedParams.simulatorUse=simulator to Use
+isisfish.advancedParams.subProcessSimulation=
isisfish.cell.comments=comments
isisfish.cell.land=land
isisfish.cell.latitude=latitude
isisfish.cell.longitude=longitude
isisfish.cell.name=name
isisfish.cell.title=title
+isisfish.change.equation=Can't change equation
isisfish.common.add=add
isisfish.common.add.short=add short
isisfish.common.addQueue=addQueue
@@ -107,14 +48,17 @@
isisfish.common.emigration=emigration
isisfish.common.empty=vide
isisfish.common.error=error
+isisfish.common.file=File
isisfish.common.finish=finish
isisfish.common.gear=gear
isisfish.common.immigration=immigration
isisfish.common.info=info
isisfish.common.migration=migration
+isisfish.common.month=month %1$s
isisfish.common.new=new
isisfish.common.newMatrix=new Matrix
isisfish.common.next=next
+isisfish.common.no=No
isisfish.common.ok=ok
isisfish.common.openEditor=openEditor
isisfish.common.populationGroup=populationGroup
@@ -141,6 +85,73 @@
isisfish.common.warn=warn
isisfish.common.year=annee
isisfish.common.zone=zone
+isisfish.config.h2.description=
+isisfish.config.h2.h2BytecodeProvider.description=
+isisfish.config.h2.h2CurrentSessionContextClass.description=
+isisfish.config.h2.h2Dialect.description=
+isisfish.config.h2.h2Driver.description=
+isisfish.config.h2.h2MemBytecodeProvider.description=
+isisfish.config.h2.h2MemDialect.description=
+isisfish.config.h2.h2MemDriver.description=
+isisfish.config.h2.h2MemPass.description=
+isisfish.config.h2.h2MemType.description=
+isisfish.config.h2.h2MemURL.description=
+isisfish.config.h2.h2MemUser.description=
+isisfish.config.h2.h2Pass.description=
+isisfish.config.h2.h2Type.description=
+isisfish.config.h2.h2URL.description=
+isisfish.config.h2.h2User.description=
+isisfish.config.h2.migrationApplicationVersion.description=
+isisfish.config.h2.migrationCallBackhandlers.description=
+isisfish.config.h2.migrationModelNames.description=
+isisfish.config.h2.migrationPreviousMappingDirectory.description=
+isisfish.config.h2.migrationTopiaService.description=
+isisfish.config.h2.storageData.description=
+isisfish.config.h2.updateschemaDatabase.description=
+isisfish.config.main.compileDirectory.description=
+isisfish.config.main.configFileName.description=
+isisfish.config.main.dataBackupFilename.description=
+isisfish.config.main.defaultBackupDirectory.description=
+isisfish.config.main.defaultExportDirectory.description=
+isisfish.config.main.defaultExportNames.description=
+isisfish.config.main.defaultMapFile.description=
+isisfish.config.main.defaultResultNames.description=
+isisfish.config.main.defaultSimulator.description=
+isisfish.config.main.defaultTagValue.description=
+isisfish.config.main.description=
+isisfish.config.main.encoding.description=encoding used on system
+isisfish.config.main.javadocURL.description=
+isisfish.config.main.localSimulator.description=
+isisfish.config.main.locale.description=user locale
+isisfish.config.main.login.description=
+isisfish.config.main.password.description=
+isisfish.config.main.projectName.description=name of project
+isisfish.config.main.regionMap.description=
+isisfish.config.main.resultExport.description=
+isisfish.config.main.simulationInformationFilename.description=
+isisfish.config.main.simulationParametersFilename.description=
+isisfish.config.main.simulationReportMail.description=
+isisfish.config.main.simulationResultXmlFilename.description=
+isisfish.config.main.simulationServer.description=
+isisfish.config.main.simulationShowOnlyError.description=
+isisfish.config.main.simulationShowOnlyQueue.description=
+isisfish.config.main.smtpServer.description=
+isisfish.config.main.userMail.description=
+isisfish.config.main.userName.description=
+isisfish.config.main.version.description=
+isisfish.config.vcs.databaseVersion.description=
+isisfish.config.vcs.description=
+isisfish.config.vcs.hostName.description=
+isisfish.config.vcs.keyFile.description=
+isisfish.config.vcs.localDatabasePath.description=
+isisfish.config.vcs.noPassPhrase.description=
+isisfish.config.vcs.passphrase.description=
+isisfish.config.vcs.remoteDatabase.description=
+isisfish.config.vcs.remotePath.description=
+isisfish.config.vcs.type.description=
+isisfish.config.vcs.typeRepo.description=
+isisfish.config.vcs.useSshConnexion.description=
+isisfish.config.vcs.userName.description=
isisfish.dataResult.descriptionLabel=defaultToolTip-fr.ifremer.resultat.DataResult.descriptionLabel
isisfish.dataResult.export.csv=Export to CSV
isisfish.dataResult.exportButton=defaultToolTip-fr.ifremer.resultat.DataResult.exportButton
@@ -148,6 +159,7 @@
isisfish.dataResult.matriceTable=defaultToolTip-fr.ifremer.resultat.DataResult.matriceTable
isisfish.dataResult.scrolledwindow2=defaultToolTip-fr.ifremer.resultat.DataResult.scrolledwindow2
isisfish.dataResult.table2=defaultToolTip-fr.ifremer.resultat.DataResult.table2
+isisfish.date.toString=%1$s %2$s
isisfish.effortDescription.crewFoodCost=isisfish.effortDescription.crewFoodCost
isisfish.effortDescription.crewShareRate=isisfish.effortDescription.crewShareRate
isisfish.effortDescription.crewSize=isisfish.effortDescription.crewSize
@@ -159,14 +171,31 @@
isisfish.effortDescription.otherRunningCost=isisfish.effortDescription.otherRunningCost
isisfish.effortDescription.repairAndMaintenanceGearCost=isisfish.effortDescription.repairAndMaintenanceGearCost
isisfish.effortDescription.title=isisfish.effortDescription.title
+isisfish.effortDescription.toString=EffortDescription for %1$s with %2$s
isisfish.effortDescription.unitCostOfFishing=isisfish.effortDescription.unitCostOfFishing
isisfish.equation.editor.title=Equation Editor
+isisfish.error.acceptable.population=New value isn't acceptable value for this population
isisfish.error.add.card=Error while adding of result to the map.
-isisfish.error.add.logger.simulation\ ",\ e));\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ try\ {\ \ \ \ \ \ \ \ \ \ \ \ simThread.start();\ \ \ \ \ \ \ \ \ \ \ \ try\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ simThread.join();\ \ \ \ \ \ \ \ \ \ \ \ }\ catch\ (InterruptedException\ eee)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ (log.isWarnEnabled())\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ log.warn(I18n._("isisfish.error.wait.simThread=
+isisfish.error.add.file=Can't add file %1$s
+isisfish.error.add.logger.simulation\ =isisfish.error.add.logger.simulation
isisfish.error.add.result.data=Error while adding result ot data.
isisfish.error.add.result.graph=Error while adding result to graph
-isisfish.error.checkout.module",\ module),\ eee);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ break;\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ }\ \ \ \ public\ static\ void\ doCheckoutModule(VCSHandler\ handler,\ IsisConfig.Module\ module,\ String\ category)\ {\ \ \ \ \ \ \ \ File\ f\ =
+isisfish.error.add.tray=Can't add system tray icon
+isisfish.error.change.classloader=Can't change classloader because can't create URL from file %1$s
+isisfish.error.change.equation=Can't change equation
+isisfish.error.check.region=Can't check region
+isisfish.error.checkout.module=Can't checkout module %1$s
+isisfish.error.commit.files=Can't commit files %1$s
+isisfish.error.compile.script=Can't compile script\: %1$s
+isisfish.error.compiled.parameter=Can't get rule parameter from compiled class
+isisfish.error.connect.server=Can't connect to server
isisfish.error.conversion.data=Erreur lors de la conversion du fichier de donn\u00E9es
+isisfish.error.create.equation=Can't create equation
+isisfish.error.delete.database=Can't delete database
+isisfish.error.delete.file=could not delete file %1$s
+isisfish.error.delete.vcs.files=Can't delete vcs files
+isisfish.error.during.simulation=Error during simulation
+isisfish.error.during.simulation.information.file=Could not save Error during simulation of %1$s in his information file
isisfish.error.emigration.negative=emigration negative
isisfish.error.empty.code.rubbin=rubbin's code is empty
isisfish.error.empty.emigration=emigration empty
@@ -184,31 +213,122 @@
isisfish.error.empty.unit=measure unit is empty
isisfish.error.emty.emigration=emigration empty
isisfish.error.emty.migration=Migration empty
+isisfish.error.equation.retun.number=EquationImpl must retun a number\: %1$s
+isisfish.error.evaluate.equation=Can't evaluate equation\: %1$s
+isisfish.error.evaluate.plan.script=Can't evaluate plan script
+isisfish.error.evaluate.preplan.script=Can't evaluate preplan script
+isisfish.error.evalute.plan.script=Can't evaluate plan script
+isisfish.error.export.scripts.force=The export file %1$s already exists, you MUST use option [force] pour force overwrite.
+isisfish.error.file.already.exists=The file %1$s already exist
+isisfish.error.get.fisheryRegion=Can't get FisheryRegion
+isisfish.error.get.information.file=Can't get information on file {0]
+isisfish.error.get.status.files=Can't get status files\: %1$s
+isisfish.error.growth.equation.before.create.group.population=Error, You must input growth equation before create the group population
isisfish.error.immigration.negative=immigration negative
isisfish.error.import.convertible=Erreur lors de l'import, la version du fichier que vous souhaitez importer n'est pas transformable en une version importable.
+isisfish.error.import.file=Can't import file %1$s
isisfish.error.import.recent.files=Erreur lors de l'import, la version du fichier que vous souhaitez importer est plus r\u00E9cente que la version souhait\u00E9e.
+isisfish.error.import.scripts.force=Some files already exist, you MUST use option [force] pour force overwrite.
isisfish.error.init.map=Can't init map.
+isisfish.error.init.remove.button=could not init remove button (button or list is null) button : %1$s, list : %2$s
+isisfish.error.instanciate=Can't instanciate %1$s
+isisfish.error.instanciate.export=Can't instanciate export %1$s
+isisfish.error.integer.positif=Your input must be a positif integer (>1)
+isisfish.error.invalid.category.name=The category's name %1$s is not valid.
+isisfish.error.invalid.configuration=Configuration is not full, could not launch IsisFish, try again ?
+isisfish.error.invalid.configuration.title=Error while loading IsisFish
isisfish.error.invalid.costs.fix=les co\u00FBts fixes sont invalides
+isisfish.error.invalid.distribution.recruitment=distribution de recrutement invalide
isisfish.error.invalid.equation=Equation invalid
+isisfish.error.invalid.equation.name=Invalid equation name
+isisfish.error.invalid.file.name=The script name %1$s is not valid.
isisfish.error.invalid.interval.reproduction.recruitment=interval entre la reproduction et le recrutement invalide
isisfish.error.invalid.mean.weight=poids moyen invalide
isisfish.error.invalid.natural.death=natural mortality on classes naissantes invalide
isisfish.error.invalid.number=the number is invalid
isisfish.error.invalid.range=La gamme possible n'a pas de valeur acceptable
+isisfish.error.invalid.simulation.id=Invalid simulation id %1$s, availables \: %2$s
+isisfish.error.invalid.simulation.index=Invalid simulation index %1$s
+isisfish.error.invalid.simulation.index.availables=Invalid simulation index %1$s, availables \: %2$s
isisfish.error.invalid.values.params=Parametre controlable hors valeurs possibles
isisfish.error.invalidate.natural.death=natural mortality invalid
-isisfish.error.load.file",\ file));\ \ \ \ \ \ \ \ \ \ \ \ }\ finally\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ (reader\ \!=
-isisfish.error.load.map",\ filename),\ eee);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ if(\!shapeLoaded){\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ a\ pas\ reussi\ a\ charger\ les\ fichiers\ demand\uFFFDs,\ on\ charge\ la\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ carte\ du\ monde\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ String\ filename\ =
+isisfish.error.invalide.simulation.index=Invalide simulation index
+isisfish.error.invoke.method=Can't invoke method '%1$s' for class %2$s
+isisfish.error.load.class=Can't load class\: %1$s
+isisfish.error.load.classloader=Can't create ClassLoader for script, bad directory\: %1$s for reason %2$s
+isisfish.error.load.file=could not load file %1$s
+isisfish.error.load.map=Can't load map file\: %1$s
+isisfish.error.log.closeAppender=could not close appender %1$s for category %2$s
+isisfish.error.log.console.dispose=Une erreur est survenue pendant la fermeture de la console %1$s de log, raison %2$s
+isisfish.error.log.createAppender=could not create appender [%1$s] \: %2$s for reason %3$s
+isisfish.error.log.foundAppender=\=could not found log appender %1$s for category %2$s
isisfish.error.matrix.more.2d=Matrice de plus de 2 dimensions\!\!\\nSelectionnez moins d'\u00E9l\u00E9ments ou utilisez l'op\u00E9rateur somme.
isisfish.error.migration.negative=Migration negative
-isisfish.error.no.matrix"\ +\ name));\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ resume.append("\\n\\n=
+isisfish.error.no.matrix=No matrix for\:
+isisfish.error.no.null.time.step=Error, the time step should not be null
isisfish.error.no.sector=No sector defined
+isisfish.error.no.select.simulation=could not select simulation
+isisfish.error.no.selected.simulation=No Simulation selected
+isisfish.error.no.target.species=no target species in %1$s for %2$s
isisfish.error.not.connected=Error \: not connected
+isisfish.error.not.find.status=could not find status for file %1$s for reason %2$s
+isisfish.error.not.found.class=this class does not
+isisfish.error.not.found.code=could not found codeclass for %1$s
+isisfish.error.not.found.description=could not found description for %1$s
+isisfish.error.not.found.field=could not found field %1$s doc for %1$s
+isisfish.error.not.found.field.class=could not found field %1$s for class %2$s
+isisfish.error.not.found.species.population.container=Can't find species (%1$s) for Population container
isisfish.error.not.null.class.grown=classe mature vaut nul
isisfish.error.not.null.mean.weight=poids moyen nul
isisfish.error.not.null.natiral.death=natural mortality null
isisfish.error.not.possible.metier=Pas de m\u00E9tier possible
+isisfish.error.not.species.node.population.container=Population container not in Species node
+isisfish.error.not.support.class=this class does not support
+isisfish.error.number.classes.upper.zero=Error, the number of classes must be upper than 0
+isisfish.error.obtain.analyseplan=Can't obtain description of AnalysePlan
+isisfish.error.obtain.doc.export=Can't obtain @Doc on class export
+isisfish.error.obtain.doc.resultName=Can't obtain @Doc on ResultName
+isisfish.error.obtain.doc.rule=Can't obtain description for a Rule class
+isisfish.error.obtain.field=Can't obtain field @Doc for Rule %1$s
+isisfish.error.obtain.field.analyseplan=Can't obtain field @Doc for AnalysePlan %1$s
+isisfish.error.obtain.information.file=could not obtain information file for simulation %1$s
+isisfish.error.out.memory=Out of memory try with more memory (option -mx)
isisfish.error.overlap.season=Cette saison chevauche une autre saison
+isisfish.error.parse.date=Can't parse date %1$s
+isisfish.error.parse.long=Can't parse long %1$s
+isisfish.error.plan.parameter=Can't get plan parameter from compiled class
+isisfish.error.prepare.data=Can't prepare data
+isisfish.error.prepare.information.simulation=Can't prepare information for simulation
+isisfish.error.read.simulation=Can't read simulation information %1$s
+isisfish.error.read.simulation.parameters=Can't read simulation parameters from file %1$s
+isisfish.error.region.already.exists=This region already exists
+isisfish.error.region.name.empty=Region name is empty
+isisfish.error.remove.directory=Can't remove directory %1$s
+isisfish.error.remove.file=Can't remove file %1$s
+isisfish.error.rename.region=Can't rename region to %1$s
+isisfish.error.save.checkSum.compilation=Can't save checkSum to compilation\: %1$s
+isisfish.error.save.region=Can't save region
+isisfish.error.save.script.compilation=Can't save script to compilation\: %1$s
+isisfish.error.save.simulation.parameters=Can't save simulation parameters in file %1$s
+isisfish.error.script.check=Can't check file %1$s for reason %2$s
+isisfish.error.script.commit=Can't commit file %1$s for reason %2$s
+isisfish.error.script.create=isisfish.error.script.create
+isisfish.error.script.delete=Can't delete file %1$s for reason %2$s
+isisfish.error.script.diff=Can't diff file %1$s for reason %2$s
+isisfish.error.script.evaluate=Can't evaluate file %1$s for reason %2$s
+isisfish.error.script.export=Can't export for reason %1$s
+isisfish.error.script.import=Can't import file for reason %1$s
+isisfish.error.script.load=Can't load file %1$s for reason %2$s
+isisfish.error.script.save=Can't save file %1$s for reason %2$s
+isisfish.error.script.update=Can't update file %1$s for reason %2$s
+isisfish.error.simulation.log.openAppender=could not open appender of simulation %1$s for reason %2$s
+isisfish.error.simulation.resultXml.close=Can't close simulation result XML for reason %1$s
+isisfish.error.simulation.resultXml.open=Can't open simulation result XML for reason %1$s
+isisfish.error.simulation.resultXml.write=Can't write simulation result XML for reason %1$s
+isisfish.error.source.parameter=Can't get parameter from source
+isisfish.error.start=Can't start
+isisfish.error.status.files=Can't get status files\: %1$s
+isisfish.error.strategy.order=Strategy %1$s don't have 12 StrategyMonthInfo but %2$s. Recreate them
isisfish.error.text=The follow error occur during action
isisfish.error.title=Error
isisfish.error.undefined.classes=No classes defined
@@ -224,8 +344,16 @@
isisfish.error.undefined.zone.population=No population's zone defined
isisfish.error.undefined.zone.recruitment=No recrutment's zone defined
isisfish.error.undefined.zone.reproduction=No reprodution's zone defined
-isisfish.error.while.simulation",\ infos.getException()));\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ control.setText(I18n._("isisfish.message.stop.with.error=
-isisfish.error.while.simulation",\ infos.getException()));\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ control.setText(I18n._("isisfish.message.stop.with.error",infos.getException()));\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ I\ don't\ known\ if\ you\ can\ come\ here\ with\ no\ previous\ simulation\ ?\ \ \ \ \ \ \ \ \ \ \ \ }\ catch\ (Exception\ e1)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ log.warn(I18n._("isisfish.error.obtain.information.file",\ e.getId()));\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ control.addPropertyChangeListener(this);\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ /*\ (non-Javadoc)\ \ \ \ \ *\ @see\ SimulationQueueListener\#simulationStart(fr.ifremer.isisfish.simulator.SimulationQueueEvent)\ \ \ \ \ */\ \ \ \ public\ void\ simulationStart(SimulationQueueEvent\ e)\ {\ \ \ \ \ \ \ \ //\ nothing\ to\ do\ \ \ \ }\ \ \ \ /*\ (non-Javadoc)\ \ \ \ *\ @see\ SimulationQueueListener\#simulationStop(fr.ifremer.isisfish.simulator.SimulationQueueEvent)\ \ \ \ */\ \ \ \ public\ void\ simulationStop(SimulationQueueEvent\ e)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ nothing\ to\ do\ \ \ \ }}//\ SimulationDoneQueueModel/*\ *\#\#%\ *\ Copyright\ (C)\ 2007\ *\ \ \ \ \ Ifremer,\ Code\ Lutin,\ C\uFFFDdric\ Pineau,\ Benjamin\ Poussin\ *\ *\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or\ *\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License\ *\ as\ published\ by\ the\ Free\ Software\ Foundation;\ either\ version\ 2\ *\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.\ *\ *\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,\ *\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of\ *\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the\ *\ GNU\ General\ Public\ License\ for\ more\ details.\ *\ *\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License\ *\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software\ *\ Foundation,\ Inc.,\ 59\ Temple\ Place\ -\ Suite\ 330,\ Boston,\ MA\ \ 02111-1307,\ USA.\ *\#\#%*//*\ *\ *\ SimulationResultGetter.java\ *\ *\ Created\:\ 13\ nov.\ 07\ 12\:00\:14\ *\ *\ @author\ poussin\ *\ @version\ $Revision\:\ 722\ $\ *\ *\ Last\ update\:\ $Date\:\ 2007-11-14\ 01\:16\:35\ +0100\ (mer,\ 14\ nov\ 2007)\ $\ *\ by\ \:\ $Author\:\ bpoussin\ $\ */package\ fr.ifremer.isisfish.simulator;import\ org.codelutin.math.matrix.MatrixND;import\ fr.ifremer.isisfish.types.Date;/**\ *\ Some\ SimulationResultListener\ can\ implement\ this\ interface\ to\ show\ that\ can\ *\ be\ used\ to\ retrieve\ result\ *\ \ *\ @author\ poussin\ */public\ interface\ SimulationResultGetter\ {\ \ \ \ /**\ \ \ \ \ *\ Retourne\ la\ matrice\ stocke\ pour\ un\ pas\ de\ temps\ \ \ \ \ *\ @param\ date\ le\ pas\ de\ temps\ que\ l'on\ souhaite\ \ \ \ \ *\ @param\ name\ le\ nom\ des\ resultats\ dont\ on\ veut\ la\ matrice\ \ \ \ \ *\ @return\ La\ matrice\ demand\uFFFDe\ ou\ null\ si\ aucune\ matrice\ ne\ correspond\ a\ \ \ \ \ *\ la\ demande.\ \ \ \ \ */\ \ \ \ \ public\ MatrixND\ getMatrix(SimulationContext\ context,\ Date\ date,\ String\ name);\ \ \ \ \ \ \ \ \ \ /**\ \ \ \ \ \ *\ Retourne\ une\ matrice\ contenant\ tous\ les\ pas\ de\ temps.\ \ \ \ \ \ *\ @param\ name\ le\ nom\ des\ resultats\ dont\ on\ veut\ une\ matrice\ globale.\ \ \ \ \ \ */\ \ \ \ \ public\ MatrixND\ getMatrix(SimulationContext\ context,\ String\ name);\ \ \ \ \ }/*\ *\#\#%\ *\ Copyright\ (C)\ 2002-2005\ Code\ Lutin,\ C\uFFFDdric\ Pineau,\ \ \ \ \ Benjamin\ Poussin\ *\ *\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or\ *\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License\ *\ as\ published\ by\ the\ Free\ Software\ Foundation;\ either\ version\ 2\ *\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.\ *\ *\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,\ *\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of\ *\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the\ *\ GNU\ General\ Public\ License\ for\ more\ details.\ *\ *\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License\ *\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software\ *\ Foundation,\ Inc.,\ 59\ Temple\ Place\ -\ Suite\ 330,\ Boston,\ MA\ \ 02111-1307,\ USA.\ *\#\#%*//*\ **\ SimulatorServerBadIdException.java**\ Created\:\ Fri\ Sep\ \ 6\ 2002**\ @author\ \ <poussin at codelutin.com>*\ Copyright\ Code\ Lutin*\ @version\ $Revision\:\ 167\ $**\ Mise\ a\ jour\:\ $Date\:\ 2006-01-23\ 15\:00\:17\ +0100\ (lun,\ 23\ jan\ 2006)\ $*\ par\ \:\ $Author\:\ bpoussin\ $*/package\ fr.ifremer.isisfish.simulator;public\ class\ SimulatorServerBadIdException\ extends\ RuntimeException\ {\ //\ SimulatorServerBadIdException\ \ \ \ /**\ \ */\ \ \ \ private\ static\ final\ long\ serialVersionUID\ =
+isisfish.error.unsupported.equation.langage=unsupported langage '%1$s' for equation\: %2$s
+isisfish.error.update.file=Can't update file '%1$s'
+isisfish.error.update.repository=Can't update local repository
+isisfish.error.vcs.connect=could not connect to vcs server, check the configuration... or contact us for help
+isisfish.error.vcs.no.anonymous.connection=
+isisfish.error.vcs.no.ssh.connection=could not connect with ssh configuration user %1$s, private key %2$s
+isisfish.error.vcs.pre.migrate=While migration, could not backup your old database %1$s for reason %2$s, a new database will be created at location %3$s.
+isisfish.error.wait.simThread=Can't wait SimThread
+isisfish.error.while.simulation=error while simulation %1$s
+isisfish.error.write.simulation=Can't write information %1$s
isisfish.exit.text=Something has change, please enter a comment
isisfish.exit.title=Exit
isisfish.export.directory=Export directory
@@ -248,6 +376,8 @@
isisfish.filter.log.tooltip.message=filter.log.tooltip.message
isisfish.filter.reset=filter.reset
isisfish.filter.result=filter.result
+isisfish.filter.select=filter.select
+isisfish.filter.select.simulation=select.simulation
isisfish.filter.simulation=filter.simulation
isisfish.filter.simulation.analysePlanNumber=analysePlanNumber
isisfish.filter.simulation.description=description
@@ -351,35 +481,149 @@
isisfish.input.selectNodeTree=Select node in tree
isisfish.input.title=Fishery Input
isisfish.launch.anonymous=read only
+isisfish.launch.debugMode=debug mode
isisfish.launch.email=email
+isisfish.launch.find.public.key=Public ssh key (*.pub) associated with the required private key
+isisfish.launch.first=First launch type vcs %1$s - version %2$s
isisfish.launch.firstname=firstname
+isisfish.launch.howto.save.key=Howto register your public ssh key in labs
+isisfish.launch.init.done=init done in %1$s.
isisfish.launch.lasstname=lasstname
+isisfish.launch.save.key=Goto to labs for register your ssh public key
isisfish.launch.server.authenticationMethod=server access
isisfish.launch.server.login=server login
+isisfish.launch.server.ssh.confirm.change.method=Changing authentication method requires a migration at next launch, confirm this action.
+isisfish.launch.server.ssh.confirm.overwrite.key=Ssh key %1$s already exists, confirm to overwrite.
isisfish.launch.server.ssh.confirm.passphrase=confirm passphrase
isisfish.launch.server.ssh.key.change=Change your ssh key
+isisfish.launch.server.ssh.key.clipboard=Your public key was copied in clipboard
isisfish.launch.server.ssh.key.generate=Generate ssh key
+isisfish.launch.server.ssh.key.generate.error=An error occurs while generating ssh key %1$s (%2$s)
+isisfish.launch.server.ssh.key.generate.succes=The ssh key %1$s was generated with success. Do you want to register it to labs ?
+isisfish.launch.server.ssh.key.no.key=No ssh key found or your have not selected ssh authentication method, really wants to go to labs ?
+isisfish.launch.server.ssh.key.register=Register your public ssh key in labs.
isisfish.launch.server.ssh.no.passphrase=no passphrase
isisfish.launch.server.ssh.passphrase=passphrase
isisfish.launch.server.ssh.privateKeyFile=private ssh key
isisfish.launch.server.ssh.publicKeyFile=public ssh key
isisfish.launch.ssh=read-write (ssh)
+isisfish.launch.start=Launching Isis-fish ... %1$s
+isisfish.launch.stop=Stopping simulation...
+isisfish.launching=after init done in %1$s.
+isisfish.log.addAppender=add appender [%1$s]
isisfish.log.body=Message to add
-isisfish.log.mail.send.title",\ simulationFile.getName()));\ \ \ \ \ \ \ \ this.from\ =
+isisfish.log.closeAppender=closing appender %1$s for category %2$s
+isisfish.log.mail.failed=Can't send report by mail. Is your mail server up ? (I'm trying to contact the < %1$s > smtp server)
+isisfish.log.mail.send=A report has been sent to %1$s
+isisfish.log.mail.send.title=Send simulation %1$s by email
isisfish.log.mailTo=Destination adress
+isisfish.log.removeAppender=remove appender [%1$s]
+isisfish.log.restoreLogLevel=swap back level for logger %1$s from level %2$s to level %3$s
isisfish.log.sendAll=Send the complete simulation archive
isisfish.log.sendMail=Send by email
+isisfish.log.simulation.name=IsisFish simulation %1$s
+isisfish.log.swapLogLevel=swap level for logger %1$s from level %2$s to level%3$s
isisfish.log.tooltip.body=The message will be join to email
isisfish.log.tooltip.mailTo=Enter destination adress
isisfish.log.tooltip.sendAll=Send the complete simulation archive, or just the log file
isisfish.log.tooltip.sendMail=Click here to send the email with files
+isisfish.message.add.cvs=Add from %1$s files %2$s.
+isisfish.message.add.objets.simulation=Add new objets simulation
+isisfish.message.add.queue=%1$s added to queue simulation
+isisfish.message.add.queue.remote=%1$s added to remote queue simulation
+isisfish.message.backup.database.finished=backup database finished
+isisfish.message.backup.database.progress=backup database in progress
+isisfish.message.cancel.finished=Cancel finished
+isisfish.message.check.finished=check finished
+isisfish.message.check.region=Check region ...
+isisfish.message.checking.cell=Checking cell
isisfish.message.choose.archive=choose archive file or directory
-isisfish.message.load.map",\ filename,\ shp,\ ssx));\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ addShapeLayer(filename,\ shp,\ ssx,\ "ff000000",\ "ffbdde83=
+isisfish.message.comment.region.modification=Enter comment about your region modification
+isisfish.message.commit=Commit the change
+isisfish.message.commit.cancelled=commit cancelled
+isisfish.message.commit.finished=commit finished
+isisfish.message.commit.region.canceled=Commit region canceled
+isisfish.message.commiting.region=Commiting region %1$s ...
+isisfish.message.compilation.time=Compilation time %1$ss
+isisfish.message.confirm.delete.object=Do you really want delete object %1$s
+isisfish.message.confirm.remove.region=Do you really want to remove the region %1$s ?
+isisfish.message.confirm.remove.script=Do you want to remove script ? '%1$s'
+isisfish.message.copy.finished=Copy finished
+isisfish.message.copy.region=Copy region to %1$s
+isisfish.message.copy.revision=Working copy initialize fine... Revision \: [ %1$s - %2$s ]
+isisfish.message.create.region.canceled=Create region canceled
+isisfish.message.creating.region=Creating region %1$s
+isisfish.message.creation.done=creation done %1$s
+isisfish.message.creation.finished=Creation finished
+isisfish.message.delete.canceled=delete canceled
+isisfish.message.delete.entities=Delete entities
+isisfish.message.delete.entity=Delete entity
+isisfish.message.delete.finished=delete finished
+isisfish.message.delete.object=To delete object %1$s, all next object will be deleted\\n\\n
+isisfish.message.diff.finished=file in state %1$s
+isisfish.message.directory.not.exists=Parent directory of file %1$s does not exists, Do you want to create it ?
+isisfish.message.evaluation.finished=evaluation finished
+isisfish.message.export.cancelled=export cancelled
+isisfish.message.export.done=export done
+isisfish.message.export.path.tozip=toZip %1$s
+isisfish.message.export.result=zip %1$s file(s) in %2$s (size %3$s)
+isisfish.message.export.scripts.file=Export scripts to file %1$s
+isisfish.message.export.zip=Export to zip file %1$s
+isisfish.message.file.already.exists=File %1$s already exists, Do you want to overwrite it ?
+isisfish.message.file.overwrite=File exists, do you want overwrite it ?
+isisfish.message.import=Import %1$s
+isisfish.message.import.finished=Import finished
+isisfish.message.import.region.name=Enter name for imported region
+isisfish.message.import.region.xml=XMLed Region
+isisfish.message.import.region.zipped=Zipped Region
+isisfish.message.import.scripts.file=Import scripts from file %1$s
+isisfish.message.import.scripts.file.cancelled=Import scripts cancelled
+isisfish.message.import.scripts.file.done=Import scripts done
+isisfish.message.import.scripts.zipped=Zipped Scripts
+isisfish.message.import.xml.v2.file\ =Import xml v2 file
+isisfish.message.import.zip=Import zip file
+isisfish.message.load.finished=load finished
+isisfish.message.load.map=Try to load map file\: %1$s (%2$s, %3$s)
+isisfish.message.load.region.canceled=load region canceled
+isisfish.message.loading.old.simulation=Loading old simulation ...
+isisfish.message.loading.region=Loading region ...
+isisfish.message.name.imported.region=Enter name for imported region
+isisfish.message.new.filename=Enter the name of the new file. (use only chars and _ and start with uppercase)
+isisfish.message.new.region.name=Enter new region name
+isisfish.message.no.diff=No diff found for file %1$s, since it is a %2$s
+isisfish.message.old.simulation.loaded=Old simulation loaded
+isisfish.message.page.modified=This page has been modified, do you want to save it ?
+isisfish.message.presimulation.script.execution=Presimulation Script execution
+isisfish.message.recruitment.number.month=Input the number of month of recruitment
+isisfish.message.region.commited=Region commited
+isisfish.message.region.loaded=Region loaded
+isisfish.message.region.remove.canceled=Region remove canceled
+isisfish.message.region.removed=Region removed
+isisfish.message.remove.canceled=Remove canceled
+isisfish.message.remove.files=Remove files %1$s.
+isisfish.message.remove.finished=Remove finished
+isisfish.message.remove.unnecessary.cells=Remove unnecessary cells
+isisfish.message.removing.region=Removing region %1$s ...
isisfish.message.result.verif.region=R\u00E9sultat de la v\u00E9rification de la r\u00E9gion
+isisfish.message.save.finished=save finished
+isisfish.message.saveModel.finished=Save model finished
+isisfish.message.search.data=Search data ...
+isisfish.message.setting.cache.aspects=Setting Cache aspects
+isisfish.message.setting.trace.aspects=Setting Trace aspects
+isisfish.message.simulation.ended=Simulation ended
+isisfish.message.simulation.execution=Simulation execution
+isisfish.message.spacialized.visualisation=Spacialized visualisation
+isisfish.message.stop.with.error=stop with error %1$s
+isisfish.message.synchronize.done=synchronize done.
+isisfish.message.tray.disabled=SystemTray disabled
+isisfish.message.update.finished=update finished
isisfish.metier.comments=Comments
isisfish.metier.name=Name
isisfish.metier.rangeValues=Range of values
isisfish.metier.title=Metier
+isisfish.metierMonitor.metiers=Metiers
+isisfish.metierMonitor.strategies=Strategies
+isisfish.metierSeasonInfo.toString=%1$s season %2$s-%3$s
isisfish.metierSeasonInfoSpecies.mainSpecies=Main species for the metier
isisfish.metierSeasonInfoSpecies.selectSeason=Select a season
isisfish.metierSeasonInfoSpecies.selectSpecies=Select a species
@@ -389,7 +633,44 @@
isisfish.metierSeasonInfoZone.season=Season
isisfish.metierSeasonInfoZone.selectSeason=Select a season
isisfish.metierSeasonInfoZone.title=Seasons / Zones
+isisfish.migration.cvs.description=Migrate from CVS to SVN [v %1$s]
+isisfish.migration.svn.protocol.description=Migrate from SVN [v %1$s - %2$s] to SVN [v %3$s - %4$s]
+isisfish.migration.svn.version.description=Migrate from SVN [v %1$s - %2$s] to SVN [v %3$s - %4$s]
isisfish.monitor.title=Application Monitor
+isisfish.month.april=april
+isisfish.month.august=august
+isisfish.month.december=december
+isisfish.month.february=february
+isisfish.month.january=january
+isisfish.month.july=july
+isisfish.month.june=june
+isisfish.month.march=march
+isisfish.month.may=may
+isisfish.month.november=november
+isisfish.month.october=october
+isisfish.month.september=september
+isisfish.option.description.addScript=
+isisfish.option.description.changeConfig=
+isisfish.option.description.changeFileConfig=
+isisfish.option.description.createSshKey=
+isisfish.option.description.editConfig=
+isisfish.option.description.exportData=
+isisfish.option.description.exportScript=
+isisfish.option.description.help=
+isisfish.option.description.helpConfig=
+isisfish.option.description.import=
+isisfish.option.description.importAndRenameRegion=
+isisfish.option.description.list=
+isisfish.option.description.mavenFile=
+isisfish.option.description.resetConfig=
+isisfish.option.description.showConfig=
+isisfish.option.description.simulate=
+isisfish.option.description.sshKeyFile=
+isisfish.option.description.ui=
+isisfish.option.description.update=
+isisfish.option.description.vcsAddRemove=
+isisfish.option.description.vcsUpdateCommitState=
+isisfish.params.changeLogLev=Change from level '%1$s' to level '%2$s'
isisfish.params.clearFilter=Clear filter
isisfish.params.description=Description
isisfish.params.filter=Filter
@@ -400,9 +681,31 @@
isisfish.params.ruleParameters=Rule's parameters
isisfish.params.simulationName=Simulation name
isisfish.params.title=Parameters
+isisfish.params.toString.fishery=P\u00EAcherie\: %1$s\\n\\n
+isisfish.params.toString.lib.logger.level=Level of libraries' logger %1$s
+isisfish.params.toString.number.years=Number of years\: %1$s\\n\\n
+isisfish.params.toString.plan=Plan\: %1$s
+isisfish.params.toString.plan.number=Analyse plan sequence number\: %1$s\\n\\n
+isisfish.params.toString.populations=Populations\:
+isisfish.params.toString.rule=Rule\: %1$s
+isisfish.params.toString.script.logger.level=Level of scripts' logger %1$s
+isisfish.params.toString.script.presimulation=Script de presimulation
+isisfish.params.toString.simul.logger.level=Level of simulator's logger %1$s
+isisfish.params.toString.simulation.done=Simulation done with %1$s\:
+isisfish.params.toString.strategies=Strat\u00E9gies d'exploitation\:
isisfish.params.useAnalysePlan=Use analyse plan
isisfish.params.usePreSimulationScript=Use pre simulation script
+isisfish.population.capturability=Capturability
isisfish.population.comments=Comments
+isisfish.population.group=Group
+isisfish.population.groups=Groups
+isisfish.population.mappingZoneReproZoneRecru=MappingZoneReproZoneRecru
+isisfish.population.matrixAbundance=matrixAbundance
+isisfish.population.matrixAbundance1D=matrixAbundance1D
+isisfish.population.recruitment=Recruitment
+isisfish.population.reproduction=Reproduction
+isisfish.population.season=Season
+isisfish.population.zones=Zones
isisfish.populationBasics.geographicID=geographicID
isisfish.populationBasics.growth=growth
isisfish.populationBasics.growthReverse=growthReverse
@@ -427,6 +730,7 @@
isisfish.populationGroup.price=price
isisfish.populationGroup.reproductionRate=reproductionRate
isisfish.populationGroup.title=inputPopulationGroup
+isisfish.populationGroup.toString=%1$s Group %2$s
isisfish.populationMigration.comments=Comments
isisfish.populationMigration.selectSeason=Select a season
isisfish.populationMigration.title=inputPopulationMigration
@@ -446,6 +750,15 @@
isisfish.populationRecruitment.recruitmentDistribution=Recruitment Distribution
isisfish.populationRecruitment.reproductionEquation=ReproductionEquation
isisfish.populationRecruitment.title=inputPopulationRecruitment
+isisfish.populationSeasonInfo.arrival=Arrival
+isisfish.populationSeasonInfo.departure=Departure
+isisfish.populationSeasonInfo.distributionSpawing=Distribution of spawing
+isisfish.populationSeasonInfo.emigration=Emigration
+isisfish.populationSeasonInfo.group=Group
+isisfish.populationSeasonInfo.immigration=Immigration
+isisfish.populationSeasonInfo.migration=Migration
+isisfish.populationSeasonInfo.months=Months
+isisfish.populationSeasonInfo.toString=%1$s season %2$s-%3$s
isisfish.populationSeasons.Reproduction=Reproduction
isisfish.populationSeasons.changeGroup=Change of group
isisfish.populationSeasons.comments=Comments
@@ -468,22 +781,29 @@
isisfish.preScript.backParameter=Back to parameter tab
isisfish.preScript.title=Pre simulation script
isisfish.queue.cancelled=cancelled
+isisfish.queue.id=id
+isisfish.queue.local=Local
+isisfish.queue.name=Queue
+isisfish.queue.plan=Plan
+isisfish.queue.progression=Progression
isisfish.queue.showLog=Show simulation log
isisfish.queue.simulationLaunch=Simulation queue launch
+isisfish.queue.status=Status
isisfish.queue.stopSimulation=Stop simulation
isisfish.queue.title=Queue
isisfish.result.abundance=Abondance
isisfish.result.add=Add a result
-isisfish.result.begin.simulation=En debut de Simulation\:
+isisfish.result.begin.simulation=En debut de Simulation\:
isisfish.result.capture=Capture
isisfish.result.capture.metier=Capture par metier
isisfish.result.choose.simulation=Choose a Simulation
isisfish.result.datas=Datas
isisfish.result.datasRadioButton=defaultToolTip-fr.ifremer.resultat.ResultatEdit.donneeRadioButton
isisfish.result.desktopPane=defaultToolTip-fr.ifremer.resultat.ResultatView.desktopPane
-isisfish.result.dimension\ =Dimension
-isisfish.result.end.simulation=En fin de Simulation\:
+isisfish.result.dimension\ =Dimension
+isisfish.result.end.simulation=En fin de Simulation\:
isisfish.result.export=Export
+isisfish.result.export.file=Export text file
isisfish.result.file=File
isisfish.result.graph=Graph
isisfish.result.graphRadioButton=defaultToolTip-fr.ifremer.resultat.ResultatEdit.graphRadioButton
@@ -576,6 +896,7 @@
isisfish.script.title=Script Editor
isisfish.script.txtExport=txtExport
isisfish.script.update=Update
+isisfish.season.toString=season %1$s-%2$s
isisfish.selectivity.equation=Equation
isisfish.selectivity.selectPopulation=Select a population
isisfish.selectivity.title=Selectivity
@@ -603,6 +924,7 @@
isisfish.setOfVessels.fixedCosts=fixedCosts
isisfish.setOfVessels.name=name
isisfish.setOfVessels.numberOfVessels=numberOfVessels
+isisfish.setOfVessels.technicalEfficiency=
isisfish.setOfVessels.title=Caracteristics
isisfish.setOfVessels.vesselType=vesselType
isisfish.simpleResult.legendPanel=defaultToolTip-fr.ifremer.isisfish.map.SimpleIsisMapBeanBean.legendPanel
@@ -610,6 +932,8 @@
isisfish.simpleResult.resultatMap=defaultToolTip-fr.ifremer.isisfish.map.SimpleIsisMapBeanBean.resultatMap
isisfish.simpleResult.resultatMapToolBar=defaultToolTip-fr.ifremer.isisfish.map.SimpleIsisMapBeanBean.resultatMapToolBar
isisfish.simpleResult.table=defaultToolTip-fr.ifremer.isisfish.map.SimpleResultatMapBean.table12
+isisfish.simulation.log.console.title=Log console for simulation '%1$s'
+isisfish.simulation.log.showConsole=display log console for simulation %1$s
isisfish.simulation.menu.about=About
isisfish.simulation.menu.close=Close
isisfish.simulation.menu.file=File
@@ -627,12 +951,21 @@
isisfish.species.structured=structured
isisfish.species.title=inputSpecies
isisfish.strategy.comments=Comments
+isisfish.strategy.inactivity=
+isisfish.strategy.inactivityEquationUsed=
isisfish.strategy.name=name
isisfish.strategy.proportionSetOfVessels=proportionSetOfVessels
isisfish.strategy.title=Caracteristics
+isisfish.strategyMonthInfo.metier=Metier
isisfish.strategyMonthInfo.minInactivityDays=minInactivityDays
isisfish.strategyMonthInfo.numberOfTrips=numberOfTrips
+isisfish.strategyMonthInfo.proportion=Proportion
isisfish.strategyMonthInfo.title=StrategyMonthInfo
+isisfish.strategyMonthInfo.toString=%1$s %2$s
+isisfish.timeUnit.day=Day
+isisfish.timeUnit.hours=Hours
+isisfish.tray.simulation=<b>Isis-fish<b><p>%1$s - %2$s/%3$s
+isisfish.tray.simulation.no=<b>Isis-fish<b><p><i>No simulation<i>
isisfish.tripType.comments=Comments
isisfish.tripType.duration=Duration
isisfish.tripType.minTime=Minimum time between trips
@@ -644,6 +977,9 @@
isisfish.vcs.commit.cancel=vcs.commit.cancel
isisfish.vcs.commit.label=vcs.commit.label
isisfish.vcs.commit.ok=vcs.commit.ok
+isisfish.vcs.config.title=Vcs configuration Modifier
+isisfish.vcs.configuration.title=VCS server configuration
+isisfish.vcs.migrate.end=Migration done in %1$ss.<br/>New database in is located at [%2$s]
isisfish.vcs.update=vcs.update
isisfish.vcs.update.cancel=cancel
isisfish.vcs.update.checkAll=checkAll
@@ -670,6 +1006,7 @@
isisfish.vcs.updateconfirm.label2=
isisfish.vcs.updateconfirm.ok=ok
isisfish.vcs.updateconfirm.tooltip.checkAll=
+isisfish.versionStorage.removed=Removed
isisfish.vesselType.activityRange=Activity range
isisfish.vesselType.comments=Comments
isisfish.vesselType.fuelCost=Fuel cost of travel
@@ -713,4 +1050,36 @@
isisfish.zone.comments=Comments
isisfish.zone.name=Name
isisfish.zone.title=inputZone
-null)\ {\ \ \ \ \ \ \ \ \ \ \ \ logMail\ =
+lutinutil.common.action=Action
+lutinutil.common.file=File
+lutinutil.common.logDiff=show diff
+lutinutil.common.module=Module
+lutinutil.common.rev=Revision
+lutinutil.common.select=Select
+lutinutil.error.checkout.dir=Can't checkout dir %1$s
+lutinutil.error.fieldmodel.already.registred=FieldAccess [%1$s] is already registred
+lutinutil.error.fieldmodel.not.registred=could not found a matching entry in cache for [%1$s]
+lutinutil.error.fieldmodel.unmatchin.options=you can not defined a such model with no the same number of optionClass and optionNames
+lutinutil.error.init.config=config is not init, you should invoke on the config validate(true) method to validate it and finish his init %1$s
+lutinutil.error.init.no.config=should invoke %1$s\#init(VCSType,Properties) before required instance.
+lutinutil.vcs.action.add=add
+lutinutil.vcs.action.changeLog=changeLog
+lutinutil.vcs.action.checkout=checkout
+lutinutil.vcs.action.commit=commit
+lutinutil.vcs.action.delete=delete
+lutinutil.vcs.action.diff=diff
+lutinutil.vcs.action.overwriteAndUpdate=overwriteAndUpdate
+lutinutil.vcs.action.revert=revert
+lutinutil.vcs.action.update=update
+lutinutil.vcs.state.missing=missing
+lutinutil.vcs.state.modified=modified
+lutinutil.vcs.state.outofdate=outofdate
+lutinutil.vcs.state.outofdateAndModified=outofdateAndModified
+lutinutil.vcs.state.unknown=unknown
+lutinutil.vcs.state.unversionned=unversionned
+lutinutil.vcs.state.unversionnedOrMissing=unversionnedOrMissing
+lutinutil.vcs.state.uptodate=uptodate
+no\ properties\ found\ or\ unsafe\ properties\ found\ %1$s=no properties found or unsafe properties found %1$s
+the\ property\ %1$s\ is\ mandatory\ but\ missed.=the property %1$s is mandatory but missed.
+to\ use\ ssh\ authentication\ mode,\ you\ must\ have\ a\ username.\ %1$s.=to use ssh authentication mode, you must have a username. %1$s.
+to\ use\ ssh\ authentication\ mode,\ you\ must\ have\ an\ existing\ private\ key\ %1$s\ \:\ %2$s.=to use ssh authentication mode, you must have an existing private key %1$s \: %2$s.
Modified: trunk/isis-fish/src/resources/i18n/isis-fish-fr_FR.properties
===================================================================
--- trunk/isis-fish/src/resources/i18n/isis-fish-fr_FR.properties 2008-08-18 13:42:57 UTC (rev 1302)
+++ trunk/isis-fish/src/resources/i18n/isis-fish-fr_FR.properties 2008-08-18 13:44:18 UTC (rev 1303)
@@ -1,78 +1,17 @@
-=
-\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ new\ JInternalFrame(simulation.getName(),\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ true,\ //resizable\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ true,\ //closable\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ true,\ //maximizable\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ true);//iconifiable\ \ \ \ \ \ \ \ \ \ \ \ intFrame.setContentPane(resEdit.getRootPane());\ \ \ \ \ \ \ \ \ \ \ \ intFrame.setVisible(true);\ \ \ \ \ \ \ \ \ \ \ \ //\t\ \ \ \ intFrame.pack();\ \ \ \ \ \ \ \ \ \ \ \ intFrame.setSize(new\ Dimension(800,700));\ \ \ \ \ \ \ \ \ \ \ \ getDesktopPane().add(intFrame);\ \ \ \ \ \ \ \ \ \ \ \ try{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ intFrame.setSelected(true);\ \ \ \ \ \ \ \ \ \ \ \ }\ catch\ (PropertyVetoException\ eee)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ log.warn("Error\ dans\ l\ internalFrame\ ",\ eee);\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ }\ \ \ \ public\ void\ on_voirSimulationLogButton_clicked()\ {\ \ \ \ \ \ \ \ String\ name\ =
-\ (String)getSimulation().getSelectedItem();\ \ \ \ \ \ \ \ if\ (name\ \!=
-\ (String)getSimulation().getSelectedItem();\ \ \ \ \ \ \ \ try\ {\ \ \ \ \ \ \ \ \ \ \ \ SimulationLoggerUtil.showSimulationLogConsole(name);\ \ \ \ \ \ \ \ }\ catch\ (Exception\ e)\ {\ \ \ \ \ \ \ \ \ \ \ \ //\ ignore\ ?\ \ \ \ \ \ \ \ }\ \ \ \ }\ \ \ \ public\ void\ on_filterSimulationLogButton_clicked()\ {\ \ \ \ \ \ \ \ try\ {\ \ \ \ \ \ \ \ \ \ \ \ List<String>\ result\ =
-\ -5643196187139951889L;\ \ \ \ public\ SimulationException(String\ msg)\ {\ \ \ \ \ \ \ \ super(msg);\ \ \ \ }\ \ \ \ public\ SimulationException(String\ msg,\ Throwable\ e)\ {\ \ \ \ \ \ \ \ super(msg,\ e);\ \ \ \ }}\ //\ SimulationException/*\ *\#\#%\ *\ Copyright\ (C)\ 2007\ *\ \ \ \ \ Ifremer,\ Code\ Lutin,\ C\uFFFDdric\ Pineau,\ Benjamin\ Poussin\ *\ *\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or\ *\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License\ *\ as\ published\ by\ the\ Free\ Software\ Foundation;\ either\ version\ 2\ *\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.\ *\ *\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,\ *\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of\ *\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the\ *\ GNU\ General\ Public\ License\ for\ more\ details.\ *\ *\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License\ *\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software\ *\ Foundation,\ Inc.,\ 59\ Temple\ Place\ -\ Suite\ 330,\ Boston,\ MA\ \ 02111-1307,\ USA.\ *\#\#%*//*\ *\ *\ SimulationResultListener.java\ *\ *\ Created\:\ 13\ nov.\ 07\ 11\:59\:53\ *\ *\ @author\ poussin\ *\ @version\ $Revision\:\ 739\ $\ *\ *\ Last\ update\:\ $Date\:\ 2007-11-20\ 18\:46\:38\ +0100\ (mar,\ 20\ nov\ 2007)\ $\ *\ by\ \:\ $Author\:\ bpoussin\ $\ */package\ fr.ifremer.isisfish.simulator;import\ org.codelutin.math.matrix.MatrixND;import\ fr.ifremer.isisfish.IsisFishException;import\ fr.ifremer.isisfish.types.Date;/**\ *\ @author\ poussin\ *\ */public\ interface\ SimulationResultListener\ extends\ SimulationListener\ {\ \ \ \ \ \ \ \ public\ void\ addResult(SimulationContext\ context,\ \ \ \ \ \ \ \ \ \ \ \ Date\ date,\ String\ name,\ MatrixND\ mat)\ throws\ IsisFishException;\ \ \ \ }/*\ *\#\#%\ *\ Copyright\ (C)\ 2006\ *\ \ \ \ \ Ifremer,\ Code\ Lutin,\ C\uFFFDdric\ Pineau,\ Benjamin\ Poussin\ *\ *\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or\ *\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License\ *\ as\ published\ by\ the\ Free\ Software\ Foundation;\ either\ version\ 2\ *\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.\ *\ *\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,\ *\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of\ *\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the\ *\ GNU\ General\ Public\ License\ for\ more\ details.\ *\ *\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License\ *\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software\ *\ Foundation,\ Inc.,\ 59\ Temple\ Place\ -\ Suite\ 330,\ Boston,\ MA\ \ 02111-1307,\ USA.\ *\#\#%*//*\ *\ *\ SimulationQueueEvent.java\ *\ *\ Created\:\ 17\ ao\uFFFDt\ 2006\ 22\:00\:41\ *\ *\ @author\ poussin\ *\ @version\ $Revision\:\ 217\ $\ *\ *\ Last\ update\:\ $Date\:\ 2006-08-21\ 17\:43\:41\ +0200\ (lun,\ 21\ ao\u00FB\ 2006)\ $\ *\ by\ \:\ $Author\:\ bpoussin\ $\ */package\ fr.ifremer.isisfish.simulator;import\ java.util.EventObject;/**\ *\ @author\ poussin\ *\ */public\ class\ SimulationQueueEvent\ extends\ EventObject\ {\ \ \ \ /**\ simulation\ id\ */\ \ \ \ protected\ String\ id;\ \ \ \ \ \ \ \ /**\ \ \ \ \ *\ @param\ source\ \ \ \ \ */\ \ \ \ public\ SimulationQueueEvent(Object\ source,\ String\ id)\ {\ \ \ \ \ \ \ \ super(source);\ \ \ \ \ \ \ \ this.id\ =
-\ 0)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ this\ is\ the\ all\ levels\ reader\ to\ create,\ depends\ on\ no\ others\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ reader\ =
-\ 0;\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ //log.debug("\ offset\:"\ +\ offset\ +\ "\ width\:"\ +\ model.nbLinesInEditor);\ \ \ \ \ \ \ \ String[]\ result;\ \ \ \ \ \ \ \ //\ obtain\ lines\ from\ reader\ \ \ \ \ \ \ \ result\ =
-\ 4449196856169240128L;\ \ \ \ public\ SimulatorServerBadIdException(String\ msg)\ {\ \ \ \ \ \ \ \ super(msg);\ \ \ \ }\ \ \ \ public\ SimulatorServerBadIdException(String\ msg,\ Throwable\ e)\ {\ \ \ \ \ \ \ \ super(msg,\ e);\ \ \ \ }}\ //\ SimulatorServerBadIdException/*\ *\#\#%\ *\ Copyright\ (C)\ 2002-2005\ Code\ Lutin,\ C\uFFFDdric\ Pineau,\ \ \ \ \ Benjamin\ Poussin\ *\ *\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or\ *\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License\ *\ as\ published\ by\ the\ Free\ Software\ Foundation;\ either\ version\ 2\ *\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.\ *\ *\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,\ *\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of\ *\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the\ *\ GNU\ General\ Public\ License\ for\ more\ details.\ *\ *\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License\ *\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software\ *\ Foundation,\ Inc.,\ 59\ Temple\ Place\ -\ Suite\ 330,\ Boston,\ MA\ \ 02111-1307,\ USA.\ *\#\#%*//*\ *\ *\ SimulationException.java\ *\ *\ Created\:\ Wed\ Aug\ 14\ 2002\ *\ *\ @author\ \ <poussin at codelutin.com>\ *\ @version\ $Revision\:\ 167\ $\ *\ *\ Mise\ a\ jour\:\ $Date\:\ 2006-01-23\ 15\:00\:17\ +0100\ (lun,\ 23\ jan\ 2006)\ $\ *\ par\ \:\ $Author\:\ bpoussin\ $\ */package\ fr.ifremer.isisfish.simulator;public\ class\ SimulationException\ extends\ RuntimeException\ {\ //\ SimulationException\ \ \ \ /**\ \ */\ \ \ \ private\ static\ final\ long\ serialVersionUID\ =
-\ IsisConfig.Module.REGION;\ \ \ \ \ \ \ \ if\ (create)\ {\ \ \ \ \ \ \ \ \ \ \ \ doCheckoutModule(handler,module,category);\ \ \ \ \ \ \ \ }\ else\ {\ \ \ \ \ \ \ \ \ \ \ \ File\ f\ =
-\ IsisConfig.getResultExportDirectory(rootDirectory);\ \ \ \ \ \ \ \ \ \ \ \ exportDir.mkdirs();\ \ \ \ \ \ \ \ \ \ \ \ ExportHelper.doExport(simulation,\ exportDir,\ parameters.getExportNames(),\ rootDirectory);\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ /*\ (non-Javadoc)\ \ \ \ \ *\ @see\ fr.ifremer.isisfish.simulator.SimulationListener\#beforeSimulation(fr.ifremer.isisfish.simulator.SimulationContext)\ \ \ \ \ */\ \ \ \ public\ void\ beforeSimulation(SimulationContext\ context)\ {\ \ \ \ }}/*\ *\#\#%\ *\ Copyright\ (C)\ 2006\ *\ \ \ \ \ Ifremer,\ Code\ Lutin,\ C\uFFFDdric\ Pineau,\ Benjamin\ Poussin\ *\ *\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or\ *\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License\ *\ as\ published\ by\ the\ Free\ Software\ Foundation;\ either\ version\ 2\ *\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.\ *\ *\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,\ *\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of\ *\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the\ *\ GNU\ General\ Public\ License\ for\ more\ details.\ *\ *\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License\ *\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software\ *\ Foundation,\ Inc.,\ 59\ Temple\ Place\ -\ Suite\ 330,\ Boston,\ MA\ \ 02111-1307,\ USA.\ *\#\#%*//*\ *\ *\ MetierMonitor.java\ *\ *\ Created\:\ 21\ ao\uFFFDt\ 2006\ 15\:43\:19\ *\ *\ @author\ poussin\ *\ @version\ $Revision\:\ 652\ $\ *\ *\ Last\ update\:\ $Date\:\ 2007-11-08\ 15\:04\:16\ +0100\ (jeu,\ 08\ nov\ 2007)\ $\ *\ by\ \:\ $Author\:\ ruchaud\ $\ */package\ fr.ifremer.isisfish.simulator;import\ static\ org.codelutin.i18n.I18n.n_;import\ java.util.ArrayList;import\ java.util.Collection;import\ java.util.HashMap;import\ java.util.HashSet;import\ java.util.List;import\ java.util.Map;import\ java.util.Set;import\ org.apache.commons.collections.MapIterator;import\ org.apache.commons.collections.keyvalue.MultiKey;import\ org.apache.commons.collections.map.MultiKeyMap;import\ org.apache.commons.logging.Log;import\ org.apache.commons.logging.LogFactory;import\ org.codelutin.math.matrix.MatrixFactory;import\ org.codelutin.math.matrix.MatrixND;import\ org.codelutin.topia.TopiaContext;import\ org.codelutin.topia.TopiaException;import\ fr.ifremer.isisfish.IsisFishRuntimeException;import\ fr.ifremer.isisfish.entities.Metier;import\ fr.ifremer.isisfish.entities.SetOfVessels;import\ fr.ifremer.isisfish.entities.Strategy;import\ fr.ifremer.isisfish.entities.StrategyMonthInfo;import\ fr.ifremer.isisfish.types.Date;import\ fr.ifremer.isisfish.types.Month;/**\ *\ ATTENTION\:\ l'implantation\ de\ cette\ classe\ n'est\ peut-etre\ pas\ correct.\ Il\ faut\ *\ absolument\ verifier\ le\ FIXME,\ mais\ il\ est\ difficile\ de\ le\ faire\ car\ *\ la\ plupart\ des\ methodes\ de\ cette\ objets\ ne\ semble\ plus\ utilis\uFFFD\ dans\ la\ *\ version\ 2.3.x\ de\ isis\ *\ \ *\ @author\ poussin\ */public\ class\ MetierMonitor\ {\ \ \ \ /**\ to\ use\ log\ facility,\ just\ put\ in\ your\ code\:\ log.info(\\"...\\=
-\ IsisContext.get().getMainConfig().getDefaultMapFile();\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ String\ shp\ =
-\ LogLevelUtil.getLogLevels(levels);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ create\ the\ levels\ reader\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ reader\ =
-\ Session.getDefaultInstance(props,\ null);\ \ \ \ \ \ \ \ //\ --\ Create\ a\ new\ message\ --\ \ \ \ \ \ \ \ Message\ msg\ =
-\ SimulationFilterUtil.createFilterModel(value);\ \ \ \ \ \ \ \ //\ to\ used\ directly\ model.getFilteredResult()\ in\ xml\ \ \ \ \ \ \ \ //\ we\ must\ fill\ filterModel\ result\ with\ original\ items\ \ \ \ \ \ \ \ filterModel.selectAll();\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ getSimulation().setEditable(false);\ \ \ \ \ \ \ \ model\ =
-\ SimulationFilterUtil.filterSimulation(filterModel);\ \ \ \ \ \ \ \ \ \ \ \ model.removeAllElements();\ \ \ \ \ \ \ \ \ \ \ \ for\ (String\ s\ \:\ result)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ model.addElement(s);\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ catch\ (Exception\ e)\ {\ \ \ \ \ \ \ \ \ \ \ \ log.warn(I18n._("could\ not\ filter\ on\ simulations=
-\ SimulationStorage.getSimulation(name);\ \ \ \ \ \ \ \ \ \ \ \ ResultEdit\ resEdit\ =
-\ SimulationStorage.getSimulation(name);\ \ \ \ \ \ \ \ \ \ \ \ try\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ storage.delete(false);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ initSimulation();\ \ \ \ \ \ \ \ \ \ \ \ }\ catch\ (Exception\ eee)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ log.warn("Can't\ delete\ simulation",\ eee);\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ }\ \ \ \ public\ void\ on_openWindowButton_clicked(){\ \ \ \ \ \ \ \ String\ name\ =
-\ System.getProperties();\ \ \ \ \ \ \ \ //\ --\ Attaching\ to\ default\ Session,\ or\ we\ could\ start\ a\ new\ one\ --\ \ \ \ \ \ \ \ props.put("mail.smtp.host",\ smtpServer);\ \ \ \ \ \ \ \ Session\ session\ =
-\ context.getSimulationStorage();\ \ \ \ \ \ \ \ SimulationParameter\ parameters\ =
-\ e.getId();\ \ \ \ \ \ \ \ SimulationControl\ control\ =
-\ e.getUnitsToScroll();\ \ \ \ \ \ \ \ long\ newOffset;\ \ \ \ \ \ \ \ newOffset\ =
-\ evt.getPropertyName();\ \ \ \ \ \ \ \ if\ (properyName.equals(LogConsole.DISPOSE_CHANGED_PROPERTY))\ {\ \ \ \ \ \ \ \ \ \ \ \ //\ ui\ required\ a\ dispose\ \ \ \ \ \ \ \ \ \ \ \ try\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ close();\ \ \ \ \ \ \ \ \ \ \ \ }\ catch\ (Exception\ e)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ log.warn(_("isisfish.error.log.console.dispose"\ ,this,e.getMessage()));\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ return;\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ //log.info(properyName\ +\ "\ \:\ "\ +\ evt.getNewValue());\ \ \ \ \ \ \ \ if\ (properyName.equals(RESET_CHANGED_PROPERTY))\ {\ \ \ \ \ \ \ \ \ \ \ \ //\ reset\ filter\ model\ \ \ \ \ \ \ \ \ \ \ \ model.setLevels(0);\ \ \ \ \ \ \ \ \ \ \ \ model.setSearchText("=
-\ false;\ \ \ \ }\ \ \ \ public\ void\ propertyChange(PropertyChangeEvent\ evt)\ {\ \ \ \ \ \ \ \ String\ properyName\ =
-\ filename\ +\ ".shp";\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ String\ ssx\ =
-\ filename\ +\ ".ssx";\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ addShapeLayer(filename,\ shp,\ ssx,\ "ff000000",\ "ffbdde83=
-\ from;\ \ \ \ \ \ \ \ this.logFile\ =
-\ getRowCount();\ \ \ \ \ \ \ \ fireTableRowsInserted(row,\ row);\ \ \ \ \ \ \ \ SimulationControl\ control\ =
-\ getSimulationControl(e.getId());\ \ \ \ \ \ \ \ control.addPropertyChangeListener(this);\ \ \ \ }\ \ \ \ /*\ (non-Javadoc)\ \ \ \ \ *\ @see\ SimulationQueueListener\#simulationRemoved(fr.ifremer.isisfish.simulator.SimulationQueueEvent)\ \ \ \ \ */\ \ \ \ public\ void\ simulationWillBeRemoved(SimulationQueueEvent\ e)\ {\ \ \ \ \ \ \ \ String\ id\ =
-\ getSimulationControl(e.getId());\ \ \ \ \ \ \ \ if\ (control\ \!=
-\ getSimulationIndex(id);\ \ \ \ \ \ \ \ if\ (isRowIndexValid(row))\ {\ \ \ \ \ \ \ \ \ \ \ \ fireTableRowsDeleted(row,\ row);\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ progress.remove(id);\ \ \ \ }\ \ \ \ /*\ (non-Javadoc)\ \ \ \ \ *\ @see\ SimulationQueueListener\#simulationStart(fr.ifremer.isisfish.simulator.SimulationQueueEvent)\ \ \ \ \ */\ \ \ \ public\ void\ simulationStart(SimulationQueueEvent\ e)\ {\ \ \ \ \ \ \ \ //\ nothing\ to\ do\ \ \ \ }\ \ \ \ /*\ (non-Javadoc)\ \ \ \ *\ @see\ SimulationQueueListener\#simulationStop(fr.ifremer.isisfish.simulator.SimulationQueueEvent)\ \ \ \ */\ \ \ \ public\ void\ simulationStop(SimulationQueueEvent\ e)\ {\ \ \ \ \ \ \ \ //\ nothing\ to\ do\ \ \ \ }}\ //\ SimulationQueueModel/*\ *\#\#%\ *\ Copyright\ (C)\ 2007\ *\ \ \ \ \ Ifremer,\ Code\ Lutin,\ C\uFFFDdric\ Pineau,\ Benjamin\ Poussin\ *\ *\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or\ *\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License\ *\ as\ published\ by\ the\ Free\ Software\ Foundation;\ either\ version\ 2\ *\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.\ *\ *\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,\ *\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of\ *\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the\ *\ GNU\ General\ Public\ License\ for\ more\ details.\ *\ *\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License\ *\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software\ *\ Foundation,\ Inc.,\ 59\ Temple\ Place\ -\ Suite\ 330,\ Boston,\ MA\ \ 02111-1307,\ USA.\ *\#\#%*//*\ *\ *\ SimulationExportResultWrapper.java\ *\ *\ Created\:\ 14\ nov.\ 07\ 00\:22\:51\ *\ *\ @author\ poussin\ *\ @version\ $Revision\:\ 1128\ $\ *\ *\ Last\ update\:\ $Date\:\ 2008-01-08\ 20\:21\:28\ +0100\ (mar,\ 08\ jan\ 2008)\ $\ *\ by\ \:\ $Author\:\ tchemit\ $\ */package\ fr.ifremer.isisfish.simulator;import\ java.io.File;import\ fr.ifremer.isisfish.IsisConfig;import\ fr.ifremer.isisfish.datastore.SimulationStorage;import\ fr.ifremer.isisfish.export.ExportHelper;/**\ *\ @author\ poussin\ *\ */public\ class\ SimulationExportResultWrapper\ implements\ SimulationListener\ {\ \ \ \ /*\ (non-Javadoc)\ \ \ \ \ *\ @see\ fr.ifremer.isisfish.simulator.SimulationListener\#afterSimulation(fr.ifremer.isisfish.simulator.SimulationContext)\ \ \ \ \ */\ \ \ \ public\ void\ afterSimulation(SimulationContext\ context)\ {\ \ \ \ \ \ \ \ SimulationStorage\ simulation\ =
-\ getSimulationNames();\ \ \ \ \ \ \ \ //\ create\ filter\ model\ \ \ \ \ \ \ \ filterModel\ =
-\ id;\ \ \ \ }\ \ \ \ \ \ \ \ /**\ \ \ \ \ *\ @return\ Returns\ the\ id.\ \ \ \ \ */\ \ \ \ public\ String\ getId()\ {\ \ \ \ \ \ \ \ return\ this.id;\ \ \ \ }\ \ \ \ }/*\ *\#\#%\ *\ Copyright\ (C)\ 2006\ *\ \ \ \ \ Ifremer,\ Code\ Lutin,\ C\uFFFDdric\ Pineau,\ Benjamin\ Poussin\ *\ *\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or\ *\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License\ *\ as\ published\ by\ the\ Free\ Software\ Foundation;\ either\ version\ 2\ *\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.\ *\ *\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,\ *\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of\ *\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the\ *\ GNU\ General\ Public\ License\ for\ more\ details.\ *\ *\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License\ *\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software\ *\ Foundation,\ Inc.,\ 59\ Temple\ Place\ -\ Suite\ 330,\ Boston,\ MA\ \ 02111-1307,\ USA.\ *\#\#%*//*\ *\ *\ PopulationMonitor.java\ *\ *\ Created\:\ 21\ ao\uFFFDt\ 2006\ 15\:41\:18\ *\ *\ @author\ poussin\ *\ @version\ $Revision\:\ 428\ $\ *\ *\ Last\ update\:\ $Date\:\ 2007-10-15\ 14\:56\:13\ +0200\ (lun,\ 15\ oct\ 2007)\ $\ *\ by\ \:\ $Author\:\ bpoussin\ $\ */package\ fr.ifremer.isisfish.simulator;import\ java.util.ArrayList;import\ java.util.HashMap;import\ java.util.List;import\ java.util.Map;import\ org.apache.commons.collections.MapIterator;import\ org.apache.commons.collections.keyvalue.MultiKey;import\ org.apache.commons.collections.map.MultiKeyMap;import\ org.apache.commons.logging.Log;import\ org.apache.commons.logging.LogFactory;import\ org.codelutin.math.matrix.MatrixFactory;import\ org.codelutin.math.matrix.MatrixIterator;import\ org.codelutin.math.matrix.MatrixND;import\ fr.ifremer.isisfish.entities.Population;import\ fr.ifremer.isisfish.entities.PopulationGroup;import\ fr.ifremer.isisfish.entities.PopulationSeasonInfo;import\ fr.ifremer.isisfish.entities.Species;import\ fr.ifremer.isisfish.entities.Zone;import\ fr.ifremer.isisfish.types.Date;import\ fr.ifremer.isisfish.types.Month;/**\ *\ \ *\ @author\ poussin\ */public\ class\ PopulationMonitor\ {\ \ \ \ \ \ \ \ /**\ to\ use\ log\ facility,\ just\ put\ in\ your\ code\:\ log.info(\\"...\\=
-\ levels\ +\ "";\ \ \ \ \ \ \ \ LevelsLineReader\ reader\ =
-\ levelsReader;\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ if\ (reader\ =
-\ logFile;\ \ \ \ \ \ \ \ this.simulationFile\ =
-\ model.getFirstLinePosition()\ +\ unitsToScroll;\ \ \ \ \ \ \ \ if\ (unitsToScroll\ >\ 0)\ {\ \ \ \ \ \ \ \ \ \ \ \ if\ (model.isEOF())\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ nothing\ to\ do\ we\ are\ already\ at\ the\ tail\ of\ the\ stream\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ return;\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ else\ {\ \ \ \ \ \ \ \ \ \ \ \ if\ (model.isBOF())\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ nothing\ to\ do\ we\ are\ already\ at\ the\ head\ of\ the\ stream\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ return;\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ try\ {\ \ \ \ \ \ \ \ \ \ \ \ dontAdjust\ =
-\ module.getClazz().getMethod("checkout",String.class);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ method.invoke(module.getClazz(),category);\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ catch\ (Exception\ eee)\ {\ \ \ \ \ \ \ \ \ \ \ \ log.warn(org.codelutin.i18n.I18n._("isisfish.error.checkout.module",\ f.getAbsolutePath()),\ eee);\ \ \ \ \ \ \ \ }\ \ \ \ }\ \ \ \ public\ static\ void\ doCheckoutRegion(VCSHandler\ handler,\ \ String\ category,boolean\ create)\ {\ \ \ \ \ \ \ \ IsisConfig.Module\ module\ =
-\ new\ DefaultComboBoxModel(value.toArray());\ \ \ \ \ \ \ \ getSimulation().setModel(model);\ \ \ \ \ \ \ \ getSimulation().setSelectedItem(null);\ \ \ \ }\ \ \ \ public\ void\ on_Resultat_destroy_event(){\ \ \ \ \ \ \ \ dispose();\ \ \ \ }\ \ \ \ public\ void\ on_simulation_selection_notify_event(ItemEvent\ e){\ \ \ \ \ \ \ \ //\tsetSelectedSimulation((Simulation)getSimulation().getSelectedItem());\ \ \ \ }\ \ \ \ /**\ \ \ \ *\ Get\ the\ value\ of\ selectedSimulation.\ \ \ \ *\ @return\ value\ of\ selectedSimulation.\ \ \ \ */\ \ \ \ //\ \ \ \ public\ Simulation\ getSelectedSimulation()\ {\ \ \ \ \ \ \ \ //return\ selectedSimulation;\ \ \ \ //}\ \ \ \ /**\ \ \ \ *\ Set\ the\ value\ of\ selectedSimulation.\ \ \ \ *\ @param\ v\ \ Value\ to\ assign\ to\ selectedSimulation.\ \ \ \ */\ \ \ \ //public\ void\ setSelectedSimulation(Simulation\ v)\ {\ \ \ \ \ \ \ \ //this.selectedSimulation\ =
-\ new\ File(module.getDirectory(),category);\ \ \ \ \ \ \ \ \ \ \ \ try\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ (\!f.exists()||\ \!VCSHelper.isFileInWorkingCopy(f,\ handler,true))\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ fr.ifremer.isisfish.datastore.RegionStorage.checkout(\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ handler.getLocalDatabasePath(),\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ module.value()\ +\ "/"\ +category\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ );\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ }\ catch\ (Exception\ eee)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ log.warn(org.codelutin.i18n.I18n._("isisfish.error.checkout.module",\ f.getAbsolutePath()),\ eee);\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ }}/*\ *\#\#%*\ Copyright\ (C)\ 2002,\ 2003,\ 2004,\ 2005,\ 2006,\ 2007\ Code\ Lutin,*\ Benjamin\ Poussin,\ Tony\ Chemit***\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or*\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License*\ as\ published\ by\ the\ Free\ Software\ Foundation;\ either\ version\ 2*\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.**\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,*\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of*\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the*\ GNU\ General\ Public\ License\ for\ more\ details.**\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License*\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software*\ Foundation,\ Inc.,\ 59\ Temple\ Place\ -\ Suite\ 330,\ Boston,\ MA\ \ 02111-1307,\ USA.*\#\#%*/package\ fr.ifremer.isisfish.versionning.vcsSvn;import\ fr.ifremer.isisfish.versionning.IsisVcsConfig;import\ static\ org.codelutin.i18n.I18n._;import\ org.codelutin.vcs.AbstractVCSHandler;import\ org.codelutin.vcs.VCSConfig;import\ org.codelutin.vcs.VCSException;import\ org.codelutin.vcs.VCSHelper;import\ static\ org.codelutin.vcs.VCSHelper.isFileInCheckedDir;import\ org.codelutin.vcs.VCSRuntimeException;import\ org.codelutin.vcs.VCSState;import\ static\ org.codelutin.vcs.VCSState.OUT_OF_DATE;import\ static\ org.codelutin.vcs.VCSState.OUT_OF_DATE_AND_MODIFIED;import\ static\ org.codelutin.vcs.VCSState.UP_TO_DATE;import\ org.codelutin.vcs.VCSStatus;import\ org.tmatesoft.svn.core.ISVNDirEntryHandler;import\ org.tmatesoft.svn.core.ISVNLogEntryHandler;import\ org.tmatesoft.svn.core.SVNCommitInfo;import\ org.tmatesoft.svn.core.SVNDirEntry;import\ org.tmatesoft.svn.core.SVNException;import\ org.tmatesoft.svn.core.SVNLogEntry;import\ org.tmatesoft.svn.core.SVNNodeKind;import\ org.tmatesoft.svn.core.SVNURL;import\ org.tmatesoft.svn.core.io.SVNRepository;import\ org.tmatesoft.svn.core.wc.ISVNOptions;import\ org.tmatesoft.svn.core.wc.SVNClientManager;import\ org.tmatesoft.svn.core.wc.SVNRevision;import\ org.tmatesoft.svn.core.wc.SVNStatus;import\ org.tmatesoft.svn.core.wc.SVNStatusType;import\ static\ org.tmatesoft.svn.core.wc.SVNStatusType.*;import\ org.tmatesoft.svn.core.wc.SVNWCClient;import\ org.tmatesoft.svn.core.wc.SVNWCUtil;import\ java.io.ByteArrayOutputStream;import\ java.io.File;import\ java.io.IOException;import\ java.util.ArrayList;import\ java.util.Arrays;import\ java.util.Collection;import\ java.util.Collections;import\ java.util.Iterator;import\ java.util.List;/**\ *\ VCSHandler\ implementation\ for\ svn\ *\ *\ @author\ chemit\ */public\ final\ class\ SVNHandler\ extends\ AbstractVCSHandler\ {\ \ \ \ protected\ SVNURL\ repositoryURL;\ \ \ \ protected\ SVNRepository\ repository;\ \ \ \ protected\ SVNClientManager\ ourClientManager;\ \ \ \ protected\ SVNWCClient\ ourWcClient;\ \ \ \ public\ SVNHandler(VCSConfig\ config)\ {\ \ \ \ \ \ \ \ super(config,\ ".svn",\ "entries=
-\ new\ File(module.getDirectory(),category);\ \ \ \ \ \ \ \ try\ {\ \ \ \ \ \ \ \ \ \ \ \ if\ (\!f.exists()||\ \!VCSHelper.isFileInWorkingCopy(f,\ handler,true))\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Method\ method\ =
-\ new\ File(readerDirectory,\ "offsets_"\ +\ levels);\ \ \ \ \ \ \ \ \ \ \ \ FileOffsetReader\ offsetReader\ =
-\ new\ FileOffsetReader(offsetFile);\ \ \ \ \ \ \ \ \ \ \ \ if\ (levels\ =
-\ new\ LevelsLineReader(getLevelReader(0),\ offsetReader,\ logLevels);\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ reader.setId(levelsStr);\ \ \ \ \ \ \ \ \ \ \ \ levelsReaders.add(reader);\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ if\ (\!reader.isOpen())\ {\ \ \ \ \ \ \ \ \ \ \ \ //\ open\ reader\ \ \ \ \ \ \ \ \ \ \ \ reader.open();\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ log.info(reader);\ \ \ \ \ \ \ \ return\ reader;\ \ \ \ }\ \ \ \ protected\ void\ openReader(LineReader\ reader)\ throws\ IOException\ {\ \ \ \ \ \ \ \ this.reader\ =
-\ new\ LevelsLineReader(model.getLogFile(),\ offsetReader);\ \ \ \ \ \ \ \ \ \ \ \ }\ else\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ other\ level\ readers\ depens\ on\ all\ levels\ reader\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ LogLevel[]\ logLevels\ =
-\ new\ LogMail(\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ statusBar,\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ model.getFrom(),\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ model.getLogFile(),\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ model.getLogFile().getParentFile(),\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ model.getSmtpServer());\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ logMail.setVisible(true);\ \ \ \ }}/**\ \#\#%\ Copyright\ (C)\ 2002,\ 2003,\ 2004,\ 2005,\ 2006,\ 2007\ Code\ Lutin,*\ Benjamin\ Poussin,\ Tony\ Chemit***\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or*\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License*\ as\ published\ by\ the\ Free\ Software\ Foundation;\ either\ version\ 2*\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.**\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,*\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of*\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the*\ GNU\ General\ Public\ License\ for\ more\ details.**\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License*\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software*\ Foundation,\ Inc.,\ 59\ Temple\ Place\ -\ Suite\ 330,\ Boston,\ MA\ \ 02111-1307,\ USA.*\ \#\#%\ */package\ fr.ifremer.isisfish.logging.console;import\ javax.swing.event.ChangeEvent;import\ javax.swing.event.ChangeListener;import\ javax.swing.event.EventListenerList;import\ java.io.File;import\ java.util.ArrayList;import\ java.util.List;/**\ *\ This\ class\ is\ the\ model\ used\ in\ LogConsole.\ *\ <p/>\ *\ The\ model\ deals\ with\ ChangeEvent\ to\ notify\ ui,\ model\ has\ changed.\ *\ *\ @author\ chemit\ */public\ class\ LogConsoleModel\ {\ \ \ \ /**\ to\ use\ log\ facility,\ just\ put\ in\ your\ code\:\ log.info(\\"...\\=
-\ new\ MimeMessage(session);\ \ \ \ \ \ \ \ //\ --\ Set\ the\ FROM\ and\ TO\ fields\ --\ \ \ \ \ \ \ \ msg.setFrom(new\ InternetAddress(from));\ \ \ \ \ \ \ \ msg.setRecipients(Message.RecipientType.TO,\ InternetAddress.parse(to,\ false));\ \ \ \ \ \ \ \ MimeMultipart\ bodyMime\ =
-\ new\ MimeMultipart("mixed=
-\ new\ PatternLineReader(parent,\ new\ MemoryOffsetReader(5000),\ searchText,\ 0);\ \ \ \ \ \ \ \ reader.setId(parent.getId()\ +\ "\:"\ +\ searchText);\ \ \ \ \ \ \ \ log.info(reader);\ \ \ \ \ \ \ \ return\ reader;\ \ \ \ }\ \ \ \ //TODO\ Improve\ algorithm\ \:\ always\ try\ to\ find\ the\ closest\ reader\ to\ use\ \ \ \ protected\ LineReader\ getLevelReader(int\ levels)\ throws\ IOException\ {\ \ \ \ \ \ \ \ String\ levelsStr\ =
-\ new\ ResultEdit(simulation);\ \ \ \ \ \ \ \ \ \ \ \ JInternalFrame\ intFrame\ =
-\ null\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ &&\ parameters.getExportNames().size()\ >\ 0)\ {\ \ \ \ \ \ \ \ \ \ \ \ File\ exportDir\ =
-\ null\ &&\ reader.isOpen())\ {\ \ \ \ \ \ \ \ \ \ \ \ try\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ reader.close();\ \ \ \ \ \ \ \ \ \ \ \ }\ catch\ (IOException\ e)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ log.warn(I18n._("could\ not\ close\ reader\ {0}",\ reader));\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ @Override\ \ \ \ protected\ void\ finalize()\ throws\ Throwable\ {\ \ \ \ \ \ \ \ super.finalize();\ \ \ \ \ \ \ \ close();\ \ \ \ }\ \ \ \ /**\ \ \ \ \ *\ read\ the\ required\ frame\ from\ current\ reader\ \ \ \ \ *\ \ \ \ \ *\ @param\ offset\ the\ offset\ to\ use\ \ \ \ \ *\ @throws\ IOException\ if\ any\ problem\ while\ reading\ \ \ \ \ */\ \ \ \ public\ void\ read(long\ offset)\ throws\ IOException\ {\ \ \ \ \ \ \ \ if\ (offset\ <\ 0)\ {\ \ \ \ \ \ \ \ \ \ \ \ offset\ =
-\ null)\ try\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ reader.close();\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\ catch\ (IOException\ e)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //TODO\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ }\ \ \ \ public\ Properties\ getData()\ {\ \ \ \ \ \ \ \ return\ data;\ \ \ \ }\ \ \ \ public\ String\ getName()\ {\ \ \ \ \ \ \ \ return\ name;\ \ \ \ }}/*\ *\#\#%\ *\ Copyright\ (C)\ 2006\ *\ \ \ \ \ Ifremer,\ Code\ Lutin,\ C\uFFFDdric\ Pineau,\ Benjamin\ Poussin\ *\ *\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or\ *\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License\ *\ as\ published\ by\ the\ Free\ Software\ Foundation;\ either\ version\ 2\ *\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.\ *\ *\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,\ *\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of\ *\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the\ *\ GNU\ General\ Public\ License\ for\ more\ details.\ *\ *\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License\ *\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software\ *\ Foundation,\ Inc.,\ 59\ Temple\ Place\ -\ Suite\ 330,\ Boston,\ MA\ \ 02111-1307,\ USA.\ *\#\#%*//*\ *\ *\ SimulationQueueModel.java\ *\ *\ Created\:\ 18\ ao\uFFFDt\ 2006\ 00\:05\:41\ *\ *\ @author\ poussin\ *\ @version\ $Revision\:\ 602\ $\ *\ *\ Last\ update\:\ $Date\:\ 2007-11-01\ 21\:39\:12\ +0100\ (jeu,\ 01\ nov\ 2007)\ $\ *\ by\ \:\ $Author\:\ tchemit\ $\ */package\ fr.ifremer.isisfish.simulator;/**\ @author\ poussin\ */public\ class\ SimulationQueueModel\ extends\ AbstractSimulationQueueModel\ {\ \ \ \ /*\ (non-Javadoc)\ \ \ \ \ *\ @see\ AbstractSimulationQueueModel()\ \ \ \ \ */\ \ \ \ public\ SimulationQueueModel()\ {\ \ \ \ \ \ \ \ super();\ \ \ \ }\ \ \ \ /*\ (non-Javadoc)\ \ \ \ \ *\ @see\ AbstractSimulationQueueModel(SimulationManager)\ \ \ \ \ */\ \ \ \ public\ SimulationQueueModel(SimulationManager\ queue)\ {\ \ \ \ \ \ \ \ super(queue);\ \ \ \ }\ \ \ \ /*\ (non-Javadoc)\ \ \ \ \ *\ @see\ AbstractSimulationQueueModel at getSimulationIds()\ \ \ \ \ */\ \ \ \ protected\ java.util.List<String>\ getSimulationIds()\ {\ \ \ \ \ \ \ \ return\ getQueue().ids;\ \ \ \ }\ \ \ \ /*\ (non-Javadoc)\ \ \ \ \ *\ @see\ AbstractSimulationQueueModel at getQueueItemsAsMap()\ \ \ \ \ */\ \ \ \ protected\ java.util.Map<String,\ SimulationManager.QueueItem>\ getQueueItemsAsMap()\ {\ \ \ \ \ \ \ \ return\ getQueue().map;\ \ \ \ }\ \ \ \ /*\ (non-Javadoc)\ \ \ \ \ *\ @see\ SimulationQueueListener\#simulationAdded(fr.ifremer.isisfish.simulator.SimulationQueueEvent)\ \ \ \ \ */\ \ \ \ public\ void\ simulationAdded(SimulationQueueEvent\ e)\ {\ \ \ \ \ \ \ \ int\ row\ =
-\ null)\ {\ \ \ \ \ \ \ \ \ \ \ \ File\ offsetFile\ =
-\ null)\ {\ \ \ \ \ \ \ \ \ \ \ \ control.removePropertyChangeListener(this);\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ int\ row\ =
-\ null){\ \ \ \ \ \ \ \ \ \ \ \ SimulationStorage\ simulation\ =
-\ null){\ \ \ \ \ \ \ \ \ \ \ \ SimulationStorage\ storage\ =
-\ null;\ \ \ \ \ \ \ \ for\ (LineReaderUtil.LevelsLineReader\ levelsReader\ \:\ levelsReaders)\ {\ \ \ \ \ \ \ \ \ \ \ \ if\ (levelsReader.getId().equals(levelsStr))\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ reader\ =
-\ reader.readLine(offset,\ model.nbLinesInEditor);\ \ \ \ \ \ \ \ //\ mark\ the\ new\ first\ position\ \ \ \ \ \ \ \ model.setFirstLinePosition(offset);\ \ \ \ \ \ \ \ //\ add\ lines\ in\ model\ \ \ \ \ \ \ \ model.allItems.clear();\ \ \ \ \ \ \ \ model.allItems.addAll(Arrays.asList(result));\ \ \ \ \ \ \ \ //\ notify\ ui\ that\ model\ changed\ \ \ \ \ \ \ \ model.fireStateChanged();\ \ \ \ }\ \ \ \ public\ void\ mouseWheelMoved(MouseWheelEvent\ e)\ {\ \ \ \ \ \ \ \ int\ unitsToScroll\ =
-\ reader;\ \ \ \ \ \ \ \ if\ (\!this.reader.isOpen())\ {\ \ \ \ \ \ \ \ \ \ \ \ //\ open\ reader\ \ \ \ \ \ \ \ \ \ \ \ this.reader.open();\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ //\ save\ the\ number\ of\ lines\ of\ reader\ in\ model\ \ \ \ \ \ \ \ model.nbLines\ =
-\ simulation.getDirectory();\ \ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ //\ Export\ des\ r\uFFFDsultats\ \ \ \ \ \ \ \ //\ \ \ \ \ \ \ \ if\ (parameters.getExportNames()\ \!=
-\ simulation.getParameter();\ \ \ \ \ \ \ \ File\ rootDirectory\ =
-\ simulationFile;\ \ \ \ \ \ \ \ this.smtpServer\ =
-\ smtpServer;\ \ \ \ \ \ \ \ this.statusBar\ =
-\ statusBar;\ \ \ \ \ \ \ \ sendMail.addActionListener(new\ ActionListener()\ {\ \ \ \ \ \ \ \ \ \ \ \ public\ void\ actionPerformed(ActionEvent\ e)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ try\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ sendMail(mailTo.getText(),\ content.getText(),\ sendAll.isSelected());\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ statusBar.setStatus(_("isisfish.log.mail.send"\ ,\ to));\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\ catch\ (Exception\ eee)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ statusBar.setStatus(_("isisfish.log.mail.failed",\ smtpServer));\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\ finally\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ dispose();\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ });\ \ \ \ }\ \ \ \ public\ void\ setTo(String\ to)\ {\ \ \ \ \ \ \ \ this.to\ =
-\ statusBar;\ \ \ \ }\ \ \ \ public\ void\ openLogMail()\ {\ \ \ \ \ \ \ \ if\ (logMail=
-\ this.reader.getNbLines();\ \ \ \ }\ \ \ \ public\ void\ addPropertyChangeListener(PropertyChangeListener\ listener)\ {\ \ \ \ \ \ \ \ propertyListeners.addPropertyChangeListener(listener);\ \ \ \ }\ \ \ \ public\ void\ addPropertyChangeListener(String\ propertyName,\ PropertyChangeListener\ listener)\ {\ \ \ \ \ \ \ \ propertyListeners.addPropertyChangeListener(propertyName,\ listener);\ \ \ \ }\ \ \ \ public\ void\ removePropertyChangeListener(PropertyChangeListener\ listener)\ {\ \ \ \ \ \ \ \ propertyListeners.removePropertyChangeListener(listener);\ \ \ \ }\ \ \ \ public\ void\ removePropertyChangeListener(String\ propertyName,\ PropertyChangeListener\ listener)\ {\ \ \ \ \ \ \ \ propertyListeners.removePropertyChangeListener(propertyName,\ listener);\ \ \ \ }\ \ \ \ public\ StatusBar\ getStatusBar()\ {\ \ \ \ \ \ \ \ return\ statusBar;\ \ \ \ }\ \ \ \ public\ void\ setStatusBar(StatusBar\ statusBar)\ {\ \ \ \ \ \ \ \ this.statusBar\ =
-\ to;\ \ \ \ }\ \ \ \ /**\ \ \ \ \ *\ Send\ an\ email\ using\ the\ given\ informations\ (stmpServer,\ toAddress,\ \ \ \ \ *\ fromAddress,\ subject\ and\ body).\ \ \ \ \ *\ \ \ \ \ *\ @param\ to\ \ \ \ \ \ \ adr\ to\ send\ the\ mail\ \ \ \ \ *\ @param\ text\ \ \ \ \ message\ text\ \ \ \ \ *\ @param\ selected\ if\ <code>true</code>\ send\ all\ simulation\ zip,\ \ \ \ \ *\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ or\ just\ the\ file\ \ \ \ \ *\ @throws\ java.io.IOException\ \ \ \ \ \ \ \ \ \ \ if\ any\ problem\ while\ creatingthe\ zip\ \ \ \ \ *\ @throws\ javax.mail.MessagingException\ if\ any\ problem\ while\ creating\ \ \ \ \ *\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ the\ message\ or\ while\ the\ send\ \ \ \ \ */\ \ \ \ public\ void\ sendMail(String\ to,\ String\ text,\ boolean\ selected)\ throws\ IOException,\ MessagingException\ {\ \ \ \ \ \ \ \ Properties\ props\ =
-\ true;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ read(e.getValue());\ \ \ \ \ \ \ \ \ \ \ \ }\ catch\ (IOException\ e1)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ log.warn(I18n._("could\ not\ read\ at\ offset\ {0}\ for\ reason\ {1}",\ e.getValue(),\ e1.getMessage()));\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ dontAdjust\ =
-\ true;\ \ \ \ \ \ \ \ \ \ \ \ read(newOffset);\ \ \ \ \ \ \ \ }\ catch\ (IOException\ e1)\ {\ \ \ \ \ \ \ \ \ \ \ \ log.warn(I18n._("could\ not\ read\ at\ offset\ {0}\ for\ reason\ {1}",\ newOffset,\ e1.getMessage()));\ \ \ \ \ \ \ \ }\ \ \ \ }\ \ \ \ public\ void\ adjustmentValueChanged(AdjustmentEvent\ e)\ {\ \ \ \ \ \ \ \ if\ (\!e.getValueIsAdjusting()\ &&\ \!dontAdjust)\ {\ \ \ \ \ \ \ \ \ \ \ \ try\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //TODO\ Fix\ bug\ \:sometimes\ when\ going\ at\ tail,\ it\ goes\ head\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //TODO\ (the\ offset\ must\ not\ be\ good...)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //log.info("value\:"+e.getValue());\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ dontAdjust\ =
-\ v;\ \ \ \ //}\ \ \ \ public\ void\ on_supprimerSimulationButton_clicked(){\ \ \ \ \ \ \ \ String\ name\ =
-Checkout\ pom.xml\ to\ {0}",\ file.getPath()));\ \ \ \ \ \ \ \ vcsHandler.update(file);\ \ \ \ \ \ \ \ getContext().setQuit(true);\ \ \ \ }}\ /*\ *\ \#\#%\ Copyright\ (C)\ 2002,\ 2003,\ 2004,\ 2005,\ 2006,\ 2007\ Code\ Lutin,*\ Benjamin\ Poussin,\ Tony\ Chemit***\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or*\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License*\ as\ published\ by\ the\ Free\ Software\ Foundation;\ either\ version\ 2*\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.**\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,*\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of*\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the*\ GNU\ General\ Public\ License\ for\ more\ details.**\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License*\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software*\ Foundation,\ Inc.,\ 59\ Temple\ Place\ -\ Suite\ 330,\ Boston,\ MA\ \ 02111-1307,\ USA.*\ \#\#%\ */package\ fr.ifremer.isisfish.commandline.actions;import\ fr.ifremer.isisfish.IsisConfig;import\ fr.ifremer.isisfish.datastore.AnalysePlanStorage;import\ fr.ifremer.isisfish.datastore.ExportStorage;import\ fr.ifremer.isisfish.datastore.FormuleStorage;import\ fr.ifremer.isisfish.datastore.RuleStorage;import\ fr.ifremer.isisfish.datastore.ScriptStorage;import\ fr.ifremer.isisfish.datastore.SimulatorStorage;import\ java.io.File;import\ java.util.ArrayList;import\ java.util.List;import\ java.util.regex.Pattern;/**\ *\ The\ class\ to\ define\ all\ actions\ on\ scripts\ or\ data\ (region,\ simulations)\ \ that\ *\ IsisFish\ can\ launch\ at\ init\ time.\ *\ *\ @author\ chemit\ */public\ class\ ScriptUtil\ {\ \ \ \ /**\ \ \ \ \ *\ Pour\ v\uFFFDrifier\ q'un\ fichier\ existe.\ \ \ \ \ *\ \ \ \ \ *\ @param\ file\ \ the\ file\ dont\ on\ doit\ v\uFFFDrifier\ l'existence\ \ \ \ \ *\ @param\ force\ flag\ pour\ d\uFFFDclancher\ une\ exception,\ si\ fichier\ non\ trouv\uFFFD.\ \ \ \ \ */\ \ \ \ public\ static\ void\ checkNotFileExist(File\ file,\ boolean\ force)\ {\ \ \ \ \ \ \ \ if\ (file.exists()\ &&\ \!force)\ {\ \ \ \ \ \ \ \ \ \ \ \ //\ fatal\ error\ \ \ \ \ \ \ \ \ \ \ \ throw\ new\ IllegalArgumentException("destination\ already\ exists\ "\ +\ file\ +\ "\ use\ \\'force\\'\ argument\ to\ force\ overwrite=
+Can't\ add\ result\ '%1$s'\ at\ date\ %2$s=Can't add result '%1$s' at date %2$s
+Can't\ evaluate\ simulation\ prescript=Can't evaluate simulation prescript
+Can't\ get\ result\:\ %1$s=Can't get result\: %1$s
+Can't\ create\ simulation\ logger=Can't create simulation logger
+Can't\ instanciate\ export\ %1$s=Can't instanciate export %1$s
+Checkout\ pom.xml\ to\ %1$s=
Info=Info
-could\ not\ close\ reader\ {0}",\ levelsReader));\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ if\ (reader\ \!=
-could\ not\ create\ simulation\ filter\ model\ for\ reason\ {0}",e.getMessage()),e);\ \ \ \ \ \ \ \ }\ \ \ \ }\ \ \ \ private\ void\ initSimulation()\ throws\ IOException,\ ParseException\ {\ \ \ \ \ \ \ \ //\ keep\ in\ context\ list\ of\ old\ simulation\ names\ (for\ filter\ process)\ \ \ \ \ \ \ \ java.util.List<String>\ value\ =
-filter\ loaded\ in\ {0}\ ms\ \:\ found\ {1}\ lines.",\ (System.currentTimeMillis()\ -\ t0),\ reader.getNbLines()));\ \ \ \ \ \ \ \ }\ catch\ (IOException\ e)\ {\ \ \ \ \ \ \ \ \ \ \ \ log.warn("could\ not\ open\ reader\ ["\ +\ this.reader\ +\ "]\ for\ reason\ "\ +\ e.getMessage());\ \ \ \ \ \ \ \ }\ \ \ \ }\ \ \ \ protected\ LineReader\ getPatternReader(String\ searchText,\ LineReader\ parent)\ {\ \ \ \ \ \ \ \ LineReader\ reader;\ \ \ \ \ \ \ \ reader\ =
+Region\ %1$s\ allready\ exist\ in\ repository.\ Can't\ import=
+could\ not\ close\ reader\ %1$s=could not close reader %1$s
+could\ not\ create\ simulation\ filter\ model\ for\ reason\ %1$s=could not create simulation filter model for reason %1$s
+could\ not\ filter\ on\ simulations=could not filter on simulations
+could\ not\ found\ log\ file\ %1$s=could not found log file %1$s
+could\ not\ read\ at\ offset\ %1$s\ for\ reason\ %2$s=could not read at offset %1$s for reason %2$s
+filter\ loaded\ in\ %1$s\ ms\ \:\ found\ %2$s\ lines.=filter loaded in %1$s ms \: found %2$s lines.
isisfish.about.site=http\://isisfish.labs.libre-entreprise.org - by B.Poussin
isisfish.about.text=Simulateur Isis-Fish
isisfish.about.title=A propos...
@@ -85,12 +24,14 @@
isisfish.advancedParams.simulationCache=Simulation cache
isisfish.advancedParams.simulationStatistique=Simulation statistique
isisfish.advancedParams.simulatorUse=Simulateur \u00E0 utiliser
+isisfish.advancedParams.subProcessSimulation=
isisfish.cell.comments=Commentaires
isisfish.cell.land=Land
isisfish.cell.latitude=Latitude
isisfish.cell.longitude=Longitude
isisfish.cell.name=Nom
isisfish.cell.title=Saisie des mailles
+isisfish.change.equation=Ne peut pas changer l'\u00E9quation
isisfish.common.add=Ajouter
isisfish.common.add.short=isisfish.common.add.short
isisfish.common.addQueue=Ajouter \u00E0 la queue des simulations
@@ -107,14 +48,17 @@
isisfish.common.emigration=\u00E9migration
isisfish.common.empty=vide
isisfish.common.error=Erreur
+isisfish.common.file=Fichier
isisfish.common.finish=Terminer
isisfish.common.gear=Engin
isisfish.common.immigration=immigration
isisfish.common.info=Info
isisfish.common.migration=migration
+isisfish.common.month=mois %1$s
isisfish.common.new=Nouveau
isisfish.common.newMatrix=Nouvelle matrice
isisfish.common.next=Suivant
+isisfish.common.no=No
isisfish.common.ok=Ok
isisfish.common.openEditor=Ouvrir l'\u00E9diteur
isisfish.common.populationGroup=Groupe de population
@@ -141,6 +85,73 @@
isisfish.common.warn=Warn
isisfish.common.year=ann\u00E9e
isisfish.common.zone=Zone
+isisfish.config.h2.description=La configuration h2 utilis\u00E9e
+isisfish.config.h2.h2BytecodeProvider.description=TODO
+isisfish.config.h2.h2CurrentSessionContextClass.description=TODO
+isisfish.config.h2.h2Dialect.description=TODO
+isisfish.config.h2.h2Driver.description=TODO
+isisfish.config.h2.h2MemBytecodeProvider.description=TODO
+isisfish.config.h2.h2MemDialect.description=TODO
+isisfish.config.h2.h2MemDriver.description=TODO
+isisfish.config.h2.h2MemPass.description=TODO
+isisfish.config.h2.h2MemType.description=TODO
+isisfish.config.h2.h2MemURL.description=TODO
+isisfish.config.h2.h2MemUser.description=TODO
+isisfish.config.h2.h2Pass.description=TODO
+isisfish.config.h2.h2Type.description=TODO
+isisfish.config.h2.h2URL.description=TODO
+isisfish.config.h2.h2User.description=TODO
+isisfish.config.h2.migrationApplicationVersion.description=TODO
+isisfish.config.h2.migrationCallBackhandlers.description=TODO
+isisfish.config.h2.migrationModelNames.description=TODO
+isisfish.config.h2.migrationPreviousMappingDirectory.description=TODO
+isisfish.config.h2.migrationTopiaService.description=TODO
+isisfish.config.h2.storageData.description=le nom du r\u00E9pertoire o\u00F9 stocker les donn\u00E9es d'un data storage (r\u00E9gion, simulation)
+isisfish.config.h2.updateschemaDatabase.description=flag pour indiquer s'il faut ou non updater le sch\u00E9ma de la base
+isisfish.config.main.compileDirectory.description=le r\u00E9pertoire o\u00F9 sont compil\u00E9s les scripts
+isisfish.config.main.configFileName.description=le fichier de configuration \u00E0 utiliser
+isisfish.config.main.dataBackupFilename.description=le nom du fichier contenant la d\u00E9finition d'un data storage (r\u00E9gion, simulation)
+isisfish.config.main.defaultBackupDirectory.description=le r\u00E9pertoire o\u00F9 stocker les backups des donn\u00E9es
+isisfish.config.main.defaultExportDirectory.description=le r\u00E9pertoire o\u00F9 exporter les r\u00E9sultats des simulations
+isisfish.config.main.defaultExportNames.description=les noms des exports \u00E0 effectuer apr\u00E8s une simulation
+isisfish.config.main.defaultMapFile.description=TODO
+isisfish.config.main.defaultResultNames.description=les noms des r\u00E9sultats \u00E0 traiter apr\u00E8s une simulation
+isisfish.config.main.defaultSimulator.description=le nom du simulateur par d\u00E9faut \u00E0 utiliser lors d'une simulation
+isisfish.config.main.defaultTagValue.description=TODO
+isisfish.config.main.description=La configuration principale d'IsisFish
+isisfish.config.main.encoding.description=l'encoding du syst\u00E8me
+isisfish.config.main.javadocURL.description=l'url de la javadoc des scripts
+isisfish.config.main.localSimulator.description=pour indiquer si les simulations sont \u00E0 effectuer localement
+isisfish.config.main.locale.description=la locale utilisateur
+isisfish.config.main.login.description=le login pour se connecter au serveur de simulations distant
+isisfish.config.main.password.description=le mot de passe pour se connecter au serveur de simulations distant
+isisfish.config.main.projectName.description=le nom du projet
+isisfish.config.main.regionMap.description=le nom du r\u00E9pertoire contenant les maps d'une r\u00E9gion
+isisfish.config.main.resultExport.description=TODO
+isisfish.config.main.simulationInformationFilename.description=le nom du fichier d'informations d'une simulation
+isisfish.config.main.simulationParametersFilename.description=le nom du fichier de param\u00E9trage d'une simulation
+isisfish.config.main.simulationReportMail.description=Le courriel \u00E0 utiliser pour envoyer les rapports de simulation
+isisfish.config.main.simulationResultXmlFilename.description=le nom du fichier d'export des r\u00E9sultats d'une simulation au format xml
+isisfish.config.main.simulationServer.description=l'url du serveur de simulations distant
+isisfish.config.main.simulationShowOnlyError.description=pour indiquer si l'on doit conserver dans l'UI des simulations termin\u00E9es uniquement celles avec erreur
+isisfish.config.main.simulationShowOnlyQueue.description=pour indiquer si l'on doit conserver dans l'UI des simulations termin\u00E9es uniquement celles effectu\u00E9es localement
+isisfish.config.main.smtpServer.description=le nom du serveur smpt \u00E0 utiliser pour envoyer les courriels
+isisfish.config.main.userMail.description=le courriel de l'utilisateur
+isisfish.config.main.userName.description=le nom - pr\u00E9nom de l'utilisateur
+isisfish.config.main.version.description=la version d'IsisFish
+isisfish.config.vcs.databaseVersion.description=la version de des donn\u00E9es \u00E0 utiliser
+isisfish.config.vcs.description=La configuration vcs d'IsisFish
+isisfish.config.vcs.hostName.description=le nom du serveur vcs \u00E0 utiliser
+isisfish.config.vcs.keyFile.description=le chemin complet du fichier de clef priv\u00E9e ssh2 \u00E0 utiliser lors d'une connexion s\u00E9curis\u00E9e
+isisfish.config.vcs.localDatabasePath.description=
+isisfish.config.vcs.noPassPhrase.description=pour indiquer si la clef priv\u00E9e ssh2 utilis\u00E9e pour communiquer avec le serveur vcs contient est prot\u00E9g\u00E9 par une passe-phrase
+isisfish.config.vcs.passphrase.description=la passe-phrase utilis\u00E9e pour prot\u00E9ger la clef priv\u00E9e ssh
+isisfish.config.vcs.remoteDatabase.description=le nom du module de donn\u00E9es sur le serveur vcs
+isisfish.config.vcs.remotePath.description=le chemin jusqu'au parent du module de donn\u00E9es sur le serveur vcs
+isisfish.config.vcs.type.description=le type de communication vcs utilis\u00E9
+isisfish.config.vcs.typeRepo.description=le type de r\u00E9pository vcs utilis\u00E9
+isisfish.config.vcs.useSshConnexion.description=pour indiquer si l'on utilise une connexion s\u00E9curis\u00E9e pour communiquer avec le serveur vcs (ssh2)
+isisfish.config.vcs.userName.description=le login de l'utilisateur sur le serveur vcs
isisfish.dataResult.descriptionLabel=defaultToolTip-fr.ifremer.resultat.DataResult.descriptionLabel
isisfish.dataResult.export.csv=Exporter en CSV
isisfish.dataResult.exportButton=defaultToolTip-fr.ifremer.resultat.DataResult.exportButton
@@ -148,6 +159,7 @@
isisfish.dataResult.matriceTable=defaultToolTip-fr.ifremer.resultat.DataResult.matriceTable
isisfish.dataResult.scrolledwindow2=defaultToolTip-fr.ifremer.resultat.DataResult.scrolledwindow2
isisfish.dataResult.table2=defaultToolTip-fr.ifremer.resultat.DataResult.table2
+isisfish.date.toString=%1$s %2$s
isisfish.effortDescription.crewFoodCost=Co\u00FBt de l'alimentation pour l'\u00E9quipage
isisfish.effortDescription.crewShareRate=Taux de partage de l'\u00E9quipage
isisfish.effortDescription.crewSize=Taille de l'\u00E9quipage
@@ -159,14 +171,31 @@
isisfish.effortDescription.otherRunningCost=Autres co\u00FBts
isisfish.effortDescription.repairAndMaintenanceGearCost=repairAndMaintenanceGearCost
isisfish.effortDescription.title=inputEffortDescription
+isisfish.effortDescription.toString=EffortDescription for %1$s with %2$s
isisfish.effortDescription.unitCostOfFishing=Co\u00FBt unitaire de la p\u00EAche
isisfish.equation.editor.title=Editeur d'\u00E9quation
+isisfish.error.acceptable.population=New value isn't acceptable value for this population
isisfish.error.add.card=Erreur lors de l'ajout du r\u00E9sultat \u00E0 la carte.
-isisfish.error.add.logger.simulation\ ",\ e));\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ try\ {\ \ \ \ \ \ \ \ \ \ \ \ simThread.start();\ \ \ \ \ \ \ \ \ \ \ \ try\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ simThread.join();\ \ \ \ \ \ \ \ \ \ \ \ }\ catch\ (InterruptedException\ eee)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ (log.isWarnEnabled())\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ log.warn(I18n._("isisfish.error.wait.simThread=
+isisfish.error.add.file=Can't add file %1$s
+isisfish.error.add.logger.simulation\ =isisfish.error.add.logger.simulation
isisfish.error.add.result.data=Erreur lors de l'ajout du r\u00E9sultat au data.
isisfish.error.add.result.graph=Erreur lors de l'ajout du r\u00E9sultat au graph.
-isisfish.error.checkout.module",\ module),\ eee);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ break;\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ }\ \ \ \ public\ static\ void\ doCheckoutModule(VCSHandler\ handler,\ IsisConfig.Module\ module,\ String\ category)\ {\ \ \ \ \ \ \ \ File\ f\ =
+isisfish.error.add.tray=Can't add system tray icon
+isisfish.error.change.classloader=Can't change classloader because can't create URL from file %1$s
+isisfish.error.change.equation=Can't change equation
+isisfish.error.check.region=Can't check region
+isisfish.error.checkout.module=Can't checkout module %1$s
+isisfish.error.commit.files=Can't commit files %1$s
+isisfish.error.compile.script=Can't compile script\: %1$s
+isisfish.error.compiled.parameter=Can't get rule parameter from compiled class
+isisfish.error.connect.server=Can't connect to server
isisfish.error.conversion.data=Erreur lors de la conversion du fichier de donn\u00E9es
+isisfish.error.create.equation=Can't create equation
+isisfish.error.delete.database=Can't delete database
+isisfish.error.delete.file=could not delete file %1$s
+isisfish.error.delete.vcs.files=Can't delete vcs files
+isisfish.error.during.simulation=Error during simulation
+isisfish.error.during.simulation.information.file=Could not save Error during simulation of %1$s in his information file
isisfish.error.emigration.negative=emigration negative
isisfish.error.empty.code.rubbin=le code rubbin est vide
isisfish.error.empty.emigration=emigration vide
@@ -184,31 +213,122 @@
isisfish.error.empty.unit=l'unit\u00E9 de mesure est vide
isisfish.error.emty.emigration=emigration vide
isisfish.error.emty.migration=Migration vide
+isisfish.error.equation.retun.number=EquationImpl must retun a number\: %1$s
+isisfish.error.evaluate.equation=Can't evaluate equation\: %1$s
+isisfish.error.evaluate.plan.script=Can't evaluate plan script
+isisfish.error.evaluate.preplan.script=Can't evaluate preplan script
+isisfish.error.evalute.plan.script=Can't evaluate plan script
+isisfish.error.export.scripts.force=Le fichier d'export %1$s existe d\u00E9j\u00E9, vous devez utiliser l'option [force] pour forcer l'\u00E9crasement.
+isisfish.error.file.already.exists=The file %1$s already exist
+isisfish.error.get.fisheryRegion=Can't get FisheryRegion
+isisfish.error.get.information.file=Can't get information on file {0]
+isisfish.error.get.status.files=Can't get status files\: %1$s
+isisfish.error.growth.equation.before.create.group.population=Error, You must input growth equation before create the group population
isisfish.error.immigration.negative=immigration negative
isisfish.error.import.convertible=Erreur lors de l'import, la version du fichier que vous souhaitez importer n'est pas transformable en une version importable.
+isisfish.error.import.file=Can't import file %1$s
isisfish.error.import.recent.files=Erreur lors de l'import, la version du fichier que vous souhaitez importer est plus r\u00E9cente que la version souhait\u00E9e.
+isisfish.error.import.scripts.force=Certains fichiers existent, vous devez utiliser l'option [force] pour forcer l'\u00E9crasement.
isisfish.error.init.map=Can't init map.
+isisfish.error.init.remove.button=could not init remove button (button or list is null) button : %1$s, list : %2$s
+isisfish.error.instanciate=Can't instanciate %1$s
+isisfish.error.instanciate.export=Can't instanciate export %1$s
+isisfish.error.integer.positif=Your input must be a positif integer (>1)
+isisfish.error.invalid.category.name=Le nom de la cat\u00E9gorie %1$s n'est pas valide.
+isisfish.error.invalid.configuration=la configuration n'est pas valide, modifier la configuration ?
+isisfish.error.invalid.configuration.title=Erreur de chargement de la configuration
isisfish.error.invalid.costs.fix=les co\u00FBts fixes sont invalides
+isisfish.error.invalid.distribution.recruitment=distribution de recrutement invalide
isisfish.error.invalid.equation=Equation invalide
+isisfish.error.invalid.equation.name=Nom d'\u00E9quation invalide
+isisfish.error.invalid.file.name=Le nom du script %1$s n'est pas valide.
isisfish.error.invalid.interval.reproduction.recruitment=interval entre la reproduction et le recrutement invalide
isisfish.error.invalid.mean.weight=poids moyen invalide
isisfish.error.invalid.natural.death=mortalit\u00E9 naturelle sur les classes naissantes invalide
isisfish.error.invalid.number=le nombre est invalide
isisfish.error.invalid.range=La gamme possible n'a pas de valeur acceptable
+isisfish.error.invalid.simulation.id=Invalid simulation id %1$s, availables \: %2$s
+isisfish.error.invalid.simulation.index=Invalid simulation index %1$s
+isisfish.error.invalid.simulation.index.availables=Invalid simulation index %1$s, availables \: %2$s
isisfish.error.invalid.values.params=Param\u00E8tre controlable hors valeurs possibles
isisfish.error.invalidate.natural.death=mortalite naturelle invalide
-isisfish.error.load.file",\ file));\ \ \ \ \ \ \ \ \ \ \ \ }\ finally\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ (reader\ \!=
-isisfish.error.load.map",\ filename),\ eee);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ if(\!shapeLoaded){\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ a\ pas\ reussi\ a\ charger\ les\ fichiers\ demand\uFFFDs,\ on\ charge\ la\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ carte\ du\ monde\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ String\ filename\ =
+isisfish.error.invalide.simulation.index=Invalide simulation index
+isisfish.error.invoke.method=Can't invoke method '%1$s' for class %2$s
+isisfish.error.load.class=Can't load class\: %1$s
+isisfish.error.load.classloader=Can't create ClassLoader for script, bad directory\: %1$s for reason %2$s
+isisfish.error.load.file=could not load file %1$s
+isisfish.error.load.map=Can't load map file\: %1$s
+isisfish.error.log.closeAppender=n'a pas pu ferme l'appender %1$s et la categorie %2$s
+isisfish.error.log.console.dispose=Une erreur est survenue pendant la fermeture de la console %1$s de log, raison %2$s
+isisfish.error.log.createAppender=n'a pas pu creer l'appender [%1$s] \: %2$s pour la raison %3$s
+isisfish.error.log.foundAppender=n'a pas trouve l'appender %1$s pour la categorie %2$s
isisfish.error.matrix.more.2d=Matrice de plus de 2 dimensions\!\!\\nSelectionnez moins d'\u00E9l\u00E9ments ou utilisez l'op\u00E9rateur somme.
isisfish.error.migration.negative=Migration negative
-isisfish.error.no.matrix"\ +\ name));\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ resume.append("\\n\\n=
+isisfish.error.no.matrix=No matrix for\:
+isisfish.error.no.null.time.step=Error, the time step should not be null
isisfish.error.no.sector=il n'y a pas de secteur de d\u00E9finit
+isisfish.error.no.select.simulation=could not select simulation
+isisfish.error.no.selected.simulation=No Simulation selected
+isisfish.error.no.target.species=no target species in %1$s for %2$s
isisfish.error.not.connected=Erreur \u00E0 la connexion...
+isisfish.error.not.find.status=n'a pas pu trouver le status du fichier %1$s pour la raison suivante \: %2$s
+isisfish.error.not.found.class=this class does not
+isisfish.error.not.found.code=could not found codeclass for %1$s
+isisfish.error.not.found.description=could not found description for %1$s
+isisfish.error.not.found.field=could not found field %1$s doc for %1$s
+isisfish.error.not.found.field.class=could not found field %1$s for class %2$s
+isisfish.error.not.found.species.population.container=Can't find species (%1$s) for Population container
isisfish.error.not.null.class.grown=classe mature vaut nul
isisfish.error.not.null.mean.weight=poids moyen nul
isisfish.error.not.null.natiral.death=mortalite naturelle nulle
isisfish.error.not.possible.metier=Pas de m\u00E9tier possible
+isisfish.error.not.species.node.population.container=Population container not in Species node
+isisfish.error.not.support.class=this class does not support
+isisfish.error.number.classes.upper.zero=Error, the number of classes must be upper than 0
+isisfish.error.obtain.analyseplan=Can't obtain description of AnalysePlan
+isisfish.error.obtain.doc.export=Can't obtain @Doc on class Export
+isisfish.error.obtain.doc.resultName=Can't obtain @Doc on ResultName
+isisfish.error.obtain.doc.rule=Can't obtain description for a Rule class
+isisfish.error.obtain.field=Can't obtain field @Doc for Rule %1$s
+isisfish.error.obtain.field.analyseplan=Can't obtain field @Doc for AnalysePlan %1$s
+isisfish.error.obtain.information.file=could not obtain information file for simulation %1$s
+isisfish.error.out.memory=Out of memory try with more memory (option -mx)
isisfish.error.overlap.season=Cette saison chevauche une autre saison
+isisfish.error.parse.date=Can't parse date %1$s
+isisfish.error.parse.long=Can't parse long %1$s
+isisfish.error.plan.parameter=Can't get plan parameter from compiled class
+isisfish.error.prepare.data=Can't prepare data
+isisfish.error.prepare.information.simulation=Can't prepare information for simulation
+isisfish.error.read.simulation=Can't read simulation information %1$s
+isisfish.error.read.simulation.parameters=Can't read simulation parameters from file %1$s
+isisfish.error.region.already.exists=Cette r\u00E9gion existe d\u00E9j\u00E0
+isisfish.error.region.name.empty=Le nom de la R\u00E9gion est vide
+isisfish.error.remove.directory=Can't remove directory %1$s
+isisfish.error.remove.file=Can't remove file %1$s
+isisfish.error.rename.region=Can't rename region to %1$s
+isisfish.error.save.checkSum.compilation=Can't save checkSum to compilation\: %1$s
+isisfish.error.save.region=Can't save region
+isisfish.error.save.script.compilation=Can't save script to compilation\: %1$s
+isisfish.error.save.simulation.parameters=Can't save simulation parameters in file %1$s
+isisfish.error.script.check=N'a pas pu compiler le fichier %1$s pour la raison suivante %2$s
+isisfish.error.script.commit=N'a pas pu commiter le fichier %1$s pour la raison suivante %2$s
+isisfish.error.script.create=isisfish.error.script.create
+isisfish.error.script.delete=N'a pas pu supprimer le fichier %1$s pour la raison suivante %2$s
+isisfish.error.script.diff=N'a pas pu calculer le diff du fichier %1$s pour la raison suivante %2$s
+isisfish.error.script.evaluate=N'a pas pu \u00E9valuer le fichier %1$s pour la raison suivante %2$s
+isisfish.error.script.export=N'a pas pu exporter pour la raison suivante %1$s
+isisfish.error.script.import=N'a pas pu importer pour la raison suivante %1$s
+isisfish.error.script.load=N'a pas pu charger le fichier %1$s pour la raison suivante %2$s
+isisfish.error.script.save=N'a pas pu sauver le fichier %1$s pour la raison suivante %2$s
+isisfish.error.script.update=N'a pas pu mettre \u00E0 jour le fichier %1$s pour la raison suivante %2$s
+isisfish.error.simulation.log.openAppender=n'a pas pu ouvrir l'appender de la simulation %1$s pour la raison %2$s
+isisfish.error.simulation.resultXml.close=Can't close simulation result XML for reason %1$s
+isisfish.error.simulation.resultXml.open=Can't open simulation result XML for reason %1$s
+isisfish.error.simulation.resultXml.write=Can't write simulation result XML for reason %1$s
+isisfish.error.source.parameter=Can't get parameter from source
+isisfish.error.start=Can't start
+isisfish.error.status.files=Can't get status files\: %1$s
+isisfish.error.strategy.order=Strategy %1$s don't have 12 StrategyMonthInfo but %2$s. Recreate them
isisfish.error.text=The follow error occur during action
isisfish.error.title=Erreur
isisfish.error.undefined.classes=pas de classes d\u00E9finies
@@ -224,8 +344,16 @@
isisfish.error.undefined.zone.population=il n'y a pas de zone de population de d\u00E9finit
isisfish.error.undefined.zone.recruitment=il n'y a pas de zone de recrutement de d\u00E9finit
isisfish.error.undefined.zone.reproduction=il n'y a pas de zone de reproduction de d\u00E9finit
-isisfish.error.while.simulation",\ infos.getException()));\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ control.setText(I18n._("isisfish.message.stop.with.error=
-isisfish.error.while.simulation",\ infos.getException()));\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ control.setText(I18n._("isisfish.message.stop.with.error",infos.getException()));\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ I\ don't\ known\ if\ you\ can\ come\ here\ with\ no\ previous\ simulation\ ?\ \ \ \ \ \ \ \ \ \ \ \ }\ catch\ (Exception\ e1)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ log.warn(I18n._("isisfish.error.obtain.information.file",\ e.getId()));\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ control.addPropertyChangeListener(this);\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ /*\ (non-Javadoc)\ \ \ \ \ *\ @see\ SimulationQueueListener\#simulationStart(fr.ifremer.isisfish.simulator.SimulationQueueEvent)\ \ \ \ \ */\ \ \ \ public\ void\ simulationStart(SimulationQueueEvent\ e)\ {\ \ \ \ \ \ \ \ //\ nothing\ to\ do\ \ \ \ }\ \ \ \ /*\ (non-Javadoc)\ \ \ \ *\ @see\ SimulationQueueListener\#simulationStop(fr.ifremer.isisfish.simulator.SimulationQueueEvent)\ \ \ \ */\ \ \ \ public\ void\ simulationStop(SimulationQueueEvent\ e)\ {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ nothing\ to\ do\ \ \ \ }}//\ SimulationDoneQueueModel/*\ *\#\#%\ *\ Copyright\ (C)\ 2007\ *\ \ \ \ \ Ifremer,\ Code\ Lutin,\ C\uFFFDdric\ Pineau,\ Benjamin\ Poussin\ *\ *\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or\ *\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License\ *\ as\ published\ by\ the\ Free\ Software\ Foundation;\ either\ version\ 2\ *\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.\ *\ *\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,\ *\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of\ *\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the\ *\ GNU\ General\ Public\ License\ for\ more\ details.\ *\ *\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License\ *\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software\ *\ Foundation,\ Inc.,\ 59\ Temple\ Place\ -\ Suite\ 330,\ Boston,\ MA\ \ 02111-1307,\ USA.\ *\#\#%*//*\ *\ *\ SimulationResultGetter.java\ *\ *\ Created\:\ 13\ nov.\ 07\ 12\:00\:14\ *\ *\ @author\ poussin\ *\ @version\ $Revision\:\ 722\ $\ *\ *\ Last\ update\:\ $Date\:\ 2007-11-14\ 01\:16\:35\ +0100\ (mer,\ 14\ nov\ 2007)\ $\ *\ by\ \:\ $Author\:\ bpoussin\ $\ */package\ fr.ifremer.isisfish.simulator;import\ org.codelutin.math.matrix.MatrixND;import\ fr.ifremer.isisfish.types.Date;/**\ *\ Some\ SimulationResultListener\ can\ implement\ this\ interface\ to\ show\ that\ can\ *\ be\ used\ to\ retrieve\ result\ *\ \ *\ @author\ poussin\ */public\ interface\ SimulationResultGetter\ {\ \ \ \ /**\ \ \ \ \ *\ Retourne\ la\ matrice\ stocke\ pour\ un\ pas\ de\ temps\ \ \ \ \ *\ @param\ date\ le\ pas\ de\ temps\ que\ l'on\ souhaite\ \ \ \ \ *\ @param\ name\ le\ nom\ des\ resultats\ dont\ on\ veut\ la\ matrice\ \ \ \ \ *\ @return\ La\ matrice\ demand\uFFFDe\ ou\ null\ si\ aucune\ matrice\ ne\ correspond\ a\ \ \ \ \ *\ la\ demande.\ \ \ \ \ */\ \ \ \ \ public\ MatrixND\ getMatrix(SimulationContext\ context,\ Date\ date,\ String\ name);\ \ \ \ \ \ \ \ \ \ /**\ \ \ \ \ \ *\ Retourne\ une\ matrice\ contenant\ tous\ les\ pas\ de\ temps.\ \ \ \ \ \ *\ @param\ name\ le\ nom\ des\ resultats\ dont\ on\ veut\ une\ matrice\ globale.\ \ \ \ \ \ */\ \ \ \ \ public\ MatrixND\ getMatrix(SimulationContext\ context,\ String\ name);\ \ \ \ \ }/*\ *\#\#%\ *\ Copyright\ (C)\ 2002-2005\ Code\ Lutin,\ C\uFFFDdric\ Pineau,\ \ \ \ \ Benjamin\ Poussin\ *\ *\ This\ program\ is\ free\ software;\ you\ can\ redistribute\ it\ and/or\ *\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License\ *\ as\ published\ by\ the\ Free\ Software\ Foundation;\ either\ version\ 2\ *\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.\ *\ *\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,\ *\ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of\ *\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the\ *\ GNU\ General\ Public\ License\ for\ more\ details.\ *\ *\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License\ *\ along\ with\ this\ program;\ if\ not,\ write\ to\ the\ Free\ Software\ *\ Foundation,\ Inc.,\ 59\ Temple\ Place\ -\ Suite\ 330,\ Boston,\ MA\ \ 02111-1307,\ USA.\ *\#\#%*//*\ **\ SimulatorServerBadIdException.java**\ Created\:\ Fri\ Sep\ \ 6\ 2002**\ @author\ \ <poussin at codelutin.com>*\ Copyright\ Code\ Lutin*\ @version\ $Revision\:\ 167\ $**\ Mise\ a\ jour\:\ $Date\:\ 2006-01-23\ 15\:00\:17\ +0100\ (lun,\ 23\ jan\ 2006)\ $*\ par\ \:\ $Author\:\ bpoussin\ $*/package\ fr.ifremer.isisfish.simulator;public\ class\ SimulatorServerBadIdException\ extends\ RuntimeException\ {\ //\ SimulatorServerBadIdException\ \ \ \ /**\ \ */\ \ \ \ private\ static\ final\ long\ serialVersionUID\ =
+isisfish.error.unsupported.equation.langage=unsupported langage '%1$s' for equation\: %2$s
+isisfish.error.update.file=Can't update file '%1$s'
+isisfish.error.update.repository=Can't update local repository
+isisfish.error.vcs.connect=Probl\u00E8me de connexion au serveur vcs, v\u00E9rifier votre configuration, ou contactez-nous si le probl\u00E8me persiste.
+isisfish.error.vcs.no.anonymous.connection=
+isisfish.error.vcs.no.ssh.connection=ne pas pu se connecter en utilisant la configuration ssh login %1$s, clef priv\u00E9e %2$s
+isisfish.error.vcs.pre.migrate=pendant la migration, la sauvegarde de votre base %1$s n'a pas pu \u00EAtre effectu\u00E9e pour la raison suivante %2$s, une nouvelle base est cr\u00E9e ici %3$s.
+isisfish.error.wait.simThread=Can't wait SimThread
+isisfish.error.while.simulation=error while simulation %1$s
+isisfish.error.write.simulation=Can't write information %1$s
isisfish.exit.text=Quelque chose a chang\u00E9, merci de saisir un commentaire
isisfish.exit.title=Exit
isisfish.export.directory=Dossier d'export
@@ -248,6 +376,8 @@
isisfish.filter.log.tooltip.message=Entrer un terme \u00E0 rechercher et appuyer sur Entr\u00E9e
isisfish.filter.reset=R\u00E9initialiser
isisfish.filter.result=R\u00E9sultats
+isisfish.filter.select=S\u00E9lectionner
+isisfish.filter.select.simulation=S\u00E9lectionner une simulation
isisfish.filter.simulation=Filter les simulations
isisfish.filter.simulation.analysePlanNumber=num\u00E9ro d"analyse
isisfish.filter.simulation.description=description
@@ -341,7 +471,7 @@
isisfish.input.menu.file=Fichier
isisfish.input.menu.help=Aide
isisfish.input.menu.importRegion=Importer une r\u00E9gion
-isisfish.input.menu.importRegionSimulation=Importer la r\u00E9gion d''une simulation
+isisfish.input.menu.importRegionSimulation=Importer la r\u00E9gion d'une simulation
isisfish.input.menu.importRegionV2=Importer une r\u00E9gion de la v2 d'IsisFish
isisfish.input.menu.importRenameRegion=Importer une r\u00E9gion et la renommer
isisfish.input.menu.removeLocaly=Supprimer localement
@@ -351,35 +481,149 @@
isisfish.input.selectNodeTree=S\u00E9lectionnez un noeud de l'arbre
isisfish.input.title=Saisie de la p\u00EAcherie
isisfish.launch.anonymous=lecture seule
+isisfish.launch.debugMode=debug mode
isisfish.launch.email=courriel
+isisfish.launch.find.public.key=Clef publique ssh (*.pub) associ\u00E9e \u00E0 la clef priv\u00E9e
+isisfish.launch.first=Premier d\u00E9marrage type vcs %1$s - version %2$s
isisfish.launch.firstname=nom
+isisfish.launch.howto.save.key=Comment enregister sa clef publique ssh aupr\u00E8s du labs
+isisfish.launch.init.done=init done in %1$s.
isisfish.launch.lasstname=pr\u00E9nom
+isisfish.launch.save.key=Acc\u00E9der au labs pour enregister votre clef publique ssh
isisfish.launch.server.authenticationMethod=droit d'acc\u00E8s au serveur
isisfish.launch.server.login=nom utilisateur
+isisfish.launch.server.ssh.confirm.change.method=Changer la m\u00E9thode d'authentification requi\u00E8re une migration de votre base au prochaine red\u00E9marrage, Confirmer cette action.
+isisfish.launch.server.ssh.confirm.overwrite.key=Le clef %1$s existe d\u00E9j\u00E0, confirmer pour l'\u00E9craser.
isisfish.launch.server.ssh.confirm.passphrase=confirmer la passphrase
isisfish.launch.server.ssh.key.change=Changer la clef ssh
+isisfish.launch.server.ssh.key.clipboard=Votre clef publique a \u00E9t\u00E9 copi\u00E9e dans le presse papier
isisfish.launch.server.ssh.key.generate=G\u00E9n\u00E9rer la clef ssh
+isisfish.launch.server.ssh.key.generate.error=La clef %1$s n'a pas \u00E9t\u00E9 g\u00E9n\u00E9r\u00E9e.
+isisfish.launch.server.ssh.key.generate.succes=Votre clef ssh %1$s a \u00E9t\u00E9 g\u00E9n\u00E9r\u00E9e,il faut d\u00E9sormais l'enregistrer aupr\u00E8s du serveur lab.
+isisfish.launch.server.ssh.key.no.key=Pas de clef ssh connu ou vous n'avez pas s\u00E9lectionn\u00E9 le mode SSH, voulez-vous quand meme continuer ?
+isisfish.launch.server.ssh.key.register=Enregister votre clef publique ssh sur le serveur du labs
isisfish.launch.server.ssh.no.passphrase=pas de passphrase
isisfish.launch.server.ssh.passphrase=passphrase
isisfish.launch.server.ssh.privateKeyFile=clef priv\u00E9e ssh
isisfish.launch.server.ssh.publicKeyFile=clef publique ssh
isisfish.launch.ssh=lecture-\u00E9criture (ssh)
+isisfish.launch.start=Lancement Isis-fish ... %1$s
+isisfish.launch.stop=Stopping simulation...
+isisfish.launching=after init done in %1$s.
+isisfish.log.addAppender=ajoute un appender [%1$s]
isisfish.log.body=Message \u00E0 joindre
-isisfish.log.mail.send.title",\ simulationFile.getName()));\ \ \ \ \ \ \ \ this.from\ =
+isisfish.log.closeAppender=ferme l'appender [%1$s] pour la categorie %2$s
+isisfish.log.mail.failed=Impossible d'envoyer le rapport par courriel. Le serveur smtp fonctionne ? (J'essaye de contacter < %1$s > smtp server)
+isisfish.log.mail.send=A report has been sent to %1$s
+isisfish.log.mail.send.title=Send simulation %1$s by email
isisfish.log.mailTo=Adresse du destinataire
+isisfish.log.removeAppender=supprime l'appender [%1$s]
+isisfish.log.restoreLogLevel=repositionne le niveau du logger %1$s du niveau %2$s au niveau %3$s
isisfish.log.sendAll=Envoyer la simulation complete
isisfish.log.sendMail=Envoyer par email
+isisfish.log.simulation.name=IsisFish simulation %1$s
+isisfish.log.swapLogLevel=permute le niveau du logger %1$s du niveau %2$s au niveau %3$s
isisfish.log.tooltip.body=Le message saisi sera joint au courriel envoy\u00E9
isisfish.log.tooltip.mailTo=Entrer l'adresse du destinataire du courriel
isisfish.log.tooltip.sendAll=Envoyer toute la simulation, ou uniquement le fichier de log
isisfish.log.tooltip.sendMail=Cliquer pour envoyer le courriel contentant les fichiers
+isisfish.message.add.cvs=Ajouter depuis %1$s fichiers %2$s.
+isisfish.message.add.objets.simulation=Add new objets simulation
+isisfish.message.add.queue=%1$s ajout\u00E9e \u00E0 la queue de simulations
+isisfish.message.add.queue.remote=%1$s ajout\u00E9 \u00E0 la queue de simulations distantes
+isisfish.message.backup.database.finished=backup database finished
+isisfish.message.backup.database.progress=backup database in progress
+isisfish.message.cancel.finished=Cancel finished
+isisfish.message.check.finished=v\u00E9rification termin\u00E9e
+isisfish.message.check.region=Check region ...
+isisfish.message.checking.cell=Checking cell
isisfish.message.choose.archive=choose archive file or directory
-isisfish.message.load.map",\ filename,\ shp,\ ssx));\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ addShapeLayer(filename,\ shp,\ ssx,\ "ff000000",\ "ffbdde83=
+isisfish.message.comment.region.modification=Entrer un commentaire sur la modification de la r\u00E9gion
+isisfish.message.commit=Commiter les modifications
+isisfish.message.commit.cancelled=commit annul\u00E9
+isisfish.message.commit.finished=commit termin\u00E9
+isisfish.message.commit.region.canceled=Commit de la r\u00E9gion annul\u00E9
+isisfish.message.commiting.region=En train de commiter la r\u00E9gion %1$s ...
+isisfish.message.compilation.time=Temps de compilation %1$ss
+isisfish.message.confirm.delete.object=Voulez-vous vraiment supprimer l'objet %1$s
+isisfish.message.confirm.remove.region=Voulez-vous vraiement supprimer la r\u00E9gion %1$s ?
+isisfish.message.confirm.remove.script=Voulez-vous vraiment supprimer le script ? '%1$s'
+isisfish.message.copy.finished=Copie termin\u00E9e
+isisfish.message.copy.region=Copier la r\u00E9gion vers %1$s
+isisfish.message.copy.revision=Working copy initialize fine... Revision \: [ %1$s - %2$s ]
+isisfish.message.create.region.canceled=Creation de r\u00E9gion annul\u00E9e
+isisfish.message.creating.region=En train de cr\u00E9er la r\u00E9gion %1$s
+isisfish.message.creation.done=cr\u00E9ation termin\u00E9e %1$s
+isisfish.message.creation.finished=Cr\u00E9ation termin\u00E9e
+isisfish.message.delete.canceled=supression annul\u00E9e
+isisfish.message.delete.entities=Supprimer les entit\u00E9s
+isisfish.message.delete.entity=Supprimer l'entit\u00E9
+isisfish.message.delete.finished=Suppression termin\u00E9e
+isisfish.message.delete.object=Pour supprimer l'objet %1$s, tous les objets suivant seront aussi supprim\u00E9s \\n\\n
+isisfish.message.diff.finished=fichier dans l'\u00E9tat %1$s
+isisfish.message.directory.not.exists=Le r\u00E9pertoire parent de %1$s n'existe pas, Voulez-vous le cr\u00E9er ?
+isisfish.message.evaluation.finished=\u00E9valuation termin\u00E9e
+isisfish.message.export.cancelled=Export annul\u00E9
+isisfish.message.export.done=Export termin\u00E9
+isisfish.message.export.path.tozip=toZip %1$s
+isisfish.message.export.result=zip %1$s fichier(s) dans l'archive %2$s (taille %3$s)
+isisfish.message.export.scripts.file=Export vers le fichier %1$s
+isisfish.message.export.zip=Exporter dans le fichier zip %1$s
+isisfish.message.file.already.exists=Le fichier existe %1$s d\u00E9j\u00E0, Voulez-vous l'\u00E9craser ?
+isisfish.message.file.overwrite=Le fichier existe, Voulez-vous l'\u00E9craser ?
+isisfish.message.import=Importer %1$s
+isisfish.message.import.finished=Import termin\u00E9
+isisfish.message.import.region.name=Entre le nom de la r\u00E9egion \u00E0 importer
+isisfish.message.import.region.xml=XMLed Region
+isisfish.message.import.region.zipped=Zipped Region
+isisfish.message.import.scripts.file=Importation depuis le fichier %1$s
+isisfish.message.import.scripts.file.cancelled=Importation des scripts annul\u00E9
+isisfish.message.import.scripts.file.done=Importation des scripts termin\u00E9
+isisfish.message.import.scripts.zipped=Zipped Scripts
+isisfish.message.import.xml.v2.file\ =Import xml v2 file
+isisfish.message.import.zip=Import zip file
+isisfish.message.load.finished=Chargement termin\u00E9
+isisfish.message.load.map=Chargement de la carte \: %1$s (%2$s, %3$s)
+isisfish.message.load.region.canceled=chargement de r\u00E9gion annul\u00E9
+isisfish.message.loading.old.simulation=Chargement d'une ancienne simulation ...
+isisfish.message.loading.region=Chargement de la r\u00E9gion
+isisfish.message.name.imported.region=Entrez le nom de la r\u00E9gion \u00E0 importer
+isisfish.message.new.filename=Entrer le nom du nouveau du fichier.\n\t (utiliser uniquemment des caract\u00E8res et _ en commencant avec une majuscule)
+isisfish.message.new.region.name=Entrer le nom de la nouvell r\u00E9gion
+isisfish.message.no.diff=Pas de diff\u00E9rences trouv\u00E9s pour le fichier %1$s, \u00E9tant un '%2$s'
+isisfish.message.old.simulation.loaded=Anicenne simulation charg\uE009e
+isisfish.message.page.modified=Cette page a \u00E9t\u00E9 modifi\u00E9, voulez-vous la sauvegarder ?
+isisfish.message.presimulation.script.execution=Ex\u00E9cution des scripts de Presimulation
+isisfish.message.recruitment.number.month=Input the number of month of recruitment
+isisfish.message.region.commited=R\u00E9gion commit\u00E9e
+isisfish.message.region.loaded=R\u00E9gion charg\u00E9e
+isisfish.message.region.remove.canceled=Suppression de r\u00E9gion annul\u00E9
+isisfish.message.region.removed=R\u00E9gion supprim\u00E9e
+isisfish.message.remove.canceled=Suppression annul\u00E9e
+isisfish.message.remove.files=Suppresion des fichiers %1$s.
+isisfish.message.remove.finished=Suppresison termin\u00E9
+isisfish.message.remove.unnecessary.cells=Suppression de cellules no necessaires
+isisfish.message.removing.region=Suppression de lar\u00E9gion %1$s ...
isisfish.message.result.verif.region=R\u00E9sultat de la v\u00E9rification de la r\u00E9gion
+isisfish.message.save.finished=sauvegarde termin\u00E9e
+isisfish.message.saveModel.finished=Sauvegarde du mod\u00E8le termin\u00E9e
+isisfish.message.search.data=Recherche des donn\u00E9es ...
+isisfish.message.setting.cache.aspects=Mise en place des aspects Cache
+isisfish.message.setting.trace.aspects=Mise en place des aspects Trace
+isisfish.message.simulation.ended=Simulation termin\u00E9e
+isisfish.message.simulation.execution=Simulation execution
+isisfish.message.spacialized.visualisation=Spacialized visualisation
+isisfish.message.stop.with.error=stop with error %1$s
+isisfish.message.synchronize.done=synchronize termin\u00E9e.
+isisfish.message.tray.disabled=SystemTray disabled
+isisfish.message.update.finished=update finished
isisfish.metier.comments=Commentaires
isisfish.metier.name=Nom
isisfish.metier.rangeValues=Range of values
isisfish.metier.title=M\u00E9tier
+isisfish.metierMonitor.metiers=M\u00E9tiers
+isisfish.metierMonitor.strategies=Strat\u00E9gies
+isisfish.metierSeasonInfo.toString=%1$s saison %2$s-%3$s
isisfish.metierSeasonInfoSpecies.mainSpecies=Esp\u00E8ces principales pour le m\u00E9tier
isisfish.metierSeasonInfoSpecies.selectSeason=S\u00E9lectionnez une saison
isisfish.metierSeasonInfoSpecies.selectSpecies=Choix de l'esp\u00E8ce
@@ -389,7 +633,44 @@
isisfish.metierSeasonInfoZone.season=Saison
isisfish.metierSeasonInfoZone.selectSeason=S\u00E9lectionnez une saison
isisfish.metierSeasonInfoZone.title=Seasons / Zones
+isisfish.migration.cvs.description=Migrate de CVS vers SVN [v %1$s]
+isisfish.migration.svn.protocol.description=Migration de SVN [v %1$s - %2$s] vers SVN [v %3$s - %4$s]
+isisfish.migration.svn.version.description=Migration de SVN [v %1$s - %2$s] vers SVN [v %3$s - %4$s]
isisfish.monitor.title=Application Monitor
+isisfish.month.april=avril
+isisfish.month.august=ao\u00FBt
+isisfish.month.december=d\u00E9cembre
+isisfish.month.february=f\u00E9vrier
+isisfish.month.january=janvier
+isisfish.month.july=juillet
+isisfish.month.june=juin
+isisfish.month.march=mars
+isisfish.month.may=mai
+isisfish.month.november=novembre
+isisfish.month.october=octobre
+isisfish.month.september=september
+isisfish.option.description.addScript=ajoute un script d'un certain type (analyseplans|exports|formules\=type|rules|scripts|simulators) \u00E0 partir d'un fichier existant (file) (pour les formules il faut pr\u00E9ciser son type)
+isisfish.option.description.changeConfig=remplace la valeur d'une propri\u00E9t\u00E9 de clef **key** de la configuration [vcs] par la valeur **value**.
+isisfish.option.description.changeFileConfig=le fichier de configuration utilis\u00E9
+isisfish.option.description.createSshKey=create key pair for vcs ssh access using vcs.ssh.keyFileproperty or the given (privateKeyFile), with a (force) argument to overwrite
+isisfish.option.description.editConfig=pour lancer l'UI d'\u00E9dition de la configuration (main ou vcs)
+isisfish.option.description.exportData=export dans un nouveau fichier **fileZip** une region, ou une simulation en stipulant son nom, utilisez **force** pour \u00E9craser une archive existante.
+isisfish.option.description.exportScript=export dans un nouveau fichier (fileZip) des scripts d'un certain type **analyseplan|export|formule|rule|script|simulator** (pour les formules il faut fournir un **type**) avec possibilit\u00E9 d'effectuer un filtre **filter**, utilisez **force** pour \u00E9craser une archive existante.
+isisfish.option.description.help=Show this help
+isisfish.option.description.helpConfig=Show this help
+isisfish.option.description.import=importe un fichier existant (fileZip) pr\u00E9c\u00E9demmentexport\u00E9 d'Isis (region, simulation ou script)
+isisfish.option.description.importAndRenameRegion=import region from (regionFile) zip v3 file format and rename it (name)
+isisfish.option.description.list=affiche la liste d'un certain type d'objects Isis (analyseplans|exports|formules|regions|rules|scripts|simulations|simulators)avec possibilit\u00E9 d'appliquer un filtre (filter)
+isisfish.option.description.mavenFile=Checkout maven file from server (pom.xml)
+isisfish.option.description.resetConfig=R\u00E9initialisation de la configuration.
+isisfish.option.description.showConfig=Voir les d\u00E9tails d'une configuration
+isisfish.option.description.simulate=lance une simulation \u00E0 partir de son nom (simulation-id) et en sp\u00E9cifiant le fichier de param\u00E8tres de simulation existant (file)
+isisfish.option.description.sshKeyFile=change private ssh key file path in vcs configuration (vcs.ssh.keyFile)
+isisfish.option.description.ui=launch or not user interface (value)
+isisfish.option.description.update=update or not the local repository (value)
+isisfish.option.description.vcsAddRemove=ajoute ou supprime du r\u00E9pository local un ensemble de fichiers existants (file)
+isisfish.option.description.vcsUpdateCommitState=effectue une op\u00E9ration de communication avec le serveur distant (update|commit|state) avec possibilit\u00E9 de sp\u00E9cifier les fichiers cibles existants (file)
+isisfish.params.changeLogLev=Passe du niveau '%1$s' au niveau '%2$s'
isisfish.params.clearFilter=Reset filtre
isisfish.params.description=Description
isisfish.params.filter=Filtrer
@@ -400,9 +681,31 @@
isisfish.params.ruleParameters=Param\u00E8tres des r\u00E8gles
isisfish.params.simulationName=Nom de la simulation
isisfish.params.title=Param\u00E8tres
+isisfish.params.toString.fishery=P\u00EAcherie\: %1$s\\n\\n
+isisfish.params.toString.lib.logger.level=niveau du logger de librairies %1$s
+isisfish.params.toString.number.years=Nombre d'ann\u00E9\u00E9s \: %1$s\\n\\n
+isisfish.params.toString.plan=Plan\: %1$s
+isisfish.params.toString.plan.number=Analyse plan sequence number\: %1$s\\n\\n
+isisfish.params.toString.populations=Populations\:
+isisfish.params.toString.rule=Rule\: %1$s
+isisfish.params.toString.script.logger.level=niveau du logger de scripts %1$s
+isisfish.params.toString.script.presimulation=Script de presimulation
+isisfish.params.toString.simul.logger.level=niveau du logger de simulateur %1$s
+isisfish.params.toString.simulation.done=Simulation r\u00E9alis\u00E9e avec %1$s\:
+isisfish.params.toString.strategies=Strat\u00E9gies d'exploitation\:
isisfish.params.useAnalysePlan=Utiliser le plan d'analyse
isisfish.params.usePreSimulationScript=Utiliser un script de pr\u00E9-simulation
+isisfish.population.capturability=Capturabilit\u0E009e
isisfish.population.comments=Commentaires
+isisfish.population.group=Groupe
+isisfish.population.groups=Groupes
+isisfish.population.mappingZoneReproZoneRecru=MappingZoneReproZoneRecru
+isisfish.population.matrixAbundance=Matrice d'abondance
+isisfish.population.matrixAbundance1D=matrixAbundance1D
+isisfish.population.recruitment=Recrutement
+isisfish.population.reproduction=Reproduction
+isisfish.population.season=Saison
+isisfish.population.zones=Zones
isisfish.populationBasics.geographicID=Identifiant g\u00E9ographique
isisfish.populationBasics.growth=Croissance
isisfish.populationBasics.growthReverse=Croissance inverse
@@ -427,6 +730,7 @@
isisfish.populationGroup.price=prix
isisfish.populationGroup.reproductionRate=Taux de reproduction
isisfish.populationGroup.title=Saisie des groupes de population
+isisfish.populationGroup.toString=%1$s Groupe %2$s
isisfish.populationMigration.comments=Commentaires
isisfish.populationMigration.selectSeason=S\u00E9lectionnez une saison
isisfish.populationMigration.title=Migration
@@ -446,6 +750,15 @@
isisfish.populationRecruitment.recruitmentDistribution=Distribution du recrutement
isisfish.populationRecruitment.reproductionEquation=Equation de reproduction
isisfish.populationRecruitment.title=Saisie des recrutements
+isisfish.populationSeasonInfo.arrival=Arriv\u00E9e
+isisfish.populationSeasonInfo.departure=D\u00E9part
+isisfish.populationSeasonInfo.distributionSpawing=Distribution of spawing
+isisfish.populationSeasonInfo.emigration=Emigration
+isisfish.populationSeasonInfo.group=Groupe
+isisfish.populationSeasonInfo.immigration=Immigration
+isisfish.populationSeasonInfo.migration=Migration
+isisfish.populationSeasonInfo.months=Mois
+isisfish.populationSeasonInfo.toString=%1$s saison %2$s-%3$s
isisfish.populationSeasons.Reproduction=Reproduction
isisfish.populationSeasons.changeGroup=Changement de groupe
isisfish.populationSeasons.comments=Commentaires
@@ -468,22 +781,29 @@
isisfish.preScript.backParameter=Retour aux param\u00E8tres
isisfish.preScript.title=Script de pr\u00E9-simulation
isisfish.queue.cancelled=annul\u00E9
+isisfish.queue.id=identifiant
+isisfish.queue.local=Locale
+isisfish.queue.name=Queue
+isisfish.queue.plan=Plan
+isisfish.queue.progression=Progression
isisfish.queue.showLog=Voir les logs de la simulation
isisfish.queue.simulationLaunch=Lanceur de la queue des simulations
+isisfish.queue.status=Etat
isisfish.queue.stopSimulation=Arreter la simulation
isisfish.queue.title=Queue
isisfish.result.abundance=Abondance
isisfish.result.add=Ajouter un r\u00E9sultat\=
-isisfish.result.begin.simulation=En debut de Simulation\:
+isisfish.result.begin.simulation=En debut de Simulation\:
isisfish.result.capture=Capturer
isisfish.result.capture.metier=Capturer par metier
isisfish.result.choose.simulation=Choisir une simulation
isisfish.result.datas=Donn\u00E9es
isisfish.result.datasRadioButton=defaultToolTip-fr.ifremer.resultat.ResultatEdit.donneeRadioButton
isisfish.result.desktopPane=defaultToolTip-fr.ifremer.resultat.ResultatView.desktopPane
-isisfish.result.dimension\ =Dimension
-isisfish.result.end.simulation=En fin de Simulation\:
+isisfish.result.dimension\ =Dimension
+isisfish.result.end.simulation=En fin de Simulation\:
isisfish.result.export=Export
+isisfish.result.export.file=Exporter text file
isisfish.result.file=Fichier
isisfish.result.graph=Graphe
isisfish.result.graphRadioButton=defaultToolTip-fr.ifremer.resultat.ResultatEdit.graphRadioButton
@@ -564,7 +884,7 @@
isisfish.script.menu.txtJavaHelp=Aide Java
isisfish.script.menu.txtNewAnalysePlan=Nouveau plan d'analyse
isisfish.script.menu.txtNewEquationModel=Nouvelle formule
-isisfish.script.menu.txtNewExport=Nouveau script d''export
+isisfish.script.menu.txtNewExport=Nouveau script d'export
isisfish.script.menu.txtNewRule=Nouvelle r\u00E8gle
isisfish.script.menu.txtNewScript=Nouveau Script
isisfish.script.menu.txtNewSimulator=Nouveau Simulateur
@@ -576,6 +896,7 @@
isisfish.script.title=Editeur de scripts
isisfish.script.txtExport=Exporter
isisfish.script.update=Mettre \u00E0 jour
+isisfish.season.toString=saison %1$s-%2$s
isisfish.selectivity.equation=Equation
isisfish.selectivity.selectPopulation=S\u00E9lectionnez une population
isisfish.selectivity.title=S\u00E9lectivit\u00E9
@@ -603,6 +924,7 @@
isisfish.setOfVessels.fixedCosts=Co\u00FBts fixes
isisfish.setOfVessels.name=nom
isisfish.setOfVessels.numberOfVessels=Nombre de navires
+isisfish.setOfVessels.technicalEfficiency=
isisfish.setOfVessels.title=Caract\u00E9ristiques
isisfish.setOfVessels.vesselType=Type de navire
isisfish.simpleResult.legendPanel=defaultToolTip-fr.ifremer.isisfish.map.SimpleIsisMapBeanBean.legendPanel
@@ -610,6 +932,8 @@
isisfish.simpleResult.resultatMap=defaultToolTip-fr.ifremer.isisfish.map.SimpleIsisMapBeanBean.resultatMap
isisfish.simpleResult.resultatMapToolBar=defaultToolTip-fr.ifremer.isisfish.map.SimpleIsisMapBeanBean.resultatMapToolBar
isisfish.simpleResult.table=defaultToolTip-fr.ifremer.isisfish.map.SimpleResultatMapBean.table12
+isisfish.simulation.log.console.title=Console de log simulation '%1$s'
+isisfish.simulation.log.showConsole=affichage de la console de log pour la simulation %1$s
isisfish.simulation.menu.about=A propos
isisfish.simulation.menu.close=Fermer
isisfish.simulation.menu.file=Fichier
@@ -627,12 +951,21 @@
isisfish.species.structured=Structur\u00E9
isisfish.species.title=Saisie des esp\u00E8ces
isisfish.strategy.comments=Commentaires
+isisfish.strategy.inactivity=
+isisfish.strategy.inactivityEquationUsed=
isisfish.strategy.name=nom
isisfish.strategy.proportionSetOfVessels=Proportion des ensembles de navires
isisfish.strategy.title=Caract\u00E9ristiques
+isisfish.strategyMonthInfo.metier=M\u00E9tier
isisfish.strategyMonthInfo.minInactivityDays=Jour minimums d'inactivit\u00E9
isisfish.strategyMonthInfo.numberOfTrips=Nombre de trajets
+isisfish.strategyMonthInfo.proportion=Proportion
isisfish.strategyMonthInfo.title=StrategyMonthInfo
+isisfish.strategyMonthInfo.toString=%1$s %2$s
+isisfish.timeUnit.day=Day
+isisfish.timeUnit.hours=Hours
+isisfish.tray.simulation=<b>Isis-fish<b><p>%1$s - %2$s/%3$s
+isisfish.tray.simulation.no=<b>Isis-fish<b><p><i>No simulation<i>
isisfish.tripType.comments=Commentaires
isisfish.tripType.duration=Dur\u00E9e
isisfish.tripType.minTime=Temps minimal entre deux voyages
@@ -644,6 +977,9 @@
isisfish.vcs.commit.cancel=annuler
isisfish.vcs.commit.label=Entrer quelques mots concernant la modification des scripts
isisfish.vcs.commit.ok=confirmer
+isisfish.vcs.config.title=Modification de la configuration vcs d'IsisFish
+isisfish.vcs.configuration.title=Configuration du serveur vcs
+isisfish.vcs.migrate.end=La migration est termin\u00E9e en %1$ss.\nLa nouvelle base est localis\u00E9e ici [%2$s]
isisfish.vcs.update=R\u00E9sultats de la synchronisation avec le serveur
isisfish.vcs.update.cancel=annuler
isisfish.vcs.update.checkAll=(de)-select tout
@@ -670,6 +1006,7 @@
isisfish.vcs.updateconfirm.label2='Etes vous sur de vouloir effectuer ces op\u00E9rations ?'
isisfish.vcs.updateconfirm.ok=confirmer
isisfish.vcs.updateconfirm.tooltip.checkAll=(D\u00E9-)S\u00E9lectionner tous les scripts que vous voulez traiter
+isisfish.versionStorage.removed=Surim\u00E9
isisfish.vesselType.activityRange=Intervalle d'activit\u00E9
isisfish.vesselType.comments=Commentaires
isisfish.vesselType.fuelCost=Co\u00FBt d'un trajet en fuel
@@ -713,4 +1050,36 @@
isisfish.zone.comments=Commentaires
isisfish.zone.name=Nom
isisfish.zone.title=Saisie zone
-null)\ {\ \ \ \ \ \ \ \ \ \ \ \ logMail\ =
+lutinutil.common.action=Action
+lutinutil.common.file=Fichier
+lutinutil.common.logDiff=LogDiff
+lutinutil.common.module=Module
+lutinutil.common.rev=R\u00E9vision
+lutinutil.common.select=S\u00E9lectionner
+lutinutil.error.checkout.dir=Can't checkout dir %1$s
+lutinutil.error.fieldmodel.already.registred=FieldAccess [%1$s] is already registred
+lutinutil.error.fieldmodel.not.registred=could not found a matching entry in cache for [%1$s]
+lutinutil.error.fieldmodel.unmatchin.options=
+lutinutil.error.init.config=config is not init, you should invoke on the config validate(true) method to validate it and finish his init %1$s
+lutinutil.error.init.no.config=should invoke %1$s\#init(VCSType,Properties) before required instance.
+lutinutil.vcs.action.add=Add
+lutinutil.vcs.action.changeLog=journal des changements
+lutinutil.vcs.action.checkout=R\u00E9cup\u00E9rer
+lutinutil.vcs.action.commit=Commiter
+lutinutil.vcs.action.delete=Supprimer
+lutinutil.vcs.action.diff=voir les diff\u00E9rences
+lutinutil.vcs.action.overwriteAndUpdate=Update
+lutinutil.vcs.action.revert=Rollback
+lutinutil.vcs.action.update=Update
+lutinutil.vcs.state.missing=fichier non pr\u00E9sent localement
+lutinutil.vcs.state.modified=fichier modifi\u00E9
+lutinutil.vcs.state.outofdate=fichier obsol\u00E8te
+lutinutil.vcs.state.outofdateAndModified=fichier modifi\u00E9 et obsol\u00E8te
+lutinutil.vcs.state.unknown=fichier d'\u00E9tat inconnu
+lutinutil.vcs.state.unversionned=fichier non versionn\u00E9
+lutinutil.vcs.state.unversionnedOrMissing=fichier non versionn\u00E9 ou non pr\u00E9sent localement
+lutinutil.vcs.state.uptodate=fichier \u00E0 jour
+no\ properties\ found\ or\ unsafe\ properties\ found\ %1$s=no properties found or unsafe properties found %1$s
+the\ property\ %1$s\ is\ mandatory\ but\ missed.=the property %1$s is mandatory but missed.
+to\ use\ ssh\ authentication\ mode,\ you\ must\ have\ a\ username.\ %1$s.=to use ssh authentication mode, you must have a username. %1$s.
+to\ use\ ssh\ authentication\ mode,\ you\ must\ have\ an\ existing\ private\ key\ %1$s\ \:\ %2$s.=to use ssh authentication mode, you must have an existing private key %1$s \: %2$s.
Modified: trunk/isis-fish/src/xmi/isis-fish.zargo
===================================================================
(Binary files differ)
1
0
r1302 - in trunk/isis-fish/src: java/fr/ifremer/isisfish java/fr/ifremer/isisfish/actions java/fr/ifremer/isisfish/datastore java/fr/ifremer/isisfish/datastore/migration java/fr/ifremer/isisfish/datastore/update java/fr/ifremer/isisfish/entities java/fr/ifremer/isisfish/equation java/fr/ifremer/isisfish/logging java/fr/ifremer/isisfish/logging/console java/fr/ifremer/isisfish/map java/fr/ifremer/isisfish/simulator java/fr/ifremer/isisfish/types java/fr/ifremer/isisfish/ui java/fr/ifremer
by bpoussin@users.labs.libre-entreprise.org 18 Aug '08
by bpoussin@users.labs.libre-entreprise.org 18 Aug '08
18 Aug '08
Author: bpoussin
Date: 2008-08-18 13:42:57 +0000 (Mon, 18 Aug 2008)
New Revision: 1302
Added:
trunk/isis-fish/src/java/fr/ifremer/isisfish/equation/SoVTechnicalEfficiencyEquation.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/equation/StrategyInactivityEquation.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/AnalysePlanIndependent.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationCheckpointExternalProcessThread.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationCheckpointRemoteThread.java
trunk/isis-fish/src/test/fr/ifremer/isisfish/vcs/
trunk/isis-fish/src/test/fr/ifremer/isisfish/vcs/VCSSVNTest.java
Removed:
trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationCheckpointThread.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationQueueModelOld.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/ExportDialog.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/ImportDialog.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/action/ExportAction.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/action/ImportAction.java
trunk/isis-fish/src/test/fr/ifremer/isisfish/IsisOptionParserTest.java
trunk/isis-fish/src/test/fr/ifremer/isisfish/actions/IsisCommonActionsTest.java
trunk/isis-fish/src/test/fr/ifremer/isisfish/actions/IsisScriptAndDataActionsTest.java
trunk/isis-fish/src/test/fr/ifremer/isisfish/actions/IsisVcsActionsTest.java
Modified:
trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisConfig.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisFish.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisTray.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/actions/OtherAction.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/AnalysePlanStorage.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/CodeSourceStorage.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/DataStorage.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/ExportStorage.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/FormuleStorage.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/IsisH2Config.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/JavaSourceStorage.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/RegionStorage.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/ResultStorage.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/RuleStorage.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/ScriptStorage.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/SimulationInformation.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/SimulationStorage.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/SimulatorStorage.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/VersionStorage.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/migration/SwingMigrationCallbackHandler.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/update/ImportFromV2.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/EffortDescriptionImpl.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/EquationImpl.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/MetierSeasonInfoImpl.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/PopulationGroupImpl.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/PopulationImpl.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/PopulationSeasonInfoImpl.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/SeasonImpl.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/SetOfVesselsImpl.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/StrategyImpl.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/StrategyMonthInfoImpl.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/TargetSpeciesImpl.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/logging/SimulationLoggerUtil.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/logging/console/LogConsole.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/logging/console/LogConsoleHandler.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/logging/console/LogMail.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/map/IsisMapBean.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/map/ResultatLayer.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/AbstractSimulationQueueModel.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/PlanGenerator.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/ResultManager.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationControl.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationDoneQueueModel.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationHelper.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationManager.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationMeta.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationParameter.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationPreScript.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationProperties.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationQueueModel.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationResultXML.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulatorServer.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/types/Date.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/types/Month.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/types/TimeUnit.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/ScriptActionHelper.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/Welcome.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/input/Input.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/input/InputEffortDescription.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/input/InputFisheryRegion.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/input/InputPopulation.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/input/check/CheckRegion.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/input/check/CheckResultFrame.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/DataResultUI.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/GraphBeanUI.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/GraphComboRenderer.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/InfoItem.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/InfoItemDate.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/InfoItemDateUI.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/InfoItemUI.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/ResultEdit.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/ResultEditUI.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/ResultView.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/ResultViewUI.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/ResumePanelUI.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/SimpleResultatMapBean.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/SimpleResultatMapBeanUI.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/Action.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/action/ChooseFileAction.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/simulator/SimulatorAction.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/simulator/SimulatorListeners.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/simulator/filter/SimulationFilterUtil.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/widget/editor/EquationTableEditor.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/util/CompileHelper.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/util/DocHelper.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/util/EvaluatorHelper.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/AbstractVCS.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCS.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSFactory.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSNone.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSSVN.java
trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/input/PopulationMigration.xgl
trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/input/SetOfVessels.xgl
trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/input/SetOfVessels.xml
trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/input/Strategy.xgl
trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/input/Strategy.xml
trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/script/jaxx/JExportDialog.jaxx
trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/script/jaxx/JImportDialog.jaxx
trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/simulator/AdvancedParams.xgl
trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/simulator/AdvancedParams.xml
trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/JCommitDialog.jaxx
trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/JUpdateConfirmDialog.jaxx
trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/JUpdateDialog.jaxx
Log:
gros nettoyage apres fusion avec la branche 3.2. (migration de schema, nouvelle equation, calcul en maille)
- en cours de finalisation du refactoring du vcs
compile, mais ne fonctionne pas, un commit est jamais mauvais :)
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisConfig.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisConfig.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisConfig.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -19,14 +19,15 @@
package fr.ifremer.isisfish;
-import fr.ifremer.isisfish.actions.ExportAction;
import static org.codelutin.i18n.I18nf._;
+import fr.ifremer.isisfish.actions.ExportAction;
import fr.ifremer.isisfish.actions.OtherAction;
import fr.ifremer.isisfish.actions.ImportAction;
import fr.ifremer.isisfish.actions.SimulationAction;
import fr.ifremer.isisfish.actions.VCSAction;
import fr.ifremer.isisfish.simulator.SimulationContext;
+import fr.ifremer.isisfish.vcs.VCS;
import fr.ifremer.isisfish.vcs.VCSNone;
import java.io.File;
import java.net.MalformedURLException;
@@ -44,7 +45,9 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.codelutin.util.ApplicationConfig;
+import org.codelutin.util.ArgumentsParserException;
import org.codelutin.util.StringUtil;
+import org.codelutin.util.VersionNumber;
/**
*
@@ -58,7 +61,7 @@
/** to use log facility, just put in your code: log.info(\"...\"); */
static private Log log = LogFactory.getLog(IsisConfig.class);
-
+
/** la version du logiciel constitue de l.d.a.r
* <li>l: le numero de version du logiciel
* <li>d: le numero de version du schema de la base de donnees
@@ -74,16 +77,26 @@
* migration de donnees demande automatiquement un changement de version
* d'application.
*/
- // ATTENTION NE PAS MODIFIER LES LIGNES SUIVANTES OU BIEN VERIFIER QUE
- // LE SCRIPT 'publish' FONCTIONNE TOUJOURS
- static final public String VERSION_APPLICATION = "4";
- static final public String VERSION_DATABASE = VERSION_APPLICATION + ".0";
- static final public String VERSION_API_SCRIPT = VERSION_DATABASE + ".0";
- static final public String VERSION = VERSION_DATABASE + ".0";
+ protected final static VersionNumber version = new VersionNumber(3, 2, 0, 0);
+ protected final static VersionNumber databaseVersion = new VersionNumber(
+ version.getNumber(0), version.getNumber(1));
+
+ public static VersionNumber getVersionNumber() {
+ return version;
+ }
+
+ static public String getVersion() {
+ String result = version.toString();
+ return result;
+ }
- static final public String COPYRIGHT_TEXT = "Version " + VERSION + " IFREMER-MAERHA © 2000-2008";
- static final public String CONFIG_FILENAME = "isis-config-" + VERSION_APPLICATION;
+ public static VersionNumber getDatabaseVersion() {
+ return databaseVersion;
+ }
+ static final public String COPYRIGHT_TEXT = "Version " + getVersion() + " IFREMER-MAERHA © 2000-2008";
+ static final public String CONFIG_FILENAME = "isis-config-" + version.getNumber(0);
+
/** separateur de liste */
static final public String SEP = ",";
static final public String REPORT_EMAIL = "isis-fish-bugreport at lists.labs.libre-entreprise.org";
@@ -103,23 +116,25 @@
}
}
-
- static public String getVersion() {
- return VERSION;
- }
//////////////////////////////////////////////////
// Methode d'acces aux options
//////////////////////////////////////////////////
+ /**
+ * Retourne le repertoire racine de toutes les donnees (script, simulation
+ * region, ...)
+ * @return
+ */
public File getDatabaseDirectory() {
File result = getOptionAsFile(Option.DATABASE_DIRECTORY.key);
- if (!result.exists()) {
- result.mkdirs();
- }
return result;
}
+ /**
+ * retourne le repertoire ou sont stockes les scripts compiles
+ * @return
+ */
public File getCompileDirectory() {
File result = getOptionAsFile(Option.COMPILATION_DIRECTORY.key);
if (!result.exists()) {
@@ -128,42 +143,74 @@
return result;
}
+ /**
+ * Retourne l'objet Local a utilise pour la langue
+ * @return
+ */
public Locale getLocale() {
String value = getOption(Option.LOCALE.key);
Locale result = (Locale)ConvertUtils.convert(value, Locale.class);
return result;
}
- public String getEncoding() {
+ /**
+ * Retourne l'encoding a utiliser pour les fichiers textes
+ * @return
+ */
+ public String getEncoding() {
String result = getOption(Option.ENCODING.key);
return result;
}
- public String getSmtpServer() {
+ /**
+ * Retourne le serveur SMTP a utiliser pour l'envoie de mail
+ * @return
+ */
+ public String getSmtpServer() {
String result = getOption(Option.SMTP_SERVER.key);
return result;
}
+ /**
+ * Retourne le nom usuel de l'utilisateur
+ * @return
+ */
public String getUserName() {
String result = getOption(Option.USER_NAME.key);
return result;
}
+ /**
+ * Retourne l'email de l'utilisateur
+ * @return
+ */
public String getUserMail() {
String result = getOption(Option.USER_MAIL.key);
return result;
}
+ /**
+ * Retourne l'url du serveur de simulation
+ * @return
+ */
public String getSimulatorServer() {
String result = getOption(Option.SIMULATOR_SERVER.key);
return result;
}
+ /**
+ * Retourne le login pour acceder au serveur de simulation
+ * @return
+ */
public String getSimulatorUsername() {
String result = getOption(Option.SIMULATOR_USER_NAME.key);
return result;
}
+ /**
+ * Retourne le mot de passe pour acceder au serveur de simulation
+ * @return
+ */
public String getSimulatorPassword() {
String result = getOption(Option.SIMULATOR_PASSWORD.key);
return result;
@@ -177,7 +224,11 @@
public void setSimulatorClassfile(String value) {
setOption(Option.SIMULATOR_CLASSFILE.key, value);
}
-
+
+ /**
+ * Le type de simulation par defaut a utiliser (local, remote, ...)
+ * @return
+ */
public boolean isSimulatorLocal() {
String value = getOption(Option.SIMULATOR_LAUNCHER.key);
boolean result = "local".equalsIgnoreCase(value);
@@ -400,6 +451,75 @@
return result;
}
+ /**
+ * Surcharge pour la migration des options de config qui ont change de nom
+ * <p>
+ * TODO: lors du passage en version 4.0 on pourrait supprimer cette methode
+ *
+ * @param args
+ * @throws org.codelutin.util.ArgumentsParserException
+ */
+ @Override
+ public void parse(String[] args) throws ArgumentsParserException {
+ super.parse(args);
+ // dans la version precedente (3.1) seul le fichier user existe, il est
+ // donc le seul a devoir etre modifie
+ boolean mustSave = false;
+ String[] keys = new String[]{
+ "compileDirectory", Option.COMPILATION_DIRECTORY.key,
+ "defaultBackupDirectory", Option.BACKUP_DIRECTORY.key,
+ "defaultExportDirectory", Option.DEFAULT_EXPORT_DIRECTORY.key,
+ "defaultExportNames", Option.DEFAULT_EXPORT_NAMES.key,
+ "defaultMapFile", Option.DEFAULT_MAP_FILENAME.key,
+ "defaultResultNames", Option.DEFAULT_RESULT_NAMES.key,
+ "defaultSimulator", Option.SIMULATOR_CLASSFILE.key,
+ "defaultTagValue", Option.DEFAULT_TAG_VALUE.key,
+ "javadocURL", Option.JAVADOC_URL.key,
+ "locale", Option.LOCALE.key,
+ "login", Option.SIMULATOR_USER_NAME.key,
+ "password", Option.SIMULATOR_PASSWORD.key,
+ "simulationServer", Option.SIMULATOR_SERVER.key,
+ "simulationShowOnlyError", Option.SIMULATION_SHOW_ONLY_ERROR.key,
+ "simulationShowOnlyQueue", Option.SIMULATION_SHOW_ONLY_QUEUE.key,
+ "smtpServer", Option.SMTP_SERVER.key,
+ "userMail", Option.USER_MAIL.key,
+ "userName", Option.USER_NAME.key,
+ "vcs.keyFile", Option.VCS_SSH_KEY_FILE.key,
+ "vcs.localDatabasePath", Option.DATABASE_DIRECTORY.key,
+ // on supprime car non compatible, les valeurs par defaut sont tres bien
+ "localSimulator", null,
+ "vcs.databaseVersion", null,
+ "vcs.hostName", null,
+ "vcs.noPassPhrase", null,
+ "vcs.remoteDatabase", null,
+ "vcs.remotePath", null,
+ "vcs.type", null,
+ "vcs.typeRepo", null,
+ "vcs.useSshConnexion", null,
+ "vcs.userName", null,
+ };
+
+ for(int i=0; i<keys.length;) {
+ String oldKey = keys[i++];
+ String newKey = keys[i++];
+ if (!oldKey.equals(newKey)) {
+ String value = getOption(oldKey);
+ if (value != null) {
+ mustSave = true;
+ if (newKey == null) {
+ // pas d'equivalent a la cle, on la supprime
+ homefile.remove(oldKey);
+ } else {
+ setOption(newKey, value);
+ }
+ }
+ }
+ }
+ if (mustSave) {
+ saveForUser();
+ }
+ }
+
//////////////////////////////////////////////////
// Toutes les options disponibles
//////////////////////////////////////////////////
@@ -409,6 +529,7 @@
COMPILATION_DIRECTORY("compilation.directory", _("isisfish.config.main.compileDirectory.description"), getUserHome() + File.separator + "isis-build"),
CONFIG_FILE("config.file", _("isisfish.config.main.configFileName.description"), getUserHome() + File.separator + "." + CONFIG_FILENAME),
BACKUP_DIRECTORY("backup.directory", _("isisfish.config.main.defaultBackupDirectory.description"), getUserHome() + File.separator + "isis-backup"),
+
DEFAULT_EXPORT_DIRECTORY("default.export.directory", _("isisfish.config.main.defaultExportDirectory.description"), getUserHome() + File.separator + "isis-export"),
DEFAULT_EXPORT_NAMES("default.export.names", _("isisfish.config.main.defaultExportNames.description"), ""),
DEFAULT_RESULT_NAMES("default.result.names", _("isisfish.config.main.defaultResultNames.description"), ""),
@@ -416,13 +537,16 @@
DEFAULT_TAG_VALUE("default.tagvalue", _("isisfish.config.main.defaultTagValue.description"), ""),
ENCODING("encoding", _("isisfish.config.main.encoding.description"), "UTF-8"),
JAVADOC_URL("javadoc.url", _("isisfish.config.main.javadocURL.description"), "http://isis-fish.labs.libre-entreprise.org/apidocs/"),
+
SIMULATOR_CLASSFILE("simulator.classfile", _("isisfish.config.main.defaultSimulator.description"), "DefaultSimulator.java"),
/** prevu pour l'architecture de lancement en plugin: local, isis-server, caparmor, ... */
SIMULATOR_LAUNCHER("simulator.launcher", _("isisfish.config.main.localSimulator.description"), "local"),
+
SIMULATOR_SERVER("simulation.server", _("isisfish.config.main.simulationServer.description"), "http://simulateur.ifremer.fr:9090"),
/** le login a utiliser pour les launcher distant, le type du launcher est ajouter a la cle (car 1 login par launcher) */
SIMULATOR_USER_NAME("simulator.username", _("isisfish.config.main.login.description"), "anonymous"),
SIMULATOR_PASSWORD("simulator.password", _("isisfish.config.main.password.description"), "guest"),
+
LOCALE("locale", _("isisfish.config.main.locale.description"), "fr_FR"),
// REGION_MAP("regionMap", _("isisfish.config.main.regionMap.description"), "maps"),
// RESULT_EXPORT("resultExport", String.class, 15, n_("isisfish.config.main.resultExport.description"), "resultExports"),
@@ -439,14 +563,16 @@
SSH_PASSPHRASE("ssh.passphrase", _("isisfish.config.vcs.passphrase.description"), ""),
// can be None, CVS or SVN. only None or SVN work
- VCS_TYPE(VCSNone.VCS_TYPE, _("isisfish.config.vcs.type.description"), VCSNone.TYPE_SVN),
+ VCS_TYPE(VCS.VCS_TYPE, _("isisfish.config.vcs.type.description"), VCS.TYPE_SVN),
// depend of VCS_TYPE, for SVN can be http or ssh
- VCS_CONNECTION(VCSNone.VCS_CONNECTION, _("isisfish.config.vcs.useSshConnexion.description"), "http"),
+ VCS_PROTOCOLE(VCS.VCS_PROTOCOLE, _("isisfish.config.vcs.useSshConnexion.description"), "http"),
+ VCS_SSH_KEY_FILE(VCS.VCS_SSH_KEY_FILE, _("isisfish.config.vcs.keyFile.description"), getUserHome() + File.separator + ".ssh" + File.separator + "isis_rsa"),
// user login to access vcs
- VCS_USER_NAME(VCSNone.VCS_USER_NAME, _("isisfish.config.vcs.userName.description"), "anonymous"),
- VCS_HOST_NAME(VCSNone.VCS_HOST_NAME, _("isisfish.config.vcs.hostName.description"), "labs.libre-entreprise.org"),
- VCS_PATH(VCSNone.VCS_PATH, _("isisfish.config.vcs.remotePath.description"), "svnroot/isis-fish-data"),
- VCS_TAG(VCSNone.VCS_TAG, _("isisfish.config.vcs.remoteDatabase.description"), "tag/" + VERSION_DATABASE),
+ VCS_USER_NAME(VCS.VCS_USER_NAME, _("isisfish.config.vcs.userName.description"), "anonymous"),
+ VCS_USER_PASSWORD(VCS.VCS_USER_PASSWORD, _("isisfish.config.vcs.userPassword.description"), ""),
+ VCS_HOST_NAME(VCS.VCS_HOST_NAME, _("isisfish.config.vcs.hostName.description"), "labs.libre-entreprise.org"),
+ VCS_PATH(VCS.VCS_PATH, _("isisfish.config.vcs.remotePath.description"), "/svnroot/isis-fish-data"),
+ VCS_TAG(VCS.VCS_TAG, _("isisfish.config.vcs.remoteDatabase.description"), "/trunk"),
// TYPE_REPO_PROPERTY_KEY = newConfigPropertyKey("typeRepo", VCSTypeRepo.class, 9, n_("isisfish.config.vcs.typeRepo.description"), "TAG"),
// PROJECT_NAME_PROPERTY_KEY = newConfigPropertyKey("projectName", String.class, 11, n_("isisfish.config.main.projectName.description"), "Isis-Fish"),
@@ -471,6 +597,10 @@
// Toutes les actions disponibles
//////////////////////////////////////////////////
+ static public enum Step {
+ AfterInit, AfterInitVCS, AfterUI, BeforeExit
+ }
+
static public enum Action {
HELP(_("Show help"), OtherAction.class.getName() + "#help", "-h", "--help"),
@@ -521,6 +651,6 @@
this.description = description;
this.action = action;
this.aliases = aliases;
- }
+ }
}
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisFish.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisFish.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisFish.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,6 +31,7 @@
package fr.ifremer.isisfish;
+import com.sun.tools.internal.xjc.generator.util.ExistingBlockReference;
import fr.ifremer.isisfish.datastore.AnalysePlanStorage;
import fr.ifremer.isisfish.datastore.FormuleStorage;
import fr.ifremer.isisfish.datastore.RegionStorage;
@@ -49,15 +50,17 @@
import fr.ifremer.isisfish.util.RangeOfValuesConverter;
import fr.ifremer.isisfish.util.StringConverter;
import fr.ifremer.isisfish.util.TimeUnitConverter;
-import fr.ifremer.isisfish.vcs.VCSNone;
+import fr.ifremer.isisfish.vcs.VCS;
+import fr.ifremer.isisfish.vcs.VCSFactory;
import java.io.File;
import org.apache.commons.beanutils.ConvertUtils;
import org.apache.commons.logging.LogFactory;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import org.codelutin.log.LutinLogFactory;
import org.codelutin.math.matrix.DoubleBigVector;
import org.codelutin.math.matrix.MatrixFactory;
import java.util.Locale;
+import org.apache.commons.logging.Log;
import org.swixat.SwiXAT;
import org.swixat.model.Context;
import org.swixml.ConverterLibrary;
@@ -76,13 +79,13 @@
public class IsisFish { // IsisFish
+ /** to use log facility, just put in your code: log.info(\"...\"); */
+ static private Log log = LogFactory.getLog(IsisFish.class);
+
/** ui context location */
static final private String CONTEXT_FILE = "fr/ifremer/isisfish/ui/context.xml";
static final public String LAST_RELEASE_LAUNCH = "lastReleaseLaunched";
- /** to use log facility, just put in your code: log.info(\"...\"); */
- static final private org.apache.commons.logging.Log log;
-
static {
System.setProperty("org.apache.commons.logging.LogFactory",
LutinLogFactory.class.getName()
@@ -92,79 +95,57 @@
static public IsisConfig config = null;
static public int step = 0; // action step
- static public VCSNone vcs = null;
+ static public VCS vcs = null;
static public Context uiContext = null;
- static protected boolean quit = false;
/**
* ask for application quit
*/
static public void quit() {
- quit = true;
+ System.exit(0);
}
- public static boolean isQuit() {
- return quit;
- }
-
static public void main(String... args) {
try {
-
// initialisation de l'application
IsisFish.init(args);
log.debug(_("isisfish.launch.init.done", config.getElapsedTimeAsString()));
+
+ // action after init
+ config.doAction(IsisConfig.Step.AfterInit.ordinal());
- // action before check database
- config.doAction(step++);
-
- checkReleaseLaunched();
-
- checkDatabase();
-
- // action before check vcs
- config.doAction(step++);
-
initVCS();
log.info(_("isisfish.launching", config.getElapsedTimeAsString()));
- // last actions before launching or quitting
- config.doAction(step++);
+ // after init vcs and local data
+ config.doAction(IsisConfig.Step.AfterInitVCS.ordinal());
launchUI();
// action after ui launched
- config.doAction(step++);
+ config.doAction(IsisConfig.Step.AfterUI.ordinal());
} catch (Exception e) {
e.printStackTrace();
quit();
- } finally {
- startQuitDaemon();
}
}
/**
- * Start daemon that monitor quit value, if value is true, quit isis
+ * Start daemon that monitor quit value, if value is true, quit isis. Ce
+ * mecanisme permet de faire des actions avant de quitter l'application
*/
- static public void startQuitDaemon() {
- Thread quitDaemon = new Thread(new Runnable() {
- public void run() {
- while(true) {
- try {
- if (isQuit()) {
- config.doAction(step);
- System.exit(0);
- }
- Thread.sleep(1000);
- } catch (Exception eee) {
- log.info("Error in quit daemon", eee);
- }
- }
+ static public class IsisQuitHook extends Thread {
+
+ @Override
+ public void run() {
+ try {
+ config.doAction(IsisConfig.Step.BeforeExit.ordinal());
+ } catch (Exception eee) {
+ log.info("Error in quit daemon", eee);
}
- }, "Isis quit daemon");
- quitDaemon.setDaemon(true);
- quitDaemon.start();
+ }
}
/**
@@ -174,8 +155,6 @@
* @throws Exception if any exception while build configuration
*/
static public void init(String ... args) throws Exception {
- config = new IsisConfig();
-
log.info(_("isisfish.launch.start", java.util.Arrays.toString(args)));
StringBuilder builder = new StringBuilder();
builder.append(java.text.SimpleDateFormat.getInstance().format(new java.util.Date()));
@@ -184,13 +163,18 @@
log.info(builder.toString());
log.debug(_("isisfish.launch.debugMode"));
+ // first load converter and matrixFactory
+ initConvertersAndMatrixFactory();
+ // after init shutdown hook
+ Runtime.getRuntime().addShutdownHook(new IsisQuitHook());
+
+ config = new IsisConfig();
+
// parsing des options à partir des arguments passés
config.parse(args);
I18n.init(config.getLocale(), config.getEncoding());
- // post load hook (converter and matrixFactory)
- initConvertersAndMatrixFactory();
}
// public static void initVCS() {
@@ -209,56 +193,15 @@
// }
/**
- * Check last version launch to determine is user change his release
- */
- static public void checkReleaseLaunched() {
- String version = config.getOption(LAST_RELEASE_LAUNCH);
- if (version == null) { // first launch of isis ?
- // ask user for some configuration
- // FIXME
- // try to checkout vcs data
- // FIXME
- } else if(!version.equals(config.getVersion())) {
- // user has upgraded isis
- // TODO: utiliser ce block pour faire des actions d'upgrade entre deux versions
- }
- // update last version launch
- config.setOption(LAST_RELEASE_LAUNCH, config.getVersion());
- }
-
- /**
- * Check and recreate necessary directory for isis work successfull
- */
- static public void checkDatabase() {
- // check database repository directory
- File[] dirs = new File[]{
- config.getDatabaseDirectory(),
- AnalysePlanStorage.getAnalysePlanDirectory(),
- FormuleStorage.getFormuleDirectory(),
- RegionStorage.getRegionDirectory(),
- RuleStorage.getRuleDirectory(),
- ScriptStorage.getScriptDirectory(),
- SimulationStorage.getSimulationDirectory(),
- SimulatorStorage.getSimulatorDirectory(),
- };
-
- for(File f : dirs) {
- if (!f.exists()) {
- f.mkdirs();
- }
- }
- }
-
- /**
* Initialise le VCSNone et check s'il y a des mises a jour pour prevenir
* l'utilisateur
*/
static public void initVCS() {
// init vcs
- vcs = VCSNone.createVCS(config);
+ vcs = VCSFactory.createVCS(config);
// check connection status
- vcs.checkConnection();
+ vcs.checkProtocol();
// check release
vcs.checkRelease();
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisTray.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisTray.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisTray.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,7 +31,7 @@
package fr.ifremer.isisfish;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import static org.codelutin.i18n.I18n.n_;
import java.awt.AWTException;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/actions/OtherAction.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/actions/OtherAction.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/actions/OtherAction.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -22,8 +22,10 @@
import static org.codelutin.i18n.I18nf._;
import fr.ifremer.isisfish.IsisConfig;
-import fr.ifremer.isisfish.vcs.VCSNone;
+import fr.ifremer.isisfish.IsisFish;
+import fr.ifremer.isisfish.vcs.VCS;
import java.io.File;
+import java.util.Arrays;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -51,11 +53,11 @@
}
public void chekoutMavenFile() throws Exception {
- VCSNone vcs = config.getVCS();
+ VCS vcs = IsisFish.vcs;
File dest = config.getDatabaseDirectory();
File file = new File(dest, "pom.xml");
log.info(_("Checkout pom.xml to %s", file));
- vcs.update(file);
+ vcs.update(Arrays.asList(file));
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/AnalysePlanStorage.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/AnalysePlanStorage.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/AnalysePlanStorage.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -38,7 +38,7 @@
import fr.ifremer.isisfish.util.Docable;
import fr.ifremer.isisfish.vcs.VCSException;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import org.apache.commons.collections.map.ReferenceMap;
import org.apache.commons.lang.ObjectUtils;
@@ -88,6 +88,7 @@
static public File getAnalysePlanDirectory() {
File result = IsisFish.config.getDatabaseDirectory();
result = new File(result, ANALYSE_PLAN_PATH);
+ result.mkdirs();
return result;
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/CodeSourceStorage.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/CodeSourceStorage.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/CodeSourceStorage.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -75,7 +75,7 @@
* @param directory le repertoire ou devrait se trouver la classe. Ce
* répertoire doit etre un sous répertoire de rootSrc
* @param name le nom de la classe
- * @param suffix TODO
+ * @param suffix l'extension des fichiers
*/
protected CodeSourceStorage(File rootSrc, File directory, String name, String suffix) {
// if name end with suffix we don't add suffix to filename
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/DataStorage.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/DataStorage.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/DataStorage.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -30,7 +30,7 @@
package fr.ifremer.isisfish.datastore;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import java.io.File;
import java.io.IOException;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/ExportStorage.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/ExportStorage.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/ExportStorage.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -40,7 +40,7 @@
import fr.ifremer.isisfish.util.Docable;
import fr.ifremer.isisfish.vcs.VCSException;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import org.apache.commons.collections.map.ReferenceMap;
import org.apache.commons.logging.Log;
@@ -81,6 +81,7 @@
static public File getExportDirectory() {
File result = IsisFish.config.getDatabaseDirectory();
result = new File(result, EXPORT_PATH);
+ result.mkdirs();
return result;
}
@@ -151,7 +152,7 @@
*/
public Doc getFieldDoc(String fieldName) {
throw new IsisFishRuntimeException(_("isisfish.error.not.found.class" +
- "support Docable#getFieldDoc(String) method {0}",this));
+ "support Docable#getFieldDoc(String) method %1$s",this));
}
/**
@@ -164,7 +165,7 @@
*/
public String getDescription() {
throw new IsisFishRuntimeException(_("isisfish.error.not.support.class" +
- "Docable#getDescription() method {0}",this));
+ "Docable#getDescription() method %1$s",this));
}
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/FormuleStorage.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/FormuleStorage.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/FormuleStorage.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -84,6 +84,7 @@
static public File getFormuleDirectory() {
File result = IsisFish.config.getDatabaseDirectory();
result = new File(result, FORMULE_PATH);
+ result.mkdirs();
return result;
}
@@ -210,9 +211,11 @@
static public List<String> getCategories() {
List<String> result = new ArrayList<String>();
File dir = getFormuleDirectory();
- for (File f : dir.listFiles()) {
- if (f.isDirectory() && getVCS().isVersionnableAbleFile(f)) {
- result.add(f.getName());
+ if (dir.exists()) {
+ for (File f : dir.listFiles()) {
+ if (f.isDirectory() && getVCS().isVersionnableAbleFile(f)) {
+ result.add(f.getName());
+ }
}
}
return result;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/IsisH2Config.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/IsisH2Config.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/IsisH2Config.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -18,19 +18,15 @@
* ##% */
package fr.ifremer.isisfish.datastore;
-import fr.ifremer.isisfish.commandline.configs.IsisAbstractConfigH2;
-import fr.ifremer.isisfish.IsisContext;
-import fr.ifremer.isisfish.IsisFishRuntimeException;
+import fr.ifremer.isisfish.IsisConfig;
import fr.ifremer.isisfish.IsisFishDAOHelper;
+import fr.ifremer.isisfish.datastore.migration.SwingMigrationCallbackHandler;
import org.codelutin.topia.migration.TopiaMigrationServiceImpl;
-import org.codelutin.util.H2TypeEnum;
import org.hibernate.cfg.Environment;
import java.io.File;
-import java.io.IOException;
-import java.io.BufferedOutputStream;
-import java.text.MessageFormat;
import java.util.Properties;
+import org.hibernate.dialect.H2Dialect;
/**
* Isis H2 concrete Config implementation
@@ -38,30 +34,59 @@
* @author chemit
* @see IsisAbstractConfigH2
*/
-public class IsisH2Config extends IsisAbstractConfigH2 {
+public class IsisH2Config {
- protected void init() throws Exception {
- // h2 config is fully static final transient :)
- loadFromDefaultValue();
- }
+ static final private String commonUrl =
+ // on peut aussi utiliser mysql ou postgresql
+ "MODE=hsqldb;" +
+ // Sets the default lock timeout (in milliseconds) in this database
+ // that is used for the new sessions.
+ "DEFAULT_LOCK_TIMEOUT=1000;" +
+ // -1: the database is never closed until the close delay is set to
+ // some other rev or SHUTDOWN is called., 0: no delay (default; the
+ // database is closed if the last connection to it is closed)., n:
+ // the database is left open for n second after the last connection
+ // is closed.
+ "DB_CLOSE_DELAY=0;" +
+ // 0: no locking (should only be used for testing),
+ // 1: table level locking (default),
+ // 2: table level locking with garbage collection (if the
+ // application does not close all connections).
+ // LOCK_MODE 3 (READ_COMMITTED). Table level locking, but only when
+ // writing (no read locks).
+ "LOCK_MODE=3;" +
+ // Levels: 0=off, 1=error, 2=info, 3=debug.
+ "TRACE_LEVEL_FILE=0;" +
+ // on system.out: 0=off, 1=error, 2=info, 3=debug.
+ "TRACE_LEVEL_SYSTEM_OUT=1";
- @Override
- public void save(BufferedOutputStream bufferedOutputStream) throws IOException {
- // h2 config is fully static final transient :)
- }
-
+ static final private String h2Url =
+ "jdbc:h2:file:%s;" +
+ // on peut aussi utiliser file, socket
+ "FILE_LOCK=file;" +
+ //1 or 2 is needed to restore avec crash
+ // 0: logging is disabled (faster),
+ // 1: logging of the data is enabled, but logging of the index
+ // changes is disabled (default), 2: logging of both data and index
+ // changes are enabled
+ "LOG=1;" +
+ commonUrl;
+
+ static final private String h2memUrl =
+ "jdbc:h2:mem:%s;" +
+ "LOG=0;" +
+ commonUrl;
/**
* @param rootDir le rᅵpertoire de base du DataStorage
* @return le rᅵpertoire de donnᅵes d'un Data storage ᅵ partir de son rᅵpertoire de base
* @see #STORAGE_DATA_PROPERTY_KEY
*/
static public File getStorageDataDirectory(File rootDir) {
- String name = IsisContext.get().getH2Config().getStorageData();
- return new File(rootDir, name);
+ return new File(rootDir, "data");
}
//////////////////////////////////////////////////
- // Les opᅵrations sur base embarquᅵe
+ // Les operations sur base embarquee
//////////////////////////////////////////////////
/**
@@ -72,17 +97,21 @@
* @return l'objet config passᅵ en parametre
*/
static public Properties addMemDatabaseConfig(Properties config, String id) {
- IsisAbstractConfigH2 conf = IsisContext.get().getH2Config();
- if (conf.getH2MemType() != H2TypeEnum.h2) {
- //TODO see if this is possible ? I don't known in fact
- }
- config.setProperty(Environment.USER, conf.getH2MemUser());
- config.setProperty(Environment.PASS, conf.getH2MemPass());
- System.setProperty(Environment.BYTECODE_PROVIDER, conf.getH2MemBytecodeProvider());
- config.setProperty(Environment.DIALECT, conf.getH2MemDialect());
- config.setProperty(Environment.DRIVER, conf.getH2MemDriver());
- String url = MessageFormat.format(conf.getH2MemURL(), id);
+ // On utilise pas cglib pour eviter les OutOfMemory: PermGen
+ System.setProperty(Environment.BYTECODE_PROVIDER, "javassist");
+
+ config.setProperty(Environment.USER, "sa");
+ config.setProperty(Environment.PASS, "");
+ config.setProperty(Environment.DIALECT, H2Dialect.class.getName());
+ config.setProperty(Environment.DRIVER, org.h2.Driver.class.getName());
+ // correct error : org.hibernate.HibernateException: No CurrentSessionContext configured!
+ config.setProperty(Environment.CURRENT_SESSION_CONTEXT_CLASS, "thread");
+
+ // config.setProperty(Environment.SHOW_SQL, "true");
+
+ String url = String.format(h2memUrl, id);
config.setProperty(Environment.URL, url);
+
return config;
}
@@ -97,68 +126,27 @@
static public Properties addDatabaseConfig(Properties config, File directory) {
File databasePath = getStorageDataDirectory(directory);
databasePath.mkdirs();
- IsisAbstractConfigH2 conf = IsisContext.get().getH2Config();
- config.setProperty(Environment.USER, conf.getH2User());
- config.setProperty(Environment.PASS, conf.getH2Pass());
+ // on reutilise les memes valeurs, seul l'url change, mais on l'ecrase ensuite
+ addMemDatabaseConfig(config, "");
- config.setProperty(Environment.DIALECT, conf.getH2Dialect());
- config.setProperty(Environment.DRIVER, conf.getH2Driver());
-
- config.setProperty("topia.dao.flatfile.directory", directory.getPath());
-
-// config.setProperty(Environment.SHOW_SQL, "true");
-// config.setProperty(Environment.HBM2DDL_AUTO, "create");
-
- H2TypeEnum h2Type = conf.getH2Type();
- if (h2Type == null) {
- // fatal error
- throw new IsisFishRuntimeException("could not found h2 type, check the property " + H2_TYPE_PROPERTY_KEY);
- }
-
- // correct error : org.hibernate.HibernateException: No CurrentSessionContext configured!
- config.setProperty(Environment.CURRENT_SESSION_CONTEXT_CLASS, conf.getH2CurrentSessionContextClass());
-
- String url = null;
- switch (h2Type) {
- case derby:
- url = MessageFormat.format(conf.getH2URL(), databasePath.getPath());
- break;
- case h2:
- // On utilise pas cglib pour eviter les OutOfMemory: PermGen
- System.setProperty(Environment.BYTECODE_PROVIDER, conf.getH2BytecodeProvider());
- // pour h2 on remet STORAGE_DATA car il ne cree pas de repertoire
- url = MessageFormat.format(conf.getH2URL(), getStorageDataDirectory(databasePath).getPath());
- break;
- case hsql:
- url = MessageFormat.format(conf.getH2URL(), databasePath.getPath());
- break;
- case mckoi:
- File dbconf = new File(databasePath, "db.conf");
- try {
- dbconf.createNewFile();
- } catch (IOException eee) {
- throw new IsisFishRuntimeException("can't create mckoi db.conf file");
- }
- url = MessageFormat.format(conf.getH2URL(), dbconf.getPath(), databasePath.getPath());
- break;
- }
+ // pour h2 on remet STORAGE_DATA car il ne cree pas de repertoire
+ String url = String.format(h2Url, getStorageDataDirectory(databasePath).getPath());
config.setProperty(Environment.URL, url);
- // migrate database
- if (conf.isUpdateschemaDatabase()) {
- // migration configuration
- config.put(TopiaMigrationServiceImpl.MIGRATION_APPLICATION_VERSION, conf.getMigrationApplicationVersion());
- config.put(TopiaMigrationServiceImpl.MIGRATION_PREVIOUS_MAPPING_DIRECTORY, conf.getMigrationPreviousMappingDirectory());
- config.put(TopiaMigrationServiceImpl.MIGRATION_MODEL_NAMES, conf.getMigrationModelNames());
- config.put(TopiaMigrationServiceImpl.MIGRATION_CALLBACKHANDLERS, conf.getMigrationCallBackhandlers());
- config.put("topia.service.migration", conf.getMigrationTopiaService());
- }
+ // migration configuration, seulement pour les fichiers, pas pour les bases memoires
+ config.put(TopiaMigrationServiceImpl.MIGRATION_APPLICATION_VERSION, IsisConfig.getDatabaseVersion().toString());
+ config.put(TopiaMigrationServiceImpl.MIGRATION_PREVIOUS_MAPPING_DIRECTORY, "oldmappings");
+ config.put(TopiaMigrationServiceImpl.MIGRATION_MODEL_NAMES, "IsisFish");
+ config.put(TopiaMigrationServiceImpl.MIGRATION_CALLBACKHANDLERS, SwingMigrationCallbackHandler.class.getName());
+ config.put("topia.service.migration", TopiaMigrationServiceImpl.class.getName());
+
return config;
}
+
/**
- * Permet d'ajouter les differents mapping hibernate spᅵcifique a l'application
+ * Permet d'ajouter les differents mapping hibernate specifique a l'application
*
* @param config l'objet properties dans lequel il faut ajouter les informations
* @return l'objet config passᅵ en parametre
@@ -170,131 +158,4 @@
return config;
}
- static public Properties addMemDatabaseConfigOld(Properties config, String id) {
- config.setProperty("hibernate.connection.username", "sa");
- config.setProperty("hibernate.connection.password", "");
-
- // On utilise pas cglib pour eviter les OutOfMemory: PermGen
- System.setProperty("hibernate.bytecode.provider", "javassist");
- config.setProperty("hibernate.dialect",
- "org.hibernate.dialect.H2Dialect");
- config.setProperty("hibernate.connection.driver_class",
- "org.h2.Driver");
- config.setProperty("hibernate.connection.url",
- // pour h2 on remet STORAGE_DATA car il ne cree pas de repertoire
- "jdbc:h2:mem:" + id
- + ";MODE=hsqldb" // on peut aussi utiliser mysql ou postgresql
- + ";DEFAULT_LOCK_TIMEOUT=1000" // Sets the default lock timeout (in milliseconds) in this database that is used for the new sessions.
-// + ";ASSERT=0" // 0: no assertions (for higher performance), 1: assertions are switched on (default)
- + ";DB_CLOSE_DELAY=0" // -1: the database is never closed until the close delay is set to some other value or SHUTDOWN is called., 0: no delay (default; the database is closed if the last connection to it is closed)., n: the database is left open for n second after the last connection is closed.
- // FIXME essai avec un LOCK_MODE=3, pour voir si on supprime le probleme de fenetre de lancement qui ne permet plus de modifier la region (voir s'il n'y a pas d'autre probleme)
- + ";LOCK_MODE=3" // 0: no locking (should only be used for testing), 1: table level locking (default), 2: table level locking with garbage collection (if the application does not close all connections). LOCK_MODE 3 (READ_COMMITTED). Table level locking, but only when writing (no read locks).
- + ";LOG=0" //1 or 2 is needed to restore avec crash 0: logging is disabled (faster), 1: logging of the data is enabled, but logging of the index changes is disabled (default), 2: logging of both data and index changes are enabled
- + ";TRACE_LEVEL_FILE=0" // Levels: 0=off, 1=error, 2=info, 3=debug.
- + ";TRACE_LEVEL_SYSTEM_OUT=1" // on system.out: 0=off, 1=error, 2=info, 3=debug.
-// + ";STORAGE=TEXT" // on peut ne rien mettre pour avoir un format binaire (plus rapide)
-// + ";IGNORE_UNKNOWN_SETTINGS=TRUE"
- );
-
- return config;
- }
-
- static public Properties addDatabaseConfigOld(Properties config, File directory) {
- File databasePath = getStorageDataDirectory(directory);
- //File databasePath = new File(directory, STORAGE_DATA);
- databasePath.mkdirs();
-
-// config.setProperty("hibernate.show_sql", "true");
-// config.setProperty("hibernate.hbm2ddl.auto", "create");
-
- config.setProperty("topia.dao.flatfile.directory", directory.getPath());
-
- //config.setProperty("hibernate.connection.username", "dbuser");
- //config.setProperty("hibernate.connection.password", "xxxxxxxx");
-
- System.setProperty("hibernate.bytecode.provider", "javassist");
- //config.setProperty("hibernate.bytecode.provider","javassist");
-
- // correct error : org.hibernate.HibernateException: No CurrentSessionContext configured!
- config.setProperty(Environment.CURRENT_SESSION_CONTEXT_CLASS, "thread");
-
- // Pour utiliser derby
-// config.setProperty("hibernate.dialect",
-// "org.hibernate.dialect.DerbyDialect");
-// config.setProperty("hibernate.connection.driver_class",
-// "org.apache.derby.jdbc.EmbeddedDriver");
-// config.setProperty("hibernate.connection.url",
-// "jdbc:derby:" + new File(directory, STORAGE_DATA).getPath() + ";create=true");
-
- // Pour utiliser hsql
- config.setProperty("hibernate.connection.username", "sa");
- config.setProperty("hibernate.connection.password", "");
-
- // On utilise pas cglib pour eviter les OutOfMemory: PermGen
- System.setProperty("hibernate.bytecode.provider", "javassist");
- config.setProperty("hibernate.dialect",
- "org.hibernate.dialect.H2Dialect");
- config.setProperty("hibernate.connection.driver_class",
- "org.h2.Driver");
- config.setProperty("hibernate.connection.url",
- // pour h2 on remet STORAGE_DATA car il ne cree pas de repertoire
- "jdbc:h2:file:" + getStorageDataDirectory(databasePath).getPath()
- //"jdbc:h2:file:" + new File(databasePath, STORAGE_DATA).getPath()
- + ";FILE_LOCK=file" // on peut aussi utiliser file, socket
- + ";MODE=hsqldb" // on peut aussi utiliser mysql ou postgresql
- + ";DEFAULT_LOCK_TIMEOUT=1000" // Sets the default lock timeout (in milliseconds) in this database that is used for the new sessions.
- + ";DB_CLOSE_DELAY=0" // -1: the database is never closed until the close delay is set to some other rev or SHUTDOWN is called., 0: no delay (default; the database is closed if the last connection to it is closed)., n: the database is left open for n second after the last connection is closed.
- // FIXME essai avec un LOCK_MODE=3, pour voir si on supprime le probleme de fenetre de lancement qui ne permet plus de modifier la region (voir s'il n'y a pas d'autre probleme)
- + ";LOCK_MODE=3" // 0: no locking (should only be used for testing), 1: table level locking (default), 2: table level locking with garbage collection (if the application does not close all connections). LOCK_MODE 3 (READ_COMMITTED). Table level locking, but only when writing (no read locks).
- + ";LOG=1" //1 or 2 is needed to restore avec crash 0: logging is disabled (faster), 1: logging of the data is enabled, but logging of the index changes is disabled (default), 2: logging of both data and index changes are enabled
- + ";TRACE_LEVEL_FILE=0" // Levels: 0=off, 1=error, 2=info, 3=debug.
- + ";TRACE_LEVEL_SYSTEM_OUT=1" // on system.out: 0=off, 1=error, 2=info, 3=debug.
-// + ";STORAGE=TEXT" // on peut ne rien mettre pour avoir un format binaire (plus rapide)
- );
-
- // Pour utiliser HSQL
-// config.setProperty("hibernate.dialect",
-// "org.hibernate.dialect.HSQLDialect");
-// config.setProperty("hibernate.connection.driver_class",
-// "org.hsqldb.jdbcDriver");
-// config.setProperty("hibernate.connection.url",
-// "jdbc:hsqldb:file:" + new File(directory, STORAGE_DATA).getPath()
-// + ";shutdown=true");
-
- // Pour utiliser McKoi
-// config.setProperty("hibernate.dialect",
-// "org.hibernate.dialect.MckoiDialect");
-// config.setProperty("hibernate.connection.driver_class",
-// "com.mckoi.JDBCDriver");
-// File datadir = new File(directory, STORAGE_DATA);
-// File dbconf = new File(datadir, "db.conf");
-// try {
-// dbconf.createNewFile();
-// } catch (IOException eee) {
-// throw new IsisFishRuntimeException("can't create mckoi db.conf file");
-// }
-// config.setProperty("hibernate.connection.url",
-// "jdbc:mckoi:local://" + dbconf.getPath() +
-// "?create_or_boot=true" +
-// "&database_path=" + datadir.getPath() +
-// "&log_path=" + datadir.getPath() +
-// "&use_nio_if_available=enabled" +
-// "&dont_synch_filesystem=enabled" +
-// "&io_safety_level=3"
-// );
-
- // migrate database
- if (IsisContext.get().getH2Config().isUpdateschemaDatabase()) {
- //if (IsisConfig.UPDATESCHEMA_DATABASE) {
- // migration configuration
- //TODO Use config static,final,mandatory properties
- config.setProperty(TopiaMigrationServiceImpl.MIGRATION_APPLICATION_VERSION, "1");
- config.setProperty(TopiaMigrationServiceImpl.MIGRATION_PREVIOUS_MAPPING_DIRECTORY, "oldmappings");
- config.setProperty(TopiaMigrationServiceImpl.MIGRATION_MODEL_NAMES, "IsisFish");
- config.setProperty(TopiaMigrationServiceImpl.MIGRATION_CALLBACKHANDLERS,
- fr.ifremer.isisfish.datastore.migration.SwingMigrationCallbackHandler.class.getName());
- config.setProperty("topia.service.migration", TopiaMigrationServiceImpl.class.getName());
- }
- return config;
- }
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/JavaSourceStorage.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/JavaSourceStorage.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/JavaSourceStorage.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -34,7 +34,7 @@
import fr.ifremer.isisfish.IsisFish;
import fr.ifremer.isisfish.util.CompileHelper;
import org.apache.commons.lang.ClassUtils;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import java.io.File;
import java.io.PrintWriter;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/RegionStorage.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/RegionStorage.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/RegionStorage.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -40,7 +40,7 @@
import org.apache.commons.lang.time.DateFormatUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import org.codelutin.topia.TopiaContext;
import org.codelutin.topia.TopiaException;
import org.codelutin.util.FileUtil;
@@ -83,6 +83,7 @@
static public File getRegionDirectory() {
File result = IsisFish.config.getDatabaseDirectory();
result = new File(result, REGION_PATH);
+ result.mkdirs();
return result;
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/ResultStorage.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/ResultStorage.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/ResultStorage.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,7 +31,7 @@
package fr.ifremer.isisfish.datastore;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import java.io.File;
import java.util.ArrayList;
@@ -537,7 +537,7 @@
// recuperation des noms des dimensions
String [] dimNames = new String[1 + mat.getNbDim()];
- dimNames[0] = I18n._("isisfish.common.date");
+ dimNames[0] = _("isisfish.common.date");
for(int i=1; i<dimNames.length; i++){
dimNames[i] = mat.getDimensionName(i-1);
}
@@ -610,7 +610,7 @@
try {
doAddResult(date, name, mat, context.getDbResult());
} catch (TopiaException eee) {
- log.warn(_("Can''t add result ''{0}'' at date {1}", name, date) , eee);
+ log.warn(_("Can't add result '%1$s' at date %2$s", name, date) , eee);
}
}
@@ -623,7 +623,7 @@
result = getMatrix(date, name, context.getDbResult());
} catch (TopiaException eee) {
if (log.isWarnEnabled()) {
- log.warn(_("Can''t get result: {0}", name), eee);
+ log.warn(_("Can't get result: %1$s", name), eee);
}
}
return result;
@@ -638,7 +638,7 @@
result = getMatrix(name, context.getDbResult());
} catch (TopiaException eee) {
if (log.isWarnEnabled()) {
- log.warn(_("Can''t get result: {0}", name), eee);
+ log.warn(_("Can't get result: %1$s", name), eee);
}
}
return result;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/RuleStorage.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/RuleStorage.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/RuleStorage.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -38,7 +38,7 @@
import fr.ifremer.isisfish.rule.Rule;
import fr.ifremer.isisfish.vcs.VCSException;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import org.apache.commons.collections.map.ReferenceMap;
import org.apache.commons.lang.ObjectUtils;
@@ -89,6 +89,7 @@
static public File getRuleDirectory() {
File result = IsisFish.config.getDatabaseDirectory();
result = new File(result, RULE_PATH);
+ result.mkdirs();
return result;
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/ScriptStorage.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/ScriptStorage.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/ScriptStorage.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -39,7 +39,7 @@
import fr.ifremer.isisfish.util.Docable;
import fr.ifremer.isisfish.vcs.VCSException;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import org.apache.commons.collections.map.ReferenceMap;
import org.apache.commons.logging.Log;
@@ -80,6 +80,7 @@
static public File getScriptDirectory() {
File result = IsisFish.config.getDatabaseDirectory();
result = new File(result, SCRIPT_PATH);
+ result.mkdirs();
return result;
}
@@ -207,6 +208,6 @@
*/
public String getDescription() {
throw new IsisFishRuntimeException(_("isisfish.error.not.support.class" +
- "Docable#getDescription() method {0}",this));
+ "Docable#getDescription() method %1$s",this));
}
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/SimulationInformation.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/SimulationInformation.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/SimulationInformation.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,7 +31,7 @@
package fr.ifremer.isisfish.datastore;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import java.io.File;
import java.io.FileReader;
@@ -275,6 +275,10 @@
setInfo(SIMULATION_EXCEPTION, v);
}
+ public boolean hasError() {
+ boolean result = getException() != null && getException().length() > 0;
+ return result;
+ }
public String getInfomation() {
String result = info.getProperty(OTHER_INFO);
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/SimulationStorage.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/SimulationStorage.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/SimulationStorage.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,7 +31,7 @@
package fr.ifremer.isisfish.datastore;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import java.io.File;
import java.io.FileInputStream;
@@ -56,6 +56,7 @@
import fr.ifremer.isisfish.entities.FisheryRegion;
import fr.ifremer.isisfish.entities.FisheryRegionDAO;
import fr.ifremer.isisfish.logging.SimulationLoggerUtil;
+import fr.ifremer.isisfish.simulator.SimulationControl;
import fr.ifremer.isisfish.simulator.SimulationParameter;
import fr.ifremer.isisfish.vcs.VCSException;
@@ -101,6 +102,10 @@
setParameter(parameter);
}
+ /**
+ * Retourne le repertoire de base de stockage des simultions
+ * @return
+ */
static public File getSimulationDirectory() {
File result = IsisFish.config.getDatabaseDirectory();
result = new File(result, SIMULATION_PATH);
@@ -110,6 +115,11 @@
return result;
}
+ /**
+ * Retourne le repertoire de stockage d'une simulation portant le nom name
+ * @param name le nom de la simulation dont on souhaite le repertoire
+ * @return
+ */
static public File getSimulationDirectory(String name) {
File result = getSimulationDirectory();
result = new File(result, name);
@@ -119,6 +129,12 @@
return result;
}
+ /**
+ * Retourne le repertoire de stockage des exports de resulatat d'une
+ * simulation.
+ * @param root le repertoire de stockage de la simulation
+ * @return
+ */
static public File getResultExportDirectory(File root) {
File result = new File(root, RESULT_EXPORT_DIRECTORY);
if (!result.exists()) {
@@ -127,26 +143,105 @@
return result;
}
+ /**
+ * Retourne le fichier de stockage des parametres de la simulation
+ * @param root le repertoire de stockage de la simulation
+ * @return
+ */
static public File getSimulationParametersFile(File root) {
File result = new File(root, PARAMETERS_FILENAME);
return result;
}
+ /**
+ * Retourne le fichier de stockage des inforations de la simulation
+ * @param root le repertoire de stockage de la simulation
+ * @return
+ */
static public File getSimulationInformationFile(File root) {
File result = new File(root, INFORMATION_FILENAME);
return result;
}
+ /**
+ * Retourne le fichier de stockage des resultats sous format XML mexico
+ * de la simulation
+ * @param root le repertoire de stockage de la simulation
+ * @return
+ */
static public File getSimulationResultXmlFile(File root) {
File result = new File(root, RESULT_XML_FILENAME);
return result;
}
+ /**
+ * Retourne le fichier de stockage des parametres de la simulation courante
+ * @return
+ */
protected File getSimulationParametersFile() {
File result = getSimulationParametersFile(getDirectory());
return result;
}
+ protected transient File simulationControlFile = null;
+ /**
+ * Retourne le fichier de stockage du fichier de control de la simulation.
+ * Ce fichier conserve l'etat de la simulation, cela permet a un processus
+ * externe de connaitre l'etat d'une simulation distante
+ * @return
+ */
+ protected File getSimulationControlFile() {
+ if (simulationControlFile == null) {
+ simulationControlFile = new File(getDirectory(), "control");
+ }
+ return simulationControlFile;
+ }
+
+ /**
+ * Force la sauvegarde du fichier de control d'une simulation, ce fichier
+ * est sous la forme d'un fichier de proprietes
+ * @param control l'objet control de la simulation courante
+ */
+ public void saveControl(SimulationControl control) {
+ try {
+ Properties prop = control.getProperties();
+ File file = getSimulationControlFile();
+ FileOutputStream out = new FileOutputStream(file);
+ prop.store(out, "Control");
+ out.close();
+ } catch (Exception eee) {
+ // juste un log, car la sauvegarde d'un control ne doit jamais echouer
+ // car simplement utilise pour indique l'etat de simulation
+ log.warn("Can't save control", eee);
+ }
+ }
+
+ /**
+ * Reli le fichier contenant les infos de SimulationControl, en excluant
+ * certain champs
+ * @param control le control a mettre a jour en fonction de ce qui est lu
+ * @param exclude les champs a exclure
+ */
+ public void readControl(SimulationControl control, String ... exclude) {
+ try {
+ Properties prop = new Properties();
+ File file = getSimulationControlFile();
+ FileInputStream in = new FileInputStream(file);
+ prop.load(in);
+ in.close();
+ for (String e : exclude) {
+ prop.remove(e);
+ }
+ control.updateFromProperties(prop);
+ } catch (Exception eee) {
+ log.warn("Can't read control", eee);
+ }
+ }
+
+ /**
+ * Modifie les parametres de la simulation
+ * @param parameter les nouveaux parametres
+ */
public void setParameter(SimulationParameter parameter) {
this.parameter = parameter;
if (parameter != null) {
@@ -213,6 +308,10 @@
return this.parameter;
}
+ /**
+ * Retourne le nom du fichier contenant les informations de simulation
+ * @return
+ */
protected File getInformationFile() {
File result = new File(getDirectory(), INFORMATION_FILENAME);
return result;
@@ -354,8 +453,17 @@
return result;
}
+ /**
+ *
+ * @return
+ * @throws fr.ifremer.isisfish.datastore.StorageException
+ * @deprecated ne plus utiliser car le context n'est jamais ferme, plutot
+ * utiliser {@link #getFisheryRegion(TopiaContext)}
+ */
+ @Deprecated
public FisheryRegion getFisheryRegion() throws StorageException {
- // FIXME voir si la methode est vraiment utilisée car le context n'est jamais fermé, ce qui est dérangeant
+ // FIXME voir si la methode est vraiment utilisée car le context n'est
+ // jamais fermé, ce qui est dérangeant
try {
TopiaContext tx = getStorage().beginTransaction();
FisheryRegion result = getFisheryRegion(tx);
@@ -366,6 +474,12 @@
}
}
+ /**
+ * Retourne la {@link FisheryRegion} associee a cette simulation
+ * @param context
+ * @return
+ * @throws fr.ifremer.isisfish.datastore.StorageException
+ */
static public FisheryRegion getFisheryRegion(TopiaContext context)
throws StorageException {
FisheryRegion result;
@@ -539,17 +653,21 @@
}
}
- /** @return the appender id used for this simulation (simulation_name.hashcode()) */
+ /**
+ * @return the appender id used for this simulation (simulation_name.hashcode())
+ */
protected String getAppenderId() {
//TODO Perharps we could just use simulation name
//TODO since it seems to be unique.
return "simulation_" + Math.abs(hashCode());
}
- /** @return the simulation log file */
+ /**
+ * @return the simulation log file
+ */
public String getSimulationLogFile() {
File root = getSimulationDirectory(name);
- //TODO Should be IsisCOnfig.DEFAULT_SIMULATION_LOGFILE ?
+ //TODO Should be IsisConfig.DEFAULT_SIMULATION_LOGFILE ?
return root + File.separator + "simulation.log";
}
} // SimulationStorage
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/SimulatorStorage.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/SimulatorStorage.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/SimulatorStorage.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -66,6 +66,7 @@
static public File getSimulatorDirectory() {
File result = IsisFish.config.getDatabaseDirectory();
result = new File(result, SIMULATOR_PATH);
+ result.mkdirs();
return result;
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/VersionStorage.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/VersionStorage.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/VersionStorage.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -32,10 +32,10 @@
package fr.ifremer.isisfish.datastore;
import fr.ifremer.isisfish.IsisFish;
+import fr.ifremer.isisfish.vcs.VCS;
import fr.ifremer.isisfish.vcs.VCSException;
-import fr.ifremer.isisfish.vcs.VCSNone;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import org.codelutin.util.FileUtil;
import org.apache.commons.logging.Log;
@@ -43,6 +43,7 @@
import java.io.File;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@@ -56,7 +57,7 @@
/** Logger for this class */
private static final Log log = LogFactory.getLog(VersionStorage.class);
- static protected VCSNone getVCS() {
+ static protected VCS getVCS() {
return IsisFish.vcs;
}
@@ -223,14 +224,14 @@
/**
* Permet de mettre a jour le fichier local en fonction de ce qu'il y
- * a sur le VCSNone
+ * a sur le VCS
*
* @throws VCSException si pb pendant l'op
*
*/
public void update() throws VCSException {
prepare();
- getVCS().update(getFile());
+ getVCS().update(Arrays.asList(getFile()));
}
public boolean isUpToDate() throws VCSException {
@@ -267,7 +268,6 @@
}
}
}
-
Collections.sort(result);
return result;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/migration/SwingMigrationCallbackHandler.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/migration/SwingMigrationCallbackHandler.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/migration/SwingMigrationCallbackHandler.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -18,12 +18,19 @@
package fr.ifremer.isisfish.datastore.migration;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
import javax.swing.JOptionPane;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.codelutin.topia.migration.DatabaseManager;
import org.codelutin.topia.migration.callback.MigrationCallbackHandler;
+import org.codelutin.topia.migration.callback.MigrationCallbackHandler.MigrationChoice;
+import org.codelutin.util.VersionNumberUtil;
-
/**
* MigrationCallbackHandler
*
@@ -35,11 +42,15 @@
*/
public class SwingMigrationCallbackHandler implements MigrationCallbackHandler {
+ /** to use log facility, just put in your code: log.info("..."); */
+ static private Log log = LogFactory.getLog(SwingMigrationCallbackHandler.class);
+
/* (non-Javadoc)
* @see org.codelutin.topia.migration.callback.MigrationCallbackHandler#doMigration(java.lang.String, java.lang.String)
*/
@Override
- public MigrationChoice doMigration(String dbVersion, String applicationVersion) {
+ public MigrationChoice doMigration(DatabaseManager dbManager,
+ String dbVersion, String applicationVersion) {
int answer = JOptionPane
.showConfirmDialog(
@@ -53,8 +64,58 @@
);
MigrationChoice result = ( answer == JOptionPane.YES_OPTION ) ? MigrationChoice.MIGRATION : MigrationChoice.NO_MIGRATION;
-
+ if (result == MigrationChoice.MIGRATION) {
+ // migration manuel sans l'aide de topia-service
+ // tant que c pas fait on dit non
+ result = MigrationChoice.NO_MIGRATION;
+ // ouverture d'une connexion direct JDBC sur la base
+ try {
+ Connection conn = dbManager.getConnection();
+ try {
+ conn.setAutoCommit(false);
+ if (VersionNumberUtil.smallerThan(dbVersion, "3.2")) {
+ // on fait une migration vers 3.2
+ migrateTo3_2(conn);
+ }
+
+ // do same thing for other version
+
+ // commit des modifs
+ conn.commit();
+ // la migration a reussi, on dit que c fait
+ result = MigrationChoice.CUSTOM_MIGRATION;
+ } catch (Exception eee) {
+ // en cas d'erreur
+ log.error("Migration impossible de la base", eee);
+ // rollback du travail en cours
+ conn.rollback();
+ } finally {
+ // close database connexion
+ conn.close();
+ }
+ } catch (Exception eee) {
+ log.error("Error lors de la tentative de migration", eee);
+ }
+ }
return result;
}
+ private void migrateTo3_2(Connection conn) throws SQLException {
+ log.info("Migrate to version 3.2");
+ //alteration du schema
+ // nouvelles equations dans les tables
+
+ String [] sqls = new String[]{
+ "alter table SETOFVESSELS add column TECHNICALEFFICIENCYEQUATION VARCHAR(255);",
+ "alter table STRATEGY add column INACTIVITYEQUATIONUSED BIT default false;",
+ "alter table STRATEGY add column INACTIVITYEQUATION VARCHAR(255);",
+ };
+ for (String sql : sqls) {
+ log.info("try " + sql);
+ PreparedStatement sta = conn.prepareStatement(sql);
+ sta.executeUpdate();
+ log.info("done " + sql);
+ }
+ }
+
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/update/ImportFromV2.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/update/ImportFromV2.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/update/ImportFromV2.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,6 +31,8 @@
package fr.ifremer.isisfish.datastore.update;
+import static org.codelutin.i18n.I18nf._;
+
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.File;
@@ -57,7 +59,6 @@
import org.apache.commons.lang.time.DurationFormatUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.codelutin.i18n.I18n;
import org.codelutin.math.matrix.MatrixFactory;
import org.codelutin.math.matrix.MatrixHelper;
import org.codelutin.math.matrix.MatrixND;
@@ -197,14 +198,14 @@
*/
private File convertXML(File file, String versionStart, String versionEnd) throws Exception {
if(VersionNumberUtil.greaterThan(versionStart, versionEnd)){
- throw new Exception(I18n._("isisfish.error.import.recent.files"));
+ throw new Exception(_("isisfish.error.import.recent.files"));
}else if(VersionNumberUtil.smallerThan(versionStart, versionEnd)){
// upgrate du fichier
try{
// recherche des fichiers XSL de conversion
URL [] xslurl = getXSLFile(versionStart, versionEnd);
if(xslurl == null){
- throw new Exception(I18n._("isisfish.error.import.convertible"));
+ throw new Exception(_("isisfish.error.import.convertible"));
}
File dest = file;
for (URL aXslurl : xslurl) {
@@ -214,7 +215,7 @@
}
file = dest;
}catch(Exception eee){
- throw new Exception(I18n._("isisfish.error.conversion.data"), eee);
+ throw new Exception(_("isisfish.error.conversion.data"), eee);
}
}
return file;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/EffortDescriptionImpl.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/EffortDescriptionImpl.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/EffortDescriptionImpl.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,7 +31,7 @@
package fr.ifremer.isisfish.entities;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
/**
* @author poussin
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/EquationImpl.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/EquationImpl.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/EquationImpl.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -39,7 +39,7 @@
import fr.ifremer.isisfish.equation.Language;
import fr.ifremer.isisfish.simulator.SimulationContext;
import fr.ifremer.isisfish.util.EvaluatorHelper;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import java.io.Serializable;
import java.util.HashMap;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/MetierSeasonInfoImpl.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/MetierSeasonInfoImpl.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/MetierSeasonInfoImpl.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,7 +31,7 @@
package fr.ifremer.isisfish.entities;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import java.util.ArrayList;
import java.util.List;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/PopulationGroupImpl.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/PopulationGroupImpl.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/PopulationGroupImpl.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,7 +31,7 @@
package fr.ifremer.isisfish.entities;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/PopulationImpl.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/PopulationImpl.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/PopulationImpl.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,7 +31,7 @@
package fr.ifremer.isisfish.entities;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import static org.codelutin.i18n.I18n.n_;
import java.util.Arrays;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/PopulationSeasonInfoImpl.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/PopulationSeasonInfoImpl.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/PopulationSeasonInfoImpl.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,7 +31,7 @@
package fr.ifremer.isisfish.entities;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import static org.codelutin.i18n.I18n.n_;
import java.util.ArrayList;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/SeasonImpl.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/SeasonImpl.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/SeasonImpl.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -35,7 +35,7 @@
import java.util.List;
import fr.ifremer.isisfish.types.Month;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
/**
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/SetOfVesselsImpl.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/SetOfVesselsImpl.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/SetOfVesselsImpl.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -1,10 +1,19 @@
package fr.ifremer.isisfish.entities;
+import static org.codelutin.i18n.I18nf._;
+
+import fr.ifremer.isisfish.IsisFishDAOHelper;
import java.io.Serializable;
import fr.ifremer.isisfish.IsisFishRuntimeException;
import fr.ifremer.isisfish.datastore.RegionStorage;
import fr.ifremer.isisfish.datastore.StorageException;
+import fr.ifremer.isisfish.equation.Language;
+import fr.ifremer.isisfish.equation.SoVTechnicalEfficiencyEquation;
+import fr.ifremer.isisfish.types.Date;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.codelutin.topia.TopiaException;
/**
* Implantation des operations pour l'entité SetOfVessels.
@@ -13,6 +22,11 @@
private static final long serialVersionUID = 1L;
+ /**
+ * Logger for this class
+ */
+ private static final Log log = LogFactory.getLog(SetOfVesselsImpl.class);
+
public FisheryRegion getFisheryRegion() {
try {
FisheryRegion result = RegionStorage.getFisheryRegion(getTopiaContext());
@@ -22,6 +36,68 @@
}
}
+ /**
+ * override to change name of equation
+ * @see fr.ifremer.isisfish.entities.SetOfVesselsAbstract#setName(java.lang.String)
+ */
+ @Override
+ public void setName(String value) {
+ super.setName(value);
+ Equation eq = getTechnicalEfficiencyEquation();
+ if (eq != null) {
+ eq.setName(getName());
+ }
+ }
+
+ /**
+ * Compute or return inactivity days
+ * @param length length of group
+ * @param group group
+ * @return age in month
+ */
+ @Override
+ public double getTechnicalEfficiency(Date date, Metier metier) {
+ double result = 0;
+
+ try {
+ Gear gear = metier.getGear();
+ Equation eq = getTechnicalEfficiencyEquation();
+ if (eq != null) {
+ result = eq.evaluate("date", date, "metier", metier, "gear", gear);
+ }
+ } catch (Exception eee) {
+ if (log.isWarnEnabled()) {
+ log.warn("Error in technical efficiency equation");
+ }
+ if (log.isDebugEnabled()) {
+ log.debug("StackTrace", eee);
+ }
+ }
+ return result;
+ }
+
+ public void setEquationTechnicalEfficiency(String content) {
+ try {
+ Equation eq = getTechnicalEfficiencyEquation();
+
+ if (eq == null) {
+ EquationDAO dao = IsisFishDAOHelper.getEquationDAO(getTopiaContext());
+ // create Growth equation
+ eq = dao.create();
+ eq.setCategory("TechnicalEfficiency");
+ eq.setJavaInterface(SoVTechnicalEfficiencyEquation.class);
+ eq.setLanguage(Language.JAVA);
+ setTechnicalEfficiencyEquation(eq);
+ }
+
+ eq.setName(getName());
+ eq.setContent(content);
+ eq.update();
+ } catch (TopiaException eee) {
+ throw new IsisFishRuntimeException(_("isisfish.change.equation"), eee);
+ }
+ }
+
/* (non-Javadoc)
* @see fr.ifremer.isisfish.entities.FisheryRegionAbstract#toString()
*/
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/StrategyImpl.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/StrategyImpl.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/StrategyImpl.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -1,6 +1,6 @@
package fr.ifremer.isisfish.entities;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import java.io.Serializable;
import java.util.ArrayList;
@@ -14,6 +14,8 @@
import fr.ifremer.isisfish.IsisFishRuntimeException;
import fr.ifremer.isisfish.datastore.RegionStorage;
import fr.ifremer.isisfish.datastore.StorageException;
+import fr.ifremer.isisfish.equation.Language;
+import fr.ifremer.isisfish.equation.StrategyInactivityEquation;
import fr.ifremer.isisfish.types.Month;
/**
@@ -34,6 +36,19 @@
throw new IsisFishRuntimeException(eee);
}
}
+
+ /**
+ * override to change name of equation
+ * @see fr.ifremer.isisfish.entities.StrategyAbstract#setName(java.lang.String)
+ */
+ @Override
+ public void setName(String value) {
+ super.setName(value);
+ Equation eq = getInactivityEquation();
+ if (eq != null) {
+ eq.setName(getName());
+ }
+ }
/* (non-Javadoc)
* @see fr.ifremer.isisfish.entities.StrategyAbstract#getStrategyMonthInfo()
@@ -88,6 +103,55 @@
return result;
}
+ /**
+ * Compute or return inactivity days
+ * @param length length of group
+ * @param group group
+ * @return age in month
+ */
+ public double getInactivityDays(Month month) {
+ double result = 0;
+
+ StrategyMonthInfo info = getStrategyMonthInfo(month);
+ if (!getInactivityEquationUsed()) {
+ result = info.getMinInactivityDays();
+ } else {
+ try {
+ Equation eq = getInactivityEquation();
+ result = eq.evaluate("month", month, "info", info);
+ } catch (Exception eee) {
+ if (log.isWarnEnabled()) {
+ log.warn("Error in inactivityDays equation");
+ }
+ if (log.isDebugEnabled()) {
+ log.debug("StackTrace", eee);
+ }
+ }
+ }
+ return result;
+ }
+ public void setEquationInactivity(String content) {
+ try {
+ Equation eq = getInactivityEquation();
+
+ if (eq == null) {
+ EquationDAO dao = IsisFishDAOHelper.getEquationDAO(getTopiaContext());
+ // create Growth equation
+ eq = dao.create();
+ eq.setCategory("Inactivity");
+ eq.setJavaInterface(StrategyInactivityEquation.class);
+ eq.setLanguage(Language.JAVA);
+ setInactivityEquation(eq);
+ }
+
+ eq.setName(getName());
+ eq.setContent(content);
+ eq.update();
+ } catch (TopiaException eee) {
+ throw new IsisFishRuntimeException(_("isisfish.change.equation"), eee);
+ }
+ }
+
/* (non-Javadoc)
* @see fr.ifremer.isisfish.entities.StrategyAbstract#toString()
*/
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/StrategyMonthInfoImpl.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/StrategyMonthInfoImpl.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/StrategyMonthInfoImpl.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,7 +31,7 @@
package fr.ifremer.isisfish.entities;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import static org.codelutin.i18n.I18n.n_;
import java.util.ArrayList;
@@ -152,7 +152,10 @@
public void computeNumberOfTrips() {
TripType tripType = getTripType();
- int inactivity = getMinInactivityDays();
+ // remplace un simple getMinInactivityDays(), pour pouvoir utiliser une
+ // equation si besoin (tout est pret, il ne manque que l'interface
+ // graphique pour saisir l'equation dans strategie
+ double inactivity = getStrategy().getInactivityDays(getMonth());
if(tripType != null && tripType.getTripDuration() != null && inactivity >= 0){
int nbDayMonth = getMonth().getNumbersOfDays();
double result = (int)((nbDayMonth - inactivity) / tripType.getTripDuration().getDay());
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/TargetSpeciesImpl.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/TargetSpeciesImpl.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/TargetSpeciesImpl.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,7 +31,7 @@
package fr.ifremer.isisfish.entities;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Copied: trunk/isis-fish/src/java/fr/ifremer/isisfish/equation/SoVTechnicalEfficiencyEquation.java (from rev 1300, branches/isis-fish-3.1.4/src/java/fr/ifremer/isisfish/equation/SoVTechnicalEfficiencyEquation.java)
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/equation/SoVTechnicalEfficiencyEquation.java (rev 0)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/equation/SoVTechnicalEfficiencyEquation.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2002-2008 Code Lutin, Benjamin Poussin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * USA.
+ */
+
+package fr.ifremer.isisfish.equation;
+
+import fr.ifremer.isisfish.entities.Gear;
+import fr.ifremer.isisfish.entities.Metier;
+import fr.ifremer.isisfish.simulator.SimulationContext;
+import fr.ifremer.isisfish.util.Args;
+
+/**
+ *
+ * @author poussin
+ * @version $Revision$
+ *
+ * Last update: $Date$
+ * by : $Author$
+ */
+public interface SoVTechnicalEfficiencyEquation {
+
+ /**
+ * @param context
+ * @param metier le metier pour lequel on demande le calcul
+ * @param gear l'engin utilise par le metier
+ * @return
+ */
+ @Args({"context", "metier", "gear"})
+ public double compute(SimulationContext context, Metier metier, Gear gear) throws Exception;
+
+}
Copied: trunk/isis-fish/src/java/fr/ifremer/isisfish/equation/StrategyInactivityEquation.java (from rev 1300, branches/isis-fish-3.1.4/src/java/fr/ifremer/isisfish/equation/StrategyInactivityEquation.java)
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/equation/StrategyInactivityEquation.java (rev 0)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/equation/StrategyInactivityEquation.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2002-2008 Code Lutin, Benjamin Poussin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * USA.
+ */
+
+package fr.ifremer.isisfish.equation;
+
+import fr.ifremer.isisfish.entities.StrategyMonthInfo;
+import fr.ifremer.isisfish.simulator.SimulationContext;
+import fr.ifremer.isisfish.types.Month;
+import fr.ifremer.isisfish.util.Args;
+
+/**
+ *
+ * @author poussin
+ * @version $Revision$
+ *
+ * Last update: $Date$
+ * by : $Author$
+ */
+public interface StrategyInactivityEquation {
+
+ /**
+ *
+ * @param context
+ * @param month le mois courant de simulation
+ * @param info l'objet associe a la strategie pour le mois courant
+ * @return
+ */
+ @Args({"context", "month", "info"})
+ public double compute(SimulationContext context, Month month, StrategyMonthInfo info) throws Exception;
+
+}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/logging/SimulationLoggerUtil.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/logging/SimulationLoggerUtil.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/logging/SimulationLoggerUtil.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,7 +31,7 @@
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.apache.log4j.PatternLayout;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import java.io.File;
import java.io.IOException;
@@ -40,6 +40,10 @@
import java.util.Map;
/**
+ * FIXME poussin, a priori cette classe ne supporte pas plusieurs simulation
+ * en meme temps, ce qui est le cas si on a plusieurs processeurs de dispo :(
+ *
+ *
* Usefull class for dealing with hot configuration of log4J. this is temporary
* we must find a way to abstract this layer.
* <p/>
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/logging/console/LogConsole.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/logging/console/LogConsole.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/logging/console/LogConsole.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -21,7 +21,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import org.codelutin.widget.IconFactory;
import org.codelutin.log.LutinLogFactory;
@@ -83,7 +83,7 @@
defaultFrom, String defaultTo, String title) throws IOException, IllegalArgumentException {
if (!logFile.exists()) {
- String message1 = _("could not found log file {0}", logFile);
+ String message1 = _("could not found log file %1$s", logFile);
log.warn(message1);
throw new IllegalArgumentException(message1);
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/logging/console/LogConsoleHandler.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/logging/console/LogConsoleHandler.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/logging/console/LogConsoleHandler.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,7 +31,7 @@
import org.apache.commons.logging.Log;
import static org.apache.commons.logging.LogFactory.getLog;
import org.codelutin.i18n.I18n;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import org.codelutin.widget.StatusBar;
import javax.swing.*;
@@ -133,7 +133,7 @@
try {
levelsReader.close();
} catch (IOException e) {
- log.warn(I18n._("could not close reader {0}", levelsReader));
+ log.warn(_("could not close reader %1$s", levelsReader));
}
}
@@ -141,7 +141,7 @@
try {
reader.close();
} catch (IOException e) {
- log.warn(I18n._("could not close reader {0}", reader));
+ log.warn(_("could not close reader %1$s", reader));
}
}
}
@@ -202,7 +202,7 @@
dontAdjust = true;
read(newOffset);
} catch (IOException e1) {
- log.warn(I18n._("could not read at offset {0} for reason {1}", newOffset, e1.getMessage()));
+ log.warn(_("could not read at offset %1$s for reason %2$s", newOffset, e1.getMessage()));
}
}
@@ -215,7 +215,7 @@
dontAdjust = true;
read(e.getValue());
} catch (IOException e1) {
- log.warn(I18n._("could not read at offset {0} for reason {1}", e.getValue(), e1.getMessage()));
+ log.warn(_("could not read at offset %1$s for reason %2$s", e.getValue(), e1.getMessage()));
}
}
@@ -348,7 +348,7 @@
read(0);
dontAdjust = true;
model.fireStateChanged();
- getStatusBar().setStatus(I18n._("filter loaded in {0} ms : found {1} lines.", (System.currentTimeMillis() - t0), reader.getNbLines()));
+ getStatusBar().setStatus(_("filter loaded in %1$s ms : found %2$s lines.", (System.currentTimeMillis() - t0), reader.getNbLines()));
} catch (IOException e) {
log.warn("could not open reader [" + this.reader + "] for reason " + e.getMessage());
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/logging/console/LogMail.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/logging/console/LogMail.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/logging/console/LogMail.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -19,8 +19,7 @@
* ##% */
package fr.ifremer.isisfish.logging.console;
-import static org.codelutin.i18n.I18n._;
-import org.codelutin.i18n.I18n;
+import static org.codelutin.i18n.I18nf._;
import org.codelutin.util.FileUtil;
import org.codelutin.util.ZipUtil;
import org.codelutin.widget.StatusBar;
@@ -85,7 +84,7 @@
protected StatusBar statusBar;
public LogMail(final StatusBar statusBar, String from, File logFile, File simulationFile, final String smtpServer) {
- setTitle(I18n._("isisfish.log.mail.send.title", simulationFile.getName()));
+ setTitle(_("isisfish.log.mail.send.title", simulationFile.getName()));
this.from = from;
this.logFile = logFile;
this.simulationFile = simulationFile;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/map/IsisMapBean.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/map/IsisMapBean.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/map/IsisMapBean.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -32,6 +32,8 @@
package fr.ifremer.isisfish.map;
+import static org.codelutin.i18n.I18nf._;
+
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -39,7 +41,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.codelutin.i18n.I18n;
import org.codelutin.topia.TopiaContext;
import org.codelutin.topia.TopiaException;
import org.codelutin.util.Resource;
@@ -357,11 +358,11 @@
try{
//recherche l'url, si pas trouve leve une exception
Resource.getURL(shp);
- log.info(I18n._("isisfish.message.load.map", filename, shp, ssx));
+ log.info(_("isisfish.message.load.map", filename, shp, ssx));
addShapeLayer(filename, shp, ssx, "ff000000", "ffbdde83");
shapeLoaded = true;
}catch(Exception eee){
- log.error(I18n._("isisfish.error.load.map", filename), eee);
+ log.error(_("isisfish.error.load.map", filename), eee);
}
}
}
@@ -376,7 +377,7 @@
}
} catch(Exception eee) {
- log.error(I18n._("isisfish.error.init.map"), eee);
+ log.error(_("isisfish.error.init.map"), eee);
}
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/map/ResultatLayer.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/map/ResultatLayer.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/map/ResultatLayer.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -1,6 +1,8 @@
package fr.ifremer.isisfish.map;
+import static org.codelutin.i18n.I18nf._;
+
import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
@@ -12,13 +14,10 @@
import javax.swing.JOptionPane;
import javax.swing.JPanel;
-import org.codelutin.i18n.I18n;
import org.codelutin.math.matrix.MatrixND;
import com.bbn.openmap.LatLonPoint;
import com.bbn.openmap.event.MapMouseListener;
-import com.bbn.openmap.event.NavMouseMode;
-import com.bbn.openmap.event.NullMouseMode;
import com.bbn.openmap.event.ProjectionEvent;
import com.bbn.openmap.event.SelectMouseMode;
import com.bbn.openmap.layer.OMGraphicHandlerLayer;
@@ -356,10 +355,10 @@
for (Object datamap : datamaps) {
DefaultDataMap dataMap = (DefaultDataMap) datamap;
if (dataMap.getInfo() != null)
- info += I18n._("Info") + ": " + dataMap.getInfo().getLabels()
- + " " + I18n._("isisfish.common.value") + ":" + dataMap.getValue() + "\n";
+ info += _("Info") + ": " + dataMap.getInfo().getLabels()
+ + " " + _("isisfish.common.value") + ":" + dataMap.getValue() + "\n";
else
- info += " " + I18n._("isisfish.common.value") + ":" + dataMap.getValue() + "\n";
+ info += " " + _("isisfish.common.value") + ":" + dataMap.getValue() + "\n";
}
// System.out.println(info);
// InfoDisplayEvent infoevt = new InfoDisplayEvent(this,info);
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/AbstractSimulationQueueModel.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/AbstractSimulationQueueModel.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/AbstractSimulationQueueModel.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -1,6 +1,6 @@
package fr.ifremer.isisfish.simulator;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import org.codelutin.log.LutinLog;
import org.codelutin.log.LutinLogFactory;
@@ -15,6 +15,7 @@
import java.awt.Component;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -29,13 +30,14 @@
*
* @author chemit
*/
-public abstract class AbstractSimulationQueueModel extends JComponent implements TableModel, SimulationQueueListener, PropertyChangeListener {
+public abstract class AbstractSimulationQueueModel extends JComponent
+ implements TableModel, SimulationQueueListener, PropertyChangeListener {
/** @return list of ids of simulations contained in this model */
protected abstract List<String> getSimulationIds();
/** @return map of QueueItems (indexed by id) */
- protected abstract Map<String, SimulationManager.QueueItem> getQueueItemsAsMap();
+ protected abstract Map<String, SimulationManager.SimulationItem> getQueueItemsAsMap();
/** to use log facility, just put in your code: log.info("..."); */
protected static LutinLog log = LutinLogFactory.getLutinLog(AbstractSimulationQueueModel.class);
@@ -50,7 +52,14 @@
protected String[] header = new String[]{_("isisfish.queue.id"), _("isisfish.queue.plan"), _("isisfish.queue.name"), _("isisfish.queue.local"), _("isisfish.queue.status"), _("isisfish.queue.progression")};
/** columns types */
- protected Class[] columnClass = new Class[]{String.class, String.class, Boolean.class, Boolean.class, String.class, JProgressBar.class};
+ protected Class[] columnClass = new Class[]{
+ String.class, // id
+ String.class, // analyse plan number
+ Boolean.class, // in queue
+ String.class, // local, remote, batch
+ String.class, // text
+ JProgressBar.class // progress
+ };
/** progress bar (one for each row) */
protected Map<String, JProgressBar> progress = new HashMap<String, JProgressBar>();
@@ -116,7 +125,7 @@
* @param id id of the QueueItem to find
* @return the queueItem found via his id
*/
- protected SimulationManager.QueueItem getItem(String id) {
+ protected SimulationManager.SimulationItem getItem(String id) {
return getQueueItemsAsMap().get(id);
}
@@ -124,7 +133,7 @@
* @param rowIndex rowIndex of the QueueItem to find
* @return the queueItem found via his rowIndex
*/
- protected SimulationManager.QueueItem getItem(int rowIndex) {
+ protected SimulationManager.SimulationItem getItem(int rowIndex) {
String id = getSimulationId(rowIndex);
return id == null ? null : getQueueItemsAsMap().get(id);
}
@@ -134,24 +143,16 @@
* @return the SimulationControl of the given simulation
*/
protected SimulationControl getSimulationControl(String id) {
- SimulationControl result = null;
- SimulationManager.QueueItem item = getItem(id);
- if (item != null) {
- result = item.control;
- } else {
+ SimulationControl result = queue.getControl(id);
+ if (result == null) {
log.user(_("isisfish.error.invalid.simulation.id", id, getSimulationIds()));
}
return result;
}
public SimulationControl getSimulationControl(int rowIndex) {
- SimulationControl result = null;
- SimulationManager.QueueItem item = getItem(rowIndex);
- if (item != null) {
- result = item.control;
- } else {
- log.user(_("isisfish.error.invalid.simulation.index", rowIndex));
- }
+ String id = getSimulationId(rowIndex);
+ SimulationControl result = getSimulationControl(id);
return result;
}
/**
@@ -160,7 +161,7 @@
*/
protected SimulationParameter getSimulationParameter(String id) {
SimulationParameter result = null;
- SimulationManager.QueueItem item = getItem(id);
+ SimulationManager.SimulationItem item = getItem(id);
if (item != null) {
result = item.param;
} else {
@@ -189,6 +190,24 @@
}
/////////////////////////////////////////////
+ // SimulationQueueListener implementation
+ /////////////////////////////////////////////
+
+ /* (non-Javadoc)
+ * @see SimulationQueueListener#simulationStart(fr.ifremer.isisfish.simulator.SimulationQueueEvent)
+ */
+ public void simulationStart(SimulationQueueEvent e) {
+ // nothing to do
+ }
+
+ /* (non-Javadoc)
+ * @see SimulationQueueListener#simulationStop(fr.ifremer.isisfish.simulator.SimulationQueueEvent)
+ */
+ public void simulationStop(SimulationQueueEvent e) {
+ // nothing to do
+ }
+
+ /////////////////////////////////////////////
// TableModel implementation
/////////////////////////////////////////////
@@ -260,7 +279,15 @@
result = param.getInQueue();
break;
case 3:
- result = param.getLocal();
+ if (param.getLocal()) {
+ if (param.isSubProcess()) {
+ result = "batch";
+ } else {
+ result = "local";
+ }
+ } else {
+ result = "remote";
+ }
break;
case 4:
if (control != null) {
Copied: trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/AnalysePlanIndependent.java (from rev 1300, branches/isis-fish-3.1.4/src/java/fr/ifremer/isisfish/simulator/AnalysePlanIndependent.java)
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/AnalysePlanIndependent.java (rev 0)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/AnalysePlanIndependent.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -0,0 +1,46 @@
+/* *##%
+ * Copyright (C) 2007
+ * Ifremer, Code Lutin, Cédric Pineau, Benjamin Poussin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *##%*/
+
+/* *
+ * AnalysePlan.java
+ *
+ * Created: 1 mars 07 20:27:28
+ *
+ * @author poussin
+ * @version $Revision: 336 $
+ *
+ * Last update: $Date: 2007-03-09 15:10:40 +0100 (ven, 09 mar 2007) $
+ * by : $Author: bpoussin $
+ */
+
+package fr.ifremer.isisfish.simulator;
+
+/**
+ * Use for Analyse plan that don't need previous simulation to do next
+ * simulation. When Simulation use this plan type, Isis can do more than one
+ * simulation in same time.
+ *
+ * author poussin
+ */
+public interface AnalysePlanIndependent extends AnalysePlan {
+
+
+}
+
+
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/PlanGenerator.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/PlanGenerator.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/PlanGenerator.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,7 +31,7 @@
package fr.ifremer.isisfish.simulator;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import java.io.File;
import java.util.Collection;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/ResultManager.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/ResultManager.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/ResultManager.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,7 +31,7 @@
package fr.ifremer.isisfish.simulator;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import java.util.Collection;
import java.util.HashSet;
@@ -130,7 +130,7 @@
}
} catch (IsisFishException eee) {
if (log.isWarnEnabled()) {
- log.warn(_("Can't instanciate export {0}", exportName), eee);
+ log.warn(_("Can't instanciate export %1$s", exportName), eee);
}
}
}
Copied: trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationCheckpointExternalProcessThread.java (from rev 1300, branches/isis-fish-3.1.4/src/java/fr/ifremer/isisfish/simulator/SimulationCheckpointExternalProcessThread.java)
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationCheckpointExternalProcessThread.java (rev 0)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationCheckpointExternalProcessThread.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -0,0 +1,81 @@
+/**
+* SimulationCheckpointThread.java
+*
+* Created: Wed Aug 28 2002
+*
+* @author <poussin at codelutin.com>
+* Copyright Code Lutin
+* @version $Revision: 1187 $
+*
+* Mise a jour: $Date: 2008-03-19 01:26:10 +0100 (mer, 19 mar 2008) $
+* par : $Author: tchemit $
+*/
+
+package fr.ifremer.isisfish.simulator;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import fr.ifremer.isisfish.datastore.SimulationStorage;
+
+import java.io.InputStream;
+
+/**
+ * This thread is responsable to synchronized SimulationControl used localy with
+ * remote simulation control for remote simulation.
+ *
+ * This thread dead when {@link SimulationControl#isRunning()} is false
+ *
+ * @author poussin
+ */
+public class SimulationCheckpointExternalProcessThread extends Thread { // SimulationCheckpointThread
+
+ /**
+ * Logger for this class
+ */
+ private static final Log log = LogFactory
+ .getLog(SimulationCheckpointExternalProcessThread.class);
+
+ protected SimulationControl control = null;
+ protected SimulationStorage simulation = null;
+ protected Process process = null;
+ // on l'appel plutot out que in, car c le output du process lance
+ protected InputStream out = null;
+
+ public SimulationCheckpointExternalProcessThread(SimulationControl control,
+ SimulationStorage simulation, Process process) {
+ this.control = control;
+ this.simulation = simulation;
+ this.process = process;
+ out = process.getInputStream();
+
+ }
+
+ public void run(){
+ int sleepTime = 2000;
+ int error = 0;
+ while(true){
+ try{
+ out.skip(out.available());
+ Thread.sleep(sleepTime);
+ // on ne lit pas le stop, car le stop ne peut-etre appeler
+ // que par l'utilisateur qui est de ce cote de la machine
+ simulation.readControl(control, "stop");
+
+ if (control.isStopSimulationRequest()) {
+ // FIXME, un destroy du process est peut-etre un peu violent ?
+ process.destroy();
+ // passe artificiellement le control a fini
+ control.stopSimulation();
+ }
+ if (!control.isRunning()) {
+ return;
+ }
+ } catch (Exception eee) {
+ log.debug("Can't update control for " + control.getId(), eee);
+ }
+ }
+
+ }
+
+} // SimulationCheckpointThread
Copied: trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationCheckpointRemoteThread.java (from rev 1300, branches/isis-fish-3.1.4/src/java/fr/ifremer/isisfish/simulator/SimulationCheckpointRemoteThread.java)
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationCheckpointRemoteThread.java (rev 0)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationCheckpointRemoteThread.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -0,0 +1,92 @@
+/**
+* SimulationCheckpointRemoteThread.java
+*
+* Created: Wed Aug 28 2002
+*
+* @author <poussin at codelutin.com>
+* Copyright Code Lutin
+* @version $Revision$
+*
+* Mise a jour: $Date$
+* par : $Author$
+*/
+
+package fr.ifremer.isisfish.simulator;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.util.Hashtable;
+import java.util.Vector;
+
+import org.apache.xmlrpc.XmlRpcClient;
+
+import fr.ifremer.isisfish.IsisConfig;
+import fr.ifremer.isisfish.IsisFish;
+
+/**
+ * This thread is responsable to synchronized SimulationControl used localy with
+ * remote simulation control for remote simulation.
+ *
+ * This thread dead when {@link SimulationControl#isRunning()} is false
+ *
+ * @author poussin
+ */
+public class SimulationCheckpointRemoteThread extends Thread { // SimulationCheckpointRemoteThread
+
+ /**
+ * Logger for this class
+ */
+ private static final Log log = LogFactory
+ .getLog(SimulationCheckpointRemoteThread.class);
+
+ protected SimulationControl control = null;
+ int badId = 0;
+
+ public SimulationCheckpointRemoteThread(SimulationControl control) {
+ this.control = control;
+ }
+
+ public void run(){
+ int sleepTime = 2000;
+ while(true){
+ try{
+ Thread.sleep(sleepTime);
+
+ updateControl(control);
+ // on remet de le temps normal, vu que la connexion a reussi
+ sleepTime = 2000;
+
+ if (!control.isRunning()) {
+ return;
+ }
+
+ } catch (Exception eee) {
+ // on supporte 10 erreurs puis ensuite on quitte le thread.
+ if ( badId++ > 10){
+ log.error("Error !!! ", eee);
+ break;
+ }else{
+ // on a echouer sur une tentative, on allonge un
+ // peu le temps
+ sleepTime += 2000;
+ }
+ }
+ }
+
+ }
+
+ public void updateControl(SimulationControl control) throws Exception {
+ // essai l'ancienne etait en dur: "http://localhost:9090"
+ IsisConfig config = IsisFish.config;
+ XmlRpcClient c = new XmlRpcClient(config.getSimulatorServer());
+ c.setBasicAuthentication(config.getSimulatorUsername(), config.getSimulatorPassword());
+
+ Vector a = new Vector();
+ a.add(control.getUpdateHashtable());
+ Hashtable<String, Object> result = (Hashtable<String, Object>)c.execute("checkPoint", a);
+ // on remet de le temps normal, vu que la connexion a reussi
+ control.updateFromHashtable(result);
+ }
+
+} // SimulationCheckpointRemoteThread
Deleted: trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationCheckpointThread.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationCheckpointThread.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationCheckpointThread.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -1,93 +0,0 @@
-/**
-* SimulationCheckpointThread.java
-*
-* Created: Wed Aug 28 2002
-*
-* @author <poussin at codelutin.com>
-* Copyright Code Lutin
-* @version $Revision$
-*
-* Mise a jour: $Date$
-* par : $Author$
-*/
-
-package fr.ifremer.isisfish.simulator;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import org.apache.xmlrpc.XmlRpcClient;
-
-import fr.ifremer.isisfish.IsisConfig;
-import fr.ifremer.isisfish.IsisFish;
-
-/**
- * This thread is responsable to synchronized SimulationControl used localy with
- * remote simulation control for remote simulation.
- *
- * This thread dead when {@link SimulationControl#isRunning()} is false
- *
- * @author poussin
- */
-public class SimulationCheckpointThread extends Thread { // SimulationCheckpointThread
-
- /**
- * Logger for this class
- */
- private static final Log log = LogFactory
- .getLog(SimulationCheckpointThread.class);
-
- protected SimulationControl control = null;
- int badId = 0;
-
- public SimulationCheckpointThread(SimulationControl control) {
- this.control = control;
- }
-
- public void run(){
- int sleepTime = 2000;
- while(true){
- try{
- Thread.sleep(sleepTime);
-
- updateControl(control);
- // on remet de le temps normal, vu que la connexion a reussi
- sleepTime = 2000;
-
- if (!control.isRunning()) {
- return;
- }
-
- } catch (Exception eee) {
- // on supporte 10 erreurs puis ensuite on quitte le thread.
- if ( badId++ > 10){
- log.error("Error !!! ", eee);
- break;
- }else{
- // on a echouer sur une tentative, on allonge un
- // peu le temps
- sleepTime += 2000;
- }
- }
- }
-
- }
-
- public void updateControl(SimulationControl control) throws Exception {
- // essai l'ancienne etait en dur: "http://localhost:9090"
- XmlRpcClient c = new XmlRpcClient(IsisFish.config.getSimulatorServer());
- c.setBasicAuthentication(IsisFish.config.getSimulatorUsername(),
- IsisFish.config.getSimulatorPassword());
-
- Vector a = new Vector();
- a.add(control.getUpdateHashtable());
- Hashtable<String, Object> result =
- (Hashtable<String, Object>)c.execute("checkPoint", a);
- // on remet de le temps normal, vu que la connexion a reussi
- control.updateFromHashtable(result);
- }
-
-} // SimulationCheckpointThread
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationControl.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationControl.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationControl.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,6 +31,7 @@
package fr.ifremer.isisfish.simulator;
+import fr.ifremer.isisfish.datastore.SimulationStorage;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
@@ -40,6 +41,7 @@
import org.apache.commons.logging.LogFactory;
import fr.ifremer.isisfish.types.Date;
+import java.util.Properties;
/**
* Permit to communicate with user interface from simulation thread
@@ -52,8 +54,12 @@
protected PropertyChangeSupport listeners = new PropertyChangeSupport(this);
protected boolean inUpdateFromHashtable = false;
+ protected transient SimulationStorage simulation = null;
+ /** si vrai des qu'une propriete change, sauvegarde sont etat */
+ protected transient boolean autoSaveState = false;
protected String id = null;
+ protected boolean started = false;
protected boolean running = true;
protected boolean stop = false;
protected Date date = new Date();
@@ -70,16 +76,60 @@
this.id = id;
addPropertyChangeListener(this);
}
+
+ public void setAutoSaveState(boolean autoSaveState) {
+ this.autoSaveState = autoSaveState;
+ }
+
+ public boolean isAutoSaveState() {
+ return autoSaveState;
+ }
+ /**
+ * Retourne la simulation associe a ce control
+ * @return retourne null si la simulation n'existe pas encore
+ */
+ public SimulationStorage getSimulation() {
+ if (simulation == null) {
+ simulation = SimulationStorage.getSimulation(id);
+ }
+ return simulation;
+ }
+
+
+
+ public void addPropertyChangeListener(String propName, PropertyChangeListener l) {
+ listeners.addPropertyChangeListener(propName, l);
+ }
+
public void addPropertyChangeListener(PropertyChangeListener l) {
listeners.addPropertyChangeListener(l);
}
+ public void removePropertyChangeListener(String propName, PropertyChangeListener l) {
+ listeners.removePropertyChangeListener(propName, l);
+ }
+
public void removePropertyChangeListener(PropertyChangeListener l) {
listeners.removePropertyChangeListener(l);
}
+ public boolean isStarted() {
+ return started;
+ }
+
/**
+ * appelee juste avant de reellement demarrer le thread de simulation
+ * indique que cette simulation est en cours et qu'il ne faut plus la lancer
+ * @param running The running to set.
+ */
+ public void setStarted(boolean started) {
+ boolean oldValue = this.started;
+ this.started = started;
+ listeners.firePropertyChange("started", oldValue, this.started);
+ }
+
+ /**
* Method running
*
* @return faux une fois que stopSimulation a ete appele.
@@ -221,12 +271,75 @@
}
/**
+ * Met dans un Properties tous les champs
+ * @return un Properties avec tous les champs
+ */
+ public Properties getProperties() {
+ Properties result = new Properties();
+ result.setProperty("id", id);
+ result.setProperty("started", String.valueOf(started));
+ result.setProperty("running", String.valueOf(running));
+ result.setProperty("stop", String.valueOf(stop));
+ result.setProperty("date", String.valueOf(date.getDate()));
+ result.setProperty("progressMax", String.valueOf(progressMax));
+ result.setProperty("progress", String.valueOf(progress));
+ result.setProperty("text", text);
+
+ return result;
+ }
+
+ /**
+ * update current object from Properties representation
+ *
+ */
+ public void updateFromProperties(Properties h) {
+ inUpdateFromHashtable = true;
+ try {
+ if (h.contains("started")) {
+ boolean started = "true".equalsIgnoreCase(h.getProperty("started"));
+ setStarted(started);
+ }
+ if (h.contains("running")) {
+ boolean running = "true".equalsIgnoreCase(h.getProperty("running"));
+ setRunning(running);
+ }
+ if (h.contains("stop")) {
+ boolean stop = "true".equalsIgnoreCase(h.getProperty("stop"));
+ setStopSimulationRequest(stop);
+ }
+ if (h.contains("date")) {
+ Date date = new Date(Integer.parseInt(h.getProperty("date")));
+ setDate(date);
+ }
+ if (h.contains("progressMax")) {
+ int progressMax = Integer.parseInt(h.getProperty("progressMax"));
+ setProgressMax(progressMax);
+ }
+ if (h.contains("progress")) {
+ int progress = Integer.parseInt(h.getProperty("progress"));
+ setProgress(progress);
+ }
+ if (h.contains("text")) {
+ String text = h.getProperty("text");
+ setText(text);
+ }
+ } finally {
+ inUpdateFromHashtable = false;
+ }
+ }
+
+
+ /**
* update current object from hashtable representation
*
*/
public void updateFromHashtable(Hashtable h) {
inUpdateFromHashtable = true;
try {
+ if (h.contains("started")) {
+ boolean started = (Boolean)h.get("started");
+ setStarted(started);
+ }
if (h.contains("running")) {
boolean running = (Boolean)h.get("running");
setRunning(running);
@@ -266,6 +379,9 @@
} else {
Object value = e.getNewValue();
update.put(property, value);
+ if (isAutoSaveState() && getSimulation() != null) {
+ getSimulation().saveControl(this);
+ }
}
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationDoneQueueModel.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationDoneQueueModel.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationDoneQueueModel.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -34,7 +34,7 @@
import fr.ifremer.isisfish.datastore.SimulationInformation;
import fr.ifremer.isisfish.datastore.SimulationStorage;
-import org.codelutin.i18n.I18n;
+import static org.codelutin.i18n.I18nf._;
/**
* Model that represents a set of done or stopped simulations
@@ -62,13 +62,13 @@
* @see AbstractSimulationQueueModel at getSimulationIds()
*/
protected java.util.List<String> getSimulationIds() {
- return getQueue().idDones;
+ return getQueue().getDoneIds();
}
/* (non-Javadoc)
* @see AbstractSimulationQueueModel at getQueueItemsAsMap()
*/
- protected java.util.Map<String, SimulationManager.QueueItem> getQueueItemsAsMap() {
+ protected java.util.Map<String, SimulationManager.SimulationItem> getQueueItemsAsMap() {
return getQueue().mapDones;
}
@@ -89,57 +89,32 @@
// IsisConfig.SIMULATION_SHOW_ONLY_XXX properties)
int pos = getSimulationIndex(e.getId());
if (isRowIndexValid(pos)) {
- log.info(" in done model for " + e.getId() + " pos " + getSimulationIndex(e.getId()));
+ log.info(" in done model for " + e.getId() + " pos " + pos);
fireTableRowsInserted(pos, pos);
+
+ // on indique si la simulation a ete annulee
SimulationControl control = getSimulationControl(e.getId());
log.info("isStopSimulationRequest : "+control.isStopSimulationRequest());
if (control.isStopSimulationRequest()) {
- control.setText(I18n._("isisfish.queue.cancelled"));
+ control.setText(_("isisfish.queue.cancelled"));
}
- SimulationManager.QueueItem item = getQueueItemsAsMap().get(e.getId());
- try {
- //TODO I don't known if this is good ?
- SimulationStorage lastSim = item.lastSimulation;
- SimulationParameter simulationParameter = getSimulationParameter(e.getId());
- if (lastSim != null) {
- if (simulationParameter.getUseAnalysePlan()) {
- //TODO Is the lastSimulation is the good one ???
- SimulationInformation infos = getItem(e.getId()).lastSimulation.getInformation();
- if (infos != null && infos.getException() != null) {
- // should deal with error
- log.error(I18n._("isisfish.error.while.simulation", infos.getException()));
- control.setText(I18n._("isisfish.message.stop.with.error"));
- }
- } else if (lastSim.getName().equals(e.getId())) {
- SimulationInformation infos = getItem(e.getId()).lastSimulation.getInformation();
- if (infos != null && infos.getException() != null) {
- // should deal with error
- log.error(I18n._("isisfish.error.while.simulation", infos.getException()));
- control.setText(I18n._("isisfish.message.stop.with.error",infos.getException()));
- }
+ // on change le message pour dire qu'il y a eu une erreur
+ try {
+ SimulationManager.SimulationItem item = getQueueItemsAsMap().get(e.getId());
+ if (!item.hasSimulation()) {
+ SimulationInformation infos = item.getSimulation().getInformation();
+ if (infos.hasError()) {
+ log.error(_("isisfish.error.while.simulation", infos.getException()));
+ control.setText(_("isisfish.message.stop.with.error"));
}
}
- // I don't known if you can come here with no previous simulation ?
- } catch (Exception e1) {
- log.warn(I18n._("isisfish.error.obtain.information.file", e.getId()));
+ } catch (Exception eee) {
+ log.warn(_("isisfish.error.obtain.information.file", e.getId()), eee);
}
control.addPropertyChangeListener(this);
}
}
- /* (non-Javadoc)
- * @see SimulationQueueListener#simulationStart(fr.ifremer.isisfish.simulator.SimulationQueueEvent)
- */
- public void simulationStart(SimulationQueueEvent e) {
- // nothing to do
- }
-
- /* (non-Javadoc)
- * @see SimulationQueueListener#simulationStop(fr.ifremer.isisfish.simulator.SimulationQueueEvent)
- */
- public void simulationStop(SimulationQueueEvent e) {
- // nothing to do
- }
}// SimulationDoneQueueModel
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationHelper.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationHelper.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationHelper.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -30,7 +30,7 @@
package fr.ifremer.isisfish.simulator;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import java.io.File;
import java.io.FileOutputStream;
@@ -48,7 +48,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.xmlrpc.XmlRpcClient;
-import org.codelutin.i18n.I18n;
import org.codelutin.profiling.LutinTrace;
import org.codelutin.topia.TopiaContext;
import org.codelutin.topia.TopiaException;
@@ -62,6 +61,7 @@
import fr.ifremer.isisfish.IsisFish;
import fr.ifremer.isisfish.IsisFishRuntimeException;
+import fr.ifremer.isisfish.IsisFish;
import fr.ifremer.isisfish.aspect.AspectClassLoader;
import fr.ifremer.isisfish.aspect.Cache;
import fr.ifremer.isisfish.aspect.Trace;
@@ -73,7 +73,6 @@
import fr.ifremer.isisfish.datastore.SimulationStorage;
import fr.ifremer.isisfish.datastore.SimulatorStorage;
import fr.ifremer.isisfish.rule.Rule;
-import fr.ifremer.isisfish.types.Date;
import fr.ifremer.isisfish.util.CompileHelper;
/**
@@ -292,28 +291,30 @@
*/
static public void simulate(String simulId, SimulationParameter param,
boolean inQueue) throws SimulationException {
- // Ajout automatiquement de la date+heure a la fin de l'identifiant
- // comme demandé par Steph 20070227
- simulId += " " + dateFormat.format(new java.util.Date());
+ try {
+ simulId += " " + dateFormat.format(new java.util.Date());
- if (simulId == null ||
- "".equals(simulId) ||
- SimulationStorage.localyExists(simulId) ||
- SimulationManager.getInstance().exists(simulId)) {
- log.error("Can't start simulation, bad id: " + simulId);
- throw new SimulationException(_("isisfish.error.start" +
- " simulation, bad id: {0}", "" + simulId));
+ if (simulId == null || "".equals(simulId) || SimulationStorage.localyExists(simulId) || SimulationManager.getInstance().exists(simulId)) {
+ log.error("Can't start simulation, bad id: " + simulId);
+ throw new SimulationException(_("isisfish.error.start"));
+ }
+ SimulationParameter p = param.copy();
+ p.setInQueue(inQueue);
+
+ SimulationManager.getInstance().addSimulation(simulId, p);
+ } catch (Exception eee) {
+ throw new SimulationException("Can't add simulation", eee);
}
- SimulationParameter p = param.copy();
- p.setInQueue(inQueue);
-
- SimulationManager.getInstance().addSimulation(simulId, p);
}
static public SimulationStorage simulate(SimulationControl control, SimulationStorage simulation) throws Exception {
SimulationStorage result;
if (simulation.getParameter().getLocal()) {
- result = localSimulate(control, simulation);
+ if (simulation.getParameter().isSubProcess()) {
+ result = subProcessSimulate(control, simulation);
+ } else {
+ result = localSimulate(control, simulation);
+ }
} else {
result = remoteSimulate(control, simulation);
}
@@ -330,14 +331,15 @@
* @return le storage après simulation
* @throws Exception pour toute erreur
*/
- static public SimulationStorage remoteSimulate(SimulationControl control, SimulationStorage simulation) throws Exception {
+ static public SimulationStorage remoteSimulate(SimulationControl control,
+ SimulationStorage simulation) throws Exception {
// export en zip du storage
File zip = simulation.createZip();
if (control != null) {
// creation du thread de surveillance de la simulation distante
// qui sert a mettre a jour les valeurs de control
- new SimulationCheckpointThread(control).start();
+ new SimulationCheckpointRemoteThread(control).start();
}
// envoie le zip au serveur de simulation
@@ -364,7 +366,41 @@
result = SimulationStorage.importAndRenameZip(tmpzip, control.getId());
return result;
}
-
+
+ static public SimulationStorage subProcessSimulate(SimulationControl control,
+ SimulationStorage simulation) throws Exception {
+
+ String simulationId = simulation.getName();
+
+ // on ferme le SimulationStorage pour ne pas interferer avec le process
+ simulation.closeStorage();
+
+ String java = System.getProperty("java.home") +
+ File.separator + "bin" + File.separator + "java";
+ String classpath = System.getProperty("java.class.path");
+
+ // prepare le process
+ ProcessBuilder processBuilder = new ProcessBuilder(java, "-classpath", classpath,
+ IsisFish.class.getName(),
+ "--simulate", simulationId);
+ processBuilder.redirectErrorStream(true);
+
+ // demarrage du process
+ Process process = processBuilder.start();
+
+ if (control != null) {
+ // prepare de thread de surveillance du process si control n'est pas null
+ Thread monitor = new SimulationCheckpointExternalProcessThread(control, simulation, process);
+ }
+
+ // on attend que la simulation soit fini
+ process.waitFor();
+
+ // on retourne directement le simulation storage passe en argument
+ // car la simulation a ete faite avec
+ return simulation;
+ }
+
/**
* fait la simulation en local dans un nouveau thread, cela permet
* pour chaque simulation d'avoir les bons scripts dans le classloader
@@ -386,7 +422,7 @@
simulation.addSimulationLogger(simulLogLevel,scriptLogLevel,libLogLevel,simThread.getName());
} catch (Exception e) {
if (log.isWarnEnabled()) {
- log.warn(I18n._("isisfish.error.add.logger.simulation ", e));
+ log.warn(_("isisfish.error.add.logger.simulation ", e));
}
}
try {
@@ -395,7 +431,7 @@
simThread.join();
} catch (InterruptedException eee) {
if (log.isWarnEnabled()) {
- log.warn(I18n._("isisfish.error.wait.simThread"), eee);
+ log.warn(_("isisfish.error.wait.simThread"), eee);
}
}
} finally {
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationManager.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationManager.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationManager.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,12 +31,14 @@
package fr.ifremer.isisfish.simulator;
+import fr.ifremer.isisfish.IsisConfig;
import fr.ifremer.isisfish.IsisFish;
import fr.ifremer.isisfish.datastore.SimulationStorage;
import fr.ifremer.isisfish.types.Date;
+import java.beans.PropertyChangeEvent;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import org.codelutin.util.FileUtil;
import org.codelutin.util.ListenerSet;
@@ -44,11 +46,11 @@
import java.beans.PropertyChangeSupport;
import java.io.File;
import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedHashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
import java.util.Map;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.PriorityBlockingQueue;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
/**
@@ -63,30 +65,36 @@
static protected SimulationManager instance = null;
- protected boolean autoLaunch = false;
+ // FIXME pouvoir configurer ceci en fichier de config
+ // FIXME ainsi que la mise a false, lors de la simulation de la derniere
+ // (sans doute ajoute un boolean, simulationListAsQueue = true|false)
+ protected boolean autoLaunch = true;
protected ListenerSet<SimulationQueueListener> listeners = new ListenerSet<SimulationQueueListener>();
protected PropertyChangeSupport propertyListeners = new PropertyChangeSupport(this);
- protected SimulationThread localThread;
- protected SimulationThread remoteThread;
+// protected SimulationThread localThread;
+// protected SimulationThread remoteThread;
- /** La queue, bloquante lorsqu'elle est vide, utilisé par le thread de simulation local*/
- protected PriorityBlockingQueue<QueueItem> localQueue = new PriorityBlockingQueue<QueueItem>();
- /** La queue, bloquante lorsqu'elle est vide, utilisé par le thread de simulation remote*/
- protected PriorityBlockingQueue<QueueItem> remoteQueue = new PriorityBlockingQueue<QueueItem>();
- /** La liste des simulations terminées */
- protected LinkedHashSet<QueueItem> dones = new LinkedHashSet<QueueItem>();
+ protected ExecutorService localExecutor;
+ protected ExecutorService remoteExecutor;
+
+// /** La queue, bloquante lorsqu'elle est vide, utilisé par le thread de simulation local*/
+// protected PriorityBlockingQueue<QueueItem> localQueue = new PriorityBlockingQueue<QueueItem>();
+// /** La queue, bloquante lorsqu'elle est vide, utilisé par le thread de simulation remote*/
+// protected PriorityBlockingQueue<QueueItem> remoteQueue = new PriorityBlockingQueue<QueueItem>();
+// /** La liste des simulations terminées */
+// protected LinkedHashSet<SimulationItem> dones = new LinkedHashSet<SimulationItem>();
- /** une liste des id (local et remote) */
- protected ArrayList<String> ids = new ArrayList<String>();
- /** une map id->item pour accelerer les acces */
- protected Map<String, QueueItem> map = new HashMap<String, QueueItem>();
+// /** une liste des id (local et remote) */
+// protected ArrayList<String> ids = new ArrayList<String>();
+ /** une map id->simItem pour accelerer les acces */
+ protected Map<String, SimulationItem> map = new LinkedHashMap<String, SimulationItem>();
- /** une liste des id des simulations terminées */
- protected ArrayList<String> idDones = new ArrayList<String>();
- /** une map id->item pour accelerer les acces aux simulation terminées */
- protected Map<String, QueueItem> mapDones = new HashMap<String, QueueItem>();
+// /** une liste des id des simulations terminées */
+// protected ArrayList<String> idDones = new ArrayList<String>();
+ /** une map id->simItem pour accelerer les acces aux simulation terminées */
+ protected Map<String, SimulationItem> mapDones = new LinkedHashMap<String, SimulationItem>();
static public SimulationManager getInstance() {
if (instance == null) {
@@ -99,11 +107,19 @@
* Cree l'objet et lance les deux threads de simulation (local/remote)
*/
protected SimulationManager() {
- localThread = new SimulationThread("local", this, localQueue);
- remoteThread = new SimulationThread("remote", this, remoteQueue);
+// localThread = new SimulationThread("local", this, localQueue);
+// remoteThread = new SimulationThread("remote", this, remoteQueue);
+//
+// localThread.start();
+// remoteThread.start();
- localThread.start();
- remoteThread.start();
+ // TODO passer ces valeurs en valeur configurable
+ int cpus = Runtime.getRuntime().availableProcessors();
+ int MAX_REMOTE_SIMULATION = 1;
+ log.info(_("Launch Simulation executor with %s cpu(s) for local, and %s" +
+ " process for remote", cpus, MAX_REMOTE_SIMULATION));
+ localExecutor = Executors.newFixedThreadPool(cpus);
+ remoteExecutor = Executors.newFixedThreadPool(MAX_REMOTE_SIMULATION);
}
@@ -134,28 +150,69 @@
* @param autoLaunch The autoLaunch to set.
*/
public void setAutoLaunch(boolean autoLaunch) {
- boolean oldValue = this.autoLaunch;
- this.autoLaunch = autoLaunch;
- propertyListeners.firePropertyChange("autoLaunch", oldValue, autoLaunch);
+ synchronized (this) {
+ boolean oldValue = this.autoLaunch;
+ this.autoLaunch = autoLaunch;
+ if (this.autoLaunch) {
+ this.notifyAll();
+ }
+ propertyListeners.firePropertyChange("autoLaunch", oldValue, autoLaunch);
+ }
}
+ public void waitAutoLaunch() {
+ synchronized(this) {
+ while (!isAutoLaunch()) {
+ try {
+ log.info("autoLaunch is false waiting queue start");
+ this.wait();
+ } catch (InterruptedException eee) {
+ log.warn("Error during wait autoLaunch flag", eee);
+ }
+ }
+ }
+ }
+
/**
* Cree l'objet de gestion de la simulation en interne et le place dans la
* bonne queue de simulation (local/remote). Appel le
- * {@link #fireAddEvent(String, QueueItem)}
+ * {@link #fireAddEvent(String, SimulationItem)}
* @param id l'id de simulation
* @param param les paramètres de la simulation
*/
- public void addSimulation(String id, SimulationParameter param) {
- QueueItem item = new QueueItem(id, param);
- fireAddEvent(id, item); // must be before thread notification because thread look in map
+ public void addSimulation(String id, SimulationParameter param) throws Exception {
+ ExecutorService executor = null;
if (param.getLocal()) {
- localQueue.add(item);
+ executor = localExecutor;
log.debug(_("isisfish.message.add.queue", id));
} else {
- remoteQueue.add(item);
+ executor = remoteExecutor;
log.debug(_("isisfish.message.add.queue.remote", id));
}
+
+
+
+ // on construit le bon type de SimulationItem pour le job
+ SimulationItem item = null;
+ if (param.getUseAnalysePlan()) {
+ // c un plan d'analyse, il peut etre independant ou dependant
+ if (!param.isIndependentPlan()) {
+ item = new SimulationItemPlan(id, param);
+ executor.execute(new SimulationJob(this, item));
+ } else {
+ // on met dans la queue local le process de generation de toutes
+ // les simus
+ item = new SimulationItemPlanIndependent(id, param);
+ localExecutor.execute(
+ new PrepareIndependentSimulationJob(this, executor, item));
+ }
+ } else {
+ // une simulation normal
+ item = new SimulationItem(id, param);
+ log.info("Simulation added to executor: " + executor.isShutdown() + ", " + executor.isTerminated());
+ executor.execute(new SimulationJob(this, item));
+ }
+ fireAddEvent(id, item); // must be before thread notification because thread look in map
}
/**
@@ -165,7 +222,7 @@
* @param id l'id de simulation
*/
public void removeSimulation(String id) {
- QueueItem item = map.get(id);
+ SimulationItem item = map.get(id);
if (item != null) {
item.control.setStopSimulationRequest(true);
}
@@ -173,6 +230,26 @@
}
/**
+ * Retourne une liste toujours dans le meme ordre des ids de simulation
+ * a faire
+ * @return
+ */
+ public List<String> getIds() {
+ List<String> result = new ArrayList<String>(map.keySet());
+ return result;
+ }
+
+ /**
+ * Retourne une liste toujours dans le meme ordre des ids de simulation
+ * a faire
+ * @return
+ */
+ public List<String> getDoneIds() {
+ List<String> result = new ArrayList<String>(mapDones.keySet());
+ return result;
+ }
+
+ /**
* @param id l'id de simulation
* @return <code>true</code> si un identifiant est utilisé pour une simulation
*/
@@ -201,8 +278,8 @@
listeners.remove(l);
}
- protected void fireAddEvent(String id, QueueItem item) {
- ids.add(id);
+ protected void fireAddEvent(String id, SimulationItem item) {
+// ids.add(id);
map.put(id, item);
SimulationQueueEvent e = new SimulationQueueEvent(this, id);
for (SimulationQueueListener l : listeners) {
@@ -215,21 +292,29 @@
// add the simulation in done model
// check if we should keep the simulation in done model
if (mustShowSimulationDone(id)) {
- idDones.add(id);
- SimulationManager.QueueItem queueItem = map.get(id);
- dones.add(queueItem);
+// idDones.add(id);
+ SimulationItem queueItem = map.get(id);
+// dones.add(queueItem);
mapDones.put(id, queueItem);
}
SimulationQueueEvent e = new SimulationQueueEvent(this, id);
for (SimulationQueueListener l : listeners) {
l.simulationWillBeRemoved(e);
}
- ids.remove(id);
+// ids.remove(id);
map.remove(id);
}
}
- protected void fireStartEvent(String id) {
+ protected void fireStartEvent(String id, SimulationItem item) {
+ if (!exists(id) && item.isIndependent()) {
+ // la simulation qui vient d'etre lancee n'existe pas, c parce qu'il
+ // s'agit d'une simulation de plan, on l'ajoute a la liste pour que
+ // l'utilisateur puisse la visualiser. On ne le fait pas pour les
+ // plan dependant car, il partage le meme controleur, donc
+ // l'utilisateur voit deja ce qui se passe
+ fireAddEvent(id, item);
+ }
SimulationQueueEvent e = new SimulationQueueEvent(this, id);
for (SimulationQueueListener l : listeners) {
l.simulationStart(e);
@@ -257,7 +342,11 @@
*/
public SimulationControl getControl(String id) {
SimulationControl result = null;
- QueueItem item = map.get(id);
+ SimulationItem item = map.get(id);
+ if (item == null) {
+ // try to find it in done simulation
+ item = mapDones.get(id);
+ }
if (item != null) {
result = item.control;
}
@@ -272,234 +361,521 @@
protected boolean mustShowSimulationDone(String id) {
boolean result = true;
- QueueItem item = map.get(id);
- SimulationParameter simulationParameter = getParameter(id);
- if (IsisFish.config.isSimulationShowOnlyQueue() && !simulationParameter.getLocal()) {
- return false;
- }
+ try {
+ IsisConfig config = IsisFish.config;
- try {
- //TODO cela ne fonctionne pas, le fichier existe-il à ce moment ?
- if (IsisFish.config.isSimulationShowOnlyError() && item.lastSimulation.getInformation().getException() != null) {
- return true;
+ SimulationItem item = map.get(id);
+ if (item.hasPlanItem() && !item.getSimulation().getInformation().hasError()) {
+ // on ne met jamais dans la queue done les simulations de plan
+ // sauf si elle echoue
+ result = false;
+// FIXME a revoir la condition avec showOnly error et showOnly queue (qui ne sert plus)
+ } else if (!(config.isSimulationShowOnlyError() &&
+ !(item instanceof SimulationItemPlan) &&
+ item.getSimulation().getInformation().hasError())) {
+ result = false;
}
- } catch (Exception e) {
+ } catch (Exception eee) {
+ log.debug("Ne devrait pas arriver", eee);
// I don't known how it could appear, but in doubt, show it!
- return true;
}
return result;
}
+// /**
+// * Thread permettant de faire les simulations se trouvant dans la queue
+// * passée en parametre.
+// * <p>
+// * Si la simulation prise dans la queue n'existe plus, au moment ou on
+// * souhaite l'utiliser dans le {@link SimulationManager} alors elle est
+// * passée et on en recherche une autre.
+// *
+// * @author poussin
+// */
+// static class SimulationThread extends Thread {
+// protected SimulationManager simulationManager;
+// protected BlockingQueue<QueueItem> queue;
+//
+// /**
+// *
+// * @param name just small name to differenciate thread (local/remote)
+// * @param simulationManager le manager de simulation
+// * @param queue la queue de simulations
+// */
+// public SimulationThread(String name, SimulationManager simulationManager, BlockingQueue<QueueItem> queue) {
+// super("Simulation Thread " + name);
+// this.simulationManager = simulationManager;
+// this.queue = queue;
+// }
+//
+// /* (non-Javadoc)
+// * @see java.lang.Thread#run()
+// */
+// @Override
+// public void run() {
+// log.info("Start simulation thread");
+// while (true) {
+// // simItem qui sert a faire la simulation courante
+// QueueItem simItem = null;
+// try {
+// //
+// // recheche d'une simulation
+// //
+// while (simItem == null) {
+// log.debug("try to take simulation");
+// simItem = queue.take();
+// log.debug("Just take " + simItem.id);
+// if (!simulationManager.exists(simItem.id)) {
+// // on ne le retrouve pas dans la map, la simulation
+// // a donc ete supprimée par l'utilisateur on passe a la
+// // suivante
+// simItem = null;
+// } else if (!simulationManager.isAutoLaunch() && simItem.param.getInQueue()) {
+// // don't use simItem, because is queue and queue is not launched
+// queue.add(simItem);
+// simItem = null;
+// // sleep 1s. Because all other simItem is in queue too
+// // this sleep permit to user to put not queue simItem,
+// // with out eat cpu
+// sleep(1000);
+// }
+// }
+//
+// log.debug("use if has next simulation: " + simItem.id);
+// if (simItem.hasNext()) {
+// SimulationStorage sim = simItem.getSimulation();
+// String simId = sim.getName();
+// log.debug("Start simulation: " + simId);
+// SimulationControl control = simItem.control;
+// // set date to 0 at beginning of simulation
+// control.setDate(new Date());
+// control.setProgress(0);
+// control.setStarted(true);
+//
+// simulationManager.fireStartEvent(simItem.id);
+// try {
+// sim = SimulationHelper.simulate(control, sim);
+// simItem.setLastSimulation(sim);
+// } finally {
+// simulationManager.fireStopEvent(simItem.id);
+// }
+// // copie les exports de simulation dans le repertoire
+// // souhaiter par l'utilisateur
+// SimulationParameter param = sim.getParameter();
+// if (param.getExportNames() != null && param.getExportNames().size() > 0) {
+// File exportDir = IsisConfig.getResultExportDirectory(sim.getDirectory());
+// FileUtil.copyAndRenameRecursively(
+// exportDir,
+// new File(param.getExportDirectory()),
+// exportDir.getName(), simItem.id);
+//// FileUtil.copyAndRenameRecursively(
+//// exportDir,
+//// new File(sim.getDirectory(), IsisConfig.RESULT_EXPORT),
+//// IsisConfig.RESULT_EXPORT, simItem.id);
+// }
+//
+// if (simItem.hasNext() && simulationManager.exists(simItem.id)) {
+// // il y a encore des simulations a faire pour cet simItem
+// // on le remet dans la queue (on ne fait pas les autres
+// // simulations de cet simItem
+// // tout de suite car l'simItem peut-etre un simItem de queue
+// // moins prioritaire que les autres simulations
+// // il faut donc qu'il reprenne sa place dans l'ordre)
+//
+// queue.add(simItem);
+// } else {
+// // Si l'utilisateur souhaite seulement les exports
+// // on supprimer la/les simulations. Il faut le faire
+// // lorsqu'il n'y a plus de next car le calcul des plans
+// // peut avoir besoin des simulations precedentes
+// if (param.getOnlyExport()) {
+// if (param.getUseAnalysePlan()) {
+// for(File file : FileUtil.find(
+// IsisConfig.getSimulationDirectory(),
+// simItem.id + "_[0-9]+$", false)) {
+// log.debug("Delete simulation " + file);
+// FileUtil.deleteRecursively(file);
+// }
+// } else {
+// sim.delete(false);
+// }
+// }
+// simulationManager.fireRemoveEvent(simItem.id);
+//
+// if (simulationManager.isAutoLaunch() && simItem.param.getInQueue()) {
+// // if simItem is last in queue, stop the queue after that
+// QueueItem [] items = queue.toArray(new QueueItem[queue.size()]);
+// if (items.length > 0) {
+// QueueItem last = items[items.length-1];
+// if (!last.param.getInQueue()) {
+// // la derniere n'est pas en queue, donc plus de simulation en queue
+// simulationManager.setAutoLaunch(false);
+// }
+// } else {
+// // aucun simulation, donc forcement plus en queue non plus
+// simulationManager.setAutoLaunch(false);
+// }
+// }
+// }
+// }
+//
+//// } catch (Exception eee) {
+// } catch (Throwable eee) {
+// try {
+// // on sauvegarde l'erreur rencontrée, elle sera traité lors
+// // du fireRemoveEvent
+// simItem.lastSimulation.getInformation().setException(eee);
+// } catch (Exception e) {
+// if (log.isWarnEnabled()) {
+// log.warn(_("isisfish.error.during.simulation.information.file", simItem.id), eee);
+// }
+// } finally {
+// // error during simulation, remove bad simulation
+// simulationManager.fireRemoveEvent(simItem.id);
+// if (log.isWarnEnabled()) {
+// log.warn(_("isisfish.error.during.simulation", simItem.id), eee);
+// }
+// }
+//
+// } finally {
+// simItem = null;
+// }
+// }
+// }
+// }
+
+// /**
+// * Utilise pour les simulations avec plan d'analyse dependant
+// */
+// static class SimulationPlanJob implements Runnable {
+//
+// protected SimulationManager simulationManager;
+// protected SimulationItemPlan item;
+//
+// public SimulationPlanJob(SimulationManager simulationManager, SimulationItemPlan item) {
+// this.simulationManager = simulationManager;
+// this.item = item;
+// }
+//
+// public void run() {
+// try {
+// log.debug("use if has next simulation: " + item.id);
+// // on traite tout l'simItem dans le meme thread
+// while (simulationManager.exists(item.id) && item.hasNext()) {
+// SimulationStorage sim = item.getSimulation();
+// String simId = sim.getName();
+// log.debug("Start simulation: " + simId);
+// SimulationControl control = item.control;
+// // set date to 0 at beginning of simulation
+// control.setDate(new Date());
+// control.setProgress(0);
+// control.setStarted(true);
+//
+// simulationManager.fireStartEvent(item.id);
+// try {
+// sim = SimulationHelper.simulate(control, sim);
+// item.setLastSimulation(sim);
+// } finally {
+// simulationManager.fireStopEvent(item.id);
+// }
+// // copie les exports de simulation dans le repertoire
+// // souhaiter par l'utilisateur
+// SimulationParameter param = sim.getParameter();
+// if (param.getExportNames() != null &&
+// param.getExportNames().size() > 0) {
+// File exportDir = IsisConfig.getResultExportDirectory(
+// sim.getDirectory());
+// FileUtil.copyAndRenameRecursively(
+//
+// exportDir,
+// new File(param.getExportDirectory()),
+// exportDir.getName(), item.id);
+//// FileUtil.copyAndRenameRecursively(
+//// exportDir,
+//// new File(sim.getDirectory(), IsisConfig.RESULT_EXPORT),
+//// IsisConfig.RESULT_EXPORT, simItem.id);
+// }
+// }
+//
+// if (item.lastSimulation != null) {
+// SimulationParameter param = item.param;
+// // Si l'utilisateur souhaite seulement les exports
+// // on supprimer la/les simulations. Il faut le faire
+// // lorsqu'il n'y a plus de next car le calcul des plans
+// // peut avoir besoin des simulations precedentes
+// if (param.getOnlyExport()) {
+// if (param.getUseAnalysePlan()) {
+// for (File file : FileUtil.find(
+// IsisConfig.getSimulationDirectory(),
+// item.id + "_[0-9]+$", false)) {
+// log.debug("Delete simulation " + file);
+// FileUtil.deleteRecursively(file);
+// }
+// } else {
+// item.lastSimulation.delete(false);
+// }
+// }
+// }
+// // on previent que c la fin de la simulation
+// simulationManager.fireRemoveEvent(item.id);
+// } catch (Throwable eee) {
+// try {
+// // on sauvegarde l'erreur rencontrée, elle sera traité lors
+// // du fireRemoveEvent
+// if (item.lastSimulation != null) {
+// item.lastSimulation.getInformation().setException(eee);
+// }
+// } catch (Exception e) {
+// if (log.isWarnEnabled()) {
+// log.warn(_("isisfish.error.during.simulation.information.file", item.id), eee);
+// }
+// } finally {
+// // error during simulation, remove bad simulation
+// simulationManager.fireRemoveEvent(item.id);
+// if (log.isWarnEnabled()) {
+// log.warn(_("isisfish.error.during.simulation", item.id), eee);
+// }
+// }
+//
+// } finally {
+// item = null;
+// }
+// }
+//
+// }
+
+ class PrepareIndependentSimulationJob implements Runnable {
+
+ protected SimulationManager simulationManager;
+ protected ExecutorService executor;
+ protected SimulationItem item;
+
+ public PrepareIndependentSimulationJob(SimulationManager simulationManager,
+ ExecutorService executor,
+ SimulationItem item) {
+ this.simulationManager = simulationManager;
+ this.executor = executor;
+ this.item = item;
+ }
+
+ public void run() {
+ simulationManager.waitAutoLaunch();
+ // l'item est independant, on ajoute toutes ces simulations en plus
+ // mais pas dans la map pour qu'il n'y ait bien que l'initiale
+ // plus celles en cours d'affichees
+ while (item.hasNext()) {
+ try {
+ executor.execute(new SimulationJob(simulationManager, item.next()));
+ } catch (Exception eee) {
+ log.error("Can't add simulation: " + item, eee);
+ }
+ }
+
+ }
+
+ }
+
/**
- * Thread permettant de faire les simulations se trouvant dans la queue
- * passée en parametre.
- * <p>
- * Si la simulation prise dans la queue n'existe plus, au moment ou on
- * souhaite l'utiliser dans le {@link SimulationManager} alors elle est
- * passée et on en recherche une autre.
- *
- * @author poussin
+ * Utilise pour les simulations sans plan d'analyse ou des plans independant
*/
- static class SimulationThread extends Thread {
+ class SimulationJob implements Runnable {
+
protected SimulationManager simulationManager;
- protected BlockingQueue<QueueItem> queue;
+ protected SimulationItem simItem;
/**
- *
- * @param name just small name to differenciate thread (local/remote)
- * @param simulationManager le manager de simulation
- * @param queue la queue de simulations
+ *
+ * @param simulationManager
+ * @param parentId si ce job est le resulat d'un plan d'analyse
+ * independant, sinon null ou la meme valeur que id
+ * @param id l'identifiant de la simulation (avec _N pour ceux qui
+ * proviennent d'un plan d'analyse)
+ * @param zip le zip contenant la simulation
*/
- public SimulationThread(String name, SimulationManager simulationManager, BlockingQueue<QueueItem> queue) {
- super("Simulation Thread " + name);
+ public SimulationJob(SimulationManager simulationManager,
+ SimulationItem item) {
this.simulationManager = simulationManager;
- this.queue = queue;
+ this.simItem = item;
}
-
- /* (non-Javadoc)
- * @see java.lang.Thread#run()
- */
- @Override
+
public void run() {
- log.info("Start simulation thread");
- while (true) {
- // item qui sert a faire la simulation courante
- QueueItem item = null;
- try {
- //
- // recheche d'une simulation
- //
- while (item == null) {
- log.debug("try to take simulation");
- item = queue.take();
- log.debug("Just take " + item.id);
- if (!simulationManager.exists(item.id)) {
- // on ne le retrouve pas dans la map, la simulation
- // a donc ete supprimée par l'utilisateur on passe a la
- // suivante
- item = null;
- } else if (!simulationManager.isAutoLaunch() && item.param.getInQueue()) {
- // don't use item, because is queue and queue is not launched
- queue.add(item);
- item = null;
- // sleep 1s. Because all other item is in queue too
- // this sleep permit to user to put not queue item,
- // with out eat cpu
- sleep(1000);
- }
- }
+ log.info("Start simulation : " + simItem.id);
+ simulationManager.waitAutoLaunch();
+ try {
+ // si l'simItem exist encore (que l'utilisateur ne la pas retire)
+ while (simulationManager.exists(simItem.getPlanIdOrId()) &&
+ simItem.hasNext()) {
+ SimulationItem item = simItem.next();
+ try {
+ String id = item.id;
- log.debug("use if has next simulation: " + item.id);
- if (item.hasNext()) {
- SimulationStorage sim = item.getSimulation();
- String simId = sim.getName();
- log.debug("Start simulation: " + simId);
+ log.debug("Start simulation: " + id);
+ SimulationStorage simulation = item.getSimulation();
SimulationControl control = item.control;
// set date to 0 at beginning of simulation
control.setDate(new Date());
control.setProgress(0);
+ control.setStarted(true);
- simulationManager.fireStartEvent(item.id);
+ simulationManager.fireStartEvent(id, item);
try {
- sim = SimulationHelper.simulate(control, sim);
- item.setLastSimulation(sim);
+ simulation = SimulationHelper.simulate(control, simulation);
+ item.setLastSimulation(simulation);
} finally {
- simulationManager.fireStopEvent(item.id);
+ simulationManager.fireStopEvent(id);
}
// copie les exports de simulation dans le repertoire
// souhaiter par l'utilisateur
- SimulationParameter param = sim.getParameter();
- if (param.getExportNames() != null && param.getExportNames().size() > 0) {
- File exportDir = SimulationStorage.getResultExportDirectory(sim.getDirectory());
+ SimulationParameter param = simulation.getParameter();
+ if (param.getExportNames() != null &&
+ param.getExportNames().size() > 0) {
+ File exportDir = SimulationStorage.getResultExportDirectory(
+ simulation.getDirectory());
FileUtil.copyAndRenameRecursively(
exportDir,
new File(param.getExportDirectory()),
- exportDir.getName(), item.id);
+ // FIXME, est-ce bien parentId et pas id ?
+ exportDir.getName(), id);
// FileUtil.copyAndRenameRecursively(
// exportDir,
// new File(sim.getDirectory(), IsisConfig.RESULT_EXPORT),
-// IsisConfig.RESULT_EXPORT, item.id);
+// IsisConfig.RESULT_EXPORT, simItem.id);
}
-
- if (item.hasNext() && simulationManager.exists(item.id)) {
- // il y a encore des simulations a faire pour cet item
- // on le remet dans la queue (on ne fait pas les autres
- // simulations de cet item
- // tout de suite car l'item peut-etre un item de queue
- // moins prioritaire que les autres simulations
- // il faut donc qu'il reprenne sa place dans l'ordre)
-
- queue.add(item);
- } else {
- // Si l'utilisateur souhaite seulement les exports
- // on supprimer la/les simulations. Il faut le faire
- // lorsqu'il n'y a plus de next car le calcul des plans
- // peut avoir besoin des simulations precedentes
- if (param.getOnlyExport()) {
- if (param.getUseAnalysePlan()) {
- for(File file : FileUtil.find(
- SimulationStorage.getSimulationDirectory(),
- item.id + "_[0-9]+$", false)) {
- log.debug("Delete simulation " + file);
- FileUtil.deleteRecursively(file);
- }
- } else {
- sim.delete(false);
- }
+ // Si l'utilisateur souhaite seulement les exports
+ // on supprimer la/les simulations.
+ // pour les plan dependant il faut le faire apres toutes
+ // les simulations
+ if (simItem.isIndependent() && param.getOnlyExport()) {
+ simulation.delete(false);
+ }
+ // on previent que c la fin de la simulation
+ simulationManager.fireRemoveEvent(id);
+ } catch (Throwable eee) {
+ try {
+ // on sauvegarde l'erreur rencontrée, elle sera traité lors
+ // du fireRemoveEvent
+ item.getSimulation().getInformation().setException(eee);
+ } catch (Exception e) {
+ if (log.isWarnEnabled()) {
+ log.warn(_("isisfish.error.during.simulation.information.file", item.id), eee);
}
+ } finally {
+ // error during simulation, remove bad simulation
simulationManager.fireRemoveEvent(item.id);
-
- if (simulationManager.isAutoLaunch() && item.param.getInQueue()) {
- // if item is last in queue, stop the queue after that
- QueueItem [] items = queue.toArray(new QueueItem[queue.size()]);
- if (items.length > 0) {
- QueueItem last = items[items.length-1];
- if (!last.param.getInQueue()) {
- // la derniere n'est pas en queue, donc plus de simulation en queue
- simulationManager.setAutoLaunch(false);
- }
- } else {
- // aucun simulation, donc forcement plus en queue non plus
- simulationManager.setAutoLaunch(false);
- }
+ if (log.isWarnEnabled()) {
+ log.warn(_("isisfish.error.during.simulation", item.id), eee);
}
}
}
-
-// } catch (Exception eee) {
- } catch (Throwable eee) {
- try {
- // on sauvegarde l'erreur rencontrée, elle sera traité lors
- // du fireRemoveEvent
- item.lastSimulation.getInformation().setException(eee);
- } catch (Exception e) {
- if (log.isWarnEnabled()) {
- log.warn(_("isisfish.error.during.simulation.information.file", item.id), eee);
- }
- } finally {
- // error during simulation, remove bad simulation
- simulationManager.fireRemoveEvent(item.id);
- if (log.isWarnEnabled()) {
- log.warn(_("isisfish.error.during.simulation", item.id), eee);
- }
- }
-
- } finally {
- item = null;
}
+ } catch (Exception eee) {
+ log.error("Can't take next simulation: " + simItem.id, eee);
}
- }
+ // suppression des simulations pour les plans dependants
+ // Si l'utilisateur souhaite seulement les exports
+ // on supprimer la/les simulations. Il faut le faire
+ // lorsqu'il n'y a plus de next car le calcul des plans
+ // peut avoir besoin des simulations precedentes
+ if (!simItem.isIndependent() && simItem.param.getOnlyExport()) {
+ for (File file : FileUtil.find(
+ SimulationStorage.getSimulationDirectory(),
+ simItem.id + "_[0-9]+$", false)) {
+ log.debug("Delete simulation " + file);
+ FileUtil.deleteRecursively(file);
+ }
+ }
+
+ if (!simItem.control.isRunning() && simItem.hasSimulation()) {
+ // c'etait la derniere simulation du plan, on arrete le plan
+ simulationManager.fireStopEvent(simItem.id);
+ simulationManager.fireRemoveEvent(simItem.id);
+ }
+ }
}
/**
- * Permet de comparer les simulations pour les ordonner.
- * Les simulations de queue soit moins prioritaire que les autres, ensuite
- * l'ordre se fait sur la date d'arrivé dans la queue de simulation
- *
- * @author poussin
+ * Une simulation a faire sans plan d'experience
*/
- public class QueueItem implements Comparable<QueueItem> {
-
- protected long time;
+ public class SimulationItem {
+
protected String id;
protected SimulationParameter param;
- protected PlanGenerator plan = null;
+ protected SimulationItemPlan planItem = null;
protected File zip;
protected SimulationControl control;
protected SimulationStorage lastSimulation = null;
- public QueueItem(String id, SimulationParameter param) {
- this.time = System.nanoTime();
+ protected SimulationItem() {
+ }
+
+ public boolean isIndependent() {
+ return true;
+ }
+
+ /**
+ * Utilise pour servir sous simItem pour les items de plan d'experience
+ * @param id
+ * @param control
+ * @param sim
+ */
+ public SimulationItem(SimulationItemPlan planItem, SimulationControl control,
+ SimulationStorage sim) {
+ this.planItem = planItem;
+ this.id = sim.getName();
+ param = sim.getParameter();
+ this.control = control;
+ lastSimulation = sim;
+ }
+
+ /**
+ * Retourne l'id du plan qui a genere cet item, si cet item n'est
+ * pas genere par un plan, retourne directement l'id
+ * @return
+ */
+ public String getPlanIdOrId() {
+ String result = id;
+ if (hasPlanItem()) {
+ result = getPlanItem().id;
+ }
+ return result;
+ }
+
+ public SimulationItemPlan getPlanItem() {
+ return planItem;
+ }
+
+ public boolean hasPlanItem() {
+ boolean result = planItem != null;
+ return result;
+ }
+
+ /**
+ * creer un simItem de simulation et prepare le zip
+ * @param id
+ * @param param
+ */
+ public SimulationItem(String id, SimulationParameter param) {
this.id = id;
this.param = param;
this.control = new SimulationControl(id);
- // ne pas inverser la creation de PlanGenerator et du zip.
- // car le init des plans est fait dans le constructeur de
- // PlanGenerator, et le init peut modifier les parametres
- // de simulation
- if (param.getUseAnalysePlan()) {
- plan = new PlanGenerator(id, control, param);
- }
zip = SimulationHelper.prepareSimulationZipFile(control, param, true);
- if (plan != null) {
- plan.setZip(zip);
- }
}
-
+
+ public boolean hasSimulation() {
+ boolean result = lastSimulation != null;
+ return result;
+ }
+
/**
* Retourne la simulation qu'il faut faire
* @return le storage de simulation
* @throws Exception si problème pendant l'import de la simulation
*/
public SimulationStorage getSimulation() throws Exception {
- SimulationStorage result;
- if (plan != null) {
- result = plan.next();
- } else {
- result = SimulationStorage.importAndRenameZip(zip, id);
+ if (lastSimulation == null) {
+ lastSimulation = SimulationStorage.importAndRenameZip(zip, id);
}
- lastSimulation = result;
- return result;
+ return lastSimulation;
}
/**
@@ -512,8 +888,8 @@
*/
public void setLastSimulation(SimulationStorage lastSimulation) {
this.lastSimulation = lastSimulation;
- if (plan != null) {
- plan.setLastSimulation(lastSimulation);
+ if (hasPlanItem()) {
+ getPlanItem().setLastSimulation(lastSimulation);
}
}
@@ -524,18 +900,26 @@
*/
public boolean hasNext() {
boolean result;
- result = (plan != null && plan.hasNext()) || lastSimulation == null;
+ result = !control.isStarted();
return result;
}
-
+
+ /**
+ * Ce retourne lui meme, car il n'y a pas de plan
+ * @return
+ */
+ public SimulationItem next() throws Exception {
+ return this;
+ }
+
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
boolean result = false;
- if (obj instanceof QueueItem) {
- result = param.equals(((QueueItem)obj).param);
+ if (obj instanceof SimulationItem) {
+ result = param.equals(((SimulationItem)obj).param);
}
return result;
}
@@ -543,33 +927,164 @@
@Override
public int hashCode() {
int hash = 3;
- hash = 37 * hash + (this.param != null ? this.param.hashCode() : 0);
+ hash = 53 * hash + (this.param != null ? this.param.hashCode() : 0);
return hash;
}
+
+ }
- /* (non-Javadoc)
- * @see java.lang.Comparable#compareTo(java.lang.Object)
+ /**
+ * Une simulation a faire qui contient un plan d'experience dependant
+ */
+ public class SimulationItemPlan extends SimulationItem
+ implements PropertyChangeListener {
+ // FIXME a mettre en config MAX_SIMULATION_PLAN
+ // nombre maximal de simulation de plan par simulation
+ // (pour eviter les plans qui ne retroune jamais faux
+ protected static final int MAX_SIMULATION_PLAN = 10000;
+
+ protected int simulationNumber = 0;
+ protected int simulationFinished = 0;
+ protected PlanGenerator plan = null;
+
+ public SimulationItemPlan(String id, SimulationParameter param) {
+ this.id = id;
+ this.param = param;
+ this.control = new SimulationControl(id);
+ // ne pas inverser la creation de PlanGenerator et du zip.
+ // car le init des plans est fait dans le constructeur de
+ // PlanGenerator, et le init peut modifier les parametres
+ // de simulation
+ if (!param.getUseAnalysePlan()) {
+ throw new SimulationException("Your simulation is not a plan:" + id);
+ }
+
+ plan = new PlanGenerator(id, control, param);
+ zip = SimulationHelper.prepareSimulationZipFile(control, param, true);
+ plan.setZip(zip);
+ }
+
+ @Override
+ public boolean isIndependent() {
+ return false;
+ }
+
+ /**
+ * Retourne la simulation qu'il faut faire
+ * @return le storage de simulation
+ * @throws Exception si problème pendant l'import de la simulation
*/
- public int compareTo(QueueItem o) {
- int result;
+ @Override
+ public SimulationStorage getSimulation() throws Exception {
+ throw new UnsupportedOperationException("Plan item don't have simulation");
+ }
- boolean inQueue1 = param.getInQueue();
- boolean inQueue2 = o.param.getInQueue();
- if (inQueue1 == inQueue2) {
- // this et o ont la meme valeur, on compare les temps
- // le plus vieux devant (donc le plus petit)
- result = time<o.time ? -1 : (time==o.time ? 0 : 1);
- } else if (inQueue1) {
- // this est dans la queue donc moins prioritaire
- // on le met donc a la fin
- result = 1;
- } else {
- // o est dans la queue donc moins prioritaire
- result = -1;
+ /**
+ * Retourne la simulation qu'il faut faire
+ * @return le storage de simulation
+ * @throws Exception si problème pendant l'import de la simulation
+ */
+ public SimulationStorage getNextSimulation() throws Exception {
+ SimulationStorage result;
+ result = plan.next();
+ simulationNumber++;
+ lastSimulation = result;
+ return result;
+ }
+
+ /**
+ * Appelé apres que la simulation est vraiment eu lieu. On en a besoin
+ * car pour une simulation distante apres la simulation le storage
+ * a ete changé par rapport au storage initialement cree pour la
+ * simulation
+ *
+ * @param lastSimulation The lastSimulation to set.
+ */
+ @Override
+ public void setLastSimulation(SimulationStorage lastSimulation) {
+ this.lastSimulation = lastSimulation;
+ plan.setLastSimulation(lastSimulation);
+ }
+
+ /**
+ * @return <code>true</code> s'il y a encore une simulation si on
+ * utilise un plan et qu'il dit qu'il y en a encore, ou si la simulation
+ * n'a pas encore ete faite.
+ */
+ @Override
+ public boolean hasNext() {
+ boolean result;
+ result = simulationNumber < MAX_SIMULATION_PLAN &&
+ ((plan != null && plan.hasNext()) || lastSimulation == null);
+ return result;
+ }
+
+ /**
+ * On utilise le meme control pour les plans dependants
+ * @return
+ */
+ @Override
+ public SimulationItem next() throws Exception {
+ SimulationStorage sim = getNextSimulation();
+ SimulationItem result = new SimulationItem(this, control, sim);
+ return result;
+ }
+
+ public void propertyChange(PropertyChangeEvent evt) {
+ // Attention il faut bien que toutes les simultions soit
+ // genere (ou qu'il en reste au moins une en cours
+ // sinon, la condition est tout de suite vrai et la simulation
+ // s'arrete. Ce qui est normalement le cas ici, car on utilise
+ // le meme executor pour genere les simultions que pour les faire
+ // et les generes est mis en premier dans l'executor, mais si
+ // on est multi cpu, et que le temps de simulation est inferieur
+ // au temps de generation des simulations, on pourrai finir par
+ // avoir un probleme.
+
+ if (Boolean.FALSE.equals(evt.getNewValue())) {
+ simulationFinished++;
+ control.setProgress(simulationFinished);
+ control.setText(simulationFinished + " / " + simulationNumber);
+ if (simulationFinished >= simulationNumber) {
+ log.info("All simulations have been executed: " + simulationFinished);
+ control.stopSimulation();
+ String id = control.getId();
+ SimulationManager.this.fireStopEvent(id);
+ SimulationManager.this.fireRemoveEvent(id);
+ }
}
+ }
+ }
+
+ /**
+ * Une simulation a faire qui contient un plan d'experience independant
+ */
+ public class SimulationItemPlanIndependent extends SimulationItemPlan {
+
+ public SimulationItemPlanIndependent(String id, SimulationParameter param) {
+ super(id, param);
+ }
+
+ @Override
+ public boolean isIndependent() {
+ return true;
+ }
+
+ /**
+ * On utilise un nouveau control pour les plans independants
+ * @return
+ */
+ @Override
+ public SimulationItem next() throws Exception {
+ SimulationStorage sim = getNextSimulation();
+ control.setProgressMax(simulationNumber);
+ SimulationControl control = new SimulationControl(sim.getName());
+ control.addPropertyChangeListener("running", this);
+ SimulationItem result = new SimulationItem(this, control, sim);
return result;
}
+
}
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationMeta.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationMeta.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationMeta.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -5,7 +5,7 @@
import fr.ifremer.isisfish.ui.widget.filter.FilterParamModel;
import fr.ifremer.isisfish.ui.widget.filter.ValueGetter;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationParameter.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationParameter.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationParameter.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -44,7 +44,7 @@
import fr.ifremer.isisfish.rule.RuleHelper;
import fr.ifremer.isisfish.util.ConverterUtil;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import org.codelutin.math.matrix.MatrixFactory;
import org.codelutin.math.matrix.MatrixHelper;
import org.codelutin.math.matrix.MatrixND;
@@ -127,6 +127,9 @@
/** La simulation doit etre faite en local */
protected boolean local = true;
+ /** La simulation doit etre faite dans un sous process */
+ protected boolean subProcess = false;
+
/** La simulation doit etre lancé dans la queue de simulation (non prioritaire)*/
protected boolean inQueue = false;
@@ -273,6 +276,7 @@
result.setProperty("exports", exportList);
result.setProperty("local", String.valueOf(local));
+ result.setProperty("subProcess", String.valueOf(subProcess));
result.setProperty("inQueue", String.valueOf(inQueue));
result.setProperty("usePreScript", String.valueOf(usePreScript));
result.setProperty("preScript", preScript);
@@ -415,6 +419,7 @@
}
local = Boolean.parseBoolean(props.getProperty("local", "true"));
+ subProcess = Boolean.parseBoolean(props.getProperty("subProcess", "false"));
inQueue = Boolean.parseBoolean(props.getProperty("inQueue", "false"));
usePreScript = Boolean.parseBoolean(props.getProperty("usePreScript",
"false"));
@@ -680,7 +685,14 @@
this.local = local;
}
+ public void setSubProcess(boolean subProcess) {
+ this.subProcess = subProcess;
+ }
+ public boolean isSubProcess() {
+ return subProcess;
+ }
+
/**
* @return Returns the inQueue.
*/
@@ -715,6 +727,17 @@
public boolean getUseStatistic() {
return this.useStatistic;
}
+
+ public boolean isIndependentPlan() {
+ boolean result = true;
+ for (AnalysePlan plan : getAnalysePlans()) {
+ if (!(plan instanceof AnalysePlanIndependent)) {
+ result = false;
+ break;
+ }
+ }
+ return result;
+ }
/**
* @param useStatistic The useStatistic to set.
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationPreScript.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationPreScript.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationPreScript.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,7 +31,7 @@
package fr.ifremer.isisfish.simulator;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationProperties.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationProperties.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationProperties.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -1,9 +1,8 @@
package fr.ifremer.isisfish.simulator;
-import fr.ifremer.isisfish.IsisConfig;
+import static org.codelutin.i18n.I18nf._;
import fr.ifremer.isisfish.datastore.SimulationStorage;
-import org.codelutin.i18n.I18n;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -51,7 +50,7 @@
reader = new FileReader(file);
this.data.load(reader);
} catch (IOException e) {
- log.warn(I18n._("isisfish.error.load.file", file));
+ log.warn(_("isisfish.error.load.file", file));
} finally {
if (reader != null) try {
reader.close();
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationQueueModel.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationQueueModel.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationQueueModel.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,6 +31,9 @@
package fr.ifremer.isisfish.simulator;
+import java.util.ArrayList;
+import java.util.List;
+
/** @author poussin */
public class SimulationQueueModel extends AbstractSimulationQueueModel {
@@ -53,13 +56,13 @@
* @see AbstractSimulationQueueModel at getSimulationIds()
*/
protected java.util.List<String> getSimulationIds() {
- return getQueue().ids;
+ return getQueue().getIds();
}
/* (non-Javadoc)
* @see AbstractSimulationQueueModel at getQueueItemsAsMap()
*/
- protected java.util.Map<String, SimulationManager.QueueItem> getQueueItemsAsMap() {
+ protected java.util.Map<String, SimulationManager.SimulationItem> getQueueItemsAsMap() {
return getQueue().map;
}
@@ -70,7 +73,11 @@
int row = getRowCount();
fireTableRowsInserted(row, row);
SimulationControl control = getSimulationControl(e.getId());
- control.addPropertyChangeListener(this);
+ if (control != null) {
+ control.addPropertyChangeListener(this);
+ } else {
+ log.warn("Simulation without controler: " + e.getId());
+ }
}
/* (non-Javadoc)
@@ -89,18 +96,4 @@
progress.remove(id);
}
- /* (non-Javadoc)
- * @see SimulationQueueListener#simulationStart(fr.ifremer.isisfish.simulator.SimulationQueueEvent)
- */
- public void simulationStart(SimulationQueueEvent e) {
- // nothing to do
- }
-
- /* (non-Javadoc)
- * @see SimulationQueueListener#simulationStop(fr.ifremer.isisfish.simulator.SimulationQueueEvent)
- */
- public void simulationStop(SimulationQueueEvent e) {
- // nothing to do
- }
-
} // SimulationQueueModel
\ No newline at end of file
Deleted: trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationQueueModelOld.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationQueueModelOld.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationQueueModelOld.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -1,409 +0,0 @@
-/* *##%
- * Copyright (C) 2006
- * Ifremer, Code Lutin, Cédric Pineau, Benjamin Poussin
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *##%*/
-
-/* *
- * SimulationQueueModel.java
- *
- * Created: 18 août 2006 00:05:41
- *
- * @author poussin
- * @version $Revision$
- *
- * Last update: $Date$
- * by : $Author$
- */
-
-package fr.ifremer.isisfish.simulator;
-
-import static org.codelutin.i18n.I18n._;
-
-import java.awt.Component;
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.swing.JComponent;
-import javax.swing.JProgressBar;
-import javax.swing.JTable;
-import javax.swing.event.EventListenerList;
-import javax.swing.event.TableModelEvent;
-import javax.swing.event.TableModelListener;
-import javax.swing.table.TableCellRenderer;
-import javax.swing.table.TableModel;
-
-import org.codelutin.log.LutinLog;
-import org.codelutin.log.LutinLogFactory;
-
-
-/**
- * @author poussin
- *
- */
-
-public class SimulationQueueModelOld extends JComponent implements TableModel, SimulationQueueListener, PropertyChangeListener {
-
- /** to use log facility, just put in your code: log.info("..."); */
- static private LutinLog log = LutinLogFactory.getLutinLog(SimulationQueueModel.class);
-
- /** List of listeners */
- protected EventListenerList listenerList = new EventListenerList();
-
- protected SimulationManager queue;
- protected String [] header = new String[]{_("isisfish.queue.id"),_("isisfish.queue.plan"),_("isisfish.queue.name"),_("isisfish.queue.local"),_("isisfish.queue.status"),_("isisfish.queue.progression")};
- protected Class [] columnClass = new Class[]{String.class, String.class, Boolean.class, Boolean.class, String.class, JProgressBar.class};
-
- protected Map<String, JProgressBar> progress = new HashMap<String, JProgressBar>();
-
- /**
- * use SimulationQueue.getInstance() as queue
- */
- public SimulationQueueModelOld() {
- this(SimulationManager.getInstance());
- }
-
- /**
- * if queue is null, then the model used SimulationQueue.getInstance() as queue
- */
- public SimulationQueueModelOld(SimulationManager queue) {
- this.queue = queue;
- if (queue == null) {
- this.queue = SimulationManager.getInstance();
- }
- this.queue.addSimulationQueueListener(this);
-
- // add this model as listener on all already launched simulation
- for (String id : this.queue.ids) {
- SimulationControl control = this.queue.getControl(id);
- if (control != null) {
- control.addPropertyChangeListener(this);
- }
- }
- }
-
- /**
- * @param queue The queue to set.
- */
- public void setQueue(SimulationManager queue) {
- this.queue = queue;
- fireTableDataChanged();
- }
-
- /* (non-Javadoc)
- * @see javax.swing.table.TableModel#getRowCount()
- */
- public int getRowCount() {
- int result = queue.ids.size();
- return result;
- }
-
- /* (non-Javadoc)
- * @see javax.swing.table.TableModel#getColumnCount()
- */
- public int getColumnCount() {
- return header.length;
- }
-
- /* (non-Javadoc)
- * @see javax.swing.table.AbstractTableModel#getColumnName(int)
- */
- public String getColumnName(int column) {
- return header[column];
- }
-
- /* (non-Javadoc)
- * @see javax.swing.table.AbstractTableModel#getColumnClass(int)
- */
- public Class<?> getColumnClass(int columnIndex) {
- return columnClass[columnIndex];
- }
-
- public SimulationControl getSimulationControl(int rowIndex) {
- SimulationControl result = null;
- if (rowIndex >= 0) {
- String id = queue.ids.get(rowIndex);
- result = queue.getControl(id);
- } else {
- log.user(_("isisfish.error.invalide.simulation.index"));
- }
- return result;
- }
-
- /* (non-Javadoc)
- * @see javax.swing.table.TableModel#getValueAt(int, int)
- */
- public Object getValueAt(int rowIndex, int columnIndex) {
- Object result = "";
- if (rowIndex >= queue.ids.size()) {
- return "error";
- }
- String id = queue.ids.get(rowIndex);
- SimulationControl control = queue.getControl(id);
- switch (columnIndex) {
- case 0:
- result = id;
- break;
- case 1:
- int number = queue.getParameter(id).getAnalysePlanNumber();
- if (number >= 0) {
- result = number;
- } else {
- result = _("isisfish.common.no");
- }
- break;
- case 2:
- result = queue.getParameter(id).getInQueue();
- break;
- case 3:
- result = queue.getParameter(id).getLocal();
- break;
- case 4:
- if (control != null) {
- if (control.isStopSimulationRequest()) {
- result = _("isisfish.launch.stop");
- } else {
- result = control.getText();
- }
- }
- break;
- case 5:
- JProgressBar pb = getProgressBar(id);
- if (control != null) {
- pb.setMaximum(control.getProgressMax());
- pb.setValue(control.getProgress());
- pb.setString(control.date.getMonth() + "/" + control.date.getYear());
- }
- result = pb;
- break;
- }
- return result;
- }
-
- protected JProgressBar getProgressBar(String id) {
- JProgressBar result = progress.get(id);
- if (result == null) {
- result = new JProgressBar(JProgressBar.HORIZONTAL, 0, 100);
- result.setStringPainted(true);
- progress.put(id, result);
- }
- return result;
- }
-
- /* (non-Javadoc)
- * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent evt) {
- SimulationControl control = (SimulationControl)evt.getSource();
- int row = queue.ids.indexOf(control.getId());
- fireTableRowsUpdated(row, row);
- }
-
- /* (non-Javadoc)
- * @see fr.ifremer.isisfish.simulator.SimulationQueueListener#simulationAdded(fr.ifremer.isisfish.simulator.SimulationQueueEvent)
- */
- public void simulationAdded(SimulationQueueEvent e) {
- int row = getRowCount();
- fireTableRowsInserted(row, row);
- SimulationControl control = queue.getControl(e.getId());
- control.addPropertyChangeListener(this);
- }
-
- /* (non-Javadoc)
- * @see fr.ifremer.isisfish.simulator.SimulationQueueListener#simulationRemoved(fr.ifremer.isisfish.simulator.SimulationQueueEvent)
- */
- public void simulationWillBeRemoved(SimulationQueueEvent e) {
- String id = e.getId();
-
- SimulationControl control = queue.getControl(id);
- if (control != null) {
- control.removePropertyChangeListener(this);
- }
-
- int row = queue.ids.indexOf(id);
- fireTableRowsDeleted(row, row);
- progress.remove(id);
- }
-
- /* (non-Javadoc)
- * @see fr.ifremer.isisfish.simulator.SimulationQueueListener#simulationStart(fr.ifremer.isisfish.simulator.SimulationQueueEvent)
- */
- public void simulationStart(SimulationQueueEvent e) {
- // nothing to do
- }
- /* (non-Javadoc)
- * @see fr.ifremer.isisfish.simulator.SimulationQueueListener#simulationStop(fr.ifremer.isisfish.simulator.SimulationQueueEvent)
- */
- public void simulationStop(SimulationQueueEvent e) {
- // nothing to do
- }
-
- /* (non-Javadoc)
- * @see javax.swing.table.TableModel#isCellEditable(int, int)
- */
- public boolean isCellEditable(int rowIndex, int columnIndex) {
- return false;
- }
-
- /* (non-Javadoc)
- * @see javax.swing.table.TableModel#setValueAt(java.lang.Object, int, int)
- */
- public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
- }
-
- /* (non-Javadoc)
- * @see javax.swing.table.TableModel#addTableModelListener(javax.swing.event.TableModelListener)
- */
- public void addTableModelListener(TableModelListener l) {
- listenerList.add(TableModelListener.class, l);
- if (l instanceof JTable) {
- ((JTable)l).setDefaultRenderer(JProgressBar.class, new JProgressBarTableCellRenderer());
- }
-
- }
-
- /* (non-Javadoc)
- * @see javax.swing.table.TableModel#removeTableModelListener(javax.swing.event.TableModelListener)
- */
- public void removeTableModelListener(TableModelListener l) {
- listenerList.remove(TableModelListener.class, l);
- }
-
- /**
- * Notifies all listeners that all cell values in the table's
- * rows may have changed. The number of rows may also have changed
- * and the <code>JTable</code> should redraw the
- * table from scratch. The structure of the table (as in the order of the
- * columns) is assumed to be the same.
- *
- * @see TableModelEvent
- * @see EventListenerList
- * @see JTable#tableChanged(TableModelEvent)
- */
- public void fireTableDataChanged() {
- fireTableChanged(new TableModelEvent(this));
- }
-
- /**
- * Notifies all listeners that the table's structure has changed.
- * The number of columns in the table, and the names and types of
- * the new columns may be different from the previous state.
- * If the <code>JTable</code> receives this event and its
- * <code>autoCreateColumnsFromModel</code>
- * flag is set it discards any table columns that it had and reallocates
- * default columns in the order they appear in the model. This is the
- * same as calling <code>setModel(TableModel)</code> on the
- * <code>JTable</code>.
- *
- * @see TableModelEvent
- * @see EventListenerList
- */
- public void fireTableStructureChanged() {
- fireTableChanged(new TableModelEvent(this, TableModelEvent.HEADER_ROW));
- }
-
- /**
- * Notifies all listeners that rows in the range
- * <code>[firstRow, lastRow]</code>, inclusive, have been inserted.
- *
- * @param firstRow the first row
- * @param lastRow the last row
- *
- * @see TableModelEvent
- * @see EventListenerList
- *
- */
- public void fireTableRowsInserted(int firstRow, int lastRow) {
- fireTableChanged(new TableModelEvent(this, firstRow, lastRow,
- TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT));
- }
-
- /**
- * Notifies all listeners that rows in the range
- * <code>[firstRow, lastRow]</code>, inclusive, have been updated.
- *
- * @param firstRow the first row
- * @param lastRow the last row
- *
- * @see TableModelEvent
- * @see EventListenerList
- */
- public void fireTableRowsUpdated(int firstRow, int lastRow) {
- fireTableChanged(new TableModelEvent(this, firstRow, lastRow,
- TableModelEvent.ALL_COLUMNS, TableModelEvent.UPDATE));
- }
-
- /**
- * Notifies all listeners that rows in the range
- * <code>[firstRow, lastRow]</code>, inclusive, have been deleted.
- *
- * @param firstRow the first row
- * @param lastRow the last row
- *
- * @see TableModelEvent
- * @see EventListenerList
- */
- public void fireTableRowsDeleted(int firstRow, int lastRow) {
- fireTableChanged(new TableModelEvent(this, firstRow, lastRow,
- TableModelEvent.ALL_COLUMNS, TableModelEvent.DELETE));
- }
-
- /**
- * Notifies all listeners that the value of the cell at
- * <code>[row, column]</code> has been updated.
- *
- * @param row row of cell which has been updated
- * @param column column of cell which has been updated
- * @see TableModelEvent
- * @see EventListenerList
- */
- public void fireTableCellUpdated(int row, int column) {
- fireTableChanged(new TableModelEvent(this, row, row, column));
- }
-
- /**
- * Forwards the given notification event to all
- * <code>TableModelListeners</code> that registered
- * themselves as listeners for this table model.
- *
- * @param e the event to be forwarded
- *
- * @see #addTableModelListener
- * @see TableModelEvent
- * @see EventListenerList
- */
- public void fireTableChanged(TableModelEvent e) {
- // Guaranteed to return a non-null array
- Object[] listeners = listenerList.getListenerList();
- // Process the listeners last to first, notifying
- // those that are interested in this event
- for (int i = listeners.length-2; i>=0; i-=2) {
- if (listeners[i]==TableModelListener.class) {
- ((TableModelListener)listeners[i+1]).tableChanged(e);
- }
- }
- }
-
-
- public class JProgressBarTableCellRenderer implements TableCellRenderer {
- public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
- return (JProgressBar)value;
- }
- }// JProgressBarTableCellRenderer
-
-}
\ No newline at end of file
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationResultXML.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationResultXML.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationResultXML.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -41,7 +41,7 @@
import org.apache.commons.logging.LogFactory;
import org.codelutin.math.matrix.MatrixIterator;
import org.codelutin.math.matrix.MatrixND;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import fr.ifremer.isisfish.IsisConfig;
import fr.ifremer.isisfish.IsisFishException;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulatorServer.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulatorServer.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulatorServer.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -30,7 +30,7 @@
package fr.ifremer.isisfish.simulator;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import java.io.File;
import java.util.Hashtable;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/types/Date.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/types/Date.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/types/Date.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,7 +31,7 @@
package fr.ifremer.isisfish.types;
import java.io.Serializable;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
/**
* This object can't be modified. If this beaviour is modified pay attention
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/types/Month.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/types/Month.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/types/Month.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -22,7 +22,7 @@
package fr.ifremer.isisfish.types;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import java.io.Serializable;
import java.util.ArrayList;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/types/TimeUnit.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/types/TimeUnit.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/types/TimeUnit.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,7 +31,7 @@
package fr.ifremer.isisfish.types;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import java.io.Serializable;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/ScriptActionHelper.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/ScriptActionHelper.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/ScriptActionHelper.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -20,16 +20,16 @@
package fr.ifremer.isisfish.ui;
import fr.ifremer.isisfish.ui.script.Action;
-import fr.ifremer.isisfish.ui.script.ExportDialog;
-import fr.ifremer.isisfish.ui.script.ImportDialog;
-import fr.ifremer.isisfish.ui.script.action.CancelAction;
-import fr.ifremer.isisfish.ui.script.action.ExportAction;
-import fr.ifremer.isisfish.ui.script.action.ImportAction;
+//import fr.ifremer.isisfish.ui.script.ExportDialog;
+//import fr.ifremer.isisfish.ui.script.ImportDialog;
+//import fr.ifremer.isisfish.ui.script.action.CancelAction;
+//import fr.ifremer.isisfish.ui.script.action.ExportAction;
+//import fr.ifremer.isisfish.ui.script.action.ImportAction;
import fr.ifremer.isisfish.IsisFish;
-import org.codelutin.vcs.ui.FieldModelUtil;
+//import org.codelutin.vcs.ui.FieldModelUtil;
import org.apache.commons.logging.Log;
-import static org.apache.commons.logging.LogFactory.getLog;
-import static org.codelutin.i18n.I18n._;
+import org.apache.commons.logging.LogFactory;
+import static org.codelutin.i18n.I18nf._;
import org.codelutin.util.FileUtil;
import org.codelutin.util.ZipUtil;
import org.swixat.framework.AbstractFrame;
@@ -47,116 +47,125 @@
* @author tony
*/
public class ScriptActionHelper {
- static private Log log = getLog(ScriptActionHelper.class);
+ static private Log log = LogFactory.getLog(ScriptActionHelper.class);
public static boolean importScript(File file, boolean force, boolean useUI, AbstractFrame frame) throws IOException {
- if (file == null && useUI) {
- // ask user form a .zscript file
- file = FileUtil.getFile(".*.zip$", _("isisfish.message.import.scripts.zipped"));
- }
- if (file == null || !file.exists()) {
- //TODO log
- return false;
- }
- String message = _("isisfish.message.import.scripts.file", file);
- logMessage(useUI, frame, message);
-
- File root = IsisFish.config.getDatabaseDirectory();
-
- // get two list of relative path (one for new files,one for exisiting files)
- List<String>[] explode = ZipUtil.scanAndExplodeZip(file, root, Action.getSCRIPT_FILE_FILTER());
-
- // build model for dialog (list of new items), (list of exisiting items)
- boolean noNew = explode[0].size() == 0;
- boolean noConflict = explode[1].size() == 0;
- FieldModelUtil.ModuleFile<String> modelNewItems = null;
- FieldModelUtil.ModuleFile<String> modelItems = null;
- ImportAction okAction;
- ImportDialog dialog = null;
- CancelAction cancelAction = null;
-
- if (!noNew) {
- modelNewItems = FieldModelUtil.createModuleFileTableModelWithSelect(explode[0]);
- modelNewItems.checkAll();
- }
- if (!noConflict) {
- modelItems = FieldModelUtil.createModuleFileTableModelWithSelect(explode[1]);
- // check if you can overwritte existing files
- if (!useUI && !force) {
- // this is an error, quit
- throw new IllegalArgumentException(_("isisfish.error.import.scripts.force"));
- }
- modelItems.checkAll();
- }
-
- if (useUI) {
- // create import dialog
- dialog = new ImportDialog();
- // create cancel action
- cancelAction = new CancelAction(dialog);
- }
- // create import action
- okAction = new ImportAction(dialog, file, root, modelNewItems, modelItems);
-
- if (useUI) {
- // prepare dialog and launch
- dialog.prepareDialog(20, modelNewItems, modelItems, file, okAction, cancelAction, true);
- } else {
- okAction.actionPerformed(null);
- }
- // after action
- return cancelAction == null || !cancelAction.isUsed();
+ // FIXME a reimplanter
+ throw new UnsupportedOperationException("En reparation");
+
+// if (file == null && useUI) {
+// // ask user form a .zscript file
+// file = FileUtil.getFile(".*.zip$", _("isisfish.message.import.scripts.zipped"));
+// }
+// if (file == null || !file.exists()) {
+// //TODO log
+// return false;
+// }
+// String message = _("isisfish.message.import.scripts.file", file);
+// logMessage(useUI, frame, message);
+//
+// File root = IsisFish.config.getDatabaseDirectory();
+//
+// // get two list of relative path (one for new files,one for exisiting files)
+// List<String>[] explode = ZipUtil.scanAndExplodeZip(
+// file, root, Action.getSCRIPT_FILE_FILTER());
+//
+// // build model for dialog (list of new items), (list of exisiting items)
+// boolean noNew = explode[0].size() == 0;
+// boolean noConflict = explode[1].size() == 0;
+// FieldModelUtil.ModuleFile<String> modelNewItems = null;
+// FieldModelUtil.ModuleFile<String> modelItems = null;
+// ImportAction okAction;
+// ImportDialog dialog = null;
+// CancelAction cancelAction = null;
+//
+// if (!noNew) {
+// modelNewItems = FieldModelUtil.createModuleFileTableModelWithSelect(
+// explode[0]);
+// modelNewItems.checkAll();
+// }
+// if (!noConflict) {
+// modelItems = FieldModelUtil.createModuleFileTableModelWithSelect(
+// explode[1]);
+// // check if you can overwritte existing files
+// if (!useUI && !force) {
+// // this is an error, quit
+// throw new IllegalArgumentException(_("isisfish.error.import.scripts.force"));
+// }
+// modelItems.checkAll();
+// }
+//
+// if (useUI) {
+// // create import dialog
+// dialog = new ImportDialog();
+// // create cancel action
+// cancelAction = new CancelAction(dialog);
+// }
+// // create import action
+// okAction = new ImportAction(dialog, file, root, modelNewItems, modelItems);
+//
+// if (useUI) {
+// // prepare dialog and launch
+// dialog.prepareDialog(20, modelNewItems, modelItems, file, okAction, cancelAction, true);
+// } else {
+// okAction.actionPerformed(null);
+// }
+// // after action
+// return cancelAction == null || !cancelAction.isUsed();
}
public static boolean exportScript(File dst, List<String> listFiles, boolean force, boolean useUI, AbstractFrame frame) throws IOException {
- if (dst == null && useUI) {
- // ask user form a .zscript file
- String f = FileUtil.getDirectory();
- String pattern = Action.dateFormat.format(new Date());
- dst = f == null ? null : new File(dst, "exportScript-" + pattern + ".zip");
- }
- if (dst == null) {
- //TODO log
- return false;
- }
- if (dst.exists()) {
- if (!useUI && !force) {
- // this is an error, quit
- throw new IllegalArgumentException(_("isisfish.error.export.scripts.force"));
- }
- }
- File root = IsisFish.config.getDatabaseDirectory();
+ // FIXME a reimplanter
+ throw new UnsupportedOperationException("En reparation");
- String message = _("isisfish.message.export.scripts.file", dst);
- logMessage(useUI, frame, message);
-
- // create model
- FieldModelUtil.ModuleFile<String> model = FieldModelUtil.createModuleFileTableModelWithSelect(listFiles);
- model.checkAll();
- ExportDialog dialog = null;
- CancelAction cancelAction = null;
- ExportAction okAction;
- JTextField field;
-
- if (useUI) {
- dialog = new ExportDialog();
- cancelAction = new CancelAction(dialog);
- field = dialog.getArchivePath();
- } else {
- field = new JTextField(dst.getAbsolutePath());
- }
-
- okAction = new ExportAction(dialog, field, root, model);
-
- if (useUI) {
- // launch export dialog
- dialog.prepareDialog(10, model, dst.getAbsolutePath(), okAction, cancelAction, true);
- } else {
- // perform export
- okAction.actionPerformed(null);
- }
- // after action
- return cancelAction == null || !cancelAction.isUsed();
+// if (dst == null && useUI) {
+// // ask user form a .zscript file
+// String f = FileUtil.getDirectory();
+// String pattern = Action.dateFormat.format(new Date());
+// dst = f == null ? null : new File(dst, "exportScript-" + pattern + ".zip");
+// }
+// if (dst == null) {
+// //TODO log
+// return false;
+// }
+// if (dst.exists()) {
+// if (!useUI && !force) {
+// // this is an error, quit
+// throw new IllegalArgumentException(_("isisfish.error.export.scripts.force"));
+// }
+// }
+// File root = IsisFish.config.getDatabaseDirectory();
+//
+// String message = _("isisfish.message.export.scripts.file", dst);
+// logMessage(useUI, frame, message);
+//
+// // create model
+// FieldModelUtil.ModuleFile<String> model = FieldModelUtil.createModuleFileTableModelWithSelect(listFiles);
+// model.checkAll();
+// ExportDialog dialog = null;
+// CancelAction cancelAction = null;
+// ExportAction okAction;
+// JTextField field;
+//
+// if (useUI) {
+// dialog = new ExportDialog();
+// cancelAction = new CancelAction(dialog);
+// field = dialog.getArchivePath();
+// } else {
+// field = new JTextField(dst.getAbsolutePath());
+// }
+//
+// okAction = new ExportAction(dialog, field, root, model);
+//
+// if (useUI) {
+// // launch export dialog
+// dialog.prepareDialog(10, model, dst.getAbsolutePath(), okAction, cancelAction, true);
+// } else {
+// // perform export
+// okAction.actionPerformed(null);
+// }
+// // after action
+// return cancelAction == null || !cancelAction.isUsed();
}
private static void logMessage(boolean useUI, AbstractFrame frame, String message) {
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/Welcome.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/Welcome.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/Welcome.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -34,35 +34,33 @@
import fr.ifremer.isisfish.ui.input.Input;
import fr.ifremer.isisfish.ui.result.ResultView;
import fr.ifremer.isisfish.vcs.VCSException;
-import org.codelutin.vcs.VCSAction;
-import org.codelutin.vcs.VCSRepositoryState;
-import org.codelutin.vcs.VCSFileState;
-import org.codelutin.vcs.VCSHelper;
-import fr.ifremer.isisfish.versionning.ui.VCSUIHelper;
-import fr.ifremer.isisfish.versionning.IsisRepositoryState;
-import fr.ifremer.isisfish.IsisConfig;
+//import org.codelutin.vcs.VCSAction;
+//import org.codelutin.vcs.VCSRepositoryState;
+//import org.codelutin.vcs.VCSFileState;
+//import org.codelutin.vcs.VCSHelper;
+//import fr.ifremer.isisfish.versionning.ui.VCSUIHelper;
+//import fr.ifremer.isisfish.versionning.IsisRepositoryState;
import fr.ifremer.isisfish.IsisFish;
+import fr.ifremer.isisfish.actions.VCSAction;
import fr.ifremer.isisfish.datastore.AnalysePlanStorage;
import fr.ifremer.isisfish.datastore.ExportStorage;
import fr.ifremer.isisfish.datastore.FormuleStorage;
import fr.ifremer.isisfish.datastore.RuleStorage;
import fr.ifremer.isisfish.datastore.ScriptStorage;
import fr.ifremer.isisfish.datastore.SimulatorStorage;
-import fr.ifremer.isisfish.vcs.VCSNone;
+import fr.ifremer.isisfish.vcs.VCS;
import org.swixat.framework.AbstractFrame;
import org.swixat.framework.OutputView;
import org.swixat.model.GenericContext;
-import static org.codelutin.i18n.I18n._;
-import org.codelutin.i18n.I18n;
+import static org.codelutin.i18n.I18nf._;
import org.codelutin.topia.TopiaContext;
-import org.codelutin.option.ui.ConfigUI;
+//import org.codelutin.option.ui.ConfigUI;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import javax.swing.JLabel;
import static javax.swing.JOptionPane.showMessageDialog;
import java.util.List;
import java.util.EnumSet;
@@ -74,8 +72,8 @@
/** to use log facility, just put in your code: log.info(\"...\"); */
static private Log log = LogFactory.getLog(Welcome.class);
- static protected VCSNone getVCS() {
- return IsisFish.config.getVCS();
+ static protected VCS getVCS() {
+ return IsisFish.vcs;
}
/**
@@ -99,7 +97,7 @@
}
/**
- * Permet d'ouvrir une nouvelle fenetre de rendu des resultats
+ * Permet d'ouvrir une nouvelle fenetre de saisie
*
* @return null ou un fenetre d'erreur
*/
@@ -132,69 +130,68 @@
public static void updateVCS(AbstractFrame frame)
throws VCSException {
- try {
+ // FIXME a reimplanter
+ throw new UnsupportedOperationException("En reparation");
- boolean hasFrame = frame != null;
-
- if (!getVCS().isConnected()) {
- String errorMsg = I18n._("isisfish.error.not.connected");
- if (hasFrame) {
- frame.viewOutput(new OutputView("Error.xml", "error", errorMsg));
- } else {
- log.error(errorMsg);
- }
- return;
- }
- if (hasFrame) {
- frame.setInfoText(_("isisfish.message.search.data"));
- }
-
- EnumSet<VCSAction> actions = VCSHelper.getAuthorizedActions();
-
- // init repo synchrinization
- VCSRepositoryState repoState = new IsisRepositoryState(IsisFish.config.getDatabaseDirectory(),actions,
- AnalysePlanStorage.getAnalysePlanDirectory(),
- ExportStorage.getExportDirectory(),
- FormuleStorage.getFormuleDirectory(),
- RuleStorage.getRuleDirectory(),
- ScriptStorage.getScriptDirectory(),
- SimulatorStorage.getSimulatorDirectory());
-
- // create ui models
- repoState.createUIModels();
-
- // obtain from user files to treate from repo state
- List<VCSFileState> filesToTreate = VCSUIHelper.showUpdateDialog(repoState);
-
- if (filesToTreate == null || filesToTreate.isEmpty()) {
- // nothing more to do here
- if (hasFrame) {
- frame.setInfoText("");
- }
- return;
- }
- // ask user to confirm unsafe operations, then process vcs actions
- boolean notCancel = VCSUIHelper.showConfirmUpdateDialog(repoState.getRoot(), filesToTreate);
-
- if (notCancel && hasFrame) {
- frame.setInfoText("");
- return;
- }
-
- if (hasFrame)
- frame.setInfoText(_("isisfish.message.synchronize.done"));
- else
- showMessageDialog(null, new JLabel(_("isisfish.message.synchronize.done")));
-
- } catch (Exception eee) {
- log.error(_("isisfish.error.update.repository"), eee);
- if (frame != null) {
- frame.viewOutput(new OutputView("Error.xml", "error", eee.getMessage()));
- }
- }
+// try {
+//
+// boolean hasFrame = frame != null;
+//
+// if (!getVCS().isConnected()) {
+// log.error(I18nf._("isisfish.error.not.connected"));
+// return;
+// }
+// if (hasFrame) {
+// frame.setInfoText(_("isisfish.message.search.data"));
+// }
+//
+// EnumSet<VCSAction> actions = VCSHelper.getAuthorizedActions();
+//
+// // init repo synchronization
+// VCSRepositoryState repoState = new IsisRepositoryState(
+// IsisFish.config.getDatabaseDirectory(),
+// actions,
+// AnalysePlanStorage.getAnalysePlanDirectory(),
+// ExportStorage.getExportDirectory(),
+// FormuleStorage.getFormuleDirectory(),
+// RuleStorage.getRuleDirectory(),
+// ScriptStorage.getScriptDirectory(),
+// SimulatorStorage.getSimulatorDirectory());
+//
+// // create ui models
+// repoState.createUIModels();
+//
+// // obtain from user files to treate from repo state
+// List<VCSFileState> filesToTreate = VCSUIHelper.showUpdateDialog(repoState);
+//
+// if (filesToTreate == null || filesToTreate.isEmpty()) {
+// // nothing more to do here
+// if (hasFrame) {
+// frame.setInfoText("");
+// }
+// return;
+// }
+// // ask user to confirm unsafe operations, then process vcs actions
+// boolean notCancel = VCSUIHelper.showConfirmUpdateDialog(repoState.getRoot(), filesToTreate);
+//
+// if (notCancel && hasFrame) {
+// frame.setInfoText("");
+// return;
+// }
+//
+// if (hasFrame) {
+// frame.setInfoText(_("isisfish.message.synchronize.done"));
+// }
+//
+// } catch (Exception eee) {
+// log.error(_("isisfish.error.update.repository"), eee);
+// if (frame != null) {
+// frame.viewOutput(new OutputView("Error.xml", "error", eee.getMessage()));
+// }
+// }
}
- static ConfigUI ui;
+// static ConfigUI ui;
static public Object showConfig() {
try {
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/input/Input.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/input/Input.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/input/Input.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -51,7 +51,7 @@
import org.swixat.framework.OutputView;
import org.swixat.model.Context;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import org.codelutin.topia.TopiaContext;
import org.codelutin.topia.TopiaException;
import org.codelutin.topia.event.TopiaEntityEvent;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/input/InputEffortDescription.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/input/InputEffortDescription.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/input/InputEffortDescription.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -30,7 +30,7 @@
*/
package fr.ifremer.isisfish.ui.input;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import javax.swing.JTree;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/input/InputFisheryRegion.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/input/InputFisheryRegion.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/input/InputFisheryRegion.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,7 +31,7 @@
package fr.ifremer.isisfish.ui.input;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import java.awt.geom.Point2D;
import java.io.File;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/input/InputPopulation.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/input/InputPopulation.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/input/InputPopulation.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -30,7 +30,7 @@
*/
package fr.ifremer.isisfish.ui.input;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import java.util.ArrayList;
import java.util.List;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/input/check/CheckRegion.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/input/check/CheckRegion.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/input/check/CheckRegion.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -32,7 +32,7 @@
package fr.ifremer.isisfish.ui.input.check;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import java.util.Collection;
import java.util.Collections;
@@ -40,7 +40,6 @@
import java.util.List;
import java.util.Set;
-import org.codelutin.i18n.I18n;
import org.codelutin.math.matrix.MatrixIterator;
import org.codelutin.math.matrix.MatrixND;
@@ -90,7 +89,7 @@
static public void check(Equation eq, CheckResult result) {
if (0 != EvaluatorHelper.check(eq.getJavaInterface(), eq.getContent(), null)) {
- result.addError(eq, I18n._("isisfish.error.invalid.equation"));
+ result.addError(eq, _("isisfish.error.invalid.equation"));
}
}
@@ -101,53 +100,53 @@
static public void check(PopulationGroup classPop, CheckResult result){
// error
if(classPop.getMeanWeight() < 0){
- result.addError(classPop, I18n._("isisfish.error.invalid.mean.weight"));
+ result.addError(classPop, _("isisfish.error.invalid.mean.weight"));
}
// if(classPop.getMortaliteNaturelle() < 0){
- // result.addError(classPop, I18n._("isisfish.error.invalidate.natural.death"));
+ // result.addError(classPop, _("isisfish.error.invalidate.natural.death"));
// }
// warning
if(classPop.getMeanWeight() == 0){
- result.addWarning(classPop, I18n._("isisfish.error.not.null.mean.weight"));
+ result.addWarning(classPop, _("isisfish.error.not.null.mean.weight"));
}
// if(classPop.getMortaliteNaturelle() == 0){
- // result.addWarning(classPop, I18n._("isisfish.error.not.null.natiral.death"));
+ // result.addWarning(classPop, _("isisfish.error.not.null.natiral.death"));
// }
}
static public void check(Gear engin, CheckResult result){
if("".equals(engin.getName())){
- result.addWarning(engin, I18n._("isisfish.error.empty.name"));
+ result.addWarning(engin, _("isisfish.error.empty.name"));
}
if("".equals(engin.getEffortUnit())){
- result.addWarning(engin, I18n._("isisfish.error.empty.unit"));
+ result.addWarning(engin, _("isisfish.error.empty.unit"));
}
Collection<Selectivity> selectivites = engin.getPopulationSelectivity();
if(selectivites.size() == 0){
- result.addWarning(engin, I18n._("isisfish.error.empty.selectivity"));
+ result.addWarning(engin, _("isisfish.error.empty.selectivity"));
}else{
for(Selectivity selectivity : selectivites){
check(selectivity, result);
}
}
if(engin.getPossibleValue() == null){
- result.addWarning(engin, I18n._("isisfish.error.invalid.range"));
+ result.addWarning(engin, _("isisfish.error.invalid.range"));
}
if("".equals(engin.getParameterName())){
- result.addInfo(engin, I18n._("isisfish.error.empty.params.name"));
+ result.addInfo(engin, _("isisfish.error.empty.params.name"));
}
}
static public void check(MetierSeasonInfo infoSaisonMetier, CheckResult result){
if(infoSaisonMetier.getZone() == null || infoSaisonMetier.getZone().size() == 0){
- result.addWarning(infoSaisonMetier, I18n._("isisfish.error.no.sector"));
+ result.addWarning(infoSaisonMetier, _("isisfish.error.no.sector"));
}
Collection<TargetSpecies> especeCaptus = infoSaisonMetier.getSpeciesTargetSpecies();
if(especeCaptus.size() == 0){
- result.addInfo(infoSaisonMetier, I18n._("isisfish.error.empty.species"));
+ result.addInfo(infoSaisonMetier, _("isisfish.error.empty.species"));
}else{
for(TargetSpecies i : especeCaptus){
check(i, result);
@@ -196,136 +195,136 @@
check(infoSaisonPop.getImmigrationEquation(), result);
} else {
if (isEmptyMatrix(infoSaisonPop.getMigrationMatrix())) {
- result.addInfo(infoSaisonPop, I18n._("isisfish.error.empty.migration"));
+ result.addInfo(infoSaisonPop, _("isisfish.error.empty.migration"));
} else if(isNullMatrix(infoSaisonPop.getMigrationMatrix())) {
- result.addInfo(infoSaisonPop, I18n._("isisfish.error.emty.migration"));
+ result.addInfo(infoSaisonPop, _("isisfish.error.emty.migration"));
} else if(isNegativeMatrix(infoSaisonPop.getMigrationMatrix())) {
- result.addError(infoSaisonPop, I18n._("isisfish.error.migration.negative"));
+ result.addError(infoSaisonPop, _("isisfish.error.migration.negative"));
}
if (isEmptyMatrix(infoSaisonPop.getEmigrationMatrix())) {
- result.addInfo(infoSaisonPop, I18n._("isisfish.error.emty.emigration"));
+ result.addInfo(infoSaisonPop, _("isisfish.error.emty.emigration"));
} else if(isNullMatrix(infoSaisonPop.getEmigrationMatrix())) {
- result.addInfo(infoSaisonPop, I18n._("isisfish.error.empty.emigration"));
+ result.addInfo(infoSaisonPop, _("isisfish.error.empty.emigration"));
} else if(isNegativeMatrix(infoSaisonPop.getEmigrationMatrix())) {
- result.addError(infoSaisonPop, I18n._("isisfish.error.emigration.negative"));
+ result.addError(infoSaisonPop, _("isisfish.error.emigration.negative"));
}
if (isEmptyMatrix(infoSaisonPop.getImmigrationMatrix())) {
- result.addInfo(infoSaisonPop, I18n._("isisfish.error.empty.immigration"));
+ result.addInfo(infoSaisonPop, _("isisfish.error.empty.immigration"));
} else if(isNullMatrix(infoSaisonPop.getImmigrationMatrix())) {
- result.addInfo(infoSaisonPop, I18n._("isisfish.error.empty.immigration"));
+ result.addInfo(infoSaisonPop, _("isisfish.error.empty.immigration"));
} else if(isNegativeMatrix(infoSaisonPop.getImmigrationMatrix())) {
- result.addError(infoSaisonPop, I18n._("isisfish.error.immigration.negative"));
+ result.addError(infoSaisonPop, _("isisfish.error.immigration.negative"));
}
}
}
static public void check(Cell maille, CheckResult result){
if("".equals(maille.getName())){
- result.addWarning(maille, I18n._("isisfish.error.empty.name"));
+ result.addWarning(maille, _("isisfish.error.empty.name"));
}
}
static public void check(Species metaPop, CheckResult result){
Collection<Population> pops = metaPop.getPopulation();
if(pops.size() == 0){
- result.addWarning(metaPop, I18n._("isisfish.error.empty.population"));
+ result.addWarning(metaPop, _("isisfish.error.empty.population"));
}else{
for(Population pop : pops){
check(pop, result);
}
}
if("".equals(metaPop.getName())){
- result.addInfo(metaPop, I18n._("isisfish.error.empty.species.name"));
+ result.addInfo(metaPop, _("isisfish.error.empty.species.name"));
}
if("".equals(metaPop.getScientificName())){
- result.addInfo(metaPop, I18n._("isisfish.error.empty.scientific.name"));
+ result.addInfo(metaPop, _("isisfish.error.empty.scientific.name"));
}
if("".equals(metaPop.getCodeRubbin())){
- result.addInfo(metaPop, I18n._("isisfish.error.empty.code.rubbin"));
+ result.addInfo(metaPop, _("isisfish.error.empty.code.rubbin"));
}
}
static public void check(Metier metier, CheckResult result){
if("".equals(metier.getName())){
- result.addWarning(metier, I18n._("isisfish.error.empty.name"));
+ result.addWarning(metier, _("isisfish.error.empty.name"));
}
List<MetierSeasonInfo> infoSaisons = metier.getMetierSeasonInfo();
if(infoSaisons.size() == 0){
- result.addWarning(metier, I18n._("isisfish.error.empty.season"));
+ result.addWarning(metier, _("isisfish.error.empty.season"));
}else{
Set<Month> months = new HashSet<Month>();
for(MetierSeasonInfo info : infoSaisons){
if (!Collections.disjoint(months, info.getMonths())) {
- result.addError(info, I18n._("isisfish.error.overlap.season"));
+ result.addError(info, _("isisfish.error.overlap.season"));
}
months.addAll(info.getMonths());
check(info, result);
}
}
if(metier.getGear() == null){
- result.addError(metier, I18n._("isisfish.error.undefined.gear"));
+ result.addError(metier, _("isisfish.error.undefined.gear"));
}else{
check(metier.getGear(), result);
}
if (!metier.getGear().getPossibleValue().contains(metier.getGearParameterValue())) {
- result.addWarning(metier, I18n._("isisfish.error.invalid.values.params"));
+ result.addWarning(metier, _("isisfish.error.invalid.values.params"));
}
}
static public void check(Population pop, CheckResult result){
if("".equals(pop.getName())){
- result.addWarning(pop, I18n._("isisfish.error.empty.name"));
+ result.addWarning(pop, _("isisfish.error.empty.name"));
}
if("".equals(pop.getGeographicId())){
- result.addInfo(pop, I18n._("isisfish.error.empty.id.geographic"));
+ result.addInfo(pop, _("isisfish.error.empty.id.geographic"));
}
if(pop.getMaturityGroup() == null){
- result.addInfo(pop, I18n._("isisfish.error.not.null.class.grown"));
+ result.addInfo(pop, _("isisfish.error.not.null.class.grown"));
}
check(pop.getGrowth(), result);
check(pop.getGrowthReverse(), result);
List<PopulationGroup> classes = pop.getPopulationGroup();
if(classes.size() == 0){
- result.addWarning(pop, I18n._("isisfish.error.undefined.classes"));
+ result.addWarning(pop, _("isisfish.error.undefined.classes"));
}else{
for(PopulationGroup group : classes){
check(group, result);
}
}
// if(pop.getMortNatClasseNaissance() == 0){
- // result.addInfo(pop, I18n._("isisfish.error.undefined.natural.death"));
+ // result.addInfo(pop, _("isisfish.error.undefined.natural.death"));
// }
// if(pop.getMortNatClasseNaissance() < 0){
- // result.addWarning(pop, I18n._("isisfish.error.invalid.natural.death"));
+ // result.addWarning(pop, _("isisfish.error.invalid.natural.death"));
// }
if(pop.getMonthGapBetweenReproRecrutement() < 0){
- result.addWarning(pop, I18n._("isisfish.error.invalid.interval.reproduction.recruitment"));
+ result.addWarning(pop, _("isisfish.error.invalid.interval.reproduction.recruitment"));
}
if (isNullMatrix(pop.getMappingZoneReproZoneRecru())) {
- result.addWarning(pop, I18n._("isisfish.error.undefined.correspondence.zones.reproduction.recruitment"));
+ result.addWarning(pop, _("isisfish.error.undefined.correspondence.zones.reproduction.recruitment"));
}
if(pop.getPopulationZone() == null || pop.getPopulationZone().size() == 0){
- result.addWarning(pop, I18n._("isisfish.error.undefined.zone.population"));
+ result.addWarning(pop, _("isisfish.error.undefined.zone.population"));
}
if(pop.getRecruitmentZone() == null || pop.getRecruitmentZone().size() == 0){
- result.addWarning(pop, I18n._("isisfish.error.undefined.zone.recruitment"));
+ result.addWarning(pop, _("isisfish.error.undefined.zone.recruitment"));
}
if(pop.getReproductionZone() == null || pop.getReproductionZone().size() == 0){
- result.addWarning(pop, I18n._("isisfish.error.undefined.zone.reproduction"));
+ result.addWarning(pop, _("isisfish.error.undefined.zone.reproduction"));
}
List<PopulationSeasonInfo> infoSaisons = pop.getPopulationSeasonInfo();
if(infoSaisons.size() == 0){
- result.addWarning(pop, I18n._("isisfish.error.empty.season"));
+ result.addWarning(pop, _("isisfish.error.empty.season"));
}else{
Set<Month> months = new HashSet<Month>();
for(PopulationSeasonInfo info : infoSaisons){
if (!Collections.disjoint(months, info.getMonths())) {
- result.addError(info, I18n._("isisfish.error.overlap.season"));
+ result.addError(info, _("isisfish.error.overlap.season"));
}
months.addAll(info.getMonths());
check(info, result);
@@ -343,12 +342,12 @@
static public void check(FisheryRegion region, CheckResult result){
if("".equals(region.getName())){
- result.addWarning(region, I18n._("isisfish.error.empty.name"));
+ result.addWarning(region, _("isisfish.error.empty.name"));
}
List<Zone> secteurs = region.getZone();;
if(secteurs.size() == 0){
- result.addWarning(region, I18n._("isisfish.error.undefined.sector"));
+ result.addWarning(region, _("isisfish.error.undefined.sector"));
}else{
for(Zone zone : secteurs){
check(zone, result);
@@ -356,7 +355,7 @@
}
List<Cell> mailles = region.getCell();
if(mailles.size() == 0){
- result.addWarning(region, I18n._("isisfish.error.undefined.mesh"));
+ result.addWarning(region, _("isisfish.error.undefined.mesh"));
}else{
for(Cell cell : mailles){
check(cell, result);
@@ -364,7 +363,7 @@
}
List<Species> metaPops = region.getSpecies();
if(metaPops.size() == 0){
- result.addWarning(region, I18n._("isisfish.error.undefined.meta.population"));
+ result.addWarning(region, _("isisfish.error.undefined.meta.population"));
}else{
for(Species species : metaPops){
check(species, result);
@@ -372,7 +371,7 @@
}
List<Metier> metiers = region.getMetier();
if(metiers.size() == 0){
- result.addWarning(region, I18n._("isisfish.error.undefined.meta.population"));
+ result.addWarning(region, _("isisfish.error.undefined.meta.population"));
}else{
for(Metier metier : metiers){
check(metier, result);
@@ -380,7 +379,7 @@
}
List<Strategy> strategies = region.getStrategy();
if(strategies.size() == 0){
- result.addWarning(region, I18n._("isisfish.error.undefined.stategy"));
+ result.addWarning(region, _("isisfish.error.undefined.stategy"));
}else{
for(Strategy strategy : strategies){
check(strategy, result);
@@ -390,10 +389,10 @@
static public void check(Zone secteur, CheckResult result){
if("".equals(secteur.getName())){
- result.addWarning(secteur, I18n._("isisfish.error.empty.name"));
+ result.addWarning(secteur, _("isisfish.error.empty.name"));
}
if(secteur.getCell().size() == 0){
- result.addWarning(secteur, I18n._("isisfish.error.undefined.mesh.sector"));
+ result.addWarning(secteur, _("isisfish.error.undefined.mesh.sector"));
}
}
@@ -404,13 +403,13 @@
static public void check(Strategy strategy, CheckResult result){
if("".equals(strategy.getName())){
- result.addWarning(strategy, I18n._("isisfish.error.empty.name"));
+ result.addWarning(strategy, _("isisfish.error.empty.name"));
}
check(strategy.getSetOfVessels(), result);
List<StrategyMonthInfo> smi = strategy.getStrategyMonthInfo();
if(smi.size() != 12){
- result.addWarning(strategy, I18n._("isisfish.error.undefined.stategy.months"));
+ result.addWarning(strategy, _("isisfish.error.undefined.stategy.months"));
}else{
for(StrategyMonthInfo info : smi){
check(info, result);
@@ -422,14 +421,14 @@
static public void check(SetOfVessels sov, CheckResult result){
check(sov.getPort(), result);
if(sov.getNumberOfVessels() < 0){
- result.addWarning(sov, I18n._("isisfish.error.invalid.number"));
+ result.addWarning(sov, _("isisfish.error.invalid.number"));
}
if(sov.getFixedCosts() < 0){
- result.addWarning(sov, I18n._("isisfish.error.invalid.costs.fix"));
+ result.addWarning(sov, _("isisfish.error.invalid.costs.fix"));
}
Collection<EffortDescription> efforts = sov.getPossibleMetiers();
if(efforts.size() == 0){
- result.addWarning(sov, I18n._("isisfish.error.not.possible.metier"));
+ result.addWarning(sov, _("isisfish.error.not.possible.metier"));
}else{
for(EffortDescription effort : efforts) {
check(effort, result);
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/input/check/CheckResultFrame.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/input/check/CheckResultFrame.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/input/check/CheckResultFrame.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,8 +31,9 @@
package fr.ifremer.isisfish.ui.input.check;
+import static org.codelutin.i18n.I18nf._;
+
import javax.swing.JFrame;
-import org.codelutin.i18n.I18n;
import javax.swing.WindowConstants;
import javax.swing.JScrollPane;
import javax.swing.JTable;
@@ -46,7 +47,7 @@
}
public CheckResultFrame(){
- super(I18n._("isisfish.message.result.verif.region"));
+ super(_("isisfish.message.result.verif.region"));
model = new CheckResultTableModel(new CheckResult());
JTable table = new JTable(model);
model.addMouseListenerToHeaderInTable(table);
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/DataResultUI.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/DataResultUI.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/DataResultUI.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -9,6 +9,8 @@
package fr.ifremer.isisfish.ui.result;
+import static org.codelutin.i18n.I18nf._;
+
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
@@ -33,8 +35,6 @@
import javax.swing.table.DefaultTableModel;
import javax.swing.table.JTableHeader;
-import org.codelutin.i18n.I18n;
-
public abstract class DataResultUI extends JPanel implements DataResultUICallback{
protected void init(){
@@ -120,7 +120,7 @@
JPanel result = new JPanel(new GridBagLayout());
for(int i=0; i<childs.size(); i++)
result.add((Component)childs.get(i), cs[i]);
- result.setToolTipText(I18n._("isisfish.dataResult.table2"));
+ result.setToolTipText(_("isisfish.dataResult.table2"));
__table2__ = result;
}
@@ -138,8 +138,8 @@
private JLabel __descriptionLabel__ = null;
public JLabel getDescriptionLabel(){
if(__descriptionLabel__ == null){
- JLabel result = new JLabel(I18n._("isisfish.simulation.name"));
- result.setToolTipText(I18n._("isisfish.dataResult.descriptionLabel"));
+ JLabel result = new JLabel(_("isisfish.simulation.name"));
+ result.setToolTipText(_("isisfish.dataResult.descriptionLabel"));
__descriptionLabel__ = result;
}
@@ -151,8 +151,8 @@
if(__exportButton__ == null){
ImageIcon icon = null;
- JButton result = new JButton(I18n._("isisfish.dataResult.export.csv"), icon);
- result.setToolTipText(I18n._("isisfish.dataResult.exportButton"));
+ JButton result = new JButton(_("isisfish.dataResult.export.csv"), icon);
+ result.setToolTipText(_("isisfish.dataResult.exportButton"));
result.addMouseListener(new MouseAdapter(){
public void mouseClicked(MouseEvent e){
on_exportButton_clicked();
@@ -179,7 +179,7 @@
}
else
result = new JScrollPane(child);
- result.setToolTipText(I18n._("isisfish.dataResult.scrolledwindow2"));
+ result.setToolTipText(_("isisfish.dataResult.scrolledwindow2"));
__scrolledwindow2__ = result;
}
@@ -200,7 +200,7 @@
new JTable(new DefaultTableModel(new Vector(), head));
result.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
setSignalMatriceTableHeader(result);
- result.setToolTipText(I18n._("isisfish.dataResult.matriceTable"));
+ result.setToolTipText(_("isisfish.dataResult.matriceTable"));
__matriceTable__ = result;
}
@@ -209,9 +209,9 @@
public Vector getMatriceTableHead(){
Vector<String> result = new Vector<String>();
- result.add(I18n._("isisfish.dataResult.label"));
- result.add(I18n._("isisfish.dataResult.label"));
- result.add(I18n._("isisfish.dataResult.label"));
+ result.add(_("isisfish.dataResult.label"));
+ result.add(_("isisfish.dataResult.label"));
+ result.add(_("isisfish.dataResult.label"));
return result;
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/GraphBeanUI.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/GraphBeanUI.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/GraphBeanUI.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -9,6 +9,8 @@
package fr.ifremer.isisfish.ui.result;
+import static org.codelutin.i18n.I18nf._;
+
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
@@ -33,8 +35,6 @@
import javax.swing.JSplitPane;
import javax.swing.JViewport;
-import org.codelutin.i18n.I18n;
-
public abstract class GraphBeanUI extends JPanel implements GraphBeanUICallback{
protected void init(){
@@ -92,7 +92,7 @@
result.setOneTouchExpandable(true);
result.setDividerSize(10);
- result.setToolTipText(I18n._("isisfish.graphBean.graphSplitPane"));
+ result.setToolTipText(_("isisfish.graphBean.graphSplitPane"));
__graphSplitPane__ = result;
}
@@ -146,7 +146,7 @@
JPanel result = new JPanel(new GridBagLayout());
for(int i=0; i<childs.size(); i++)
result.add((Component)childs.get(i), cs[i]);
- result.setToolTipText(I18n._("isisfish.graphBean.table3"));
+ result.setToolTipText(_("isisfish.graphBean.table3"));
__table3__ = result;
}
@@ -164,8 +164,8 @@
private JLabel __label1__ = null;
public JLabel getLabel1(){
if(__label1__ == null){
- JLabel result = new JLabel(I18n._("isisfish.graphBean.graph.render"));
- result.setToolTipText(I18n._("isisfish.graphBean.label"));
+ JLabel result = new JLabel(_("isisfish.graphBean.graph.render"));
+ result.setToolTipText(_("isisfish.graphBean.label"));
__label1__ = result;
}
@@ -187,7 +187,7 @@
}
else
result = new JScrollPane(child);
- result.setToolTipText(I18n._("isisfish.graphBean.scrolledwindow"));
+ result.setToolTipText(_("isisfish.graphBean.scrolledwindow"));
__scrolledwindow1__ = result;
}
@@ -238,7 +238,7 @@
JPanel result = new JPanel(new GridBagLayout());
for(int i=0; i<childs.size(); i++)
result.add((Component)childs.get(i), cs[i]);
- result.setToolTipText(I18n._("isisfish.graphBean.table"));
+ result.setToolTipText(_("isisfish.graphBean.table"));
__table99__ = result;
}
@@ -255,7 +255,7 @@
public javax.swing.JPanel getGraphPanel(){
if(__graphPanel__ == null){
javax.swing.JPanel result = new javax.swing.JPanel();
- result.setToolTipText(I18n._("isisfish.graphBean.graphPanel"));
+ result.setToolTipText(_("isisfish.graphBean.graphPanel"));
__graphPanel__ = result;
}
@@ -267,7 +267,7 @@
if(__graphRendererCombo__ == null){
JComboBox result = new JComboBox();
result.setEditable(true);
- result.setToolTipText(I18n._("isisfish.graphBean.graphRendererCombo"));
+ result.setToolTipText(_("isisfish.graphBean.graphRendererCombo"));
result.addItemListener(new ItemListener(){
public void itemStateChanged(ItemEvent e){
on_graphRendererCombo_selectionChanged(e);
@@ -309,7 +309,7 @@
JPanel result = new JPanel(new GridBagLayout());
for(int i=0; i<childs.size(); i++)
result.add((Component)childs.get(i), cs[i]);
- result.setToolTipText(I18n._("isisfish.graphBean.table"));
+ result.setToolTipText(_("isisfish.graphBean.table"));
__table1__ = result;
}
@@ -343,7 +343,7 @@
JPanel result = new JPanel(new GridBagLayout());
for(int i=0; i<childs.size(); i++)
result.add((Component)childs.get(i), cs[i]);
- result.setToolTipText(I18n._("isisfish.graphBean.table"));
+ result.setToolTipText(_("isisfish.graphBean.table"));
__table2__ = result;
}
@@ -360,7 +360,7 @@
public javax.swing.JPanel getPalettePanel(){
if(__palettePanel__ == null){
javax.swing.JPanel result = new javax.swing.JPanel();
- result.setToolTipText(I18n._("isisfish.graphBean.palettePanel"));
+ result.setToolTipText(_("isisfish.graphBean.palettePanel"));
__palettePanel__ = result;
}
@@ -372,8 +372,8 @@
if(__appliquer__ == null){
ImageIcon icon = null;
- JButton result = new JButton(I18n._("isisfish.common.apply"), icon);
- result.setToolTipText(I18n._("isisfish.common.apply"));
+ JButton result = new JButton(_("isisfish.common.apply"), icon);
+ result.setToolTipText(_("isisfish.common.apply"));
result.addMouseListener(new MouseAdapter(){
public void mouseClicked(MouseEvent e){
on_appliquer_clicked();
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/GraphComboRenderer.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/GraphComboRenderer.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/GraphComboRenderer.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -1,12 +1,12 @@
package fr.ifremer.isisfish.ui.result;
+import static org.codelutin.i18n.I18nf._;
+
import java.awt.Component;
import javax.swing.DefaultListCellRenderer;
import javax.swing.JList;
-import org.codelutin.i18n.I18n;
-
import com.jrefinery.chart.AreaCategoryItemRenderer;
import com.jrefinery.chart.HorizontalBarRenderer;
import com.jrefinery.chart.LineAndShapeRenderer;
@@ -37,21 +37,21 @@
super.getListCellRendererComponent(liste, o, attributeIndex,
isSelected, hasFocus);
if (o instanceof StackedVerticalBarRenderer)
- setText(I18n._("isisfish.graphCombo.render.bar.vertical.stacked"));
+ setText(_("isisfish.graphCombo.render.bar.vertical.stacked"));
else if (o instanceof VerticalBarRenderer3D)
- setText(I18n._("isisfish.graphCombo.render.bar.vertical.3d"));
+ setText(_("isisfish.graphCombo.render.bar.vertical.3d"));
else if (o instanceof VerticalBarRenderer)
- setText(I18n._("isisfish.graphCombo.render.bar.vertical"));
+ setText(_("isisfish.graphCombo.render.bar.vertical"));
else if (o instanceof StackedHorizontalBarRenderer)
- setText(I18n._("isisfish.graphCombo.render.bar.horizontal.stacked"));
+ setText(_("isisfish.graphCombo.render.bar.horizontal.stacked"));
else if (o instanceof HorizontalBarRenderer)
- setText(I18n._("isisfish.graphCombo.render.bar.horizontal"));
+ setText(_("isisfish.graphCombo.render.bar.horizontal"));
else if (o instanceof AreaCategoryItemRenderer)
- setText(I18n._("isisfish.graphCombo.render.surface"));
+ setText(_("isisfish.graphCombo.render.surface"));
else if (o instanceof LineAndShapeRenderer)
- setText(I18n._("isisfish.graphCombo.render.line"));
+ setText(_("isisfish.graphCombo.render.line"));
else if (o instanceof MinMaxCategoryRenderer)
- setText(I18n._("isisfish.graphCombo.render.min.max"));
+ setText(_("isisfish.graphCombo.render.min.max"));
else
setText((o == null) ? "" : o.toString());
return this;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/InfoItem.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/InfoItem.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/InfoItem.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -14,11 +14,12 @@
package fr.ifremer.isisfish.ui.result;
+import static org.codelutin.i18n.I18nf._;
+
import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.ListSelectionModel;
-import org.codelutin.i18n.I18n;
import org.codelutin.util.Resource;
public class InfoItem extends InfoItemUI implements InfoPanelable {
@@ -35,7 +36,7 @@
getSumButton().setIcon(sigmabarre);
getSumButton().setBorder(BorderFactory.createEtchedBorder());
getSumButton().setBorderPainted(true);
- getSumButton().setToolTipText(I18n._("isisfish.infoItem.sum"));
+ getSumButton().setToolTipText(_("isisfish.infoItem.sum"));
getList().setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/InfoItemDate.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/InfoItemDate.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/InfoItemDate.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -14,11 +14,12 @@
package fr.ifremer.isisfish.ui.result;
+import static org.codelutin.i18n.I18nf._;
+
import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.ListSelectionModel;
-import org.codelutin.i18n.I18n;
import org.codelutin.util.Resource;
public class InfoItemDate extends InfoItemDateUI implements InfoPanelable {
@@ -29,14 +30,14 @@
super();
init();
- getLabel().setText(I18n._("isisfish.common.date"));
+ getLabel().setText(_("isisfish.common.date"));
ImageIcon sigmabarre = Resource.getIcon("images/sigma-barre.gif");
ImageIcon sigma = Resource.getIcon("images/sigma.gif");
getSumButton().setSelectedIcon(sigma);
getSumButton().setIcon(sigmabarre);
getSumButton().setBorder(BorderFactory.createEtchedBorder());
getSumButton().setBorderPainted(true);
- getSumButton().setToolTipText(I18n._("isisfish.infoItem.sum"));
+ getSumButton().setToolTipText(_("isisfish.infoItem.sum"));
ImageIcon sigmaAnBarre = Resource.getIcon("images/sigma_an-barre.gif");
ImageIcon sigmaAn = Resource.getIcon("images/sigma_an.gif");
@@ -44,7 +45,7 @@
getSumAnButton().setIcon(sigmaAnBarre);
getSumAnButton().setBorder(BorderFactory.createEtchedBorder());
getSumAnButton().setBorderPainted(true);
- getSumAnButton().setToolTipText(I18n._("isisfish.infoItem.sum.year"));
+ getSumAnButton().setToolTipText(_("isisfish.infoItem.sum.year"));
getList().setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
getList().setCellRenderer(new InfoItemDateListRenderer());
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/InfoItemDateUI.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/InfoItemDateUI.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/InfoItemDateUI.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -9,6 +9,8 @@
package fr.ifremer.isisfish.ui.result;
+import static org.codelutin.i18n.I18nf._;
+
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
@@ -29,8 +31,6 @@
import javax.swing.JViewport;
import javax.swing.ListSelectionModel;
-import org.codelutin.i18n.I18n;
-
public abstract class InfoItemDateUI extends JPanel implements InfoItemDateUICallback{
protected void init(){
@@ -106,7 +106,7 @@
JPanel result = new JPanel(new GridBagLayout());
for(int i=0; i<childs.size(); i++)
result.add((Component)childs.get(i), cs[i]);
- result.setToolTipText(I18n._("isisfish.infoItem.table"));
+ result.setToolTipText(_("isisfish.infoItem.table"));
__table31__ = result;
}
@@ -160,7 +160,7 @@
JPanel result = new JPanel(new GridBagLayout());
for(int i=0; i<childs.size(); i++)
result.add((Component)childs.get(i), cs[i]);
- result.setToolTipText(I18n._("isisfish.infoItem.table"));
+ result.setToolTipText(_("isisfish.infoItem.table"));
__table32__ = result;
}
@@ -178,8 +178,8 @@
private JLabel __label__ = null;
public JLabel getLabel(){
if(__label__ == null){
- JLabel result = new JLabel(I18n._("isisfish.infoItem.label"));
- result.setToolTipText(I18n._("isisfish.infoItem.label"));
+ JLabel result = new JLabel(_("isisfish.infoItem.label"));
+ result.setToolTipText(_("isisfish.infoItem.label"));
__label__ = result;
}
@@ -189,8 +189,8 @@
private JRadioButton __sumAnButton__ = null;
public JRadioButton getSumAnButton(){
if(__sumAnButton__ == null){
- JRadioButton result = new JRadioButton(I18n._("isisfish.common.blank"), false);
- result.setToolTipText(I18n._("isisfish.common.sum"));
+ JRadioButton result = new JRadioButton(_("isisfish.common.blank"), false);
+ result.setToolTipText(_("isisfish.common.sum"));
__sumAnButton__ = result;
}
@@ -200,8 +200,8 @@
private JRadioButton __sumButton__ = null;
public JRadioButton getSumButton(){
if(__sumButton__ == null){
- JRadioButton result = new JRadioButton(I18n._("isisfish.common.blank"), false);
- result.setToolTipText(I18n._("isisfish.infoItem.sum"));
+ JRadioButton result = new JRadioButton(_("isisfish.common.blank"), false);
+ result.setToolTipText(_("isisfish.infoItem.sum"));
__sumButton__ = result;
}
@@ -223,7 +223,7 @@
}
else
result = new JScrollPane(child);
- result.setToolTipText(I18n._("isisfish.infoItem.scrolledwindow"));
+ result.setToolTipText(_("isisfish.infoItem.scrolledwindow"));
__scrolledwindow2__ = result;
}
@@ -241,7 +241,7 @@
if(__list__ == null){
JList result = new JList(new DefaultListModel());
result.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
- result.setToolTipText(I18n._("isisfish.infoItem.list"));
+ result.setToolTipText(_("isisfish.infoItem.list"));
__list__ = result;
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/InfoItemUI.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/InfoItemUI.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/InfoItemUI.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -9,6 +9,8 @@
package fr.ifremer.isisfish.ui.result;
+import static org.codelutin.i18n.I18nf._;
+
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
@@ -29,8 +31,6 @@
import javax.swing.JViewport;
import javax.swing.ListSelectionModel;
-import org.codelutin.i18n.I18n;
-
public abstract class InfoItemUI extends JPanel implements InfoItemUICallback{
protected void init(){
@@ -106,7 +106,7 @@
JPanel result = new JPanel(new GridBagLayout());
for(int i=0; i<childs.size(); i++)
result.add((Component)childs.get(i), cs[i]);
- result.setToolTipText(I18n._("isisfish.infoItem..table"));
+ result.setToolTipText(_("isisfish.infoItem..table"));
__table29__ = result;
}
@@ -150,7 +150,7 @@
JPanel result = new JPanel(new GridBagLayout());
for(int i=0; i<childs.size(); i++)
result.add((Component)childs.get(i), cs[i]);
- result.setToolTipText(I18n._("isisfish.infoItem.table"));
+ result.setToolTipText(_("isisfish.infoItem.table"));
__table30__ = result;
}
@@ -167,8 +167,8 @@
private JLabel __label__ = null;
public JLabel getLabel(){
if(__label__ == null){
- JLabel result = new JLabel(I18n._("isisfish.infoItem.label"));
- result.setToolTipText(I18n._("isisfish.infoItem.label"));
+ JLabel result = new JLabel(_("isisfish.infoItem.label"));
+ result.setToolTipText(_("isisfish.infoItem.label"));
__label__ = result;
}
@@ -178,8 +178,8 @@
private JRadioButton __sumButton__ = null;
public JRadioButton getSumButton(){
if(__sumButton__ == null){
- JRadioButton result = new JRadioButton(I18n._("isisfish.common.blank"), false);
- result.setToolTipText(I18n._("isisfish.common.sum"));
+ JRadioButton result = new JRadioButton(_("isisfish.common.blank"), false);
+ result.setToolTipText(_("isisfish.common.sum"));
__sumButton__ = result;
}
@@ -201,7 +201,7 @@
}
else
result = new JScrollPane(child);
- result.setToolTipText(I18n._("isisfish.infoItem.scrolledwindow"));
+ result.setToolTipText(_("isisfish.infoItem.scrolledwindow"));
__scrolledwindow1__ = result;
}
@@ -219,7 +219,7 @@
if(__list__ == null){
JList result = new JList(new DefaultListModel());
result.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
- result.setToolTipText(I18n._("isisfish.infoItem.list"));
+ result.setToolTipText(_("isisfish.infoItem.list"));
__list__ = result;
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/ResultEdit.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/ResultEdit.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/ResultEdit.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -13,6 +13,8 @@
package fr.ifremer.isisfish.ui.result;
+import static org.codelutin.i18n.I18nf._;
+
import java.awt.Component;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
@@ -39,8 +41,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.codelutin.i18n.I18n;
-import static org.codelutin.i18n.I18n._;
import org.codelutin.math.matrix.MatrixND;
import org.codelutin.topia.TopiaContext;
import org.codelutin.util.FileUtil;
@@ -60,12 +60,12 @@
/** to use log facility, just put in your code: log.info("..."); */
static private Log log = LogFactory.getLog(ResultEdit.class);
- static final String ABONDANCE_STRING = I18n._("isisfish.result.abundance");
- static final String CAPTUREPARMETIER_STRING = I18n._("isisfish.result.capture.metier");
- static final String REJETPARMETIER_STRING = I18n._("isisfish.result.reject.metier");
- static final String DEBARQUEMENTPARMETIER_STRING = I18n._("isisfish.result.unload.metier");
- static final String EFFORTPARMETIER_STRING = I18n._("isisfish.result.stress.metier");
- static final String CAPTURE_STRING = I18n._("isisfish.result.capture");
+ static final String ABONDANCE_STRING = _("isisfish.result.abundance");
+ static final String CAPTUREPARMETIER_STRING = _("isisfish.result.capture.metier");
+ static final String REJETPARMETIER_STRING = _("isisfish.result.reject.metier");
+ static final String DEBARQUEMENTPARMETIER_STRING = _("isisfish.result.unload.metier");
+ static final String EFFORTPARMETIER_STRING = _("isisfish.result.stress.metier");
+ static final String CAPTURE_STRING = _("isisfish.result.capture");
/** la simulation visualise */
SimulationStorage simulation = null;
@@ -157,9 +157,9 @@
// on affecte le nom
if (group.getDimensionName(i).equals("")){
- item.getLabel().setText(I18n._("isisfish.result.dimension ")+i);
+ item.getLabel().setText(_("isisfish.result.dimension ")+i);
}else{
- item.getLabel().setText(I18n._(group.getDimensionName(i)));
+ item.getLabel().setText(_(group.getDimensionName(i)));
}
List elems = group.getSemantics(i);
@@ -264,13 +264,13 @@
mat1 = mat1.sumOverDim(0);
mat1 = mat1.sumOverDim(1);
mat1 = mat1.reduce();
- resume.append(I18n._("isisfish.result.begin.simulation")+mat1.getName()+": "+mat1.getValue(0)+"\n");
+ resume.append(_("isisfish.result.begin.simulation")+mat1.getName()+": "+mat1.getValue(0)+"\n");
mat1 = resultManager.getMatrix(resultManager.getLastDate(), name, tx);
mat1 = mat1.sumOverDim(0);
mat1 = mat1.sumOverDim(1);
mat1 = mat1.reduce();
- resume.append(I18n._("isisfish.result.end.simulation")+mat1.getName()+": "+mat1.getValue(0)+"\n");
+ resume.append(_("isisfish.result.end.simulation")+mat1.getName()+": "+mat1.getValue(0)+"\n");
}
else if(name.startsWith(REJETPARMETIER_STRING)){
MatrixND mat1 = resultManager.getMatrix(name, tx);
@@ -280,7 +280,7 @@
mat1 = mat1.sumOverDim(3);
mat1 = mat1.reduce();
- resume.append(I18n._("isisfish.common.sum")+mat1.getName()+": "+mat1.getValue(0)+"\n");
+ resume.append(_("isisfish.common.sum")+mat1.getName()+": "+mat1.getValue(0)+"\n");
}
else if (!name.startsWith(CAPTUREPARMETIER_STRING) && name.startsWith(CAPTURE_STRING)){
MatrixND mat1 = resultManager.getMatrix(name, tx);
@@ -289,10 +289,10 @@
mat1 = mat1.sumOverDim(2);
mat1 = mat1.reduce();
- resume.append(I18n._("isisfish.common.sum")+mat1.getName()+": "+mat1.getValue(0)+"\n");
+ resume.append(_("isisfish.common.sum")+mat1.getName()+": "+mat1.getValue(0)+"\n");
}
} catch (Exception eee) {
- resume.append(I18n._("isisfish.error.no.matrix" + name));
+ resume.append(_("isisfish.error.no.matrix" + name));
}
}
@@ -366,15 +366,15 @@
matrix = matrix.sumOverDim(i, item.getSumStep());
if(matrix.getDim(i) == 1){
// c une somme global sur tous les elements
- matrix.setDimensionName(i, I18n._("isisfish.common.sum"));
+ matrix.setDimensionName(i, _("isisfish.common.sum"));
}else{
// c une somme partielle
String name = matrix.getDimensionName(i)+" "+
- I18n._("isisfish.common.sum");
+ _("isisfish.common.sum");
//si c une somme pour les annees, on change l'intitule
if (item instanceof InfoItemDate){
- name = I18n._("isisfish.common.year");
+ name = _("isisfish.common.year");
}
matrix.setDimensionName(i, name);
@@ -407,7 +407,7 @@
if (matInfo.getNbDim() > 2) {
// matrice superieur a 2 dimensions non geree!!
- JOptionPane.showMessageDialog(null, I18n._("isisfish.error.matrix.more.2d"), I18n._("isisfish.common.alert"), JOptionPane.ERROR_MESSAGE);
+ JOptionPane.showMessageDialog(null, _("isisfish.error.matrix.more.2d"), _("isisfish.common.alert"), JOptionPane.ERROR_MESSAGE);
return;
}
@@ -421,7 +421,7 @@
mapBean.addResultatLayer(matInfo.getName(), layer);
}catch(Exception eee){
Logger.getLogger(getClass().getName() + ".addRendu").log(Level.WARNING, "Erreur lors de l'ajout du résultat à la carte. ", eee);
- JOptionPane.showMessageDialog(null, I18n._("isisfish.error.add.card"), I18n._("isisfish.common.alert"), JOptionPane.ERROR_MESSAGE);
+ JOptionPane.showMessageDialog(null, _("isisfish.error.add.card"), _("isisfish.common.alert"), JOptionPane.ERROR_MESSAGE);
}
}
@@ -430,7 +430,7 @@
graphBean.getModel().setMatrix(matInfo);
}catch(Exception eee){
log.warn("Erreur lors de l'ajout du résultat au graph.", eee);
- JOptionPane.showMessageDialog(null, I18n._("isisfish.error.add.result.graph"), I18n._("isisfish.common.alert"), JOptionPane.ERROR_MESSAGE);
+ JOptionPane.showMessageDialog(null, _("isisfish.error.add.result.graph"), _("isisfish.common.alert"), JOptionPane.ERROR_MESSAGE);
}
// ajout au data
@@ -438,7 +438,7 @@
dataBean.setMatrix(matInfo);
}catch(Exception eee){
log.warn("Erreur lors de l'ajout du résultat au data.", eee);
- JOptionPane.showMessageDialog(null, I18n._("isisfish.error.add.result.data"), I18n._("isisfish.common.alert"), JOptionPane.ERROR_MESSAGE);
+ JOptionPane.showMessageDialog(null, _("isisfish.error.add.result.data"), _("isisfish.common.alert"), JOptionPane.ERROR_MESSAGE);
}
setStatusOK(true);
@@ -538,7 +538,7 @@
* ECMAScript d'export.
*/
protected JMenuItem getExportMenu(String methodName){
- JMenuItem result = new JMenuItem(I18n._(methodName));
+ JMenuItem result = new JMenuItem(_(methodName));
result.addActionListener(new ExportActionListener(methodName));
return result;
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/ResultEditUI.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/ResultEditUI.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/ResultEditUI.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -9,6 +9,8 @@
package fr.ifremer.isisfish.ui.result;
+import static org.codelutin.i18n.I18nf._;
+
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
@@ -42,12 +44,10 @@
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
-import org.codelutin.i18n.I18n;
-
public abstract class ResultEditUI extends JFrame implements ResultEditUICallback{
public ResultEditUI(){
- super(I18n._("isisfish.result.title"));
+ super(_("isisfish.result.title"));
}
protected void init(){
@@ -101,7 +101,7 @@
Vector childs = getVbox2Childs();
Box result = Box.createVerticalBox();
for (Object child : childs) result.add((Component) child);
- result.setToolTipText(I18n._("isisfish.result.vbox"));
+ result.setToolTipText(_("isisfish.result.vbox"));
__vbox2__ = result;
}
@@ -120,7 +120,7 @@
Vector childs = getMenubar2Childs();
JMenuBar result = new JMenuBar();
for (Object child : childs) result.add((JMenuItem) child);
- result.setToolTipText(I18n._("isisfish.result.menubar"));
+ result.setToolTipText(_("isisfish.result.menubar"));
__menubar2__ = result;
}
@@ -137,9 +137,9 @@
public JMenu getMenuExport(){
if(__menuExport__ == null){
Vector childs = getMenuExport_menuChilds();
- JMenu result = new JMenu(I18n._("isisfish.result.export"));
+ JMenu result = new JMenu(_("isisfish.result.export"));
for (Object child : childs) result.add((Component) child);
- result.setToolTipText(I18n._("isisfish.result.menuExport"));
+ result.setToolTipText(_("isisfish.result.menuExport"));
__menuExport__ = result;
}
@@ -156,7 +156,7 @@
public JSeparator getMenuitem6(){
if(__menuitem6__ == null){
JSeparator result = new JSeparator();
- result.setToolTipText(I18n._("isisfish.result.menuitem"));
+ result.setToolTipText(_("isisfish.result.menuitem"));
__menuitem6__ = result;
}
@@ -193,7 +193,7 @@
JPanel result = new JPanel(new GridBagLayout());
for(int i=0; i<childs.size(); i++)
result.add((Component)childs.get(i), cs[i]);
- result.setToolTipText(I18n._("isisfish.result.table"));
+ result.setToolTipText(_("isisfish.result.table"));
__table23__ = result;
}
@@ -237,7 +237,7 @@
JPanel result = new JPanel(new GridBagLayout());
for(int i=0; i<childs.size(); i++)
result.add((Component)childs.get(i), cs[i]);
- result.setToolTipText(I18n._("isisfish.result.table"));
+ result.setToolTipText(_("isisfish.result.table"));
__table22__ = result;
}
@@ -256,8 +256,8 @@
if(__statusImage__ == null){
ImageIcon icon = null;
- JButton result = new JButton(I18n._("isisfish.common.blank"), icon);
- result.setToolTipText(I18n._("isisfish.result.statusImage"));
+ JButton result = new JButton(_("isisfish.common.blank"), icon);
+ result.setToolTipText(_("isisfish.result.statusImage"));
__statusImage__ = result;
}
@@ -267,8 +267,8 @@
private JLabel __statusbar1__ = null;
public JLabel getStatusbar1(){
if(__statusbar1__ == null){
- JLabel result = new JLabel(I18n._("isisfish.result.statusBar"));
- result.setToolTipText(I18n._("isisfish.result.statusBar"));
+ JLabel result = new JLabel(_("isisfish.result.statusBar"));
+ result.setToolTipText(_("isisfish.result.statusBar"));
__statusbar1__ = result;
}
@@ -291,7 +291,7 @@
result.setOneTouchExpandable(true);
result.setDividerSize(10);
- result.setToolTipText(I18n._("isisfish.result.hpaned"));
+ result.setToolTipText(_("isisfish.result.hpaned"));
__hpaned2__ = result;
}
@@ -335,7 +335,7 @@
JPanel result = new JPanel(new GridBagLayout());
for(int i=0; i<childs.size(); i++)
result.add((Component)childs.get(i), cs[i]);
- result.setToolTipText(I18n._("isisfish.result.table"));
+ result.setToolTipText(_("isisfish.result.table"));
__table1__ = result;
}
@@ -379,7 +379,7 @@
JPanel result = new JPanel(new GridBagLayout());
for(int i=0; i<childs.size(); i++)
result.add((Component)childs.get(i), cs[i]);
- result.setToolTipText(I18n._("isisfish.result.table"));
+ result.setToolTipText(_("isisfish.result.table"));
__table7__ = result;
}
@@ -413,7 +413,7 @@
JPanel result = new JPanel(new GridBagLayout());
for(int i=0; i<childs.size(); i++)
result.add((Component)childs.get(i), cs[i]);
- result.setToolTipText(I18n._("isisfish.result.table"));
+ result.setToolTipText(_("isisfish.result.table"));
__table8__ = result;
}
@@ -431,8 +431,8 @@
if(__ajoutRendu__ == null){
ImageIcon icon = null;
- JButton result = new JButton(I18n._("isisfish.common.add.short"), icon);
- result.setToolTipText(I18n._("isisfish.result.add"));
+ JButton result = new JButton(_("isisfish.common.add.short"), icon);
+ result.setToolTipText(_("isisfish.result.add"));
result.addMouseListener(new MouseAdapter(){
public void mouseClicked(MouseEvent e){
on_ajoutRendu_clicked();
@@ -459,7 +459,7 @@
}
else
result = new JScrollPane(child);
- result.setToolTipText(I18n._("isisfish.result.scroll"));
+ result.setToolTipText(_("isisfish.result.scroll"));
__scroll__ = result;
}
@@ -482,7 +482,7 @@
JPanel result = new JPanel(new GridBagLayout());
for(int i=0; i<childs.size(); i++)
result.add((Component)childs.get(i), cs[i]);
- result.setToolTipText(I18n._("isisfish.result.infoPanel"));
+ result.setToolTipText(_("isisfish.result.infoPanel"));
__infoPanel__ = result;
}
@@ -500,7 +500,7 @@
if(__resultat__ == null){
JComboBox result = new JComboBox();
result.setEditable(true);
- result.setToolTipText(I18n._("isisfish.result.resultat"));
+ result.setToolTipText(_("isisfish.result.resultat"));
result.addItemListener(new ItemListener(){
public void itemStateChanged(ItemEvent e){
on_resultat_selection_notify_event(e);
@@ -542,7 +542,7 @@
JPanel result = new JPanel(new GridBagLayout());
for(int i=0; i<childs.size(); i++)
result.add((Component)childs.get(i), cs[i]);
- result.setToolTipText(I18n._("isisfish.result.table"));
+ result.setToolTipText(_("isisfish.result.table"));
__table25__ = result;
}
@@ -560,7 +560,7 @@
public javax.swing.JPanel getViewPanel(){
if(__viewPanel__ == null){
javax.swing.JPanel result = new javax.swing.JPanel();
- result.setToolTipText(I18n._("isisfish.result.viewPanel"));
+ result.setToolTipText(_("isisfish.result.viewPanel"));
__viewPanel__ = result;
}
@@ -617,7 +617,7 @@
JPanel result = new JPanel(new GridBagLayout());
for(int i=0; i<childs.size(); i++)
result.add((Component)childs.get(i), cs[i]);
- result.setToolTipText(I18n._("isisfish.result.table"));
+ result.setToolTipText(_("isisfish.result.table"));
__table26__ = result;
}
@@ -636,8 +636,8 @@
private JRadioButton __graphRadioButton__ = null;
public JRadioButton getGraphRadioButton(){
if(__graphRadioButton__ == null){
- JRadioButton result = new JRadioButton(I18n._("isisfish.result.graph"), false);
- result.setToolTipText(I18n._("isisfish.result.graphRadioButton"));
+ JRadioButton result = new JRadioButton(_("isisfish.result.graph"), false);
+ result.setToolTipText(_("isisfish.result.graphRadioButton"));
result.addChangeListener(new ChangeListener(){
public void stateChanged(ChangeEvent e){
on_graphRadioButton_toggled(e);
@@ -652,8 +652,8 @@
private JRadioButton __mapRadioButton__ = null;
public JRadioButton getMapRadioButton(){
if(__mapRadioButton__ == null){
- JRadioButton result = new JRadioButton(I18n._("isisfish.result.map"), false);
- result.setToolTipText(I18n._("isisfish.result.mapRadioButton"));
+ JRadioButton result = new JRadioButton(_("isisfish.result.map"), false);
+ result.setToolTipText(_("isisfish.result.mapRadioButton"));
result.addChangeListener(new ChangeListener(){
public void stateChanged(ChangeEvent e){
on_mapRadioButton_toggled(e);
@@ -668,8 +668,8 @@
private JRadioButton __donneeRadioButton__ = null;
public JRadioButton getDonneeRadioButton(){
if(__donneeRadioButton__ == null){
- JRadioButton result = new JRadioButton(I18n._("isisfish.result.datas"), false);
- result.setToolTipText(I18n._("isisfish.result.datasRadioButton"));
+ JRadioButton result = new JRadioButton(_("isisfish.result.datas"), false);
+ result.setToolTipText(_("isisfish.result.datasRadioButton"));
result.addChangeListener(new ChangeListener(){
public void stateChanged(ChangeEvent e){
on_donneeRadioButton_toggled(e);
@@ -684,8 +684,8 @@
private JRadioButton __resumeRadioButton__ = null;
public JRadioButton getResumeRadioButton(){
if(__resumeRadioButton__ == null){
- JRadioButton result = new JRadioButton(I18n._("isisfish.result.summary"), false);
- result.setToolTipText(I18n._("isisfish.result.summaryRadioButton"));
+ JRadioButton result = new JRadioButton(_("isisfish.result.summary"), false);
+ result.setToolTipText(_("isisfish.result.summaryRadioButton"));
result.addChangeListener(new ChangeListener(){
public void stateChanged(ChangeEvent e){
on_resumeRadioButton_toggled(e);
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/ResultView.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/ResultView.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/ResultView.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -10,15 +10,15 @@
* @version
*/
+import static org.codelutin.i18n.I18nf._;
+
import fr.ifremer.isisfish.datastore.SimulationStorage;
-import static fr.ifremer.isisfish.datastore.SimulationStorage.getSimulationNames;
import fr.ifremer.isisfish.logging.SimulationLoggerUtil;
import fr.ifremer.isisfish.simulator.SimulationProperties;
import fr.ifremer.isisfish.ui.simulator.filter.SimulationFilterUtil;
import fr.ifremer.isisfish.ui.widget.filter.FilterModel;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.codelutin.i18n.I18n;
import javax.swing.*;
import java.awt.*;
@@ -43,13 +43,13 @@
try {
initSimulation();
} catch (Exception e) {
- log.warn(I18n._("could not create simulation filter model for reason {0}",e.getMessage()),e);
+ log.warn(_("could not create simulation filter model for reason %1$s",e.getMessage()),e);
}
}
private void initSimulation() throws IOException, ParseException {
// keep in context list of old simulation names (for filter process)
- java.util.List<String> value = getSimulationNames();
+ java.util.List<String> value = SimulationStorage.getSimulationNames();
// create filter model
filterModel = SimulationFilterUtil.createFilterModel(value);
// to used directly model.getFilteredResult() in xml
@@ -144,7 +144,7 @@
model.addElement(s);
}
} catch (Exception e) {
- log.warn(I18n._("could not filter on simulations"), e);
+ log.warn(_("could not filter on simulations"), e);
}
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/ResultViewUI.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/ResultViewUI.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/ResultViewUI.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -9,7 +9,7 @@
package fr.ifremer.isisfish.ui.result;
-import org.codelutin.i18n.I18n;
+import static org.codelutin.i18n.I18nf._;
import javax.swing.*;
import java.awt.*;
@@ -27,7 +27,7 @@
public abstract class ResultViewUI extends JFrame implements ResultViewUICallback{
public ResultViewUI(){
- super(I18n._("isisfish.result.title"));
+ super(_("isisfish.result.title"));
}
protected void init(){
@@ -87,7 +87,7 @@
for (Object child : childs) {
result.add((Component) child);
}
- result.setToolTipText(I18n._("isisfish.result.vbox"));
+ result.setToolTipText(_("isisfish.result.vbox"));
__vbox1__ = result;
}
@@ -108,7 +108,7 @@
for (Object child : childs) {
result.add((JMenuItem) child);
}
- result.setToolTipText(I18n._("isisfish.result.menubar"));
+ result.setToolTipText(_("isisfish.result.menubar"));
__menubar1__ = result;
}
@@ -125,11 +125,11 @@
public JMenu getMenuitem1(){
if(__menuitem1__ == null){
Vector childs = getMenuitem1_menuChilds();
- JMenu result = new JMenu(I18n._("isisfish.result.file"));
+ JMenu result = new JMenu(_("isisfish.result.file"));
for (Object child : childs) {
result.add((Component) child);
}
- result.setToolTipText(I18n._("isisfish.result.menuitem"));
+ result.setToolTipText(_("isisfish.result.menuitem"));
__menuitem1__ = result;
}
@@ -147,9 +147,9 @@
if(__menuitem2__ == null){
ImageIcon icon = null;
- JMenuItem result = new JMenuItem(I18n._("isisfish.result.quit"), icon);
+ JMenuItem result = new JMenuItem(_("isisfish.result.quit"), icon);
- result.setToolTipText(I18n._("isisfish.result.menuitem"));
+ result.setToolTipText(_("isisfish.result.menuitem"));
result.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
on_Resultat_destroy_event();
@@ -242,7 +242,7 @@
for(int i=0; i<childs.size(); i++) {
result.add(childs.get(i), cs[i]);
}
- result.setToolTipText(I18n._("isisfish.result.table"));
+ result.setToolTipText(_("isisfish.result.table"));
__table33__ = result;
}
@@ -264,8 +264,8 @@
private JLabel __label9__ = null;
public JLabel getLabel9(){
if(__label9__ == null){
- JLabel result = new JLabel(I18n._("isisfish.result.choose.simulation"));
- result.setToolTipText(I18n._("isisfish.result.label"));
+ JLabel result = new JLabel(_("isisfish.result.choose.simulation"));
+ result.setToolTipText(_("isisfish.result.label"));
__label9__ = result;
}
@@ -280,7 +280,7 @@
javax.swing.JDesktopPane
result = new javax.swing.JDesktopPane
();
- result.setToolTipText(I18n._("isisfish.result.desktopPane"));
+ result.setToolTipText(_("isisfish.result.desktopPane"));
__desktopPane__ = result;
}
@@ -292,7 +292,7 @@
if(__simulation__ == null){
JComboBox result = new JComboBox();
result.setEditable(true);
- result.setToolTipText(I18n._("isisfish.result.simulation"));
+ result.setToolTipText(_("isisfish.result.simulation"));
result.addItemListener(new ItemListener(){
public void itemStateChanged(ItemEvent e){
on_simulation_selection_notify_event(e);
@@ -309,8 +309,8 @@
if(__openWindowButton__ == null){
ImageIcon icon = null;
- JButton result = new JButton(I18n._("isisfish.result.new.window"), icon);
- result.setToolTipText(I18n._("isisfish.result.openWindowButton"));
+ JButton result = new JButton(_("isisfish.result.new.window"), icon);
+ result.setToolTipText(_("isisfish.result.openWindowButton"));
result.addMouseListener(new MouseAdapter(){
public void mouseClicked(MouseEvent e){
on_openWindowButton_clicked();
@@ -327,8 +327,8 @@
if(__supprimerSimulationButton__ == null){
ImageIcon icon = null;
- JButton result = new JButton(I18n._("isisfish.result.remove.simulation"), icon);
- result.setToolTipText(I18n._("isisfish.result.removeSimulationButton"));
+ JButton result = new JButton(_("isisfish.result.remove.simulation"), icon);
+ result.setToolTipText(_("isisfish.result.removeSimulationButton"));
result.addMouseListener(new MouseAdapter(){
public void mouseClicked(MouseEvent e){
on_supprimerSimulationButton_clicked();
@@ -346,8 +346,8 @@
if(__voirSimulationLogButton__ == null){
ImageIcon icon = null;
- JButton result = new JButton(I18n._("isisfish.result.show.simulation.log"), icon);
- result.setToolTipText(I18n._("isisfish.result.tooltip.show.simulation.log"));
+ JButton result = new JButton(_("isisfish.result.show.simulation.log"), icon);
+ result.setToolTipText(_("isisfish.result.tooltip.show.simulation.log"));
result.addMouseListener(new MouseAdapter(){
public void mouseClicked(MouseEvent e){
on_voirSimulationLogButton_clicked();
@@ -365,9 +365,9 @@
if(__filterSimulationButton__ == null){
ImageIcon icon = null;
- JButton result = new JButton(I18n._("isisfish.filter"), icon);
+ JButton result = new JButton(_("isisfish.filter"), icon);
- result.setToolTipText(I18n._("isisfish.filter.simulation"));
+ result.setToolTipText(_("isisfish.filter.simulation"));
result.addMouseListener(new MouseAdapter(){
public void mouseClicked(MouseEvent e){
on_filterSimulationLogButton_clicked();
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/ResumePanelUI.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/ResumePanelUI.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/ResumePanelUI.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -9,6 +9,8 @@
package fr.ifremer.isisfish.ui.result;
+import static org.codelutin.i18n.I18nf._;
+
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
@@ -25,8 +27,6 @@
import javax.swing.JTextArea;
import javax.swing.JViewport;
-import org.codelutin.i18n.I18n;
-
public abstract class ResumePanelUI extends JPanel implements ResumePanelUICallback{
protected void init(){
@@ -102,7 +102,7 @@
JPanel result = new JPanel(new GridBagLayout());
for(int i=0; i<childs.size(); i++)
result.add((Component)childs.get(i), cs[i]);
- result.setToolTipText(I18n._("isisfish.resume.table"));
+ result.setToolTipText(_("isisfish.resume.table"));
__table1__ = result;
}
@@ -131,7 +131,7 @@
}
else
result = new JScrollPane(child);
- result.setToolTipText(I18n._("isisfish.resume.scrolledwindow"));
+ result.setToolTipText(_("isisfish.resume.scrolledwindow"));
__scrolledwindow2__ = result;
}
@@ -147,9 +147,9 @@
private JTextArea __resumeTextArea__ = null;
public JTextArea getResumeTextArea(){
if(__resumeTextArea__ == null){
- JTextArea result = new JTextArea(I18n._("isisfish.common.blank"));
+ JTextArea result = new JTextArea(_("isisfish.common.blank"));
result.setEditable(false);
- result.setToolTipText(I18n._("isisfish.resume.resumeTextArea"));
+ result.setToolTipText(_("isisfish.resume.resumeTextArea"));
__resumeTextArea__ = result;
}
@@ -166,7 +166,7 @@
JPanel result = new JPanel(new GridBagLayout());
for(int i=0; i<childs.size(); i++)
result.add((Component)childs.get(i), cs[i]);
- result.setToolTipText(I18n._("isisfish.resume.matrixInfoGrid"));
+ result.setToolTipText(_("isisfish.resume.matrixInfoGrid"));
__matriceInfoGrid__ = result;
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/SimpleResultatMapBean.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/SimpleResultatMapBean.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/SimpleResultatMapBean.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -1,6 +1,6 @@
package fr.ifremer.isisfish.ui.result;
-import org.codelutin.i18n.I18n;
+import static org.codelutin.i18n.I18nf._;
import com.bbn.openmap.gui.OMToolSet;
import com.bbn.openmap.gui.Tool;
@@ -37,7 +37,7 @@
getInformationDelegator().setMap(getIsisMapBean());
getInformationDelegator().setShowLights(false);
- getInformationDelegator().setLabel(I18n._("isisfish.simpleResult.more.information"));
+ getInformationDelegator().setLabel(_("isisfish.simpleResult.more.information"));
}
public void addResultatLayer(String id, ResultatLayer layer) {
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/SimpleResultatMapBeanUI.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/SimpleResultatMapBeanUI.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/result/SimpleResultatMapBeanUI.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -9,6 +9,8 @@
package fr.ifremer.isisfish.ui.result;
+import static org.codelutin.i18n.I18nf._;
+
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
@@ -22,8 +24,6 @@
import javax.swing.ButtonGroup;
import javax.swing.JPanel;
-import org.codelutin.i18n.I18n;
-
public abstract class SimpleResultatMapBeanUI extends JPanel implements SimpleResultatMapBeanUICallback{
protected void init(){
@@ -119,7 +119,7 @@
JPanel result = new JPanel(new GridBagLayout());
for(int i=0; i<childs.size(); i++)
result.add((Component)childs.get(i), cs[i]);
- result.setToolTipText(I18n._("isisfish.simpleResult.table"));
+ result.setToolTipText(_("isisfish.simpleResult.table"));
__table12__ = result;
}
@@ -139,7 +139,7 @@
public fr.ifremer.isisfish.map.IsisMapBean getIsisMapBean(){
if(__resultatMap__ == null){
fr.ifremer.isisfish.map.IsisMapBean result = new fr.ifremer.isisfish.map.IsisMapBean();
- result.setToolTipText(I18n._("isisfish.simpleResult.resultatMap"));
+ result.setToolTipText(_("isisfish.simpleResult.resultatMap"));
__resultatMap__ = result;
}
@@ -164,7 +164,7 @@
com.bbn.openmap.gui.ToolPanel
result = new com.bbn.openmap.gui.ToolPanel
();
- result.setToolTipText(I18n._("isisfish.simpleResult.resultatMapToolBar"));
+ result.setToolTipText(_("isisfish.simpleResult.resultatMapToolBar"));
__resultatMapToolBar__ = result;
}
@@ -175,7 +175,7 @@
public LegendPanel getLegendPanel(){
if(__legendPanel__ == null){
LegendPanel result = new LegendPanel();
- result.setToolTipText(I18n._("isisfish.simpleResult.legendPanel"));
+ result.setToolTipText(_("isisfish.simpleResult.legendPanel"));
__legendPanel__ = result;
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/Action.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/Action.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/Action.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,7 +31,6 @@
package fr.ifremer.isisfish.ui.script;
-import fr.ifremer.isisfish.IsisConfig;
import fr.ifremer.isisfish.IsisFish;
import fr.ifremer.isisfish.datastore.AnalysePlanStorage;
import fr.ifremer.isisfish.datastore.CodeSourceStorage;
@@ -44,16 +43,16 @@
import static fr.ifremer.isisfish.equation.Language.JAVA;
import fr.ifremer.isisfish.ui.UIHelper;
import fr.ifremer.isisfish.ui.ScriptActionHelper;
-import fr.ifremer.isisfish.versionning.vcsSvn.SVNMigrateHelper;
-import org.codelutin.vcs.VCSState;
-import org.codelutin.vcs.VCSAction;
-import org.codelutin.vcs.VCSFileState;
-import org.codelutin.vcs.VCSFileStateManager;
-import org.codelutin.vcs.VCSHelper;
-import fr.ifremer.isisfish.versionning.ui.VCSUIHelper;
+//import fr.ifremer.isisfish.versionning.vcsSvn.SVNMigrateHelper;
+//import org.codelutin.vcs.VCSState;
+//import org.codelutin.vcs.VCSAction;
+//import org.codelutin.vcs.VCSFileState;
+//import org.codelutin.vcs.VCSFileStateManager;
+//import org.codelutin.vcs.VCSHelper;
+//import fr.ifremer.isisfish.versionning.ui.VCSUIHelper;
import org.apache.commons.logging.Log;
import static org.apache.commons.logging.LogFactory.getLog;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import org.swixat.databinding.JTreeModel;
import org.swixat.databinding.JTreeNode;
import org.swixat.databinding.TreeNodeWrapper;
@@ -76,6 +75,7 @@
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
+import org.codelutin.util.FileUtil;
/**
* @author dessard
@@ -100,7 +100,16 @@
//public static Object opened(Context uiContext, AbstractFrame frame) {
public static Object opened(Context uiContext) {
- updateVCSContext(uiContext,null,-1);
+
+ // updateVCSContext(uiContext,null,-1);
+
+ // TODO compute if this action is allowed or not, this permit
+ // to disable some action in ui
+ uiContext.setData(CAN_COMMIT, false);
+ uiContext.setData(CAN_UPDATE, false);
+ uiContext.setData(CAN_DELETE, false);
+ uiContext.setData(CAN_DIFF, false);
+
return null;
}
@@ -156,8 +165,10 @@
uiContext.setData(ACTION_LOG, "");
uiContext.setData(SCRIPT_STORAGE, script);
uiContext.setData(SCRIPT_TYPE, scriptType);
- updateVCSContext(uiContext,script,script==null?-1:script.getFile().lastModified());
-
+
+ // FIXME a remettre en place
+ // updateVCSContext(uiContext,script,script==null?-1:script.getFile().lastModified());
+
frame.refreshView("scriptJedit");
frame.refreshView("actionLogArea");
frame.refreshView("buttonBar");
@@ -165,48 +176,50 @@
}
return null;
}
- //TODO this method should be call when a evetn occurs in editor to compute
- // TODO new filte state
- public static void updateVCSState(Context uiContext, CodeSourceStorage script,String content) {
- VCSFileState state = (VCSFileState) uiContext.getData(VCS_STATE);
- if (state==null) {
- return;
- }
- //TODO finish it
- log.info("state "+state);
- }
- private static void updateVCSContext(Context uiContext, CodeSourceStorage script,long oldTilestamp) {
- Boolean canCommit=false;
- Boolean canUpdate=false;
- Boolean canDelete=false;
- Boolean canDiff=false;
- boolean write=false;
- if (script!=null && VCSHelper.isConnected()) {
- write = VCSHelper.hasWriteAccess();
- VCSFileState state = VCSFileStateManager.getState(oldTilestamp, script.getFile());
- uiContext.setData(VCS_STATE, state);
- VCSState vcsState = state.getState();
- canCommit = write && vcsState != VCSState.OUT_OF_DATE && vcsState != VCSState.OUT_OF_DATE_AND_MODIFIED;
- //canCommit = write && vcsState.authorizeAction(VCSAction.COMMIT,VCSAction.ADD);
- canDelete = write && vcsState != VCSState.UNVERSIONNED;
- //canDelete = write && vcsState!= VCSState.UNVERSIONNED && vcsState.authorizeAction(VCSAction.DELETE);
- canUpdate = vcsState != VCSState.UNVERSIONNED && (vcsState == VCSState.OUT_OF_DATE || vcsState != VCSState.OUT_OF_DATE_AND_MODIFIED);
- //canUpdate= vcsState.authorizeAction(VCSAction.UPDATE,VCSAction.OVERWRITE_AND_UPDATE,VCSAction.REVERT);
- canDiff = vcsState.authorizeAction(VCSAction.DIFF);
- log.info(vcsState);
- }
- log.info("can write " + (write));
- log.info("can commit " + (canCommit));
- log.info("can update " + (canUpdate));
- log.info("can delete " + (canDelete));
- log.info("can diff "+(canDiff));
+// //TODO this method should be call when a evetn occurs in editor to compute
+// // TODO new filte state
+// public static void updateVCSState(Context uiContext, CodeSourceStorage script,String content) {
+// VCSFileState state = (VCSFileState) uiContext.getData(VCS_STATE);
+// if (state==null) {
+// return;
+// }
+// //TODO finish it
+// log.info("state "+state);
+// }
- uiContext.setData(CAN_COMMIT, canCommit);
- uiContext.setData(CAN_UPDATE, canUpdate);
- uiContext.setData(CAN_DELETE, canDelete);
- uiContext.setData(CAN_DIFF, canDiff);
- }
+// private static void updateVCSContext(Context uiContext, CodeSourceStorage script,long oldTilestamp) {
+// Boolean canCommit=false;
+// Boolean canUpdate=false;
+// Boolean canDelete=false;
+// Boolean canDiff=false;
+// boolean write=false;
+// if (script!=null && VCSHelper.isConnected()) {
+// write = VCSHelper.hasWriteAccess();
+// VCSFileState state = VCSFileStateManager.getState(oldTilestamp, script.getFile());
+// uiContext.setData(VCS_STATE, state);
+// VCSState vcsState = state.getState();
+// canCommit = write && vcsState != VCSState.OUT_OF_DATE && vcsState != VCSState.OUT_OF_DATE_AND_MODIFIED;
+// //canCommit = write && vcsState.authorizeAction(VCSAction.COMMIT,VCSAction.ADD);
+// canDelete = write && vcsState != VCSState.UNVERSIONNED;
+// //canDelete = write && vcsState!= VCSState.UNVERSIONNED && vcsState.authorizeAction(VCSAction.DELETE);
+// canUpdate = vcsState != VCSState.UNVERSIONNED && (vcsState == VCSState.OUT_OF_DATE || vcsState != VCSState.OUT_OF_DATE_AND_MODIFIED);
+// //canUpdate= vcsState.authorizeAction(VCSAction.UPDATE,VCSAction.OVERWRITE_AND_UPDATE,VCSAction.REVERT);
+// canDiff = vcsState.authorizeAction(VCSAction.DIFF);
+// log.info(vcsState);
+// }
+// log.info("can write " + (write));
+// log.info("can commit " + (canCommit));
+// log.info("can update " + (canUpdate));
+// log.info("can delete " + (canDelete));
+// log.info("can diff "+(canDiff));
+//
+//
+// uiContext.setData(CAN_COMMIT, canCommit);
+// uiContext.setData(CAN_UPDATE, canUpdate);
+// uiContext.setData(CAN_DELETE, canDelete);
+// uiContext.setData(CAN_DIFF, canDiff);
+// }
/**
* Creer un nouveau script, ici un script peut-etre un Script, un Simulator,
@@ -385,7 +398,9 @@
boolean remote) {
log.debug("deleteScript called");
ScriptMapping mapping = guessMapping(tree);
- if (mapping == null) return null;
+ if (mapping == null) {
+ return null;
+ }
try {
int resp = JOptionPane.showConfirmDialog(frame.getRootComponent(),_("isisfish.message.confirm.remove.script" , script.getName()));
//TODO desactive editor
@@ -425,7 +440,9 @@
// save script before commit
script.setContent(content);
- String msg = VCSUIHelper.getCommitMessage(script.getFile(), true);
+ String msg = JOptionPane.showInputDialog(_("Indiquez vos modifications"));
+
+// String msg = VCSUIHelper.getCommitMessage(script.getFile(), true);
if (msg == null) {
frame.setInfoText(_("isisfish.message.commit.cancelled"));
} else {
@@ -467,30 +484,32 @@
JTree tree, CodeSourceStorage script,
String content) {
log.debug("commitScript called");
- ScriptMapping mapping = guessMapping(tree);
- if (mapping == null) return null;
- try {
- long oldTilestamp = script.getFile().lastModified();
- // save script before commit
- script.setContent(content);
-
- String diff;
- VCSFileState state = VCSFileStateManager.getState(oldTilestamp,script.getFile());
- boolean canDiff = state.getState().authorizeAction(VCSAction.DIFF);
- if (canDiff) {
- diff = script.diff();
- } else {
- diff = _("isisfish.message.no.diff" , script.getFile(),state.getState().libelle() );
- }
-
- frame.setInfoText(_("isisfish.message.diff.finished" , state.getState().libelle() ));
- uiContext.setData(ACTION_LOG, diff);
- frame.refreshView("actionLogArea");
-
- } catch (Exception eee) {
- return returnError(_("isisfish.error.script.diff",script==null?null:script.getFile(), eee.getMessage()),eee);
- }
- return null;
+// TODO a refaire
+ throw new UnsupportedOperationException("En reparation");
+// ScriptMapping mapping = guessMapping(tree);
+// if (mapping == null) return null;
+// try {
+// long oldTilestamp = script.getFile().lastModified();
+// // save script before commit
+// script.setContent(content);
+//
+// String diff;
+// VCSFileState state = VCSFileStateManager.getState(oldTilestamp,script.getFile());
+// boolean canDiff = state.getState().authorizeAction(VCSAction.DIFF);
+// if (canDiff) {
+// diff = script.diff();
+// } else {
+// diff = _("isisfish.message.no.diff" , script.getFile(),state.getState().libelle() );
+// }
+//
+// frame.setInfoText(_("isisfish.message.diff.finished" , state.getState().libelle() ));
+// uiContext.setData(ACTION_LOG, diff);
+// frame.refreshView("actionLogArea");
+//
+// } catch (Exception eee) {
+// return returnError(_("isisfish.error.script.diff",script==null?null:script.getFile(), eee.getMessage()),eee);
+// }
+// return null;
}
public static Object checkScript(Context uiContext, AbstractFrame frame,
@@ -655,8 +674,6 @@
List<File> dirFound = new ArrayList<File>();
List<File> dirWithFileFound = new ArrayList<File>();
- FileFilter excludeFilter = getSCRIPT_FILE_FILTER();
-
for (TreePath selectedPath : selectedPaths) {
TreeNodeWrapper node = (TreeNodeWrapper) selectedPath.getPathComponent(1);
@@ -690,7 +707,17 @@
for (File dir : dirFound) {
// take all files and directories in the dir
// (without VCS and data dirs)
- SVNMigrateHelper.grabbFiles(dir, excludeFilter, listF);
+// SVNMigrateHelper.grabbFiles(dir, excludeFilter, listF);
+
+
+ // getFilteredElements use include file filter, we inverse excludeFilter
+ FileFilter filter = new FileFilter() {
+ FileFilter excludeFilter = getSCRIPT_FILE_FILTER();
+ public boolean accept(File pathname) {
+ return !excludeFilter.accept(pathname);
+ }
+ };
+ listF.addAll(FileUtil.getFilteredElements(dir, filter, true));
}
for (File file : listF)
result.add(file.getAbsolutePath().substring(prefixLength));
@@ -798,7 +825,7 @@
"import java.io.Writer;\n" +
"\n" +
- "import static org.codelutin.i18n.I18n._;\n" +
+ "import static org.codelutin.i18n.I18nf._;\n" +
"import org.codelutin.math.matrix.*;\n" +
"\n" +
"import fr.ifremer.isisfish.util.Doc;\n" +
@@ -863,7 +890,7 @@
*/
"package rules{0};\n" +
"\n" +
- "import static org.codelutin.i18n.I18n._;\n" +
+ "import static org.codelutin.i18n.I18nf._;\n" +
"\n" +
"import org.apache.commons.logging.Log;\n" +
"import org.apache.commons.logging.LogFactory;\n" +
@@ -966,7 +993,7 @@
*/
"package analyseplans{0};\n" +
"\n" +
- "import static org.codelutin.i18n.I18n._;\n" +
+ "import static org.codelutin.i18n.I18nf._;\n" +
"\n" +
"import org.apache.commons.logging.Log;\n" +
"import org.apache.commons.logging.LogFactory;\n" +
@@ -1104,7 +1131,7 @@
public static FileFilter getSCRIPT_FILE_FILTER() {
if (SCRIPT_FILE_FILTER == null) {
- SCRIPT_FILE_FILTER = new ScriptFileFilter(IsisFish.config.getVCS());
+ SCRIPT_FILE_FILTER = new ScriptFileFilter(IsisFish.vcs);
}
return SCRIPT_FILE_FILTER;
}
Deleted: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/ExportDialog.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/ExportDialog.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/ExportDialog.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -1,109 +0,0 @@
-/*
-* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin,
-* Benjamin Poussin, Tony Chemit
-*
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-* ##% */
-package fr.ifremer.isisfish.ui.script;
-
-import fr.ifremer.isisfish.ui.UIHelper;
-import fr.ifremer.isisfish.ui.script.jaxx.JExportDialog;
-import fr.ifremer.isisfish.ui.util.IDialog;
-import org.codelutin.vcs.ui.FieldModelUtil;
-
-import javax.swing.AbstractAction;
-import javax.swing.JScrollPane;
-
-public class ExportDialog extends JExportDialog implements IDialog {
-
- private static final long serialVersionUID = 3713567360166530726L;
- /**
- * ok action to be burned by {@link #getOk()} button
- */
- protected AbstractAction okAction;
- /**
- * cancel action to be burned by {@link #getCancel()} button
- */
- protected AbstractAction cancelAction;
- /**
- * maximum width authorized
- */
- protected int maxWidth;
- /**
- * minimum height authorized
- */
- protected int minHeight;
- /**
- * maximum height authorized
- */
- protected int maxHeight;
-
- public int computeHeight() {
- int height = minHeight;
- if (!isEmpty()) {
- height += 16 * (model.getRowCount());
- }
- return height;
- }
-
- public int computeWidth() {
- return maxWidth;
- }
-
- public void prepareDialog(int nbRows,
- FieldModelUtil.ModuleFile model,
- String absolutePath,
- AbstractAction okAction,
- AbstractAction cancelAction,
- boolean show) {
- items.setModel(this.model = model);
- archivePath.setText(absolutePath);
-
- if (!isEmpty()) {
- // check all items (check really items before coming here...)
- checkAll.setSelected(true);
- }
-
- table.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
- //items.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
- int maxWidth = 400;
- if (!isEmpty()) {
- UIHelper.setColumnsWidth(items, 10, 100, maxWidth - (items.getRowCount() > nbRows ? 16 : -2) - (6 * 3) - 100 - 10);
- }
- UIHelper.prepareDialog(this, okAction, cancelAction, show, maxWidth, 136, 136 + (16 * nbRows));
- }
-
- public void setOkAction(AbstractAction okAction) {
- this.okAction = okAction;
- }
-
- public void setCancelAction(AbstractAction cancelAction) {
- this.cancelAction = cancelAction;
- }
-
- public void setMaxWidth(int maxWidth) {
- this.maxWidth = maxWidth;
- }
-
- public void setMinHeight(int minHeight) {
- this.minHeight = minHeight;
- }
-
- public void setMaxHeight(int maxHeight) {
- this.maxHeight = maxHeight;
- }
-
-}
Deleted: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/ImportDialog.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/ImportDialog.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/ImportDialog.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -1,125 +0,0 @@
-package fr.ifremer.isisfish.ui.script;
-
-import fr.ifremer.isisfish.ui.UIHelper;
-import static fr.ifremer.isisfish.ui.UIHelper.setColumnsWidth;
-import fr.ifremer.isisfish.ui.script.jaxx.JImportDialog;
-import fr.ifremer.isisfish.ui.util.IDialog;
-import org.codelutin.vcs.ui.FieldModelUtil;
-
-import javax.swing.AbstractAction;
-import static javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER;
-import java.io.File;
-
-public class ImportDialog extends JImportDialog implements IDialog {
-
- private static final long serialVersionUID = 7147876575187312082L;
- /** ok action to be burned by {@link #getOk()} button */
- protected AbstractAction okAction;
- /** cancel action to be burned by {@link #getCancel()} button */
- protected AbstractAction cancelAction;
- /** maximum width authorized */
- protected int maxWidth;
- /** minimum height authorized */
- protected int minHeight;
- /** maximum height authorized */
- protected int maxHeight;
- /** maximum number of row */
- protected int nbRowMax;
-
- public int computeWidth() {
- return maxWidth;
- }
-
- public int computeHeight() {
- int height = minHeight;
- boolean noNew = isNewItemEmpty();
- boolean noConflict = isItemEmpty();
- boolean noOne = isEmpty();
- int nbRow = 0;
- int nbRowNew = 0;
- int nbT = 0;
- if (!noNew) {
- nbRowNew = modelNewItems.getRowCount();
- nbT++;
- }
- if (!noConflict) {
- nbRow = modelItems.getRowCount();
- nbT++;
- }
- if (!noOne) {
- height += 28;
- }
- if (!noConflict) {
- height += 28;
- }
- int max = nbRow > nbRowNew ? nbRow : nbRowNew;
- if (nbT == 1) {
- if (noConflict) {
- height+=16;
- if (max <= nbRowMax) {
- height += 16;
- }
- }
- } else if (nbT == 2) {
- //TODO Finish it
- }
- height += nbT == 2 ? 16 * ((2 * (max + 2))) : 16 * (nbRow + nbRowNew + 1);
- return height;
- }
-
- public void prepareDialog(int nbRows,
- FieldModelUtil.ModuleFile modelNewItems,
- FieldModelUtil.ModuleFile<String> modelItems,
- File source,
- AbstractAction okAction,
- AbstractAction cancelAction,
- boolean show) {
- nbRowMax = nbRows;
- if (modelItems != null) {
- items.setModel(this.modelItems = modelItems);
- }
- if (modelNewItems != null) {
- newItems.setModel(this.modelNewItems = modelNewItems);
- }
- archivePath.setText(source.getAbsolutePath());
- this.archivePath.setEditable(false);
-
- table1.setHorizontalScrollBarPolicy(HORIZONTAL_SCROLLBAR_NEVER);
- table2.setHorizontalScrollBarPolicy(HORIZONTAL_SCROLLBAR_NEVER);
-
- if (!isEmpty()) {
- checkAll.setSelected(true);
- }
- int maxWidth = 450;
- int minHeight = 67;
- if (!isItemEmpty()) {
- setColumnsWidth(items, 10, 100, maxWidth - (items.getRowCount() > nbRows ? 16 : -2) - (6 * 3) - 100 - 10);
- }
- if (!isNewItemEmpty()) {
- setColumnsWidth(newItems, 10, 100, maxWidth - (newItems.getRowCount() > nbRows ? 16 : -2) - (6 * 3) - 100 - 10);
- }
-
- UIHelper.prepareDialog(this, okAction, cancelAction, show, maxWidth, minHeight, minHeight + (16 * nbRows));
- }
-
- public void setOkAction(AbstractAction okAction) {
- this.okAction = okAction;
- }
-
- public void setCancelAction(AbstractAction cancelAction) {
- this.cancelAction = cancelAction;
- }
-
- public void setMaxWidth(int maxWidth) {
- this.maxWidth = maxWidth;
- }
-
- public void setMinHeight(int minHeight) {
- this.minHeight = minHeight;
- }
-
- public void setMaxHeight(int maxHeight) {
- this.maxHeight = maxHeight;
- }
-
-}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/action/ChooseFileAction.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/action/ChooseFileAction.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/action/ChooseFileAction.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -1,6 +1,6 @@
package fr.ifremer.isisfish.ui.script.action;
-import org.codelutin.i18n.I18n;
+import static org.codelutin.i18n.I18nf._;
import javax.swing.AbstractAction;
import javax.swing.JDialog;
@@ -37,7 +37,7 @@
}
JFileChooser chooser = new JFileChooser(dir);
chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
- int ret = chooser.showDialog(dialog, I18n._("isisfish.message.choose.archive"));
+ int ret = chooser.showDialog(dialog, _("isisfish.message.choose.archive"));
if (ret == JFileChooser.APPROVE_OPTION) {
File newFile = chooser.getSelectedFile();
String path;
Deleted: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/action/ExportAction.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/action/ExportAction.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/action/ExportAction.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -1,118 +0,0 @@
-/*
-* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin,
-* Benjamin Poussin, Tony Chemit
-*
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-* ##% */
-package fr.ifremer.isisfish.ui.script.action;
-
-import fr.ifremer.isisfish.IsisFishRuntimeException;
-import fr.ifremer.isisfish.ui.util.IsisAction;
-import org.codelutin.vcs.ui.FieldModelUtil.ModuleFile;
-
-import static org.codelutin.i18n.I18n._;
-import org.codelutin.util.ZipUtil;
-import org.codelutin.util.StringUtil;
-
-import org.apache.commons.logging.Log;
-import static org.apache.commons.logging.LogFactory.getLog;
-
-import javax.swing.JDialog;
-import static javax.swing.JOptionPane.CANCEL_OPTION;
-import static javax.swing.JOptionPane.YES_OPTION;
-import static javax.swing.JOptionPane.showConfirmDialog;
-import javax.swing.JTextField;
-import java.awt.event.ActionEvent;
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-public class ExportAction extends IsisAction {
-
- static private Log log = getLog(ExportAction.class);
-
- protected ModuleFile<String> model;
- protected JTextField file;
- protected File root;
-
- private List<String> selected;
- private File dst;
- private static final long serialVersionUID = 3373564473968724365L;
-
- public ExportAction(JDialog dialog, JTextField file, File root,
- ModuleFile<String> model) {
- super(dialog);
- this.file = file;
- this.root = root;
- this.model = model;
- }
-
- protected boolean prepare() {
- dst = new File(file.getText());
-
- if ("".equals(dst.getAbsolutePath())) return false;
-
- if (dst.exists()) {
- int resp = showConfirmDialog(dialog,_("isisfish.message.file.already.exists", dst));
- if (resp == CANCEL_OPTION) {
- dialog.dispose();
- return false;
- }
- if (resp == YES_OPTION) {
- dst.getParentFile().mkdirs();
- }
- else {
- return false;
- }
- } else if (!dst.getParentFile().exists()) {
- int resp = showConfirmDialog(dialog,_("isisfish.message.directory.not.exists", dst));
- if (resp == CANCEL_OPTION) {
- dialog.dispose();
- return false;
- }
- if (resp == YES_OPTION) {
- dst.getParentFile().mkdirs();
- }
- else return false;
- }
-
- selected = model.getSelected(0);
-
- return !(selected == null || selected.isEmpty());
- }
-
- protected void perform(ActionEvent e) {
- try {
-
- List<File> toZip = new ArrayList<File>();
-
- for (String path : selected) {
- toZip.add(new File(root, path));
- log.info(_("isisfish.message.export.path.tozip",path));
- }
-
- if (dst.exists()) dst.delete();
-
- dst.createNewFile();
-
- ZipUtil.compressFiles(dst, root, toZip);
- log.info(_("isisfish.message.export.result",toZip.size(), dst,StringUtil.convertMemory(dst.length())));
- } catch (IOException e1) {
- throw new IsisFishRuntimeException(e1);
- }
- }
-}
\ No newline at end of file
Deleted: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/action/ImportAction.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/action/ImportAction.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/action/ImportAction.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -1,90 +0,0 @@
-package fr.ifremer.isisfish.ui.script.action;
-
-import fr.ifremer.isisfish.ui.util.IsisActionWithBackup;
-import org.codelutin.vcs.ui.FieldModelUtil.ModuleFile;
-import org.apache.commons.logging.Log;
-import static org.apache.commons.logging.LogFactory.getLog;
-import org.codelutin.util.ZipUtil;
-
-import javax.swing.JDialog;
-import java.awt.event.ActionEvent;
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-public class ImportAction extends IsisActionWithBackup {
-
- /**
- * model to contains new files to add from import
- */
- protected ModuleFile<String> model;
- /**
- * model to contains files conflicted from import
- */
- protected ModuleFile<String> modelWithBackup;
- /**
- * location of archive to import
- */
- protected File source;
- /**
- * List of relative path to import (is init in {@link #prepare()} method)
- */
- private List<String> toImport;
- private static final long serialVersionUID = 2459027106690418279L;
-
- public ImportAction(JDialog dialog, File source, File root,
- ModuleFile<String> modelNewItems,
- ModuleFile<String> modelItems) {
- super(dialog, root);
- this.source = source;
- this.model = modelNewItems;
- this.modelWithBackup = modelItems;
- }
-
- protected void perform(ActionEvent e) {
-
- // do backup stuff
- super.perform(e);
-
- // unflate files to destination (root)
- try {
- for (String newFile : toImport) {
- log.info("unzip " + newFile);
- }
- ZipUtil.uncompress(source, root, toImport,null,null);
-
- } catch (IOException e1) {
- throw new RuntimeException(e1);
- }
- log.info("unzip " + toImport.size() + " entry(ies) from '" + source + "'");
- toImport.clear();
- }
-
- protected boolean prepare() {
- if (source == null || (model == null && modelWithBackup == null) ||
- "".equals(source.getAbsolutePath())) return false;
-
- toImport = new ArrayList<String>();
- if (model != null) {
- // add new files
- toImport.addAll(model.getSelected(0));
- }
-
- if (modelWithBackup != null) {
- // add selected files (force overwrite)
- toImport.addAll(modelWithBackup.getSelected(0));
- }
-
- return !toImport.isEmpty();
- }
-
- protected List<String> getFilesToBackup() {
- List<String> toBackup = new ArrayList<String>();
- if (modelWithBackup != null)
- toBackup.addAll(modelWithBackup.getSelected(0));
- return toBackup;
- }
-
- static private Log log = getLog(ImportAction.class);
-}
\ No newline at end of file
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/simulator/SimulatorAction.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/simulator/SimulatorAction.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/simulator/SimulatorAction.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -49,7 +49,7 @@
import fr.ifremer.isisfish.ui.widget.filter.FilterModel;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import org.codelutin.topia.TopiaContext;
import org.swixat.framework.AbstractFrame;
import org.swixat.framework.OutputView;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/simulator/SimulatorListeners.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/simulator/SimulatorListeners.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/simulator/SimulatorListeners.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -4,7 +4,7 @@
import fr.ifremer.isisfish.ui.widget.EnabledIfListNotEmpty;
import fr.ifremer.isisfish.ui.widget.EnabledIfItemSelectedInList;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -85,8 +85,7 @@
public static void initButtonRemoveIfItemSelected(
final JButton button, final JList list) {
if (button == null || list == null) {
- log.warn(_("isisfish.error.init.remove.button" +
- "or list is null) button : {0}, list : {1}", button, list));
+ log.warn(_("isisfish.error.init.remove.button", button, list));
return;
}
button.setEnabled(list.getSelectedIndex() > -1);
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/simulator/filter/SimulationFilterUtil.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/simulator/filter/SimulationFilterUtil.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/simulator/filter/SimulationFilterUtil.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -5,7 +5,7 @@
import fr.ifremer.isisfish.ui.widget.filter.FilterModel;
import fr.ifremer.isisfish.ui.widget.filter.FilterParamModel;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/widget/editor/EquationTableEditor.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/widget/editor/EquationTableEditor.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/widget/editor/EquationTableEditor.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,12 +31,12 @@
package fr.ifremer.isisfish.ui.widget.editor;
+import static org.codelutin.i18n.I18nf._;
+
import fr.ifremer.isisfish.IsisFishRuntimeException;
import fr.ifremer.isisfish.entities.Equation;
import fr.ifremer.isisfish.ui.input.EquationEditorPane;
-import org.codelutin.i18n.I18n;
-
import javax.swing.JButton;
import javax.swing.JTable;
import javax.swing.event.CellEditorListener;
@@ -89,7 +89,7 @@
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column){
equation = (Equation)value;
- String name = I18n._("isisfish.common.empty");
+ String name = _("isisfish.common.empty");
if (equation != null) {
name = equation.getName();
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/util/CompileHelper.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/util/CompileHelper.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/util/CompileHelper.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,7 +31,7 @@
package fr.ifremer.isisfish.util;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import java.io.File;
import java.io.IOException;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/util/DocHelper.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/util/DocHelper.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/util/DocHelper.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -1,6 +1,6 @@
package fr.ifremer.isisfish.util;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/util/EvaluatorHelper.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/util/EvaluatorHelper.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/util/EvaluatorHelper.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -31,7 +31,7 @@
package fr.ifremer.isisfish.util;
-import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18nf._;
import java.io.File;
import java.io.IOException;
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/AbstractVCS.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/AbstractVCS.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/AbstractVCS.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -20,10 +20,23 @@
package fr.ifremer.isisfish.vcs;
+import fr.ifremer.isisfish.IsisConfig;
+import fr.ifremer.isisfish.IsisFish;
+import fr.ifremer.isisfish.IsisFishRuntimeException;
+import fr.ifremer.isisfish.datastore.AnalysePlanStorage;
+import fr.ifremer.isisfish.datastore.ExportStorage;
+import fr.ifremer.isisfish.datastore.FormuleStorage;
+import fr.ifremer.isisfish.datastore.RegionStorage;
+import fr.ifremer.isisfish.datastore.RuleStorage;
+import fr.ifremer.isisfish.datastore.ScriptStorage;
+import fr.ifremer.isisfish.datastore.SimulationStorage;
+import fr.ifremer.isisfish.datastore.SimulatorStorage;
import java.io.File;
+import java.text.SimpleDateFormat;
+import java.util.Date;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.codelutin.util.ApplicationConfig;
+import org.codelutin.topia.TopiaException;
/**
*
@@ -38,12 +51,92 @@
/** to use log facility, just put in your code: log.info(\"...\"); */
static private Log log = LogFactory.getLog(AbstractVCS.class);
- protected ApplicationConfig config;
+ protected File localRepository;
+ protected String protocol;
+ protected String host;
+ protected String path;
+ protected String tag;
+ protected File sshKeyFile;
+ protected String login;
+ protected String password;
+
+ public AbstractVCS(File localRepository,
+ String protocol, String host, String path, String tag,
+ File sshKeyFile, String login, String password) {
+ this.localRepository = localRepository;
+ this.protocol = protocol;
+ this.host = host;
+ this.path = path;
+ this.tag = tag;
+ this.sshKeyFile = sshKeyFile;
+ this.login = login;
+ this.password = password;
+ }
- public AbstractVCS(ApplicationConfig config) {
- this.config = config;
+ public File getLocalRepository() {
+ return localRepository;
}
+
+ public void setLocalRepository(File localRepository) {
+ this.localRepository = localRepository;
+ }
+ public String getProtocol() {
+ return protocol;
+ }
+
+ public void setProtocol(String protocol) {
+ this.protocol = protocol;
+ }
+
+ public String getHost() {
+ return host;
+ }
+
+ public void setHost(String host) {
+ this.host = host;
+ }
+
+ public String getPath() {
+ return path;
+ }
+
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ public String getTag() {
+ return tag;
+ }
+
+ public void setTag(String tag) {
+ this.tag = tag;
+ }
+
+ public File getSshKeyFile() {
+ return sshKeyFile;
+ }
+
+ public void setSshKeyFile(File sshKeyFile) {
+ this.sshKeyFile = sshKeyFile;
+ }
+
+ public String getLogin() {
+ return login;
+ }
+
+ public void setLogin(String login) {
+ this.login = login;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
public boolean accept(File pathname) {
return isVersionnableAbleFile(pathname);
}
@@ -53,4 +146,82 @@
return !".svn".equals(filename) && !"CVS".equals(filename) && !filename.endsWith("~");
}
+ /**
+ * Verifie la connexion et si le protocole a change, switch le repository
+ * pour utiliser le nouveau protocole. Si on est en mode interface (mode
+ * graphique) et que le switch se passe mal, demande a l'utilisateur
+ * de nouvelle valeur pour le protocole (+ identifiant, ...)
+ */
+ public void checkProtocol() throws VCSException {
+ if (isConnected()) {
+ // Si le repo local exist mais n'est pas en svn, on renome ce repertoire
+ // FIXME a faire
+ File local = getLocalRepository();
+ if(local.exists()) {
+ File svn = new File(local, ".svn");
+ if (!svn.exists()) {
+ File localBackup = new File(local.getParentFile(),
+ local.getName() + "-" +
+ new SimpleDateFormat().format(new Date()));
+ if(!local.renameTo(localBackup)) {
+ throw new IsisFishRuntimeException("Can rename local repository that don't use svn");
+ }
+ }
+ }
+
+ // Si le repo local n'existe pas on fait un check out complet
+ if (!local.exists()) {
+ // On modifie la version a a checkouter pour etre sur d'avoir la bonne
+
+ AnalysePlanStorage.checkout();
+ ExportStorage.checkout();
+ FormuleStorage.checkout();
+ RuleStorage.checkout();
+ ScriptStorage.checkout();
+ SimulatorStorage.checkout();
+
+ checkout(getLocalRepository(), SimulationStorage.SIMULATION_PATH, false);
+ checkout(getLocalRepository(), RegionStorage.REGION_PATH, false);
+ try {
+ RegionStorage.checkout("DemoRegion");
+ } catch (TopiaException eee) {
+ log.warn("Can't checkout DemoRegion", eee);
+ }
+ }
+
+ if (!local.exists()) {
+ throw new IsisFishRuntimeException("Can't find local repository");
+ }
+ // si le protocole a change on le change
+// if (getLocalTag() != )
+ // FIXME a faire
+ }
+ }
+
+ /**
+ * Verifie que l'utilisateur utilise la bonne version de script en fonction
+ * de sa version de logiciel. Si ce n'est pas le cas et que l'on est en
+ * interactif (mode graphique), on lui demande ce qu'il souhaite faire.
+ */
+ public void checkRelease() throws VCSException {
+ if (isConnected()) {
+ // Si on utilise pas la bonne branche on change de branche
+ // FIXME a faire
+ }
+ }
+
+ /**
+ * Verifie si tous les fichiers du repository local sont les dernieres
+ * version par rapport au serveur. Si ce n'est pas le cas et que l'on est
+ * en mode interactif (mode graphique), on lui propose de mettre a jour
+ * les fichiers, avec la possibilite de voir les changements sur les
+ * fichiers
+ */
+ public void checkFileStatus() throws VCSException {
+ if (isConnected()) {
+ // si des fichiers ont ete mis a jour sur le serveur on se synchronise
+ // FIXME a faire
+ }
+ }
+
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCS.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCS.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCS.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -38,10 +38,18 @@
public static final String TYPE_NONE = "none";
public static final String TYPE_SVN = "svn";
/**
+ * can be None, CVS or SVN. only None or SVN work
+ */
+ public static final String VCS_TYPE = "vcs.type";
+ /**
* can be http, ssh, pserver, ...
*/
public static final String VCS_PROTOCOLE = "vcs.protocole";
/**
+ * ssh key file
+ */
+ public static final String VCS_SSH_KEY_FILE = "vcs.ssh.keyFile";
+ /**
* remote server adresse (ip or serveur name) ex: labs.libre-entreprise.org
*/
public static final String VCS_HOST_NAME = "vcs.hostName";
@@ -50,23 +58,41 @@
*/
public static final String VCS_PATH = "vcs.path";
/**
- * repository tag to used ex: "3.2" or "" for no tag
+ * repository tag to used ex: "/branches/3.2" or "HEAD", "/trunk" or ""
*/
public static final String VCS_TAG = "vcs.tag";
/**
- * can be None, CVS or SVN. only None or SVN work
- */
- public static final String VCS_TYPE = "vcs.type";
- /**
* user login to access vcs ex: bpoussin
*/
public static final String VCS_USER_NAME = "vcs.username";
/**
- * user passwd or passphrase to access vcs ex: xxxxxxxx
+ * user passwd or passphrase (protocole dependent) to access vcs ex: xxxxxxxx
*/
public static final String VCS_USER_PASSWORD = "vcs.password";
/**
+ * Get local repository directory
+ */
+ public File getLocalRepository();
+
+ /**
+ * Get the server address of the local file
+ * ex: svn+ssh://bpoussin at labs.libre-entreprise.org/svnroot/isis-fish/trunk/isis-fish/pom.xml
+ *
+ * @param f file that we want to know the source
+ * @return
+ */
+ public String getLocalRepositorySource(File f) throws VCSException;
+
+ /**
+ * Get the root server address of the local repository
+ * ex: svn+ssh://bpoussin at labs.libre-entreprise.org/svnroot/isis-fish
+ *
+ * @return
+ */
+ public String getLocalRepositoryRoot() throws VCSException;
+
+ /**
* Usefull to permit to use VCSNone as filter
* @param pathname
* @return
@@ -74,6 +100,14 @@
public boolean accept(File pathname);
/**
+ * Commit specified files
+ * @param files files to commit
+ * @param msg message used to commit
+ * @throws fr.ifremer.isisfish.vcs.VCSException
+ */
+ public void commit(List<File> files, String msg) throws VCSException;
+
+ /**
* Add and commit file in server repository
* @param files list of file to add
* @param msg message for commit
@@ -85,10 +119,10 @@
* get repository module on server and put it in destDir
* @param destDir destination directory
* @param module module name
- * @param b // FIXME
+ * @param recurse if file is directory checkout sub file
* @throws fr.ifremer.isisfish.vcs.VCSException
*/
- public void checkout(File destDir, String module, boolean b) throws VCSException;
+ public void checkout(File destDir, String module, boolean recurse) throws VCSException;
/**
* Change repository tag, used when we use some tag and we want to go to
@@ -193,10 +227,34 @@
/**
* Update file
- * @param file file to update
+ * @param files files to update
* @return true if there are some merging conflict, false otherwize
* @throws fr.ifremer.isisfish.vcs.VCSException
*/
- public boolean update(File file) throws VCSException;
+ public boolean update(List<File> files) throws VCSException;
+ /**
+ * Verifie la connexion et si le protocole a change, switch le repository
+ * pour utiliser le nouveau protocole. Si on est en mode interface (mode
+ * graphique) et que le switch se passe mal, demande a l'utilisateur
+ * de nouvelle valeur pour le protocole (+ identifiant, ...)
+ */
+ void checkProtocol() throws VCSException;
+
+ /**
+ * Verifie si tous les fichiers du repository local sont les dernieres
+ * version par rapport au serveur. Si ce n'est pas le cas et que l'on est
+ * en mode interactif (mode graphique), on lui propose de mettre a jour
+ * les fichiers, avec la possibilite de voir les changements sur les
+ * fichiers
+ */
+ void checkFileStatus() throws VCSException;
+
+ /**
+ * Verifie que l'utilisateur utilise la bonne version de script en fonction
+ * de sa version de logiciel. Si ce n'est pas le cas et que l'on est en
+ * interactif (mode graphique), on lui demande ce qu'il souhaite faire.
+ */
+ void checkRelease() throws VCSException;
+
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSFactory.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSFactory.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSFactory.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -19,6 +19,8 @@
package fr.ifremer.isisfish.vcs;
+import fr.ifremer.isisfish.IsisConfig;
+import java.io.File;
import static org.codelutin.i18n.I18nf._;
import java.util.Properties;
@@ -26,9 +28,9 @@
import org.apache.commons.beanutils.ConvertUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.codelutin.util.ApplicationConfig;
/**
+ * Permet de recupere le bon VCS en fonction de la configuration
*
* @author poussin
* @version $Revision$
@@ -49,7 +51,7 @@
* @param config
* @return usable VCSNone
*/
- static public VCSNone createVCS(ApplicationConfig config) {
+ static public VCSNone createVCS(IsisConfig config) {
Properties aliases = new Properties();
// for empty and TYPE_NONE we used this class
aliases.setProperty("", VCSNone.class.getName());
@@ -62,13 +64,24 @@
String type = config.getOption(VCS.VCS_TYPE);
// try to convert if type is not class name but an alias
String classname = aliases.getProperty(type, type);
+
+ File dataDir = config.getDatabaseDirectory();
+ String protocol = config.getOption(VCS.VCS_PROTOCOLE);
+ String host = config.getOption(VCS.VCS_HOST_NAME);
+ String path = config.getOption(VCS.VCS_PATH);
+ String tag = config.getOption(VCS.VCS_TAG);
+ File sshKeyFile = config.getOptionAsFile(VCS.VCS_SSH_KEY_FILE);
+ String login = config.getOption(VCS.VCS_USER_NAME);
+ String password = config.getOption(VCS.VCS_USER_PASSWORD);
+
try {
- Class clazz = (Class)ConvertUtils.convert(classname, Class.class);
- result = (VCSNone) ConstructorUtils.invokeConstructor(clazz, config);
+ Class clazz = (Class) ConvertUtils.convert(classname, Class.class);
+ result = (VCSNone) ConstructorUtils.invokeConstructor(clazz,
+ new Object[]{dataDir, protocol, host, path, tag, sshKeyFile, login, password});
} catch (Exception eee) {
log.error(_("Can't instanciate wanted VCS (%s), use default",
config.getOption(VCS.VCS_TYPE)), eee);
- result = new VCSNone(config);
+ result = new VCSNone(dataDir, protocol, host, path, tag, sshKeyFile, login, password);
}
return result;
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSNone.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSNone.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSNone.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -19,6 +19,7 @@
package fr.ifremer.isisfish.vcs;
+import fr.ifremer.isisfish.IsisConfig;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
@@ -28,7 +29,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.codelutin.util.ApplicationConfig;
import org.codelutin.util.VersionNumber;
/**
@@ -46,8 +46,10 @@
/** to use log facility, just put in your code: log.info(\"...\"); */
static private Log log = LogFactory.getLog(VCSNone.class);
- public VCSNone(ApplicationConfig config) {
- super(config);
+ public VCSNone(File localRepository,
+ String protocol, String host, String path, String tag,
+ File sshKeyFile, String login, String password) {
+ super(localRepository, protocol, host, path, tag, sshKeyFile, login, password);
}
/**
@@ -84,6 +86,10 @@
public Map<File, String> getChanglog(List<File> files) {
return new HashMap<File, String>();
}
+
+ public void commit(List<File> files, String msg) throws VCSException {
+ throw new VCSException("Can't commit file with dummy VCS");
+ }
/**
* Add and commit file in server repository
@@ -166,11 +172,11 @@
/**
* Update file
- * @param file file to update
+ * @param files file to update
* @return true if there are some merging conflict, false otherwize
* @throws fr.ifremer.isisfish.vcs.VCSException
*/
- public boolean update(File file) throws VCSException {
+ public boolean update(List<File> files) throws VCSException {
throw new VCSException("Can't update file with dummy VCS");
}
@@ -182,5 +188,13 @@
// do nothing
}
+ public String getLocalRepositorySource(File f) throws VCSException {
+ throw new VCSException("Not supported.");
+ }
+
+ public String getLocalRepositoryRoot() throws VCSException {
+ throw new VCSException("Not supported.");
+ }
+
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSSVN.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSSVN.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSSVN.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -19,14 +19,25 @@
package fr.ifremer.isisfish.vcs;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import static org.codelutin.i18n.I18nf._;
+import fr.ifremer.isisfish.IsisConfig;
import java.io.File;
import java.util.List;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.codelutin.util.ApplicationConfig;
import org.codelutin.util.VersionNumber;
+import org.tmatesoft.svn.core.SVNCommitInfo;
+import org.tmatesoft.svn.core.SVNException;
+import org.tmatesoft.svn.core.SVNURL;
+import org.tmatesoft.svn.core.wc.ISVNOptions;
+import org.tmatesoft.svn.core.wc.SVNClientManager;
+import org.tmatesoft.svn.core.wc.SVNInfo;
+import org.tmatesoft.svn.core.wc.SVNRevision;
+import org.tmatesoft.svn.core.wc.SVNWCUtil;
/**
*
@@ -41,20 +52,147 @@
/** to use log facility, just put in your code: log.info(\"...\"); */
static private Log log = LogFactory.getLog(VCSSVN.class);
- public VCSSVN(ApplicationConfig config) {
- super(config);
+ protected String protocol;
+ protected String host;
+ protected String path;
+ protected String tag;
+ protected File sshKeyFile;
+ protected String login;
+ protected String password;
+
+ protected SVNClientManager svnManager = null;
+
+ public VCSSVN(File localRepository,
+ String protocol, String host, String path, String tag,
+ File sshKeyFile, String login, String password) {
+ super(localRepository, protocol, host, path, tag, sshKeyFile, login, password);
}
+
+ protected SVNClientManager getSVNManager() {
+ if (svnManager == null) {
+ String login = getLogin();
+ String passwd = getPassword();
+ if (getProtocol().contains("ssh")) {
+ ISVNOptions options = SVNWCUtil.createDefaultOptions(true);
+ options.setPropertyValue("svnkit.ssh2.key", getSshKeyFile().getAbsolutePath());
+ options.setPropertyValue("svnkit.ssh2.username", login);
+ if (passwd != null && !"".equals(passwd)) {
+ options.setPropertyValue("svnkit.ssh2.passphrase", passwd);
+ }
+ svnManager = SVNClientManager.newInstance(options);
+ } else {
+ ISVNOptions options = SVNWCUtil.createDefaultOptions(true);
+ svnManager = SVNClientManager.newInstance(options, login, passwd);
+ }
+ }
+ return svnManager;
+ }
+
+ protected SVNURL getRemoteURL() throws SVNException {
+ SVNURL remoteURL = SVNURL.parseURIEncoded(getRemoteRepository());
+ return remoteURL;
+ }
+
+ public String getLocalRepositoryRoot() throws VCSException {
+ try {
+ File localRoot = getLocalRepository();
+ SVNInfo info = getSVNManager().getWCClient().doInfo(localRoot, SVNRevision.WORKING);
+ SVNURL url = info.getCopyFromURL();
+ String result = url.toDecodedString();
+ return result;
+ } catch (SVNException eee) {
+ throw new VCSException(_("Can't get address on serveur of local repository"), eee);
+ }
+ }
+
+ public String getLocalRepositorySource(File f) throws VCSException {
+ try {
+ // TODO perhaps, check if file is in getLocalRepository() file ?
+ SVNInfo info = getSVNManager().getWCClient().doInfo(f, SVNRevision.WORKING);
+ SVNURL url = info.getURL();
+ String result = url.toDecodedString();
+ return result;
+ } catch (SVNException eee) {
+ throw new VCSException(_("Can't get address on serveur of local repository"), eee);
+ }
+ }
+
+ /**
+ * Retourne l'url du repository distant
+ * ex: ssh+svn://labs.le.org/svnroot/isis-fish/data/branches/3.2
+ * @return
+ */
+ public String getRemoteRepository() {
+ String proto = getProtocol();
+ String host = getHost();
+ String path = getPath();
+ String tag = getTag();
+
+ if (tag == null && "".equals(tag)) {
+ tag = "/trunk";
+ }
+
+ String result = proto + "://" + host + path + tag;
+ return result;
+ }
+
+ @Override
+ public boolean isVersionnableAbleFile(File file) {
+ boolean result = super.isVersionnableAbleFile(file);
+ result = result && !getSVNManager().getOptions().isIgnored(file);
+ return result;
+ }
+
+ public void commit(List<File> files, String msg) throws VCSException {
+ try {
+ SVNCommitInfo commitInfo = getSVNManager().getCommitClient()
+ .doCommit(files.toArray(new File[files.size()]),
+ false, msg, false, true);
+ log.debug("to revision " + commitInfo.getNewRevision());
+ } catch (SVNException eee) {
+ throw new VCSException("Can't commit files", eee);
+ }
+ }
+
public void add(List<File> files, String msg) throws VCSException {
- throw new UnsupportedOperationException("Not supported yet.");
+ try {
+ for (File file : files) {
+ // FIXME check argument in documentation
+ getSVNManager().getWCClient().doAdd(file,
+ true, // force add to allready added file (no error)
+ false, // don't create dir if not exist
+ true, // add parent dir if is not versionned
+ false, // no recurse
+ false); // don't add ignore file
+ }
+ commit(files, msg);
+ } catch (SVNException eee) {
+ throw new VCSException("Can't add file", eee);
+ }
}
- public void checkout(File destDir, String module, boolean b) throws VCSException {
- throw new UnsupportedOperationException("Not supported yet.");
+ public void checkout(File destDir, String module, boolean recurse) throws VCSException {
+ try {
+ SVNURL source = getRemoteURL().appendPath(module, false);
+ File destination = new File(destDir, module);
+ getSVNManager().getUpdateClient().doCheckout(source, destination, null,
+ SVNRevision.HEAD, recurse);
+ } catch (SVNException eee) {
+ throw new VCSException(_("Can't checkout file %s", module), eee);
+ }
}
public void delete(List<File> files, String msg) throws VCSException {
- throw new UnsupportedOperationException("Not supported yet.");
+ try {
+ for (File file : files) {
+ // FIXME check argument in documentation
+ getSVNManager().getWCClient().doDelete(file, true, msg != null, false);
+ }
+ commit(files, msg);
+ } catch (SVNException eee) {
+ throw new VCSException("Can't add file", eee);
+ }
}
public Map<File, String> getChanglog(List<File> files) {
@@ -93,8 +231,15 @@
throw new UnsupportedOperationException("Not supported yet.");
}
- public boolean update(File file) throws VCSException {
- throw new UnsupportedOperationException("Not supported yet.");
+ public boolean update(List<File> files) throws VCSException {
+ for (File file : files) {
+ try {
+ getSVNManager().getUpdateClient().doUpdate(file, SVNRevision.HEAD, true);
+ } catch (SVNException eee) {
+ throw new VCSException("Can't update files", eee);
+ }
+ }
+ return false; // FIXME rechercher s'il y a eu des conflits dans les fichiers
}
public void switchTag(VersionNumber version) throws VCSException {
Deleted: trunk/isis-fish/src/test/fr/ifremer/isisfish/IsisOptionParserTest.java
===================================================================
--- trunk/isis-fish/src/test/fr/ifremer/isisfish/IsisOptionParserTest.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/test/fr/ifremer/isisfish/IsisOptionParserTest.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -1,315 +0,0 @@
-/*
-* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007,2008 Code Lutin,
-* Tony Chemit
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-* ##% */
-package fr.ifremer.isisfish;
-
-import fr.ifremer.isisfish.commandline.IsisOptionKey;
-import fr.ifremer.isisfish.commandline.IsisOptionParser;
-import junit.framework.TestCase;
-import org.codelutin.log.LutinLogFactory;
-import org.codelutin.option.Option;
-import org.codelutin.option.OptionParser;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * pour tester que le parser {@link fr.ifremer.isisfish.commandline.IsisOptionParser} accepte bien les options.
- * <p/>
- * Pour chaque option {@link Option}, on donne deux méthodes :
- * <p/>
- * <code>testBAD_XXX</code> pour tester les cas non acceptants
- * <code>testOK_XXX</code> pour tester les cas acceptants
- *
- * @author chemit
- * @version 1.0
- * @since <pre>12/15/2007</pre>
- */
-public class IsisOptionParserTest extends TestCase {
-
- static {
- System.setProperty("org.apache.commons.logging.LogFactory", LutinLogFactory.class.getName());
- //I18n.init("fr", "FR");
- }
-
- protected OptionParser parser;
- protected IsisOptionKey option;
- static IsisContext context = IsisContext.get();
-
- public void testBAD_AddScriptOption() throws Exception {
- parser = context.parseOptions("-a");
- assertParserFailed();
-
- parser = context.parseOptions("--add");
- assertParserFailed();
- }
-
- public void testOK_AddScriptOption() throws Exception {
- option = IsisOptionParser.ADD_SCRIPT_OPTION_KEY;
- File f = File.createTempFile("addScriptTest", ".java");
- f.deleteOnExit();
- parser = context.parseOptions("-a", "scripts", f.getAbsolutePath());
- assertParserFoundOption();
-
- parser = context.parseOptions("--add", "scripts", f.getAbsolutePath());
- assertParserFoundOption();
- }
-
- public void testBAD_ConfigOption() throws Exception {
- parser = context.parseOptions("--config");
- assertParserFailed();
- }
-
- public void testOK_ConfigOption() throws Exception {
- option = IsisOptionParser.CHANGE_CONFIG_OPTION_KEY;
- parser = context.parseOptions("--config", "compileDirectory", "/tmp");
- assertParserFoundOption();
- }
-
- public void testBAD_CreateSshKeyOption() throws Exception {
- }
-
- public void testOK_CreateSshKeyOption() throws Exception {
- option = IsisOptionParser.CREATE_SSH_KEY_OPTION_KEY;
- parser = context.parseOptions("-c");
- assertParserFoundOption();
- parser = context.parseOptions("--create-ssh-key", "force");
- assertParserFoundOption();
- }
-
- public void testBAD_ExportDataOption() throws Exception {
- parser = context.parseOptions("-o");
- assertParserFailed();
- parser = context.parseOptions("--export");
- assertParserFailed();
- }
-
- public void testOK_ExportDataOption() throws Exception {
- option = IsisOptionParser.EXPORT_DATA_OPTION_KEY;
- File f = File.createTempFile("exportData", ".zip");
- f.deleteOnExit();
- parser = context.parseOptions("-o", f.getAbsolutePath(), "region", "demoRegion");
- assertParserFoundOption();
- parser = context.parseOptions("--export", f.getAbsolutePath(), "simulation", "demoRegion", "force");
- assertParserFoundOption();
- }
-
- public void testBAD_ExportScriptOption() throws Exception {
- parser = context.parseOptions("-os");
- assertParserFailed();
- parser = context.parseOptions("--export-script");
- assertParserFailed();
- }
-
- public void testOK_ExportScriptOption() throws Exception {
- option = IsisOptionParser.EXPORT_SCRIPT_OPTION_KEY;
- File f = File.createTempFile("exportScript", ".zip");
- f.deleteOnExit();
- parser = context.parseOptions("-os", f.getAbsolutePath(), "scripts", "theFilter");
- assertParserFoundOption();
- parser = context.parseOptions("--export-script", f.getAbsolutePath(), "formules=typeFormule", "force");
- assertParserFoundOption();
- }
-
- public void testBAD_HelpOption() throws Exception {
- }
-
- public void testOK_HelpOption() throws Exception {
- option = IsisOptionParser.HELP_OPTION_KEY;
- parser = context.parseOptions("--help");
- assertParserFoundOption();
- parser = context.parseOptions("-h");
- assertParserFoundOption();
- }
-
- public void testBAD_ImportScriptOption() throws Exception {
- parser = context.parseOptions("-i", "script");
- assertParserFailed();
-
- parser = context.parseOptions("--import", "region");
- assertParserFailed();
- }
-
- public void testOK_ImportScriptOption() throws Exception {
- option = IsisOptionParser.IMPORT_OPTION_KEY;
- File f = File.createTempFile("import", ".dat");
- f.deleteOnExit();
- parser = context.parseOptions("-i", "region", f.getAbsolutePath());
- assertParserFoundOption();
-
- parser = context.parseOptions("--import", "script", f.getAbsolutePath(), "force");
- assertParserFoundOption();
- }
-
- public void testBAD_ImportAndRenmaeRegionOption() throws Exception {
- parser = context.parseOptions("--importAndRenameRegion");
- assertParserFailed();
- }
-
- public void testOK_ImportAndRenmaeRegionOption() throws Exception {
- option = IsisOptionParser.IMPORT_AND_RENAME_REGION_OPTION_KEY;
- File f = File.createTempFile("importAndRenameRegion", ".sql.gz");
- f.deleteOnExit();
- parser = context.parseOptions("--importAndRenameRegion", f.getAbsolutePath(), "theNewRegion");
- assertParserFoundOption();
- }
-
- public void testBAD_ListOption() throws Exception {
- parser = context.parseOptions("-l");
- assertParserFailed();
-
- parser = context.parseOptions("--list");
- assertParserFailed();
- }
-
- public void testOK_ListOption() throws Exception {
- option = IsisOptionParser.LIST_OPTION_KEY;
- parser = context.parseOptions("-l", "analyseplans", "theFilter");
- assertParserFoundOption();
-
- parser = context.parseOptions("--list", "scripts", "theFilter2");
- assertParserFoundOption();
- }
-
- public void testBAD_MavenFileOption() throws Exception {
- }
-
- public void testOK_MavenFileOption() throws Exception {
- option = IsisOptionParser.MAVEN_FILE_OPTION_KEY;
- parser = context.parseOptions("--mavenFile");
- assertParserFoundOption();
- }
-
- public void testBAD_ResetConfigOption() throws Exception {
- }
-
- public void testOK_ResetConfigOption() throws Exception {
- option = IsisOptionParser.RESET_CONFIG_OPTION_KEY;
- parser = context.parseOptions("--resetConfig");
- assertParserFoundOption();
- }
-
- public void testBAD_SimulateOption() throws Exception {
- parser = context.parseOptions("--simulate");
- assertParserFailed();
- }
-
- public void testOK_SimulateOption() throws Exception {
- option = IsisOptionParser.SIMULATE_OPTION_KEY;
- File f = File.createTempFile("simulation-parameters", ".properties");
- f.deleteOnExit();
- parser = context.parseOptions("--simulate", "simulationId", f.getAbsolutePath());
- assertParserFoundOption();
- }
-
- public void testBAD_SshKeyFileOption() throws Exception {
- parser = context.parseOptions("--ssh-key-file");
- assertParserFailed();
- parser = context.parseOptions("-k");
- assertParserFailed();
- }
-
- public void testOK_SshKeyFileOption() throws Exception {
- option = IsisOptionParser.SSH_KEY_FILE_OPTION_KEY;
- File f = File.createTempFile("sshKeyFile", ".pubKey");
- f.deleteOnExit();
- parser = context.parseOptions("--ssh-key-file", f.getAbsolutePath());
- assertParserFoundOption();
-
- parser = context.parseOptions("-k", f.getAbsolutePath());
- assertParserFoundOption();
- }
-
- public void testBAD_UIOption() throws Exception {
- parser = context.parseOptions("--ui");
- assertParserFailed();
-
- parser = context.parseOptions("--ui", "falase");
- assertParserFailed();
- }
-
- public void testOK_UIOption() throws Exception {
- option = IsisOptionParser.UI_OPTION_KEY;
- parser = context.parseOptions("--ui", "true");
- assertParserFoundOption();
-
- parser = context.parseOptions("--ui", "False");
- assertParserFoundOption();
- }
-
- public void testBAD_UpdateOption() throws Exception {
- parser = context.parseOptions("--update");
- assertParserFailed();
- parser = context.parseOptions("-u");
- assertParserFailed();
-
- parser = context.parseOptions("-u", "rfs");
- assertParserFailed();
- }
-
- public void testOK_UpdateOption() throws Exception {
- option = IsisOptionParser.UPDATE_OPTION_KEY;
- parser = context.parseOptions("--update", "true");
- assertParserFoundOption();
- parser = context.parseOptions("-u", "false");
- assertParserFoundOption();
- }
-
- public void testBAD_VCSAddRemoveOption() throws Exception {
- parser = context.parseOptions("--vcs2");
- assertParserFailed();
- }
-
- public void testOK_VCSAddRemoveOption() throws Exception {
- option = IsisOptionParser.VCS_ADD_REMOVE_OPTION_KEY;
- File f = File.createTempFile("addVcsScript", ".java");
- f.deleteOnExit();
- parser = context.parseOptions("--vcs2", "add", f.getAbsolutePath());
- assertParserFoundOption();
- }
-
- public void testBAD_VCSUpdateCommitStateOption() throws Exception {
- parser = context.parseOptions("--vcs");
- assertParserFailed();
- }
-
- public void testOK_VCSUpdateCommitStateOption() throws Exception {
- option = IsisOptionParser.VCS_UPDATE_COMMIT_STATE_OPTION_KEY;
- parser = context.parseOptions("--vcs", "update");
- assertParserFoundOption();
- }
-
- protected void assertParserFailed() throws IOException {
- assertTrue(parser.getLastResult() != null);
- /*StringWriter w;
- parser.printErrors(w = new StringWriter());
- System.out.println(w.toString());
- w.close();*/
- }
-
- protected void assertParserFoundOption() throws IOException {
- assertFalse(parser.getLastResult() == null);
- /*StringWriter w;
- parser.printErrors(w = new StringWriter());
- System.out.println(w.toString());
- w.close();*/
- assertTrue(parser.getLastResult().isOptionEnabled(option));
- }
-
-
-}
\ No newline at end of file
Deleted: trunk/isis-fish/src/test/fr/ifremer/isisfish/actions/IsisCommonActionsTest.java
===================================================================
--- trunk/isis-fish/src/test/fr/ifremer/isisfish/actions/IsisCommonActionsTest.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/test/fr/ifremer/isisfish/actions/IsisCommonActionsTest.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -1,114 +0,0 @@
-/*
-* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin,
-* Benjamin Poussin, Tony Chemit
-*
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-* ##% */
-package fr.ifremer.isisfish.actions;
-
-import fr.ifremer.isisfish.IsisContext;
-import fr.ifremer.isisfish.commandline.IsisAbstractOptionAction;
-import fr.ifremer.isisfish.commandline.IsisOptionKey;
-import fr.ifremer.isisfish.commandline.IsisOptionParser;
-import junit.framework.TestCase;
-import org.codelutin.log.LutinLogFactory;
-import org.codelutin.option.Option;
-import org.codelutin.option.OptionParser;
-
-/**
- * Pour chaque action {@link IsisAbstractOptionAction}, on donne deux méthodes :
- * <p/>
- * <code>testBAD_XXX</code> pour tester les cas non acceptants
- * <code>testOK_XXX</code> pour tester les cas acceptants
- *
- * @author chemit
- * @version 1.0
- * @see fr.ifremer.isisfish.commandline.IsisAbstractOptionAction
- * @see IsisOptionParser
- * @see Option
- * @since <pre>01/01/2008</pre>
- */
-public class IsisCommonActionsTest extends TestCase {
-
- static {
- System.setProperty("org.apache.commons.logging.LogFactory", LutinLogFactory.class.getName());
- //I18n.init("fr", "FR");
- }
-
- protected OptionParser parser;
- protected IsisOptionKey optionKey;
- protected Option option;
- protected IsisAbstractOptionAction action;
- static IsisContext context = IsisContext.get();
-
- public void testBAD_ConfigAction() throws Exception {
- parser = context.parseOptions("--config");
- assertParserFailed();
- }
-
- public void testOK_ConfigAction() throws Exception {
- optionKey = IsisOptionParser.CHANGE_CONFIG_OPTION_KEY;
- parser = context.parseOptions("--config", "username", "codelutin");
- assertParserFoundOption();
- }
-
- public void testBAD_HelpAction() throws Exception {
- }
-
- public void testOK_HelpAction() throws Exception {
- optionKey = IsisOptionParser.HELP_OPTION_KEY;
- parser = context.parseOptions("--help");
- assertParserFoundOption();
- parser = context.parseOptions("-h");
- assertParserFoundOption();
- }
-
- public void testBAD_ResetConfigAction() throws Exception {
- }
-
- public void testOK_ResetConfigAction() throws Exception {
- optionKey = IsisOptionParser.RESET_CONFIG_OPTION_KEY;
- parser = context.parseOptions("--resetConfig");
- assertParserFoundOption();
- }
-
- public void testBAD_UIAction() throws Exception {
- parser = context.parseOptions("--ui");
- assertParserFailed();
-
- parser = context.parseOptions("--ui", "falase");
- assertParserFailed();
- }
-
- public void testOK_UIAction() throws Exception {
- optionKey = IsisOptionParser.UI_OPTION_KEY;
- parser = context.parseOptions("--ui", "true");
- assertParserFoundOption();
-
- parser = context.parseOptions("--ui", "False");
- assertParserFoundOption();
- }
-
- protected void assertParserFailed() {
- assertTrue(parser.getLastResult() != null);
- }
-
- protected void assertParserFoundOption() {
- assertFalse(parser.getLastResult() == null);
- assertTrue(parser.getLastResult().isOptionEnabled(optionKey));
- }
-
-}
\ No newline at end of file
Deleted: trunk/isis-fish/src/test/fr/ifremer/isisfish/actions/IsisScriptAndDataActionsTest.java
===================================================================
--- trunk/isis-fish/src/test/fr/ifremer/isisfish/actions/IsisScriptAndDataActionsTest.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/test/fr/ifremer/isisfish/actions/IsisScriptAndDataActionsTest.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -1,175 +0,0 @@
-/*
-* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin,
-* Benjamin Poussin, Tony Chemit
-*
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-* ##% */
-package fr.ifremer.isisfish.actions;
-
-import fr.ifremer.isisfish.IsisContext;
-import fr.ifremer.isisfish.commandline.IsisAbstractOptionAction;
-import fr.ifremer.isisfish.commandline.IsisOptionKey;
-import fr.ifremer.isisfish.commandline.IsisOptionParser;
-import junit.framework.TestCase;
-import org.codelutin.log.LutinLogFactory;
-import org.codelutin.option.Option;
-import org.codelutin.option.OptionParser;
-
-/**
- * Pour tester les actions communes liées aux options du parser {@link IsisOptionParser}
- * <p/>
- * implantées dans{@link fr.ifremer.isisfish.commandline.actions.ScriptUtil}
- * <p/>
- * Pour chaque action {@link IsisAbstractOptionAction}, on donne deux méthodes :
- * <p/>
- * <code>testBAD_XXX</code> pour tester les cas non acceptants
- * <code>testOK_XXX</code> pour tester les cas acceptants
- *
- * @author chemit
- * @version 1.0
- * @see fr.ifremer.isisfish.commandline.actions.ScriptUtil
- * @see IsisAbstractOptionAction
- * @see IsisOptionParser
- * @see Option
- * @since <pre>01/01/2008</pre>
- */
-public class IsisScriptAndDataActionsTest extends TestCase {
-
- static {
- System.setProperty("org.apache.commons.logging.LogFactory", LutinLogFactory.class.getName());
- //I18n.init("fr", "FR");
- }
-
- protected OptionParser parser;
- protected IsisOptionKey optionKey;
- protected Option option;
- protected IsisAbstractOptionAction action;
- static IsisContext context = IsisContext.get();
-
- public void testBAD_AddScriptAction() throws Exception {
-
- parser = context.parseOptions("-a");
- assertParserFailed();
-
- parser = context.parseOptions("--add");
- assertParserFailed();
- }
-
- public void testOK_AddScriptAction() throws Exception {
- optionKey = IsisOptionParser.ADD_SCRIPT_OPTION_KEY;
- parser = context.parseOptions("-a");
- assertParserFoundOption();
-
- parser = context.parseOptions("--add");
- assertParserFoundOption();
- }
-
- public void testBAD_ExportDataAction() throws Exception {
- parser = context.parseOptions("-o");
- assertParserFailed();
- parser = context.parseOptions("--export");
- assertParserFailed();
- }
-
- public void testOK_ExportDataAction() throws Exception {
- optionKey = IsisOptionParser.EXPORT_DATA_OPTION_KEY;
- parser = context.parseOptions("-o");
- assertParserFoundOption();
- parser = context.parseOptions("--export");
- assertParserFoundOption();
- }
-
- public void testBAD_ExportScriptAction() throws Exception {
- parser = context.parseOptions("-os");
- assertParserFailed();
- parser = context.parseOptions("--export-script");
- assertParserFailed();
- }
-
- public void testOK_ExportScriptAction() throws Exception {
- optionKey = IsisOptionParser.EXPORT_SCRIPT_OPTION_KEY;
- parser = context.parseOptions("-os");
- assertParserFoundOption();
- parser = context.parseOptions("--export-script");
- assertParserFoundOption();
- }
-
- public void testBAD_ImportScriptAction() throws Exception {
- parser = context.parseOptions("-i");
- assertParserFailed();
-
- parser = context.parseOptions("--import");
- assertParserFailed();
- }
-
- public void testOK_ImportScriptAction() throws Exception {
- optionKey = IsisOptionParser.IMPORT_OPTION_KEY;
- parser = context.parseOptions("-i");
- assertParserFoundOption();
-
- parser = context.parseOptions("--import");
- assertParserFoundOption();
- }
-
- public void testBAD_ImportAndRenmaeRegionAction() throws Exception {
- parser = context.parseOptions("--importAndRenameRegion");
- assertParserFailed();
- }
-
- public void testOK_ImportAndRenmaeRegionAction() throws Exception {
- optionKey = IsisOptionParser.IMPORT_AND_RENAME_REGION_OPTION_KEY;
- parser = context.parseOptions("--importAndRenameRegion");
- assertParserFoundOption();
- }
-
- public void testBAD_ListAction() throws Exception {
- parser = context.parseOptions("-l");
- assertParserFailed();
-
- parser = context.parseOptions("--list");
- assertParserFailed();
- }
-
- public void testOK_ListAction() throws Exception {
- optionKey = IsisOptionParser.LIST_OPTION_KEY;
- parser = context.parseOptions("-l");
- assertParserFoundOption();
-
- parser = context.parseOptions("--list");
- assertParserFoundOption();
- }
-
- public void testBAD_SimulateAction() throws Exception {
- parser = context.parseOptions("--simulate");
- assertParserFailed();
- }
-
- public void testOK_SimulateAction() throws Exception {
- optionKey = IsisOptionParser.SIMULATE_OPTION_KEY;
- parser = context.parseOptions("--simulate");
- assertParserFoundOption();
- }
-
- protected void assertParserFailed() {
- assertTrue(parser.getLastResult() != null);
- }
-
- protected void assertParserFoundOption() {
- assertFalse(parser.getLastResult() == null);
- assertTrue(parser.getLastResult().isOptionEnabled(optionKey));
- }
-
-}
\ No newline at end of file
Deleted: trunk/isis-fish/src/test/fr/ifremer/isisfish/actions/IsisVcsActionsTest.java
===================================================================
--- trunk/isis-fish/src/test/fr/ifremer/isisfish/actions/IsisVcsActionsTest.java 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/test/fr/ifremer/isisfish/actions/IsisVcsActionsTest.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -1,150 +0,0 @@
-/*
-* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin,
-* Benjamin Poussin, Tony Chemit
-*
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-* ##% */
-package fr.ifremer.isisfish.actions;
-
-import fr.ifremer.isisfish.IsisContext;
-import fr.ifremer.isisfish.commandline.IsisAbstractOptionAction;
-import fr.ifremer.isisfish.commandline.IsisOptionKey;
-import fr.ifremer.isisfish.commandline.IsisOptionParser;
-import junit.framework.TestCase;
-import org.codelutin.log.LutinLogFactory;
-import org.codelutin.option.Option;
-import org.codelutin.option.OptionParser;
-
-/**
- * Pour tester les actions communes liées aux options du parser {@link IsisOptionParser}
- * <p/>
- * Pour chaque action {@link fr.ifremer.isisfish.commandline.IsisAbstractOptionAction}, on donne deux méthodes :
- * <p/>
- * <code>testBAD_XXX</code> pour tester les cas non acceptants
- * <code>testOK_XXX</code> pour tester les cas acceptants
- *
- * @author chemit
- * @version 1.0
- * @see fr.ifremer.isisfish.commandline.IsisAbstractOptionAction
- * @see IsisOptionParser
- * @see Option
- * @since <pre>01/01/2008</pre>
- */
-public class IsisVcsActionsTest extends TestCase {
-
- static {
- System.setProperty("org.apache.commons.logging.LogFactory", LutinLogFactory.class.getName());
- //I18n.init("fr", "FR");
- }
-
- static IsisContext context = IsisContext.get();
-
- protected OptionParser parser;
- protected IsisOptionKey optionKey;
- protected Option option;
- protected IsisAbstractOptionAction action;
-
- public void testBAD_CreateSshKeyAction() throws Exception {
- parser = context.parseOptions("-c");
- assertParserFailed();
- parser = context.parseOptions("--create-ssh-key");
- assertParserFailed();
- }
-
- public void testOK_CreateSshKeyAction() throws Exception {
- optionKey = IsisOptionParser.CREATE_SSH_KEY_OPTION_KEY;
- parser = context.parseOptions("-c");
- assertParserFoundOption();
- parser = context.parseOptions("--create-ssh-key");
- assertParserFoundOption();
- }
-
-
- public void testBAD_MavenFileAction() throws Exception {
- }
-
- public void testOK_MavenFileAction() throws Exception {
- optionKey = IsisOptionParser.MAVEN_FILE_OPTION_KEY;
- parser = context.parseOptions("--mavenFile");
- assertParserFoundOption();
- }
-
- public void testBAD_SshKeyFileAction() throws Exception {
- parser = context.parseOptions("--ssh-key-file");
- assertParserFailed();
- parser = context.parseOptions("-k");
- assertParserFailed();
- }
-
- public void testOK_SshKeyFileAction() throws Exception {
- optionKey = IsisOptionParser.SSH_KEY_FILE_OPTION_KEY;
- parser = context.parseOptions("--ssh-key-file");
- assertParserFoundOption();
-
- parser = context.parseOptions("-k");
- assertParserFoundOption();
- }
-
- public void testBAD_UpdateAction() throws Exception {
- parser = context.parseOptions("--update");
- assertParserFailed();
- parser = context.parseOptions("-u");
- assertParserFailed();
-
- parser = context.parseOptions("-u", "rfs");
- assertParserFailed();
- }
-
- public void testOK_UpdateAction() throws Exception {
- optionKey = IsisOptionParser.UPDATE_OPTION_KEY;
- parser = context.parseOptions("--update", "true");
- assertParserFoundOption();
- parser = context.parseOptions("-u", "false");
- assertParserFoundOption();
- }
-
- public void testBAD_VCSAddRemoveAction() throws Exception {
- parser = context.parseOptions("--vcs2");
- assertParserFailed();
- }
-
- public void testOK_VCSAddRemoveAction() throws Exception {
- optionKey = IsisOptionParser.VCS_ADD_REMOVE_OPTION_KEY;
- parser = context.parseOptions("--vcs2");
- assertParserFoundOption();
- }
-
- public void testBAD_VCSUpdateCommitStateAction() throws Exception {
- parser = context.parseOptions("--vcs");
- assertParserFailed();
- }
-
- public void testOK_VCSUpdateCommitStateAction() throws Exception {
- optionKey = IsisOptionParser.VCS_UPDATE_COMMIT_STATE_OPTION_KEY;
- parser = context.parseOptions("--vcs");
- assertParserFoundOption();
- }
-
- protected void assertParserFailed() {
- assertTrue(parser.getLastResult() != null);
- }
-
- protected void assertParserFoundOption() {
- assertFalse(parser.getLastResult() == null);
- assertTrue(parser.getLastResult().isOptionEnabled(optionKey));
- }
-
-}
\ No newline at end of file
Added: trunk/isis-fish/src/test/fr/ifremer/isisfish/vcs/VCSSVNTest.java
===================================================================
--- trunk/isis-fish/src/test/fr/ifremer/isisfish/vcs/VCSSVNTest.java (rev 0)
+++ trunk/isis-fish/src/test/fr/ifremer/isisfish/vcs/VCSSVNTest.java 2008-08-18 13:42:57 UTC (rev 1302)
@@ -0,0 +1,374 @@
+/*
+ * Copyright (C) 2002-2008 Code Lutin, Benjamin Poussin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * USA.
+ */
+
+package fr.ifremer.isisfish.vcs;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+import org.codelutin.util.VersionNumber;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import static org.junit.Assert.*;
+import org.tmatesoft.svn.core.SVNURL;
+import org.tmatesoft.svn.core.wc.SVNClientManager;
+
+/**
+ *
+ * @author poussin
+ */
+public class VCSSVNTest {
+
+ VCSSVN instance = null;
+
+ public VCSSVNTest() {
+ }
+
+ @BeforeClass
+ public static void setUpClass() throws Exception {
+ }
+
+ @AfterClass
+ public static void tearDownClass() throws Exception {
+ }
+
+ @Before
+ public void setUp() {
+// instance = new VCSSVN(config);
+ }
+
+ /**
+ * Test of getSVNManager method, of class VCSSVN.
+ */
+ @Test
+ public void getSVNManager() {
+ System.out.println("getSVNManager");
+ VCSSVN instance = null;
+ SVNClientManager expResult = null;
+ SVNClientManager result = instance.getSVNManager();
+ assertEquals(expResult, result);
+ // TODO review the generated test code and remove the default call to fail.
+ fail("The test case is a prototype.");
+ }
+
+ /**
+ * Test of getRemoteURL method, of class VCSSVN.
+ */
+ @Test
+ public void getRemoteURL() throws Exception {
+ System.out.println("getRemoteURL");
+ VCSSVN instance = null;
+ SVNURL expResult = null;
+ SVNURL result = instance.getRemoteURL();
+ assertEquals(expResult, result);
+ // TODO review the generated test code and remove the default call to fail.
+ fail("The test case is a prototype.");
+ }
+
+ /**
+ * Test of getLocalRepositoryRoot method, of class VCSSVN.
+ */
+ @Test
+ public void getLocalRepositoryRoot() throws Exception {
+ System.out.println("getLocalRepositoryRoot");
+ VCSSVN instance = null;
+ String expResult = "";
+ String result = instance.getLocalRepositoryRoot();
+ assertEquals(expResult, result);
+ // TODO review the generated test code and remove the default call to fail.
+ fail("The test case is a prototype.");
+ }
+
+ /**
+ * Test of getLocalRepositorySource method, of class VCSSVN.
+ */
+ @Test
+ public void getLocalRepositorySource() throws Exception {
+ System.out.println("getLocalRepositorySource");
+ File f = null;
+ VCSSVN instance = null;
+ String expResult = "";
+ String result = instance.getLocalRepositorySource(f);
+ assertEquals(expResult, result);
+ // TODO review the generated test code and remove the default call to fail.
+ fail("The test case is a prototype.");
+ }
+
+ /**
+ * Test of getRemoteRepository method, of class VCSSVN.
+ */
+ @Test
+ public void getRemoteRepository() {
+ System.out.println("getRemoteRepository");
+ VCSSVN instance = null;
+ String expResult = "";
+ String result = instance.getRemoteRepository();
+ assertEquals(expResult, result);
+ // TODO review the generated test code and remove the default call to fail.
+ fail("The test case is a prototype.");
+ }
+
+ /**
+ * Test of isVersionnableAbleFile method, of class VCSSVN.
+ */
+ @Test
+ public void isVersionnableAbleFile() {
+ System.out.println("isVersionnableAbleFile");
+ File file = null;
+ VCSSVN instance = null;
+ boolean expResult = false;
+ boolean result = instance.isVersionnableAbleFile(file);
+ assertEquals(expResult, result);
+ // TODO review the generated test code and remove the default call to fail.
+ fail("The test case is a prototype.");
+ }
+
+ /**
+ * Test of commit method, of class VCSSVN.
+ */
+ @Test
+ public void commit() throws Exception {
+ System.out.println("commit");
+ List<File> files = null;
+ String msg = "";
+ VCSSVN instance = null;
+ instance.commit(files, msg);
+ // TODO review the generated test code and remove the default call to fail.
+ fail("The test case is a prototype.");
+ }
+
+ /**
+ * Test of add method, of class VCSSVN.
+ */
+ @Test
+ public void add() throws Exception {
+ System.out.println("add");
+ List<File> files = null;
+ String msg = "";
+ VCSSVN instance = null;
+ instance.add(files, msg);
+ // TODO review the generated test code and remove the default call to fail.
+ fail("The test case is a prototype.");
+ }
+
+ /**
+ * Test of checkout method, of class VCSSVN.
+ */
+ @Test
+ public void checkout() throws Exception {
+ System.out.println("checkout");
+ File destDir = null;
+ String module = "";
+ boolean recurse = false;
+ VCSSVN instance = null;
+ instance.checkout(destDir, module, recurse);
+ // TODO review the generated test code and remove the default call to fail.
+ fail("The test case is a prototype.");
+ }
+
+ /**
+ * Test of delete method, of class VCSSVN.
+ */
+ @Test
+ public void delete() throws Exception {
+ System.out.println("delete");
+ List<File> files = null;
+ String msg = "";
+ VCSSVN instance = null;
+ instance.delete(files, msg);
+ // TODO review the generated test code and remove the default call to fail.
+ fail("The test case is a prototype.");
+ }
+
+ /**
+ * Test of getChanglog method, of class VCSSVN.
+ */
+ @Test
+ public void getChanglog() {
+ System.out.println("getChanglog");
+ List<File> files = null;
+ VCSSVN instance = null;
+ Map<File, String> expResult = null;
+ Map<File, String> result = instance.getChanglog(files);
+ assertEquals(expResult, result);
+ // TODO review the generated test code and remove the default call to fail.
+ fail("The test case is a prototype.");
+ }
+
+ /**
+ * Test of getDiff method, of class VCSSVN.
+ */
+ @Test
+ public void getDiff() throws Exception {
+ System.out.println("getDiff");
+ File file = null;
+ VCSSVN instance = null;
+ String expResult = "";
+ String result = instance.getDiff(file);
+ assertEquals(expResult, result);
+ // TODO review the generated test code and remove the default call to fail.
+ fail("The test case is a prototype.");
+ }
+
+ /**
+ * Test of getFileList method, of class VCSSVN.
+ */
+ @Test
+ public void getFileList() throws Exception {
+ System.out.println("getFileList");
+ File directory = null;
+ VCSSVN instance = null;
+ List<String> expResult = null;
+ List<String> result = instance.getFileList(directory);
+ assertEquals(expResult, result);
+ // TODO review the generated test code and remove the default call to fail.
+ fail("The test case is a prototype.");
+ }
+
+ /**
+ * Test of getUpdatedFile method, of class VCSSVN.
+ */
+ @Test
+ public void getUpdatedFile() {
+ System.out.println("getUpdatedFile");
+ VCSSVN instance = null;
+ List<File> expResult = null;
+ List<File> result = instance.getUpdatedFile();
+ assertEquals(expResult, result);
+ // TODO review the generated test code and remove the default call to fail.
+ fail("The test case is a prototype.");
+ }
+
+ /**
+ * Test of haveUpdate method, of class VCSSVN.
+ */
+ @Test
+ public void haveUpdate() {
+ System.out.println("haveUpdate");
+ VCSSVN instance = null;
+ boolean expResult = false;
+ boolean result = instance.haveUpdate();
+ assertEquals(expResult, result);
+ // TODO review the generated test code and remove the default call to fail.
+ fail("The test case is a prototype.");
+ }
+
+ /**
+ * Test of isConnected method, of class VCSSVN.
+ */
+ @Test
+ public void isConnected() {
+ System.out.println("isConnected");
+ VCSSVN instance = null;
+ boolean expResult = false;
+ boolean result = instance.isConnected();
+ assertEquals(expResult, result);
+ // TODO review the generated test code and remove the default call to fail.
+ fail("The test case is a prototype.");
+ }
+
+ /**
+ * Test of isOnRemote method, of class VCSSVN.
+ */
+ @Test
+ public void isOnRemote() throws Exception {
+ System.out.println("isOnRemote");
+ File file = null;
+ VCSSVN instance = null;
+ boolean expResult = false;
+ boolean result = instance.isOnRemote(file);
+ assertEquals(expResult, result);
+ // TODO review the generated test code and remove the default call to fail.
+ fail("The test case is a prototype.");
+ }
+
+ /**
+ * Test of isTag method, of class VCSSVN.
+ */
+ @Test
+ public void isTag() {
+ System.out.println("isTag");
+ VersionNumber version = null;
+ VCSSVN instance = null;
+ boolean expResult = false;
+ boolean result = instance.isTag(version);
+ assertEquals(expResult, result);
+ // TODO review the generated test code and remove the default call to fail.
+ fail("The test case is a prototype.");
+ }
+
+ /**
+ * Test of isUpToDate method, of class VCSSVN.
+ */
+ @Test
+ public void isUpToDate() throws Exception {
+ System.out.println("isUpToDate");
+ File file = null;
+ VCSSVN instance = null;
+ boolean expResult = false;
+ boolean result = instance.isUpToDate(file);
+ assertEquals(expResult, result);
+ // TODO review the generated test code and remove the default call to fail.
+ fail("The test case is a prototype.");
+ }
+
+ /**
+ * Test of update method, of class VCSSVN.
+ */
+ @Test
+ public void update() throws Exception {
+ System.out.println("update");
+ List<File> files = null;
+ VCSSVN instance = null;
+ boolean expResult = false;
+ boolean result = instance.update(files);
+ assertEquals(expResult, result);
+ // TODO review the generated test code and remove the default call to fail.
+ fail("The test case is a prototype.");
+ }
+
+ /**
+ * Test of switchTag method, of class VCSSVN.
+ */
+ @Test
+ public void switchTag() throws Exception {
+ System.out.println("switchTag");
+ VersionNumber version = null;
+ VCSSVN instance = null;
+ instance.switchTag(version);
+ // TODO review the generated test code and remove the default call to fail.
+ fail("The test case is a prototype.");
+ }
+
+ /**
+ * Test of switchProtocole method, of class VCSSVN.
+ */
+ @Test
+ public void switchProtocole() throws Exception {
+ System.out.println("switchProtocole");
+ String protocoleType = "";
+ VCSSVN instance = null;
+ instance.switchProtocole(protocoleType);
+ // TODO review the generated test code and remove the default call to fail.
+ fail("The test case is a prototype.");
+ }
+
+}
\ No newline at end of file
Modified: trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/input/PopulationMigration.xgl
===================================================================
--- trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/input/PopulationMigration.xgl 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/input/PopulationMigration.xgl 2008-08-18 13:42:57 UTC (rev 1302)
@@ -33,7 +33,7 @@
</tr>
</table>
-<table Zonespacing="5">
+<table cellspacing="5">
<tr>
<td fill="Both" width="100%">buttonPopulationMigrationSave</td>
<td fill="Both" width="100%">buttonPopulationMigrationCancel</td>
Modified: trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/input/SetOfVessels.xgl
===================================================================
--- trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/input/SetOfVessels.xgl 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/input/SetOfVessels.xgl 2008-08-18 13:42:57 UTC (rev 1302)
@@ -26,11 +26,25 @@
<td class="label">labelSetOfVesselsFixedCosts</td>
<td class="field">fieldSetOfVesselsFixedCosts</td>
</tr>
+
<tr>
- <td class="label" rowspan="3">labelSetOfVesselsComment</td>
- <td class="field" height="20%" rowspan="3">fieldSetOfVesselsComment</td>
+ <td class="label">labelSetOfVesselsTechnicalEfficiency</td>
+ <td class="field">fieldSetOfVesselsTechnicalEfficiency</td>
</tr>
+ <tr>
+ <td class="label">buttonSetOfVesselsTechnicalEfficiencySaveAsModel</td>
+ <td class="field" height="30%" rowspan="3">fieldScriptSetOfVesselsTechnicalEfficiency</td>
+ </tr>
+ <tr>
+ <td class="label">buttonSetOfVesselsTechnicalEfficiencyEquationEditor</td>
+ </tr>
<tr></tr>
+
+
+ <tr>
+ <td class="label" rowspan="2">labelSetOfVesselsComment</td>
+ <td class="field" height="20%" rowspan="2">fieldSetOfVesselsComment</td>
+ </tr>
<tr></tr>
<tr>
Modified: trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/input/SetOfVessels.xml
===================================================================
--- trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/input/SetOfVessels.xml 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/input/SetOfVessels.xml 2008-08-18 13:42:57 UTC (rev 1302)
@@ -36,6 +36,31 @@
<DocumentEvents onModified="Update($fieldSetOfVesselsFixedCosts/text)"/>
</textfield>
+
+ <label constraints="labelSetOfVesselsTechnicalEfficiency" text="isisfish.setOfVessels.technicalEfficiency"/>
+ <combobox constraints="fieldSetOfVesselsTechnicalEfficiency" id="fieldSetOfVesselsTechnicalEfficiency"
+ origin="$SetOfVessels/technicalEfficiencyEquation" renderer="name" firstNull="true"
+ actionCommand="Update($fieldSetOfVesselsTechnicalEfficiency/selectedItem/content, $fieldScriptSetOfVesselsTechnicalEfficiency/text)">
+ <ComboBoxModel origin='fr.ifremer.isisfish.datastore.FormuleStorage.getFormules($TopiaContext, "TechnicalEfficiency")'/>
+ </combobox>
+
+ <button constraints="buttonSetOfVesselsTechnicalEfficiencySaveAsModel" text="isisfish.common.saveModel"
+ actionCommand='input.Input.saveEquationAsModel($SetOfVessels/technicalEfficiencyEquation);refreshView($fieldSetOfVesselsTechnicalEfficiency)'/>
+
+ <button constraints="buttonSetOfVesselsTechnicalEfficiencyEquationEditor" text="isisfish.common.openEditor"
+ actionCommand='input.Input.openEditor($SetOfVessels/technicalEfficiencyEquation/category,$SetOfVessels/technicalEfficiencyEquation/name,$SetOfVessels/technicalEfficiencyEquation/javaInterface,$SetOfVessels/technicalEfficiencyEquation/content,$fieldScriptSetOfVesselsTechnicalEfficiency)'/>
+
+ <editor constraints="fieldScriptSetOfVesselsTechnicalEfficiency" askIfNotSaved="false"
+ id="fieldScriptSetOfVesselsTechnicalEfficiency"
+ origin="org.codelutin.util.FileUtil.getTempFile($SetOfVessels/technicalEfficiencyEquation/content, '.java')">
+ <DocumentEvents onModified="Update">
+ <UpdateOrigin
+ target="setEquationTechnicalEfficiency($SetOfVessels, $fieldScriptSetOfVesselsTechnicalEfficiency/text)"/>
+ </DocumentEvents>
+ </editor>
+
+
+
<label constraints="labelSetOfVesselsComment" text="isisfish.setOfVessels.comments"/>
<scrollPane constraints="fieldSetOfVesselsComment">
<textarea id="fieldSetOfVesselsComment" origin="$SetOfVessels/comment">
Modified: trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/input/Strategy.xgl
===================================================================
--- trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/input/Strategy.xgl 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/input/Strategy.xgl 2008-08-18 13:42:57 UTC (rev 1302)
@@ -18,9 +18,18 @@
<td class="label">labelStrategyProportionSetOfVessels</td>
<td class="field">fieldStrategyProportionSetOfVessels</td>
</tr>
+
+ <tr>
+ <td></td>
+ <td class="field">fieldUseEquationInactivity</td>
+ </tr>
+ <tr>
+ <td class="labelTitle" fill="Both" height="100%" width="100%" colspan="2">hideablePanelInactivityEquation</td>
+ </tr>
+
<tr>
- <td class="label" rowspan="3">labelStrategyComment</td>
- <td class="field" height="20%" rowspan="3">fieldStrategyComment</td>
+ <td class="label" rowspan="2">labelStrategyComment</td>
+ <td class="field" height="20%" rowspan="2">fieldStrategyComment</td>
</tr>
<tr></tr>
<tr></tr>
@@ -30,5 +39,26 @@
</tr>
</table>
+ <table>
+ <tr>
+ <td fill="Both" height="100%" width="100%">fieldUseEquation</td>
+ </tr>
+ </table>
+
+ <table cellspacing="2">
+ <tr>
+ <td class="label">labelStrategyInactivity</td>
+ <td class="field">fieldStrategyInactivity</td>
+ </tr>
+ <tr>
+ <td class="label">buttonStrategyInactivitySaveAsModel</td>
+ <td class="field" height="30%" rowspan="3">fieldScriptStrategyInactivity</td>
+ </tr>
+ <tr>
+ <td class="label">buttonStrategyInactivityEquationEditor</td>
+ </tr>
+ <tr></tr>
+ </table>
+
</layout>
Modified: trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/input/Strategy.xml
===================================================================
--- trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/input/Strategy.xml 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/input/Strategy.xml 2008-08-18 13:42:57 UTC (rev 1302)
@@ -22,6 +22,42 @@
<DocumentEvents onModified="Update($fieldStrategyProportionSetOfVessels/text)"/>
</textfield>
+ <checkbox constraints="fieldUseEquationInactivity" id="fieldUseEquationInactivity"
+ origin="$Strategy/inactivityEquationUsed" text="isisfish.strategy.inactivityEquationUsed">
+ <ItemEvents onStateChanged="Update($fieldUseEquationInactivity/selected, $Strategy/inactivityEquationUsed, refreshView($hideablePanelInactivityEquation))"/>
+ </checkbox>
+
+
+ <panel id="hideablePanelInactivityEquation" constraints="hideablePanelInactivityEquation" layout="XMLGridLayout(fr/ifremer/isisfish/ui/input/Strategy.xgl)">
+
+ <hidablePanel constraints="fieldUseEquation"
+ origin="getInactivityEquationUsed($Strategy)"
+ layout="XMLGridLayout(fr/ifremer/isisfish/ui/input/Strategy.xgl)">
+ <label constraints="labelStrategyInactivity" text="isisfish.strategy.inactivity"/>
+ <combobox constraints="fieldStrategyInactivity" id="fieldStrategyInactivity"
+ origin="$Strategy/inactivityEquation" renderer="name" firstNull="true"
+ actionCommand="Update($fieldStrategyInactivity/selectedItem/content, $fieldScriptStrategyInactivity/text)">
+ <ComboBoxModel origin='fr.ifremer.isisfish.datastore.FormuleStorage.getFormules($TopiaContext, "Inactivity")'/>
+ </combobox>
+
+ <button constraints="buttonStrategyInactivitySaveAsModel" text="isisfish.common.saveModel"
+ actionCommand='input.Input.saveEquationAsModel($Strategy/inactivityEquation);refreshView($fieldStrategyInactivity)'/>
+
+ <button constraints="buttonStrategyInactivityEquationEditor" text="isisfish.common.openEditor"
+ actionCommand='input.Input.openEditor($Strategy/inactivityEquation/category,$Strategy/inactivityEquation/name,$Strategy/inactivityEquation/javaInterface,$Strategy/inactivityEquation/content,$fieldScriptStrategyInactivity)'/>
+
+ <editor constraints="fieldScriptStrategyInactivity" askIfNotSaved="false"
+ id="fieldScriptStrategyInactivity"
+ origin="org.codelutin.util.FileUtil.getTempFile($Strategy/inactivityEquation/content, '.java')">
+ <DocumentEvents onModified="Update">
+ <UpdateOrigin
+ target="setEquationInactivity($Strategy, $fieldScriptStrategyInactivity/text)"/>
+ </DocumentEvents>
+ </editor>
+
+ </hidablePanel>
+ </panel>
+
<label constraints="labelStrategyComment" text="isisfish.strategy.comments"/>
<scrollPane constraints="fieldStrategyComment">
<textarea id="fieldStrategyComment" origin="$Strategy/comment">
Modified: trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/script/jaxx/JExportDialog.jaxx
===================================================================
--- trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/script/jaxx/JExportDialog.jaxx 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/script/jaxx/JExportDialog.jaxx 2008-08-18 13:42:57 UTC (rev 1302)
@@ -1,16 +1,18 @@
<JDialog modal="true" resizable='false' title='isisfish.script.export'>
<script>
- public org.codelutin.vcs.ui.FieldModelUtil.ModuleFile model;
-
+ // FIXME a refaire
+
+// public org.codelutin.vcs.ui.FieldModelUtil.ModuleFile model;
+ public Object model = null;
public boolean isOkEnabled() {
- return !isEmpty() && model.getSelected(0).size() > 0;
+ return !isEmpty(); // && model.getSelected(0).size() > 0;
}
public boolean isEmpty() {
- return model == null || model.getRowCount() == 0;
+ return model == null; // || model.getRowCount() == 0;
}
public void doCheckAll() {
- if (model!=null) model.checkAll();
+// if (model!=null) model.checkAll();
doRefresh();
}
@@ -18,7 +20,8 @@
fr.ifremer.isisfish.ui.util.JaxxUtil.refresh(this,"items.enabled",
"checkAll.enabled","ok.enabled","chooseDir.enabled",
"archivePath.enabled");
- }
+ }
+
</script>
<Table anchor='center'>
<!--row fill='horizontal'>
Modified: trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/script/jaxx/JImportDialog.jaxx
===================================================================
--- trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/script/jaxx/JImportDialog.jaxx 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/script/jaxx/JImportDialog.jaxx 2008-08-18 13:42:57 UTC (rev 1302)
@@ -1,21 +1,26 @@
<JDialog modal="true" resizable='false' title='isisfish.script.import'>
<script>
- import org.codelutin.vcs.ui.FieldModelUtil.ModuleFile;
+ // FIXME a refaire
+
+// import org.codelutin.vcs.ui.FieldModelUtil.ModuleFile;
- protected ModuleFile modelItems;
- protected ModuleFile modelNewItems;
+// protected ModuleFile modelItems;
+// protected ModuleFile modelNewItems;
+ protected Object modelItems;
+ protected Object modelNewItems;
public boolean isOkEnabled() {
- return (!isItemEmpty() && modelItems.getSelected(0).size() > 0) ||
- (!isNewItemEmpty() && modelNewItems.getSelected(0).size() > 0);
+ return true;
+// (!isItemEmpty() && modelItems.getSelected(0).size() > 0) ||
+// (!isNewItemEmpty() && modelNewItems.getSelected(0).size() > 0);
}
protected boolean isItemEmpty() {
- return modelItems == null || modelItems.getRowCount() == 0;
+ return modelItems == null;// || modelItems.getRowCount() == 0;
}
protected boolean isNewItemEmpty() {
- return modelNewItems == null || modelNewItems.getRowCount() == 0;
+ return modelNewItems == null;// || modelNewItems.getRowCount() == 0;
}
public boolean isEmpty() {
@@ -29,11 +34,11 @@
}
public void doCheckAll() {
- if (!isItemEmpty()) modelItems.checkAll();
- if (!isNewItemEmpty()) modelNewItems.checkAll();
+// if (!isItemEmpty()) modelItems.checkAll();
+// if (!isNewItemEmpty()) modelNewItems.checkAll();
doRefresh();
}
- </script>
+</script>
<Table>
<row fill='horizontal'>
<cell columns='3' weightx="1">
Modified: trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/simulator/AdvancedParams.xgl
===================================================================
--- trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/simulator/AdvancedParams.xgl 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/simulator/AdvancedParams.xgl 2008-08-18 13:42:57 UTC (rev 1302)
@@ -20,7 +20,8 @@
<td width="99%" colspan="3" fill="Horizontal">fieldSimulAdvParamsSimulatorSelect</td>
</tr>
<tr>
- <td fill="Horizontal" colspan="2" width="33%">fieldSimulAdvParamsSimulatorLocal</td>
+ <td fill="Horizontal" width="33%">fieldSimulAdvParamsSimulatorLocal</td>
+ <td fill="Horizontal" width="33%">fieldSimulAdvParamsSimulatorSubProcess</td>
<td fill="Horizontal" width="33%">fieldSimulationStatistique</td>
<td fill="Horizontal" width="33%">fieldSimulationCache</td>
</tr>
Modified: trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/simulator/AdvancedParams.xml
===================================================================
--- trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/simulator/AdvancedParams.xml 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/ui/simulator/AdvancedParams.xml 2008-08-18 13:42:57 UTC (rev 1302)
@@ -33,6 +33,12 @@
origin="$SimulationParameter/local"
actionCommand="Update($fieldSimulAdvParamsSimulatorLocal/selected)"/>
+ <checkbox text="isisfish.advancedParams.subProcessSimulation"
+ constraints="fieldSimulAdvParamsSimulatorSubProcess"
+ id="fieldSimulAdvParamsSimulatorSubProcess"
+ origin="$SimulationParameter/subProcess"
+ actionCommand="Update($fieldSimulAdvParamsSimulatorSubProcess/selected)"/>
+
<!--
|
| Trace/Cache option
Modified: trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/JCommitDialog.jaxx
===================================================================
--- trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/JCommitDialog.jaxx 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/JCommitDialog.jaxx 2008-08-18 13:42:57 UTC (rev 1302)
@@ -1,11 +1,14 @@
<JDialog id="Update" modal="true" title='isisfish.vcs.commit'>
<!--width="400" height="300">-->
<script>
- import org.codelutin.vcs.ui.FieldModelUtil.ModuleFile;
- import org.codelutin.vcs.VCSFileState;
+ // FIXME a refaire
- protected ModuleFile<VCSFileState> model;
+// import org.codelutin.vcs.ui.FieldModelUtil.ModuleFile;
+// import org.codelutin.vcs.VCSFileState;
+// protected ModuleFile<VCSFileState> model;
+ protected Object model;
+
public JCommitDialog(Dialog owner, boolean modal) {
super(owner, modal);
}
@@ -21,6 +24,7 @@
protected void reSize(JTable table) {
// implements me...
}
+
</script>
<Table weightx="1">
<row>
@@ -49,7 +53,7 @@
<cell>
<JButton id='ok' text='isisfish.vcs.commit.ok'
enabled='{isOkEnabled()}'
- onActionPerformed='fr.ifremer.isisfish.versionning.ui.VCSUIHelper.COMMIT_MSG=message.getText();dispose()'/>
+ onActionPerformed='/*fr.ifremer.isisfish.versionning.ui.VCSUIHelper.COMMIT_MSG=message.getText();*/dispose()'/>
</cell>
<cell>
<JButton id='cancel' text='isisfish.vcs.commit.cancel'
Modified: trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/JUpdateConfirmDialog.jaxx
===================================================================
--- trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/JUpdateConfirmDialog.jaxx 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/JUpdateConfirmDialog.jaxx 2008-08-18 13:42:57 UTC (rev 1302)
@@ -1,21 +1,25 @@
<JDialog modal="true" title='isisfish.vcs.updateconfirm'>
<script>
- import org.codelutin.vcs.ui.FieldModelUtil.ModuleFile;
- import org.codelutin.vcs.VCSFileState;
+ // FIXME a refaire
- protected ModuleFile<VCSFileState> model;
+// import org.codelutin.vcs.ui.FieldModelUtil.ModuleFile;
+// import org.codelutin.vcs.VCSFileState;
+
+// protected ModuleFile<VCSFileState> model;
+ protected Object model;
+
public void doCheckAll() {
- if (model != null && model.getRowCount()>0) {
- model.checkAll();
- doRefresh();
- }
+// if (model != null && model.getRowCount()>0) {
+// model.checkAll();
+// doRefresh();
+// }
}
public boolean isEmpty() {
- return model==null || model.getRowCount()==0;
+ return model==null; // || model.getRowCount()==0;
}
public boolean isOkEnabled() {
- return !isEmpty() && model.getSelectedSize(0)>0;
+ return !isEmpty(); // && model.getSelectedSize(0)>0;
}
protected void reSize(JTable table) {
// implements me...
Modified: trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/JUpdateDialog.jaxx
===================================================================
--- trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/JUpdateDialog.jaxx 2008-08-18 13:42:49 UTC (rev 1301)
+++ trunk/isis-fish/src/uimodel/fr/ifremer/isisfish/versionning/ui/jaxx/JUpdateDialog.jaxx 2008-08-18 13:42:57 UTC (rev 1302)
@@ -1,32 +1,35 @@
<JDialog modal="true" title='isisfish.vcs.update'>
<script>
- import static org.codelutin.vcs.VCSState.*;
- import org.codelutin.vcs.VCSState;
+ // FIXME a refaire
- protected org.codelutin.vcs.VCSRepositoryState model;
+// import static org.codelutin.vcs.VCSState.*;
+// import org.codelutin.vcs.VCSState;
+// protected org.codelutin.vcs.VCSRepositoryState model;
+ protected Object model;
+
public void doCheckAll() {
- if (model!=null) {
- model.checkAll(checkAll.isSelected());
- doRefresh();
- }
+// if (model!=null) {
+// model.checkAll(checkAll.isSelected());
+// doRefresh();
+// }
}
public boolean isEmpty() {
- return model==null || model.isModelEmpty();
+ return model==null; // || model.isModelEmpty();
}
public boolean isOkEnabled() {
- return !isEmpty() && model.getModelSelectedSize()>0;
+ return !isEmpty(); // && model.getModelSelectedSize()>0;
}
public void doRefresh() {
fr.ifremer.isisfish.ui.util.JaxxUtil.refresh(this,"checkAll.enabled","ok.enabled");
}
- protected void reSize(VCSState state,JTable table) {
-
- }
+// protected void reSize(VCSState state,JTable table) {
+//
+// }
</script>
<Table weightx="1">
<row>
@@ -54,7 +57,6 @@
<JScrollPane id='scroll_missing'>
<JTable id="table_missing"
autoResizeMode='3'
- onComponentResized="reSize(MISSING,table_missing)"
onMouseClicked="doRefresh()"/>
</JScrollPane>
</cell>
@@ -71,7 +73,6 @@
<JScrollPane id='scroll_outofdate'>
<JTable id="table_outofdate"
autoResizeMode='3'
- onComponentResized="reSize(OUT_OF_DATE,table_outofdate)"
onMouseClicked="doRefresh()"
rowSelectionAllowed="true"/>
</JScrollPane>
@@ -97,7 +98,6 @@
<JScrollPane id='scroll_unversionned'>
<JTable id="table_unversionned"
autoResizeMode='3'
- onComponentResized="reSize(UNVERSIONNED,table_unversionned)"
rowSelectionAllowed="true"
onMouseClicked="doRefresh()"/>
</JScrollPane>
@@ -115,7 +115,6 @@
<JScrollPane id='scroll_modified'>
<JTable id="table_modified"
autoResizeMode='3'
- onComponentResized="reSize(MODIFIED,table_modified)"
rowSelectionAllowed="true"
onMouseClicked="doRefresh()"/>
</JScrollPane>
@@ -133,7 +132,6 @@
<JScrollPane id='scroll_outofdateAndModified'>
<JTable id="table_outofdateAndModified"
autoResizeMode='3'
- onComponentResized="reSize(OUT_OF_DATE_AND_MODIFIED,table_outofdateAndModified)"
rowSelectionAllowed="true"
onMouseClicked="doRefresh()"/>
</JScrollPane>
1
0
r1301 - in trunk/isis-fish/src: java/fr/ifremer/isisfish/entities test/fr/ifremer/isisfish
by bpoussin@users.labs.libre-entreprise.org 18 Aug '08
by bpoussin@users.labs.libre-entreprise.org 18 Aug '08
18 Aug '08
Author: bpoussin
Date: 2008-08-18 13:42:49 +0000 (Mon, 18 Aug 2008)
New Revision: 1301
Removed:
trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/migration/
trunk/isis-fish/src/test/fr/ifremer/isisfish/versionning/
Log:
gros nettoyage apres fusion avec la branche 3.2. (migration de schema, nouvelle equation, calcul en maille)
- en cours de finalisation du refactoring du vcs
compile, mais ne fonctionne pas, un commit est jamais mauvais :)
1
0
Author: bpoussin
Date: 2008-08-14 14:59:39 +0000 (Thu, 14 Aug 2008)
New Revision: 1300
Modified:
trunk/isis-fish/doc/Todo.rst
Log:
ajout de todo
Modified: trunk/isis-fish/doc/Todo.rst
===================================================================
--- trunk/isis-fish/doc/Todo.rst 2008-08-14 14:58:23 UTC (rev 1299)
+++ trunk/isis-fish/doc/Todo.rst 2008-08-14 14:59:39 UTC (rev 1300)
@@ -1,3 +1,22 @@
+Pour la version 3.2.0:
+- parsing d'option
+- vcs
+- equation 1
+- equation 2
+- algo avec maille
+- lancement de simulation dans un process extern qui ecrit sont etat dans un fichier
+- suivi de l'etat des fichiers par un thread.
+
+Pour la version 4.0.0.0:
+- db4o (test de perf pour simulation, sauvegarde/rendu des resultats)
+- jaxx + validator
+
+Pour la version 4.0.0.1:
+- utilisation de velocity pour les templates de script
+
+
+
+
- dans interface de demande de config, proposer le choix de l'emplacement de la base (montre la place disque restante)
- Ajouter dans le wiki, la signification du 3eme chiffre de version (version API de script)
1
0
r1299 - branches/isis-fish-3.1.4/src/resources
by bpoussin@users.labs.libre-entreprise.org 14 Aug '08
by bpoussin@users.labs.libre-entreprise.org 14 Aug '08
14 Aug '08
Author: bpoussin
Date: 2008-08-14 14:58:23 +0000 (Thu, 14 Aug 2008)
New Revision: 1299
Modified:
branches/isis-fish-3.1.4/src/resources/IsisFish_init.properties
Log:
montre par defaut toutes les simulations terminees
Modified: branches/isis-fish-3.1.4/src/resources/IsisFish_init.properties
===================================================================
--- branches/isis-fish-3.1.4/src/resources/IsisFish_init.properties 2008-08-14 14:55:00 UTC (rev 1298)
+++ branches/isis-fish-3.1.4/src/resources/IsisFish_init.properties 2008-08-14 14:58:23 UTC (rev 1299)
@@ -21,7 +21,7 @@
###
-### les propriétés de la configuration principal obligatoires pour commandline
+### les propri\u00E9t\u00E9s de la configuration principal obligatoires pour commandline
###
#main.config.definition.configFileName=java.io.File:.isis-config-3
@@ -40,7 +40,7 @@
#main.config.modifiers.version=final,static,mandatory
###
-### les propriétés de la configuration principal
+### les propri\u00E9t\u00E9s de la configuration principal
###
main.config.definition.compileDirectory=java.io.File:isis-build
@@ -103,10 +103,10 @@
main.config.definition.simulationServer=java.net.URL:http://simulateur.ifremer.fr:9090
main.config.modifiers.simulationServer=mandatory
-main.config.definition.simulationShowOnlyError=java.lang.Boolean:true
+main.config.definition.simulationShowOnlyError=java.lang.Boolean:false
main.config.modifiers.simulationShowOnlyError=
-main.config.definition.simulationShowOnlyQueue=java.lang.Boolean:true
+main.config.definition.simulationShowOnlyQueue=java.lang.Boolean:false
main.config.modifiers.simulationShowOnlyQueue=
main.config.definition.smtpServer=java.lang.String:smtp
@@ -120,7 +120,7 @@
###
-### les propriétés de la configuration vcs
+### les propri\u00E9t\u00E9s de la configuration vcs
###
vcs.config.definition.localDatabasePath=java.io.File:isis-database-3
vcs.config.modifiers.localDatabasePath=mandatory
@@ -168,7 +168,7 @@
vcs.config.modifiers.userName=mandatory
###
-### les propriétés de la configuration h2
+### les propri\u00E9t\u00E9s de la configuration h2
###
# On utilise pas cglib pour eviter les OutOfMemory: PermGen
h2.config.definition.h2BytecodeProvider=java.lang.String:javassist
@@ -258,5 +258,5 @@
h2.config.definition.storageData=java.lang.String:data
h2.config.modifiers.storageData=final,mandatory,static,transient
-h2.config.definition.updateschemaDatabase=java.lang.Boolean:false
+h2.config.definition.updateschemaDatabase=java.lang.Boolean:true
h2.config.modifiers.updateschemaDatabase=final,mandatory,static,transient
1
0
r1298 - in trunk/isis-fish/src/java/fr/ifremer/isisfish: . actions datastore ui vcs
by bpoussin@users.labs.libre-entreprise.org 14 Aug '08
by bpoussin@users.labs.libre-entreprise.org 14 Aug '08
14 Aug '08
Author: bpoussin
Date: 2008-08-14 14:55:00 +0000 (Thu, 14 Aug 2008)
New Revision: 1298
Added:
trunk/isis-fish/src/java/fr/ifremer/isisfish/actions/
trunk/isis-fish/src/java/fr/ifremer/isisfish/actions/ExportAction.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/actions/ImportAction.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/actions/OtherAction.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/actions/SimulationAction.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/actions/VCSAction.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/AbstractVCS.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSFactory.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSNone.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSSVN.java
Modified:
trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisConfig.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisFish.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/VersionStorage.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/Welcome.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCS.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/package.html
Log:
refactoring du vcs en cours
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisConfig.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisConfig.java 2008-08-13 18:24:19 UTC (rev 1297)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisConfig.java 2008-08-14 14:55:00 UTC (rev 1298)
@@ -27,7 +27,7 @@
import fr.ifremer.isisfish.actions.SimulationAction;
import fr.ifremer.isisfish.actions.VCSAction;
import fr.ifremer.isisfish.simulator.SimulationContext;
-import fr.ifremer.isisfish.vcs.VCS;
+import fr.ifremer.isisfish.vcs.VCSNone;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
@@ -186,7 +186,7 @@
// public boolean isUseVCS() {
// String value = getOption(Option.VCS_TYPE.key);
-// boolean result = !VCS.TYPE_NONE.equals(value);
+// boolean result = !VCSNone.TYPE_NONE.equals(value);
// return result;
// }
@@ -439,14 +439,14 @@
SSH_PASSPHRASE("ssh.passphrase", _("isisfish.config.vcs.passphrase.description"), ""),
// can be None, CVS or SVN. only None or SVN work
- VCS_TYPE(VCS.VCS_TYPE, _("isisfish.config.vcs.type.description"), VCS.TYPE_SVN),
+ VCS_TYPE(VCSNone.VCS_TYPE, _("isisfish.config.vcs.type.description"), VCSNone.TYPE_SVN),
// depend of VCS_TYPE, for SVN can be http or ssh
- VCS_CONNECTION(VCS.VCS_CONNECTION, _("isisfish.config.vcs.useSshConnexion.description"), "http"),
+ VCS_CONNECTION(VCSNone.VCS_CONNECTION, _("isisfish.config.vcs.useSshConnexion.description"), "http"),
// user login to access vcs
- VCS_USER_NAME(VCS.VCS_USER_NAME, _("isisfish.config.vcs.userName.description"), "anonymous"),
- VCS_HOST_NAME(VCS.VCS_HOST_NAME, _("isisfish.config.vcs.hostName.description"), "labs.libre-entreprise.org"),
- VCS_PATH(VCS.VCS_PATH, _("isisfish.config.vcs.remotePath.description"), "svnroot/isis-fish-data"),
- VCS_TAG(VCS.VCS_TAG, _("isisfish.config.vcs.remoteDatabase.description"), "tag/" + VERSION_DATABASE),
+ VCS_USER_NAME(VCSNone.VCS_USER_NAME, _("isisfish.config.vcs.userName.description"), "anonymous"),
+ VCS_HOST_NAME(VCSNone.VCS_HOST_NAME, _("isisfish.config.vcs.hostName.description"), "labs.libre-entreprise.org"),
+ VCS_PATH(VCSNone.VCS_PATH, _("isisfish.config.vcs.remotePath.description"), "svnroot/isis-fish-data"),
+ VCS_TAG(VCSNone.VCS_TAG, _("isisfish.config.vcs.remoteDatabase.description"), "tag/" + VERSION_DATABASE),
// TYPE_REPO_PROPERTY_KEY = newConfigPropertyKey("typeRepo", VCSTypeRepo.class, 9, n_("isisfish.config.vcs.typeRepo.description"), "TAG"),
// PROJECT_NAME_PROPERTY_KEY = newConfigPropertyKey("projectName", String.class, 11, n_("isisfish.config.main.projectName.description"), "Isis-Fish"),
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisFish.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisFish.java 2008-08-13 18:24:19 UTC (rev 1297)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisFish.java 2008-08-14 14:55:00 UTC (rev 1298)
@@ -49,7 +49,7 @@
import fr.ifremer.isisfish.util.RangeOfValuesConverter;
import fr.ifremer.isisfish.util.StringConverter;
import fr.ifremer.isisfish.util.TimeUnitConverter;
-import fr.ifremer.isisfish.vcs.VCS;
+import fr.ifremer.isisfish.vcs.VCSNone;
import java.io.File;
import org.apache.commons.beanutils.ConvertUtils;
import org.apache.commons.logging.LogFactory;
@@ -92,7 +92,7 @@
static public IsisConfig config = null;
static public int step = 0; // action step
- static public VCS vcs = null;
+ static public VCSNone vcs = null;
static public Context uiContext = null;
static protected boolean quit = false;
@@ -250,12 +250,12 @@
}
/**
- * Initialise le VCS et check s'il y a des mises a jour pour prevenir
+ * Initialise le VCSNone et check s'il y a des mises a jour pour prevenir
* l'utilisateur
*/
static public void initVCS() {
// init vcs
- vcs = VCS.createVCS(config);
+ vcs = VCSNone.createVCS(config);
// check connection status
vcs.checkConnection();
Added: trunk/isis-fish/src/java/fr/ifremer/isisfish/actions/ExportAction.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/actions/ExportAction.java (rev 0)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/actions/ExportAction.java 2008-08-14 14:55:00 UTC (rev 1298)
@@ -0,0 +1,248 @@
+/* *##%
+ * Copyright (C) 2002-2008 Code Lutin, Benjamin Poussin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * USA.
+ *##%*/
+
+package fr.ifremer.isisfish.actions;
+
+import fr.ifremer.isisfish.IsisConfig;
+import fr.ifremer.isisfish.datastore.AnalysePlanStorage;
+import fr.ifremer.isisfish.datastore.DataStorage;
+import fr.ifremer.isisfish.datastore.ExportStorage;
+import fr.ifremer.isisfish.datastore.FormuleStorage;
+import fr.ifremer.isisfish.datastore.RegionStorage;
+import fr.ifremer.isisfish.datastore.RuleStorage;
+import fr.ifremer.isisfish.datastore.ScriptStorage;
+import fr.ifremer.isisfish.datastore.SimulationStorage;
+import fr.ifremer.isisfish.datastore.SimulatorStorage;
+import fr.ifremer.isisfish.ui.ScriptActionHelper;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.regex.Pattern;
+import static org.codelutin.i18n.I18nf._;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.codelutin.util.FileUtil;
+
+/**
+ *
+ * @author poussin
+ * @version $Revision$
+ *
+ * Last update: $Date$
+ * by : $Author$
+ */
+public class ExportAction {
+
+ /** to use log facility, just put in your code: log.info(\"...\"); */
+ static private Log log = LogFactory.getLog(ExportAction.class);
+
+ protected IsisConfig config = null;
+
+ public ExportAction(IsisConfig config) {
+ this.config = config;
+ }
+
+ public void applyFilter(String filter, List<String> names) {
+ if (filter != null && !"*".equals(filter)) {
+ Pattern p = Pattern.compile(filter);
+ // apply filter on names found
+ for (Iterator<String> i=names.iterator(); i.hasNext();) {
+ String name = i.next();
+ if (!p.matcher(name).matches()) {
+ i.remove();
+ }
+ }
+ }
+ }
+
+ public void display(String filter, List<String> names) {
+ StringBuilder sb = new StringBuilder();
+ sb.append(" found ").append(names.size());
+ sb.append(" with filter ").append(filter);
+ sb.append(" in IsisFish");
+ for (String name : names) {
+ sb.append("\n").append(name);
+ }
+ System.out.println(sb.toString());
+ }
+
+ public void listAnalysePlan(String filter) throws Exception {
+ List<String> names = AnalysePlanStorage.getAnalysePlanNames();
+ applyFilter(filter, names);
+ display(filter, names);
+ }
+
+ public void listExport(String filter) throws Exception {
+ List<String> names = ExportStorage.getExportNames();
+ applyFilter(filter, names);
+ display(filter, names);
+ }
+
+ public void listRule(String filter) throws Exception {
+ List<String> names = RuleStorage.getRuleNames();
+ applyFilter(filter, names);
+ display(filter, names);
+ }
+
+ public void listScript(String filter) throws Exception {
+ List<String> names = ScriptStorage.getScriptNames();
+ applyFilter(filter, names);
+ display(filter, names);
+ }
+
+ public void listRegion(String filter) throws Exception {
+ List<String> names = RegionStorage.getRegionNames();
+ applyFilter(filter, names);
+ display(filter, names);
+ }
+
+ public void listSimulation(String filter) throws Exception {
+ List<String> names = SimulationStorage.getSimulationNames();
+ applyFilter(filter, names);
+ display(filter, names);
+ }
+
+ public void listSimulator(String filter) throws Exception {
+ List<String> names = SimulatorStorage.getSimulatorNames();
+ applyFilter(filter, names);
+ display(filter, names);
+ }
+
+ public void listFormula(String filter) throws Exception {
+ List<String> names = new ArrayList<String>();
+ for (String name : FormuleStorage.getCategories()) {
+ names.addAll(FormuleStorage.getFormuleNames(name));
+ }
+ applyFilter(filter, names);
+ display(filter, names);
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ //
+ // E X P O R T
+ //
+ //////////////////////////////////////////////////////////////////////////
+
+ public void exportRegion(File file, String name, boolean force) throws Exception {
+ log.info("file:" + file + ", name:" + name);
+ if (!force && file.exists()) {
+ throw new IllegalArgumentException(_("destination already exists %s use 'force' argument to force overwrite", file));
+ }
+
+ if (!RegionStorage.exists(name)) {
+ // fatal error
+ throw new IllegalArgumentException(_("could not found region %s", name));
+ }
+ DataStorage data = RegionStorage.getRegion(name);
+ if (data != null) {
+ data.createZip(file);
+ }
+ }
+
+ public void exportSimulation(File file, String name, boolean force) throws Exception {
+ log.info("file:" + file + ", name:" + name);
+ if (!force && file.exists()) {
+ throw new IllegalArgumentException(_("destination already exists %s use 'force' argument to force overwrite", file));
+ }
+
+ if (!SimulationStorage.exists(name)) {
+ // fatal error
+ throw new IllegalArgumentException(_("could not found simulation %s", name));
+ }
+ DataStorage data = SimulationStorage.getSimulation(name);
+ if (data != null) {
+ data.createZip(file);
+ }
+ }
+
+ public void exportAnalysePlan(File file, String name, boolean force) throws Exception {
+ if (!force && file.exists()) {
+ throw new IllegalArgumentException(_("destination already exists %s use 'force' argument to force overwrite", file));
+ }
+ AnalysePlanStorage storage = AnalysePlanStorage.getAnalysePlan(name);
+ if (!storage.exists()) {
+ throw new IllegalArgumentException(_("could not found %s", name));
+ }
+ String content = storage.getContent();
+ FileUtil.writeString(file, content);
+ }
+
+ public void exportRule(File file, String name, boolean force) throws Exception {
+ if (!force && file.exists()) {
+ throw new IllegalArgumentException(_("destination already exists %s use 'force' argument to force overwrite", file));
+ }
+ RuleStorage storage = RuleStorage.getRule(name);
+ if (!storage.exists()) {
+ throw new IllegalArgumentException(_("could not found %s", name));
+ }
+ String content = storage.getContent();
+ FileUtil.writeString(file, content);
+ }
+
+ public void exportScript(File file, String name, boolean force) throws Exception {
+ if (!force && file.exists()) {
+ throw new IllegalArgumentException(_("destination already exists %s use 'force' argument to force overwrite", file));
+ }
+ ScriptStorage storage = ScriptStorage.getScript(name);
+ if (!storage.exists()) {
+ throw new IllegalArgumentException(_("could not found %s", name));
+ }
+ String content = storage.getContent();
+ FileUtil.writeString(file, content);
+ }
+
+ public void exportExport(File file, String name, boolean force) throws Exception {
+ if (!force && file.exists()) {
+ throw new IllegalArgumentException(_("destination already exists %s use 'force' argument to force overwrite", file));
+ }
+ ExportStorage storage = ExportStorage.getExport(name);
+ if (!storage.exists()) {
+ throw new IllegalArgumentException(_("could not found %s", name));
+ }
+ String content = storage.getContent();
+ FileUtil.writeString(file, content);
+ }
+
+ public void exportSimulator(File file, String name, boolean force) throws Exception {
+ if (!force && file.exists()) {
+ throw new IllegalArgumentException(_("destination already exists %s use 'force' argument to force overwrite", file));
+ }
+ SimulatorStorage storage = SimulatorStorage.getSimulator(name);
+ if (!storage.exists()) {
+ throw new IllegalArgumentException(_("could not found %s", name));
+ }
+ String content = storage.getContent();
+ FileUtil.writeString(file, content);
+ }
+
+ public void exportFormula(File file, String category, String name, boolean force) throws Exception {
+ if (!force && file.exists()) {
+ throw new IllegalArgumentException(_("destination already exists %s use 'force' argument to force overwrite", file));
+ }
+ FormuleStorage storage = FormuleStorage.getFormule(category, name);
+ if (!storage.exists()) {
+ throw new IllegalArgumentException(_("could not found %s", name));
+ }
+ String content = storage.getContent();
+ FileUtil.writeString(file, content);
+ }
+
+}
Added: trunk/isis-fish/src/java/fr/ifremer/isisfish/actions/ImportAction.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/actions/ImportAction.java (rev 0)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/actions/ImportAction.java 2008-08-14 14:55:00 UTC (rev 1298)
@@ -0,0 +1,169 @@
+/* *##%
+ * Copyright (C) 2002-2008 Code Lutin, Benjamin Poussin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * USA.
+ *##%*/
+
+package fr.ifremer.isisfish.actions;
+
+import static org.codelutin.i18n.I18nf._;
+
+import fr.ifremer.isisfish.IsisConfig;
+import fr.ifremer.isisfish.datastore.AnalysePlanStorage;
+import fr.ifremer.isisfish.datastore.ExportStorage;
+import fr.ifremer.isisfish.datastore.FormuleStorage;
+import fr.ifremer.isisfish.datastore.RegionStorage;
+import fr.ifremer.isisfish.datastore.RuleStorage;
+import fr.ifremer.isisfish.datastore.ScriptStorage;
+import fr.ifremer.isisfish.datastore.SimulationStorage;
+import fr.ifremer.isisfish.datastore.SimulatorStorage;
+import fr.ifremer.isisfish.ui.ScriptActionHelper;
+import java.io.File;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.codelutin.util.FileUtil;
+
+/**
+ *
+ * @author poussin
+ * @version $Revision$
+ *
+ * Last update: $Date$
+ * by : $Author$
+ */
+public class ImportAction {
+
+ /** to use log facility, just put in your code: log.info(\"...\"); */
+ static private Log log = LogFactory.getLog(ImportAction.class);
+
+ protected IsisConfig config = null;
+
+ public ImportAction(IsisConfig config) {
+ this.config = config;
+ }
+
+ public void importAnalysePlan(boolean force, File file) throws Exception {
+ String name = file.getName();
+ AnalysePlanStorage storage = AnalysePlanStorage.getAnalysePlan(name);
+ if(!force && storage.exists()) {
+ throw new IllegalArgumentException(_("destination already exists %s use \'force\' argument to force overwrite", storage.getFile()));
+ }
+ String content = FileUtil.readAsString(file);
+ storage.setContent(content);
+ }
+
+ public void importExport(boolean force, File file) throws Exception {
+ String name = file.getName();
+ ExportStorage storage = ExportStorage.getExport(name);
+ if(!force && storage.exists()) {
+ throw new IllegalArgumentException(_("destination already exists %s use \'force\' argument to force overwrite", storage.getFile()));
+ }
+ String content = FileUtil.readAsString(file);
+ storage.setContent(content);
+ }
+
+ public void importRule(boolean force, File file) throws Exception {
+ String name = file.getName();
+ RuleStorage storage = RuleStorage.getRule(name);
+ if(!force && storage.exists()) {
+ throw new IllegalArgumentException(_("destination already exists %s use \'force\' argument to force overwrite", storage.getFile()));
+ }
+ String content = FileUtil.readAsString(file);
+ storage.setContent(content);
+ }
+
+ public void importScript(boolean force, File file) throws Exception {
+ String name = file.getName();
+ ScriptStorage storage = ScriptStorage.getScript(name);
+ if(!force && storage.exists()) {
+ throw new IllegalArgumentException(_("destination already exists %s use \'force\' argument to force overwrite", storage.getFile()));
+ }
+ String content = FileUtil.readAsString(file);
+ storage.setContent(content);
+ }
+
+ public void importSimulator(boolean force, File file) throws Exception {
+ String name = file.getName();
+ SimulatorStorage storage = SimulatorStorage.getSimulator(name);
+ if(!force && storage.exists()) {
+ throw new IllegalArgumentException(_("destination already exists %s use \'force\' argument to force overwrite", storage.getFile()));
+ }
+ String content = FileUtil.readAsString(file);
+ storage.setContent(content);
+ }
+
+ public void importFormula(boolean force, String formulaType, File file) throws Exception {
+ if (!FormuleStorage.getCategories().contains(formulaType)) {
+ throw new IllegalArgumentException(_("Could not found formule type %s autorised type are %s", formulaType, FormuleStorage.getCategories()));
+ }
+ String name = file.getName();
+ FormuleStorage storage = FormuleStorage.getFormule(formulaType, name);
+ if(!force && storage.exists()) {
+ throw new IllegalArgumentException(_("destination already exists %s use \'force\' argument to force overwrite", storage.getFile()));
+ }
+ String content = FileUtil.readAsString(file);
+ storage.setContent(content);
+ }
+
+ /**
+ *
+ * @param file zip file containing data
+ * @param force
+ * @throws java.lang.Exception
+ */
+ public void importRegion(boolean force, File file) throws Exception {
+ //TODO test if region exists
+ RegionStorage.importZip(file);
+ }
+
+ /**
+ *
+ * @param file zip file containing data
+ * @param name new region name
+ * @param force
+ * @throws java.lang.Exception
+ */
+ public void importRegionAndRename(boolean force, File file, String name) throws Exception {
+ if (RegionStorage.exists(name) && !force) {
+ // fatal error
+ throw new IllegalArgumentException(_("region already exists %s use 'force' argument to force overwrite", name));
+ }
+ RegionStorage.importAndRenameZip(file, name);
+ }
+
+ /**
+ *
+ * @param file zip file containing data
+ * @param force
+ * @throws java.lang.Exception
+ */
+ public void importSimulation(boolean force, File file) throws Exception {
+ //TODO test if simulation exists
+ SimulationStorage.importZip(file);
+ }
+
+ /**
+ * Import zipped file containing all directory structure
+ *
+ * @param file zip file containing data
+ * @param force
+ * @throws java.lang.Exception
+ */
+ public void importScriptModule(boolean force, File file) throws Exception {
+ ScriptActionHelper.importScript(file, force, false, null);
+ }
+
+}
Added: trunk/isis-fish/src/java/fr/ifremer/isisfish/actions/OtherAction.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/actions/OtherAction.java (rev 0)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/actions/OtherAction.java 2008-08-14 14:55:00 UTC (rev 1298)
@@ -0,0 +1,62 @@
+/* *##%
+ * Copyright (C) 2002-2008 Code Lutin, Benjamin Poussin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * USA.
+ *##%*/
+
+package fr.ifremer.isisfish.actions;
+
+import static org.codelutin.i18n.I18nf._;
+
+import fr.ifremer.isisfish.IsisConfig;
+import fr.ifremer.isisfish.vcs.VCSNone;
+import java.io.File;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ *
+ * @author poussin
+ * @version $Revision$
+ *
+ * Last update: $Date$
+ * by : $Author$
+ */
+public class OtherAction {
+
+ /** to use log facility, just put in your code: log.info(\"...\"); */
+ static private Log log = LogFactory.getLog(OtherAction.class);
+
+ protected IsisConfig config = null;
+
+ public OtherAction(IsisConfig config) {
+ this.config = config;
+ }
+
+ static public void help() {
+ System.out.println("Usage: isis-fish [-h]");
+ }
+
+ public void chekoutMavenFile() throws Exception {
+ VCSNone vcs = config.getVCS();
+ File dest = config.getDatabaseDirectory();
+ File file = new File(dest, "pom.xml");
+ log.info(_("Checkout pom.xml to %s", file));
+ vcs.update(file);
+ }
+
+
+}
Added: trunk/isis-fish/src/java/fr/ifremer/isisfish/actions/SimulationAction.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/actions/SimulationAction.java (rev 0)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/actions/SimulationAction.java 2008-08-14 14:55:00 UTC (rev 1298)
@@ -0,0 +1,112 @@
+/* *##%
+ * Copyright (C) 2002-2008 Code Lutin, Benjamin Poussin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * USA.
+ *##%*/
+
+package fr.ifremer.isisfish.actions;
+
+import static org.codelutin.i18n.I18nf._;
+
+import fr.ifremer.isisfish.IsisConfig;
+import fr.ifremer.isisfish.datastore.RegionStorage;
+import fr.ifremer.isisfish.datastore.SimulationStorage;
+import fr.ifremer.isisfish.simulator.SimulationHelper;
+import fr.ifremer.isisfish.simulator.SimulationParameter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Properties;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ *
+ * @author poussin
+ * @version $Revision$
+ *
+ * Last update: $Date$
+ * by : $Author$
+ */
+public class SimulationAction {
+
+ /** to use log facility, just put in your code: log.info(\"...\"); */
+ static private Log log = LogFactory.getLog(SimulationAction.class);
+
+ protected IsisConfig config = null;
+
+ public SimulationAction(IsisConfig config) {
+ this.config = config;
+ }
+
+ public static void simulateWithRegion(String simulId, File parameterFile, File region) throws Exception {
+ Properties props = new Properties();
+ FileInputStream inStream = new FileInputStream(parameterFile);
+ props.load(inStream);
+ inStream.close();
+
+ SimulationParameter params = new SimulationParameter();
+ params.fromProperties(props);
+
+ // try to import region if needed
+ String regionName = params.getRegionName();
+ if (region != null) {
+ if (!RegionStorage.exists(regionName)) {
+ RegionStorage.importAndRenameZip(region, regionName);
+ } else {
+ log.warn(_("Region %s allready exist in repository. Cant import", regionName));
+ }
+ }
+
+ SimulationHelper.simulate(simulId, params, false);
+ }
+
+ /**
+ *
+ * @param simulId id de simulation
+ * @param zip Zip de la simulation
+ * @param parameterFile parametre optionnel pour la simulation
+ */
+ public static void simulateWithSimulation(String simulId, File parameterFile, File simulationZip) throws Exception {
+ SimulationParameter params = null;
+ if (parameterFile != null && parameterFile.exists()) {
+ Properties props = new Properties();
+ FileInputStream inStream = new FileInputStream(parameterFile);
+ props.load(inStream);
+ inStream.close();
+
+ params = new SimulationParameter();
+ params.fromProperties(props);
+ }
+ log.info("id:" + simulId + ", zip:" + simulationZip + (params!=null?" with parameters":""));
+
+ // import de cette simulation
+ String name = simulId + " " + new SimpleDateFormat("yyyy-MM-dd-HH-mm").format(new Date());
+
+ // import de la simulation avec un autre nom
+ SimulationStorage sim = SimulationStorage.importAndRenameZip(simulationZip, name);
+ if (params != null) {
+ sim.setParameter(params);
+ }
+ // lancement de la simulation
+ SimulationHelper.simulate(null, sim);
+
+ sim.getStorage().closeContext();
+
+ }
+
+}
Added: trunk/isis-fish/src/java/fr/ifremer/isisfish/actions/VCSAction.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/actions/VCSAction.java (rev 0)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/actions/VCSAction.java 2008-08-14 14:55:00 UTC (rev 1298)
@@ -0,0 +1,97 @@
+/* *##%
+ * Copyright (C) 2002-2008 Code Lutin, Benjamin Poussin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * USA.
+ *##%*/
+
+package fr.ifremer.isisfish.actions;
+
+
+import com.sshtools.j2ssh.transport.publickey.OpenSSHPublicKeyFormat;
+import com.sshtools.j2ssh.transport.publickey.SshKeyGenerator;
+import fr.ifremer.isisfish.IsisConfig;
+import fr.ifremer.isisfish.ui.Welcome;
+import java.io.File;
+import java.util.Arrays;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.codelutin.util.FileUtil;
+
+/**
+ *
+ * @author poussin
+ * @version $Revision$
+ *
+ * Last update: $Date$
+ * by : $Author$
+ */
+public class VCSAction {
+
+ /** to use log facility, just put in your code: log.info(\"...\"); */
+ static private Log log = LogFactory.getLog(VCSAction.class);
+
+ protected IsisConfig config = null;
+
+ public VCSAction(IsisConfig config) {
+ this.config = config;
+ }
+
+ public void sshCreateKey(boolean force) throws Exception {
+ File f = config.getOptionAsFile(IsisConfig.Option.SSH_KEY_FILE.key);
+
+ if (f.exists() && !force) {
+ log.error("the private key already exist " + f + ", use option [force] to overwrite");
+ return;
+ }
+ File publicKeyFile = new File(f.getAbsolutePath() + ".pub");
+
+ log.info("Generate ssh key to " + f);
+ SshKeyGenerator.main(new String[]{"-b", "1024", "-t", "rsa", f.getAbsolutePath()});
+
+ log.info("public key before OpenSsh : " + FileUtil.readAsString(publicKeyFile));
+ String openSshPublicKey =
+ SshKeyGenerator.convertPublicKeyFile(publicKeyFile,
+ new OpenSSHPublicKeyFormat(
+ config.getOption(IsisConfig.Option.USER_NAME.key) +
+ "@forIsisFish 1024-bit rsa"));
+
+ log.info("public key OpenSsh : " + openSshPublicKey);
+ FileUtil.writeString(new File(publicKeyFile.getAbsolutePath()), openSshPublicKey);
+ }
+
+ public void vcsUpdate() throws Exception {
+ // ATTENTION: il est inutil de d'accepter cette option au premier
+ // lancement! car on a effectue soit un checkout, soit
+ // une migration // !IsisContext.get().isFirstLaunch()
+ Welcome.updateVCS(null);
+ }
+
+ public void vcsAdd(File ... file) throws Exception {
+ log.info("file*:" + Arrays.toString(file));
+ throw new UnsupportedOperationException("to be done...");
+ }
+
+ public void vcsRemove(File ... file) throws Exception {
+ log.info("file*:" + Arrays.toString(file));
+ throw new UnsupportedOperationException("to be done...");
+ }
+
+ public void vcsCommit(File ... file) throws Exception {
+ log.info("file*:" + Arrays.toString(file));
+ throw new UnsupportedOperationException("to be done...");
+ }
+
+}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/VersionStorage.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/VersionStorage.java 2008-08-13 18:24:19 UTC (rev 1297)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/VersionStorage.java 2008-08-14 14:55:00 UTC (rev 1298)
@@ -33,7 +33,7 @@
import fr.ifremer.isisfish.IsisFish;
import fr.ifremer.isisfish.vcs.VCSException;
-import fr.ifremer.isisfish.vcs.VCS;
+import fr.ifremer.isisfish.vcs.VCSNone;
import static org.codelutin.i18n.I18n._;
import org.codelutin.util.FileUtil;
@@ -56,7 +56,7 @@
/** Logger for this class */
private static final Log log = LogFactory.getLog(VersionStorage.class);
- static protected VCS getVCS() {
+ static protected VCSNone getVCS() {
return IsisFish.vcs;
}
@@ -68,7 +68,7 @@
* Par exemple si on a /home/poussin/isis-database comme root
* il faut que file soit un fichier ou un sous fichiers dans root
*
- * @param root le repertoire racine de mise en VCS (HOME VCS)
+ * @param root le repertoire racine de mise en VCSNone (HOME VCSNone)
* @param file le fichier a gérer.
*/
protected VersionStorage(File root, File file) {
@@ -78,7 +78,7 @@
/**
* Permet de demander la preparation des fichiers pour etre envoyé
- * vers le VCS
+ * vers le VCSNone
*
*/
abstract protected void prepare();
@@ -100,9 +100,9 @@
/**
* Indique s'il a deja ete ajouté au cvs. Si file est un repertoire
* (ex pour Region) alors vrai meme si tous les fichiers du repertoire
- * ne sont pas sur le VCS
+ * ne sont pas sur le VCSNone
*
- * @return vrai si deja dans le VCS
+ * @return vrai si deja dans le VCSNone
*/
public boolean isOnRemote() throws VCSException {
return getVCS().isOnRemote(getFile());
@@ -110,7 +110,7 @@
/**
* Permet de savoir si un fichier doit etre géré par le vcs ou non.
- * L'implantation par defaut exclus les répertoires VCS, il faut
+ * L'implantation par defaut exclus les répertoires VCSNone, il faut
* toujours appeler le super si on surcharge la methode.
*
* @param file le fichier a tester
@@ -121,7 +121,7 @@
}
/**
- * Donne la liste de tous les fichiers que le VCS doit gérer.
+ * Donne la liste de tous les fichiers que le VCSNone doit gérer.
* Par defaut parcours tous les repertoires et ajouter tous les fichiers
* et repertoire trouvé. Il est possible d'exclure des fichiers et/ou
* repertoire en surchargeant {@link #isVersionnableAbleFile(File)}
@@ -144,9 +144,9 @@
}
/**
- * Donne la liste de tous les fichiers à gérer par le VCS.
+ * Donne la liste de tous les fichiers à gérer par le VCSNone.
* Ceci inclu la liste des répertoires pour aller de ce storage
- * jusqu'a la racine VCS si withParent est vrai
+ * jusqu'a la racine VCSNone si withParent est vrai
*
* @param withParent si vrai inclu les parents
* @return la liste des fichiers trouvés
@@ -167,7 +167,7 @@
}
/**
- * Permet d'ajouter ce storage dans le VCS. Cela prend effet immediatement
+ * Permet d'ajouter ce storage dans le VCSNone. Cela prend effet immediatement
* (un commit est fait).
*
* @param msg le message indiquant le but du fichier
@@ -209,7 +209,7 @@
}
/**
- * Permet d'envoyer des modifications faite en local sur le VCS
+ * Permet d'envoyer des modifications faite en local sur le VCSNone
*
* @param msg le message indiquant le type des modifications
* @throws VCSException si pb pendant l'op
@@ -217,13 +217,13 @@
*/
public void commit(String msg) throws VCSException {
// on appelle en fait add, car il y a peut-etre des nouveaux fichiers
- // a ajouter au VCS et ca doit etre fait automatiquement
+ // a ajouter au VCSNone et ca doit etre fait automatiquement
add(msg);
}
/**
* Permet de mettre a jour le fichier local en fonction de ce qu'il y
- * a sur le VCS
+ * a sur le VCSNone
*
* @throws VCSException si pb pendant l'op
*
@@ -239,7 +239,7 @@
}
/**
- * Permet de ramener tout un répertoire du VCS. Utile seulement pour le
+ * Permet de ramener tout un répertoire du VCSNone. Utile seulement pour le
* premier lancement pour scipts et exports.
*
* @param destDir le repertoire parent
@@ -275,12 +275,12 @@
/**
* Retourne la liste des noms de tous les storages disponibles sur le
- * serveur VCS
+ * serveur VCSNone
*
- * @param directory le répertoire sur le VCS ou doivent se trouver
+ * @param directory le répertoire sur le VCSNone ou doivent se trouver
* les storages (regions, simulations)
* @return la liste des noms de tous les storages disponibles sur le
- * serveur VCS. Si le serveur n'est pas disponible la liste retournée
+ * serveur VCSNone. Si le serveur n'est pas disponible la liste retournée
* est vide.
*/
static public List<String> getRemoteStorageNames(File directory) {
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/Welcome.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/Welcome.java 2008-08-13 18:24:19 UTC (rev 1297)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/Welcome.java 2008-08-14 14:55:00 UTC (rev 1298)
@@ -49,7 +49,7 @@
import fr.ifremer.isisfish.datastore.RuleStorage;
import fr.ifremer.isisfish.datastore.ScriptStorage;
import fr.ifremer.isisfish.datastore.SimulatorStorage;
-import fr.ifremer.isisfish.vcs.VCS;
+import fr.ifremer.isisfish.vcs.VCSNone;
import org.swixat.framework.AbstractFrame;
import org.swixat.framework.OutputView;
import org.swixat.model.GenericContext;
@@ -74,7 +74,7 @@
/** to use log facility, just put in your code: log.info(\"...\"); */
static private Log log = LogFactory.getLog(Welcome.class);
- static protected VCS getVCS() {
+ static protected VCSNone getVCS() {
return IsisFish.config.getVCS();
}
Added: trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/AbstractVCS.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/AbstractVCS.java (rev 0)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/AbstractVCS.java 2008-08-14 14:55:00 UTC (rev 1298)
@@ -0,0 +1,56 @@
+/* *##%
+ * Copyright (C) 2002-2008 Code Lutin, Benjamin Poussin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * USA.
+ *##%*/
+
+package fr.ifremer.isisfish.vcs;
+
+
+import java.io.File;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.codelutin.util.ApplicationConfig;
+
+/**
+ *
+ * @author poussin
+ * @version $Revision$
+ *
+ * Last update: $Date$
+ * by : $Author$
+ */
+public abstract class AbstractVCS implements VCS {
+
+ /** to use log facility, just put in your code: log.info(\"...\"); */
+ static private Log log = LogFactory.getLog(AbstractVCS.class);
+
+ protected ApplicationConfig config;
+
+ public AbstractVCS(ApplicationConfig config) {
+ this.config = config;
+ }
+
+ public boolean accept(File pathname) {
+ return isVersionnableAbleFile(pathname);
+ }
+
+ public boolean isVersionnableAbleFile(File file) {
+ String filename = file.getName();
+ return !".svn".equals(filename) && !"CVS".equals(filename) && !filename.endsWith("~");
+ }
+
+}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCS.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCS.java 2008-08-13 18:24:19 UTC (rev 1297)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCS.java 2008-08-14 14:55:00 UTC (rev 1298)
@@ -1,4 +1,4 @@
-/* *##%
+/*
* Copyright (C) 2002-2008 Code Lutin, Benjamin Poussin
*
* This program is free software; you can redistribute it and/or
@@ -15,149 +15,188 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
- *##%*/
+ */
package fr.ifremer.isisfish.vcs;
import java.io.File;
import java.io.FileFilter;
-import java.util.ArrayList;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.Properties;
-import static org.codelutin.i18n.I18nf._;
+import org.codelutin.util.VersionNumber;
-import org.apache.commons.beanutils.ConstructorUtils;
-import org.apache.commons.beanutils.ConvertUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.codelutin.util.ApplicationConfig;
-
/**
- * VCS (svn or vcs) must extends this class. This class can be used as dummy
- * VCS if not valid VCS found.
- *
+ *
* @author poussin
* @version $Revision$
*
* Last update: $Date$
* by : $Author$
*/
-public class VCS implements FileFilter {
+public interface VCS extends FileFilter {
+ public static final String TYPE_CVS = "cvs";
+ public static final String TYPE_NONE = "none";
+ public static final String TYPE_SVN = "svn";
+ /**
+ * can be http, ssh, pserver, ...
+ */
+ public static final String VCS_PROTOCOLE = "vcs.protocole";
+ /**
+ * remote server adresse (ip or serveur name) ex: labs.libre-entreprise.org
+ */
+ public static final String VCS_HOST_NAME = "vcs.hostName";
+ /**
+ * remote repository path ex: /svnroot/isis-fish-data
+ */
+ public static final String VCS_PATH = "vcs.path";
+ /**
+ * repository tag to used ex: "3.2" or "" for no tag
+ */
+ public static final String VCS_TAG = "vcs.tag";
+ /**
+ * can be None, CVS or SVN. only None or SVN work
+ */
+ public static final String VCS_TYPE = "vcs.type";
+ /**
+ * user login to access vcs ex: bpoussin
+ */
+ public static final String VCS_USER_NAME = "vcs.username";
+ /**
+ * user passwd or passphrase to access vcs ex: xxxxxxxx
+ */
+ public static final String VCS_USER_PASSWORD = "vcs.password";
- static final public String TYPE_NONE = "none";
- static final public String TYPE_SVN = "svn";
- static final public String TYPE_CVS = "cvs";
-
- // can be None, CVS or SVN. only None or SVN work
- static final public String VCS_TYPE = "vcs.type";
- static final public String VCS_CONNECTION = "vcs.connection";
- // user login to access vcs
- static final public String VCS_USER_NAME = "vcs.username";
- static final public String VCS_HOST_NAME = "vcs.hostName";
- static final public String VCS_PATH = "vcs.path";
- static final public String VCS_TAG = "vcs.tag";
-
- /** to use log facility, just put in your code: log.info(\"...\"); */
- static private Log log = LogFactory.getLog(VCS.class);
+ /**
+ * Usefull to permit to use VCSNone as filter
+ * @param pathname
+ * @return
+ */
+ public boolean accept(File pathname);
- protected ApplicationConfig config;
+ /**
+ * Add and commit file in server repository
+ * @param files list of file to add
+ * @param msg message for commit
+ * @throws fr.ifremer.isisfish.vcs.VCSException
+ */
+ public void add(List<File> files, String msg) throws VCSException;
+
+ /**
+ * get repository module on server and put it in destDir
+ * @param destDir destination directory
+ * @param module module name
+ * @param b // FIXME
+ * @throws fr.ifremer.isisfish.vcs.VCSException
+ */
+ public void checkout(File destDir, String module, boolean b) throws VCSException;
+
+ /**
+ * Change repository tag, used when we use some tag and we want to go to
+ * trunk.
+ * @param version version to go, if null trunk is used, otherwize
+ * tags/version is used
+ * @throws fr.ifremer.isisfish.vcs.VCSException
+ */
+ public void switchTag(VersionNumber version) throws VCSException;
/**
- * VCS factory, looking for vcs.type key in config to find vcs class to used
- * If no vcs.type found or is not valid class, use {@link VCS}.
- * @param config
- * @return usable VCS
+ * switch to new protocole, can be used to switch between anonymous and
+ * authenticate protocole
+ * @param protocoleType
+ * @throws fr.ifremer.isisfish.vcs.VCSException
*/
- static public VCS createVCS(ApplicationConfig config) {
- Properties aliases = new Properties();
- aliases.setProperty("", VCS.class.getName());
- aliases.setProperty(TYPE_NONE, VCS.class.getName());
-// aliases.setProperty(TYPE_SVN, VCSSVN.class.getName());
-// aliases.setProperty(TYPE_CVS, VCSCVS.class.getName());
-
- VCS result = null;
- String type = config.getOption(VCS_TYPE);
- // try to convert if type is not class name but an alias
- String classname = aliases.getProperty(type, type);
- try {
- Class clazz = (Class)ConvertUtils.convert(classname, Class.class);
- result = (VCS) ConstructorUtils.invokeConstructor(clazz, config);
- } catch (Exception eee) {
- log.error(_("Can't instanciate wanted VCS (%s), use default",
- config.getOption(VCS_TYPE)), eee);
- result = new VCS(config);
- }
- return result;
- }
+ public void switchProtocole(String protocoleType) throws VCSException;
- protected VCS(ApplicationConfig config) {
- this.config = config;
- }
+ /**
+ * Delete and commit files in server repository
+ * @param files file to delete
+ * @param msg message for commit
+ * @throws fr.ifremer.isisfish.vcs.VCSException
+ */
+ public void delete(List<File> files, String msg) throws VCSException;
- public void add(List<File> files, String msg) throws VCSException {
- throw new VCSException("Can't add file with dummy VCS");
- }
+ /**
+ * Return all changelog between local file version and remote repository
+ * file version
+ * @param files
+ * @return changelog for each file
+ */
+ public Map<File, String> getChanglog(List<File> files);
- public void checkout(File destDir, String module, boolean b) throws VCSException {
- throw new VCSException("Can't checkout with dummy VCS");
- }
+ /**
+ * show diff between local file and repository file
+ * @param file
+ * @return
+ * @throws fr.ifremer.isisfish.vcs.VCSException
+ */
+ public String getDiff(File file) throws VCSException;
- public void delete(List<File> files, String msg) throws VCSException {
- // do nothing
- }
-
- public String getDiff(File file) throws VCSException {
- throw new VCSException("Can't diff with dummy VCS");
- }
-
/**
* Return list of all file on directory on remote server
* @param directory
* @return
*/
- public List<String> getFileList(File directory) throws VCSException {
- List<String> result = new ArrayList<String>();
- return result;
- }
+ public List<String> getFileList(File directory) throws VCSException;
- public boolean isConnected() {
- return false;
- }
-
- public boolean isOnRemote(File file) throws VCSException {
- return false;
- }
+ /**
+ * get list of new or modified files on server
+ * @return list of modified or new files
+ */
+ public List<File> getUpdatedFile();
- public boolean isUpToDate(File file) throws VCSException {
- return true;
- }
+ /**
+ * Ask if there are some new or modified files on server
+ * @return true if new file available
+ */
+ public boolean haveUpdate();
/**
+ * Get connection state.
+ * @return true if server is connectable
+ */
+ public boolean isConnected();
+
+ /**
+ * Check if file is available on server
+ * @param file file to check
+ * @return true if file available
+ * @throws fr.ifremer.isisfish.vcs.VCSException
+ */
+ public boolean isOnRemote(File file) throws VCSException;
+
+ /**
+ * look on server if version is tag repository
+ * @param version version number like 3.2
+ * @return true if tag found with this name
+ */
+ public boolean isTag(VersionNumber version);
+
+ /**
+ * Check if file is uptodate
+ * @param file file to check
+ * @return true if file is in last version
+ * @throws fr.ifremer.isisfish.vcs.VCSException
+ */
+ public boolean isUpToDate(File file) throws VCSException;
+
+ /**
* Must be overwriten, this default implementation return true.
* Check if file can be put in vcs repository, for example when you used
* CVS, you must not put CVS file.
- *
+ * <p>
+ * default refused .svn, CVS and ~ filename
+ *
* @param file
* @return
*/
- public boolean isVersionnableAbleFile(File file) {
- return true;
- }
+ public boolean isVersionnableAbleFile(File file);
- public void update(File file) throws VCSException {
- throw new VCSException("Can't update file with dummy VCS");
- }
-
/**
- * Usefull to permit to use VCS as filter
- * @param pathname
- * @return
+ * Update file
+ * @param file file to update
+ * @return true if there are some merging conflict, false otherwize
+ * @throws fr.ifremer.isisfish.vcs.VCSException
*/
- public boolean accept(File pathname) {
- return isVersionnableAbleFile(pathname);
- }
+ public boolean update(File file) throws VCSException;
-
}
Added: trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSFactory.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSFactory.java (rev 0)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSFactory.java 2008-08-14 14:55:00 UTC (rev 1298)
@@ -0,0 +1,76 @@
+/* *##%
+ * Copyright (C) 2002-2008 Code Lutin, Benjamin Poussin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * USA.
+ *##%*/
+
+package fr.ifremer.isisfish.vcs;
+
+import static org.codelutin.i18n.I18nf._;
+
+import java.util.Properties;
+import org.apache.commons.beanutils.ConstructorUtils;
+import org.apache.commons.beanutils.ConvertUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.codelutin.util.ApplicationConfig;
+
+/**
+ *
+ * @author poussin
+ * @version $Revision$
+ *
+ * Last update: $Date$
+ * by : $Author$
+ */
+public class VCSFactory {
+
+ /** to use log facility, just put in your code: log.info(\"...\"); */
+ static private Log log = LogFactory.getLog(VCSFactory.class);
+
+ private VCSFactory() {}
+
+ /**
+ * VCSNone factory, looking for vcs.type key in config to find vcs class to used
+ * If no vcs.type found or is not valid class, use {@link VCSNone}.
+ * @param config
+ * @return usable VCSNone
+ */
+ static public VCSNone createVCS(ApplicationConfig config) {
+ Properties aliases = new Properties();
+ // for empty and TYPE_NONE we used this class
+ aliases.setProperty("", VCSNone.class.getName());
+ aliases.setProperty(VCS.TYPE_NONE, VCSNone.class.getName());
+ aliases.setProperty(VCS.TYPE_SVN, VCSSVN.class.getName());
+ // FIXME active this line when svn and CVS are implemented
+// aliases.setProperty(TYPE_CVS, VCSCVS.class.getName());
+
+ VCSNone result = null;
+ String type = config.getOption(VCS.VCS_TYPE);
+ // try to convert if type is not class name but an alias
+ String classname = aliases.getProperty(type, type);
+ try {
+ Class clazz = (Class)ConvertUtils.convert(classname, Class.class);
+ result = (VCSNone) ConstructorUtils.invokeConstructor(clazz, config);
+ } catch (Exception eee) {
+ log.error(_("Can't instanciate wanted VCS (%s), use default",
+ config.getOption(VCS.VCS_TYPE)), eee);
+ result = new VCSNone(config);
+ }
+ return result;
+ }
+
+}
Copied: trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSNone.java (from rev 1283, trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCS.java)
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSNone.java (rev 0)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSNone.java 2008-08-14 14:55:00 UTC (rev 1298)
@@ -0,0 +1,186 @@
+/* *##%
+ * Copyright (C) 2002-2008 Code Lutin, Benjamin Poussin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * USA.
+ *##%*/
+
+package fr.ifremer.isisfish.vcs;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import static org.codelutin.i18n.I18nf._;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.codelutin.util.ApplicationConfig;
+import org.codelutin.util.VersionNumber;
+
+/**
+ * VCSNone (svn or vcs) must extends this class. This class can be used as dummy
+ * VCSNone if not valid VCSNone found.
+ *
+ * @author poussin
+ * @version $Revision$
+ *
+ * Last update: $Date$
+ * by : $Author$
+ */
+public class VCSNone extends AbstractVCS {
+
+ /** to use log facility, just put in your code: log.info(\"...\"); */
+ static private Log log = LogFactory.getLog(VCSNone.class);
+
+ public VCSNone(ApplicationConfig config) {
+ super(config);
+ }
+
+ /**
+ * look on server if version is tag repository
+ * @param version version number like 3.2
+ * @return true if tag found with this name
+ */
+ public boolean isTag(VersionNumber version) {
+ return false;
+ }
+
+ /**
+ * Ask if there are some new or modified files on server
+ * @return true if new file available
+ */
+ public boolean haveUpdate() {
+ return false;
+ }
+
+ /**
+ * get list of new or modified files on server
+ * @return list of modified or new files
+ */
+ public List<File> getUpdatedFile() {
+ return new ArrayList<File>();
+ }
+
+ /**
+ * Return all changelog between local file version and remote repository
+ * file version
+ * @param files
+ * @return changelog for each file
+ */
+ public Map<File, String> getChanglog(List<File> files) {
+ return new HashMap<File, String>();
+ }
+
+ /**
+ * Add and commit file in server repository
+ * @param files list of file to add
+ * @param msg message for commit
+ * @throws fr.ifremer.isisfish.vcs.VCSException
+ */
+ public void add(List<File> files, String msg) throws VCSException {
+ throw new VCSException("Can't add file with dummy VCS");
+ }
+
+ /**
+ * get repository module on server and put it in destDir
+ * @param destDir destination directory
+ * @param module module name
+ * @param b // FIXME
+ * @throws fr.ifremer.isisfish.vcs.VCSException
+ */
+ public void checkout(File destDir, String module, boolean b) throws VCSException {
+ throw new VCSException("Can't checkout with dummy VCS");
+ }
+
+ /**
+ * Delete and commit files in server repository
+ * @param files file to delete
+ * @param msg message for commit
+ * @throws fr.ifremer.isisfish.vcs.VCSException
+ */
+ public void delete(List<File> files, String msg) throws VCSException {
+ // do nothing
+ }
+
+ /**
+ * show diff between local file and repository file
+ * @param file
+ * @return
+ * @throws fr.ifremer.isisfish.vcs.VCSException
+ */
+ public String getDiff(File file) throws VCSException {
+ throw new VCSException("Can't diff with dummy VCS");
+ }
+
+ /**
+ * Return list of all file on directory on remote server
+ * @param directory
+ * @return
+ */
+ public List<String> getFileList(File directory) throws VCSException {
+ List<String> result = new ArrayList<String>();
+ return result;
+ }
+
+ /**
+ * Get connection state.
+ * @return true if server is connectable
+ */
+ public boolean isConnected() {
+ return false;
+ }
+
+ /**
+ * Check if file is available on server
+ * @param file file to check
+ * @return true if file available
+ * @throws fr.ifremer.isisfish.vcs.VCSException
+ */
+ public boolean isOnRemote(File file) throws VCSException {
+ return false;
+ }
+
+ /**
+ * Check if file is uptodate
+ * @param file file to check
+ * @return true if file is in last version
+ * @throws fr.ifremer.isisfish.vcs.VCSException
+ */
+ public boolean isUpToDate(File file) throws VCSException {
+ return true;
+ }
+
+ /**
+ * Update file
+ * @param file file to update
+ * @return true if there are some merging conflict, false otherwize
+ * @throws fr.ifremer.isisfish.vcs.VCSException
+ */
+ public boolean update(File file) throws VCSException {
+ throw new VCSException("Can't update file with dummy VCS");
+ }
+
+ public void switchTag(VersionNumber version) throws VCSException {
+ // do nothing
+ }
+
+ public void switchProtocole(String protocoleType) throws VCSException {
+ // do nothing
+ }
+
+
+}
Added: trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSSVN.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSSVN.java (rev 0)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSSVN.java 2008-08-14 14:55:00 UTC (rev 1298)
@@ -0,0 +1,109 @@
+/* *##%
+ * Copyright (C) 2002-2008 Code Lutin, Benjamin Poussin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * USA.
+ *##%*/
+
+package fr.ifremer.isisfish.vcs;
+
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.codelutin.util.ApplicationConfig;
+import org.codelutin.util.VersionNumber;
+
+/**
+ *
+ * @author poussin
+ * @version $Revision$
+ *
+ * Last update: $Date$
+ * by : $Author$
+ */
+public class VCSSVN extends AbstractVCS {
+
+ /** to use log facility, just put in your code: log.info(\"...\"); */
+ static private Log log = LogFactory.getLog(VCSSVN.class);
+
+ public VCSSVN(ApplicationConfig config) {
+ super(config);
+ }
+
+ public void add(List<File> files, String msg) throws VCSException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public void checkout(File destDir, String module, boolean b) throws VCSException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public void delete(List<File> files, String msg) throws VCSException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public Map<File, String> getChanglog(List<File> files) {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public String getDiff(File file) throws VCSException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public List<String> getFileList(File directory) throws VCSException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public List<File> getUpdatedFile() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public boolean haveUpdate() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public boolean isConnected() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public boolean isOnRemote(File file) throws VCSException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public boolean isTag(VersionNumber version) {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public boolean isUpToDate(File file) throws VCSException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public boolean update(File file) throws VCSException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public void switchTag(VersionNumber version) throws VCSException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public void switchProtocole(String protocoleType) throws VCSException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+
+}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/package.html
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/package.html 2008-08-13 18:24:19 UTC (rev 1297)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/package.html 2008-08-14 14:55:00 UTC (rev 1298)
@@ -1,4 +1,4 @@
-Try to keep this class agnostic about IsisFish specific objet. This permit
+Try to keep this classes agnostic about IsisFish specific objects. This permit
library creation in near futur.
<h1>Politique d'utilisation du VCS pour les datas</h1>
@@ -29,9 +29,9 @@
<ul>
<li>Sur le trunk en ecriture</li>
<li>Sur le trunk en lecture (anonymous)</li>
- <li>Sur le trunk en lecture (car release obsolete)</li>
+ <li>Sur le trunk en lecture (car release obsolete, sans mise a jour))</li>
<li>Sur un tag car ancienne release</li>
<li>Sur une branch (en developpement)</li>
<li>En lecture (trunk, tag, branch) car reseau indisponible</li>
</ul>
-</p>
\ No newline at end of file
+</p>
1
0
r1297 - branches/isis-fish-3.1.4/src/resources/i18n
by bpoussin@users.labs.libre-entreprise.org 13 Aug '08
by bpoussin@users.labs.libre-entreprise.org 13 Aug '08
13 Aug '08
Author: bpoussin
Date: 2008-08-13 18:24:19 +0000 (Wed, 13 Aug 2008)
New Revision: 1297
Modified:
branches/isis-fish-3.1.4/src/resources/i18n/isis-fish-en_GB.properties
branches/isis-fish-3.1.4/src/resources/i18n/isis-fish-fr_FR.properties
Log:
Reprise de fichier valide depuis le svn
Modified: branches/isis-fish-3.1.4/src/resources/i18n/isis-fish-en_GB.properties
===================================================================
--- branches/isis-fish-3.1.4/src/resources/i18n/isis-fish-en_GB.properties 2008-08-13 18:15:25 UTC (rev 1296)
+++ branches/isis-fish-3.1.4/src/resources/i18n/isis-fish-en_GB.properties 2008-08-13 18:24:19 UTC (rev 1297)
@@ -1,4 +1,190 @@
-Can''t\ add\ result\ ''{0}''\ at\ date\ {1}=Can''t add result ''{0}'' at date {1}
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="fr ">
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title>Labs: Isis-fish: dépôt de sources</title>
+ <link rel="alternate" title="Labs - Project News Highlights RSS" href="/export/rss_sfnews.php" type="application/rss+xml"/>
+ <link rel="alternate" title="Labs - New Projects RSS" href="/export/rss_sfprojects.php" type="application/rss+xml"/>
+
+ <script language="JavaScript" type="text/javascript">
+ <!--
+
+ function admin_window(adminurl) {
+ AdminWin = window.open( adminurl, 'AdminWindow','scrollbars=yes,resizable=yes, toolbar=yes, height=400, width=400, top=2, left=2');
+ AdminWin.focus();
+ }
+ function help_window(helpurl) {
+ HelpWin = window.open( helpurl,'HelpWindow','scrollbars=yes,resizable=yes,toolbar=no,height=400,width=400');
+ }
+ // -->
+ </script>
+
+<style type="text/css">
+ <!--
+ BODY {
+ margin-top: 3;
+ margin-left: 3;
+ margin-right: 3;
+ margin-bottom: 3;
+ background-image: url("/themes/le/images/theme-top-blue.png");
+ }
+ ol,ul,p,body,td,tr,th,form { font-family: verdana,arial,helvetica,sans-serif; font-size:small;
+ color: #333333; }
+
+ h1 { font-size: x-large; font-family: verdana,arial,helvetica,sans-serif; }
+ h2 { font-size: large; font-family: verdana,arial,helvetica,sans-serif; }
+ h3 { font-size: medium; font-family: verdana,arial,helvetica,sans-serif; }
+ h4 { font-size: small; font-family: verdana,arial,helvetica,sans-serif; }
+ h5 { font-size: x-small; font-family: verdana,arial,helvetica,sans-serif; }
+ h6 { font-size: xx-small; font-family: verdana,arial,helvetica,sans-serif; }
+
+ pre,tt { font-family: courier,sans-serif }
+
+ a:link { text-decoration:none; color: #0000be }
+ a:visited { text-decoration:none; color: #0000be }
+ a:active { text-decoration:none }
+ a:hover { text-decoration:underline; color:red }
+
+ .titlebar { color: black; text-decoration: none; font-weight: bold; }
+ a.tablink { color: black; text-decoration: none; font-weight: bold; font-size: x-small; }
+ a.tablink:visited { color: black; text-decoration: none; font-weight: bold; font-size: x-small; }
+ a.tablink:hover { text-decoration: none; color: black; font-weight: bold; font-size: x-small; }
+ a.tabsellink { color: #0000be; text-decoration: none; font-weight: bold; font-size: x-small; }
+ a.tabsellink:visited { color: #0000be; text-decoration: none; font-weight: bold; font-size: x-small; }
+ a.tabsellink:hover { text-decoration: none; color: #0000be; font-weight: bold; font-size: x-small; }
+ -->
+</style>
+<link rel="stylesheet" type="text/css" href="/plugins/scmcvs/cvsweb/css/cvsweb.css" /><link rel="stylesheet" type="text/css" href="/plugins/scmsvn/viewcvs/styles.css" /></head>
+
+<body>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0">
+
+ <tr>
+ <!--<td><a href="/"><img src="http://labs.libre-entreprise.org//themes/le/images/logo.png" border="0" alt="" width="81" height="62" /></a></td>-->
+ <td style="color: #FFFFFF; font-size: large; font-weight: bold;" valign="middle">Labs.libre-entreprise.org</td>
+ <td>
+ <form action="/search/" method="get">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr><td>
+ <div align="center" style="font-size:smaller"><select name="type_of_search"><option value="soft">Logiciel/Groupe</option>
+<option value="people">Personne</option>
+</select></div></td><td> </td><td><input type="text" size="12" name="words" value="" /></td><td> </td><td><input type="submit" name="Search" value="Rechercher" /></td></tr></table></form></td>
+ <td align="right"> <b><a style="color: #FFFFFF" href="/account/login.php">S'identifier</a></b><br />
+ <b><a style="color: #FFFFFF" href="/account/register.php">Nouveau compte</a></b>
+ </td>
+ <td> </td>
+ </tr>
+
+</table>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0">
+
+ <tr>
+ <td> </td>
+ <td colspan="3">
+
+
+
+ <!-- start tabs -->
+
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr>
+ <td valign="top" width="10" background="/themes/le/images/theme-toptab-end-notselected.png"><img src="/themes/le/images/clear.png" height="25" width="10" alt="" /></td><td background="/themes/le/images/theme-toptab-notselected-bg.png" width="20%" align="center"><a class="tablink" href="/">Accueil</a></td>
+ <td colspan="2" valign="top" width="20" background="/themes/le/images/theme-toptab-notselected-notselected.png"><img src="/themes/le/images/clear.png" height="2" width="20" alt="" /></td><td background="/themes/le/images/theme-toptab-notselected-bg.png" width="20%" align="center"><a class="tablink" href="/my/">Ma page</a></td>
+ <td colspan="2" valign="top" width="20" background="/themes/le/images/theme-toptab-notselected-notselected.png"><img src="/themes/le/images/clear.png" height="2" width="20" alt="" /></td><td background="/themes/le/images/theme-toptab-notselected-bg.png" width="20%" align="center"><a class="tablink" href="/softwaremap/">Arbre des projets</a></td>
+ <td colspan="2" valign="top" width="20" background="/themes/le/images/theme-toptab-notselected-notselected.png"><img src="/themes/le/images/clear.png" height="2" width="20" alt="" /></td><td background="/themes/le/images/theme-toptab-notselected-bg.png" width="20%" align="center"><a class="tablink" href="/snippet/">Boite à outils</a></td>
+ <td colspan="2" valign="top" width="20" background="/themes/le/images/theme-toptab-notselected-selected.png"><img src="/themes/le/images/clear.png" height="2" width="20" alt="" /></td><td background="/themes/le/images/theme-toptab-selected-bg.png" width="20%" align="center"><a class="tabsellink" href="/projects/isis-fish/">Isis-fish</a></td>
+ <td valign="top" width="10" background="/themes/le/images/theme-toptab-selected-end.png"><img src="/themes/le/images/clear.png" height="2" width="10" alt="" /></td></tr><tr><td colspan="12" height="1" bgcolor="#909090"><img src="/themes/le/images/clear.png" height="1" width="10" /></td><td colspan="3" height="1" bgcolor="#e0e0e0"><img src="/themes/le/images/clear.png" height="1" width="10" /></td></tr>
+ </table>
+
+ <!-- end tabs -->
+
+ </td>
+ <td> </td>
+ </tr>
+
+ <tr>
+ <td align="left" bgcolor="#E0E0E0" width="9"><img src="/themes/le/images/tabs/topleft.png" height="9" width="9" alt="" /></td>
+ <td bgcolor="#E0E0E0" width="30"><img src="/themes/le/images/clear.png" width="30" height="1" alt="" /></td>
+ <td bgcolor="#E0E0E0"><img src="/themes/le/images/clear.png" width="1" height="1" alt="" /></td>
+ <td bgcolor="#E0E0E0" width="30"><img src="/themes/le/images/clear.png" width="30" height="1" alt="" /></td>
+ <td align="right" bgcolor="#E0E0E0" width="9"><img src="/themes/le/images/tabs/topright.png" height="9" width="9" alt="" /></td>
+ </tr>
+
+ <tr>
+
+ <!-- Outer body row -->
+
+ <td bgcolor="#E0E0E0"><img src="/themes/le/images/clear.png" width="10" height="1" alt="" /></td>
+ <td valign="top" width="99%" bgcolor="#E0E0E0" colspan="3">
+
+ <!-- Inner Tabs / Shell -->
+
+ <table border="0" width="100%" cellspacing="0" cellpadding="0">
+ <tr>
+ <td> </td>
+ <td>
+
+
+ <!-- start tabs -->
+
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr>
+ <td valign="top" width="10" background="/themes/le/images/theme-bottomtab-end-notselected.png"><img src="/themes/le/images/clear.png" height="25" width="10" alt="" /></td><td background="/themes/le/images/theme-bottomtab-notselected-bg.png" width="10%" align="center"><a class="tablink" href="/projects/isis-fish/">En bref</a></td>
+ <td colspan="2" valign="top" width="20" background="/themes/le/images/theme-bottomtab-notselected-notselected.png"><img src="/themes/le/images/clear.png" height="2" width="20" alt="" /></td><td background="/themes/le/images/theme-bottomtab-notselected-bg.png" width="10%" align="center"><a class="tablink" href="/tracker/?group_id=8">Suivi</a></td>
+ <td colspan="2" valign="top" width="20" background="/themes/le/images/theme-bottomtab-notselected-notselected.png"><img src="/themes/le/images/clear.png" height="2" width="20" alt="" /></td><td background="/themes/le/images/theme-bottomtab-notselected-bg.png" width="10%" align="center"><a class="tablink" href="/mail/?group_id=8">Listes</a></td>
+ <td colspan="2" valign="top" width="20" background="/themes/le/images/theme-bottomtab-notselected-notselected.png"><img src="/themes/le/images/clear.png" height="2" width="20" alt="" /></td><td background="/themes/le/images/theme-bottomtab-notselected-bg.png" width="10%" align="center"><a class="tablink" href="/pm/?group_id=8">Tâches</a></td>
+ <td colspan="2" valign="top" width="20" background="/themes/le/images/theme-bottomtab-notselected-notselected.png"><img src="/themes/le/images/clear.png" height="2" width="20" alt="" /></td><td background="/themes/le/images/theme-bottomtab-notselected-bg.png" width="10%" align="center"><a class="tablink" href="/docman/?group_id=8">Documents</a></td>
+ <td colspan="2" valign="top" width="20" background="/themes/le/images/theme-bottomtab-notselected-notselected.png"><img src="/themes/le/images/clear.png" height="2" width="20" alt="" /></td><td background="/themes/le/images/theme-bottomtab-notselected-bg.png" width="10%" align="center"><a class="tablink" href="/survey/?group_id=8">Sondages</a></td>
+ <td colspan="2" valign="top" width="20" background="/themes/le/images/theme-bottomtab-notselected-notselected.png"><img src="/themes/le/images/clear.png" height="2" width="20" alt="" /></td><td background="/themes/le/images/theme-bottomtab-notselected-bg.png" width="10%" align="center"><a class="tablink" href="/news/?group_id=8">Annonces</a></td>
+ <td colspan="2" valign="top" width="20" background="/themes/le/images/theme-bottomtab-notselected-selected.png"><img src="/themes/le/images/clear.png" height="2" width="20" alt="" /></td><td background="/themes/le/images/theme-bottomtab-selected-bg.png" width="10%" align="center"><a class="tabsellink" href="/scm/?group_id=8">Sources</a></td>
+ <td colspan="2" valign="top" width="20" background="/themes/le/images/theme-bottomtab-selected-notselected.png"><img src="/themes/le/images/clear.png" height="2" width="20" alt="" /></td><td background="/themes/le/images/theme-bottomtab-notselected-bg.png" width="10%" align="center"><a class="tablink" href="/frs/?group_id=8">Fichiers</a></td>
+ <td colspan="2" valign="top" width="20" background="/themes/le/images/theme-bottomtab-notselected-notselected.png"><img src="/themes/le/images/clear.png" height="2" width="20" alt="" /></td><td background="/themes/le/images/theme-bottomtab-notselected-bg.png" width="10%" align="center"><a class="tablink" href="/plugins/wiki/index.php?id=8&type=g">Wiki</a></td>
+ <td valign="top" width="10" background="/themes/le/images/theme-bottomtab-notselected-end.png"><img src="/themes/le/images/clear.png" height="2" width="10" alt="" /></td></tr><tr><td colspan="21" height="1" bgcolor="#909090"><img src="/themes/le/images/clear.png" height="1" width="10" /></td><td colspan="3" height="1" bgcolor="white"><img src="/themes/le/images/clear.png" height="1" width="10" /></td><td colspan="6" height="1" bgcolor="#909090"><img src="/themes/le/images/clear.png" height="1" width="10" /></td></tr>
+ </table>
+
+ <!-- end tabs -->
+ </td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td align="left" bgcolor="#ffffff" width="9"><img src="/themes/le/images/tabs/topleft-inner.png" height="9" width="9" alt="" /></td>
+ <td bgcolor="#ffffff"><img src="/themes/le/images/clear.png" width="1" height="1" alt="" /></td>
+ <td align="right" bgcolor="#ffffff" width="9"><img src="/themes/le/images/tabs/topright-inner.png" height="9" width="9" alt="" /></td>
+ </tr>
+
+ <tr>
+ <td bgcolor="#ffffff"><img src="/themes/le/images/clear.png" width="10" height="1" alt="" /></td>
+ <td valign="top" width="99%" bgcolor="white">
+
+ <link href="/plugins/scmsvn/styles.css" rel="stylesheet" TYPE="text/css"><h1>isis-fish: trunk/isis-fish/src/resources/i18n/isis-fish-en_GB.properties</h1>
+
+<div class="vc_summary">
+File: <a href="/plugins/scmsvn/viewcvs.php/?rev=1246&root=isis-fish#dirlist">[isis-fish]</a> / <a href="/plugins/scmsvn/viewcvs.php/trunk/?rev=1246&root=isis-fish#dirlist">trunk</a> / <a href="/plugins/scmsvn/viewcvs.php/trunk/isis-fish/?rev=1246&root=isis-fish#dirlist">isis-fish</a> / <a href="/plugins/scmsvn/viewcvs.php/trunk/isis-fish/src/?rev=1246&root=isis-fish#dirlist">src</a> / <a href="/plugins/scmsvn/viewcvs.php/trunk/isis-fish/src/resources/?rev=1246&root=isis-fish#dirlist">resources</a> / <a href="/plugins/scmsvn/viewcvs.php/trunk/isis-fish/src/resources/i18n/?rev=1246&root=isis-fish#dirlist">i18n</a> / isis-fish-en_GB.properties
+(<a href="/plugins/scmsvn/viewcvs.php/*checkout*/trunk/isis-fish/src/resources/i18n/isis-fish-en_GB.properties?rev=1246&root=isis-fish"><b>download</b></a>)
+
+<br>
+
+Revision: <b>1246</b>,
+<i>Fri Jul 11 19:12:55 2008 UTC</i> (4 weeks, 4 days ago) by <i>tchemit</i>
+
+
+
+
+
+<br>File size: 59512 byte(s)
+
+
+<pre class="vc_log">i18n ? use key</pre>
+
+</div>
+<pre>Can''t\ add\ result\ ''{0}''\ at\ date\ {1}=Can''t add result ''{0}'' at date {1}
Can''t\ evaluate\ simulation\ prescript=Can''t evaluate simulation prescript
Can''t\ get\ result\:\ {0}=Can''t get result\: {0}
Can't\ create\ simulation\ logger=Can't create simulation logger
@@ -176,7 +362,7 @@
isisfish.error.acceptable.population=New value isn't acceptable value for this population
isisfish.error.add.card=Error while adding of result to the map.
isisfish.error.add.file=Can't add file {0}
-isisfish.error.add.logger.simulation\ =isisfish.error.add.logger.simulation
+isisfish.error.add.logger.simulation\ =isisfish.error.add.logger.simulation
isisfish.error.add.result.data=Error while adding result ot data.
isisfish.error.add.result.graph=Error while adding result to graph
isisfish.error.add.tray=Can''t add system tray icon
@@ -232,7 +418,7 @@
isisfish.error.init.remove.button=could not init remove button (button
isisfish.error.instanciate=Can't instanciate {0}
isisfish.error.instanciate.export=Can't instanciate export {0}
-isisfish.error.integer.positif=Your input must be a positif integer (>1)
+isisfish.error.integer.positif=Your input must be a positif integer (>1)
isisfish.error.invalid.category.name=The category's name {0} is not valid.
isisfish.error.invalid.configuration=Configuration is not full, could not launch IsisFish, try again ?
isisfish.error.invalid.configuration.title=Error while loading IsisFish
@@ -263,7 +449,7 @@
isisfish.error.log.foundAppender=\=could not found log appender {0} for category {1}
isisfish.error.matrix.more.2d=Matrice de plus de 2 dimensions\!\!\\nSelectionnez moins d'\u00E9l\u00E9ments ou utilisez l'op\u00E9rateur somme.
isisfish.error.migration.negative=Migration negative
-isisfish.error.no.matrix=No matrix for\:
+isisfish.error.no.matrix=No matrix for\:
isisfish.error.no.null.time.step=Error, the time step should not be null
isisfish.error.no.sector=No sector defined
isisfish.error.no.select.simulation=could not select simulation
@@ -271,7 +457,7 @@
isisfish.error.no.target.species=no target species in {0} for {1}
isisfish.error.not.connected=Error \: not connected
isisfish.error.not.find.status=could not find status for file {0} for reason {1}
-isisfish.error.not.found.class=this class does not
+isisfish.error.not.found.class=this class does not
isisfish.error.not.found.code=could not found codeclass for {0}
isisfish.error.not.found.description=could not found description for {0}
isisfish.error.not.found.field=could not found field {0} doc for {0}
@@ -282,7 +468,7 @@
isisfish.error.not.null.natiral.death=natural mortality null
isisfish.error.not.possible.metier=Pas de m\u00E9tier possible
isisfish.error.not.species.node.population.container=Population container not in Species node
-isisfish.error.not.support.class=this class does not support
+isisfish.error.not.support.class=this class does not support
isisfish.error.number.classes.upper.zero=Error, the number of classes must be upper than 0
isisfish.error.obtain.analyseplan=Can''t obtain description of AnalysePlan
isisfish.error.obtain.doc.export=Can''t obtain @Doc on class export
@@ -512,7 +698,7 @@
isisfish.log.addAppender=add appender [{0}]
isisfish.log.body=Message to add
isisfish.log.closeAppender=closing appender {0} for category {1}
-isisfish.log.mail.failed=Can't send report by mail. Is your mail server up ? (I'm trying to contact the < {0} > smtp server)
+isisfish.log.mail.failed=Can't send report by mail. Is your mail server up ? (I'm trying to contact the < {0} > smtp server)
isisfish.log.mail.send=A report has been sent to {0}
isisfish.log.mail.send.title=Send simulation {0} by email
isisfish.log.mailTo=Destination adress
@@ -543,7 +729,7 @@
isisfish.message.commit.finished=commit finished
isisfish.message.commit.region.canceled=Commit region canceled
isisfish.message.commiting.region=Commiting region {0} ...
-isisfish.message.compilation.time=Compilation time {0}s
+isisfish.message.compilation.time=Compilation time {0}s
isisfish.message.confirm.delete.object=Do you really want delete object {0}
isisfish.message.confirm.remove.region=Do you really want to remove the region {0} ?
isisfish.message.confirm.remove.script=Do you want to remove script ? ''{0}''
@@ -577,10 +763,10 @@
isisfish.message.import.region.zipped=Zipped Region
isisfish.message.import.scripts.file=Import scripts from file {0}
isisfish.message.import.scripts.file.cancelled=Import scripts cancelled
-isisfish.message.import.scripts.file.done=Import scripts done
+isisfish.message.import.scripts.file.done=Import scripts done
isisfish.message.import.scripts.zipped=Zipped Scripts
-isisfish.message.import.xml.v2.file\ =Import xml v2 file
-isisfish.message.import.zip=Import zip file
+isisfish.message.import.xml.v2.file\ =Import xml v2 file
+isisfish.message.import.zip=Import zip file
isisfish.message.load.finished=load finished
isisfish.message.load.map=Try to load map file\: {0} ({1}, {2})
isisfish.message.load.region.canceled=load region canceled
@@ -685,7 +871,7 @@
isisfish.params.toString.number.years=Number of years\: {0}\\n\\n
isisfish.params.toString.plan=Plan\: {0}
isisfish.params.toString.plan.number=Analyse plan sequence number\: {0}\\n\\n
-isisfish.params.toString.populations=Populations\:
+isisfish.params.toString.populations=Populations\:
isisfish.params.toString.rule=Rule\: {0}
isisfish.params.toString.script.logger.level=Level of scripts' logger {0}
isisfish.params.toString.script.presimulation=Script de presimulation
@@ -792,15 +978,15 @@
isisfish.queue.title=Queue
isisfish.result.abundance=Abondance
isisfish.result.add=Add a result
-isisfish.result.begin.simulation=En debut de Simulation\:
+isisfish.result.begin.simulation=En debut de Simulation\:
isisfish.result.capture=Capture
isisfish.result.capture.metier=Capture par metier
isisfish.result.choose.simulation=Choose a Simulation
isisfish.result.datas=Datas
isisfish.result.datasRadioButton=defaultToolTip-fr.ifremer.resultat.ResultatEdit.donneeRadioButton
isisfish.result.desktopPane=defaultToolTip-fr.ifremer.resultat.ResultatView.desktopPane
-isisfish.result.dimension\ =Dimension
-isisfish.result.end.simulation=En fin de Simulation\:
+isisfish.result.dimension\ =Dimension
+isisfish.result.end.simulation=En fin de Simulation\:
isisfish.result.export=Export
isisfish.result.export.file=Export text file
isisfish.result.file=File
@@ -960,8 +1146,8 @@
isisfish.strategyMonthInfo.toString={0} {1}
isisfish.timeUnit.day=Day
isisfish.timeUnit.hours=Hours
-isisfish.tray.simulation=<b>Isis-fish<b><p>{0} - {1}/{2}
-isisfish.tray.simulation.no=<b>Isis-fish<b><p><i>No simulation<i>
+isisfish.tray.simulation=<b>Isis-fish<b><p>{0} - {1}/{2}
+isisfish.tray.simulation.no=<b>Isis-fish<b><p><i>No simulation<i>
isisfish.tripType.comments=Comments
isisfish.tripType.duration=Duration
isisfish.tripType.minTime=Minimum time between trips
@@ -975,7 +1161,7 @@
isisfish.vcs.commit.ok=vcs.commit.ok
isisfish.vcs.config.title=Vcs configuration Modifier
isisfish.vcs.configuration.title=VCS server configuration
-isisfish.vcs.migrate.end=Migration done in {0}s.<br/>New database in is located at [{1}]
+isisfish.vcs.migrate.end=Migration done in {0}s.<br/>New database in is located at [{1}]
isisfish.vcs.update=vcs.update
isisfish.vcs.update.cancel=cancel
isisfish.vcs.update.checkAll=checkAll
@@ -1079,3 +1265,57 @@
the\ property\ {0}\ is\ mandatory\ but\ missed.=the property {0} is mandatory but missed.
to\ use\ ssh\ authentication\ mode,\ you\ must\ have\ a\ username.\ {0}.=to use ssh authentication mode, you must have a username. {0}.
to\ use\ ssh\ authentication\ mode,\ you\ must\ have\ an\ existing\ private\ key\ {0}\ \:\ {1}.=to use ssh authentication mode, you must have an existing private key {0} \: {1}.
+</pre>
+
+<hr noshade>
+<table width="100%" border="0" cellpadding="0" cellspacing="0">
+<tr>
+<td align="left">
+<address><a href="mailto:webmaster at labs.libre-entreprise.org">CVS/SVN Admin</a></address><br />
+Powered by <a href="http://viewcvs.sourceforge.net/">ViewCVS 1.0-dev</a>
+</td>
+<td align="right">
+<img src="/doc/viewcvs/images/logo.png" alt="(Powered by ViewCVS)" border="0"
+width="128" height="48" /><br />
+<h3><a target="_blank" href="/plugins/scmsvn/viewcvs/help_rootview.html">ViewCVS and CVS/SVN Help</a></h3>
+</td>
+</tr>
+</table>
+<!--
+</body>
+</html>
+-->
+ <!-- end main body row -->
+
+
+ </td>
+ <td width="10" bgcolor="#ffffff"><img src="/themes/le/images/clear.png" width="2" height="1" alt="" /></td>
+ </tr>
+ <tr>
+ <td align="left" bgcolor="#E0E0E0" width="9"><img src="/themes/le/images/tabs/bottomleft-inner.png" height="11" width="11" alt="" /></td>
+ <td bgcolor="#ffffff"><img src="/themes/le/images/clear.png" width="1" height="1" alt="" /></td>
+ <td align="right" bgcolor="#E0E0E0" width="9"><img src="/themes/le/images/tabs/bottomright-inner.png" height="11" width="11" alt="" /></td>
+ </tr>
+ </table>
+
+ <!-- end inner body row -->
+
+ </td>
+ <td width="10" bgcolor="#E0E0E0"><img src="/themes/le/images/clear.png" width="2" height="1" alt="" /></td>
+ </tr>
+ <tr>
+ <td align="left" bgcolor="#E0E0E0" width="9"><img src="/themes/le/images/tabs/bottomleft.png" height="9" width="9" alt="" /></td>
+ <td bgcolor="#E0E0E0" colspan="3"><img src="/themes/le/images/clear.png" width="1" height="1" alt="" /></td>
+ <td align="right" bgcolor="#E0E0E0" width="9"><img src="/themes/le/images/tabs/bottomright.png" height="9" width="9" alt="" /></td>
+ </tr>
+</table>
+
+<!-- PLEASE LEAVE "Powered By GForge" on your site -->
+<br />
+<center>
+<a href="http://gforge.org/"><img src="/images/pow-gforge.png" alt="Powered By GForge Collaborative Development Environment" border="0" /></a>
+</center>
+
+
+</body>
+</html>
Modified: branches/isis-fish-3.1.4/src/resources/i18n/isis-fish-fr_FR.properties
===================================================================
--- branches/isis-fish-3.1.4/src/resources/i18n/isis-fish-fr_FR.properties 2008-08-13 18:15:25 UTC (rev 1296)
+++ branches/isis-fish-3.1.4/src/resources/i18n/isis-fish-fr_FR.properties 2008-08-13 18:24:19 UTC (rev 1297)
@@ -176,7 +176,7 @@
isisfish.error.acceptable.population=New value isn't acceptable value for this population
isisfish.error.add.card=Erreur lors de l'ajout du r\u00E9sultat \u00E0 la carte.
isisfish.error.add.file=Can't add file {0}
-isisfish.error.add.logger.simulation\ =isisfish.error.add.logger.simulation
+isisfish.error.add.logger.simulation\ =isisfish.error.add.logger.simulation
isisfish.error.add.result.data=Erreur lors de l'ajout du r\u00E9sultat au data.
isisfish.error.add.result.graph=Erreur lors de l'ajout du r\u00E9sultat au graph.
isisfish.error.add.tray=Can't add system tray icon
@@ -263,7 +263,7 @@
isisfish.error.log.foundAppender=n''a pas trouve l''appender {0} pour la categorie {1}
isisfish.error.matrix.more.2d=Matrice de plus de 2 dimensions\!\!\\nSelectionnez moins d'\u00E9l\u00E9ments ou utilisez l'op\u00E9rateur somme.
isisfish.error.migration.negative=Migration negative
-isisfish.error.no.matrix=No matrix for\:
+isisfish.error.no.matrix=No matrix for\:
isisfish.error.no.null.time.step=Error, the time step should not be null
isisfish.error.no.sector=il n'y a pas de secteur de d\u00E9finit
isisfish.error.no.select.simulation=could not select simulation
@@ -271,7 +271,7 @@
isisfish.error.no.target.species=no target species in {0} for {1}
isisfish.error.not.connected=Erreur \u00E0 la connexion...
isisfish.error.not.find.status=n''a pas pu trouver le status du fichier {0} pour la raison suivante \: {1}
-isisfish.error.not.found.class=this class does not
+isisfish.error.not.found.class=this class does not
isisfish.error.not.found.code=could not found codeclass for {0}
isisfish.error.not.found.description=could not found description for {0}
isisfish.error.not.found.field=could not found field {0} doc for {0}
@@ -282,9 +282,9 @@
isisfish.error.not.null.natiral.death=mortalite naturelle nulle
isisfish.error.not.possible.metier=Pas de m\u00E9tier possible
isisfish.error.not.species.node.population.container=Population container not in Species node
-isisfish.error.not.support.class=this class does not support
+isisfish.error.not.support.class=this class does not support
isisfish.error.number.classes.upper.zero=Error, the number of classes must be upper than 0
-isisfish.error.obtain.analyseplan=Can''t obtain description of AnalysePlan
+isisfish.error.obtain.analyseplan=Can''t obtain description of AnalysePlan
isisfish.error.obtain.doc.export=Can't obtain @Doc on class Export
isisfish.error.obtain.doc.resultName=Can't obtain @Doc on ResultName
isisfish.error.obtain.doc.rule=Can't obtain description for a Rule class
@@ -485,7 +485,7 @@
isisfish.launch.find.public.key=Clef publique ssh (*.pub) associ\u00E9e \u00E0 la clef priv\u00E9e
isisfish.launch.first=Premier d\u00E9marrage type vcs {0} - version {1}
isisfish.launch.firstname=nom
-isisfish.launch.howto.save.key=Comment enregister sa clef publique ssh aupr\u00E8s du labs
+isisfish.launch.howto.save.key=Comment enregister sa clef publique ssh aupr\u00E8s du labs
isisfish.launch.init.done=init done in {0}.
isisfish.launch.lasstname=pr\u00E9nom
isisfish.launch.save.key=Acc\u00E9der au labs pour enregister votre clef publique ssh
@@ -500,7 +500,7 @@
isisfish.launch.server.ssh.key.generate.error=La clef {0} n''a pas \u00E9t\u00E9 g\u00E9n\u00E9r\u00E9e.
isisfish.launch.server.ssh.key.generate.succes=Votre clef ssh {0} a \u00E9t\u00E9 g\u00E9n\u00E9r\u00E9e,il faut d\u00E9sormais l''enregistrer aupr\u00E8s du serveur lab.
isisfish.launch.server.ssh.key.no.key=Pas de clef ssh connu ou vous n'avez pas s\u00E9lectionn\u00E9 le mode SSH, voulez-vous quand meme continuer ?
-isisfish.launch.server.ssh.key.register=Enregister votre clef publique ssh sur le serveur du labs
+isisfish.launch.server.ssh.key.register=Enregister votre clef publique ssh sur le serveur du labs
isisfish.launch.server.ssh.no.passphrase=pas de passphrase
isisfish.launch.server.ssh.passphrase=passphrase
isisfish.launch.server.ssh.privateKeyFile=clef priv\u00E9e ssh
@@ -543,10 +543,10 @@
isisfish.message.commit.finished=commit termin\u00E9
isisfish.message.commit.region.canceled=Commit de la r\u00E9gion annul\u00E9
isisfish.message.commiting.region=En train de commiter la r\u00E9gion {0} ...
-isisfish.message.compilation.time=Temps de compilation {0}s
+isisfish.message.compilation.time=Temps de compilation {0}s
isisfish.message.confirm.delete.object=Voulez-vous vraiment supprimer l'objet {0}
isisfish.message.confirm.remove.region=Voulez-vous vraiement supprimer la r\u00E9gion {0} ?
-isisfish.message.confirm.remove.script=Voulez-vous vraiment supprimer le script ? ''{0}''
+isisfish.message.confirm.remove.script=Voulez-vous vraiment supprimer le script ? ''{0}''
isisfish.message.copy.finished=Copie termin\u00E9e
isisfish.message.copy.region=Copier la r\u00E9gion vers {0}
isisfish.message.copy.revision=Working copy initialize fine... Revision \: [ {0} - {1} ]
@@ -579,8 +579,8 @@
isisfish.message.import.scripts.file.cancelled=Importation des scripts annul\u00E9
isisfish.message.import.scripts.file.done=Importation des scripts termin\u00E9
isisfish.message.import.scripts.zipped=Zipped Scripts
-isisfish.message.import.xml.v2.file\ =Import xml v2 file
-isisfish.message.import.zip=Import zip file
+isisfish.message.import.xml.v2.file\ =Import xml v2 file
+isisfish.message.import.zip=Import zip file
isisfish.message.load.finished=Chargement termin\u00E9
isisfish.message.load.map=Chargement de la carte \: {0} ({1}, {2})
isisfish.message.load.region.canceled=chargement de r\u00E9gion annul\u00E9
@@ -685,7 +685,7 @@
isisfish.params.toString.number.years=Nombre d'ann\u00E9\u00E9s \: {0}\\n\\n
isisfish.params.toString.plan=Plan\: {0}
isisfish.params.toString.plan.number=Analyse plan sequence number\: {0}\\n\\n
-isisfish.params.toString.populations=Populations\:
+isisfish.params.toString.populations=Populations\:
isisfish.params.toString.rule=Rule\: {0}
isisfish.params.toString.script.logger.level=niveau du logger de scripts {0}
isisfish.params.toString.script.presimulation=Script de presimulation
@@ -792,15 +792,15 @@
isisfish.queue.title=Queue
isisfish.result.abundance=Abondance
isisfish.result.add=Ajouter un r\u00E9sultat\=
-isisfish.result.begin.simulation=En debut de Simulation\:
+isisfish.result.begin.simulation=En debut de Simulation\:
isisfish.result.capture=Capturer
isisfish.result.capture.metier=Capturer par metier
isisfish.result.choose.simulation=Choisir une simulation
isisfish.result.datas=Donn\u00E9es
isisfish.result.datasRadioButton=defaultToolTip-fr.ifremer.resultat.ResultatEdit.donneeRadioButton
isisfish.result.desktopPane=defaultToolTip-fr.ifremer.resultat.ResultatView.desktopPane
-isisfish.result.dimension\ =Dimension
-isisfish.result.end.simulation=En fin de Simulation\:
+isisfish.result.dimension\ =Dimension
+isisfish.result.end.simulation=En fin de Simulation\:
isisfish.result.export=Export
isisfish.result.export.file=Exporter text file
isisfish.result.file=Fichier
1
0
r1296 - in branches/isis-fish-3.1.4/src: java/fr/ifremer/isisfish/entities uimodel/fr/ifremer/isisfish/ui/input uimodel/fr/ifremer/isisfish/ui/simulator
by bpoussin@users.labs.libre-entreprise.org 13 Aug '08
by bpoussin@users.labs.libre-entreprise.org 13 Aug '08
13 Aug '08
Author: bpoussin
Date: 2008-08-13 18:15:25 +0000 (Wed, 13 Aug 2008)
New Revision: 1296
Modified:
branches/isis-fish-3.1.4/src/java/fr/ifremer/isisfish/entities/SetOfVesselsImpl.java
branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/input/PopulationMigration.xgl
branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/input/SetOfVessels.xgl
branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/input/SetOfVessels.xml
branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/input/Strategy.xgl
branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/input/Strategy.xml
branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/simulator/AdvancedParams.xgl
branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/simulator/AdvancedParams.xml
Log:
- ajout des composants graphiques pour l'edition des equations (inactivity, technicalEfficiency)
- ajout de la possibilite de lancer les simulations en batch (sous process)
Modified: branches/isis-fish-3.1.4/src/java/fr/ifremer/isisfish/entities/SetOfVesselsImpl.java
===================================================================
--- branches/isis-fish-3.1.4/src/java/fr/ifremer/isisfish/entities/SetOfVesselsImpl.java 2008-08-13 13:17:17 UTC (rev 1295)
+++ branches/isis-fish-3.1.4/src/java/fr/ifremer/isisfish/entities/SetOfVesselsImpl.java 2008-08-13 18:15:25 UTC (rev 1296)
@@ -84,7 +84,7 @@
EquationDAO dao = IsisFishDAOHelper.getEquationDAO(getTopiaContext());
// create Growth equation
eq = dao.create();
- eq.setCategory("Inactivity");
+ eq.setCategory("TechnicalEfficiency");
eq.setJavaInterface(SoVTechnicalEfficiencyEquation.class);
eq.setLanguage(Language.JAVA);
setTechnicalEfficiencyEquation(eq);
Modified: branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/input/PopulationMigration.xgl
===================================================================
--- branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/input/PopulationMigration.xgl 2008-08-13 13:17:17 UTC (rev 1295)
+++ branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/input/PopulationMigration.xgl 2008-08-13 18:15:25 UTC (rev 1296)
@@ -33,7 +33,7 @@
</tr>
</table>
-<table Zonespacing="5">
+<table cellspacing="5">
<tr>
<td fill="Both" width="100%">buttonPopulationMigrationSave</td>
<td fill="Both" width="100%">buttonPopulationMigrationCancel</td>
Modified: branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/input/SetOfVessels.xgl
===================================================================
--- branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/input/SetOfVessels.xgl 2008-08-13 13:17:17 UTC (rev 1295)
+++ branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/input/SetOfVessels.xgl 2008-08-13 18:15:25 UTC (rev 1296)
@@ -26,11 +26,25 @@
<td class="label">labelSetOfVesselsFixedCosts</td>
<td class="field">fieldSetOfVesselsFixedCosts</td>
</tr>
+
<tr>
- <td class="label" rowspan="3">labelSetOfVesselsComment</td>
- <td class="field" height="20%" rowspan="3">fieldSetOfVesselsComment</td>
+ <td class="label">labelSetOfVesselsTechnicalEfficiency</td>
+ <td class="field">fieldSetOfVesselsTechnicalEfficiency</td>
</tr>
+ <tr>
+ <td class="label">buttonSetOfVesselsTechnicalEfficiencySaveAsModel</td>
+ <td class="field" height="30%" rowspan="3">fieldScriptSetOfVesselsTechnicalEfficiency</td>
+ </tr>
+ <tr>
+ <td class="label">buttonSetOfVesselsTechnicalEfficiencyEquationEditor</td>
+ </tr>
<tr></tr>
+
+
+ <tr>
+ <td class="label" rowspan="2">labelSetOfVesselsComment</td>
+ <td class="field" height="20%" rowspan="2">fieldSetOfVesselsComment</td>
+ </tr>
<tr></tr>
<tr>
Modified: branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/input/SetOfVessels.xml
===================================================================
--- branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/input/SetOfVessels.xml 2008-08-13 13:17:17 UTC (rev 1295)
+++ branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/input/SetOfVessels.xml 2008-08-13 18:15:25 UTC (rev 1296)
@@ -36,6 +36,31 @@
<DocumentEvents onModified="Update($fieldSetOfVesselsFixedCosts/text)"/>
</textfield>
+
+ <label constraints="labelSetOfVesselsTechnicalEfficiency" text="isisfish.setOfVessels.technicalEfficiency"/>
+ <combobox constraints="fieldSetOfVesselsTechnicalEfficiency" id="fieldSetOfVesselsTechnicalEfficiency"
+ origin="$SetOfVessels/technicalEfficiencyEquation" renderer="name" firstNull="true"
+ actionCommand="Update($fieldSetOfVesselsTechnicalEfficiency/selectedItem/content, $fieldScriptSetOfVesselsTechnicalEfficiency/text)">
+ <ComboBoxModel origin='fr.ifremer.isisfish.datastore.FormuleStorage.getFormules($TopiaContext, "TechnicalEfficiency")'/>
+ </combobox>
+
+ <button constraints="buttonSetOfVesselsTechnicalEfficiencySaveAsModel" text="isisfish.common.saveModel"
+ actionCommand='input.Input.saveEquationAsModel($SetOfVessels/technicalEfficiencyEquation);refreshView($fieldSetOfVesselsTechnicalEfficiency)'/>
+
+ <button constraints="buttonSetOfVesselsTechnicalEfficiencyEquationEditor" text="isisfish.common.openEditor"
+ actionCommand='input.Input.openEditor($SetOfVessels/technicalEfficiencyEquation/category,$SetOfVessels/technicalEfficiencyEquation/name,$SetOfVessels/technicalEfficiencyEquation/javaInterface,$SetOfVessels/technicalEfficiencyEquation/content,$fieldScriptSetOfVesselsTechnicalEfficiency)'/>
+
+ <editor constraints="fieldScriptSetOfVesselsTechnicalEfficiency" askIfNotSaved="false"
+ id="fieldScriptSetOfVesselsTechnicalEfficiency"
+ origin="org.codelutin.util.FileUtil.getTempFile($SetOfVessels/technicalEfficiencyEquation/content, '.java')">
+ <DocumentEvents onModified="Update">
+ <UpdateOrigin
+ target="setEquationTechnicalEfficiency($SetOfVessels, $fieldScriptSetOfVesselsTechnicalEfficiency/text)"/>
+ </DocumentEvents>
+ </editor>
+
+
+
<label constraints="labelSetOfVesselsComment" text="isisfish.setOfVessels.comments"/>
<scrollPane constraints="fieldSetOfVesselsComment">
<textarea id="fieldSetOfVesselsComment" origin="$SetOfVessels/comment">
Modified: branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/input/Strategy.xgl
===================================================================
--- branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/input/Strategy.xgl 2008-08-13 13:17:17 UTC (rev 1295)
+++ branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/input/Strategy.xgl 2008-08-13 18:15:25 UTC (rev 1296)
@@ -18,9 +18,18 @@
<td class="label">labelStrategyProportionSetOfVessels</td>
<td class="field">fieldStrategyProportionSetOfVessels</td>
</tr>
+
+ <tr>
+ <td></td>
+ <td class="field">fieldUseEquationInactivity</td>
+ </tr>
+ <tr>
+ <td class="labelTitle" fill="Both" height="100%" width="100%" colspan="2">hideablePanelInactivityEquation</td>
+ </tr>
+
<tr>
- <td class="label" rowspan="3">labelStrategyComment</td>
- <td class="field" height="20%" rowspan="3">fieldStrategyComment</td>
+ <td class="label" rowspan="2">labelStrategyComment</td>
+ <td class="field" height="20%" rowspan="2">fieldStrategyComment</td>
</tr>
<tr></tr>
<tr></tr>
@@ -30,5 +39,26 @@
</tr>
</table>
+ <table>
+ <tr>
+ <td fill="Both" height="100%" width="100%">fieldUseEquation</td>
+ </tr>
+ </table>
+
+ <table cellspacing="2">
+ <tr>
+ <td class="label">labelStrategyInactivity</td>
+ <td class="field">fieldStrategyInactivity</td>
+ </tr>
+ <tr>
+ <td class="label">buttonStrategyInactivitySaveAsModel</td>
+ <td class="field" height="30%" rowspan="3">fieldScriptStrategyInactivity</td>
+ </tr>
+ <tr>
+ <td class="label">buttonStrategyInactivityEquationEditor</td>
+ </tr>
+ <tr></tr>
+ </table>
+
</layout>
Modified: branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/input/Strategy.xml
===================================================================
--- branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/input/Strategy.xml 2008-08-13 13:17:17 UTC (rev 1295)
+++ branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/input/Strategy.xml 2008-08-13 18:15:25 UTC (rev 1296)
@@ -22,6 +22,42 @@
<DocumentEvents onModified="Update($fieldStrategyProportionSetOfVessels/text)"/>
</textfield>
+ <checkbox constraints="fieldUseEquationInactivity" id="fieldUseEquationInactivity"
+ origin="$Strategy/inactivityEquationUsed" text="isisfish.strategy.inactivityEquationUsed">
+ <ItemEvents onStateChanged="Update($fieldUseEquationInactivity/selected, $Strategy/inactivityEquationUsed, refreshView($hideablePanelInactivityEquation))"/>
+ </checkbox>
+
+
+ <panel id="hideablePanelInactivityEquation" constraints="hideablePanelInactivityEquation" layout="XMLGridLayout(fr/ifremer/isisfish/ui/input/Strategy.xgl)">
+
+ <hidablePanel constraints="fieldUseEquation"
+ origin="getInactivityEquationUsed($Strategy)"
+ layout="XMLGridLayout(fr/ifremer/isisfish/ui/input/Strategy.xgl)">
+ <label constraints="labelStrategyInactivity" text="isisfish.strategy.inactivity"/>
+ <combobox constraints="fieldStrategyInactivity" id="fieldStrategyInactivity"
+ origin="$Strategy/inactivityEquation" renderer="name" firstNull="true"
+ actionCommand="Update($fieldStrategyInactivity/selectedItem/content, $fieldScriptStrategyInactivity/text)">
+ <ComboBoxModel origin='fr.ifremer.isisfish.datastore.FormuleStorage.getFormules($TopiaContext, "Inactivity")'/>
+ </combobox>
+
+ <button constraints="buttonStrategyInactivitySaveAsModel" text="isisfish.common.saveModel"
+ actionCommand='input.Input.saveEquationAsModel($Strategy/inactivityEquation);refreshView($fieldStrategyInactivity)'/>
+
+ <button constraints="buttonStrategyInactivityEquationEditor" text="isisfish.common.openEditor"
+ actionCommand='input.Input.openEditor($Strategy/inactivityEquation/category,$Strategy/inactivityEquation/name,$Strategy/inactivityEquation/javaInterface,$Strategy/inactivityEquation/content,$fieldScriptStrategyInactivity)'/>
+
+ <editor constraints="fieldScriptStrategyInactivity" askIfNotSaved="false"
+ id="fieldScriptStrategyInactivity"
+ origin="org.codelutin.util.FileUtil.getTempFile($Strategy/inactivityEquation/content, '.java')">
+ <DocumentEvents onModified="Update">
+ <UpdateOrigin
+ target="setEquationInactivity($Strategy, $fieldScriptStrategyInactivity/text)"/>
+ </DocumentEvents>
+ </editor>
+
+ </hidablePanel>
+ </panel>
+
<label constraints="labelStrategyComment" text="isisfish.strategy.comments"/>
<scrollPane constraints="fieldStrategyComment">
<textarea id="fieldStrategyComment" origin="$Strategy/comment">
Modified: branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/simulator/AdvancedParams.xgl
===================================================================
--- branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/simulator/AdvancedParams.xgl 2008-08-13 13:17:17 UTC (rev 1295)
+++ branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/simulator/AdvancedParams.xgl 2008-08-13 18:15:25 UTC (rev 1296)
@@ -20,7 +20,8 @@
<td width="99%" colspan="3" fill="Horizontal">fieldSimulAdvParamsSimulatorSelect</td>
</tr>
<tr>
- <td fill="Horizontal" colspan="2" width="33%">fieldSimulAdvParamsSimulatorLocal</td>
+ <td fill="Horizontal" width="33%">fieldSimulAdvParamsSimulatorLocal</td>
+ <td fill="Horizontal" width="33%">fieldSimulAdvParamsSimulatorSubProcess</td>
<td fill="Horizontal" width="33%">fieldSimulationStatistique</td>
<td fill="Horizontal" width="33%">fieldSimulationCache</td>
</tr>
Modified: branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/simulator/AdvancedParams.xml
===================================================================
--- branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/simulator/AdvancedParams.xml 2008-08-13 13:17:17 UTC (rev 1295)
+++ branches/isis-fish-3.1.4/src/uimodel/fr/ifremer/isisfish/ui/simulator/AdvancedParams.xml 2008-08-13 18:15:25 UTC (rev 1296)
@@ -33,6 +33,12 @@
origin="$SimulationParameter/local"
actionCommand="Update($fieldSimulAdvParamsSimulatorLocal/selected)"/>
+ <checkbox text="isisfish.advancedParams.subProcessSimulation"
+ constraints="fieldSimulAdvParamsSimulatorSubProcess"
+ id="fieldSimulAdvParamsSimulatorSubProcess"
+ origin="$SimulationParameter/subProcess"
+ actionCommand="Update($fieldSimulAdvParamsSimulatorSubProcess/selected)"/>
+
<!--
|
| Trace/Cache option
1
0
r1295 - in branches/isis-fish-3.1.4/src/java/fr/ifremer/isisfish: datastore/migration simulator
by bpoussin@users.labs.libre-entreprise.org 13 Aug '08
by bpoussin@users.labs.libre-entreprise.org 13 Aug '08
13 Aug '08
Author: bpoussin
Date: 2008-08-13 13:17:17 +0000 (Wed, 13 Aug 2008)
New Revision: 1295
Modified:
branches/isis-fish-3.1.4/src/java/fr/ifremer/isisfish/datastore/migration/SwingMigrationCallbackHandler.java
branches/isis-fish-3.1.4/src/java/fr/ifremer/isisfish/simulator/SimulationManager.java
Log:
SimulationManager
- utilisation de execute et non submit sur les executors pour forcer l'execution
- lors de la demande du control si on ne le trouve pas dans les simulations actives, recherche dans les simulations ternimees
Migration
- la migration fonctionne
Modified: branches/isis-fish-3.1.4/src/java/fr/ifremer/isisfish/datastore/migration/SwingMigrationCallbackHandler.java
===================================================================
--- branches/isis-fish-3.1.4/src/java/fr/ifremer/isisfish/datastore/migration/SwingMigrationCallbackHandler.java 2008-08-12 15:23:29 UTC (rev 1294)
+++ branches/isis-fish-3.1.4/src/java/fr/ifremer/isisfish/datastore/migration/SwingMigrationCallbackHandler.java 2008-08-13 13:17:17 UTC (rev 1295)
@@ -98,7 +98,7 @@
}
}
- return MigrationChoice.NO_MIGRATION; // force false during test // result;
+ return result;
}
private void migrateTo3_2(Connection conn) throws SQLException {
@@ -112,8 +112,10 @@
"alter table STRATEGY add column INACTIVITYEQUATION VARCHAR(255);",
};
for (String sql : sqls) {
+ log.info("try " + sql);
PreparedStatement sta = conn.prepareStatement(sql);
sta.executeUpdate();
+ log.info("done " + sql);
}
}
Modified: branches/isis-fish-3.1.4/src/java/fr/ifremer/isisfish/simulator/SimulationManager.java
===================================================================
--- branches/isis-fish-3.1.4/src/java/fr/ifremer/isisfish/simulator/SimulationManager.java 2008-08-12 15:23:29 UTC (rev 1294)
+++ branches/isis-fish-3.1.4/src/java/fr/ifremer/isisfish/simulator/SimulationManager.java 2008-08-13 13:17:17 UTC (rev 1295)
@@ -36,8 +36,6 @@
import fr.ifremer.isisfish.datastore.SimulationStorage;
import fr.ifremer.isisfish.types.Date;
import java.beans.PropertyChangeEvent;
-import java.util.logging.Level;
-import java.util.logging.Logger;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import static org.codelutin.i18n.I18nf._;
@@ -67,7 +65,10 @@
static protected SimulationManager instance = null;
- protected boolean autoLaunch = false;
+ // FIXME pouvoir configurer ceci en fichier de config
+ // FIXME ainsi que la mise a false, lors de la simulation de la derniere
+ // (sans doute ajoute un boolean, simulationListAsQueue = true|false)
+ protected boolean autoLaunch = true;
protected ListenerSet<SimulationQueueListener> listeners = new ListenerSet<SimulationQueueListener>();
protected PropertyChangeSupport propertyListeners = new PropertyChangeSupport(this);
@@ -163,6 +164,7 @@
synchronized(this) {
while (!isAutoLaunch()) {
try {
+ log.info("autoLaunch is false waiting queue start");
this.wait();
} catch (InterruptedException eee) {
log.warn("Error during wait autoLaunch flag", eee);
@@ -193,19 +195,22 @@
// on construit le bon type de SimulationItem pour le job
SimulationItem item = null;
if (param.getUseAnalysePlan()) {
+ // c un plan d'analyse, il peut etre independant ou dependant
if (!param.isIndependentPlan()) {
item = new SimulationItemPlan(id, param);
- executor.submit(new SimulationJob(this, item));
+ executor.execute(new SimulationJob(this, item));
} else {
// on met dans la queue local le process de generation de toutes
// les simus
item = new SimulationItemPlanIndependent(id, param);
- localExecutor.submit(
+ localExecutor.execute(
new PrepareIndependentSimulationJob(this, executor, item));
}
} else {
+ // une simulation normal
item = new SimulationItem(id, param);
- executor.submit(new SimulationJob(this, item));
+ log.info("Simulation added to executor: " + executor.isShutdown() + ", " + executor.isTerminated());
+ executor.execute(new SimulationJob(this, item));
}
fireAddEvent(id, item); // must be before thread notification because thread look in map
}
@@ -338,6 +343,10 @@
public SimulationControl getControl(String id) {
SimulationControl result = null;
SimulationItem item = map.get(id);
+ if (item == null) {
+ // try to find it in done simulation
+ item = mapDones.get(id);
+ }
if (item != null) {
result = item.control;
}
@@ -360,6 +369,7 @@
// on ne met jamais dans la queue done les simulations de plan
// sauf si elle echoue
result = false;
+// FIXME a revoir la condition avec showOnly error et showOnly queue (qui ne sert plus)
} else if (!(config.isSimulationShowOnlyError() &&
!(item instanceof SimulationItemPlan) &&
item.getSimulation().getInformation().hasError())) {
@@ -655,7 +665,7 @@
// plus celles en cours d'affichees
while (item.hasNext()) {
try {
- executor.submit(new SimulationJob(simulationManager, item.next()));
+ executor.execute(new SimulationJob(simulationManager, item.next()));
} catch (Exception eee) {
log.error("Can't add simulation: " + item, eee);
}
@@ -689,6 +699,7 @@
}
public void run() {
+ log.info("Start simulation : " + simItem.id);
simulationManager.waitAutoLaunch();
try {
// si l'simItem exist encore (que l'utilisateur ne la pas retire)
1
0