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
- 3175 discussions
Author: bpoussin
Date: 2008-08-05 20:17:04 +0000 (Tue, 05 Aug 2008)
New Revision: 1289
Removed:
branches/3.1.4/
Log:
repertoire vide maintenant
1
0
Author: bpoussin
Date: 2008-08-05 20:16:32 +0000 (Tue, 05 Aug 2008)
New Revision: 1288
Added:
branches/isis-fish-3.1.4/
Removed:
branches/3.1.4/isis-fish/
Log:
en fait comme la dit eric, c plus logique d'avoir le numero apres que avant
Copied: branches/isis-fish-3.1.4 (from rev 1287, branches/3.1.4/isis-fish)
1
0
Author: bpoussin
Date: 2008-08-05 20:14:53 +0000 (Tue, 05 Aug 2008)
New Revision: 1287
Removed:
branches/3.1.4/mod/
Log:
suppression de mod qui est vide et donc pas vraiment necessaire dans la branche
1
0
Author: bpoussin
Date: 2008-08-05 20:14:18 +0000 (Tue, 05 Aug 2008)
New Revision: 1286
Removed:
branches/3.1.4/isis-fish-data/
Log:
suppression du repertoire isis-fish-data qui a sont propre projet
1
0
Author: bpoussin
Date: 2008-08-05 20:13:46 +0000 (Tue, 05 Aug 2008)
New Revision: 1285
Removed:
branches/3.1.4/CVSROOT/
Log:
suppression du repertoire CVSROOT
1
0
Author: bpoussin
Date: 2008-08-05 20:12:39 +0000 (Tue, 05 Aug 2008)
New Revision: 1284
Added:
branches/3.1.4/
Removed:
branches/4.0.0.0/
Log:
en fait la creation de branche a fonctionne mais pas le switch,
donc trunk est tout casse et la branche est stable
Copied: branches/3.1.4 (from rev 1283, branches/4.0.0.0)
1
0
r1283 - trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore
by chatellier@users.labs.libre-entreprise.org 05 Aug '08
by chatellier@users.labs.libre-entreprise.org 05 Aug '08
05 Aug '08
Author: chatellier
Date: 2008-08-05 17:57:47 +0000 (Tue, 05 Aug 2008)
New Revision: 1283
Modified:
trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/IsisH2Config.java
Log:
Change config
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-05 17:56:11 UTC (rev 1282)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/IsisH2Config.java 2008-08-05 17:57:47 UTC (rev 1283)
@@ -19,6 +19,7 @@
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.IsisFishDAOHelper;
import org.codelutin.topia.migration.TopiaMigrationServiceImpl;
@@ -50,8 +51,8 @@
}
/**
- * @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
+ * @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) {
@@ -60,15 +61,15 @@
}
//////////////////////////////////////////////////
- // Les opérations sur base embarquée
+ // Les opᅵrations sur base embarquᅵe
//////////////////////////////////////////////////
/**
* Retourne une base en memoire
*
- * @param config la configuration à remplir
+ * @param config la configuration ᅵ remplir
* @param id l'identifiant de la base
- * @return l'objet config passé en parametre
+ * @return l'objet config passᅵ en parametre
*/
static public Properties addMemDatabaseConfig(Properties config, String id) {
IsisAbstractConfigH2 conf = IsisContext.get().getH2Config();
@@ -87,11 +88,11 @@
/**
* Ajoute differente information au parametre config qui indique comment
- * se connecter a la base de données
+ * se connecter a la base de donnᅵes
*
* @param config l'objet properties dans lequel il faut ajouter les informations
* @param directory le repertoire dans lequel la base de donn?es doit se trouver
- * @return l'objet config passé en parametre
+ * @return l'objet config passᅵ en parametre
*/
static public Properties addDatabaseConfig(Properties config, File directory) {
File databasePath = getStorageDataDirectory(directory);
@@ -157,10 +158,10 @@
}
/**
- * Permet d'ajouter les differents mapping hibernate spécifique a l'application
+ * Permet d'ajouter les differents mapping hibernate spᅵcifique a l'application
*
* @param config l'objet properties dans lequel il faut ajouter les informations
- * @return l'objet config passé en parametre
+ * @return l'objet config passᅵ en parametre
*/
static public Properties addHibernateMapping(Properties config) {
config.setProperty("topia.persistence.classes",
@@ -287,12 +288,12 @@
//if (IsisConfig.UPDATESCHEMA_DATABASE) {
// migration configuration
//TODO Use config static,final,mandatory properties
- config.put(TopiaMigrationServiceImpl.MIGRATION_APPLICATION_VERSION, "1");
- config.put(TopiaMigrationServiceImpl.MIGRATION_PREVIOUS_MAPPING_DIRECTORY, "oldmappings");
- config.put(TopiaMigrationServiceImpl.MIGRATION_MODEL_NAMES, "IsisFish");
- config.put(TopiaMigrationServiceImpl.MIGRATION_CALLBACKHANDLERS,
+ 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.put("topia.service.migration", TopiaMigrationServiceImpl.class.getName());
+ config.setProperty("topia.service.migration", TopiaMigrationServiceImpl.class.getName());
}
return config;
}
1
0
r1282 - trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/migration
by chatellier@users.labs.libre-entreprise.org 05 Aug '08
by chatellier@users.labs.libre-entreprise.org 05 Aug '08
05 Aug '08
Author: chatellier
Date: 2008-08-05 17:56:11 +0000 (Tue, 05 Aug 2008)
New Revision: 1282
Modified:
trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/migration/SwingMigrationCallbackHandler.java
Log:
Change return type for migration handlers
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-04 16:59:55 UTC (rev 1281)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/migration/SwingMigrationCallbackHandler.java 2008-08-05 17:56:11 UTC (rev 1282)
@@ -39,7 +39,7 @@
* @see org.codelutin.topia.migration.callback.MigrationCallbackHandler#doMigration(java.lang.String, java.lang.String)
*/
@Override
- public boolean doMigration(String dbVersion, String applicationVersion) {
+ public MigrationChoice doMigration(String dbVersion, String applicationVersion) {
int answer = JOptionPane
.showConfirmDialog(
@@ -52,7 +52,7 @@
JOptionPane.QUESTION_MESSAGE
);
- boolean result = ( answer == JOptionPane.YES_OPTION );
+ MigrationChoice result = ( answer == JOptionPane.YES_OPTION ) ? MigrationChoice.MIGRATION : MigrationChoice.NO_MIGRATION;
return result;
}
1
0
r1281 - in trunk/isis-fish: . doc src/java src/java/fr/ifremer/isisfish src/java/fr/ifremer/isisfish/datastore src/java/fr/ifremer/isisfish/entities src/java/fr/ifremer/isisfish/logging src/java/fr/ifremer/isisfish/logging/console src/java/fr/ifremer/isisfish/map src/java/fr/ifremer/isisfish/simulator src/java/fr/ifremer/isisfish/ui src/java/fr/ifremer/isisfish/ui/script src/java/fr/ifremer/isisfish/ui/script/action src/java/fr/ifremer/isisfish/ui/simulator src/java/fr/ifremer/isisfish/u
by bpoussin@users.labs.libre-entreprise.org 04 Aug '08
by bpoussin@users.labs.libre-entreprise.org 04 Aug '08
04 Aug '08
Author: bpoussin
Date: 2008-08-04 16:59:55 +0000 (Mon, 04 Aug 2008)
New Revision: 1281
Added:
trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/
trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCS.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSException.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/package.html
Removed:
trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisContext.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/commandline/
trunk/isis-fish/src/java/fr/ifremer/isisfish/versionning/
trunk/isis-fish/src/java/org/
Modified:
trunk/isis-fish/doc/Todo.rst
trunk/isis-fish/pom.xml
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/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/RuleStorage.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/ScriptStorage.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/entities/EquationImpl.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/map/IsisMapBean.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationCheckpointThread.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationExportResultWrapper.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/SimulationParameter.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationProperties.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationResultXML.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/script/Action.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/action/BackupAction.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/simulator/SimulatorAction.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/util/IsisActionWithBackup.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/util/CompileHelper.java
trunk/isis-fish/src/java/fr/ifremer/isisfish/util/EvaluatorHelper.java
trunk/isis-fish/src/resources/i18n/isis-fish-en_GB.properties
trunk/isis-fish/src/resources/i18n/isis-fish-fr_FR.properties
Log:
premier commit dans la branche
- modif de parsage d'option faite
- modif de vcs en cours
- modif de base en db4o pas fait
Modified: trunk/isis-fish/doc/Todo.rst
===================================================================
--- trunk/isis-fish/doc/Todo.rst 2008-08-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/doc/Todo.rst 2008-08-04 16:59:55 UTC (rev 1281)
@@ -1,3 +1,13 @@
+- 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)
+
+- mettre les directory dans les storages, compiledir dans javasourcestorage
+- IsisConfig avec les options + val static
+- IsisAction avec les actions
+
+- jnlp config: policy="prompt-update"
+
====
Todo
====
Modified: trunk/isis-fish/pom.xml
===================================================================
--- trunk/isis-fish/pom.xml 2008-08-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/pom.xml 2008-08-04 16:59:55 UTC (rev 1281)
@@ -22,7 +22,7 @@
<packaging>jar</packaging>
<!--Version-->
- <version>3.1.5-SNAPSHOT</version>
+ <version>3.1.6-SNAPSHOT</version>
<!--Description-->
<description>Simulateur de pecherie complexe.</description>
@@ -454,61 +454,6 @@
</executions>
</plugin>
<plugin>
- <groupId>org.codelutin.commandline</groupId>
- <artifactId>maven-commandline-plugin</artifactId>
- <version>0.6</version>
- <configuration>
- <prefix>Isis</prefix>
- <i18nPrefix>isisfish</i18nPrefix>
- <source>
- ${basedir}/src/resources/IsisFish_init.properties
- </source>
- <packageName>
- fr.ifremer.isisfish.commandline
- </packageName>
- <concreteConfig>false</concreteConfig>
- <rstFilePath>
- ${basedir}/src/site/@bundle@/rst/v3/user
- </rstFilePath>
- <_projectName>Isis-Fish</_projectName>
- <_configFileName>.isis-config-3</_configFileName>
- <!--_version>3.1.5</_version-->
- <_locale>fr_FR</_locale>
- <_projectName>CommandlineDemo</_projectName>
- <_projectURL>http://isis-fish.labs.libre-entreprise.org</_projectURL>
- <_organisationName>Ifremer - Codelutin</_organisationName>
- <_organisationURL>http://codelutin.com</_organisationURL>
- <_copyright>Copyright Ifremer Codelutin 1999 - 2008</_copyright>
- </configuration>
- <executions>
- <execution>
- <id>genJava</id>
- <goals>
- <goal>genJava</goal>
- </goals>
- <configuration>
- <out>${basedir}/target/gen/java</out>
- </configuration>
- </execution>
- <execution>
- <id>genRst</id>
- <goals>
- <goal>genRst</goal>
- </goals>
- <configuration>
- <out>${basedir}/target/classes</out>
- </configuration>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>lutinlib</groupId>
- <artifactId>lutinutil</artifactId>
- <version>0.29-SNAPSHOT</version>
- </dependency>
- </dependencies>
- </plugin>
- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
@@ -556,7 +501,7 @@
<dependency>
<groupId>lutinlib</groupId>
<artifactId>lutinutil</artifactId>
- <version>0.29</version>
+ <version>0.30-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
@@ -610,12 +555,6 @@
<!-- librairie commandline -->
<dependency>
<groupId>org.codelutin.commandline</groupId>
- <artifactId>commandline-core</artifactId>
- <version>0.6</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.codelutin.commandline</groupId>
<artifactId>commandline-ui</artifactId>
<version>0.6</version>
<scope>compile</scope>
@@ -694,12 +633,6 @@
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.1</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisConfig.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisConfig.java 2008-08-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisConfig.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -1,435 +1,320 @@
-/*
-* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 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.
-* ##% */
+/* *##%
+ * 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;
-import fr.ifremer.isisfish.simulator.SimulationContext;
-import fr.ifremer.isisfish.commandline.configs.IsisAbstractConfigMain;
-import static org.codelutin.i18n.I18n._;
-import org.codelutin.util.StringUtil;
+import fr.ifremer.isisfish.actions.ExportAction;
+import static org.codelutin.i18n.I18nf._;
+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 java.io.File;
-import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
+import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
+import org.apache.commons.beanutils.ConvertUtils;
+import org.apache.commons.lang.time.DurationFormatUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.codelutin.util.ApplicationConfig;
+import org.codelutin.util.StringUtil;
/**
- * L'implantation concrete de la configuration principale d'Isis
*
- * @author chemit
+ * @author poussin
+ * @version $Revision$
+ *
+ * Last update: $Date$
+ * by : $Author$
*/
-public class IsisConfig extends IsisAbstractConfigMain {
+public class IsisConfig extends ApplicationConfig {
- /** la version (ne peut pas être final car la configuration doit être chargée) */
- static private String VERSION;
+ /** to use log facility, just put in your code: log.info(\"...\"); */
+ static private Log log = LogFactory.getLog(IsisConfig.class);
- static public String getVERSION() {
- if (VERSION == null) {
- VERSION = IsisContext.get().getMainConfig().getVersion().toString();
- }
- return VERSION;
- }
+ /** 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
+ * <li>a: le numero de version de l'api des scripts
+ * <li>r: le numero de version de de l'interface graphique ou autre modif mineur
+ * <p>
+ * lors de l'increment de l, d, a et r sont remis a 0
+ * lors de l'increment de d, a et r sont remis a 0
+ * lors de l'increment de a, r est remis a 0
+ * <p>
+ * Un changement d'UI ne modifie jamais le numero de version de database
+ * Un changement de schema de base pour lequel on ne peut pas faire de
+ * 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";
- /** le copyright (ne peut pas être final car la configuration doit être chargée) */
- static private String COPYRIGHT_TEXT;
-
- static public String getCOPYRIGHT_TEXT() {
- if (COPYRIGHT_TEXT == null) {
- COPYRIGHT_TEXT = "Version " + IsisConfig.getVERSION() + " IFREMER-MAERHA © 2000-2008";
+ static final public String COPYRIGHT_TEXT = "Version " + VERSION + " IFREMER-MAERHA © 2000-2008";
+ static final public String CONFIG_FILENAME = "isis-config-" + VERSION_APPLICATION;
+
+ /** separateur de liste */
+ static final public String SEP = ",";
+ static final public String REPORT_EMAIL = "isis-fish-bugreport at lists.labs.libre-entreprise.org";
+
+ protected transient File backupSessionDirectory = null;
+ protected long startingTime = System.nanoTime();
+
+ public IsisConfig() {
+ for (Option o : Option.values()) {
+ setDefaultOption(o.key, o.defaultValue);
}
- return COPYRIGHT_TEXT;
- }
-
- //////////////////////////////////////////////////
- // Les modules du VCS (avec mapping sur les implantations)
- //////////////////////////////////////////////////
- static public enum Module {
- EXPORT("exports", fr.ifremer.isisfish.datastore.ExportStorage.class),
- FORMULE("formules", fr.ifremer.isisfish.datastore.FormuleStorage.class),
- RULE("rules", fr.ifremer.isisfish.datastore.RuleStorage.class),
- ANALYSE_PLAN("analyseplans", fr.ifremer.isisfish.datastore.AnalysePlanStorage.class),
- SCRIPT("scripts", fr.ifremer.isisfish.datastore.ScriptStorage.class),
- SIMULATOR("simulators", fr.ifremer.isisfish.datastore.SimulatorStorage.class),
- REGION("regions", fr.ifremer.isisfish.datastore.RegionStorage.class),
- SIMULATION("simulations", fr.ifremer.isisfish.datastore.SimulationStorage.class);
-
- private final String value;
- private final Class<? extends fr.ifremer.isisfish.datastore.VersionStorage> clazz;
-
- Module(String value, Class<? extends fr.ifremer.isisfish.datastore.VersionStorage> clazz) {
- this.value = value;
- this.clazz = clazz;
- }
- public String value() {
- return value;
- }
- public Class<? extends fr.ifremer.isisfish.datastore.VersionStorage> getClazz() {
- return clazz;
- }
- public File getDirectory() {
- File result = new File(getDatabaseDirectory(), value());
- if (!result.exists()) {
- result.mkdirs();
+
+ for (Action a : Action.values()) {
+ for (String alias : a.aliases) {
+ addActionAlias(alias, a.action);
}
- return result;
}
- }
- static public Module getModule(String value) {
- for (Module module : Module.values()) {
- if (module.value.equals(value)) {
- return module;
- }
- }
- return null;
}
+ static public String getVersion() {
+ return VERSION;
+ }
+
//////////////////////////////////////////////////
- // méthodes sur ClassLoader
+ // Methode d'acces aux options
//////////////////////////////////////////////////
-
- /**
- * Retourne un class loader contenant le répertoire de compilation
- * Il permet alors de charger des classes qui viennent d'etre compilée
- * dans isis
- * If current thread is in simulation then return specific simulation
- * compilation directory, else default compilation directory
- *
- * @return the class loader adéquate
- */
- static public ClassLoader getScriptClassLoader() {
- SimulationContext simContext = SimulationContext.get();
- ClassLoader result = simContext.getClassLoader();
- if (result == null) {
- // on est pas dans une simulation, il faut retourner un nouveau
- // a chaque fois. on force la creation d'un nouveau classloader
- // a chaque fois pour
- // que l'ancienne class compiler et chargé ne soit pas presente
- File f = IsisContext.get().getMainConfig().getCompileDirectory();
- try {
- URL[] cp = new URL[]{f.toURI().toURL()};
- // il faut prendre le ClassLoader du thread courant comme parent
- // car pour les simulations il a ete modifié, et il faut
- // que les classes de script soit recherché dedans avant
- // la recherche dans le getCompileDirectory().
- // ce qui est le cas avec les URLClassLoader
- ClassLoader parent = Thread.currentThread().getContextClassLoader();
- result = new URLClassLoader(cp, parent);
- } catch (MalformedURLException eee) {
- throw new IsisFishRuntimeException(_("isisfish.error.load.classloader", f, eee.getMessage()), eee);
- }
+
+ public File getDatabaseDirectory() {
+ File result = getOptionAsFile(Option.DATABASE_DIRECTORY.key);
+ if (!result.exists()) {
+ result.mkdirs();
}
return result;
}
- //////////////////////////////////////////////////
- // Les répertoires de compilation
- //////////////////////////////////////////////////
+ public File getCompileDirectory() {
+ File result = getOptionAsFile(Option.COMPILATION_DIRECTORY.key);
+ if (!result.exists()) {
+ result.mkdirs();
+ }
+ return result;
+ }
- static protected File getCompileDirectory(String name) {
- File compileDirectory = IsisContext.get().getMainConfig().getCompileDirectory();
- File result;
- result = new File(compileDirectory, name);
+ public Locale getLocale() {
+ String value = getOption(Option.LOCALE.key);
+ Locale result = (Locale)ConvertUtils.convert(value, Locale.class);
return result;
}
-
- /**
- * @return le répertoire où sont compilé les scripts
- * @see #getCompileDirectory(String)
- * @see Module#SCRIPT
- */
- static public File getScriptCompileDirectory() {
- File result;
- result = getCompileDirectory(Module.SCRIPT.value());
+
+ public String getEncoding() {
+ String result = getOption(Option.ENCODING.key);
return result;
}
-
- /**
- * @return le répertoire où sont compilé les simulateurs
- * @see #getCompileDirectory(String)
- * @see Module#SIMULATOR
- */
- static public File getSimulatorCompileDirectory() {
- File result;
- result = getCompileDirectory(Module.SIMULATOR.value());
+
+ public String getSmtpServer() {
+ String result = getOption(Option.SMTP_SERVER.key);
return result;
}
-
- /**
- * @return le répertoire où sont compilé les scripts d'export
- * @see #getCompileDirectory(String)
- * @see Module#EXPORT
- */
- static public File getExportCompileDirectory() {
- File result;
- result = getCompileDirectory(Module.EXPORT.value());
+
+ public String getUserName() {
+ String result = getOption(Option.USER_NAME.key);
return result;
}
-
- /**
- * @return le répertoire où sont compilé les formules
- * @see #getCompileDirectory(String)
- * @see Module#FORMULE
- */
- static public File getFormuleCompileDirectory() {
- File result;
- result = getCompileDirectory(Module.FORMULE.value());
+
+ public String getUserMail() {
+ String result = getOption(Option.USER_MAIL.key);
return result;
}
-
- //////////////////////////////////////////////////
- // Les fichiers et répertoires de la base locale
- //////////////////////////////////////////////////
-
- /**
- * @return le repertoire ou les données de l'application sont stockées.
- * <p/>
- * <b>Si le répertoire n'existe pas il est créé.</b>
- */
- static public File getDatabaseDirectory() {
- File result = IsisContext.get().getVcsConfig().getLocalDatabasePath();
- if (!result.exists()) {
- result.mkdirs();
- }
+
+ public String getSimulatorServer() {
+ String result = getOption(Option.SIMULATOR_SERVER.key);
return result;
}
-
- /**
- * @param name le nom du sous-répertoire à récupérer
- * @return le sous répertoire de nom <code>name</code> du repertoire ou les
- * données de l'application sont stockées.
- * <p/>
- * <b>Si le sous-répertoire n'existe pas il est créé.</b>
- * @see #getDatabaseDirectory()
- */
- static protected File getDatabaseDirectory(String name) {
- File result = new File(getDatabaseDirectory(), name);
- if (!result.exists()) {
- result.mkdirs();
- }
+
+ public String getSimulatorUsername() {
+ String result = getOption(Option.SIMULATOR_USER_NAME.key);
return result;
}
- /**
- * @param rootDir le nom du répertoire de base du storage
- * @return le fichier contenant la définition du storage à partir du
- * répertoire de base du storage (il s'agit du fichier compressé
- * contenant le code sql pour créer la db du storage).
- * @see #DATA_BACKUP_FILENAME_PROPERTY_KEY
- */
- static public File getDataBackupFile(File rootDir) {
- String name = IsisContext.get().getMainConfig().getDataBackupFilename();
- return new File(rootDir, name);
+ public String getSimulatorPassword() {
+ String result = getOption(Option.SIMULATOR_PASSWORD.key);
+ return result;
}
-
- /**
- * @return le répertoire (de la base locale) dans lequel toutes les régions sont stockées
- * @see #getDatabaseDirectory(String)
- * @see Module#REGION
- * @see fr.ifremer.isisfish.datastore.RegionStorage
- */
- static public File getRegionDirectory() {
- return getDatabaseDirectory(Module.REGION.value());
+
+ public String getSimulatorClassfile() {
+ String result = getOption(Option.SIMULATOR_CLASSFILE.key);
+ return result;
}
-
- /**
- * @return le répertoire (de la base locale) dans lequel toutes les simulations sont stockées
- * @see #getDatabaseDirectory(String)
- * @see Module#SIMULATION
- * @see fr.ifremer.isisfish.datastore.SimulationStorage
- */
- static public File getSimulationDirectory() {
- return getDatabaseDirectory(Module.SIMULATION.value());
+
+ public void setSimulatorClassfile(String value) {
+ setOption(Option.SIMULATOR_CLASSFILE.key, value);
}
+
+ public boolean isSimulatorLocal() {
+ String value = getOption(Option.SIMULATOR_LAUNCHER.key);
+ boolean result = "local".equalsIgnoreCase(value);
+ return result;
+ }
- /**
- * @return le répertoire (de la base locale) dans lequel toutes les scripts de rules sont stockées
- * @see #getDatabaseDirectory(String)
- * @see Module#RULE
- * @see fr.ifremer.isisfish.datastore.RuleStorage
- */
- static public File getRuleDirectory() {
- return getDatabaseDirectory(Module.RULE.value());
- }
+// public boolean isUseVCS() {
+// String value = getOption(Option.VCS_TYPE.key);
+// boolean result = !VCS.TYPE_NONE.equals(value);
+// return result;
+// }
- /**
- * @return le répertoire (de la base locale) dans lequel toutes les scripts analyses de sensibilité sont stockées
- * @see #getDatabaseDirectory(String)
- * @see Module#ANALYSE_PLAN
- * @see fr.ifremer.isisfish.datastore.AnalysePlanStorage
- */
- static public File getAnalysePlanDirectory() {
- return getDatabaseDirectory(Module.ANALYSE_PLAN.value());
- }
+ public boolean isLaunchUI() {
+ boolean result = getOptionAsBoolean(Option.LAUNCH_UI.key);
+ return result;
+ }
- /**
- * @return le répertoire (de la base locale) dans lequel toutes les formules sont stockées
- * @see #getDatabaseDirectory(String)
- * @see Module#FORMULE
- * @see fr.ifremer.isisfish.datastore.FormuleStorage
- */
- static public File getFormuleDirectory() {
- return getDatabaseDirectory(Module.FORMULE.value());
- }
+ public void setSimulatorLauncher(String value) {
+ setOption(Option.SIMULATOR_LAUNCHER.key, value);
+ }
- /**
- * @return le répertoire (de la base locale) dans lequel toutes les scripts de script sont stockées
- * @see #getDatabaseDirectory(String)
- * @see Module#SCRIPT
- * @see fr.ifremer.isisfish.datastore.ScriptStorage
- */
- static public File getScriptDirectory() {
- return getDatabaseDirectory(Module.SCRIPT.value());
- }
+ public boolean isSimulationShowOnlyQueue() {
+ Boolean result = getOptionAsBoolean(Option.SIMULATION_SHOW_ONLY_QUEUE.key);
+ return result;
+ }
- /**
- * @return le répertoire (de la base locale) dans lequel toutes les scripts d'exports sont stockées
- * @see #getDatabaseDirectory(String)
- * @see Module#EXPORT
- * @see fr.ifremer.isisfish.datastore.ExportStorage
- */
- static public File getExportDirectory() {
- return getDatabaseDirectory(Module.EXPORT.value());
- }
+ public boolean isSimulationShowOnlyError() {
+ Boolean result = getOptionAsBoolean(Option.SIMULATION_SHOW_ONLY_ERROR.key);
+ return result;
+ }
- /**
- * @return le répertoire (de la base locale) dans lequel toutes les scripts de simulator sont stockées
- * @see #getDatabaseDirectory(String)
- * @see Module#SIMULATOR
- * @see fr.ifremer.isisfish.datastore.SimulatorStorage
- */
- static public File getSimulatorDirectory() {
- return getDatabaseDirectory(Module.SIMULATOR.value());
+ public File getDefaultExportDirectory() {
+ File result = getOptionAsFile(Option.DEFAULT_EXPORT_DIRECTORY.key);
+ if (!result.exists()) {
+ result.mkdirs();
+ }
+ return result;
}
- /**
- * @param name le nom de la region
- * @return le répertoire (de la base locale) dans lequel les données de la région donnée sont stockées
- * @see #getRegionDirectory()
- */
- static public File getRegionDirectory(String name) {
- return new File(getRegionDirectory(), name);
- }
+ public void setDefaultExportDirectory(String value) {
+ setOption(Option.DEFAULT_EXPORT_DIRECTORY.key, value);
+ }
- /**
- * @param name le nom de la simulation
- * @return le répertoire (de la base locale) dans lequel les données de la simulation donnée sont stockées
- * @see #getSimulationDirectory()
- */
- static public File getSimulationDirectory(String name) {
- return new File(getSimulationDirectory(), name);
+ public String getDefaultExportNames() {
+ String result = getOption(Option.DEFAULT_EXPORT_NAMES.key);
+ return result;
}
- //////////////////////////////////////////////////
- // Les autres fichiers et répertoires
- //////////////////////////////////////////////////
-
- /**
- * @param rootDir le répertoire de base de la simulation
- * @return le répertoire de résultat d'export à partir du répertoire de base de la simulation
- * @see #RESULT_EXPORT_PROPERTY_KEY
- */
- static public File getResultExportDirectory(File rootDir) {
- String name = IsisContext.get().getMainConfig().getResultExport();
- return new File(rootDir, name);
+ public void setDefaultExportNames(List<String> exportNames) {
+ StringBuilder sb = new StringBuilder();
+ for (String exportName : exportNames) {
+ sb.append(SEP).append(exportName);
+ }
+ String value = sb.toString().substring(1);
+ setOption(Option.DEFAULT_EXPORT_NAMES.key, value);
+ saveForUser();
}
/**
- * @param simulationDir le répertoire de base de la simulation
- * @return le fichier dans lequel est stocké les paramètres d'une
- * simulation à partir de son répertoire de base
- * @see #SIMULATION_PARAMETERS_FILENAME_PROPERTY_KEY
+ * @return la liste des noms d'exports par defaut sous forme de liste,
+ * a partir de la propriete {@link Option#DEFAULT_EXPORT_NAMES}
+ * ou null si ils n'ont jamais ete sauves par l'utilisateur.
+ * by user.
+ * @see Option#DEFAULT_EXPORT_NAMES
*/
- static public File getSimulationParametersFile(File simulationDir) {
- String name = IsisContext.get().getMainConfig().getSimulationParametersFilename();
- return new File(simulationDir, name);
+ public List<String> getDefaultExportNamesAsList() {
+ List<String> result = null;
+ String exportNamesList = getDefaultExportNames();
+ if (exportNamesList != null) {
+ result = new ArrayList<String>();
+ String[] exportNames = StringUtil.split(exportNamesList, ",");
+ result.addAll(Arrays.asList(exportNames));
+ }
+ return result;
}
- /**
- * @param simulationDir le répertoire de base de la simulation
- * @return le fichier dans lequel est stocké les informations d'une
- * simulation à partir de son répertoire de base
- * @see fr.ifremer.isisfish.simulator.SimulationProperties
- * @see #SIMULATION_INFORMATION_FILENAME_PROPERTY_KEY
- */
- static public File getSimulationInformationFile(File simulationDir) {
- String name = IsisContext.get().getMainConfig().getSimulationInformationFilename();
- return new File(simulationDir, name);
+ public String getDefaultMapFilename() {
+ String result = getOption(Option.DEFAULT_MAP_FILENAME.key);
+ return result;
}
- /**
- * @param simulationDir le répertoire de base de la simulation
- * @return le fichier dans lequel sont stockés les résultats aux format xml
- * d'une simulation à partir de son répertoire de base
- * @see fr.ifremer.isisfish.simulator.SimulationResultXML
- * @see #SIMULATION_RESULT_XML_FILENAME_PROPERTY_KEY
- */
- static public File getSimulationResultXmlFile(File simulationDir) {
- String name = IsisContext.get().getMainConfig().getSimulationResultXmlFilename();
- return new File(simulationDir, name);
+ public String getDefaultResultNames() {
+ String result = getOption(Option.DEFAULT_RESULT_NAMES.key);
+ return result;
}
- /**
- * @param rootDir le répertoire de base de la région
- * @return le répertoire des maps d'une région à partir du répertoire de base de la région
- * @see #REGION_MAP_PROPERTY_KEY
- */
- static public File getRegionMapDirectory(File rootDir) {
- String name = IsisContext.get().getMainConfig().getRegionMap();
- return new File(rootDir, name);
+ public void setDefaultResultNames(List<String> resultNames) {
+ StringBuilder sb = new StringBuilder();
+ for (String resultName : resultNames) {
+ sb.append(SEP).append(resultName);
+ }
+ String value = sb.toString().substring(1);
+ setOption(Option.DEFAULT_RESULT_NAMES.key, value);
+ saveForUser();
}
- //////////////////////////////////////////////////
- // accesseur statiques de propriétés vers collections
- //////////////////////////////////////////////////
-
/**
- * @return la liste des noms d'exports par défaut sous forme de liste,
- * à partir de la propriété {@link #DEFAULT_EXPORT_NAMES_PROPERTY_KEY}
- * ou null si ils n'ont jamais été sauvé par l'utilisateur.
- * by user.
- * @see #DEFAULT_EXPORT_NAMES_PROPERTY_KEY
+ * @return les resultats par defaut d'une simulation sous forme de liste
+ * a partir de la propriete {@link Option#DEFAULT_RESULT_NAMES}
+ * @see Option#DEFAULT_RESULT_NAMES
*/
- static public List<String> getDefaultExportNamesAsList() {
+ public List<String> getDefaultResultNamesAsList() {
List<String> result = null;
- String exportNamesList = IsisContext.get().getMainConfig().getDefaultExportNames();
- if (exportNamesList != null) {
+ String resultNamesList = getDefaultResultNames();
+ if (resultNamesList != null) {
result = new ArrayList<String>();
- String[] exportNames = StringUtil.split(exportNamesList, ",");
- result.addAll(Arrays.asList(exportNames));
+ String[] resultNames = StringUtil.split(resultNamesList, ",");
+ result.addAll(Arrays.asList(resultNames));
}
return result;
}
+
+ public String getDefaultTagValue() {
+ String result = getOption(Option.DEFAULT_TAG_VALUE.key);
+ return result;
+ }
+
+ public void setDefaultTagValues(Map<String, String> tagValues) {
+ StringBuilder sb = new StringBuilder();
+ for (Map.Entry<String, String> entry : tagValues.entrySet()) {
+ sb.append(SEP).append('"').append(entry.getKey()).append("\":\"").append(entry.getValue()).append('"');
+ }
+ String value = sb.toString().substring(1);
+ setOption(Option.DEFAULT_TAG_VALUE.key, value);
+ saveForUser();
+ }
+
+
/**
- * @return le dictionnaire des tags par défaut d'une simulation à partir
- * de la propriété {@link #DEFAULT_TAG_VALUE_PROPERTY_KEY}
- * @see #DEFAULT_TAG_VALUE_PROPERTY_KEY
+ * @return le dictionnaire des tags par defaut d'une simulation a partir
+ * de la propriete {@link Option#DEFAULT_TAG_VALUE}
+ * @see Option#DEFAULT_TAG_VALUE_PROPERTY_KEY
*/
- static public Map<String, String> getDefaultTagValueAsMap() {
+ public Map<String, String> getDefaultTagValueAsMap() {
Map<String, String> result = new HashMap<String, String>();
- String tagValuesList = IsisContext.get().getMainConfig().getDefaultTagValue();
+ String tagValuesList = getDefaultTagValue();
if (tagValuesList != null) {
String[] tagValues = StringUtil.split(tagValuesList, ",");
for (String tagValue : tagValues) {
@@ -446,154 +331,196 @@
}
return result;
}
-
- /**
- * @return les resultats par défaut d'une simulation sous forme de liste
- * à partir de la propriété {@link #DEFAULT_RESULT_NAMES_PROPERTY_KEY}
- * @see #DEFAULT_RESULT_NAMES_PROPERTY_KEY
- */
- static public List<String> getDefaultResultNamesAsList() {
- List<String> result = null;
- String resultNamesList = IsisContext.get().getMainConfig().getDefaultResultNames();
- if (resultNamesList != null) {
- result = new ArrayList<String>();
- String[] resultNames = StringUtil.split(resultNamesList, ",");
- result.addAll(Arrays.asList(resultNames));
- }
+
+ public String getJavadocURL() {
+ String result = getOption(Option.JAVADOC_URL.key);
return result;
}
- //////////////////////////////////////////////////
- // mutateurs statiques de propriétés (avec sauvegarde de config)
- //////////////////////////////////////////////////
-
- private static final char SEP=',';
-
- /**
- * Mutateur de la propriété {@link #DEFAULT_EXPORT_NAMES_PROPERTY_KEY} à
- * partir d'une liste de noms d'export.
- * <p/>
- * <b>Note : Ce mutateur lance une sauvegarde automatique de la configuration d'Isis.</b>
- *
- * @param exportNames la liste des exports par défaut d'une simulation à sauver
- * @see #DEFAULT_EXPORT_NAMES_PROPERTY_KEY
- */
- static public void setDefaultExportNames(List<String> exportNames) {
- StringBuilder sb = new StringBuilder();
- for (String exportName : exportNames) {
- sb.append(SEP).append(exportName);
- }
- IsisContext.get().getMainConfig().setDefaultExportNames(sb.toString().substring(1));
- IsisContext.get().saveSafely();
+ public File getBackupDirectory() {
+ File result = getOptionAsFile(Option.BACKUP_DIRECTORY.key);
+ return result;
}
- /**
- * Mutateur de la propriété {@link #DEFAULT_TAG_VALUE_PROPERTY_KEY} à partir
- * d'un dictionnaire.
- * <p/>
- * <b>Note : Ce mutateur lance une sauvegarde automatique de la configuration d'Isis.</b>
- *
- * @param tagValues le dictionnaire des tag value par défaut d'une simulation à sauver.
- * @see #DEFAULT_TAG_VALUE_PROPERTY_KEY
- */
- static public void setDefaultTagValues(Map<String, String> tagValues) {
- StringBuilder sb = new StringBuilder();
- for (Map.Entry<String, String> entry : tagValues.entrySet()) {
- sb.append(SEP).append('"').append(entry.getKey()).append("\":\"").append(entry.getValue()).append('"');
+ public long getStartingTime() {
+ return startingTime;
+ }
+
+ public String getElapsedTimeAsString() {
+ long diff = System.nanoTime() - getStartingTime();
+ String result = DurationFormatUtils.formatDuration(diff / 1000000, "s'.'S");
+ return result;
+ }
+
+ public File getBackupSessionDirectory() {
+ if (backupSessionDirectory == null) {
+ // le timestamp est en nano (on le veut en ms)
+ long time = getStartingTime() / 1000;
+ // creation de l'unique répertoire de backup pour la session
+ String path = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss").format(new java.util.Date(time));
+ backupSessionDirectory = new File(getBackupDirectory(), path);
+ if (!backupSessionDirectory.exists()) {
+ backupSessionDirectory.mkdirs();
+ }
}
- IsisContext.get().getMainConfig().setDefaultTagValue(sb.toString().substring(1));
- IsisContext.get().saveSafely();
+ return backupSessionDirectory;
}
/**
- * Mutateur de la propriété {@link #DEFAULT_EXPORT_DIRECTORY_PROPERTY_KEY}
- * à partir de son chemin.
- * <p/>
- * <b>Note : Ce mutateur lance une sauvegarde automatique de la configuration d'Isis.</b>
+ * Retourne un class loader contenant le repertoire de compilation
+ * Il permet alors de charger des classes qui viennent d'etre compilees
+ * dans isis
+ * If current thread is in simulation then return specific simulation
+ * compilation directory, else default compilation directory
*
- * @param exportDirectory le nouveau répertoire par défaut des exports d'une simulation
- * @see #DEFAULT_EXPORT_DIRECTORY_PROPERTY_KEY
+ * @return the class loader adequate
*/
- static public void setDefaultExportDirectory(String exportDirectory) {
- IsisContext.get().getMainConfig().setDefaultExportDirectory(new File(exportDirectory));
- IsisContext.get().saveSafely();
- }
-
- /**
- * Mutateur de la propriété {@link #DEFAULT_RESULT_NAMES_PROPERTY_KEY} à
- * partir d'une liste de noms de résultats.
- * <p/>
- * <b>Note : Ce mutateur lance une sauvegarde automatique de la configuration d'Isis.</b>
- *
- * @param resultNames la liste des résultats par défaut à traiter dans une simulation
- * @see #DEFAULT_RESULT_NAMES_PROPERTY_KEY
- */
- static public void setDefaultResultNames(List<String> resultNames) {
- StringBuilder sb = new StringBuilder();
- for (String resultName : resultNames) {
- sb.append(SEP).append(resultName);
+ public ClassLoader getScriptClassLoader() {
+ SimulationContext simContext = SimulationContext.get();
+ ClassLoader result = simContext.getClassLoader();
+ if (result == null) {
+ // on est pas dans une simulation, il faut retourner un nouveau
+ // a chaque fois. on force la creation d'un nouveau classloader
+ // a chaque fois pour
+ // que l'ancienne class compiler et charg<E9> ne soit pas presente
+ File f = getCompileDirectory();
+ try {
+ URL[] cp = new URL[]{f.toURI().toURL()};
+ // il faut prendre le ClassLoader du thread courant comme parent
+ // car pour les simulations il a ete modifi<E9>, et il faut
+ // que les classes de script soit recherch<E9> dedans avant
+ // la recherche dans le getCompileDirectory().
+ // ce qui est le cas avec les URLClassLoader
+ ClassLoader parent = Thread.currentThread().getContextClassLoader();
+ result = new URLClassLoader(cp, parent);
+ } catch (MalformedURLException eee) {
+ throw new IsisFishRuntimeException(_("isisfish.error.load.classloader", f, eee.getMessage()), eee);
+ }
}
- IsisContext.get().getMainConfig().setDefaultResultNames(sb.toString().substring(1));
- IsisContext.get().saveSafely();
+ return result;
}
//////////////////////////////////////////////////
- // surcharge de la config abstraite
+ // Toutes les options disponibles
//////////////////////////////////////////////////
- //@Override
- //protected void init() throws Exception {
- // generic init
- // super.init();
- // à ce stade, la config est normale
- //clearModified();
- //clearUnsafeData();
- //}
+ static public enum Option {
- @Override
- public File getCompileDirectory() {
- SimulationContext simContext = SimulationContext.get();
- File result = simContext.getScriptDirectory();
- if (result == null) {
- result = super.getCompileDirectory();
+ 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"), ""),
+ DEFAULT_MAP_FILENAME("default.map.filename", _("isisfish.config.main.defaultMapFile.description"), "maps/vmap_area_thin"),
+ 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"),
+ SIMULATION_SHOW_ONLY_ERROR("simulationShowOnlyError", _("isisfish.config.main.simulationShowOnlyError.description"), "true"),
+ SIMULATION_SHOW_ONLY_QUEUE("simulationShowOnlyQueue", _("isisfish.config.main.simulationShowOnlyQueue.description"), "true"),
+
+ // if false no graphical interface
+ LAUNCH_UI("launch.ui", _("isisfish.config.main.launchUI.description"), "true"),
+
+ DATABASE_DIRECTORY("database.directory", _("isisfish.config.vcs.localDatabasePath.description"), getUserHome() + File.separator + "isis-database-3"),
+
+ SSH_KEY_FILE("ssh.key.file", _("isisfish.config.vcs.keyFile.description"), getUserHome() + File.separator + ".ssh" + File.separator + "isis_rsa"),
+ SSH_PASSPHRASE_ENABLED("ssh.passphrase.enabled", _("isisfish.config.vcs.noPassPhrase.description"), "false"),
+ 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),
+ // depend of VCS_TYPE, for SVN can be http or ssh
+ VCS_CONNECTION(VCS.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),
+// 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"),
+
+ USER_NAME("user.name", _("isisfish.config.main.userName.description"), System.getProperty("user.name")),
+ SMTP_SERVER("smtpServer", _("isisfish.config.main.smtpServer.description"), "smtp"),
+ USER_MAIL("userMail", _("isisfish.config.main.userMail.description"), USER_NAME.key + "@" + VCS_HOST_NAME.key),
+
+ ;
+
+ public final String key;
+ public final String description;
+ public final String defaultValue;
+
+ private Option(String key, String description, String defaultValue) {
+ this.key = key;
+ this.description = description;
+ this.defaultValue = defaultValue;
}
- return result;
}
+
+ //////////////////////////////////////////////////
+ // Toutes les actions disponibles
+ //////////////////////////////////////////////////
- /**
- * Mutateur de la propriété {@link #DEFAULT_SIMULATOR_PROPERTY_KEY}.
- * <p/>
- * <b>Note : Ce mutateur lance une sauvegarde automatique de la configuration d'Isis.</b>
- *
- * @param simulatorName le nom du simulateur pà utiliser par défaut
- * @see #DEFAULT_SIMULATOR_PROPERTY_KEY
- */
- @Override
- public void setDefaultSimulator(String simulatorName) {
- super.setDefaultSimulator(simulatorName);
- IsisContext.get().saveSafely();
- }
+ static public enum Action {
+ HELP(_("Show help"), OtherAction.class.getName() + "#help", "-h", "--help"),
+
+ IMPORT_ANALYSE_PLAN(_(""), ImportAction.class.getName() + "#importAnalysePlan", "--importAnalysePlan"),
+ IMPORT_EXPORT(_(""), ImportAction.class.getName() + "#importExport", "--importExport"),
+ IMPORT_RULE(_(""), ImportAction.class.getName() + "#importRule", "--importRule"),
+ IMPORT_SCRIPT(_("Import one java file script source"), ImportAction.class.getName() + "#importScript", "--importScript"),
+ IMPORT_SIMULATOR(_(""), ImportAction.class.getName() + "#importSimulator", "--importSimulator"),
+ IMPORT_FORMULA(_(""), ImportAction.class.getName() + "#importFormula", "--importFormula"),
+ IMPORT_REGION(_(""), ImportAction.class.getName() + "#importRegion", "--importRegion"),
+ IMPORT_REGION_AND_RENAME(_(""), ImportAction.class.getName() + "#importRegionAndRename", "--importRegionAndRename"),
+ IMPORT_SIMULATION(_(""), ImportAction.class.getName() + "#importSimulation", "--importSimulation"),
+ IMPORT_SCRIPT_MODULE(_("Import zipped file containing all scripts directory structure"), ImportAction.class.getName() + "#importScriptModule", "--importScriptModule"),
- /**
- * Mutateur de la propriété {@link #LOCAL_SIMULATOR_PROPERTY_KEY}.
- * <p/>
- * <b>Note : Ce mutateur lance une sauvegarde automatique de la configuration d'Isis.</b>
- *
- * @param local le flag pour indiquer si on doit utiliser ou non le simulateur locale
- * @see #LOCAL_SIMULATOR_PROPERTY_KEY
- */
- @Override
- public void setLocalSimulator(boolean local) {
- super.setLocalSimulator(local);
- IsisContext.get().saveSafely();
- }
+ LIST_ANALYSE_PLAN(_(""), ExportAction.class.getName() + "#listAnalysePlan", "--listAnalysePlan"),
+ LIST_EXPORT(_(""), ExportAction.class.getName() + "#listExport", "--listExport"),
+ LIST_RULE(_(""), ExportAction.class.getName() + "#listRule", "--listRule"),
+ LIST_SCRIPT(_(""), ExportAction.class.getName() + "#listScript", "--listScript"),
+ LIST_SIMULATOR(_(""), ExportAction.class.getName() + "#listSimulator", "--listSimulator"),
+ LIST_FORMULA(_(""), ExportAction.class.getName() + "#listFormula", "--listFormula"),
+ LIST_REGION(_(""), ExportAction.class.getName() + "#listRegion", "--listRegion"),
+ LIST_SIMULATION(_(""), ExportAction.class.getName() + "#listSimulation", "--listSimulation"),
- @Override
- protected void loadFromSource() throws IOException {
- super.loadFromSource();
- // alwyas used the java program version, should even never stored...
- setVersion(VERSION_PROPERTY_KEY.getDefaultValue());
- // we do not deal with inter-config properties
- clearUnsafeData();
+ EXPORT_ANALYSE_PLAN(_(""), ExportAction.class.getName() + "#exportAnalysePlan", "--exportAnalysePlan"),
+ EXPORT_EXPORT(_(""), ExportAction.class.getName() + "#exportExport", "--exportExport"),
+ EXPORT_RULE(_(""), ExportAction.class.getName() + "#exportRule", "--exportRule"),
+ EXPORT_SCRIPT(_(""), ExportAction.class.getName() + "#exportScript", "--exportScript"),
+ EXPORT_SIMULATOR(_(""), ExportAction.class.getName() + "#exportSimulator", "--exportSimulator"),
+ EXPORT_FORMULA(_(""), ExportAction.class.getName() + "#exportFormula", "--exportFormula"),
+ EXPORT_REGION(_(""), ExportAction.class.getName() + "#exportRegion", "--exportRegion"),
+ EXPORT_SIMULATION(_(""), ExportAction.class.getName() + "#exportSimulation", "--exportSimulation"),
+
+ VCS_SSH_CREATE_KEY(_(""), VCSAction.class.getName() + "#sshCreateKey", "--sshCreateKey"),
+ VCS_UPDATE(_(""), VCSAction.class.getName() + "#vcsUpdate", "--vcsUpdate"),
+ VCS_ADD(_(""), VCSAction.class.getName() + "#vcsAdd", "--vcsAdd"),
+ VCS_REMOVE(_(""), VCSAction.class.getName() + "#vcsRemove", "--vcsRemove"),
+ VCS_COMMIT(_(""), VCSAction.class.getName() + "#vcsCommit", "--vcsCommit"),
+
+ SIMULATE_WITH_REGION(_(""), SimulationAction.class.getName() + "#simulateWithRegion", "--simulateWithRegion"),
+ SIMULATE_WITH_SIMULATION(_(""), SimulationAction.class.getName() + "#simulateWithSimulation", "--simulateWithSimulation"),
+ ;
+
+ public String description;
+ public String action;
+ public String[] aliases;
+
+ private Action(String description, String action, String ... aliases) {
+ this.description = description;
+ this.action = action;
+ this.aliases = aliases;
+ }
}
}
Deleted: trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisContext.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisContext.java 2008-08-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisContext.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -1,331 +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.IsisAbstractContext;
-import fr.ifremer.isisfish.commandline.IsisOptionParser;
-import fr.ifremer.isisfish.datastore.IsisH2Config;
-import fr.ifremer.isisfish.versionning.IsisVcsConfig;
-import org.codelutin.i18n.I18n;
-import org.codelutin.option.OptionKey;
-import org.codelutin.option.ParserException;
-import org.codelutin.vcs.ConnectionState;
-import org.codelutin.vcs.VCSException;
-import org.codelutin.vcs.VCSHandler;
-import org.codelutin.vcs.VCSHandlerFactory;
-import org.swixat.model.Context;
-
-import javax.swing.JOptionPane;
-import javax.swing.JLabel;
-import java.io.File;
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-
-/**
- * A simple context for Isis.
- * <p/>
- * The class defines a single shared (none multithread safe) instance {@link #context}
- * <p/>
- *
- * @author chemit
- */
-public class IsisContext extends IsisAbstractContext {
-
- public static final String ISIS_CONTEXT = "isisContext";
-
- private static IsisContext context;
-
- static public synchronized IsisContext get() {
- if (context == null) {
- try {
- context = new IsisContext();
- } catch (Exception e) {
- throw new RuntimeException("could not init " + IsisContext.class + "for reason " + e.getMessage());
- }
- }
- return context;
- }
-
- //////////////////////////////////////////////////
- // Les répertoires de backup
- //////////////////////////////////////////////////
-
- static public File getSessionBackupDirectory() {
- // on ne crée que lors d'un besoin
- IsisContext context = get();
- IsisConfig inst = context.getMainConfig();
- if (context.sessionBackupDirectory == null) {
- // le timestamp est en nano (on le veut en ms)
- long time = context.getStartingTime() / 1000;
- // creation de l'unique répertoire de backup pour la session
- String path = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss").format(new java.util.Date(time));
- context.sessionBackupDirectory = new File(inst.getDefaultBackupDirectory(), path);
- context.sessionBackupDirectory.mkdirs();
- }
- return context.sessionBackupDirectory;
- }
-
- /**
- * @param rootDir le répertoire parent
- * @return le répertoire de backup à partir de son répertoire parent, dont
- * le nom est exactement celui défini pour la session d'Isis.
- * @see #getSessionBackupDirectory(java.io.File, String)
- */
- static public File getSessionBackupDirectory(File rootDir) {
- File result;
- result = getSessionBackupDirectory(rootDir, null);
- return result;
- }
-
- /**
- * @param rootDir le répertoire parent
- * @param prefixName le préfixe à ajouter au nom du répertoire
- * @return le répertoire de backup à partir de son répertoire parent, dont
- * le nom est celui défini pour la session d'Isis préfixé par le préfixe donné.
- * @see IsisConfig#DEFAULT_BACKUP_DIRECTORY_PROPERTY_KEY
- * @see #sessionBackupDirectory
- * @see fr.ifremer.isisfish.IsisContext#startingTime
- */
- static public File getSessionBackupDirectory(File rootDir, String prefixName) {
- String name = getSessionBackupDirectory().getName();
- return new File(rootDir, (prefixName == null ? "" : prefixName) + name);
- }
-
- /**
- * Cette enumération contient les différentes étapes de l'init.
- * <p/>
- * Elle permet de définir un mapping entre les étapes de l'init et les
- * actions d'option à exécuter pour chaque étape de l'init.
- * <p/>
- * TODO, effectuer cela par annotation sur la définition des actions.
- *
- * @author chemit
- */
- public enum InitStage {
- /**
- * premier état de l'init :
- * <p/>
- * on est rentré dans la méthode {@link IsisFish#init()}, juste avant
- * de charger la configuraton {@link IsisConfig#init()}
- */
- BEFORE_LOAD(
- IsisOptionParser.UI_OPTION_KEY
- ),
- /**
- * second état de l'init :
- * <p/>
- * on est toujours dans la méthode {@link IsisFish#init()}, juste avant
- * de valider la configuration vcs.
- */
- BEFORE_VALIDATE_VCS(
- IsisOptionParser.HELP_OPTION_KEY,
- IsisOptionParser.HELP_CONFIG_OPTION_KEY,
- IsisOptionParser.SHOW_CONFIG_OPTION_KEY,
- IsisOptionParser.EDIT_CONFIG_OPTION_KEY,
- IsisOptionParser.SSH_KEY_FILE_OPTION_KEY,
- IsisOptionParser.CREATE_SSH_KEY_OPTION_KEY
- ),
- /**
- * troisième état de l'init :
- * <p/>
- * la configuration vcs est validé, on a sauvé la configuration,
- * le répository n'a pas encore été initialisé.
- */
- BEFORE_INIT_REPOSITORY(
- IsisOptionParser.IMPORT_OPTION_KEY,
- IsisOptionParser.EXPORT_DATA_OPTION_KEY,
- IsisOptionParser.EXPORT_SCRIPT_OPTION_KEY,
- IsisOptionParser.IMPORT_AND_RENAME_REGION_OPTION_KEY,
- IsisOptionParser.LIST_OPTION_KEY
- ),
- /**
- * quatrième état de l'init :
- * <p/>
- * au retour de la méthode {@link IsisFish#init()},
- * le répository est opérationnel et la connexion vcs établie.
- */
- AFTER_INIT(
- IsisOptionParser.VCS_ADD_REMOVE_OPTION_KEY,
- IsisOptionParser.VCS_UPDATE_COMMIT_STATE_OPTION_KEY,
- IsisOptionParser.MAVEN_FILE_OPTION_KEY,
- IsisOptionParser.UPDATE_OPTION_KEY
- ),
- /**
- * cinquième état de l'init :
- * <p/>
- * le dernier état avant le lancement de l'application (si requis).
- */
- AFTER_ALL(
- IsisOptionParser.SIMULATE_OPTION_KEY,
- IsisOptionParser.UI_OPTION_KEY
- );
-
- transient final OptionKey[] optionKeys;
-
- InitStage(OptionKey... optionKeys) {
- this.optionKeys = optionKeys;
- }
- }
-
- /** flag to use or not vcs */
- protected boolean useVCS = true;
-
- /** the vcs handler to use */
- protected VCSHandler handler;
-
-
- /** le répertoire ou effectuer les backup pour cette session */
- protected File sessionBackupDirectory;
-
- protected Context uiContext;
-
- public IsisContext() throws Exception {
- // instanciate with concrete config
- super( IsisConfig.class, IsisVcsConfig.class, IsisH2Config.class);
- }
-
- public IsisOptionParser parseOptions(String... args) throws ParserException, IOException {
- // récupération du parseur
- IsisOptionParser result = getParser();
- // lecture des arguments de la ligne de commandes
- result.doParse(args);
- return result;
- }
-
- public VCSHandler getVCSHanler() {
- return handler;
- }
-
- public Context getUiContext() {
- return uiContext;
- }
-
- public void initI18n() {
- I18n.init(getMainConfig().getLocale(),getMainConfig().getEncoding());
- }
-
- @Override
- public IsisConfig getMainConfig() {
- return (IsisConfig) super.getMainConfig();
- }
-
- @Override
- public IsisVcsConfig getVcsConfig() {
- return (IsisVcsConfig) super.getVcsConfig();
- }
-
- @Override
- public IsisH2Config getH2Config() {
- return (IsisH2Config) super.getH2Config();
- }
-
- public boolean isUseParser() {
- return parser != null;
- }
-
- public boolean isUseVCS() {
- return useVCS;
- }
-
- boolean needUIForVCS() {
- return firstLaunch || getVcsConfig() != null && getVcsConfig().needMigration();
- }
-
-
- public void setUseVCS(boolean useVcs) {
- this.useVCS = useVcs;
- }
-
- public void setUiContext(Context uiContext) {
- this.uiContext = uiContext;
- }
-
- void doActionsForStage(InitStage stage) throws Exception {
- if (isUseParser()) {
- for (OptionKey optionName : stage.optionKeys) {
- getParser().getLastResult().doActions(this, optionName);
- }
- }
- }
-
- /**
- * Validate VCS configuration, could ask user some data via the vcs
- * configuration ui (if ui enable).
- *
- * @throws Exception if any problem
- */
- void validateVCS() throws Exception {
-
- // validate vcs configuration
- IsisVcsConfig vcsConfig = getVcsConfig();
- vcsConfig.validateConfig(needUIForVCS(), useUI);
- // instanciation du vcs hanlder
- handler = VCSHandlerFactory.getHandler();
- if (vcsConfig.canConnect()) {
- // must test the vcs connection (TODO test with ssh)
- try {
- handler.testConnection();
- vcsConfig.setConnectionState(ConnectionState.ON_LINE);
- } catch (VCSException e) {
- vcsConfig.setConnectionState(ConnectionState.ERROR);
- log.warn(e.getMessage());
- if (isUseUI()) {
- JOptionPane.showOptionDialog(null, new JLabel(e.getMessage()), "ssh connexion error", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, null, null);
- }
- if (vcsConfig.isUseSshConnexion()) {
- // try with a anonymous connexion ?
- getVcsConfig().setUseSshConnexion(false);
-
- try {
- handler.reinitWorkingCopy();
- handler.testConnection();
- vcsConfig.setConnectionState(ConnectionState.ON_LINE);
- } catch (VCSException e1) {
- log.warn(e.getMessage());
- if (isUseUI()) {
- JOptionPane.showOptionDialog(null, new JLabel(e.getMessage()), "anonymous connexion error", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, null, null);
- }
- }
- }
- }
- }
- // mark as valid vcs configuration
- useVCS &= vcsConfig.canConnect();
- }
-
- void putDefaultUserNameAndMail() {
- IsisConfig config = getMainConfig();
- // this case can only appears if at first usage we force to noUI, otherwise
- // it could not appear
- String email = config.getUserMail();
- if (email == null || email.isEmpty()) {
- // if no email remplace with vcsLogin at vcsHost
- config.setUserMail(getVcsConfig().getUserName() + '@' + getVcsConfig().getHostName());
- } else {
- config.setUserMail(email);
- }
- String userName = config.getUserName();
- if (userName == null || userName.isEmpty()) {
- // if no userName remplace with vcsLogin
- config.setUserName(getVcsConfig().getUserName());
- } else {
- config.setUserName(userName);
- }
- }
-}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisFish.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisFish.java 2008-08-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/IsisFish.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -31,14 +31,13 @@
package fr.ifremer.isisfish;
-import static fr.ifremer.isisfish.IsisConfig.Module.ANALYSE_PLAN;
-import static fr.ifremer.isisfish.IsisConfig.Module.EXPORT;
-import static fr.ifremer.isisfish.IsisConfig.Module.FORMULE;
-import static fr.ifremer.isisfish.IsisConfig.Module.REGION;
-import static fr.ifremer.isisfish.IsisConfig.Module.RULE;
-import static fr.ifremer.isisfish.IsisConfig.Module.SCRIPT;
-import static fr.ifremer.isisfish.IsisConfig.Module.SIMULATION;
-import static fr.ifremer.isisfish.IsisConfig.Module.SIMULATOR;
+import fr.ifremer.isisfish.datastore.AnalysePlanStorage;
+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.simulator.SimulationManager;
import fr.ifremer.isisfish.swix.LayoutConverter;
import fr.ifremer.isisfish.types.Date;
@@ -50,24 +49,21 @@
import fr.ifremer.isisfish.util.RangeOfValuesConverter;
import fr.ifremer.isisfish.util.StringConverter;
import fr.ifremer.isisfish.util.TimeUnitConverter;
-import fr.ifremer.isisfish.versionning.IsisVCSHelper;
-import fr.ifremer.isisfish.versionning.IsisVcsConfig;
+import fr.ifremer.isisfish.vcs.VCS;
+import java.io.File;
import org.apache.commons.beanutils.ConvertUtils;
import org.apache.commons.logging.LogFactory;
import static org.codelutin.i18n.I18n._;
import org.codelutin.log.LutinLogFactory;
import org.codelutin.math.matrix.DoubleBigVector;
import org.codelutin.math.matrix.MatrixFactory;
-import org.codelutin.vcs.ConnectionState;
-import org.codelutin.vcs.VCSException;
-import org.codelutin.vcs.VCSHandlerFactory;
-import org.codelutin.vcs.VCSHelper;
+import java.util.Locale;
import org.swixat.SwiXAT;
import org.swixat.model.Context;
import org.swixml.ConverterLibrary;
-import javax.swing.JLabel;
-import javax.swing.JOptionPane;
+import org.codelutin.i18n.I18n;
+import org.codelutin.util.LocaleConverter;
import static javax.swing.JOptionPane.showOptionDialog;
@@ -82,6 +78,7 @@
/** 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;
@@ -93,186 +90,220 @@
log = LogFactory.getLog(IsisFish.class);
}
+ static public IsisConfig config = null;
+ static public int step = 0; // action step
+ 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;
+ }
+
+ public static boolean isQuit() {
+ return quit;
+ }
+
static public void main(String... args) {
- boolean quit = false;
- IsisContext context = null;
try {
- // initialisation du context
- context = IsisContext.get();
+ // initialisation de l'application
+ IsisFish.init(args);
- 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()));
- builder.append(" Java version: ").append(System.getProperty("java.runtime.version"));
- builder.append(" Isis-fish version: ").append(IsisConfig.VERSION_PROPERTY_KEY.getDefaultValue().toString());
- log.info(builder.toString());
- log.debug(_("isisfish.launch.debugMode"));
+ log.debug(_("isisfish.launch.init.done", config.getElapsedTimeAsString()));
- // parsing des options à partir des arguments passés
- context.parseOptions(args);
+ // action before check database
+ config.doAction(step++);
- // initialisation de l'application
- IsisFish.init();
+ checkReleaseLaunched();
- log.debug(_("isisfish.launch.init.done", context.getElapsedTimeAsString()));
+ checkDatabase();
- if (context.isQuit()) {
- return;
- }
+ // action before check vcs
+ config.doAction(step++);
- if (context.isUseVCS()) {
- // post load options with vcs connexion required
- context.doActionsForStage(IsisContext.InitStage.AFTER_INIT);
+ initVCS();
- // recuperation a partir du vcs des modules non presents
- // uniquement si une migration n'a pas eu lieu
- if (context.getVcsConfig().getMigrationType() == null) {
- checkout();
- }
- }
+ log.info(_("isisfish.launching", config.getElapsedTimeAsString()));
- log.info(_("isisfish.launching", context.getElapsedTimeAsString()));
-
// last actions before launching or quitting
- context.doActionsForStage(IsisContext.InitStage.AFTER_ALL);
+ config.doAction(step++);
- if (!context.isQuit()) {
- quit = launch(quit, context);
+ launchUI();
- }
- //TODO See with Benjamin if this is correct to quit if no ui lanched?
+ // action after ui launched
+ config.doAction(step++);
} catch (Exception e) {
e.printStackTrace();
- quit = true;
+ quit();
} finally {
- if (quit || (context != null && context.isQuit())) {
- // nothing more to do
- System.exit(0);
- }
+ startQuitDaemon();
}
}
/**
- * All main in other class must call this method
+ * Start daemon that monitor quit value, if value is true, quit isis
+ */
+ 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);
+ }
+ }
+ }
+ }, "Isis quit daemon");
+ quitDaemon.setDaemon(true);
+ quitDaemon.start();
+ }
+
+ /**
+ * All main in other class must call this method, parse arguement,
+ * load configuration file, init language and load converter.
*
* @throws Exception if any exception while build configuration
*/
- static public void init() throws Exception {
+ static public void init(String ... args) throws Exception {
+ config = new IsisConfig();
- // obtain isis shared instance context
- IsisContext context = IsisContext.get();
+ 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()));
+ builder.append(" Java version: ").append(System.getProperty("java.runtime.version"));
+ builder.append(" Isis-fish version: ").append(IsisConfig.getVersion());
+ log.info(builder.toString());
+ log.debug(_("isisfish.launch.debugMode"));
- // init context and configs
- context.init(null);
+ // parsing des options à partir des arguments passés
+ config.parse(args);
- // chargement de la configuration vcs
- IsisVcsConfig vcsConfig = context.getVcsConfig();
- VCSHandlerFactory.setConfig(vcsConfig);
+ I18n.init(config.getLocale(), config.getEncoding());
- StringBuilder sb = new StringBuilder();
- sb.append("connectionState : ").append(vcsConfig.getConnectionState());
- sb.append("\nhasPreviousConfig : ").append(vcsConfig.hasPreviousConfig());
- sb.append("\nisTypeChanged : ").append(vcsConfig.isTypeChanged());
- sb.append("\nneedMigration : ").append(vcsConfig.needMigration());
- if (vcsConfig.needMigration()) {
- sb.append("\nmigrationType ").append(vcsConfig.getMigrationType());
- }
- for (String s : sb.toString().split("\n")) {
- log.info(s);
- }
-
// post load hook (converter and matrixFactory)
initConvertersAndMatrixFactory();
+ }
- // post load options before save (with no vcs)
- context.doActionsForStage(IsisContext.InitStage.BEFORE_VALIDATE_VCS);
- notifyVCSError(context,vcsConfig);
-
- if (context.isQuit() || !context.isUseVCS()) {
- return;
- }
- try {
- // validate vcs config (should launch ui if required)
- context.validateVCS();
- } finally {
- context.putDefaultUserNameAndMail();
- // after vcs configuration validation, we can save the configuration
- context.save();
- }
- // post save options with vcs config required, but not vcs connexion
- context.doActionsForStage(IsisContext.InitStage.BEFORE_INIT_REPOSITORY);
- if (context.isQuit() || !context.isUseVCS()) {
- return;
- }
+// public static void initVCS() {
+// StringBuilder sb = new StringBuilder();
+// sb.append("connectionState : ").append(vcsConfig.getConnectionState());
+// sb.append("\nhasPreviousConfig : ").append(vcsConfig.hasPreviousConfig());
+// sb.append("\nisTypeChanged : ").append(vcsConfig.isTypeChanged());
+// sb.append("\nneedMigration : ").append(vcsConfig.needMigration());
+// if (vcsConfig.needMigration()) {
+// sb.append("\nmigrationType ").append(vcsConfig.getMigrationType());
+// }
+// for (String s : sb.toString().split("\n")) {
+// log.info(s);
+// }
+//
+// }
- try {
- // vcs config is now init (prepare repository or perform a migration)
- vcsConfig.initVCS(context.handler, context.isUseUI());
- } catch (VCSException e) {
- // eror with vcs, close close connexion
- log.error("error with vcs " + e.getMessage());
- vcsConfig.setConnectionState(ConnectionState.ERROR);
- context.setUseVCS(false);
+ /**
+ * 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
}
-
- notifyVCSError(context, vcsConfig);
+ // update last version launch
+ config.setOption(LAST_RELEASE_LAUNCH, config.getVersion());
}
- private static void notifyVCSError(IsisContext context, IsisVcsConfig vcsConfig) {
- if (vcsConfig.getConnectionState() == ConnectionState.ERROR) {
- // notify user there is a vcs pb
- StringBuilder sb2 = new StringBuilder();
- sb2.append(_("isisfish.error.vcs.connect"));
- if (context.isUseUI()) {
- showOptionDialog(null, new JLabel(sb2.toString()), "vcs error", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, null, null);
- } else {
- log.error(sb2.toString());
+ /**
+ * 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();
}
- context.setUseVCS(false);
}
}
- static public boolean launch(boolean quit, IsisContext context) {
+ /**
+ * Initialise le VCS et check s'il y a des mises a jour pour prevenir
+ * l'utilisateur
+ */
+ static public void initVCS() {
+ // init vcs
+ vcs = VCS.createVCS(config);
+ // check connection status
+ vcs.checkConnection();
+
+ // check release
+ vcs.checkRelease();
+
+ // check file status
+ vcs.checkFileStatus();
+ }
+
+ /**
+ * initialise et lance l'interface graphique si elle est demandee
+ */
+ static public void launchUI() {
// init simulater manager
SimulationManager.getInstance();
- if (context.isLaunchUI()) {
+ if (config.isLaunchUI()) {
// init IsisTray
IsisTray.getInstance();
// init context (will luanch remote server thread)
- Context uiContext = new org.swixat.model.GenericContext();
- // push in swixat context isisContext for facilities
- uiContext.setData(IsisContext.ISIS_CONTEXT, context);
- // keep a reference of uiConext in application context
- // to make possible bridge with others codes (jaxx,...)
- context.setUiContext(uiContext);
+ uiContext = new org.swixat.model.GenericContext();
+ // push in swixat context isis config for facilities
+ uiContext.setData(config.getClass().getSimpleName(), config);
// lauch first UI (welcome.xml)
SwiXAT.launch(CONTEXT_FILE, uiContext);
- quit = false;
}
- return quit;
}
- static public void checkout() throws VCSException {
- checkout(true);
- }
+// static public void checkout() throws VCSException {
+// checkout(true);
+// }
+//
+// static public void checkout(boolean createRegion) throws VCSException {
+// if (config.isUseVCS()) {
+// IsisVCSHelper.doCheckoutModule(context.handler, SCRIPT, EXPORT, SIMULATOR, FORMULE, RULE, ANALYSE_PLAN);
+// VCSHelper.doCheckoutDir(context.handler, SIMULATION.getDirectory(), REGION.getDirectory());
+// IsisVCSHelper.doCheckoutRegion(context.handler, "DemoRegion", createRegion);
+// }
+// }
- static public void checkout(boolean createRegion) throws VCSException {
- IsisContext context = IsisContext.get();
- if (!context.isUseVCS()) {
- return;
- }
- IsisVCSHelper.doCheckoutModule(context.handler, SCRIPT, EXPORT, SIMULATOR, FORMULE, RULE, ANALYSE_PLAN);
- VCSHelper.doCheckoutDir(context.handler, SIMULATION.getDirectory(), REGION.getDirectory());
- IsisVCSHelper.doCheckoutRegion(context.handler, "DemoRegion", createRegion);
- }
-
public static void initConvertersAndMatrixFactory() {
// ajout du support de XMLGridLayout dans SwiXml
ConverterLibrary.getInstance().register(java.awt.LayoutManager.class, new LayoutConverter());
+ ConvertUtils.register(new LocaleConverter(), Locale.class);
+
// init converters
ConvertUtils.register(new DateConverter(), Date.class);
ConvertUtils.register(new MonthConverter(), Month.class);
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/AnalysePlanStorage.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -30,14 +30,13 @@
package fr.ifremer.isisfish.datastore;
-import static fr.ifremer.isisfish.IsisConfig.Module.ANALYSE_PLAN;
import fr.ifremer.isisfish.IsisFishException;
-import fr.ifremer.isisfish.IsisConfig;
+import fr.ifremer.isisfish.IsisFish;
import fr.ifremer.isisfish.simulator.AnalysePlan;
import fr.ifremer.isisfish.util.Doc;
import fr.ifremer.isisfish.util.DocHelper;
import fr.ifremer.isisfish.util.Docable;
-import org.codelutin.vcs.VCSException;
+import fr.ifremer.isisfish.vcs.VCSException;
import static org.codelutin.i18n.I18n._;
@@ -63,6 +62,8 @@
public class AnalysePlanStorage extends JavaSourceStorage implements Docable { // AnalysePlanStorage
+ public final static String ANALYSE_PLAN_PATH = "analyseplans";
+
private final static String PARAM_PREFIX = "param_";
/** to use log facility, just put in your code: log.info(\"...\"); */
@@ -84,13 +85,19 @@
super(rootSrc, directory, name);
}
+ static public File getAnalysePlanDirectory() {
+ File result = IsisFish.config.getDatabaseDirectory();
+ result = new File(result, ANALYSE_PLAN_PATH);
+ return result;
+ }
+
/**
* Retourne le nom de toutes les plans existantes
*
* @return TODO
*/
static public List<String> getAnalysePlanNames() {
- File dir = IsisConfig.getAnalysePlanDirectory();
+ File dir = getAnalysePlanDirectory();
return AnalysePlanStorage.getStorageNames(dir);
}
@@ -103,8 +110,8 @@
static public AnalysePlanStorage getAnalysePlan(String name) {
AnalysePlanStorage result = plansCache.get(name);
if (result == null) {
- result = new AnalysePlanStorage(IsisConfig.getDatabaseDirectory(),
- IsisConfig.getAnalysePlanDirectory(), name);
+ result = new AnalysePlanStorage(IsisFish.config.getDatabaseDirectory(),
+ getAnalysePlanDirectory(), name);
plansCache.put(name, result);
}
return result;
@@ -246,7 +253,7 @@
}
static public void checkout() throws VCSException {
- checkout(IsisConfig.getDatabaseDirectory(), ANALYSE_PLAN.value());
+ checkout(IsisFish.config.getDatabaseDirectory(), ANALYSE_PLAN_PATH);
}
/**
@@ -270,7 +277,7 @@
* vide.
*/
static public List<String> getRemoteAnalysePlanNames() {
- File dir = IsisConfig.getAnalysePlanDirectory();
+ File dir = getAnalysePlanDirectory();
return getRemoteStorageNames(dir);
}
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/CodeSourceStorage.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -31,7 +31,7 @@
package fr.ifremer.isisfish.datastore;
import fr.ifremer.isisfish.IsisFishRuntimeException;
-import org.codelutin.vcs.VCSException;
+import fr.ifremer.isisfish.vcs.VCSException;
import org.codelutin.util.FileUtil;
@@ -91,6 +91,10 @@
// Il n'y a rien a faire pour les code sources
}
+ /**
+ * Check if script exists
+ * @return
+ */
public boolean exists() {
return getFile().exists();
}
@@ -152,7 +156,7 @@
public String diff() throws VCSException, IOException {
- return getVCSHanler().getDiff(getFile());
+ return getVCS().getDiff(getFile());
}
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/DataStorage.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -47,7 +47,7 @@
import org.codelutin.util.ZipUtil;
import fr.ifremer.isisfish.IsisFishRuntimeException;
-import fr.ifremer.isisfish.IsisConfig;
+import fr.ifremer.isisfish.IsisFish;
/**
* Class abstraite dont herite tous les storages qui on besoin d'un TopiaContext
@@ -60,6 +60,8 @@
public abstract class DataStorage extends VersionStorage {
+ static final public String DATA_BACKUP_FILENAME = "data-backup.sql.gz";
+
/** Logger for this class */
private static final Log log = LogFactory.getLog(DataStorage.class);
@@ -81,7 +83,7 @@
* nom du storage (nom du dernier répertoire)
*/
protected DataStorage(File directory, String name) {
- super(IsisConfig.getDatabaseDirectory(), directory);
+ super(IsisFish.config.getDatabaseDirectory(), directory);
this.name = name;
if (!directory.exists()) {
directory.mkdirs();
@@ -102,8 +104,7 @@
*/
protected File getDataBackupFile() {
File result;
- result = IsisConfig.getDataBackupFile(getDirectory());
- //result = new File(getDirectory(), IsisConfig.DATA_BACKUP_FILE);
+ result = new File(getDirectory(), DATA_BACKUP_FILENAME);
return result;
}
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/ExportStorage.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -31,15 +31,14 @@
package fr.ifremer.isisfish.datastore;
-import static fr.ifremer.isisfish.IsisConfig.Module.EXPORT;
import fr.ifremer.isisfish.IsisFishException;
import fr.ifremer.isisfish.IsisFishRuntimeException;
-import fr.ifremer.isisfish.IsisConfig;
+import fr.ifremer.isisfish.IsisFish;
import fr.ifremer.isisfish.export.Export;
import fr.ifremer.isisfish.util.Doc;
import fr.ifremer.isisfish.util.DocHelper;
import fr.ifremer.isisfish.util.Docable;
-import org.codelutin.vcs.VCSException;
+import fr.ifremer.isisfish.vcs.VCSException;
import static org.codelutin.i18n.I18n._;
@@ -59,6 +58,8 @@
*/
public class ExportStorage extends JavaSourceStorage implements Docable {
+ static final public String EXPORT_PATH = "exports";
+
/** to use log facility, just put in your code: log.info(\"...\"); */
static private Log log = LogFactory.getLog(ExportStorage.class);
@@ -77,6 +78,12 @@
super(rootSrc, directory, name);
}
+ static public File getExportDirectory() {
+ File result = IsisFish.config.getDatabaseDirectory();
+ result = new File(result, EXPORT_PATH);
+ return result;
+ }
+
/**
* Retourne une nouvelle instance de la regle. Compile le fichier si besoin
*
@@ -97,8 +104,8 @@
static public ExportStorage getExport(String name) {
ExportStorage result = scriptsCache.get(name);
if (result == null) {
- result = new ExportStorage(IsisConfig.getDatabaseDirectory(),
- IsisConfig.getExportDirectory(), name);
+ result = new ExportStorage(IsisFish.config.getDatabaseDirectory(),
+ getExportDirectory(), name);
scriptsCache.put(name, result);
}
return result;
@@ -110,12 +117,12 @@
* @return la liste des noms de toutes les régions disponible en local
*/
static public List<String> getExportNames() {
- File dir = IsisConfig.getExportDirectory();
+ File dir = getExportDirectory();
return getStorageNames(dir);
}
static public void checkout() throws VCSException {
- checkout(IsisConfig.getDatabaseDirectory(), EXPORT.value());
+ checkout(IsisFish.config.getDatabaseDirectory(), EXPORT_PATH);
}
/**
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/FormuleStorage.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -47,12 +47,12 @@
import org.codelutin.topia.TopiaException;
import org.codelutin.util.FileUtil;
-import fr.ifremer.isisfish.IsisConfig;
+import fr.ifremer.isisfish.IsisFish;
import fr.ifremer.isisfish.IsisFishDAOHelper;
import fr.ifremer.isisfish.entities.Equation;
import fr.ifremer.isisfish.entities.EquationDAO;
import fr.ifremer.isisfish.entities.Formule;
-import org.codelutin.vcs.VCSException;
+import fr.ifremer.isisfish.vcs.VCSException;
/**
@@ -62,6 +62,8 @@
public class FormuleStorage extends CodeSourceStorage implements Formule {
+ public static final String FORMULE_PATH = "formules";
+
/**
* la categorie de la formule
*/
@@ -79,6 +81,12 @@
this.category = category;
}
+ static public File getFormuleDirectory() {
+ File result = IsisFish.config.getDatabaseDirectory();
+ result = new File(result, FORMULE_PATH);
+ return result;
+ }
+
/**
* @return Returns the category.
@@ -96,11 +104,13 @@
static public List<FormuleStorage> getFormules(String category) {
List<FormuleStorage> result = new ArrayList<FormuleStorage>();
try {
- File dir = new File(IsisConfig.getFormuleDirectory(), category);
- dir.mkdirs();
- for (File f : dir.listFiles(getVCSHanler().getVersionnableFilenameFilter())) {
- String name = FileUtil.basename(f);
- result.add(getFormule(category, name));
+ File dir = new File(getFormuleDirectory(), category);
+ dir.mkdirs();
+ for (File f : dir.listFiles()) {
+ if (getVCS().isVersionnableAbleFile(f)) {
+ String name = FileUtil.basename(f);
+ result.add(getFormule(category, name));
+ }
}
} catch (Exception eee) {
if (log.isErrorEnabled()) {
@@ -119,11 +129,13 @@
static public List<String> getFormuleNames(String category) {
List<String> result = new ArrayList<String>();
try {
- File dir = new File(IsisConfig.getFormuleDirectory(), category);
+ File dir = new File(getFormuleDirectory(), category);
dir.mkdirs();
- for (File f : dir.listFiles(getVCSHanler().getVersionnableFilenameFilter())) {
- String name = FileUtil.basename(f);
- result.add(name);
+ for (File f : dir.listFiles()) {
+ if (getVCS().isVersionnableAbleFile(f)) {
+ String name = FileUtil.basename(f);
+ result.add(name);
+ }
}
} catch (Exception eee) {
if (log.isErrorEnabled()) {
@@ -197,10 +209,9 @@
*/
static public List<String> getCategories() {
List<String> result = new ArrayList<String>();
- File dir = IsisConfig.getFormuleDirectory();
- FilenameFilter filter = getVCSHanler().getVersionnableFilenameFilter();
+ File dir = getFormuleDirectory();
for (File f : dir.listFiles()) {
- if (f.isDirectory() && filter.accept(f.getParentFile(), f.getName())) {
+ if (f.isDirectory() && getVCS().isVersionnableAbleFile(f)) {
result.add(f.getName());
}
}
@@ -222,8 +233,8 @@
if (!"".equals(extension)) {
name = name.substring(0, name.length() - (extension.length() + 1));
}
- result = new FormuleStorage(IsisConfig.getDatabaseDirectory(),
- IsisConfig.getFormuleDirectory(), category, name, extension);
+ result = new FormuleStorage(IsisFish.config.getDatabaseDirectory(),
+ getFormuleDirectory(), category, name, extension);
formulesCache.put(key, result);
}
return result;
@@ -242,15 +253,15 @@
String key = category + File.separator + name + extension;
FormuleStorage result = formulesCache.get(key);
if (result == null) {
- result = new FormuleStorage(IsisConfig.getDatabaseDirectory(),
- IsisConfig.getFormuleDirectory(), category, name, extension);
+ result = new FormuleStorage(IsisFish.config.getDatabaseDirectory(),
+ getFormuleDirectory(), category, name, extension);
formulesCache.put(key, result);
}
return result;
}
static public void checkout() throws VCSException {
- checkout(IsisConfig.getDatabaseDirectory(), IsisConfig.Module.FORMULE.value());
+ checkout(IsisFish.config.getDatabaseDirectory(), FORMULE_PATH);
}
/**
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/IsisH2Config.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -19,7 +19,6 @@
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.IsisFishDAOHelper;
import org.codelutin.topia.migration.TopiaMigrationServiceImpl;
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/JavaSourceStorage.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -31,8 +31,7 @@
package fr.ifremer.isisfish.datastore;
import fr.ifremer.isisfish.IsisFishException;
-import fr.ifremer.isisfish.IsisContext;
-import fr.ifremer.isisfish.IsisConfig;
+import fr.ifremer.isisfish.IsisFish;
import fr.ifremer.isisfish.util.CompileHelper;
import org.apache.commons.lang.ClassUtils;
import static org.codelutin.i18n.I18n._;
@@ -95,7 +94,7 @@
* @return 0 si la compilation a reussi une autre valeur sinon
*/
public int compile(boolean force, PrintWriter out) {
- return CompileHelper.compile(this, IsisContext.get().getMainConfig().getCompileDirectory(), force, out);
+ return CompileHelper.compile(this, IsisFish.config.getCompileDirectory(), force, out);
}
/**
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/RegionStorage.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -30,12 +30,12 @@
package fr.ifremer.isisfish.datastore;
-import fr.ifremer.isisfish.IsisConfig;
+import fr.ifremer.isisfish.IsisFish;
import fr.ifremer.isisfish.IsisFishDAOHelper;
import fr.ifremer.isisfish.entities.FisheryRegion;
import fr.ifremer.isisfish.entities.FisheryRegionDAO;
import fr.ifremer.isisfish.entities.Result;
-import org.codelutin.vcs.VCSException;
+import fr.ifremer.isisfish.vcs.VCSException;
import org.apache.commons.collections.map.ReferenceMap;
import org.apache.commons.lang.time.DateFormatUtils;
import org.apache.commons.logging.Log;
@@ -62,6 +62,16 @@
*/
public class RegionStorage extends DataStorage { // RegionStorage
+ static final public String REGION_PATH = "regions";
+ static final public String MAP_DIRECTORY = "maps";
+
+ /** to use log facility, just put in your code: log.info(\"...\"); */
+ static private Log log = LogFactory.getLog(RegionStorage.class);
+
+ @SuppressWarnings("unchecked")
+ static protected Map<String, RegionStorage> regions = (Map<String, RegionStorage>) new ReferenceMap();
+
+
/** File to use to store next commit region comment */
protected File commentForNextCommitFile = null;
@@ -69,7 +79,19 @@
super(directory, name);
commentForNextCommitFile = new File(getDirectory(), "commentForNextCommit.txt");
}
+
+ static public File getRegionDirectory() {
+ File result = IsisFish.config.getDatabaseDirectory();
+ result = new File(result, REGION_PATH);
+ return result;
+ }
+ static public File getRegionDirectory(String name) {
+ File result = getRegionDirectory();
+ result = new File(result, name);
+ return result;
+ }
+
/**
* @return Returns the commentForNextCommit.
* @throws IOException if IO problem while reading file
@@ -163,9 +185,7 @@
}
public File getMapRepository() {
- File result;
- result = IsisConfig.getRegionMapDirectory(getDirectory());
- //result = new File(getDirectory(), IsisConfig.REGION_MAP);
+ File result = new File(getDirectory(), MAP_DIRECTORY);
return result;
}
@@ -178,7 +198,7 @@
* @return le sotrage après checkout
*/
static public RegionStorage checkout(String name) throws VCSException, TopiaException {
- checkout(IsisConfig.getDatabaseDirectory(), IsisConfig.Module.REGION.value() + "/" + name);
+ checkout(IsisFish.config.getDatabaseDirectory(), REGION_PATH + "/" + name);
RegionStorage region = getRegion(name);
if (region != null) {
File file = region.getDataBackupFile();
@@ -191,7 +211,7 @@
}
return region;
}
-
+
/**
* Recupere le TopiaContext d'une region
*
@@ -203,7 +223,7 @@
RegionStorage result = regions.get(name);
if (result == null) {
// recherche du repertoire de la region en fonction de la config
- File directory = IsisConfig.getRegionDirectory(name);
+ File directory = getRegionDirectory(name);
log.info("Try to open region " + name + "(" + directory + ")");
if (directory.exists()) {
result = new RegionStorage(directory, name);
@@ -240,7 +260,7 @@
throw new StorageException(
"Can't create region this region name exists: " + name);
}
- File directory = IsisConfig.getRegionDirectory(name);
+ File directory = getRegionDirectory(name);
RegionStorage result = new RegionStorage(directory, name);
try {
@@ -274,7 +294,7 @@
* @return la liste des noms de toutes les régions disponible en local
*/
static public List<String> getRegionNames() {
- File dir = IsisConfig.getRegionDirectory();
+ File dir = getRegionDirectory();
List<String> result;
result = getStorageNames(dir);
return result;
@@ -315,7 +335,7 @@
* vide.
*/
static public List<String> getRemoteRegionNames() {
- File dir = IsisConfig.getRegionDirectory();
+ File dir = getRegionDirectory();
List<String> result;
result = getRemoteStorageNames(dir);
return result;
@@ -384,7 +404,7 @@
renameFrom = "^.*?/(.*)$";
renameTo = newName + "/$1";
}
- String lastEntry = ZipUtil.uncompressAndRename(file, IsisConfig.getRegionDirectory(), renameFrom, renameTo);
+ String lastEntry = ZipUtil.uncompressAndRename(file, getRegionDirectory(), renameFrom, renameTo);
String name = lastEntry.substring(0, lastEntry.indexOf("/"));
RegionStorage result = RegionStorage.getRegion(name);
if (result != null) {
@@ -412,11 +432,5 @@
}
}
- /** to use log facility, just put in your code: log.info(\"...\"); */
- static private Log log = LogFactory.getLog(RegionStorage.class);
-
- @SuppressWarnings("unchecked")
- static protected Map<String, RegionStorage> regions = (Map<String, RegionStorage>) new ReferenceMap();
-
} // RegionStorage
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/RuleStorage.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -30,14 +30,13 @@
package fr.ifremer.isisfish.datastore;
-import static fr.ifremer.isisfish.IsisConfig.Module.RULE;
import fr.ifremer.isisfish.IsisFishException;
-import fr.ifremer.isisfish.IsisConfig;
+import fr.ifremer.isisfish.IsisFish;
import fr.ifremer.isisfish.util.Doc;
import fr.ifremer.isisfish.util.DocHelper;
import fr.ifremer.isisfish.util.Docable;
import fr.ifremer.isisfish.rule.Rule;
-import org.codelutin.vcs.VCSException;
+import fr.ifremer.isisfish.vcs.VCSException;
import static org.codelutin.i18n.I18n._;
@@ -65,6 +64,8 @@
*/
public class RuleStorage extends JavaSourceStorage implements Docable { // RulesStorage
+ public static final String RULE_PATH = "rules";
+
private final static String PARAM_PREFIX = "param_";
/** to use log facility, just put in your code: log.info(\"...\"); */
@@ -85,13 +86,19 @@
super(rootSrc, directory, name);
}
+ static public File getRuleDirectory() {
+ File result = IsisFish.config.getDatabaseDirectory();
+ result = new File(result, RULE_PATH);
+ return result;
+ }
+
/**
* Retourne le nom de toutes les regles existantes pour cette region
*
* @return all rule names found in local user database
*/
static public List<String> getRuleNames() {
- File dir = IsisConfig.getRuleDirectory();
+ File dir = getRuleDirectory();
return RuleStorage.getStorageNames(dir);
}
@@ -104,8 +111,8 @@
static public RuleStorage getRule(String name) {
RuleStorage result = rulesCache.get(name);
if (result == null) {
- result = new RuleStorage(IsisConfig.getDatabaseDirectory(),
- IsisConfig.getRuleDirectory(), name);
+ result = new RuleStorage(IsisFish.config.getDatabaseDirectory(),
+ getRuleDirectory(), name);
rulesCache.put(name, result);
}
return result;
@@ -248,7 +255,7 @@
}
static public void checkout() throws VCSException {
- checkout(IsisConfig.getDatabaseDirectory(), RULE.value());
+ checkout(IsisFish.config.getDatabaseDirectory(), RULE_PATH);
}
/**
@@ -272,7 +279,7 @@
* vide.
*/
static public List<String> getRemoteRuleNames() {
- File dir = IsisConfig.getRuleDirectory();
+ File dir = getRuleDirectory();
return getRemoteStorageNames(dir);
}
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/ScriptStorage.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -31,14 +31,13 @@
package fr.ifremer.isisfish.datastore;
-import static fr.ifremer.isisfish.IsisConfig.Module.SCRIPT;
import fr.ifremer.isisfish.IsisFishException;
import fr.ifremer.isisfish.IsisFishRuntimeException;
-import fr.ifremer.isisfish.IsisConfig;
+import fr.ifremer.isisfish.IsisFish;
import fr.ifremer.isisfish.util.DocHelper;
import fr.ifremer.isisfish.util.Doc;
import fr.ifremer.isisfish.util.Docable;
-import org.codelutin.vcs.VCSException;
+import fr.ifremer.isisfish.vcs.VCSException;
import static org.codelutin.i18n.I18n._;
@@ -53,13 +52,12 @@
/**
*
* Gestion des fichers CVS de type scripts (appratenant au module scripts).
- *
- * @author dessard
- *
*/
public class ScriptStorage extends JavaSourceStorage implements Docable {
+ static final public String SCRIPT_PATH = "scripts";
+
/** to use log facility, just put in your code: log.info(\"...\"); */
static private Log log = LogFactory.getLog(ScriptStorage.class);
@@ -79,6 +77,12 @@
super(rootSrc, directory, name);
}
+ static public File getScriptDirectory() {
+ File result = IsisFish.config.getDatabaseDirectory();
+ result = new File(result, SCRIPT_PATH);
+ return result;
+ }
+
/**
* Retourne une nouvelle instance de la regle. Compile le fichier si besoin
*
@@ -98,15 +102,15 @@
static public ScriptStorage getScript(String name) {
ScriptStorage result = scriptsCache .get(name);
if (result == null) {
- result = new ScriptStorage(IsisConfig.getDatabaseDirectory(),
- IsisConfig.getScriptDirectory(), name);
+ result = new ScriptStorage(IsisFish.config.getDatabaseDirectory(),
+ getScriptDirectory(), name);
scriptsCache.put(name, result);
}
return result;
}
static public void checkout() throws VCSException {
- checkout(IsisConfig.getDatabaseDirectory(), SCRIPT.value());
+ checkout(IsisFish.config.getDatabaseDirectory(), SCRIPT_PATH);
}
/**
@@ -115,7 +119,7 @@
* @return la liste des noms de toutes les régions disponible en local
*/
static public List<String> getScriptNames() {
- File dir = IsisConfig.getScriptDirectory();
+ File dir = getScriptDirectory();
return getStorageNames(dir);
}
@@ -140,7 +144,7 @@
* vide.
*/
static public List<String> getRemoteScriptNames() {
- File dir = IsisConfig.getScriptDirectory();
+ File dir = getScriptDirectory();
return getRemoteStorageNames(dir);
}
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/SimulationStorage.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -31,7 +31,6 @@
package fr.ifremer.isisfish.datastore;
-import static fr.ifremer.isisfish.IsisConfig.Module.SIMULATION;
import static org.codelutin.i18n.I18n._;
import java.io.File;
@@ -51,14 +50,14 @@
import org.codelutin.util.FileUtil;
import org.codelutin.util.ZipUtil;
-import fr.ifremer.isisfish.IsisConfig;
+import fr.ifremer.isisfish.IsisFish;
import fr.ifremer.isisfish.IsisFishDAOHelper;
import fr.ifremer.isisfish.IsisFishRuntimeException;
import fr.ifremer.isisfish.entities.FisheryRegion;
import fr.ifremer.isisfish.entities.FisheryRegionDAO;
import fr.ifremer.isisfish.logging.SimulationLoggerUtil;
import fr.ifremer.isisfish.simulator.SimulationParameter;
-import org.codelutin.vcs.VCSException;
+import fr.ifremer.isisfish.vcs.VCSException;
/**
* Class permettant la gestion de la persistance d'une simulation
@@ -67,6 +66,14 @@
*
*/
public class SimulationStorage extends DataStorage { // SimulationStorage
+
+ static final public String SIMULATION_PATH = "simulations";
+ static final public String INFORMATION_FILENAME = "information";
+ static final public String PARAMETERS_FILENAME = "parameters.properties";
+ static final public String RESULT_XML_FILENAME = "isis-mexico-output.xml";
+ static final public String RESULT_EXPORT_DIRECTORY = "resultExports";
+
+
/** to use log facility, just put in your code: log.info(\"...\"); */
static private Log log = LogFactory.getLog(SimulationStorage.class);
@@ -94,17 +101,58 @@
setParameter(parameter);
}
- protected File getSimulationParameterFile() {
- return IsisConfig.getSimulationParametersFile(getDirectory());
- //return new File(getDirectory(), IsisConfig.SIMULATION_PARAMETERS);
+ static public File getSimulationDirectory() {
+ File result = IsisFish.config.getDatabaseDirectory();
+ result = new File(result, SIMULATION_PATH);
+ if (!result.exists()) {
+ result.mkdirs();
+ }
+ return result;
}
+ static public File getSimulationDirectory(String name) {
+ File result = getSimulationDirectory();
+ result = new File(result, name);
+ if (!result.exists()) {
+ result.mkdirs();
+ }
+ return result;
+ }
+
+ static public File getResultExportDirectory(File root) {
+ File result = new File(root, RESULT_EXPORT_DIRECTORY);
+ if (!result.exists()) {
+ result.mkdirs();
+ }
+ return result;
+ }
+
+ static public File getSimulationParametersFile(File root) {
+ File result = new File(root, PARAMETERS_FILENAME);
+ return result;
+ }
+
+ static public File getSimulationInformationFile(File root) {
+ File result = new File(root, INFORMATION_FILENAME);
+ return result;
+ }
+
+ static public File getSimulationResultXmlFile(File root) {
+ File result = new File(root, RESULT_XML_FILENAME);
+ return result;
+ }
+
+ protected File getSimulationParametersFile() {
+ File result = getSimulationParametersFile(getDirectory());
+ return result;
+ }
+
public void setParameter(SimulationParameter parameter) {
this.parameter = parameter;
if (parameter != null) {
Properties prop = parameter.toProperties();
log.info("DEBUG: store param: " + prop);
- File file = getSimulationParameterFile();
+ File file = getSimulationParametersFile();
try {
FileOutputStream out = new FileOutputStream(file);
prop.store(out, "Parameters");
@@ -123,7 +171,7 @@
public SimulationParameter getParameter() {
if(parameter == null){
Properties prop = new Properties();
- File file = getSimulationParameterFile();
+ File file = getSimulationParametersFile();
try {
FileInputStream in = new FileInputStream(file);
prop.load(in);
@@ -152,7 +200,7 @@
}
Properties prop = new Properties();
- File file = getSimulationParameterFile();
+ File file = getSimulationParametersFile();
try {
FileInputStream in = new FileInputStream(file);
prop.load(in);
@@ -166,8 +214,8 @@
}
protected File getInformationFile() {
- return IsisConfig.getSimulationInformationFile(getDirectory());
- //return new File(getDirectory(), IsisConfig.SIMULATION_INFORMATION_FILENAME);
+ File result = new File(getDirectory(), INFORMATION_FILENAME);
+ return result;
}
/**
@@ -220,7 +268,7 @@
SimulationStorage result = simulations.get(name);
if (result == null) {
// recherche du repertoire de la simulation en fonction de la config
- File directory = IsisConfig.getSimulationDirectory(name);
+ File directory = getSimulationDirectory(name);
log.info("Try to open simulation " + name + "(" + directory + ")");
if (directory.exists()) {
result = new SimulationStorage(directory, name, null);
@@ -246,7 +294,7 @@
if (localyExists(name)) {
throw new IllegalArgumentException("Can't create simulation this simulation name exists: " + name);
}
- File directory = IsisConfig.getSimulationDirectory(name);
+ File directory = getSimulationDirectory(name);
SimulationStorage result = new SimulationStorage(directory, name, parameter);
// 20060819: poussin
@@ -268,7 +316,7 @@
* @return la liste des noms de toutes les régions disponible en local
*/
static public List<String> getSimulationNames() {
- File dir = IsisConfig.getSimulationDirectory();
+ File dir = getSimulationDirectory();
return getStorageNames(dir);
}
@@ -291,7 +339,7 @@
* est vide.
*/
static public List<String> getRemoteSimulationNames() {
- File dir = IsisConfig.getSimulationDirectory();
+ File dir = getSimulationDirectory();
return getRemoteStorageNames(dir);
}
@@ -345,7 +393,7 @@
* @throws TopiaException si problème lors de l'opération sur la base embarquée
*/
static public void checkout(String name) throws VCSException, TopiaException {
- checkout(IsisConfig.getDatabaseDirectory(), SIMULATION.value() + "/" + name);
+ checkout(IsisFish.config.getDatabaseDirectory(), SIMULATION_PATH + "/" + name);
SimulationStorage sim = getSimulation(name);
File file = sim.getDataBackupFile();
TopiaContext tx = sim.getStorage().beginTransaction();
@@ -392,7 +440,7 @@
renameFrom = "^.*?/(.*)$";
renameTo = newName + "/$1";
}
- String lastEntry = ZipUtil.uncompressAndRename(file, IsisConfig.getSimulationDirectory(), renameFrom, renameTo);
+ String lastEntry = ZipUtil.uncompressAndRename(file, getSimulationDirectory(), renameFrom, renameTo);
String name = lastEntry.substring(0, lastEntry.indexOf("/"));
SimulationStorage result = SimulationStorage.getSimulation(name);
if (result != null) {
@@ -425,8 +473,8 @@
List<File> forZip = new ArrayList<File>(2);
File file1;
forZip.add(file1 = new File(tmpDir, oldRegionName));
- forZip.add(file1 = IsisConfig.getDataBackupFile(file1));
- //forZip.add(file1 = new File(file1, IsisConfig.DATA_BACKUP_FILE));
+ //forZip.add(file1 = getDataBackupFile(file1));
+ forZip.add(file1 = new File(file1, DATA_BACKUP_FILENAME));
if (!file1.exists()) {
// we must prepare storage (no file found)
prepare();
@@ -500,7 +548,7 @@
/** @return the simulation log file */
public String getSimulationLogFile() {
- File root = IsisConfig.getSimulationDirectory(name);
+ File root = getSimulationDirectory(name);
//TODO Should be IsisCOnfig.DEFAULT_SIMULATION_LOGFILE ?
return root + File.separator + "simulation.log";
}
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/SimulatorStorage.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -37,10 +37,10 @@
import org.apache.commons.collections.map.ReferenceMap;
-import fr.ifremer.isisfish.IsisConfig;
+import fr.ifremer.isisfish.IsisFish;
import fr.ifremer.isisfish.IsisFishException;
import fr.ifremer.isisfish.simulator.Simulator;
-import org.codelutin.vcs.VCSException;
+import fr.ifremer.isisfish.vcs.VCSException;
/**
*
@@ -51,6 +51,8 @@
*/
public class SimulatorStorage extends JavaSourceStorage {
+ static final public String SIMULATOR_PATH = "simulators";
+
/**
*
* Constructeur
@@ -61,6 +63,13 @@
super(rootSrc, directory, name);
}
+ static public File getSimulatorDirectory() {
+ File result = IsisFish.config.getDatabaseDirectory();
+ result = new File(result, SIMULATOR_PATH);
+ return result;
+ }
+
+
/**
* Retourne une nouvelle instance de la regle. Compile le fichier si besoin
*
@@ -81,15 +90,15 @@
static public SimulatorStorage getSimulator(String name) {
SimulatorStorage result = simulatorsCache .get(name);
if (result == null) {
- result = new SimulatorStorage(IsisConfig.getDatabaseDirectory(),
- IsisConfig.getSimulatorDirectory(), name);
+ result = new SimulatorStorage(IsisFish.config.getDatabaseDirectory(),
+ getSimulatorDirectory(), name);
simulatorsCache.put(name, result);
}
return result;
}
static public void checkout() throws VCSException {
- checkout(IsisConfig.getDatabaseDirectory(), IsisConfig.Module.SIMULATOR.value());
+ checkout(IsisFish.config.getDatabaseDirectory(), SIMULATOR_PATH);
}
/**
@@ -98,7 +107,7 @@
* @return la liste des noms de toutes les régions disponible en local
*/
static public List<String> getSimulatorNames() {
- File dir = IsisConfig.getSimulatorDirectory();
+ File dir = getSimulatorDirectory();
List<String> result = getStorageNames(dir);
return result;
}
@@ -124,7 +133,7 @@
* vide.
*/
static public List<String> getRemoteSimulatorNames() {
- File dir = IsisConfig.getSimulatorDirectory();
+ File dir = getSimulatorDirectory();
List<String> result = getRemoteStorageNames(dir);
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/datastore/VersionStorage.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -31,9 +31,9 @@
package fr.ifremer.isisfish.datastore;
-import org.codelutin.vcs.VCSException;
-import org.codelutin.vcs.VCSHandler;
-import fr.ifremer.isisfish.IsisContext;
+import fr.ifremer.isisfish.IsisFish;
+import fr.ifremer.isisfish.vcs.VCSException;
+import fr.ifremer.isisfish.vcs.VCS;
import static org.codelutin.i18n.I18n._;
import org.codelutin.util.FileUtil;
@@ -56,8 +56,8 @@
/** Logger for this class */
private static final Log log = LogFactory.getLog(VersionStorage.class);
- protected static VCSHandler getVCSHanler() {
- return IsisContext.get().getVCSHanler();
+ static protected VCS getVCS() {
+ return IsisFish.vcs;
}
protected File root = null;
@@ -104,8 +104,8 @@
*
* @return vrai si deja dans le VCS
*/
- public boolean isOnRemote() {
- return getVCSHanler().isOnRemote(getFile());
+ public boolean isOnRemote() throws VCSException {
+ return getVCS().isOnRemote(getFile());
}
/**
@@ -117,8 +117,7 @@
* @return <code>true</code> si le fichier est versionné
*/
protected boolean isVersionnableAbleFile(File file) {
- return !getVCSHanler().getConfLocalDirname().equalsIgnoreCase(
- file.getName());
+ return !getVCS().isVersionnableAbleFile(file);
}
/**
@@ -179,10 +178,10 @@
prepare();
List<File> files = getFiles(true);
// we can sure remove module directory and root directory
- files.remove(getVCSHanler().getLocalDatabasePath());
+ files.remove(IsisFish.config.getDatabaseDirectory());
log.debug("files to add: " + files);
- getVCSHanler().add(files, msg);
+ getVCS().add(files, msg);
}
/**
@@ -196,15 +195,17 @@
if (cvsDelete) {
List<File> files = getFiles(true);
try {
- getVCSHanler().delete(files, _("isisfish.versionStorage.removed"));
+ getVCS().delete(files, _("isisfish.versionStorage.removed"));
} catch (VCSException eee) {
throw new StorageException(_("isisfish.error.delete.vcs.files"), eee);
}
}
//TODO There is a bug to fix ? some files are not deleted!
- if (getFile().isDirectory())
+ if (getFile().isDirectory()){
FileUtil.deleteRecursively(getFile());
- else getFile().delete();
+ } else {
+ getFile().delete();
+ }
}
/**
@@ -229,18 +230,17 @@
*/
public void update() throws VCSException {
prepare();
- getVCSHanler().update(getFile());
+ getVCS().update(getFile());
}
public boolean isUpToDate() throws VCSException {
prepare();
- return getVCSHanler().isUpToDate(getFile());
+ return getVCS().isUpToDate(getFile());
}
/**
* Permet de ramener tout un répertoire du VCS. Utile seulement pour le
- * premier lancement pour scipts et exports. Pour les regles de gestion
- * le repertoire est checkouté en meme temps que la region
+ * premier lancement pour scipts et exports.
*
* @param destDir le repertoire parent
* @param module le repertoire qui peut etre scripts ou exports
@@ -248,7 +248,7 @@
*
*/
static public void checkout(File destDir, String module) throws VCSException {
- getVCSHanler().checkout(destDir, module, true);
+ getVCS().checkout(destDir, module, true);
}
/**
@@ -261,7 +261,11 @@
List<String> result = new ArrayList<String>();
if (directory.exists()) {
- Collections.addAll(result, directory.list(getVCSHanler().getVersionnableFilenameFilter()));
+ for(File f : directory.listFiles()) {
+ if(getVCS().isVersionnableAbleFile(f)) {
+ result.add(f.getName());
+ }
+ }
}
Collections.sort(result);
@@ -282,7 +286,7 @@
static public List<String> getRemoteStorageNames(File directory) {
List<String> result = null;
try {
- result = getVCSHanler().getRemoteStorageNames(directory);
+ result = getVCS().getFileList(directory);
} catch (VCSException e) {
log.warn("Error during connection to VCS serveur", e);
result = new ArrayList<String>();
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/entities/EquationImpl.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -35,6 +35,7 @@
import fr.ifremer.isisfish.IsisConfig;
import fr.ifremer.isisfish.IsisFishException;
import fr.ifremer.isisfish.IsisFishRuntimeException;
+import fr.ifremer.isisfish.datastore.FormuleStorage;
import fr.ifremer.isisfish.equation.Language;
import fr.ifremer.isisfish.simulator.SimulationContext;
import fr.ifremer.isisfish.util.EvaluatorHelper;
@@ -83,7 +84,7 @@
}
} else // default Java if there are javaInterface
if (Language.JAVA.equals(getLanguage()) || getJavaInterface() != null) {
- Object val = EvaluatorHelper.evaluate(IsisConfig.Module.FORMULE.value(),
+ Object val = EvaluatorHelper.evaluate(FormuleStorage.FORMULE_PATH,
getTopiaId(), getJavaInterface(), getContent(), param);
if (val instanceof Number) {
double result =((Number)val).doubleValue();
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/logging/SimulationLoggerUtil.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -19,8 +19,9 @@
* ##% */
package fr.ifremer.isisfish.logging;
+import fr.ifremer.isisfish.IsisConfig;
+import fr.ifremer.isisfish.IsisFish;
import fr.ifremer.isisfish.IsisFishException;
-import fr.ifremer.isisfish.IsisContext;
import fr.ifremer.isisfish.datastore.SimulationStorage;
import fr.ifremer.isisfish.logging.console.LogConsole;
import org.apache.commons.logging.Log;
@@ -169,10 +170,10 @@
File logFile = new File(storage.getSimulationLogFile());
- String smtpServer = IsisContext.get().getMainConfig().getSmtpServer();
- String defaultFrom = IsisContext.get().getMainConfig().getUserMail();
+ String smtpServer = IsisFish.config.getSmtpServer();
+ String defaultFrom = IsisFish.config.getUserMail();
- String defaultTo = IsisContext.get().getMainConfig().getSimulationReportMail();
+ String defaultTo = IsisConfig.REPORT_EMAIL;
String title = _("isisfish.simulation.log.console.title", simulationName);
LogConsole.newConsole(logFile, smtpServer, defaultFrom, defaultTo, title);
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/logging/console/LogConsole.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -108,7 +108,7 @@
// create ui
ui = new LogConsole(handler, title);
- // launch ui
+ // launchUI ui
ui.setVisible(true);
// notify the model to adjust the nbLinesInEditor
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/map/IsisMapBean.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -56,9 +56,9 @@
import com.bbn.openmap.layer.shape.ShapeLayer;
import com.bbn.openmap.omGraphics.DrawingAttributes;
+import fr.ifremer.isisfish.IsisFish;
import fr.ifremer.isisfish.IsisFishDAOHelper;
import fr.ifremer.isisfish.IsisFishRuntimeException;
-import fr.ifremer.isisfish.IsisContext;
import fr.ifremer.isisfish.entities.Cell;
import fr.ifremer.isisfish.entities.CellDAO;
import fr.ifremer.isisfish.entities.FisheryRegion;
@@ -369,7 +369,7 @@
if(!shapeLoaded){
// a pas reussi a charger les fichiers demandés, on charge la
// carte du monde
- String filename = IsisContext.get().getMainConfig().getDefaultMapFile();
+ String filename = IsisFish.config.getDefaultMapFilename();
String shp = filename + ".shp";
String ssx = filename + ".ssx";
addShapeLayer(filename, shp, ssx, "ff000000", "ffbdde83");
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationCheckpointThread.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationCheckpointThread.java 2008-08-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationCheckpointThread.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -22,7 +22,7 @@
import org.apache.xmlrpc.XmlRpcClient;
import fr.ifremer.isisfish.IsisConfig;
-import fr.ifremer.isisfish.IsisContext;
+import fr.ifremer.isisfish.IsisFish;
/**
* This thread is responsable to synchronized SimulationControl used localy with
@@ -78,13 +78,14 @@
public void updateControl(SimulationControl control) throws Exception {
// essai l'ancienne etait en dur: "http://localhost:9090"
- IsisConfig config = IsisContext.get().getMainConfig();
- XmlRpcClient c = new XmlRpcClient(config.getSimulationServer());
- c.setBasicAuthentication(config.getLogin(), config.getPassword());
+ 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);
+ 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);
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationExportResultWrapper.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationExportResultWrapper.java 2008-08-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationExportResultWrapper.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -57,7 +57,7 @@
//
if (parameters.getExportNames() != null
&& parameters.getExportNames().size() > 0) {
- File exportDir = IsisConfig.getResultExportDirectory(rootDirectory);
+ File exportDir = SimulationStorage.getResultExportDirectory(rootDirectory);
exportDir.mkdirs();
ExportHelper.doExport(simulation, exportDir, parameters.getExportNames(), rootDirectory);
}
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationHelper.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -60,15 +60,16 @@
import org.codelutin.util.StringUtil;
import org.codelutin.util.ZipUtil;
-import fr.ifremer.isisfish.IsisConfig;
+import fr.ifremer.isisfish.IsisFish;
import fr.ifremer.isisfish.IsisFishRuntimeException;
-import fr.ifremer.isisfish.IsisContext;
import fr.ifremer.isisfish.aspect.AspectClassLoader;
import fr.ifremer.isisfish.aspect.Cache;
import fr.ifremer.isisfish.aspect.Trace;
import fr.ifremer.isisfish.datastore.AnalysePlanStorage;
+import fr.ifremer.isisfish.datastore.ExportStorage;
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.rule.Rule;
@@ -122,12 +123,13 @@
SimulationParameter param, boolean compile) throws SimulationException {
try {
File tmpDirectory = FileUtil.createTempDirectory("isisfish-simultation-", "-preparation");
- File regionXML = IsisConfig.getDataBackupFile(tmpDirectory);
- //File regionXML = new File(tmpDirectory, IsisConfig.DATA_BACKUP_FILE);
+ //File regionXML = IsisConfig.getDataBackupFile(tmpDirectory);
+ File regionXML = new File(tmpDirectory, SimulationStorage.DATA_BACKUP_FILENAME);
// sauvegarde des parametres
Properties prop = param.toProperties();
- File f = IsisConfig.getSimulationParametersFile(tmpDirectory);
+ //File f = IsisConfig.getSimulationParametersFile(tmpDirectory);
+ File f = new File(tmpDirectory, SimulationStorage.PARAMETERS_FILENAME);
FileOutputStream out = new FileOutputStream(f);
//FileOutputStream out = new FileOutputStream(new File(tmpDirectory, IsisConfig.SIMULATION_PARAMETERS));
prop.store(out, "Parameters");
@@ -146,36 +148,36 @@
List<Rule> rules = param.getRules();
for (Rule rule : rules) {
String name = RuleStorage.getName(rule);
- FileUtil.copy(new File(IsisConfig.getRuleDirectory(), name + ".java"),
- new File(tmpDirectory, IsisConfig.Module.RULE.value() + File.separator + name + ".java"));
+ FileUtil.copy(new File(RuleStorage.getRuleDirectory(), name + ".java"),
+ new File(tmpDirectory, RuleStorage.RULE_PATH + File.separator + name + ".java"));
}
// copie des regles reclamées par les plans d'analyse
for(String name : param.getExtraRules()) {
- FileUtil.copy(new File(IsisConfig.getRuleDirectory(), name + ".java"),
- new File(tmpDirectory, IsisConfig.Module.RULE.value() + File.separator + name + ".java"));
+ FileUtil.copy(new File(RuleStorage.getRuleDirectory(), name + ".java"),
+ new File(tmpDirectory, RuleStorage.RULE_PATH + File.separator + name + ".java"));
}
// copie de toutes regles a utiliser
List<AnalysePlan> plans = param.getAnalysePlans();
for (AnalysePlan plan : plans) {
String name = AnalysePlanStorage.getName(plan);
- FileUtil.copy(new File(IsisConfig.getAnalysePlanDirectory(), name + ".java"),
- new File(tmpDirectory, IsisConfig.Module.ANALYSE_PLAN.value() + File.separator + name + ".java"));
+ FileUtil.copy(new File(AnalysePlanStorage.getAnalysePlanDirectory(), name + ".java"),
+ new File(tmpDirectory, AnalysePlanStorage.ANALYSE_PLAN_PATH + File.separator + name + ".java"));
}
// copie de tous les exports a utiliser
for (String name : param.getExportNames()) {
name = name.endsWith(".java")?name:name + ".java";
- FileUtil.copy(new File(IsisConfig.getExportDirectory(), name),
- new File(tmpDirectory, IsisConfig.Module.EXPORT.value() + File.separator + name));
+ FileUtil.copy(new File(ExportStorage.getExportDirectory(), name),
+ new File(tmpDirectory, ExportStorage.EXPORT_PATH + File.separator + name));
}
// copie de tous les scripts a utiliser
- FileUtil.copyRecursively(IsisConfig.getScriptDirectory(), tmpDirectory, ".*\\.java$");
+ FileUtil.copyRecursively(ScriptStorage.getScriptDirectory(), tmpDirectory, ".*\\.java$");
// copie de tous les simulateurs a utiliser
- FileUtil.copy(new File(IsisConfig.getSimulatorDirectory(), param.getSimulatorName()),
- new File(tmpDirectory, IsisConfig.Module.SIMULATOR.value() + File.separator + param.getSimulatorName()));
+ FileUtil.copy(new File(SimulatorStorage.getSimulatorDirectory(), param.getSimulatorName()),
+ new File(tmpDirectory, SimulatorStorage.SIMULATOR_PATH + File.separator + param.getSimulatorName()));
if (compile) {
compileAllFile(control, tmpDirectory);
@@ -225,16 +227,16 @@
List<File> fileToCompile = new ArrayList<File>();
- List<File> tmp = FileUtil.find(new File(directory, IsisConfig.Module.EXPORT.value()), ".*\\.java$", true);
+ List<File> tmp = FileUtil.find(new File(directory, ExportStorage.EXPORT_PATH), ".*\\.java$", true);
fileToCompile.addAll(tmp);
- tmp = FileUtil.find(new File(directory, IsisConfig.Module.RULE.value()), ".*\\.java$", true);
+ tmp = FileUtil.find(new File(directory, RuleStorage.RULE_PATH), ".*\\.java$", true);
fileToCompile.addAll(tmp);
- tmp = FileUtil.find(new File(directory, IsisConfig.Module.ANALYSE_PLAN.value()), ".*\\.java$", true);
+ tmp = FileUtil.find(new File(directory, AnalysePlanStorage.ANALYSE_PLAN_PATH), ".*\\.java$", true);
fileToCompile.addAll(tmp);
- tmp = FileUtil.find(new File(directory, IsisConfig.Module.SIMULATOR.value()), ".*\\.java$", true);
+ tmp = FileUtil.find(new File(directory, SimulatorStorage.SIMULATOR_PATH), ".*\\.java$", true);
fileToCompile.addAll(tmp);
//
@@ -347,9 +349,9 @@
a.add(FileUtil.fileToByte(zip));
// lancement de la simulation
- IsisConfig config = IsisContext.get().getMainConfig();
- XmlRpcClient c = new XmlRpcClient(config.getSimulationServer());
- c.setBasicAuthentication(config.getLogin(), config.getPassword());
+ XmlRpcClient c = new XmlRpcClient(IsisFish.config.getSimulatorServer());
+ c.setBasicAuthentication(IsisFish.config.getSimulatorUsername(),
+ IsisFish.config.getSimulatorPassword());
byte[] callResult = (byte[])c.execute("simulate", a);
// ecriture du resultat dans un fichier
@@ -433,7 +435,7 @@
String jvmVersion = System.getProperty("java.runtime.version");
log.info(SimpleDateFormat.getInstance().format(new java.util.Date())
+ " Java version: " + jvmVersion + " Isis-fish version: "
- + IsisContext.get().getMainConfig().getVersion().toString());
+ + IsisFish.config.getVersion());
long start = System.nanoTime();
simulation.getInformation().setSimulationStart(new java.util.Date());
AspectClassLoader classLoader;
@@ -457,7 +459,7 @@
context.setSimulationControl(control!=null?control:new SimulationControl(simulation.getName()));
SimulationParameter parameters = simulation.getParameter();
- parameters.setIsisFishVersion(IsisConfig.getVERSION());
+ parameters.setIsisFishVersion(IsisFish.config.getVersion());
// forceReload, save all modification in parameter and reread it
parameters = simulation.getForceReloadParameter();
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationManager.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -31,8 +31,7 @@
package fr.ifremer.isisfish.simulator;
-import fr.ifremer.isisfish.IsisConfig;
-import fr.ifremer.isisfish.IsisContext;
+import fr.ifremer.isisfish.IsisFish;
import fr.ifremer.isisfish.datastore.SimulationStorage;
import fr.ifremer.isisfish.types.Date;
import org.apache.commons.logging.Log;
@@ -275,14 +274,13 @@
boolean result = true;
QueueItem item = map.get(id);
SimulationParameter simulationParameter = getParameter(id);
- IsisConfig config = IsisContext.get().getMainConfig();
- if (config.isSimulationShowOnlyQueue() && !simulationParameter.getLocal()) {
+ if (IsisFish.config.isSimulationShowOnlyQueue() && !simulationParameter.getLocal()) {
return false;
}
try {
//TODO cela ne fonctionne pas, le fichier existe-il à ce moment ?
- if (config.isSimulationShowOnlyError() && item.lastSimulation.getInformation().getException() != null) {
+ if (IsisFish.config.isSimulationShowOnlyError() && item.lastSimulation.getInformation().getException() != null) {
return true;
}
} catch (Exception e) {
@@ -372,7 +370,7 @@
// souhaiter par l'utilisateur
SimulationParameter param = sim.getParameter();
if (param.getExportNames() != null && param.getExportNames().size() > 0) {
- File exportDir = IsisConfig.getResultExportDirectory(sim.getDirectory());
+ File exportDir = SimulationStorage.getResultExportDirectory(sim.getDirectory());
FileUtil.copyAndRenameRecursively(
exportDir,
new File(param.getExportDirectory()),
@@ -400,7 +398,7 @@
if (param.getOnlyExport()) {
if (param.getUseAnalysePlan()) {
for(File file : FileUtil.find(
- IsisConfig.getSimulationDirectory(),
+ SimulationStorage.getSimulationDirectory(),
item.id + "_[0-9]+$", false)) {
log.debug("Delete simulation " + file);
FileUtil.deleteRecursively(file);
@@ -542,6 +540,13 @@
return result;
}
+ @Override
+ public int hashCode() {
+ int hash = 3;
+ hash = 37 * hash + (this.param != null ? this.param.hashCode() : 0);
+ return hash;
+ }
+
/* (non-Javadoc)
* @see java.lang.Comparable#compareTo(java.lang.Object)
*/
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationParameter.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -81,7 +81,7 @@
/** Isis-fish version that permit to do the simulation, must be set just
* before simulation by simulator */
- protected String isisFishVersion = IsisConfig.getVERSION();
+ protected String isisFishVersion = IsisConfig.getVersion();
/** description de la simulation */
protected String description = "";
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationProperties.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -2,6 +2,7 @@
import fr.ifremer.isisfish.IsisConfig;
+import fr.ifremer.isisfish.datastore.SimulationStorage;
import org.codelutin.i18n.I18n;
import org.apache.commons.logging.Log;
@@ -33,12 +34,12 @@
protected Properties data;
public SimulationProperties(String name) throws IOException {
- File simulationDirectory = IsisConfig.getSimulationDirectory(name);
+ File simulationDirectory = SimulationStorage.getSimulationDirectory(name);
this.name = simulationDirectory.getName();
this.data = new Properties();
data.put(SimulationMeta.simulationName.name(), this.name);
- loadProperties(IsisConfig.getSimulationParametersFile(simulationDirectory));
- loadProperties(IsisConfig.getSimulationInformationFile(simulationDirectory));
+ loadProperties(SimulationStorage.getSimulationParametersFile(simulationDirectory));
+ loadProperties(SimulationStorage.getSimulationInformationFile(simulationDirectory));
}
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/simulator/SimulationResultXML.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -45,6 +45,7 @@
import fr.ifremer.isisfish.IsisConfig;
import fr.ifremer.isisfish.IsisFishException;
+import fr.ifremer.isisfish.datastore.SimulationStorage;
import fr.ifremer.isisfish.types.Date;
@@ -131,7 +132,7 @@
//TODO validate this modification
if (file==null) {
File simulationDir = context.getSimulationStorage().getDirectory();
- file = IsisConfig.getSimulationResultXmlFile(simulationDir);
+ file = SimulationStorage.getSimulationResultXmlFile(simulationDir);
setOutFilename(file);
}
file.getParentFile().mkdirs();
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/ScriptActionHelper.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -25,7 +25,7 @@
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.IsisConfig;
+import fr.ifremer.isisfish.IsisFish;
import org.codelutin.vcs.ui.FieldModelUtil;
import org.apache.commons.logging.Log;
import static org.apache.commons.logging.LogFactory.getLog;
@@ -61,7 +61,7 @@
String message = _("isisfish.message.import.scripts.file", file);
logMessage(useUI, frame, message);
- File root = IsisConfig.getDatabaseDirectory();
+ 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());
@@ -125,7 +125,7 @@
throw new IllegalArgumentException(_("isisfish.error.export.scripts.force"));
}
}
- File root = IsisConfig.getDatabaseDirectory();
+ File root = IsisFish.config.getDatabaseDirectory();
String message = _("isisfish.message.export.scripts.file", dst);
logMessage(useUI, frame, 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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/Welcome.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -31,15 +31,9 @@
package fr.ifremer.isisfish.ui;
-import static fr.ifremer.isisfish.IsisConfig.Module.ANALYSE_PLAN;
-import static fr.ifremer.isisfish.IsisConfig.Module.EXPORT;
-import static fr.ifremer.isisfish.IsisConfig.Module.FORMULE;
-import static fr.ifremer.isisfish.IsisConfig.Module.RULE;
-import static fr.ifremer.isisfish.IsisConfig.Module.SCRIPT;
-import static fr.ifremer.isisfish.IsisConfig.Module.SIMULATOR;
import fr.ifremer.isisfish.ui.input.Input;
import fr.ifremer.isisfish.ui.result.ResultView;
-import org.codelutin.vcs.VCSException;
+import fr.ifremer.isisfish.vcs.VCSException;
import org.codelutin.vcs.VCSAction;
import org.codelutin.vcs.VCSRepositoryState;
import org.codelutin.vcs.VCSFileState;
@@ -47,8 +41,15 @@
import fr.ifremer.isisfish.versionning.ui.VCSUIHelper;
import fr.ifremer.isisfish.versionning.IsisRepositoryState;
import fr.ifremer.isisfish.IsisConfig;
-import fr.ifremer.isisfish.IsisContext;
+import fr.ifremer.isisfish.IsisFish;
+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.VCS;
import org.swixat.framework.AbstractFrame;
import org.swixat.framework.OutputView;
import org.swixat.model.GenericContext;
@@ -73,6 +74,10 @@
/** to use log facility, just put in your code: log.info(\"...\"); */
static private Log log = LogFactory.getLog(Welcome.class);
+ static protected VCS getVCS() {
+ return IsisFish.config.getVCS();
+ }
+
/**
* Permet d'ouvrir une nouvelle fenetre de rendu des resultats
*
@@ -131,7 +136,7 @@
boolean hasFrame = frame != null;
- if (!VCSHelper.isConnected()) {
+ if (!getVCS().isConnected()) {
String errorMsg = I18n._("isisfish.error.not.connected");
if (hasFrame) {
frame.viewOutput(new OutputView("Error.xml", "error", errorMsg));
@@ -147,8 +152,13 @@
EnumSet<VCSAction> actions = VCSHelper.getAuthorizedActions();
// init repo synchrinization
- VCSRepositoryState repoState = new IsisRepositoryState(IsisConfig.getDatabaseDirectory(),actions,
- ANALYSE_PLAN, EXPORT, FORMULE, RULE, SCRIPT, SIMULATOR);
+ 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();
@@ -188,18 +198,22 @@
static public Object showConfig() {
try {
- getUi().setVisible(true);
+ // FIXME a voir avec l'autre FIXME
+ throw new UnsupportedOperationException("En reparation");
+// getUi().setVisible(true);
} catch (Exception eee) {
new OutputView("Error.xml", "error", eee.getMessage());
}
return null;
}
- static ConfigUI getUi() {
- if (ui == null) {
- IsisContext context = IsisContext.get();
- ui = new ConfigUI().init(context,context.getMainConfig(), context.getVcsConfig(), context.getH2Config());
- }
- return ui;
- }
+ // FIXME voir comment remplacer ca
+// static ConfigUI getUi() {
+// if (ui == null) {
+// IsisContext context = IsisContext.get();
+// ui = new ConfigUI().init(IsisFish.config,
+// context.getVcsConfig(), context.getH2Config());
+// }
+// return ui;
+// }
}
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/Action.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -31,15 +31,8 @@
package fr.ifremer.isisfish.ui.script;
-import fr.ifremer.isisfish.IsisContext;
import fr.ifremer.isisfish.IsisConfig;
-import fr.ifremer.isisfish.IsisConfig.Module;
-import static fr.ifremer.isisfish.IsisConfig.Module.ANALYSE_PLAN;
-import static fr.ifremer.isisfish.IsisConfig.Module.EXPORT;
-import static fr.ifremer.isisfish.IsisConfig.Module.FORMULE;
-import static fr.ifremer.isisfish.IsisConfig.Module.RULE;
-import static fr.ifremer.isisfish.IsisConfig.Module.SCRIPT;
-import static fr.ifremer.isisfish.IsisConfig.Module.SIMULATOR;
+import fr.ifremer.isisfish.IsisFish;
import fr.ifremer.isisfish.datastore.AnalysePlanStorage;
import fr.ifremer.isisfish.datastore.CodeSourceStorage;
import fr.ifremer.isisfish.datastore.ExportStorage;
@@ -346,8 +339,8 @@
category.isEmpty() ? "" : '.' + category.replaceAll("\\/", "."),
realFilename,
new Date(),
- IsisContext.get().getMainConfig().getUserName(),
- IsisContext.get().getMainConfig().getUserMail());
+ IsisFish.config.getUserName(),
+ IsisFish.config.getUserMail());
script.setContent(content);
// ajout du nouveau script dans l'arbre
if (parentNode == null) {
@@ -627,7 +620,7 @@
return null;
}
// first step : acquire list of files required
- int prefixLength = IsisConfig.getDatabaseDirectory().getAbsolutePath().length() + 1;
+ int prefixLength = IsisFish.config.getDatabaseDirectory().getAbsolutePath().length() + 1;
List<String> listFiles = extractFiles(prefixLength, selectedPaths);
if (listFiles.isEmpty()) {
return null;
@@ -668,8 +661,7 @@
TreeNodeWrapper node = (TreeNodeWrapper) selectedPath.getPathComponent(1);
String moduleDisplayName = String.valueOf(node.getUserObject());
- Module module = ScriptMapping.valueOf(moduleDisplayName).getModule();
- File file = module.getDirectory();
+ File file = ScriptMapping.valueOf(moduleDisplayName).getModule();
int nbPaths = selectedPath.getPathCount();
if (nbPaths > 2)
for (int i = 2; i < nbPaths; i++) {
@@ -711,7 +703,7 @@
/** enum to encapsulate a script module */
enum ScriptMapping {
- Script(SCRIPT,
+ Script(ScriptStorage.getScriptDirectory(),
/**
* 0 = package name,
* 1 = class name,
@@ -749,7 +741,7 @@
" // add your method here\n" +
"'}'\n"),
- Simulator(SIMULATOR,
+ Simulator(SimulatorStorage.getSimulatorDirectory(),
/**
* 0 = package name,
* 1 = class name,
@@ -790,7 +782,7 @@
" '}'\n" +
"\n" +
"'}'\n"),
- Export(EXPORT,
+ Export(ExportStorage.getExportDirectory(),
/**
* 0 = package name,
* 1 = class name,
@@ -860,7 +852,7 @@
" '}'\n" +
"\n" +
"'}'\n"),
- Rule(RULE,
+ Rule(RuleStorage.getRuleDirectory(),
/**
* 0 = package name,
* 1 = class name,
@@ -963,7 +955,7 @@
" '}'\n" +
"\n" +
"'}'\n"),
- AnalysePlan(ANALYSE_PLAN,
+ AnalysePlan(AnalysePlanStorage.getAnalysePlanDirectory(),
/**
* 0 = package name,
* 1 = class name,
@@ -1055,7 +1047,7 @@
" '}'\n" +
"\n" +
"'}'\n"),
- EquationModel(FORMULE,
+ EquationModel(FormuleStorage.getFormuleDirectory(),
/**
* 0 = package name,
* 1 = class name,
@@ -1078,15 +1070,15 @@
"// put your code here\n" +
"\n");
- private Module module;
+ private File module;
private String defaultContent;
- ScriptMapping(Module module, String defaultContent) {
+ ScriptMapping(File module, String defaultContent) {
this.module = module;
this.defaultContent = defaultContent;
}
- Module getModule() {
+ File getModule() {
return module;
}
@@ -1112,7 +1104,7 @@
public static FileFilter getSCRIPT_FILE_FILTER() {
if (SCRIPT_FILE_FILTER == null) {
- SCRIPT_FILE_FILTER = new ScriptFileFilter(IsisContext.get().getVCSHanler().getVersionnableFileFilter());
+ SCRIPT_FILE_FILTER = new ScriptFileFilter(IsisFish.config.getVCS());
}
return SCRIPT_FILE_FILTER;
}
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/action/BackupAction.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/action/BackupAction.java 2008-08-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/script/action/BackupAction.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -1,7 +1,7 @@
package fr.ifremer.isisfish.ui.script.action;
+import fr.ifremer.isisfish.IsisFish;
import fr.ifremer.isisfish.IsisFishRuntimeException;
-import fr.ifremer.isisfish.IsisContext;
import fr.ifremer.isisfish.ui.util.IsisAction;
import org.apache.commons.logging.Log;
import static org.apache.commons.logging.LogFactory.getLog;
@@ -39,7 +39,7 @@
protected void perform(ActionEvent e) {
log.info("directory for backup [" + dst+']');
- String suffix = "_" + IsisContext.getSessionBackupDirectory().getName();
+ String suffix = "_" + IsisFish.config.getBackupSessionDirectory().getName();
try {
for (String path : paths) {
backup(new File(src, path), path, suffix);
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/simulator/SimulatorAction.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -31,8 +31,7 @@
package fr.ifremer.isisfish.ui.simulator;
-import fr.ifremer.isisfish.IsisConfig;
-import fr.ifremer.isisfish.IsisContext;
+import fr.ifremer.isisfish.IsisFish;
import fr.ifremer.isisfish.datastore.AnalysePlanStorage;
import fr.ifremer.isisfish.datastore.ExportStorage;
import fr.ifremer.isisfish.datastore.RegionStorage;
@@ -98,12 +97,12 @@
// put default value in param
param.setlocal(true);
- param.setSimulatorName(IsisContext.get().getMainConfig().getDefaultSimulator());
- param.setlocal(IsisContext.get().getMainConfig().isLocalSimulator());
- param.setTagValue(IsisConfig.getDefaultTagValueAsMap());
- param.setExportDirectory(IsisContext.get().getMainConfig().getDefaultExportDirectory().toString());
- param.setExportNames(IsisConfig.getDefaultExportNamesAsList());
- List<String> defaultResultNames = IsisConfig.getDefaultResultNamesAsList();
+ param.setSimulatorName(IsisFish.config.getSimulatorClassfile());
+ param.setlocal(IsisFish.config.isSimulatorLocal());
+ param.setTagValue(IsisFish.config.getDefaultTagValueAsMap());
+ param.setExportDirectory(IsisFish.config.getDefaultExportDirectory().toString());
+ param.setExportNames(IsisFish.config.getDefaultExportNamesAsList());
+ List<String> defaultResultNames = IsisFish.config.getDefaultResultNamesAsList();
if (defaultResultNames != null)
param.setResultEnabled(defaultResultNames);
else
@@ -282,22 +281,22 @@
* @param local <code>true</code> to use local simulator
*/
static public void saveSimulatorChoice(String simulatorName, boolean local) {
- IsisContext.get().getMainConfig().setDefaultSimulator(simulatorName);
- IsisContext.get().getMainConfig().setLocalSimulator(local);
+ IsisFish.config.setSimulatorClassfile(simulatorName);
+ IsisFish.config.setSimulatorLauncher(local?"local":"isis-server");
}
static public void saveExport(String exportDirectory, List<String> exportNames) {
- IsisConfig.setDefaultExportDirectory(exportDirectory);
- IsisConfig.setDefaultExportNames(exportNames);
+ IsisFish.config.setDefaultExportDirectory(exportDirectory);
+ IsisFish.config.setDefaultExportNames(exportNames);
}
static public void saveResultNames(List<String> resultNames) {
- IsisConfig.setDefaultResultNames(resultNames);
+ IsisFish.config.setDefaultResultNames(resultNames);
}
static public void saveTagValue(Map<String, String> tagValues) {
log.debug("call saveTagValue: " + tagValues);
- IsisConfig.setDefaultTagValues(tagValues);
+ IsisFish.config.setDefaultTagValues(tagValues);
}
static public void addTagValue(SimulationParameter param, String tag, String value) {
Modified: trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/util/IsisActionWithBackup.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/util/IsisActionWithBackup.java 2008-08-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/ui/util/IsisActionWithBackup.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -1,6 +1,6 @@
package fr.ifremer.isisfish.ui.util;
-import fr.ifremer.isisfish.IsisContext;
+import fr.ifremer.isisfish.IsisFish;
import fr.ifremer.isisfish.ui.script.action.BackupAction;
import javax.swing.JDialog;
@@ -16,7 +16,7 @@
protected IsisActionWithBackup(JDialog dialog, File root) {
super(dialog);
this.root = root;
- this.backupRoot = IsisContext.getSessionBackupDirectory();
+ this.backupRoot = IsisFish.config.getBackupSessionDirectory();
}
/**
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/util/CompileHelper.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -56,8 +56,7 @@
import com.sun.tools.javac.api.JavacTool;
-import fr.ifremer.isisfish.IsisContext;
-import fr.ifremer.isisfish.IsisConfig;
+import fr.ifremer.isisfish.IsisFish;
import fr.ifremer.isisfish.datastore.JavaSourceStorage;
@@ -107,7 +106,7 @@
static public Class loadClass(String fqn) {
Class result = null;
try {
- ClassLoader cl = IsisConfig.getScriptClassLoader();
+ ClassLoader cl = IsisFish.config.getScriptClassLoader();
result = cl.loadClass(fqn);
} catch (ClassNotFoundException eee) {
log.info(_("isisfish.error.load.class", fqn), eee);
@@ -323,7 +322,7 @@
}
static private String createHREF(String type, String ... texts) {
- String ref = IsisContext.get().getMainConfig().getJavadocURL() + type.replaceAll("\\.", "/") + ".html";
+ String ref = IsisFish.config.getJavadocURL() + type.replaceAll("\\.", "/") + ".html";
String text = type;
if (texts.length > 0) {
text = texts[0];
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/util/EvaluatorHelper.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -46,8 +46,7 @@
import org.codelutin.util.FileUtil;
import fr.ifremer.isisfish.IsisFishRuntimeException;
-import fr.ifremer.isisfish.IsisContext;
-import fr.ifremer.isisfish.IsisConfig;
+import fr.ifremer.isisfish.IsisFish;
/**
@@ -134,7 +133,7 @@
String classname = packageName + "." + className;
- File fileRootSrc = IsisContext.get().getMainConfig().getCompileDirectory();
+ File fileRootSrc = IsisFish.config.getCompileDirectory();
File fileCheckSum = new File(fileRootSrc, packageName + File.separator + className + ".hashCode");
File fileSrc = new File(fileRootSrc, packageName + File.separator + className + ".java");
File fileDest = new File(fileRootSrc, packageName + File.separator + className + ".class");
@@ -184,7 +183,7 @@
// try to load class
try {
- ClassLoader cl = IsisConfig.getScriptClassLoader();
+ ClassLoader cl = IsisFish.config.getScriptClassLoader();
clazz = cl.loadClass(classname);
} catch (Exception zzz) {
throw new IsisFishRuntimeException(_("isisfish.error.load.class", classname), zzz);
Added: trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCS.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCS.java (rev 0)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCS.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -0,0 +1,163 @@
+/* *##%
+ * 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.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.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 {
+
+ 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);
+
+ protected ApplicationConfig config;
+
+ /**
+ * 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
+ */
+ 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;
+ }
+
+ protected VCS(ApplicationConfig config) {
+ this.config = config;
+ }
+
+ public void add(List<File> files, String msg) throws VCSException {
+ throw new VCSException("Can't add file with dummy VCS");
+ }
+
+ public void checkout(File destDir, String module, boolean b) throws VCSException {
+ throw new VCSException("Can't checkout with dummy VCS");
+ }
+
+ 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 boolean isConnected() {
+ return false;
+ }
+
+ public boolean isOnRemote(File file) throws VCSException {
+ return false;
+ }
+
+ public boolean isUpToDate(File file) throws VCSException {
+ return true;
+ }
+
+ /**
+ * 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.
+ *
+ * @param file
+ * @return
+ */
+ public boolean isVersionnableAbleFile(File file) {
+ return true;
+ }
+
+ 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
+ */
+ public boolean accept(File pathname) {
+ return isVersionnableAbleFile(pathname);
+ }
+
+
+}
Added: trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSException.java
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSException.java (rev 0)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/VCSException.java 2008-08-04 16:59:55 UTC (rev 1281)
@@ -0,0 +1,51 @@
+/* *##%
+* 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.vcs;
+
+
+/**
+ * A generic vcs exception.
+ *
+ * @author chemit
+ */
+
+public class VCSException extends Exception {
+
+ private static final long serialVersionUID = -2665066202505740998L;
+
+ public VCSException() {
+ super();
+ }
+
+ public VCSException(String message) {
+ super(message);
+ }
+
+ public VCSException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public VCSException(Throwable cause) {
+ super(cause);
+ }
+
+}
+
+
Added: trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/package.html
===================================================================
--- trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/package.html (rev 0)
+++ trunk/isis-fish/src/java/fr/ifremer/isisfish/vcs/package.html 2008-08-04 16:59:55 UTC (rev 1281)
@@ -0,0 +1,37 @@
+Try to keep this class agnostic about IsisFish specific objet. This permit
+library creation in near futur.
+
+<h1>Politique d'utilisation du VCS pour les datas</h1>
+
+<p>
+ Si on a la derniere version d'isis alors on utilise le trunk. Si on a pas la
+ derniere version, on utilise le tag de cette version (impossible de commiter).
+</p>
+<p>
+ Si l'utilisateur ne souhaite pas passer a la derniere release, il ne pourra
+ plus commit ou updater. On detect qu'il n'a pas la derniere version car un
+ tag existe avec sa release.
+</p>
+<p>
+ Pour le developpement, on cree une branch pour la futur version, lors de la
+ release passage de 3.1.0.1 à 4.0.0.0
+</p>
+<ul>
+ <li>un tag est fait avec le trunk pour la dernier version stable (3.1.0)</li>
+ <li>la branch de developpement est fusionne avec le trunk (branch/4.0.0)</li>
+ <li>une nouvelle branch est crée (branch/4.0.1)</li>
+</ul>
+<p>
+ Pour les releases qui ne font evoluer que le 4eme chiffre, rien n'est fait.
+</p>
+<p>
+ Les differents etats possibles sont:
+ <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 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
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/resources/i18n/isis-fish-en_GB.properties 2008-08-04 16:59:55 UTC (rev 1281)
@@ -1,17 +1,78 @@
-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
-Can't\ instanciate\ export\ {0}=Can't instanciate export {0}
-Checkout\ pom.xml\ to\ {0}=
+=
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 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=
Info=Info
-Region\ {0}\ allready\ exist\ in\ repository.\ Can''t\ import=
-could\ not\ close\ reader\ {0}=could not close reader {0}
-could\ not\ create\ simulation\ filter\ model\ for\ reason\ {0}=could not create simulation filter model for reason {0}
-could\ not\ filter\ on\ simulations=could not filter on simulations
-could\ not\ found\ log\ file\ {0}=could not found log file {0}
-could\ not\ read\ at\ offset\ {0}\ for\ reason\ {1}=could not read at offset {0} for reason {1}
-filter\ loaded\ in\ {0}\ ms\ \:\ found\ {1}\ lines.=filter loaded in {0} ms \: found {1} lines.
+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\ =
isisfish.about.site=site
isisfish.about.text=text
isisfish.about.title=title
@@ -30,7 +91,6 @@
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
@@ -47,17 +107,14 @@
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 {0}
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
@@ -84,73 +141,6 @@
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
@@ -158,7 +148,6 @@
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={0} {1}
isisfish.effortDescription.crewFoodCost=isisfish.effortDescription.crewFoodCost
isisfish.effortDescription.crewShareRate=isisfish.effortDescription.crewShareRate
isisfish.effortDescription.crewSize=isisfish.effortDescription.crewSize
@@ -170,31 +159,14 @@
isisfish.effortDescription.otherRunningCost=isisfish.effortDescription.otherRunningCost
isisfish.effortDescription.repairAndMaintenanceGearCost=isisfish.effortDescription.repairAndMaintenanceGearCost
isisfish.effortDescription.title=isisfish.effortDescription.title
-isisfish.effortDescription.toString=EffortDescription for {0} with {1}
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.file=Can't add file {0}
-isisfish.error.add.logger.simulation\ =isisfish.error.add.logger.simulation
+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.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
-isisfish.error.change.classloader=Can''t change classloader because can''t create URL from file {0}
-isisfish.error.change.equation=Can't change equation
-isisfish.error.check.region=Can't check region
-isisfish.error.checkout.module=Can''t checkout module {0}
-isisfish.error.commit.files=Can't commit files {0}
-isisfish.error.compile.script=Can't compile script\: {0}
-isisfish.error.compiled.parameter=Can't get rule parameter from compiled class
-isisfish.error.connect.server=Can't connect to server
+isisfish.error.checkout.module",\ module),\ eee);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ break;\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ }\ \ \ \ public\ static\ void\ doCheckoutModule(VCSHandler\ handler,\ IsisConfig.Module\ module,\ String\ category)\ {\ \ \ \ \ \ \ \ File\ f\ =
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 {0}
-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 {0} 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
@@ -212,122 +184,31 @@
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\: {0}
-isisfish.error.evaluate.equation=Can''t evaluate equation\: {0}
-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 {0} already exists, you MUST use option [force] pour force overwrite.
-isisfish.error.file.already.exists=The file {0} 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\: {0}
-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 {0}
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
-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.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
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 {0} 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 {0}, availables \: {1}
-isisfish.error.invalid.simulation.index=Invalid simulation index {0}
-isisfish.error.invalid.simulation.index.availables=Invalid simulation index {0}, availables \: {1}
isisfish.error.invalid.values.params=Parametre controlable hors valeurs possibles
isisfish.error.invalidate.natural.death=natural mortality invalid
-isisfish.error.invalide.simulation.index=Invalide simulation index
-isisfish.error.invoke.method=Can't invoke method '{0}' for class {1}
-isisfish.error.load.class=Can't load class\: {0}
-isisfish.error.load.classloader=Can''t create ClassLoader for script, bad directory\: {0} for reason {1}
-isisfish.error.load.file=could not load file {0}
-isisfish.error.load.map=Can't load map file\: {0}
-isisfish.error.log.closeAppender=could not close appender {0} for category {1}
-isisfish.error.log.console.dispose=Une erreur est survenue pendant la fermeture de la console {0} de log, raison {1}
-isisfish.error.log.createAppender=could not create appender [{0}] \: {1} for reason {2}
-isisfish.error.log.foundAppender=\=could not found log appender {0} for category {1}
+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.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.null.time.step=Error, the time step should not be null
+isisfish.error.no.matrix"\ +\ name));\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ resume.append("\\n\\n=
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 {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.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}
-isisfish.error.not.found.field.class=could not found field {0} for class {1}
-isisfish.error.not.found.species.population.container=Can't find species ({0}) 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 {0}
-isisfish.error.obtain.field.analyseplan=Can''t obtain field @Doc for AnalysePlan {0}
-isisfish.error.obtain.information.file=could not obtain information file for simulation {0}
-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 {0}
-isisfish.error.parse.long=Can''t parse long {0}
-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 {0}
-isisfish.error.read.simulation.parameters=Can''t read simulation parameters from file {0}
-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 {0}
-isisfish.error.remove.file=Can't remove file {0}
-isisfish.error.rename.region=Can't rename region to {0}
-isisfish.error.save.checkSum.compilation=Can't save checkSum to compilation\: {0}
-isisfish.error.save.region=Can't save region
-isisfish.error.save.script.compilation=Can't save script to compilation\: {0}
-isisfish.error.save.simulation.parameters=Can't save simulation parameters in file {0}
-isisfish.error.script.check=Can''t check file {0} for reason {1}
-isisfish.error.script.commit=Can''t commit file {0} for reason {1}
-isisfish.error.script.create=isisfish.error.script.create
-isisfish.error.script.delete=Can''t delete file {0} for reason {1}
-isisfish.error.script.diff=Can''t diff file {0} for reason {1}
-isisfish.error.script.evaluate=Can''t evaluate file {0} for reason {1}
-isisfish.error.script.export=Can''t export for reason {0}
-isisfish.error.script.import=Can''t import file for reason {0}
-isisfish.error.script.load=Can''t load file {0} for reason {1}
-isisfish.error.script.save=Can''t save file {0} for reason {1}
-isisfish.error.script.update=Can''t update file {0} for reason {1}
-isisfish.error.simulation.log.openAppender=could not open appender of simulation {0} for reason {1}
-isisfish.error.simulation.resultXml.close=Can't close simulation result XML for reason {0}
-isisfish.error.simulation.resultXml.open=Can't open simulation result XML for reason {0}
-isisfish.error.simulation.resultXml.write=Can't write simulation result XML for reason {0}
-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\: {0}
-isisfish.error.strategy.order=Strategy {0} don't have 12 StrategyMonthInfo but {1}. Recreate them
isisfish.error.text=The follow error occur during action
isisfish.error.title=Error
isisfish.error.undefined.classes=No classes defined
@@ -343,16 +224,8 @@
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.unsupported.equation.langage=unsupported langage ''{0}'' for equation\: {1}
-isisfish.error.update.file=Can''t update file ''{0}''
-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 {0}, private key {1}
-isisfish.error.vcs.pre.migrate=While migration, could not backup your old database {0} for reason {1}, a new database will be created at location {2}.
-isisfish.error.wait.simThread=Can't wait SimThread
-isisfish.error.while.simulation=error while simulation {0}
-isisfish.error.write.simulation=Can''t write information {0}
+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.exit.text=Something has change, please enter a comment
isisfish.exit.title=Exit
isisfish.export.directory=Export directory
@@ -375,8 +248,6 @@
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
@@ -480,149 +351,35 @@
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 {0} - version {1}
isisfish.launch.firstname=firstname
-isisfish.launch.howto.save.key=Howto register your public ssh key in labs
-isisfish.launch.init.done=init done in {0}.
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 {0} 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 {0} ({1})
-isisfish.launch.server.ssh.key.generate.succes=The ssh key {0} 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 ... {0}
-isisfish.launch.stop=Stopping simulation...
-isisfish.launching=after init done in {0}.
-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.send=A report has been sent to {0}
-isisfish.log.mail.send.title=Send simulation {0} by email
+isisfish.log.mail.send.title",\ simulationFile.getName()));\ \ \ \ \ \ \ \ this.from\ =
isisfish.log.mailTo=Destination adress
-isisfish.log.removeAppender=remove appender [{0}]
-isisfish.log.restoreLogLevel=swap back level for logger {0} from level {1} to level {2}
isisfish.log.sendAll=Send the complete simulation archive
isisfish.log.sendMail=Send by email
-isisfish.log.simulation.name=IsisFish simulation {0}
-isisfish.log.swapLogLevel=swap level for logger {0} from level {1} to level{2}
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 {0} files {1}.
-isisfish.message.add.objets.simulation=Add new objets simulation
-isisfish.message.add.queue={0} added to queue simulation
-isisfish.message.add.queue.remote={0} 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.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 {0} ...
-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}''
-isisfish.message.copy.finished=Copy finished
-isisfish.message.copy.region=Copy region to {0}
-isisfish.message.copy.revision=Working copy initialize fine... Revision \: [ {0} - {1} ]
-isisfish.message.create.region.canceled=Create region canceled
-isisfish.message.creating.region=Creating region {0}
-isisfish.message.creation.done=creation done {0}
-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 {0}, all next object will be deleted\\n\\n
-isisfish.message.diff.finished=file in state {0}
-isisfish.message.directory.not.exists=Parent directory of file {0} 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 {0}
-isisfish.message.export.result=zip {0} file(s) in {1} (size {2})
-isisfish.message.export.scripts.file=Export scripts to file {0}
-isisfish.message.export.zip=Export to zip file {0}
-isisfish.message.file.already.exists=File {0} already exists, Do you want to overwrite it ?
-isisfish.message.file.overwrite=File exists, do you want overwrite it ?
-isisfish.message.import=Import {0}
-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 {0}
-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\: {0} ({1}, {2})
-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 {0}, since it is a {1}
-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 {0}.
-isisfish.message.remove.finished=Remove finished
-isisfish.message.remove.unnecessary.cells=Remove unnecessary cells
-isisfish.message.removing.region=Removing region {0} ...
+isisfish.message.load.map",\ filename,\ shp,\ ssx));\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ addShapeLayer(filename,\ shp,\ ssx,\ "ff000000",\ "ffbdde83=
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 {0}
-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={0} season {1}-{2}
isisfish.metierSeasonInfoSpecies.mainSpecies=Main species for the metier
isisfish.metierSeasonInfoSpecies.selectSeason=Select a season
isisfish.metierSeasonInfoSpecies.selectSpecies=Select a species
@@ -632,44 +389,7 @@
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 {0}]
-isisfish.migration.svn.protocol.description=Migrate from SVN [v {0} - {1}] to SVN [v {2} - {3}]
-isisfish.migration.svn.version.description=Migrate from SVN [v {0} - {1}] to SVN [v {2} - {3}]
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 ''{0}'' to level ''{1}''
isisfish.params.clearFilter=Clear filter
isisfish.params.description=Description
isisfish.params.filter=Filter
@@ -680,31 +400,9 @@
isisfish.params.ruleParameters=Rule's parameters
isisfish.params.simulationName=Simulation name
isisfish.params.title=Parameters
-isisfish.params.toString.fishery=P\u00EAcherie\: {0}\\n\\n
-isisfish.params.toString.lib.logger.level=Level of libraries' logger {0}
-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.rule=Rule\: {0}
-isisfish.params.toString.script.logger.level=Level of scripts' logger {0}
-isisfish.params.toString.script.presimulation=Script de presimulation
-isisfish.params.toString.simul.logger.level=Level of simulator's logger {0}
-isisfish.params.toString.simulation.done=Simulation done with {0}\:
-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
@@ -729,7 +427,6 @@
isisfish.populationGroup.price=price
isisfish.populationGroup.reproductionRate=reproductionRate
isisfish.populationGroup.title=inputPopulationGroup
-isisfish.populationGroup.toString={0} Group {1}
isisfish.populationMigration.comments=Comments
isisfish.populationMigration.selectSeason=Select a season
isisfish.populationMigration.title=inputPopulationMigration
@@ -749,15 +446,6 @@
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={0} season {1}-{2}
isisfish.populationSeasons.Reproduction=Reproduction
isisfish.populationSeasons.changeGroup=Change of group
isisfish.populationSeasons.comments=Comments
@@ -780,14 +468,8 @@
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
@@ -802,7 +484,6 @@
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
@@ -895,7 +576,6 @@
isisfish.script.title=Script Editor
isisfish.script.txtExport=txtExport
isisfish.script.update=Update
-isisfish.season.toString=season {0}-{1}
isisfish.selectivity.equation=Equation
isisfish.selectivity.selectPopulation=Select a population
isisfish.selectivity.title=Selectivity
@@ -930,8 +610,6 @@
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 ''{0}''
-isisfish.simulation.log.showConsole=display log console for simulation {0}
isisfish.simulation.menu.about=About
isisfish.simulation.menu.close=Close
isisfish.simulation.menu.file=File
@@ -952,16 +630,9 @@
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={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.tripType.comments=Comments
isisfish.tripType.duration=Duration
isisfish.tripType.minTime=Minimum time between trips
@@ -973,9 +644,6 @@
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 {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
@@ -1002,7 +670,6 @@
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
@@ -1046,36 +713,4 @@
isisfish.zone.comments=Comments
isisfish.zone.name=Name
isisfish.zone.title=inputZone
-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 {0}
-lutinutil.error.fieldmodel.already.registred=FieldAccess [{0}] is already registred
-lutinutil.error.fieldmodel.not.registred=could not found a matching entry in cache for [{0}]
-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 {0}
-lutinutil.error.init.no.config=should invoke {0}\#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\ {0}=no properties found or unsafe properties found {0}
-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}.
+null)\ {\ \ \ \ \ \ \ \ \ \ \ \ logMail\ =
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-04 16:48:31 UTC (rev 1280)
+++ trunk/isis-fish/src/resources/i18n/isis-fish-fr_FR.properties 2008-08-04 16:59:55 UTC (rev 1281)
@@ -1,17 +1,78 @@
-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
-Can't\ instanciate\ export\ {0}=Can't instanciate export {0}
-Checkout\ pom.xml\ to\ {0}=
+=
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 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=
Info=Info
-Region\ {0}\ allready\ exist\ in\ repository.\ Can''t\ import=
-could\ not\ close\ reader\ {0}=could not close reader {0}
-could\ not\ create\ simulation\ filter\ model\ for\ reason\ {0}=could not create simulation filter model for reason {0}
-could\ not\ filter\ on\ simulations=could not filter on simulations
-could\ not\ found\ log\ file\ {0}=could not found log file {0}
-could\ not\ read\ at\ offset\ {0}\ for\ reason\ {1}=could not read at offset {0} for reason {1}
-filter\ loaded\ in\ {0}\ ms\ \:\ found\ {1}\ lines.=filter loaded in {0} ms \: found {1} lines.
+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\ =
isisfish.about.site=http\://isisfish.labs.libre-entreprise.org - by B.Poussin
isisfish.about.text=Simulateur Isis-Fish
isisfish.about.title=A propos...
@@ -30,7 +91,6 @@
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
@@ -47,17 +107,14 @@
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 {0}
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
@@ -84,73 +141,6 @@
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
@@ -158,7 +148,6 @@
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={0} {1}
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
@@ -170,31 +159,14 @@
isisfish.effortDescription.otherRunningCost=Autres co\u00FBts
isisfish.effortDescription.repairAndMaintenanceGearCost=repairAndMaintenanceGearCost
isisfish.effortDescription.title=inputEffortDescription
-isisfish.effortDescription.toString=EffortDescription for {0} with {1}
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.file=Can't add file {0}
-isisfish.error.add.logger.simulation\ =isisfish.error.add.logger.simulation
+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.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
-isisfish.error.change.classloader=Can''t change classloader because can''t create URL from file {0}
-isisfish.error.change.equation=Can't change equation
-isisfish.error.check.region=Can't check region
-isisfish.error.checkout.module=Can''t checkout module {0}
-isisfish.error.commit.files=Can''t commit files {0}
-isisfish.error.compile.script=Can''t compile script\: {0}
-isisfish.error.compiled.parameter=Can't get rule parameter from compiled class
-isisfish.error.connect.server=Can't connect to server
+isisfish.error.checkout.module",\ module),\ eee);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ break;\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ }\ \ \ \ public\ static\ void\ doCheckoutModule(VCSHandler\ handler,\ IsisConfig.Module\ module,\ String\ category)\ {\ \ \ \ \ \ \ \ File\ f\ =
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 {0}
-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 {0} 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
@@ -212,122 +184,31 @@
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\: {0}
-isisfish.error.evaluate.equation=Can''t evaluate equation\: {0}
-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 {0} existe d\u00E9j\u00E9, vous devez utiliser l''option [force] pour forcer l''\u00E9crasement.
-isisfish.error.file.already.exists=The file {0} 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\: {0}
-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 {0}
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
-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.invalid.category.name=Le nom de la cat\u00E9gorie {0} 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 {0} 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 {0}, availables \: {1}
-isisfish.error.invalid.simulation.index=Invalid simulation index {0}
-isisfish.error.invalid.simulation.index.availables=Invalid simulation index {0}, availables \: {1}
isisfish.error.invalid.values.params=Param\u00E8tre controlable hors valeurs possibles
isisfish.error.invalidate.natural.death=mortalite naturelle invalide
-isisfish.error.invalide.simulation.index=Invalide simulation index
-isisfish.error.invoke.method=Can't invoke method '{0}' for class {1}
-isisfish.error.load.class=Can't load class\: {0}
-isisfish.error.load.classloader=Can''t create ClassLoader for script, bad directory\: {0} for reason {1}
-isisfish.error.load.file=could not load file {0}
-isisfish.error.load.map=Can't load map file\: {0}
-isisfish.error.log.closeAppender=n''a pas pu ferme l''appender {0} et la categorie {1}
-isisfish.error.log.console.dispose=Une erreur est survenue pendant la fermeture de la console {0} de log, raison {1}
-isisfish.error.log.createAppender=n''a pas pu creer l''appender [{0}] \: {1} pour la raison {2}
-isisfish.error.log.foundAppender=n''a pas trouve l''appender {0} pour la categorie {1}
+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.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.null.time.step=Error, the time step should not be null
+isisfish.error.no.matrix"\ +\ name));\ \ \ \ \ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ }\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ resume.append("\\n\\n=
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 {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.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}
-isisfish.error.not.found.field.class=could not found field {0} for class {1}
-isisfish.error.not.found.species.population.container=Can't find species ({0}) 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 {0}
-isisfish.error.obtain.field.analyseplan=Can''t obtain field @Doc for AnalysePlan {0}
-isisfish.error.obtain.information.file=could not obtain information file for simulation {0}
-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 {0}
-isisfish.error.parse.long=Can''t parse long {0}
-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 {0}
-isisfish.error.read.simulation.parameters=Can''t read simulation parameters from file {0}
-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 {0}
-isisfish.error.remove.file=Can't remove file {0}
-isisfish.error.rename.region=Can't rename region to {0}
-isisfish.error.save.checkSum.compilation=Can't save checkSum to compilation\: {0}
-isisfish.error.save.region=Can't save region
-isisfish.error.save.script.compilation=Can't save script to compilation\: {0}
-isisfish.error.save.simulation.parameters=Can't save simulation parameters in file {0}
-isisfish.error.script.check=N''a pas pu compiler le fichier {0} pour la raison suivante {1}
-isisfish.error.script.commit=N''a pas pu commiter le fichier {0} pour la raison suivante {1}
-isisfish.error.script.create=isisfish.error.script.create
-isisfish.error.script.delete=N''a pas pu supprimer le fichier {0} pour la raison suivante {1}
-isisfish.error.script.diff=N''a pas pu calculer le diff du fichier {0} pour la raison suivante {1}
-isisfish.error.script.evaluate=N''a pas pu \u00E9valuer le fichier {0} pour la raison suivante {1}
-isisfish.error.script.export=N''a pas pu exporter pour la raison suivante {0}
-isisfish.error.script.import=N''a pas pu importer pour la raison suivante {0}
-isisfish.error.script.load=N''a pas pu charger le fichier {0} pour la raison suivante {1}
-isisfish.error.script.save=N''a pas pu sauver le fichier {0} pour la raison suivante {1}
-isisfish.error.script.update=N''a pas pu mettre \u00E0 jour le fichier {0} pour la raison suivante {1}
-isisfish.error.simulation.log.openAppender=n''a pas pu ouvrir l''appender de la simulation {0} pour la raison {1}
-isisfish.error.simulation.resultXml.close=Can't close simulation result XML for reason {0}
-isisfish.error.simulation.resultXml.open=Can't open simulation result XML for reason {0}
-isisfish.error.simulation.resultXml.write=Can't write simulation result XML for reason {0}
-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\: {0}
-isisfish.error.strategy.order=Strategy {0} don't have 12 StrategyMonthInfo but {1}. Recreate them
isisfish.error.text=The follow error occur during action
isisfish.error.title=Erreur
isisfish.error.undefined.classes=pas de classes d\u00E9finies
@@ -343,16 +224,8 @@
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.unsupported.equation.langage=unsupported langage ''{0}'' for equation\: {1}
-isisfish.error.update.file=Can''t update file ''{0}''
-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 {0}, clef priv\u00E9e {1}
-isisfish.error.vcs.pre.migrate=pendant la migration, la sauvegarde de votre base {0} n''a pas pu \u00EAtre effectu\u00E9e pour la raison suivante {1}, une nouvelle base est cr\u00E9e ici {2}.
-isisfish.error.wait.simThread=Can't wait SimThread
-isisfish.error.while.simulation=error while simulation {0}
-isisfish.error.write.simulation=Can''t write information {0}
+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.exit.text=Quelque chose a chang\u00E9, merci de saisir un commentaire
isisfish.exit.title=Exit
isisfish.export.directory=Dossier d'export
@@ -375,8 +248,6 @@
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
@@ -480,149 +351,35 @@
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 {0} - version {1}
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 {0}.
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 {0} 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 {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.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 ... {0}
-isisfish.launch.stop=Stopping simulation...
-isisfish.launching=after init done in {0}.
-isisfish.log.addAppender=ajoute un appender [{0}]
isisfish.log.body=Message \u00E0 joindre
-isisfish.log.closeAppender=ferme l''appender [{0}] pour la categorie {1}
-isisfish.log.mail.failed=Impossible d'envoyer le rapport par courriel. Le serveur smtp fonctionne ? (J'essaye de contacter < {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.mail.send.title",\ simulationFile.getName()));\ \ \ \ \ \ \ \ this.from\ =
isisfish.log.mailTo=Adresse du destinataire
-isisfish.log.removeAppender=supprime l''appender [{0}]
-isisfish.log.restoreLogLevel=repositionne le niveau du logger {0} du niveau {1} au niveau {2}
isisfish.log.sendAll=Envoyer la simulation complete
isisfish.log.sendMail=Envoyer par email
-isisfish.log.simulation.name=IsisFish simulation {0}
-isisfish.log.swapLogLevel=permute le niveau du logger {0} du niveau {1} au niveau {2}
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 {0} fichiers {1}.
-isisfish.message.add.objets.simulation=Add new objets simulation
-isisfish.message.add.queue={0} ajout\u00E9e \u00E0 la queue de simulations
-isisfish.message.add.queue.remote={0} 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.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 {0} ...
-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.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} ]
-isisfish.message.create.region.canceled=Creation de r\u00E9gion annul\u00E9e
-isisfish.message.creating.region=En train de cr\u00E9er la r\u00E9gion {0}
-isisfish.message.creation.done=cr\u00E9ation termin\u00E9e {0}
-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 {0}, tous les objets suivant seront aussi supprim\u00E9s \\n\\n
-isisfish.message.diff.finished=fichier dans l''\u00E9tat {0}
-isisfish.message.directory.not.exists=Le r\u00E9pertoire parent de {0} 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 {0}
-isisfish.message.export.result=zip {0} fichier(s) dans l''archive {1} (taille {2})
-isisfish.message.export.scripts.file=Export vers le fichier {0}
-isisfish.message.export.zip=Exporter dans le fichier zip {0}
-isisfish.message.file.already.exists=Le fichier existe {0} d\u00E9j\u00E0, Voulez-vous l''\u00E9craser ?
-isisfish.message.file.overwrite=Le fichier existe, Voulez-vous l''\u00E9craser ?
-isisfish.message.import=Importer {0}
-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 {0}
-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 \: {0} ({1}, {2})
-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 {0}, \u00E9tant un ''{1}''
-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 {0}.
-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 {0} ...
+isisfish.message.load.map",\ filename,\ shp,\ ssx));\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ addShapeLayer(filename,\ shp,\ ssx,\ "ff000000",\ "ffbdde83=
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 {0}
-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={0} saison {1}-{2}
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
@@ -632,44 +389,7 @@
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 {0}]
-isisfish.migration.svn.protocol.description=Migration de SVN [v {0} - {1}] vers SVN [v {2} - {3}]
-isisfish.migration.svn.version.description=Migration de SVN [v {0} - {1}] vers SVN [v {2} - {3}]
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 ''{0}'' au niveau ''{1}''
isisfish.params.clearFilter=Reset filtre
isisfish.params.description=Description
isisfish.params.filter=Filtrer
@@ -680,31 +400,9 @@
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\: {0}\\n\\n
-isisfish.params.toString.lib.logger.level=niveau du logger de librairies {0}
-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.rule=Rule\: {0}
-isisfish.params.toString.script.logger.level=niveau du logger de scripts {0}
-isisfish.params.toString.script.presimulation=Script de presimulation
-isisfish.params.toString.simul.logger.level=niveau du logger de simulateur {0}
-isisfish.params.toString.simulation.done=Simulation r\u00E9alis\u00E9e avec {0}\:
-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
@@ -729,7 +427,6 @@
isisfish.populationGroup.price=prix
isisfish.populationGroup.reproductionRate=Taux de reproduction
isisfish.populationGroup.title=Saisie des groupes de population
-isisfish.populationGroup.toString={0} Groupe {1}
isisfish.populationMigration.comments=Commentaires
isisfish.populationMigration.selectSeason=S\u00E9lectionnez une saison
isisfish.populationMigration.title=Migration
@@ -749,15 +446,6 @@
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={0} saison {1}-{2}
isisfish.populationSeasons.Reproduction=Reproduction
isisfish.populationSeasons.changeGroup=Changement de groupe
isisfish.populationSeasons.comments=Commentaires
@@ -780,14 +468,8 @@
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
@@ -802,7 +484,6 @@
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
@@ -895,7 +576,6 @@
isisfish.script.title=Editeur de scripts
isisfish.script.txtExport=Exporter
isisfish.script.update=Mettre \u00E0 jour
-isisfish.season.toString=saison {0}-{1}
isisfish.selectivity.equation=Equation
isisfish.selectivity.selectPopulation=S\u00E9lectionnez une population
isisfish.selectivity.title=S\u00E9lectivit\u00E9
@@ -930,8 +610,6 @@
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 ''{0}''
-isisfish.simulation.log.showConsole=affichage de la console de log pour la simulation {0}
isisfish.simulation.menu.about=A propos
isisfish.simulation.menu.close=Fermer
isisfish.simulation.menu.file=Fichier
@@ -952,16 +630,9 @@
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={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.tripType.comments=Commentaires
isisfish.tripType.duration=Dur\u00E9e
isisfish.tripType.minTime=Temps minimal entre deux voyages
@@ -973,9 +644,6 @@
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 {0}s.\nLa nouvelle base est localis\u00E9e ici [{1}]
isisfish.vcs.update=R\u00E9sultats de la synchronisation avec le serveur
isisfish.vcs.update.cancel=annuler
isisfish.vcs.update.checkAll=(de)-select tout
@@ -1002,7 +670,6 @@
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
@@ -1046,36 +713,4 @@
isisfish.zone.comments=Commentaires
isisfish.zone.name=Nom
isisfish.zone.title=Saisie zone
-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 {0}
-lutinutil.error.fieldmodel.already.registred=FieldAccess [{0}] is already registred
-lutinutil.error.fieldmodel.not.registred=could not found a matching entry in cache for [{0}]
-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 {0}
-lutinutil.error.init.no.config=should invoke {0}\#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\ {0}=no properties found or unsafe properties found {0}
-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}.
+null)\ {\ \ \ \ \ \ \ \ \ \ \ \ logMail\ =
1
0
Author: bpoussin
Date: 2008-08-04 16:48:31 +0000 (Mon, 04 Aug 2008)
New Revision: 1280
Added:
branches/4.0.0.0/
Log:
creation de la branvhe pour le developpement de la version 4.0.0.0
Copied: branches/4.0.0.0 (from rev 1279, trunk)
1
0