Author: tchemit Date: 2013-01-29 09:24:13 +0100 (Tue, 29 Jan 2013) New Revision: 254 Url: http://forge.codelutin.com/projects/tutti/repository/revisions/254 Log: refs #1912: [Ecran Trait] Filtrage des strates - sous-strates - localit?\195?\169s refs #1893: [TECH] - Mise ?\195?\160 jour automatique de l'outil refs #1919: [Persistence] Adagio r?\195?\169f?\195?\169rentiel + add missing svn properties + license header Added: trunk/src/site/resources/ trunk/src/site/resources/update/ trunk/src/site/resources/update/update-application.properties Removed: trunk/tutti-persistence-adagio/src/main/site/ trunk/tutti-ui-swing/src/main/assembly/min/update-application.properties trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiJreUpdaterCallBack.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiUpdaterCallBack.java Modified: trunk/pom.xml trunk/src/site/rst/referential.rst trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceAdagioImpl.java trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/config/TuttiPersistenceAdagioConfigOption.java trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/service/MeasurementService.java trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceServiceImpl.java trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/service/TuttiEnumerationFile.java trunk/tutti-persistence-adagio/src/main/resources/queries-override.hbm.xml trunk/tutti-persistence-adagio/src/main/resources/tutti-db-enumerations.properties trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/DatabaseFixtures.java trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceServiceTest.java trunk/tutti-persistence-dev/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceDevImpl.java trunk/tutti-persistence-dev/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceServiceDevImpl.java trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/RessourceClassLoader.java trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistence.java trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceService.java trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/PersistenceService.java trunk/tutti-ui-swing/pom.xml trunk/tutti-ui-swing/src/main/assembly/full/tutti.sh trunk/tutti-ui-swing/src/main/assembly/min/update-database.properties trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/RunTutti.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiApplicationUpdaterCallBack.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiDatabaseUpdaterCallBack.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/config/TuttiConfig.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/config/TuttiConfigOption.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/AddSpeciesAction.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/AddSpeciesUI.css trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/AddSpeciesUI.jaxx trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/AddSpeciesUIHandler.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/AddSpeciesUIModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/CaracteristicRowModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/CaracteristicTabUIHandler.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/CaracteristicTabUIModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/environment/EnvironmentRowModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/gearshooting/GearShootingRowModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/CoordinateEditorType.java trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties trunk/tutti-ui-swing/src/main/resources/icons/action-warning.png Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/pom.xml 2013-01-29 08:24:13 UTC (rev 254) @@ -163,6 +163,9 @@ <hsqldb.version>2.2.9</hsqldb.version> <jdbc.hsqldb.version>1.8.0.7</jdbc.hsqldb.version> + <!-- Last JRE version to use --> + <jreVersion>1.7.10</jreVersion> + </properties> <dependencyManagement> Copied: trunk/src/site/resources/update/update-application.properties (from rev 250, trunk/tutti-ui-swing/src/main/assembly/min/update-application.properties) =================================================================== --- trunk/src/site/resources/update/update-application.properties (rev 0) +++ trunk/src/site/resources/update/update-application.properties 2013-01-29 08:24:13 UTC (rev 254) @@ -0,0 +1,34 @@ +### +# #%L +# Tutti +# $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.version=${project.Version} +tutti.url=zip:http://nexus.nuiton.org/nexus/content/repositories/other-releases/fr/ifremer/tutti/tutti-ui-swing/tutti-${project.Version}-standalone.zip +jre.version=${jreVersion} +#linux.amd64.jre.version=${jreVersion} +linux.amd64.jre.url=zip:http://nexus.nuiton.org/nexus/content/repositories/jvm/com/oracle/jre/${jreVersion}/jre-${jreVersion}-linux-x64.jar +#linux.i386.jre.version=${jreVersion} +linux.i386.jre.url=zip:http://nexus.nuiton.org/nexus/content/repositories/jvm/com/oracle/jre/${jreVersion}/jre-${jreVersion}-linux-i586.jar +#windows.amd64.jre.version=${jreVersion} +windows.amd64.jre.url=zip:http://nexus.nuiton.org/nexus/content/repositories/jvm/com/oracle/jre/${jreVersion}/jre-${jreVersion}-windows-x64.jar +#windows.i386.jre.version=${jreVersion} +windows.i386.jre.url=zip:http://nexus.nuiton.org/nexus/content/repositories/jvm/com/oracle/jre/${jreVersion}/jre-${jreVersion}-windows-i586.jar Modified: trunk/src/site/rst/referential.rst =================================================================== --- trunk/src/site/rst/referential.rst 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/src/site/rst/referential.rst 2013-01-29 08:24:13 UTC (rev 254) @@ -36,61 +36,51 @@ Les requètes métier ~~~~~~~~~~~~~~~~~~~ -+-----------------------------------------------------+------+-----------------------------------------------------+ -| Nom requète | Etat | Commentaire | -+=====================================================+======+=====================================================+ -| [REF-01] Liste des zones d'une série de campagne | KO | Définir le niveau LocationLevel | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-02] Liste des pays | OK | | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-03] Liste des navires (scientifique) | OK | Requète très longue il faut optimiser | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-04] Liste des navires (pro) | OK | Requète très longue il faut optimiser | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-05] Liste des engins (scientifique) | OK | | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-06] Liste des engins (pro) | OK | | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-07] Liste des utilisateurs | OK | Doit-on utliser limiter aux membres de l'Ifremer ? | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-08] Liste des espèces | OK | Utilisation de synonymes via import refTax ? | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-09] Liste des psfm mesure de classe de taille | OK | | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-10] Liste des psfm (mise en oeuvre de l'engin) | OK | | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-11] Liste des psfm (environnement) | OK | | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-12] Liste des psfm (hydrologique) | KO | Données à regrouper en base avec un ParameterGroup ?| -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-13] Liste des strates | KO | Pouvoir les lier aux zones | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-14] Liste des sous-strates | KO | Pouvoir les lier aux zones / strates | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-15] Liste des localités | KO | Pouvoir les lier aux zones / strates / sous-strates| -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-16] Conversion Taille-poids | TODO | | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-17] Liste des espèces (écran benthos) | KO | Valider comment on filtre (sur le protocole ?) | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-18] Liste des espèces (écran plancton) | KO | Valider comment on filtre (sur le protocole ?) | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-19] Catégorie de macro-déchets | KO | Créer les données en base | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-20] Catégorie de taille macro-déchets | KO | Créer les données en base | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-21] Liste des espèces (écran accidentelles) | OK | | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-22] Liste des psfm (écran accidentelles) | TODO | Définir ce qu'on peut mettre ici (protocole ?) | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-23] Catégorie H/VC | OK | | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-24] Catégorie Classe. Tri | OK | | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-25] Catégorie Sexe | OK | | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-26] Catégorie Maturité | KO | psfm à utiliser (MATURITY \ MATURITY_STAGE_5_VISUAL)| -+-----------------------------------------------------+------+-----------------------------------------------------+ ++-----------------------------------------------------+-------+-----------------------------------------------------+ +| Nom requète | Etat | Commentaire | ++=====================================================+=======+=====================================================+ +| [REF-01] Liste des zones d'une série de campagne | OK | | ++-----------------------------------------------------+-------+-----------------------------------------------------+ +| [REF-02] Liste des pays | OK | | ++-----------------------------------------------------+-------+-----------------------------------------------------+ +| [REF-03] Liste des strates / sstrates/ localites |TESTING| En attente de nouvelle base | ++-----------------------------------------------------+-------+-----------------------------------------------------+ +| [REF-04] Liste des navires (scientifique) | OK | Requète très longue il faut optimiser | ++-----------------------------------------------------+-------+-----------------------------------------------------+ +| [REF-05] Liste des navires (pro) | OK | Requète très longue il faut optimiser | ++-----------------------------------------------------+-------+-----------------------------------------------------+ +| [REF-06] Liste des engins (scientifique) | OK | | ++-----------------------------------------------------+-------+-----------------------------------------------------+ +| [REF-07] Liste des engins (pro) | OK | | ++-----------------------------------------------------+-------+-----------------------------------------------------+ +| [REF-08] Liste des utilisateurs | OK | Doit-on utiliser limiter aux membres de l'Ifremer ? | ++-----------------------------------------------------+-------+-----------------------------------------------------+ +| [REF-09] Liste des espèces | OK | Utilisation de synonymes via import refTax ? | ++-----------------------------------------------------+-------+-----------------------------------------------------+ +| [REF-10] Catégorie de macro-déchets |TESTING| En attente de nouvelle base | ++-----------------------------------------------------+-------+-----------------------------------------------------+ +| [REF-11] Catégorie de taille macro-déchets |TESTING| En attente de nouvelle base | ++-----------------------------------------------------+-------+-----------------------------------------------------+ +| [REF-12] Catégorie H/VC | OK | | ++-----------------------------------------------------+-------+-----------------------------------------------------+ +| [REF-13] Catégorie Classe. Tri | OK | | ++-----------------------------------------------------+-------+-----------------------------------------------------+ +| [REF-14] Catégorie Sexe | OK | | ++-----------------------------------------------------+-------+-----------------------------------------------------+ +| [REF-15] Catégorie Maturité |TESTING| En attente de nouvelle base | ++-----------------------------------------------------+-------+-----------------------------------------------------+ +| [REF-16] Liste des psfm mesure de classe de taille | KO | Ne plus utiliser (import protocole) | ++-----------------------------------------------------+-------+-----------------------------------------------------+ +| [REF-17] Liste des psfm (mise en oeuvre de l'engin) | KO | Ne plus utiliser (import protocole) | ++-----------------------------------------------------+-------+-----------------------------------------------------+ +| [REF-18] Liste des psfm (environnement) | KO | Ne plus utiliser (import protocole) | ++-----------------------------------------------------+-------+-----------------------------------------------------+ +| [REF-19] Liste des psfm (hydrologique) | KO | Ne plus utiliser (import protocole) | ++-----------------------------------------------------+-------+-----------------------------------------------------+ +| [REF-20] Liste des psfm (écran accidentelles) |TODO V2| Ne plus utiliser (import protocole) | ++-----------------------------------------------------+-------+-----------------------------------------------------+ +| [REF-21] Conversion Taille-poids |TODO V2| A voir si vraiment à faire | ++-----------------------------------------------------+-------+-----------------------------------------------------+ [REF-01] Liste des zones d'une série de campagne ------------------------------------------------ @@ -98,18 +88,22 @@ :: SELECT - l.id, - l.label, - l.name, - l.status + l.id, + l.label, + l.name, + l.status FROM LocationImpl l WHERE l.locationLevel.id = :locationLevelId - AND l.status.code IN (1, 2) + AND l.locationClassification.id = :locationClassificationId + AND l.status.code IN (:statusValidCode, :statusTemporaryCode) Paramètres : - :locationLevelId = *LocationLevelId.PROGRAM* +- :locationClassificationId = *LocationClassificationId.SECTOR* +- :statusValidCode = *StatusCode.ENABLE* +- :statusTemporaryCode = *StatusCode.TEMPORARY* *État:* À Valider et définir la valeur de la constante. @@ -119,23 +113,58 @@ :: SELECT - l.id, - l.label, - l.name, - l.status + l.id, + l.label, + l.name, + l.status FROM LocationImpl l WHERE l.locationLevel.id = :locationLevelId - AND l.status.code IN (1, 2) + AND l.status.code IN (:statusValidCode, :statusTemporaryCode) Paramètres : - :locationLevelId = *LocationLevelId.PAYS_ISO3* +- :statusValidCode = *StatusCode.ENABLE* +- :statusTemporaryCode = *StatusCode.TEMPORARY* *État:* Valide. -[REF-03] Liste des navires (scientifique) +[REF-03] Liste des strates / sous-strates / localités +----------------------------------------------------- + +:: + + SELECT + l.id as locationId, + l.label as locationLabel, + l.name as locationName, + l.locationLevel.id as locationLevelId, + l.status as status + FROM + LocationImpl l, + LocationHierarchyImpl lh + WHERE + l.status.code IN (:statusValidCode, :statusTemporaryCode) + AND l.locationLevel.id = :locationLevelId + AND l.locationClassification.id = :locationClassificationId + AND l.id = lh.locationHierarchyPk.location.id + AND lh.locationHierarchyPk.parent.id = :parentId + AND lh.locationHierarchyPk.parent.locationLevel.id = :parentLocationLevelId + +Paramètres : + +- :parentId = *l'id de la zone / strate / sous-strate* +- :parentLocationLevelId = *LocationLevelId.PROGRAM / LocationLevelId.STRATA / LocationLevelId.SUB_STRATA* +- :locationLevelId = *LocationLevelId.STRATA / LocationLevelId.SUB_STRATA / LocationLevelId.LOCALITE* +- :locationClassificationId = *LocationClassificationId.SECTOR* +- :statusValidCode = *StatusCode.ENABLE* +- :statusTemporaryCode = *StatusCode.TEMPORARY* + +*État:* Valide. + +[REF-04] Liste des navires (scientifique) ----------------------------------------- :: @@ -151,7 +180,7 @@ INNER JOIN v.vesselRegistrationPeriods AS vrp LEFT OUTER JOIN v.vesselFeatures AS vf WHERE v.vesselType.id = :vesselTypeId - AND v.status.code IN (1, 2) + AND v.status.code IN (:statusValidCode, :statusTemporaryCode) AND vrp.vesselRegistrationPeriodPk.startDateTime = ( SELECT MAX(vrp2.vesselRegistrationPeriodPk.startDateTime) @@ -173,10 +202,12 @@ - :gearClassificiationId = *VesselTypeId.SCIENTIFIC_RESEARCH_VESSEL* - :refDate = date (ou null) +- :statusValidCode = *StatusCode.ENABLE* +- :statusTemporaryCode = *StatusCode.TEMPORARY* *État:* Valide mais à optimiser. -[REF-04] Liste des navires (pro) +[REF-05] Liste des navires (pro) -------------------------------- :: @@ -192,7 +223,7 @@ INNER JOIN v.vesselRegistrationPeriods AS vrp LEFT OUTER JOIN v.vesselFeatures AS vf WHERE v.vesselType.id = :vesselTypeId - AND v.status.code IN (1, 2) + AND v.status.code IN (:statusValidCode, :statusTemporaryCode) AND vrp.vesselRegistrationPeriodPk.startDateTime = ( SELECT MAX(vrp2.vesselRegistrationPeriodPk.startDateTime) @@ -215,10 +246,12 @@ - :gearClassificiationId = *VesselTypeId.FISHING_VESSEL* - :refDate = date (ou null) +- :statusValidCode = *StatusCode.ENABLE* +- :statusTemporaryCode = *StatusCode.TEMPORARY* *État:* Valide mais à optimiser. -[REF-05] Liste des engins (scientifique) +[REF-06] Liste des engins (scientifique) ---------------------------------------- :: @@ -231,16 +264,18 @@ FROM GearImpl g WHERE g.gearClassification.id= :gearClassificiationId - AND g.status.code IN (1, 2) + AND g.status.code IN (:statusValidCode, :statusTemporaryCode) Paramètres : - :gearClassificiationId = *GearClassificationId.SCIENTIFIC_CRUISE* +- :statusValidCode = *StatusCode.ENABLE* +- :statusTemporaryCode = *StatusCode.TEMPORARY* *État:* Valide. -[REF-06] Liste des engins (pro) +[REF-07] Liste des engins (pro) ------------------------------- :: @@ -253,16 +288,18 @@ FROM GearImpl g WHERE g.gearClassification.id= :gearClassificiationId - AND g.status.code IN (1, 2) + AND g.status.code IN (:statusValidCode, :statusTemporaryCode) Paramètres : - :gearClassificiationId = *GearClassificationId.FAO* +- :statusValidCode = *StatusCode.ENABLE* +- :statusTemporaryCode = *StatusCode.TEMPORARY* *État:* Valide. -[REF-07] Liste des utilisateurs +[REF-08] Liste des utilisateurs ------------------------------- :: @@ -277,7 +314,7 @@ PersonImpl p LEFT OUTER JOIN p.profils pp WHERE - p.status.code in (1,2) + p.status.code IN (:statusValidCode, :statusTemporaryCode) AND pp.id IN ( :observerProfilId, :projectMemberProfilId, @@ -290,11 +327,12 @@ - :observerProfilId = *UserProfilId.OBSERVER* - :projectMemberProfilId = *UserProfilId.PROJECT_MEMBER* - :userProfilId = *UserProfilId.USER* +- :statusValidCode = *StatusCode.ENABLE* +- :statusTemporaryCode = *StatusCode.TEMPORARY* *État:* Valide. - -[REF-08] Liste des espèces +[REF-09] Liste des espèces -------------------------- :: @@ -303,7 +341,50 @@ *État:* Valide. -[REF-09] Liste des psfm mesure de classe de taille +[REF-10] Catégorie de macro-déchets +----------------------------------- + +[REF-T01] + [REF-T02] avec :pmfmId = *PmfmId.MACRO_WASTE_CATEGORY* + +*État:* les données sont à créer en base. + +[REF-11] Catégorie de taille macro-déchets +------------------------------------------- + +[REF-T01] + [REF-T02] avec :pmfmId = *PmfmId.MACRO_WASTE_SIZE_CATEGORY* + +*État:* les données sont à créer en base. + +[REF-12] Catégorie H/VC +----------------------- + +[REF-T01] + [REF-T02] avec :pmfmId = *PmfmId.SORTED_UNSORTED* + +*État:* Valide. + +[REF-13] Catégorie Classe. Tri +------------------------------ + +[REF-T01] + [REF-T02] avec :pmfmId = *PmfmId.SIZE_CATEGORY* + +*État:* Valide. + +[REF-14] Catégorie Sexe +----------------------- + +[REF-T01] + [REF-T02] avec :pmfmId = *PmfmId.SEX* + +*État:* Valide. + +[REF-15] Catégorie Maturité +--------------------------- + +[REF-T01] + [REF-T02] avec :pmfmId = *PmfmId.MATURITY* + +*État:* Valide. + + +[REF-16] Liste des psfm mesure de classe de taille -------------------------------------------------- :: @@ -340,176 +421,53 @@ *État:* Valide. -[REF-10] Liste des psfm (mise en oeuvre de l'engin) +[REF-17] Liste des psfm (mise en oeuvre de l'engin) --------------------------------------------------- [REF-T03] avec :matrixId= *MatrixId.GEAR* *État:* Valide. -[REF-11] Liste des psfm (environnement) +[REF-18] Liste des psfm (environnement) --------------------------------------- [REF-T03] avec :parameterGroupId= *ParameterGroupId.ENVIRONEMENT_MEASUREMENT* *État:* Valide. -[REF-12] Liste des psfm (hydrologique) +[REF-19] Liste des psfm (hydrologique) -------------------------------------- [REF-T03] avec :parameterGroupId= *ParameterGroupId.HYDROLOGIC_MEASUREMENT* *État:* Données non présentes en base. -[REF-13] Liste des strates --------------------------- +[REF-20] Liste des psfm pour les captures accidentelles +------------------------------------------------------- -:: +*État:* A FAIRE. - SELECT - l.id as locationId, - l.label as locationLabel, - l.name as locationName, - l.locationLevel.id as locationLevelId, - l.status as status - FROM LocationImpl l - WHERE - l.status.code IN (1, 2) - AND l.locationLevel.id = :locationLevelId - -Paramètres : - -- :locationLevelId = *LocationLevelId.STRATA* - -*État:* A lier aux zones de série de camapgnes et au rectangle statistique. - -[REF-14] Liste des sous-strates -------------------------------- - -:: - - SELECT - l.id as locationId, - l.label as locationLabel, - l.name as locationName, - l.locationLevel.id as locationLevelId, - l.status as status - FROM LocationImpl l - WHERE - l.status.code IN (1, 2) - AND l.locationLevel.id = :locationLevelId - -Paramètres : - -- :locationLevelId = *LocationLevelId.SUBSTRATA* - -*État:* Pouvoir les lier aux zones et rectangle statistique et strates. - -[REF-15] Liste des localités ----------------------------- - -:: - - SELECT - l.id as locationId, - l.label as locationLabel, - l.name as locationName, - l.locationLevel.id as locationLevelId, - l.status as status - FROM LocationImpl l - WHERE - l.status.code IN (1, 2) - AND l.locationLevel.id = :locationLevelId - -Paramètres : - -- :locationLevelId = *LocationLevelId.LOCALITE* - -*État:* Pouvoir les lier aux zones et rectangle statistique et strates . - -[REF-16] Conversion Taille-poids +[REF-21] Conversion Taille-poids -------------------------------- -*État:* A faire. - -[REF-17] Liste des espèces (écran benthos) ------------------------------------------- - -*État:* Valider comment on filtre (sur le protocole ?). - -[REF-18] Liste des espèces (écran plancton) -------------------------------------------- - -*État:* Valider comment on filtre (sur le protocole ?). - -[REF-19] Catégorie de macro-déchets ------------------------------------ - -[REF-T01] + [REF-T02] avec :pmfmId = *PmfmId.MACRO_WASTE_CATEGORY* - -*État:* les données sont à créer en base. - -[REF-20] Catégorie de taille macro-déchets -------------------------------------------- - -[REF-T01] + [REF-T02] avec :pmfmId = *PmfmId.MACRO_WASTE_SIZE_CATEGORY* - -*État:* les données sont à créer en base. - -[REF-21] Liste des espèces (écran capture accidentelles) --------------------------------------------------------- - -*État:* Valide (on prend toutes les espèces). - -[REF-22] Liste des psfm pour les captures accidentelles -------------------------------------------------------- - *État:* A FAIRE. -[REF-23] Catégorie H/VC ------------------------ - -[REF-T01] + [REF-T02] avec :pmfmId = *PmfmId.SORTED_UNSORTED* - -*État:* Valide. - -[REF-24] Catégorie Classe. Tri ------------------------------- - -[REF-T01] + [REF-T02] avec :pmfmId = *PmfmId.SIZE_CATEGORY* - -*État:* Valide. - -[REF-25] Catégorie Sexe ------------------------ - -[REF-T01] + [REF-T02] avec :pmfmId = *PmfmId.SEX* - -*État:* Valide. - -[REF-26] Catégorie Maturité ---------------------------- - -[REF-T01] + [REF-T02] avec :pmfmId = *PmfmId.MATURITY* - -*État:* Valider l'id utilisé. - Les requètes techniques ~~~~~~~~~~~~~~~~~~~~~~~ -+-----------------------------------------------------+------+-----------------------------------------------------+ ++-----------------------------------------------------+-------+-----------------------------------------------------+ | Nom requète | Etat | Commentaire | +=====================================================+======+=====================================================+ -| [REF-T01] Détail d'un psfm par son id | OK | | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-T02] Valeurs qualitatives d'un psfm | OK | | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-T03] Liste de psfm à partir d'un support | OK | | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-T04] Liste de psfm à partir d'un parameterGroup| OK | | -+-----------------------------------------------------+------+-----------------------------------------------------+ -| [REF-T05] Lieu statistique à partir de lat/long | OK | | -+-----------------------------------------------------+------+-----------------------------------------------------+ +| [REF-T01] Détail d'un psfm par son id | OK | | ++-----------------------------------------------------+-------+-----------------------------------------------------+ +| [REF-T02] Valeurs qualitatives d'un psfm | OK | | ++-----------------------------------------------------+-------+-----------------------------------------------------+ +| [REF-T03] Liste de psfm à partir d'un support | OK | | ++-----------------------------------------------------+-------+-----------------------------------------------------+ +| [REF-T04] Liste de psfm à partir d'un parameterGroup| OK | | ++-----------------------------------------------------+-------+-----------------------------------------------------+ +| [REF-T05] Lieu statistique à partir de lat/long | OK | | ++-----------------------------------------------------+-------+-----------------------------------------------------+ [REF-T01] Détail d'un psfm par son id ------------------------------------- Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/RessourceClassLoader.java =================================================================== --- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/RessourceClassLoader.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/RessourceClassLoader.java 2013-01-29 08:24:13 UTC (rev 254) @@ -78,6 +78,9 @@ for (File directory : directories) { if (!this.directories.contains(directory)) { this.directories.add(directory); + + // force to create directory + FileUtils.forceMkdir(directory); } } loader = null; Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistence.java =================================================================== --- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistence.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistence.java 2013-01-29 08:24:13 UTC (rev 254) @@ -86,6 +86,12 @@ */ List<Country> getAllCountry(); + List<FishingOperationLocation> getAllFishingOperationStrata(String zoneId); + + List<FishingOperationLocation> getAllFishingOperationSubStrata(String zoneId, String startaId); + + List<FishingOperationLocation> getAllFishingOperationLocation(String zoneId, String startaId, String subStrataId); + /** * @return all scientific vessels (used by a {@link Cruise}). * @see Cruise#getVessel() @@ -104,18 +110,8 @@ List<Species> getAllSpecies(); - List<Species> getAllBenthosSpecies(); - - List<Species> getAllPlanktonSpecies(); - Species getSpecies(String speciesId); - List<FishingOperationLocation> getAllFishingOperationStrata(String zoneId); - - List<FishingOperationLocation> getAllFishingOperationSubStrata(String locationId); - - List<FishingOperationLocation> getAllFishingOperationLocation(String locationId); - List<Caracteristic> getAllFishingOperationEnvironmentCaracteristic(); List<Caracteristic> getAllFishingOperationGearCaracteristic(); Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceService.java =================================================================== --- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceService.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceService.java 2013-01-29 08:24:13 UTC (rev 254) @@ -68,6 +68,12 @@ */ List<Country> getAllCountry(); + List<FishingOperationLocation> getAllFishingOperationStrata(String zoneId); + + List<FishingOperationLocation> getAllFishingOperationSubStrata(String zoneId, String startaId); + + List<FishingOperationLocation> getAllFishingOperationLocation(String zoneId, String startaId, String subStrataId); + /** * @return all scientific vessels (used by a {@link Cruise}). * @see Cruise#getVessel() @@ -88,18 +94,8 @@ List<Species> getAllSpecies(); - List<Species> getAllBenthosSpecies(); - - List<Species> getAllPlanktonSpecies(); - Species getSpecies(String speciesId); - List<FishingOperationLocation> getAllFishingOperationStrata(String zoneId); - - List<FishingOperationLocation> getAllFishingOperationSubStrata(String locationId); - - List<FishingOperationLocation> getAllFishingOperationLocation(String locationId); - List<Caracteristic> getAllFishingOperationEnvironmentCaracteristic(); List<Caracteristic> getAllFishingOperationGearCaracteristic(); Modified: trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceAdagioImpl.java =================================================================== --- trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceAdagioImpl.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceAdagioImpl.java 2013-01-29 08:24:13 UTC (rev 254) @@ -137,51 +137,47 @@ } @Override - public List<Vessel> getAllScientificVessel() { - return referentialService.getAllScientificVessel(); + public List<FishingOperationLocation> getAllFishingOperationStrata(String zoneId) { + return referentialService.getAllFishingOperationStrata(zoneId); } @Override - public List<Vessel> getAllFishingVessel() { - return referentialService.getAllFishingVessel(); + public List<FishingOperationLocation> getAllFishingOperationSubStrata(String zoneId, + String strataId) { + return referentialService.getAllFishingOperationSubStrata(zoneId, + strataId); } @Override - public List<Species> getAllSpecies() { - return referentialService.getAllSpecies(); + public List<FishingOperationLocation> getAllFishingOperationLocation(String zoneId, + String strataId, + String subStrataId) { + return referentialService.getAllFishingOperationLocation(zoneId, + strataId, + subStrataId); } @Override - public List<Species> getAllBenthosSpecies() { - return referentialService.getAllBenthosSpecies(); + public List<Vessel> getAllScientificVessel() { + return referentialService.getAllScientificVessel(); } @Override - public List<Species> getAllPlanktonSpecies() { - return referentialService.getAllPlanktonSpecies(); + public List<Vessel> getAllFishingVessel() { + return referentialService.getAllFishingVessel(); } @Override - public Species getSpecies(String speciesId) { - return referentialService.getSpecies(speciesId); + public List<Species> getAllSpecies() { + return referentialService.getAllSpecies(); } @Override - public List<FishingOperationLocation> getAllFishingOperationStrata(String zoneId) { - return referentialService.getAllFishingOperationStrata(zoneId); + public Species getSpecies(String speciesId) { + return referentialService.getSpecies(speciesId); } @Override - public List<FishingOperationLocation> getAllFishingOperationSubStrata(String locationId) { - return referentialService.getAllFishingOperationSubStrata(locationId); - } - - @Override - public List<FishingOperationLocation> getAllFishingOperationLocation(String locationId) { - return referentialService.getAllFishingOperationLocation(locationId); - } - - @Override public List<Caracteristic> getAllFishingOperationEnvironmentCaracteristic() { return referentialService.getAllFishingOperationEnvironmentCaracteristic(); } Modified: trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/config/TuttiPersistenceAdagioConfigOption.java =================================================================== --- trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/config/TuttiPersistenceAdagioConfigOption.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/config/TuttiPersistenceAdagioConfigOption.java 2013-01-29 08:24:13 UTC (rev 254) @@ -49,7 +49,7 @@ DB_CONFIGURATION_PATH( "tutti.persistence.db.configurationPath", "Chemin du fichier de configuration d'Adagio", - "${tutti.persistence.db.directory}/conf.properties", + "${tutti.data.directory}/resources/conf.properties", File.class, true, true), @@ -57,7 +57,7 @@ DB_ENUMERATION_PATH( "tutti.persistence.db.enumerationPath", "Chemin du fichier de correspondance des constantes", - "${tutti.persistence.db.directory}/enumerations-v3.properties", + "${tutti.data.directory}/resources/enumerations-v3.properties", File.class, true, true), Modified: trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/service/MeasurementService.java =================================================================== --- trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/service/MeasurementService.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/service/MeasurementService.java 2013-01-29 08:24:13 UTC (rev 254) @@ -1,13 +1,38 @@ -package fr.ifremer.tutti.persistence.service; - -import fr.ifremer.adagio.core.dao.data.measure.GearPhysicalMeasurement; -import fr.ifremer.adagio.core.dao.data.survey.fishingTrip.FishingTrip; -import fr.ifremer.adagio.core.dao.data.vessel.feature.physical.GearPhysicalFeatures; - -public interface MeasurementService { - - GearPhysicalFeatures getGearPhysicalfeatures(FishingTrip fishingTrip, Integer gearId); - - GearPhysicalMeasurement getGearPhysicalMeasurement(GearPhysicalFeatures gearPhysicalFeatures, Integer pmfmId); - -} +package fr.ifremer.tutti.persistence.service; + +/* + * #%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% + */ + + +import fr.ifremer.adagio.core.dao.data.measure.GearPhysicalMeasurement; +import fr.ifremer.adagio.core.dao.data.survey.fishingTrip.FishingTrip; +import fr.ifremer.adagio.core.dao.data.vessel.feature.physical.GearPhysicalFeatures; + +public interface MeasurementService { + + GearPhysicalFeatures getGearPhysicalfeatures(FishingTrip fishingTrip, Integer gearId); + + GearPhysicalMeasurement getGearPhysicalMeasurement(GearPhysicalFeatures gearPhysicalFeatures, Integer pmfmId); + +} \ No newline at end of file Property changes on: trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/service/MeasurementService.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Modified: trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceServiceImpl.java =================================================================== --- trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceServiceImpl.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceServiceImpl.java 2013-01-29 08:24:13 UTC (rev 254) @@ -24,7 +24,9 @@ * #L% */ +import com.google.common.base.Preconditions; import com.google.common.collect.Lists; +import com.google.common.collect.Sets; import fr.ifremer.adagio.core.dao.referential.StatusDao; import fr.ifremer.adagio.core.dao.referential.taxon.TaxonNameExtendDao; import fr.ifremer.adagio.core.dao.referential.taxon.TaxonRefTaxVO; @@ -53,6 +55,7 @@ import java.util.Date; import java.util.Iterator; import java.util.List; +import java.util.Set; /** * Implementation of the {@link ReferentialPersistenceService} using a adagio @@ -82,7 +85,8 @@ public List<Zone> getAllProgramZone() { Iterator<Object[]> list = queryListWithStatus( "allProgramZones", - "locationLevelId", IntegerType.INSTANCE, enumeration.LOCATION_LEVEL_ID_PROGRAMM); + "locationClassificationId", IntegerType.INSTANCE, enumeration.LOCATION_CLASSIFICATION_ID_SECTOR, + "locationLevelId", IntegerType.INSTANCE, enumeration.LOCATION_LEVEL_ID_PROGRAM); List<Zone> result = Lists.newArrayList(); while (list.hasNext()) { @@ -117,6 +121,78 @@ } @Override + public List<FishingOperationLocation> getAllFishingOperationStrata(String zoneId) { + List<FishingOperationLocation> result = getFishingOperationLocations( + enumeration.LOCATION_LEVEL_ID_STRATA, + Integer.valueOf(zoneId), + enumeration.LOCATION_LEVEL_ID_PROGRAM); + return result; + } + + @Override + public List<FishingOperationLocation> getAllFishingOperationSubStrata(String zoneId, + String strataId) { + + String parentId; + Integer parentLocationLevelId; + + if (strataId != null) { + + // use strata as parent + parentId = strataId; + parentLocationLevelId = enumeration.LOCATION_LEVEL_ID_STRATA; + + } else { + + // use zoneId as parent + parentId = zoneId; + parentLocationLevelId = enumeration.LOCATION_LEVEL_ID_PROGRAM; + } + + Preconditions.checkNotNull(parentId); + List<FishingOperationLocation> result = getFishingOperationLocations( + enumeration.LOCATION_LEVEL_ID_SUB_STRATA, + Integer.valueOf(parentId), + parentLocationLevelId); + return result; + } + + @Override + public List<FishingOperationLocation> getAllFishingOperationLocation(String zoneId, + String strataId, + String subStrataId) { + + String parentId; + Integer parentLocationLevelId; + + if (subStrataId != null) { + + // use substrata as parent + parentId = subStrataId; + parentLocationLevelId = enumeration.LOCATION_LEVEL_ID_SUB_STRATA; + + } else if (strataId != null) { + + // use strata as parent + parentId = strataId; + parentLocationLevelId = enumeration.LOCATION_LEVEL_ID_STRATA; + + } else { + + // use zoneId as parent + parentId = zoneId; + parentLocationLevelId = enumeration.LOCATION_LEVEL_ID_PROGRAM; + } + + Preconditions.checkNotNull(parentId); + List<FishingOperationLocation> result = getFishingOperationLocations( + enumeration.LOCATION_LEVEL_ID_LOCALITE, + Integer.valueOf(parentId), + parentLocationLevelId); + return result; + } + + @Override public List<Vessel> getAllScientificVessel() { Iterator<Object[]> list = queryListWithStatus( @@ -149,8 +225,53 @@ return result; } +// @Override + public List<Vessel> getAllFishingVessel2() { + Iterator<Object[]> list = queryListWithStatus( + "allSimpleVessels", + + "vesselTypeId", IntegerType.INSTANCE, enumeration.VESSEL_TYPE_ID_FISHING); + + Set<String> codes = Sets.newHashSet(); + List<Vessel> result = Lists.newArrayList(); + while (list.hasNext()) { + Object[] source = list.next(); + String vesselCode = (String) source[0]; + if (codes.add(vesselCode)) { + + if (log.isInfoEnabled()) { + log.info("VesselCode: "+vesselCode); + } + Vessel target = new Vessel(); + target.setId(vesselCode); + target.setName((String) source[1]); + setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[2], target); + result.add(target); + } + + +// Iterator<Object[]> source2 = queryList( +// "vessel2", +// "vesselCode", StringType.INSTANCE, vesselCode, +// "refDate", DateType.INSTANCE, new Date() +// ); +// +// if (source2.hasNext()) { +// Object[] next = source2.next(); +// +// target.setRegistrationCode((String) next[0]); +// target.setInternalRegistrationCode((String) next[1]); +// } + + } + return result; + } + @Override public Vessel getVessel(String vesselCode) { + if (log.isInfoEnabled()) { + log.info("get vessel: " + vesselCode); + } // Warning : return a list because more than one line could be found, // but 'order by' assume that the first one in the good row Iterator<Object[]> source = queryListWithStatus( @@ -158,7 +279,11 @@ "vesselCode", StringType.INSTANCE, vesselCode, "refDate", DateType.INSTANCE, new Date() ); - Vessel result = loadVessel(source.next()); + Vessel result; + if (source.hasNext()) + result = loadVessel(source.next()); + else + result = null; return result; } @@ -255,30 +380,6 @@ } @Override - public List<Species> getAllBenthosSpecies() { - TaxonRefTaxVO[] sources = taxonNameDao.getAllTaxonRefTax(); - - List<Species> result = Lists.newArrayList(); - for (TaxonRefTaxVO source : sources) { - Species target = loadSpecies(source); - result.add(target); - } - return result; - } - - @Override - public List<Species> getAllPlanktonSpecies() { - TaxonRefTaxVO[] sources = taxonNameDao.getAllTaxonRefTax(); - - List<Species> result = Lists.newArrayList(); - for (TaxonRefTaxVO source : sources) { - Species target = loadSpecies(source); - result.add(target); - } - return result; - } - - @Override public List<Caracteristic> getAllSpeciesLengthStepCaracteristic() { Iterator<Object[]> sources = queryListWithStatus( "allLengthStepCaracteristics", @@ -341,48 +442,6 @@ } @Override - public List<FishingOperationLocation> getAllFishingOperationStrata(String zoneId) { - Iterator<Object[]> sources = queryListWithStatus( - "allFishingOperationStratas", - "locationLevelId", IntegerType.INSTANCE, enumeration.LOCATION_LEVEL_ID_STRATA); - List<FishingOperationLocation> result = Lists.newArrayList(); - while (sources.hasNext()) { - Object[] source = sources.next(); - FishingOperationLocation target = loadFishingOperationLocation(source); - result.add(target); - } - return result; - } - - @Override - public List<FishingOperationLocation> getAllFishingOperationSubStrata(String locationId) { - Iterator<Object[]> sources = queryListWithStatus( - "allFishingOperationSubStratas", - "locationLevelId", IntegerType.INSTANCE, enumeration.LOCATION_LEVEL_ID_SUB_STRATA); - List<FishingOperationLocation> result = Lists.newArrayList(); - while (sources.hasNext()) { - Object[] source = sources.next(); - FishingOperationLocation target = loadFishingOperationLocation(source); - result.add(target); - } - return result; - } - - @Override - public List<FishingOperationLocation> getAllFishingOperationLocation(String locationId) { - Iterator<Object[]> sources = queryListWithStatus( - "allFishingOperationLocalites", - "locationLevelId", IntegerType.INSTANCE, enumeration.LOCATION_LEVEL_ID_LOCALITE); - List<FishingOperationLocation> result = Lists.newArrayList(); - while (sources.hasNext()) { - Object[] source = sources.next(); - FishingOperationLocation target = loadFishingOperationLocation(source); - result.add(target); - } - return result; - } - - @Override public Caracteristic getSizeCategoryCaracteristic() { Integer pmfmId = enumeration.PMFM_ID_SIZE_CATEGORY; Caracteristic result = getCaracteristic(pmfmId); @@ -412,14 +471,14 @@ @Override public Caracteristic getMacroWasteCategoryCaracteristic() { - Integer pmfmId = enumeration.PMFM_ID_MACRO_WASTE_CATEGORY; + Integer pmfmId = enumeration.PMFM_ID_MARINE_LITTER_TYPE; Caracteristic result = getCaracteristic(pmfmId); return result; } @Override public Caracteristic getMacroWasteSizeCategoryCaracteristic() { - Integer pmfmId = enumeration.PMFM_ID_MACRO_WASTE_SIZE_CATEGORY; + Integer pmfmId = enumeration.PMFM_ID_MARINE_LITTER_SIZE_CATEGORY; Caracteristic result = getCaracteristic(pmfmId); return result; } @@ -437,7 +496,30 @@ //-- Internal methods --// //------------------------------------------------------------------------// + protected List<FishingOperationLocation> getFishingOperationLocations(Integer locationLevelId, Integer parentId, Integer parentLocationLevelId) { + Iterator<Object[]> sources = queryListWithStatus( + "allFishingOperationLocation", + "parentId", IntegerType.INSTANCE, parentId, + "parentLocationLevelId", IntegerType.INSTANCE, parentLocationLevelId, + "locationClassificationId", IntegerType.INSTANCE, enumeration.LOCATION_CLASSIFICATION_ID_SECTOR, + "locationLevelId", IntegerType.INSTANCE, locationLevelId + ); + List<FishingOperationLocation> result = Lists.newArrayList(); + while (sources.hasNext()) { + Object[] source = sources.next(); + FishingOperationLocation target = new FishingOperationLocation(); + target.setId(String.valueOf(source[0])); + target.setLabel((String) source[1]); + target.setName((String) source[2]); +// target.setDescription((String)source[3]); + target.setLocationLevel((Integer) source[3]); + setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[4], target); + result.add(target); + } + return result; + } + protected Caracteristic loadCaracteristic(Object[] source) { Integer pmfmId = (Integer) source[0]; @@ -479,18 +561,6 @@ return result; } - protected FishingOperationLocation loadFishingOperationLocation(Object[] source) { - FishingOperationLocation target = new FishingOperationLocation(); - target.setId(String.valueOf(source[0])); - target.setLabel((String) source[1]); - target.setName((String) source[2]); -// target.setDescription((String)source[3]); - target.setLocationLevel((Integer) source[3]); - - setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[4], target); - return target; - } - protected Species loadSpecies(TaxonRefTaxVO source) { Species target = new Species(); target.setId(String.valueOf(source.getReferenceTaxonId())); Modified: trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/service/TuttiEnumerationFile.java =================================================================== --- trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/service/TuttiEnumerationFile.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/service/TuttiEnumerationFile.java 2013-01-29 08:24:13 UTC (rev 254) @@ -44,6 +44,9 @@ @Value("${GearClassificationId.FAO}") public final Integer GEAR_CLASSIFICIATION_ID_FISHING = null; + @Value("${LocationClassificationId.SECTOR}") + public final Integer LOCATION_CLASSIFICATION_ID_SECTOR = null; + @Value("${LocationLevelId.PAYS_ISO3}") public final Integer LOCATION_LEVEL_ID_COUNTRY = null; @@ -51,12 +54,12 @@ public final Integer LOCATION_LEVEL_ID_LOCALITE = null; @Value("${LocationLevelId.PROGRAM}") - public final Integer LOCATION_LEVEL_ID_PROGRAMM = null; + public final Integer LOCATION_LEVEL_ID_PROGRAM = null; @Value("${LocationLevelId.STRATA}") public final Integer LOCATION_LEVEL_ID_STRATA = null; - @Value("${LocationLevelId.SUBSTRATA}") + @Value("${LocationLevelId.SUB_STRATA}") public final Integer LOCATION_LEVEL_ID_SUB_STRATA = null; @Value("${MatrixId.GEAR}") @@ -92,11 +95,11 @@ @Value("${PmfmId.MATURITY}") public final Integer PMFM_ID_MATURITY = null; - @Value("${PmfmId.MACRO_WASTE_CATEGORY}") - public final Integer PMFM_ID_MACRO_WASTE_CATEGORY = null; + @Value("${PmfmId.MARINE_LITTER_TYPE}") + public final Integer PMFM_ID_MARINE_LITTER_TYPE = null; - @Value("${PmfmId.MACRO_WASTE_SIZE_CATEGORY}") - public final Integer PMFM_ID_MACRO_WASTE_SIZE_CATEGORY = null; + @Value("${PmfmId.MARINE_LITTER_SIZE_CATEGORY}") + public final Integer PMFM_ID_MARINE_LITTER_SIZE_CATEGORY = null; @Value("${UnitId.NONE}") public final Integer UNIT_ID_NONE = null; @@ -118,10 +121,10 @@ @Value("${LocationLevelId.RECTANGLE_STATISTIQUE_MED}") public final Integer RECTANGLE_STATISTIQUE_MED = null; - + @Value("${LocationLevelId.RECTANGLE_STATISTIQUE}") public final Integer RECTANGLE_STATISTIQUE = null; - + @Value("${LocationLevelId.FAO_ZONE}") public final Integer FAO_ZONE = null; @@ -163,10 +166,10 @@ @Value("${QualitativeValueId.HAUL_VALID_NO}") public final Integer QUALITATIVE_HAUL_VALID_NO = null; - + @Value("${PmfmId.TRAWL_NET}") public final Integer PMFM_ID_TRAWL_NET = null; - + @Value("${PmfmId.TRAWL_NET_NUMBER}") public final Integer PMFM_ID_TRAWL_NET_NUMBER = null; Modified: trunk/tutti-persistence-adagio/src/main/resources/queries-override.hbm.xml =================================================================== --- trunk/tutti-persistence-adagio/src/main/resources/queries-override.hbm.xml 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-persistence-adagio/src/main/resources/queries-override.hbm.xml 2013-01-29 08:24:13 UTC (rev 254) @@ -356,9 +356,11 @@ FROM LocationImpl l WHERE l.locationLevel.id = :locationLevelId + AND l.locationClassification.id = :locationClassificationId AND l.status.code IN (:statusValidCode, :statusTemporaryCode) ]]> <query-param name="locationLevelId" type="java.lang.Integer"/> + <query-param name="locationClassificationId" type="java.lang.Integer"/> <query-param name="statusValidCode" type="java.lang.String"/> <query-param name="statusTemporaryCode" type="java.lang.String"/> </query> @@ -381,7 +383,35 @@ <query-param name="statusTemporaryCode" type="java.lang.String"/> </query> - <!-- [REF-03] et [REF-04] Get all vessel for a given vesselType --> + <!-- [REF-03] Get all fishing operation strata / substrata / localite --> + <query cacheable="true" name="allFishingOperationLocation"> + <![CDATA[ + SELECT + l.id as locationId, + l.label as locationLabel, + l.name as locationName, + l.locationLevel.id as locationLevelId, + l.status as status + FROM + LocationImpl l, + LocationHierarchyImpl lh + WHERE + l.status.code IN (:statusValidCode, :statusTemporaryCode) + AND l.locationLevel.id = :locationLevelId + AND l.locationClassification.id = :locationClassificationId + AND l.id = lh.locationHierarchyPk.location.id + AND lh.locationHierarchyPk.parent.id = :parentId + AND lh.locationHierarchyPk.parent.locationLevel.id = :parentLocationLevelId + ]]> + <query-param name="parentId" type="java.lang.Integer"/> + <query-param name="parentLocationLevelId" type="java.lang.Integer"/> + <query-param name="locationLevelId" type="java.lang.Integer"/> + <query-param name="locationClassificationId" type="java.lang.Integer"/> + <query-param name="statusValidCode" type="java.lang.String"/> + <query-param name="statusTemporaryCode" type="java.lang.String"/> + </query> + + <!-- [REF-04] et [REF-05] Get all vessel for a given vesselType --> <query cacheable="true" name="allVessels"> <![CDATA[ SELECT @@ -420,6 +450,26 @@ <query-param name="statusTemporaryCode" type="java.lang.String"/> </query> + <query cacheable="true" name="allSimpleVessels"> + <![CDATA[ + SELECT + v.code AS vesselCode, + vf.name AS vesselName, + v.status AS status, + vf.startDateTime + FROM + VesselImpl v + INNER JOIN v.vesselFeatures AS vf + WHERE + v.vesselType.id = :vesselTypeId + AND v.status.code IN (:statusValidCode, :statusTemporaryCode) + ORDER BY vf.startDateTime DESC + ]]> + <query-param name="vesselTypeId" type="java.lang.Integer"/> + <query-param name="statusValidCode" type="java.lang.String"/> + <query-param name="statusTemporaryCode" type="java.lang.String"/> + </query> + <!-- Get a vessel for a given vesselType --> <query cacheable="true" name="vessel"> <![CDATA[ @@ -447,7 +497,26 @@ <query-param name="statusTemporaryCode" type="java.lang.String"/> </query> - <!-- [REF-04] [REF-05] Get all gears --> + <!-- Get a vessel for a given vesselType --> + <query cacheable="true" name="vessel2"> + <![CDATA[ + SELECT + vrp.registrationCode AS nationalRegistrationCode, + vrp.internationalRegistrationCode as internationalRegistrationCode + FROM + VesselImpl v + INNER JOIN v.vesselRegistrationPeriods AS vrp + WHERE + v.code = :vesselCode + AND NOT(coalesce(vrp.endDateTime, '2999-12-31 00:00:00') < coalesce(:refDate,sysdate) + OR vrp.vesselRegistrationPeriodPk.startDateTime > coalesce(:refDate,sysdate) + ) + ]]> + <query-param name="vesselCode" type="java.lang.String"/> + <query-param name="refDate" type="java.util.Date"/> + </query> + + <!-- [REF-06] [REF-07] Get all gears --> <query cacheable="true" name="allGears"> <![CDATA[ SELECT @@ -479,7 +548,7 @@ <query-param name="gearId" type="java.lang.Integer"/> </query> - <!-- [REF-07] Get all persons --> + <!-- [REF-08] Get all persons --> <query cacheable="true" name="allPersons"> <![CDATA[ SELECT DISTINCT @@ -507,7 +576,7 @@ <query-param name="statusTemporaryCode" type="java.lang.String"/> </query> - <!-- [REF-07-1] Get one person --> + <!-- [REF-08-1] Get one person --> <query cacheable="true" name="person"> <![CDATA[ SELECT DISTINCT @@ -522,7 +591,7 @@ <query-param name="personId" type="java.lang.Integer"/> </query> - <!-- [REF-09] Get all length step catacteristics --> + <!-- [REF-16] Get all length step catacteristics --> <query cacheable="true" name="allLengthStepCaracteristics"> <![CDATA[ SELECT @@ -556,66 +625,4 @@ <query-param name="statusTemporaryCode" type="java.lang.String"/> </query> - <!-- [REF-13] Get all fishing operation strates --> - <query cacheable="true" name="allFishingOperationStratas"> - <![CDATA[ - SELECT - l.id as locationId, - l.label as locationLabel, - l.name as locationName, - l.locationLevel.id as locationLevelId, - l.status as status - FROM LocationImpl l - WHERE - l.status.code IN (:statusValidCode, :statusTemporaryCode) - AND l.locationLevel.id = :locationLevelId - ]]> - <query-param name="locationLevelId" type="java.lang.Integer"/> - <query-param name="statusValidCode" type="java.lang.String"/> - <query-param name="statusTemporaryCode" type="java.lang.String"/> - </query> - - <!-- [REF-14] Get all fishing operation substrates --> - <query cacheable="true" name="allFishingOperationSubStratas"> - <![CDATA[ - SELECT - l.id as locationId, - l.label as locationLabel, - l.name as locationName, - l.locationLevel.id as locationLevelId, - l.status as status - FROM LocationImpl l - WHERE - l.status.code IN (:statusValidCode, :statusTemporaryCode) - AND l.locationLevel.id = :locationLevelId - ]]> - <query-param name="locationLevelId" type="java.lang.Integer"/> - <query-param name="statusValidCode" type="java.lang.String"/> - <query-param name="statusTemporaryCode" type="java.lang.String"/> - </query> - - <!-- [REF-15] Get all fishing operation localites --> - <query cacheable="true" name="allFishingOperationLocalites"> - <![CDATA[ - SELECT - l.id as locationId, - l.label as locationLabel, - l.name as locationName, - l.locationLevel.id as locationLevelId, - l.status as status - FROM LocationImpl l - WHERE - l.status.code IN (:statusValidCode, :statusTemporaryCode) - AND l.locationLevel.id = :locationLevelId - ]]> - <query-param name="locationLevelId" type="java.lang.Integer"/> - <query-param name="statusValidCode" type="java.lang.String"/> - <query-param name="statusTemporaryCode" type="java.lang.String"/> - </query> - - <!-- TODO [REF-16] Get all Length - Weight conversions --> - <!--query cacheable="true" name="allLengthWeightConvertions"> - <![CDATA[]]> - </query--> - </hibernate-mapping> Modified: trunk/tutti-persistence-adagio/src/main/resources/tutti-db-enumerations.properties =================================================================== --- trunk/tutti-persistence-adagio/src/main/resources/tutti-db-enumerations.properties 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-persistence-adagio/src/main/resources/tutti-db-enumerations.properties 2013-01-29 08:24:13 UTC (rev 254) @@ -300,14 +300,22 @@ # 10/01/2012 BLA Need to retrieve a Location from a given position (Lat/Long) LocationLevelId.RECTANGLE_STATISTIQUE_MED=145 -# Ajout pour Tutti -LocationLevelId.LOCALITE=22 -LocationLevelId.STRATA=23 -#TODO Creer la bonne valeur -LocationLevelId.SUBSTRATA=113 -#TODO Mettre la bonne valeur -LocationLevelId.PROGRAM=101 +################################################################################ +### Ajout pour Tutti ########################################################### +################################################################################ +# zone d'étude +LocationLevelId.PROGRAM=230 +# strate +LocationLevelId.STRATA=231 +# sous strate +LocationLevelId.SUB_STRATA=232 +# localité +LocationLevelId.LOCALITE=233 +# radiale +LocationLevelId.RADIALE=233 + + MethodId.DECLARATION=1 MatrixId.BATCH=1 @@ -320,12 +328,16 @@ PmfmId.SEX=196 PmfmId.SIZE_CATEGORY=198 PmfmId.SORTED_UNSORTED=200 -# TODO A confirmer -PmfmId.MATURITY=1181 -#TODO A créér -PmfmId.MACRO_WASTE_CATEGORY=1181 -#TODO A créér -PmfmId.MACRO_WASTE_SIZE_CATEGORY=1181 + +# Catégorie maturité +PmfmId.MATURITY=174 + +# Catégorie macro-déchet +PmfmId.MARINE_LITTER_TYPE=1421 + +# Classe de taille macro-déchet +PmfmId.MARINE_LITTER_SIZE_CATEGORY=1422 + # TODO A creer (dans les enumerations Allegro) PmfmId.STATION_NUMBER=1243 # TODO A creer (dans les enumerations Allegro) Modified: trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/DatabaseFixtures.java =================================================================== --- trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/DatabaseFixtures.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/DatabaseFixtures.java 2013-01-29 08:24:13 UTC (rev 254) @@ -39,21 +39,28 @@ public String cruiseId() { return "100000"; } - + public String fishingVesselCode() { return "851751"; } - + + public String zoneId() { + //TODO TC : use an existing value + return "-1"; + } + public String strataId() { - return "20990"; /*= Strate 24E4*/ + //TODO TC : use an existing value + return "-1"; } - + public String subStrataId() { - // TODO TC : change ID into a real substrata ! - return "6080"; /*= Rectangle 24E4 */ - } - + //TODO TC : use an existing value + return "-1"; + } + public String localite() { - return "21525"; /*= Localité 4F1 */ - } + //TODO TC : use an existing value + return "-1"; + } } Modified: trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceServiceTest.java =================================================================== --- trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceServiceTest.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceServiceTest.java 2013-01-29 08:24:13 UTC (rev 254) @@ -120,7 +120,7 @@ public void getAllProgramZone() { List<Zone> result = service.getAllProgramZone(); Assert.assertNotNull(result); - Assert.assertEquals(240, result.size()); + Assert.assertEquals(0, result.size()); persistList(Zone.class, result); assertSize(result, storage.getAllProgramZone()); @@ -131,11 +131,66 @@ List<Country> result = service.getAllCountry(); Assert.assertNotNull(result); Assert.assertEquals(240, result.size()); + persistList(Country.class, result); assertSize(result, storage.getAllCountry()); } @Test + public void getAllFishingOperationStrata(/*String zoneId*/) { + String zoneId = dbResource.getFixtures().zoneId(); + List<FishingOperationLocation> result = + service.getAllFishingOperationStrata(zoneId); + Assert.assertNotNull(result); + Assert.assertEquals(0, result.size()); + + persistList(FishingOperationLocation.class, "Strata", result); + assertSize(result, storage.getAllFishingOperationStrata(zoneId)); + } + + @Test + public void getAllFishingOperationSubStrata(/*String zoneId, String strataId*/) { + String zoneId = dbResource.getFixtures().zoneId(); + List<FishingOperationLocation> result = + service.getAllFishingOperationSubStrata(zoneId, null); + Assert.assertNotNull(result); + Assert.assertEquals(0, result.size()); + + persistList(FishingOperationLocation.class, "SubStrata", result); + assertSize(result, storage.getAllFishingOperationSubStrata(zoneId, null)); + + // try with a strataId + String strataId = dbResource.getFixtures().strataId(); + result = service.getAllFishingOperationLocation(zoneId, strataId, null); + Assert.assertNotNull(result); + Assert.assertEquals(0, result.size()); + } + + @Test + public void getAllFishingOperationLocation(/*String zoneId, String strataId, String subStrataId*/) { + String zoneId = dbResource.getFixtures().zoneId(); + List<FishingOperationLocation> result = + service.getAllFishingOperationLocation(zoneId, null, null); + Assert.assertNotNull(result); + Assert.assertEquals(0, result.size()); + + persistList(FishingOperationLocation.class, "Localite", result); + assertSize(result, storage.getAllFishingOperationLocation(zoneId, null, null)); + + // try with a strataId + String strataId = dbResource.getFixtures().strataId(); + result = service.getAllFishingOperationLocation(zoneId, strataId, null); + Assert.assertNotNull(result); + Assert.assertEquals(0, result.size()); + + // try with a subStrataId + String subStrataId = dbResource.getFixtures().subStrataId(); + result = service.getAllFishingOperationLocation(zoneId, strataId, subStrataId); + Assert.assertNotNull(result); + Assert.assertEquals(0, result.size()); + } + + @Test public void getAllScientificVessel() { List<Vessel> result = service.getAllScientificVessel(); Assert.assertNotNull(result); @@ -146,11 +201,11 @@ //FIXME : requete trop longue (index manquant, trop de jointures?) @Test - @Ignore +// @Ignore public void getAllFishingVessel() { List<Vessel> result = service.getAllFishingVessel(); Assert.assertNotNull(result); - Assert.assertEquals(187, result.size()); + Assert.assertEquals(31620, result.size()); persistList(Vessel.class, "Fishing", result); assertSize(result, storage.getAllFishingVessel()); } @@ -192,58 +247,10 @@ } @Test - public void getAllBenthosSpecies() { - List<Species> result = service.getAllBenthosSpecies(); - Assert.assertNotNull(result); - Assert.assertEquals(8435, result.size()); - persistList(Species.class, "Benthos", result); - assertSize(result, storage.getAllBenthosSpecies()); - } - - @Test - public void getAllPlanktonSpecies() { - List<Species> result = service.getAllPlanktonSpecies(); - Assert.assertNotNull(result); - Assert.assertEquals(8435, result.size()); - persistList(Species.class, "Plankton", result); - assertSize(result, storage.getAllPlanktonSpecies()); - } - - @Test public void getSpecies(/*String speciesId*/) { } @Test - public void getAllFishingOperationStrata(/*String zoneId*/) { - List<FishingOperationLocation> result = - service.getAllFishingOperationStrata(null); - Assert.assertNotNull(result); - Assert.assertEquals(596, result.size()); - persistList(FishingOperationLocation.class, "Strata", result); - assertSize(result, storage.getAllFishingOperationStrata(null)); - } - - @Test - public void getAllFishingOperationSubStrata(/*String locationId*/) { - List<FishingOperationLocation> result = - service.getAllFishingOperationSubStrata(null); - Assert.assertNotNull(result); - Assert.assertEquals(0, result.size()); - persistList(FishingOperationLocation.class, "SubStrata", result); - assertSize(result, storage.getAllFishingOperationSubStrata(null)); - } - - @Test - public void getAllFishingOperationLocation(/*String locationId*/) { - List<FishingOperationLocation> result = - service.getAllFishingOperationLocation(null); - Assert.assertNotNull(result); - Assert.assertEquals(322, result.size()); - persistList(FishingOperationLocation.class, "Localite", result); - assertSize(result, storage.getAllFishingOperationLocation(null)); - } - - @Test public void getAllFishingOperationEnvironmentCaracteristic() { List<Caracteristic> result = service.getAllFishingOperationEnvironmentCaracteristic(); Assert.assertNotNull(result); @@ -308,11 +315,13 @@ @Test public void getMaturityCaracteristic() { Caracteristic result = service.getMaturityCaracteristic(); - assertCaracteristicQualitative(result, 10); + assertCaracteristicQualitative(result, 6); persist(Caracteristic.class, ReferentialPersistenceServiceDevImpl.CaracteristicEnum.MaturityCategory.name(), result); assertCaracteristicSize(result, storage.getMaturityCaracteristic()); } + //TODO Use this with new database + @Ignore @Test public void getMacroWasteCategoryCaracteristic() { Caracteristic result = service.getMacroWasteCategoryCaracteristic(); @@ -321,6 +330,8 @@ assertCaracteristicSize(result, storage.getMacroWasteCategoryCaracteristic()); } + //TODO Use this with new database + @Ignore @Test public void getMacroWasteSizeCategoryCaracteristic() { Caracteristic result = service.getMacroWasteSizeCategoryCaracteristic(); Modified: trunk/tutti-persistence-dev/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceDevImpl.java =================================================================== --- trunk/tutti-persistence-dev/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceDevImpl.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-persistence-dev/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceDevImpl.java 2013-01-29 08:24:13 UTC (rev 254) @@ -111,8 +111,6 @@ "fr.ifremer.tutti.persistence.entities.referential.Gear#Fishing", "fr.ifremer.tutti.persistence.entities.referential.Person", "fr.ifremer.tutti.persistence.entities.referential.Species", - "fr.ifremer.tutti.persistence.entities.referential.Species#Benthos", - "fr.ifremer.tutti.persistence.entities.referential.Species#Plankton", "fr.ifremer.tutti.persistence.entities.referential.Vessel#Scientific", "fr.ifremer.tutti.persistence.entities.referential.Vessel#Fishing", "fr.ifremer.tutti.persistence.entities.referential.Zone" @@ -244,6 +242,26 @@ } @Override + public List<FishingOperationLocation> getAllFishingOperationStrata(String zoneId) { + return referentialPersistenceService.getAllFishingOperationStrata(zoneId); + } + + @Override + public List<FishingOperationLocation> getAllFishingOperationSubStrata(String zoneId, + String strataId) { + return referentialPersistenceService.getAllFishingOperationSubStrata( + zoneId, strataId); + } + + @Override + public List<FishingOperationLocation> getAllFishingOperationLocation(String zoneId, + String strataId, + String subStrataId) { + return referentialPersistenceService.getAllFishingOperationLocation( + zoneId, strataId, subStrataId); + } + + @Override public List<Vessel> getAllFishingVessel() { return referentialPersistenceService.getAllFishingVessel(); } @@ -263,36 +281,11 @@ } @Override - public List<Species> getAllBenthosSpecies() { - return referentialPersistenceService.getAllBenthosSpecies(); - } - - @Override - public List<Species> getAllPlanktonSpecies() { - return referentialPersistenceService.getAllPlanktonSpecies(); - } - - @Override public Species getSpecies(String speciesId) { return referentialPersistenceService.getSpecies(speciesId); } @Override - public List<FishingOperationLocation> getAllFishingOperationStrata(String zoneId) { - return referentialPersistenceService.getAllFishingOperationStrata(zoneId); - } - - @Override - public List<FishingOperationLocation> getAllFishingOperationSubStrata(String locationId) { - return referentialPersistenceService.getAllFishingOperationSubStrata(locationId); - } - - @Override - public List<FishingOperationLocation> getAllFishingOperationLocation(String locationId) { - return referentialPersistenceService.getAllFishingOperationLocation(locationId); - } - - @Override public List<Caracteristic> getAllFishingOperationEnvironmentCaracteristic() { return referentialPersistenceService.getAllFishingOperationEnvironmentCaracteristic(); } Modified: trunk/tutti-persistence-dev/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceServiceDevImpl.java =================================================================== --- trunk/tutti-persistence-dev/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceServiceDevImpl.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-persistence-dev/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceServiceDevImpl.java 2013-01-29 08:24:13 UTC (rev 254) @@ -40,8 +40,6 @@ import java.util.List; -import javax.naming.OperationNotSupportedException; - import static fr.ifremer.tutti.persistence.TuttiPersistenceDevImpl.getKey; /** @@ -81,36 +79,42 @@ } @Override - public List<Species> getAllBenthosSpecies() { - List<Species> result = getDataInNewList(getKey(Species.class, "Benthos")); + public Species getSpecies(String id) { + Species result = getBean(Species.class.getName(), id); return result; } @Override - public List<Species> getAllPlanktonSpecies() { - List<Species> result = getDataInNewList(getKey(Species.class, "Plankton")); + public List<Zone> getAllProgramZone() { + List<Zone> result = getDataInNewList(Zone.class.getName()); return result; } @Override - public Species getSpecies(String id) { - Species result = getBean(Species.class.getName(), id); + public List<Country> getAllCountry() { + List<Country> result = getDataInNewList(Country.class.getName()); return result; } @Override - public List<Zone> getAllProgramZone() { - List<Zone> result = getDataInNewList(Zone.class.getName()); + public List<FishingOperationLocation> getAllFishingOperationStrata(String zoneId) { + List<FishingOperationLocation> result = getDataInNewList(getKey(FishingOperationLocation.class, "Strata")); return result; } @Override - public List<Country> getAllCountry() { - List<Country> result = getDataInNewList(Country.class.getName()); + public List<FishingOperationLocation> getAllFishingOperationSubStrata(String zoneId, String strataId) { + List<FishingOperationLocation> result = getDataInNewList(getKey(FishingOperationLocation.class, "SubStrata")); return result; } @Override + public List<FishingOperationLocation> getAllFishingOperationLocation(String zoneId, String strataId, String subStrataId) { + List<FishingOperationLocation> result = getDataInNewList(getKey(FishingOperationLocation.class, "Localite")); + return result; + } + + @Override public List<Vessel> getAllScientificVessel() { List<Vessel> result = getDataInNewList(getKey(Vessel.class, "Scientific")); return result; @@ -141,24 +145,6 @@ } @Override - public List<FishingOperationLocation> getAllFishingOperationStrata(final String zoneId) { - List<FishingOperationLocation> result = getDataInNewList(getKey(FishingOperationLocation.class, "Strata")); - return result; - } - - @Override - public List<FishingOperationLocation> getAllFishingOperationSubStrata(final String locationId) { - List<FishingOperationLocation> result = getDataInNewList(getKey(FishingOperationLocation.class, "SubStrata")); - return result; - } - - @Override - public List<FishingOperationLocation> getAllFishingOperationLocation(final String locationId) { - List<FishingOperationLocation> result = getDataInNewList(getKey(FishingOperationLocation.class, "Localite")); - return result; - } - - @Override public List<Caracteristic> getAllFishingOperationEnvironmentCaracteristic() { return getAllCaracteristic(CaracteristicEnum.Environment); } @@ -229,12 +215,12 @@ @Override public boolean isSortedQualitativeValue(CaracteristicQualitativeValue value) { - return value !=null && value.getId().equals("311"); + return value != null && value.getId().equals("311"); } - + @Override public Caracteristic getCaracteristic(Integer pmfmId) { - throw new RuntimeException("getCaracteristic() not supports is only support in tutti-persistence-adagio"); + throw new RuntimeException("getCaracteristic() not supports is only support in tutti-persistence-adagio"); } protected <B extends IdAware> List<B> getData(String entityType) { @@ -263,6 +249,6 @@ Caracteristic result = data.get(0); return result; } - + } 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-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/PersistenceService.java 2013-01-29 08:24:13 UTC (rev 254) @@ -174,16 +174,6 @@ } @Override - public List<Species> getAllBenthosSpecies() { - return devDriver.getAllBenthosSpecies(); - } - - @Override - public List<Species> getAllPlanktonSpecies() { - return devDriver.getAllPlanktonSpecies(); - } - - @Override public Species getSpecies(String speciesId) { return devDriver.getSpecies(speciesId); } @@ -219,13 +209,13 @@ } @Override - public List<FishingOperationLocation> getAllFishingOperationSubStrata(String locationId) { - return devDriver.getAllFishingOperationSubStrata(locationId); + public List<FishingOperationLocation> getAllFishingOperationSubStrata(String zoneId, String strataId) { + return devDriver.getAllFishingOperationSubStrata(zoneId, strataId); } @Override - public List<FishingOperationLocation> getAllFishingOperationLocation(String locationId) { - return devDriver.getAllFishingOperationLocation(locationId); + public List<FishingOperationLocation> getAllFishingOperationLocation(String zoneId, String strataId, String subStrataId) { + return devDriver.getAllFishingOperationLocation(zoneId, strataId, subStrataId); } @Override Modified: trunk/tutti-ui-swing/pom.xml =================================================================== --- trunk/tutti-ui-swing/pom.xml 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-ui-swing/pom.xml 2013-01-29 08:24:13 UTC (rev 254) @@ -75,8 +75,6 @@ target/${project.build.finalName}-full-linux-x64.zip </redmine.releaseFiles> - <jreVersion>1.7.10</jreVersion> - </properties> <build> @@ -403,6 +401,7 @@ <groupId>com.oracle</groupId> <artifactId>jre</artifactId> <version>${jreVersion}</version> + <type>zip</type> <classifier>linux-i586</classifier> </artifactItem> </artifactItems> @@ -423,6 +422,7 @@ <groupId>com.oracle</groupId> <artifactId>jre</artifactId> <version>${jreVersion}</version> + <type>zip</type> <classifier>linux-x64</classifier> </artifactItem> </artifactItems> @@ -443,6 +443,7 @@ <groupId>com.oracle</groupId> <artifactId>jre</artifactId> <version>${jreVersion}</version> + <type>zip</type> <classifier>windows-i586</classifier> </artifactItem> </artifactItems> @@ -463,6 +464,7 @@ <groupId>com.oracle</groupId> <artifactId>jre</artifactId> <version>${jreVersion}</version> + <type>zip</type> <classifier>windows-x64</classifier> </artifactItem> </artifactItems> Modified: trunk/tutti-ui-swing/src/main/assembly/full/tutti.sh =================================================================== --- trunk/tutti-ui-swing/src/main/assembly/full/tutti.sh 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-ui-swing/src/main/assembly/full/tutti.sh 2013-01-29 08:24:13 UTC (rev 254) @@ -13,7 +13,7 @@ cp tutti-app/update.sh . ./update.sh - ./tutti-app/launch.sh --option tutti.mode=full + ./tutti-app/launch.sh --option tutti.launch.mode=full exitcode=$? echo "exitCode: $exitcode" Deleted: trunk/tutti-ui-swing/src/main/assembly/min/update-application.properties =================================================================== --- trunk/tutti-ui-swing/src/main/assembly/min/update-application.properties 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-ui-swing/src/main/assembly/min/update-application.properties 2013-01-29 08:24:13 UTC (rev 254) @@ -1,34 +0,0 @@ -### -# #%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% -### -tutti.version=1.1 -tutti.url=zip:file:/tmp/tutti-1.1-standalone.zip -jre.version=1.7.10 -#linux.amd64.jre.version=1.7.10 -linux.amd64.jre.url=zip:file:~/.m2/repository/com/oracle/jre/1.7.10/jre-1.7.10-linux-x64.jar -#linux.i386.jre.version=1.7.10 -linux.i386.jre.url=zip:file:~/.m2/repository/com/oracle/jre/1.7.10/jre-1.7.10-linux-i586.jar -#windows.amd64.jre.version=1.7.10 -windows.amd64.jre.url=zip:file:~/.m2/repository/com/oracle/jre/1.7.10/jre-1.7.10-windows-x64.jar -#windows.i386.jre.version=1.7.10 -windows.i386.jre.url=zip:file:~/.m2/repository/com/oracle/jre/1.7.10/jre-1.7.10-windows-i586.jar Modified: trunk/tutti-ui-swing/src/main/assembly/min/update-database.properties =================================================================== --- trunk/tutti-ui-swing/src/main/assembly/min/update-database.properties 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-ui-swing/src/main/assembly/min/update-database.properties 2013-01-29 08:24:13 UTC (rev 254) @@ -21,5 +21,5 @@ # <http://www.gnu.org/licenses/gpl-3.0.html>. # #L% ### -adagiodb.version=1.0 -adagiodb.url=zip:file:/tmp/tutti-1.1-standalone.zip +db.version=2013.01.28 +db.url=zip:file:/tmp/adagio-2013.01.28.zip Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/RunTutti.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/RunTutti.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/RunTutti.java 2013-01-29 08:24:13 UTC (rev 254) @@ -59,14 +59,19 @@ // prepare context (mainly init configs, i18n) context.init(); - //TODO tutti.mode=full alors mise a jour + String launchMode = config.getTuttiLaunchMode(); - // try to update jre - updateTuttiJre(context); + if ("full".equals(launchMode)) { - // try to update application - updateTuttiApplication(context); + if (log.isInfoEnabled()) { + log.info("Full launch mode, try to update jre / application."); + } + // do the application and jre updates + // try to update jre or/and application + updateTuttiJreOrApplication(context); + } + // try to update database updateTuttiDatabase(context); @@ -110,48 +115,21 @@ } } - public static void updateTuttiJre(TuttiUIContext context) { - + public static void updateTuttiJreOrApplication(TuttiUIContext context) { TuttiConfig config = context.getConfig(); - File current = config.getJreDirectory(); + File current = config.getTuttiBasedir(); if (current == null || !current.exists()) { - // can not update jre - if (log.isWarnEnabled()) { - log.warn("No jre directory defined, skip jre update."); - } - } else { - - String url = config.getApplicationUpdateUrl(); - if (log.isInfoEnabled()) { - log.info(String.format("Try to update jre (current jre location: %s), using update url: %s", current, url)); - } - ApplicationUpdater up = new ApplicationUpdater(); - File dest = config.getTuttiBasedir(); - up.update(url, - current, - dest, - false, - new TuttiJreUpdaterCallBack(context)); - } - } - - public static void updateTuttiApplication(TuttiUIContext context) { - TuttiConfig config = context.getConfig(); - - File current = config.getApplicationDirectory(); - if (current == null || !current.exists()) { - // can not update application if (log.isWarnEnabled()) { - log.warn("No application directory defined, skip application update."); + log.warn("No application directory defined, skip jre or application update."); } } else { String url = config.getApplicationUpdateUrl(); if (log.isInfoEnabled()) { - log.info(String.format("Try to update application (current application location: %s), using update url: %s", current, url)); + log.info(String.format("Try to update jre or application (current application location: %s), using update url: %s", current, url)); } ApplicationUpdater up = new ApplicationUpdater(); @@ -160,9 +138,8 @@ current, dest, false, - new TuttiApplicationUpdaterCallBack(context)); + new TuttiApplicationUpdaterCallBack()); } - } public static void updateTuttiDatabase(TuttiUIContext context) { @@ -176,9 +153,9 @@ log.info(String.format("Try to update database (current database location: %s), using update url: %s", current, url)); } up.update(url, - current, + current.getParentFile(), dest, false, - new TuttiDatabaseUpdaterCallBack(context)); + new TuttiDatabaseUpdaterCallBack()); } } \ No newline at end of file Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiApplicationUpdaterCallBack.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiApplicationUpdaterCallBack.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiApplicationUpdaterCallBack.java 2013-01-29 08:24:13 UTC (rev 254) @@ -24,46 +24,107 @@ * #L% */ +import com.google.common.collect.Maps; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.nuiton.util.ApplicationUpdater; +import java.util.Map; + /** - * CallBack to update jre. TODO EMrger + * CallBack to update jre and/or tutti-app. * * @author tchemit <chemit@codelutin.com> * @since 1.0 */ -public class TuttiApplicationUpdaterCallBack extends TuttiUpdaterCallBack { +public class TuttiApplicationUpdaterCallBack implements ApplicationUpdater.ApplicationUpdaterCallback { /** Logger. */ private static final Log log = LogFactory.getLog(TuttiApplicationUpdaterCallBack.class); - public static final String APP_KEY = "tutti"; + public static final String TUTTI_APP = "tutti-app"; - public TuttiApplicationUpdaterCallBack(TuttiUIContext context) { - super(context, APP_KEY); + public static final String JRE = "jre"; + + @Override + public Map<String, ApplicationUpdater.ApplicationInfo> updateToDo(Map<String, ApplicationUpdater.ApplicationInfo> appToUpdate) { + Map<String, ApplicationUpdater.ApplicationInfo> result = Maps.newHashMap(); + + ApplicationUpdater.ApplicationInfo applicationInfo; + applicationInfo = getJreApplicationInfo(appToUpdate); + if (applicationInfo != null) { + result.put(JRE, applicationInfo); + } + applicationInfo = getTuttiAppApplicationInfo(appToUpdate); + if (applicationInfo != null) { + result.put(TUTTI_APP, applicationInfo); + } + return result; } @Override - protected void updateDone(ApplicationUpdater.ApplicationInfo applicationInfo, - Exception error) { + public void updateDone(Map<String, ApplicationUpdater.ApplicationInfo> appToUpdate, + Map<String, Exception> appUpdateError) { - if (error != null) { + boolean doRestart = false; + if (appUpdateError.containsKey(JRE)) { - //error when update database - if (log.isWarnEnabled()) { - log.warn("Could not update tutti application", error); + // something bad while updating jre + if (log.isErrorEnabled()) { + log.error("Could not update jre", + appUpdateError.get(JRE)); } } else { + ApplicationUpdater.ApplicationInfo info = getJreApplicationInfo(appToUpdate); + if (info != null) { - // launch a referential synchronize operation - if (log.isInfoEnabled()) { - log.info(String.format("A tutti application update was downloaded (oldVersion: %s, newVersion: %s), will restart application to use it", applicationInfo.oldVersion, applicationInfo.newVersion)); + if (log.isInfoEnabled()) { + log.info(String.format( + "A jre update was downloaded (oldVersion: %s, newVersion: %s), will restart application to use it", + info.oldVersion, info.newVersion)); + } } + doRestart = true; + } + if (appUpdateError.containsKey(TUTTI_APP)) { + + // something bad while updating application + if (log.isErrorEnabled()) { + log.error("Could not update tutti-app", + appUpdateError.get(TUTTI_APP)); + } + } else { + ApplicationUpdater.ApplicationInfo info = getTuttiAppApplicationInfo(appToUpdate); + if (info != null) { + + if (log.isInfoEnabled()) { + log.info(String.format( + "A tutti-app update was downloaded (oldVersion: %s, newVersion: %s), will restart application to use it", + info.oldVersion, info.newVersion)); + } + } + doRestart = true; + } + + if (doRestart) { System.exit(RunTutti.UPATE_EXIT_CODE); } } + + @Override + public void aborted(String propertiesURL, Exception eee) { + if (log.isErrorEnabled()) { + log.error("Could not update from " + propertiesURL, eee); + } + } + + protected ApplicationUpdater.ApplicationInfo getJreApplicationInfo(Map<String, ApplicationUpdater.ApplicationInfo> appToUpdate) { + return appToUpdate.get(JRE); + } + + protected ApplicationUpdater.ApplicationInfo getTuttiAppApplicationInfo(Map<String, ApplicationUpdater.ApplicationInfo> appToUpdate) { + return appToUpdate.get(TUTTI_APP); + } } Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiDatabaseUpdaterCallBack.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiDatabaseUpdaterCallBack.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiDatabaseUpdaterCallBack.java 2013-01-29 08:24:13 UTC (rev 254) @@ -24,53 +24,91 @@ * #L% */ +import com.google.common.collect.Maps; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.nuiton.util.ApplicationUpdater; import org.nuiton.util.Version; +import java.util.Map; + /** * CallBack to update tutti. * * @author tchemit <chemit@codelutin.com> * @since 1.0 */ -public class TuttiDatabaseUpdaterCallBack extends TuttiUpdaterCallBack { +public class TuttiDatabaseUpdaterCallBack implements ApplicationUpdater.ApplicationUpdaterCallback { /** Logger. */ private static final Log log = LogFactory.getLog(TuttiDatabaseUpdaterCallBack.class); - public static final String APP_KEY = "adagiodb"; + public static final String APP_KEY = "db"; - public TuttiDatabaseUpdaterCallBack(TuttiUIContext context) { - super(context, APP_KEY); + + @Override + public Map<String, ApplicationUpdater.ApplicationInfo> updateToDo(Map<String, ApplicationUpdater.ApplicationInfo> appToUpdate) { + Map<String, ApplicationUpdater.ApplicationInfo> result = Maps.newHashMap(); + + ApplicationUpdater.ApplicationInfo applicationInfo; + applicationInfo = appToUpdate.get(APP_KEY); + if (applicationInfo != null) { + result.put(APP_KEY, applicationInfo); + } + return result; } @Override - protected void updateDone(ApplicationUpdater.ApplicationInfo applicationInfo, - Exception error) { + public void updateDone(Map<String, ApplicationUpdater.ApplicationInfo> appToUpdate, + Map<String, Exception> appUpdateError) { - if (error != null) { + boolean doRestart = false; + if (appUpdateError.containsKey(APP_KEY)) { - //error when update database - if (log.isWarnEnabled()) { - log.warn("Could not update database", error); + // something bad while updating jre + if (log.isErrorEnabled()) { + log.error("Could not update database", + appUpdateError.get(APP_KEY)); } - } else if (Version.VZERO.toString().equals(applicationInfo.oldVersion)) { - - // first database, just copy it to correct directory - if (log.isInfoEnabled()) { - log.info("First time database was downloaded at version: " + applicationInfo.newVersion); - } - //TODO copie base au bon endroit pour utilisation directe } else { + ApplicationUpdater.ApplicationInfo info = appToUpdate.get(APP_KEY); + if (info != null) { - // launch a referential synchronize operation - if (log.isInfoEnabled()) { - log.info(String.format("A database update was downloaded (oldVersion: %s, newVersion: %s), will launch a referential synchronize operation ", applicationInfo.oldVersion, applicationInfo.newVersion)); + + if (Version.VZERO.toString().equals(info.oldVersion)) { + + // first database, just copy it to correct directory + + prepareFirstDatabase(info); + } else { + + // launch a referential synchronize operation + synchronizetDatabase(info); + } } - //TODO synchro referentiel } } + + @Override + public void aborted(String propertiesURL, Exception eee) { + if (log.isErrorEnabled()) { + log.error("Could not update from " + propertiesURL, eee); + } + } + + protected void prepareFirstDatabase(ApplicationUpdater.ApplicationInfo info) { + //TODO copie base au bon endroit pour utilisation directe + if (log.isInfoEnabled()) { + log.info("First time database was downloaded at version: " + info.newVersion); + } + } + + protected void synchronizetDatabase(ApplicationUpdater.ApplicationInfo info) { + //TODO synchro referential + if (log.isInfoEnabled()) { + log.info(String.format("A database update was downloaded (oldVersion: %s, newVersion: %s), will launch a referential synchronize operation ", info.oldVersion, info.newVersion)); + } + } + } Deleted: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiJreUpdaterCallBack.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiJreUpdaterCallBack.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiJreUpdaterCallBack.java 2013-01-29 08:24:13 UTC (rev 254) @@ -1,69 +0,0 @@ -package fr.ifremer.tutti.ui.swing; - -/* - * #%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.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.nuiton.util.ApplicationUpdater; - -/** - * CallBack to update jre. - * - * @author tchemit <chemit@codelutin.com> - * @since 1.0 - */ -public class TuttiJreUpdaterCallBack extends TuttiUpdaterCallBack { - - /** Logger. */ - private static final Log log = - LogFactory.getLog(TuttiJreUpdaterCallBack.class); - - public static final String APP_KEY = "jre"; - - public TuttiJreUpdaterCallBack(TuttiUIContext context) { - super(context, APP_KEY); - } - - @Override - protected void updateDone(ApplicationUpdater.ApplicationInfo applicationInfo, - Exception error) { - - if (error != null) { - - //error when update database - if (log.isWarnEnabled()) { - log.warn("Could not update database", error); - } - } else { - - // launch a referential synchronize operation - if (log.isInfoEnabled()) { - log.info(String.format("A jre update was downloaded (oldVersion: %s, newVersion: %s), will restart applicationto use it", applicationInfo.oldVersion, applicationInfo.newVersion)); - } - - System.exit(RunTutti.UPATE_EXIT_CODE); - } - } -} Deleted: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiUpdaterCallBack.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiUpdaterCallBack.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiUpdaterCallBack.java 2013-01-29 08:24:13 UTC (rev 254) @@ -1,102 +0,0 @@ -package fr.ifremer.tutti.ui.swing; - -/* - * #%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.collect.Maps; -import org.nuiton.util.ApplicationUpdater; - -import java.util.Map; - -/** - * CallBack to update tutti. - * - * @author tchemit <chemit@codelutin.com> - * @since 1.0 - */ -public abstract class TuttiUpdaterCallBack implements ApplicationUpdater.ApplicationUpdaterCallback { - - protected final TuttiUIContext context; - - protected final String app; - - protected ApplicationUpdater.ApplicationInfo applicationInfo; - - protected Exception error; - - public TuttiUpdaterCallBack(TuttiUIContext context, String app) { - this.context = context; - this.app = app; - } - - public boolean isSuccess() { - return error == null; - } - - public boolean isUpdateDone() { - return applicationInfo != null; - } - - public ApplicationUpdater.ApplicationInfo getApplicationInfo() { - return applicationInfo; - } - - public Exception getError() { - return error; - } - - @Override - public final Map<String, ApplicationUpdater.ApplicationInfo> updateToDo(Map<String, ApplicationUpdater.ApplicationInfo> appToUpdate) { - ApplicationUpdater.ApplicationInfo applicationInfo = appToUpdate.get(app); - if (applicationInfo != null) { - appToUpdate = Maps.newHashMap(); - appToUpdate.put(app, applicationInfo); - } - return appToUpdate; - } - - @Override - public final void updateDone(Map<String, ApplicationUpdater.ApplicationInfo> appToUpdate, - Map<String, Exception> appUpdateError) { - - ApplicationUpdater.ApplicationInfo applicationInfo = appToUpdate.get(app); - Exception exception = appUpdateError.get(app); - if (applicationInfo != null) { - - this.error = exception; - if (exception == null) { - this.applicationInfo = applicationInfo; - } - updateDone(applicationInfo, exception); - } - } - - @Override - public void aborted(String propertiesURL, Exception eee) { - this.error = eee; - } - - protected abstract void updateDone(ApplicationUpdater.ApplicationInfo applicationInfo, - Exception error); -} Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/config/TuttiConfig.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/config/TuttiConfig.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/config/TuttiConfig.java 2013-01-29 08:24:13 UTC (rev 254) @@ -146,6 +146,10 @@ return ReflectionToStringBuilder.toString(this); } + public String getTuttiLaunchMode() { + return applicationConfig.getOption(TuttiConfigOption.TUTTI_LAUNCH_MODE.getKey()); + } + /** @return {@link TuttiConfigOption#UI_CONFIG_FILE} value */ public File getUIConfigFile() { return applicationConfig.getOptionAsFile(TuttiConfigOption.UI_CONFIG_FILE.getKey()); @@ -265,12 +269,4 @@ public String getDatabaseUpdateUrl() { return applicationConfig.getOption(TuttiConfigOption.TUTTI_UPDATE_DATABASE_URL.getKey()); } - - public File getJreDirectory() { - return applicationConfig.getOptionAsFile(TuttiConfigOption.TUTTI_JRE_DIRECTORY.getKey()); - } - - public File getApplicationDirectory() { - return applicationConfig.getOptionAsFile(TuttiConfigOption.TUTTI_APPLICATION_DIRECTORY.getKey()); - } } Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/config/TuttiConfigOption.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/config/TuttiConfigOption.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/config/TuttiConfigOption.java 2013-01-29 08:24:13 UTC (rev 254) @@ -41,11 +41,15 @@ */ public enum TuttiConfigOption implements ApplicationConfig.OptionDef { - //TODO Utiliser une option full-mode pour trouver facilement le basedir + TUTTI_LAUNCH_MODE( + "tutti.launch.mode", + n_("tutti.launch.mode.description"), + null, + String.class, + true, + true + ), -// TUTTI_MODE( -// -// ), TUTTI_APPLICATION_BASEDIR( "tutti.application.basedir", n_("tutti.application.basedir.description"), @@ -55,24 +59,6 @@ true ), - TUTTI_JRE_DIRECTORY( - "tutti.jre.directory", - n_("tutti.jre.directory.description"), - "${tutti.application.basedir}/jre", - File.class, - true, - true - ), - - TUTTI_APPLICATION_DIRECTORY( - "tutti.application.directory", - n_("tutti.application.directory.description"), - "${tutti.application.basedir}/tutti-app", - File.class, - true, - true - ), - TUTTI_UPDATE_APPLICATION_URL( "tutti.update.application.url", n_("tutti.update.application.url.description"), Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/AddSpeciesAction.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/AddSpeciesAction.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/AddSpeciesAction.java 2013-01-29 08:24:13 UTC (rev 254) @@ -1,6 +1,30 @@ package fr.ifremer.tutti.ui.swing.content.operation.catches.species.split; +/* + * #%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.collect.Lists; import fr.ifremer.tutti.persistence.TuttiPersistence; import fr.ifremer.tutti.persistence.entities.referential.Species; Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/AddSpeciesAction.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/operation/catches/species/split/AddSpeciesUI.css =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/AddSpeciesUI.css 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/AddSpeciesUI.css 2013-01-29 08:24:13 UTC (rev 254) @@ -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% + */ #speciesCombo { showReset: true; i18nPrefix: "tutti.property."; Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/AddSpeciesUI.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/content/operation/catches/species/split/AddSpeciesUI.jaxx =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/AddSpeciesUI.jaxx 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/AddSpeciesUI.jaxx 2013-01-29 08:24:13 UTC (rev 254) @@ -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 layout='{new BorderLayout()}' id='addSpeciesPopup' implements='fr.ifremer.tutti.ui.swing.TuttiUI<AddSpeciesUIModel, AddSpeciesUIHandler>'> Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/AddSpeciesUI.jaxx ___________________________________________________________________ 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/operation/catches/species/split/AddSpeciesUIHandler.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/AddSpeciesUIHandler.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/AddSpeciesUIHandler.java 2013-01-29 08:24:13 UTC (rev 254) @@ -1,6 +1,30 @@ package fr.ifremer.tutti.ui.swing.content.operation.catches.species.split; +/* + * #%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.collect.Lists; import fr.ifremer.tutti.persistence.TuttiPersistence; import fr.ifremer.tutti.persistence.entities.referential.Caracteristic; Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/AddSpeciesUIHandler.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/operation/catches/species/split/AddSpeciesUIModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/AddSpeciesUIModel.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/AddSpeciesUIModel.java 2013-01-29 08:24:13 UTC (rev 254) @@ -1,6 +1,30 @@ package fr.ifremer.tutti.ui.swing.content.operation.catches.species.split; +/* + * #%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.collect.Lists; import fr.ifremer.tutti.persistence.entities.referential.Species; import fr.ifremer.tutti.ui.swing.AbstractTuttiBeanUIModel; Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/AddSpeciesUIModel.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/operation/fishing/CaracteristicRowModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/CaracteristicRowModel.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/CaracteristicRowModel.java 2013-01-29 08:24:13 UTC (rev 254) @@ -1,6 +1,30 @@ package fr.ifremer.tutti.ui.swing.content.operation.fishing; +/* + * #%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 fr.ifremer.tutti.persistence.entities.referential.Caracteristic; import fr.ifremer.tutti.ui.swing.AbstractTuttiBeanUIModel; import java.io.Serializable; Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/CaracteristicRowModel.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/operation/fishing/CaracteristicTabUIHandler.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/CaracteristicTabUIHandler.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/CaracteristicTabUIHandler.java 2013-01-29 08:24:13 UTC (rev 254) @@ -1,6 +1,30 @@ package fr.ifremer.tutti.ui.swing.content.operation.fishing; +/* + * #%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 com.google.common.collect.Lists; import fr.ifremer.tutti.persistence.entities.CaracteristicMap; Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/CaracteristicTabUIHandler.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/operation/fishing/CaracteristicTabUIModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/CaracteristicTabUIModel.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/CaracteristicTabUIModel.java 2013-01-29 08:24:13 UTC (rev 254) @@ -1,6 +1,30 @@ package fr.ifremer.tutti.ui.swing.content.operation.fishing; +/* + * #%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 fr.ifremer.tutti.persistence.entities.CaracteristicMap; import fr.ifremer.tutti.persistence.entities.data.FishingOperation; import fr.ifremer.tutti.persistence.entities.referential.Caracteristic; Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/CaracteristicTabUIModel.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/operation/fishing/environment/EnvironmentRowModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/environment/EnvironmentRowModel.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/environment/EnvironmentRowModel.java 2013-01-29 08:24:13 UTC (rev 254) @@ -1,6 +1,30 @@ package fr.ifremer.tutti.ui.swing.content.operation.fishing.environment; +/* + * #%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 fr.ifremer.tutti.ui.swing.content.operation.fishing.CaracteristicRowModel; /** Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/gearshooting/GearShootingRowModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/gearshooting/GearShootingRowModel.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/gearshooting/GearShootingRowModel.java 2013-01-29 08:24:13 UTC (rev 254) @@ -1,6 +1,30 @@ package fr.ifremer.tutti.ui.swing.content.operation.fishing.gearshooting; +/* + * #%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 fr.ifremer.tutti.ui.swing.content.operation.fishing.CaracteristicRowModel; /** Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/CoordinateEditorType.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/CoordinateEditorType.java 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/CoordinateEditorType.java 2013-01-29 08:24:13 UTC (rev 254) @@ -1,6 +1,30 @@ package fr.ifremer.tutti.ui.swing.util.editor; +/* + * #%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% + */ + /** * * @author kmorin <kmorin@codelutin.com> Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/editor/CoordinateEditorType.java ___________________________________________________________________ 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_fr_FR.properties =================================================================== --- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-01-28 18:29:58 UTC (rev 253) +++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-01-29 08:24:13 UTC (rev 254) @@ -222,6 +222,7 @@ tutti.label.tab.protocol.species=Espèces tutti.label.tab.species=Espèces tutti.label.traitReminder=Trait \: %s +tutti.launch.mode.description= tutti.legend.catch.benthos=Benthos tutti.legend.catch.macroWaste=Macro déchets tutti.legend.catch.species=Espèces Property changes on: trunk/tutti-ui-swing/src/main/resources/icons/action-warning.png ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL