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
March 2013
- 5 participants
- 242 discussions
r615 - in trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content: operation/fishing protocol
by kmorin@users.forge.codelutin.com 14 Mar '13
by kmorin@users.forge.codelutin.com 14 Mar '13
14 Mar '13
Author: kmorin
Date: 2013-03-14 11:03:48 +0100 (Thu, 14 Mar 2013)
New Revision: 615
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/615
Log:
fixes #2125 [protocole] ajout d'une ligne sur un nouveau protocole ne marche pas, tourne en boucle
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/protocol/AddSpeciesProtocolAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUI.css
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/RemoveSpeciesProtocolAction.java
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-03-14 09:51:42 UTC (rev 614)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/AbstractCaracteristicTabUIHandler.java 2013-03-14 10:03:48 UTC (rev 615)
@@ -179,9 +179,7 @@
int rowIndex = tableModel.getRowCount() - 1;
tableModel.fireTableRowsInserted(rowIndex, rowIndex);
- keyCombo.getData().remove(selectedItem);
-// selectFirstInCombo(keyCombo);
- keyCombo.getHandler().reset();
+ keyCombo.getHandler().removeItem(selectedItem);
M model = getModel();
model.setModify(true);
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/AddSpeciesProtocolAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/AddSpeciesProtocolAction.java 2013-03-14 09:51:42 UTC (rev 614)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/AddSpeciesProtocolAction.java 2013-03-14 10:03:48 UTC (rev 615)
@@ -27,7 +27,6 @@
import com.google.common.base.Preconditions;
import fr.ifremer.tutti.persistence.entities.referential.Species;
import fr.ifremer.tutti.ui.swing.util.action.AbstractTuttiAction;
-
import java.util.Collection;
import static org.nuiton.i18n.I18n._;
@@ -63,10 +62,7 @@
Collection<Species> allSynonyms = getModel().getAllSynonyms(taxonIdStr);
getModel().getAllSynonyms().removeAll(allSynonyms);
- ui.getSpeciesComboBox().getData().remove(species);
- ui.getSpeciesComboBox().getHandler().sortData();
-// handler.selectFirstInCombo(ui.getSpeciesComboBox());
- ui.getSpeciesComboBox().getHandler().reset();
+ ui.getSpeciesComboBox().getHandler().removeItem(species);
// add new row to model (do it after combo stuff for ui best display)
EditProtocolSpeciesRowModel protocol = tableModel.createNewRow();
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUI.css
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUI.css 2013-03-14 09:51:42 UTC (rev 614)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUI.css 2013-03-14 10:03:48 UTC (rev 615)
@@ -94,7 +94,6 @@
}
#speciesComboBox {
- showReset: false;
enabled: {!speciesComboBox.isEmpty()};
toolTipText: "tuttihelp.editProtocol.field..tip";
_help: {"tuttihelp.editProtocol.field.species.help"};
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUIHandler.java 2013-03-14 09:51:42 UTC (rev 614)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUIHandler.java 2013-03-14 10:03:48 UTC (rev 615)
@@ -66,6 +66,7 @@
import java.util.Collection;
import java.util.List;
import java.util.Map;
+import jaxx.runtime.swing.editor.bean.BeanFilterableComboBox;
import static org.nuiton.i18n.I18n._;
@@ -385,8 +386,8 @@
}
public List<EditProtocolSpeciesRowModel> toRows(List<SpeciesProtocol> speciesProtocols) {
- List<Species> speciesList = ui.getSpeciesComboBox().getData();
- Preconditions.checkNotNull(speciesList);
+ BeanFilterableComboBox<Species> speciesComboBox = ui.getSpeciesComboBox();
+ Preconditions.checkNotNull(speciesComboBox.getData());
EditProtocolUIModel model = getModel();
@@ -406,7 +407,7 @@
// get species referent taxon
Species species = allReferentSpeciesByTaxonId.get(taxonIdStr);
// remove it from the combo box
- speciesList.remove(species);
+ speciesComboBox.getHandler().removeItem(species);
EditProtocolSpeciesRowModel row = getTableModel().createNewRow();
row.setSpecies(species);
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/RemoveSpeciesProtocolAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/RemoveSpeciesProtocolAction.java 2013-03-14 09:51:42 UTC (rev 614)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/RemoveSpeciesProtocolAction.java 2013-03-14 10:03:48 UTC (rev 615)
@@ -63,8 +63,7 @@
// re-add all synonym of this taxon to the species comobox
Species species = selectedRow.getSpecies();
BeanFilterableComboBox<Species> combo = getUI().getSpeciesComboBox();
- combo.getData().add(species);
- combo.getHandler().sortData();
+ combo.getHandler().addItem(species);
EditProtocolUIModel model = getModel();
Integer taxonId = species.getReferenceTaxonId();
1
0
r614 - in trunk: . tutti-persistence tutti-ui-swing/src/main/filtered-resources tutti-ui-swing/src/main/resources/i18n
by tchemit@users.forge.codelutin.com 14 Mar '13
by tchemit@users.forge.codelutin.com 14 Mar '13
14 Mar '13
Author: tchemit
Date: 2013-03-14 10:51:42 +0100 (Thu, 14 Mar 2013)
New Revision: 614
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/614
Log:
optimize deps + cliean i18n + help
Modified:
trunk/pom.xml
trunk/tutti-persistence/pom.xml
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/resources/i18n/tutti-ui-swing_en_GB.properties
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2013-03-14 09:41:03 UTC (rev 613)
+++ trunk/pom.xml 2013-03-14 09:51:42 UTC (rev 614)
@@ -192,7 +192,6 @@
<version>${nuitonUtilsVersion}</version>
</dependency>
-
<dependency>
<groupId>org.nuiton</groupId>
<artifactId>nuiton-csv</artifactId>
@@ -289,6 +288,22 @@
<version>${swingXVersion}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-vfs2</artifactId>
+ <version>2.0</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.maven.scm</groupId>
+ <artifactId>maven-scm-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.maven.scm</groupId>
+ <artifactId>maven-scm-provider-svnexe</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
<!--dependency>
<groupId>com.ezware.oxbow</groupId>
<artifactId>swing-bits</artifactId>
Modified: trunk/tutti-persistence/pom.xml
===================================================================
--- trunk/tutti-persistence/pom.xml 2013-03-14 09:41:03 UTC (rev 613)
+++ trunk/tutti-persistence/pom.xml 2013-03-14 09:51:42 UTC (rev 614)
@@ -77,6 +77,11 @@
</dependency>
<dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-vfs2</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
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-03-14 09:41:03 UTC (rev 613)
+++ trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-en.properties 2013-03-14 09:51:42 UTC (rev 614)
@@ -1,203 +1,180 @@
-###
-# #%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
-#Thu Mar 14 09:01:00 CET 2013
-tuttihelp.createSpeciesBatch.action.addSpecies.help=
-tuttihelp.createSpeciesBatch.field.batchWeightField.help=
-tuttihelp.createSpeciesBatch.field.sortedUnsortedCategoryComboBox.help=
-tuttihelp.createSpeciesBatch.field.speciesComboBox.help=
-tuttihelp.createSpeciesBatch.help=
-tuttihelp.dbManager.action.closeDb.help=
-tuttihelp.dbManager.action.exportAndCleanDb.help=
-tuttihelp.dbManager.action.exportDb.help=
-tuttihelp.dbManager.action.importDb.help=
-tuttihelp.dbManager.action.installDb.help=
-tuttihelp.dbManager.action.openDb.help=
-tuttihelp.dbManager.action.upgradeDb.help=
-tuttihelp.dbManager.help=
-tuttihelp.editAccidentalBatch.help=
-tuttihelp.editBenthosBatch.help=
-tuttihelp.editCatchBatch.action.cancelEditCatchBatch.help=
-tuttihelp.editCatchBatch.action.computeWeights.help=
-tuttihelp.editCatchBatch.action.importPupitri.help=
-tuttihelp.editCatchBatch.action.saveCatchBatch.help=
-tuttihelp.editCatchBatch.field.benthosTotalSampleSortedWeight.help=
-tuttihelp.editCatchBatch.field.benthosTotalSortedWeight.help=
-tuttihelp.editCatchBatch.field.benthosTotalUnsortedWeight.help=
-tuttihelp.editCatchBatch.field.benthosTotalWeight.help=
-tuttihelp.editCatchBatch.field.catchTotalRejectedWeight.help=
-tuttihelp.editCatchBatch.field.catchTotalSortedCarousselWeight.help=
-tuttihelp.editCatchBatch.field.catchTotalSortedTremisWeight.help=
-tuttihelp.editCatchBatch.field.catchTotalSortedWeight.help=
-tuttihelp.editCatchBatch.field.catchTotalUnsortedWeight.help=
-tuttihelp.editCatchBatch.field.catchTotalWeight.help=
-tuttihelp.editCatchBatch.field.macroWasteTotalWeight.help=
-tuttihelp.editCatchBatch.field.speciesTotalSampleSortedWeight.help=
-tuttihelp.editCatchBatch.field.speciesTotalSortedWeight.help=
-tuttihelp.editCatchBatch.field.speciesTotalUnsortedWeight.help=
-tuttihelp.editCatchBatch.field.speciesTotalWeight.help=
-tuttihelp.editCatchBatch.help=
-tuttihelp.editCruise.action.cancel.help=
-tuttihelp.editCruise.action.generateName.help=
-tuttihelp.editCruise.action.save.help=
-tuttihelp.editCruise.field.beginDate.help=
-tuttihelp.editCruise.field.comment.help=
-tuttihelp.editCruise.field.country.help=
-tuttihelp.editCruise.field.endDate.help=
-tuttihelp.editCruise.field.multirigNumber.help=
-tuttihelp.editCruise.field.name.help=
-tuttihelp.editCruise.field.program.help=
-tuttihelp.editCruise.field.surveyPart.help=
-tuttihelp.editCruise.field.year.help=
-tuttihelp.editCruise.filterVessel.help=
-tuttihelp.editCruise.help=
-tuttihelp.editCruise.list.gear.help=
-tuttihelp.editCruise.list.headOfMission.help=
-tuttihelp.editCruise.list.headOfSortRoom.help=
-tuttihelp.editCruise.list.vessel.help=
-tuttihelp.editFishingOperation.action.attachments.help=
-tuttihelp.editFishingOperation.action.cancelEditFishingOperation.help=
-tuttihelp.editFishingOperation.action.importCasino.help=
-tuttihelp.editFishingOperation.action.saveEditFishingOperation.help=
-tuttihelp.editFishingOperation.field.comment.help=
-tuttihelp.editFishingOperation.field.duration.help=
-tuttihelp.editFishingOperation.field.fishingOperationNumber.help=
-tuttihelp.editFishingOperation.field.fishingOperationRectiligne.help=
-tuttihelp.editFishingOperation.field.fishingOperationValid.help=
-tuttihelp.editFishingOperation.field.gear.help=
-tuttihelp.editFishingOperation.field.gearDate.help=
-tuttihelp.editFishingOperation.field.gearLatitude.help=
-tuttihelp.editFishingOperation.field.gearLongitude.help=
-tuttihelp.editFishingOperation.field.gearShootingEnd.help=
-tuttihelp.editFishingOperation.field.gearShootingEndLatitude.help=
-tuttihelp.editFishingOperation.field.gearShootingEndLongitude.help=
-tuttihelp.editFishingOperation.field.gearShootingStart.help=
-tuttihelp.editFishingOperation.field.gearShootingStartLatitude.help=
-tuttihelp.editFishingOperation.field.gearTime.help=
-tuttihelp.editFishingOperation.field.location.help=
-tuttihelp.editFishingOperation.field.multirigAggregation.help=
-tuttihelp.editFishingOperation.field.stationNumber.help=
-tuttihelp.editFishingOperation.field.strata.help=
-tuttihelp.editFishingOperation.field.subStrata.help=
-tuttihelp.editFishingOperation.field.trawlDistance.help=
-tuttihelp.editFishingOperation.field.vessel.help=
-tuttihelp.editFishingOperation.gearShootingStartLongitude.help=
-tuttihelp.editFishingOperation.help=
-tuttihelp.editFishingOperation.list.recorderPerson.help=
-tuttihelp.editMacroWasteBatch.help=
-tuttihelp.editPlanktonBatch.help=
-tuttihelp.editProgram.action.cancelProgram.help=
-tuttihelp.editProgram.action.saveProgram.help=
-tuttihelp.editProgram.field.comment.help=
-tuttihelp.editProgram.field.name.help=
-tuttihelp.editProgram.field.zone.help=
-tuttihelp.editProgram.help=
-tuttihelp.editProtocol.action.addSpeciesProtocol.help=
-tuttihelp.editProtocol.action.cancelEditProtocol.help=
-tuttihelp.editProtocol.action.exportProtocolAllCaracteristic.help=
-tuttihelp.editProtocol.action.exportProtocolCaracteristic.tip=
-tuttihelp.editProtocol.action.exportProtocolSpecies.help=
-tuttihelp.editProtocol.action.importProtocolCaracteristic.help=
-tuttihelp.editProtocol.action.importProtocolSpecies.help=
-tuttihelp.editProtocol.action.removeSpeciesProtocol.help=
-tuttihelp.editProtocol.action.saveProtocol.help=
-tuttihelp.editProtocol.action.selectOtherSpecies.help=
-tuttihelp.editProtocol.field.comment.help=
-tuttihelp.editProtocol.field.name.help=
-tuttihelp.editProtocol.field.species.help=
-tuttihelp.editProtocol.help=
-tuttihelp.editProtocol.list.gearUseFeature.help=
-tuttihelp.editProtocol.list.lengthClasses.help=
-tuttihelp.editProtocol.list.vesselUseFeature.help=
-tuttihelp.editProtocol.pane.caracteristic.help=
-tuttihelp.editProtocol.table.species.help=
-tuttihelp.editSpeciesBatch.action.createMelag.help=
-tuttihelp.editSpeciesBatch.action.createSpeciesBatch.help=
-tuttihelp.editSpeciesBatch.action.removeSpeciesBatch.help=
-tuttihelp.editSpeciesBatch.action.removeSpeciesSubBatch.help=
-tuttihelp.editSpeciesBatch.action.renameSpeciesBatch.help=
-tuttihelp.editSpeciesBatch.action.splitSpeciesBatch.help=
-tuttihelp.editSpeciesBatch.field.speciesTotalInertWeight.help=
-tuttihelp.editSpeciesBatch.field.speciesTotalLivingNotItemizedWeight.help=
-tuttihelp.editSpeciesBatch.field.speciesTotalSampleSortedWeight.help=
-tuttihelp.editSpeciesBatch.field.speciesTotalSortedWeight.help=
-tuttihelp.editSpeciesBatch.field.speciesTotalUnsortedWeight.help=
-tuttihelp.editSpeciesBatch.field.speciesTotalWeight.help=
-tuttihelp.editSpeciesBatch.filterSpeciesBatch.help=
-tuttihelp.editSpeciesBatch.help=
-tuttihelp.editSpeciesFrequencies.help=
-tuttihelp.fishingOperations.action.newFishingOperation.help=
-tuttihelp.fishingOperations.field.fishingOperation.help=
-tuttihelp.fishingOperations.help=
-tuttihelp.main.action.changeLocale.help=
-tuttihelp.main.action.changeLocaleFR.help=
-tuttihelp.main.action.changeLocaleUK.help=
-tuttihelp.main.action.showHelp.help=
-tuttihelp.main.help=
-tuttihelp.main.menu.action.about.help=
-tuttihelp.main.menu.action.configuration.help=
-tuttihelp.main.menu.action.editCatches.help=
-tuttihelp.main.menu.action.editCruise.help=
-tuttihelp.main.menu.action.editProgram.help=
-tuttihelp.main.menu.action.editProtocol.help=
-tuttihelp.main.menu.action.exit.help=
-tuttihelp.main.menu.action.importTemporaryReferential.help=
-tuttihelp.main.menu.action.manageDb.help=
-tuttihelp.main.menu.action.selectCruise.help=
-tuttihelp.main.menu.action.showHelp.help=
-tuttihelp.main.menu.action.site.help=
-tuttihelp.main.menu.action.updateApplication.help=
-tuttihelp.main.menu.action.validateCatches.help=
-tuttihelp.manageTemporaryReferential.action.exportTemporaryGearExample.help=
-tuttihelp.manageTemporaryReferential.action.exportTemporaryPersonExample.help=
-tuttihelp.manageTemporaryReferential.action.exportTemporarySpeciesExample.help=
-tuttihelp.manageTemporaryReferential.action.exportTemporaryVesselExample.help=
-tuttihelp.manageTemporaryReferential.action.importTemporaryGear.help=
-tuttihelp.manageTemporaryReferential.action.importTemporaryPerson.help=
-tuttihelp.manageTemporaryReferential.action.importTemporarySpecies.help=
-tuttihelp.manageTemporaryReferential.action.importTemporaryVessel.help=
-tuttihelp.manageTemporaryReferential.help=
-tuttihelp.selectCruise.action.cloneProtocol.help=
-tuttihelp.selectCruise.action.deleteProtocol.help=
-tuttihelp.selectCruise.action.editCatches.help=
-tuttihelp.selectCruise.action.editCruise.help=
-tuttihelp.selectCruise.action.editProgram.help=
-tuttihelp.selectCruise.action.editProtocol.help=
-tuttihelp.selectCruise.action.exportProtocol.help=
-tuttihelp.selectCruise.action.importProtocol.help=
-tuttihelp.selectCruise.action.newCruise.help=
-tuttihelp.selectCruise.action.newProgram.help=
-tuttihelp.selectCruise.action.newProtocol.help=
-tuttihelp.selectCruise.action.validateCatches.help=
-tuttihelp.selectCruise.field.cruise.help=
-tuttihelp.selectCruise.field.program.help=
-tuttihelp.selectCruise.field.protocol.help=
-tuttihelp.selectCruise.help=
-tuttihelp.splitSpeciesBatch.action.cancel.help=
-tuttihelp.splitSpeciesBatch.action.save.help=
-tuttihelp.splitSpeciesBatch.field.batchWeightField.help=
-tuttihelp.splitSpeciesBatch.field.categoryField.help=
-tuttihelp.splitSpeciesBatch.field.sampleWeightField.help=
-tuttihelp.splitSpeciesBatch.field.speciesField.help=
-tuttihelp.splitSpeciesBatch.help=
+#Thu Mar 14 10:50:53 CET 2013
+tuttihelp.createSpeciesBatch.action.addSpecies.help=createSpeciesBatch.html\#actions
+tuttihelp.createSpeciesBatch.field.batchWeightField.help=createSpeciesBatch.html\#fields
+tuttihelp.createSpeciesBatch.field.sortedUnsortedCategoryComboBox.help=createSpeciesBatch.html\#fields
+tuttihelp.createSpeciesBatch.field.speciesComboBox.help=createSpeciesBatch.html\#fields
+tuttihelp.createSpeciesBatch.help=createSpeciesBatch.html
+tuttihelp.dbManager.action.closeDb.help=dbManager.html\#actions
+tuttihelp.dbManager.action.exportAndCleanDb.help=dbManager.html\#actions
+tuttihelp.dbManager.action.exportDb.help=dbManager.html\#actions
+tuttihelp.dbManager.action.importDb.help=dbManager.html\#actions
+tuttihelp.dbManager.action.installDb.help=dbManager.html\#actions
+tuttihelp.dbManager.action.openDb.help=dbManager.html\#actions
+tuttihelp.dbManager.action.upgradeDb.help=dbManager.html\#actions
+tuttihelp.dbManager.help=dbManager.html
+tuttihelp.editAccidentalBatch.help=editAccidentalBatch.html
+tuttihelp.editBenthosBatch.help=editBenthosBatch.html
+tuttihelp.editCatchBatch.action.cancelEditCatchBatch.help=editCatchBatch.html\#actions
+tuttihelp.editCatchBatch.action.computeWeights.help=editCatchBatch.html\#actions
+tuttihelp.editCatchBatch.action.importPupitri.help=editCatchBatch.html\#actions
+tuttihelp.editCatchBatch.action.saveCatchBatch.help=editCatchBatch.html\#actions
+tuttihelp.editCatchBatch.field.benthosTotalSampleSortedWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.benthosTotalSortedWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.benthosTotalUnsortedWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.benthosTotalWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.catchTotalRejectedWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.catchTotalSortedCarousselWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.catchTotalSortedTremisWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.catchTotalSortedWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.catchTotalUnsortedWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.catchTotalWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.macroWasteTotalWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.speciesTotalSampleSortedWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.speciesTotalSortedWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.speciesTotalUnsortedWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.speciesTotalWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.help=editCatchBatch.html
+tuttihelp.editCruise.action.cancel.help=editCruise.html\#actions
+tuttihelp.editCruise.action.generateName.help=editCruise.html\#actions
+tuttihelp.editCruise.action.save.help=editCruise.html\#actions
+tuttihelp.editCruise.field.beginDate.help=editCruise.html\#fields
+tuttihelp.editCruise.field.comment.help=editCruise.html\#fields
+tuttihelp.editCruise.field.country.help=editCruise.html\#fields
+tuttihelp.editCruise.field.endDate.help=editCruise.html\#fields
+tuttihelp.editCruise.field.multirigNumber.help=editCruise.html\#fields
+tuttihelp.editCruise.field.name.help=editCruise.html\#fields
+tuttihelp.editCruise.field.program.help=editCruise.html\#fields
+tuttihelp.editCruise.field.surveyPart.help=editCruise.html\#fields
+tuttihelp.editCruise.field.year.help=editCruise.html\#fields
+tuttihelp.editCruise.filterVessel.help=editCruise.html\#fields
+tuttihelp.editCruise.help=editCruise.html
+tuttihelp.editCruise.list.gear.help=editCruise.html\#fields
+tuttihelp.editCruise.list.headOfMission.help=editCruise.html\#fields
+tuttihelp.editCruise.list.headOfSortRoom.help=editCruise.html\#fields
+tuttihelp.editCruise.list.vessel.help=editCruise.html\#fields
+tuttihelp.editFishingOperation.action.attachments.help=editFishingOperation.html\#actions
+tuttihelp.editFishingOperation.action.cancelEditFishingOperation.help=editFishingOperation.html\#actions
+tuttihelp.editFishingOperation.action.importCasino.help=editFishingOperation.html\#actions
+tuttihelp.editFishingOperation.action.saveEditFishingOperation.help=editFishingOperation.html\#actions
+tuttihelp.editFishingOperation.field.comment.help=editFishingOperation.html\#fields
+tuttihelp.editFishingOperation.field.duration.help=editFishingOperation.html\#fields
+tuttihelp.editFishingOperation.field.fishingOperationNumber.help=editFishingOperation.html\#fields
+tuttihelp.editFishingOperation.field.fishingOperationRectiligne.help=editFishingOperation.html\#fields
+tuttihelp.editFishingOperation.field.fishingOperationValid.help=editFishingOperation.html\#fields
+tuttihelp.editFishingOperation.field.gear.help=editFishingOperation.html\#fields
+tuttihelp.editFishingOperation.field.gearDate.help=editFishingOperation.html\#fields
+tuttihelp.editFishingOperation.field.gearLatitude.help=editFishingOperation.html\#fields
+tuttihelp.editFishingOperation.field.gearLongitude.help=editFishingOperation.html\#fields
+tuttihelp.editFishingOperation.field.gearShootingEnd.help=editFishingOperation.html\#fields
+tuttihelp.editFishingOperation.field.gearShootingEndLatitude.help=editFishingOperation.html\#fields
+tuttihelp.editFishingOperation.field.gearShootingEndLongitude.help=editFishingOperation.html\#fields
+tuttihelp.editFishingOperation.field.gearShootingStart.help=editFishingOperation.html\#fields
+tuttihelp.editFishingOperation.field.gearShootingStartLatitude.help=editFishingOperation.html\#fields
+tuttihelp.editFishingOperation.field.gearTime.help=editFishingOperation.html\#fields
+tuttihelp.editFishingOperation.field.location.help=editFishingOperation.html\#fields
+tuttihelp.editFishingOperation.field.multirigAggregation.help=editFishingOperation.html\#fields
+tuttihelp.editFishingOperation.field.stationNumber.help=editFishingOperation.html\#fields
+tuttihelp.editFishingOperation.field.strata.help=editFishingOperation.html\#fields
+tuttihelp.editFishingOperation.field.subStrata.help=editFishingOperation.html\#fields
+tuttihelp.editFishingOperation.field.trawlDistance.help=editFishingOperation.html\#fields
+tuttihelp.editFishingOperation.field.vessel.help=editFishingOperation.html\#fields
+tuttihelp.editFishingOperation.gearShootingStartLongitude.help=editFishingOperation.html\#fields
+tuttihelp.editFishingOperation.help=editFishingOperation.html
+tuttihelp.editFishingOperation.list.recorderPerson.help=editFishingOperation.html\#fields
+tuttihelp.editMacroWasteBatch.help=editMacroWasteBatch.html
+tuttihelp.editPlanktonBatch.help=editPlanktonBatch.html
+tuttihelp.editProgram.action.cancelProgram.help=editProgram.html\#actions
+tuttihelp.editProgram.action.saveProgram.help=editProgram.html\#actions
+tuttihelp.editProgram.field.comment.help=editProgram.html\#fields
+tuttihelp.editProgram.field.name.help=editProgram.html\#fields
+tuttihelp.editProgram.field.zone.help=editProgram.html\#fields
+tuttihelp.editProgram.help=editProgram.html
+tuttihelp.editProtocol.action.addSpeciesProtocol.help=editProtocol.html\#actions
+tuttihelp.editProtocol.action.cancelEditProtocol.help=editProtocol.html\#actions
+tuttihelp.editProtocol.action.exportProtocolAllCaracteristic.help=editProtocol.html\#actions
+tuttihelp.editProtocol.action.exportProtocolCaracteristic.tip=editProtocol.html\#actions
+tuttihelp.editProtocol.action.exportProtocolSpecies.help=editProtocol.html\#actions
+tuttihelp.editProtocol.action.importProtocolCaracteristic.help=editProtocol.html\#actions
+tuttihelp.editProtocol.action.importProtocolSpecies.help=editProtocol.html\#actions
+tuttihelp.editProtocol.action.removeSpeciesProtocol.help=editProtocol.html\#actions
+tuttihelp.editProtocol.action.saveProtocol.help=editProtocol.html\#actions
+tuttihelp.editProtocol.action.selectOtherSpecies.help=editProtocol.html\#actions
+tuttihelp.editProtocol.field.comment.help=editProtocol.html\#fields
+tuttihelp.editProtocol.field.name.help=editProtocol.html\#fields
+tuttihelp.editProtocol.field.species.help=editProtocol.html\#fields
+tuttihelp.editProtocol.help=editProtocol.html
+tuttihelp.editProtocol.list.gearUseFeature.help=editProtocol.html\#fields
+tuttihelp.editProtocol.list.lengthClasses.help=editProtocol.html\#fields
+tuttihelp.editProtocol.list.vesselUseFeature.help=editProtocol.html\#fields
+tuttihelp.editProtocol.pane.caracteristic.help=editProtocol.html\#fields
+tuttihelp.editProtocol.table.species.help=editProtocol.html\#fields
+tuttihelp.editSpeciesBatch.action.createMelag.help=editSpeciesBatch.html\#actions
+tuttihelp.editSpeciesBatch.action.createSpeciesBatch.help=editSpeciesBatch.html\#actions
+tuttihelp.editSpeciesBatch.action.removeSpeciesBatch.help=editSpeciesBatch.html\#actions
+tuttihelp.editSpeciesBatch.action.removeSpeciesSubBatch.help=editSpeciesBatch.html\#actions
+tuttihelp.editSpeciesBatch.action.renameSpeciesBatch.help=editSpeciesBatch.html\#actions
+tuttihelp.editSpeciesBatch.action.splitSpeciesBatch.help=editSpeciesBatch.html\#actions
+tuttihelp.editSpeciesBatch.field.speciesTotalInertWeight.help=editSpeciesBatch.html\#fields
+tuttihelp.editSpeciesBatch.field.speciesTotalLivingNotItemizedWeight.help=editSpeciesBatch.html\#fields
+tuttihelp.editSpeciesBatch.field.speciesTotalSampleSortedWeight.help=editSpeciesBatch.html\#fields
+tuttihelp.editSpeciesBatch.field.speciesTotalSortedWeight.help=editSpeciesBatch.html\#fields
+tuttihelp.editSpeciesBatch.field.speciesTotalUnsortedWeight.help=editSpeciesBatch.html\#fields
+tuttihelp.editSpeciesBatch.field.speciesTotalWeight.help=editSpeciesBatch.html\#fields
+tuttihelp.editSpeciesBatch.filterSpeciesBatch.help=editSpeciesBatch.html
+tuttihelp.editSpeciesBatch.help=editSpeciesBatch.html
+tuttihelp.editSpeciesFrequencies.help=editSpeciesFrequencies.html
+tuttihelp.fishingOperations.action.newFishingOperation.help=fishingOperations.html\#actions
+tuttihelp.fishingOperations.field.fishingOperation.help=fishingOperations.html\#fields
+tuttihelp.fishingOperations.help=fishingOperations.html
+tuttihelp.main.action.changeLocale.help=main.html\#menu_
+tuttihelp.main.action.changeLocaleFR.help=main.html\#menu_
+tuttihelp.main.action.changeLocaleUK.help=main.html\#menu_
+tuttihelp.main.action.showHelp.help=main.html\#menu_
+tuttihelp.main.help=main.html
+tuttihelp.main.menu.action.about.help=main.html\#menu_
+tuttihelp.main.menu.action.configuration.help=main.html\#menu_
+tuttihelp.main.menu.action.editCatches.help=main.html\#menu_
+tuttihelp.main.menu.action.editCruise.help=main.html\#menu_
+tuttihelp.main.menu.action.editProgram.help=main.html\#menu_
+tuttihelp.main.menu.action.editProtocol.help=main.html\#menu_
+tuttihelp.main.menu.action.exit.help=main.html\#menu_
+tuttihelp.main.menu.action.importTemporaryReferential.help=main.html\#menu_
+tuttihelp.main.menu.action.manageDb.help=main.html\#menu_
+tuttihelp.main.menu.action.selectCruise.help=main.html\#menu_
+tuttihelp.main.menu.action.showHelp.help=main.html\#menu_
+tuttihelp.main.menu.action.site.help=main.html\#menu_
+tuttihelp.main.menu.action.updateApplication.help=main.html\#menu_
+tuttihelp.main.menu.action.validateCatches.help=main.html\#menu_
+tuttihelp.manageTemporaryReferential.action.exportTemporaryGearExample.help=manageTemporaryReferential.html\#actions
+tuttihelp.manageTemporaryReferential.action.exportTemporaryPersonExample.help=manageTemporaryReferential.html\#actions
+tuttihelp.manageTemporaryReferential.action.exportTemporarySpeciesExample.help=manageTemporaryReferential.html\#actions
+tuttihelp.manageTemporaryReferential.action.exportTemporaryVesselExample.help=manageTemporaryReferential.html\#actions
+tuttihelp.manageTemporaryReferential.action.importTemporaryGear.help=manageTemporaryReferential.html\#actions
+tuttihelp.manageTemporaryReferential.action.importTemporaryPerson.help=manageTemporaryReferential.html\#actions
+tuttihelp.manageTemporaryReferential.action.importTemporarySpecies.help=manageTemporaryReferential.html\#actions
+tuttihelp.manageTemporaryReferential.action.importTemporaryVessel.help=manageTemporaryReferential.html\#actions
+tuttihelp.manageTemporaryReferential.help=manageTemporaryReferential.html
+tuttihelp.selectCruise.action.cloneProtocol.help=selectCruise.html\#actions
+tuttihelp.selectCruise.action.deleteProtocol.help=selectCruise.html\#actions
+tuttihelp.selectCruise.action.editCatches.help=selectCruise.html\#actions
+tuttihelp.selectCruise.action.editCruise.help=selectCruise.html\#actions
+tuttihelp.selectCruise.action.editProgram.help=selectCruise.html\#actions
+tuttihelp.selectCruise.action.editProtocol.help=selectCruise.html\#actions
+tuttihelp.selectCruise.action.exportProtocol.help=selectCruise.html\#actions
+tuttihelp.selectCruise.action.importProtocol.help=selectCruise.html\#actions
+tuttihelp.selectCruise.action.newCruise.help=selectCruise.html\#actions
+tuttihelp.selectCruise.action.newProgram.help=selectCruise.html\#actions
+tuttihelp.selectCruise.action.newProtocol.help=selectCruise.html\#actions
+tuttihelp.selectCruise.action.validateCatches.help=selectCruise.html\#actions
+tuttihelp.selectCruise.field.cruise.help=selectCruise.html\#fields
+tuttihelp.selectCruise.field.program.help=selectCruise.html\#fields
+tuttihelp.selectCruise.field.protocol.help=selectCruise.html\#fields
+tuttihelp.selectCruise.help=selectCruise.html
+tuttihelp.splitSpeciesBatch.action.cancel.help=splitSpeciesBatch.html\#actions
+tuttihelp.splitSpeciesBatch.action.save.help=splitSpeciesBatch.html\#actions
+tuttihelp.splitSpeciesBatch.field.batchWeightField.help=splitSpeciesBatch.html\#fields
+tuttihelp.splitSpeciesBatch.field.categoryField.help=splitSpeciesBatch.html\#fields
+tuttihelp.splitSpeciesBatch.field.sampleWeightField.help=splitSpeciesBatch.html\#fields
+tuttihelp.splitSpeciesBatch.field.speciesField.help=splitSpeciesBatch.html\#fields
+tuttihelp.splitSpeciesBatch.help=splitSpeciesBatch.html
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-03-14 09:41:03 UTC (rev 613)
+++ trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-fr.properties 2013-03-14 09:51:42 UTC (rev 614)
@@ -1,37 +1,14 @@
-###
-# #%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
-#Thu Mar 14 09:01:00 CET 2013
+#Thu Mar 14 10:50:53 CET 2013
tuttihelp.createSpeciesBatch.action.addSpecies.help=createSpeciesBatch.html\#actions
tuttihelp.createSpeciesBatch.field.batchWeightField.help=createSpeciesBatch.html\#fields
tuttihelp.createSpeciesBatch.field.sortedUnsortedCategoryComboBox.help=createSpeciesBatch.html\#fields
tuttihelp.createSpeciesBatch.field.speciesComboBox.help=createSpeciesBatch.html\#fields
tuttihelp.createSpeciesBatch.help=createSpeciesBatch.html
tuttihelp.dbManager.action.closeDb.help=dbManager.html\#actions
-tuttihelp.dbManager.action.exportAndCleanDb.help=
+tuttihelp.dbManager.action.exportAndCleanDb.help=dbManager.html\#actions
tuttihelp.dbManager.action.exportDb.help=dbManager.html\#actions
-tuttihelp.dbManager.action.importDb.help=
+tuttihelp.dbManager.action.importDb.help=dbManager.html\#actions
tuttihelp.dbManager.action.installDb.help=dbManager.html\#actions
tuttihelp.dbManager.action.openDb.help=dbManager.html\#actions
tuttihelp.dbManager.action.upgradeDb.help=dbManager.html\#actions
@@ -42,21 +19,21 @@
tuttihelp.editCatchBatch.action.computeWeights.help=editCatchBatch.html\#actions
tuttihelp.editCatchBatch.action.importPupitri.help=editCatchBatch.html\#actions
tuttihelp.editCatchBatch.action.saveCatchBatch.help=editCatchBatch.html\#actions
-tuttihelp.editCatchBatch.field.benthosTotalSampleSortedWeight.help=
-tuttihelp.editCatchBatch.field.benthosTotalSortedWeight.help=
-tuttihelp.editCatchBatch.field.benthosTotalUnsortedWeight.help=
-tuttihelp.editCatchBatch.field.benthosTotalWeight.help=
-tuttihelp.editCatchBatch.field.catchTotalRejectedWeight.help=
-tuttihelp.editCatchBatch.field.catchTotalSortedCarousselWeight.help=
-tuttihelp.editCatchBatch.field.catchTotalSortedTremisWeight.help=
-tuttihelp.editCatchBatch.field.catchTotalSortedWeight.help=
-tuttihelp.editCatchBatch.field.catchTotalUnsortedWeight.help=
-tuttihelp.editCatchBatch.field.catchTotalWeight.help=
-tuttihelp.editCatchBatch.field.macroWasteTotalWeight.help=
-tuttihelp.editCatchBatch.field.speciesTotalSampleSortedWeight.help=
-tuttihelp.editCatchBatch.field.speciesTotalSortedWeight.help=
-tuttihelp.editCatchBatch.field.speciesTotalUnsortedWeight.help=
-tuttihelp.editCatchBatch.field.speciesTotalWeight.help=
+tuttihelp.editCatchBatch.field.benthosTotalSampleSortedWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.benthosTotalSortedWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.benthosTotalUnsortedWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.benthosTotalWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.catchTotalRejectedWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.catchTotalSortedCarousselWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.catchTotalSortedTremisWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.catchTotalSortedWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.catchTotalUnsortedWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.catchTotalWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.macroWasteTotalWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.speciesTotalSampleSortedWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.speciesTotalSortedWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.speciesTotalUnsortedWeight.help=editCatchBatch.html\#fields
+tuttihelp.editCatchBatch.field.speciesTotalWeight.help=editCatchBatch.html\#fields
tuttihelp.editCatchBatch.help=editCatchBatch.html
tuttihelp.editCruise.action.cancel.help=editCruise.html\#actions
tuttihelp.editCruise.action.generateName.help=editCruise.html\#actions
@@ -77,10 +54,8 @@
tuttihelp.editCruise.list.headOfSortRoom.help=editCruise.html\#fields
tuttihelp.editCruise.list.vessel.help=editCruise.html\#fields
tuttihelp.editFishingOperation.action.attachments.help=editFishingOperation.html\#actions
-tuttihelp.editFishingOperation.action.cancel.help=
tuttihelp.editFishingOperation.action.cancelEditFishingOperation.help=editFishingOperation.html\#actions
tuttihelp.editFishingOperation.action.importCasino.help=editFishingOperation.html\#actions
-tuttihelp.editFishingOperation.action.save.help=
tuttihelp.editFishingOperation.action.saveEditFishingOperation.help=editFishingOperation.html\#actions
tuttihelp.editFishingOperation.field.comment.help=editFishingOperation.html\#fields
tuttihelp.editFishingOperation.field.duration.help=editFishingOperation.html\#fields
@@ -109,29 +84,20 @@
tuttihelp.editFishingOperation.list.recorderPerson.help=editFishingOperation.html\#fields
tuttihelp.editMacroWasteBatch.help=editMacroWasteBatch.html
tuttihelp.editPlanktonBatch.help=editPlanktonBatch.html
-tuttihelp.editProgram.action.cancel.help=
tuttihelp.editProgram.action.cancelProgram.help=editProgram.html\#actions
-tuttihelp.editProgram.action.save.help=
tuttihelp.editProgram.action.saveProgram.help=editProgram.html\#actions
tuttihelp.editProgram.field.comment.help=editProgram.html\#fields
tuttihelp.editProgram.field.name.help=editProgram.html\#fields
tuttihelp.editProgram.field.zone.help=editProgram.html\#fields
tuttihelp.editProgram.help=editProgram.html
tuttihelp.editProtocol.action.addSpeciesProtocol.help=editProtocol.html\#actions
-tuttihelp.editProtocol.action.cancel.help=
tuttihelp.editProtocol.action.cancelEditProtocol.help=editProtocol.html\#actions
-tuttihelp.editProtocol.action.exportAllCaracteristic.help=
-tuttihelp.editProtocol.action.exportCaracteristic.help=
tuttihelp.editProtocol.action.exportProtocolAllCaracteristic.help=editProtocol.html\#actions
tuttihelp.editProtocol.action.exportProtocolCaracteristic.tip=editProtocol.html\#actions
tuttihelp.editProtocol.action.exportProtocolSpecies.help=editProtocol.html\#actions
-tuttihelp.editProtocol.action.exportSpecies.help=
-tuttihelp.editProtocol.action.importCaracteristic.help=
tuttihelp.editProtocol.action.importProtocolCaracteristic.help=editProtocol.html\#actions
tuttihelp.editProtocol.action.importProtocolSpecies.help=editProtocol.html\#actions
-tuttihelp.editProtocol.action.importSpecies.help=
-tuttihelp.editProtocol.action.removeSpeciesProtocol.help=
-tuttihelp.editProtocol.action.save.help=
+tuttihelp.editProtocol.action.removeSpeciesProtocol.help=editProtocol.html\#actions
tuttihelp.editProtocol.action.saveProtocol.help=editProtocol.html\#actions
tuttihelp.editProtocol.action.selectOtherSpecies.help=editProtocol.html\#actions
tuttihelp.editProtocol.field.comment.help=editProtocol.html\#fields
@@ -161,10 +127,10 @@
tuttihelp.fishingOperations.action.newFishingOperation.help=fishingOperations.html\#actions
tuttihelp.fishingOperations.field.fishingOperation.help=fishingOperations.html\#fields
tuttihelp.fishingOperations.help=fishingOperations.html
-tuttihelp.main.action.changeLocale.help=
-tuttihelp.main.action.changeLocaleFR.help=
-tuttihelp.main.action.changeLocaleUK.help=
-tuttihelp.main.action.showHelp.help=
+tuttihelp.main.action.changeLocale.help=main.html\#menu_
+tuttihelp.main.action.changeLocaleFR.help=main.html\#menu_
+tuttihelp.main.action.changeLocaleUK.help=main.html\#menu_
+tuttihelp.main.action.showHelp.help=main.html\#menu_
tuttihelp.main.help=main.html
tuttihelp.main.menu.action.about.help=main.html\#menu_
tuttihelp.main.menu.action.configuration.help=main.html\#menu_
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-03-14 09:41:03 UTC (rev 613)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2013-03-14 09:51:42 UTC (rev 614)
@@ -25,7 +25,6 @@
tutti.action.chooseReferentialSpeciesFile=
tutti.action.chooseReferentialVesselFile=
tutti.action.cloneProtocol=
-tutti.action.close=
tutti.action.closeAttachment.tip=
tutti.action.closeCommentEditor.tip=
tutti.action.closeDb=
@@ -142,9 +141,6 @@
tutti.dialog.catches.species.split.weightNotNull.help=
tutti.dialog.catches.species.split.weightNotNull.message=
tutti.dialog.catches.species.split.weightNotNull.title=
-tutti.dialog.computeWeights.replaceTotalSortedWeight.help=
-tutti.dialog.computeWeights.replaceTotalSortedWeight.message=
-tutti.dialog.computeWeights.replaceTotalSortedWeight.title=
tutti.dialog.createMelag.error.message=
tutti.dialog.createMelag.error.title=
tutti.dialog.createMelag.message=
@@ -160,7 +156,6 @@
tutti.dialog.saveAttachment.warning.help=
tutti.dialog.saveAttachment.warning.message=
tutti.dialog.saveAttachment.warning.title=
-tutti.dialog.warnUser.title=
tutti.duration.format=
tutti.error.errorpane.htmlmessage=
tutti.file.csv=
@@ -176,7 +171,6 @@
tutti.flash.information.db.exported.and.clean=
tutti.flash.information.db.imported=
tutti.flash.information.db.installed=
-tutti.flash.information.db.installed.=
tutti.flash.information.db.opened=
tutti.flash.information.programCreated=
tutti.flash.information.programSaved=
@@ -554,7 +548,6 @@
tutti.validator.warning.longitude.second.outOfBounds=
tutti.warn.invalid.batch.model=
tutti.warn.invalid.program=
-tutti.weights.rate.difference.totalAndSorted.description=
tuttihelp.createSpeciesBatch.action.addSpecies.tip=
tuttihelp.createSpeciesBatch.action.cancel.tip=
tuttihelp.createSpeciesBatch.action.save.tip=
@@ -687,7 +680,6 @@
tuttihelp.main.action.site.tip=
tuttihelp.main.action.updateApplication.tip=
tuttihelp.main.action.validateCatches.tip=
-tuttihelp.main.menu.action.site.tip=
tuttihelp.manageTemporaryReferential.action.exportTemporaryGearExample.tip=
tuttihelp.manageTemporaryReferential.action.exportTemporaryPersonExample.tip=
tuttihelp.manageTemporaryReferential.action.exportTemporarySpeciesExample.tip=
@@ -700,7 +692,6 @@
tuttihelp.manageTemporaryReferential.label.referential.person.tip=
tuttihelp.manageTemporaryReferential.label.referential.species.tip=
tuttihelp.manageTemporaryReferential.label.referential.vessel.tip=
-tuttihelp.menu.action.help.tip=
tuttihelp.selectCruise.action.cloneProtocol.tip=
tuttihelp.selectCruise.action.deleteProtocol.tip=
tuttihelp.selectCruise.action.editCatches.tip=
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-03-14 09:41:03 UTC (rev 613)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-03-14 09:51:42 UTC (rev 614)
@@ -25,24 +25,17 @@
tutti.action.chooseReferentialSpeciesFile=Choisir le fichier de référentiel espèce
tutti.action.chooseReferentialVesselFile=Choisir le fichier de référentiel navire
tutti.action.cloneProtocol=Cloner
-tutti.action.close=Fermer
tutti.action.closeAttachment.tip=Fermer la fenêtre des pièces-jointes
tutti.action.closeCommentEditor.tip=Fermer la fenêtre des commentaires
tutti.action.closeDb=Fermer
tutti.action.comment.tip=Commentaire
tutti.action.computeWeights=Elever les poids
tutti.action.computeWeights.error.incoherentCategoryWeight=Le poids total des mensurations est supérieur au poids de la catégorie
-tutti.action.computeWeights.error.incoherentCategoryWeight.title=Incohérence
tutti.action.computeWeights.error.incoherentParentCategoryWeight=Le poids de la catégorie est différent de la somme des poids de ses sous-catégories
-tutti.action.computeWeights.error.incoherentParentCategoryWeight.title=Incohérence
tutti.action.computeWeights.error.incoherentRowWeightCategory=Le poids de la catégorie ne peut pas être nul si le poids de sous-échantillonage est renseigné
-tutti.action.computeWeights.error.incoherentRowWeightCategory.title=Incohérence
tutti.action.computeWeights.error.incoherentRowWeightFrequency=Le poids total des mensurations est différent du poids du sous-échantillon
-tutti.action.computeWeights.error.incoherentRowWeightFrequency.title=Incohérence
tutti.action.computeWeights.error.incoherentSpeciesTotalSorted=Le poids total Vrac des espèces est inférieur à la somme des poids Vrac triés, inerte trié et vivant non détaillé trié
-tutti.action.computeWeights.error.incoherentSpeciesTotalSorted.title=Incohérence
tutti.action.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.action.computeWeights.error.incoherentTotal.title=Incohérence
tutti.action.computeWeights.error.noWeight=Un lot n'a pas de poids
tutti.action.computeWeights.replaceTotalSortedWeight.help=Est-ce bien une valeur observée ?<ul><li><strong>Non</strong> pour remplacer la valeur saisie par le poids calculé</li><li><strong>Oui</strong> pour garder la valeur saisie</li></ul>.
tutti.action.computeWeights.replaceTotalSortedWeight.message=Le Poids total VRAC saisi est supérieur de moins de %s%% au Poids total Vrac trié.
@@ -60,7 +53,6 @@
tutti.action.editProtocol=Éditer
tutti.action.editSelectedCruise=Campagne
tutti.action.editSelectedProgram=Série de campagne
-tutti.action.editSelectedProgram.tip=Éditer la série de campagne sélectionnée
tutti.action.editSelectedProtocol=Protocole
tutti.action.exit=Quitter
tutti.action.exportAndCleanDb=Exporter et supprimer
@@ -146,8 +138,6 @@
tutti.dialog.askSaveBeforeLeaving.saveProgram=Des modifications sur la série de campagne n'ont pas été enregistrées.
tutti.dialog.askSaveBeforeLeaving.saveProtocol=Des modifications sur le protocole n'ont pas été enregistrées.
tutti.dialog.askSaveBeforeLeaving.title=Modifications non enregistrées
-tutti.dialog.catches.species.computeWeight.error.message=Erreur lors de l'élévation des poids
-tutti.dialog.catches.species.computeWeight.error.title=Erreur
tutti.dialog.catches.species.split.weightNotNull.help=Que voulez-vous faire ? <ul><li><strong>Annuler</strong> pour ne pas catégoriser le lot et garder le poids sous-échantilloné</li><li><strong>OK</strong> pour catégoriser le lot et supprimer le poids sous-échantillonné</li></ul>.
tutti.dialog.catches.species.split.weightNotNull.message=Pour catégoriser un lot, il ne doit pas avoir de poids sous-échantillonné.
tutti.dialog.catches.species.split.weightNotNull.title=Poids sous-échantillonné non nul
@@ -166,7 +156,6 @@
tutti.dialog.saveAttachment.warning.help=Que voulez-vous faire ?<ul><li><strong>Non</strong> pour annuler la sauvegarde</li><li><strong>Oui</strong> pour écraser le fichier existant</li></ul>
tutti.dialog.saveAttachment.warning.message=Vous êtes sur le point d'écraser un fichier existant.
tutti.dialog.saveAttachment.warning.title=Fichier existant
-tutti.dialog.warnUser.title=Avertissement\!
tutti.duration.format=dj Hh m'm'
tutti.error.errorpane.htmlmessage=<html><body><b>Une erreur s'est produite</b>\:<br/>%s</body></html>
tutti.file.csv=Extension d'un fichier csv
@@ -204,7 +193,6 @@
tutti.label.catches.benthosTotalSortedWeight=Poids total VRAC (kg)
tutti.label.catches.benthosTotalUnsortedWeight=Poids total HORS VRAC (kg)
tutti.label.catches.benthosTotalWeight=Poids TOTAL (kg)
-tutti.label.catches.catchThalassa=(*) uniquement sur Thalassa
tutti.label.catches.catchTotalRejectedWeight=Poids total NON TRIÉ (kg)
tutti.label.catches.catchTotalSortedCarousselWeight=Caroussel observé (*)
tutti.label.catches.catchTotalSortedTremisWeight=Tremie (*)
@@ -352,14 +340,6 @@
tutti.menu.changeLocale=Langue
tutti.menu.file=Fichier
tutti.menu.help=Aide
-tutti.menu.synchronisationAllegro=Allégro
-tutti.menu.synchronisationAllegro.tip=Synchronisation Allégro
-tutti.menu.synchronisationExport=Export
-tutti.menu.synchronisationExport.tip=Effectuer des exports
-tutti.menu.synchronisationImport=Import
-tutti.menu.synchronisationImport.tip=Effectuer des imports
-tutti.menu.synchronisations=Synchronisation
-tutti.menu.synchronisations.tip=Import/Export
tutti.message.action.running=<html>Action <strong>%s</strong> en cours d'execution...<hr/></html>
tutti.option.cruiseId.description=Identifiant de la dernière campagne utilisée
tutti.option.help.directory.description=Répertoire des fichiers d'aide
@@ -403,11 +383,6 @@
tutti.table.benthos.batch.header.weight=Poids
tutti.table.fishing.gearUseFeature.header.key=Caractéristique
tutti.table.fishing.gearUseFeature.header.value=Valeur
-tutti.table.fishing.hydrology.header.averageValue=Moyenne
-tutti.table.fishing.hydrology.header.gearShootingEndValue=Fin de traîne
-tutti.table.fishing.hydrology.header.gearShootingStartValue=Début de traîne
-tutti.table.fishing.hydrology.header.key=Caractéristique
-tutti.table.fishing.hydrology.header.value=Valeur
tutti.table.fishing.vesselUseFeature.header.key=Caractéristique
tutti.table.fishing.vesselUseFeature.header.value=Valeur
tutti.table.macrowaste.batch.header.comment=Commentaire
@@ -605,10 +580,8 @@
tuttihelp.editCatchBatch.field.speciesTotalSortedWeight.tip=
tuttihelp.editCatchBatch.field.speciesTotalUnsortedWeight.tip=
tuttihelp.editCatchBatch.field.speciesTotalWeight.tip=
-tuttihelp.editCruise.action.cancelEditCruise.help=Annuler l'édition (ou la création) de la campagne
tuttihelp.editCruise.action.cancelEditCruise.tip=
tuttihelp.editCruise.action.generateName.tip=
-tuttihelp.editCruise.action.saveCruise.help=Enregistrer la campagne
tuttihelp.editCruise.action.saveCruise.tip=
tuttihelp.editCruise.field.beginDate.tip=
tuttihelp.editCruise.field.comment.tip=
@@ -658,7 +631,6 @@
tuttihelp.editProgram.field.name.tip=
tuttihelp.editProgram.field.zone.tip=
tuttihelp.editProtocol.action.addSpeciesProtocol.tip=Ajouter une espèce au protocole
-tuttihelp.editProtocol.action.cancelEditProtocol.help=Annuler l'édition (ou la création) du protocole
tuttihelp.editProtocol.action.cancelEditProtocol.tip=
tuttihelp.editProtocol.action.exportProtocolAllCaracteristic.tip=Exporter toutes les caractéristiques (sans les affecter à un écran)
tuttihelp.editProtocol.action.exportProtocolCaracteristic.tip=Exporter les caractéristiques du protocole
@@ -673,7 +645,6 @@
tuttihelp.editSpeciesBatch.action.createMelag.tip=Calcul des poids des lots appartenant à un MELAG
tuttihelp.editSpeciesBatch.action.removeSpeciesBatch.tip=Supprimer le lot courant (celui de la ligne sélectionnée) et tous ces fils
tuttihelp.editSpeciesBatch.action.removeSpeciesSubBatch.tip=Supprimer tous les lots fils du lot sélectionné
-tuttihelp.editSpeciesBatch.action.renameSpeciesBatch.tip=Corriger l'espèce sur tout le lot sélectionné
tuttihelp.editSpeciesBatch.action.splitSpeciesBatch.tip=Catégoriser le lot courant (celui de la ligne sélectionné)
tuttihelp.editSpeciesBatch.createSpeciesBatch.tip=
tuttihelp.editSpeciesBatch.field.speciesTotalInertWeight.tip=
1
0
14 Mar '13
Author: tchemit
Date: 2013-03-14 10:41:03 +0100 (Thu, 14 Mar 2013)
New Revision: 613
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/613
Log:
fixes #2116: [IMP/EXP] Pouvoir importer une base de donn?\195?\169es pr?\195?\169c?\195?\169demment export?\195?\169e
Added:
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/ImportDbAction.java
trunk/tutti-ui-swing/src/main/resources/icons/action-import-db.png
Modified:
trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/TuttiIOUtil.java
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/PersistenceService.java
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/content/MainUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/CloseDbAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUI.css
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUI.jaxx
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUIHandler.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/db/InstallDbAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/OpenDbAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/action/AbstractTuttiAction.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-persistence/src/main/java/fr/ifremer/tutti/TuttiIOUtil.java
===================================================================
--- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/TuttiIOUtil.java 2013-03-14 06:46:28 UTC (rev 612)
+++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/TuttiIOUtil.java 2013-03-14 09:41:03 UTC (rev 613)
@@ -26,6 +26,10 @@
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
+import org.apache.commons.vfs2.FileObject;
+import org.apache.commons.vfs2.FileSelector;
+import org.apache.commons.vfs2.FileSystemManager;
+import org.apache.commons.vfs2.VFS;
import org.nuiton.util.ZipUtil;
import java.io.Closeable;
@@ -62,6 +66,44 @@
}
}
+ public static FileObject resolveFile(String file, String errorMessage) {
+ try {
+ FileSystemManager manager = VFS.getManager();
+ FileObject targetObject = manager.resolveFile(file);
+ return targetObject;
+ } catch (IOException e) {
+ throw new TuttiTechnicalException(errorMessage, e);
+ }
+ }
+
+ public static FileObject[] getChildren(FileObject objectFile, String errorMessage) {
+ try {
+ return objectFile.getChildren();
+ } catch (IOException e) {
+ throw new TuttiTechnicalException(errorMessage, e);
+ }
+ }
+
+ public static FileObject getChild(FileObject objectFile, String name, String errorMessage) {
+ try {
+ return objectFile.getChild(name);
+ } catch (IOException e) {
+ throw new TuttiTechnicalException(errorMessage, e);
+ }
+ }
+
+ public static void explode(FileObject archiveFile,
+ File target,
+ FileSelector fileSelector, String errorMessage) {
+ try {
+ FileSystemManager manager = VFS.getManager();
+ FileObject targetObject = manager.toFileObject(target);
+ targetObject.copyFrom(archiveFile, fileSelector);
+ } catch (IOException e) {
+ throw new TuttiTechnicalException(errorMessage, e);
+ }
+ }
+
public static void forceMkdir(File dir, String errorMessage) {
try {
FileUtils.forceMkdir(dir);
Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/PersistenceService.java
===================================================================
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/PersistenceService.java 2013-03-14 06:46:28 UTC (rev 612)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/PersistenceService.java 2013-03-14 09:41:03 UTC (rev 613)
@@ -25,6 +25,7 @@
*/
import com.google.common.base.Preconditions;
+import fr.ifremer.tutti.TuttiBusinessException;
import fr.ifremer.tutti.TuttiIOUtil;
import fr.ifremer.tutti.persistence.InvalidBatchModelException;
import fr.ifremer.tutti.persistence.TuttiPersistence;
@@ -58,6 +59,8 @@
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.commons.vfs2.AllFileSelector;
+import org.apache.commons.vfs2.FileObject;
import java.io.File;
import java.io.IOException;
@@ -104,33 +107,32 @@
public static final String EXPORT_DIRECTORY_FORMAT = "tutti-%s-%s";
/**
- * Export db as an zip archive (including the attachments).
+ * Export db as a zip archive (including the attachments and protocols).
*
* @param file archive file where to store
* @since 1.0.2
*/
public void exportDb(File file) {
- Preconditions.checkState(isDbLoaded());
+ // can not do this operation on a opnened bd
+ Preconditions.checkState(!isDbLoaded());
+
+ // need a file to export
Preconditions.checkNotNull(file);
- // Make sure db is shutdown
+ // create zip structure
- TuttiIOUtil.close(driver, "Could not close driver " + driver);
+ TuttiServiceConfig config = context.getConfig();
- try {
- // create zip structure
+ String directoryName = String.format(
+ EXPORT_DIRECTORY_FORMAT,
+ config.getVersion(),
+ EXPORT_DATE_FORMAT.format(context.currentDate()));
- TuttiServiceConfig config = context.getConfig();
+ File structureDirectory = new File(config.newTempFile("exportdb"),
+ directoryName);
- String directoryName = String.format(
- EXPORT_DIRECTORY_FORMAT,
- config.getVersion(),
- EXPORT_DATE_FORMAT.format(context.currentDate()));
-
- File structureDirectory = new File(config.newTempFile("exportdb"),
- directoryName);
-
+ try {
TuttiIOUtil.forceMkdir(structureDirectory,
"Could not create directory");
@@ -151,17 +153,86 @@
new File(structureDirectory, "meas_files"),
"Could not copy db attachment directory");
- //create zip
+ // create zip
TuttiIOUtil.zip(structureDirectory, file,
"Could not create archive at " + file);
} finally {
- // reload driver
- driver = TuttiPersistenceServiceLocator.getPersistenceService();
+ // delete temp files
+ TuttiIOUtil.forceDeleteOnExit(
+ structureDirectory,
+ "could not delete on exit temporary file " + structureDirectory);
}
}
+
+ public void checkImportStructure(File file) {
+
+ if (!file.exists()) {
+ throw new TuttiBusinessException("Db archive " + file + " does not exists");
+ }
+
+ // check zip structure
+ FileObject fileObject = TuttiIOUtil.resolveFile(
+ "zip:" + file.getAbsolutePath(), "could not obtain archive");
+
+
+ FileObject[] children = TuttiIOUtil.getChildren(fileObject, "Could not open archive");
+
+ if (children.length != 1) {
+ throw new TuttiBusinessException("Db archive " + file + " should have only one children");
+ }
+ fileObject = children[0];
+ checkArchiveDb(file, fileObject, "db");
+ checkArchiveDb(file, fileObject, "meas_files");
+ checkArchiveDb(file, fileObject, "protocol");
+ }
+
+ protected void checkArchiveDb(File file,
+ FileObject fileObject,
+ String dir) {
+ FileObject directory = TuttiIOUtil.getChild(fileObject, dir, " could not obtain child " + dir);
+ if (directory == null) {
+ throw new TuttiBusinessException(
+ "Db archive " + file + " does not contains a " +
+ dir + " directory.");
+ }
+ }
+
+ /**
+ * Import a db from a zip archive (including the attachments and protocols).
+ *
+ * @param file archive file where to store
+ * @since 1.0.2
+ */
+ public void importDb(File file) {
+
+ // can not do this operation on a opnened bd
+ Preconditions.checkState(!isDbLoaded());
+
+ // need a file to export
+ Preconditions.checkNotNull(file);
+
+ TuttiServiceConfig config = context.getConfig();
+
+ File target = config.getDataDirectory();
+
+ if (log.isInfoEnabled()) {
+ log.info("Import db to " + target);
+ }
+ FileObject fileObject = TuttiIOUtil.resolveFile("zip:" + file.getAbsolutePath(), "could not obtain archive");
+
+ FileObject[] children = TuttiIOUtil.getChildren(fileObject, "Could not open archive");
+
+ fileObject = children[0];
+
+ TuttiIOUtil.explode(fileObject,
+ target,
+ new AllFileSelector(),
+ "Could not decompress archive " + file);
+ }
+
public boolean isDbLoaded() {
return !(driver instanceof TuttiPersistenceNoDbImpl);
}
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-03-14 06:46:28 UTC (rev 612)
+++ trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-en.properties 2013-03-14 09:41:03 UTC (rev 613)
@@ -1,12 +1,37 @@
+###
+# #%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
-#Thu Mar 14 07:41:37 CET 2013
+#Thu Mar 14 09:01:00 CET 2013
tuttihelp.createSpeciesBatch.action.addSpecies.help=
tuttihelp.createSpeciesBatch.field.batchWeightField.help=
tuttihelp.createSpeciesBatch.field.sortedUnsortedCategoryComboBox.help=
tuttihelp.createSpeciesBatch.field.speciesComboBox.help=
tuttihelp.createSpeciesBatch.help=
tuttihelp.dbManager.action.closeDb.help=
+tuttihelp.dbManager.action.exportAndCleanDb.help=
tuttihelp.dbManager.action.exportDb.help=
+tuttihelp.dbManager.action.importDb.help=
tuttihelp.dbManager.action.installDb.help=
tuttihelp.dbManager.action.openDb.help=
tuttihelp.dbManager.action.upgradeDb.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-03-14 06:46:28 UTC (rev 612)
+++ trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-fr.properties 2013-03-14 09:41:03 UTC (rev 613)
@@ -8,28 +8,30 @@
# %%
# 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
+# 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
+#
+# 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
-#Tue Mar 12 09:29:29 CET 2013
+#Thu Mar 14 09:01:00 CET 2013
tuttihelp.createSpeciesBatch.action.addSpecies.help=createSpeciesBatch.html\#actions
tuttihelp.createSpeciesBatch.field.batchWeightField.help=createSpeciesBatch.html\#fields
tuttihelp.createSpeciesBatch.field.sortedUnsortedCategoryComboBox.help=createSpeciesBatch.html\#fields
tuttihelp.createSpeciesBatch.field.speciesComboBox.help=createSpeciesBatch.html\#fields
tuttihelp.createSpeciesBatch.help=createSpeciesBatch.html
tuttihelp.dbManager.action.closeDb.help=dbManager.html\#actions
+tuttihelp.dbManager.action.exportAndCleanDb.help=
tuttihelp.dbManager.action.exportDb.help=dbManager.html\#actions
+tuttihelp.dbManager.action.importDb.help=
tuttihelp.dbManager.action.installDb.help=dbManager.html\#actions
tuttihelp.dbManager.action.openDb.help=dbManager.html\#actions
tuttihelp.dbManager.action.upgradeDb.help=dbManager.html\#actions
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/MainUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/MainUIHandler.java 2013-03-14 06:46:28 UTC (rev 612)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/MainUIHandler.java 2013-03-14 09:41:03 UTC (rev 613)
@@ -192,7 +192,6 @@
TuttiUIAction<OpenDbAction> uiAction = createUIAction(null, OpenDbAction.class);
OpenDbAction logicAction = uiAction.getLogicAction();
logicAction.setSkipCheckCurrentScreen(true);
- logicAction.setActionDescription(_("tuttihelp.dbManager.action.openDb.tip"));
uiAction.actionPerformed(null);
} else {
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/CloseDbAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/CloseDbAction.java 2013-03-14 06:46:28 UTC (rev 612)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/CloseDbAction.java 2013-03-14 09:41:03 UTC (rev 613)
@@ -24,6 +24,7 @@
* #L%
*/
+import fr.ifremer.tutti.TuttiIOUtil;
import fr.ifremer.tutti.persistence.config.TuttiPersistenceConfig;
import fr.ifremer.tutti.ui.swing.TuttiScreen;
import fr.ifremer.tutti.ui.swing.content.AbstractChangeScreenAction;
@@ -70,6 +71,10 @@
// clean db context
getContext().clearDbContext();
+
+ TuttiIOUtil.deleteDirectory(
+ getConfig().getServiceConfig().getPersistenceConfig().getCacheDirectory(),
+ "Could not delete cache directory");
}
@Override
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUI.css
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUI.css 2013-03-14 06:46:28 UTC (rev 612)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUI.css 2013-03-14 09:41:03 UTC (rev 613)
@@ -39,12 +39,21 @@
#installDbButton {
actionIcon: install-db;
text: "tutti.action.installDb";
- mnemonic: I;
+ mnemonic: n;
_tuttiAction: {InstallDbAction.class};
toolTipText: "tuttihelp.dbManager.action.installDb.tip";
_help: {"tuttihelp.dbManager.action.installDb.help"};
}
+#importDbButton {
+ actionIcon: import-db;
+ text: "tutti.action.importDb";
+ mnemonic: I;
+ _tuttiAction: {ImportDbAction.class};
+ toolTipText: "tuttihelp.dbManager.action.importDb.tip";
+ _help: {"tuttihelp.dbManager.action.importDb.help"};
+}
+
#withDbActions {
visible: {model.isDbExist()};
}
@@ -72,7 +81,7 @@
#closeDbButton {
actionIcon: close-db;
text: "tutti.action.closeDb";
- mnemonic: C;
+ mnemonic: F;
enabled: {model.isDbLoaded()};
_tuttiAction: {CloseDbAction.class};
toolTipText: "tuttihelp.dbManager.action.closeDb.tip";
@@ -88,3 +97,13 @@
toolTipText: "tuttihelp.dbManager.action.exportDb.tip";
_help: {"tuttihelp.dbManager.action.exportDb.help"};
}
+
+#exportAndCleanDbButton {
+ actionIcon: export-db;
+ text: "tutti.action.exportAndCleanDb";
+ mnemonic: E;
+ enabled: {model.isDbLoaded()};
+ _tuttiAction: {ExportAndCleanDbAction.class};
+ toolTipText: "tuttihelp.dbManager.action.exportAndCleanDb.tip";
+ _help: {"tuttihelp.dbManager.action.exportAndCleanDb.help"};
+}
\ No newline at end of file
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUI.jaxx 2013-03-14 06:46:28 UTC (rev 612)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUI.jaxx 2013-03-14 09:41:03 UTC (rev 613)
@@ -62,12 +62,14 @@
<JPanel id='noDbActions' constraints='BorderLayout.CENTER'
layout='{new GridLayout(0, 1)}'>
<JButton id='installDbButton'/>
+ <JButton id='importDbButton'/>
</JPanel>
<JPanel id='withDbActions' constraints='BorderLayout.SOUTH'
layout='{new GridLayout(0, 1)}'>
<JButton id='openDbButton'/>
<JButton id='upgradeDbButton'/>
<JButton id='exportDbButton'/>
+ <JButton id='exportAndCleanDbButton'/>
<JButton id='closeDbButton'/>
</JPanel>
</JPanel>
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUIHandler.java 2013-03-14 06:46:28 UTC (rev 612)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUIHandler.java 2013-03-14 09:41:03 UTC (rev 613)
@@ -58,8 +58,10 @@
if (dbExist) {
if (dbLoaded) {
+ String jdbcUrl = getConfig().getServiceConfig().getPersistenceConfig().getJdbcUrl();
+
// db loaded
- message = _("tutti.information.db.loaded");
+ message = _("tutti.information.db.loaded", jdbcUrl);
} else {
@@ -81,8 +83,10 @@
initUI(ui);
ui.applyDataBinding(DbManagerUI.BINDING_OPEN_DB_BUTTON_ENABLED);
+// ui.applyDataBinding(DbManagerUI.BINDING_USE_EXTERNAL_DB_BUTTON_ENABLED);
ui.applyDataBinding(DbManagerUI.BINDING_UPGRADE_DB_BUTTON_ENABLED);
ui.applyDataBinding(DbManagerUI.BINDING_EXPORT_DB_BUTTON_ENABLED);
+ ui.applyDataBinding(DbManagerUI.BINDING_EXPORT_AND_CLEAN_DB_BUTTON_ENABLED);
SwingUtilities.invokeLater(
new Runnable() {
Copied: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/ExportAndCleanDbAction.java (from rev 610, 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/ExportAndCleanDbAction.java (rev 0)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/ExportAndCleanDbAction.java 2013-03-14 09:41:03 UTC (rev 613)
@@ -0,0 +1,148 @@
+package fr.ifremer.tutti.ui.swing.content.db;
+
+/*
+ * #%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.ProgressionModel;
+import fr.ifremer.tutti.persistence.config.TuttiPersistenceConfig;
+import fr.ifremer.tutti.service.PersistenceService;
+import fr.ifremer.tutti.ui.swing.content.AbstractMainUITuttiAction;
+import fr.ifremer.tutti.ui.swing.content.MainUIHandler;
+import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil;
+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 db attached to Tutti.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 1.0
+ */
+public class ExportAndCleanDbAction extends AbstractMainUITuttiAction {
+
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(ExportAndCleanDbAction.class);
+
+ protected File file;
+
+ public ExportAndCleanDbAction(MainUIHandler handler) {
+ super(handler, true);
+ }
+
+ @Override
+ protected boolean prepareAction() throws Exception {
+ file = null;
+ boolean doAction = super.prepareAction();
+
+ if (doAction) {
+
+ // ask user file where to export db
+
+ // choose file to import
+ file = TuttiUIUtil.chooseFile(
+ getContext().getMainUI(),
+ _("tutti.title.choose.dbExportFile"),
+ _("tutti.action.chooseDbExportFile"),
+ "^.*\\.zip", _("tutti.file.zip")
+ );
+ if (file == null) {
+
+ // user cancel
+ doAction = false;
+ } else {
+
+ // add extension if missing
+ file = TuttiIOUtil.addExtensionIfMissing(file, ".zip");
+
+ // ask user to confirm overwrite.
+ doAction = getHandler().askOverwriteFile(file);
+ }
+ }
+ return doAction;
+ }
+
+ @Override
+ protected void doAction() {
+ Preconditions.checkNotNull(file);
+ if (log.isInfoEnabled()) {
+ log.info("Will export db to " + file);
+ }
+
+ ProgressionModel progressionModel = new ProgressionModel();
+ setProgressionModel(progressionModel);
+ progressionModel.setTotal(3);
+
+ // close db
+
+ progressionModel.setMessage("Fermeture de la base courante");
+
+ runAction(getHandler().createLogicAction(CloseDbAction.class));
+
+ PersistenceService persistenceService =
+ getContext().getPersistenceService();
+
+ // export db
+
+ progressionModel.increments(1);
+ progressionModel.setMessage("Création de l'archive " + file);
+
+ persistenceService.exportDb(file);
+
+ // clean files
+
+ progressionModel.increments(1);
+ progressionModel.setMessage("Suppression des fichiers dans Tutti");
+
+ TuttiPersistenceConfig persistenceConfig =
+ getConfig().getServiceConfig().getPersistenceConfig();
+
+ File dbDirectory = persistenceConfig.getDbDirectory();
+ TuttiIOUtil.cleanDirectory(dbDirectory, "Could not delete directory " + dbDirectory);
+
+ File attachmentDirectory = persistenceConfig.getDbAttachmentDirectory();
+ TuttiIOUtil.cleanDirectory(attachmentDirectory, "Could not delete directory " + attachmentDirectory);
+
+ File protocolDirectory = persistenceConfig.getProtocolDirectory();
+ TuttiIOUtil.cleanDirectory(protocolDirectory, "Could not delete directory " + protocolDirectory);
+
+ getModel().setDbExist(false);
+ }
+
+ @Override
+ public void postSuccessAction() {
+ super.postSuccessAction();
+
+ sendMessage(_("tutti.flash.information.db.exported.and.clean", file));
+
+ // make sure title is reloaded
+ getUI().getHandler().changeTitle();
+ }
+
+}
\ No newline at end of file
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-03-14 06:46:28 UTC (rev 612)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/ExportDbAction.java 2013-03-14 09:41:03 UTC (rev 613)
@@ -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.ui.swing.content.AbstractMainUITuttiAction;
import fr.ifremer.tutti.ui.swing.content.MainUIHandler;
import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil;
@@ -92,14 +93,39 @@
log.info("Will export db to " + file);
}
+ ProgressionModel progressionModel = new ProgressionModel();
+ setProgressionModel(progressionModel);
+ progressionModel.setTotal(3);
+
+ // close db
+
+ progressionModel.setMessage("Fermuture de la base courante");
+
+ getContext().setDbLoaded(false);
+ getHandler().reloadPersistenceService();
+
+ // export
+
+ progressionModel.increments(1);
+ progressionModel.setMessage("Création de l'archive " + file);
+
getContext().getPersistenceService().exportDb(file);
+ // reopen db
+ progressionModel.increments(1);
+ progressionModel.setMessage("Réouverture de la base courante");
+
+ getContext().setDbLoaded(true);
+ getHandler().reloadPersistenceService();
}
@Override
public void postSuccessAction() {
super.postSuccessAction();
sendMessage(_("tutti.flash.information.db.exported", file));
+
+ // make sure title is reloaded
+ getUI().getHandler().changeTitle();
}
}
\ No newline at end of file
Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/ImportDbAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/ImportDbAction.java (rev 0)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/ImportDbAction.java 2013-03-14 09:41:03 UTC (rev 613)
@@ -0,0 +1,121 @@
+package fr.ifremer.tutti.ui.swing.content.db;
+
+/*
+ * #%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.persistence.ProgressionModel;
+import fr.ifremer.tutti.persistence.config.TuttiPersistenceConfig;
+import fr.ifremer.tutti.ui.swing.content.AbstractMainUITuttiAction;
+import fr.ifremer.tutti.ui.swing.content.MainUIHandler;
+import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.io.File;
+
+import static org.nuiton.i18n.I18n._;
+
+/**
+ * To import a db and use it.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 1.1
+ */
+public class ImportDbAction extends AbstractMainUITuttiAction {
+
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(ImportDbAction.class);
+
+ protected File file;
+
+ public ImportDbAction(MainUIHandler handler) {
+ super(handler, true);
+ }
+
+ @Override
+ protected boolean prepareAction() throws Exception {
+
+ boolean doAction = super.prepareAction();
+
+ if (doAction) {
+
+ // choose file to import
+ file = TuttiUIUtil.chooseFile(
+ getContext().getMainUI(),
+ _("tutti.title.choose.dbImportFile"),
+ _("tutti.action.chooseDbFile"),
+ "^.*\\.zip", _("tutti.file.zip")
+ );
+
+ doAction = file != null;
+
+ if (doAction) {
+
+ getContext().getPersistenceService().checkImportStructure(file);
+ }
+ }
+ return doAction;
+ }
+
+ @Override
+ protected void releaseAction() {
+ file = null;
+ super.releaseAction();
+ }
+
+ @Override
+ protected void doAction() throws Exception {
+ Preconditions.checkNotNull(file);
+
+ if (log.isInfoEnabled()) {
+ log.info("Will import db: " + file);
+ }
+
+ ProgressionModel progressionModel = new ProgressionModel();
+ progressionModel.setTotal(3);
+ setProgressionModel(progressionModel);
+
+ // import db
+
+ progressionModel.setMessage("Décompression de l'archive");
+
+ getContext().getPersistenceService().importDb(file);
+ getContext().setDbExist(true);
+
+ // open db
+
+ progressionModel.increments(1);
+ progressionModel.setMessage("Ouverture de la base de données");
+ runAction(getHandler().createLogicAction(OpenDbAction.class));
+ }
+
+ @Override
+ public void postSuccessAction() {
+ super.postSuccessAction();
+ String jdbcUrl = TuttiPersistenceConfig.getInstance().getJdbcUrl();
+
+ sendMessage(_("tutti.flash.information.db.imported", jdbcUrl));
+ }
+}
\ No newline at end of file
Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/ImportDbAction.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/db/InstallDbAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/InstallDbAction.java 2013-03-14 06:46:28 UTC (rev 612)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/InstallDbAction.java 2013-03-14 09:41:03 UTC (rev 613)
@@ -47,8 +47,7 @@
public class InstallDbAction extends AbstractMainUITuttiAction {
/** Logger. */
- private static final Log log =
- LogFactory.getLog(InstallDbAction.class);
+ private static final Log log = LogFactory.getLog(InstallDbAction.class);
public InstallDbAction(MainUIHandler handler) {
super(handler, true);
@@ -69,7 +68,7 @@
File dest = new File(config.getTuttiBasedir(), "NEW");
ProgressionModel progressionModel = new ProgressionModel();
up.setDownloadMonitor(progressionModel);
- getContext().getActionUI().getModel().setProgressionModel(progressionModel);
+ setProgressionModel(progressionModel);
progressionModel.setMessage("Recherche de mises à jour de base");
TuttiApplicationUpdaterCallBack callback =
@@ -92,5 +91,8 @@
String jdbcUrl = TuttiPersistenceConfig.getInstance().getJdbcUrl();
sendMessage(_("tutti.flash.information.db.installed", jdbcUrl));
+
+ // make sure title is reloaded
+ getUI().getHandler().changeTitle();
}
}
\ No newline at end of file
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/OpenDbAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/OpenDbAction.java 2013-03-14 06:46:28 UTC (rev 612)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/OpenDbAction.java 2013-03-14 09:41:03 UTC (rev 613)
@@ -46,6 +46,7 @@
public OpenDbAction(MainUIHandler handler) {
super(handler, true, TuttiScreen.SELECT_CRUISE);
+ setActionDescription(_("tuttihelp.dbManager.action.openDb.tip"));
}
@Override
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/action/AbstractTuttiAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/action/AbstractTuttiAction.java 2013-03-14 06:46:28 UTC (rev 612)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/action/AbstractTuttiAction.java 2013-03-14 09:41:03 UTC (rev 613)
@@ -25,6 +25,7 @@
*/
import com.google.common.base.Preconditions;
+import fr.ifremer.tutti.persistence.ProgressionModel;
import fr.ifremer.tutti.ui.swing.TuttiDataContext;
import fr.ifremer.tutti.ui.swing.TuttiUIContext;
import fr.ifremer.tutti.ui.swing.config.TuttiApplicationConfig;
@@ -123,6 +124,14 @@
this.actionDescription = actionDescription;
}
+ protected void setProgressionModel(ProgressionModel progressionModel) {
+ getContext().getActionUI().getModel().setProgressionModel(progressionModel);
+ }
+
+ protected ProgressionModel getProgressionModel() {
+ return getContext().getActionUI().getModel().getProgressionModel();
+ }
+
public boolean isHideBody() {
return hideBody;
}
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-03-14 06:46:28 UTC (rev 612)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2013-03-14 09:41:03 UTC (rev 613)
@@ -16,6 +16,7 @@
tutti.action.changeLocaleFR=
tutti.action.changeLocaleUK=
tutti.action.chooseDbExportFile=
+tutti.action.chooseDbFile=
tutti.action.chooseProtocolCaracteristicFile=
tutti.action.chooseProtocolFile=
tutti.action.chooseProtocolSpeciesFile=
@@ -55,6 +56,7 @@
tutti.action.editSelectedProgram=
tutti.action.editSelectedProtocol=
tutti.action.exit=
+tutti.action.exportAndCleanDb=
tutti.action.exportDb=
tutti.action.exportProtocol=
tutti.action.exportProtocolAllCaracteristic=
@@ -67,6 +69,7 @@
tutti.action.generate=
tutti.action.generateCampaignName=
tutti.action.importCasino=
+tutti.action.importDb=
tutti.action.importProtocol=
tutti.action.importProtocolCaracteristic=
tutti.action.importProtocolSpecies=
@@ -170,6 +173,8 @@
tutti.flash.information.cruiseSaved=
tutti.flash.information.db.closed=
tutti.flash.information.db.exported=
+tutti.flash.information.db.exported.and.clean=
+tutti.flash.information.db.imported=
tutti.flash.information.db.installed=
tutti.flash.information.db.installed.=
tutti.flash.information.db.opened=
@@ -441,6 +446,7 @@
tutti.title.about.translate=Translate Tutti
tutti.title.attachment=
tutti.title.choose.dbExportFile=
+tutti.title.choose.dbImportFile=
tutti.title.choose.exportTemporaryGearExampleFile=
tutti.title.choose.exportTemporaryPersonExampleFile=
tutti.title.choose.exportTemporarySpeciesExampleFile=
@@ -556,7 +562,9 @@
tuttihelp.createSpeciesBatch.field.sortedUnsortedCategoryComboBox.tip=
tuttihelp.createSpeciesBatch.field.speciesComboBox.tip=
tuttihelp.dbManager.action.closeDb.tip=
+tuttihelp.dbManager.action.exportAndCleanDb.tip=
tuttihelp.dbManager.action.exportDb.tip=
+tuttihelp.dbManager.action.importDb.tip=
tuttihelp.dbManager.action.installDb.tip=
tuttihelp.dbManager.action.openDb.tip=
tuttihelp.dbManager.action.upgradeDb.tip=
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-03-14 06:46:28 UTC (rev 612)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-03-14 09:41:03 UTC (rev 613)
@@ -16,6 +16,7 @@
tutti.action.changeLocaleFR=Français
tutti.action.changeLocaleUK=Anglais
tutti.action.chooseDbExportFile=Exporter la base de données
+tutti.action.chooseDbFile=Choisir la base à importer
tutti.action.chooseProtocolCaracteristicFile=Choisir le fichier des caractéristiques
tutti.action.chooseProtocolFile=Choisir le fichier de protocole
tutti.action.chooseProtocolSpeciesFile=Choisir le fichier des espèces
@@ -25,7 +26,7 @@
tutti.action.chooseReferentialVesselFile=Choisir le fichier de référentiel navire
tutti.action.cloneProtocol=Cloner
tutti.action.close=Fermer
-tutti.action.closeAttachment.tip=Fermer la fenêtre des picèes-jointes
+tutti.action.closeAttachment.tip=Fermer la fenêtre des pièces-jointes
tutti.action.closeCommentEditor.tip=Fermer la fenêtre des commentaires
tutti.action.closeDb=Fermer
tutti.action.comment.tip=Commentaire
@@ -62,6 +63,7 @@
tutti.action.editSelectedProgram.tip=Éditer la série de campagne sélectionnée
tutti.action.editSelectedProtocol=Protocole
tutti.action.exit=Quitter
+tutti.action.exportAndCleanDb=Exporter et supprimer
tutti.action.exportDb=Exporter
tutti.action.exportProtocol=Exporter
tutti.action.exportProtocolAllCaracteristic=Exporter toutes les caractéristiques
@@ -74,6 +76,7 @@
tutti.action.generate=Générer
tutti.action.generateCampaignName=Générer le nom
tutti.action.importCasino=Import Casino
+tutti.action.importDb=Importer une base
tutti.action.importProtocol=Importer
tutti.action.importProtocolCaracteristic=Importer les caractéristiques
tutti.action.importProtocolSpecies=Importer les espèces
@@ -176,6 +179,8 @@
tutti.flash.information.cruiseSaved=La campagne <strong>%s</strong> a été enregistrée.
tutti.flash.information.db.closed=La base de données <strong>%s</strong> est fermée.
tutti.flash.information.db.exported=Base exportée dans l'archive <strong>%s</strong>.
+tutti.flash.information.db.exported.and.clean=Base exportée dans l'archive <strong>%s</strong>.
+tutti.flash.information.db.imported=La base de données <strong>%s</strong> est importée.
tutti.flash.information.db.installed=La base de données <strong>%s</strong> est installée.
tutti.flash.information.db.opened=La base de données <strong>%s</strong> est ouverte.
tutti.flash.information.programCreated=La série de campagne <strong>%s</strong> a été créée.
@@ -189,9 +194,9 @@
tutti.flash.information.species.imported.in.protocol.severalReplaced=Espèces importées dans le protocole depuis le fichier <strong>%s</strong>. %s remplacées par leur référent.
tutti.flash.information.species.remove.from.protocol=L'espèce <strong>%s</strong> a été retirée du protocole.
tutti.flash.information.species.replaced=L'espèce <strong>%s</strong> a été remplacée par son référent <strong>%s</strong>.
-tutti.information.db.loaded=Tutti est connecté à une base de données
-tutti.information.no.db.exist=Aucune base détectée, vous pouvez installer la dernière disponible sur le réseau.
-tutti.information.no.db.loaded=Tutti a détecté une base mais elle n'est pas actuellement ouverte.
+tutti.information.db.loaded=<html>Tutti est connecté à une base de données<hr/>Url de connexion \: <strong>%s</strong></html>
+tutti.information.no.db.exist=Aucune base détectée, vous pouvez installer la dernière disponible sur le réseau ou bien en importer une.
+tutti.information.no.db.loaded=Tutti possède une base mais elle n'est pas actuellement ouverte.
tutti.label.attachmentEditor.file=Fichier
tutti.label.attachmentEditor.fileComment=Commentaire
tutti.label.attachmentEditor.fileName=Nom
@@ -460,6 +465,7 @@
tutti.title.about.translate=Traduire Tutti
tutti.title.attachment=Pièces jointes
tutti.title.choose.dbExportFile=Exporter la base de données
+tutti.title.choose.dbImportFile=Importer la base de données
tutti.title.choose.exportTemporaryGearExampleFile=Exporter un exemple de référentiel Engin
tutti.title.choose.exportTemporaryPersonExampleFile=Exporter un exemple de référentiel Personne
tutti.title.choose.exportTemporarySpeciesExampleFile=Exporter un exemple de référentiel Espèce
@@ -566,7 +572,7 @@
tutti.validator.warning.longitude.outOfBounds=La Latitude doit être comprise entre -180.0 et 180.0
tutti.validator.warning.longitude.second.outOfBounds=La seconde de la longitude doit être comprise entre 0 et 60
tutti.warn.invalid.batch.model=L'arbre d'échantillonage n'est pas compatible. Les captures ne seront pas visibles.
-tutti.warn.invalid.program=Le programme sélectionné ne possède pas de zone, il ne peut pas être édité.
+tutti.warn.invalid.program=La série de campagne sélectionnée ne possède pas de zone, ses captures ne peuvent pas être éditées.
tuttihelp.createSpeciesBatch.action.addSpecies.tip=Sélectionner une autre espèce
tuttihelp.createSpeciesBatch.action.cancel.tip=
tuttihelp.createSpeciesBatch.action.save.tip=
@@ -574,9 +580,11 @@
tuttihelp.createSpeciesBatch.field.sortedUnsortedCategoryComboBox.tip=
tuttihelp.createSpeciesBatch.field.speciesComboBox.tip=
tuttihelp.dbManager.action.closeDb.tip=Fermer la base de données en cours d'utilisation
+tuttihelp.dbManager.action.exportAndCleanDb.tip=Exporter la base de données au format zip puis supprimer les fichiers de Tutti
tuttihelp.dbManager.action.exportDb.tip=Exporter la base de données au format zip
+tuttihelp.dbManager.action.importDb.tip=Importer la base de données au format zip
tuttihelp.dbManager.action.installDb.tip=Télécharger puis installer la base de données
-tuttihelp.dbManager.action.openDb.tip=Ouvrir la base de données détectée par Tutti
+tuttihelp.dbManager.action.openDb.tip=Ouvrir la base de données
tuttihelp.dbManager.action.upgradeDb.tip=Mettre à jour les référentiels si nécessaire
tuttihelp.editCatchBatch.action.cancelEditCatchBatch.tip=Réinitialiser l'édition de la capture
tuttihelp.editCatchBatch.action.computeWeights.tip=Elever les poids
Copied: trunk/tutti-ui-swing/src/main/resources/icons/action-import-db.png (from rev 610, trunk/tutti-ui-swing/src/main/resources/icons/action-install-db.png)
===================================================================
(Binary files differ)
1
0
r612 - in trunk: src/site/rst tutti-ui-swing tutti-ui-swing/src/main/filtered-resources tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment tutti-ui-swing/src/main/resources/i18n tutti-ui-swing/src/main/resources/icons
by tchemit@users.forge.codelutin.com 14 Mar '13
by tchemit@users.forge.codelutin.com 14 Mar '13
14 Mar '13
Author: tchemit
Date: 2013-03-14 07:46:28 +0100 (Thu, 14 Mar 2013)
New Revision: 612
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/612
Log:
remove nuiton-profiling from build
fix svn properties + missing headers
Modified:
trunk/src/site/rst/mapping.rst
trunk/tutti-ui-swing/pom.xml
trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-en.properties
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentItem.css
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentItem.jaxx
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties
trunk/tutti-ui-swing/src/main/resources/icons/action-open-file.png
Modified: trunk/src/site/rst/mapping.rst
===================================================================
--- trunk/src/site/rst/mapping.rst 2013-03-14 06:45:16 UTC (rev 611)
+++ trunk/src/site/rst/mapping.rst 2013-03-14 06:46:28 UTC (rev 612)
@@ -1,307 +1,307 @@
-.. -
-.. * #%L
-.. * Tutti :: Persistence Adagio (impl)
-.. * $Id: referential.rst 301 2013-02-02 14:24:01Z tchemit $
-.. * $HeadURL: http://svn.forge.codelutin.com/svn/tutti/trunk/src/site/rst/referential.rst $
-.. * %%
-.. * 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%
-.. -
-
-=============================================
-Tutti - Correspondance écrans/base de données
-=============================================
-
-Présentation
-~~~~~~~~~~~~
-
-Ce document décrit comment sont stocker les informations visibles dans les écrans.
-
-Série de campagne
-~~~~~~~~~~~~~~~~~
-
-Nom
- Program.name (PROGRAM.NAME)
-
-Zone
- Program.locations (PROGRAM2LOCATION.LOCATION_FK)
-
-Commentaire
- Program.description (PROGRAM.DESCRIPTION)
-
-Campagne
-~~~~~~~~
-
-Série
- ScientificCruise.program (SCIENTIFIC_CRUISE.PROGRAM_FK)
-
-Année
- En lecture : year(ScientificCruise.departureDateTime) (SCIENTIFIC_CRUISE.DEPARTURE_DATE_TIME)
- En écriture : pas de stockage (car doit logiquement être compatible avec ScientificCruise.departureDateTime)
-
-Série partielle
- ScientificCruise.fishingTrip.surveyMeasurement (SURVEY_MEASUREMENT.ALPHA_NUMERICAL_VALUE, avec PMFM_FK=<PMFM_ID_SURVEY_PART>)
-
-Name
- ScientificCruise.name (SCIENTIFIC_CRUISE.NAME)
-
-Nombre de poches
- En lecture : récupération de la plus grande valeur dans ScientificCruise.fishingTrip.gearPhysicalFeatures.gearPhysicalMeasurement.numericalvalue (GEAR_PHYSICAL_MEASURMENT.NUMERICAL_VALUE avec PMFM_FK=<PMFM_ID_MULTIRIG_NUMBER>)
- En écriture : valeur dupliquée pour chaque engin (voir "Engin(s)" ci-dessous) dans ScientificCruise.fishingTrip.gearPhysicalFeatures.gearPhysicalMeasurement.numericalvalue (GEAR_PHYSICAL_MEASURMENT.NUMERICAL_VALUE avec PMFM_FK=<PMFM_ID_MULTIRIG_NUMBER>)
-
-Pays
- En lecture : le pays est calculé à partir de ScientificCruise.departureLocation (SCIENTIFIC_CRUISE.DEPARTURE_LOCATION_FK)
- en utilisant la hiérarchie des lieux (LOCATION_HIERARCHY) our être sûr d'obtenir un payx et non un lieux de niveau inférieur (ex : un port, etc.)
- En écriture : ScientificCruise.departureLocation (SCIENTIFIC_CRUISE.DEPARTURE_LOCATION_FK) et ScientificCruise.returnLocation (SCIENTIFIC_CRUISE.DEPARTURE_LOCATION_FK)
-
-Date de début
- ScientificCruise.departureDateTime (SCIENTIFIC_CRUISE.DEPARTURE_DATE_TIME)
-
-Date de fin
- ScientificCruise.returnDateTime (SCIENTIFIC_CRUISE.RETURN_DATE_TIME)
-
-Navire(s)
- Le premier navire dans le liste est stocké dans ScientificCruise.vessel (SCIENTIFIC_CRUISE.VESSEL_FK).
- Les navires suivants sont stockés dans ScientificCruise.fishingTrip.comments
- derrière la balise : #VESSELS=<liste_des_IDs>
- Il n'est pas certain qu'il soit nécessaire de stocker cette liste ailleurs, dans la mesure où
- elle peut être calculée à partir de la liste des navires associés à chaque opération (voir "Opération > Navire" ci-dessous),
- comme c'est le cas actuellement à l'ouverture d'une campagne de données historiques.
-
-Engin(s)
- ScientificCruise.fishingTrip.gearPhysicalFeatures.gear (GEAR_PHYSICAL_FEATURES.GEAR_FK avec RANK_ORDER=<n° d'ordre dans la liste>)
-
-Chef(s) de mission
- La première personne de la liste est stockée sous ScientificCruise.manager (SCIENTIFIC_CRUISE.MANAGER_PERSON_FK)
- En v1, les identifiant des personnes suivantes sont stockées dans ScientificCruise.fishingTrip.comments
- derrière la balise : #MANAGERS=<liste_des_IDs>
- En v2, ce stockage devra se faire dans ScientificCruise.fishingTrip.vesselPersonFeatures avec un VesselPersonRole.id=<responsable_de_campagne>
-
-Responsable(s) de salle de tri
- En v1, tous les identifiants des personnes sélectionnées sont stockées dans ScientificCruise.fishingTrip.comments
- derrière la balise : #SORT_MANAGERS=<liste_des_IDs>
- En v2, ce stockage devra se faire dans ScientificCruise.fishingTrip.vesselPersonFeatures avec un VesselPersonRole.id=<responsable_salle_de_tri>
-
-Commentaire
- ScientificCruise.comments (SCIENTIFIC_CRUISE.COMMENTS)
-
-Trait
-~~~~~
-
-Code Station
- Operation.vesselUseFeatures.vesselUseMeasurement (VESSEL_USE_MEASUREMENT.ALPHANUMERICAL_VALUE avec PMFM_FK=<PMFM_ID_STATION_NUMBER>)
-
-Numéro de trait
- Operation.name (OPERATION.NAME) : ajouté à la fin du "name", derrière le code de l'engin, pour rester compatible avec le format des données historiques.
-
-Numéro de poche
- Operation.gearUseFeatures.gearUseMeasurement (GEAR_USE_MEASUREMENT.ALPHANUMERICAL_VALUE avec PMFM_FK=<PMFM_ID_MULTIRIG_AGGREGATION>)
-
-Strate
- Operation.gearUseFeatures.fishingArea.regulationLocation (FISHING_AREA2REG_LOCATION.LOCATION_FK associé au FISHING_AREA de l'opération)
- En lecture : sélection en tant que locatlité à partir du locationLevel (LOCATION.LOCATION_LEVEL_FK=<LocationLevelId.STRATA>)
-
-Sous-strate
- Operation.gearUseFeatures.fishingArea.regulationLocation (FISHING_AREA2REG_LOCATION.LOCATION_FK associé au FISHING_AREA de l'opération)
- En lecture : sélection en tant que locatlité à partir du locationLevel (LOCATION.LOCATION_LEVEL_FK=<LocationLevelId.SUB_STRATA>)
-
-Localité
- operation.gearUseFeatures.fishingArea.regulationLocation (FISHING_AREA2REG_LOCATION.LOCATION_FK associé au FISHING_AREA de l'opération)
- En lecture : sélection en tant que locatlité à partir du locationLevel (LOCATION.LOCATION_LEVEL_FK=<LocationLevelId.LOCALITE>)
-
-Début de traine > Latitude, Longitude
- Operation.vesselPosition (VESSEL_POSITION.LATITUDE et VESSEL_POSITION.LONGITUDE), avec startDateTime = "Début de traine > Date et heure"
-
-Début de traine > Date et heure
- Operation.startDateTime et Operation.fishingStartDateTime (OPERATION.START_DATE_TIME et OPERATION.FISHING_START_DATE_TIME)
-
-Fin de traine > Latitude, Longitude
- Operation.vesselPosition (VESSEL_POSITION.LATITUDE et VESSEL_POSITION.LONGITUDE), avec startDateTime = "Fin de traine > Date et heure"
-
-Fin de traine > Date et heure
- Operation.endDateTime et Operation.fishingEndDateTime (OPERATION.END_DATE_TIME et OPERATION.FISHING_END_DATE_TIME)
-
-Trait rectiligne
- Operation.vesselUseFeatures.vesselUseMeasurement (VESSEL_USE_MEASUREMENT.QUALITATIVE_VALUE_FK avec PMFM_FK=<PMFM_ID_RECTILINEAR_OPERATION>)
-
-Distance chalutée
- Operation.vesselUseFeatures.vesselUseMeasurement (VESSEL_USE_MEASUREMENT.NUMERICAL_VALUE avec PMFM_FK=<PMFM_ID_TRAWL_DISTANCE>)
-
-Trait valide ou invalide
- Operation.vesselUseFeatures.vesselUseMeasurement (VESSEL_USE_MEASUREMENT.QUALITATIVE_VALUE_FK avec PMFM_FK=<PMFM_ID_HAUL_VALID>)
-
-Saisisseur(s)
- En v1, les identifiant des personnes suivantes sont stockées dans ScientificCruise.fishingTrip.comments
- derrière la balise : #MANAGERS=<liste_des_IDs>
- En v2, ce stockage devra se faire dans ScientificCruise.fishingTrip.vesselPersonFeatures avec un VesselPersonRole.id=<responsable_de_campagne>
-
-Navire
- Si le navire est identique au premier de la liste de la campagne : Operation.vessel (OPERATION.VESSEL_FK)
- Sinon : Operation.operationVesselAssociation (OPERATION_VESSEL_ASSOCIATION.VESSEL_FK avec IS_CATCH_ON_OPERATION_VESSEL=0).
- Operation.vessel est alors rempli avec le premier navire de la liste de la campagne, pour être compatible avec Allegro (on doit toujours avoir : SCIENTIFIC_CRUISE.VESSEL_FK = OPERATION_VESSEL_FK).
-
-Engin
- Operation.gearPhysicialFeatures (OPERATION.GEAR_PHYSCIAL_FEATURES_FK) : lien vers un engin déjà déclaré au niveau de la campagne.
- Le code de l'engin est également dupliqué au début de Operation.name (OPERATION.NAME), devant le numéro du trait, pour rester compatible avec le format des données historiques.
-
-Commentaire
- Operation.comments (OPERATION.COMMENTS)
-
-Trait > Mise en oeuvre de l'engin
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Valeur
- Operation.gearUseFeatures.gearUseMeasurement (GEAR_USE_MEASUREMENT.xxx - en fonction du type de PSFM : NUMERICAL_VALUE, ALPHANUMERICAL_VALUE ou QUALITATIVE_VALUE_FK)
-
-Trait > Hydrologie et paramètres environnementaux
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Valeur
- Operation.gearUseFeatures.vesselUseMeasurement (GEAR_USE_MEASUREMENT.xxx - en fonction du type de PSFM : NUMERICAL_VALUE, ALPHANUMERICAL_VALUE ou QUALITATIVE_VALUE_FK)
- En v2 (à confirmer), informations dispatcher dans différent onglet, en fonction du PSFM trouvé dans le protocole
-
-Capture > Résumé
-~~~~~~~~~~~~~~~~
-
-Poids TOTAL
- Lot "Capture" (BATCH avec IS_CATCH_BATCH=1)
- CatchBatch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
-
-Poids total VRAC
- Lot "Capture > Vrac"
- Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
-
-Poids total HORS VRAC
- Lot "Capture > Hors Vrac"
- Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
-
-Poids total NON TRIE
- Lot "Capture > Non trié"
- Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
-
-Espèce > Poids TOTAL
- Sommme des poids des lots "Capture > xxx > Espèce"
- Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
-
-Espèce > Poids total VRAC
- Lot "Capture > Vrac > Espèce"
- Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
-
-Espèce > Poids total VRAC trié
- Calculé par tutti ? utile seulement si Thalassa ?
-
-Espèce > Poids total HORS VRAC TRIE
- Lot "Capture > Hors Vrac > Espèce"
- Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
-
-Benthos > Poids TOTAL
- Sommme des poids des lots "Capture > xxx > Benthos"
- Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
-
-Benthos > Poids total VRAC
- Lot "Capture > Vrac > Benthos"
- Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
-
-Benthos > Poids total VRAC trié
- Calculé par tutti ? utile seulement si Thalassa ?
-
-Benthos > Poids total HORS VRAC TRIE
- Lot "Capture > Hors Vrac > Benthos"
- Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
-
-Capture > Espèces
-~~~~~~~~~~~~~~~~~
-
-Espèce > Poids total VRAC
- Lot "Capture > Vrac > Espèce"
- Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
-
-Poids inerte trié
- Lot "Capture > Vrac > Espèce > [TAXON_INERT]"
- Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
-
-Poids vivant non détaillé trié
- Lot "Capture > Vrac > Espèce > Biota"
- Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
-
-Tableau
- Chaque ligne du tableau est stockée sous la forme d'un lot (Batch) positionné
- soit sous le lot "Capture > Vrac > Espèce"
- soit sous "Capture > Hors Vrac > Espèce"
-
-Tableau > Espèce
- stockage de l'espèce uniquement pour les lot parent
- Batch.referenceTaxon (BATCH.REFERENCE_TAXON_FK)
-
-Tableau > V/HV
- Vrac ou Hors Vrac : Batch.sortingMeasurement.qualitativeValue (SORTING_MEASUREMENT.QUALITATIVE_VALUE_FK avec PMFM_FK=<PmfmId.SORTED_UNSORTED>)
- Poids : Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
-
-Tableau > Class. Tri
- Batch.sortingMeasurement.qualitativeValue (SORTING_MEASUREMENT.QUALITATIVE_VALUE_FK avec PMFM_FK=<PmfmId.SIZE_CATEGORY>)
-
-Tableau > Sexe
- Batch.sortingMeasurement.qualitativeValue (SORTING_MEASUREMENT.QUALITATIVE_VALUE_FK avec PMFM_FK=<PmfmId.SEX>)
-
-Tableau > Maturité
- Batch.sortingMeasurement.qualitativeValue (SORTING_MEASUREMENT.QUALITATIVE_VALUE_FK avec PMFM_FK=<PmfmId.MATURITY>)
-
-Tableau > Age
- Batch.sortingMeasurement.qualitativeValue (SORTING_MEASUREMENT.QUALITATIVE_VALUE_FK avec PMFM_FK=<PmfmId.AGE>)
-
-Tableau > Poids sous-échantillonné
- Si vide Batch.samplingRatio = 1
- Sinon :
- Batch.samplingRatioText (BATCH.SAMPLING_RATIO_TEXT) concaténé à partir des chaines : "<Poids sous-échantillonné>" + "/" + "<Poids V/HV>"
- Batch.samplingRatio (BATCH.SAMPLING_RATIO) calculé par le division : <Poids sous-échantillonné> / <Poids V/HV>
- Pour la lecture : on parse samplingRatioText pour récupérer le poids sous-échantillonné. si absent on le calculé à partir de samplingRatio (moins précis car perte possible de précision)
-
-Tableau > Nombre
- Calculé à partir de la somme du nombre d'individus des lots fils (BATCH.INDIVIDUAL_COUNT avec PARENT_BATCH_FK=<ID du lot de la ligne du tableau>)
- (voir ci-dessous "Mensuration > Tableau")
-
-Tableau > Commentaire
- Batch.comments
-
-Tableau > Pièces Jointes
- Chaque pièce jointes est stockée dans MeasurementFile
- (MEASUREMENT_FILE avec PMFM_FK=null, OBJECT_TYPE_FK='BATCH' et OBJECT_ID=<ID du lot de la ligne du tableau>)
- MeasurementFile.path : chemin du fichier (copier dans un répertoire, puis stocké en relatif ?)
- MeasurementFile.name : nom
- MeasurementFile.comments : commentaire
-
-Mensuration > Type de mesure
- Dupliqué pour chaque lot de mensuration créé (un lot pour chaque taille saisie)
- Batch.sortingMeasurement.pmfm (SORTING_MEASUREMENT.PMFM_FK)
-
-Mensuration > Pas de la classe de taille
- Non stocké (devrait dépendre de PSFM.precision ?)
- Peut-etre peut on le calculé par analyse des mensuration saisie ? Et si aucune mesure prendre la précision du PSFM ?
-
-Mensuration > Tableau
- Chaque ligne du tableau de mensuration est stocké sous la forme d'un lot
- relié au lot correspondant à la ligne parent du tableau des espèces. (BATCH avec PARENT_BATCH_FK=<ID du lot parent dans le tableau des espèces>)
-
-Mensuration > Tableau > Classe de taille
- Batch.sortingMeasurement.numericalValue (SORTING_MEASUREMENT.NUMERICAL_VALUE avec PMFM_FK=<ID correspondant au "Type de mesure">)
-
-Mensuration > Tableau > Nombre
- Batch.individualCount (BATCH.INDIVIDUAL_COUNT)
-
-Mensuration > Tableau > Poids observé
- Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+.. -
+.. * #%L
+.. * Tutti :: Persistence Adagio (impl)
+.. * $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%
+.. -
+
+=============================================
+Tutti - Correspondance écrans/base de données
+=============================================
+
+Présentation
+~~~~~~~~~~~~
+
+Ce document décrit comment sont stocker les informations visibles dans les écrans.
+
+Série de campagne
+~~~~~~~~~~~~~~~~~
+
+Nom
+ Program.name (PROGRAM.NAME)
+
+Zone
+ Program.locations (PROGRAM2LOCATION.LOCATION_FK)
+
+Commentaire
+ Program.description (PROGRAM.DESCRIPTION)
+
+Campagne
+~~~~~~~~
+
+Série
+ ScientificCruise.program (SCIENTIFIC_CRUISE.PROGRAM_FK)
+
+Année
+ En lecture : year(ScientificCruise.departureDateTime) (SCIENTIFIC_CRUISE.DEPARTURE_DATE_TIME)
+ En écriture : pas de stockage (car doit logiquement être compatible avec ScientificCruise.departureDateTime)
+
+Série partielle
+ ScientificCruise.fishingTrip.surveyMeasurement (SURVEY_MEASUREMENT.ALPHA_NUMERICAL_VALUE, avec PMFM_FK=<PMFM_ID_SURVEY_PART>)
+
+Name
+ ScientificCruise.name (SCIENTIFIC_CRUISE.NAME)
+
+Nombre de poches
+ En lecture : récupération de la plus grande valeur dans ScientificCruise.fishingTrip.gearPhysicalFeatures.gearPhysicalMeasurement.numericalvalue (GEAR_PHYSICAL_MEASURMENT.NUMERICAL_VALUE avec PMFM_FK=<PMFM_ID_MULTIRIG_NUMBER>)
+ En écriture : valeur dupliquée pour chaque engin (voir "Engin(s)" ci-dessous) dans ScientificCruise.fishingTrip.gearPhysicalFeatures.gearPhysicalMeasurement.numericalvalue (GEAR_PHYSICAL_MEASURMENT.NUMERICAL_VALUE avec PMFM_FK=<PMFM_ID_MULTIRIG_NUMBER>)
+
+Pays
+ En lecture : le pays est calculé à partir de ScientificCruise.departureLocation (SCIENTIFIC_CRUISE.DEPARTURE_LOCATION_FK)
+ en utilisant la hiérarchie des lieux (LOCATION_HIERARCHY) our être sûr d'obtenir un payx et non un lieux de niveau inférieur (ex : un port, etc.)
+ En écriture : ScientificCruise.departureLocation (SCIENTIFIC_CRUISE.DEPARTURE_LOCATION_FK) et ScientificCruise.returnLocation (SCIENTIFIC_CRUISE.DEPARTURE_LOCATION_FK)
+
+Date de début
+ ScientificCruise.departureDateTime (SCIENTIFIC_CRUISE.DEPARTURE_DATE_TIME)
+
+Date de fin
+ ScientificCruise.returnDateTime (SCIENTIFIC_CRUISE.RETURN_DATE_TIME)
+
+Navire(s)
+ Le premier navire dans le liste est stocké dans ScientificCruise.vessel (SCIENTIFIC_CRUISE.VESSEL_FK).
+ Les navires suivants sont stockés dans ScientificCruise.fishingTrip.comments
+ derrière la balise : #VESSELS=<liste_des_IDs>
+ Il n'est pas certain qu'il soit nécessaire de stocker cette liste ailleurs, dans la mesure où
+ elle peut être calculée à partir de la liste des navires associés à chaque opération (voir "Opération > Navire" ci-dessous),
+ comme c'est le cas actuellement à l'ouverture d'une campagne de données historiques.
+
+Engin(s)
+ ScientificCruise.fishingTrip.gearPhysicalFeatures.gear (GEAR_PHYSICAL_FEATURES.GEAR_FK avec RANK_ORDER=<n° d'ordre dans la liste>)
+
+Chef(s) de mission
+ La première personne de la liste est stockée sous ScientificCruise.manager (SCIENTIFIC_CRUISE.MANAGER_PERSON_FK)
+ En v1, les identifiant des personnes suivantes sont stockées dans ScientificCruise.fishingTrip.comments
+ derrière la balise : #MANAGERS=<liste_des_IDs>
+ En v2, ce stockage devra se faire dans ScientificCruise.fishingTrip.vesselPersonFeatures avec un VesselPersonRole.id=<responsable_de_campagne>
+
+Responsable(s) de salle de tri
+ En v1, tous les identifiants des personnes sélectionnées sont stockées dans ScientificCruise.fishingTrip.comments
+ derrière la balise : #SORT_MANAGERS=<liste_des_IDs>
+ En v2, ce stockage devra se faire dans ScientificCruise.fishingTrip.vesselPersonFeatures avec un VesselPersonRole.id=<responsable_salle_de_tri>
+
+Commentaire
+ ScientificCruise.comments (SCIENTIFIC_CRUISE.COMMENTS)
+
+Trait
+~~~~~
+
+Code Station
+ Operation.vesselUseFeatures.vesselUseMeasurement (VESSEL_USE_MEASUREMENT.ALPHANUMERICAL_VALUE avec PMFM_FK=<PMFM_ID_STATION_NUMBER>)
+
+Numéro de trait
+ Operation.name (OPERATION.NAME) : ajouté à la fin du "name", derrière le code de l'engin, pour rester compatible avec le format des données historiques.
+
+Numéro de poche
+ Operation.gearUseFeatures.gearUseMeasurement (GEAR_USE_MEASUREMENT.ALPHANUMERICAL_VALUE avec PMFM_FK=<PMFM_ID_MULTIRIG_AGGREGATION>)
+
+Strate
+ Operation.gearUseFeatures.fishingArea.regulationLocation (FISHING_AREA2REG_LOCATION.LOCATION_FK associé au FISHING_AREA de l'opération)
+ En lecture : sélection en tant que locatlité à partir du locationLevel (LOCATION.LOCATION_LEVEL_FK=<LocationLevelId.STRATA>)
+
+Sous-strate
+ Operation.gearUseFeatures.fishingArea.regulationLocation (FISHING_AREA2REG_LOCATION.LOCATION_FK associé au FISHING_AREA de l'opération)
+ En lecture : sélection en tant que locatlité à partir du locationLevel (LOCATION.LOCATION_LEVEL_FK=<LocationLevelId.SUB_STRATA>)
+
+Localité
+ operation.gearUseFeatures.fishingArea.regulationLocation (FISHING_AREA2REG_LOCATION.LOCATION_FK associé au FISHING_AREA de l'opération)
+ En lecture : sélection en tant que locatlité à partir du locationLevel (LOCATION.LOCATION_LEVEL_FK=<LocationLevelId.LOCALITE>)
+
+Début de traine > Latitude, Longitude
+ Operation.vesselPosition (VESSEL_POSITION.LATITUDE et VESSEL_POSITION.LONGITUDE), avec startDateTime = "Début de traine > Date et heure"
+
+Début de traine > Date et heure
+ Operation.startDateTime et Operation.fishingStartDateTime (OPERATION.START_DATE_TIME et OPERATION.FISHING_START_DATE_TIME)
+
+Fin de traine > Latitude, Longitude
+ Operation.vesselPosition (VESSEL_POSITION.LATITUDE et VESSEL_POSITION.LONGITUDE), avec startDateTime = "Fin de traine > Date et heure"
+
+Fin de traine > Date et heure
+ Operation.endDateTime et Operation.fishingEndDateTime (OPERATION.END_DATE_TIME et OPERATION.FISHING_END_DATE_TIME)
+
+Trait rectiligne
+ Operation.vesselUseFeatures.vesselUseMeasurement (VESSEL_USE_MEASUREMENT.QUALITATIVE_VALUE_FK avec PMFM_FK=<PMFM_ID_RECTILINEAR_OPERATION>)
+
+Distance chalutée
+ Operation.vesselUseFeatures.vesselUseMeasurement (VESSEL_USE_MEASUREMENT.NUMERICAL_VALUE avec PMFM_FK=<PMFM_ID_TRAWL_DISTANCE>)
+
+Trait valide ou invalide
+ Operation.vesselUseFeatures.vesselUseMeasurement (VESSEL_USE_MEASUREMENT.QUALITATIVE_VALUE_FK avec PMFM_FK=<PMFM_ID_HAUL_VALID>)
+
+Saisisseur(s)
+ En v1, les identifiant des personnes suivantes sont stockées dans ScientificCruise.fishingTrip.comments
+ derrière la balise : #MANAGERS=<liste_des_IDs>
+ En v2, ce stockage devra se faire dans ScientificCruise.fishingTrip.vesselPersonFeatures avec un VesselPersonRole.id=<responsable_de_campagne>
+
+Navire
+ Si le navire est identique au premier de la liste de la campagne : Operation.vessel (OPERATION.VESSEL_FK)
+ Sinon : Operation.operationVesselAssociation (OPERATION_VESSEL_ASSOCIATION.VESSEL_FK avec IS_CATCH_ON_OPERATION_VESSEL=0).
+ Operation.vessel est alors rempli avec le premier navire de la liste de la campagne, pour être compatible avec Allegro (on doit toujours avoir : SCIENTIFIC_CRUISE.VESSEL_FK = OPERATION_VESSEL_FK).
+
+Engin
+ Operation.gearPhysicialFeatures (OPERATION.GEAR_PHYSCIAL_FEATURES_FK) : lien vers un engin déjà déclaré au niveau de la campagne.
+ Le code de l'engin est également dupliqué au début de Operation.name (OPERATION.NAME), devant le numéro du trait, pour rester compatible avec le format des données historiques.
+
+Commentaire
+ Operation.comments (OPERATION.COMMENTS)
+
+Trait > Mise en oeuvre de l'engin
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Valeur
+ Operation.gearUseFeatures.gearUseMeasurement (GEAR_USE_MEASUREMENT.xxx - en fonction du type de PSFM : NUMERICAL_VALUE, ALPHANUMERICAL_VALUE ou QUALITATIVE_VALUE_FK)
+
+Trait > Hydrologie et paramètres environnementaux
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Valeur
+ Operation.gearUseFeatures.vesselUseMeasurement (GEAR_USE_MEASUREMENT.xxx - en fonction du type de PSFM : NUMERICAL_VALUE, ALPHANUMERICAL_VALUE ou QUALITATIVE_VALUE_FK)
+ En v2 (à confirmer), informations dispatcher dans différent onglet, en fonction du PSFM trouvé dans le protocole
+
+Capture > Résumé
+~~~~~~~~~~~~~~~~
+
+Poids TOTAL
+ Lot "Capture" (BATCH avec IS_CATCH_BATCH=1)
+ CatchBatch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Poids total VRAC
+ Lot "Capture > Vrac"
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Poids total HORS VRAC
+ Lot "Capture > Hors Vrac"
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Poids total NON TRIE
+ Lot "Capture > Non trié"
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Espèce > Poids TOTAL
+ Sommme des poids des lots "Capture > xxx > Espèce"
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Espèce > Poids total VRAC
+ Lot "Capture > Vrac > Espèce"
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Espèce > Poids total VRAC trié
+ Calculé par tutti ? utile seulement si Thalassa ?
+
+Espèce > Poids total HORS VRAC TRIE
+ Lot "Capture > Hors Vrac > Espèce"
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Benthos > Poids TOTAL
+ Sommme des poids des lots "Capture > xxx > Benthos"
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Benthos > Poids total VRAC
+ Lot "Capture > Vrac > Benthos"
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Benthos > Poids total VRAC trié
+ Calculé par tutti ? utile seulement si Thalassa ?
+
+Benthos > Poids total HORS VRAC TRIE
+ Lot "Capture > Hors Vrac > Benthos"
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Capture > Espèces
+~~~~~~~~~~~~~~~~~
+
+Espèce > Poids total VRAC
+ Lot "Capture > Vrac > Espèce"
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Poids inerte trié
+ Lot "Capture > Vrac > Espèce > [TAXON_INERT]"
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Poids vivant non détaillé trié
+ Lot "Capture > Vrac > Espèce > Biota"
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Tableau
+ Chaque ligne du tableau est stockée sous la forme d'un lot (Batch) positionné
+ soit sous le lot "Capture > Vrac > Espèce"
+ soit sous "Capture > Hors Vrac > Espèce"
+
+Tableau > Espèce
+ stockage de l'espèce uniquement pour les lot parent
+ Batch.referenceTaxon (BATCH.REFERENCE_TAXON_FK)
+
+Tableau > V/HV
+ Vrac ou Hors Vrac : Batch.sortingMeasurement.qualitativeValue (SORTING_MEASUREMENT.QUALITATIVE_VALUE_FK avec PMFM_FK=<PmfmId.SORTED_UNSORTED>)
+ Poids : Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Tableau > Class. Tri
+ Batch.sortingMeasurement.qualitativeValue (SORTING_MEASUREMENT.QUALITATIVE_VALUE_FK avec PMFM_FK=<PmfmId.SIZE_CATEGORY>)
+
+Tableau > Sexe
+ Batch.sortingMeasurement.qualitativeValue (SORTING_MEASUREMENT.QUALITATIVE_VALUE_FK avec PMFM_FK=<PmfmId.SEX>)
+
+Tableau > Maturité
+ Batch.sortingMeasurement.qualitativeValue (SORTING_MEASUREMENT.QUALITATIVE_VALUE_FK avec PMFM_FK=<PmfmId.MATURITY>)
+
+Tableau > Age
+ Batch.sortingMeasurement.qualitativeValue (SORTING_MEASUREMENT.QUALITATIVE_VALUE_FK avec PMFM_FK=<PmfmId.AGE>)
+
+Tableau > Poids sous-échantillonné
+ Si vide Batch.samplingRatio = 1
+ Sinon :
+ Batch.samplingRatioText (BATCH.SAMPLING_RATIO_TEXT) concaténé à partir des chaines : "<Poids sous-échantillonné>" + "/" + "<Poids V/HV>"
+ Batch.samplingRatio (BATCH.SAMPLING_RATIO) calculé par le division : <Poids sous-échantillonné> / <Poids V/HV>
+ Pour la lecture : on parse samplingRatioText pour récupérer le poids sous-échantillonné. si absent on le calculé à partir de samplingRatio (moins précis car perte possible de précision)
+
+Tableau > Nombre
+ Calculé à partir de la somme du nombre d'individus des lots fils (BATCH.INDIVIDUAL_COUNT avec PARENT_BATCH_FK=<ID du lot de la ligne du tableau>)
+ (voir ci-dessous "Mensuration > Tableau")
+
+Tableau > Commentaire
+ Batch.comments
+
+Tableau > Pièces Jointes
+ Chaque pièce jointes est stockée dans MeasurementFile
+ (MEASUREMENT_FILE avec PMFM_FK=null, OBJECT_TYPE_FK='BATCH' et OBJECT_ID=<ID du lot de la ligne du tableau>)
+ MeasurementFile.path : chemin du fichier (copier dans un répertoire, puis stocké en relatif ?)
+ MeasurementFile.name : nom
+ MeasurementFile.comments : commentaire
+
+Mensuration > Type de mesure
+ Dupliqué pour chaque lot de mensuration créé (un lot pour chaque taille saisie)
+ Batch.sortingMeasurement.pmfm (SORTING_MEASUREMENT.PMFM_FK)
+
+Mensuration > Pas de la classe de taille
+ Non stocké (devrait dépendre de PSFM.precision ?)
+ Peut-etre peut on le calculé par analyse des mensuration saisie ? Et si aucune mesure prendre la précision du PSFM ?
+
+Mensuration > Tableau
+ Chaque ligne du tableau de mensuration est stocké sous la forme d'un lot
+ relié au lot correspondant à la ligne parent du tableau des espèces. (BATCH avec PARENT_BATCH_FK=<ID du lot parent dans le tableau des espèces>)
+
+Mensuration > Tableau > Classe de taille
+ Batch.sortingMeasurement.numericalValue (SORTING_MEASUREMENT.NUMERICAL_VALUE avec PMFM_FK=<ID correspondant au "Type de mesure">)
+
+Mensuration > Tableau > Nombre
+ Batch.individualCount (BATCH.INDIVIDUAL_COUNT)
+
+Mensuration > Tableau > Poids observé
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
\ No newline at end of file
Property changes on: trunk/src/site/rst/mapping.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/tutti-ui-swing/pom.xml
===================================================================
--- trunk/tutti-ui-swing/pom.xml 2013-03-14 06:45:16 UTC (rev 611)
+++ trunk/tutti-ui-swing/pom.xml 2013-03-14 06:46:28 UTC (rev 612)
@@ -249,11 +249,11 @@
<version>${project.version}</version>
</dependency>
- <dependency>
+ <!--dependency>
<groupId>org.nuiton</groupId>
<artifactId>nuiton-profiling</artifactId>
<version>2.7-SNAPSHOT</version>
- </dependency>
+ </dependency-->
<dependency>
<groupId>org.nuiton</groupId>
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-03-14 06:45:16 UTC (rev 611)
+++ trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-en.properties 2013-03-14 06:46:28 UTC (rev 612)
@@ -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
-#Tue Mar 12 10:47:25 CET 2013
+#Thu Mar 14 07:41:37 CET 2013
tuttihelp.createSpeciesBatch.action.addSpecies.help=
tuttihelp.createSpeciesBatch.field.batchWeightField.help=
tuttihelp.createSpeciesBatch.field.sortedUnsortedCategoryComboBox.help=
@@ -118,6 +95,7 @@
tuttihelp.editProtocol.action.exportProtocolSpecies.help=
tuttihelp.editProtocol.action.importProtocolCaracteristic.help=
tuttihelp.editProtocol.action.importProtocolSpecies.help=
+tuttihelp.editProtocol.action.removeSpeciesProtocol.help=
tuttihelp.editProtocol.action.saveProtocol.help=
tuttihelp.editProtocol.action.selectOtherSpecies.help=
tuttihelp.editProtocol.field.comment.help=
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentItem.css
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentItem.css 2013-03-14 06:45:16 UTC (rev 611)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentItem.css 2013-03-14 06:46:28 UTC (rev 612)
@@ -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%
+ */
#attachmentPanel {
toolTipText: {attachment != null ? getAttachment().getComment() : null};
}
Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentItem.css
___________________________________________________________________
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/util/attachment/AttachmentItem.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentItem.jaxx 2013-03-14 06:45:16 UTC (rev 611)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentItem.jaxx 2013-03-14 06:46:28 UTC (rev 612)
@@ -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%
+ -->
<JPanel id='attachmentPanel' layout='{new BorderLayout()}'>
<import>
Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentItem.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
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-03-14 06:45:16 UTC (rev 611)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2013-03-14 06:46:28 UTC (rev 612)
@@ -88,6 +88,7 @@
tutti.action.reloadTutti=
tutti.action.removeCaracteristic=
tutti.action.removeSpeciesBatch=
+tutti.action.removeSpeciesProtocol=
tutti.action.removeSpeciesSubBatch=
tutti.action.renameSpeciesBatch=
tutti.action.reset.editFishingOperation=
@@ -145,12 +146,17 @@
tutti.dialog.createMelag.error.title=
tutti.dialog.createMelag.message=
tutti.dialog.createMelag.title=
+tutti.dialog.deleteAttachment.message=
+tutti.dialog.deleteAttachment.title=
tutti.dialog.saveAttachment.button=
tutti.dialog.saveAttachment.fail.message=
tutti.dialog.saveAttachment.fail.title=
tutti.dialog.saveAttachment.success.message=
tutti.dialog.saveAttachment.success.title=
tutti.dialog.saveAttachment.title=
+tutti.dialog.saveAttachment.warning.help=
+tutti.dialog.saveAttachment.warning.message=
+tutti.dialog.saveAttachment.warning.title=
tutti.dialog.warnUser.title=
tutti.duration.format=
tutti.error.errorpane.htmlmessage=
@@ -630,6 +636,7 @@
tuttihelp.editProtocol.action.exportProtocolSpecies.tip=
tuttihelp.editProtocol.action.importProtocolCaracteristic.tip=
tuttihelp.editProtocol.action.importProtocolSpecies.tip=
+tuttihelp.editProtocol.action.removeSpeciesProtocol.tip=
tuttihelp.editProtocol.action.saveProtocol.tip=
tuttihelp.editProtocol.action.selectOtherSpecies.tip=
tuttihelp.editProtocol.field..tip=
Property changes on: trunk/tutti-ui-swing/src/main/resources/icons/action-open-file.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
1
0
r611 - trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol
by tchemit@users.forge.codelutin.com 14 Mar '13
by tchemit@users.forge.codelutin.com 14 Mar '13
14 Mar '13
Author: tchemit
Date: 2013-03-14 07:45:16 +0100 (Thu, 14 Mar 2013)
New Revision: 611
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/611
Log:
fix remove speies action in protocol screen
Modified:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUI.jaxx
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUI.jaxx 2013-03-13 19:39:30 UTC (rev 610)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUI.jaxx 2013-03-14 06:45:16 UTC (rev 611)
@@ -78,7 +78,7 @@
</BeanValidator>
<JPopupMenu id='tablePopup'>
- <JMenuItem id='removeSpeciesProtocol'/>
+ <JMenuItem id='removeSpeciesProtocolButton'/>
</JPopupMenu>
<JTabbedPane constraints='BorderLayout.CENTER'>
1
0
13 Mar '13
Author: tchemit
Date: 2013-03-13 20:39:30 +0100 (Wed, 13 Mar 2013)
New Revision: 610
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/610
Log:
fixes #2025: [CAPTURE] - Tableau Esp?\195?\168ce - Probl?\195?\168me lorsqu'on masque une colonne
Removed:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/MyIdentifierHighlightPredicate.java
Modified:
trunk/tutti-ui-swing/pom.xml
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/AbstractTuttiBatchTableUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchTableModel.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/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/FrequencyCellComponent.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/TuttiColorHighlighter.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentCellRenderer.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentCellRenderer.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/AbstractTuttiTableModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/AbstractTuttiTableUIHandler.java
Modified: trunk/tutti-ui-swing/pom.xml
===================================================================
--- trunk/tutti-ui-swing/pom.xml 2013-03-13 15:44:23 UTC (rev 609)
+++ trunk/tutti-ui-swing/pom.xml 2013-03-13 19:39:30 UTC (rev 610)
@@ -249,11 +249,11 @@
<version>${project.version}</version>
</dependency>
- <!--dependency>
+ <dependency>
<groupId>org.nuiton</groupId>
<artifactId>nuiton-profiling</artifactId>
<version>2.7-SNAPSHOT</version>
- </dependency-->
+ </dependency>
<dependency>
<groupId>org.nuiton</groupId>
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/AbstractTuttiBatchTableUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/AbstractTuttiBatchTableUIHandler.java 2013-03-13 15:44:23 UTC (rev 609)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/AbstractTuttiBatchTableUIHandler.java 2013-03-13 19:39:30 UTC (rev 610)
@@ -30,8 +30,6 @@
import fr.ifremer.tutti.ui.swing.util.table.AbstractTuttiTableModel;
import fr.ifremer.tutti.ui.swing.util.table.AbstractTuttiTableUIHandler;
import jaxx.runtime.SwingUtil;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.jdesktop.swingx.JXTable;
import org.jdesktop.swingx.sort.TableSortController;
@@ -48,10 +46,6 @@
*/
public abstract class AbstractTuttiBatchTableUIHandler<R extends AbstractTuttiBeanUIModel, M extends AbstractTuttiBatchUIModel<R, M>, UI extends TuttiUI<M, ?>> extends AbstractTuttiTableUIHandler<R, M, UI> {
- /** Logger. */
- private static final Log log =
- LogFactory.getLog(AbstractTuttiBatchTableUIHandler.class);
-
public abstract void selectFishingOperation(FishingOperation bean);
protected AbstractTuttiBatchTableUIHandler(TuttiUI<?, ?> parentUi,
@@ -110,28 +104,6 @@
installTableKeyListener(columnModel, table);
-// JTableFilter tableFilter = new JTableFilter(table);
-// TableRowFilterSupport.forFilter(tableFilter).searchable(true).useTableRenderers(true).actions(true).apply();
-//
-// tableFilter.addChangeListener(new IFilterChangeListener() {
-// @Override
-// public void filterChanged(ITableFilter<?> filter) {
-// if (log.isInfoEnabled()) {
-// log.info("Filter changed " + filter);
-// }
-// TableModel model = filter.getTable().getModel();
-// int columnCount = model.getColumnCount();
-// for (int i = 0; i < columnCount; i++) {
-// if (filter.isFiltered(i)) {
-// Collection<DistinctColumnItem> filterState = filter.getFilterState(i);
-// if (log.isInfoEnabled()) {
-// log.info("Column " + i + " is filtered: " + filterState);
-// }
-// }
-// }
-// }
-// });
-
TableSortController<TableModel> sorter = new TableSortController<TableModel>(tableModel);
sorter.setSortable(false);
table.setRowSorter(sorter);
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchTableModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchTableModel.java 2013-03-13 15:44:23 UTC (rev 609)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchTableModel.java 2013-03-13 19:39:30 UTC (rev 610)
@@ -93,23 +93,4 @@
return result;
}
- @Override
- public void setValueAt(Object aValue,
- int rowIndex,
- int columnIndex,
- ColumnIdentifier<BenthosBatchRowModel> propertyName,
- BenthosBatchRowModel entry) {
- super.setValueAt(aValue, rowIndex, columnIndex, propertyName, entry);
-
- if (propertyName == SPECIES_BY_CODE) {
-
- // update also other columns
- fireTableCellUpdated(rowIndex, SPECIES_BY_GENUS_CODE);
-
- } else if (propertyName == SPECIES_BY_GENUS_CODE) {
-
- // update also other columns
- fireTableCellUpdated(rowIndex, SPECIES_BY_CODE);
- }
- }
}
\ No newline at end of file
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-03-13 15:44:23 UTC (rev 609)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java 2013-03-13 19:39:30 UTC (rev 610)
@@ -645,9 +645,44 @@
table.setModel(tableModel);
table.setColumnModel(columnModel);
+ initBatchTable(table, columnModel, tableModel);
+
+ getModel().addPropertyChangeListener(SpeciesBatchUIModel.PROPERTY_TABLE_VIEW_MODE, new PropertyChangeListener() {
+ @Override
+ public void propertyChange(PropertyChangeEvent evt) {
+ TableViewMode tableViewMode = (TableViewMode) evt.getNewValue();
+
+ if (tableViewMode == null) {
+ tableViewMode = TableViewMode.ALL;
+ }
+
+ if (log.isDebugEnabled()) {
+ log.debug("Will use rowfilter for viewMode: " + tableViewMode);
+ }
+ RowFilter<SpeciesBatchTableModel, Integer> filter = tableFilters.get(tableViewMode);
+ getTable().setRowFilter(filter);
+ }
+ });
+
+ }
+
+ @Override
+ public void onCloseUI() {
+ if (log.isDebugEnabled()) {
+ log.debug("Closing: " + ui);
+ }
+ ui.getSpeciesBatchAttachmentsButton().onCloseUI();
+ }
+
+ @Override
+ protected void addHighlighters(JXTable table) {
+
+ super.addHighlighters(table);
+
Color toConfirmColor = getConfig().getColorRowToConfirm();
+
// paint the cell in orange if the row is to confirm
- Highlighter attachmentHighlighter = TuttiUIUtil.newBackgroundColorHighlighter(
+ Highlighter confirmHighlighter = TuttiUIUtil.newBackgroundColorHighlighter(
new HighlightPredicate() {
public boolean isHighlighted(Component renderer, ComponentAdapter adapter) {
@@ -656,10 +691,8 @@
}
}, toConfirmColor);
- table.addHighlighter(attachmentHighlighter);
+ table.addHighlighter(confirmHighlighter);
- initBatchTable(table, columnModel, tableModel);
-
// highlight only the species column if the row is selected
Highlighter selectedHighlighter = TuttiUIUtil.newBackgroundColorHighlighter(
new HighlightPredicate.AndHighlightPredicate(
@@ -670,7 +703,7 @@
table.addHighlighter(selectedHighlighter);
// paint the cell in dark orange if the row is to confirm and the cell is not editable
- attachmentHighlighter = TuttiUIUtil.newBackgroundColorHighlighter(
+ Highlighter confirmNotEditableHighlighter = TuttiUIUtil.newBackgroundColorHighlighter(
new HighlightPredicate() {
public boolean isHighlighted(Component renderer, ComponentAdapter adapter) {
@@ -679,35 +712,10 @@
}
}, toConfirmColor.darker());
- table.addHighlighter(attachmentHighlighter);
+ table.addHighlighter(confirmNotEditableHighlighter);
- getModel().addPropertyChangeListener(SpeciesBatchUIModel.PROPERTY_TABLE_VIEW_MODE, new PropertyChangeListener() {
- @Override
- public void propertyChange(PropertyChangeEvent evt) {
- TableViewMode tableViewMode = (TableViewMode) evt.getNewValue();
-
- if (tableViewMode == null) {
- tableViewMode = TableViewMode.ALL;
- }
-
- if (log.isDebugEnabled()) {
- log.debug("Will use rowfilter for viewMode: " + tableViewMode);
- }
- RowFilter<SpeciesBatchTableModel, Integer> filter = tableFilters.get(tableViewMode);
- getTable().setRowFilter(filter);
- }
- });
-
}
- @Override
- public void onCloseUI() {
- if (log.isDebugEnabled()) {
- log.debug("Closing: " + ui);
- }
- ui.getSpeciesBatchAttachmentsButton().onCloseUI();
- }
-
//------------------------------------------------------------------------//
//-- Public methods --//
//------------------------------------------------------------------------//
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/FrequencyCellComponent.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/FrequencyCellComponent.java 2013-03-13 15:44:23 UTC (rev 609)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/FrequencyCellComponent.java 2013-03-13 19:39:30 UTC (rev 610)
@@ -222,9 +222,9 @@
int column) {
tableModel = (SpeciesBatchTableModel) table.getModel();
this.table = table;
- columnIdentifier = tableModel.getPropertyName(column);
- if (log.isInfoEnabled()) {
- log.info("Set columnIdentifier (" + column + ") :: " + columnIdentifier.getPropertyName());
+ columnIdentifier = SpeciesBatchTableModel.COMPUTED_NUMBER;
+ if (log.isDebugEnabled()) {
+ log.debug("Set columnIdentifier (" + column + ") :: " + columnIdentifier.getPropertyName());
}
TuttiComputedOrNotData<Integer> data = (TuttiComputedOrNotData<Integer>) value;
component.setComputedOrNotText(data);
@@ -246,8 +246,8 @@
if (columnIdentifier == SpeciesBatchTableModel.COMPUTED_NUMBER) {
result = editRow.getComputedOrNotNumber();
}
- if (log.isInfoEnabled()) {
- log.info("editor value (" + columnIdentifier + "): " + result);
+ if (log.isDebugEnabled()) {
+ log.debug("editor value (" + columnIdentifier + "): " + result);
}
return result;
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/TuttiColorHighlighter.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/TuttiColorHighlighter.java 2013-03-13 15:44:23 UTC (rev 609)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/TuttiColorHighlighter.java 2013-03-13 19:39:30 UTC (rev 610)
@@ -29,7 +29,6 @@
import org.jdesktop.swingx.decorator.HighlightPredicate;
import org.jdesktop.swingx.util.PaintUtils;
-import javax.swing.JButton;
import java.awt.Color;
import java.awt.Component;
@@ -51,20 +50,17 @@
@Override
protected Component doHighlight(Component component, ComponentAdapter adapter) {
- if (component instanceof JButton) {
- // do nothing
- } else {
- if (foreground) {
- component.setForeground(color);
+ if (foreground) {
+ component.setForeground(color);
- } else {
- component.setBackground(color);
- if (adapter.isSelected()) {
- component.setForeground(PaintUtils.computeForeground(color));
- }
+ } else {
+ component.setBackground(color);
+ if (adapter.isSelected()) {
+ component.setForeground(PaintUtils.computeForeground(color));
}
}
+
return component;
}
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentCellRenderer.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentCellRenderer.java 2013-03-13 15:44:23 UTC (rev 609)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentCellRenderer.java 2013-03-13 19:39:30 UTC (rev 610)
@@ -103,6 +103,7 @@
setEnabled(editable);
setText(textValue);
setToolTipText(toolTipTextValue);
+ setBackground(null);
return this;
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentCellRenderer.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentCellRenderer.java 2013-03-13 15:44:23 UTC (rev 609)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentCellRenderer.java 2013-03-13 19:39:30 UTC (rev 610)
@@ -91,6 +91,7 @@
toolTipTextValue = String.format(TEXT_PATTERN, toolTipTextValue);
setEnabled(editable);
setToolTipText(toolTipTextValue);
+ setBackground(null);
return this;
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/AbstractTuttiTableModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/AbstractTuttiTableModel.java 2013-03-13 15:44:23 UTC (rev 609)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/AbstractTuttiTableModel.java 2013-03-13 19:39:30 UTC (rev 610)
@@ -25,20 +25,15 @@
*/
import com.google.common.base.Preconditions;
+import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import jaxx.runtime.SwingUtil;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jdesktop.swingx.event.TableColumnModelExtListener;
-import org.jdesktop.swingx.table.TableColumnExt;
import org.jdesktop.swingx.table.TableColumnModelExt;
-import javax.swing.event.ChangeEvent;
-import javax.swing.event.ListSelectionEvent;
-import javax.swing.event.TableColumnModelEvent;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.TableColumn;
-import java.beans.PropertyChangeEvent;
import java.io.Serializable;
import java.util.List;
import java.util.Set;
@@ -57,13 +52,6 @@
LogFactory.getLog(AbstractTuttiTableModel.class);
/**
- * Column model.
- *
- * @since 1.0.2
- */
- protected final TableColumnModelExt columnModel;
-
- /**
* Data in the model.
*
* @since 0.2
@@ -91,49 +79,24 @@
*/
protected final boolean createEmptyRowIsEmpty;
+ /**
+ * Identifiers of columns (in initial order).
+ *
+ * @since 1.1
+ */
+ protected final List<ColumnIdentifier<R>> identifiers;
+
public abstract R createNewRow();
protected AbstractTuttiTableModel(TableColumnModelExt columnModel,
boolean createNewRow,
boolean createEmptyRowIsEmpty) {
- this.columnModel = columnModel;
+ this.identifiers = Lists.newArrayListWithCapacity(columnModel.getColumnCount());
+ for (TableColumn tc : columnModel.getColumns(true)) {
+ this.identifiers.add((ColumnIdentifier<R>) tc.getIdentifier());
+ }
this.createNewRow = createNewRow;
this.createEmptyRowIsEmpty = createEmptyRowIsEmpty;
- columnModel.addColumnModelListener(new TableColumnModelExtListener() {
- @Override
- public void columnPropertyChange(PropertyChangeEvent event) {
- TableColumnExt column = (TableColumnExt) event.getSource();
- if (log.isInfoEnabled()) {
- log.info("Property [" + event.getPropertyName() + "] changed on coloumn [" + column.getTitle() + "] :: " + event.getNewValue());
- }
- }
-
- @Override
- public void columnAdded(TableColumnModelEvent e) {
- if (log.isInfoEnabled()) {
- log.info("Column added [" + e.getFromIndex() + "] :: " + e.getToIndex());
- }
- }
-
- @Override
- public void columnRemoved(TableColumnModelEvent e) {
- if (log.isInfoEnabled()) {
- log.info("Column removed [" + e.getFromIndex() + "] :: " + e.getToIndex());
- }
- }
-
- @Override
- public void columnMoved(TableColumnModelEvent e) {
- }
-
- @Override
- public void columnMarginChanged(ChangeEvent e) {
- }
-
- @Override
- public void columnSelectionChanged(ListSelectionEvent e) {
- }
- });
}
public final List<R> getRows() {
@@ -224,11 +187,6 @@
// by default do nothing
}
- public final ColumnIdentifier<R> getPropertyName(int columnIndex) {
- TableColumn column = getColumn(columnIndex);
- return (ColumnIdentifier<R>) column.getIdentifier();
- }
-
public final int getRowIndex(R row) {
int result = rows == null ? -1 : rows.indexOf(row);
return result;
@@ -252,18 +210,17 @@
@Override
public final int getColumnCount() {
-// return columns.length;
- return columnModel.getColumnCount();
+ return identifiers.size();
}
@Override
public final Object getValueAt(int rowIndex, int columnIndex) {
R entry = getEntry(rowIndex);
- ColumnIdentifier<R> propertyName = getPropertyName(columnIndex);
+ ColumnIdentifier<R> identifier = getIdentifier(columnIndex);
if (log.isInfoEnabled()) {
- log.info("columnIndex: " + columnIndex + " :: " + propertyName.getPropertyName());
+ log.info("columnIndex: " + columnIndex + " :: " + identifier.getPropertyName());
}
- Object result = getValueAt(rowIndex, columnIndex, propertyName, entry);
+ Object result = identifier.getValue(entry);
return result;
}
@@ -273,25 +230,17 @@
log.debug("setValueAt " + aValue);
}
R entry = getEntry(rowIndex);
- ColumnIdentifier<R> propertyName = getPropertyName(columnIndex);
- setValueAt(aValue, rowIndex, columnIndex, propertyName, entry);
+ ColumnIdentifier<R> identifier = getIdentifier(columnIndex);
+ setValueAt(aValue, rowIndex, columnIndex, identifier, entry);
}
@Override
public final boolean isCellEditable(int rowIndex, int columnIndex) {
- ColumnIdentifier<R> identifier = getPropertyName(columnIndex);
+ ColumnIdentifier<R> identifier = getIdentifier(columnIndex);
boolean result = isCellEditable(rowIndex, columnIndex, identifier);
return result;
}
- protected Object getValueAt(int rowIndex,
- int columnIndex,
- ColumnIdentifier<R> propertyName,
- R entry) {
- Object result = propertyName.getValue(entry);
- return result;
- }
-
protected void setValueAt(Object aValue,
int rowIndex,
int columnIndex,
@@ -311,21 +260,15 @@
}
protected final void fireTableCellUpdated(int rowIndex,
- ColumnIdentifier... identifiers) {
- for (ColumnIdentifier<?> identifier : identifiers) {
- int columnIndex = getColumnIndex(identifier);
+ ColumnIdentifier<R>... identifiers) {
+ for (ColumnIdentifier<R> identifier : identifiers) {
+ int columnIndex = this.identifiers.indexOf(identifier);
fireTableCellUpdated(rowIndex, columnIndex);
}
}
- protected final TableColumn getColumn(int columnIndex) {
-// SwingUtil.ensureColumnIndex(this, columnIndex);
-// return columns[columnIndex];
- return columnModel.getColumns(true).get(columnIndex);
+ protected ColumnIdentifier<R> getIdentifier(int columnIndex) {
+ ColumnIdentifier<R> identifier = identifiers.get(columnIndex);
+ return identifier;
}
-
- protected final int getColumnIndex(ColumnIdentifier<?> property) {
- int result = columnModel.getColumnIndex(property);
- return result;
- }
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/AbstractTuttiTableUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/AbstractTuttiTableUIHandler.java 2013-03-13 15:44:23 UTC (rev 609)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/AbstractTuttiTableUIHandler.java 2013-03-13 19:39:30 UTC (rev 610)
@@ -293,6 +293,27 @@
// by default do not authorize to change column orders
table.getTableHeader().setReorderingAllowed(false);
+ addHighlighters(table);
+
+ // when model data change let's propagate it table model
+ getModel().addPropertyChangeListener(AbstractTuttiTableUIModel.PROPERTY_ROWS, new PropertyChangeListener() {
+ @Override
+ public void propertyChange(PropertyChangeEvent evt) {
+ onModelRowsChanged((List<R>) evt.getNewValue());
+ }
+ });
+
+ // always scroll to selected row
+ SwingUtil.scrollToTableSelection(getTable());
+
+ // always force to uninstall listener
+ uninstallTableSaveOnRowChangedSelectionListener();
+
+ // save when row chaged and was modified
+ installTableSaveOnRowChangedSelectionListener();
+ }
+
+ protected void addHighlighters(JXTable table){
// paint in a special color for read only cells
Highlighter readOnlyHighlighter = TuttiUIUtil.newBackgroundColorHighlighter(
HighlightPredicate.READ_ONLY, getConfig().getColorRowReadOnly());
@@ -300,9 +321,10 @@
// paint in a special color for comment cell (with not null value)
Color cellWithValueColor = getConfig().getColorCellWithValue();
+
Highlighter commentHighlighter = TuttiUIUtil.newBackgroundColorHighlighter(
new HighlightPredicate.AndHighlightPredicate(
- new MyIdentifierHighlightPredicate(SpeciesBatchTableModel.COMMENT),
+ new HighlightPredicate.IdentifierHighlightPredicate(SpeciesBatchTableModel.COMMENT),
// for not null value
new HighlightPredicate() {
@Override
@@ -314,9 +336,10 @@
table.addHighlighter(commentHighlighter);
// paint in a special color for attachment cell (when some attachments)
+
Highlighter attachmentHighlighter = TuttiUIUtil.newBackgroundColorHighlighter(
new HighlightPredicate.AndHighlightPredicate(
- new MyIdentifierHighlightPredicate(SpeciesBatchTableModel.ATTACHMENT),
+ new HighlightPredicate.IdentifierHighlightPredicate(SpeciesBatchTableModel.ATTACHMENT),
// for not null value
new HighlightPredicate() {
@Override
@@ -343,23 +366,6 @@
}
}), getConfig().getColorRowInvalid());
table.addHighlighter(validHighlighter);
-
- // when model data change let's propagate it table model
- getModel().addPropertyChangeListener(AbstractTuttiTableUIModel.PROPERTY_ROWS, new PropertyChangeListener() {
- @Override
- public void propertyChange(PropertyChangeEvent evt) {
- onModelRowsChanged((List<R>) evt.getNewValue());
- }
- });
-
- // always scroll to selected row
- SwingUtil.scrollToTableSelection(getTable());
-
- // always force to uninstall listener
- uninstallTableSaveOnRowChangedSelectionListener();
-
- // save when row chaged and was modified
- installTableSaveOnRowChangedSelectionListener();
}
protected void addColumnToModel(TableColumnModel model,
Deleted: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/MyIdentifierHighlightPredicate.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/MyIdentifierHighlightPredicate.java 2013-03-13 15:44:23 UTC (rev 609)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/MyIdentifierHighlightPredicate.java 2013-03-13 19:39:30 UTC (rev 610)
@@ -1,77 +0,0 @@
-package fr.ifremer.tutti.ui.swing.util.table;
-
-/*
- * #%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 org.jdesktop.swingx.decorator.ComponentAdapter;
-import org.jdesktop.swingx.decorator.HighlightPredicate;
-
-import java.awt.Component;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * While using the swingX HighlightPredicate.IdentifierHighlightPredicate, it does not works very well with
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 1.0.2
- */
-public class MyIdentifierHighlightPredicate implements HighlightPredicate {
- protected List<Object> columnList;
-
- /**
- * Instantiates a predicate which returns true for the
- * given column identifiers.
- *
- * @param columns the identitiers of the columns to highlight.
- */
- public MyIdentifierHighlightPredicate(Object... columns) {
- columnList = new ArrayList<Object>();
- Collections.addAll(columnList, columns);
- }
-
- /**
- * {@inheritDoc}
- * <p/>
- * This implementation returns true if the adapter's column
- * is contained in this predicates list.
- */
- @Override
- public boolean isHighlighted(Component renderer, ComponentAdapter adapter) {
-// int modelIndex = adapter.convertColumnIndexToModel(adapter.column);
- Object identifier = adapter.getColumnIdentifierAt(adapter.column);
- return identifier != null && columnList.contains(identifier);
- }
-
- /** @return the identifiers */
- public Object[] getIdentifiers() {
- if (columnList.isEmpty()) {
- return EMPTY_OBJECT_ARRAY;
- } else {
- return columnList.toArray(new Object[0]);
- }
- }
-
-}
\ No newline at end of file
1
0
r609 - in trunk/tutti-ui-swing/src/main: java/fr/ifremer/tutti/ui/swing/util/attachment resources/i18n resources/icons
by kmorin@users.forge.codelutin.com 13 Mar '13
by kmorin@users.forge.codelutin.com 13 Mar '13
13 Mar '13
Author: kmorin
Date: 2013-03-13 16:44:23 +0100 (Wed, 13 Mar 2013)
New Revision: 609
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/609
Log:
fixes #2130 [ERGO] Pi?\195?\168ces-jointes - avoir 3 boutons pour supprimer, voir ou sauver la pi?\195?\168ce jointe
Added:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentItem.css
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentItem.jaxx
trunk/tutti-ui-swing/src/main/resources/icons/action-open-file.png
Modified:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentEditorUI.jaxx
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentEditorUIHandler.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/util/attachment/AttachmentEditorUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentEditorUI.jaxx 2013-03-13 15:09:25 UTC (rev 608)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentEditorUI.jaxx 2013-03-13 15:44:23 UTC (rev 609)
@@ -70,7 +70,7 @@
<row fill='both'>
<cell fill='both' weightx='1' columns='3'>
- <VBox id='attachments'></VBox>
+ <JPanel id='attachments' layout='{new GridLayout(0, 1)}'></JPanel>
</cell>
</row>
<row fill='both'>
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentEditorUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentEditorUIHandler.java 2013-03-13 15:09:25 UTC (rev 608)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentEditorUIHandler.java 2013-03-13 15:44:23 UTC (rev 609)
@@ -27,6 +27,9 @@
import fr.ifremer.tutti.persistence.entities.data.Attachment;
import fr.ifremer.tutti.service.PersistenceService;
import fr.ifremer.tutti.ui.swing.TuttiUIContext;
+import fr.ifremer.tutti.ui.swing.util.AbstractTuttiUIHandler;
+import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil;
+import java.awt.BorderLayout;
import jaxx.runtime.SwingUtil;
import jaxx.runtime.swing.ComponentMover;
import jaxx.runtime.swing.ComponentResizer;
@@ -53,7 +56,13 @@
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.File;
+import java.io.IOException;
import java.util.List;
+import javax.swing.JFileChooser;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.UIManager;
+import org.apache.commons.io.FileUtils;
import static org.nuiton.i18n.I18n._;
@@ -229,59 +238,101 @@
}
protected void addAttachment(final Attachment attachment) {
- final HBox hbox = new HBox();
- hbox.setVerticalAlignment(SwingConstants.CENTER);
+ AttachmentItem item = new AttachmentItem();
+ item.setAttachment(attachment);
+ item.setHandler(this);
+ ui.getAttachments().add(item);
+ }
- JButton deleteButton = new JButton(SwingUtil.createActionIcon("delete"));
- deleteButton.addActionListener(new ActionListener() {
+ protected void resetFields() {
+ ui.getFile().setSelectedFile((File) null);
+ ui.getFile().setSelectedFile((String) null);
+ ui.getFileName().setText("");
+ ui.getFileComment().setText("");
+ }
- @Override
- public void actionPerformed(ActionEvent e) {
- AttachmentModelAware bean = ui.getBean();
+ public void openAttachment(Attachment attachment) {
+ File file = persistenceService.getAttachmentFile(attachment.getId());
+ SwingUtil.openLink("file://" + file.getAbsolutePath());
+ }
- persistenceService.deleteAttachment(attachment.getId());
+ public void saveAttachment(Attachment attachment) {
+ boolean hackDialog = ui.isAlwaysOnTop();
+ if (hackDialog) {
+ ui.setAlwaysOnTop(false);
+ }
+ try {
+ File attachmentFile = persistenceService.getAttachmentFile(attachment.getId());
+ File file = TuttiUIUtil.chooseFile(ui,
+ _("tutti.dialog.saveAttachment.title"),
+ _("tutti.dialog.saveAttachment.button"));
+
+ if (file != null) {
+ if (file.exists()) {
+ String htmlMessage = String.format(
+ AbstractTuttiUIHandler.CONFIRMATION_FORMAT,
+ _("tutti.dialog.saveAttachment.warning.message"),
+ _("tutti.dialog.saveAttachment.warning.help"));
- bean.removeAttachment(attachment);
+ int answer = JOptionPane.showConfirmDialog(ui,
+ htmlMessage,
+ _("tutti.dialog.saveAttachment.warning.title"),
+ JOptionPane.YES_NO_OPTION,
+ JOptionPane.WARNING_MESSAGE);
- ui.getAttachments().remove(hbox);
-
- ui.pack();
+ if (answer == JOptionPane.NO_OPTION) {
+ return;
+ }
+ }
+ FileUtils.copyFile(attachmentFile, file);
+ TuttiUIUtil.showSuccessMessage(ui,
+ _("tutti.dialog.saveAttachment.success.title"),
+ _("tutti.dialog.saveAttachment.success.message", file.getName()));
}
- });
- hbox.add(deleteButton);
-
- final JLabel label = new JLabel("<html><body><a href=''>"
- + attachment.getName() + "</a></body></html>");
- label.setToolTipText(attachment.getComment());
- label.addMouseListener(new MouseAdapter() {
-
- @Override
- public void mouseClicked(MouseEvent e) {
- File file = persistenceService.getAttachmentFile(attachment.getId());
- SwingUtil.openLink("file://" + file.getAbsolutePath());
+ if (hackDialog) {
+ ui.setAlwaysOnTop(true);
}
-
- @Override
- public void mouseEntered(MouseEvent e) {
- label.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
+
+ } catch(IOException e) {
+ if (log.isErrorEnabled()) {
+ log.error("Error while saving attachment", e);
}
+ JOptionPane.showMessageDialog(
+ ui,
+ _("tutti.dialog.saveAttachment.fail.message"),
+ _("tutti.dialog.saveAttachment.fail.title"),
+ JOptionPane.ERROR_MESSAGE
+ );
- @Override
- public void mouseExited(MouseEvent e) {
- label.setCursor(Cursor.getDefaultCursor());
+ } finally {
+ if (hackDialog) {
+ ui.setAlwaysOnTop(true);
}
+ }
+ }
- });
- hbox.add(label);
+ public void removeAttachment(AttachmentItem attachmentItem) {
+ Attachment attachment = attachmentItem.getAttachment();
+ boolean hackDialog = ui.isAlwaysOnTop();
+ if (hackDialog) {
+ ui.setAlwaysOnTop(false);
+ }
+ int answer = JOptionPane.showConfirmDialog(ui,
+ _("tutti.dialog.deleteAttachment.message", attachment.getName()),
+ _("tutti.dialog.deleteAttachment.title"),
+ JOptionPane.YES_NO_OPTION);
+ if (hackDialog) {
+ ui.setAlwaysOnTop(true);
+ }
+
+ if (answer == JOptionPane.YES_OPTION) {
+ AttachmentModelAware bean = ui.getBean();
- ui.getAttachments().add(hbox);
- }
+ persistenceService.deleteAttachment(attachment.getId());
+ bean.removeAttachment(attachment);
+ ui.getAttachments().remove(attachmentItem);
- protected void resetFields() {
- ui.getFile().setSelectedFile((File) null);
- ui.getFile().setSelectedFile((String) null);
- ui.getFileName().setText("");
- ui.getFileComment().setText("");
+ ui.pack();
+ }
}
-
}
Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentItem.css
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentItem.css (rev 0)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentItem.css 2013-03-13 15:44:23 UTC (rev 609)
@@ -0,0 +1,28 @@
+#attachmentPanel {
+ toolTipText: {attachment != null ? getAttachment().getComment() : null};
+}
+
+#attachmentNameLabel {
+ text: {attachment != null ? getAttachment().getName() : null};
+ toolTipText: {attachment != null ? getAttachment().getComment() : null};
+}
+
+#toolbar {
+ borderPainted: false;
+ floatable: false;
+}
+
+#openAttachmentButton {
+ actionIcon: "open-file";
+ toolTipText: "tutti.tooltip.attachment.button.open";
+}
+
+#saveAttachmentButton {
+ actionIcon: "import";
+ toolTipText: "tutti.tooltip.attachment.button.save";
+}
+
+#removeAttachmentButton {
+ actionIcon: "delete";
+ toolTipText: "tutti.tooltip.attachment.button.remove";
+}
\ No newline at end of file
Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentItem.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentItem.jaxx (rev 0)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/attachment/AttachmentItem.jaxx 2013-03-13 15:44:23 UTC (rev 609)
@@ -0,0 +1,32 @@
+<JPanel id='attachmentPanel' layout='{new BorderLayout()}'>
+
+ <import>
+ fr.ifremer.tutti.persistence.entities.data.Attachment
+ static org.nuiton.i18n.I18n._
+ static jaxx.runtime.JAXXUtil.getStringValue
+ </import>
+
+ <Attachment id='attachment' javaBean='null'/>
+
+ <AttachmentEditorUIHandler id='handler' javaBean='null'/>
+
+ <script><![CDATA[
+public AttachmentItem(Attachment attachment, AttachmentEditorUIHandler handler) {
+ this.attachment = attachment;
+ this.handler = handler;
+}
+
+ ]]></script>
+
+ <JLabel id='attachmentNameLabel' constraints='BorderLayout.CENTER'/>
+
+ <JToolBar id='toolbar' constraints='BorderLayout.EAST'>
+ <JButton id='openAttachmentButton'
+ onActionPerformed='handler.openAttachment(attachment)'/>
+ <JButton id='saveAttachmentButton'
+ onActionPerformed='handler.saveAttachment(attachment)'/>
+ <JButton id='removeAttachmentButton'
+ onActionPerformed='handler.removeAttachment(this)'/>
+ </JToolBar>
+
+</JPanel>
\ No newline at end of file
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-03-13 15:09:25 UTC (rev 608)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2013-03-13 15:44:23 UTC (rev 609)
@@ -145,6 +145,12 @@
tutti.dialog.createMelag.error.title=
tutti.dialog.createMelag.message=
tutti.dialog.createMelag.title=
+tutti.dialog.saveAttachment.button=
+tutti.dialog.saveAttachment.fail.message=
+tutti.dialog.saveAttachment.fail.title=
+tutti.dialog.saveAttachment.success.message=
+tutti.dialog.saveAttachment.success.title=
+tutti.dialog.saveAttachment.title=
tutti.dialog.warnUser.title=
tutti.duration.format=
tutti.error.errorpane.htmlmessage=
@@ -467,6 +473,9 @@
tutti.title.splitBatch=
tutti.title.validate.operations=
tutti.to.be.done=
+tutti.tooltip.attachment.button.open=
+tutti.tooltip.attachment.button.remove=
+tutti.tooltip.attachment.button.save=
tutti.tooltip.attachment.none=
tutti.tooltip.comment.none=
tutti.tooltip.distanceInMilles=
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-03-13 15:09:25 UTC (rev 608)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-03-13 15:44:23 UTC (rev 609)
@@ -152,6 +152,17 @@
tutti.dialog.createMelag.error.title=Erreur
tutti.dialog.createMelag.message=Combien pesait le MELAG (kg) ?
tutti.dialog.createMelag.title=Poids du MELAG (kg)
+tutti.dialog.deleteAttachment.message=Êtes-vous sûr de vouloir supprimer la pièce-jointe %s ?
+tutti.dialog.deleteAttachment.title=Suppression de pièce-jointe
+tutti.dialog.saveAttachment.button=Choisir
+tutti.dialog.saveAttachment.fail.message=Une erreur est survenue lors de la sauvegarde du fichier.
+tutti.dialog.saveAttachment.fail.title=Erreur de sauvegarde.
+tutti.dialog.saveAttachment.success.message=Le fichier %s a été sauvegardé sur votre machine.
+tutti.dialog.saveAttachment.success.title=Sauvegarde réussie.
+tutti.dialog.saveAttachment.title=Choisir un fichier
+tutti.dialog.saveAttachment.warning.help=Que voulez-vous faire ?<ul><li><strong>Non</strong> pour annuler la sauvegarde</li><li><strong>Oui</strong> pour écraser le fichier existant</li></ul>
+tutti.dialog.saveAttachment.warning.message=Vous êtes sur le point d'écraser un fichier existant.
+tutti.dialog.saveAttachment.warning.title=Fichier existant
tutti.dialog.warnUser.title=Avertissement\!
tutti.duration.format=dj Hh m'm'
tutti.error.errorpane.htmlmessage=<html><body><b>Une erreur s'est produite</b>\:<br/>%s</body></html>
@@ -487,6 +498,9 @@
tutti.title.splitBatch=Catégorisation du lot
tutti.title.validate.operations=Validation des opérations de pêches (%s)
tutti.to.be.done=< A FAIRE >
+tutti.tooltip.attachment.button.open=Ouvrir la pièce jointe
+tutti.tooltip.attachment.button.remove=Supprimer la pièce jointe
+tutti.tooltip.attachment.button.save=Enregistrer la pièce jointe en local
tutti.tooltip.attachment.none=Pas de pièce-jointes
tutti.tooltip.comment.none=Pas de commentaire
tutti.tooltip.distanceInMilles=%s milles marins
Added: trunk/tutti-ui-swing/src/main/resources/icons/action-open-file.png
===================================================================
(Binary files differ)
Property changes on: trunk/tutti-ui-swing/src/main/resources/icons/action-open-file.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
1
0
Author: blavenier
Date: 2013-03-13 16:09:25 +0100 (Wed, 13 Mar 2013)
New Revision: 608
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/608
Log:
Add :
- add one page on website, for documentation on the mapping UI/DB
Added:
trunk/src/site/rst/mapping.rst
Modified:
trunk/src/site/site_fr.xml
Added: trunk/src/site/rst/mapping.rst
===================================================================
--- trunk/src/site/rst/mapping.rst (rev 0)
+++ trunk/src/site/rst/mapping.rst 2013-03-13 15:09:25 UTC (rev 608)
@@ -0,0 +1,307 @@
+.. -
+.. * #%L
+.. * Tutti :: Persistence Adagio (impl)
+.. * $Id: referential.rst 301 2013-02-02 14:24:01Z tchemit $
+.. * $HeadURL: http://svn.forge.codelutin.com/svn/tutti/trunk/src/site/rst/referential.rst $
+.. * %%
+.. * 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%
+.. -
+
+=============================================
+Tutti - Correspondance écrans/base de données
+=============================================
+
+Présentation
+~~~~~~~~~~~~
+
+Ce document décrit comment sont stocker les informations visibles dans les écrans.
+
+Série de campagne
+~~~~~~~~~~~~~~~~~
+
+Nom
+ Program.name (PROGRAM.NAME)
+
+Zone
+ Program.locations (PROGRAM2LOCATION.LOCATION_FK)
+
+Commentaire
+ Program.description (PROGRAM.DESCRIPTION)
+
+Campagne
+~~~~~~~~
+
+Série
+ ScientificCruise.program (SCIENTIFIC_CRUISE.PROGRAM_FK)
+
+Année
+ En lecture : year(ScientificCruise.departureDateTime) (SCIENTIFIC_CRUISE.DEPARTURE_DATE_TIME)
+ En écriture : pas de stockage (car doit logiquement être compatible avec ScientificCruise.departureDateTime)
+
+Série partielle
+ ScientificCruise.fishingTrip.surveyMeasurement (SURVEY_MEASUREMENT.ALPHA_NUMERICAL_VALUE, avec PMFM_FK=<PMFM_ID_SURVEY_PART>)
+
+Name
+ ScientificCruise.name (SCIENTIFIC_CRUISE.NAME)
+
+Nombre de poches
+ En lecture : récupération de la plus grande valeur dans ScientificCruise.fishingTrip.gearPhysicalFeatures.gearPhysicalMeasurement.numericalvalue (GEAR_PHYSICAL_MEASURMENT.NUMERICAL_VALUE avec PMFM_FK=<PMFM_ID_MULTIRIG_NUMBER>)
+ En écriture : valeur dupliquée pour chaque engin (voir "Engin(s)" ci-dessous) dans ScientificCruise.fishingTrip.gearPhysicalFeatures.gearPhysicalMeasurement.numericalvalue (GEAR_PHYSICAL_MEASURMENT.NUMERICAL_VALUE avec PMFM_FK=<PMFM_ID_MULTIRIG_NUMBER>)
+
+Pays
+ En lecture : le pays est calculé à partir de ScientificCruise.departureLocation (SCIENTIFIC_CRUISE.DEPARTURE_LOCATION_FK)
+ en utilisant la hiérarchie des lieux (LOCATION_HIERARCHY) our être sûr d'obtenir un payx et non un lieux de niveau inférieur (ex : un port, etc.)
+ En écriture : ScientificCruise.departureLocation (SCIENTIFIC_CRUISE.DEPARTURE_LOCATION_FK) et ScientificCruise.returnLocation (SCIENTIFIC_CRUISE.DEPARTURE_LOCATION_FK)
+
+Date de début
+ ScientificCruise.departureDateTime (SCIENTIFIC_CRUISE.DEPARTURE_DATE_TIME)
+
+Date de fin
+ ScientificCruise.returnDateTime (SCIENTIFIC_CRUISE.RETURN_DATE_TIME)
+
+Navire(s)
+ Le premier navire dans le liste est stocké dans ScientificCruise.vessel (SCIENTIFIC_CRUISE.VESSEL_FK).
+ Les navires suivants sont stockés dans ScientificCruise.fishingTrip.comments
+ derrière la balise : #VESSELS=<liste_des_IDs>
+ Il n'est pas certain qu'il soit nécessaire de stocker cette liste ailleurs, dans la mesure où
+ elle peut être calculée à partir de la liste des navires associés à chaque opération (voir "Opération > Navire" ci-dessous),
+ comme c'est le cas actuellement à l'ouverture d'une campagne de données historiques.
+
+Engin(s)
+ ScientificCruise.fishingTrip.gearPhysicalFeatures.gear (GEAR_PHYSICAL_FEATURES.GEAR_FK avec RANK_ORDER=<n° d'ordre dans la liste>)
+
+Chef(s) de mission
+ La première personne de la liste est stockée sous ScientificCruise.manager (SCIENTIFIC_CRUISE.MANAGER_PERSON_FK)
+ En v1, les identifiant des personnes suivantes sont stockées dans ScientificCruise.fishingTrip.comments
+ derrière la balise : #MANAGERS=<liste_des_IDs>
+ En v2, ce stockage devra se faire dans ScientificCruise.fishingTrip.vesselPersonFeatures avec un VesselPersonRole.id=<responsable_de_campagne>
+
+Responsable(s) de salle de tri
+ En v1, tous les identifiants des personnes sélectionnées sont stockées dans ScientificCruise.fishingTrip.comments
+ derrière la balise : #SORT_MANAGERS=<liste_des_IDs>
+ En v2, ce stockage devra se faire dans ScientificCruise.fishingTrip.vesselPersonFeatures avec un VesselPersonRole.id=<responsable_salle_de_tri>
+
+Commentaire
+ ScientificCruise.comments (SCIENTIFIC_CRUISE.COMMENTS)
+
+Trait
+~~~~~
+
+Code Station
+ Operation.vesselUseFeatures.vesselUseMeasurement (VESSEL_USE_MEASUREMENT.ALPHANUMERICAL_VALUE avec PMFM_FK=<PMFM_ID_STATION_NUMBER>)
+
+Numéro de trait
+ Operation.name (OPERATION.NAME) : ajouté à la fin du "name", derrière le code de l'engin, pour rester compatible avec le format des données historiques.
+
+Numéro de poche
+ Operation.gearUseFeatures.gearUseMeasurement (GEAR_USE_MEASUREMENT.ALPHANUMERICAL_VALUE avec PMFM_FK=<PMFM_ID_MULTIRIG_AGGREGATION>)
+
+Strate
+ Operation.gearUseFeatures.fishingArea.regulationLocation (FISHING_AREA2REG_LOCATION.LOCATION_FK associé au FISHING_AREA de l'opération)
+ En lecture : sélection en tant que locatlité à partir du locationLevel (LOCATION.LOCATION_LEVEL_FK=<LocationLevelId.STRATA>)
+
+Sous-strate
+ Operation.gearUseFeatures.fishingArea.regulationLocation (FISHING_AREA2REG_LOCATION.LOCATION_FK associé au FISHING_AREA de l'opération)
+ En lecture : sélection en tant que locatlité à partir du locationLevel (LOCATION.LOCATION_LEVEL_FK=<LocationLevelId.SUB_STRATA>)
+
+Localité
+ operation.gearUseFeatures.fishingArea.regulationLocation (FISHING_AREA2REG_LOCATION.LOCATION_FK associé au FISHING_AREA de l'opération)
+ En lecture : sélection en tant que locatlité à partir du locationLevel (LOCATION.LOCATION_LEVEL_FK=<LocationLevelId.LOCALITE>)
+
+Début de traine > Latitude, Longitude
+ Operation.vesselPosition (VESSEL_POSITION.LATITUDE et VESSEL_POSITION.LONGITUDE), avec startDateTime = "Début de traine > Date et heure"
+
+Début de traine > Date et heure
+ Operation.startDateTime et Operation.fishingStartDateTime (OPERATION.START_DATE_TIME et OPERATION.FISHING_START_DATE_TIME)
+
+Fin de traine > Latitude, Longitude
+ Operation.vesselPosition (VESSEL_POSITION.LATITUDE et VESSEL_POSITION.LONGITUDE), avec startDateTime = "Fin de traine > Date et heure"
+
+Fin de traine > Date et heure
+ Operation.endDateTime et Operation.fishingEndDateTime (OPERATION.END_DATE_TIME et OPERATION.FISHING_END_DATE_TIME)
+
+Trait rectiligne
+ Operation.vesselUseFeatures.vesselUseMeasurement (VESSEL_USE_MEASUREMENT.QUALITATIVE_VALUE_FK avec PMFM_FK=<PMFM_ID_RECTILINEAR_OPERATION>)
+
+Distance chalutée
+ Operation.vesselUseFeatures.vesselUseMeasurement (VESSEL_USE_MEASUREMENT.NUMERICAL_VALUE avec PMFM_FK=<PMFM_ID_TRAWL_DISTANCE>)
+
+Trait valide ou invalide
+ Operation.vesselUseFeatures.vesselUseMeasurement (VESSEL_USE_MEASUREMENT.QUALITATIVE_VALUE_FK avec PMFM_FK=<PMFM_ID_HAUL_VALID>)
+
+Saisisseur(s)
+ En v1, les identifiant des personnes suivantes sont stockées dans ScientificCruise.fishingTrip.comments
+ derrière la balise : #MANAGERS=<liste_des_IDs>
+ En v2, ce stockage devra se faire dans ScientificCruise.fishingTrip.vesselPersonFeatures avec un VesselPersonRole.id=<responsable_de_campagne>
+
+Navire
+ Si le navire est identique au premier de la liste de la campagne : Operation.vessel (OPERATION.VESSEL_FK)
+ Sinon : Operation.operationVesselAssociation (OPERATION_VESSEL_ASSOCIATION.VESSEL_FK avec IS_CATCH_ON_OPERATION_VESSEL=0).
+ Operation.vessel est alors rempli avec le premier navire de la liste de la campagne, pour être compatible avec Allegro (on doit toujours avoir : SCIENTIFIC_CRUISE.VESSEL_FK = OPERATION_VESSEL_FK).
+
+Engin
+ Operation.gearPhysicialFeatures (OPERATION.GEAR_PHYSCIAL_FEATURES_FK) : lien vers un engin déjà déclaré au niveau de la campagne.
+ Le code de l'engin est également dupliqué au début de Operation.name (OPERATION.NAME), devant le numéro du trait, pour rester compatible avec le format des données historiques.
+
+Commentaire
+ Operation.comments (OPERATION.COMMENTS)
+
+Trait > Mise en oeuvre de l'engin
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Valeur
+ Operation.gearUseFeatures.gearUseMeasurement (GEAR_USE_MEASUREMENT.xxx - en fonction du type de PSFM : NUMERICAL_VALUE, ALPHANUMERICAL_VALUE ou QUALITATIVE_VALUE_FK)
+
+Trait > Hydrologie et paramètres environnementaux
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Valeur
+ Operation.gearUseFeatures.vesselUseMeasurement (GEAR_USE_MEASUREMENT.xxx - en fonction du type de PSFM : NUMERICAL_VALUE, ALPHANUMERICAL_VALUE ou QUALITATIVE_VALUE_FK)
+ En v2 (à confirmer), informations dispatcher dans différent onglet, en fonction du PSFM trouvé dans le protocole
+
+Capture > Résumé
+~~~~~~~~~~~~~~~~
+
+Poids TOTAL
+ Lot "Capture" (BATCH avec IS_CATCH_BATCH=1)
+ CatchBatch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Poids total VRAC
+ Lot "Capture > Vrac"
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Poids total HORS VRAC
+ Lot "Capture > Hors Vrac"
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Poids total NON TRIE
+ Lot "Capture > Non trié"
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Espèce > Poids TOTAL
+ Sommme des poids des lots "Capture > xxx > Espèce"
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Espèce > Poids total VRAC
+ Lot "Capture > Vrac > Espèce"
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Espèce > Poids total VRAC trié
+ Calculé par tutti ? utile seulement si Thalassa ?
+
+Espèce > Poids total HORS VRAC TRIE
+ Lot "Capture > Hors Vrac > Espèce"
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Benthos > Poids TOTAL
+ Sommme des poids des lots "Capture > xxx > Benthos"
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Benthos > Poids total VRAC
+ Lot "Capture > Vrac > Benthos"
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Benthos > Poids total VRAC trié
+ Calculé par tutti ? utile seulement si Thalassa ?
+
+Benthos > Poids total HORS VRAC TRIE
+ Lot "Capture > Hors Vrac > Benthos"
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Capture > Espèces
+~~~~~~~~~~~~~~~~~
+
+Espèce > Poids total VRAC
+ Lot "Capture > Vrac > Espèce"
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Poids inerte trié
+ Lot "Capture > Vrac > Espèce > [TAXON_INERT]"
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Poids vivant non détaillé trié
+ Lot "Capture > Vrac > Espèce > Biota"
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Tableau
+ Chaque ligne du tableau est stockée sous la forme d'un lot (Batch) positionné
+ soit sous le lot "Capture > Vrac > Espèce"
+ soit sous "Capture > Hors Vrac > Espèce"
+
+Tableau > Espèce
+ stockage de l'espèce uniquement pour les lot parent
+ Batch.referenceTaxon (BATCH.REFERENCE_TAXON_FK)
+
+Tableau > V/HV
+ Vrac ou Hors Vrac : Batch.sortingMeasurement.qualitativeValue (SORTING_MEASUREMENT.QUALITATIVE_VALUE_FK avec PMFM_FK=<PmfmId.SORTED_UNSORTED>)
+ Poids : Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
+Tableau > Class. Tri
+ Batch.sortingMeasurement.qualitativeValue (SORTING_MEASUREMENT.QUALITATIVE_VALUE_FK avec PMFM_FK=<PmfmId.SIZE_CATEGORY>)
+
+Tableau > Sexe
+ Batch.sortingMeasurement.qualitativeValue (SORTING_MEASUREMENT.QUALITATIVE_VALUE_FK avec PMFM_FK=<PmfmId.SEX>)
+
+Tableau > Maturité
+ Batch.sortingMeasurement.qualitativeValue (SORTING_MEASUREMENT.QUALITATIVE_VALUE_FK avec PMFM_FK=<PmfmId.MATURITY>)
+
+Tableau > Age
+ Batch.sortingMeasurement.qualitativeValue (SORTING_MEASUREMENT.QUALITATIVE_VALUE_FK avec PMFM_FK=<PmfmId.AGE>)
+
+Tableau > Poids sous-échantillonné
+ Si vide Batch.samplingRatio = 1
+ Sinon :
+ Batch.samplingRatioText (BATCH.SAMPLING_RATIO_TEXT) concaténé à partir des chaines : "<Poids sous-échantillonné>" + "/" + "<Poids V/HV>"
+ Batch.samplingRatio (BATCH.SAMPLING_RATIO) calculé par le division : <Poids sous-échantillonné> / <Poids V/HV>
+ Pour la lecture : on parse samplingRatioText pour récupérer le poids sous-échantillonné. si absent on le calculé à partir de samplingRatio (moins précis car perte possible de précision)
+
+Tableau > Nombre
+ Calculé à partir de la somme du nombre d'individus des lots fils (BATCH.INDIVIDUAL_COUNT avec PARENT_BATCH_FK=<ID du lot de la ligne du tableau>)
+ (voir ci-dessous "Mensuration > Tableau")
+
+Tableau > Commentaire
+ Batch.comments
+
+Tableau > Pièces Jointes
+ Chaque pièce jointes est stockée dans MeasurementFile
+ (MEASUREMENT_FILE avec PMFM_FK=null, OBJECT_TYPE_FK='BATCH' et OBJECT_ID=<ID du lot de la ligne du tableau>)
+ MeasurementFile.path : chemin du fichier (copier dans un répertoire, puis stocké en relatif ?)
+ MeasurementFile.name : nom
+ MeasurementFile.comments : commentaire
+
+Mensuration > Type de mesure
+ Dupliqué pour chaque lot de mensuration créé (un lot pour chaque taille saisie)
+ Batch.sortingMeasurement.pmfm (SORTING_MEASUREMENT.PMFM_FK)
+
+Mensuration > Pas de la classe de taille
+ Non stocké (devrait dépendre de PSFM.precision ?)
+ Peut-etre peut on le calculé par analyse des mensuration saisie ? Et si aucune mesure prendre la précision du PSFM ?
+
+Mensuration > Tableau
+ Chaque ligne du tableau de mensuration est stocké sous la forme d'un lot
+ relié au lot correspondant à la ligne parent du tableau des espèces. (BATCH avec PARENT_BATCH_FK=<ID du lot parent dans le tableau des espèces>)
+
+Mensuration > Tableau > Classe de taille
+ Batch.sortingMeasurement.numericalValue (SORTING_MEASUREMENT.NUMERICAL_VALUE avec PMFM_FK=<ID correspondant au "Type de mesure">)
+
+Mensuration > Tableau > Nombre
+ Batch.individualCount (BATCH.INDIVIDUAL_COUNT)
+
+Mensuration > Tableau > Poids observé
+ Batch.quantificationMeasurement.numericalValue (QUANTIFICATION_MEASUREMENT.NUMERICAL_VALUE avec IS_REFERENT=1)
+
\ No newline at end of file
Modified: trunk/src/site/site_fr.xml
===================================================================
--- trunk/src/site/site_fr.xml 2013-03-13 13:30:25 UTC (rev 607)
+++ trunk/src/site/site_fr.xml 2013-03-13 15:09:25 UTC (rev 608)
@@ -106,8 +106,9 @@
<menu name="Documentation Technique">
<item name="Configuration" href="./application-config-report.html"/>
- <item name="Référentiel" href="referential.html"/>
+ <item name="Référentiel" href="./referential.html"/>
<item name="Mise à jour des versions" href="./update.html"/>
+ <item name="Correspondance Ecrans/BDD" href="./mapping.html"/>
</menu>
<menu ref="reports"/>
1
0
r607 - in trunk/tutti-ui-swing/src/main: java/fr/ifremer/tutti/ui/swing/content/home resources/i18n
by tchemit@users.forge.codelutin.com 13 Mar '13
by tchemit@users.forge.codelutin.com 13 Mar '13
13 Mar '13
Author: tchemit
Date: 2013-03-13 14:30:25 +0100 (Wed, 13 Mar 2013)
New Revision: 607
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/607
Log:
fixes #2131: Saisie possible des captures d'une campagne dont la s?\195?\169rie n'a pas de zone
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.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/SelectCruiseUIModel.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/SelectCruiseUI.css
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUI.css 2013-03-13 12:08:40 UTC (rev 606)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUI.css 2013-03-13 13:30:25 UTC (rev 607)
@@ -32,6 +32,17 @@
_help: {"tuttihelp.selectCruise.help"};
}
+#warningContainer {
+ background: {new java.awt.Color(245, 218, 88)};
+ visible: {!model.isProgramValid()};
+}
+
+#warningLabel {
+ actionIcon: warning;
+ border: {new javax.swing.border.EmptyBorder(5, 10, 5, 10)};
+ text: "tutti.warn.invalid.program";
+}
+
#programLabel {
text: "tutti.label.program";
actionIcon: program;
@@ -186,7 +197,7 @@
text: "tutti.action.editCatches";
mnemonic: E;
_tuttiAction: {EditCatchesAction.class};
- enabled: {model.isValid() && uiContext.isCruiseFilled()};
+ enabled: {model.isProgramValid() && uiContext.isCruiseFilled()};
toolTipText: "tuttihelp.selectCruise.action.editCatches.tip";
_help: {"tuttihelp.selectCruise.action.editCatches.help"};
}
@@ -197,6 +208,6 @@
toolTipText: "tuttihelp.selectCruise.action.validateCatches.tip";
mnemonic: V;
_tuttiAction: {ValidateCatchesAction.class};
- enabled: {model.isValid() && uiContext.isCruiseFilled()};
+ enabled: {model.isProgramValid() && uiContext.isCruiseFilled()};
_help: {"tuttihelp.selectCruise.action.validateCatches.help"};
}
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-03-13 12:08:40 UTC (rev 606)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUI.jaxx 2013-03-13 13:30:25 UTC (rev 607)
@@ -82,6 +82,13 @@
<Table fill='both' constraints='BorderLayout.CENTER'>
<row>
+ <cell columns="3">
+ <JPanel id='warningContainer' layout='{new BorderLayout(10, 10)}'>
+ <JLabel id='warningLabel' constraints='BorderLayout.CENTER'/>
+ </JPanel>
+ </cell>
+ </row>
+ <row>
<cell anchor='west'>
<JLabel id='programLabel'/>
</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-03-13 12:08:40 UTC (rev 606)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUIHandler.java 2013-03-13 13:30:25 UTC (rev 607)
@@ -173,14 +173,17 @@
Program newValue = (Program) evt.getNewValue();
boolean noProgram = newValue == null;
context.setProgramId(noProgram ? null : newValue.getId());
- List<Cruise> campaigns;
+ if (log.isInfoEnabled()) {
+ log.info("Selected program: "+newValue);
+ }
+ List<Cruise> cruises;
if (noProgram) {
- campaigns = Lists.newArrayList();
+ cruises = Lists.newArrayList();
} else {
- campaigns = persistenceService.getAllCruise(newValue.getId());
+ cruises = persistenceService.getAllCruise(newValue.getId());
}
SelectCruiseUIModel source = (SelectCruiseUIModel) evt.getSource();
- source.setCruises(campaigns);
+ source.setCruises(cruises);
source.setCruise(null);
}
});
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUIModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUIModel.java 2013-03-13 12:08:40 UTC (rev 606)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUIModel.java 2013-03-13 13:30:25 UTC (rev 607)
@@ -45,6 +45,8 @@
public static final String PROPERTY_PROGRAM = "program";
+ public static final String PROPERTY_PROGRAM_VALID = "programValid";
+
public static final String PROPERTY_CRUISES = "cruises";
public static final String PROPERTY_CRUISE = "cruise";
@@ -94,12 +96,17 @@
this.program = program;
firePropertyChange(PROPERTY_PROGRAM, oldValue, program);
firePropertyChange(PROPERTY_PROGRAM_FOUND, oldValue != null, program != null);
+ firePropertyChange(PROPERTY_PROGRAM_VALID, null, isProgramValid());
}
public boolean isProgramFound() {
return program != null;
}
+ public boolean isProgramValid() {
+ return program == null || program.getZone() != null;
+ }
+
public List<Cruise> getCruises() {
return cruises;
}
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-03-13 12:08:40 UTC (rev 606)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2013-03-13 13:30:25 UTC (rev 607)
@@ -532,6 +532,7 @@
tutti.validator.warning.longitude.outOfBounds=
tutti.validator.warning.longitude.second.outOfBounds=
tutti.warn.invalid.batch.model=
+tutti.warn.invalid.program=
tutti.weights.rate.difference.totalAndSorted.description=
tuttihelp.createSpeciesBatch.action.addSpecies.tip=
tuttihelp.createSpeciesBatch.action.cancel.tip=
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-03-13 12:08:40 UTC (rev 606)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-03-13 13:30:25 UTC (rev 607)
@@ -552,6 +552,7 @@
tutti.validator.warning.longitude.outOfBounds=La Latitude doit être comprise entre -180.0 et 180.0
tutti.validator.warning.longitude.second.outOfBounds=La seconde de la longitude doit être comprise entre 0 et 60
tutti.warn.invalid.batch.model=L'arbre d'échantillonage n'est pas compatible. Les captures ne seront pas visibles.
+tutti.warn.invalid.program=Le programme sélectionné ne possède pas de zone, il ne peut pas être édité.
tuttihelp.createSpeciesBatch.action.addSpecies.tip=Sélectionner une autre espèce
tuttihelp.createSpeciesBatch.action.cancel.tip=
tuttihelp.createSpeciesBatch.action.save.tip=
1
0
r606 - trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches
by tchemit@users.forge.codelutin.com 13 Mar '13
by tchemit@users.forge.codelutin.com 13 Mar '13
13 Mar '13
Author: tchemit
Date: 2013-03-13 13:08:40 +0100 (Wed, 13 Mar 2013)
New Revision: 606
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/606
Log:
remove import
Modified:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/ComputeWeightsAction.java
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/ComputeWeightsAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/ComputeWeightsAction.java 2013-03-13 10:22:34 UTC (rev 605)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/ComputeWeightsAction.java 2013-03-13 12:08:40 UTC (rev 606)
@@ -25,7 +25,6 @@
* #L%
*/
-import com.sun.org.apache.bcel.internal.generic.GETSTATIC;
import fr.ifremer.tutti.TuttiBusinessException;
import fr.ifremer.tutti.service.PersistenceService;
import fr.ifremer.tutti.ui.swing.content.operation.catches.species.SampleCategory;
@@ -171,13 +170,13 @@
AbstractTuttiUIHandler.CONFIRMATION_FORMAT,
_("tutti.action.computeWeights.replaceTotalSortedWeight.message", rate),
_("tutti.action.computeWeights.replaceTotalSortedWeight.help"));
-
+
int answer = JOptionPane.showConfirmDialog(getContext().getActionUI(),
htmlMessage,
_("tutti.action.computeWeights.replaceTotalSortedWeight.title"),
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
-
+
if (answer == JOptionPane.NO_OPTION) {
model.setSpeciesTotalSortedWeight(null);
speciesTotalSortedWeight = totalSortedWeight;
1
0