Tutti-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
- 4058 discussions
22 Apr '13
Author: kmorin
Date: 2013-04-22 15:45:11 +0200 (Mon, 22 Apr 2013)
New Revision: 853
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/853
Log:
fixes #1987 [PROTOCOLE] - Gestion des contr?\195?\180les/infos obligatoires en validation
Modified:
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-04-22 13:44:25 UTC (rev 852)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-04-22 13:45:11 UTC (rev 853)
@@ -7,7 +7,6 @@
tutti.about.bottomText=Copyright %s - %s - version %s
tutti.about.message=<h3>Tutti</h3><p><strong>Outil de saisie de données d'opérations et de captures au cours des campagnes halieutiques.</strong></p><br/><p>Ce logiciel permettra la saisie en mer des données d'opération de pêche (positions, environnement, engin, etc) et des captures associées (composition de la capture en espèces scientifiques avec poids, nombres, tailles etc) pour l'ensemble des campagnes halieutiques réalisées par l'Ifremer.</p><p>Ce projet a été initiée en 2012 par l'<a href\="http\://www.ifremer.fr">Ifremer</a> et réalisé par la société <a href\="http\://codelutin.com">Codelutin</a>.</p><hr/><br/><p>Pour plus d'informations, vous pouvez visiter le <a href\="http\://maven-site.forge.codelutin.com/tutti">site du projet</a>.</p><p>Projet hébergé sur la forge <a href\="http\://forge.codelutin.com/projects/tutti">Forge.codelutin.com</a>.</p>
tutti.about.title=À propos de Tutti
-tutti.label.tab.species=Espèces
tutti.about.translate.content=<h2>Comment traduire Tutti</h2>Vous pouvez nous aider à traduire Tutti.<hr/><br/><ul><li>Récupérer le fichier <a href\="%s">tutti-i18n.csv</a> dans le répertoire <strong>i18n</strong></li><li>ouvrez le avec un tableur (le caractère séprateur est une Tabultation)</li><li>Traduisez, Améliorer, ...</li><li>Enfin renvoyez-le nous</li></ul><br/>Nous intégrerons vos modifications avant la prochaine version.
tutti.about.translate.title=Traduire Tutti
tutti.about.update.app.noup.detail=<tr><td>%1$s</td><td>%2$s</td><td>%2$s<td><td></td></tr>
@@ -353,7 +352,7 @@
tutti.editCatchBatch.action.importPupitri.existingData.message=Des espèces ont déjà été saisies dans la capture. Si vous continuez, elles vont être écrasées.
tutti.editCatchBatch.action.importPupitri.existingData.title=Données existantes
tutti.editCatchBatch.action.importPupitri.mnemonic=I
-tutti.editCatchBatch.action.importPupitri.success=
+tutti.editCatchBatch.action.importPupitri.success=Import Pupitri réussi \: %1s espèces importées, %2s espèces rejetées
tutti.editCatchBatch.action.importPupitri.tip=Import Pupitri
tutti.editCatchBatch.action.saveCatchBatch=Sauver
tutti.editCatchBatch.action.saveCatchBatch.mnemonic=S
1
0
r852 - in trunk: tutti-service/src/main/java/fr/ifremer/tutti/service/config tutti-service/src/main/java/fr/ifremer/tutti/service/export tutti-service/src/main/resources/i18n tutti-service/src/test/java/fr/ifremer/tutti/service/export tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/config tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home tutti-ui-swing/src/main/resources/i18n
by tchemit@users.forge.codelutin.com 22 Apr '13
by tchemit@users.forge.codelutin.com 22 Apr '13
22 Apr '13
Author: tchemit
Date: 2013-04-22 15:44:25 +0200 (Mon, 22 Apr 2013)
New Revision: 852
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/852
Log:
refs #1875: [IMP/EXP] - Export des donn?\195?\169es de campagne : format g?\195?\169n?\195?\169rique (desactivation pour le moment des
actions + deplacement de la configuration dans le module service)
Modified:
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/config/TuttiServiceConfig.java
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/config/TuttiServiceConfigOption.java
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/CatchExportModel.java
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/TuttiExportService.java
trunk/tutti-service/src/main/resources/i18n/tutti-service_en_GB.properties
trunk/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties
trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/export/TuttiExportServiceTest.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/config/TuttiApplicationConfig.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/config/TuttiApplicationConfigOption.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUI.css
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/config/TuttiServiceConfig.java
===================================================================
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/config/TuttiServiceConfig.java 2013-04-22 13:38:24 UTC (rev 851)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/config/TuttiServiceConfig.java 2013-04-22 13:44:25 UTC (rev 852)
@@ -31,6 +31,7 @@
import java.io.File;
import java.net.URL;
+import java.util.List;
/**
* Configuration for the service layer.
@@ -111,6 +112,11 @@
TuttiServiceConfigOption.EXPORT_COUNTRY_ID.getKey());
}
+ public List<Integer> getSamplingOrderIds() {
+ ApplicationConfig.OptionList result = applicationConfig.getOptionAsList(TuttiServiceConfigOption.SAMPLING_CATEGORY_ORDER_IDS.getKey());
+ return result.getOptionAsInt();
+ }
+
public void prepareDirectories() {
File dataDirectory = getDataDirectory();
Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/config/TuttiServiceConfigOption.java
===================================================================
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/config/TuttiServiceConfigOption.java 2013-04-22 13:38:24 UTC (rev 851)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/config/TuttiServiceConfigOption.java 2013-04-22 13:44:25 UTC (rev 852)
@@ -72,6 +72,12 @@
n_("tutti.config.option.export.countryId.description"),
"12",
String.class),
+ SAMPLING_CATEGORY_ORDER_IDS(
+ "tutti.samplingCategoryOrderIds",
+ n_("tutti.config.option.samplingCategoryOrderIds.description"),
+ "198,196,174,1430",
+ Integer[].class
+ ),
// TRANSIENT CONFIG
VERSION(
Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/CatchExportModel.java
===================================================================
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/CatchExportModel.java 2013-04-22 13:38:24 UTC (rev 851)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/CatchExportModel.java 2013-04-22 13:44:25 UTC (rev 852)
@@ -29,8 +29,10 @@
import fr.ifremer.tutti.persistence.entities.data.Cruise;
import fr.ifremer.tutti.persistence.entities.data.FishingOperation;
import fr.ifremer.tutti.persistence.entities.data.Program;
+import fr.ifremer.tutti.persistence.entities.data.SampleCategoryEnum;
import fr.ifremer.tutti.persistence.entities.data.SpeciesBatch;
import fr.ifremer.tutti.persistence.entities.data.SpeciesBatchFrequency;
+import fr.ifremer.tutti.persistence.entities.referential.Caracteristic;
import fr.ifremer.tutti.persistence.entities.referential.Gear;
import fr.ifremer.tutti.persistence.entities.referential.Species;
import fr.ifremer.tutti.persistence.entities.referential.Vessel;
@@ -49,7 +51,7 @@
*/
public class CatchExportModel extends TuttiCsvUtil.AbstractTuttiExportModel<CatchExportRow> {
- public CatchExportModel(char separator) {
+ public CatchExportModel(char separator, List<SampleCategoryEnum> samplingOrder) {
super(separator);
newColumnForExport("Annee", Cruise.PROPERTY_BEGIN_DATE, TuttiCsvUtil.YEAR);
@@ -68,38 +70,51 @@
newColumnForExport("Type_Volume_Poids_Taxon", CatchExportRow.SPECIES_SAMPLE_CATEGORY);
newColumnForExport("Unite_Volume_Poids_Taxon", CatchExportRow.SPECIES_SAMPLE_CATEGORY);
- newColumnForExport("Vrac/Hors_Vrac", CatchExportRow.SORTED_UNSORTED_SAMPLE_CATEGORY);
- newColumnForExport("NumOrdre_Vrac_H2", CatchExportRow.SORTED_UNSORTED_SAMPLE_CATEGORY);
- newColumnForExport("Tot_Vrac", CatchExportRow.SORTED_UNSORTED_SAMPLE_CATEGORY);
- newColumnForExport("Ech_Vrac", CatchExportRow.SORTED_UNSORTED_SAMPLE_CATEGORY);
- newColumnForExport("Type_Volume_Poids_Vrac", CatchExportRow.SORTED_UNSORTED_SAMPLE_CATEGORY);
- newColumnForExport("Unite_Volume_Poids_Vrac", CatchExportRow.SORTED_UNSORTED_SAMPLE_CATEGORY);
+ for (SampleCategoryEnum sampleCategoryEnum : samplingOrder) {
+ switch (sampleCategoryEnum) {
- newColumnForExport("Categorie", CatchExportRow.SIZE_SAMPLE_CATEGORY);
- newColumnForExport("NumOrdre_Cat_H2", CatchExportRow.SIZE_SAMPLE_CATEGORY);
- newColumnForExport("Tot_Cat", CatchExportRow.SIZE_SAMPLE_CATEGORY);
- newColumnForExport("Ech_Cat", CatchExportRow.SIZE_SAMPLE_CATEGORY);
- newColumnForExport("Type_Volume_Poids_Cat", CatchExportRow.SIZE_SAMPLE_CATEGORY);
- newColumnForExport("Unite_Volume_Poids_Cat", CatchExportRow.SIZE_SAMPLE_CATEGORY);
+ case sortedUnsorted:
+ newColumnForExport("Vrac/Hors_Vrac", CatchExportRow.SORTED_UNSORTED_SAMPLE_CATEGORY);
+ newColumnForExport("NumOrdre_Vrac_H2", CatchExportRow.SORTED_UNSORTED_SAMPLE_CATEGORY);
+ newColumnForExport("Tot_Vrac", CatchExportRow.SORTED_UNSORTED_SAMPLE_CATEGORY);
+ newColumnForExport("Ech_Vrac", CatchExportRow.SORTED_UNSORTED_SAMPLE_CATEGORY);
+ newColumnForExport("Type_Volume_Poids_Vrac", CatchExportRow.SORTED_UNSORTED_SAMPLE_CATEGORY);
+ newColumnForExport("Unite_Volume_Poids_Vrac", CatchExportRow.SORTED_UNSORTED_SAMPLE_CATEGORY);
+ break;
+ case size:
+ newColumnForExport("Categorie", CatchExportRow.SIZE_SAMPLE_CATEGORY);
+ newColumnForExport("NumOrdre_Cat_H2", CatchExportRow.SIZE_SAMPLE_CATEGORY);
+ newColumnForExport("Tot_Cat", CatchExportRow.SIZE_SAMPLE_CATEGORY);
+ newColumnForExport("Ech_Cat", CatchExportRow.SIZE_SAMPLE_CATEGORY);
+ newColumnForExport("Type_Volume_Poids_Cat", CatchExportRow.SIZE_SAMPLE_CATEGORY);
+ newColumnForExport("Unite_Volume_Poids_Cat", CatchExportRow.SIZE_SAMPLE_CATEGORY);
+ break;
+ case sex:
+ newColumnForExport("Sexe", CatchExportRow.SEX_SAMPLE_CATEGORY);
+ newColumnForExport("NumOrdre_Sexe_H2", CatchExportRow.SEX_SAMPLE_CATEGORY);
+ newColumnForExport("Tot_Sexe", CatchExportRow.SEX_SAMPLE_CATEGORY);
+ newColumnForExport("Ech_Sexe", CatchExportRow.SEX_SAMPLE_CATEGORY);
+ newColumnForExport("Type_Volume_Poids_Sexe", CatchExportRow.SEX_SAMPLE_CATEGORY);
+ newColumnForExport("Unite_Volume_Poids_Sexe", CatchExportRow.SEX_SAMPLE_CATEGORY);
+ break;
+ case maturity:
+ newColumnForExport("Maturite", CatchExportRow.MATURITY_SAMPLE_CATEGORY);
+ newColumnForExport("NumOrdre_Maturite_H2", CatchExportRow.MATURITY_SAMPLE_CATEGORY);
+ newColumnForExport("Tot_Maturite", CatchExportRow.MATURITY_SAMPLE_CATEGORY);
+ newColumnForExport("Ech_Maturite", CatchExportRow.MATURITY_SAMPLE_CATEGORY);
+ newColumnForExport("Type_Volume_Poids_Maturite", CatchExportRow.MATURITY_SAMPLE_CATEGORY);
+ newColumnForExport("Unite_Volume_Poids_Maturite", CatchExportRow.MATURITY_SAMPLE_CATEGORY);
+ break;
+ case age:
+ newColumnForExport("Age", CatchExportRow.AGE_SAMPLE_CATEGORY);
+ newColumnForExport("Num_Ordre_Age_H2", CatchExportRow.AGE_SAMPLE_CATEGORY);
+ break;
+ }
+ }
- newColumnForExport("Sexe", CatchExportRow.SEX_SAMPLE_CATEGORY);
- newColumnForExport("NumOrdre_Sexe_H2", CatchExportRow.SEX_SAMPLE_CATEGORY);
- newColumnForExport("Tot_Sexe", CatchExportRow.SEX_SAMPLE_CATEGORY);
- newColumnForExport("Ech_Sexe", CatchExportRow.SEX_SAMPLE_CATEGORY);
- newColumnForExport("Type_Volume_Poids_Sexe", CatchExportRow.SEX_SAMPLE_CATEGORY);
- newColumnForExport("Unite_Volume_Poids_Sexe", CatchExportRow.SEX_SAMPLE_CATEGORY);
+ // mensuration
- newColumnForExport("Maturite", CatchExportRow.MATURITY_SAMPLE_CATEGORY);
- newColumnForExport("NumOrdre_Maturite_H2", CatchExportRow.MATURITY_SAMPLE_CATEGORY);
- newColumnForExport("Tot_Maturite", CatchExportRow.MATURITY_SAMPLE_CATEGORY);
- newColumnForExport("Ech_Maturite", CatchExportRow.MATURITY_SAMPLE_CATEGORY);
- newColumnForExport("Type_Volume_Poids_Maturite", CatchExportRow.MATURITY_SAMPLE_CATEGORY);
- newColumnForExport("Unite_Volume_Poids_Maturite", CatchExportRow.MATURITY_SAMPLE_CATEGORY);
-
- newColumnForExport("Age", CatchExportRow.AGE_SAMPLE_CATEGORY);
- newColumnForExport("Num_Ordre_Age_H2", CatchExportRow.AGE_SAMPLE_CATEGORY);
-
- newColumnForExport("Code_Longueur", CatchExportRow.FREQUENCY_LENGTH_STEP_CARACTERISTIC);
+ newColumnForExport("Code_Longueur", CatchExportRow.FREQUENCY_LENGTH_STEP_CARACTERISTIC, Caracteristic.PROPERTY_ID);
newColumnForExport("Taille", CatchExportRow.FREQUENCY_LENGTH_STEP);
newColumnForExport("NumOrdre_Taille_H2", Cruise.PROPERTY_HEAD_OF_MISSION);
newColumnForExport("Poids_Classe_Taille", CatchExportRow.FREQUENCY_WEIGHT);
Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/TuttiExportService.java
===================================================================
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/TuttiExportService.java 2013-04-22 13:38:24 UTC (rev 851)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/TuttiExportService.java 2013-04-22 13:44:25 UTC (rev 852)
@@ -40,6 +40,7 @@
import fr.ifremer.tutti.persistence.entities.data.FishingOperation;
import fr.ifremer.tutti.persistence.entities.data.MarineLitterBatch;
import fr.ifremer.tutti.persistence.entities.data.Program;
+import fr.ifremer.tutti.persistence.entities.data.SampleCategoryEnum;
import fr.ifremer.tutti.persistence.entities.data.SpeciesBatch;
import fr.ifremer.tutti.persistence.entities.referential.Caracteristic;
import fr.ifremer.tutti.persistence.entities.referential.TuttiLocation;
@@ -86,14 +87,16 @@
protected char csvSeparator;
- private Caracteristic verticalOpeningCaracteristic;
+ protected Caracteristic verticalOpeningCaracteristic;
- private Caracteristic horizontalOpeningWingCaracteristic;
+ protected Caracteristic horizontalOpeningWingCaracteristic;
- private Caracteristic horizontalOpeningDoorCaracteristic;
+ protected Caracteristic horizontalOpeningDoorCaracteristic;
- private TuttiLocation country;
+ protected TuttiLocation country;
+ protected List<SampleCategoryEnum> samplingOrder;
+
@Override
public void setServiceContext(TuttiServiceContext context) {
super.setServiceContext(context);
@@ -108,6 +111,20 @@
List<TuttiLocation> allCountry = persistenceService.getAllCountry();
String countryId = context.getConfig().getExportCountryId();
country = TuttiEntities.splitById(allCountry).get(countryId);
+
+ Map<Integer, SampleCategoryEnum> idMapping = SampleCategoryEnum.toIdMapping();
+
+ samplingOrder = Lists.newArrayList();
+
+ // always first sampling category
+ samplingOrder.add(SampleCategoryEnum.sortedUnsorted);
+
+ for (Integer categoryId : context.getConfig().getSamplingOrderIds()) {
+ SampleCategoryEnum categoryEnum = idMapping.get(categoryId);
+ if (SampleCategoryEnum.sortedUnsorted != categoryEnum) {
+ samplingOrder.add(categoryEnum);
+ }
+ }
}
public void exportProgram(String programId,
@@ -190,7 +207,8 @@
decoratorService,
verticalOpeningCaracteristic,
horizontalOpeningWingCaracteristic,
- horizontalOpeningDoorCaracteristic);
+ horizontalOpeningDoorCaracteristic,
+ samplingOrder);
}
protected void checkCruise(ProgressionModel progressionModel, Cruise cruise) {
@@ -397,7 +415,8 @@
DecoratorService decoratorService,
Caracteristic verticalOpeningCaracteristic,
Caracteristic horizontalOpeningWingCaracteristic,
- Caracteristic horizontalOpeningDoorCaracteristic) {
+ Caracteristic horizontalOpeningDoorCaracteristic,
+ List<SampleCategoryEnum> samplingOrder) {
try {
@@ -431,7 +450,7 @@
parameterModel = new ParameterExportModel(
csvSeparator, decoratorService);
- catchModel = new CatchExportModel(csvSeparator);
+ catchModel = new CatchExportModel(csvSeparator, samplingOrder);
surveyExport = TuttiCsvUtil.newRepeatableExport(
surveyModel);
Modified: trunk/tutti-service/src/main/resources/i18n/tutti-service_en_GB.properties
===================================================================
--- trunk/tutti-service/src/main/resources/i18n/tutti-service_en_GB.properties 2013-04-22 13:38:24 UTC (rev 851)
+++ trunk/tutti-service/src/main/resources/i18n/tutti-service_en_GB.properties 2013-04-22 13:44:25 UTC (rev 852)
@@ -4,6 +4,7 @@
tutti.config.option.export.countryId.description=
tutti.config.option.inceptionYear.description=
tutti.config.option.organizationName.description=
+tutti.config.option.samplingCategoryOrderIds.description=
tutti.config.option.site.url.description=
tutti.config.option.tmp.directory.description=
tutti.config.option.version.description=
Modified: trunk/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties
===================================================================
--- trunk/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties 2013-04-22 13:38:24 UTC (rev 851)
+++ trunk/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties 2013-04-22 13:44:25 UTC (rev 852)
@@ -4,6 +4,7 @@
tutti.config.option.export.countryId.description=L'id du pays à utiliser pour les exports (il s'agit de la valeur LOCATION.ID).
tutti.config.option.inceptionYear.description=Année de démarrage du projet.
tutti.config.option.organizationName.description=Nom de l'organisation dans la licence
+tutti.config.option.samplingCategoryOrderIds.description=Ordre des catégories d'échantillonnage
tutti.config.option.site.url.description=Url du site internet de l'application
tutti.config.option.tmp.directory.description=Répertoire temporaire utilisée par l'application (est nettoyé à chaque démarrage de l'application).
tutti.config.option.version.description=Version courante de l'application
Modified: trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/export/TuttiExportServiceTest.java
===================================================================
--- trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/export/TuttiExportServiceTest.java 2013-04-22 13:38:24 UTC (rev 851)
+++ trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/export/TuttiExportServiceTest.java 2013-04-22 13:44:25 UTC (rev 852)
@@ -34,6 +34,7 @@
import fr.ifremer.tutti.persistence.entities.data.Cruise;
import fr.ifremer.tutti.persistence.entities.data.FishingOperation;
import fr.ifremer.tutti.persistence.entities.data.Program;
+import fr.ifremer.tutti.persistence.entities.data.SampleCategoryEnum;
import fr.ifremer.tutti.persistence.entities.referential.Caracteristic;
import fr.ifremer.tutti.persistence.entities.referential.CaracteristicQualitativeValue;
import fr.ifremer.tutti.persistence.entities.referential.CaracteristicType;
@@ -101,6 +102,17 @@
cruise = createCruise();
operations = createOperations(cruise);
+ SampleCategoryEnum.sortedUnsorted.setFieldValue(1428);
+ SampleCategoryEnum.sortedUnsorted.setInit(true);
+ SampleCategoryEnum.size.setFieldValue(198);
+ SampleCategoryEnum.size.setInit(true);
+ SampleCategoryEnum.sex.setFieldValue(196);
+ SampleCategoryEnum.sex.setInit(true);
+ SampleCategoryEnum.maturity.setFieldValue(174);
+ SampleCategoryEnum.maturity.setInit(true);
+ SampleCategoryEnum.age.setFieldValue(1430);
+ SampleCategoryEnum.age.setInit(true);
+
Map<String,FishingOperation> operationMap = TuttiEntities.splitById(operations);
serviceContext.getConfig().setCsvSeparator(';');
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/config/TuttiApplicationConfig.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/config/TuttiApplicationConfig.java 2013-04-22 13:38:24 UTC (rev 851)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/config/TuttiApplicationConfig.java 2013-04-22 13:44:25 UTC (rev 852)
@@ -226,11 +226,6 @@
return StringUtils.isBlank(result) ? null : result;
}
- public List<Integer> getSamplingOrderIds() {
- ApplicationConfig.OptionList result = applicationConfig.getOptionAsList(TuttiApplicationConfigOption.SAMPLING_CATEGORY_ORDER_IDS.getKey());
- return result.getOptionAsInt();
- }
-
public Color getColorRowInvalid() {
return applicationConfig.getOptionAsColor(TuttiApplicationConfigOption.COLOR_ROW_INVALID.getKey());
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/config/TuttiApplicationConfigOption.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/config/TuttiApplicationConfigOption.java 2013-04-22 13:38:24 UTC (rev 851)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/config/TuttiApplicationConfigOption.java 2013-04-22 13:44:25 UTC (rev 852)
@@ -125,13 +125,6 @@
String.class
),
- SAMPLING_CATEGORY_ORDER_IDS(
- "tutti.samplingCategoryOrderIds",
- n_("tutti.config.option.samplingCategoryOrderIds.description"),
- "198,196,174,1430",
- Integer[].class
- ),
-
AUTO_POPUP_NUMBER_EDITOR(
"tutti.ui.autoPopupNumberEditor",
n_("tutti.config.option.ui.autoPopupNumberEditor.description"),
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUI.css
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUI.css 2013-04-22 13:38:24 UTC (rev 851)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUI.css 2013-04-22 13:44:25 UTC (rev 852)
@@ -67,7 +67,6 @@
#editProgramButton {
actionIcon: edit;
text: "tutti.selectCruise.action.editProgram";
- enabled: {model.isProgramFound()};
_tuttiAction: {EditProgramAction.class};
toolTipText: "tutti.selectCruise.action.editProgram.tip";
_help: {"tutti.selectCruise.action.editProgram.help"};
@@ -76,7 +75,7 @@
#exportProgramButton {
actionIcon: export;
text: "tutti.selectCruise.action.exportProgram";
- enabled: {model.isProgramFound()};
+ enabled: false;
_tuttiAction: {ExportProgramAction.class};
toolTipText: "tutti.selectCruise.action.exportProgram.tip";
_help: {"tutti.selectCruise.action.exportProgram.help"};
@@ -122,6 +121,7 @@
#exportCruiseButton {
actionIcon: export;
text: "tutti.selectCruise.action.exportCruise";
+ enabled: false;
_tuttiAction: {ExportCruiseAction.class};
toolTipText: "tutti.selectCruise.action.exportCruise.tip";
_help: {"tutti.selectCruise.action.exportCruise.help"};
Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-04-22 13:38:24 UTC (rev 851)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-04-22 13:44:25 UTC (rev 852)
@@ -79,7 +79,6 @@
tutti.config.option.launch.mode.description=Mode de démarrage de l'application
tutti.config.option.programId.description=Identifiant de la dernière série de campagne utilisée
tutti.config.option.protocolId.description=Identifiant du dernier protocole utilisé
-tutti.config.option.samplingCategoryOrderIds.description=Ordre des catégories d'échantillonnage
tutti.config.option.tremieCarousselVessel.description=Navire ayant un carrousel et une trémie (ex. Thalassa)
tutti.config.option.ui.autoPopupNumberEditor.description=Toujours afficher le pavé numérique lors de l'édition d'un nombre
tutti.config.option.ui.color.blockingLayer.description=Couleur utilisée pour bloquer l'interface lors d'une action longue
1
0
r851 - trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service
by tchemit@users.forge.codelutin.com 22 Apr '13
by tchemit@users.forge.codelutin.com 22 Apr '13
22 Apr '13
Author: tchemit
Date: 2013-04-22 15:38:24 +0200 (Mon, 22 Apr 2013)
New Revision: 851
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/851
Log:
fixes #2345: [CAPTURES] Muavaise remont?\195?\169 des arbres d'?\195?\169chantillonage
Modified:
trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/BenthosBatchPersistenceServiceImpl.java
trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/SpeciesBatchPersistenceServiceImpl.java
Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/BenthosBatchPersistenceServiceImpl.java
===================================================================
--- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/BenthosBatchPersistenceServiceImpl.java 2013-04-22 13:37:22 UTC (rev 850)
+++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/BenthosBatchPersistenceServiceImpl.java 2013-04-22 13:38:24 UTC (rev 851)
@@ -43,6 +43,7 @@
import fr.ifremer.tutti.persistence.entities.data.BenthosBatch;
import fr.ifremer.tutti.persistence.entities.data.BenthosBatchFrequency;
import fr.ifremer.tutti.persistence.entities.data.SampleCategoryEnum;
+import fr.ifremer.tutti.persistence.entities.data.SpeciesBatch;
import fr.ifremer.tutti.persistence.entities.referential.Caracteristic;
import fr.ifremer.tutti.persistence.entities.referential.Species;
import fr.ifremer.tutti.persistence.service.batch.BatchPersistenceHelper;
@@ -115,10 +116,14 @@
BatchContainer<BenthosBatch> result = new BatchContainer<BenthosBatch>();
result.setId(vracBenthosBatch.getId());
- for (Batch batch1 : vracBenthosBatch.getChildBatchs()) {
- SortingBatch source = (SortingBatch) batch1;
+ for (Batch batch : vracBenthosBatch.getChildBatchs()) {
+ SortingBatch source = (SortingBatch) batch;
+ ReferenceTaxon referenceTaxon = source.getReferenceTaxon();
+ Preconditions.checkNotNull(referenceTaxon, "Can't have a rootBenthosBatch with a null taxon, but was for " + batch.getId());
+ Species species = referentialService.getSpeciesByReferenceTaxonId(referenceTaxon.getId());
BenthosBatch target = TuttiBeanFactory.newBenthosBatch();
+ target.setSpecies(species);
entityToBenthosBatch(source, target);
result.addChildren(target);
if (log.isInfoEnabled()) {
@@ -134,18 +139,18 @@
);
if (horsVracBenthosBatch != null) {
for (Batch batch : horsVracBenthosBatch.getChildBatchs()) {
+ SortingBatch source = (SortingBatch) batch;
+ ReferenceTaxon referenceTaxon = source.getReferenceTaxon();
+ Preconditions.checkNotNull(referenceTaxon, "Can't have a rootSpeciesBatch with a null taxon, but was for " + source.getId());
+ Species species = referentialService.getSpeciesByReferenceTaxonId(referenceTaxon.getId());
BenthosBatch target = TuttiBeanFactory.newBenthosBatch();
- entityToBenthosBatch((SortingBatch) batch, target);
+ target.setSpecies(species);
+
+ entityToBenthosBatch(source, target);
result.addChildren(target);
if (log.isInfoEnabled()) {
- String species;
- if (target.getSpecies() != null) {
- species = String.valueOf(target.getSpecies().getReferenceTaxonId());
- } else {
- species = "no species";
- }
- log.info("Loaded CatchBatch Hors Vrac > Benthos > " + species + " : " + target.getId());
+ log.info("Loaded CatchBatch Hors Vrac > Benthos > " + target.getSpecies().getReferenceTaxonId() + " : " + target.getId());
}
}
}
@@ -285,20 +290,6 @@
public List<BenthosBatchFrequency> getAllBenthosBatchFrequency(String benthosBatchId) {
Preconditions.checkNotNull(benthosBatchId);
-// List<BenthosBatchFrequency> results = Lists.newArrayList();
-//
-// Integer sortingBatchId = Integer.valueOf(benthosBatchId);
-// Integer catchBatchId = catchBatchDao.getIdBySortingBatchId(sortingBatchId);
-// Preconditions.checkNotNull(
-// catchBatchId,
-// "Could not find catchBatch for benthosBatch: " + benthosBatchId);
-//
-// CatchBatch catchBatch = catchBatchDao.loadFullTree(catchBatchId);
-//
-// SortingBatch sortingBatch = catchBatchDao.getSortingBatchById(
-// catchBatch, sortingBatchId);
-//
-// List<SortingBatch> frequencyChilds = batchHelper.getFrequencyChilds(sortingBatch);
List<SortingBatch> frequencyChilds = batchHelper.getFrequencies(benthosBatchId);
List<BenthosBatchFrequency> results = Lists.newArrayList();
for (SortingBatch child : frequencyChilds) {
@@ -346,10 +337,6 @@
for (SortingBatch child : frequencyChilds) {
notUpdatedChildIds.add(child.getId());
}
-// for (Batch batch : parentBatch.getChildBatchs()) {
-// SortingBatch sortingBatch = (SortingBatch) batch;
-// notUpdatedChildIds.add(sortingBatch.getId());
-// }
short rankOrder = 0;
List<SortingBatch> batchsToUpdate = Lists.newArrayList();
@@ -399,7 +386,6 @@
return Collections.unmodifiableList(frequencies);
}
-
//------------------------------------------------------------------------//
//-- Internal methods --//
//------------------------------------------------------------------------//
@@ -407,6 +393,8 @@
protected BenthosBatch entityToBenthosBatch(SortingBatch source,
BenthosBatch target) {
+ Preconditions.checkNotNull(target.getSpecies());
+
target.setId(source.getId().toString());
// Individual count
@@ -446,27 +434,15 @@
}
}
- // Species
- Integer referenceTaxonId = source.getInheritedReferenceTaxonId();
- if (referenceTaxonId == null && source.getReferenceTaxon() != null) {
- referenceTaxonId = source.getReferenceTaxon().getId();
- }
- if (referenceTaxonId != null) {
- // TODO : add cache on getSpeciesByReferenceTaxonId
- Species species = referentialService.getSpeciesByReferenceTaxonId(referenceTaxonId);
- target.setSpecies(species);
- }
- //FIXME-TC Check the test is still ok?
- //FIXME-TC We should a stronger test
-// if (target.getSampleCategoryType() != null && source.getChildBatchs().size() > 0) {
if (target.getSampleCategoryType() != null) {
List<BenthosBatch> targetChilds = Lists.newArrayList();
for (Batch batch : source.getChildBatchs()) {
SortingBatch sourceChild = (SortingBatch) batch;
BenthosBatch targetChild = TuttiBeanFactory.newBenthosBatch();
+ targetChild.setSpecies(target.getSpecies());
entityToBenthosBatch(sourceChild, targetChild);
if (log.isInfoEnabled()) {
- log.info("Loaded CatchBatch Hors Vrac > (Species|Benthos) > " + target.getSpecies().getReferenceTaxonId() + " : " + target.getId());
+ log.info("Loaded CatchBatch Hors Vrac > (Species|Benthos) > " + targetChild.getSpecies().getReferenceTaxonId() + " : " + target.getId());
}
if (targetChild.getSampleCategoryValue() != null) {
targetChilds.add(targetChild);
Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/SpeciesBatchPersistenceServiceImpl.java
===================================================================
--- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/SpeciesBatchPersistenceServiceImpl.java 2013-04-22 13:37:22 UTC (rev 850)
+++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/SpeciesBatchPersistenceServiceImpl.java 2013-04-22 13:38:24 UTC (rev 851)
@@ -116,10 +116,14 @@
BatchContainer<SpeciesBatch> result = new BatchContainer<SpeciesBatch>();
result.setId(vracSpeciesBatch.getId());
- for (Batch batch1 : vracSpeciesBatch.getChildBatchs()) {
- SortingBatch source = (SortingBatch) batch1;
+ for (Batch batch : vracSpeciesBatch.getChildBatchs()) {
+ SortingBatch source = (SortingBatch) batch;
+ ReferenceTaxon referenceTaxon = source.getReferenceTaxon();
+ Preconditions.checkNotNull(referenceTaxon, "Can't have a rootSpeciesBatch with a null taxon, but was for " + batch.getId());
+ Species species = referentialService.getSpeciesByReferenceTaxonId(referenceTaxon.getId());
SpeciesBatch target = TuttiBeanFactory.newSpeciesBatch();
+ target.setSpecies(species);
entityToSpeciesBatch(source, target);
result.addChildren(target);
@@ -135,9 +139,14 @@
BatchPersistenceHelper.BATCH_PMFM_ID, enumeration.PMFM_ID_SORTING_TYPE, enumeration.QUALITATIVE_ID_SORTING_TYPE_SPECIES);
if (horsVracSpeciesBatch != null) {
for (Batch batch : horsVracSpeciesBatch.getChildBatchs()) {
+ SortingBatch source = (SortingBatch) batch;
+ ReferenceTaxon referenceTaxon = source.getReferenceTaxon();
+ Preconditions.checkNotNull(referenceTaxon, "Can't have a rootSpeciesBatch with a null taxon, but was for " + source.getId());
+ Species species = referentialService.getSpeciesByReferenceTaxonId(referenceTaxon.getId());
SpeciesBatch target = TuttiBeanFactory.newSpeciesBatch();
- entityToSpeciesBatch((SortingBatch) batch, target);
+ target.setSpecies(species);
+ entityToSpeciesBatch(source, target);
result.addChildren(target);
if (log.isInfoEnabled()) {
log.info("Loaded CatchBatch Hors Vrac > Species > " + target.getSpecies().getReferenceTaxonId() + " : " + target.getId());
@@ -415,6 +424,8 @@
protected SpeciesBatch entityToSpeciesBatch(SortingBatch source,
SpeciesBatch target) {
+ Preconditions.checkNotNull(target.getSpecies());
+
target.setId(source.getId().toString());
// Individual count
@@ -454,27 +465,15 @@
}
}
- // Species
- Integer referenceTaxonId = source.getInheritedReferenceTaxonId();
- if (referenceTaxonId == null && source.getReferenceTaxon() != null) {
- referenceTaxonId = source.getReferenceTaxon().getId();
- }
- if (referenceTaxonId != null) {
- // TODO : add cache on getSpeciesByReferenceTaxonId
- Species species = referentialService.getSpeciesByReferenceTaxonId(referenceTaxonId);
- target.setSpecies(species);
- }
- //FIXME-TC Check the test is still ok?
- //FIXME-TC We should a stronger test
-// if (target.getSampleCategoryType() != null && source.getChildBatchs().size() > 0) {
if (target.getSampleCategoryType() != null) {
List<SpeciesBatch> targetChilds = Lists.newArrayList();
for (Batch batch : source.getChildBatchs()) {
SortingBatch sourceChild = (SortingBatch) batch;
SpeciesBatch targetChild = TuttiBeanFactory.newSpeciesBatch();
+ targetChild.setSpecies(target.getSpecies());
entityToSpeciesBatch(sourceChild, targetChild);
if (log.isInfoEnabled()) {
- log.info("Loaded CatchBatch Hors Vrac > (Species|Benthos) > " + target.getSpecies().getReferenceTaxonId() + " : " + target.getId());
+ log.info("Loaded CatchBatch Hors Vrac > (Species|Benthos) > " + targetChild.getSpecies().getReferenceTaxonId() + " : " + target.getId());
}
if (targetChild.getSampleCategoryValue() != null) {
targetChilds.add(targetChild);
1
0
r850 - in trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches: benthos species
by tchemit@users.forge.codelutin.com 22 Apr '13
by tchemit@users.forge.codelutin.com 22 Apr '13
22 Apr '13
Author: tchemit
Date: 2013-04-22 15:37:22 +0200 (Mon, 22 Apr 2013)
New Revision: 850
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/850
Log:
fixes #2345: [CAPTURES] Muavaise remont?\195?\169 des arbres d'?\195?\169chantillonage
Modified:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIHandler.java 2013-04-22 13:30:21 UTC (rev 849)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIHandler.java 2013-04-22 13:37:22 UTC (rev 850)
@@ -532,7 +532,7 @@
List<SampleCategoryEnum> samplingOrder = Lists.newArrayList();
- List<Integer> samplingOrderIds = getConfig().getSamplingOrderIds();
+ List<Integer> samplingOrderIds = getConfig().getServiceConfig().getSamplingOrderIds();
for (Integer id : samplingOrderIds) {
samplingOrder.add(categoryEnumMap.get(id));
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java 2013-04-22 13:30:21 UTC (rev 849)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java 2013-04-22 13:37:22 UTC (rev 850)
@@ -529,7 +529,7 @@
List<SampleCategoryEnum> samplingOrder = Lists.newArrayList();
- List<Integer> samplingOrderIds = getConfig().getSamplingOrderIds();
+ List<Integer> samplingOrderIds = getConfig().getServiceConfig().getSamplingOrderIds();
for (Integer id : samplingOrderIds) {
samplingOrder.add(categoryEnumMap.get(id));
}
1
0
22 Apr '13
Author: kmorin
Date: 2013-04-22 15:30:21 +0200 (Mon, 22 Apr 2013)
New Revision: 849
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/849
Log:
fixes #2252 [RAPPORT] - G?\195?\169n?\195?\169ration d'un fichier CSV de synth?\195?\168se pour le logiciel SUMATRA
debug weight computing for benthos
Added:
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/sumatra/
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/sumatra/CatchRow.java
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/sumatra/CatchRowModel.java
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/sumatra/TuttiCatchesSumatraExportService.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportCruiseForSumatraAction.java
Modified:
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/catches/TuttiWeightComputingService.java
trunk/tutti-service/src/main/resources/i18n/tutti-service_en_GB.properties
trunk/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties
trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-en.properties
trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-fr.properties
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiUIContext.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUI.css
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUI.jaxx
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/catches/TuttiWeightComputingService.java
===================================================================
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/catches/TuttiWeightComputingService.java 2013-04-22 09:51:45 UTC (rev 848)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/catches/TuttiWeightComputingService.java 2013-04-22 13:30:21 UTC (rev 849)
@@ -479,8 +479,7 @@
// if the weight of the frequencies is different from the category
// weight, then set the weight of the sample
if (frequencyWeight > categoryWeight) {
- throw new TuttiWeightComputingException(_
- ("tutti.service.operations.computeWeights.species.error.incoherentCategoryWeight"),
+ throw new TuttiWeightComputingException(_("tutti.service.operations.computeWeights.species.error.incoherentCategoryWeight"),
TuttiWeightComputingException.CatchType.SPECIES,
thisIndex);
Added: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/sumatra/CatchRow.java
===================================================================
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/sumatra/CatchRow.java (rev 0)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/sumatra/CatchRow.java 2013-04-22 13:30:21 UTC (rev 849)
@@ -0,0 +1,63 @@
+package fr.ifremer.tutti.service.sumatra;
+
+import fr.ifremer.tutti.persistence.entities.data.FishingOperation;
+import fr.ifremer.tutti.persistence.entities.referential.Species;
+
+import java.io.Serializable;
+
+/**
+ * @author kmorin <kmorin(a)codelutin.com>
+ * @since 2.0
+ */
+public class CatchRow implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ public static final String PROPERTY_FISHING_OPERATION = "fishingOperation";
+
+ public static final String PROPERTY_SPECIES = "species";
+
+ public static final String PROPERTY_WEIGHT = "weight";
+
+ public static final String PROPERTY_NUMBER = "number";
+
+ protected FishingOperation fishingOperation;
+
+ protected Species species;
+
+ protected Float weight;
+
+ protected Integer number;
+
+ public FishingOperation getFishingOperation() {
+ return fishingOperation;
+ }
+
+ public void setFishingOperation(FishingOperation fishingOperation) {
+ this.fishingOperation = fishingOperation;
+ }
+
+ public Species getSpecies() {
+ return species;
+ }
+
+ public void setSpecies(Species species) {
+ this.species = species;
+ }
+
+ public Float getWeight() {
+ return weight;
+ }
+
+ public void setWeight(Float weight) {
+ this.weight = weight;
+ }
+
+ public Integer getNumber() {
+ return number;
+ }
+
+ public void setNumber(Integer number) {
+ this.number = number;
+ }
+}
Added: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/sumatra/CatchRowModel.java
===================================================================
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/sumatra/CatchRowModel.java (rev 0)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/sumatra/CatchRowModel.java 2013-04-22 13:30:21 UTC (rev 849)
@@ -0,0 +1,46 @@
+package fr.ifremer.tutti.service.sumatra;
+
+import com.google.common.base.Preconditions;
+import fr.ifremer.tutti.persistence.entities.data.FishingOperation;
+import fr.ifremer.tutti.persistence.entities.referential.Species;
+import fr.ifremer.tutti.service.TuttiCsvUtil;
+import org.nuiton.util.csv.Common;
+import org.nuiton.util.csv.ValueFormatter;
+
+import static org.nuiton.i18n.I18n._;
+
+/**
+ * @author kmorin <kmorin(a)codelutin.com>
+ * @since 2.0
+ */
+public class CatchRowModel extends TuttiCsvUtil.AbstractTuttiImportExportModel<CatchRow> {
+
+ public CatchRowModel(char separator) {
+ super(separator);
+
+ // export definition
+
+ newColumnForExport(_("tutti.service.exportSumatra.header.station"), CatchRow.PROPERTY_FISHING_OPERATION, new ValueFormatter<FishingOperation>() {
+ @Override
+ public String format(FishingOperation o) {
+ Preconditions.checkNotNull(o, _("tutti.service.exportSumatra.error.station.null"));
+ return o.getStationNumber() + String.format("%04d", o.getFishingOperationNumber());
+ }
+ });
+ newColumnForExport(_("tutti.service.exportSumatra.header.species"), CatchRow.PROPERTY_SPECIES, new ValueFormatter<Species>() {
+ @Override
+ public String format(Species s) {
+ Preconditions.checkNotNull(s, _("tutti.service.exportSumatra.error.species.null"));
+ return s.getName();
+ }
+ });
+ newColumnForExport(_("tutti.service.exportSumatra.header.weight"), CatchRow.PROPERTY_WEIGHT, Common.PRIMITIVE_FLOAT);
+ newColumnForExport(_("tutti.service.exportSumatra.header.number"), CatchRow.PROPERTY_NUMBER, Common.PRIMITIVE_INTEGER);
+ }
+
+ @Override
+ public CatchRow newEmptyInstance() {
+ return new CatchRow();
+ }
+
+}
Added: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/sumatra/TuttiCatchesSumatraExportService.java
===================================================================
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/sumatra/TuttiCatchesSumatraExportService.java (rev 0)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/sumatra/TuttiCatchesSumatraExportService.java 2013-04-22 13:30:21 UTC (rev 849)
@@ -0,0 +1,162 @@
+package fr.ifremer.tutti.service.sumatra;
+
+import com.google.common.base.Charsets;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.google.common.io.Files;
+import fr.ifremer.tutti.TuttiTechnicalException;
+import fr.ifremer.tutti.persistence.entities.data.*;
+import fr.ifremer.tutti.persistence.entities.referential.Species;
+import fr.ifremer.tutti.service.AbstractTuttiService;
+import fr.ifremer.tutti.service.PersistenceService;
+import fr.ifremer.tutti.service.TuttiServiceContext;
+import fr.ifremer.tutti.service.catches.TuttiWeightComputingService;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.nuiton.util.csv.Export;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author kmorin <kmorin(a)codelutin.com>
+ * @since 2.0
+ */
+public class TuttiCatchesSumatraExportService extends AbstractTuttiService {
+
+ private static final Log log =
+ LogFactory.getLog(TuttiCatchesSumatraExportService.class);
+
+ public static final char CSV_SEPARATOR = ';';
+
+ protected PersistenceService persistenceService;
+
+ protected TuttiWeightComputingService tuttiWeightComputingService;
+
+ @Override
+ public void setServiceContext(TuttiServiceContext context) {
+ super.setServiceContext(context);
+ persistenceService = getService(PersistenceService.class);
+ tuttiWeightComputingService = getService(TuttiWeightComputingService.class);
+ }
+
+ public void exportCruiseForSumatra(File file,
+ String cruiseId) {
+
+ Preconditions.checkNotNull(cruiseId, "Cannot export a null cruise");
+
+ if (log.isInfoEnabled()) {
+ log.info("Will export cruise " + cruiseId + " to file: " + file);
+ }
+
+ Cruise cruise = persistenceService.getCruise(cruiseId);
+ Preconditions.checkNotNull(cruise, "Cruise not found");
+
+ CatchRowModel csvModel =
+ new CatchRowModel(CSV_SEPARATOR);
+ List<CatchRow> rows = Lists.newArrayList();
+
+ List<FishingOperation> operations = persistenceService.getAllFishingOperation(cruiseId);
+ if (operations != null) {
+ for (FishingOperation operation : operations) {
+
+ // add species rows
+
+ BatchContainer<SpeciesBatch> speciesBatchContainer =
+ tuttiWeightComputingService.getComputedSpeciesBatches(operation);
+
+ Map<Species, CatchRow> rowMap = Maps.newHashMap();
+ List<SpeciesBatch> speciesBatches = speciesBatchContainer.getChildren();
+ for (SpeciesBatch batch : speciesBatches) {
+ Species sp = batch.getSpecies();
+
+ Float weight = batch.getSampleCategoryWeight();
+ if (weight == null) {
+ weight = batch.getSampleCategoryComputedWeight();
+ }
+
+ Integer nb = batch.getNumber();
+ if (nb == null) {
+ nb = batch.getComputedNumber();
+ }
+ if (nb == null) {
+ nb = 0;
+ }
+
+ CatchRow row = rowMap.get(sp);
+ if (row == null) {
+ row = new CatchRow();
+ row.setFishingOperation(operation);
+ row.setSpecies(sp);
+ row.setWeight(weight);
+ row.setNumber(nb);
+
+ } else {
+ row.setWeight(row.getWeight() + weight);
+ row.setNumber(row.getNumber() + nb);
+ }
+ rowMap.put(sp, row);
+ }
+
+ rows.addAll(rowMap.values());
+
+ // add benthos rows
+
+ BatchContainer<BenthosBatch> benthosBatchContainer =
+ tuttiWeightComputingService.getComputedBenthosBatches(operation);
+
+ rowMap.clear();
+ List<BenthosBatch> benthosBatches = benthosBatchContainer.getChildren();
+ for (BenthosBatch batch : benthosBatches) {
+ Species sp = batch.getSpecies();
+
+ Float weight = batch.getSampleCategoryWeight();
+ if (weight == null) {
+ weight = batch.getSampleCategoryComputedWeight();
+ }
+
+ Integer nb = batch.getNumber();
+ if (nb == null) {
+ nb = batch.getComputedNumber();
+ }
+ if (nb == null) {
+ nb = 0;
+ }
+
+ CatchRow row = rowMap.get(sp);
+ if (row == null) {
+ row = new CatchRow();
+ row.setFishingOperation(operation);
+ row.setSpecies(sp);
+ row.setWeight(weight);
+ row.setNumber(nb);
+
+ } else {
+ row.setWeight(row.getWeight() + weight);
+ row.setNumber(row.getNumber() + nb);
+ }
+ rowMap.put(sp, row);
+ }
+
+ rows.addAll(rowMap.values());
+ }
+ }
+
+ BufferedWriter writer = null;
+ try {
+ writer = Files.newWriter(file, Charsets.UTF_8);
+ Export export = Export.newExport(csvModel, rows);
+ export.write(writer);
+ writer.close();
+
+ } catch (Exception e) {
+ throw new TuttiTechnicalException("Could not export all caracteristics to file " + file, e);
+ } finally {
+ IOUtils.closeQuietly(writer);
+ }
+ }
+}
Modified: trunk/tutti-service/src/main/resources/i18n/tutti-service_en_GB.properties
===================================================================
--- trunk/tutti-service/src/main/resources/i18n/tutti-service_en_GB.properties 2013-04-22 09:51:45 UTC (rev 848)
+++ trunk/tutti-service/src/main/resources/i18n/tutti-service_en_GB.properties 2013-04-22 13:30:21 UTC (rev 849)
@@ -55,6 +55,12 @@
tutti.service.exportCruise.exportOperations=
tutti.service.exportCruise.exportParameters=
tutti.service.exportCruise.exportSurvey=
+tutti.service.exportSumatra.error.species.null=
+tutti.service.exportSumatra.error.station.null=
+tutti.service.exportSumatra.header.number=
+tutti.service.exportSumatra.header.species=
+tutti.service.exportSumatra.header.station=
+tutti.service.exportSumatra.header.weight=
tutti.service.operations.computeWeights.benthos.error.incoherentCategoryWeight=
tutti.service.operations.computeWeights.benthos.error.incoherentParentCategoryWeight=
tutti.service.operations.computeWeights.benthos.error.incoherentRowWeightFrequency=
Modified: trunk/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties
===================================================================
--- trunk/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties 2013-04-22 09:51:45 UTC (rev 848)
+++ trunk/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties 2013-04-22 13:30:21 UTC (rev 849)
@@ -55,6 +55,12 @@
tutti.service.exportCruise.exportOperations=Export du fichier <strong>operations.csv</strong> pour la campagne %s
tutti.service.exportCruise.exportParameters=Export du fichier <strong>parameters.csv</strong> pour la campagne %s
tutti.service.exportCruise.exportSurvey=Export du fichier <strong>survey.csv</strong> pour la campagne %s
+tutti.service.exportSumatra.error.species.null=L'espèce est nulle
+tutti.service.exportSumatra.error.station.null=Le trait est nul
+tutti.service.exportSumatra.header.number=NbIndividus
+tutti.service.exportSumatra.header.species=Espèce
+tutti.service.exportSumatra.header.station=Station
+tutti.service.exportSumatra.header.weight=Total
tutti.service.operations.computeWeights.benthos.error.incoherentCategoryWeight=Le poids total des mensurations d'un lot du benthos est supérieur au poids de la catégorie
tutti.service.operations.computeWeights.benthos.error.incoherentParentCategoryWeight=Le poids de la catégorie d'un lot du benthos est différent de la somme des poids de ses sous-catégories
tutti.service.operations.computeWeights.benthos.error.incoherentRowWeightFrequency=Le poids total des mensurations d'un lot du benthos est différent du poids du sous-échantillon
Modified: trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-en.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-en.properties 2013-04-22 09:51:45 UTC (rev 848)
+++ trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-en.properties 2013-04-22 13:30:21 UTC (rev 849)
@@ -1,28 +1,5 @@
-###
-# #%L
-# Tutti :: UI
-# $Id$
-# $HeadURL$
-# %%
-# Copyright (C) 2012 - 2013 Ifremer
-# %%
-# 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 3 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, see
-# <http://www.gnu.org/licenses/gpl-3.0.html>.
-# #L%
-###
#Generated by org.nuiton.jaxx.plugin.GenerateHelpIdsMojo
-#Mon Apr 22 08:30:46 CEST 2013
+#Mon Apr 22 10:46:45 CEST 2013
tutti.config.help=config.html
tutti.createAccidentalBatch.action.cancel.help=createAccidentalBatch.html\#actions
tutti.createAccidentalBatch.action.save.help=createAccidentalBatch.html\#actions
@@ -248,6 +225,9 @@
tutti.fishingOperations.field.fishingOperation.help=fishingOperations.html\#fields
tutti.fishingOperations.help=fishingOperations.html
tutti.index.help=index.html
+tutti.main.action.changeLocale.help=
+tutti.main.action.changeLocaleFR.help=
+tutti.main.action.changeLocaleUK.help=
tutti.main.action.showHelp.help=index.html\#menu
tutti.main.help=index.html
tutti.main.menu.action.about.help=index.html\#menu
@@ -283,6 +263,7 @@
tutti.selectCruise.action.editProgram.help=selectCruise.html\#actions
tutti.selectCruise.action.editProtocol.help=selectCruise.html\#actions
tutti.selectCruise.action.exportCruise.help=
+tutti.selectCruise.action.exportCruiseForSumatra.help=
tutti.selectCruise.action.exportProgram.help=
tutti.selectCruise.action.exportProtocol.help=selectCruise.html\#actions
tutti.selectCruise.action.importProtocol.help=selectCruise.html\#actions
@@ -310,3 +291,8 @@
tutti.splitSpeciesBatch.field.sampleWeightField.help=splitSpeciesBatch.html\#fields
tutti.splitSpeciesBatch.field.speciesField.help=splitSpeciesBatch.html\#fields
tutti.splitSpeciesBatch.help=splitSpeciesBatch.html
+tuttihelp.config.help=
+tuttihelp.editAccidentalBatch.help=
+tuttihelp.editIndividualObservationBatch.help=
+tuttihelp.editMarineLitterBatch.help=
+tuttihelp.editPlanktonBatch.help=
Modified: trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-fr.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-fr.properties 2013-04-22 09:51:45 UTC (rev 848)
+++ trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-fr.properties 2013-04-22 13:30:21 UTC (rev 849)
@@ -1,28 +1,5 @@
-###
-# #%L
-# Tutti :: UI
-# $Id$
-# $HeadURL$
-# %%
-# Copyright (C) 2012 - 2013 Ifremer
-# %%
-# 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 3 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, see
-# <http://www.gnu.org/licenses/gpl-3.0.html>.
-# #L%
-###
#Generated by org.nuiton.jaxx.plugin.GenerateHelpIdsMojo
-#Mon Apr 22 08:30:46 CEST 2013
+#Mon Apr 22 10:46:45 CEST 2013
tutti.config.help=config.html
tutti.createAccidentalBatch.action.cancel.help=createAccidentalBatch.html\#actions
tutti.createAccidentalBatch.action.save.help=createAccidentalBatch.html\#actions
@@ -248,6 +225,9 @@
tutti.fishingOperations.field.fishingOperation.help=fishingOperations.html\#fields
tutti.fishingOperations.help=fishingOperations.html
tutti.index.help=index.html
+tutti.main.action.changeLocale.help=
+tutti.main.action.changeLocaleFR.help=
+tutti.main.action.changeLocaleUK.help=
tutti.main.action.showHelp.help=index.html\#menu
tutti.main.help=index.html
tutti.main.menu.action.about.help=index.html\#menu
@@ -283,6 +263,7 @@
tutti.selectCruise.action.editProgram.help=selectCruise.html\#actions
tutti.selectCruise.action.editProtocol.help=selectCruise.html\#actions
tutti.selectCruise.action.exportCruise.help=
+tutti.selectCruise.action.exportCruiseForSumatra.help=
tutti.selectCruise.action.exportProgram.help=
tutti.selectCruise.action.exportProtocol.help=selectCruise.html\#actions
tutti.selectCruise.action.importProtocol.help=selectCruise.html\#actions
@@ -310,3 +291,8 @@
tutti.splitSpeciesBatch.field.sampleWeightField.help=splitSpeciesBatch.html\#fields
tutti.splitSpeciesBatch.field.speciesField.help=splitSpeciesBatch.html\#fields
tutti.splitSpeciesBatch.help=splitSpeciesBatch.html
+tuttihelp.config.help=
+tuttihelp.editAccidentalBatch.help=
+tuttihelp.editIndividualObservationBatch.help=
+tuttihelp.editMarineLitterBatch.help=
+tuttihelp.editPlanktonBatch.help=
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiUIContext.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiUIContext.java 2013-04-22 09:51:45 UTC (rev 848)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiUIContext.java 2013-04-22 13:30:21 UTC (rev 849)
@@ -44,6 +44,7 @@
import fr.ifremer.tutti.service.pupitri.TuttiPupitriImportExportService;
import fr.ifremer.tutti.service.referential.TuttiReferentialImportExportService;
import fr.ifremer.tutti.service.referential.TuttiReferentialSynchronizeService;
+import fr.ifremer.tutti.service.sumatra.TuttiCatchesSumatraExportService;
import fr.ifremer.tutti.ui.swing.config.TuttiApplicationConfig;
import fr.ifremer.tutti.ui.swing.content.MainUI;
import fr.ifremer.tutti.ui.swing.util.TuttiErrorHelper;
@@ -542,6 +543,10 @@
return serviceContext.getService(TuttiExportService.class);
}
+ public TuttiCatchesSumatraExportService getCatchesSumatraExportService() {
+ return serviceContext.getService(TuttiCatchesSumatraExportService.class);
+ }
+
public boolean useRealPersistenceService() {
return isDbExist() && isDbLoaded();
}
Copied: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportCruiseForSumatraAction.java (from rev 827, trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SendCruiseReportAction.java)
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportCruiseForSumatraAction.java (rev 0)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportCruiseForSumatraAction.java 2013-04-22 13:30:21 UTC (rev 849)
@@ -0,0 +1,89 @@
+package fr.ifremer.tutti.ui.swing.content.home;
+
+import com.google.common.base.Preconditions;
+import fr.ifremer.tutti.TuttiIOUtil;
+import fr.ifremer.tutti.persistence.entities.data.Cruise;
+import fr.ifremer.tutti.service.catches.ExportCatchesReportService;
+import fr.ifremer.tutti.service.sumatra.TuttiCatchesSumatraExportService;
+import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil;
+import fr.ifremer.tutti.ui.swing.util.action.AbstractTuttiAction;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.io.File;
+
+import static org.nuiton.i18n.I18n._;
+
+/**
+ * Opens a file chooser, exports the cruise catches into the selected file and open the default email editor.
+ *
+ * @author kmorin <morin(a)codelutin.com>
+ * @since 1.0
+ */
+public class ExportCruiseForSumatraAction extends AbstractTuttiAction<SelectCruiseUIModel, SelectCruiseUI, SelectCruiseUIHandler> {
+
+ /** Logger. */
+ private static final Log log =
+ LogFactory.getLog(ExportCruiseForSumatraAction.class);
+
+ protected File file;
+
+ public ExportCruiseForSumatraAction(SelectCruiseUIHandler handler) {
+ super(handler, true);
+ }
+
+ @Override
+ protected boolean prepareAction() throws Exception {
+
+ boolean doAction = super.prepareAction();
+
+ if (doAction) {
+
+ // choose file to export
+ file = TuttiUIUtil.chooseFile(
+ getContext().getMainUI(),
+ _("tutti.exportCruiseForSumatra.title.choose.exportFile"),
+ _("tutti.exportCruiseForSumatra.action.chooseFile"),
+ "^.+\\.csv$", _("tutti.common.file.csv")
+ );
+ doAction = file != null;
+ if (doAction) {
+ file = TuttiIOUtil.addExtensionIfMissing(file, ".csv");
+
+ // ask user to confirm overwrite.
+ doAction = getHandler().askOverwriteFile(file);
+ }
+ }
+ return doAction;
+ }
+
+ @Override
+ protected void releaseAction() {
+ file = null;
+ super.releaseAction();
+ }
+
+ @Override
+ protected void doAction() throws Exception {
+ Cruise cruise = getModel().getCruise();
+ Preconditions.checkNotNull(cruise);
+ Preconditions.checkNotNull(file);
+
+ if (log.isInfoEnabled()) {
+ log.info("Will export cruise " + cruise.getId() +
+ " to file: " + file);
+ }
+
+ // export catches
+ TuttiCatchesSumatraExportService service =
+ getContext().getCatchesSumatraExportService();
+ service.exportCruiseForSumatra(file, cruise.getId());
+
+ }
+
+ @Override
+ public void postSuccessAction() {
+ super.postSuccessAction();
+ sendMessage(_("tutti.exportCruiseForSumatra.action.success", file));
+ }
+}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUI.css
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUI.css 2013-04-22 09:51:45 UTC (rev 848)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUI.css 2013-04-22 13:30:21 UTC (rev 849)
@@ -106,7 +106,7 @@
}
#editCruiseComboBox {
- model: {handler.newComboModel(editCruiseButton, exportCruiseButton, sendCruiseReportButton)};
+ model: {handler.newComboModel(editCruiseButton, exportCruiseButton, sendCruiseReportButton, exportCruiseForSumatraButton)};
enabled: {model.isProgramFound() && model.isCruiseFound()};
renderer: {new ActionListCellRenderer()};
}
@@ -135,6 +135,14 @@
_help: {"tutti.selectCruise.action.sendCruiseReport.help"};
}
+#exportCruiseForSumatraButton {
+ actionIcon: export;
+ text: "tutti.selectCruise.action.exportCruiseForSumatra";
+ toolTipText: "tutti.selectCruise.action.exportCruiseForSumatra.tip";
+ _tuttiAction: {ExportCruiseForSumatraAction.class};
+ _help: {"tutti.selectCruise.action.exportCruiseForSumatra.help"};
+}
+
#newCruiseButton {
actionIcon: add;
text: "tutti.selectCruise.action.newCruise";
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUI.jaxx 2013-04-22 09:51:45 UTC (rev 848)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUI.jaxx 2013-04-22 13:30:21 UTC (rev 849)
@@ -78,6 +78,7 @@
<JButton id='editCruiseButton'/>
<JButton id='exportCruiseButton'/>
<JButton id='sendCruiseReportButton'/>
+ <JButton id='exportCruiseForSumatraButton'/>
<JButton id='newProtocolButton'/>
<JButton id='importProtocolButton'/>
<JButton id='editProtocolButton'/>
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIHandler.java 2013-04-22 09:51:45 UTC (rev 848)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIHandler.java 2013-04-22 13:30:21 UTC (rev 849)
@@ -55,6 +55,7 @@
import fr.ifremer.tutti.ui.swing.content.operation.catches.benthos.split.SplitBenthosBatchRowModel;
import fr.ifremer.tutti.ui.swing.content.operation.catches.benthos.split.SplitBenthosBatchUI;
import fr.ifremer.tutti.ui.swing.content.operation.catches.benthos.split.SplitBenthosBatchUIModel;
+import fr.ifremer.tutti.ui.swing.content.operation.catches.species.SpeciesBatchRowModel;
import fr.ifremer.tutti.ui.swing.util.TuttiBeanMonitor;
import fr.ifremer.tutti.ui.swing.util.TuttiUI;
import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil;
@@ -820,7 +821,8 @@
newBatch,
sampleCategoryEnum,
row.getCategoryValue(),
- row.getWeight());
+ row.getWeight(),
+ null);
recomputeRowValidState(newBatch);
newBatches.add(newBatch);
@@ -1056,11 +1058,11 @@
BenthosBatchRowModel parentRow,
List<BenthosBatchRowModel> rows) {
+ String id = aBatch.getId();
+
List<BenthosBatchFrequency> frequencies =
- persistenceService.getAllBenthosBatchFrequency(aBatch.getId());
+ persistenceService.getAllBenthosBatchFrequency(id);
-
-
BenthosBatchRowModel newRow =
new BenthosBatchRowModel(aBatch, frequencies);
@@ -1091,7 +1093,8 @@
newRow,
sampleCategoryEnum,
aBatch.getSampleCategoryValue(),
- aBatch.getSampleCategoryWeight());
+ aBatch.getSampleCategoryWeight(),
+ aBatch.getSampleCategoryComputedWeight());
rows.add(newRow);
@@ -1102,10 +1105,27 @@
List<BenthosBatchRowModel> batchChilds = Lists.
newArrayListWithCapacity(aBatch.sizeChildBatchs());
+ Float childrenWeights = 0f;
for (BenthosBatch childBatch : aBatch.getChildBatchs()) {
BenthosBatchRowModel childRow = loadBatch(childBatch, newRow, rows);
+ if (childrenWeights != null) {
+ Float weight = childRow.getFinestCategory().getNotNullWeight();
+ if (weight == null) {
+ childrenWeights = null;
+ } else {
+ childrenWeights += weight;
+ }
+ }
batchChilds.add(childRow);
}
+
+ Float rowWeight = newRow.getFinestCategory().getNotNullWeight();
+ boolean subSample = rowWeight != null && childrenWeights != null
+ && childrenWeights < rowWeight;
+ for (BenthosBatchRowModel childRow : batchChilds) {
+ childRow.getFinestCategory().setSubSample(subSample);
+ }
+
newRow.setChildBatch(batchChilds);
}
@@ -1116,7 +1136,8 @@
BenthosBatchRowModel newRow,
SampleCategoryEnum sampleCategoryEnum,
Serializable categoryValue,
- Float categoryWeight) {
+ Float categoryWeight,
+ Float categoryComputedWeight) {
// get sample category from his type
SampleCategory sampleCategory =
@@ -1125,6 +1146,7 @@
// fill it
sampleCategory.setCategoryValue(categoryValue);
sampleCategory.setCategoryWeight(categoryWeight);
+ sampleCategory.setComputedWeight(categoryComputedWeight);
// push it back to row as his *main* sample category
newRow.setSampleCategory(sampleCategory);
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java 2013-04-22 09:51:45 UTC (rev 848)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java 2013-04-22 13:30:21 UTC (rev 849)
@@ -355,25 +355,6 @@
recomputeBatchActionEnable();
}
-// @Override
-// protected void onRowModified(int rowIndex,
-// SpeciesBatchRowModel row,
-// String propertyName,
-// Object oldValue,
-// Object newValue) {
-//
-// if (SAMPLING_PROPERTIES.contains(propertyName)) {
-//
-// // species has changed, recompute valid property
-// recomputeRowValidState(row);
-// }
-//
-// saveSelectedRowIfNeeded();
-//
-// // when row valid state has changed, recompute action enabled states
-// recomputeBatchActionEnable();
-// }
-
@Override
protected void saveSelectedRowIfRequired(TuttiBeanMonitor<SpeciesBatchRowModel> rowMonitor,
SpeciesBatchRowModel row) {
@@ -543,13 +524,6 @@
initUI(ui);
-// SwingUtil.applyDataBinding(
-// ui,
-// SpeciesBatchUI.BINDING_CREATE_SPECIES_MELAG_MENU_ENABLED,
-// SpeciesBatchUI.BINDING_REMOVE_SPECIES_BATCH_MENU_ENABLED,
-// SpeciesBatchUI.BINDING_REMOVE_SPECIES_SUB_BATCH_MENU_ENABLED,
-// SpeciesBatchUI.BINDING_RENAME_SPECIES_BATCH_MENU_ENABLED);
-
Map<Integer, SampleCategoryEnum> categoryEnumMap =
SampleCategoryEnum.toIdMapping();
Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2013-04-22 09:51:45 UTC (rev 848)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2013-04-22 13:30:21 UTC (rev 849)
@@ -344,6 +344,13 @@
tutti.editCatchBatch.action.cancelEditCatchBatch.mnemonic=
tutti.editCatchBatch.action.cancelEditCatchBatch.tip=
tutti.editCatchBatch.action.computeWeights=
+tutti.editCatchBatch.action.computeWeights.error.incoherentCategoryWeight=
+tutti.editCatchBatch.action.computeWeights.error.incoherentParentCategoryWeight=
+tutti.editCatchBatch.action.computeWeights.error.incoherentRowWeightCategory=
+tutti.editCatchBatch.action.computeWeights.error.incoherentRowWeightFrequency=
+tutti.editCatchBatch.action.computeWeights.error.incoherentSpeciesTotalSorted=
+tutti.editCatchBatch.action.computeWeights.error.incoherentTotal=
+tutti.editCatchBatch.action.computeWeights.error.noWeight=
tutti.editCatchBatch.action.computeWeights.mnemonic=
tutti.editCatchBatch.action.computeWeights.replaceTotalSortedWeight.help=
tutti.editCatchBatch.action.computeWeights.replaceTotalSortedWeight.message=
@@ -354,6 +361,8 @@
tutti.editCatchBatch.action.importPupitri.existingData.message=
tutti.editCatchBatch.action.importPupitri.existingData.title=
tutti.editCatchBatch.action.importPupitri.mnemonic=
+tutti.editCatchBatch.action.importPupitri.noProtocol.message=
+tutti.editCatchBatch.action.importPupitri.noProtocol.title=
tutti.editCatchBatch.action.importPupitri.success=
tutti.editCatchBatch.action.importPupitri.tip=
tutti.editCatchBatch.action.saveCatchBatch=
@@ -410,6 +419,8 @@
tutti.editCruise.field.beginDate.tip=
tutti.editCruise.field.comment=
tutti.editCruise.field.comment.tip=
+tutti.editCruise.field.country=
+tutti.editCruise.field.country.tip=
tutti.editCruise.field.departureLocation=
tutti.editCruise.field.departureLocation.tip=
tutti.editCruise.field.endDate=
@@ -800,6 +811,9 @@
tutti.error.ui.business.error=
tutti.error.ui.other.error=
tutti.exportCruise.action.success=
+tutti.exportCruiseForSumatra.action.chooseFile=
+tutti.exportCruiseForSumatra.action.success=
+tutti.exportCruiseForSumatra.title.choose.exportFile=
tutti.exportProgram.action.success=
tutti.exportProtocol.action.success=
tutti.fishingOperations.action.newFishingOperation.mnemonic=
@@ -1010,6 +1024,8 @@
tutti.selectCruise.action.editProtocol.tip=
tutti.selectCruise.action.exportCruise=
tutti.selectCruise.action.exportCruise.tip=
+tutti.selectCruise.action.exportCruiseForSumatra=
+tutti.selectCruise.action.exportCruiseForSumatra.tip=
tutti.selectCruise.action.exportProgram=
tutti.selectCruise.action.exportProgram.tip=
tutti.selectCruise.action.exportProtocol=
Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-04-22 09:51:45 UTC (rev 848)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-04-22 13:30:21 UTC (rev 849)
@@ -7,6 +7,7 @@
tutti.about.bottomText=Copyright %s - %s - version %s
tutti.about.message=<h3>Tutti</h3><p><strong>Outil de saisie de données d'opérations et de captures au cours des campagnes halieutiques.</strong></p><br/><p>Ce logiciel permettra la saisie en mer des données d'opération de pêche (positions, environnement, engin, etc) et des captures associées (composition de la capture en espèces scientifiques avec poids, nombres, tailles etc) pour l'ensemble des campagnes halieutiques réalisées par l'Ifremer.</p><p>Ce projet a été initiée en 2012 par l'<a href\="http\://www.ifremer.fr">Ifremer</a> et réalisé par la société <a href\="http\://codelutin.com">Codelutin</a>.</p><hr/><br/><p>Pour plus d'informations, vous pouvez visiter le <a href\="http\://maven-site.forge.codelutin.com/tutti">site du projet</a>.</p><p>Projet hébergé sur la forge <a href\="http\://forge.codelutin.com/projects/tutti">Forge.codelutin.com</a>.</p>
tutti.about.title=À propos de Tutti
+tutti.label.tab.species=Espèces
tutti.about.translate.content=<h2>Comment traduire Tutti</h2>Vous pouvez nous aider à traduire Tutti.<hr/><br/><ul><li>Récupérer le fichier <a href\="%s">tutti-i18n.csv</a> dans le répertoire <strong>i18n</strong></li><li>ouvrez le avec un tableur (le caractère séprateur est une Tabultation)</li><li>Traduisez, Améliorer, ...</li><li>Enfin renvoyez-le nous</li></ul><br/>Nous intégrerons vos modifications avant la prochaine version.
tutti.about.translate.title=Traduire Tutti
tutti.about.update.app.noup.detail=<tr><td>%1$s</td><td>%2$s</td><td>%2$s<td><td></td></tr>
@@ -799,6 +800,9 @@
tutti.error.ui.business.error=Erreur
tutti.error.ui.other.error=Erreur
tutti.exportCruise.action.success=La campagne <strong>%s</strong> a été exportée dans le fichier <strong>%s</strong>.
+tutti.exportCruiseForSumatra.action.chooseFile=Choisir le fichier d'export
+tutti.exportCruiseForSumatra.action.success=Les captures ont correctement été exporté dans le fichier %s
+tutti.exportCruiseForSumatra.title.choose.exportFile=Exporter les captures de la campagne
tutti.exportProgram.action.success=La série de campagne <strong>%s</strong> a été exportée dans le fichier <strong>%s</strong>.
tutti.exportProtocol.action.success=Protocole [%1s] exporté dans le fichier <strong>%2s</strong>.
tutti.fishingOperations.action.newFishingOperation.mnemonic=N
@@ -1005,11 +1009,13 @@
tutti.selectCruise.action.editProgram=Éditer
tutti.selectCruise.action.editProgram.tip=Éditer le programme sélectionné
tutti.selectCruise.action.editProtocol=Éditer
-tutti.selectCruise.action.editProtocol.tip=Éditer le protocole sélectionné
+tutti.selectCruise.action.editProtocol.tip=Éditer le protocol sélectionné
tutti.selectCruise.action.exportCruise=Exporter
-tutti.selectCruise.action.exportCruise.tip=Exporter la campagne au format générique
+tutti.selectCruise.action.exportCruise.tip=Exporter la campagne sélectionnée
+tutti.selectCruise.action.exportCruiseForSumatra=Sumatra
+tutti.selectCruise.action.exportCruiseForSumatra.tip=Exporter la campagne sélectionnée pour Sumatra
tutti.selectCruise.action.exportProgram=Exporter
-tutti.selectCruise.action.exportProgram.tip=Exporter les campagnes de la série au format générique
+tutti.selectCruise.action.exportProgram.tip=Exporter la série sélectionnée
tutti.selectCruise.action.exportProtocol=Exporter
tutti.selectCruise.action.exportProtocol.tip=Exporter le protocole sélectionné
tutti.selectCruise.action.importProtocol=Importer
@@ -1048,7 +1054,7 @@
tutti.sendCruiseReport.action.success=Les captures ont correctement été exporté dans le fichier %s
tutti.sendCruiseReport.mail.body=Bonjour,\n\nVeuillez trouver ci-joint le rapport des captures de la campagne %1s.\n*Pensez à joindre le fichier %2s*\n\nCordialement,\n\n*Votre nom*
tutti.sendCruiseReport.mail.subject=Captures de la campagne %s
-tutti.sendCruiseReport.title.choose.exportFile=Exporter les captures de la campagne
+tutti.sendCruiseReport.title.choose.exportFile=Envoyer les captures de la campagne
tutti.splitBenthosBatch.action.cancel=Annuler
tutti.splitBenthosBatch.action.cancel.mnemonic=A
tutti.splitBenthosBatch.action.cancel.tip=Annuler le sous-échantillonnage
1
0
22 Apr '13
Author: kmorin
Date: 2013-04-22 11:51:45 +0200 (Mon, 22 Apr 2013)
New Revision: 848
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/848
Log:
translations
Modified:
trunk/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties
Modified: trunk/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties
===================================================================
--- trunk/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties 2013-04-22 09:31:26 UTC (rev 847)
+++ trunk/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties 2013-04-22 09:51:45 UTC (rev 848)
@@ -44,9 +44,9 @@
tutti.propety.no.vessel.name=Nom inconnu
tutti.propety.no.zone=Pas de zone
tutti.propety.vessel.nation.registrationCode=%s (nat.)
-tutti.service.catches.computeWeights.benthos.error.incoherentSampleWeight=
-tutti.service.catches.computeWeights.error.incoherentRowWeightCategory=
-tutti.service.catches.computeWeights.species.error.incoherentSampleWeight=
+tutti.service.catches.computeWeights.benthos.error.incoherentSampleWeight=Le poids de sous-échantillon est supérieur au poids du lot.
+tutti.service.catches.computeWeights.error.incoherentRowWeightCategory=Le poids de sous-échantillon est renseigné alors que le lot n'a pas de poids.
+tutti.service.catches.computeWeights.species.error.incoherentSampleWeight=Le poids de sous-échantillon est supérieur au poids du lot.
tutti.service.export.invalid.cruise=L'export de la campagne %s ne peut pas être réalisé suite aux erreurs rencontrées sur ses traits lors de l'élévation des poids \:\n%s
tutti.service.export.invalid.fishingOperation=L'élévation des poids ne peut pas être réalisé sur le trait %s, pour la raison suivante %s
tutti.service.exportCruise.buildZip=Création de l'archive de l'export (fichier %s)
@@ -60,7 +60,7 @@
tutti.service.operations.computeWeights.benthos.error.incoherentRowWeightFrequency=Le poids total des mensurations d'un lot du benthos est différent du poids du sous-échantillon
tutti.service.operations.computeWeights.benthos.error.incoherentTotalSorted=Le poids total Vrac du benthos est inférieur à la somme des poids Vrac triés, inerte trié et vivant non détaillé trié
tutti.service.operations.computeWeights.benthos.error.noWeight=Un lot du benthos n'a pas de poids
-tutti.service.operations.computeWeights.error.incoherentRowWeightCategory=
+tutti.service.operations.computeWeights.error.incoherentRowWeightCategory=Le poids de sous-échantillon est renseigné alors que le lot n'a pas de poids.
tutti.service.operations.computeWeights.error.incoherentTotal=Le poids total de la capture ne correspond pas à la somme des poids totaux Vrac, Hors Vrac et non triés
tutti.service.operations.computeWeights.marineLitter.error.incoherentTotal=Le poids total des macro-déchets est inférieur à la somme des poids des macro-déchets saisis
tutti.service.operations.computeWeights.marineLitter.error.noWeight=Un lot de macro-déchets n'a pas de poids
1
0
r847 - in trunk/tutti-ui-swing/src/main: java/fr/ifremer/tutti/ui/swing/content/home resources/i18n
by tchemit@users.forge.codelutin.com 22 Apr '13
by tchemit@users.forge.codelutin.com 22 Apr '13
22 Apr '13
Author: tchemit
Date: 2013-04-22 11:31:26 +0200 (Mon, 22 Apr 2013)
New Revision: 847
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/847
Log:
fix i18n
- fix after export program action
Modified:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUIHandler.java
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUIHandler.java 2013-04-22 08:42:40 UTC (rev 846)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUIHandler.java 2013-04-22 09:31:26 UTC (rev 847)
@@ -275,7 +275,7 @@
public void resetEditProgramAction() {
resetEditProgramAction = true;
try {
- ui.getEditCruiseComboBox().setSelectedIndex(0);
+ ui.getEditProgramComboBox().setSelectedIndex(0);
} finally {
resetEditProgramAction = false;
}
Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2013-04-22 08:42:40 UTC (rev 846)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2013-04-22 09:31:26 UTC (rev 847)
@@ -861,6 +861,7 @@
tutti.label.tab.individualObservations=
tutti.label.tab.marineLitter=
tutti.label.tab.plancton=
+tutti.label.tab.species=
tutti.legend.frequencyConfiguration=
tutti.legend.splitBenthosBatchConfiguration=
tutti.legend.splitSpeciesBatchConfiguration=
Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-04-22 08:42:40 UTC (rev 846)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-04-22 09:31:26 UTC (rev 847)
@@ -7,7 +7,6 @@
tutti.about.bottomText=Copyright %s - %s - version %s
tutti.about.message=<h3>Tutti</h3><p><strong>Outil de saisie de données d'opérations et de captures au cours des campagnes halieutiques.</strong></p><br/><p>Ce logiciel permettra la saisie en mer des données d'opération de pêche (positions, environnement, engin, etc) et des captures associées (composition de la capture en espèces scientifiques avec poids, nombres, tailles etc) pour l'ensemble des campagnes halieutiques réalisées par l'Ifremer.</p><p>Ce projet a été initiée en 2012 par l'<a href\="http\://www.ifremer.fr">Ifremer</a> et réalisé par la société <a href\="http\://codelutin.com">Codelutin</a>.</p><hr/><br/><p>Pour plus d'informations, vous pouvez visiter le <a href\="http\://maven-site.forge.codelutin.com/tutti">site du projet</a>.</p><p>Projet hébergé sur la forge <a href\="http\://forge.codelutin.com/projects/tutti">Forge.codelutin.com</a>.</p>
tutti.about.title=À propos de Tutti
-tutti.label.tab.species=Espèces
tutti.about.translate.content=<h2>Comment traduire Tutti</h2>Vous pouvez nous aider à traduire Tutti.<hr/><br/><ul><li>Récupérer le fichier <a href\="%s">tutti-i18n.csv</a> dans le répertoire <strong>i18n</strong></li><li>ouvrez le avec un tableur (le caractère séprateur est une Tabultation)</li><li>Traduisez, Améliorer, ...</li><li>Enfin renvoyez-le nous</li></ul><br/>Nous intégrerons vos modifications avant la prochaine version.
tutti.about.translate.title=Traduire Tutti
tutti.about.update.app.noup.detail=<tr><td>%1$s</td><td>%2$s</td><td>%2$s<td><td></td></tr>
@@ -799,9 +798,9 @@
tutti.error.errorpane.htmlmessage=<html><body><b>Une erreur s'est produite</b>\:<br/>%s</body></html>
tutti.error.ui.business.error=Erreur
tutti.error.ui.other.error=Erreur
-tutti.exportCruise.action.success=La campagne %s a été exporté dans le fichier %s avec succès.
-tutti.exportProgram.action.success=La série de campagne a été exportée dans le fichier %s avec succès.
-tutti.exportProtocol.action.success=Protocole [%1s] exporté dans le fichier %2s.
+tutti.exportCruise.action.success=La campagne <strong>%s</strong> a été exportée dans le fichier <strong>%s</strong>.
+tutti.exportProgram.action.success=La série de campagne <strong>%s</strong> a été exportée dans le fichier <strong>%s</strong>.
+tutti.exportProtocol.action.success=Protocole [%1s] exporté dans le fichier <strong>%2s</strong>.
tutti.fishingOperations.action.newFishingOperation.mnemonic=N
tutti.fishingOperations.action.newFishingOperation.tip=Créer une nouvelle opération de pêche
tutti.fishingOperations.info.no.fishingOperation.selected=< Aucun trait sélectionné >
@@ -861,8 +860,9 @@
tutti.label.tab.individualObservations=Observatiosn individuelles
tutti.label.tab.marineLitter=Macro déchets
tutti.label.tab.plancton=Plancton
+tutti.label.tab.species=Espèces
tutti.legend.frequencyConfiguration=Configuration
-tutti.legend.splitBenthosBatchConfiguration=
+tutti.legend.splitBenthosBatchConfiguration=Configuration
tutti.legend.splitSpeciesBatchConfiguration=Configuration
tutti.main.action.about=À propos
tutti.main.action.about.mnemonic=À
1
0
22 Apr '13
Author: tchemit
Date: 2013-04-22 10:42:40 +0200 (Mon, 22 Apr 2013)
New Revision: 846
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/846
Log:
- fix missing i18n
- fishing operation are no more persisted
- refs #1875: [IMP/EXP] - Export des donn?\195?\169es de campagne : format g?\195?\169n?\195?\169rique
Modified:
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/TuttiCsvUtil.java
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/OperationExportModel.java
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/OperationExportRow.java
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/ParameterExportModel.java
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/TuttiExportService.java
trunk/tutti-service/src/main/resources/i18n/tutti-service_en_GB.properties
trunk/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties
trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/export/TuttiExportServiceTest.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportCruiseAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportProgramAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUIModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/IndividualObservationBatchUIModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchUIModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/AbstractCaracteristicTabUIHandler.java
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/TuttiCsvUtil.java
===================================================================
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/TuttiCsvUtil.java 2013-04-22 06:53:55 UTC (rev 845)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/TuttiCsvUtil.java 2013-04-22 08:42:40 UTC (rev 846)
@@ -24,7 +24,9 @@
* #L%
*/
+import com.google.common.base.Function;
import com.google.common.base.Joiner;
+import com.google.common.collect.Lists;
import fr.ifremer.tutti.TuttiTechnicalException;
import fr.ifremer.tutti.persistence.entities.TuttiEntity;
import fr.ifremer.tutti.persistence.entities.referential.CaracteristicQualitativeValue;
@@ -336,6 +338,9 @@
@Override
public String format(Serializable value) {
+ if (value == null) {
+ return "NA";
+ }
if (value instanceof Float) {
return floatDelegate.format((Float) value);
}
@@ -355,7 +360,14 @@
@Override
public String format(List<Person> value) {
- return Joiner.on('|').join(value);
+ List<String> decoratedValues =
+ Lists.transform(value, new Function<Person, String>() {
+ @Override
+ public String apply(Person input) {
+ return input.getFirstName() + ' ' + input.getLastName();
+ }
+ });
+ return Joiner.on('|').join(decoratedValues);
}
}
Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/OperationExportModel.java
===================================================================
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/OperationExportModel.java 2013-04-22 06:53:55 UTC (rev 845)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/OperationExportModel.java 2013-04-22 08:42:40 UTC (rev 846)
@@ -64,8 +64,8 @@
newColumnForExport("Id_Operation", FishingOperation.PROPERTY_STATION_NUMBER);
newColumnForExport("NumOrdre_Station", FishingOperation.PROPERTY_FISHING_OPERATION_NUMBER, TuttiCsvUtil.INTEGER);
- newColumnForExport("Engin", Cruise.PROPERTY_GEAR, Gear.PROPERTY_NAME);
- newColumnForExport("Navire", Cruise.PROPERTY_VESSEL, Vessel.PROPERTY_NAME);
+ newColumnForExport("Engin", FishingOperation.PROPERTY_GEAR, Gear.PROPERTY_NAME);
+ newColumnForExport("Navire", FishingOperation.PROPERTY_VESSEL, Vessel.PROPERTY_NAME);
newColumnForExport("DateDeb_Op", FishingOperation.PROPERTY_GEAR_SHOOTING_START_DATE, TuttiCsvUtil.DAY_TIME_SECOND);
newColumnForExport("LatDeb", FishingOperation.PROPERTY_GEAR_SHOOTING_START_LATITUDE, TuttiCsvUtil.FLOAT);
newColumnForExport("LongDeb", FishingOperation.PROPERTY_GEAR_SHOOTING_START_LONGITUDE, TuttiCsvUtil.FLOAT);
Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/OperationExportRow.java
===================================================================
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/OperationExportRow.java 2013-04-22 06:53:55 UTC (rev 845)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/OperationExportRow.java 2013-04-22 08:42:40 UTC (rev 846)
@@ -108,7 +108,7 @@
}
public Vessel getVessel() {
- return cruise.getVessel();
+ return fishingOperation.getVessel();
}
public Date getGearShootingStartDate() {
@@ -187,7 +187,7 @@
protected Serializable getGearUseFeature(Caracteristic caracteristic) {
CaracteristicMap gearUseFeatures = fishingOperation.getGearUseFeatures();
- Serializable serializable = gearUseFeatures.get(caracteristic);
+ Serializable serializable = gearUseFeatures == null ? null : gearUseFeatures.get(caracteristic);
return serializable;
}
}
\ No newline at end of file
Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/ParameterExportModel.java
===================================================================
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/ParameterExportModel.java 2013-04-22 06:53:55 UTC (rev 845)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/ParameterExportModel.java 2013-04-22 08:42:40 UTC (rev 846)
@@ -24,6 +24,7 @@
* #L%
*/
+import fr.ifremer.tutti.persistence.entities.CaracteristicMap;
import fr.ifremer.tutti.persistence.entities.data.Cruise;
import fr.ifremer.tutti.persistence.entities.data.FishingOperation;
import fr.ifremer.tutti.persistence.entities.data.Program;
@@ -61,25 +62,31 @@
Cruise cruise,
FishingOperation operation) {
- for (Map.Entry<Caracteristic, Serializable> entry : operation.getGearUseFeatures().entrySet()) {
- Caracteristic caracteristic = entry.getKey();
+ CaracteristicMap gearUseFeatures = operation.getGearUseFeatures();
+ if (gearUseFeatures != null) {
+ for (Map.Entry<Caracteristic, Serializable> entry : gearUseFeatures.entrySet()) {
+ Caracteristic caracteristic = entry.getKey();
- ParameterExportRow row = new ParameterExportRow();
- row.setCruise(cruise);
- row.setFishingOperation(operation);
- row.setCaracteristic(caracteristic);
- row.setValue(entry.getValue());
- rows.add(row);
+ ParameterExportRow row = new ParameterExportRow();
+ row.setCruise(cruise);
+ row.setFishingOperation(operation);
+ row.setCaracteristic(caracteristic);
+ row.setValue(entry.getValue());
+ rows.add(row);
+ }
}
- for (Map.Entry<Caracteristic, Serializable> entry : operation.getVesselUseFeatures().entrySet()) {
- Caracteristic caracteristic = entry.getKey();
+ CaracteristicMap vesselUseFeatures = operation.getVesselUseFeatures();
+ if (vesselUseFeatures!=null) {
+ for (Map.Entry<Caracteristic, Serializable> entry : vesselUseFeatures.entrySet()) {
+ Caracteristic caracteristic = entry.getKey();
- ParameterExportRow row = new ParameterExportRow();
- row.setCruise(cruise);
- row.setFishingOperation(operation);
- row.setCaracteristic(caracteristic);
- row.setValue(entry.getValue());
- rows.add(row);
+ ParameterExportRow row = new ParameterExportRow();
+ row.setCruise(cruise);
+ row.setFishingOperation(operation);
+ row.setCaracteristic(caracteristic);
+ row.setValue(entry.getValue());
+ rows.add(row);
+ }
}
}
Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/TuttiExportService.java
===================================================================
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/TuttiExportService.java 2013-04-22 06:53:55 UTC (rev 845)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/TuttiExportService.java 2013-04-22 08:42:40 UTC (rev 846)
@@ -31,6 +31,7 @@
import fr.ifremer.tutti.TuttiBusinessException;
import fr.ifremer.tutti.TuttiIOUtil;
import fr.ifremer.tutti.TuttiTechnicalException;
+import fr.ifremer.tutti.persistence.ProgressionModel;
import fr.ifremer.tutti.persistence.entities.TuttiEntities;
import fr.ifremer.tutti.persistence.entities.data.BatchContainer;
import fr.ifremer.tutti.persistence.entities.data.BenthosBatch;
@@ -109,7 +110,9 @@
country = TuttiEntities.splitById(allCountry).get(countryId);
}
- public void exportProgram(String programId, File exportFile) {
+ public void exportProgram(String programId,
+ File exportFile,
+ ProgressionModel progressionModel) {
Preconditions.checkNotNull(programId);
Preconditions.checkNotNull(exportFile);
@@ -118,7 +121,7 @@
List<Cruise> allCruise = persistenceService.getAllCruise(programId);
for (Cruise cruise : allCruise) {
- checkCruise(cruise);
+ checkCruise(progressionModel, cruise);
}
File basedir = new File(context.getConfig().newTempFile(
@@ -132,17 +135,23 @@
for (Cruise cruise : allCruise) {
// load full cruise
cruise = persistenceService.getCruise(cruise.getId());
- exportCruise(cruise, exportContext);
+ exportCruise(cruise, exportContext, progressionModel);
}
TuttiIOUtil.close(exportContext, "Could not close export context");
+ progressionModel.setMessage(
+ _("tutti.service.exportCruise.buildZip", exportFile));
+
TuttiIOUtil.zip(basedir, exportFile, "Could not create export zip");
+ progressionModel.increments(1);
} finally {
IOUtils.closeQuietly(exportContext);
}
}
- public void exportCruise(String cruiseId, File exportFile) {
+ public void exportCruise(String cruiseId,
+ File exportFile,
+ ProgressionModel progressionModel) {
Preconditions.checkNotNull(cruiseId);
Preconditions.checkNotNull(exportFile);
@@ -151,7 +160,7 @@
Preconditions.checkNotNull(cruise);
// check cruise fishing operations
- checkCruise(cruise);
+ checkCruise(progressionModel, cruise);
File basedir = new File(context.getConfig().newTempFile(
"exportCruise"), "exportCruise-" + cruiseId);
@@ -161,10 +170,14 @@
ExportContext exportContext = createExportContext(basedir);
try {
- exportCruise(cruise, exportContext);
+ exportCruise(cruise, exportContext, progressionModel);
TuttiIOUtil.close(exportContext, "Could not close export context");
+ progressionModel.setMessage(
+ _("tutti.service.exportCruise.buildZip", exportFile));
+
TuttiIOUtil.zip(basedir, exportFile, "Could not create export zip");
+ progressionModel.increments(1);
} finally {
IOUtils.closeQuietly(exportContext);
}
@@ -180,13 +193,19 @@
horizontalOpeningDoorCaracteristic);
}
- protected void checkCruise(Cruise cruise) {
+ protected void checkCruise(ProgressionModel progressionModel, Cruise cruise) {
Preconditions.checkNotNull(cruise);
+
+ progressionModel.setMessage(
+ _("tutti.service.exportCruise.checkCruise", cruise.getName()));
+
// check cruise fishing operations
Map<String, String> errors =
tuttiWeightComputingService.checkCruise(cruise.getId());
+ progressionModel.increments(1);
+
if (MapUtils.isNotEmpty(errors)) {
// there is some fishing operations with some errors
@@ -210,18 +229,41 @@
}
protected void exportCruise(Cruise cruise,
- ExportContext exportContext) {
+ ExportContext exportContext,
+ ProgressionModel progressionModel) {
List<FishingOperation> operations =
persistenceService.getAllFishingOperation(cruise.getId());
+ // load fully operations
+ List<FishingOperation> loadedOperations =
+ Lists.newArrayListWithCapacity(operations.size());
+ for (FishingOperation operation : operations) {
+ FishingOperation loadedOeration =
+ persistenceService.getFishingOperation(operation.getId());
+ loadedOperations.add(loadedOeration);
+ }
+
+ String cruiseName = cruise.getName();
+ progressionModel.setMessage(
+ _("tutti.service.exportCruise.exportSurvey", cruiseName));
exportSurvey(exportContext, cruise);
+ progressionModel.increments(1);
- exportOperations(exportContext, cruise, operations);
+ progressionModel.setMessage(
+ _("tutti.service.exportCruise.exportOperations", cruiseName));
+ exportOperations(exportContext, cruise, loadedOperations);
+ progressionModel.increments(1);
- exportParameters(exportContext, cruise, operations);
+ progressionModel.setMessage(
+ _("tutti.service.exportCruise.exportParameters", cruiseName));
+ exportParameters(exportContext, cruise, loadedOperations);
+ progressionModel.increments(1);
-// exportCatches(exportContext, cruise, operations);
+ progressionModel.setMessage(
+ _("tutti.service.exportCruise.exportCatches", cruiseName));
+// exportCatches(exportContext, cruise, loadedOperations);
+ progressionModel.increments(1);
}
protected void exportSurvey(ExportContext exportContext,
@@ -241,6 +283,7 @@
protected void exportOperations(ExportContext exportContext,
Cruise cruise,
List<FishingOperation> operations) {
+
try {
List<OperationExportRow> rows = Lists.newArrayList();
Modified: trunk/tutti-service/src/main/resources/i18n/tutti-service_en_GB.properties
===================================================================
--- trunk/tutti-service/src/main/resources/i18n/tutti-service_en_GB.properties 2013-04-22 06:53:55 UTC (rev 845)
+++ trunk/tutti-service/src/main/resources/i18n/tutti-service_en_GB.properties 2013-04-22 08:42:40 UTC (rev 846)
@@ -49,6 +49,12 @@
tutti.service.catches.computeWeights.species.error.incoherentSampleWeight=
tutti.service.export.invalid.cruise=
tutti.service.export.invalid.fishingOperation=
+tutti.service.exportCruise.buildZip=
+tutti.service.exportCruise.checkCruise=
+tutti.service.exportCruise.exportCatches=
+tutti.service.exportCruise.exportOperations=
+tutti.service.exportCruise.exportParameters=
+tutti.service.exportCruise.exportSurvey=
tutti.service.operations.computeWeights.benthos.error.incoherentCategoryWeight=
tutti.service.operations.computeWeights.benthos.error.incoherentParentCategoryWeight=
tutti.service.operations.computeWeights.benthos.error.incoherentRowWeightFrequency=
Modified: trunk/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties
===================================================================
--- trunk/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties 2013-04-22 06:53:55 UTC (rev 845)
+++ trunk/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties 2013-04-22 08:42:40 UTC (rev 846)
@@ -49,6 +49,12 @@
tutti.service.catches.computeWeights.species.error.incoherentSampleWeight=
tutti.service.export.invalid.cruise=L'export de la campagne %s ne peut pas être réalisé suite aux erreurs rencontrées sur ses traits lors de l'élévation des poids \:\n%s
tutti.service.export.invalid.fishingOperation=L'élévation des poids ne peut pas être réalisé sur le trait %s, pour la raison suivante %s
+tutti.service.exportCruise.buildZip=Création de l'archive de l'export (fichier %s)
+tutti.service.exportCruise.checkCruise=Vérification de la campagne %s
+tutti.service.exportCruise.exportCatches=Export du fichier <strong>catch.csv</strong> pour la campagne %s
+tutti.service.exportCruise.exportOperations=Export du fichier <strong>operations.csv</strong> pour la campagne %s
+tutti.service.exportCruise.exportParameters=Export du fichier <strong>parameters.csv</strong> pour la campagne %s
+tutti.service.exportCruise.exportSurvey=Export du fichier <strong>survey.csv</strong> pour la campagne %s
tutti.service.operations.computeWeights.benthos.error.incoherentCategoryWeight=Le poids total des mensurations d'un lot du benthos est supérieur au poids de la catégorie
tutti.service.operations.computeWeights.benthos.error.incoherentParentCategoryWeight=Le poids de la catégorie d'un lot du benthos est différent de la somme des poids de ses sous-catégories
tutti.service.operations.computeWeights.benthos.error.incoherentRowWeightFrequency=Le poids total des mensurations d'un lot du benthos est différent du poids du sous-échantillon
Modified: trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/export/TuttiExportServiceTest.java
===================================================================
--- trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/export/TuttiExportServiceTest.java 2013-04-22 06:53:55 UTC (rev 845)
+++ trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/export/TuttiExportServiceTest.java 2013-04-22 08:42:40 UTC (rev 846)
@@ -26,9 +26,11 @@
import com.google.common.collect.Lists;
import com.google.common.io.Files;
+import fr.ifremer.tutti.persistence.ProgressionModel;
import fr.ifremer.tutti.persistence.RessourceClassLoader;
import fr.ifremer.tutti.persistence.entities.CaracteristicMap;
import fr.ifremer.tutti.persistence.entities.TuttiBeanFactory;
+import fr.ifremer.tutti.persistence.entities.TuttiEntities;
import fr.ifremer.tutti.persistence.entities.data.Cruise;
import fr.ifremer.tutti.persistence.entities.data.FishingOperation;
import fr.ifremer.tutti.persistence.entities.data.Program;
@@ -56,6 +58,7 @@
import java.io.File;
import java.util.Date;
import java.util.List;
+import java.util.Map;
/**
* @author tchemit <chemit(a)codelutin.com>
@@ -77,6 +80,8 @@
protected List<FishingOperation> operations;
+ protected ProgressionModel progressionModel;
+
@Override
protected TuttiServiceContext createServiceContext(RessourceClassLoader loader,
TuttiServiceConfig config) {
@@ -96,6 +101,8 @@
cruise = createCruise();
operations = createOperations(cruise);
+ Map<String,FishingOperation> operationMap = TuttiEntities.splitById(operations);
+
serviceContext.getConfig().setCsvSeparator(';');
PersistenceService persistenceService = Mockito.mock(PersistenceService.class);
@@ -109,6 +116,10 @@
Mockito.when(persistenceService.getAllCruise(Mockito.<String>any())).thenReturn(Lists.newArrayList(cruise));
Mockito.when(persistenceService.getAllCountry()).thenReturn(countries);
Mockito.when(persistenceService.getAllFishingOperation(Mockito.<String>any())).thenReturn(operations);
+ Mockito.when(persistenceService.getFishingOperation("0")).thenReturn(operationMap.get("0"));
+ Mockito.when(persistenceService.getFishingOperation("1")).thenReturn(operationMap.get("1"));
+ Mockito.when(persistenceService.getFishingOperation("2")).thenReturn(operationMap.get("2"));
+ Mockito.when(persistenceService.getFishingOperation("3")).thenReturn(operationMap.get("3"));
TuttiServiceContext serviceContextSpy = Mockito.spy(serviceContext);
Mockito.when(serviceContextSpy.getService(Mockito.eq(PersistenceService.class))).thenReturn(persistenceService);
@@ -124,6 +135,9 @@
service.tuttiWeightComputingService = tuttiWeightComputingService;
+ progressionModel = new ProgressionModel();
+ progressionModel.setTotal(6);
+
}
@Test
@@ -135,7 +149,7 @@
Assert.assertFalse(exportFile.exists());
- service.exportProgram(cruise.getId(), exportFile);
+ service.exportProgram(cruise.getId(), exportFile, progressionModel);
Assert.assertTrue(exportFile.exists());
}
@@ -148,7 +162,7 @@
Assert.assertFalse(exportFile.exists());
- service.exportCruise(cruise.getId(), exportFile);
+ service.exportCruise(cruise.getId(), exportFile, progressionModel);
Assert.assertTrue(exportFile.exists());
}
@@ -353,7 +367,6 @@
private List<FishingOperation> createOperations(Cruise cruise) {
List<FishingOperation> result = Lists.newArrayList();
-
Caracteristic caracteristicInteger = TuttiBeanFactory.newCaracteristic();
caracteristicInteger.setCaracteristicType(CaracteristicType.NUMBER);
caracteristicInteger.setId(0);
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportCruiseAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportCruiseAction.java 2013-04-22 06:53:55 UTC (rev 845)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportCruiseAction.java 2013-04-22 08:42:40 UTC (rev 846)
@@ -26,6 +26,7 @@
import com.google.common.base.Preconditions;
import fr.ifremer.tutti.TuttiIOUtil;
+import fr.ifremer.tutti.persistence.ProgressionModel;
import fr.ifremer.tutti.persistence.entities.data.Cruise;
import fr.ifremer.tutti.service.export.TuttiExportService;
import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil;
@@ -99,9 +100,13 @@
" to file: " + file);
}
- // export cruise
+ ProgressionModel progressionModel = new ProgressionModel();
+ setProgressionModel(progressionModel);
+ // check cruise / export cruise / operation / parameter / catches / zip
+ progressionModel.setTotal(6);
+
TuttiExportService service = getContext().getTuttiExportService();
- service.exportCruise(cruise.getId(), file);
+ service.exportCruise(cruise.getId(), file, progressionModel);
getHandler().resetEditCruiseAction();
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportProgramAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportProgramAction.java 2013-04-22 06:53:55 UTC (rev 845)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportProgramAction.java 2013-04-22 08:42:40 UTC (rev 846)
@@ -26,6 +26,8 @@
import com.google.common.base.Preconditions;
import fr.ifremer.tutti.TuttiIOUtil;
+import fr.ifremer.tutti.persistence.ProgressionModel;
+import fr.ifremer.tutti.persistence.entities.data.Cruise;
import fr.ifremer.tutti.persistence.entities.data.Program;
import fr.ifremer.tutti.service.export.TuttiExportService;
import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil;
@@ -34,6 +36,7 @@
import org.apache.commons.logging.LogFactory;
import java.io.File;
+import java.util.List;
import static org.nuiton.i18n.I18n._;
@@ -98,9 +101,16 @@
" to file: " + file);
}
- // export cruise
+ // nbCruise * (check cruise / export cruise / operation / parameter / catches) + zip
+ List<Cruise> allCruise =
+ getContext().getPersistenceService().getAllCruise(program.getId());
+
+ ProgressionModel progressionModel = new ProgressionModel();
+ setProgressionModel(progressionModel);
+ progressionModel.setTotal(5 * allCruise.size() + 1);
+
TuttiExportService service = getContext().getTuttiExportService();
- service.exportProgram(program.getId(), file);
+ service.exportProgram(program.getId(), file, progressionModel);
getHandler().resetEditProgramAction();
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUIHandler.java 2013-04-22 06:53:55 UTC (rev 845)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUIHandler.java 2013-04-22 08:42:40 UTC (rev 846)
@@ -237,7 +237,7 @@
getValidator().setBean(model);
- ui.applyDataBinding(SelectCruiseUI.BINDING_EDIT_PROGRAM_BUTTON_ENABLED);
+// ui.applyDataBinding(SelectCruiseUI.BINDING_EDIT_PROGRAM_BUTTON_ENABLED);
ui.applyDataBinding(SelectCruiseUI.BINDING_NEW_CRUISE_BUTTON_ENABLED);
ui.applyDataBinding(SelectCruiseUI.BINDING_EDIT_CATCHES_BUTTON_ENABLED);
ui.applyDataBinding(SelectCruiseUI.BINDING_VALIDATE_CATCHES_BUTTON_ENABLED);
@@ -248,18 +248,18 @@
return getUI().getEditCatchesButton();
}
- protected boolean resetEditProtolAction;
+ protected boolean resetEditProtocolAction;
protected boolean resetEditProgramAction;
protected boolean resetEditCruiseAction;
public void resetEditProtolAction() {
- resetEditProtolAction = true;
+ resetEditProtocolAction = true;
try {
ui.getEditProtocolComboBox().setSelectedIndex(0);
} finally {
- resetEditProtolAction = false;
+ resetEditProtocolAction = false;
}
}
@@ -294,72 +294,99 @@
}
public void startEditProgramAction(MouseEvent event) {
- JComboBox existingProgramCombo = (JComboBox) event.getSource();
- TuttiActionHelper.runAction((AbstractButton) existingProgramCombo.getItemAt(0));
+ startComboFirstAction(event);
+// JComboBox existingProgramCombo = (JComboBox) event.getSource();
+// TuttiActionHelper.runAction((AbstractButton) existingProgramCombo.getItemAt(0));
}
public void startEditProgramAction(ActionEvent event) {
- JComboBox existingProgramCombo = (JComboBox) event.getSource();
- JButton selectedAction = (JButton) existingProgramCombo.getSelectedItem();
- // hide popup before performing the action, otherwise, if the action
- // opens a popup, the user must click a first time to hide the combobox
- // popup to then interact with the popup opened by the action
- // (see http://forge.codelutin.com/issues/2032)
- existingProgramCombo.setSelectedIndex(0);
- existingProgramCombo.hidePopup();
- TuttiActionHelper.runAction(selectedAction);
+ startEditAction(!resetEditProgramAction, event);
+// JComboBox existingProgramCombo = (JComboBox) event.getSource();
+// JButton selectedAction = (JButton) existingProgramCombo.getSelectedItem();
+// // hide popup before performing the action, otherwise, if the action
+// // opens a popup, the user must click a first time to hide the combobox
+// // popup to then interact with the popup opened by the action
+// // (see http://forge.codelutin.com/issues/2032)
+// existingProgramCombo.setSelectedIndex(0);
+// existingProgramCombo.hidePopup();
+// TuttiActionHelper.runAction(selectedAction);
}
public void startEditCruiseAction(MouseEvent event) {
- JComboBox existingCruiseCombo = (JComboBox) event.getSource();
- TuttiActionHelper.runAction((AbstractButton) existingCruiseCombo.getItemAt(0));
+ startComboFirstAction(event);
+// JComboBox existingCruiseCombo = (JComboBox) event.getSource();
+// TuttiActionHelper.runAction((AbstractButton) existingCruiseCombo.getItemAt(0));
}
public void startEditCruiseAction(ActionEvent event) {
- JComboBox existingCruiseCombo = (JComboBox) event.getSource();
- JButton selectedAction = (JButton) existingCruiseCombo.getSelectedItem();
- // hide popup before performing the action, otherwise, if the action
- // opens a popup, the user must click a first time to hide the combobox
- // popup to then interact with the popup opened by the action
- // (see http://forge.codelutin.com/issues/2032)
- existingCruiseCombo.setSelectedIndex(0);
- existingCruiseCombo.hidePopup();
- TuttiActionHelper.runAction(selectedAction);
+ startEditAction(!resetEditCruiseAction, event);
+// JComboBox existingCruiseCombo = (JComboBox) event.getSource();
+// JButton selectedAction = (JButton) existingCruiseCombo.getSelectedItem();
+// // hide popup before performing the action, otherwise, if the action
+// // opens a popup, the user must click a first time to hide the combobox
+// // popup to then interact with the popup opened by the action
+// // (see http://forge.codelutin.com/issues/2032)
+// existingCruiseCombo.setSelectedIndex(0);
+// existingCruiseCombo.hidePopup();
+// TuttiActionHelper.runAction(selectedAction);
}
public void startExistingProtocolAction(MouseEvent event) {
- JComboBox existingProtocolCombo = (JComboBox) event.getSource();
- TuttiActionHelper.runAction((AbstractButton) existingProtocolCombo.getItemAt(0));
+ startComboFirstAction(event);
+// JComboBox existingProtocolCombo = (JComboBox) event.getSource();
+// TuttiActionHelper.runAction((AbstractButton) existingProtocolCombo.getItemAt(0));
}
public void startExistingProtocolAction(ActionEvent event) {
- if (!resetEditProtolAction) {
- JComboBox existingProtocolCombo = (JComboBox) event.getSource();
- JButton selectedAction = (JButton) existingProtocolCombo.getSelectedItem();
+ startEditAction(!resetEditProtocolAction, event);
+// if (!resetEditProtocolAction) {
+// JComboBox existingProtocolCombo = (JComboBox) event.getSource();
+// JButton selectedAction = (JButton) existingProtocolCombo.getSelectedItem();
+// // hide popup before performing the action, otherwise, if the action
+// // opens a popup, the user must click a first time to hide the combobox
+// // popup to then interact with the popup opened by the action
+// // (see http://forge.codelutin.com/issues/2032)
+// existingProtocolCombo.setSelectedIndex(0);
+// existingProtocolCombo.hidePopup();
+// TuttiActionHelper.runAction(selectedAction);
+// }
+ }
+
+ public void startNewProtocolAction(MouseEvent event) {
+ startComboFirstAction(event);
+// JComboBox newProtocolCombo = (JComboBox) event.getSource();
+// TuttiActionHelper.runAction((AbstractButton) newProtocolCombo.getItemAt(0));
+ }
+
+ public void startNewProtocolAction(ActionEvent event) {
+ startEditAction(true, event);
+// JComboBox newProtocolCombo = (JComboBox) event.getSource();
+// JButton selectedAction = (JButton) newProtocolCombo.getSelectedItem();
+// // hide popup before performing the action, otherwise, if the action
+// // opens a popup, the user must click a first time to hide the combobox
+// // popup to then interact with the popup opened by the action
+// // (see http://forge.codelutin.com/issues/2032)
+// newProtocolCombo.setSelectedIndex(0);
+// newProtocolCombo.hidePopup();
+// TuttiActionHelper.runAction(selectedAction);
+ }
+
+ protected void startComboFirstAction(MouseEvent event) {
+ JComboBox combo = (JComboBox) event.getSource();
+ TuttiActionHelper.runAction((AbstractButton) combo.getItemAt(0));
+ }
+
+ protected void startEditAction(boolean canEdit, ActionEvent event) {
+ if (canEdit) {
+ JComboBox existingCombo = (JComboBox) event.getSource();
+ JButton selectedAction = (JButton) existingCombo.getSelectedItem();
// hide popup before performing the action, otherwise, if the action
// opens a popup, the user must click a first time to hide the combobox
// popup to then interact with the popup opened by the action
// (see http://forge.codelutin.com/issues/2032)
- existingProtocolCombo.setSelectedIndex(0);
- existingProtocolCombo.hidePopup();
+ existingCombo.setSelectedIndex(0);
+ existingCombo.hidePopup();
TuttiActionHelper.runAction(selectedAction);
}
}
-
- public void startNewProtocolAction(MouseEvent event) {
- JComboBox newProtocolCombo = (JComboBox) event.getSource();
- TuttiActionHelper.runAction((AbstractButton) newProtocolCombo.getItemAt(0));
- }
-
- public void startNewProtocolAction(ActionEvent event) {
- JComboBox newProtocolCombo = (JComboBox) event.getSource();
- JButton selectedAction = (JButton) newProtocolCombo.getSelectedItem();
- // hide popup before performing the action, otherwise, if the action
- // opens a popup, the user must click a first time to hide the combobox
- // popup to then interact with the popup opened by the action
- // (see http://forge.codelutin.com/issues/2032)
- newProtocolCombo.setSelectedIndex(0);
- newProtocolCombo.hidePopup();
- TuttiActionHelper.runAction(selectedAction);
- }
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUIModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUIModel.java 2013-04-22 06:53:55 UTC (rev 845)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUIModel.java 2013-04-22 08:42:40 UTC (rev 846)
@@ -24,17 +24,12 @@
* #L%
*/
-import com.google.common.collect.Lists;
-import fr.ifremer.tutti.persistence.entities.data.AttachementObjectTypeEnum;
-import fr.ifremer.tutti.persistence.entities.data.Attachment;
import fr.ifremer.tutti.ui.swing.content.operation.AbstractTuttiBatchUIModel;
import fr.ifremer.tutti.ui.swing.content.operation.catches.EditCatchesUIModel;
import fr.ifremer.tutti.ui.swing.util.TabContentModel;
-import fr.ifremer.tutti.ui.swing.util.attachment.AttachmentModelAware;
import org.apache.commons.collections.CollectionUtils;
-import java.util.Collection;
-import java.util.List;
+import static org.nuiton.i18n.I18n.n_;
/**
* @author tchemit <chemit(a)codelutin.com>
@@ -88,7 +83,7 @@
@Override
public String getTitle() {
- return "tutti.label.tab.accidental";
+ return n_("tutti.label.tab.accidental");
}
@Override
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIModel.java 2013-04-22 06:53:55 UTC (rev 845)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIModel.java 2013-04-22 08:42:40 UTC (rev 846)
@@ -41,6 +41,8 @@
import java.util.Collection;
import java.util.List;
+import static org.nuiton.i18n.I18n.n_;
+
/**
* @author tchemit <chemit(a)codelutin.com>
* @since 0.1
@@ -154,7 +156,7 @@
@Override
public String getTitle() {
- return "tutti.label.tab.benthos";
+ return n_("tutti.label.tab.benthos");
}
@Override
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/IndividualObservationBatchUIModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/IndividualObservationBatchUIModel.java 2013-04-22 06:53:55 UTC (rev 845)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/IndividualObservationBatchUIModel.java 2013-04-22 08:42:40 UTC (rev 846)
@@ -22,18 +22,13 @@
* #L%
*/
-import com.google.common.collect.Lists;
-import fr.ifremer.tutti.persistence.entities.data.AttachementObjectTypeEnum;
-import fr.ifremer.tutti.persistence.entities.data.Attachment;
import fr.ifremer.tutti.persistence.entities.referential.Species;
import fr.ifremer.tutti.ui.swing.content.operation.AbstractTuttiBatchUIModel;
import fr.ifremer.tutti.ui.swing.content.operation.catches.EditCatchesUIModel;
import fr.ifremer.tutti.ui.swing.util.TabContentModel;
-import fr.ifremer.tutti.ui.swing.util.attachment.AttachmentModelAware;
import org.apache.commons.collections.CollectionUtils;
-import java.util.Collection;
-import java.util.List;
+import static org.nuiton.i18n.I18n.n_;
/**
* @author kmorin <kmorin(a)codelutin.com>
@@ -95,7 +90,7 @@
@Override
public String getTitle() {
- return "tutti.label.tab.individualObservations";
+ return n_("tutti.label.tab.individualObservations");
}
@Override
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchUIModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchUIModel.java 2013-04-22 06:53:55 UTC (rev 845)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchUIModel.java 2013-04-22 08:42:40 UTC (rev 846)
@@ -39,6 +39,8 @@
import java.util.Collection;
import java.util.List;
+import static org.nuiton.i18n.I18n.n_;
+
/**
* @author tchemit <chemit(a)codelutin.com>
* @since 0.2
@@ -178,7 +180,7 @@
@Override
public String getTitle() {
- return "tutti.label.tab.marineLitter";
+ return n_("tutti.label.tab.marineLitter");
}
@Override
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIModel.java 2013-04-22 06:53:55 UTC (rev 845)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIModel.java 2013-04-22 08:42:40 UTC (rev 846)
@@ -41,6 +41,8 @@
import java.util.Collection;
import java.util.List;
+import static org.nuiton.i18n.I18n.n_;
+
/**
* @author tchemit <chemit(a)codelutin.com>
* @since 0.1
@@ -404,7 +406,7 @@
@Override
public String getTitle() {
- return "tutti.label.tab.species";
+ return n_("tutti.label.tab.species");
}
@Override
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/AbstractCaracteristicTabUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/AbstractCaracteristicTabUIHandler.java 2013-04-22 06:53:55 UTC (rev 845)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/AbstractCaracteristicTabUIHandler.java 2013-04-22 08:42:40 UTC (rev 846)
@@ -80,6 +80,7 @@
protected void onRowModified(int rowIndex, RM row, String propertyName, Object oldValue, Object newValue) {
recomputeRowValidState(row);
super.onRowModified(rowIndex, row, propertyName, oldValue, newValue);
+ saveSelectedRowIfNeeded();
}
@Override
Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2013-04-22 06:53:55 UTC (rev 845)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2013-04-22 08:42:40 UTC (rev 846)
@@ -853,9 +853,12 @@
tutti.importPupitri.trunkFile.extension.description=
tutti.label.catches.planktonTotalSampleWeight=
tutti.label.catches.planktonTotalWeight=
+tutti.label.tab.accidental=
+tutti.label.tab.benthos=
tutti.label.tab.catches=
tutti.label.tab.catchesCaracteristics=
tutti.label.tab.fishingOperation=
+tutti.label.tab.individualObservations=
tutti.label.tab.marineLitter=
tutti.label.tab.plancton=
tutti.legend.frequencyConfiguration=
Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-04-22 06:53:55 UTC (rev 845)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-04-22 08:42:40 UTC (rev 846)
@@ -7,6 +7,7 @@
tutti.about.bottomText=Copyright %s - %s - version %s
tutti.about.message=<h3>Tutti</h3><p><strong>Outil de saisie de données d'opérations et de captures au cours des campagnes halieutiques.</strong></p><br/><p>Ce logiciel permettra la saisie en mer des données d'opération de pêche (positions, environnement, engin, etc) et des captures associées (composition de la capture en espèces scientifiques avec poids, nombres, tailles etc) pour l'ensemble des campagnes halieutiques réalisées par l'Ifremer.</p><p>Ce projet a été initiée en 2012 par l'<a href\="http\://www.ifremer.fr">Ifremer</a> et réalisé par la société <a href\="http\://codelutin.com">Codelutin</a>.</p><hr/><br/><p>Pour plus d'informations, vous pouvez visiter le <a href\="http\://maven-site.forge.codelutin.com/tutti">site du projet</a>.</p><p>Projet hébergé sur la forge <a href\="http\://forge.codelutin.com/projects/tutti">Forge.codelutin.com</a>.</p>
tutti.about.title=À propos de Tutti
+tutti.label.tab.species=Espèces
tutti.about.translate.content=<h2>Comment traduire Tutti</h2>Vous pouvez nous aider à traduire Tutti.<hr/><br/><ul><li>Récupérer le fichier <a href\="%s">tutti-i18n.csv</a> dans le répertoire <strong>i18n</strong></li><li>ouvrez le avec un tableur (le caractère séprateur est une Tabultation)</li><li>Traduisez, Améliorer, ...</li><li>Enfin renvoyez-le nous</li></ul><br/>Nous intégrerons vos modifications avant la prochaine version.
tutti.about.translate.title=Traduire Tutti
tutti.about.update.app.noup.detail=<tr><td>%1$s</td><td>%2$s</td><td>%2$s<td><td></td></tr>
@@ -852,9 +853,12 @@
tutti.importPupitri.trunkFile.extension.description=Fichier du trémie (.tnk)
tutti.label.catches.planktonTotalSampleWeight=Poids total échantillonné
tutti.label.catches.planktonTotalWeight=Poids total
+tutti.label.tab.accidental=Captures accidentelles
+tutti.label.tab.benthos=Benthos
tutti.label.tab.catches=Captures
tutti.label.tab.catchesCaracteristics=Résumé
tutti.label.tab.fishingOperation=Trait
+tutti.label.tab.individualObservations=Observatiosn individuelles
tutti.label.tab.marineLitter=Macro déchets
tutti.label.tab.plancton=Plancton
tutti.legend.frequencyConfiguration=Configuration
1
0
r845 - in trunk/tutti-ui-swing/src/main: filtered-resources help/fr java/fr/ifremer/tutti/ui/swing java/fr/ifremer/tutti/ui/swing/content/db java/fr/ifremer/tutti/ui/swing/content/home java/fr/ifremer/tutti/ui/swing/content/protocol java/fr/ifremer/tutti/ui/swing/content/referential resources/i18n
by tchemit@users.forge.codelutin.com 22 Apr '13
by tchemit@users.forge.codelutin.com 22 Apr '13
22 Apr '13
Author: tchemit
Date: 2013-04-22 08:53:55 +0200 (Mon, 22 Apr 2013)
New Revision: 845
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/845
Log:
add missing svn properties + license headers
fixes #2343: [ERGO] Proposer le nom d'un fichier pour chaque sauvegarde
Added:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportCruiseAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportProgramAction.java
Modified:
trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-en.properties
trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-fr.properties
trunk/tutti-ui-swing/src/main/help/fr/createAccidentalBatch.html
trunk/tutti-ui-swing/src/main/help/fr/createBenthosBatch.html
trunk/tutti-ui-swing/src/main/help/fr/createIndividualObservationBatch.html
trunk/tutti-ui-swing/src/main/help/fr/createMarineLitterBatch.html
trunk/tutti-ui-swing/src/main/help/fr/editBenthosFrequencies.html
trunk/tutti-ui-swing/src/main/help/fr/editIndividualObservationBatch.html
trunk/tutti-ui-swing/src/main/help/fr/index.html
trunk/tutti-ui-swing/src/main/help/fr/splitBenthosBatch.html
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiUIContext.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/ExportAndCleanDbAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/ExportDbAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportProtocolAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ImportProtocolAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUI.css
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUI.jaxx
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SendCruiseReportAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/ExportAllCaracteristicAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/ExportProtocolBenthosAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/ExportProtocolCaracteristicAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/ExportProtocolSpeciesAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/ExportPupitriAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/referential/ExportTemporaryGearExampleAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/referential/ExportTemporaryPersonExampleAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/referential/ExportTemporarySpeciesExampleAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/referential/ExportTemporaryVesselExampleAction.java
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
Modified: trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-en.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-en.properties 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-en.properties 2013-04-22 06:53:55 UTC (rev 845)
@@ -22,15 +22,16 @@
# #L%
###
#Generated by org.nuiton.jaxx.plugin.GenerateHelpIdsMojo
-#Sun Apr 21 13:23:05 CEST 2013
-tutti.createAccidentalBatch.action.cancel.help=createAccidentalBatch.html#actions
-tutti.createAccidentalBatch.action.save.help=createAccidentalBatch.html#actions
-tutti.createAccidentalBatch.field.accidentalDeadOrAlive.help=createAccidentalBatch.html#fields
-tutti.createAccidentalBatch.field.accidentalGender.help=createAccidentalBatch.html#fields
-tutti.createAccidentalBatch.field.accidentalLengthStepCaracteristic.help=createAccidentalBatch.html#fields
-tutti.createAccidentalBatch.field.accidentalSize.help=createAccidentalBatch.html#fields
-tutti.createAccidentalBatch.field.accidentalSpecies.help=createAccidentalBatch.html#fields
-tutti.createAccidentalBatch.field.accidentalWeight.help=createAccidentalBatch.html#fields
+#Mon Apr 22 08:30:46 CEST 2013
+tutti.config.help=config.html
+tutti.createAccidentalBatch.action.cancel.help=createAccidentalBatch.html\#actions
+tutti.createAccidentalBatch.action.save.help=createAccidentalBatch.html\#actions
+tutti.createAccidentalBatch.field.accidentalDeadOrAlive.help=createAccidentalBatch.html\#fields
+tutti.createAccidentalBatch.field.accidentalGender.help=createAccidentalBatch.html\#fields
+tutti.createAccidentalBatch.field.accidentalLengthStepCaracteristic.help=createAccidentalBatch.html\#fields
+tutti.createAccidentalBatch.field.accidentalSize.help=createAccidentalBatch.html\#fields
+tutti.createAccidentalBatch.field.accidentalSpecies.help=createAccidentalBatch.html\#fields
+tutti.createAccidentalBatch.field.accidentalWeight.help=createAccidentalBatch.html\#fields
tutti.createAccidentalBatch.help=createAccidentalBatch.html
tutti.createBenthosBatch.action.addSpecies.help=createBenthosBatch.html\#actions
tutti.createBenthosBatch.action.cancel.help=createBenthosBatch.html\#actions
@@ -39,19 +40,19 @@
tutti.createBenthosBatch.field.sortedUnsortedCategory.help=createBenthosBatch.html\#fields
tutti.createBenthosBatch.field.species.help=createBenthosBatch.html\#fields
tutti.createBenthosBatch.help=createBenthosBatch.html
-tutti.createIndividualObservationBatch.action.addSpecies.help=createIndividualObservationBatch.html#actions
-tutti.createIndividualObservationBatch.action.cancel.help=createIndividualObservationBatch.html#actions
-tutti.createIndividualObservationBatch.action.save.help=createIndividualObservationBatch.html#actions
-tutti.createIndividualObservationBatch.field.individualObservationLengthStepCaracteristic.help=createIndividualObservationBatch.html#fields
-tutti.createIndividualObservationBatch.field.individualObservationSize.help=createIndividualObservationBatch.html#fields
-tutti.createIndividualObservationBatch.field.individualObservationSpecies.help=createIndividualObservationBatch.html#fields
-tutti.createIndividualObservationBatch.field.individualObservationWeight.help=createIndividualObservationBatch.html#fields
+tutti.createIndividualObservationBatch.action.addSpecies.help=createIndividualObservationBatch.html\#actions
+tutti.createIndividualObservationBatch.action.cancel.help=createIndividualObservationBatch.html\#actions
+tutti.createIndividualObservationBatch.action.save.help=createIndividualObservationBatch.html\#actions
+tutti.createIndividualObservationBatch.field.individualObservationLengthStepCaracteristic.help=createIndividualObservationBatch.html\#fields
+tutti.createIndividualObservationBatch.field.individualObservationSize.help=createIndividualObservationBatch.html\#fields
+tutti.createIndividualObservationBatch.field.individualObservationSpecies.help=createIndividualObservationBatch.html\#fields
+tutti.createIndividualObservationBatch.field.individualObservationWeight.help=createIndividualObservationBatch.html\#fields
tutti.createIndividualObservationBatch.help=createIndividualObservationBatch.html
-tutti.createMarineLitterBatch.action.cancel.help=createMarineLitterBatch.html#actions
-tutti.createMarineLitterBatch.action.save.help=createMarineLitterBatch.html#actions
-tutti.createMarineLitterBatch.field.marineLitterCategory.help=createMarineLitterBatch.html#fields
-tutti.createMarineLitterBatch.field.marineLitterSizeCategory.help=createMarineLitterBatch.html#fields
-tutti.createMarineLitterBatch.field.number.help=createMarineLitterBatch.html#fields
+tutti.createMarineLitterBatch.action.cancel.help=createMarineLitterBatch.html\#actions
+tutti.createMarineLitterBatch.action.save.help=createMarineLitterBatch.html\#actions
+tutti.createMarineLitterBatch.field.marineLitterCategory.help=createMarineLitterBatch.html\#fields
+tutti.createMarineLitterBatch.field.marineLitterSizeCategory.help=createMarineLitterBatch.html\#fields
+tutti.createMarineLitterBatch.field.number.help=createMarineLitterBatch.html\#fields
tutti.createMarineLitterBatch.help=createMarineLitterBatch.html
tutti.createSpeciesBatch.action.addSpecies.help=createSpeciesBatch.html\#actions
tutti.createSpeciesBatch.action.cancel.help=createSpeciesBatch.html\#actions
@@ -68,8 +69,9 @@
tutti.dbManager.action.openDb.help=dbManager.html\#actions
tutti.dbManager.action.upgradeDb.help=dbManager.html\#actions
tutti.dbManager.help=dbManager.html
-tutti.editAccidentalBatch.action.createBatch.help=editAccidentalBatch.html#actions
-tutti.editAccidentalBatch.action.removeBatch.help=editAccidentalBatch.html#actions
+tutti.editAccidentalBatch.action.createBatch.help=editAccidentalBatch.html\#actions
+tutti.editAccidentalBatch.action.removeBatch.help=editAccidentalBatch.html\#actions
+tutti.editAccidentalBatch.help=editAccidentalBatch.html
tutti.editBenthosBatch.action.createBatch.help=editBenthosBatch.html\#actions
tutti.editBenthosBatch.action.createMelag.help=editBenthosBatch.html\#actions
tutti.editBenthosBatch.action.removeBatch.help=editBenthosBatch.html\#actions
@@ -175,11 +177,14 @@
tutti.editFishingOperation.field.trawlDistance.help=editFishingOperation.html\#fields
tutti.editFishingOperation.field.vessel.help=editFishingOperation.html\#fields
tutti.editFishingOperation.help=editFishingOperation.html
-tutti.editIndividualObservationBatch.action.createBatch.help=editIndividualObservationBatch.html#actions
-tutti.editIndividualObservationBatch.action.removeBatch.help=editIndividualObservationBatch.html#actions
-tutti.editMarineLitterBatch.action.createBatch.help=editIndividualObservationBatch.html#actions
-tutti.editMarineLitterBatch.action.removeBatch.help=editIndividualObservationBatch.html#actions
-tutti.editMarineLitterBatch.field.marineLitterTotalWeight.help=editIndividualObservationBatch.html#fields
+tutti.editIndividualObservationBatch.action.createBatch.help=editIndividualObservationBatch.html\#actions
+tutti.editIndividualObservationBatch.action.removeBatch.help=editIndividualObservationBatch.html\#actions
+tutti.editIndividualObservationBatch.help=editIndividualObservationBatch.html
+tutti.editMarineLitterBatch.action.createBatch.help=editIndividualObservationBatch.html\#actions
+tutti.editMarineLitterBatch.action.removeBatch.help=editIndividualObservationBatch.html\#actions
+tutti.editMarineLitterBatch.field.marineLitterTotalWeight.help=editIndividualObservationBatch.html\#fields
+tutti.editMarineLitterBatch.help=editMarineLitterBatch.html
+tutti.editPlanktonBatch.help=editPlanktonBatch.html
tutti.editProgram.action.cancelProgram.help=editProgram.html\#actions
tutti.editProgram.action.saveProgram.help=editProgram.html\#actions
tutti.editProgram.field.description.help=editProgram.html\#fields
@@ -242,12 +247,13 @@
tutti.fishingOperations.action.newFishingOperation.help=fishingOperations.html\#actions
tutti.fishingOperations.field.fishingOperation.help=fishingOperations.html\#fields
tutti.fishingOperations.help=fishingOperations.html
+tutti.index.help=index.html
+tutti.main.action.showHelp.help=index.html\#menu
+tutti.main.help=index.html
+tutti.main.menu.action.about.help=index.html\#menu
tutti.main.menu.action.changeLocale.help=index.html\#menu
tutti.main.menu.action.changeLocaleFR.help=index.html\#menu
tutti.main.menu.action.changeLocaleUK.help=index.html\#menu
-tutti.main.action.showHelp.help=index.html\#menu
-tutti.main.help=index.html
-tutti.main.menu.action.about.help=index.html\#menu
tutti.main.menu.action.configuration.help=index.html\#menu
tutti.main.menu.action.editCatches.help=index.html\#menu
tutti.main.menu.action.editCruise.help=index.html\#menu
@@ -276,6 +282,8 @@
tutti.selectCruise.action.editCruise.help=selectCruise.html\#actions
tutti.selectCruise.action.editProgram.help=selectCruise.html\#actions
tutti.selectCruise.action.editProtocol.help=selectCruise.html\#actions
+tutti.selectCruise.action.exportCruise.help=
+tutti.selectCruise.action.exportProgram.help=
tutti.selectCruise.action.exportProtocol.help=selectCruise.html\#actions
tutti.selectCruise.action.importProtocol.help=selectCruise.html\#actions
tutti.selectCruise.action.newCruise.help=selectCruise.html\#actions
@@ -302,9 +310,3 @@
tutti.splitSpeciesBatch.field.sampleWeightField.help=splitSpeciesBatch.html\#fields
tutti.splitSpeciesBatch.field.speciesField.help=splitSpeciesBatch.html\#fields
tutti.splitSpeciesBatch.help=splitSpeciesBatch.html
-tutti.config.help=config.html
-tutti.editAccidentalBatch.help=editAccidentalBatch.html
-tutti.editIndividualObservationBatch.help=editIndividualObservationBatch.html
-tutti.editMarineLitterBatch.help=editMarineLitterBatch.html
-tutti.editPlanktonBatch.help=editPlanktonBatch.html
-tutti.index.help=index.html
\ No newline at end of file
Modified: trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-fr.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-fr.properties 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-fr.properties 2013-04-22 06:53:55 UTC (rev 845)
@@ -22,15 +22,16 @@
# #L%
###
#Generated by org.nuiton.jaxx.plugin.GenerateHelpIdsMojo
-#Thu Apr 18 16:32:55 CEST 2013
-tutti.createAccidentalBatch.action.cancel.help=createAccidentalBatch.html#actions
-tutti.createAccidentalBatch.action.save.help=createAccidentalBatch.html#actions
-tutti.createAccidentalBatch.field.accidentalDeadOrAlive.help=createAccidentalBatch.html#fields
-tutti.createAccidentalBatch.field.accidentalGender.help=createAccidentalBatch.html#fields
-tutti.createAccidentalBatch.field.accidentalLengthStepCaracteristic.help=createAccidentalBatch.html#fields
-tutti.createAccidentalBatch.field.accidentalSize.help=createAccidentalBatch.html#fields
-tutti.createAccidentalBatch.field.accidentalSpecies.help=createAccidentalBatch.html#fields
-tutti.createAccidentalBatch.field.accidentalWeight.help=createAccidentalBatch.html#fields
+#Mon Apr 22 08:30:46 CEST 2013
+tutti.config.help=config.html
+tutti.createAccidentalBatch.action.cancel.help=createAccidentalBatch.html\#actions
+tutti.createAccidentalBatch.action.save.help=createAccidentalBatch.html\#actions
+tutti.createAccidentalBatch.field.accidentalDeadOrAlive.help=createAccidentalBatch.html\#fields
+tutti.createAccidentalBatch.field.accidentalGender.help=createAccidentalBatch.html\#fields
+tutti.createAccidentalBatch.field.accidentalLengthStepCaracteristic.help=createAccidentalBatch.html\#fields
+tutti.createAccidentalBatch.field.accidentalSize.help=createAccidentalBatch.html\#fields
+tutti.createAccidentalBatch.field.accidentalSpecies.help=createAccidentalBatch.html\#fields
+tutti.createAccidentalBatch.field.accidentalWeight.help=createAccidentalBatch.html\#fields
tutti.createAccidentalBatch.help=createAccidentalBatch.html
tutti.createBenthosBatch.action.addSpecies.help=createBenthosBatch.html\#actions
tutti.createBenthosBatch.action.cancel.help=createBenthosBatch.html\#actions
@@ -39,19 +40,19 @@
tutti.createBenthosBatch.field.sortedUnsortedCategory.help=createBenthosBatch.html\#fields
tutti.createBenthosBatch.field.species.help=createBenthosBatch.html\#fields
tutti.createBenthosBatch.help=createBenthosBatch.html
-tutti.createIndividualObservationBatch.action.addSpecies.help=createIndividualObservationBatch.html#actions
-tutti.createIndividualObservationBatch.action.cancel.help=createIndividualObservationBatch.html#actions
-tutti.createIndividualObservationBatch.action.save.help=createIndividualObservationBatch.html#actions
-tutti.createIndividualObservationBatch.field.individualObservationLengthStepCaracteristic.help=createIndividualObservationBatch.html#fields
-tutti.createIndividualObservationBatch.field.individualObservationSize.help=createIndividualObservationBatch.html#fields
-tutti.createIndividualObservationBatch.field.individualObservationSpecies.help=createIndividualObservationBatch.html#fields
-tutti.createIndividualObservationBatch.field.individualObservationWeight.help=createIndividualObservationBatch.html#fields
+tutti.createIndividualObservationBatch.action.addSpecies.help=createIndividualObservationBatch.html\#actions
+tutti.createIndividualObservationBatch.action.cancel.help=createIndividualObservationBatch.html\#actions
+tutti.createIndividualObservationBatch.action.save.help=createIndividualObservationBatch.html\#actions
+tutti.createIndividualObservationBatch.field.individualObservationLengthStepCaracteristic.help=createIndividualObservationBatch.html\#fields
+tutti.createIndividualObservationBatch.field.individualObservationSize.help=createIndividualObservationBatch.html\#fields
+tutti.createIndividualObservationBatch.field.individualObservationSpecies.help=createIndividualObservationBatch.html\#fields
+tutti.createIndividualObservationBatch.field.individualObservationWeight.help=createIndividualObservationBatch.html\#fields
tutti.createIndividualObservationBatch.help=createIndividualObservationBatch.html
-tutti.createMarineLitterBatch.action.cancel.help=createMarineLitterBatch.html#actions
-tutti.createMarineLitterBatch.action.save.help=createMarineLitterBatch.html#actions
-tutti.createMarineLitterBatch.field.marineLitterCategory.help=createMarineLitterBatch.html#fields
-tutti.createMarineLitterBatch.field.marineLitterSizeCategory.help=createMarineLitterBatch.html#fields
-tutti.createMarineLitterBatch.field.number.help=createMarineLitterBatch.html#fields
+tutti.createMarineLitterBatch.action.cancel.help=createMarineLitterBatch.html\#actions
+tutti.createMarineLitterBatch.action.save.help=createMarineLitterBatch.html\#actions
+tutti.createMarineLitterBatch.field.marineLitterCategory.help=createMarineLitterBatch.html\#fields
+tutti.createMarineLitterBatch.field.marineLitterSizeCategory.help=createMarineLitterBatch.html\#fields
+tutti.createMarineLitterBatch.field.number.help=createMarineLitterBatch.html\#fields
tutti.createMarineLitterBatch.help=createMarineLitterBatch.html
tutti.createSpeciesBatch.action.addSpecies.help=createSpeciesBatch.html\#actions
tutti.createSpeciesBatch.action.cancel.help=createSpeciesBatch.html\#actions
@@ -68,8 +69,9 @@
tutti.dbManager.action.openDb.help=dbManager.html\#actions
tutti.dbManager.action.upgradeDb.help=dbManager.html\#actions
tutti.dbManager.help=dbManager.html
-tutti.editAccidentalBatch.action.createBatch.help=editAccidentalBatch.html#actions
-tutti.editAccidentalBatch.action.removeBatch.help=editAccidentalBatch.html#actions
+tutti.editAccidentalBatch.action.createBatch.help=editAccidentalBatch.html\#actions
+tutti.editAccidentalBatch.action.removeBatch.help=editAccidentalBatch.html\#actions
+tutti.editAccidentalBatch.help=editAccidentalBatch.html
tutti.editBenthosBatch.action.createBatch.help=editBenthosBatch.html\#actions
tutti.editBenthosBatch.action.createMelag.help=editBenthosBatch.html\#actions
tutti.editBenthosBatch.action.removeBatch.help=editBenthosBatch.html\#actions
@@ -175,11 +177,14 @@
tutti.editFishingOperation.field.trawlDistance.help=editFishingOperation.html\#fields
tutti.editFishingOperation.field.vessel.help=editFishingOperation.html\#fields
tutti.editFishingOperation.help=editFishingOperation.html
-tutti.editIndividualObservationBatch.action.createBatch.help=editIndividualObservationBatch.html#actions
-tutti.editIndividualObservationBatch.action.removeBatch.help=editIndividualObservationBatch.html#actions
-tutti.editMarineLitterBatch.action.createBatch.help=editIndividualObservationBatch.html#actions
-tutti.editMarineLitterBatch.action.removeBatch.help=editIndividualObservationBatch.html#actions
-tutti.editMarineLitterBatch.field.marineLitterTotalWeight.help=editIndividualObservationBatch.html#fields
+tutti.editIndividualObservationBatch.action.createBatch.help=editIndividualObservationBatch.html\#actions
+tutti.editIndividualObservationBatch.action.removeBatch.help=editIndividualObservationBatch.html\#actions
+tutti.editIndividualObservationBatch.help=editIndividualObservationBatch.html
+tutti.editMarineLitterBatch.action.createBatch.help=editIndividualObservationBatch.html\#actions
+tutti.editMarineLitterBatch.action.removeBatch.help=editIndividualObservationBatch.html\#actions
+tutti.editMarineLitterBatch.field.marineLitterTotalWeight.help=editIndividualObservationBatch.html\#fields
+tutti.editMarineLitterBatch.help=editMarineLitterBatch.html
+tutti.editPlanktonBatch.help=editPlanktonBatch.html
tutti.editProgram.action.cancelProgram.help=editProgram.html\#actions
tutti.editProgram.action.saveProgram.help=editProgram.html\#actions
tutti.editProgram.field.description.help=editProgram.html\#fields
@@ -242,12 +247,13 @@
tutti.fishingOperations.action.newFishingOperation.help=fishingOperations.html\#actions
tutti.fishingOperations.field.fishingOperation.help=fishingOperations.html\#fields
tutti.fishingOperations.help=fishingOperations.html
+tutti.index.help=index.html
+tutti.main.action.showHelp.help=index.html\#menu
+tutti.main.help=index.html
+tutti.main.menu.action.about.help=index.html\#menu
tutti.main.menu.action.changeLocale.help=index.html\#menu
tutti.main.menu.action.changeLocaleFR.help=index.html\#menu
tutti.main.menu.action.changeLocaleUK.help=index.html\#menu
-tutti.main.action.showHelp.help=index.html\#menu
-tutti.main.help=index.html
-tutti.main.menu.action.about.help=index.html\#menu
tutti.main.menu.action.configuration.help=index.html\#menu
tutti.main.menu.action.editCatches.help=index.html\#menu
tutti.main.menu.action.editCruise.help=index.html\#menu
@@ -276,6 +282,8 @@
tutti.selectCruise.action.editCruise.help=selectCruise.html\#actions
tutti.selectCruise.action.editProgram.help=selectCruise.html\#actions
tutti.selectCruise.action.editProtocol.help=selectCruise.html\#actions
+tutti.selectCruise.action.exportCruise.help=
+tutti.selectCruise.action.exportProgram.help=
tutti.selectCruise.action.exportProtocol.help=selectCruise.html\#actions
tutti.selectCruise.action.importProtocol.help=selectCruise.html\#actions
tutti.selectCruise.action.newCruise.help=selectCruise.html\#actions
@@ -302,9 +310,3 @@
tutti.splitSpeciesBatch.field.sampleWeightField.help=splitSpeciesBatch.html\#fields
tutti.splitSpeciesBatch.field.speciesField.help=splitSpeciesBatch.html\#fields
tutti.splitSpeciesBatch.help=splitSpeciesBatch.html
-tutti.config.help=config.html
-tutti.editAccidentalBatch.help=editAccidentalBatch.html
-tutti.editIndividualObservationBatch.help=editIndividualObservationBatch.html
-tutti.editMarineLitterBatch.help=editMarineLitterBatch.html
-tutti.editPlanktonBatch.help=editPlanktonBatch.html
-tutti.index.help=index.html
Modified: trunk/tutti-ui-swing/src/main/help/fr/createAccidentalBatch.html
===================================================================
--- trunk/tutti-ui-swing/src/main/help/fr/createAccidentalBatch.html 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/help/fr/createAccidentalBatch.html 2013-04-22 06:53:55 UTC (rev 845)
@@ -1,3 +1,26 @@
+<!--
+ #%L
+ Tutti :: UI
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2012 - 2013 Ifremer
+ %%
+ 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 3 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, see
+ <http://www.gnu.org/licenses/gpl-3.0.html>.
+ #L%
+ -->
<!DOCTYPE html>
<html lang="fr">
Property changes on: trunk/tutti-ui-swing/src/main/help/fr/createAccidentalBatch.html
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/tutti-ui-swing/src/main/help/fr/createBenthosBatch.html
===================================================================
--- trunk/tutti-ui-swing/src/main/help/fr/createBenthosBatch.html 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/help/fr/createBenthosBatch.html 2013-04-22 06:53:55 UTC (rev 845)
@@ -1,3 +1,26 @@
+<!--
+ #%L
+ Tutti :: UI
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2012 - 2013 Ifremer
+ %%
+ 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 3 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, see
+ <http://www.gnu.org/licenses/gpl-3.0.html>.
+ #L%
+ -->
<!DOCTYPE html>
<html lang="fr">
Property changes on: trunk/tutti-ui-swing/src/main/help/fr/createBenthosBatch.html
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/tutti-ui-swing/src/main/help/fr/createIndividualObservationBatch.html
===================================================================
--- trunk/tutti-ui-swing/src/main/help/fr/createIndividualObservationBatch.html 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/help/fr/createIndividualObservationBatch.html 2013-04-22 06:53:55 UTC (rev 845)
@@ -1,3 +1,26 @@
+<!--
+ #%L
+ Tutti :: UI
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2012 - 2013 Ifremer
+ %%
+ 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 3 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, see
+ <http://www.gnu.org/licenses/gpl-3.0.html>.
+ #L%
+ -->
<!DOCTYPE html>
<html lang="fr">
Property changes on: trunk/tutti-ui-swing/src/main/help/fr/createIndividualObservationBatch.html
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/tutti-ui-swing/src/main/help/fr/createMarineLitterBatch.html
===================================================================
--- trunk/tutti-ui-swing/src/main/help/fr/createMarineLitterBatch.html 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/help/fr/createMarineLitterBatch.html 2013-04-22 06:53:55 UTC (rev 845)
@@ -1,3 +1,26 @@
+<!--
+ #%L
+ Tutti :: UI
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2012 - 2013 Ifremer
+ %%
+ 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 3 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, see
+ <http://www.gnu.org/licenses/gpl-3.0.html>.
+ #L%
+ -->
<!DOCTYPE html>
<html lang="fr">
Property changes on: trunk/tutti-ui-swing/src/main/help/fr/createMarineLitterBatch.html
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/tutti-ui-swing/src/main/help/fr/editBenthosFrequencies.html
===================================================================
--- trunk/tutti-ui-swing/src/main/help/fr/editBenthosFrequencies.html 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/help/fr/editBenthosFrequencies.html 2013-04-22 06:53:55 UTC (rev 845)
@@ -1,3 +1,26 @@
+<!--
+ #%L
+ Tutti :: UI
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2012 - 2013 Ifremer
+ %%
+ 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 3 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, see
+ <http://www.gnu.org/licenses/gpl-3.0.html>.
+ #L%
+ -->
<!DOCTYPE html>
<html lang="fr">
Property changes on: trunk/tutti-ui-swing/src/main/help/fr/editBenthosFrequencies.html
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/tutti-ui-swing/src/main/help/fr/editIndividualObservationBatch.html
===================================================================
--- trunk/tutti-ui-swing/src/main/help/fr/editIndividualObservationBatch.html 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/help/fr/editIndividualObservationBatch.html 2013-04-22 06:53:55 UTC (rev 845)
@@ -1,3 +1,26 @@
+<!--
+ #%L
+ Tutti :: UI
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2012 - 2013 Ifremer
+ %%
+ 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 3 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, see
+ <http://www.gnu.org/licenses/gpl-3.0.html>.
+ #L%
+ -->
<!DOCTYPE html>
<html lang="fr">
Property changes on: trunk/tutti-ui-swing/src/main/help/fr/editIndividualObservationBatch.html
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/tutti-ui-swing/src/main/help/fr/index.html
===================================================================
--- trunk/tutti-ui-swing/src/main/help/fr/index.html 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/help/fr/index.html 2013-04-22 06:53:55 UTC (rev 845)
@@ -1,3 +1,26 @@
+<!--
+ #%L
+ Tutti :: UI
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2012 - 2013 Ifremer
+ %%
+ 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 3 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, see
+ <http://www.gnu.org/licenses/gpl-3.0.html>.
+ #L%
+ -->
<!DOCTYPE html>
<html lang="fr">
Property changes on: trunk/tutti-ui-swing/src/main/help/fr/index.html
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/tutti-ui-swing/src/main/help/fr/splitBenthosBatch.html
===================================================================
--- trunk/tutti-ui-swing/src/main/help/fr/splitBenthosBatch.html 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/help/fr/splitBenthosBatch.html 2013-04-22 06:53:55 UTC (rev 845)
@@ -1,3 +1,26 @@
+<!--
+ #%L
+ Tutti :: UI
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2012 - 2013 Ifremer
+ %%
+ 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 3 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, see
+ <http://www.gnu.org/licenses/gpl-3.0.html>.
+ #L%
+ -->
<!DOCTYPE html>
<html lang="fr">
Property changes on: trunk/tutti-ui-swing/src/main/help/fr/splitBenthosBatch.html
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiUIContext.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiUIContext.java 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiUIContext.java 2013-04-22 06:53:55 UTC (rev 845)
@@ -39,6 +39,7 @@
import fr.ifremer.tutti.service.catches.ExportCatchesReportService;
import fr.ifremer.tutti.service.catches.TuttiWeightComputingService;
import fr.ifremer.tutti.service.catches.ValidateCruiseOperationsService;
+import fr.ifremer.tutti.service.export.TuttiExportService;
import fr.ifremer.tutti.service.protocol.TuttiProtocolImportExportService;
import fr.ifremer.tutti.service.pupitri.TuttiPupitriImportExportService;
import fr.ifremer.tutti.service.referential.TuttiReferentialImportExportService;
@@ -537,6 +538,10 @@
return serviceContext.getService(ExportCatchesReportService.class);
}
+ public TuttiExportService getTuttiExportService() {
+ return serviceContext.getService(TuttiExportService.class);
+ }
+
public boolean useRealPersistenceService() {
return isDbExist() && isDbLoaded();
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/ExportAndCleanDbAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/ExportAndCleanDbAction.java 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/ExportAndCleanDbAction.java 2013-04-22 06:53:55 UTC (rev 845)
@@ -37,6 +37,9 @@
import org.apache.commons.logging.LogFactory;
import java.io.File;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
import static org.nuiton.i18n.I18n._;
@@ -49,8 +52,11 @@
public class ExportAndCleanDbAction extends AbstractMainUITuttiAction {
/** Logger. */
- private static final Log log = LogFactory.getLog(ExportAndCleanDbAction.class);
+ private static final Log log =
+ LogFactory.getLog(ExportAndCleanDbAction.class);
+ public static final DateFormat df = new SimpleDateFormat("yyy-MM-dd");
+
protected File file;
public ExportAndCleanDbAction(MainUIHandler handler) {
@@ -67,7 +73,8 @@
// ask user file where to export db
// choose file to import
- file = TuttiUIUtil.chooseFile(
+ file = TuttiUIUtil.saveFile(
+ "tutti-db-" + df.format(new Date()) + ".zip",
getContext().getMainUI(),
_("tutti.dbManager.title.choose.dbExportFile"),
_("tutti.dbManager.action.chooseDbExportFile"),
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/ExportDbAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/ExportDbAction.java 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/ExportDbAction.java 2013-04-22 06:53:55 UTC (rev 845)
@@ -34,6 +34,9 @@
import org.apache.commons.logging.LogFactory;
import java.io.File;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
import static org.nuiton.i18n.I18n._;
@@ -50,6 +53,8 @@
protected File file;
+ public static final DateFormat df = new SimpleDateFormat("yyy-MM-dd");
+
public ExportDbAction(MainUIHandler handler) {
super(handler, true);
}
@@ -64,7 +69,8 @@
// ask user file where to export db
// choose file to import
- file = TuttiUIUtil.chooseFile(
+ file = TuttiUIUtil.saveFile(
+ "tutti-db-" + df.format(new Date()) + ".zip",
getContext().getMainUI(),
_("tutti.dbManager.title.choose.dbExportFile"),
_("tutti.dbManager.action.chooseDbExportFile"),
Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportCruiseAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportCruiseAction.java (rev 0)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportCruiseAction.java 2013-04-22 06:53:55 UTC (rev 845)
@@ -0,0 +1,116 @@
+package fr.ifremer.tutti.ui.swing.content.home;
+
+/*
+ * #%L
+ * Tutti :: UI
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2012 - 2013 Ifremer
+ * %%
+ * 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 3 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, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.common.base.Preconditions;
+import fr.ifremer.tutti.TuttiIOUtil;
+import fr.ifremer.tutti.persistence.entities.data.Cruise;
+import fr.ifremer.tutti.service.export.TuttiExportService;
+import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil;
+import fr.ifremer.tutti.ui.swing.util.action.AbstractTuttiAction;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.io.File;
+
+import static org.nuiton.i18n.I18n._;
+
+/**
+ * To export a selected cruise.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class ExportCruiseAction extends AbstractTuttiAction<SelectCruiseUIModel, SelectCruiseUI, SelectCruiseUIHandler> {
+
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(ExportCruiseAction.class);
+
+ protected File file;
+
+ public ExportCruiseAction(SelectCruiseUIHandler handler) {
+ super(handler, true);
+ }
+
+ @Override
+ protected boolean prepareAction() throws Exception {
+
+ boolean doAction = super.prepareAction();
+
+ if (doAction) {
+
+ Cruise cruise = getModel().getCruise();
+
+ // choose file to export
+ file = TuttiUIUtil.saveFile(
+ "exportCruise-" + cruise.getName() + ".zip",
+ getContext().getMainUI(),
+ _("tutti.selectCruise.title.choose.exportCruiseFile"),
+ _("tutti.selectCruise.action.chooseCruiseExportFile"),
+ "^.+\\.zip$", _("tutti.common.file.zip")
+ );
+ doAction = file != null;
+ if (doAction) {
+ file = TuttiIOUtil.addExtensionIfMissing(file, ".zip");
+
+ // ask user to confirm overwrite.
+ doAction = getHandler().askOverwriteFile(file);
+ }
+ }
+ return doAction;
+ }
+
+ @Override
+ protected void releaseAction() {
+ file = null;
+ super.releaseAction();
+ }
+
+ @Override
+ protected void doAction() throws Exception {
+ Cruise cruise = getModel().getCruise();
+ Preconditions.checkNotNull(cruise);
+ Preconditions.checkNotNull(file);
+
+ if (log.isInfoEnabled()) {
+ log.info("Will save cruise " + cruise.getId() +
+ " to file: " + file);
+ }
+
+ // export cruise
+ TuttiExportService service = getContext().getTuttiExportService();
+ service.exportCruise(cruise.getId(), file);
+
+ getHandler().resetEditCruiseAction();
+ }
+
+ @Override
+ public void postSuccessAction() {
+ super.postSuccessAction();
+ Cruise cruise = getModel().getCruise();
+ sendMessage(_("tutti.exportCruise.action.success",
+ cruise.getName(), file.getName()));
+ }
+}
Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportCruiseAction.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportProgramAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportProgramAction.java (rev 0)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportProgramAction.java 2013-04-22 06:53:55 UTC (rev 845)
@@ -0,0 +1,115 @@
+package fr.ifremer.tutti.ui.swing.content.home;
+
+/*
+ * #%L
+ * Tutti :: UI
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2012 - 2013 Ifremer
+ * %%
+ * 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 3 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, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.common.base.Preconditions;
+import fr.ifremer.tutti.TuttiIOUtil;
+import fr.ifremer.tutti.persistence.entities.data.Program;
+import fr.ifremer.tutti.service.export.TuttiExportService;
+import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil;
+import fr.ifremer.tutti.ui.swing.util.action.AbstractTuttiAction;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.io.File;
+
+import static org.nuiton.i18n.I18n._;
+
+/**
+ * To export a selected program.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class ExportProgramAction extends AbstractTuttiAction<SelectCruiseUIModel, SelectCruiseUI, SelectCruiseUIHandler> {
+
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(ExportProgramAction.class);
+
+ protected File file;
+
+ public ExportProgramAction(SelectCruiseUIHandler handler) {
+ super(handler, true);
+ }
+
+ @Override
+ protected boolean prepareAction() throws Exception {
+
+ boolean doAction = super.prepareAction();
+
+ Program program = getModel().getProgram();
+ if (doAction) {
+
+ // choose file to export
+ file = TuttiUIUtil.saveFile(
+ "exportProgram-" + program.getName() + ".zip",
+ getContext().getMainUI(),
+ _("tutti.selectCruise.title.choose.exportProgramFile"),
+ _("tutti.selectCruise.action.chooseProgramExportFile"),
+ "^.+\\.zip$", _("tutti.common.file.zip")
+ );
+ doAction = file != null;
+ if (doAction) {
+ file = TuttiIOUtil.addExtensionIfMissing(file, ".zip");
+
+ // ask user to confirm overwrite.
+ doAction = getHandler().askOverwriteFile(file);
+ }
+ }
+ return doAction;
+ }
+
+ @Override
+ protected void releaseAction() {
+ file = null;
+ super.releaseAction();
+ }
+
+ @Override
+ protected void doAction() throws Exception {
+ Program program = getModel().getProgram();
+ Preconditions.checkNotNull(program);
+ Preconditions.checkNotNull(file);
+
+ if (log.isInfoEnabled()) {
+ log.info("Will save program " + program.getId() +
+ " to file: " + file);
+ }
+
+ // export cruise
+ TuttiExportService service = getContext().getTuttiExportService();
+ service.exportProgram(program.getId(), file);
+
+ getHandler().resetEditProgramAction();
+ }
+
+ @Override
+ public void postSuccessAction() {
+ super.postSuccessAction();
+ Program program = getModel().getProgram();
+ sendMessage(_("tutti.exportProgram.action.success", program.getName(),
+ file.getName()));
+ }
+}
Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportProgramAction.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportProtocolAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportProtocolAction.java 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ExportProtocolAction.java 2013-04-22 06:53:55 UTC (rev 845)
@@ -62,11 +62,13 @@
if (doAction) {
+ TuttiProtocol protocol = getModel().getProtocol();
// choose file to export
- file = TuttiUIUtil.chooseFile(
+ file = TuttiUIUtil.saveFile(
+ "protocol-" + protocol.getName().replaceAll(" ", "_") + ".tuttiProtocol",
getContext().getMainUI(),
_("tutti.selectCruise.title.choose.exportFile"),
- _("tutti.selectCruise.action.chooseProtocolFile"),
+ _("tutti.selectCruise.action.exportProtocol"),
"^.+\\.tuttiProtocol$", _("tutti.common.file.protocol")
);
doAction = file != null;
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ImportProtocolAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ImportProtocolAction.java 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/ImportProtocolAction.java 2013-04-22 06:53:55 UTC (rev 845)
@@ -69,7 +69,7 @@
file = TuttiUIUtil.chooseFile(
getContext().getMainUI(),
_("tutti.selectCruise.title.choose.importFile"),
- _("tutti.selectCruise.action.chooseProtocolFile"),
+ _("tutti.selectCruise.action.importProtocol"),
"^.+\\.tuttiProtocol$", _("tutti.common.file.protocol")
);
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUI.css
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUI.css 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUI.css 2013-04-22 06:53:55 UTC (rev 845)
@@ -58,6 +58,12 @@
_validatorLabel: {_("tutti.selectCruise.field.program")};
}
+#editProgramComboBox {
+ model: {handler.newComboModel(editProgramButton, exportProgramButton)};
+ enabled: {model.isProgramFound()};
+ renderer: {new ActionListCellRenderer()};
+}
+
#editProgramButton {
actionIcon: edit;
text: "tutti.selectCruise.action.editProgram";
@@ -67,6 +73,15 @@
_help: {"tutti.selectCruise.action.editProgram.help"};
}
+#exportProgramButton {
+ actionIcon: export;
+ text: "tutti.selectCruise.action.exportProgram";
+ enabled: {model.isProgramFound()};
+ _tuttiAction: {ExportProgramAction.class};
+ toolTipText: "tutti.selectCruise.action.exportProgram.tip";
+ _help: {"tutti.selectCruise.action.exportProgram.help"};
+}
+
#newProgramButton {
actionIcon: add;
text: "tutti.selectCruise.action.newProgram";
@@ -91,7 +106,7 @@
}
#editCruiseComboBox {
- model: {handler.newComboModel(editCruiseButton, sendCruiseReportButton)};
+ model: {handler.newComboModel(editCruiseButton, exportCruiseButton, sendCruiseReportButton)};
enabled: {model.isProgramFound() && model.isCruiseFound()};
renderer: {new ActionListCellRenderer()};
}
@@ -104,6 +119,14 @@
_help: {"tutti.selectCruise.action.editCruise.help"};
}
+#exportCruiseButton {
+ actionIcon: export;
+ text: "tutti.selectCruise.action.exportCruise";
+ _tuttiAction: {ExportCruiseAction.class};
+ toolTipText: "tutti.selectCruise.action.exportCruise.tip";
+ _help: {"tutti.selectCruise.action.exportCruise.help"};
+}
+
#sendCruiseReportButton {
actionIcon: email;
text: "tutti.selectCruise.action.sendCruiseReport";
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUI.jaxx 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUI.jaxx 2013-04-22 06:53:55 UTC (rev 845)
@@ -73,7 +73,10 @@
<TuttiHelpBroker id='broker'
constructorParams='"tutti.selectCruise.help"'/>
+ <JButton id='editProgramButton'/>
+ <JButton id='exportProgramButton'/>
<JButton id='editCruiseButton'/>
+ <JButton id='exportCruiseButton'/>
<JButton id='sendCruiseReportButton'/>
<JButton id='newProtocolButton'/>
<JButton id='importProtocolButton'/>
@@ -100,7 +103,10 @@
</cell>
<cell>
<JPanel layout='{new GridLayout(1,0)}'>
- <JButton id='editProgramButton'/>
+ <JComboBox id='editProgramComboBox'
+ onMouseEntered='if (editProgramComboBox.isEnabled()) { editProgramComboBox.showPopup(); }'
+ onMouseClicked='if (editProgramComboBox.isEnabled()) { handler.startEditProgramAction(event); }'
+ onActionPerformed='handler.startEditProgramAction(event)'/>
<JButton id='newProgramButton'/>
</JPanel>
</cell>
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUIHandler.java 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUIHandler.java 2013-04-22 06:53:55 UTC (rev 845)
@@ -165,6 +165,7 @@
model.getProtocol());
ui.getEditCruiseComboBox().putClientProperty("JComboBox.isTableCellEditor", Boolean.TRUE);
+ ui.getEditProgramComboBox().putClientProperty("JComboBox.isTableCellEditor", Boolean.TRUE);
ui.getEditProtocolComboBox().putClientProperty("JComboBox.isTableCellEditor", Boolean.TRUE);
ui.getNewProtocolComboBox().putClientProperty("JComboBox.isTableCellEditor", Boolean.TRUE);
@@ -249,6 +250,10 @@
protected boolean resetEditProtolAction;
+ protected boolean resetEditProgramAction;
+
+ protected boolean resetEditCruiseAction;
+
public void resetEditProtolAction() {
resetEditProtolAction = true;
try {
@@ -258,6 +263,24 @@
}
}
+ public void resetEditCruiseAction() {
+ resetEditCruiseAction = true;
+ try {
+ ui.getEditCruiseComboBox().setSelectedIndex(0);
+ } finally {
+ resetEditCruiseAction = false;
+ }
+ }
+
+ public void resetEditProgramAction() {
+ resetEditProgramAction = true;
+ try {
+ ui.getEditCruiseComboBox().setSelectedIndex(0);
+ } finally {
+ resetEditProgramAction = false;
+ }
+ }
+
@Override
public void onCloseUI() {
if (log.isDebugEnabled()) {
@@ -270,6 +293,23 @@
clearValidators();
}
+ public void startEditProgramAction(MouseEvent event) {
+ JComboBox existingProgramCombo = (JComboBox) event.getSource();
+ TuttiActionHelper.runAction((AbstractButton) existingProgramCombo.getItemAt(0));
+ }
+
+ public void startEditProgramAction(ActionEvent event) {
+ JComboBox existingProgramCombo = (JComboBox) event.getSource();
+ JButton selectedAction = (JButton) existingProgramCombo.getSelectedItem();
+ // hide popup before performing the action, otherwise, if the action
+ // opens a popup, the user must click a first time to hide the combobox
+ // popup to then interact with the popup opened by the action
+ // (see http://forge.codelutin.com/issues/2032)
+ existingProgramCombo.setSelectedIndex(0);
+ existingProgramCombo.hidePopup();
+ TuttiActionHelper.runAction(selectedAction);
+ }
+
public void startEditCruiseAction(MouseEvent event) {
JComboBox existingCruiseCombo = (JComboBox) event.getSource();
TuttiActionHelper.runAction((AbstractButton) existingCruiseCombo.getItemAt(0));
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SendCruiseReportAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SendCruiseReportAction.java 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SendCruiseReportAction.java 2013-04-22 06:53:55 UTC (rev 845)
@@ -62,8 +62,10 @@
if (doAction) {
+ Cruise cruise = getModel().getCruise();
// choose file to export
- file = TuttiUIUtil.chooseFile(
+ file = TuttiUIUtil.saveFile(
+ "exportCruise-" + cruise.getName() + ".pdf",
getContext().getMainUI(),
_("tutti.sendCruiseReport.title.choose.exportFile"),
_("tutti.sendCruiseReport.action.chooseFile"),
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/ExportAllCaracteristicAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/ExportAllCaracteristicAction.java 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/ExportAllCaracteristicAction.java 2013-04-22 06:53:55 UTC (rev 845)
@@ -62,7 +62,8 @@
if (doAction) {
// choose file to export
- file = TuttiUIUtil.chooseFile(
+ file = TuttiUIUtil.saveFile(
+ "tuttiProtocol-" + getModel().getName() + "-allCaracteristics.csv",
getContext().getMainUI(),
_("tutti.editProtocol.title.choose.caracteristicExportFile"),
_("tutti.editProtocol.action.chooseProtocolCaracteristicFile"),
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/ExportProtocolBenthosAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/ExportProtocolBenthosAction.java 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/ExportProtocolBenthosAction.java 2013-04-22 06:53:55 UTC (rev 845)
@@ -65,7 +65,8 @@
if (doAction) {
// choose file to export
- file = TuttiUIUtil.chooseFile(
+ file = TuttiUIUtil.saveFile(
+ "tuttiProtocol-" + getModel().getName() + "-benthos.csv",
getContext().getMainUI(),
_("tutti.editProtocol.title.choose.benthosExportFile"),
_("tutti.editProtocol.action.chooseProtocolBenthosFile"),
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/ExportProtocolCaracteristicAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/ExportProtocolCaracteristicAction.java 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/ExportProtocolCaracteristicAction.java 2013-04-22 06:53:55 UTC (rev 845)
@@ -63,7 +63,8 @@
if (doAction) {
// choose file to export
- file = TuttiUIUtil.chooseFile(
+ file = TuttiUIUtil.saveFile(
+ "tuttiProtocol-" + getModel().getName() + "-caracteristics.csv",
getContext().getMainUI(),
_("tutti.editProtocol.title.choose.caracteristicExportFile"),
_("tutti.editProtocol.action.chooseProtocolCaracteristicFile"),
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/ExportProtocolSpeciesAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/ExportProtocolSpeciesAction.java 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/ExportProtocolSpeciesAction.java 2013-04-22 06:53:55 UTC (rev 845)
@@ -65,7 +65,8 @@
if (doAction) {
// choose file to export
- file = TuttiUIUtil.chooseFile(
+ file = TuttiUIUtil.saveFile(
+ "tuttiProtocol-" + getModel().getName() + "-species.csv",
getContext().getMainUI(),
_("tutti.editProtocol.title.choose.speciesExportFile"),
_("tutti.editProtocol.action.chooseProtocolSpeciesFile"),
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/ExportPupitriAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/ExportPupitriAction.java 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/ExportPupitriAction.java 2013-04-22 06:53:55 UTC (rev 845)
@@ -64,7 +64,8 @@
if (doAction) {
// choose file to export
- file = TuttiUIUtil.chooseFile(
+ file = TuttiUIUtil.saveFile(
+ "tuttiProtocol-" + getModel().getName() + "-pupitri.csv",
getContext().getMainUI(),
_("tutti.editProtocol.title.choose.speciesExportFile"),
_("tutti.editProtocol.action.chooseProtocolSpeciesFile")
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/referential/ExportTemporaryGearExampleAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/referential/ExportTemporaryGearExampleAction.java 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/referential/ExportTemporaryGearExampleAction.java 2013-04-22 06:53:55 UTC (rev 845)
@@ -63,7 +63,8 @@
if (doAction) {
// choose file to export
- file = TuttiUIUtil.chooseFile(
+ file = TuttiUIUtil.saveFile(
+ "exportGearExample.csv",
getContext().getMainUI(),
_("tutti.manageTemporaryReferential.title.choose.exportTemporaryGearExampleFile"),
_("tutti.manageTemporaryReferential.action.chooseReferentialGearFile"),
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/referential/ExportTemporaryPersonExampleAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/referential/ExportTemporaryPersonExampleAction.java 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/referential/ExportTemporaryPersonExampleAction.java 2013-04-22 06:53:55 UTC (rev 845)
@@ -64,7 +64,8 @@
if (doAction) {
// choose file to export
- file = TuttiUIUtil.chooseFile(
+ file = TuttiUIUtil.saveFile(
+ "exportPersonExample.csv",
getContext().getMainUI(),
_("tutti.manageTemporaryReferential.title.choose.exportTemporaryPersonExampleFile"),
_("tutti.manageTemporaryReferential.action.chooseReferentialPersonFile"),
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/referential/ExportTemporarySpeciesExampleAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/referential/ExportTemporarySpeciesExampleAction.java 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/referential/ExportTemporarySpeciesExampleAction.java 2013-04-22 06:53:55 UTC (rev 845)
@@ -63,7 +63,8 @@
if (doAction) {
// choose file to export
- file = TuttiUIUtil.chooseFile(
+ file = TuttiUIUtil.saveFile(
+ "exportSpeciesExample.csv",
getContext().getMainUI(),
_("tutti.manageTemporaryReferential.title.choose.exportTemporarySpeciesExampleFile"),
_("tutti.manageTemporaryReferential.action.chooseReferentialSpeciesFile"),
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/referential/ExportTemporaryVesselExampleAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/referential/ExportTemporaryVesselExampleAction.java 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/referential/ExportTemporaryVesselExampleAction.java 2013-04-22 06:53:55 UTC (rev 845)
@@ -63,7 +63,8 @@
if (doAction) {
// choose file to export
- file = TuttiUIUtil.chooseFile(
+ file = TuttiUIUtil.saveFile(
+ "exportVesselExample.csv",
getContext().getMainUI(),
_("tutti.manageTemporaryReferential.title.choose.exportTemporaryVesselExampleFile"),
_("tutti.manageTemporaryReferential.action.chooseReferentialVesselFile"),
Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2013-04-22 06:53:55 UTC (rev 845)
@@ -55,6 +55,7 @@
tutti.common.cancel=
tutti.common.cancel.mnemonic=
tutti.common.file.csv=
+tutti.common.file.export=
tutti.common.file.pdf=
tutti.common.file.protocol=
tutti.common.file.zip=
@@ -798,6 +799,8 @@
tutti.error.errorpane.htmlmessage=
tutti.error.ui.business.error=
tutti.error.ui.other.error=
+tutti.exportCruise.action.success=
+tutti.exportProgram.action.success=
tutti.exportProtocol.action.success=
tutti.fishingOperations.action.newFishingOperation.mnemonic=
tutti.fishingOperations.action.newFishingOperation.tip=
@@ -983,6 +986,8 @@
tutti.manageTemporaryReferential.title.choose.importTemporaryVesselFile=
tutti.message.action.running=
tutti.selectBenthos.title=
+tutti.selectCruise.action.chooseCruiseExportFile=
+tutti.selectCruise.action.chooseProgramExportFile=
tutti.selectCruise.action.chooseProtocolFile=
tutti.selectCruise.action.cloneProtocol=
tutti.selectCruise.action.cloneProtocol.tip=
@@ -999,6 +1004,10 @@
tutti.selectCruise.action.editProgram.tip=
tutti.selectCruise.action.editProtocol=
tutti.selectCruise.action.editProtocol.tip=
+tutti.selectCruise.action.exportCruise=
+tutti.selectCruise.action.exportCruise.tip=
+tutti.selectCruise.action.exportProgram=
+tutti.selectCruise.action.exportProgram.tip=
tutti.selectCruise.action.exportProtocol=
tutti.selectCruise.action.exportProtocol.tip=
tutti.selectCruise.action.importProtocol=
@@ -1021,7 +1030,9 @@
tutti.selectCruise.field.protocol=
tutti.selectCruise.field.protocol.tip=
tutti.selectCruise.title=
+tutti.selectCruise.title.choose.exportCruiseFile=
tutti.selectCruise.title.choose.exportFile=
+tutti.selectCruise.title.choose.exportProgramFile=
tutti.selectCruise.title.choose.importFile=
tutti.selectCruise.warn.invalid.selected.data=
tutti.selectSpecies.action.cancel=
Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-04-21 15:12:42 UTC (rev 844)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-04-22 06:53:55 UTC (rev 845)
@@ -798,6 +798,8 @@
tutti.error.errorpane.htmlmessage=<html><body><b>Une erreur s'est produite</b>\:<br/>%s</body></html>
tutti.error.ui.business.error=Erreur
tutti.error.ui.other.error=Erreur
+tutti.exportCruise.action.success=La campagne %s a été exporté dans le fichier %s avec succès.
+tutti.exportProgram.action.success=La série de campagne a été exportée dans le fichier %s avec succès.
tutti.exportProtocol.action.success=Protocole [%1s] exporté dans le fichier %2s.
tutti.fishingOperations.action.newFishingOperation.mnemonic=N
tutti.fishingOperations.action.newFishingOperation.tip=Créer une nouvelle opération de pêche
@@ -983,7 +985,8 @@
tutti.manageTemporaryReferential.title.choose.importTemporaryVesselFile=Importer un réferentiel Navire
tutti.message.action.running=<html>Action <strong>%s</strong> en cours d'execution...<hr/></html>
tutti.selectBenthos.title=Choisissez un benthos
-tutti.selectCruise.action.chooseProtocolFile=Choisir le fichier de protocole
+tutti.selectCruise.action.chooseCruiseExportFile=Exporter
+tutti.selectCruise.action.chooseProgramExportFile=Exporter
tutti.selectCruise.action.cloneProtocol=Cloner
tutti.selectCruise.action.cloneProtocol.tip=Dupliquer le protocole sélectionné
tutti.selectCruise.action.deleteProtocol=Supprimer
@@ -999,6 +1002,10 @@
tutti.selectCruise.action.editProgram.tip=Éditer le programme sélectionné
tutti.selectCruise.action.editProtocol=Éditer
tutti.selectCruise.action.editProtocol.tip=Éditer le protocole sélectionné
+tutti.selectCruise.action.exportCruise=Exporter
+tutti.selectCruise.action.exportCruise.tip=Exporter la campagne au format générique
+tutti.selectCruise.action.exportProgram=Exporter
+tutti.selectCruise.action.exportProgram.tip=Exporter les campagnes de la série au format générique
tutti.selectCruise.action.exportProtocol=Exporter
tutti.selectCruise.action.exportProtocol.tip=Exporter le protocole sélectionné
tutti.selectCruise.action.importProtocol=Importer
@@ -1021,7 +1028,9 @@
tutti.selectCruise.field.protocol=Protocole de saisie
tutti.selectCruise.field.protocol.tip=Nom du protocole de saisie
tutti.selectCruise.title=Sélection de la campagne
+tutti.selectCruise.title.choose.exportCruiseFile=Exporter une campagne
tutti.selectCruise.title.choose.exportFile=Exporter le protocole
+tutti.selectCruise.title.choose.exportProgramFile=Exporter une série de campagne
tutti.selectCruise.title.choose.importFile=Importer le protocole
tutti.selectCruise.warn.invalid.selected.data=Les données sélectionnées ne sont pas valides, impossible de saisir ou valider les captures.
tutti.selectSpecies.action.cancel=Annuler
1
0
r844 - in trunk: tutti-persistence/src/main/java/fr/ifremer/tutti/persistence tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service tutti-persistence/src/test/java/fr/ifremer/tutti/persistence/service tutti-service/src/main/java/fr/ifremer/tutti/service/catches
by tchemit@users.forge.codelutin.com 21 Apr '13
by tchemit@users.forge.codelutin.com 21 Apr '13
21 Apr '13
Author: tchemit
Date: 2013-04-21 17:12:42 +0200 (Sun, 21 Apr 2013)
New Revision: 844
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/844
Log:
fix since
Modified:
trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistence.java
trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/MeasurementPersistenceHelper.java
trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceService.java
trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/VesselPersonFeaturesPersistenceHelper.java
trunk/tutti-persistence/src/test/java/fr/ifremer/tutti/persistence/service/IndividualObservationBatchPersistenceServiceWriteTest.java
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/catches/TuttiWeightComputingException.java
Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistence.java
===================================================================
--- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistence.java 2013-04-21 15:07:10 UTC (rev 843)
+++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistence.java 2013-04-21 15:12:42 UTC (rev 844)
@@ -200,7 +200,7 @@
* @return the species or {@code null} if not found.
* @see Species#getReferenceTaxonId()
* @see Species#getVernacularCode()
- * @since 1.5
+ * @since 2.0
*/
Species getSpeciesByReferenceTaxonIdWithVernacularCode(Integer referenceTaxonId);
Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/MeasurementPersistenceHelper.java
===================================================================
--- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/MeasurementPersistenceHelper.java 2013-04-21 15:07:10 UTC (rev 843)
+++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/MeasurementPersistenceHelper.java 2013-04-21 15:12:42 UTC (rev 844)
@@ -37,7 +37,7 @@
* Helper around {@link Measurement}.
*
* @author tchemit <chemit(a)codelutin.com>
- * @since 1.5
+ * @since 2.0
*/
@Component("measurementPersistenceHelper")
public class MeasurementPersistenceHelper extends AbstractPersistenceService {
Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceService.java
===================================================================
--- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceService.java 2013-04-21 15:07:10 UTC (rev 843)
+++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceService.java 2013-04-21 15:12:42 UTC (rev 844)
@@ -183,7 +183,7 @@
* @return the species or {@code null} if not found.
* @see Species#getReferenceTaxonId()
* @see Species#getVernacularCode()
- * @since 1.5
+ * @since 2.0
*/
@Cacheable(value = "referentSpeciesByIdVernacular", key = "#referenceTaxonId", condition = "#referenceTaxonId != null")
Species getSpeciesByReferenceTaxonIdWithVernacularCode(Integer referenceTaxonId);
Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/VesselPersonFeaturesPersistenceHelper.java
===================================================================
--- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/VesselPersonFeaturesPersistenceHelper.java 2013-04-21 15:07:10 UTC (rev 843)
+++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/VesselPersonFeaturesPersistenceHelper.java 2013-04-21 15:12:42 UTC (rev 844)
@@ -38,7 +38,7 @@
* Helper around {@link VesselPersonFeatures}.
*
* @author tchemit <chemit(a)codelutin.com>
- * @since 1.5
+ * @since 2.0
*/
@Component("vesselPersonFeaturesPersistenceHelper")
public class VesselPersonFeaturesPersistenceHelper extends AbstractPersistenceService {
Modified: trunk/tutti-persistence/src/test/java/fr/ifremer/tutti/persistence/service/IndividualObservationBatchPersistenceServiceWriteTest.java
===================================================================
--- trunk/tutti-persistence/src/test/java/fr/ifremer/tutti/persistence/service/IndividualObservationBatchPersistenceServiceWriteTest.java 2013-04-21 15:07:10 UTC (rev 843)
+++ trunk/tutti-persistence/src/test/java/fr/ifremer/tutti/persistence/service/IndividualObservationBatchPersistenceServiceWriteTest.java 2013-04-21 15:12:42 UTC (rev 844)
@@ -44,7 +44,7 @@
* operation.
*
* @author tchemit <chemit(a)codelutin.com>
- * @since 1.5
+ * @since 2.0
*/
public class IndividualObservationBatchPersistenceServiceWriteTest {
Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/catches/TuttiWeightComputingException.java
===================================================================
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/catches/TuttiWeightComputingException.java 2013-04-21 15:07:10 UTC (rev 843)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/catches/TuttiWeightComputingException.java 2013-04-21 15:12:42 UTC (rev 844)
@@ -28,7 +28,7 @@
/**
* @author kmorin <kmorin(a)codelutin.com>
- * @since 1.5
+ * @since 2.0
*/
public class TuttiWeightComputingException extends TuttiBusinessException {
1
0