Echobase-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
January 2012
- 2 participants
- 75 discussions
r263 - in trunk/echobase-tools/src: main/java/fr/ifremer/echobase/tools/loaders test/resources/csv/new
by tchemit@users.forge.codelutin.com 12 Jan '12
by tchemit@users.forge.codelutin.com 12 Jan '12
12 Jan '12
Author: tchemit
Date: 2012-01-12 16:45:18 +0100 (Thu, 12 Jan 2012)
New Revision: 263
Url: http://forge.codelutin.com/repositories/revision/echobase/263
Log:
fix TSParameters import
Modified:
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/TSParametersLoader.java
trunk/echobase-tools/src/test/resources/csv/new/input-TSParameters.csv
Modified: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/TSParametersLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/TSParametersLoader.java 2012-01-12 15:13:31 UTC (rev 262)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/TSParametersLoader.java 2012-01-12 15:45:18 UTC (rev 263)
@@ -53,12 +53,12 @@
meta
);
model.addDefaultColumn("speciesCode", TSParameters.PROPERTY_SPECIES_CODE, String.class);
- model.addDefaultColumn("reference", TSParameters.PROPERTY_REFERENCE, String.class);
+ model.addDefaultColumn("reference", TSParameters.PROPERTY_LITTERATURE_REFERENCE, String.class);
model.addDefaultColumn("acousticFrequency", TSParameters.PROPERTY_ACOUSTIC_FREQUENCY, String.class);
model.addDefaultColumn("speciesCommonName", TSParameters.PROPERTY_SPECIES_COMMON_NAME, String.class);
model.addDefaultColumn("genusSpecies", TSParameters.PROPERTY_GENUS_SPECIES, String.class);
model.addDefaultColumn("speciesTSGroup", TSParameters.PROPERTY_SPECIES_TSGROUP, String.class);
- model.addDefaultColumn("hasSwimbladder", TSParameters.PROPERTY_SWIMBLADDER, boolean.class);
+ model.newMandatoryColumn("hasSwimbladder", TSParameters.PROPERTY_SWIMBLADDER, CsvModelUtil.INT_TO_BOOLEAN_PARSER);
model.addDefaultColumn("swimbladderType", TSParameters.PROPERTY_SWIMBLADDER_TYPE, String.class);
model.newMandatoryColumn("minFishLength", TSParameters.PROPERTY_MIN_FISH_LENGTH, CsvModelUtil.NA_TO_FLOAT_PARSER);
model.newMandatoryColumn("maxFishLength", TSParameters.PROPERTY_MAX_DEPTH, CsvModelUtil.NA_TO_FLOAT_PARSER);
Modified: trunk/echobase-tools/src/test/resources/csv/new/input-TSParameters.csv
===================================================================
--- trunk/echobase-tools/src/test/resources/csv/new/input-TSParameters.csv 2012-01-12 15:13:31 UTC (rev 262)
+++ trunk/echobase-tools/src/test/resources/csv/new/input-TSParameters.csv 2012-01-12 15:45:18 UTC (rev 263)
@@ -1,16 +1,16 @@
"speciesCode";"reference";"acousticFrequency";"speciesCommonName";"genusSpecies";"speciesTSGroup";"hasSwimbladder";"swimbladderType";"minFishLength";"maxFishLength";"averageFishLength";"location";"minDepth";"maxDepth";"averageDepth";"dielPeriod";"method";"b";"a";"r2";"isOK";"Comment";"isPublished";"C_Perm"
-"ALOSPSE";"Brooking et al., 2009";"70";"Alewive";"Alosa pseudoharengus";"ALOSsp";1;;68;138;"NA";"New york";"NA";"NA";"NA";;"insitu";62.2;19.1;"NA";1;;1;"NA"
-"AMMPPER";"Yasuma et al., 2009";"38";"Sandeel";"Ammodytes personatus";"AMMOsp";0;"NOSB";3.4;6.7;"NA";"Japan";10;20;"NA";;"model";125.1;56.5;"NA";1;;1;"NA"
-"AMMPPER";"Yasuma et al., 2009";"120";"Sandeel";"Ammodytes personatus";"AMMOsp";0;"NOSB";3.4;6.7;"NA";"Japan";10;20;"NA";;"model";98.2;34;"NA";1;;1;"NA"
-"AMMPPER";"Yasuma et al., 2009";"38";"Sandeel";"Ammodytes personatus";"AMMOsp";0;"NOSB";7.5;11.5;"NA";"Japan";10;20;"NA";;"model";89.2;20;"NA";1;;1;"NA"
-"AMMPPER";"Yasuma et al., 2009";"120";"Sandeel";"Ammodytes personatus";"AMMOsp";0;"NOSB";7.5;11.5;"NA";"Japan";10;20;"NA";;"model";92.1;20.7;"NA";1;;1;"NA"
-"AMMPPER";"Armstrong, 1986";"38";"Sandeel";"Ammodytes personatus";"AMMOsp";0;"NOSB";11;14;"NA";"N.E. Atlantic";"NA";"NA";"NA";;"insitu";93.7;20;"NA";1;;1;"NA"
+"ALOSPSE";"Brooking et al., 2009";"70";"Alewive";"Alosa pseudoharengus";"ALOSsp";1;;68;138;"NA";"New york";"NA";"NA";"NA";;"insitu";62.2;19.1;"NA";1;;1;
+"AMMPPER";"Yasuma et al., 2009";"38";"Sandeel";"Ammodytes personatus";"AMMOsp";0;"NOSB";3.4;6.7;"NA";"Japan";10;20;"NA";;"model";125.1;56.5;"NA";1;;1;
+"AMMPPER";"Yasuma et al., 2009";"120";"Sandeel";"Ammodytes personatus";"AMMOsp";0;"NOSB";3.4;6.7;"NA";"Japan";10;20;"NA";;"model";98.2;34;"NA";1;;1;
+"AMMPPER";"Yasuma et al., 2009";"38";"Sandeel";"Ammodytes personatus";"AMMOsp";0;"NOSB";7.5;11.5;"NA";"Japan";10;20;"NA";;"model";89.2;20;"NA";1;;1;
+"AMMPPER";"Yasuma et al., 2009";"120";"Sandeel";"Ammodytes personatus";"AMMOsp";0;"NOSB";7.5;11.5;"NA";"Japan";10;20;"NA";;"model";92.1;20.7;"NA";1;;1;
+"AMMPPER";"Armstrong, 1986";"38";"Sandeel";"Ammodytes personatus";"AMMOsp";0;"NOSB";11;14;"NA";"N.E. Atlantic";"NA";"NA";"NA";;"insitu";93.7;20;"NA";1;;1;
"ARGESIL";"Foote et al., 1986";"38";"Great silver smelt";"Argentina silus";"ARGEsp";1;"PHYSCLI";25;50;37.2;"Norvegian Sea";"NA";"NA";"NA";"N";"insitu";68;20;"NA";1;;1;1395
-"BENTFIB";"Benoit-Bird and Au, 2001 ";"200";"Myctophids";"Benthosoma fibulatum";"MYCTsp";1;"NOSB";2;8;"NA";"Hawaii";"NA";"NA";"NA";;"exsitu";58.8;20;"NA";1;;1;"NA"
-"CERAWAR";"Yasuma et al., 2010";"38";"Myctophids";"Ceratoscopelus warmingii";"MYCTsp";0;"NOSB";2.3;4.3;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";112.2;49.4;"NA";1;;1;"NA"
-"CERAWAR";"Yasuma et al., 2010";"120";"Myctophids";"Ceratoscopelus warmingii";"MYCTsp";0;"NOSB";2.3;4.3;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";82.6;10.4;"NA";1;;1;"NA"
-"CERAWAR";"Yasuma et al., 2010";"38";"Myctophids";"Ceratoscopelus warmingii";"MYCTsp";1;"PHYSCLI";3.3;8.3;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";78.1;26.3;"NA";1;;1;"NA"
-"CERAWAR";"Yasuma et al., 2010";"120";"Myctophids";"Ceratoscopelus warmingii";"MYCTsp";1;"PHYSCLI";3.3;8.3;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";79.2;26.1;"NA";1;;1;"NA"
+"BENTFIB";"Benoit-Bird and Au, 2001 ";"200";"Myctophids";"Benthosoma fibulatum";"MYCTsp";1;"NOSB";2;8;"NA";"Hawaii";"NA";"NA";"NA";;"exsitu";58.8;20;"NA";1;;1;
+"CERAWAR";"Yasuma et al., 2010";"38";"Myctophids";"Ceratoscopelus warmingii";"MYCTsp";0;"NOSB";2.3;4.3;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";112.2;49.4;"NA";1;;1;
+"CERAWAR";"Yasuma et al., 2010";"120";"Myctophids";"Ceratoscopelus warmingii";"MYCTsp";0;"NOSB";2.3;4.3;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";82.6;10.4;"NA";1;;1;
+"CERAWAR";"Yasuma et al., 2010";"38";"Myctophids";"Ceratoscopelus warmingii";"MYCTsp";1;"PHYSCLI";3.3;8.3;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";78.1;26.3;"NA";1;;1;
+"CERAWAR";"Yasuma et al., 2010";"120";"Myctophids";"Ceratoscopelus warmingii";"MYCTsp";1;"PHYSCLI";3.3;8.3;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";79.2;26.1;"NA";1;;1;
"CLUPHAR";"Foote, 1987";"38";"Herring";"Clupea harengus";"CLUPsp";1;"PHYSSTO";24;34;28.5;"North Sea";"NA";"NA";"NA";"N";"insitu";72.1;20;"NA";1;;1;1349
"CLUPHAR";"Faessler et Gorska, 2009";"38";"Herring";"Clupea harengus";"CLUPsp";1;"PHYSSTO";5;25;"NA";"Baltic Sea";"NA";"NA";0;;"model";63.88;20;"NA";1;;1;1349
"CLUPHAR";"Misund and Beltestad, 1996";"38";"Herring";"Clupea harengus";"CLUPsp";1;"PHYSSTO";"NA";"NA";32.8;"Norvegian fjords";"NA";"NA";"NA";"D";"comp";71.1;20;"NA";1;;1;1349
@@ -23,31 +23,31 @@
"CLUPHAR";"Peltonen and Balk, 2005";"38";"Herring";"Clupea harengus";"CLUPsp";1;"PHYSSTO";8;22;12;"Baltic Sea";"NA";"NA";30;"N";"insitu";54;12.3;0.52;1;;1;1349
"CLUPHAR";"Rudstam et al., 1988";"70";"Herring";"Clupea harengus";"CLUPsp";1;"PHYSSTO";6;24;13;"Baltic Sea";"NA";"NA";"NA";"N";"ind";75.5;21.7;"NA";1;;1;1349
"CLUPHAR";"Misund and Ovredal, 1988";"70";"Herring";"Clupea harengus";"CLUPsp";1;"PHYSSTO";22;33;28;"Norvegian fjords";"NA";"NA";"NA";"D";"ind";72.3;20;"NA";1;;1;1349
-"CLUPSPR";"Degnbol et al., 1985";"38";"Herring/sprat";"Clupea sprattus";"CLUPsp";1;"PHYSSTO";19;26;21;"Kattegat/Skagerak";"NA";"NA";"NA";"A";"comp";72.6;20;"NA";1;;1;"NA"
-"CLUPSPR";"Edwards et al., 1984";"38";"Herring/sprat";"Clupea sprattus";"CLUPsp";1;"PHYSSTO";12;21;16.6;"N.E. Atlantic";"NA";"NA";"NA";"A";"insitu";73.4;20;"NA";1;;1;"NA"
-"CLUPSPR";"Degnbol et al., 1985";"120";"Herring/sprat";"Clupea sprattus";"CLUPsp";1;"PHYSSTO";7;19;13.8;"S.E. Baltic";"NA";"NA";"NA";"N";"comp";73.1;20;"NA";1;;1;"NA"
-"CLUPSPR";"Edwards et al., 1984";"120";"Herring/sprat";"Clupea sprattus";"CLUPsp";1;"PHYSSTO";12;21;16.6;"N.E. Atlantic";"NA";"NA";"NA";"A";"insitu";76;20;"NA";1;;1;"NA"
-"CLUPSPR";"ICES, 1982";"38";"Herring/sprat";"Clupea sprattus";"CLUPsp";1;"PHYSSTO";"NA";"NA";"NA";"North Atlantic";"NA";"NA";"NA";;;71.2;20;"NA";1;;1;"NA"
-"COLOSAI";"Sawada et al., 2009";"70";"Pacific saury";"Cololabis saira";"SCOMsp";0;"NOSB";19.7;31.7;25.7;"North Pacific";"NA";"NA";22;"N";"insitu";67.6;20;"NA";1;;1;"NA"
-"DIAPCHR";"Yasuma et al., 2010";"38";"Myctophids";"Diaphus chrysorhynchus";"MYCTsp";0;"NOSB";6.2;10;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";96.3;30.5;"NA";1;;1;"NA"
-"DIAPCHR";"Yasuma et al., 2010";"120";"Myctophids";"Diaphus chrysorhynchus";"MYCTsp";0;"NOSB";6.2;10;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";63.2;-9.1;"NA";1;;1;"NA"
-"DIAPGAR";"Yasuma et al., 2010";"120";"Myctophids";"Diaphus garmani";"MYCTsp";1;"PHYSCLI";3.1;5.7;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";83.3;32.7;"NA";1;;1;"NA"
-"DIAPGAR";"Yasuma et al., 2010";"38";"Myctophids";"Diaphus garmani";"MYCTsp";1;"PHYSCLI";3.1;5.7;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";83.5;34.5;"NA";1;;1;"NA"
-"DIAPGAR";"Yasuma et al., 2010";"38";"Myctophids";"Diaphus garmani";"MYCTsp";0;"NOSB";2.1;5.3;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";113.5;54;"NA";1;;1;"NA"
-"DIAPGAR";"Yasuma et al., 2010";"120";"Myctophids";"Diaphus garmani";"MYCTsp";0;"NOSB";2.1;5.3;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";8.4;6.9;"NA";1;;1;"NA"
-"DIAPTHE";"Yasuma et al., 2003";"38";"Myctophids";"Diaphus theta";"MYCTsp";1;"PHYSCLI";2;8;"NA";"Japan";"NA";"NA";20;"N";"model";69.4;20;"NA";1;;1;"NA"
-"ENGRCAP";"Barange et al., 1996";"38";"South African Anchovy";"Engraulis capensis";"CLUPsp";1;"PHYSSTO";7;14;"NA";"South Africa";"NA";"NA";"NA";"N";"insitu";76.1;20;"NA";0;"Doubtfull TS mode selection";1;"NA"
+"CLUPSPR";"Degnbol et al., 1985";"38";"Herring/sprat";"Clupea sprattus";"CLUPsp";1;"PHYSSTO";19;26;21;"Kattegat/Skagerak";"NA";"NA";"NA";"A";"comp";72.6;20;"NA";1;;1;
+"CLUPSPR";"Edwards et al., 1984";"38";"Herring/sprat";"Clupea sprattus";"CLUPsp";1;"PHYSSTO";12;21;16.6;"N.E. Atlantic";"NA";"NA";"NA";"A";"insitu";73.4;20;"NA";1;;1;
+"CLUPSPR";"Degnbol et al., 1985";"120";"Herring/sprat";"Clupea sprattus";"CLUPsp";1;"PHYSSTO";7;19;13.8;"S.E. Baltic";"NA";"NA";"NA";"N";"comp";73.1;20;"NA";1;;1;
+"CLUPSPR";"Edwards et al., 1984";"120";"Herring/sprat";"Clupea sprattus";"CLUPsp";1;"PHYSSTO";12;21;16.6;"N.E. Atlantic";"NA";"NA";"NA";"A";"insitu";76;20;"NA";1;;1;
+"CLUPSPR";"ICES, 1982";"38";"Herring/sprat";"Clupea sprattus";"CLUPsp";1;"PHYSSTO";"NA";"NA";"NA";"North Atlantic";"NA";"NA";"NA";;;71.2;20;"NA";1;;1;
+"COLOSAI";"Sawada et al., 2009";"70";"Pacific saury";"Cololabis saira";"SCOMsp";0;"NOSB";19.7;31.7;25.7;"North Pacific";"NA";"NA";22;"N";"insitu";67.6;20;"NA";1;;1;
+"DIAPCHR";"Yasuma et al., 2010";"38";"Myctophids";"Diaphus chrysorhynchus";"MYCTsp";0;"NOSB";6.2;10;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";96.3;30.5;"NA";1;;1;
+"DIAPCHR";"Yasuma et al., 2010";"120";"Myctophids";"Diaphus chrysorhynchus";"MYCTsp";0;"NOSB";6.2;10;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";63.2;-9.1;"NA";1;;1;
+"DIAPGAR";"Yasuma et al., 2010";"120";"Myctophids";"Diaphus garmani";"MYCTsp";1;"PHYSCLI";3.1;5.7;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";83.3;32.7;"NA";1;;1;
+"DIAPGAR";"Yasuma et al., 2010";"38";"Myctophids";"Diaphus garmani";"MYCTsp";1;"PHYSCLI";3.1;5.7;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";83.5;34.5;"NA";1;;1;
+"DIAPGAR";"Yasuma et al., 2010";"38";"Myctophids";"Diaphus garmani";"MYCTsp";0;"NOSB";2.1;5.3;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";113.5;54;"NA";1;;1;
+"DIAPGAR";"Yasuma et al., 2010";"120";"Myctophids";"Diaphus garmani";"MYCTsp";0;"NOSB";2.1;5.3;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";8.4;6.9;"NA";1;;1;
+"DIAPTHE";"Yasuma et al., 2003";"38";"Myctophids";"Diaphus theta";"MYCTsp";1;"PHYSCLI";2;8;"NA";"Japan";"NA";"NA";20;"N";"model";69.4;20;"NA";1;;1;
+"ENGRCAP";"Barange et al., 1996";"38";"South African Anchovy";"Engraulis capensis";"CLUPsp";1;"PHYSSTO";7;14;"NA";"South Africa";"NA";"NA";"NA";"N";"insitu";76.1;20;"NA";0;"Doubtfull TS mode selection";1;
"ENGRENC";"Miquel et al., Ecomed 2009";"38";"European Anchovy";"Engraulis encrasicolus";"CLUPsp";1;"PHYSSTO";8.5;12;11.7;"Spanish Mediterranean";10;50;30;"N";"insitu";71.2;20;"NA";1;"7 night hauls >80% anchovy or 1 FL/TS mode";0;1362
"ENGRENC";"Miquel et al., MEDIAS 0710";"38";"European Anchovy";"Engraulis encrasicolus";"CLUPsp";1;"PHYSSTO";"NA";"NA";13.4;"Spanish Mediterranean";10;50;30;"N";"insitu";78.5;20;"NA";0;"3 day hauls 100% anchovy, 2-3 hours TS recording at night";0;1362
"ENGRENC";"Pyrounaki et al., HCMR 2010";"38";"European Anchovy";"Engraulis encrasicolus";"CLUPsp";1;"PHYSSTO";4.7;16.5;11.5;"Aegean sea";"NA";100;80;"N";"insitu";73.4;20;"NA";1;"46 night hauls >90% anchovy, 2004-2010";0;1362
-"ENGRJAP";"Kang et al., 2009";"120";"Japanese Anchovy";"Engraulis japonicus";"CLUPsp";1;"PHYSSTO";4.8;12.2;"NA";"Korea";"NA";"NA";"NA";"A";"exsitu";68.4;20;"NA";1;;1;"NA"
-"ENGRJAP";"Kang et al., 2009";"200";"Japanese Anchovy";"Engraulis japonicus";"CLUPsp";1;"PHYSSTO";4.8;12.2;"NA";"Korea";"NA";"NA";"NA";"A";"exsitu";69.1;20;"NA";1;;1;"NA"
-"ENGRJAP";"Sawada et al., 2009";"70";"Japanese Anchovy";"Engraulis japonicus";"CLUPsp";1;"PHYSSTO";9.6;14.8;12.2;"Japan";"NA";"NA";21.2;"N";"insitu";68.3;20;"NA";1;;1;"NA"
-"ENGRJAP";"Zhao et al., 2008";"38";"Japanese Anchovy";"Engraulis japonicus";"CLUPsp";1;"PHYSSTO";6;15;10.6;"Yellow Sea";10;45;"NA";"N";"insitu";71.6;20;"NA";1;;1;"NA"
-"ENGRJAP";"Kang et al., 2009";"38";"Japanese Anchovy";"Engraulis japonicus";"CLUPsp";1;"PHYSSTO";4.8;12.2;"NA";"Korea";"NA";"NA";"NA";"A";"exsitu";65.8;20;"NA";1;;1;"NA"
-"ENGRRIG";"Gutierrez and MacLennan, 1998";"38";"Anchoveta";"Engraulis rigens";"CLUPsp";1;"PHYSSTO";10;16;12.8;"Peru";"NA";"NA";"NA";"A";"exsitu";78.9;20;"NA";1;;1;"NA"
-"ENGRRIG";"Gutierrez and MacLennan, 1998";"120";"Anchoveta";"Engraulis rigens";"CLUPsp";1;"PHYSSTO";10;16;11.3;"Peru";"NA";"NA";"NA";"A";"exsitu";76.2;20;"NA";1;;1;"NA"
-"ENGRRIG";"Simmonds et al., 2009";"38";"Anchoveta";"Engraulis rigens";"CLUPsp";1;"PHYSSTO";12;20;14;"Peru";"NA";"NA";"NA";;"insitu";88.57;30.05;"NA";1;;1;"NA"
+"ENGRJAP";"Kang et al., 2009";"120";"Japanese Anchovy";"Engraulis japonicus";"CLUPsp";1;"PHYSSTO";4.8;12.2;"NA";"Korea";"NA";"NA";"NA";"A";"exsitu";68.4;20;"NA";1;;1;
+"ENGRJAP";"Kang et al., 2009";"200";"Japanese Anchovy";"Engraulis japonicus";"CLUPsp";1;"PHYSSTO";4.8;12.2;"NA";"Korea";"NA";"NA";"NA";"A";"exsitu";69.1;20;"NA";1;;1;
+"ENGRJAP";"Sawada et al., 2009";"70";"Japanese Anchovy";"Engraulis japonicus";"CLUPsp";1;"PHYSSTO";9.6;14.8;12.2;"Japan";"NA";"NA";21.2;"N";"insitu";68.3;20;"NA";1;;1;
+"ENGRJAP";"Zhao et al., 2008";"38";"Japanese Anchovy";"Engraulis japonicus";"CLUPsp";1;"PHYSSTO";6;15;10.6;"Yellow Sea";10;45;"NA";"N";"insitu";71.6;20;"NA";1;;1;
+"ENGRJAP";"Kang et al., 2009";"38";"Japanese Anchovy";"Engraulis japonicus";"CLUPsp";1;"PHYSSTO";4.8;12.2;"NA";"Korea";"NA";"NA";"NA";"A";"exsitu";65.8;20;"NA";1;;1;
+"ENGRRIG";"Gutierrez and MacLennan, 1998";"38";"Anchoveta";"Engraulis rigens";"CLUPsp";1;"PHYSSTO";10;16;12.8;"Peru";"NA";"NA";"NA";"A";"exsitu";78.9;20;"NA";1;;1;
+"ENGRRIG";"Gutierrez and MacLennan, 1998";"120";"Anchoveta";"Engraulis rigens";"CLUPsp";1;"PHYSSTO";10;16;11.3;"Peru";"NA";"NA";"NA";"A";"exsitu";76.2;20;"NA";1;;1;
+"ENGRRIG";"Simmonds et al., 2009";"38";"Anchoveta";"Engraulis rigens";"CLUPsp";1;"PHYSSTO";12;20;14;"Peru";"NA";"NA";"NA";;"insitu";88.57;30.05;"NA";1;;1;
"GADUMOR";"Rose and Porter, 1996";"120";"Cod";"Gadus morhua";"GADIsp";1;"PHYSCLI";12;65;"NA";"Newfoundland";"NA";"NA";10;;"exsitu";65;20;"NA";1;;1;1543
"GADUMOR";"Clay and Castonguay, 1995";"38";"Cod";"Gadus morhua";"GADIsp";1;"PHYSCLI";31;67;52;"Newfoundland";140;300;"NA";"N";"insitu";69.5;20;"NA";1;;1;1543
"GADUMOR";"Rose and Porter, 1996";"38";"Cod";"Gadus morhua";"GADIsp";1;"PHYSCLI";12;65;"NA";"Newfoundland";"NA";"NA";10;;"Insitu, exsitu";66;20;"NA";1;;1;1543
@@ -56,79 +56,79 @@
"GADUMOR";"Ermolchev and Zaferman, 2003";"120";"Cod";"Gadus morhua";"GADIsp";1;"PHYSCLI";15;21;"NA";"Kola Bay, Russia";"NA";"NA";"NA";"A";"insitu";80.7;31.6;"NA";1;;1;1543
"GADUMOR";"Ermolchev, 2009";"38";"Cod";"Gadus morhua";"GADIsp";1;"PHYSCLI";5;136;77.8;"Barents Sea";"NA";"NA";"NA";"A";"insitu";64.9;20;"NA";1;;1;1543
"GADUMOR";"Clay and Castonguay, 1995";"38";"Cod";"Gadus morhua";"GADIsp";1;"PHYSCLI";31;67;52;"Newfoundland";140;300;"NA";"D";"insitu";69.8;20;"NA";1;;1;1543
-"HOPLATL";"McClatchie et al., 1999";"38";"Orange roughy";"Hoplostethus atlanticus";"DEEPsp";1;"OILY";28;37;32.7;"New Zealand";"NA";"NA";"NA";;"model, insitu, exsitu";77;20;"NA";1;;1;"NA"
-"HOPLATL";"McClatchie et al., 1999";"38";"Orange roughy";"Hoplostethus atlanticus";"DEEPsp";1;"OILY";28;37;32.7;"New Zealand";"NA";"NA";"NA";;"model, insitu, exsitu";71.6;16.4;"NA";1;;1;"NA"
-"MACRNOV";"Do and Surti, 1990";"38";"Hoki";"Macruronus novaezelandiae";"DEEPsp";1;"PHYSCLI";45;104;68.6;"New Zealand";"NA";"NA";"NA";;"model";72.7;20;"NA";1;;1;"NA"
-"MACRNOV";"Do and Surti, 1990";"38";"Hoki";"Macruronus novaezelandiae";"DEEPsp";1;"PHYSCLI";45;104;68.6;"New Zealand";"NA";"NA";"NA";;"model";79.6;23.8;"NA";1;;1;"NA"
-"MALLVIL";"Guttormsen and Wilson, 2009";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";5;15;10;"Alaska";35;65;"NA";"N";"insitu";70.3;20;"NA";1;;1;"NA"
-"MALLVIL";"Guttormsen and Wilson, 2009";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";5;15;10;"Alaska";35;65;"NA";"N";"insitu";71.6;20;"NA";1;;1;"NA"
-"MALLVIL";"Rose, 1998";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";9;15;12.3;"Newfoundland";"NA";"NA";"NA";"A";"insitu";73.1;20;"NA";1;;1;"NA"
-"MALLVIL";"Gauthier and Horne, 2004";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";"NA";"NA";"NA";;"NA";"NA";"NA";;;75;24.9;"NA";1;;1;"NA"
-"MALLVIL";"Halldorsson and Reynisson, 1983";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";"NA";"NA";11.5;"Iceland";"NA";"NA";"NA";"N";"ind";78.1;20;"NA";1;;1;"NA"
-"MALLVIL";"Dommasnes and Rottingen, 1984";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";"NA";"NA";"NA";"Barents Sea";"NA";"NA";"NA";;;74;19.1;"NA";1;;1;"NA"
-"MALLVIL";"Gauthier and Horne, 2004";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";"NA";"NA";"NA";"St Lawrence";"NA";"NA";"NA";;;69.3;20;"NA";1;;1;"NA"
-"MALLVIL";"Halldorsson and Reynisson, 1983";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";"NA";"NA";14.5;"Iceland";"NA";"NA";"NA";"N";"ind";78.8;20;"NA";1;;1;"NA"
-"MALLVIL";"Rose, 1998";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";9;15;12.3;"Newfoundland";"NA";"NA";"NA";"A";"insitu";74.3;21.1;"NA";1;;1;"NA"
-"MALLVIL";"Rose and Legget, 1988";"120";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";"NA";"NA";16.5;"St Lawrence";"NA";"NA";"NA";"D";"insitu";65.3;20;"NA";1;;1;"NA"
-"MELAAEG";"Ona and Hansen, 1986";"38";"Haddock";"Melanogrammus aeglefinus";"GADIsp";1;"PHYSCLI";"NA";"NA";43.8;"Norvegian fjords";"NA";"NA";"NA";"N";"insitu";67.9;20;"NA";1;;1;"NA"
-"MERLAUS";"Lillo et al., 1996";"38";"Southern hake";"Merluccius australis";"MERLsp";1;"PHYSCLI";48;80;"NA";"Chile";"NA";"NA";"NA";"N";"insitu";68.1;20;"NA";1;;1;"NA"
-"MERLAUS";"Lillo et al., 1996";"38";"Chilean hake";"Merluccius gayi";"MERLsp";1;"PHYSCLI";37;53;"NA";"Chile";"NA";"NA";"NA";"N";"insitu";68.5;20;"NA";1;;1;"NA"
-"MERLAUS";"Lillo et al., 1996";"38";"Chilean hake";"Merluccius gayi";"MERLsp";1;"PHYSCLI";37;53;"NA";"Chile";"NA";"NA";"NA";"N";"insitu";74;23.6;"NA";1;;1;"NA"
-"MERLAUS";"Lillo et al., 1996";"38";"Southern hake";"Merluccius australis";"MERLsp";1;"PHYSCLI";48;80;"NA";"Chile";"NA";"NA";"NA";"N";"insitu";73.3;22;"NA";1;;1;"NA"
-"MERLPRO";"Traynor, 1996";"38";"Pacific whiting";"Merluccius productus";"MERLsp";1;"PHYSCLI";47;60;51.8;"Pacific";"NA";"NA";"NA";"N";"insitu";68.5;20;"NA";1;;1;"NA"
-"MERLPRO";"Henderson and Horne, 2007";"38";"Pacific hake";"Merluccius productus";"MERLsp";1;"PHYSCLI";"NA";"NA";"NA";"California";"NA";"NA";"NA";;"Insitu, exsitu";74;20;"NA";1;;1;"NA"
-"MERLPRO";"Traynor, 1996";"38";"Pacific hake";"Merluccius productus";"MERLsp";1;"PHYSCLI";"NA";"NA";"NA";"California";"NA";"NA";"NA";;"model";68.2;20;"NA";1;;1;"NA"
-"MICRAUS";"McClatchie et al., 1998";"38";"Southern blue whiting";"Micromesistius australis";"GADIsp";1;"PHYSCLI";19;53;"NA";"New Zealand";"NA";"NA";"NA";;"model, insitu, ind";73.5;20;"NA";1;;1;"NA"
-"MICRAUS";"Dunford and Macaulay, 2006";"38";"Southern blue whiting";"Micromesistius australis";"GADIsp";1;"PHYSCLI";16;58;"NA";"New Zealand";"NA";"NA";0;;"model";97;38;"NA";1;;1;"NA"
-"MICRAUS";"McClatchie et al., 1998";"38";"Southern blue whiting";"Micromesistius australis";"GADIsp";1;"PHYSCLI";19;53;"NA";"New Zealand";"NA";"NA";"NA";;"model, insitu, ind";81.3;25;"NA";1;;1;"NA"
-"MICRPOU";"Robinson, 1982";"29";"Blue whiting";"Micromesistius poutassou";"GADIsp";1;"PHYSCLI";21;37;31.1;"N.E. Atlantic";"NA";"NA";"NA";"N";"ind";71.9;20;"NA";1;;1;"NA"
-"MICRPOU";"Monstad, 1992";"38";"Blue whiting";"Micromesistius poutassou";"GADIsp";1;"PHYSCLI";"NA";"NA";"NA";"N.E. Atlantic";"NA";"NA";"NA";"A";;72.8;21.7;"NA";1;;1;"NA"
-"MOROAME";"Hartman and Nagy, 2005";"120";"Striped bass";"Morone americana";"BASSsp";1;"PHYSCLI";10;70;"NA";"Maryland";"NA";"NA";0;"D";"exsitu";56.26;15.37;0.8;1;;1;"NA"
-"MOROSAX";"Hartman and Nagy, 2005";"120";"White perch";"Morone saxatilis";"BASSsp";1;"PHYSCLI";10;20;"NA";"Maryland";"NA";"NA";0;"D";"exsitu";69.45;26.48;0.81;1;;1;"NA"
-"MOROSPP";"Hartman and Nagy, 2005";"120";"Bass";"Morone sp";"BASSsp";1;"PHYSCLI";10;70;"NA";"Maryland";"NA";"NA";0;"D";"exsitu";56.47;15.61;0.82;1;;1;"NA"
-"MYCTASP";"Yasuma et al., 2010";"38";"Myctophids";"Myctophum asperum";"MYCTsp";0;"NOSB";1.8;3.3;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";108.3;52.7;"NA";1;;1;"NA"
-"MYCTASP";"Yasuma et al., 2010";"120";"Myctophids";"Myctophum asperum";"MYCTsp";0;"NOSB";7.4;8.6;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";80.9;17.9;"NA";1;;1;"NA"
-"MYCTASP";"Yasuma et al., 2010";"38";"Myctophids";"Myctophum asperum";"MYCTsp";1;"PHYSCLI";3.1;4.8;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";88.6;45.4;"NA";1;;1;"NA"
-"MYCTASP";"Yasuma et al., 2010";"120";"Myctophids";"Myctophum asperum";"MYCTsp";1;"PHYSCLI";3.1;4.8;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";84.6;36.3;"NA";1;;1;"NA"
-"MYCTASP";"Yasuma et al., 2010";"38";"Myctophids";"Myctophum asperum";"MYCTsp";1;"PHYSCLI";6.1;7.7;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";57.3;-135.2;"NA";1;;1;"NA"
-"MYCTASP";"Yasuma et al., 2010";"120";"Myctophids";"Myctophum asperum";"MYCTsp";1;"PHYSCLI";6.1;7.7;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";52.4;-130.8;"NA";1;;1;"NA"
-"NOTOJAP";"Yasuma et al., 2003";"38";"Myctophids";"Notoscopulus japonicus";"MYCTsp";1;"NOSB";12;13;"NA";"Japan";"NA";"NA";"NA";"N";"model";86.7;20;"NA";1;;1;"NA"
-"PAGRMAJ";"Kang and Hwang, 2003";"38";"Red seabream";"Pagrus major";"PAGRsp";1;"PHYSCLI";10;35;19.9;"N.W. Pacific";"NA";"NA";"NA";;"exsitu";66.8;20;"NA";1;;1;"NA"
-"PAGRMAJ";"Kang and Hwang, 2003";"120";"Red seabream";"Pagrus major";"PAGRsp";1;"PHYSCLI";10;35;19.9;"N.W. Pacific";"NA";"NA";"NA";;"exsitu";74;20;"NA";1;;1;"NA"
-"PAGRMAJ";"Kang and Hwang, 2003";"200";"Red seabream";"Pagrus major";"PAGRsp";1;"PHYSCLI";10;35;19.9;"N.W. Pacific";"NA";"NA";"NA";;"exsitu";74.1;20;"NA";1;;1;"NA"
-"PHYSCLI";"Foote, 1987";"38";"Physoclists (gadoids)";"Physoclystii sp";"PHYSCLI";1;"PHYSCLI";9;105;"NA";"Various";"NA";"NA";"NA";"A";"All";67.4;20;"NA";1;;1;"NA"
-"PHYSSTO";"Foote, 1987";"38";"Physostomes (clupeoids)";"Physostomii sp";"PHYSSTO";1;"PHYSSTO";6;34;"NA";"Various";"NA";"NA";"NA";"A";"All";71.9;20;"NA";1;;1;"NA"
+"HOPLATL";"McClatchie et al., 1999";"38";"Orange roughy";"Hoplostethus atlanticus";"DEEPsp";1;"OILY";28;37;32.7;"New Zealand";"NA";"NA";"NA";;"model, insitu, exsitu";77;20;"NA";1;;1;
+"HOPLATL";"McClatchie et al., 1999";"38";"Orange roughy";"Hoplostethus atlanticus";"DEEPsp";1;"OILY";28;37;32.7;"New Zealand";"NA";"NA";"NA";;"model, insitu, exsitu";71.6;16.4;"NA";1;;1;
+"MACRNOV";"Do and Surti, 1990";"38";"Hoki";"Macruronus novaezelandiae";"DEEPsp";1;"PHYSCLI";45;104;68.6;"New Zealand";"NA";"NA";"NA";;"model";72.7;20;"NA";1;;1;
+"MACRNOV";"Do and Surti, 1990";"38";"Hoki";"Macruronus novaezelandiae";"DEEPsp";1;"PHYSCLI";45;104;68.6;"New Zealand";"NA";"NA";"NA";;"model";79.6;23.8;"NA";1;;1;
+"MALLVIL";"Guttormsen and Wilson, 2009";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";5;15;10;"Alaska";35;65;"NA";"N";"insitu";70.3;20;"NA";1;;1;
+"MALLVIL";"Guttormsen and Wilson, 2009";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";5;15;10;"Alaska";35;65;"NA";"N";"insitu";71.6;20;"NA";1;;1;
+"MALLVIL";"Rose, 1998";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";9;15;12.3;"Newfoundland";"NA";"NA";"NA";"A";"insitu";73.1;20;"NA";1;;1;
+"MALLVIL";"Gauthier and Horne, 2004";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";"NA";"NA";"NA";;"NA";"NA";"NA";;;75;24.9;"NA";1;;1;
+"MALLVIL";"Halldorsson and Reynisson, 1983";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";"NA";"NA";11.5;"Iceland";"NA";"NA";"NA";"N";"ind";78.1;20;"NA";1;;1;
+"MALLVIL";"Dommasnes and Rottingen, 1984";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";"NA";"NA";"NA";"Barents Sea";"NA";"NA";"NA";;;74;19.1;"NA";1;;1;
+"MALLVIL";"Gauthier and Horne, 2004";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";"NA";"NA";"NA";"St Lawrence";"NA";"NA";"NA";;;69.3;20;"NA";1;;1;
+"MALLVIL";"Halldorsson and Reynisson, 1983";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";"NA";"NA";14.5;"Iceland";"NA";"NA";"NA";"N";"ind";78.8;20;"NA";1;;1;
+"MALLVIL";"Rose, 1998";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";9;15;12.3;"Newfoundland";"NA";"NA";"NA";"A";"insitu";74.3;21.1;"NA";1;;1;
+"MALLVIL";"Rose and Legget, 1988";"120";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";"NA";"NA";16.5;"St Lawrence";"NA";"NA";"NA";"D";"insitu";65.3;20;"NA";1;;1;
+"MELAAEG";"Ona and Hansen, 1986";"38";"Haddock";"Melanogrammus aeglefinus";"GADIsp";1;"PHYSCLI";"NA";"NA";43.8;"Norvegian fjords";"NA";"NA";"NA";"N";"insitu";67.9;20;"NA";1;;1;
+"MERLAUS";"Lillo et al., 1996";"38";"Southern hake";"Merluccius australis";"MERLsp";1;"PHYSCLI";48;80;"NA";"Chile";"NA";"NA";"NA";"N";"insitu";68.1;20;"NA";1;;1;
+"MERLAUS";"Lillo et al., 1996";"38";"Chilean hake";"Merluccius gayi";"MERLsp";1;"PHYSCLI";37;53;"NA";"Chile";"NA";"NA";"NA";"N";"insitu";68.5;20;"NA";1;;1;
+"MERLAUS";"Lillo et al., 1996";"38";"Chilean hake";"Merluccius gayi";"MERLsp";1;"PHYSCLI";37;53;"NA";"Chile";"NA";"NA";"NA";"N";"insitu";74;23.6;"NA";1;;1;
+"MERLAUS";"Lillo et al., 1996";"38";"Southern hake";"Merluccius australis";"MERLsp";1;"PHYSCLI";48;80;"NA";"Chile";"NA";"NA";"NA";"N";"insitu";73.3;22;"NA";1;;1;
+"MERLPRO";"Traynor, 1996";"38";"Pacific whiting";"Merluccius productus";"MERLsp";1;"PHYSCLI";47;60;51.8;"Pacific";"NA";"NA";"NA";"N";"insitu";68.5;20;"NA";1;;1;
+"MERLPRO";"Henderson and Horne, 2007";"38";"Pacific hake";"Merluccius productus";"MERLsp";1;"PHYSCLI";"NA";"NA";"NA";"California";"NA";"NA";"NA";;"Insitu, exsitu";74;20;"NA";1;;1;
+"MERLPRO";"Traynor, 1996";"38";"Pacific hake";"Merluccius productus";"MERLsp";1;"PHYSCLI";"NA";"NA";"NA";"California";"NA";"NA";"NA";;"model";68.2;20;"NA";1;;1;
+"MICRAUS";"McClatchie et al., 1998";"38";"Southern blue whiting";"Micromesistius australis";"GADIsp";1;"PHYSCLI";19;53;"NA";"New Zealand";"NA";"NA";"NA";;"model, insitu, ind";73.5;20;"NA";1;;1;
+"MICRAUS";"Dunford and Macaulay, 2006";"38";"Southern blue whiting";"Micromesistius australis";"GADIsp";1;"PHYSCLI";16;58;"NA";"New Zealand";"NA";"NA";0;;"model";97;38;"NA";1;;1;
+"MICRAUS";"McClatchie et al., 1998";"38";"Southern blue whiting";"Micromesistius australis";"GADIsp";1;"PHYSCLI";19;53;"NA";"New Zealand";"NA";"NA";"NA";;"model, insitu, ind";81.3;25;"NA";1;;1;
+"MICRPOU";"Robinson, 1982";"29";"Blue whiting";"Micromesistius poutassou";"GADIsp";1;"PHYSCLI";21;37;31.1;"N.E. Atlantic";"NA";"NA";"NA";"N";"ind";71.9;20;"NA";1;;1;
+"MICRPOU";"Monstad, 1992";"38";"Blue whiting";"Micromesistius poutassou";"GADIsp";1;"PHYSCLI";"NA";"NA";"NA";"N.E. Atlantic";"NA";"NA";"NA";"A";;72.8;21.7;"NA";1;;1;
+"MOROAME";"Hartman and Nagy, 2005";"120";"Striped bass";"Morone americana";"BASSsp";1;"PHYSCLI";10;70;"NA";"Maryland";"NA";"NA";0;"D";"exsitu";56.26;15.37;0.8;1;;1;
+"MOROSAX";"Hartman and Nagy, 2005";"120";"White perch";"Morone saxatilis";"BASSsp";1;"PHYSCLI";10;20;"NA";"Maryland";"NA";"NA";0;"D";"exsitu";69.45;26.48;0.81;1;;1;
+"MOROSPP";"Hartman and Nagy, 2005";"120";"Bass";"Morone sp";"BASSsp";1;"PHYSCLI";10;70;"NA";"Maryland";"NA";"NA";0;"D";"exsitu";56.47;15.61;0.82;1;;1;
+"MYCTASP";"Yasuma et al., 2010";"38";"Myctophids";"Myctophum asperum";"MYCTsp";0;"NOSB";1.8;3.3;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";108.3;52.7;"NA";1;;1;
+"MYCTASP";"Yasuma et al., 2010";"120";"Myctophids";"Myctophum asperum";"MYCTsp";0;"NOSB";7.4;8.6;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";80.9;17.9;"NA";1;;1;
+"MYCTASP";"Yasuma et al., 2010";"38";"Myctophids";"Myctophum asperum";"MYCTsp";1;"PHYSCLI";3.1;4.8;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";88.6;45.4;"NA";1;;1;
+"MYCTASP";"Yasuma et al., 2010";"120";"Myctophids";"Myctophum asperum";"MYCTsp";1;"PHYSCLI";3.1;4.8;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";84.6;36.3;"NA";1;;1;
+"MYCTASP";"Yasuma et al., 2010";"38";"Myctophids";"Myctophum asperum";"MYCTsp";1;"PHYSCLI";6.1;7.7;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";57.3;-135.2;"NA";1;;1;
+"MYCTASP";"Yasuma et al., 2010";"120";"Myctophids";"Myctophum asperum";"MYCTsp";1;"PHYSCLI";6.1;7.7;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";52.4;-130.8;"NA";1;;1;
+"NOTOJAP";"Yasuma et al., 2003";"38";"Myctophids";"Notoscopulus japonicus";"MYCTsp";1;"NOSB";12;13;"NA";"Japan";"NA";"NA";"NA";"N";"model";86.7;20;"NA";1;;1;
+"PAGRMAJ";"Kang and Hwang, 2003";"38";"Red seabream";"Pagrus major";"PAGRsp";1;"PHYSCLI";10;35;19.9;"N.W. Pacific";"NA";"NA";"NA";;"exsitu";66.8;20;"NA";1;;1;
+"PAGRMAJ";"Kang and Hwang, 2003";"120";"Red seabream";"Pagrus major";"PAGRsp";1;"PHYSCLI";10;35;19.9;"N.W. Pacific";"NA";"NA";"NA";;"exsitu";74;20;"NA";1;;1;
+"PAGRMAJ";"Kang and Hwang, 2003";"200";"Red seabream";"Pagrus major";"PAGRsp";1;"PHYSCLI";10;35;19.9;"N.W. Pacific";"NA";"NA";"NA";;"exsitu";74.1;20;"NA";1;;1;
+"PHYSCLI";"Foote, 1987";"38";"Physoclists (gadoids)";"Physoclystii sp";"PHYSCLI";1;"PHYSCLI";9;105;"NA";"Various";"NA";"NA";"NA";"A";"All";67.4;20;"NA";1;;1;
+"PHYSSTO";"Foote, 1987";"38";"Physostomes (clupeoids)";"Physostomii sp";"PHYSSTO";1;"PHYSSTO";6;34;"NA";"Various";"NA";"NA";"NA";"A";"All";71.9;20;"NA";1;;1;
"POLLVIR";"Foote et al., 1986";"38";"Saithe";"Pollachius virens";"GADIsp";1;"PHYSCLI";45;91;57.2;"Norvegian Sea";"NA";"NA";"NA";"N";"insitu";65.8;20;"NA";1;;1;1556
-"PRISFIL";"Benoit-Bird and Au, 2003 ";"60-200";"Pink snapper";"Pristipomoides filamentosus";"SNAP";1;"PHYSCLI";"NA";"NA";"NA";"Hawaii";"NA";"NA";"NA";;"exsitu";55.1;20.6;"NA";0;"Unreallistic TS values: standard length, not total length...";1;"NA"
-"SARDOCE";"Barange et al., 1996";"38";"Pilchard";"Sardinops ocellatus";"CLUPsp";1;"PHYSSTO";15;23;"NA";"S.E. Atlantic";"NA";"NA";"NA";"N";"insitu";76.1;20;"NA";1;;1;"NA"
+"PRISFIL";"Benoit-Bird and Au, 2003 ";"60-200";"Pink snapper";"Pristipomoides filamentosus";"SNAP";1;"PHYSCLI";"NA";"NA";"NA";"Hawaii";"NA";"NA";"NA";;"exsitu";55.1;20.6;"NA";0;"Unreallistic TS values: standard length, not total length...";1;
+"SARDOCE";"Barange et al., 1996";"38";"Pilchard";"Sardinops ocellatus";"CLUPsp";1;"PHYSSTO";15;23;"NA";"S.E. Atlantic";"NA";"NA";"NA";"N";"insitu";76.1;20;"NA";1;;1;
"SARDPIL";"Pyrounaki et al., HCMR 2010";"38";"European Sardine";"Sardina pilchardus";"CLUPsp";1;"PHYSSTO";5.8;16.2;8.5;"Aegean sea";"NA";100;80;"N";"insitu";70.8;20;"NA";1;"6 night hauls >90% anchovy, 2004-2010";"NA";1351
-"SARDSAG";"Gutierrez and MacLennan, 1998";"120";"Sardine";"Sardinops sagax";"CLUPsp";1;"PHYSSTO";12;20;"NA";"Peru";"NA";"NA";"NA";"A";"exsitu";74.1;20;"NA";1;;1;"NA"
+"SARDSAG";"Gutierrez and MacLennan, 1998";"120";"Sardine";"Sardinops sagax";"CLUPsp";1;"PHYSSTO";12;20;"NA";"Peru";"NA";"NA";"NA";"A";"exsitu";74.1;20;"NA";1;;1;
"SCOMJAP";"Gutierrez and MacLennan, 1998";"120";"Spanish mackerel";"Scomber japonicus";"SCOMsp";1;"PHYSCLI";26;30;27.9;"Peru";"NA";"NA";"NA";"A";"exsitu";70.8;20;"NA";1;;1;1773
"SCOMJAP";"Gutierrez and MacLennan, 1998";"38";"Spanish mackerel";"Scomber japonicus";"SCOMsp";1;"PHYSCLI";26;30;27.9;"Peru";"NA";"NA";"NA";"A";"exsitu";70.9;20;"NA";1;;1;1773
"SCOMSCO";"Edwards et al., 1984";"38";"Mackerel";"Scomber scombrus";"SCOMsp";0;"NOSB";31;35;32.7;"N.E. Atlantic";"NA";"NA";"NA";"A";"exsitu";84.9;20;"NA";1;;1;1772
"SCOMSCO";"Clay and Castonguay, 1995";"38";"Mackerel";"Scomber scombrus";"SCOMsp";0;"NOSB";29;41;38;"Newfoundland";"NA";"NA";"NA";"A";"insitu";88;20;"NA";1;;1;1772
"SCOMSCO";"Misund and Beltestad, 1996";"38";"Mackerel";"Scomber scombrus";"SCOMsp";0;"NOSB";"NA";"NA";37.8;"North Sea";"NA";"NA";"NA";"D";"comp";86.4;20;"NA";1;;1;1772
-"SEBAMAR";"Foote et al., 1986";"38";"Redfish";"Sebastes marinus";"SEBAsp";1;"PHYSCLI";9;43;19.7;"Norvegian Sea";"NA";"NA";"NA";"N";"insitu";67.1;20;"NA";1;;1;"NA"
-"SEBASCH";"Kang and Hwang, 2003";"38";"Rockfish";"Sebastes schlegi";"SEBAsp";1;"PHYSCLI";10;24;16.1;"N.W. Pacific";"NA";"NA";"NA";;"exsitu";67.7;20;"NA";1;;1;"NA"
-"SEBASCH";"Kang and Hwang, 2003";"200";"Rockfish";"Sebastes schlegi";"SEBAsp";1;"PHYSCLI";10;24;16.1;"N.W. Pacific";"NA";"NA";"NA";;"exsitu";72.8;20;"NA";1;;1;"NA"
-"SEBASCH";"Kang and Hwang, 2003";"120";"Rockfish";"Sebastes schlegi";"SEBAsp";1;"PHYSCLI";10;24;16.1;"N.W. Pacific";"NA";"NA";"NA";;"exsitu";74.3;20;"NA";1;;1;"NA"
+"SEBAMAR";"Foote et al., 1986";"38";"Redfish";"Sebastes marinus";"SEBAsp";1;"PHYSCLI";9;43;19.7;"Norvegian Sea";"NA";"NA";"NA";"N";"insitu";67.1;20;"NA";1;;1;
+"SEBASCH";"Kang and Hwang, 2003";"38";"Rockfish";"Sebastes schlegi";"SEBAsp";1;"PHYSCLI";10;24;16.1;"N.W. Pacific";"NA";"NA";"NA";;"exsitu";67.7;20;"NA";1;;1;
+"SEBASCH";"Kang and Hwang, 2003";"200";"Rockfish";"Sebastes schlegi";"SEBAsp";1;"PHYSCLI";10;24;16.1;"N.W. Pacific";"NA";"NA";"NA";;"exsitu";72.8;20;"NA";1;;1;
+"SEBASCH";"Kang and Hwang, 2003";"120";"Rockfish";"Sebastes schlegi";"SEBAsp";1;"PHYSCLI";10;24;16.1;"N.W. Pacific";"NA";"NA";"NA";;"exsitu";74.3;20;"NA";1;;1;
"SPRASPR";"Robinson, 1983";"30";"Sprat";"Sprattus sprattus";"CLUPsp";1;"PHYSSTO";9;15;12.6;"North Sea";"NA";"NA";"NA";"N";"ind";69.1;20;"NA";1;;1;1356
"SPRASPR";"Robinson, 1983";"30";"Sprat";"Sprattus sprattus";"CLUPsp";1;"PHYSSTO";"NA";"NA";7.15;"North Sea";"NA";"NA";"NA";"N";"ind";70.7;20;"NA";1;;1;1356
"SPRASPR";"Faessler et Gorska, 2009";"38";"Sprat";"Sprattus sprattus";"CLUPsp";1;"PHYSSTO";5;25;"NA";"Baltic Sea";"NA";"NA";0;;"model";73.06;27.5;"NA";1;;1;1356
"SPRASPR";"Faessler et Gorska, 2009";"38";"Sprat";"Sprattus sprattus";"CLUPsp";1;"PHYSSTO";5;25;"NA";"Baltic Sea";"NA";"NA";0;;"model";65.08;20;"NA";1;;1;1356
-"SYMBCAL";"Yasuma et al., 2003";"38";"Myctophids";"Symbolophorus californiensis";"MYCTsp";1;"NOSB";8;11;"NA";"Japan";"NA";"NA";50;"N";"model";85.7;20;"NA";1;;1;"NA"
-"THERCHA";"Traynor, 1996";"38";"Walleye pollock";"Theragra chalcogramma";"GADIsp";1;"PHYSCLI";35;52;41.7;"Bering Sea";"NA";"NA";"NA";"A";"insitu";66;20;"NA";1;;1;"NA"
-"THUNALB";"Bertrand et al., 1999";"38";"Yellowfin tuna";"Thunnus albacares";"THUNsp";1;"PHYSCLI";60;120;94.5;"French Polynesia";"NA";"NA";"NA";"D";"insitu";80.62;25.26;"NA";1;;1;"NA"
-"THUNOBE";"Bertrand et al., 1999";"38";"Bigeye tuna";"Thunnus obesus";"THUNsp";1;"PHYSCLI";50;130;"NA";"French Polynesia";"NA";"NA";"NA";"D";"insitu";73.31;24.29;"NA";1;;1;"NA"
-"TODAPAC";"Kawabata, 2005";"38";"Squid";"Todarodes pacificus";"SQUID";0;"NOSB";18;28.4;"NA";"Japan";"NA";"NA";"NA";"D";"exsitu";73.1;20;"NA";1;;1;"NA"
-"TODAPAC";"Kang et al., 2005";"38";"Japanese squid";"Todarodes pacificus";"SQUID";0;"NOSB";21;27;24.75;"Korea";"NA";"NA";0;"N";"exsitu";75.4;20;0.81;1;;1;"NA"
-"TODAPAC";"Kang et al., 2005";"120";"Japanese squid";"Todarodes pacificus";"SQUID";0;"NOSB";21;27;24.75;"Korea";"NA";"NA";0;"N";"exsitu";73.5;20;0.64;1;;1;"NA"
-"TRACCAP";"Barange et al., 1996";"38";"Cape horse mackerel";"Trachurus trachurus capensis";"TRACsp";1;"PHYSCLI";25;47;"NA";"S.W. Atlantic";"NA";"NA";"NA";"N";"insitu";66.8;20;"NA";1;;1;"NA"
+"SYMBCAL";"Yasuma et al., 2003";"38";"Myctophids";"Symbolophorus californiensis";"MYCTsp";1;"NOSB";8;11;"NA";"Japan";"NA";"NA";50;"N";"model";85.7;20;"NA";1;;1;
+"THERCHA";"Traynor, 1996";"38";"Walleye pollock";"Theragra chalcogramma";"GADIsp";1;"PHYSCLI";35;52;41.7;"Bering Sea";"NA";"NA";"NA";"A";"insitu";66;20;"NA";1;;1;
+"THUNALB";"Bertrand et al., 1999";"38";"Yellowfin tuna";"Thunnus albacares";"THUNsp";1;"PHYSCLI";60;120;94.5;"French Polynesia";"NA";"NA";"NA";"D";"insitu";80.62;25.26;"NA";1;;1;
+"THUNOBE";"Bertrand et al., 1999";"38";"Bigeye tuna";"Thunnus obesus";"THUNsp";1;"PHYSCLI";50;130;"NA";"French Polynesia";"NA";"NA";"NA";"D";"insitu";73.31;24.29;"NA";1;;1;
+"TODAPAC";"Kawabata, 2005";"38";"Squid";"Todarodes pacificus";"SQUID";0;"NOSB";18;28.4;"NA";"Japan";"NA";"NA";"NA";"D";"exsitu";73.1;20;"NA";1;;1;
+"TODAPAC";"Kang et al., 2005";"38";"Japanese squid";"Todarodes pacificus";"SQUID";0;"NOSB";21;27;24.75;"Korea";"NA";"NA";0;"N";"exsitu";75.4;20;0.81;1;;1;
+"TODAPAC";"Kang et al., 2005";"120";"Japanese squid";"Todarodes pacificus";"SQUID";0;"NOSB";21;27;24.75;"Korea";"NA";"NA";0;"N";"exsitu";73.5;20;0.64;1;;1;
+"TRACCAP";"Barange et al., 1996";"38";"Cape horse mackerel";"Trachurus trachurus capensis";"TRACsp";1;"PHYSCLI";25;47;"NA";"S.W. Atlantic";"NA";"NA";"NA";"N";"insitu";66.8;20;"NA";1;;1;
"TRACPIC";"Gutierrez and MacLennan, 1998";"38";"Jurel";"Trachurus picturatus";"TRACsp";1;"PHYSCLI";36;40;"NA";"Peru";"NA";"NA";"NA";"A";"exsitu";68.1;20;"NA";1;;1;1664
-"TRACSYM";"Pena and Foote, 2008";"38";"Jack Mackerel";"Trachurus symmetricus murphyi";"TRACsp";1;"PHYSCLI";18;43;"NA";"Chile";"NA";"NA";0;;"model";74.9;20;"NA";1;;1;"NA"
-"TRACSYM";"Lillo et al., 1996";"38";"Jack Mackerel";"Trachurus symmetricus murphyi";"TRACsp";1;"PHYSCLI";22;40;"NA";"Chile";"NA";"NA";"NA";"N";"insitu";73.3;23.3;"NA";1;;1;"NA"
-"TRACSYM";"Pena and Foote, 2008";"38";"Jack Mackerel";"Trachurus symmetricus murphyi";"TRACsp";1;"PHYSCLI";18;43;"NA";"Chile";"NA";"NA";0;;"model";70.2;16.8;"NA";1;;1;"NA"
-"TRACSYM";"Lillo et al., 1996";"38";"Jack Mackerel";"Trachurus symmetricus murphyi";"TRACsp";1;"PHYSCLI";22;40;"NA";"Chile";"NA";"NA";"NA";"N";"insitu";68.9;20;"NA";1;;1;"NA"
-"TRICHAU";"Zhao, 2006";"38";"Hairtail";"Trichiurus haumela";"CLUPsp";1;"PHYSSTO";6.2;11.5;"NA";"Yellow Sea";"NA";"NA";38.2;"N";"insitu";68.3;20;"NA";1;;1;"NA"
-"TRISESM";"Foote et al., 1986";"38";"Norway pout";"Trisopterus esmarkii";"GADIsp";1;"PHYSCLI";10;21;17.6;"Norvegian Sea";"NA";"NA";"NA";"N";"insitu";67.1;20;"NA";1;;1;"NA"
-"TRISESM";"Foote et al., 1986";"38";"Norway pout";"Trisopterus esmarkii";"GADIsp";1;"PHYSCLI";12;19;14.8;"Norvegian Sea";"NA";"NA";"NA";"N";"insitu";68.3;20;"NA";1;;1;"NA"
\ No newline at end of file
+"TRACSYM";"Pena and Foote, 2008";"38";"Jack Mackerel";"Trachurus symmetricus murphyi";"TRACsp";1;"PHYSCLI";18;43;"NA";"Chile";"NA";"NA";0;;"model";74.9;20;"NA";1;;1;
+"TRACSYM";"Lillo et al., 1996";"38";"Jack Mackerel";"Trachurus symmetricus murphyi";"TRACsp";1;"PHYSCLI";22;40;"NA";"Chile";"NA";"NA";"NA";"N";"insitu";73.3;23.3;"NA";1;;1;
+"TRACSYM";"Pena and Foote, 2008";"38";"Jack Mackerel";"Trachurus symmetricus murphyi";"TRACsp";1;"PHYSCLI";18;43;"NA";"Chile";"NA";"NA";0;;"model";70.2;16.8;"NA";1;;1;
+"TRACSYM";"Lillo et al., 1996";"38";"Jack Mackerel";"Trachurus symmetricus murphyi";"TRACsp";1;"PHYSCLI";22;40;"NA";"Chile";"NA";"NA";"NA";"N";"insitu";68.9;20;"NA";1;;1;
+"TRICHAU";"Zhao, 2006";"38";"Hairtail";"Trichiurus haumela";"CLUPsp";1;"PHYSSTO";6.2;11.5;"NA";"Yellow Sea";"NA";"NA";38.2;"N";"insitu";68.3;20;"NA";1;;1;
+"TRISESM";"Foote et al., 1986";"38";"Norway pout";"Trisopterus esmarkii";"GADIsp";1;"PHYSCLI";10;21;17.6;"Norvegian Sea";"NA";"NA";"NA";"N";"insitu";67.1;20;"NA";1;;1;
+"TRISESM";"Foote et al., 1986";"38";"Norway pout";"Trisopterus esmarkii";"GADIsp";1;"PHYSCLI";12;19;14.8;"Norvegian Sea";"NA";"NA";"NA";"N";"insitu";68.3;20;"NA";1;;1;
1
0
r262 - in trunk: echobase-entities/src/main/resources/i18n echobase-entities/src/main/xmi echobase-services/src/main/java/fr/ifremer/echobase/services/csv echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders echobase-tools/src/test/resources/csv/new
by tchemit@users.forge.codelutin.com 12 Jan '12
by tchemit@users.forge.codelutin.com 12 Jan '12
12 Jan '12
Author: tchemit
Date: 2012-01-12 16:13:31 +0100 (Thu, 12 Jan 2012)
New Revision: 262
Url: http://forge.codelutin.com/repositories/revision/echobase/262
Log:
redo TSParameters
Added:
trunk/echobase-tools/src/test/resources/csv/new/input-TSParameters.csv
Modified:
trunk/echobase-entities/src/main/resources/i18n/echobase-entities_fr_FR.properties
trunk/echobase-entities/src/main/xmi/echobase.zargo
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/CsvModelUtil.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EntityAssociationImportModel.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/TSParametersLoader.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TSParametersLoaderIT.java
Modified: trunk/echobase-entities/src/main/resources/i18n/echobase-entities_fr_FR.properties
===================================================================
--- trunk/echobase-entities/src/main/resources/i18n/echobase-entities_fr_FR.properties 2012-01-12 12:03:27 UTC (rev 261)
+++ trunk/echobase-entities/src/main/resources/i18n/echobase-entities_fr_FR.properties 2012-01-12 15:13:31 UTC (rev 262)
@@ -1,9 +1,11 @@
echobase.common.AParameter=
echobase.common.BParameter=
echobase.common.TSParameters=
+echobase.common.a=
echobase.common.accuracyEstimate=
echobase.common.acknowledgement=
echobase.common.acousticDensityUnit=
+echobase.common.acousticFrequency=
echobase.common.acousticInstrument=
echobase.common.acquisitionSoftwareVersion=
echobase.common.active=
@@ -17,6 +19,8 @@
echobase.common.author=Auteur
echobase.common.authorEmail=Courriel de l'auteur
echobase.common.authorReference=
+echobase.common.averageDepth=
+echobase.common.averageFishLength=
echobase.common.axis=
echobase.common.b=
echobase.common.baracoudaCode=
@@ -40,6 +44,7 @@
echobase.common.classCode=
echobase.common.code=
echobase.common.codeMemo=
+echobase.common.codePerm=
echobase.common.comment=
echobase.common.data=data
echobase.common.dataAcquisition=dataAcquisition
@@ -58,6 +63,7 @@
echobase.common.datumType=
echobase.common.depthStratum=depthStratum
echobase.common.description=Description
+echobase.common.dielPeriod=
echobase.common.digitThreshold=
echobase.common.distributionStatement=distributionStatement
echobase.common.echoBaseUser=Utilisateur
@@ -120,10 +126,13 @@
echobase.common.linestring=
echobase.common.litteratureReference=
echobase.common.litteratureReferences=Références
+echobase.common.location=
echobase.common.loggedDataDatatype=
echobase.common.loggedDataFormat=
echobase.common.longName=
echobase.common.m=
+echobase.common.maxDepth=
+echobase.common.maxFishLength=
echobase.common.maxLatitude=
echobase.common.maxLongitude=
echobase.common.meaning=
@@ -135,8 +144,11 @@
echobase.common.measurementUnit=
echobase.common.metadata=metadata
echobase.common.metadataGroup=
+echobase.common.method=
echobase.common.midHauleLatitude=
echobase.common.midHauleLongitude=
+echobase.common.minDepth=
+echobase.common.minFishLength=
echobase.common.minLatitude=
echobase.common.minLongitude=
echobase.common.mission=mission
@@ -149,6 +161,7 @@
echobase.common.noiseDesign=
echobase.common.notes=
echobase.common.numberSampled=
+echobase.common.ok=
echobase.common.operation=
echobase.common.operationEvent=
echobase.common.operationMetadata=
@@ -171,8 +184,11 @@
echobase.common.processingSoftwareVersion=
echobase.common.processingTemplate=
echobase.common.project=Projet
+echobase.common.published=
echobase.common.qualityDataFlagValues=
+echobase.common.r2=
echobase.common.raptriBiometryDataType=
+echobase.common.reference=
echobase.common.referenceDatum=referenceDatum
echobase.common.referenceDatumType=
echobase.common.referencingMethod=
@@ -194,6 +210,9 @@
echobase.common.source=Source
echobase.common.species=espèce
echobase.common.speciesCategory=
+echobase.common.speciesCode=
+echobase.common.speciesCommonName=
+echobase.common.speciesTSGroup=
echobase.common.sqlQuery=requête SQL
echobase.common.standardName=
echobase.common.startDate=
@@ -202,6 +221,8 @@
echobase.common.startTime=
echobase.common.status=
echobase.common.strata=
+echobase.common.swimbladder=
+echobase.common.swimbladderType=
echobase.common.taxonCode=
echobase.common.taxonFatherMemocode=
echobase.common.taxonSystematicLevel=
Modified: trunk/echobase-entities/src/main/xmi/echobase.zargo
===================================================================
(Binary files differ)
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/CsvModelUtil.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/CsvModelUtil.java 2012-01-12 12:03:27 UTC (rev 261)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/CsvModelUtil.java 2012-01-12 15:13:31 UTC (rev 262)
@@ -154,6 +154,18 @@
}
};
+ public static final ValueParser<Float> NA_TO_FLOAT_PARSER = new FloatParserFormatter(null, true) {
+
+ @Override
+ protected Float parseNoneEmptyValue(String value) {
+ if ("NA".equals(value)) {
+ return null;
+ }
+ return super.parseNoneEmptyValue(value);
+ }
+
+ };
+
public static class AssociationValueParserFormatter<E extends TopiaEntity> implements ValueParserFormatter<Collection<E>> {
protected final Class<E> entityType;
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EntityAssociationImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EntityAssociationImportModel.java 2012-01-12 12:03:27 UTC (rev 261)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EntityAssociationImportModel.java 2012-01-12 15:13:31 UTC (rev 262)
@@ -60,9 +60,6 @@
);
// add association -> target
-// Class<TopiaEntity> target =
-// (Class<TopiaEntity>) meta.getTarget().getImplementation();
-
model.modelBuilder.newMandatoryColumn(
meta.getName(),
CsvModelUtil.ASSOCIATION_VALUE_PARSER,
Modified: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/TSParametersLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/TSParametersLoader.java 2012-01-12 12:03:27 UTC (rev 261)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/TSParametersLoader.java 2012-01-12 15:13:31 UTC (rev 262)
@@ -23,26 +23,12 @@
*/
package fr.ifremer.echobase.tools.loaders;
-import com.google.common.collect.Lists;
-import com.healthmarketscience.jackcess.Database;
-import com.healthmarketscience.jackcess.Table;
-import fr.ifremer.echobase.entities.EchoBaseDAOHelper;
-import fr.ifremer.echobase.entities.references.AcousticInstrument;
-import fr.ifremer.echobase.entities.references.AcousticInstrumentDAO;
-import fr.ifremer.echobase.entities.references.Species;
-import fr.ifremer.echobase.entities.references.SpeciesDAO;
+import fr.ifremer.echobase.entities.meta.TableMeta;
import fr.ifremer.echobase.entities.references.TSParameters;
+import fr.ifremer.echobase.services.csv.CsvModelUtil;
+import fr.ifremer.echobase.services.csv.EntityCsvModel;
import fr.ifremer.echobase.tools.FileType;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.nuiton.topia.TopiaContext;
-import org.nuiton.topia.TopiaException;
-import org.nuiton.topia.persistence.TopiaDAO;
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-
/**
* {@link TSParameters} loader.
*
@@ -51,61 +37,46 @@
*/
public class TSParametersLoader extends EntityLoader<TSParameters> {
- /** Logger. */
- private static final Log log =
- LogFactory.getLog(TSParametersLoader.class);
-
public TSParametersLoader() {
- super(TSParameters.class, FileType.BARACOUDA);
+ super(TSParameters.class, FileType.NEW);
}
/*
-COEFFICIENT_ACOUSTIQUE : [BAC, CAC, Genre_esp, Id_sondeur, s_ColLineage, s_GUID, s_Generation, s_Lineage] with 422 entries.
- */
+ "speciesCode";"reference";"acousticFrequency";"speciesCommonName";"genusSpecies";"speciesTSGroup";"hasSwimbladder";"swimbladderType";"minFishLength";"maxFishLength";
+ "averageFishLength";"location";"minDepth";"maxDepth";"averageDepth";"dielPeriod";"method";"b";"a";"r2";"isOK";"Comment";"isPublished";"C_Perm"
+ */
@Override
- protected void importBaracoudaEntities(Database db) throws IOException, TopiaException {
+ protected EntityCsvModel<TSParameters> createCsvImportModel(TableMeta meta) {
- // require referenceDatum, dataType and cellMethod
-
- TopiaContext tx = serviceContext.getTransaction();
-
- SpeciesDAO speciesDAO = EchoBaseDAOHelper.getSpeciesDAO(tx);
- AcousticInstrumentDAO acousticInstrumentDAO =
- EchoBaseDAOHelper.getAcousticInstrumentDAO(tx);
-
- TopiaDAO<TSParameters> dao = getDAO();
-
- List<TSParameters> entities = Lists.newArrayList();
- Table table = db.getTable("COEFFICIENT_ACOUSTIQUE");
- for (Map<String, Object> row : table) {
- Float m = (Float) row.get("CAC");
- Float b = (Float) row.get("BAC");
- String acoustictInstrumentId = row.get("Id_sondeur").toString();
- String speciesGenius = (String) row.get("Genre_esp");
-
- Species species = speciesDAO.findByBaracoudaCode(speciesGenius);
- if (species == null) {
- if (log.isWarnEnabled()) {
- log.warn("Could not find species with baracoudaCode " + speciesGenius);
- }
- }
- AcousticInstrument acousticInstrument = acousticInstrumentDAO.findById(acoustictInstrumentId);
- if (acousticInstrument == null) {
- if (log.isWarnEnabled()) {
- log.warn("Could not find acousticInstrument with id " + acoustictInstrumentId);
- }
- }
- TSParameters entity = dao.create(
- TSParameters.PROPERTY_M, m,
- TSParameters.PROPERTY_B, b,
- TSParameters.PROPERTY_SPECIES, species,
- TSParameters.PROPERTY_ACOUSTIC_INSTRUMENT, acousticInstrument
- );
- entities.add(entity);
- }
- if (log.isInfoEnabled()) {
- log.info("Found " + entities.size() + " TSParameter(s).");
- }
+ EntityCsvModel<TSParameters> model = EntityCsvModel.newModel(
+ getCsvSeparator(),
+ meta
+ );
+ model.addDefaultColumn("speciesCode", TSParameters.PROPERTY_SPECIES_CODE, String.class);
+ model.addDefaultColumn("reference", TSParameters.PROPERTY_REFERENCE, String.class);
+ model.addDefaultColumn("acousticFrequency", TSParameters.PROPERTY_ACOUSTIC_FREQUENCY, String.class);
+ model.addDefaultColumn("speciesCommonName", TSParameters.PROPERTY_SPECIES_COMMON_NAME, String.class);
+ model.addDefaultColumn("genusSpecies", TSParameters.PROPERTY_GENUS_SPECIES, String.class);
+ model.addDefaultColumn("speciesTSGroup", TSParameters.PROPERTY_SPECIES_TSGROUP, String.class);
+ model.addDefaultColumn("hasSwimbladder", TSParameters.PROPERTY_SWIMBLADDER, boolean.class);
+ model.addDefaultColumn("swimbladderType", TSParameters.PROPERTY_SWIMBLADDER_TYPE, String.class);
+ model.newMandatoryColumn("minFishLength", TSParameters.PROPERTY_MIN_FISH_LENGTH, CsvModelUtil.NA_TO_FLOAT_PARSER);
+ model.newMandatoryColumn("maxFishLength", TSParameters.PROPERTY_MAX_DEPTH, CsvModelUtil.NA_TO_FLOAT_PARSER);
+ model.newMandatoryColumn("averageFishLength", TSParameters.PROPERTY_AVERAGE_FISH_LENGTH, CsvModelUtil.NA_TO_FLOAT_PARSER);
+ model.addDefaultColumn("location", TSParameters.PROPERTY_LOCATION, String.class);
+ model.newMandatoryColumn("minDepth", TSParameters.PROPERTY_MIN_DEPTH, CsvModelUtil.NA_TO_FLOAT_PARSER);
+ model.newMandatoryColumn("maxDepth", TSParameters.PROPERTY_MAX_DEPTH, CsvModelUtil.NA_TO_FLOAT_PARSER);
+ model.newMandatoryColumn("averageDepth", TSParameters.PROPERTY_AVERAGE_DEPTH, CsvModelUtil.NA_TO_FLOAT_PARSER);
+ model.addDefaultColumn("dielPeriod", TSParameters.PROPERTY_DIEL_PERIOD, String.class);
+ model.addDefaultColumn("method", TSParameters.PROPERTY_METHOD, String.class);
+ model.addDefaultColumn("b", TSParameters.PROPERTY_B, Float.class);
+ model.addDefaultColumn("a", TSParameters.PROPERTY_A, Float.class);
+ model.newMandatoryColumn("r2", TSParameters.PROPERTY_R2, CsvModelUtil.NA_TO_FLOAT_PARSER);
+ model.newMandatoryColumn("isOK", TSParameters.PROPERTY_OK, CsvModelUtil.INT_TO_BOOLEAN_PARSER);
+ model.addDefaultColumn("Comment", TSParameters.PROPERTY_COMMENT, String.class);
+ model.newMandatoryColumn("isPublished", TSParameters.PROPERTY_PUBLISHED, CsvModelUtil.INT_TO_BOOLEAN_PARSER);
+ model.addDefaultColumn("C_Perm", TSParameters.PROPERTY_CODE_PERM, String.class);
+ return model;
}
}
Modified: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TSParametersLoaderIT.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TSParametersLoaderIT.java 2012-01-12 12:03:27 UTC (rev 261)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TSParametersLoaderIT.java 2012-01-12 15:13:31 UTC (rev 262)
@@ -35,12 +35,12 @@
public class TSParametersLoaderIT extends AbstractLoaderIT<TSParameters, TSParametersLoader> {
public TSParametersLoaderIT() {
- super(TSParametersLoader.class, 0, 422);
+ super(TSParametersLoader.class, 133, 0);
}
@Test
- public void testGenerateEntitiesFromBaracouda() throws Exception {
- generateBaracoudaEntities();
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
}
}
Added: trunk/echobase-tools/src/test/resources/csv/new/input-TSParameters.csv
===================================================================
--- trunk/echobase-tools/src/test/resources/csv/new/input-TSParameters.csv (rev 0)
+++ trunk/echobase-tools/src/test/resources/csv/new/input-TSParameters.csv 2012-01-12 15:13:31 UTC (rev 262)
@@ -0,0 +1,134 @@
+"speciesCode";"reference";"acousticFrequency";"speciesCommonName";"genusSpecies";"speciesTSGroup";"hasSwimbladder";"swimbladderType";"minFishLength";"maxFishLength";"averageFishLength";"location";"minDepth";"maxDepth";"averageDepth";"dielPeriod";"method";"b";"a";"r2";"isOK";"Comment";"isPublished";"C_Perm"
+"ALOSPSE";"Brooking et al., 2009";"70";"Alewive";"Alosa pseudoharengus";"ALOSsp";1;;68;138;"NA";"New york";"NA";"NA";"NA";;"insitu";62.2;19.1;"NA";1;;1;"NA"
+"AMMPPER";"Yasuma et al., 2009";"38";"Sandeel";"Ammodytes personatus";"AMMOsp";0;"NOSB";3.4;6.7;"NA";"Japan";10;20;"NA";;"model";125.1;56.5;"NA";1;;1;"NA"
+"AMMPPER";"Yasuma et al., 2009";"120";"Sandeel";"Ammodytes personatus";"AMMOsp";0;"NOSB";3.4;6.7;"NA";"Japan";10;20;"NA";;"model";98.2;34;"NA";1;;1;"NA"
+"AMMPPER";"Yasuma et al., 2009";"38";"Sandeel";"Ammodytes personatus";"AMMOsp";0;"NOSB";7.5;11.5;"NA";"Japan";10;20;"NA";;"model";89.2;20;"NA";1;;1;"NA"
+"AMMPPER";"Yasuma et al., 2009";"120";"Sandeel";"Ammodytes personatus";"AMMOsp";0;"NOSB";7.5;11.5;"NA";"Japan";10;20;"NA";;"model";92.1;20.7;"NA";1;;1;"NA"
+"AMMPPER";"Armstrong, 1986";"38";"Sandeel";"Ammodytes personatus";"AMMOsp";0;"NOSB";11;14;"NA";"N.E. Atlantic";"NA";"NA";"NA";;"insitu";93.7;20;"NA";1;;1;"NA"
+"ARGESIL";"Foote et al., 1986";"38";"Great silver smelt";"Argentina silus";"ARGEsp";1;"PHYSCLI";25;50;37.2;"Norvegian Sea";"NA";"NA";"NA";"N";"insitu";68;20;"NA";1;;1;1395
+"BENTFIB";"Benoit-Bird and Au, 2001 ";"200";"Myctophids";"Benthosoma fibulatum";"MYCTsp";1;"NOSB";2;8;"NA";"Hawaii";"NA";"NA";"NA";;"exsitu";58.8;20;"NA";1;;1;"NA"
+"CERAWAR";"Yasuma et al., 2010";"38";"Myctophids";"Ceratoscopelus warmingii";"MYCTsp";0;"NOSB";2.3;4.3;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";112.2;49.4;"NA";1;;1;"NA"
+"CERAWAR";"Yasuma et al., 2010";"120";"Myctophids";"Ceratoscopelus warmingii";"MYCTsp";0;"NOSB";2.3;4.3;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";82.6;10.4;"NA";1;;1;"NA"
+"CERAWAR";"Yasuma et al., 2010";"38";"Myctophids";"Ceratoscopelus warmingii";"MYCTsp";1;"PHYSCLI";3.3;8.3;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";78.1;26.3;"NA";1;;1;"NA"
+"CERAWAR";"Yasuma et al., 2010";"120";"Myctophids";"Ceratoscopelus warmingii";"MYCTsp";1;"PHYSCLI";3.3;8.3;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";79.2;26.1;"NA";1;;1;"NA"
+"CLUPHAR";"Foote, 1987";"38";"Herring";"Clupea harengus";"CLUPsp";1;"PHYSSTO";24;34;28.5;"North Sea";"NA";"NA";"NA";"N";"insitu";72.1;20;"NA";1;;1;1349
+"CLUPHAR";"Faessler et Gorska, 2009";"38";"Herring";"Clupea harengus";"CLUPsp";1;"PHYSSTO";5;25;"NA";"Baltic Sea";"NA";"NA";0;;"model";63.88;20;"NA";1;;1;1349
+"CLUPHAR";"Misund and Beltestad, 1996";"38";"Herring";"Clupea harengus";"CLUPsp";1;"PHYSSTO";"NA";"NA";32.8;"Norvegian fjords";"NA";"NA";"NA";"D";"comp";71.1;20;"NA";1;;1;1349
+"CLUPHAR";"Peltonen and Balk, 2005";"38";"Herring";"Clupea harengus";"CLUPsp";1;"PHYSSTO";8;22;12;"Baltic Sea";"NA";"NA";30;"N";"insitu";63.9;20;0.54;1;;1;1349
+"CLUPHAR";"Rudstam et al., 1988";"70";"Herring";"Clupea harengus";"CLUPsp";1;"PHYSSTO";6;24;13;"Baltic Sea";"NA";"NA";"NA";"N";"ind";69.9;20;"NA";1;;1;1349
+"CLUPHAR";"Halldorsson and Reynisson, 1983";"38";"Herring";"Clupea harengus";"CLUPsp";1;"PHYSSTO";9;33;21.5;"Iceland";"NA";"NA";"NA";"N";"ind";73.2;20;"NA";1;;1;1349
+"CLUPHAR";"Faessler et Gorska, 2009";"38";"Herring";"Clupea harengus";"CLUPsp";1;"PHYSSTO";5;25;"NA";"Baltic Sea";"NA";"NA";0;;"model";64.07;20.08;"NA";1;;1;1349
+"CLUPHAR";"Edwards et al., 1984";"38";"Herring";"Clupea harengus";"CLUPsp";1;"PHYSSTO";7;27;18.8;"N.E. Atlantic";"NA";"NA";"NA";"A";"exsitu";71.3;20;"NA";1;;1;1349
+"CLUPHAR";"Edwards et al., 1984";"38";"Herring";"Clupea harengus";"CLUPsp";1;"PHYSSTO";7;27;18.8;"N.E. Atlantic";"NA";"NA";"NA";"A";"exsitu";71.5;20.1;"NA";1;;1;1349
+"CLUPHAR";"Peltonen and Balk, 2005";"38";"Herring";"Clupea harengus";"CLUPsp";1;"PHYSSTO";8;22;12;"Baltic Sea";"NA";"NA";30;"N";"insitu";54;12.3;0.52;1;;1;1349
+"CLUPHAR";"Rudstam et al., 1988";"70";"Herring";"Clupea harengus";"CLUPsp";1;"PHYSSTO";6;24;13;"Baltic Sea";"NA";"NA";"NA";"N";"ind";75.5;21.7;"NA";1;;1;1349
+"CLUPHAR";"Misund and Ovredal, 1988";"70";"Herring";"Clupea harengus";"CLUPsp";1;"PHYSSTO";22;33;28;"Norvegian fjords";"NA";"NA";"NA";"D";"ind";72.3;20;"NA";1;;1;1349
+"CLUPSPR";"Degnbol et al., 1985";"38";"Herring/sprat";"Clupea sprattus";"CLUPsp";1;"PHYSSTO";19;26;21;"Kattegat/Skagerak";"NA";"NA";"NA";"A";"comp";72.6;20;"NA";1;;1;"NA"
+"CLUPSPR";"Edwards et al., 1984";"38";"Herring/sprat";"Clupea sprattus";"CLUPsp";1;"PHYSSTO";12;21;16.6;"N.E. Atlantic";"NA";"NA";"NA";"A";"insitu";73.4;20;"NA";1;;1;"NA"
+"CLUPSPR";"Degnbol et al., 1985";"120";"Herring/sprat";"Clupea sprattus";"CLUPsp";1;"PHYSSTO";7;19;13.8;"S.E. Baltic";"NA";"NA";"NA";"N";"comp";73.1;20;"NA";1;;1;"NA"
+"CLUPSPR";"Edwards et al., 1984";"120";"Herring/sprat";"Clupea sprattus";"CLUPsp";1;"PHYSSTO";12;21;16.6;"N.E. Atlantic";"NA";"NA";"NA";"A";"insitu";76;20;"NA";1;;1;"NA"
+"CLUPSPR";"ICES, 1982";"38";"Herring/sprat";"Clupea sprattus";"CLUPsp";1;"PHYSSTO";"NA";"NA";"NA";"North Atlantic";"NA";"NA";"NA";;;71.2;20;"NA";1;;1;"NA"
+"COLOSAI";"Sawada et al., 2009";"70";"Pacific saury";"Cololabis saira";"SCOMsp";0;"NOSB";19.7;31.7;25.7;"North Pacific";"NA";"NA";22;"N";"insitu";67.6;20;"NA";1;;1;"NA"
+"DIAPCHR";"Yasuma et al., 2010";"38";"Myctophids";"Diaphus chrysorhynchus";"MYCTsp";0;"NOSB";6.2;10;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";96.3;30.5;"NA";1;;1;"NA"
+"DIAPCHR";"Yasuma et al., 2010";"120";"Myctophids";"Diaphus chrysorhynchus";"MYCTsp";0;"NOSB";6.2;10;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";63.2;-9.1;"NA";1;;1;"NA"
+"DIAPGAR";"Yasuma et al., 2010";"120";"Myctophids";"Diaphus garmani";"MYCTsp";1;"PHYSCLI";3.1;5.7;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";83.3;32.7;"NA";1;;1;"NA"
+"DIAPGAR";"Yasuma et al., 2010";"38";"Myctophids";"Diaphus garmani";"MYCTsp";1;"PHYSCLI";3.1;5.7;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";83.5;34.5;"NA";1;;1;"NA"
+"DIAPGAR";"Yasuma et al., 2010";"38";"Myctophids";"Diaphus garmani";"MYCTsp";0;"NOSB";2.1;5.3;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";113.5;54;"NA";1;;1;"NA"
+"DIAPGAR";"Yasuma et al., 2010";"120";"Myctophids";"Diaphus garmani";"MYCTsp";0;"NOSB";2.1;5.3;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";8.4;6.9;"NA";1;;1;"NA"
+"DIAPTHE";"Yasuma et al., 2003";"38";"Myctophids";"Diaphus theta";"MYCTsp";1;"PHYSCLI";2;8;"NA";"Japan";"NA";"NA";20;"N";"model";69.4;20;"NA";1;;1;"NA"
+"ENGRCAP";"Barange et al., 1996";"38";"South African Anchovy";"Engraulis capensis";"CLUPsp";1;"PHYSSTO";7;14;"NA";"South Africa";"NA";"NA";"NA";"N";"insitu";76.1;20;"NA";0;"Doubtfull TS mode selection";1;"NA"
+"ENGRENC";"Miquel et al., Ecomed 2009";"38";"European Anchovy";"Engraulis encrasicolus";"CLUPsp";1;"PHYSSTO";8.5;12;11.7;"Spanish Mediterranean";10;50;30;"N";"insitu";71.2;20;"NA";1;"7 night hauls >80% anchovy or 1 FL/TS mode";0;1362
+"ENGRENC";"Miquel et al., MEDIAS 0710";"38";"European Anchovy";"Engraulis encrasicolus";"CLUPsp";1;"PHYSSTO";"NA";"NA";13.4;"Spanish Mediterranean";10;50;30;"N";"insitu";78.5;20;"NA";0;"3 day hauls 100% anchovy, 2-3 hours TS recording at night";0;1362
+"ENGRENC";"Pyrounaki et al., HCMR 2010";"38";"European Anchovy";"Engraulis encrasicolus";"CLUPsp";1;"PHYSSTO";4.7;16.5;11.5;"Aegean sea";"NA";100;80;"N";"insitu";73.4;20;"NA";1;"46 night hauls >90% anchovy, 2004-2010";0;1362
+"ENGRJAP";"Kang et al., 2009";"120";"Japanese Anchovy";"Engraulis japonicus";"CLUPsp";1;"PHYSSTO";4.8;12.2;"NA";"Korea";"NA";"NA";"NA";"A";"exsitu";68.4;20;"NA";1;;1;"NA"
+"ENGRJAP";"Kang et al., 2009";"200";"Japanese Anchovy";"Engraulis japonicus";"CLUPsp";1;"PHYSSTO";4.8;12.2;"NA";"Korea";"NA";"NA";"NA";"A";"exsitu";69.1;20;"NA";1;;1;"NA"
+"ENGRJAP";"Sawada et al., 2009";"70";"Japanese Anchovy";"Engraulis japonicus";"CLUPsp";1;"PHYSSTO";9.6;14.8;12.2;"Japan";"NA";"NA";21.2;"N";"insitu";68.3;20;"NA";1;;1;"NA"
+"ENGRJAP";"Zhao et al., 2008";"38";"Japanese Anchovy";"Engraulis japonicus";"CLUPsp";1;"PHYSSTO";6;15;10.6;"Yellow Sea";10;45;"NA";"N";"insitu";71.6;20;"NA";1;;1;"NA"
+"ENGRJAP";"Kang et al., 2009";"38";"Japanese Anchovy";"Engraulis japonicus";"CLUPsp";1;"PHYSSTO";4.8;12.2;"NA";"Korea";"NA";"NA";"NA";"A";"exsitu";65.8;20;"NA";1;;1;"NA"
+"ENGRRIG";"Gutierrez and MacLennan, 1998";"38";"Anchoveta";"Engraulis rigens";"CLUPsp";1;"PHYSSTO";10;16;12.8;"Peru";"NA";"NA";"NA";"A";"exsitu";78.9;20;"NA";1;;1;"NA"
+"ENGRRIG";"Gutierrez and MacLennan, 1998";"120";"Anchoveta";"Engraulis rigens";"CLUPsp";1;"PHYSSTO";10;16;11.3;"Peru";"NA";"NA";"NA";"A";"exsitu";76.2;20;"NA";1;;1;"NA"
+"ENGRRIG";"Simmonds et al., 2009";"38";"Anchoveta";"Engraulis rigens";"CLUPsp";1;"PHYSSTO";12;20;14;"Peru";"NA";"NA";"NA";;"insitu";88.57;30.05;"NA";1;;1;"NA"
+"GADUMOR";"Rose and Porter, 1996";"120";"Cod";"Gadus morhua";"GADIsp";1;"PHYSCLI";12;65;"NA";"Newfoundland";"NA";"NA";10;;"exsitu";65;20;"NA";1;;1;1543
+"GADUMOR";"Clay and Castonguay, 1995";"38";"Cod";"Gadus morhua";"GADIsp";1;"PHYSCLI";31;67;52;"Newfoundland";140;300;"NA";"N";"insitu";69.5;20;"NA";1;;1;1543
+"GADUMOR";"Rose and Porter, 1996";"38";"Cod";"Gadus morhua";"GADIsp";1;"PHYSCLI";12;65;"NA";"Newfoundland";"NA";"NA";10;;"Insitu, exsitu";66;20;"NA";1;;1;1543
+"GADUMOR";"Ermolchev, 2009";"38";"Cod";"Gadus morhua";"GADIsp";1;"PHYSCLI";5;136;77.8;"Barents Sea";"NA";"NA";"NA";"A";"insitu";74.8;25.2;"NA";1;;1;1543
+"GADUMOR";"Rose and Porter, 1996";"38";"Cod";"Gadus morhua";"GADIsp";1;"PHYSCLI";12;65;"NA";"Newfoundland";"NA";"NA";10;;"exsitu";66;20;"NA";1;;1;1543
+"GADUMOR";"Ermolchev and Zaferman, 2003";"120";"Cod";"Gadus morhua";"GADIsp";1;"PHYSCLI";15;21;"NA";"Kola Bay, Russia";"NA";"NA";"NA";"A";"insitu";80.7;31.6;"NA";1;;1;1543
+"GADUMOR";"Ermolchev, 2009";"38";"Cod";"Gadus morhua";"GADIsp";1;"PHYSCLI";5;136;77.8;"Barents Sea";"NA";"NA";"NA";"A";"insitu";64.9;20;"NA";1;;1;1543
+"GADUMOR";"Clay and Castonguay, 1995";"38";"Cod";"Gadus morhua";"GADIsp";1;"PHYSCLI";31;67;52;"Newfoundland";140;300;"NA";"D";"insitu";69.8;20;"NA";1;;1;1543
+"HOPLATL";"McClatchie et al., 1999";"38";"Orange roughy";"Hoplostethus atlanticus";"DEEPsp";1;"OILY";28;37;32.7;"New Zealand";"NA";"NA";"NA";;"model, insitu, exsitu";77;20;"NA";1;;1;"NA"
+"HOPLATL";"McClatchie et al., 1999";"38";"Orange roughy";"Hoplostethus atlanticus";"DEEPsp";1;"OILY";28;37;32.7;"New Zealand";"NA";"NA";"NA";;"model, insitu, exsitu";71.6;16.4;"NA";1;;1;"NA"
+"MACRNOV";"Do and Surti, 1990";"38";"Hoki";"Macruronus novaezelandiae";"DEEPsp";1;"PHYSCLI";45;104;68.6;"New Zealand";"NA";"NA";"NA";;"model";72.7;20;"NA";1;;1;"NA"
+"MACRNOV";"Do and Surti, 1990";"38";"Hoki";"Macruronus novaezelandiae";"DEEPsp";1;"PHYSCLI";45;104;68.6;"New Zealand";"NA";"NA";"NA";;"model";79.6;23.8;"NA";1;;1;"NA"
+"MALLVIL";"Guttormsen and Wilson, 2009";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";5;15;10;"Alaska";35;65;"NA";"N";"insitu";70.3;20;"NA";1;;1;"NA"
+"MALLVIL";"Guttormsen and Wilson, 2009";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";5;15;10;"Alaska";35;65;"NA";"N";"insitu";71.6;20;"NA";1;;1;"NA"
+"MALLVIL";"Rose, 1998";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";9;15;12.3;"Newfoundland";"NA";"NA";"NA";"A";"insitu";73.1;20;"NA";1;;1;"NA"
+"MALLVIL";"Gauthier and Horne, 2004";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";"NA";"NA";"NA";;"NA";"NA";"NA";;;75;24.9;"NA";1;;1;"NA"
+"MALLVIL";"Halldorsson and Reynisson, 1983";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";"NA";"NA";11.5;"Iceland";"NA";"NA";"NA";"N";"ind";78.1;20;"NA";1;;1;"NA"
+"MALLVIL";"Dommasnes and Rottingen, 1984";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";"NA";"NA";"NA";"Barents Sea";"NA";"NA";"NA";;;74;19.1;"NA";1;;1;"NA"
+"MALLVIL";"Gauthier and Horne, 2004";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";"NA";"NA";"NA";"St Lawrence";"NA";"NA";"NA";;;69.3;20;"NA";1;;1;"NA"
+"MALLVIL";"Halldorsson and Reynisson, 1983";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";"NA";"NA";14.5;"Iceland";"NA";"NA";"NA";"N";"ind";78.8;20;"NA";1;;1;"NA"
+"MALLVIL";"Rose, 1998";"38";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";9;15;12.3;"Newfoundland";"NA";"NA";"NA";"A";"insitu";74.3;21.1;"NA";1;;1;"NA"
+"MALLVIL";"Rose and Legget, 1988";"120";"Capelin";"Mallotus villosus";"CLUPsp";1;"PHYSSTO";"NA";"NA";16.5;"St Lawrence";"NA";"NA";"NA";"D";"insitu";65.3;20;"NA";1;;1;"NA"
+"MELAAEG";"Ona and Hansen, 1986";"38";"Haddock";"Melanogrammus aeglefinus";"GADIsp";1;"PHYSCLI";"NA";"NA";43.8;"Norvegian fjords";"NA";"NA";"NA";"N";"insitu";67.9;20;"NA";1;;1;"NA"
+"MERLAUS";"Lillo et al., 1996";"38";"Southern hake";"Merluccius australis";"MERLsp";1;"PHYSCLI";48;80;"NA";"Chile";"NA";"NA";"NA";"N";"insitu";68.1;20;"NA";1;;1;"NA"
+"MERLAUS";"Lillo et al., 1996";"38";"Chilean hake";"Merluccius gayi";"MERLsp";1;"PHYSCLI";37;53;"NA";"Chile";"NA";"NA";"NA";"N";"insitu";68.5;20;"NA";1;;1;"NA"
+"MERLAUS";"Lillo et al., 1996";"38";"Chilean hake";"Merluccius gayi";"MERLsp";1;"PHYSCLI";37;53;"NA";"Chile";"NA";"NA";"NA";"N";"insitu";74;23.6;"NA";1;;1;"NA"
+"MERLAUS";"Lillo et al., 1996";"38";"Southern hake";"Merluccius australis";"MERLsp";1;"PHYSCLI";48;80;"NA";"Chile";"NA";"NA";"NA";"N";"insitu";73.3;22;"NA";1;;1;"NA"
+"MERLPRO";"Traynor, 1996";"38";"Pacific whiting";"Merluccius productus";"MERLsp";1;"PHYSCLI";47;60;51.8;"Pacific";"NA";"NA";"NA";"N";"insitu";68.5;20;"NA";1;;1;"NA"
+"MERLPRO";"Henderson and Horne, 2007";"38";"Pacific hake";"Merluccius productus";"MERLsp";1;"PHYSCLI";"NA";"NA";"NA";"California";"NA";"NA";"NA";;"Insitu, exsitu";74;20;"NA";1;;1;"NA"
+"MERLPRO";"Traynor, 1996";"38";"Pacific hake";"Merluccius productus";"MERLsp";1;"PHYSCLI";"NA";"NA";"NA";"California";"NA";"NA";"NA";;"model";68.2;20;"NA";1;;1;"NA"
+"MICRAUS";"McClatchie et al., 1998";"38";"Southern blue whiting";"Micromesistius australis";"GADIsp";1;"PHYSCLI";19;53;"NA";"New Zealand";"NA";"NA";"NA";;"model, insitu, ind";73.5;20;"NA";1;;1;"NA"
+"MICRAUS";"Dunford and Macaulay, 2006";"38";"Southern blue whiting";"Micromesistius australis";"GADIsp";1;"PHYSCLI";16;58;"NA";"New Zealand";"NA";"NA";0;;"model";97;38;"NA";1;;1;"NA"
+"MICRAUS";"McClatchie et al., 1998";"38";"Southern blue whiting";"Micromesistius australis";"GADIsp";1;"PHYSCLI";19;53;"NA";"New Zealand";"NA";"NA";"NA";;"model, insitu, ind";81.3;25;"NA";1;;1;"NA"
+"MICRPOU";"Robinson, 1982";"29";"Blue whiting";"Micromesistius poutassou";"GADIsp";1;"PHYSCLI";21;37;31.1;"N.E. Atlantic";"NA";"NA";"NA";"N";"ind";71.9;20;"NA";1;;1;"NA"
+"MICRPOU";"Monstad, 1992";"38";"Blue whiting";"Micromesistius poutassou";"GADIsp";1;"PHYSCLI";"NA";"NA";"NA";"N.E. Atlantic";"NA";"NA";"NA";"A";;72.8;21.7;"NA";1;;1;"NA"
+"MOROAME";"Hartman and Nagy, 2005";"120";"Striped bass";"Morone americana";"BASSsp";1;"PHYSCLI";10;70;"NA";"Maryland";"NA";"NA";0;"D";"exsitu";56.26;15.37;0.8;1;;1;"NA"
+"MOROSAX";"Hartman and Nagy, 2005";"120";"White perch";"Morone saxatilis";"BASSsp";1;"PHYSCLI";10;20;"NA";"Maryland";"NA";"NA";0;"D";"exsitu";69.45;26.48;0.81;1;;1;"NA"
+"MOROSPP";"Hartman and Nagy, 2005";"120";"Bass";"Morone sp";"BASSsp";1;"PHYSCLI";10;70;"NA";"Maryland";"NA";"NA";0;"D";"exsitu";56.47;15.61;0.82;1;;1;"NA"
+"MYCTASP";"Yasuma et al., 2010";"38";"Myctophids";"Myctophum asperum";"MYCTsp";0;"NOSB";1.8;3.3;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";108.3;52.7;"NA";1;;1;"NA"
+"MYCTASP";"Yasuma et al., 2010";"120";"Myctophids";"Myctophum asperum";"MYCTsp";0;"NOSB";7.4;8.6;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";80.9;17.9;"NA";1;;1;"NA"
+"MYCTASP";"Yasuma et al., 2010";"38";"Myctophids";"Myctophum asperum";"MYCTsp";1;"PHYSCLI";3.1;4.8;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";88.6;45.4;"NA";1;;1;"NA"
+"MYCTASP";"Yasuma et al., 2010";"120";"Myctophids";"Myctophum asperum";"MYCTsp";1;"PHYSCLI";3.1;4.8;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";84.6;36.3;"NA";1;;1;"NA"
+"MYCTASP";"Yasuma et al., 2010";"38";"Myctophids";"Myctophum asperum";"MYCTsp";1;"PHYSCLI";6.1;7.7;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";57.3;-135.2;"NA";1;;1;"NA"
+"MYCTASP";"Yasuma et al., 2010";"120";"Myctophids";"Myctophum asperum";"MYCTsp";1;"PHYSCLI";6.1;7.7;"NA";"Northwest Pacific";"NA";"NA";"NA";;"model";52.4;-130.8;"NA";1;;1;"NA"
+"NOTOJAP";"Yasuma et al., 2003";"38";"Myctophids";"Notoscopulus japonicus";"MYCTsp";1;"NOSB";12;13;"NA";"Japan";"NA";"NA";"NA";"N";"model";86.7;20;"NA";1;;1;"NA"
+"PAGRMAJ";"Kang and Hwang, 2003";"38";"Red seabream";"Pagrus major";"PAGRsp";1;"PHYSCLI";10;35;19.9;"N.W. Pacific";"NA";"NA";"NA";;"exsitu";66.8;20;"NA";1;;1;"NA"
+"PAGRMAJ";"Kang and Hwang, 2003";"120";"Red seabream";"Pagrus major";"PAGRsp";1;"PHYSCLI";10;35;19.9;"N.W. Pacific";"NA";"NA";"NA";;"exsitu";74;20;"NA";1;;1;"NA"
+"PAGRMAJ";"Kang and Hwang, 2003";"200";"Red seabream";"Pagrus major";"PAGRsp";1;"PHYSCLI";10;35;19.9;"N.W. Pacific";"NA";"NA";"NA";;"exsitu";74.1;20;"NA";1;;1;"NA"
+"PHYSCLI";"Foote, 1987";"38";"Physoclists (gadoids)";"Physoclystii sp";"PHYSCLI";1;"PHYSCLI";9;105;"NA";"Various";"NA";"NA";"NA";"A";"All";67.4;20;"NA";1;;1;"NA"
+"PHYSSTO";"Foote, 1987";"38";"Physostomes (clupeoids)";"Physostomii sp";"PHYSSTO";1;"PHYSSTO";6;34;"NA";"Various";"NA";"NA";"NA";"A";"All";71.9;20;"NA";1;;1;"NA"
+"POLLVIR";"Foote et al., 1986";"38";"Saithe";"Pollachius virens";"GADIsp";1;"PHYSCLI";45;91;57.2;"Norvegian Sea";"NA";"NA";"NA";"N";"insitu";65.8;20;"NA";1;;1;1556
+"PRISFIL";"Benoit-Bird and Au, 2003 ";"60-200";"Pink snapper";"Pristipomoides filamentosus";"SNAP";1;"PHYSCLI";"NA";"NA";"NA";"Hawaii";"NA";"NA";"NA";;"exsitu";55.1;20.6;"NA";0;"Unreallistic TS values: standard length, not total length...";1;"NA"
+"SARDOCE";"Barange et al., 1996";"38";"Pilchard";"Sardinops ocellatus";"CLUPsp";1;"PHYSSTO";15;23;"NA";"S.E. Atlantic";"NA";"NA";"NA";"N";"insitu";76.1;20;"NA";1;;1;"NA"
+"SARDPIL";"Pyrounaki et al., HCMR 2010";"38";"European Sardine";"Sardina pilchardus";"CLUPsp";1;"PHYSSTO";5.8;16.2;8.5;"Aegean sea";"NA";100;80;"N";"insitu";70.8;20;"NA";1;"6 night hauls >90% anchovy, 2004-2010";"NA";1351
+"SARDSAG";"Gutierrez and MacLennan, 1998";"120";"Sardine";"Sardinops sagax";"CLUPsp";1;"PHYSSTO";12;20;"NA";"Peru";"NA";"NA";"NA";"A";"exsitu";74.1;20;"NA";1;;1;"NA"
+"SCOMJAP";"Gutierrez and MacLennan, 1998";"120";"Spanish mackerel";"Scomber japonicus";"SCOMsp";1;"PHYSCLI";26;30;27.9;"Peru";"NA";"NA";"NA";"A";"exsitu";70.8;20;"NA";1;;1;1773
+"SCOMJAP";"Gutierrez and MacLennan, 1998";"38";"Spanish mackerel";"Scomber japonicus";"SCOMsp";1;"PHYSCLI";26;30;27.9;"Peru";"NA";"NA";"NA";"A";"exsitu";70.9;20;"NA";1;;1;1773
+"SCOMSCO";"Edwards et al., 1984";"38";"Mackerel";"Scomber scombrus";"SCOMsp";0;"NOSB";31;35;32.7;"N.E. Atlantic";"NA";"NA";"NA";"A";"exsitu";84.9;20;"NA";1;;1;1772
+"SCOMSCO";"Clay and Castonguay, 1995";"38";"Mackerel";"Scomber scombrus";"SCOMsp";0;"NOSB";29;41;38;"Newfoundland";"NA";"NA";"NA";"A";"insitu";88;20;"NA";1;;1;1772
+"SCOMSCO";"Misund and Beltestad, 1996";"38";"Mackerel";"Scomber scombrus";"SCOMsp";0;"NOSB";"NA";"NA";37.8;"North Sea";"NA";"NA";"NA";"D";"comp";86.4;20;"NA";1;;1;1772
+"SEBAMAR";"Foote et al., 1986";"38";"Redfish";"Sebastes marinus";"SEBAsp";1;"PHYSCLI";9;43;19.7;"Norvegian Sea";"NA";"NA";"NA";"N";"insitu";67.1;20;"NA";1;;1;"NA"
+"SEBASCH";"Kang and Hwang, 2003";"38";"Rockfish";"Sebastes schlegi";"SEBAsp";1;"PHYSCLI";10;24;16.1;"N.W. Pacific";"NA";"NA";"NA";;"exsitu";67.7;20;"NA";1;;1;"NA"
+"SEBASCH";"Kang and Hwang, 2003";"200";"Rockfish";"Sebastes schlegi";"SEBAsp";1;"PHYSCLI";10;24;16.1;"N.W. Pacific";"NA";"NA";"NA";;"exsitu";72.8;20;"NA";1;;1;"NA"
+"SEBASCH";"Kang and Hwang, 2003";"120";"Rockfish";"Sebastes schlegi";"SEBAsp";1;"PHYSCLI";10;24;16.1;"N.W. Pacific";"NA";"NA";"NA";;"exsitu";74.3;20;"NA";1;;1;"NA"
+"SPRASPR";"Robinson, 1983";"30";"Sprat";"Sprattus sprattus";"CLUPsp";1;"PHYSSTO";9;15;12.6;"North Sea";"NA";"NA";"NA";"N";"ind";69.1;20;"NA";1;;1;1356
+"SPRASPR";"Robinson, 1983";"30";"Sprat";"Sprattus sprattus";"CLUPsp";1;"PHYSSTO";"NA";"NA";7.15;"North Sea";"NA";"NA";"NA";"N";"ind";70.7;20;"NA";1;;1;1356
+"SPRASPR";"Faessler et Gorska, 2009";"38";"Sprat";"Sprattus sprattus";"CLUPsp";1;"PHYSSTO";5;25;"NA";"Baltic Sea";"NA";"NA";0;;"model";73.06;27.5;"NA";1;;1;1356
+"SPRASPR";"Faessler et Gorska, 2009";"38";"Sprat";"Sprattus sprattus";"CLUPsp";1;"PHYSSTO";5;25;"NA";"Baltic Sea";"NA";"NA";0;;"model";65.08;20;"NA";1;;1;1356
+"SYMBCAL";"Yasuma et al., 2003";"38";"Myctophids";"Symbolophorus californiensis";"MYCTsp";1;"NOSB";8;11;"NA";"Japan";"NA";"NA";50;"N";"model";85.7;20;"NA";1;;1;"NA"
+"THERCHA";"Traynor, 1996";"38";"Walleye pollock";"Theragra chalcogramma";"GADIsp";1;"PHYSCLI";35;52;41.7;"Bering Sea";"NA";"NA";"NA";"A";"insitu";66;20;"NA";1;;1;"NA"
+"THUNALB";"Bertrand et al., 1999";"38";"Yellowfin tuna";"Thunnus albacares";"THUNsp";1;"PHYSCLI";60;120;94.5;"French Polynesia";"NA";"NA";"NA";"D";"insitu";80.62;25.26;"NA";1;;1;"NA"
+"THUNOBE";"Bertrand et al., 1999";"38";"Bigeye tuna";"Thunnus obesus";"THUNsp";1;"PHYSCLI";50;130;"NA";"French Polynesia";"NA";"NA";"NA";"D";"insitu";73.31;24.29;"NA";1;;1;"NA"
+"TODAPAC";"Kawabata, 2005";"38";"Squid";"Todarodes pacificus";"SQUID";0;"NOSB";18;28.4;"NA";"Japan";"NA";"NA";"NA";"D";"exsitu";73.1;20;"NA";1;;1;"NA"
+"TODAPAC";"Kang et al., 2005";"38";"Japanese squid";"Todarodes pacificus";"SQUID";0;"NOSB";21;27;24.75;"Korea";"NA";"NA";0;"N";"exsitu";75.4;20;0.81;1;;1;"NA"
+"TODAPAC";"Kang et al., 2005";"120";"Japanese squid";"Todarodes pacificus";"SQUID";0;"NOSB";21;27;24.75;"Korea";"NA";"NA";0;"N";"exsitu";73.5;20;0.64;1;;1;"NA"
+"TRACCAP";"Barange et al., 1996";"38";"Cape horse mackerel";"Trachurus trachurus capensis";"TRACsp";1;"PHYSCLI";25;47;"NA";"S.W. Atlantic";"NA";"NA";"NA";"N";"insitu";66.8;20;"NA";1;;1;"NA"
+"TRACPIC";"Gutierrez and MacLennan, 1998";"38";"Jurel";"Trachurus picturatus";"TRACsp";1;"PHYSCLI";36;40;"NA";"Peru";"NA";"NA";"NA";"A";"exsitu";68.1;20;"NA";1;;1;1664
+"TRACSYM";"Pena and Foote, 2008";"38";"Jack Mackerel";"Trachurus symmetricus murphyi";"TRACsp";1;"PHYSCLI";18;43;"NA";"Chile";"NA";"NA";0;;"model";74.9;20;"NA";1;;1;"NA"
+"TRACSYM";"Lillo et al., 1996";"38";"Jack Mackerel";"Trachurus symmetricus murphyi";"TRACsp";1;"PHYSCLI";22;40;"NA";"Chile";"NA";"NA";"NA";"N";"insitu";73.3;23.3;"NA";1;;1;"NA"
+"TRACSYM";"Pena and Foote, 2008";"38";"Jack Mackerel";"Trachurus symmetricus murphyi";"TRACsp";1;"PHYSCLI";18;43;"NA";"Chile";"NA";"NA";0;;"model";70.2;16.8;"NA";1;;1;"NA"
+"TRACSYM";"Lillo et al., 1996";"38";"Jack Mackerel";"Trachurus symmetricus murphyi";"TRACsp";1;"PHYSCLI";22;40;"NA";"Chile";"NA";"NA";"NA";"N";"insitu";68.9;20;"NA";1;;1;"NA"
+"TRICHAU";"Zhao, 2006";"38";"Hairtail";"Trichiurus haumela";"CLUPsp";1;"PHYSSTO";6.2;11.5;"NA";"Yellow Sea";"NA";"NA";38.2;"N";"insitu";68.3;20;"NA";1;;1;"NA"
+"TRISESM";"Foote et al., 1986";"38";"Norway pout";"Trisopterus esmarkii";"GADIsp";1;"PHYSCLI";10;21;17.6;"Norvegian Sea";"NA";"NA";"NA";"N";"insitu";67.1;20;"NA";1;;1;"NA"
+"TRISESM";"Foote et al., 1986";"38";"Norway pout";"Trisopterus esmarkii";"GADIsp";1;"PHYSCLI";12;19;14.8;"Norvegian Sea";"NA";"NA";"NA";"N";"insitu";68.3;20;"NA";1;;1;"NA"
\ No newline at end of file
1
0
r261 - in trunk/echobase-ui/src/main: java/fr/ifremer/echobase/ui/actions java/fr/ifremer/echobase/ui/actions/importData resources/i18n webapp/WEB-INF/decorators webapp/WEB-INF/jsp/importData webapp/WEB-INF/jsp/user webapp/css
by tchemit@users.forge.codelutin.com 12 Jan '12
by tchemit@users.forge.codelutin.com 12 Jan '12
12 Jan '12
Author: tchemit
Date: 2012-01-12 13:03:27 +0100 (Thu, 12 Jan 2012)
New Revision: 261
Url: http://forge.codelutin.com/repositories/revision/echobase/261
Log:
- use I18nAble
- (re-)add h2 title in decorator
- continue data import
Removed:
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/EditActionEnum.java
Modified:
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/EchoBaseActionSupport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataCompleteImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/SelectedMissionMode.java
trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties
trunk/echobase-ui/src/main/webapp/WEB-INF/decorators/layout-default.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticRegionData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesIndividualData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesReference.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataComplete.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataFromTransect.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/selectImportType.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/user/userList.jsp
trunk/echobase-ui/src/main/webapp/css/screen.css
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/EchoBaseActionSupport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/EchoBaseActionSupport.java 2012-01-12 12:02:31 UTC (rev 260)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/EchoBaseActionSupport.java 2012-01-12 12:03:27 UTC (rev 261)
@@ -23,8 +23,10 @@
*/
package fr.ifremer.echobase.ui.actions;
+import com.google.common.collect.Maps;
import com.opensymphony.xwork2.ActionContext;
import fr.ifremer.echobase.EchoBaseConfiguration;
+import fr.ifremer.echobase.I18nAble;
import fr.ifremer.echobase.InputFile;
import fr.ifremer.echobase.services.DecoratorService;
import fr.ifremer.echobase.services.EchoBaseService;
@@ -246,4 +248,12 @@
}
}
+
+ protected <E extends Enum<E> & I18nAble> Map<String, String> decorateEnums(E... enumValues) {
+ Map<String, String> result = Maps.newLinkedHashMap();
+ for (E enumValue : enumValues) {
+ result.put(enumValue.name(), _(enumValue.getI18nKey()));
+ }
+ return result;
+ }
}
Deleted: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/EditActionEnum.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/EditActionEnum.java 2012-01-12 12:02:31 UTC (rev 260)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/EditActionEnum.java 2012-01-12 12:03:27 UTC (rev 261)
@@ -1,39 +0,0 @@
-/*
- * #%L
- * EchoBase :: UI
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 Ifremer, Codelutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero 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 Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.echobase.ui.actions;
-
-/**
- * Operations possible for a simple CRUD.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.1
- */
-public enum EditActionEnum {
-
- CREATE,
- EDIT,
- DETAIL,
- DELETE,
- CLONE
-}
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataCompleteImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataCompleteImport.java 2012-01-12 12:02:31 UTC (rev 260)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataCompleteImport.java 2012-01-12 12:03:27 UTC (rev 261)
@@ -23,10 +23,10 @@
*/
package fr.ifremer.echobase.ui.actions.importData;
-import com.google.common.collect.Maps;
import fr.ifremer.echobase.entities.references.AreaOfOperation;
import fr.ifremer.echobase.entities.references.Mission;
import fr.ifremer.echobase.entities.references.MissionImpl;
+import fr.ifremer.echobase.services.CommonDataCompleteImportService;
import fr.ifremer.echobase.services.EchoBaseServiceSupport;
import fr.ifremer.echobase.services.configurations.CommonDataCompleteImportConfiguration;
@@ -55,7 +55,7 @@
/** Selected import mode. */
protected SelectedMissionMode importMode;
- /** mission to use. */
+ /** mission to create (if asked to create a new mission). */
protected Mission mission;
public ConfigureCommonDataCompleteImport() {
@@ -76,13 +76,9 @@
newService(EchoBaseServiceSupport.class);
missions = loadSortAndDecorate(service, Mission.class);
-
areaOfOperations = loadSortAndDecorate(service, AreaOfOperation.class);
- importModes = Maps.newLinkedHashMap();
- for (SelectedMissionMode mode : SelectedMissionMode.values()) {
- importModes.put(mode.name(), _(mode.getI18nKey()));
- }
+ importModes = decorateEnums(SelectedMissionMode.values());
if (importMode == null) {
importMode = SelectedMissionMode.USE_EXISTING_MISSION;
@@ -99,7 +95,9 @@
if (importMode == SelectedMissionMode.CREATE_NEW_MISSION) {
// create voyage in db
- ImportDataService service = newService(ImportDataService.class);
+ CommonDataCompleteImportService service =
+ newService(CommonDataCompleteImportService.class);
+
Mission missionToCreate = getMission();
Mission missionSaved = service.createMission(missionToCreate);
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/SelectedMissionMode.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/SelectedMissionMode.java 2012-01-12 12:02:31 UTC (rev 260)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/SelectedMissionMode.java 2012-01-12 12:03:27 UTC (rev 261)
@@ -23,6 +23,8 @@
*/
package fr.ifremer.echobase.ui.actions.importData;
+import fr.ifremer.echobase.I18nAble;
+
import static org.nuiton.i18n.I18n.n_;
/**
@@ -31,7 +33,7 @@
* @author tchemit <chemit(a)codelutin.com>
* @since 0.2
*/
-public enum SelectedMissionMode {
+public enum SelectedMissionMode implements I18nAble {
CREATE_NEW_MISSION(n_("echobase.common.importMode.createNewMission")),
USE_EXISTING_MISSION(n_("echobase.common.importMode.useExistingMission"));
@@ -42,6 +44,7 @@
this.i18nKey = i18nKey;
}
+ @Override
public String getI18nKey() {
return i18nKey;
}
Modified: trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties
===================================================================
--- trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties 2012-01-12 12:02:31 UTC (rev 260)
+++ trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties 2012-01-12 12:03:27 UTC (rev 261)
@@ -35,6 +35,7 @@
echobase.common.jdbcUrl=Url de connexion
echobase.common.password=Mot de passe
echobase.common.user=Utilisateur
+echobase.common.voyageDescription=Description
echobase.error.bad.password=Mot de passe incorrrect
echobase.error.email.already.used=Nom d'utilisateur déjà pris
echobase.error.export.description.requiredstring=La description de l'export est obligatoire
@@ -106,7 +107,9 @@
echobase.legend.importData.configuration.mission=Configurer la mission
echobase.legend.importData.configuration.mission.resume=Résumé de la mission à utiliser
echobase.legend.importData.configuration.resume=Résumé de la configuration d'import
-echobase.legend.importData.configuration.selectImportType=Type d'import
+echobase.legend.importData.configuration.selectImportType=Sélection du type d'import
+echobase.legend.importData.configure=Configurer l'import
+echobase.legend.importData.configure.commonDataComplete.selectMission=Sélection de la mission
echobase.legend.importDb.configuration.files=Choix du fichier d'import de la base complête (fichier zip)
echobase.legend.importFileResult=Résultat de l'import %s
echobase.legend.sqlQuery.configuration=Configuration de la requête
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/decorators/layout-default.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/decorators/layout-default.jsp 2012-01-12 12:02:31 UTC (rev 260)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/decorators/layout-default.jsp 2012-01-12 12:03:27 UTC (rev 261)
@@ -39,6 +39,8 @@
<%-- body --%>
+<h2><d:title default="EchoBase"/></h2>
+
<div id="body">
<s:if test="hasActionMessages()">
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticData.jsp 2012-01-12 12:02:31 UTC (rev 260)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticData.jsp 2012-01-12 12:03:27 UTC (rev 261)
@@ -37,7 +37,7 @@
<fieldset>
<legend>
- <s:text name="echobase.legend.importData.configure.accousticData"/>
+ <s:text name="echobase.legend.importData.configure"/>
</legend>
<s:select name="model.voyageId" value="''" required="true"
@@ -49,10 +49,10 @@
list="vessels" headerKey="" headerValue=""/>
<s:textfield key="model.field1" size="40" required="true"
- label='%{getText("echobase.common.name")}'/>
+ label='%{getText("echobase.common.field1")}'/>
<s:textfield key="model.field2" size="40" required="true"
- label='%{getText("echobase.common.name")}'/>
+ label='%{getText("echobase.common.field2")}'/>
<s:file key="moviesFile" required="true"
label='%{getText("echobase.common.moviesFile")}'/>
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticRegionData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticRegionData.jsp 2012-01-12 12:02:31 UTC (rev 260)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticRegionData.jsp 2012-01-12 12:03:27 UTC (rev 261)
@@ -37,7 +37,7 @@
<fieldset>
<legend>
- <s:text name="echobase.legend.importData.configure.accousticRegionData"/>
+ <s:text name="echobase.legend.importData.configure"/>
</legend>
<s:select key="model.voyageId" value="''" required="true"
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesData.jsp 2012-01-12 12:02:31 UTC (rev 260)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesData.jsp 2012-01-12 12:03:27 UTC (rev 261)
@@ -37,7 +37,7 @@
<fieldset>
<legend>
- <s:text name="echobase.legend.importData.configure.catchesData"/>
+ <s:text name="echobase.legend.importData.configure"/>
</legend>
<s:select key="model.voyageId" value="''" required="true"
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesIndividualData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesIndividualData.jsp 2012-01-12 12:02:31 UTC (rev 260)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesIndividualData.jsp 2012-01-12 12:03:27 UTC (rev 261)
@@ -38,7 +38,7 @@
<fieldset>
<legend>
<s:text
- name="echobase.legend.importData.configure.catchesIndividualData"/>
+ name="echobase.legend.importData.configure"/>
</legend>
<s:select key="model.voyageId" value="''" required="true"
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesReference.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesReference.jsp 2012-01-12 12:02:31 UTC (rev 260)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesReference.jsp 2012-01-12 12:03:27 UTC (rev 261)
@@ -37,7 +37,7 @@
<fieldset>
<legend>
- <s:text name="echobase.legend.importData.configure.catchesReference"/>
+ <s:text name="echobase.legend.importData.configure"/>
</legend>
<s:file key="lengthAgeKeyFile" required="true"
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataComplete.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataComplete.jsp 2012-01-12 12:02:31 UTC (rev 260)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataComplete.jsp 2012-01-12 12:03:27 UTC (rev 261)
@@ -30,6 +30,13 @@
jQuery(document).ready(function () {
+ $('[name="importMode"]').change(function (event) {
+ $('[class="importMode"]').hide();
+ $('#' + this.value).show();
+ });
+ var val = $('[name="importMode"][checked="checked"]').val();
+ $('[class="importMode"]').hide();
+ $("#" + val).show();
});
</script>
@@ -37,13 +44,79 @@
<fieldset>
<legend>
- <s:text name="echobase.legend.importData.configure.commonDataComplete"/>
+ <s:text name="echobase.legend.importData.configure"/>
</legend>
- <s:select key="model.missionId" value="''" required="true"
- label='%{getText("echobase.common.mission")}'
- list="missions" headerKey="" headerValue=""/>
+ <fieldset>
+ <legend>
+ <s:text name="echobase.legend.importData.configure.commonDataComplete.selectMission"/>
+ </legend>
+ <s:radio key='importMode' list="importModes"
+ label='%{getText("echobase.common.importMode")}'
+ required="true"/>
+
+ <div id='USE_EXISTING_MISSION' class='importMode'>
+ <s:select key="model.missionId" value="''" required="true"
+ label='%{getText("echobase.common.mission")}'
+ list="missions" headerKey="" headerValue=""/>
+ </div>
+
+ <div id='CREATE_NEW_MISSION' class='importMode'>
+
+ <s:textfield key="mission.name" size="40" required="true"
+ label='%{getText("echobase.common.name")}'/>
+
+ <s:textfield key="mission.missionAbstract" size="40" required="true"
+ label='%{getText("echobase.common.missionAbstract")}'/>
+
+ <s:textfield key="mission.litteratureReferences" size="40"
+ label='%{getText("echobase.common.litteratureReferences")}'/>
+
+ <s:textfield key="mission.project"
+ label='%{getText("echobase.common.project")}'/>
+
+ <s:textfield key="mission.platform"
+ label='%{getText("echobase.common.platform")}'/>
+
+ <s:textfield key="mission.institution"
+ label='%{getText("echobase.common.institution")}'/>
+
+ <s:textfield key="mission.keywords"
+ label='%{getText("echobase.common.keywords")}'/>
+
+ <s:textfield key="mission.dataCentre"
+ label='%{getText("echobase.common.dataCentre")}'/>
+
+ <s:textfield key="mission.dataCentreEmail"
+ label='%{getText("echobase.common.dataCentreEmail")}'/>
+
+ <s:textfield key="mission.author"
+ label='%{getText("echobase.common.author")}'/>
+
+ <s:textfield key="mission.authorEmail"
+ label='%{getText("echobase.common.authorEmail")}'/>
+
+ <s:textfield key="mission.principalInvestigator"
+ label='%{getText("echobase.common.principalInvestigator")}'/>
+
+ <s:textfield key="mission.principalInvestigatorEmail"
+ label='%{getText("echobase.common.principalInvestigatorEmail")}'/>
+
+ <s:textfield key="mission.organisationReferences"
+ label='%{getText("echobase.common.organisationReferences")}'/>
+
+ <s:textfield key="mission.distributionStatement"
+ label='%{getText("echobase.common.distributionStatement")}'/>
+
+ <s:textfield key="mission.organisationLevelAcknowledgements"
+ label='%{getText("echobase.common.organisationLevelAcknowledgements")}'/>
+
+ <s:textfield key="mission.source"
+ label='%{getText("echobase.common.source")}'/>
+ </div>
+ </fieldset>
+ <br/>
<s:select key="model.areaOfOperationId" value="''" required="true"
label='%{getText("echobase.common.areaOfOperation")}'
list="areaOfOperations" headerKey="" headerValue=""/>
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataFromTransect.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataFromTransect.jsp 2012-01-12 12:02:31 UTC (rev 260)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataFromTransect.jsp 2012-01-12 12:03:27 UTC (rev 261)
@@ -38,7 +38,7 @@
<fieldset>
<legend>
<s:text
- name="echobase.legend.importData.configure.commonDataFromTransect"/>
+ name="echobase.legend.importData.configure"/>
</legend>
<s:select key="model.voyageId" value="''" required="true"
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/selectImportType.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/selectImportType.jsp 2012-01-12 12:02:31 UTC (rev 260)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/selectImportType.jsp 2012-01-12 12:03:27 UTC (rev 261)
@@ -29,82 +29,35 @@
<script type="text/javascript">
function updateMode(newValue) {
- switch (newValue) {
- case "ALL":
- $('[class="inputFile"]').show();
- break;
- case "ACOUSTIC":
- $('[class="inputFile"]').hide();
- $('#acousticFile').show();
- break;
- }
+ // change the action target
+ $('#selectImportType_configure').attr('name',
+ 'action:configure-'+newValue+'!input');
}
jQuery(document).ready(function () {
-
- $('[name="importDataMode"]').change(function(event) {
+ $('[name="mode"]').change(function(event) {
updateMode(this.value);
});
- var val = $('[name="importDataMode"][checked="checked"]').val();
+ var val = $('[name="mode"][checked="checked"]').val();
updateMode(val);
});
</script>
-<s:form namespace="/importData" method="POST" enctype="multipart/form-data">
+<s:form namespace="/importData" method="POST">
<fieldset>
<legend>
<s:text name="echobase.legend.importData.configuration.selectImportType"/>
</legend>
- <s:radio key='mode' list="modes"
+ <s:radio key='mode' list="modes" cssClass="cleanBoth"
label='%{getText("echobase.common.importDataMode")}'
- required="true"/>
+ required="true" template="myradiomap" />
- <s:label value="%{model.mission.name}"
- key='echobase.common.name'/>
-
- <s:label value="%{model.mission.missionAbstract}"
- key='echobase.common.missionAbstract'/>
</fieldset>
- <hr/>
- <fieldset>
- <legend>
- <s:text name="echobase.legend.importData.configuration.files"/>
- </legend>
-
- <s:hidden key="missionId" label=''/>
-
- <s:radio key='importDataMode' list="importDataModes"
- label='%{getText("echobase.common.importDataMode")}'
- required="true"/>
- <hr/>
- <div class="inputFile" id="acousticFile">
- <s:file id="acoustic" name="acoustic" required="true"
- key="echobase.label.import.accoustique"/>
- </div>
- <div class="inputFile" id="captureFile">
- <s:file name="capture" required="true"
- key="echobase.label.import.pecherie"/>
- </div>
- <div class="inputFile" id="lectureAgeGenFile">
- <s:file name="lectureAgeGen" required="true"
- key="echobase.label.import.lectureAgeGen"/>
- </div>
- <div class="inputFile" id="eventsFile">
- <s:file name="events" required="true"
- key="echobase.label.import.events"/>
- </div>
- <div class="inputFile" id="typeEchoSpeciesFile">
- <s:file name="typeEchoSpecies" required="true"
- key="echobase.label.import.typeEchoSpecies"/>
-
- </div>
- </fieldset>
<br/>
- <s:submit action="configureFiles"
- value='%{getText("echobase.action.import")}'/>
+ <s:submit action="configure" value='%{getText("echobase.action.import")}'/>
</s:form>
\ No newline at end of file
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/user/userList.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/user/userList.jsp 2012-01-12 12:02:31 UTC (rev 260)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/user/userList.jsp 2012-01-12 12:03:27 UTC (rev 261)
@@ -1,4 +1,3 @@
-<%@ page import="fr.ifremer.echobase.ui.actions.EditActionEnum" %>
<%--
#%L
EchoBase :: UI
Modified: trunk/echobase-ui/src/main/webapp/css/screen.css
===================================================================
--- trunk/echobase-ui/src/main/webapp/css/screen.css 2012-01-12 12:02:31 UTC (rev 260)
+++ trunk/echobase-ui/src/main/webapp/css/screen.css 2012-01-12 12:03:27 UTC (rev 261)
@@ -237,3 +237,13 @@
#footer ul li a:hover {
/*color: #ffe600;*/
}
+
+ul#mode_ul {
+ margin: 5px;
+ padding-left: 5px;
+}
+ul#mode_ul li{
+ list-style: none;
+ padding-left: 25px;
+ margin-left:0px;
+}
1
0
r260 - in trunk/echobase-ui/src/main/resources/template: . css_xhtml simple
by tchemit@users.forge.codelutin.com 12 Jan '12
by tchemit@users.forge.codelutin.com 12 Jan '12
12 Jan '12
Author: tchemit
Date: 2012-01-12 13:02:31 +0100 (Thu, 12 Jan 2012)
New Revision: 260
Url: http://forge.codelutin.com/repositories/revision/echobase/260
Log:
tune radiomap template
Added:
trunk/echobase-ui/src/main/resources/template/css_xhtml/myradiomap.ftl
trunk/echobase-ui/src/main/resources/template/simple/
trunk/echobase-ui/src/main/resources/template/simple/myradiomap.ftl
Added: trunk/echobase-ui/src/main/resources/template/css_xhtml/myradiomap.ftl
===================================================================
--- trunk/echobase-ui/src/main/resources/template/css_xhtml/myradiomap.ftl (rev 0)
+++ trunk/echobase-ui/src/main/resources/template/css_xhtml/myradiomap.ftl 2012-01-12 12:02:31 UTC (rev 260)
@@ -0,0 +1,50 @@
+<#--
+ #%L
+ EchoBase :: UI
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero 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 Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+-->
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<#--include "/${parameters.templateDir}/css_xhtml/controlheader.ftl" /-->
+<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
+<#include "/${parameters.templateDir}/simple/myradiomap.ftl" />
+<#include "/${parameters.templateDir}/css_xhtml/controlfooter.ftl" />
+<#nt/>
Property changes on: trunk/echobase-ui/src/main/resources/template/css_xhtml/myradiomap.ftl
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/resources/template/simple/myradiomap.ftl
===================================================================
--- trunk/echobase-ui/src/main/resources/template/simple/myradiomap.ftl (rev 0)
+++ trunk/echobase-ui/src/main/resources/template/simple/myradiomap.ftl 2012-01-12 12:02:31 UTC (rev 260)
@@ -0,0 +1,99 @@
+<#--
+ #%L
+ EchoBase :: UI
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero 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 Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+-->
+<#--
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<ul
+<#if parameters.name??>
+ id="${parameters.name?html}_ul"<#rt/>
+</#if>
+>
+<@s.iterator value="parameters.list">
+ <#if parameters.listKey??>
+ <#assign itemKey = stack.findValue(parameters.listKey)/>
+ <#else>
+ <#assign itemKey = stack.findValue('top')/>
+ </#if>
+ <#assign itemKeyStr = itemKey.toString() />
+ <#if parameters.listValue??>
+ <#assign itemValue = stack.findString(parameters.listValue)/>
+ <#else>
+ <#assign itemValue = stack.findString('top')/>
+ </#if>
+<li>
+<input type="radio"<#rt/>
+<#if parameters.name??>
+ name="${parameters.name?html}"<#rt/>
+</#if>
+ id="${parameters.id?html}${itemKeyStr?html}"<#rt/>
+<#if tag.contains(parameters.nameValue?default(''), itemKeyStr)>
+ checked="checked"<#rt/>
+</#if>
+<#if itemKey??>
+ value="${itemKeyStr?html}"<#rt/>
+</#if>
+<#if parameters.disabled?default(false)>
+ disabled="disabled"<#rt/>
+</#if>
+<#if parameters.tabindex??>
+ tabindex="${parameters.tabindex?html}"<#rt/>
+</#if>
+<#if parameters.cssClass??>
+ class="${parameters.cssClass?html}"<#rt/>
+</#if>
+<#if parameters.cssStyle??>
+ style="${parameters.cssStyle?html}"<#rt/>
+</#if>
+<#include "/${parameters.templateDir}/simple/css.ftl" />
+<#if parameters.title??>
+ title="${parameters.title?html}"<#rt/>
+</#if>
+<#include "/${parameters.templateDir}/simple/scripting-events.ftl" />
+<#include "/${parameters.templateDir}/simple/common-attributes.ftl" />
+/><#rt/>
+<label for="${parameters.id?html}${itemKeyStr?html}"><#rt/>
+ ${itemValue}<#t/>
+</label>
+</li>
+</(a)s.iterator>
+</ul>
\ No newline at end of file
Property changes on: trunk/echobase-ui/src/main/resources/template/simple/myradiomap.ftl
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
1
0
r259 - in trunk: echobase-services/src/main/java/fr/ifremer/echobase/services echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData
by tchemit@users.forge.codelutin.com 12 Jan '12
by tchemit@users.forge.codelutin.com 12 Jan '12
12 Jan '12
Author: tchemit
Date: 2012-01-12 13:02:13 +0100 (Thu, 12 Jan 2012)
New Revision: 259
Url: http://forge.codelutin.com/repositories/revision/echobase/259
Log:
use I18nAble + create mission code
Modified:
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataCompleteImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDataMode.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/SelectImportType.java
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataCompleteImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataCompleteImportService.java 2012-01-12 12:00:25 UTC (rev 258)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataCompleteImportService.java 2012-01-12 12:02:13 UTC (rev 259)
@@ -24,9 +24,12 @@
package fr.ifremer.echobase.services;
import com.google.common.collect.Maps;
+import fr.ifremer.echobase.EchoBaseTechnicalException;
import fr.ifremer.echobase.InputFile;
import fr.ifremer.echobase.entities.EchoBaseUser;
+import fr.ifremer.echobase.entities.references.Mission;
import fr.ifremer.echobase.services.configurations.CommonDataCompleteImportConfiguration;
+import org.nuiton.topia.TopiaException;
import java.util.Map;
@@ -47,6 +50,17 @@
return result;
}
+ public Mission createMission(Mission mission) {
+ try {
+ Mission result = getDAO(Mission.class).create(mission);
+ commitTransaction("Could not create mission " +
+ mission.getName());
+ return result;
+ } catch (TopiaException eee) {
+ throw new EchoBaseTechnicalException(eee);
+ }
+ }
+
private void importCasinoFile(InputFile casinoFile, char csvSeparator) {
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDataMode.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDataMode.java 2012-01-12 12:00:25 UTC (rev 258)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDataMode.java 2012-01-12 12:02:13 UTC (rev 259)
@@ -23,6 +23,8 @@
*/
package fr.ifremer.echobase.services;
+import fr.ifremer.echobase.I18nAble;
+
import static org.nuiton.i18n.I18n.n_;
/**
@@ -31,7 +33,7 @@
* @author tchemit <chemit(a)codelutin.com>
* @since 0.2
*/
-public enum ImportDataMode {
+public enum ImportDataMode implements I18nAble {
/** Import all common data from Voyage to Operation. */
CommonDataComplete(n_("echobase.common.importDataMode.commonDataComplete")),
@@ -60,6 +62,7 @@
this.i18nKey = i18nKey;
}
+ @Override
public String getI18nKey() {
return i18nKey;
}
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/SelectImportType.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/SelectImportType.java 2012-01-12 12:00:25 UTC (rev 258)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/SelectImportType.java 2012-01-12 12:02:13 UTC (rev 259)
@@ -23,7 +23,6 @@
*/
package fr.ifremer.echobase.ui.actions.importData;
-import com.google.common.collect.Maps;
import fr.ifremer.echobase.services.ImportDataMode;
import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport;
@@ -57,13 +56,9 @@
this.mode = mode;
}
-
@Override
public String input() throws Exception {
- modes = Maps.newLinkedHashMap();
- for (SelectedMissionMode mode : SelectedMissionMode.values()) {
- modes.put(mode.name(), _(mode.getI18nKey()));
- }
+ modes = decorateEnums(ImportDataMode.values());
if (mode == null) {
mode = ImportDataMode.CommonDataComplete;
1
0
r258 - trunk/echobase-entities/src/main/java/fr/ifremer/echobase
by tchemit@users.forge.codelutin.com 12 Jan '12
by tchemit@users.forge.codelutin.com 12 Jan '12
12 Jan '12
Author: tchemit
Date: 2012-01-12 13:00:25 +0100 (Thu, 12 Jan 2012)
New Revision: 258
Url: http://forge.codelutin.com/repositories/revision/echobase/258
Log:
add I18nAble contract
Added:
trunk/echobase-entities/src/main/java/fr/ifremer/echobase/I18nAble.java
Added: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/I18nAble.java
===================================================================
--- trunk/echobase-entities/src/main/java/fr/ifremer/echobase/I18nAble.java (rev 0)
+++ trunk/echobase-entities/src/main/java/fr/ifremer/echobase/I18nAble.java 2012-01-12 12:00:25 UTC (rev 258)
@@ -0,0 +1,35 @@
+/*
+ * #%L
+ * EchoBase :: Entities
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase;
+
+/**
+ * Contract ot place on classes offering a i18n key.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public interface I18nAble {
+
+ String getI18nKey();
+}
Property changes on: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/I18nAble.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
1
0
Author: tchemit
Date: 2012-01-12 12:59:29 +0100 (Thu, 12 Jan 2012)
New Revision: 257
Url: http://forge.codelutin.com/repositories/revision/echobase/257
Log:
add cr
Added:
trunk/src/doc/reunions/reunion-2012-01-12.txt
Removed:
trunk/src/doc/reunions/reunion-2012-01-11.txt
Deleted: trunk/src/doc/reunions/reunion-2012-01-11.txt
===================================================================
--- trunk/src/doc/reunions/reunion-2012-01-11.txt 2012-01-11 13:08:20 UTC (rev 256)
+++ trunk/src/doc/reunions/reunion-2012-01-11.txt 2012-01-12 11:59:29 UTC (rev 257)
@@ -1,29 +0,0 @@
-projet echobase
----------------
-
-Jeudi 12 janvier 2012 (Nemo)
-
-Présents : Aurelie et Tony
-
-Planning
---------
-
-- definir une charte graphique
-
-Charte graphique EchoBase
--------------------------
-
-Action
-------
-
-- CodeLutin
-
- -
-
-- Aurelie
-
- -
-
-Prochaine réunion :
-
- - ?
\ No newline at end of file
Copied: trunk/src/doc/reunions/reunion-2012-01-12.txt (from rev 256, trunk/src/doc/reunions/reunion-2012-01-11.txt)
===================================================================
--- trunk/src/doc/reunions/reunion-2012-01-12.txt (rev 0)
+++ trunk/src/doc/reunions/reunion-2012-01-12.txt 2012-01-12 11:59:29 UTC (rev 257)
@@ -0,0 +1,32 @@
+projet echobase
+---------------
+
+Jeudi 12 janvier 2012 (Nemo)
+
+Présents : Aurelie et Tony
+
+Planning
+--------
+
+- definir une charte graphique
+
+Charte graphique EchoBase
+-------------------------
+
+Action
+------
+
+- CodeLutin
+
+ - envoyer logos de Mathieu
+ - envoyer un zip avec les pages html + css
+ - envoyer screenshot la page d'attente + page dynamique
+ - demander texte sur page d'accueil
+
+- Aurelie
+
+ - 3 jours
+
+Prochaine réunion :
+
+ -
\ No newline at end of file
Property changes on: trunk/src/doc/reunions/reunion-2012-01-12.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
1
0
11 Jan '12
Author: tchemit
Date: 2012-01-11 14:08:20 +0100 (Wed, 11 Jan 2012)
New Revision: 256
Url: http://forge.codelutin.com/repositories/revision/echobase/256
Log:
prepare squeleton of import datas
Added:
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AbstractImportDataService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticDataImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticRegionDataImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesDataImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesIndividualDataImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesReferenceImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataCompleteImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataFromTransectImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AbstractImportConfiguration.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AccousticDataImportConfiguration.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AccousticRegionDataImportConfiguration.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesDataImportConfiguration.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesIndividualDataImportConfiguration.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesReferenceImportConfiguration.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataCompleteImportConfiguration.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataFromTransectImportConfiguration.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/AbstractConfigureImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/AbstractLaunchImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticDataImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionDataImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesDataImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualDataImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReferenceImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataCompleteImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransectImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticDataImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticRegionDataImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesDataImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesIndividualDataImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesReferenceImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataCompleteImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataFromTransectImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/SelectImportType.java
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticRegionData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesIndividualData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesReference.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataComplete.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataFromTransect.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticRegionData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesIndividualData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesReference.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataComplete.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataFromTransect.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/selectImportType.jsp
trunk/src/doc/reunions/reunion-2012-01-11.txt
Removed:
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDataService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/ImportDataConfiguration.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureFiles.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureMission.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/Import.java
Modified:
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDataMode.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDbService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AbstractEchobaseActionConfiguration.java
trunk/echobase-services/src/main/resources/i18n/echobase-services_fr_FR.properties
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseSession.java
trunk/echobase-ui/src/main/resources/config/struts-importData.xml
trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties
trunk/echobase-ui/src/main/webapp/WEB-INF/includes/header.jsp
Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AbstractImportDataService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AbstractImportDataService.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AbstractImportDataService.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,41 @@
+/*
+ * #%L
+ * EchoBase :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.services;
+
+import fr.ifremer.echobase.InputFile;
+import fr.ifremer.echobase.entities.EchoBaseUser;
+import fr.ifremer.echobase.services.configurations.AbstractImportConfiguration;
+
+import java.util.Map;
+
+/**
+ * Abstract data import service.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public abstract class AbstractImportDataService<M extends AbstractImportConfiguration> extends EchoBaseServiceSupport {
+
+ public abstract Map<InputFile, CsvImportResult> startImport(M configuration, EchoBaseUser user);
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AbstractImportDataService.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticDataImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticDataImportService.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticDataImportService.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,53 @@
+/*
+ * #%L
+ * EchoBase :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.services;
+
+import com.google.common.collect.Maps;
+import fr.ifremer.echobase.InputFile;
+import fr.ifremer.echobase.entities.EchoBaseUser;
+import fr.ifremer.echobase.services.configurations.AccousticDataImportConfiguration;
+
+import java.util.Map;
+
+/**
+ * Service to launch a "common data complete" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class AccousticDataImportService extends AbstractImportDataService<AccousticDataImportConfiguration> {
+
+ @Override
+ public Map<InputFile, CsvImportResult> startImport(AccousticDataImportConfiguration configuration,
+ EchoBaseUser user) {
+ Map<InputFile, CsvImportResult> result = Maps.newHashMap();
+ char csvSeparator = serviceContext.getConfiguration().getCsvSeparator();
+ importMoviesFile(configuration.getMoviesFile(), csvSeparator);
+ return result;
+ }
+
+ private void importMoviesFile(InputFile inputFile, char csvSeparator) {
+ }
+
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticDataImportService.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticRegionDataImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticRegionDataImportService.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticRegionDataImportService.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,58 @@
+/*
+ * #%L
+ * EchoBase :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.services;
+
+import com.google.common.collect.Maps;
+import fr.ifremer.echobase.InputFile;
+import fr.ifremer.echobase.entities.EchoBaseUser;
+import fr.ifremer.echobase.services.configurations.AccousticRegionDataImportConfiguration;
+
+import java.util.Map;
+
+/**
+ * Service to launch a "common data complete" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class AccousticRegionDataImportService extends AbstractImportDataService<AccousticRegionDataImportConfiguration> {
+
+ @Override
+ public Map<InputFile, CsvImportResult> startImport(AccousticRegionDataImportConfiguration configuration, EchoBaseUser user) {
+ Map<InputFile, CsvImportResult> result = Maps.newHashMap();
+ char csvSeparator = serviceContext.getConfiguration().getCsvSeparator();
+ importRegionsFile(configuration.getRegionsFile(), csvSeparator);
+ importAssociationFile(configuration.getAssociationFile(), csvSeparator);
+ return result;
+ }
+
+ private void importRegionsFile(InputFile inputFile, char csvSeparator) {
+ }
+
+
+ private void importAssociationFile(InputFile inputFile, char csvSeparator) {
+ }
+
+
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticRegionDataImportService.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesDataImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesDataImportService.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesDataImportService.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,64 @@
+/*
+ * #%L
+ * EchoBase :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.services;
+
+import com.google.common.collect.Maps;
+import fr.ifremer.echobase.InputFile;
+import fr.ifremer.echobase.entities.EchoBaseUser;
+import fr.ifremer.echobase.services.configurations.CatchesDataImportConfiguration;
+
+import java.util.Map;
+
+/**
+ * Service to launch a "common data complete" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class CatchesDataImportService extends AbstractImportDataService<CatchesDataImportConfiguration> {
+
+ @Override
+ public Map<InputFile, CsvImportResult> startImport(CatchesDataImportConfiguration configuration, EchoBaseUser user) {
+ Map<InputFile, CsvImportResult> result = Maps.newHashMap();
+
+ char csvSeparator = serviceContext.getConfiguration().getCsvSeparator();
+ importTbleStationFile(configuration.getTlbeStationFile(), csvSeparator);
+ importXtbleTriFile(configuration.getXtblTriFile(), csvSeparator);
+ importTblMensurationFile(configuration.getTblMensurationFile(), csvSeparator);
+ importTblMensurationFileClass(configuration.getTblMensurationClasseFile(), csvSeparator);
+ return result;
+ }
+
+ private void importTbleStationFile(InputFile inputFile, char csvSeparator) {
+ }
+
+ private void importXtbleTriFile(InputFile inputFile, char csvSeparator) {
+ }
+
+ private void importTblMensurationFile(InputFile inputFile, char csvSeparator) {
+ }
+
+ private void importTblMensurationFileClass(InputFile inputFile, char csvSeparator) {
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesDataImportService.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesIndividualDataImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesIndividualDataImportService.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesIndividualDataImportService.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,52 @@
+/*
+ * #%L
+ * EchoBase :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.services;
+
+import com.google.common.collect.Maps;
+import fr.ifremer.echobase.InputFile;
+import fr.ifremer.echobase.entities.EchoBaseUser;
+import fr.ifremer.echobase.services.configurations.CatchesIndividualDataImportConfiguration;
+
+import java.util.Map;
+
+/**
+ * Service to launch a "common data complete" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class CatchesIndividualDataImportService extends AbstractImportDataService<CatchesIndividualDataImportConfiguration> {
+
+ @Override
+ public Map<InputFile, CsvImportResult> startImport(CatchesIndividualDataImportConfiguration configuration, EchoBaseUser user) {
+ Map<InputFile, CsvImportResult> result = Maps.newHashMap();
+
+ char csvSeparator = serviceContext.getConfiguration().getCsvSeparator();
+ importIndividialDataFile(configuration.getIndividualDataFile(), csvSeparator);
+ return result;
+ }
+
+ private void importIndividialDataFile(InputFile inputFile, char csvSeparator) {
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesIndividualDataImportService.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesReferenceImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesReferenceImportService.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesReferenceImportService.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,60 @@
+/*
+ * #%L
+ * EchoBase :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.services;
+
+import com.google.common.collect.Maps;
+import fr.ifremer.echobase.InputFile;
+import fr.ifremer.echobase.entities.EchoBaseUser;
+import fr.ifremer.echobase.services.configurations.CatchesReferenceImportConfiguration;
+
+import java.util.Map;
+
+/**
+ * Service to launch a "catches references" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class CatchesReferenceImportService extends AbstractImportDataService<CatchesReferenceImportConfiguration> {
+
+ @Override
+ public Map<InputFile, CsvImportResult> startImport(CatchesReferenceImportConfiguration configuration, EchoBaseUser user) {
+
+ Map<InputFile, CsvImportResult> result = Maps.newHashMap();
+ char csvSeparator = serviceContext.getConfiguration().getCsvSeparator();
+
+ importLenthAgeKey(configuration.getLengthAgeKeyFile(), csvSeparator);
+
+ importLenghtWeightKey(configuration.getLengthWeightKeyFile(), csvSeparator);
+
+ return result;
+ }
+
+ protected void importLenghtWeightKey(InputFile inputFile, char csvSeparator) {
+
+ }
+
+ protected void importLenthAgeKey(InputFile inputFile, char csvSeparator) {
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesReferenceImportService.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataCompleteImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataCompleteImportService.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataCompleteImportService.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,56 @@
+/*
+ * #%L
+ * EchoBase :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.services;
+
+import com.google.common.collect.Maps;
+import fr.ifremer.echobase.InputFile;
+import fr.ifremer.echobase.entities.EchoBaseUser;
+import fr.ifremer.echobase.services.configurations.CommonDataCompleteImportConfiguration;
+
+import java.util.Map;
+
+/**
+ * Service to launch a "common data complete" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class CommonDataCompleteImportService extends AbstractImportDataService<CommonDataCompleteImportConfiguration> {
+
+ @Override
+ public Map<InputFile, CsvImportResult> startImport(CommonDataCompleteImportConfiguration configuration, EchoBaseUser user) {
+ Map<InputFile, CsvImportResult> result = Maps.newHashMap();
+ char csvSeparator = serviceContext.getConfiguration().getCsvSeparator();
+ importCasinoFile(configuration.getCasinoFile(), csvSeparator);
+ importEchotypeFile(configuration.getEchotypeFile(), csvSeparator);
+ return result;
+ }
+
+ private void importCasinoFile(InputFile casinoFile, char csvSeparator) {
+ }
+
+ private void importEchotypeFile(InputFile echotypeFile, char csvSeparator) {
+
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataCompleteImportService.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataFromTransectImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataFromTransectImportService.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataFromTransectImportService.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,53 @@
+/*
+ * #%L
+ * EchoBase :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.services;
+
+import com.google.common.collect.Maps;
+import fr.ifremer.echobase.InputFile;
+import fr.ifremer.echobase.entities.EchoBaseUser;
+import fr.ifremer.echobase.services.configurations.CommonDataFromTransectImportConfiguration;
+
+import java.util.Map;
+
+/**
+ * Service to launch a "common data complete" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class CommonDataFromTransectImportService extends AbstractImportDataService<CommonDataFromTransectImportConfiguration> {
+
+ @Override
+ public Map<InputFile, CsvImportResult> startImport(CommonDataFromTransectImportConfiguration configuration, EchoBaseUser user) {
+ Map<InputFile, CsvImportResult> result = Maps.newHashMap();
+
+ char csvSeparator = serviceContext.getConfiguration().getCsvSeparator();
+ importCasinoFile(configuration.getCasinoFile(), csvSeparator);
+ return result;
+ }
+
+ protected void importCasinoFile(InputFile inputFile, char csvSeparator) {
+
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataFromTransectImportService.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDataMode.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDataMode.java 2012-01-10 16:44:31 UTC (rev 255)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDataMode.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -33,11 +33,27 @@
*/
public enum ImportDataMode {
- /** Import only acoustic file. */
- ACOUSTIC(n_("echobase.common.importDataMode.acoustic")),
- /** Import all files. */
- ALL(n_("echobase.common.importDataMode.all"));
+ /** Import all common data from Voyage to Operation. */
+ CommonDataComplete(n_("echobase.common.importDataMode.commonDataComplete")),
+ /** Import all common data from Transect to Operation. */
+ CommonDataFromTransect(n_("echobase.common.importDataMode.commonDataFromTransect")),
+
+ /** Import all common data from Voyage to Operation. */
+ CatchesReference(n_("echobase.common.importDataMode.catchesReferences")),
+
+ /** Import catches data (unsorted, total, but no individual ones). */
+ CatchesData(n_("echobase.common.importDataMode.catchesData")),
+
+ /** Import individual catches data. */
+ CatchesIndividualData(n_("echobase.common.importDataMode.catchesIndividualData")),
+
+ /** Import accoustic data (Cells ESDU and Elementary). */
+ AccousticData(n_("echobase.common.importDataMode.accousticData")),
+
+ /** Import accoustic region cells. */
+ AccousticRegionData(n_("echobase.common.importDataMode.accousticRegionData"));
+
private final String i18nKey;
ImportDataMode(String i18nKey) {
Deleted: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDataService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDataService.java 2012-01-10 16:44:31 UTC (rev 255)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDataService.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -1,270 +0,0 @@
-/*
- * #%L
- * EchoBase :: Services
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 Ifremer, Codelutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero 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 Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.echobase.services;
-
-import com.google.common.collect.Maps;
-import fr.ifremer.echobase.EchoBaseTechnicalException;
-import fr.ifremer.echobase.InputFile;
-import fr.ifremer.echobase.entities.references.Mission;
-import fr.ifremer.echobase.services.configurations.ImportDataConfiguration;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.nuiton.topia.TopiaException;
-
-import java.io.File;
-import java.util.Map;
-
-/**
- * Service to import datas.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class ImportDataService extends EchoBaseServiceSupport {
-
- /** Logger. */
- private static final Log log = LogFactory.getLog(ImportDataService.class);
-
- public Mission createMission(Mission mission) {
- try {
- Mission result = getDAO(Mission.class).create(mission);
- commitTransaction("Could not create mission " +
- mission.getName());
- return result;
- } catch (TopiaException eee) {
- throw new EchoBaseTechnicalException(eee);
- }
- }
-
- public Map<InputFile, CsvImportResult> startImport(ImportDataConfiguration configuration) {
-
- Map<InputFile, CsvImportResult> result = Maps.newHashMap();
-
-
- ImportDataMode importDataMode = configuration.getImportDataMode();
- switch (importDataMode) {
- case ACOUSTIC:
- doImportAcoustic(configuration, result);
- break;
- case ALL:
- doImportAll(configuration, result);
- break;
- default:
- throw new IllegalStateException(
- "Can not know what to do with importDataMode " +
- importDataMode);
-
- }
-
-
- return result;
- }
-
- protected void doImportAcoustic(ImportDataConfiguration configuration,
- Map<InputFile, CsvImportResult> result) {
-
- Mission mission = configuration.getMission();
-
- // compute nb step to treate (means nb imports to do)
- configuration.computeSteps();
-
- if (log.isInfoEnabled()) {
- log.info("Starts data import with mission " +
- mission.getName());
- }
-
- InputFile acousticFile = configuration.getAcousticFile();
- if (acousticFile.getFile() != null) {
-
- // do acoustic import
- try {
- CsvImportResult importResult =
- importAcoustic(mission, acousticFile);
- configuration.incrementsProgression();
- result.put(acousticFile, importResult);
- } finally {
- deleteFile(acousticFile);
- }
- }
- }
-
- protected void doImportAll(ImportDataConfiguration configuration,
- Map<InputFile, CsvImportResult> result) {
-
- Mission mission = configuration.getMission();
-
- // compute nb step to treate (means nb imports to do)
- configuration.computeSteps();
-
- if (log.isInfoEnabled()) {
- log.info("Starts data import with mission " +
- mission.getName());
- }
-
- InputFile acousticFile = configuration.getAcousticFile();
- if (acousticFile.getFile() != null) {
-
- // do acoustic import
- try {
- CsvImportResult importResult =
- importAcoustic(mission, acousticFile);
- configuration.incrementsProgression();
- result.put(acousticFile, importResult);
- } finally {
- deleteFile(acousticFile);
- }
- }
-
- InputFile captureFile = configuration.getCaptureFile();
- if (captureFile.getFile() != null) {
-
- // do capture import
- try {
- CsvImportResult importResult =
- importCapture(mission, captureFile);
- configuration.incrementsProgression();
- result.put(captureFile, importResult);
- } finally {
- deleteFile(captureFile);
- }
- }
-
- InputFile eventsFile = configuration.getEventsFile();
- if (eventsFile.getFile() != null) {
-
- // do events import
- try {
- CsvImportResult importResult =
- importEvents(mission, eventsFile);
- configuration.incrementsProgression();
- result.put(eventsFile, importResult);
- } finally {
- deleteFile(eventsFile);
- }
- }
-
- InputFile lectureAgeGenFile = configuration.getLectureAgeGenFile();
- if (lectureAgeGenFile.getFile() != null) {
-
- // do lecture age gen import
- try {
- CsvImportResult importResult =
- importLectureAgeGen(mission, lectureAgeGenFile);
- configuration.incrementsProgression();
- result.put(lectureAgeGenFile, importResult);
- } finally {
- deleteFile(lectureAgeGenFile);
- }
- }
-
- InputFile typeEchoSpeciesFile = configuration.getTypeEchoSpeciesFile();
- if (typeEchoSpeciesFile.getFile() != null) {
-
- // do echo species import
- try {
- CsvImportResult importResult =
- importTypeEchoSpecies(mission, typeEchoSpeciesFile);
- configuration.incrementsProgression();
- result.put(typeEchoSpeciesFile, importResult);
- } finally {
- deleteFile(typeEchoSpeciesFile);
- }
- }
- }
-
- protected void deleteFile(InputFile input) {
- File file = input.getFile();
-
- if (log.isInfoEnabled()) {
- log.info("Will delete import file " + file);
- }
- boolean wasDel = file.delete();
- if (!wasDel) {
- throw new EchoBaseTechnicalException("Could not delete file " + file);
- }
- }
-
- protected CsvImportResult importAcoustic(Mission mission,
- InputFile importFile) {
- if (log.isInfoEnabled()) {
- log.info("Starts " + importFile.getLabel() + " with file " +
- importFile.getFile());
- }
- CsvImportResult result = CsvImportResult.newResult(null, importFile.getFileName(), false);
- prepareImport();
- return result;
- }
-
- protected CsvImportResult importCapture(Mission mission,
- InputFile importFile) {
- if (log.isInfoEnabled()) {
- log.info("Starts " + importFile.getLabel() + " with file " +
- importFile.getFile());
- }
- CsvImportResult result = CsvImportResult.newResult(null, importFile.getFileName(), false);
- prepareImport();
- return result;
- }
-
- protected CsvImportResult importEvents(Mission mission,
- InputFile importFile) {
- if (log.isInfoEnabled()) {
- log.info("Starts " + importFile.getLabel() + " with file " +
- importFile.getFile());
- }
- CsvImportResult result = CsvImportResult.newResult(null, importFile.getFileName(), false);
- prepareImport();
- return result;
- }
-
- protected CsvImportResult importLectureAgeGen(Mission mission,
- InputFile importFile) {
- if (log.isInfoEnabled()) {
- log.info("Starts " + importFile.getLabel() + " with file " +
- importFile.getFile());
- }
- CsvImportResult result = CsvImportResult.newResult(null, importFile.getFileName(), false);
- prepareImport();
- return result;
- }
-
- protected CsvImportResult importTypeEchoSpecies(Mission mission,
- InputFile importFile) {
- if (log.isInfoEnabled()) {
- log.info("Starts " + importFile.getLabel() + " with file " +
- importFile.getFile());
- }
- CsvImportResult result = CsvImportResult.newResult(null, importFile.getFileName(), false);
- prepareImport();
- return result;
- }
-
- protected void prepareImport() {
- try {
- Thread.sleep(2000);
- } catch (InterruptedException e) {
- // ignore
- }
- }
-}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDbService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDbService.java 2012-01-10 16:44:31 UTC (rev 255)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDbService.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -257,8 +257,9 @@
String targetTableName = target.getContract().getSimpleName();
String sourceTableName = source.getContract().getSimpleName();
String table = targetTableName;
- if (source == EchoBaseEntityEnum.Voyage && target == EchoBaseEntityEnum.Echotype) {
- table = targetTableName + "_" + sourceTableName;
+ if (source == EchoBaseEntityEnum.Voyage && target == EchoBaseEntityEnum.Echotype ||
+ source == EchoBaseEntityEnum.Echotype && target == EchoBaseEntityEnum.Species) {
+ table = sourceTableName + "_" + targetTableName;
updateString = "UPDATE " + table + " SET " + sourceTableName + " = '%s' WHERE " + meta.getName() + " ='%s';";
} else if (source == EchoBaseEntityEnum.Voyage && target == EchoBaseEntityEnum.Strata) {
table = targetTableName + "_" + source.getContract().getSimpleName();
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AbstractEchobaseActionConfiguration.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AbstractEchobaseActionConfiguration.java 2012-01-10 16:44:31 UTC (rev 255)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AbstractEchobaseActionConfiguration.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -45,6 +45,7 @@
private float progression;
private long startTime;
+
private long endTime;
public final int getNbSteps() {
@@ -90,7 +91,7 @@
long eTime = getEndTime();
return StringUtil.convertTime(eTime - sTime);
}
-
+
public void beginAction() {
setStartTime(System.nanoTime());
}
Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AbstractImportConfiguration.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AbstractImportConfiguration.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AbstractImportConfiguration.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,51 @@
+/*
+ * #%L
+ * EchoBase :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.services.configurations;
+
+import fr.ifremer.echobase.InputFile;
+
+import java.io.File;
+
+/**
+ * Common import data configuration.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public abstract class AbstractImportConfiguration extends AbstractEchobaseActionConfiguration {
+
+ private static final long serialVersionUID = 1L;
+
+ protected File workingDirectory;
+
+ public File getWorkingDirectory() {
+ return workingDirectory;
+ }
+
+ public void setWorkingDirectory(File workingDirectory) {
+ this.workingDirectory = workingDirectory;
+ }
+
+ public abstract InputFile[] getInputFiles();
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AbstractImportConfiguration.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AccousticDataImportConfiguration.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AccousticDataImportConfiguration.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AccousticDataImportConfiguration.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,101 @@
+/*
+ * #%L
+ * EchoBase :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.services.configurations;
+
+import fr.ifremer.echobase.InputFile;
+
+import java.util.Locale;
+
+import static org.nuiton.i18n.I18n.l_;
+
+/**
+ * Configuration of a "accoustic datas" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class AccousticDataImportConfiguration extends AbstractImportConfiguration {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Selected voyage id where to import datas. */
+ protected String voyageId;
+
+ /** Selected vessel id to find out transect where to import datas. */
+ protected String vesselId;
+
+ /** Manual field 1. */
+ protected String field1;
+
+ /** Manual field 2. */
+ protected String field2;
+
+ /** Movies file to import. */
+ protected final InputFile moviesFile;
+
+ public AccousticDataImportConfiguration(Locale locale) {
+ moviesFile = InputFile.newFile(l_(locale, "echobase.common.moviesFile"));
+ }
+
+ public String getVoyageId() {
+ return voyageId;
+ }
+
+ public void setVoyageId(String voyageId) {
+ this.voyageId = voyageId;
+ }
+
+ public String getVesselId() {
+ return vesselId;
+ }
+
+ public void setVesselId(String vesselId) {
+ this.vesselId = vesselId;
+ }
+
+ public String getField1() {
+ return field1;
+ }
+
+ public void setField1(String field1) {
+ this.field1 = field1;
+ }
+
+ public String getField2() {
+ return field2;
+ }
+
+ public void setField2(String field2) {
+ this.field2 = field2;
+ }
+
+ public InputFile getMoviesFile() {
+ return moviesFile;
+ }
+
+ @Override
+ public InputFile[] getInputFiles() {
+ return new InputFile[]{moviesFile};
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AccousticDataImportConfiguration.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AccousticRegionDataImportConfiguration.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AccousticRegionDataImportConfiguration.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AccousticRegionDataImportConfiguration.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,111 @@
+/*
+ * #%L
+ * EchoBase :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.services.configurations;
+
+import fr.ifremer.echobase.InputFile;
+
+import java.util.Locale;
+
+import static org.nuiton.i18n.I18n.l_;
+
+/**
+ * Configuration of a "accoustic region data" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class AccousticRegionDataImportConfiguration extends AbstractImportConfiguration {
+
+ private static final long serialVersionUID = 1L;
+
+
+ /** Selected voyage id where to import datas. */
+ protected String voyageId;
+
+ /** Selected vessel id to find out transect where to import datas. */
+ protected String vesselId;
+
+ /** Manual field 1. */
+ protected String field1;
+
+ /** Manual field 2. */
+ protected String field2;
+
+ /** Region file to import. */
+ protected final InputFile regionsFile;
+
+ /** Region cell associations file to import. */
+ protected final InputFile associationFile;
+
+ public AccousticRegionDataImportConfiguration(Locale locale) {
+ regionsFile = InputFile.newFile(l_(locale, "echobase.common.regionsFile"));
+ associationFile = InputFile.newFile(l_(locale, "echobase.common.associationFile"));
+ }
+
+ public String getVoyageId() {
+ return voyageId;
+ }
+
+ public void setVoyageId(String voyageId) {
+ this.voyageId = voyageId;
+ }
+
+ public String getVesselId() {
+ return vesselId;
+ }
+
+ public void setVesselId(String vesselId) {
+ this.vesselId = vesselId;
+ }
+
+ public String getField1() {
+ return field1;
+ }
+
+ public void setField1(String field1) {
+ this.field1 = field1;
+ }
+
+ public String getField2() {
+ return field2;
+ }
+
+ public void setField2(String field2) {
+ this.field2 = field2;
+ }
+
+ public InputFile getRegionsFile() {
+ return regionsFile;
+ }
+
+
+ public InputFile getAssociationFile() {
+ return associationFile;
+ }
+
+ @Override
+ public InputFile[] getInputFiles() {
+ return new InputFile[]{regionsFile, associationFile};
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AccousticRegionDataImportConfiguration.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesDataImportConfiguration.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesDataImportConfiguration.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesDataImportConfiguration.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,93 @@
+/*
+ * #%L
+ * EchoBase :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.services.configurations;
+
+import fr.ifremer.echobase.InputFile;
+
+import java.util.Locale;
+
+import static org.nuiton.i18n.I18n.l_;
+
+/**
+ * Configuration of a "catches data import".
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class CatchesDataImportConfiguration extends AbstractImportConfiguration {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Selected voyage id where to import datas. */
+ protected String voyageId;
+
+ /** Station file to import. */
+ protected final InputFile tlbeStationFile;
+
+ /** Tri file to import. */
+ protected final InputFile xtblTriFile;
+
+ /** Mensuration data file to import. */
+ protected final InputFile tblMensurationFile;
+
+ /** Mensuration classes file to import. */
+ protected final InputFile tblMensurationClasseFile;
+
+ public CatchesDataImportConfiguration(Locale locale) {
+ tlbeStationFile = InputFile.newFile(l_(locale, "echobase.common.tlbeStationFile"));
+ xtblTriFile = InputFile.newFile(l_(locale, "echobase.common.xtblTriFile"));
+ tblMensurationFile = InputFile.newFile(l_(locale, "echobase.common.tblMensurationFile"));
+ tblMensurationClasseFile = InputFile.newFile(l_(locale, "echobase.common.tblMensurationClasseFile"));
+ }
+
+ public String getVoyageId() {
+ return voyageId;
+ }
+
+ public void setVoyageId(String voyageId) {
+ this.voyageId = voyageId;
+ }
+
+ public InputFile getTlbeStationFile() {
+ return tlbeStationFile;
+ }
+
+
+ public InputFile getXtblTriFile() {
+ return xtblTriFile;
+ }
+
+ public InputFile getTblMensurationFile() {
+ return tblMensurationFile;
+ }
+
+ public InputFile getTblMensurationClasseFile() {
+ return tblMensurationClasseFile;
+ }
+
+ @Override
+ public InputFile[] getInputFiles() {
+ return new InputFile[]{tlbeStationFile, xtblTriFile, tblMensurationFile, tblMensurationClasseFile};
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesDataImportConfiguration.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesIndividualDataImportConfiguration.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesIndividualDataImportConfiguration.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesIndividualDataImportConfiguration.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,68 @@
+/*
+ * #%L
+ * EchoBase :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.services.configurations;
+
+import fr.ifremer.echobase.InputFile;
+
+import java.util.Locale;
+
+import static org.nuiton.i18n.I18n.l_;
+
+/**
+ * Configuration of a "catches individual data" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class CatchesIndividualDataImportConfiguration extends AbstractImportConfiguration {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Selected voyage id where to import datas. */
+ protected String voyageId;
+
+ /** Individual input file to import. */
+ protected final InputFile individualDataFile;
+
+ public CatchesIndividualDataImportConfiguration(Locale locale) {
+ individualDataFile = InputFile.newFile(l_(locale, "echobase.common.individualDataFile"));
+ }
+
+ public String getVoyageId() {
+ return voyageId;
+ }
+
+ public void setVoyageId(String voyageId) {
+ this.voyageId = voyageId;
+ }
+
+ public InputFile getIndividualDataFile() {
+ return individualDataFile;
+ }
+
+ @Override
+ public InputFile[] getInputFiles() {
+ return new InputFile[]{individualDataFile};
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesIndividualDataImportConfiguration.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesReferenceImportConfiguration.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesReferenceImportConfiguration.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesReferenceImportConfiguration.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,65 @@
+/*
+ * #%L
+ * EchoBase :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.services.configurations;
+
+import fr.ifremer.echobase.InputFile;
+
+import java.util.Locale;
+
+import static org.nuiton.i18n.I18n.l_;
+
+/**
+ * Configuration of a "catches references" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class CatchesReferenceImportConfiguration extends AbstractImportConfiguration {
+
+ private static final long serialVersionUID = 1L;
+
+ /** LengthAgeKey file to import. */
+ protected final InputFile lengthAgeKeyFile;
+
+ /** LengthWeightKey file to import. */
+ protected final InputFile lengthWeightKeyFile;
+
+ public CatchesReferenceImportConfiguration(Locale locale) {
+ lengthAgeKeyFile = InputFile.newFile(l_(locale, "echobase.common.lengthAgeKeyFile"));
+ lengthWeightKeyFile = InputFile.newFile(l_(locale, "echobase.common.lengthWeightKeyFile"));
+ }
+
+ public InputFile getLengthAgeKeyFile() {
+ return lengthAgeKeyFile;
+ }
+
+ public InputFile getLengthWeightKeyFile() {
+ return lengthWeightKeyFile;
+ }
+
+ @Override
+ public InputFile[] getInputFiles() {
+ return new InputFile[]{lengthAgeKeyFile, lengthWeightKeyFile};
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesReferenceImportConfiguration.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataCompleteImportConfiguration.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataCompleteImportConfiguration.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataCompleteImportConfiguration.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,109 @@
+/*
+ * #%L
+ * EchoBase :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.services.configurations;
+
+import fr.ifremer.echobase.InputFile;
+
+import java.util.Locale;
+
+import static org.nuiton.i18n.I18n.l_;
+
+/**
+ * Configuration of a "common data complete" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class CommonDataCompleteImportConfiguration extends AbstractImportConfiguration {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Selected mission id to use in voyage. */
+ protected String missionId;
+
+ /** Selected area of operation to use for voyage. */
+ protected String areaOfOperationId;
+
+ /** Manual description of voyage. */
+ protected String voyageDescription;
+
+ /** Manual datum to use in voyage. */
+ protected String datum = "WGS84";
+
+ /** Casino file to import. */
+ protected final InputFile casinoFile;
+
+ /** Echotype file to import. */
+ protected final InputFile echotypeFile;
+
+ public CommonDataCompleteImportConfiguration(Locale locale) {
+ casinoFile = InputFile.newFile(l_(locale, "echobase.common.casinoFile"));
+ echotypeFile = InputFile.newFile(l_(locale, "echobase.common.echotypeFile"));
+ }
+
+ public String getMissionId() {
+ return missionId;
+ }
+
+ public void setMissionId(String missionId) {
+ this.missionId = missionId;
+ }
+
+ public String getAreaOfOperationId() {
+ return areaOfOperationId;
+ }
+
+ public void setAreaOfOperationId(String areaOfOperationId) {
+ this.areaOfOperationId = areaOfOperationId;
+ }
+
+ public String getVoyageDescription() {
+ return voyageDescription;
+ }
+
+ public void setVoyageDescription(String voyageDescription) {
+ this.voyageDescription = voyageDescription;
+ }
+
+ public String getDatum() {
+ return datum;
+ }
+
+ public void setDatum(String datum) {
+ this.datum = datum;
+ }
+
+ public InputFile getCasinoFile() {
+ return casinoFile;
+ }
+
+ public InputFile getEchotypeFile() {
+ return echotypeFile;
+ }
+
+ @Override
+ public InputFile[] getInputFiles() {
+ return new InputFile[]{casinoFile, echotypeFile};
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataCompleteImportConfiguration.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataFromTransectImportConfiguration.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataFromTransectImportConfiguration.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataFromTransectImportConfiguration.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,68 @@
+/*
+ * #%L
+ * EchoBase :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.services.configurations;
+
+import fr.ifremer.echobase.InputFile;
+
+import java.util.Locale;
+
+import static org.nuiton.i18n.I18n.l_;
+
+/**
+ * Configuration of a "common data from transect" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class CommonDataFromTransectImportConfiguration extends AbstractImportConfiguration {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Selected voyage id where to import datas. */
+ protected String voyageId;
+
+ /** Casino file to import. */
+ protected final InputFile casinoFile;
+
+ public CommonDataFromTransectImportConfiguration(Locale locale) {
+ casinoFile = InputFile.newFile(l_(locale, "echobase.common.casinoFile"));
+ }
+
+ public String getVoyageId() {
+ return voyageId;
+ }
+
+ public void setVoyageId(String voyageId) {
+ this.voyageId = voyageId;
+ }
+
+ public InputFile getCasinoFile() {
+ return casinoFile;
+ }
+
+ @Override
+ public InputFile[] getInputFiles() {
+ return new InputFile[]{casinoFile};
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataFromTransectImportConfiguration.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/ImportDataConfiguration.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/ImportDataConfiguration.java 2012-01-10 16:44:31 UTC (rev 255)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/ImportDataConfiguration.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -1,141 +0,0 @@
-/*
- * #%L
- * EchoBase :: Services
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 Ifremer, Codelutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero 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 Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.echobase.services.configurations;
-
-import fr.ifremer.echobase.InputFile;
-import fr.ifremer.echobase.entities.references.Mission;
-import fr.ifremer.echobase.services.ImportDataMode;
-import org.apache.commons.io.FileUtils;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Locale;
-
-import static org.nuiton.i18n.I18n.l_;
-
-/**
- * Configuration of an import data action.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class ImportDataConfiguration extends AbstractEchobaseActionConfiguration {
-
- private static final long serialVersionUID = 1L;
-
- /** Mission used for the import (may not be in db if needed to be created). */
- protected Mission mission;
-
- protected ImportDataMode importDataMode;
-
- protected File workingDirectory;
-
- protected InputFile acousticFile;
-
- protected InputFile captureFile;
-
- protected InputFile lectureAgeGenFile;
-
- protected InputFile eventsFile;
-
- protected InputFile typeEchoSpeciesFile;
-
- public ImportDataConfiguration(Locale locale) {
- acousticFile = InputFile.newFile(
- l_(locale, "echobase.common.acousticImport"));
- captureFile = InputFile.newFile(
- l_(locale, "echobase.common.captureImport"));
- lectureAgeGenFile = InputFile.newFile(
- l_(locale, "echobase.common.lectureAgeGenImport"));
- eventsFile = InputFile.newFile(
- l_(locale, "echobase.common.eventsImport"));
- typeEchoSpeciesFile = InputFile.newFile(
- l_(locale, "echobase.common.typeEchoSpeciesImport"));
- }
-
- public ImportDataMode getImportDataMode() {
- return importDataMode;
- }
-
- public File getWorkingDirectory() {
- return workingDirectory;
- }
-
- public Mission getMission() {
- return mission;
- }
-
- public InputFile getAcousticFile() {
- return acousticFile;
- }
-
- public InputFile getCaptureFile() {
- return captureFile;
- }
-
- public InputFile getLectureAgeGenFile() {
- return lectureAgeGenFile;
- }
-
- public InputFile getEventsFile() {
- return eventsFile;
- }
-
- public InputFile getTypeEchoSpeciesFile() {
- return typeEchoSpeciesFile;
- }
-
- public void setImportDataMode(ImportDataMode importDataMode) {
- this.importDataMode = importDataMode;
- }
-
- public void setWorkingDirectory(File workingDirectory) {
- this.workingDirectory = workingDirectory;
- }
-
- public void setMission(Mission mission) {
- this.mission = mission;
- }
-
- public void computeSteps() {
- int nbSteps = 0;
- switch (importDataMode) {
- case ALL:
- nbSteps = 5;
- break;
- case ACOUSTIC:
- nbSteps = 1;
- break;
- default:
- }
- setNbSteps(nbSteps);
- }
-
- @Override
- public void destroy() throws IOException {
- if (workingDirectory != null) {
- FileUtils.deleteDirectory(workingDirectory);
- }
- }
-}
Modified: trunk/echobase-services/src/main/resources/i18n/echobase-services_fr_FR.properties
===================================================================
--- trunk/echobase-services/src/main/resources/i18n/echobase-services_fr_FR.properties 2012-01-10 16:44:31 UTC (rev 255)
+++ trunk/echobase-services/src/main/resources/i18n/echobase-services_fr_FR.properties 2012-01-11 13:08:20 UTC (rev 256)
@@ -1,8 +1,20 @@
-echobase.common.acousticImport=Import Acoustique
-echobase.common.captureImport=Import Pêcherie
-echobase.common.eventsImport=Import Evènements
-echobase.common.importDataMode.acoustic=Import Acoustic
-echobase.common.importDataMode.all=Import globale
-echobase.common.importDbFile=File d'import (zip)
-echobase.common.lectureAgeGenImport=Import Lecture Agen Gen
-echobase.common.typeEchoSpeciesImport=Import Type EchoSpecies
+echobase.common.associationFile=Fichier d'associations de cellules
+echobase.common.casinoFile=Fichier Casino
+echobase.common.echotypeFile=Fichier echotype
+echobase.common.importDataMode.accousticData=Import des données accoustiques
+echobase.common.importDataMode.accousticRegionData=Import des cellules régions (accoustique)
+echobase.common.importDataMode.catchesData=Import des donées de pêche non biométrie
+echobase.common.importDataMode.catchesIndividualData=Import des données de pêche biométire
+echobase.common.importDataMode.catchesReferences=Import du référentiel pêche
+echobase.common.importDataMode.commonDataComplete=Import de données communes
+echobase.common.importDataMode.commonDataFromTransect=Import des données communes (à partir du transect)
+echobase.common.importDbFile=Fichier d'import (zip)
+echobase.common.individualDataFile=Fichier de données individuelles
+echobase.common.lengthAgeKeyFile=Fichier de relation Taille-Age
+echobase.common.lengthWeightKeyFile=Fichier de relation Taille-Poids
+echobase.common.moviesFile=Fichier Movies
+echobase.common.regionsFile=Fichier des régions
+echobase.common.tblMensurationClasseFile=Fichier de classes de mensuration
+echobase.common.tblMensurationFile=Fichier de mensuration
+echobase.common.tlbeStationFile=Fichier des stations
+echobase.common.xtblTriFile=Fichier Tri
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseSession.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseSession.java 2012-01-10 16:44:31 UTC (rev 255)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseSession.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -24,9 +24,9 @@
package fr.ifremer.echobase.ui;
import fr.ifremer.echobase.entities.EchoBaseUser;
+import fr.ifremer.echobase.services.configurations.AbstractImportConfiguration;
import fr.ifremer.echobase.services.configurations.EmbeddedApplicationConfiguration;
import fr.ifremer.echobase.services.configurations.ExportDbConfiguration;
-import fr.ifremer.echobase.services.configurations.ImportDataConfiguration;
import fr.ifremer.echobase.services.configurations.ImportDbConfiguration;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -48,9 +48,6 @@
/** Key to set User connected in this session. */
protected static final String PROPERTY_ECHO_BASE_USER = "echobaseUser";
- /** Key to keep import data configuration in this session. */
- protected static final String PROPERTY_IMPORT_DATA_CONFIGURATION = "importDataConfiguration";
-
/** Key to keep import db configuration in this session. */
protected static final String PROPERTY_IMPORT_DB_CONFIGURATION = "importDbConfiguration";
@@ -81,14 +78,6 @@
set(PROPERTY_ECHO_BASE_USER, echoBaseUser);
}
- public ImportDataConfiguration getImportDataConfiguration() {
- return get(PROPERTY_IMPORT_DATA_CONFIGURATION, ImportDataConfiguration.class);
- }
-
- public void setImportDataConfiguration(ImportDataConfiguration configuration) {
- set(PROPERTY_IMPORT_DATA_CONFIGURATION, configuration);
- }
-
public ImportDbConfiguration getImportDbConfiguration() {
return get(PROPERTY_IMPORT_DB_CONFIGURATION, ImportDbConfiguration.class);
}
@@ -113,6 +102,18 @@
set(PROPERTY_EMBEDDED_APPLICATION_CONFIGURATION, configuration);
}
+ public <M extends AbstractImportConfiguration> M getImportDataConfiguration(Class<M> configurationType) {
+ return get(configurationType.getSimpleName(), configurationType);
+ }
+
+ public <M extends AbstractImportConfiguration> void setImportDataConfiguration(M configuration) {
+ set(configuration.getClass().getSimpleName(), configuration);
+ }
+
+ public <M extends AbstractImportConfiguration> void removeImportDataConfiguration(Class<M> configurationType) {
+ set(configurationType.getSimpleName(), null);
+ }
+
/**
* Remove form this session, the object from his given key and returns it.
*
Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/AbstractConfigureImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/AbstractConfigureImport.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/AbstractConfigureImport.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,121 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import com.opensymphony.xwork2.interceptor.annotations.InputConfig;
+import fr.ifremer.echobase.InputFile;
+import fr.ifremer.echobase.services.EchoBaseServiceSupport;
+import fr.ifremer.echobase.services.configurations.AbstractImportConfiguration;
+import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.nuiton.topia.persistence.TopiaEntity;
+import org.nuiton.util.FileUtil;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Configure a accoustic data import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public abstract class AbstractConfigureImport<M extends AbstractImportConfiguration> extends EchoBaseActionSupport {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Logger. */
+ private static final Log log =
+ LogFactory.getLog(AbstractConfigureImport.class);
+
+ protected final Class<M> modelType;
+
+ protected M model;
+
+ protected AbstractConfigureImport(Class<M> modelType) {
+ this.modelType = modelType;
+ }
+
+ public final M getModel() {
+ if (model == null) {
+ model = createModel();
+ }
+ return model;
+ }
+
+ protected abstract M createModel();
+
+ @Override
+ public String input() throws Exception {
+
+ // always remove configuration from session anytime coming here
+ getEchoBaseSession().removeImportDataConfiguration(modelType);
+
+ return INPUT;
+ }
+
+ @InputConfig(methodName = "input")
+ @Override
+ public String execute() throws Exception {
+
+ M importModel = getModel();
+ File tempDirectory = FileUtils.getTempDirectory();
+ File dataDirectory = new File(
+ tempDirectory,
+ "echobase-importData-" + System.currentTimeMillis());
+ FileUtil.createDirectoryIfNecessary(dataDirectory);
+ importModel.setWorkingDirectory(dataDirectory);
+ if (log.isInfoEnabled()) {
+ log.info("Temporary directory to use : " + dataDirectory);
+ }
+
+ for (InputFile inputFile : importModel.getInputFiles()) {
+ copyFile(inputFile, dataDirectory);
+ }
+ setInSession(importModel);
+ return SUCCESS;
+ }
+
+
+ protected final void setInSession(M model) {
+ getEchoBaseSession().setImportDataConfiguration(model);
+ }
+
+ protected final M getFromSession() {
+ return getEchoBaseSession().getImportDataConfiguration(modelType);
+ }
+
+ public final void setModel(M model) {
+ this.model = model;
+ }
+
+ protected <E extends TopiaEntity> Map<String, String> loadSortAndDecorate(EchoBaseServiceSupport service, Class<E> beanType) {
+
+ List<E> beans = service.getEntities(beanType);
+ return getDecoratorService().sortAndDecorate(getLocale(), beans, null);
+ }
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/AbstractConfigureImport.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/AbstractLaunchImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/AbstractLaunchImport.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/AbstractLaunchImport.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,87 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.services.AbstractImportDataService;
+import fr.ifremer.echobase.services.configurations.AbstractImportConfiguration;
+import fr.ifremer.echobase.ui.actions.AbstractWaitAndExecAction;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * TODO
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class AbstractLaunchImport<M extends AbstractImportConfiguration, S extends AbstractImportDataService<M>> extends AbstractWaitAndExecAction<M> {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(AbstractLaunchImport.class);
+
+ protected final Class<M> modelType;
+
+ protected final Class<S> serviceType;
+
+ protected transient S service;
+
+ protected AbstractLaunchImport(Class<M> modelType, Class<S> serviceType) {
+ this.modelType = modelType;
+ this.serviceType = serviceType;
+ }
+
+ @Override
+ protected M initModel() {
+ return getEchoBaseSession().getImportDataConfiguration(modelType);
+ }
+
+ @Override
+ public void prepare() throws Exception {
+
+ super.prepare();
+
+ service = newService(serviceType);
+ }
+
+ @Override
+ protected void startAction(M model) throws Exception {
+ if (log.isInfoEnabled()) {
+ log.info("Start imports for " + getModel());
+ }
+
+ service.startImport(model, getEchoBaseSession().getEchoBaseUser());
+ }
+
+ @Override
+ protected void closeAction(M model) throws Exception {
+
+ // clean configuration
+ model.destroy();
+
+ // remove configuration from session
+ getEchoBaseSession().removeImportDataConfiguration(modelType);
+ }
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/AbstractLaunchImport.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticDataImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticDataImport.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticDataImport.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,92 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.entities.data.Voyage;
+import fr.ifremer.echobase.entities.references.Vessel;
+import fr.ifremer.echobase.services.EchoBaseServiceSupport;
+import fr.ifremer.echobase.services.configurations.AccousticDataImportConfiguration;
+
+import java.io.File;
+import java.util.Map;
+
+/**
+ * Configure a accoustic data import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class ConfigureAccousticDataImport extends AbstractConfigureImport<AccousticDataImportConfiguration> {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Universe of existing voyages. */
+ protected Map<String, String> voyages;
+
+ /** Universe of existing vessels. */
+ protected Map<String, String> vessels;
+
+ public ConfigureAccousticDataImport() {
+ super(AccousticDataImportConfiguration.class);
+ }
+
+ @Override
+ protected AccousticDataImportConfiguration createModel() {
+ return new AccousticDataImportConfiguration(getLocale());
+ }
+
+ @Override
+ public String input() throws Exception {
+
+ super.input();
+
+ EchoBaseServiceSupport service =
+ newService(EchoBaseServiceSupport.class);
+
+ voyages = loadSortAndDecorate(service, Voyage.class);
+ vessels = loadSortAndDecorate(service, Vessel.class);
+
+ return INPUT;
+ }
+
+ public Map<String, String> getVoyages() {
+ return voyages;
+ }
+
+ public Map<String, String> getVessels() {
+ return vessels;
+ }
+
+ public void setMoviesFile(File file) {
+ getModel().getMoviesFile().setFile(file);
+ }
+
+ public void setMoviesFileContentType(String contentType) {
+ getModel().getMoviesFile().setContentType(contentType);
+ }
+
+ public void setMoviesFileFileName(String fileName) {
+ getModel().getMoviesFile().setFileName(fileName);
+ }
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticDataImport.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionDataImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionDataImport.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionDataImport.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,104 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.entities.data.Voyage;
+import fr.ifremer.echobase.entities.references.Vessel;
+import fr.ifremer.echobase.services.EchoBaseServiceSupport;
+import fr.ifremer.echobase.services.configurations.AccousticRegionDataImportConfiguration;
+
+import java.io.File;
+import java.util.Map;
+
+/**
+ * Configure a "accoustic region data" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class ConfigureAccousticRegionDataImport extends AbstractConfigureImport<AccousticRegionDataImportConfiguration> {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Universe of existing voyages. */
+ protected Map<String, String> voyages;
+
+ /** Universe of existing vessels. */
+ protected Map<String, String> vessels;
+
+ public ConfigureAccousticRegionDataImport() {
+ super(AccousticRegionDataImportConfiguration.class);
+ }
+
+ @Override
+ protected AccousticRegionDataImportConfiguration createModel() {
+ return new AccousticRegionDataImportConfiguration(getLocale());
+ }
+
+ @Override
+ public String input() throws Exception {
+
+ super.input();
+
+ EchoBaseServiceSupport service =
+ newService(EchoBaseServiceSupport.class);
+
+ voyages = loadSortAndDecorate(service, Voyage.class);
+ vessels = loadSortAndDecorate(service, Vessel.class);
+
+ return INPUT;
+ }
+
+ public Map<String, String> getVoyages() {
+ return voyages;
+ }
+
+ public Map<String, String> getVessels() {
+ return vessels;
+ }
+
+ public void setRegionsFile(File file) {
+ getModel().getRegionsFile().setFile(file);
+ }
+
+ public void setRegionsFileContentType(String contentType) {
+ getModel().getRegionsFile().setContentType(contentType);
+ }
+
+ public void setRegionsFileFileName(String fileName) {
+ getModel().getRegionsFile().setFileName(fileName);
+ }
+
+ public void setAssociationFile(File file) {
+ getModel().getAssociationFile().setFile(file);
+ }
+
+ public void setAssociationFileContentType(String contentType) {
+ getModel().getAssociationFile().setContentType(contentType);
+ }
+
+ public void setAssociationFileFileName(String fileName) {
+ getModel().getAssociationFile().setFileName(fileName);
+ }
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionDataImport.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesDataImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesDataImport.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesDataImport.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,119 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.entities.data.Voyage;
+import fr.ifremer.echobase.services.EchoBaseServiceSupport;
+import fr.ifremer.echobase.services.configurations.CatchesDataImportConfiguration;
+
+import java.io.File;
+import java.util.Map;
+
+/**
+ * Configure a "catches data" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class ConfigureCatchesDataImport extends AbstractConfigureImport<CatchesDataImportConfiguration> {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Universe of existing voyages. */
+ protected Map<String, String> voyages;
+
+ public ConfigureCatchesDataImport() {
+ super(CatchesDataImportConfiguration.class);
+ }
+
+ @Override
+ protected CatchesDataImportConfiguration createModel() {
+ return new CatchesDataImportConfiguration(getLocale());
+ }
+
+ @Override
+ public String input() throws Exception {
+
+ super.input();
+
+ EchoBaseServiceSupport service =
+ newService(EchoBaseServiceSupport.class);
+
+ voyages = loadSortAndDecorate(service, Voyage.class);
+
+ return INPUT;
+ }
+
+ public Map<String, String> getVoyages() {
+ return voyages;
+ }
+
+ public void setTlbeStationFile(File file) {
+ getModel().getTlbeStationFile().setFile(file);
+ }
+
+ public void setTlbeStationFileContentType(String contentType) {
+ getModel().getTlbeStationFile().setContentType(contentType);
+ }
+
+ public void setTlbeStationFileFileName(String fileName) {
+ getModel().getTlbeStationFile().setFileName(fileName);
+ }
+
+ public void setXtblTriFile(File file) {
+ getModel().getXtblTriFile().setFile(file);
+ }
+
+ public void setXtblTriFileContentType(String contentType) {
+ getModel().getXtblTriFile().setContentType(contentType);
+ }
+
+ public void setXtblTriFileFileName(String fileName) {
+ getModel().getXtblTriFile().setFileName(fileName);
+ }
+
+ public void setTblMensurationFile(File file) {
+ getModel().getTblMensurationFile().setFile(file);
+ }
+
+ public void setTblMensurationFileContentType(String contentType) {
+ getModel().getTblMensurationFile().setContentType(contentType);
+ }
+
+ public void setTblMensurationFileFileName(String fileName) {
+ getModel().getTblMensurationFile().setFileName(fileName);
+ }
+
+ public void setTblMensurationClasseFile(File file) {
+ getModel().getTblMensurationClasseFile().setFile(file);
+ }
+
+ public void setTblMensurationClasseFileContentType(String contentType) {
+ getModel().getTblMensurationClasseFile().setContentType(contentType);
+ }
+
+ public void setTblMensurationClasseFileFileName(String fileName) {
+ getModel().getTblMensurationClasseFile().setFileName(fileName);
+ }
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesDataImport.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualDataImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualDataImport.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualDataImport.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,83 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.entities.data.Voyage;
+import fr.ifremer.echobase.services.EchoBaseServiceSupport;
+import fr.ifremer.echobase.services.configurations.CatchesIndividualDataImportConfiguration;
+
+import java.io.File;
+import java.util.Map;
+
+/**
+ * Configure a "catches individual data" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class ConfigureCatchesIndividualDataImport extends AbstractConfigureImport<CatchesIndividualDataImportConfiguration> {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Universe of existing voyages. */
+ protected Map<String, String> voyages;
+
+ public ConfigureCatchesIndividualDataImport() {
+ super(CatchesIndividualDataImportConfiguration.class);
+ }
+
+ @Override
+ protected CatchesIndividualDataImportConfiguration createModel() {
+ return new CatchesIndividualDataImportConfiguration(getLocale());
+ }
+
+ @Override
+ public String input() throws Exception {
+
+ super.input();
+
+ EchoBaseServiceSupport service =
+ newService(EchoBaseServiceSupport.class);
+
+ voyages = loadSortAndDecorate(service, Voyage.class);
+
+ return INPUT;
+ }
+
+ public Map<String, String> getVoyages() {
+ return voyages;
+ }
+
+ public void setIndividualDataFile(File file) {
+ getModel().getIndividualDataFile().setFile(file);
+ }
+
+ public void setIndividualDataFileContentType(String contentType) {
+ getModel().getIndividualDataFile().setContentType(contentType);
+ }
+
+ public void setIndividualDataFileFileName(String fileName) {
+ getModel().getIndividualDataFile().setFileName(fileName);
+ }
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualDataImport.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReferenceImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReferenceImport.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReferenceImport.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,72 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.services.configurations.CatchesReferenceImportConfiguration;
+
+import java.io.File;
+
+/**
+ * Configure a accoustic data import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class ConfigureCatchesReferenceImport extends AbstractConfigureImport<CatchesReferenceImportConfiguration> {
+
+ private static final long serialVersionUID = 1L;
+
+ public ConfigureCatchesReferenceImport() {
+ super(CatchesReferenceImportConfiguration.class);
+ }
+
+ @Override
+ protected CatchesReferenceImportConfiguration createModel() {
+ return new CatchesReferenceImportConfiguration(getLocale());
+ }
+
+ public void setLengthAgeKeyFileFile(File file) {
+ getModel().getLengthAgeKeyFile().setFile(file);
+ }
+
+ public void setLengthAgeKeyFileContentType(String contentType) {
+ getModel().getLengthAgeKeyFile().setContentType(contentType);
+ }
+
+ public void setLengthAgeKeyFileFileName(String fileName) {
+ getModel().getLengthAgeKeyFile().setFileName(fileName);
+ }
+
+ public void setLengthWeightKeyFileFile(File file) {
+ getModel().getLengthWeightKeyFile().setFile(file);
+ }
+
+ public void setLengthWeightKeyFileContentType(String contentType) {
+ getModel().getLengthWeightKeyFile().setContentType(contentType);
+ }
+
+ public void setLengthWeightKeyFileFileName(String fileName) {
+ getModel().getLengthWeightKeyFile().setFileName(fileName);
+ }
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReferenceImport.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataCompleteImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataCompleteImport.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataCompleteImport.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,163 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import com.google.common.collect.Maps;
+import fr.ifremer.echobase.entities.references.AreaOfOperation;
+import fr.ifremer.echobase.entities.references.Mission;
+import fr.ifremer.echobase.entities.references.MissionImpl;
+import fr.ifremer.echobase.services.EchoBaseServiceSupport;
+import fr.ifremer.echobase.services.configurations.CommonDataCompleteImportConfiguration;
+
+import java.io.File;
+import java.util.Map;
+
+/**
+ * Configure a accoustic data import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class ConfigureCommonDataCompleteImport extends AbstractConfigureImport<CommonDataCompleteImportConfiguration> {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Universe of existing voyages. */
+ protected Map<String, String> missions;
+
+ /** Universe of existing voyages. */
+ protected Map<String, String> areaOfOperations;
+
+ /** Universe of possible import modes. */
+ protected Map<String, String> importModes;
+
+ /** Selected import mode. */
+ protected SelectedMissionMode importMode;
+
+ /** mission to use. */
+ protected Mission mission;
+
+ public ConfigureCommonDataCompleteImport() {
+ super(CommonDataCompleteImportConfiguration.class);
+ }
+
+ @Override
+ protected CommonDataCompleteImportConfiguration createModel() {
+ return new CommonDataCompleteImportConfiguration(getLocale());
+ }
+
+ @Override
+ public String input() throws Exception {
+
+ super.input();
+
+ EchoBaseServiceSupport service =
+ newService(EchoBaseServiceSupport.class);
+
+ missions = loadSortAndDecorate(service, Mission.class);
+
+ areaOfOperations = loadSortAndDecorate(service, AreaOfOperation.class);
+
+ importModes = Maps.newLinkedHashMap();
+ for (SelectedMissionMode mode : SelectedMissionMode.values()) {
+ importModes.put(mode.name(), _(mode.getI18nKey()));
+ }
+
+ if (importMode == null) {
+ importMode = SelectedMissionMode.USE_EXISTING_MISSION;
+ }
+
+ return INPUT;
+ }
+
+ @Override
+ public String execute() throws Exception {
+
+ super.execute();
+
+ if (importMode == SelectedMissionMode.CREATE_NEW_MISSION) {
+
+ // create voyage in db
+ ImportDataService service = newService(ImportDataService.class);
+ Mission missionToCreate = getMission();
+
+ Mission missionSaved = service.createMission(missionToCreate);
+
+ getModel().setMissionId(missionSaved.getTopiaId());
+ }
+
+ return SUCCESS;
+ }
+
+ public Map<String, String> getMissions() {
+ return missions;
+ }
+
+ public Map<String, String> getAreaOfOperations() {
+ return areaOfOperations;
+ }
+
+ public Map<String, String> getImportModes() {
+ return importModes;
+ }
+
+ public SelectedMissionMode getImportMode() {
+ return importMode;
+ }
+
+ public Mission getMission() {
+ if (mission == null) {
+ mission = new MissionImpl();
+ }
+ return mission;
+ }
+
+ public void setImportMode(SelectedMissionMode importMode) {
+ this.importMode = importMode;
+ }
+
+ public void setCasinoFile(File file) {
+ getModel().getCasinoFile().setFile(file);
+ }
+
+ public void setCasinoFileContentType(String contentType) {
+ getModel().getCasinoFile().setContentType(contentType);
+ }
+
+ public void setCasinoFileFileName(String fileName) {
+ getModel().getCasinoFile().setFileName(fileName);
+ }
+
+ public void setEchotypeFile(File file) {
+ getModel().getEchotypeFile().setFile(file);
+ }
+
+ public void setEchotypeFileContentType(String contentType) {
+ getModel().getEchotypeFile().setContentType(contentType);
+ }
+
+ public void setEchotypeFileFileName(String fileName) {
+ getModel().getEchotypeFile().setFileName(fileName);
+ }
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataCompleteImport.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransectImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransectImport.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransectImport.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,83 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.entities.data.Voyage;
+import fr.ifremer.echobase.services.EchoBaseServiceSupport;
+import fr.ifremer.echobase.services.configurations.CommonDataFromTransectImportConfiguration;
+
+import java.io.File;
+import java.util.Map;
+
+/**
+ * Configure a "common data from transect" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class ConfigureCommonDataFromTransectImport extends AbstractConfigureImport<CommonDataFromTransectImportConfiguration> {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Universe of existing voyages. */
+ protected Map<String, String> voyages;
+
+ public ConfigureCommonDataFromTransectImport() {
+ super(CommonDataFromTransectImportConfiguration.class);
+ }
+
+ @Override
+ protected CommonDataFromTransectImportConfiguration createModel() {
+ return new CommonDataFromTransectImportConfiguration(getLocale());
+ }
+
+ @Override
+ public String input() throws Exception {
+
+ super.input();
+
+ EchoBaseServiceSupport service =
+ newService(EchoBaseServiceSupport.class);
+
+ voyages = loadSortAndDecorate(service, Voyage.class);
+
+ return INPUT;
+ }
+
+ public Map<String, String> getVoyages() {
+ return voyages;
+ }
+
+ public void setCasinoFile(File file) {
+ getModel().getCasinoFile().setFile(file);
+ }
+
+ public void setCasinoFileContentType(String contentType) {
+ getModel().getCasinoFile().setContentType(contentType);
+ }
+
+ public void setCasinoFileFileName(String fileName) {
+ getModel().getCasinoFile().setFileName(fileName);
+ }
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransectImport.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureFiles.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureFiles.java 2012-01-10 16:44:31 UTC (rev 255)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureFiles.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -1,206 +0,0 @@
-/*
- * #%L
- * EchoBase :: UI
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 Ifremer, Codelutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero 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 Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.echobase.ui.actions.importData;
-
-import com.google.common.collect.Maps;
-import com.opensymphony.xwork2.Preparable;
-import fr.ifremer.echobase.entities.references.Mission;
-import fr.ifremer.echobase.services.EchoBaseServiceSupport;
-import fr.ifremer.echobase.services.configurations.ImportDataConfiguration;
-import fr.ifremer.echobase.services.ImportDataMode;
-import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport;
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.nuiton.util.FileUtil;
-
-import java.io.File;
-import java.util.Map;
-
-/**
- * Action to load input files to import.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class ConfigureFiles extends EchoBaseActionSupport implements Preparable {
-
- private static final long serialVersionUID = 1L;
-
- /** Logger. */
- private static final Log log = LogFactory.getLog(ConfigureFiles.class);
-
- /** Import data configuration to push in session. */
- protected ImportDataConfiguration model;
-
- /** Id of selected voyage used in import. */
- protected String missionId;
-
- /** Universe of possible import modes. */
- protected Map<String, String> importDataModes;
-
- public void setMissionId(String missionId) {
- this.missionId = missionId;
- }
-
- public void setImportDataMode(ImportDataMode importDataMode) {
- getModel().setImportDataMode(importDataMode);
- }
-
- public void setAcoustic(File file) {
- getModel().getAcousticFile().setFile(file);
- }
-
- public void setAcousticContentType(String contentType) {
- getModel().getAcousticFile().setContentType(contentType);
- }
-
- public void setAcousticFileName(String fileName) {
- getModel().getAcousticFile().setFileName(fileName);
- }
-
- public void setCapture(File file) {
- getModel().getCaptureFile().setFile(file);
- }
-
- public void setCaptureContentType(String contentType) {
- getModel().getCaptureFile().setContentType(contentType);
- }
-
- public void setCaptureFileName(String fileName) {
- getModel().getCaptureFile().setFileName(fileName);
- }
-
- public void setLectureAgeGen(File file) {
- getModel().getLectureAgeGenFile().setFile(file);
- }
-
- public void setLectureAgeGenContentType(String contentType) {
- getModel().getLectureAgeGenFile().setContentType(contentType);
- }
-
- public void setLectureAgeGenFileName(String fileName) {
- getModel().getLectureAgeGenFile().setFileName(fileName);
- }
-
- public void setEvents(File file) {
- getModel().getEventsFile().setFile(file);
- }
-
- public void setEventsContentType(String contentType) {
- getModel().getEventsFile().setContentType(contentType);
- }
-
- public void setEventsFileName(String fileName) {
- getModel().getEventsFile().setFileName(fileName);
- }
-
- public void setTypeEchoSpecies(File file) {
- getModel().getTypeEchoSpeciesFile().setFile(file);
- }
-
- public void setTypeEchoSpeciesContentType(String contentType) {
- getModel().getTypeEchoSpeciesFile().setContentType(contentType);
- }
-
- public void setTypeEchoSpeciesFileName(String fileName) {
- getModel().getTypeEchoSpeciesFile().setFileName(fileName);
- }
-
- public String getMissionId() {
- return missionId;
- }
-
- public ImportDataMode getImportDataMode() {
- return getModel().getImportDataMode();
- }
-
- public ImportDataConfiguration getModel() {
- if (model == null) {
- model = new ImportDataConfiguration(getLocale());
- }
- return model;
- }
-
- public Map<String, String> getImportDataModes() {
- return importDataModes;
- }
-
- @Override
- public String input() throws Exception {
-
- // remove configuration from session
- getEchoBaseSession().setImportDataConfiguration(null);
-
- return INPUT;
- }
-
- @Override
- public String execute() throws Exception {
-
- ImportDataConfiguration importModel = getModel();
- File tempDirectory = FileUtils.getTempDirectory();
- File dataDirectory = new File(
- tempDirectory,
- "echobase-importData-" + System.currentTimeMillis());
- FileUtil.createDirectoryIfNecessary(dataDirectory);
- importModel.setWorkingDirectory(dataDirectory);
- if (log.isInfoEnabled()) {
- log.info("Temporary directory to use : " + dataDirectory);
- }
- copyFile(importModel.getAcousticFile(), dataDirectory);
- copyFile(importModel.getCaptureFile(), dataDirectory);
- copyFile(importModel.getEventsFile(), dataDirectory);
- copyFile(importModel.getLectureAgeGenFile(), dataDirectory);
- copyFile(importModel.getTypeEchoSpeciesFile(), dataDirectory);
-
- getEchoBaseSession().setImportDataConfiguration(importModel);
- return SUCCESS;
- }
-
- @Override
- public void prepare() throws Exception {
-
- EchoBaseServiceSupport service =
- newService(EchoBaseServiceSupport.class);
-
- Mission mission = service.getEntityById(Mission.class, missionId);
- ImportDataConfiguration configuration = getModel();
- configuration.setMission(mission);
-
- importDataModes = Maps.newLinkedHashMap();
- for (ImportDataMode mode : ImportDataMode.values()) {
- importDataModes.put(mode.name(), _(mode.getI18nKey()));
- }
-
- if (log.isInfoEnabled()) {
- log.info("Incoming importDataMode " +
- configuration.getImportDataMode());
- }
- if (configuration.getImportDataMode() == null) {
- configuration.setImportDataMode(ImportDataMode.ALL);
- }
- }
-
-}
Deleted: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureMission.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureMission.java 2012-01-10 16:44:31 UTC (rev 255)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureMission.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -1,125 +0,0 @@
-/*
- * #%L
- * EchoBase :: UI
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 Ifremer, Codelutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero 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 Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.echobase.ui.actions.importData;
-
-import com.google.common.collect.Maps;
-import com.opensymphony.xwork2.interceptor.annotations.InputConfig;
-import fr.ifremer.echobase.entities.references.Mission;
-import fr.ifremer.echobase.entities.references.MissionImpl;
-import fr.ifremer.echobase.services.EchoBaseServiceSupport;
-import fr.ifremer.echobase.services.ImportDataService;
-import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * Configure the mission to use in the data import.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class ConfigureMission extends EchoBaseActionSupport {
-
- private static final long serialVersionUID = 1L;
-
- /** Logger. */
- private static final Log log = LogFactory.getLog(ConfigureMission.class);
-
- /** Universe of existing missions. */
- protected Map<String, String> missions;
-
- /** Universe of possible import modes. */
- protected Map<String, String> importModes;
-
- /** Selected import mode. */
- protected SelectedMissionMode importMode;
-
- /** mission to use. */
- protected Mission mission;
-
- public Mission getMission() {
- if (mission == null) {
- mission = new MissionImpl();
- }
- return mission;
- }
-
- public Map<String, String> getImportModes() {
- return importModes;
- }
-
- public Map<String, String> getMissions() {
- return missions;
- }
-
- public SelectedMissionMode getImportMode() {
- return importMode;
- }
-
- public void setImportMode(SelectedMissionMode importMode) {
- this.importMode = importMode;
- }
-
- @Override
- public String input() throws Exception {
- importModes = Maps.newLinkedHashMap();
- for (SelectedMissionMode mode : SelectedMissionMode.values()) {
- importModes.put(mode.name(), _(mode.getI18nKey()));
- }
-
- if (importMode == null) {
- importMode = SelectedMissionMode.USE_EXISTING_MISSION;
- }
-
- EchoBaseServiceSupport service =
- newService(EchoBaseServiceSupport.class);
-
- List<Mission> allMissions = service.getEntities(Mission.class);
- missions = sortAndDecorate(allMissions, null);
-
- if (log.isInfoEnabled()) {
- log.info("File errors : " + getFieldErrors());
- }
- return INPUT;
- }
-
- @InputConfig(methodName = "input")
- @Override
- public String execute() throws Exception {
-
- if (importMode == SelectedMissionMode.CREATE_NEW_MISSION) {
-
- // create voyage in db
- ImportDataService service = newService(ImportDataService.class);
- Mission missionToCreate = getMission();
-
- mission = service.createMission(missionToCreate);
- }
- return SUCCESS;
- }
-
-}
Deleted: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/Import.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/Import.java 2012-01-10 16:44:31 UTC (rev 255)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/Import.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -1,93 +0,0 @@
-/*
- * #%L
- * EchoBase :: UI
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 Ifremer, Codelutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero 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 Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.echobase.ui.actions.importData;
-
-import com.opensymphony.xwork2.Preparable;
-import fr.ifremer.echobase.InputFile;
-import fr.ifremer.echobase.services.CsvImportResult;
-import fr.ifremer.echobase.services.configurations.ImportDataConfiguration;
-import fr.ifremer.echobase.services.ImportDataService;
-import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import java.util.Map;
-
-/**
- * To launch the import data process.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class Import extends EchoBaseActionSupport implements Preparable {
-
- private static final long serialVersionUID = 1L;
-
- /** Logger. */
- private static final Log log = LogFactory.getLog(Import.class);
-
- /** Import data configuration to push in session. */
- protected ImportDataConfiguration model;
-
- protected Map<InputFile, CsvImportResult> importResult;
-
- protected transient ImportDataService service;
-
- public ImportDataConfiguration getModel() {
- return model;
- }
-
- public Map<InputFile, CsvImportResult> getImportResult() {
- return importResult;
- }
-
- @Override
- public void prepare() throws Exception {
-
- model = getEchoBaseSession().getImportDataConfiguration();
-
- service = newService(ImportDataService.class);
- }
-
- @Override
- public String execute() throws Exception {
-
- try {
- if (log.isInfoEnabled()) {
- log.info("Start imports with mission " +
- model.getMission().getName());
- }
-
- importResult = service.startImport(model);
- return SUCCESS;
- } finally {
-
- // clean configuration
- model.destroy();
-
- // remove configuration from session
- getEchoBaseSession().setImportDataConfiguration(null);
- }
- }
-}
Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticDataImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticDataImport.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticDataImport.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,43 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.services.AccousticDataImportService;
+import fr.ifremer.echobase.services.configurations.AccousticDataImportConfiguration;
+
+/**
+ * Configure a accoustic data import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class LaunchAccousticDataImport extends AbstractLaunchImport<AccousticDataImportConfiguration, AccousticDataImportService> {
+
+ private static final long serialVersionUID = 1L;
+
+ public LaunchAccousticDataImport() {
+ super(AccousticDataImportConfiguration.class, AccousticDataImportService.class);
+ }
+
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticDataImport.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticRegionDataImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticRegionDataImport.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticRegionDataImport.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,43 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.services.AccousticRegionDataImportService;
+import fr.ifremer.echobase.services.configurations.AccousticRegionDataImportConfiguration;
+
+/**
+ * Configure a accoustic data import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class LaunchAccousticRegionDataImport extends AbstractLaunchImport<AccousticRegionDataImportConfiguration, AccousticRegionDataImportService> {
+
+ private static final long serialVersionUID = 1L;
+
+ public LaunchAccousticRegionDataImport() {
+ super(AccousticRegionDataImportConfiguration.class, AccousticRegionDataImportService.class);
+ }
+
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticRegionDataImport.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesDataImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesDataImport.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesDataImport.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,43 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.services.CatchesDataImportService;
+import fr.ifremer.echobase.services.configurations.CatchesDataImportConfiguration;
+
+/**
+ * Configure a accoustic data import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class LaunchCatchesDataImport extends AbstractLaunchImport<CatchesDataImportConfiguration, CatchesDataImportService> {
+
+ private static final long serialVersionUID = 1L;
+
+ public LaunchCatchesDataImport() {
+ super(CatchesDataImportConfiguration.class, CatchesDataImportService.class);
+ }
+
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesDataImport.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesIndividualDataImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesIndividualDataImport.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesIndividualDataImport.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,43 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.services.CatchesIndividualDataImportService;
+import fr.ifremer.echobase.services.configurations.CatchesIndividualDataImportConfiguration;
+
+/**
+ * Configure a accoustic data import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class LaunchCatchesIndividualDataImport extends AbstractLaunchImport<CatchesIndividualDataImportConfiguration, CatchesIndividualDataImportService> {
+
+ private static final long serialVersionUID = 1L;
+
+ public LaunchCatchesIndividualDataImport() {
+ super(CatchesIndividualDataImportConfiguration.class, CatchesIndividualDataImportService.class);
+ }
+
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesIndividualDataImport.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesReferenceImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesReferenceImport.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesReferenceImport.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,43 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.services.CatchesReferenceImportService;
+import fr.ifremer.echobase.services.configurations.CatchesReferenceImportConfiguration;
+
+/**
+ * Configure a accoustic data import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class LaunchCatchesReferenceImport extends AbstractLaunchImport<CatchesReferenceImportConfiguration, CatchesReferenceImportService> {
+
+ private static final long serialVersionUID = 1L;
+
+ public LaunchCatchesReferenceImport() {
+ super(CatchesReferenceImportConfiguration.class, CatchesReferenceImportService.class);
+ }
+
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesReferenceImport.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataCompleteImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataCompleteImport.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataCompleteImport.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,43 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.services.CommonDataCompleteImportService;
+import fr.ifremer.echobase.services.configurations.CommonDataCompleteImportConfiguration;
+
+/**
+ * Configure a accoustic data import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class LaunchCommonDataCompleteImport extends AbstractLaunchImport<CommonDataCompleteImportConfiguration, CommonDataCompleteImportService> {
+
+ private static final long serialVersionUID = 1L;
+
+ public LaunchCommonDataCompleteImport() {
+ super(CommonDataCompleteImportConfiguration.class, CommonDataCompleteImportService.class);
+ }
+
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataCompleteImport.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataFromTransectImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataFromTransectImport.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataFromTransectImport.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,43 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.services.CommonDataFromTransectImportService;
+import fr.ifremer.echobase.services.configurations.CommonDataFromTransectImportConfiguration;
+
+/**
+ * Configure a accoustic data import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class LaunchCommonDataFromTransectImport extends AbstractLaunchImport<CommonDataFromTransectImportConfiguration, CommonDataFromTransectImportService> {
+
+ private static final long serialVersionUID = 1L;
+
+ public LaunchCommonDataFromTransectImport() {
+ super(CommonDataFromTransectImportConfiguration.class, CommonDataFromTransectImportService.class);
+ }
+
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataFromTransectImport.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/SelectImportType.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/SelectImportType.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/SelectImportType.java 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,78 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import com.google.common.collect.Maps;
+import fr.ifremer.echobase.services.ImportDataMode;
+import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport;
+
+import java.util.Map;
+
+/**
+ * To select the type of import to configure.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class SelectImportType extends EchoBaseActionSupport {
+
+ private static final long serialVersionUID = 1L;
+
+ protected ImportDataMode mode;
+
+ /** Universe of possible import modes. */
+ protected Map<String, String> modes;
+
+ public Map<String, String> getModes() {
+
+ return modes;
+ }
+
+ public ImportDataMode getMode() {
+ return mode;
+ }
+
+ public void setMode(ImportDataMode mode) {
+ this.mode = mode;
+ }
+
+
+ @Override
+ public String input() throws Exception {
+ modes = Maps.newLinkedHashMap();
+ for (SelectedMissionMode mode : SelectedMissionMode.values()) {
+ modes.put(mode.name(), _(mode.getI18nKey()));
+ }
+
+ if (mode == null) {
+ mode = ImportDataMode.CommonDataComplete;
+ }
+ return INPUT;
+ }
+
+ @Override
+ public String execute() throws Exception {
+ return SUCCESS;
+ }
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/SelectImportType.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/echobase-ui/src/main/resources/config/struts-importData.xml
===================================================================
--- trunk/echobase-ui/src/main/resources/config/struts-importData.xml 2012-01-10 16:44:31 UTC (rev 255)
+++ trunk/echobase-ui/src/main/resources/config/struts-importData.xml 2012-01-11 13:08:20 UTC (rev 256)
@@ -32,38 +32,36 @@
<package name="importData" extends="loggued" namespace="/importData">
- <!-- Configure import mission -->
- <action name="configureMission"
- class="fr.ifremer.echobase.ui.actions.importData.ConfigureMission">
+ <!-- Select import type -->
+ <action name="selectImportType"
+ class="fr.ifremer.echobase.ui.actions.importData.SelectImportType">
<interceptor-ref name="paramsPrepareParamsStackLoggued"/>
- <result name="input">/WEB-INF/jsp/importData/configureMission.jsp</result>
+ <result name="input">/WEB-INF/jsp/importData/selectImportType.jsp</result>
<result type="redirectAction">
<param name="namespace">/importData</param>
- <param name="actionName">configureFiles</param>
+ <param name="actionName">configure-${mode}</param>
<param name="method">input</param>
- <param name="missionId">${mission.topiaId}</param>
</result>
</action>
- <!-- Configure import files -->
- <action name="configureFiles"
- class="fr.ifremer.echobase.ui.actions.importData.ConfigureFiles">
+ <!-- Configure import -->
+ <action name="configure-*"
+ class="fr.ifremer.echobase.ui.actions.importData.Configure{1}Import">
<interceptor-ref name="paramsPrepareParamsStackLoggued"/>
- <result name="input">/WEB-INF/jsp/importData/configureFiles.jsp</result>
+ <result name="input">/WEB-INF/jsp/importData/configure{1}.jsp</result>
<result type="redirectAction">
<param name="namespace">/importData</param>
- <param name="actionName">import</param>
+ <param name="actionName">import{1}</param>
</result>
</action>
<!-- Starts import -->
- <action name="import"
- class="fr.ifremer.echobase.ui.actions.importData.Import"
- method="execute">
+ <action name="import-*"
+ class="fr.ifremer.echobase.ui.actions.importData.Launch{1}Import">
<interceptor-ref name="basicStackLoggued"/>
<interceptor-ref name="execAndWait"/>
<result name="wait">/WEB-INF/jsp/importData/progress.jsp</result>
- <result>/WEB-INF/jsp/importData/result.jsp</result>
+ <result>/WEB-INF/jsp/importData/result{1}.jsp</result>
</action>
</package>
Modified: trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties
===================================================================
--- trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties 2012-01-10 16:44:31 UTC (rev 255)
+++ trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties 2012-01-11 13:08:20 UTC (rev 256)
@@ -105,6 +105,8 @@
echobase.legend.importData.configuration.files=Choix des fichiers d'import
echobase.legend.importData.configuration.mission=Configurer la mission
echobase.legend.importData.configuration.mission.resume=Résumé de la mission à utiliser
+echobase.legend.importData.configuration.resume=Résumé de la configuration d'import
+echobase.legend.importData.configuration.selectImportType=Type d'import
echobase.legend.importDb.configuration.files=Choix du fichier d'import de la base complête (fichier zip)
echobase.legend.importFileResult=Résultat de l'import %s
echobase.legend.sqlQuery.configuration=Configuration de la requête
@@ -142,6 +144,7 @@
echobase.title.exportTable=Exporter une table
echobase.title.importData=Import de données
echobase.title.importData.configuration=Configuration d'un import de données
+echobase.title.importData.selectImportType=Sélection du type d'import
echobase.title.importDataProgress=Import de données en cours
echobase.title.importDataResult=Résultats de l'import de données
echobase.title.importDb=Import de données historiques
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/includes/header.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/includes/header.jsp 2012-01-10 16:44:31 UTC (rev 255)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/includes/header.jsp 2012-01-11 13:08:20 UTC (rev 256)
@@ -65,7 +65,7 @@
</li>
</s:if>
<li>
- <s:a action="configureMission" namespace="/importData" method="input">
+ <s:a action="selectImportType" namespace="/importData" method="input">
<s:text name="echobase.menu.importData"/></s:a>
</li>
<li>
Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticData.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticData.jsp 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,67 @@
+<%--
+ #%L
+ EchoBase :: UI
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2011 Ifremer, Codelutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero 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 Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@page contentType="text/html" pageEncoding="UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<title><s:text name="echobase.title.configure.accousticData"/></title>
+
+<script type="text/javascript">
+
+ jQuery(document).ready(function () {
+
+ });
+</script>
+
+<s:form namespace="/importData" method="POST" enctype="multipart/form-data">
+
+ <fieldset>
+ <legend>
+ <s:text name="echobase.legend.importData.configure.accousticData"/>
+ </legend>
+
+ <s:select name="model.voyageId" value="''" required="true"
+ label='%{getText("echobase.common.voyage")}'
+ list="voyages" headerKey="" headerValue=""/>
+
+ <s:select name="model.vesselId" value="''" required="true"
+ label='%{getText("echobase.common.vessel")}'
+ list="vessels" headerKey="" headerValue=""/>
+
+ <s:textfield key="model.field1" size="40" required="true"
+ label='%{getText("echobase.common.name")}'/>
+
+ <s:textfield key="model.field2" size="40" required="true"
+ label='%{getText("echobase.common.name")}'/>
+
+ <s:file key="moviesFile" required="true"
+ label='%{getText("echobase.common.moviesFile")}'/>
+
+ </fieldset>
+ <br/>
+ <s:submit action="configure-AccousticData"
+ value='%{getText("echobase.action.import")}'/>
+
+
+</s:form>
+
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticData.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticRegionData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticRegionData.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticRegionData.jsp 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,70 @@
+<%--
+ #%L
+ EchoBase :: UI
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2011 Ifremer, Codelutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero 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 Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@page contentType="text/html" pageEncoding="UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<title><s:text name="echobase.title.configure.accousticRegionData"/></title>
+
+<script type="text/javascript">
+
+ jQuery(document).ready(function () {
+
+ });
+</script>
+
+<s:form namespace="/importData" method="POST" enctype="multipart/form-data">
+
+ <fieldset>
+ <legend>
+ <s:text name="echobase.legend.importData.configure.accousticRegionData"/>
+ </legend>
+
+ <s:select key="model.voyageId" value="''" required="true"
+ label='%{getText("echobase.common.voyage")}'
+ list="voyages" headerKey="" headerValue=""/>
+
+ <s:select key="model.vesselId" value="''" required="true"
+ label='%{getText("echobase.common.vessel")}'
+ list="vessels" headerKey="" headerValue=""/>
+
+ <s:textfield key="model.field1" size="40" required="true"
+ label='%{getText("echobase.common.name")}'/>
+
+ <s:textfield key="model.field2" size="40" required="true"
+ label='%{getText("echobase.common.name")}'/>
+
+ <s:file key="regionsFile" required="true"
+ label='%{getText("echobase.common.regionsFile")}'/>
+
+ <s:file key="associationFile" required="true"
+ label='%{getText("echobase.common.associationFile")}'/>
+
+ </fieldset>
+
+ <br/>
+ <s:submit action="configure-AccousticRegionData"
+ value='%{getText("echobase.action.import")}'/>
+
+
+</s:form>
\ No newline at end of file
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticRegionData.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesData.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesData.jsp 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,66 @@
+<%--
+ #%L
+ EchoBase :: UI
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2011 Ifremer, Codelutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero 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 Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@page contentType="text/html" pageEncoding="UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<title><s:text name="echobase.title.configure.catchesData"/></title>
+
+<script type="text/javascript">
+
+ jQuery(document).ready(function () {
+
+ });
+</script>
+
+<s:form namespace="/importData" method="POST" enctype="multipart/form-data">
+
+ <fieldset>
+ <legend>
+ <s:text name="echobase.legend.importData.configure.catchesData"/>
+ </legend>
+
+ <s:select key="model.voyageId" value="''" required="true"
+ label='%{getText("echobase.common.voyage")}'
+ list="voyages" headerKey="" headerValue=""/>
+
+ <s:file key="tlbeStationFile" required="true"
+ label='%{getText("echobase.common.tlbeStationFile")}'/>
+
+ <s:file key="xtblTriFile" required="true"
+ label='%{getText("echobase.common.xtblTriFile")}'/>
+
+ <s:file key="tblMensurationFile" required="true"
+ label='%{getText("echobase.common.tblMensurationFile")}'/>
+
+ <s:file key="tblMensurationClasseFile" required="true"
+ label='%{getText("echobase.common.tblMensurationClasseFile")}'/>
+
+ </fieldset>
+
+ <br/>
+ <s:submit action="configure-CatchesData"
+ value='%{getText("echobase.action.import")}'/>
+
+
+</s:form>
\ No newline at end of file
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesData.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesIndividualData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesIndividualData.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesIndividualData.jsp 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,59 @@
+<%--
+ #%L
+ EchoBase :: UI
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2011 Ifremer, Codelutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero 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 Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@page contentType="text/html" pageEncoding="UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<title><s:text name="echobase.title.configure.catchesIndividualData"/></title>
+
+<script type="text/javascript">
+
+ jQuery(document).ready(function () {
+
+ });
+</script>
+
+<s:form namespace="/importData" method="POST" enctype="multipart/form-data">
+
+ <fieldset>
+ <legend>
+ <s:text
+ name="echobase.legend.importData.configure.catchesIndividualData"/>
+ </legend>
+
+ <s:select key="model.voyageId" value="''" required="true"
+ label='%{getText("echobase.common.voyage")}'
+ list="voyages" headerKey="" headerValue=""/>
+
+
+ <s:file key="individualDataFile" required="true"
+ label='%{getText("echobase.common.individualDataFile")}'/>
+
+ </fieldset>
+
+ <br/>
+ <s:submit action="configure-CatchesIndividualData"
+ value='%{getText("echobase.action.import")}'/>
+
+
+</s:form>
\ No newline at end of file
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesIndividualData.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesReference.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesReference.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesReference.jsp 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,56 @@
+<%--
+ #%L
+ EchoBase :: UI
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2011 Ifremer, Codelutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero 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 Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@page contentType="text/html" pageEncoding="UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<title><s:text name="echobase.title.configure.catchesReference"/></title>
+
+<script type="text/javascript">
+
+ jQuery(document).ready(function () {
+
+ });
+</script>
+
+<s:form namespace="/importData" method="POST" enctype="multipart/form-data">
+
+ <fieldset>
+ <legend>
+ <s:text name="echobase.legend.importData.configure.catchesReference"/>
+ </legend>
+
+ <s:file key="lengthAgeKeyFile" required="true"
+ label='%{getText("echobase.common.lengthAgeKeyFile")}'/>
+
+ <s:file key="lengthWeightKeyFile" required="true"
+ label='%{getText("echobase.common.lengthWeightKeyFile")}'/>
+
+ </fieldset>
+
+ <br/>
+ <s:submit action="configure-CatchesReference"
+ value='%{getText("echobase.action.import")}'/>
+
+
+</s:form>
\ No newline at end of file
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesReference.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataComplete.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataComplete.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataComplete.jsp 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,70 @@
+<%--
+ #%L
+ EchoBase :: UI
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2011 Ifremer, Codelutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero 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 Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@page contentType="text/html" pageEncoding="UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<title><s:text name="echobase.title.configure.commonDataComplete"/></title>
+
+<script type="text/javascript">
+
+ jQuery(document).ready(function () {
+
+ });
+</script>
+
+<s:form namespace="/importData" method="POST" enctype="multipart/form-data">
+
+ <fieldset>
+ <legend>
+ <s:text name="echobase.legend.importData.configure.commonDataComplete"/>
+ </legend>
+
+ <s:select key="model.missionId" value="''" required="true"
+ label='%{getText("echobase.common.mission")}'
+ list="missions" headerKey="" headerValue=""/>
+
+ <s:select key="model.areaOfOperationId" value="''" required="true"
+ label='%{getText("echobase.common.areaOfOperation")}'
+ list="areaOfOperations" headerKey="" headerValue=""/>
+
+ <s:textfield key="model.voyageDescription" size="40" required="true"
+ label='%{getText("echobase.common.voyageDescription")}'/>
+
+ <s:textfield key="model.datum" size="40" required="true"
+ label='%{getText("echobase.common.datum")}'/>
+
+ <s:file key="casinoFile" required="true"
+ label='%{getText("echobase.common.casinoFile")}'/>
+
+ <s:file key="echotypeFile" required="true"
+ label='%{getText("echobase.common.echotypeFile")}'/>
+
+ </fieldset>
+
+ <br/>
+ <s:submit action="configure-CommonDataComplete"
+ value='%{getText("echobase.action.import")}'/>
+
+
+</s:form>
\ No newline at end of file
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataComplete.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataFromTransect.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataFromTransect.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataFromTransect.jsp 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,58 @@
+<%--
+ #%L
+ EchoBase :: UI
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2011 Ifremer, Codelutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero 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 Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@page contentType="text/html" pageEncoding="UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<title><s:text name="echobase.title.configure.commonDataFromTransect"/></title>
+
+<script type="text/javascript">
+
+ jQuery(document).ready(function () {
+
+ });
+</script>
+
+<s:form namespace="/importData" method="POST" enctype="multipart/form-data">
+
+ <fieldset>
+ <legend>
+ <s:text
+ name="echobase.legend.importData.configure.commonDataFromTransect"/>
+ </legend>
+
+ <s:select key="model.voyageId" value="''" required="true"
+ label='%{getText("echobase.common.voyage")}'
+ list="voyages" headerKey="" headerValue=""/>
+
+ <s:file key="casinoFile" required="true"
+ label='%{getText("echobase.common.casinoFile")}'/>
+
+ </fieldset>
+
+ <br/>
+ <s:submit action="configure-CommonDataFromTransect"
+ value='%{getText("echobase.action.import")}'/>
+
+
+</s:form>
\ No newline at end of file
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataFromTransect.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticData.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticData.jsp 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,39 @@
+<%--
+ #%L
+ EchoBase :: UI
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2011 Ifremer, Codelutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero 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 Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@page contentType="text/html" pageEncoding="UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<title><s:text name="echobase.title.importDataResult.accousticData"/></title>
+
+<fieldset>
+ <legend>
+ <s:text name="echobase.legend.importData.configuration.resume"/>
+ </legend>
+ <s:label value="%{model.mission.missionName}"
+ key='echobase.common.missionName'/>
+
+</fieldset>
+<br/>
+
+<div>TODO Result</div>
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticData.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticRegionData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticRegionData.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticRegionData.jsp 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,39 @@
+<%--
+ #%L
+ EchoBase :: UI
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2011 Ifremer, Codelutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero 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 Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@page contentType="text/html" pageEncoding="UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<title><s:text name="echobase.title.importDataResult.accousticRegionData"/></title>
+
+<fieldset>
+ <legend>
+ <s:text name="echobase.legend.importData.configuration.resume"/>
+ </legend>
+ <s:label value="%{model.mission.missionName}"
+ key='echobase.common.missionName'/>
+
+</fieldset>
+<br/>
+
+<div>TODO Result</div>
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticRegionData.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesData.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesData.jsp 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,39 @@
+<%--
+ #%L
+ EchoBase :: UI
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2011 Ifremer, Codelutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero 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 Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@page contentType="text/html" pageEncoding="UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<title><s:text name="echobase.title.importDataResult.catchesData"/></title>
+
+<fieldset>
+ <legend>
+ <s:text name="echobase.legend.importData.configuration.resume"/>
+ </legend>
+ <s:label value="%{model.mission.missionName}"
+ key='echobase.common.missionName'/>
+
+</fieldset>
+<br/>
+
+<div>TODO Result</div>
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesData.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesIndividualData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesIndividualData.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesIndividualData.jsp 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,39 @@
+<%--
+ #%L
+ EchoBase :: UI
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2011 Ifremer, Codelutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero 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 Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@page contentType="text/html" pageEncoding="UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<title><s:text name="echobase.title.importDataResult.catchesIndividualData"/></title>
+
+<fieldset>
+ <legend>
+ <s:text name="echobase.legend.importData.configuration.resume"/>
+ </legend>
+ <s:label value="%{model.mission.missionName}"
+ key='echobase.common.missionName'/>
+
+</fieldset>
+<br/>
+
+<div>TODO Result</div>
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesIndividualData.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesReference.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesReference.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesReference.jsp 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,39 @@
+<%--
+ #%L
+ EchoBase :: UI
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2011 Ifremer, Codelutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero 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 Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@page contentType="text/html" pageEncoding="UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<title><s:text name="echobase.title.importDataResult.catchesReference"/></title>
+
+<fieldset>
+ <legend>
+ <s:text name="echobase.legend.importData.configuration.resume"/>
+ </legend>
+ <s:label value="%{model.mission.missionName}"
+ key='echobase.common.missionName'/>
+
+</fieldset>
+<br/>
+
+<div>TODO Result</div>
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesReference.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataComplete.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataComplete.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataComplete.jsp 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,39 @@
+<%--
+ #%L
+ EchoBase :: UI
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2011 Ifremer, Codelutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero 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 Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@page contentType="text/html" pageEncoding="UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<title><s:text name="echobase.title.importDataResult.commonDataComplete"/></title>
+
+<fieldset>
+ <legend>
+ <s:text name="echobase.legend.importData.configuration.resume"/>
+ </legend>
+ <s:label value="%{model.mission.missionName}"
+ key='echobase.common.missionName'/>
+
+</fieldset>
+<br/>
+
+<div>TODO Result</div>
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataComplete.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataFromTransect.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataFromTransect.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataFromTransect.jsp 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,39 @@
+<%--
+ #%L
+ EchoBase :: UI
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2011 Ifremer, Codelutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero 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 Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@page contentType="text/html" pageEncoding="UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<title><s:text name="echobase.title.importDataResult.commonDataFromTransect"/></title>
+
+<fieldset>
+ <legend>
+ <s:text name="echobase.legend.importData.configuration.resume"/>
+ </legend>
+ <s:label value="%{model.mission.missionName}"
+ key='echobase.common.missionName'/>
+
+</fieldset>
+<br/>
+
+<div>TODO Result</div>
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataFromTransect.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/selectImportType.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/selectImportType.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/selectImportType.jsp 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,110 @@
+<%--
+ #%L
+ EchoBase :: UI
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2011 Ifremer, Codelutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero 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 Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@page contentType="text/html" pageEncoding="UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<title><s:text name="echobase.title.importData.selectImportType"/></title>
+
+<script type="text/javascript">
+
+ function updateMode(newValue) {
+ switch (newValue) {
+ case "ALL":
+ $('[class="inputFile"]').show();
+ break;
+ case "ACOUSTIC":
+ $('[class="inputFile"]').hide();
+ $('#acousticFile').show();
+ break;
+ }
+ }
+
+ jQuery(document).ready(function () {
+
+
+ $('[name="importDataMode"]').change(function(event) {
+ updateMode(this.value);
+ });
+ var val = $('[name="importDataMode"][checked="checked"]').val();
+ updateMode(val);
+ });
+</script>
+
+<s:form namespace="/importData" method="POST" enctype="multipart/form-data">
+
+ <fieldset>
+ <legend>
+ <s:text name="echobase.legend.importData.configuration.selectImportType"/>
+ </legend>
+ <s:radio key='mode' list="modes"
+ label='%{getText("echobase.common.importDataMode")}'
+ required="true"/>
+
+ <s:label value="%{model.mission.name}"
+ key='echobase.common.name'/>
+
+ <s:label value="%{model.mission.missionAbstract}"
+ key='echobase.common.missionAbstract'/>
+ </fieldset>
+
+ <hr/>
+ <fieldset>
+ <legend>
+ <s:text name="echobase.legend.importData.configuration.files"/>
+ </legend>
+
+ <s:hidden key="missionId" label=''/>
+
+ <s:radio key='importDataMode' list="importDataModes"
+ label='%{getText("echobase.common.importDataMode")}'
+ required="true"/>
+ <hr/>
+ <div class="inputFile" id="acousticFile">
+ <s:file id="acoustic" name="acoustic" required="true"
+ key="echobase.label.import.accoustique"/>
+ </div>
+ <div class="inputFile" id="captureFile">
+ <s:file name="capture" required="true"
+ key="echobase.label.import.pecherie"/>
+ </div>
+ <div class="inputFile" id="lectureAgeGenFile">
+ <s:file name="lectureAgeGen" required="true"
+ key="echobase.label.import.lectureAgeGen"/>
+ </div>
+ <div class="inputFile" id="eventsFile">
+ <s:file name="events" required="true"
+ key="echobase.label.import.events"/>
+ </div>
+ <div class="inputFile" id="typeEchoSpeciesFile">
+ <s:file name="typeEchoSpecies" required="true"
+ key="echobase.label.import.typeEchoSpecies"/>
+
+ </div>
+ </fieldset>
+ <br/>
+ <s:submit action="configureFiles"
+ value='%{getText("echobase.action.import")}'/>
+
+
+</s:form>
\ No newline at end of file
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/selectImportType.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/src/doc/reunions/reunion-2012-01-11.txt
===================================================================
--- trunk/src/doc/reunions/reunion-2012-01-11.txt (rev 0)
+++ trunk/src/doc/reunions/reunion-2012-01-11.txt 2012-01-11 13:08:20 UTC (rev 256)
@@ -0,0 +1,29 @@
+projet echobase
+---------------
+
+Jeudi 12 janvier 2012 (Nemo)
+
+Présents : Aurelie et Tony
+
+Planning
+--------
+
+- definir une charte graphique
+
+Charte graphique EchoBase
+-------------------------
+
+Action
+------
+
+- CodeLutin
+
+ -
+
+- Aurelie
+
+ -
+
+Prochaine réunion :
+
+ - ?
\ No newline at end of file
Property changes on: trunk/src/doc/reunions/reunion-2012-01-11.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
1
0
r255 - in trunk: echobase-entities/src/main/java/fr/ifremer/echobase/entities echobase-entities/src/main/java/fr/ifremer/echobase/entities/references echobase-entities/src/main/xmi echobase-services/src/main/java/fr/ifremer/echobase/services/csv echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders
by tchemit@users.forge.codelutin.com 10 Jan '12
by tchemit@users.forge.codelutin.com 10 Jan '12
10 Jan '12
Author: tchemit
Date: 2012-01-10 17:44:31 +0100 (Tue, 10 Jan 2012)
New Revision: 255
Url: http://forge.codelutin.com/repositories/revision/echobase/255
Log:
Anomalie #681: Mauvaise mod?\195?\169lisation de la liaison Echotype -> Species
Added:
trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/references/
trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/references/EchotypeDAOImpl.java
Modified:
trunk/echobase-entities/src/main/xmi/echobase.zargo
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/CsvModelUtil.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EntityCsvModel.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/EchotypeLoader.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/EntityLoader.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/VoyageLoader.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AbstractLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/EchotypeLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VoyageLoaderIT.java
Added: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/references/EchotypeDAOImpl.java
===================================================================
--- trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/references/EchotypeDAOImpl.java (rev 0)
+++ trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/references/EchotypeDAOImpl.java 2012-01-10 16:44:31 UTC (rev 255)
@@ -0,0 +1,50 @@
+/*
+ * #%L
+ * EchoBase :: Entities
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.entities.references;
+
+import org.nuiton.topia.TopiaException;
+
+import java.util.List;
+
+/**
+ * User {@link EchotypeDAO} implementation.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class EchotypeDAOImpl<E extends Echotype> extends EchotypeDAOAbstract<E> {
+
+ @Override
+ public Echotype findByIdAndSpecies(Integer id, Species species) throws TopiaException {
+ List<E> allById = findAllById(id);
+ Echotype result = null;
+ for (E echotype : allById) {
+ if (echotype.getSpecies().contains(species)) {
+ result = echotype;
+ break;
+ }
+ }
+ return result;
+ }
+}
Property changes on: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/references/EchotypeDAOImpl.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/echobase-entities/src/main/xmi/echobase.zargo
===================================================================
(Binary files differ)
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/CsvModelUtil.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/CsvModelUtil.java 2012-01-10 16:37:09 UTC (rev 254)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/CsvModelUtil.java 2012-01-10 16:44:31 UTC (rev 255)
@@ -40,6 +40,7 @@
import java.sql.Timestamp;
import java.text.ParseException;
+import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
import java.util.Locale;
@@ -85,6 +86,11 @@
return new ForeignKeyValue<E>(type, universe);
}
+ public static <E extends TopiaEntity> ForeignKeyValueForAssociation<E> newForeignKeyValueAssociation(Class<E> type, Collection<E> entitites, Function<E, String> transform) {
+ Map<String, E> universe = Maps.uniqueIndex(entitites, transform);
+ return new ForeignKeyValueForAssociation<E>(type, universe);
+ }
+
public static <E extends TopiaEntity> ForeignKeyDecoratedValue<E> newForeignKeyDecoratedValue(Class<E> entityType,
DecoratorService decoratorService, Locale locale) {
return new ForeignKeyDecoratedValue<E>(entityType, decoratorService, locale);
@@ -246,6 +252,37 @@
}
}
+ public static class ForeignKeyValueForAssociation<E extends TopiaEntity> implements ValueParser<Collection<E>> {
+
+ protected final Class<E> entityType;
+
+ protected final Map<String, E> universe;
+
+ public ForeignKeyValueForAssociation(Class<E> entityType,
+ Map<String, E> universe) {
+ this.entityType = entityType;
+ this.universe = universe;
+ }
+
+ @Override
+ public Collection<E> parse(String value) throws ParseException {
+ E result = null;
+ if (StringUtils.isNotBlank(value)) {
+
+ // get entity from universe
+ result = universe.get(value);
+
+ if (result == null) {
+
+ // can not find entity this is a big problem for us...
+ throw new EchoBaseTechnicalException(
+ "Could not find entity with name " + value);
+ }
+ }
+ return Arrays.asList(result);
+ }
+ }
+
public static class ForeignKeyDecoratedValue<E extends TopiaEntity> implements ValueFormatter<E> {
protected final Class<E> entityType;
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EntityCsvModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EntityCsvModel.java 2012-01-10 16:37:09 UTC (rev 254)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EntityCsvModel.java 2012-01-10 16:44:31 UTC (rev 255)
@@ -118,6 +118,19 @@
);
}
+ public <E extends TopiaEntity> void addForeignKeyForAssociationForImport(String headerName,
+ String propertyName,
+ Class<E> entityType,
+ Collection<E> universe,
+ Function<E, String> transform) {
+
+ modelBuilder.newMandatoryColumn(
+ headerName,
+ propertyName,
+ CsvModelUtil.newForeignKeyValueAssociation(entityType, universe, transform)
+ );
+ }
+
public <E extends TopiaEntity> void addForeignKeyForImport(String propertyName,
Class<E> entityType,
Collection<E> universe) {
Modified: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/EchotypeLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/EchotypeLoader.java 2012-01-10 16:37:09 UTC (rev 254)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/EchotypeLoader.java 2012-01-10 16:44:31 UTC (rev 255)
@@ -23,16 +23,26 @@
*/
package fr.ifremer.echobase.tools.loaders;
+import com.google.common.collect.Maps;
import fr.ifremer.echobase.EchoBaseFunctions;
+import fr.ifremer.echobase.entities.EchoBaseEntityEnum;
+import fr.ifremer.echobase.entities.meta.AssociationMeta;
import fr.ifremer.echobase.entities.meta.TableMeta;
import fr.ifremer.echobase.entities.references.DepthStratum;
import fr.ifremer.echobase.entities.references.Echotype;
import fr.ifremer.echobase.entities.references.EchotypeCategory;
import fr.ifremer.echobase.entities.references.Species;
+import fr.ifremer.echobase.services.DbEditorService;
import fr.ifremer.echobase.services.csv.EntityCsvModel;
import fr.ifremer.echobase.tools.FileType;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.nuiton.util.csv.Import;
+import java.io.File;
+import java.io.IOException;
import java.util.List;
+import java.util.Map;
/**
* {@link Echotype} loader.
@@ -42,11 +52,28 @@
*/
public class EchotypeLoader extends EntityLoader<Echotype> {
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(EchotypeLoader.class);
+
public EchotypeLoader() {
- super(Echotype.class, FileType.NEW);
+ super(Echotype.class,
+ new EchoBaseEntityEnum[]{EchoBaseEntityEnum.Species},
+ FileType.NEW);
}
@Override
+ protected void exportAssociations(File outputDir,
+ FileType targetType) throws IOException {
+ super.exportAssociations(outputDir, targetType);
+
+ // also export echotype associations (echotype are references)
+ AssociationMeta associationMeta =
+ getMeta().getAssociations(Echotype.PROPERTY_SPECIES);
+
+ exportAssociation(outputDir, targetType, associationMeta);
+ }
+
+ @Override
protected EntityCsvModel<Echotype> createCsvImportModel(TableMeta meta) {
List<Species> species = getEntities(Species.class);
@@ -62,11 +89,48 @@
"ECHOS";"IMAGES";"LIBELLE_DESCRIPTION_DEVIATION";"ID_DESCRIPTION_DEVIATION";"GENRE_ESP;TYPE_DEVIATION"
*/
model.addDefaultColumn("ID_DESCRIPTION_DEVIATION", Echotype.PROPERTY_ID, int.class);
- model.newMandatoryColumn("ECHOS",Echotype.PROPERTY_NAME);
+ model.newMandatoryColumn("ECHOS", Echotype.PROPERTY_NAME);
model.newMandatoryColumn("LIBELLE_DESCRIPTION_DEVIATION", Echotype.PROPERTY_MEANING);
- model.addForeignKeyForImport("GENRE_ESP", Echotype.PROPERTY_SPECIES, Species.class, species, EchoBaseFunctions.SPECIES_BARACOUDA_CODE);
model.addForeignKeyForImport("IMAGES", Echotype.PROPERTY_DEPTH_STRATUM, DepthStratum.class, depthStratums, EchoBaseFunctions.DEPTH_STRATUM_ID);
model.addForeignKeyForImport("TYPE_DEVIATION", Echotype.PROPERTY_ECHOTYPE_CATEGORY, EchotypeCategory.class, echotypeCategorys, EchoBaseFunctions.ECHO_TYPE_CATEGORY_NAME);
+ model.addForeignKeyForAssociationForImport("GENRE_ESP", Echotype.PROPERTY_SPECIES, Species.class, species, EchoBaseFunctions.SPECIES_BARACOUDA_CODE);
return model;
}
+
+ @Override
+ protected void importNewEntities(DbEditorService dbEditorService,
+ TableMeta meta,
+ Import<Echotype> importer) {
+
+ Map<String, String> keystoTopiaId = Maps.newHashMap();
+
+ for (Echotype entity : importer) {
+
+ // key for this echotype : id + depthStratum
+ String key = entity.getId() + "_" + entity.getDepthStratum().getId();
+
+ String topiaId = keystoTopiaId.get(key);
+
+ if (topiaId == null) {
+
+ // create this new echotype
+ dbEditorService.saveEntity(meta,
+ "",
+ entity,
+ null,
+ false
+ );
+
+ topiaId = entity.getTopiaId();
+ keystoTopiaId.put(key, topiaId);
+ }
+
+ // just push the species of this echotype
+ // the saveEntity can not save it
+ Species species = entity.getSpecies().iterator().next();
+
+ Echotype echotype = getEntityById(Echotype.class, topiaId);
+ echotype.addSpecies(species);
+ }
+ }
}
Modified: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/EntityLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/EntityLoader.java 2012-01-10 16:37:09 UTC (rev 254)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/EntityLoader.java 2012-01-10 16:44:31 UTC (rev 255)
@@ -216,15 +216,7 @@
DbEditorService dbEditorService =
getService(DbEditorService.class);
- for (E entity : importer) {
-
- dbEditorService.saveEntity(meta,
- "",
- entity,
- null,
- false
- );
- }
+ importNewEntities(dbEditorService, meta, importer);
} finally {
importer.close();
@@ -238,9 +230,12 @@
bf.close();
}
- File out = getTableFile(outputDir, meta, FileType.NEW);
+// File out = getTableFile(outputDir, meta, FileType.NEW);
+// getExportService().exportDatas(meta, out);
- getExportService().exportDatas(meta, out);
+ exportDatas(outputDir, FileType.NEW);
+
+ exportAssociations(outputDir, FileType.ASSOCIATION);
} finally {
if (cleanTransaction) {
serviceContext.getTransaction().rollbackTransaction();
@@ -248,6 +243,18 @@
}
}
+ protected void importNewEntities(DbEditorService dbEditorService, TableMeta meta, Import<E> importer) {
+ for (E entity : importer) {
+
+ dbEditorService.saveEntity(meta,
+ "",
+ entity,
+ null,
+ false
+ );
+ }
+ }
+
public final void generateBaracoudaEntities(Database db,
File outputDir,
boolean cleanTransaction) throws IOException, TopiaException, ParseException {
Modified: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/VoyageLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/VoyageLoader.java 2012-01-10 16:37:09 UTC (rev 254)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/VoyageLoader.java 2012-01-10 16:44:31 UTC (rev 255)
@@ -35,6 +35,7 @@
import fr.ifremer.echobase.entities.meta.TableMeta;
import fr.ifremer.echobase.entities.references.AreaOfOperation;
import fr.ifremer.echobase.entities.references.Echotype;
+import fr.ifremer.echobase.entities.references.EchotypeDAO;
import fr.ifremer.echobase.entities.references.Mission;
import fr.ifremer.echobase.entities.references.Species;
import fr.ifremer.echobase.services.csv.CsvModelUtil;
@@ -161,7 +162,7 @@
meta.getAssociations(Voyage.PROPERTY_ECHOTYPE);
try {
- TopiaDAO<Echotype> echotypeDAO = getDAO(Echotype.class);
+ EchotypeDAO echotypeDAO = (EchotypeDAO) getDAO(Echotype.class);
BufferedReader bf = new BufferedReader(new FileReader(csvfile));
try {
@@ -174,11 +175,11 @@
String specieEchotype = (String) entity.get("GENRE_ESP");
Voyage voayge = getFK(voyages, campagneName);
Species species = getFK(speciess, specieEchotype);
- Echotype echotype = echotypeDAO.findByProperties(
- Echotype.PROPERTY_ID, Integer.valueOf(idEchotype),
- Echotype.PROPERTY_SPECIES, species
+ Echotype echotype = echotypeDAO.findByIdAndSpecies(
+ Integer.valueOf(idEchotype),
+ species
);
- Preconditions.checkNotNull(echotype, String.format("Could not find echotype with (id,species) = (%S,%s)", idEchotype, specieEchotype));
+ Preconditions.checkNotNull(echotype, String.format("Could not find echotype with (id,species) = (%s,%s)", idEchotype, specieEchotype));
voayge.addEchotype(echotype);
}
} finally {
Modified: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AbstractLoaderIT.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AbstractLoaderIT.java 2012-01-10 16:37:09 UTC (rev 254)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AbstractLoaderIT.java 2012-01-10 16:44:31 UTC (rev 255)
@@ -205,7 +205,7 @@
loadDependencies(meta, dones);
}
- private void loadDependencies(MetaFilenameAware meta,
+ protected void loadDependencies(MetaFilenameAware meta,
Set<MetaFilenameAware> dones) throws IOException, TopiaException {
Modified: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/EchotypeLoaderIT.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/EchotypeLoaderIT.java 2012-01-10 16:37:09 UTC (rev 254)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/EchotypeLoaderIT.java 2012-01-10 16:44:31 UTC (rev 255)
@@ -35,7 +35,7 @@
public class EchotypeLoaderIT extends AbstractLoaderIT<Echotype, EchotypeLoader> {
public EchotypeLoaderIT() {
- super(EchotypeLoader.class, 183, 0);
+ super(EchotypeLoader.class, 43, 0);
}
@Test
Modified: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VoyageLoaderIT.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VoyageLoaderIT.java 2012-01-10 16:37:09 UTC (rev 254)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VoyageLoaderIT.java 2012-01-10 16:44:31 UTC (rev 255)
@@ -27,6 +27,8 @@
import fr.ifremer.echobase.entities.data.Voyage;
import fr.ifremer.echobase.entities.meta.AssociationMeta;
import fr.ifremer.echobase.entities.meta.MetaFilenameAware;
+import fr.ifremer.echobase.entities.meta.TableMeta;
+import fr.ifremer.echobase.entities.references.Echotype;
import fr.ifremer.echobase.tools.FileType;
import org.junit.Assert;
import org.junit.Test;
@@ -66,6 +68,11 @@
loadDependencies(EchoBaseEntityEnum.Voyage, dones);
+ TableMeta table = serviceContext.getDbMeta().getTable(EchoBaseEntityEnum.Echotype);
+ AssociationMeta echotypeAssociation =
+ table.getAssociations(Echotype.PROPERTY_SPECIES);
+ loadDependencies(echotypeAssociation, dones);
+
AssociationMeta associationMeta =
loader.getMeta().getAssociations(Voyage.PROPERTY_ECHOTYPE);
1
0
r254 - trunk/echobase-services/src/main/java/fr/ifremer/echobase/services
by tchemit@users.forge.codelutin.com 10 Jan '12
by tchemit@users.forge.codelutin.com 10 Jan '12
10 Jan '12
Author: tchemit
Date: 2012-01-10 17:37:09 +0100 (Tue, 10 Jan 2012)
New Revision: 254
Url: http://forge.codelutin.com/repositories/revision/echobase/254
Log:
can retrieve the topiaId when creating an entity
Modified:
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbEditorService.java
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbEditorService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbEditorService.java 2012-01-10 14:25:03 UTC (rev 253)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbEditorService.java 2012-01-10 16:37:09 UTC (rev 254)
@@ -242,6 +242,8 @@
if (create) {
entityToSave = dao.create();
+ // push back topiaId (could be used by caller)
+ entity.setTopiaId(entityToSave.getTopiaId());
} else {
1
0