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
February 2012
- 1 participants
- 27 discussions
Author: tchemit
Date: 2012-02-09 13:14:03 +0100 (Thu, 09 Feb 2012)
New Revision: 310
Url: http://forge.codelutin.com/repositories/revision/echobase/310
Log:
fix repositories
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-02-09 11:59:29 UTC (rev 309)
+++ trunk/pom.xml 2012-02-09 12:14:03 UTC (rev 310)
@@ -95,6 +95,21 @@
</site>
</distributionManagement>
+ <repositories>
+ <repository>
+ <id>nexus</id>
+ <layout>default</layout>
+ <name>echobase-group</name>
+ <url>http://nexus.nuiton.org/nexus/content/groups/echobase-group/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
<!-- ************************************************************* -->
<!-- *** Build Settings ****************************************** -->
<!-- ************************************************************* -->
1
0
r309 - in trunk: . echobase-entities/src/main/resources/i18n echobase-services/src/main/resources/i18n echobase-ui/src/main/resources/i18n
by tchemit@users.forge.codelutin.com 09 Feb '12
by tchemit@users.forge.codelutin.com 09 Feb '12
09 Feb '12
Author: tchemit
Date: 2012-02-09 12:59:29 +0100 (Thu, 09 Feb 2012)
New Revision: 309
Url: http://forge.codelutin.com/repositories/revision/echobase/309
Log:
use i18n in gp too
updates to hibernate 3.6.10
swithc to helper-m-p invocation
Added:
trunk/echobase-entities/src/main/resources/i18n/echobase-entities_en_GB.properties
trunk/echobase-services/src/main/resources/i18n/echobase-services_en_GB.properties
trunk/echobase-ui/src/main/resources/i18n/echobase-ui_en_GB.properties
Modified:
trunk/pom.xml
Added: trunk/echobase-entities/src/main/resources/i18n/echobase-entities_en_GB.properties
===================================================================
--- trunk/echobase-entities/src/main/resources/i18n/echobase-entities_en_GB.properties (rev 0)
+++ trunk/echobase-entities/src/main/resources/i18n/echobase-entities_en_GB.properties 2012-02-09 11:59:29 UTC (rev 309)
@@ -0,0 +1,274 @@
+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=
+echobase.common.addOffset=
+echobase.common.admin=
+echobase.common.age=
+echobase.common.ageCategory=
+echobase.common.altCallsign=
+echobase.common.aquisitionMethod=
+echobase.common.areaOfOperation=
+echobase.common.author=
+echobase.common.authorEmail=
+echobase.common.authorReference=
+echobase.common.averageDepth=
+echobase.common.averageFishLength=
+echobase.common.axis=
+echobase.common.b=
+echobase.common.baracoudaCode=
+echobase.common.binSizePingAxis=
+echobase.common.binSizeRangeAxis=
+echobase.common.binUnitsPingAxis=
+echobase.common.calendar=
+echobase.common.calibration=
+echobase.common.callsign=
+echobase.common.casinoGearName=
+echobase.common.category=
+echobase.common.categoryMeaning=
+echobase.common.categoryRef=
+echobase.common.categoryType=
+echobase.common.categoryValue=
+echobase.common.cell=
+echobase.common.cellMethod=
+echobase.common.cellType=
+echobase.common.childs=
+echobase.common.citation=
+echobase.common.classCode=
+echobase.common.code=
+echobase.common.codeMemo=
+echobase.common.codePerm=
+echobase.common.comment=
+echobase.common.data=
+echobase.common.dataAcquisition=
+echobase.common.dataCentre=
+echobase.common.dataCentreEmail=
+echobase.common.dataLabel=
+echobase.common.dataMetadata=
+echobase.common.dataProcessing=
+echobase.common.dataProtocol=
+echobase.common.dataQuality=
+echobase.common.dataType=
+echobase.common.dataValue=
+echobase.common.date=
+echobase.common.dateCreated=
+echobase.common.datum=
+echobase.common.datumType=
+echobase.common.depthStratum=
+echobase.common.description=
+echobase.common.dielPeriod=
+echobase.common.digitThreshold=
+echobase.common.distributionStatement=
+echobase.common.echoBaseUser=
+echobase.common.echosounderSoundSpeed=
+echobase.common.echotype=
+echobase.common.echotypeCategory=
+echobase.common.eiThreshold=
+echobase.common.email=
+echobase.common.endDate=
+echobase.common.endLocality=
+echobase.common.endPort=
+echobase.common.endTime=
+echobase.common.enginePower=
+echobase.common.entityId=
+echobase.common.entityModificationLog=
+echobase.common.entityType=
+echobase.common.exportQuery=
+echobase.common.fillValue=
+echobase.common.fishingGear=
+echobase.common.flagMeanings=
+echobase.common.frequency=
+echobase.common.gear=
+echobase.common.gearCharacteristic=
+echobase.common.gearCharacteristicValue=
+echobase.common.gearClassification=
+echobase.common.gearCode=
+echobase.common.gearMetadata=
+echobase.common.gearMetadataValue=
+echobase.common.gearShootingEndLatitude=
+echobase.common.gearShootingEndLongitude=
+echobase.common.gearShootingEndTime=
+echobase.common.gearShootingStartLatitude=
+echobase.common.gearShootingStartLongitude=
+echobase.common.gearShootingStartTime=
+echobase.common.genusSpecies=
+echobase.common.geospatialLatMax=
+echobase.common.geospatialLatMin=
+echobase.common.geospatialLonMax=
+echobase.common.geospatialLonMin=
+echobase.common.geospatialVerticalMax=
+echobase.common.geospatialVerticalMin=
+echobase.common.geospatialVerticalPositive=
+echobase.common.history=
+echobase.common.id=
+echobase.common.imo=
+echobase.common.impacte=
+echobase.common.institution=
+echobase.common.invalidSince=
+echobase.common.keywords=
+echobase.common.label=
+echobase.common.lastModifiedDate=
+echobase.common.lastModifiedUser=
+echobase.common.length=
+echobase.common.lengthAgeKey=
+echobase.common.lengthWeightKey=
+echobase.common.level=
+echobase.common.licence=
+echobase.common.linestring=
+echobase.common.litteratureReference=
+echobase.common.litteratureReferences=
+echobase.common.location=
+echobase.common.loggedDataDatatype=
+echobase.common.loggedDataFormat=
+echobase.common.longName=
+echobase.common.maxDepth=
+echobase.common.maxFishLength=
+echobase.common.maxLatitude=
+echobase.common.maxLongitude=
+echobase.common.meaning=
+echobase.common.meaningEn=
+echobase.common.meaningFr=
+echobase.common.measureType=
+echobase.common.measurementBinSize=
+echobase.common.measurementMetadata=
+echobase.common.measurementUnit=
+echobase.common.metadata=
+echobase.common.metadataGroup=
+echobase.common.method=
+echobase.common.midHaulLatitude=
+echobase.common.midHaulLongitude=
+echobase.common.midHauleLatitude=
+echobase.common.minDepth=
+echobase.common.minFishLength=
+echobase.common.minLatitude=
+echobase.common.minLongitude=
+echobase.common.mission=
+echobase.common.missionAbstract=
+echobase.common.modificationDate=
+echobase.common.modificationText=
+echobase.common.modificationUser=
+echobase.common.name=
+echobase.common.noiseDesign=
+echobase.common.notes=
+echobase.common.numberSampled=
+echobase.common.ok=
+echobase.common.operation=
+echobase.common.operationEvent=
+echobase.common.operationMetadata=
+echobase.common.operationMetadataValue=
+echobase.common.operator=
+echobase.common.organisationLevelAcknowledgements=
+echobase.common.organisationReferences=
+echobase.common.parentGear=
+echobase.common.password=
+echobase.common.percentAtAge=
+echobase.common.pingDutyCycle=
+echobase.common.platform=
+echobase.common.positive=
+echobase.common.precision=
+echobase.common.principalInvestigator=
+echobase.common.principalInvestigatorEmail=
+echobase.common.processingDescription=
+echobase.common.processingMethod=
+echobase.common.processingSoftwareVersion=
+echobase.common.processingTemplate=
+echobase.common.project=
+echobase.common.published=
+echobase.common.qualityDataFlagValues=
+echobase.common.r2=
+echobase.common.raptriBiometryDataType=
+echobase.common.referenceDatum=
+echobase.common.referenceDatumType=
+echobase.common.referencingMethod=
+echobase.common.regionCell=
+echobase.common.relatedActivity=
+echobase.common.report=
+echobase.common.result=
+echobase.common.resultvalue=
+echobase.common.sample=
+echobase.common.sampleData=
+echobase.common.sampleDataType=
+echobase.common.sampleType=
+echobase.common.sampleWeight=
+echobase.common.scaleFactor=
+echobase.common.seafloorSubstrate=
+echobase.common.sexCategory=
+echobase.common.sizeCategory=
+echobase.common.soundSpeedCalculations=
+echobase.common.sounderConstant=
+echobase.common.source=
+echobase.common.species=
+echobase.common.speciesCategory=
+echobase.common.speciesCode=
+echobase.common.speciesCommonName=
+echobase.common.speciesTSGroup=
+echobase.common.sqlQuery=
+echobase.common.standardName=
+echobase.common.startDate=
+echobase.common.startLocality=
+echobase.common.startPort=
+echobase.common.startTime=
+echobase.common.status=
+echobase.common.strata=
+echobase.common.stratum=
+echobase.common.swimbladder=
+echobase.common.swimbladderType=
+echobase.common.taxonCode=
+echobase.common.taxonFatherMemocode=
+echobase.common.taxonSystematicLevel=
+echobase.common.taxonSystematicOrder=
+echobase.common.timeCoverageEnd=
+echobase.common.timeCoverageStart=
+echobase.common.title=
+echobase.common.tonnage=
+echobase.common.towed=
+echobase.common.transceiverAcquisitionAbsorption=
+echobase.common.transceiverAcquisitionAbsorptionDescription=
+echobase.common.transceiverAcquisitionGain=
+echobase.common.transceiverAcquisitionPower=
+echobase.common.transceiverAcquisitionPulseLength=
+echobase.common.transceiverAcquisitionSacorrection=
+echobase.common.transceiverAperture=
+echobase.common.transceiverBeams=
+echobase.common.transceiverFirmware=
+echobase.common.transceiverManufacturer=
+echobase.common.transceiverModel=
+echobase.common.transceiverProcessingAbsorption=
+echobase.common.transceiverProcessingAbsorptionDescription=
+echobase.common.transceiverProcessingGain=
+echobase.common.transceiverProcessingSacorrection=
+echobase.common.transceiverSerial=
+echobase.common.transducerAcquisitionBeamAngleAlongship=
+echobase.common.transducerAcquisitionBeamAngleAthwartship=
+echobase.common.transducerAcquisitionPsi=
+echobase.common.transducerAperture=
+echobase.common.transducerBeams=
+echobase.common.transducerDepth=
+echobase.common.transducerLocation=
+echobase.common.transducerModel=
+echobase.common.transducerOrientation=
+echobase.common.transducerProcessingBeamAngleAlongship=
+echobase.common.transducerProcessingBeamAngleAthwartship=
+echobase.common.transducerProcessingPsi=
+echobase.common.transducerSerial=
+echobase.common.transect=
+echobase.common.transectAbstract=
+echobase.common.transit=
+echobase.common.type=
+echobase.common.unit=
+echobase.common.units=
+echobase.common.updateDate=
+echobase.common.validMax=
+echobase.common.validMin=
+echobase.common.validSince=
+echobase.common.vessel=
+echobase.common.vesselType=
+echobase.common.voyage=
+echobase.config.data.directory.description=
Property changes on: trunk/echobase-entities/src/main/resources/i18n/echobase-entities_en_GB.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-services/src/main/resources/i18n/echobase-services_en_GB.properties
===================================================================
--- trunk/echobase-services/src/main/resources/i18n/echobase-services_en_GB.properties (rev 0)
+++ trunk/echobase-services/src/main/resources/i18n/echobase-services_en_GB.properties 2012-02-09 11:59:29 UTC (rev 309)
@@ -0,0 +1,33 @@
+echobase.common.associationFile=
+echobase.common.biometrySampleFile=
+echobase.common.cellPositionReference.end=
+echobase.common.cellPositionReference.mid=
+echobase.common.cellPositionReference.start=
+echobase.common.commonDataImportMode.all=
+echobase.common.commonDataImportMode.transect=
+echobase.common.echotypeFile=
+echobase.common.gearMetadataFile=
+echobase.common.importDataMode.accousticData=
+echobase.common.importDataMode.catchesData=
+echobase.common.importDataMode.commonData=
+echobase.common.importDataMode.operation=
+echobase.common.importDataMode.results=
+echobase.common.importDbFile=
+echobase.common.lengthAgeKeyFile=
+echobase.common.lengthWeightKeyFile=
+echobase.common.moviesFile=
+echobase.common.operationFile=
+echobase.common.operationMetadataFile=
+echobase.common.regionsFile=
+echobase.common.resultsImportMode.acoustic=
+echobase.common.resultsImportMode.voyage=
+echobase.common.sampleFile=
+echobase.common.subSampleFile=
+echobase.common.transectFile=
+echobase.common.transitFile=
+echobase.common.voyageFile=
+echobase.importError.can.only.import.one.voyage.atime=
+echobase.importError.fromFile=
+echobase.importError.no.transit.between.date=
+echobase.importError.no.transit.imported=
+echobase.importError.no.voyage.imported=
Property changes on: trunk/echobase-services/src/main/resources/i18n/echobase-services_en_GB.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/resources/i18n/echobase-ui_en_GB.properties
===================================================================
--- trunk/echobase-ui/src/main/resources/i18n/echobase-ui_en_GB.properties (rev 0)
+++ trunk/echobase-ui/src/main/resources/i18n/echobase-ui_en_GB.properties 2012-02-09 11:59:29 UTC (rev 309)
@@ -0,0 +1,19 @@
+echobase.error.bad.password=
+echobase.error.email.already.used=
+echobase.error.login.unknown=
+echobase.error.mission.name.already.exist=
+echobase.error.no.embeddedApplication.configurationFound=
+echobase.error.no.embeddedApplication.exportFileFound=
+echobase.error.no.exportDb.configurationFound=
+echobase.error.no.exportDb.exportFileFound=
+echobase.error.required.email=
+echobase.error.required.password=
+echobase.error.warlocation.notFound=
+echobase.info.no.sqlQuery.saved=
+echobase.info.no.sqlQuery.selected=
+echobase.info.no.table.selected=
+echobase.info.no.voyagee.found=
+echobase.info.user.create=
+echobase.info.user.delete=
+echobase.info.user.update=
+echobase.information.mission.created=
Property changes on: trunk/echobase-ui/src/main/resources/i18n/echobase-ui_en_GB.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-02-08 11:58:32 UTC (rev 308)
+++ trunk/pom.xml 2012-02-09 11:59:29 UTC (rev 309)
@@ -122,7 +122,7 @@
<slf4jVersion>1.6.4</slf4jVersion>
<jackcessVersion>1.2.6</jackcessVersion>
- <hibernateVersion>3.6.9.Final</hibernateVersion>
+ <hibernateVersion>3.6.10.Final</hibernateVersion>
<googleSearchEnabled>true</googleSearchEnabled>
@@ -133,7 +133,7 @@
<license.licenseName>agpl_v3</license.licenseName>
<!-- i18n configuration -->
- <i18n.bundles>fr_FR</i18n.bundles>
+ <i18n.bundles>fr_FR,en_GB</i18n.bundles>
<i18n.silent>true</i18n.silent>
</properties>
@@ -459,7 +459,7 @@
<plugins>
<plugin>
<groupId>org.nuiton</groupId>
- <artifactId>maven-helper-plugin</artifactId>
+ <artifactId>helper-maven-plugin</artifactId>
<executions>
<execution>
<id>check-central-safe</id>
1
0
r308 - in trunk: . echobase-services/src/main/java/fr/ifremer/echobase/services echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData src/doc/reunions
by tchemit@users.forge.codelutin.com 08 Feb '12
by tchemit@users.forge.codelutin.com 08 Feb '12
08 Feb '12
Author: tchemit
Date: 2012-02-08 12:58:32 +0100 (Wed, 08 Feb 2012)
New Revision: 308
Url: http://forge.codelutin.com/repositories/revision/echobase/308
Log:
update versions, add headers, next reunion file + snv properties and little...
Added:
trunk/src/doc/reunions/reunion-2012-02-08.txt
Modified:
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbEditorService.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureOperation.java
trunk/pom.xml
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-02-07 01:28:50 UTC (rev 307)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbEditorService.java 2012-02-08 11:58:32 UTC (rev 308)
@@ -272,6 +272,7 @@
query.addOrderDesc(sidx);
}
}
+
query.setLimit(from, to - 1);
if (StringUtils.isNotEmpty(extraWhereQuery)) {
query.addWhere(extraWhereQuery);
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureOperation.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureOperation.java 2012-02-07 01:28:50 UTC (rev 307)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureOperation.java 2012-02-08 11:58:32 UTC (rev 308)
@@ -43,9 +43,6 @@
/** Universe of existing voyages. */
protected Map<String, String> voyages;
-// /** Universe of existing vessels. */
-// protected Map<String, String> vessels;
-
public ConfigureOperation() {
super(OperationImportConfiguration.class);
}
@@ -64,8 +61,6 @@
newService(EchoBaseServiceSupport.class);
voyages = loadSortAndDecorate(service, Voyage.class);
-// vessels = loadSortAndDecorate(service, Vessel.class);
-
return INPUT;
}
@@ -73,10 +68,6 @@
return voyages;
}
-// public Map<String, String> getVessels() {
-// return vessels;
-// }
-
public void setOperationFile(File file) {
getModel().getOperationFile().setFile(file);
}
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-02-07 01:28:50 UTC (rev 307)
+++ trunk/pom.xml 2012-02-08 11:58:32 UTC (rev 308)
@@ -112,19 +112,18 @@
<topiaVersion>2.6.6</topiaVersion>
<nuitonUtilsVersion>2.4.4</nuitonUtilsVersion>
<nuitonI18nVersion>2.4.1</nuitonI18nVersion>
- <nuitonWebVersion>1.9.1</nuitonWebVersion>
+ <nuitonWebVersion>1.9.2</nuitonWebVersion>
<msaccessImporterVersion>1.4.1</msaccessImporterVersion>
<struts2Version>2.3.1.2</struts2Version>
<jqueryPluginVersion>3.2.1</jqueryPluginVersion>
- <seleniumVersion>2.17.0</seleniumVersion>
- <h2Version>1.3.163</h2Version>
+ <seleniumVersion>2.18.0</seleniumVersion>
+ <h2Version>1.3.164</h2Version>
<postgresqlVersion>9.1-901-1.jdbc4</postgresqlVersion>
<slf4jVersion>1.6.4</slf4jVersion>
<jackcessVersion>1.2.6</jackcessVersion>
<hibernateVersion>3.6.9.Final</hibernateVersion>
- <wagonPluginVersion>1.0-beta-3</wagonPluginVersion>
<googleSearchEnabled>true</googleSearchEnabled>
<!-- license header configuration -->
Added: trunk/src/doc/reunions/reunion-2012-02-08.txt
===================================================================
--- trunk/src/doc/reunions/reunion-2012-02-08.txt (rev 0)
+++ trunk/src/doc/reunions/reunion-2012-02-08.txt 2012-02-08 11:58:32 UTC (rev 308)
@@ -0,0 +1,118 @@
+projet echobase
+---------------
+
+Mercredi 08 février 2012 (Ifremer)
+
+Présents : Mathieu et Tony
+
+Planning
+--------
+
+- import nouvelles données
+- valider les imports déjà réalisés
+- revoir les clef des espèces
+
+Import nouvelles données
+------------------------
+
+- pouvoir créer une nouvelle mission en indépendant (un autre écran)
+
+Import Common datas
+===================
+
+1) Un seul écran pour importer les données communes :
+
+mode 1: import d'un nouveau voyage / transit / transect
+mode 2: import d'un nouveau transect (renseigné par un voyage + un navire)
+
+OK.
+
+Import Operations
+=================
+
+- voyage
+- navire (connus dans les transects du voyage)
+
+- format des fichiers à définir
+Operation / OperationMetaData / GearMetaData
+
+OK.
+
+Import Samples
+==============
+
+- voyage
+- navire
+- fichier Sample
+- fichier SampleData
+- on utilisera une clef temporaire pour lier les Sample et SampleData)
+- pour retrouver les Operations, on se basera sur Operation#id
+
+Import Acoustic data
+====================
+
+mode 1: (celui implanté) va créer les data acquisition trouvées dans le fichier movie
+mode 2: (a faire) on créer le dataAcquisition uniquement s'il n'existe pas déjà pour le transect.
+
+OK.
+
+Rajouté un boolean (ajout de nouvelles données acoustiques) = mode 2
+OK
+
+- voyage
+- transit
+- navire
+
+- Cell Position Reference rajouter 3 jours une combobox Start - Mid - End pour retrouver
+les metadata à utiliser sur les data ESDU (suffix saufMid-> Bary)
+
+OK.
+
+- prendre en compte le nouveau format movies (suppression colonne) + comment sélectionner les acousticInstrument.
+
+OK réalisé.
+
+Import résultats
+================
+
+mode 1: import au niveau du voyage
+ - sélection voyage
+ - fichier echotype
+ - relations taille-poids
+ - relations taille-age
+
+Chaque import est indépendant et optionnel.
+
+OK réalisé.
+
+mode 2: import acoustique
+ - sélection voyage
+ - sélection navire
+
+ on retrouvera les transits via les plages temporelles
+
+- ajoute les celles régions
+
+- et les résultats ???
+
+
+Action
+------
+
+- CodeLutin
+
+ - infra des imports
+ - finir import acoustic
+ - commencer import results
+ - relancer Aurelie pour la charte graphique
+ - corriger le journal de bords lors d'un import d'une table (problème de comparaison sur la nulitté).
+
+- Mathieu
+
+ - import operation (format et fichiers à fournir)
+ - import "sample" (format et fichiers à fournir)
+ - import "résultats" (echotype, taille-poids-age), + clarifier la partie acoustic
+
+Prochaine réunion :
+
+ - mercredi 8/02 14h30
\ No newline at end of file
Property changes on: trunk/src/doc/reunions/reunion-2012-02-08.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
1
0
07 Feb '12
Author: tchemit
Date: 2012-02-07 02:28:50 +0100 (Tue, 07 Feb 2012)
New Revision: 307
Url: http://forge.codelutin.com/repositories/revision/echobase/307
Log:
add operation imports + improve csv import model rows + reuse in ui voyage/transit/vessel selector
Modified:
trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticDataImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesDataImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/OperationImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ResultsImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/OperationImportConfiguration.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/AcousticDataImportModel.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/GearMetadataValueImportModel.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/GearMetadataValueImportModelRow.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthAgeKeyImportModel.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthAgeKeyImportModelRow.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthWeightKeyImportModel.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthWeightKeyImportModelRow.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationImportModel.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationImportModelRow.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationMetadataValueImportModel.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationMetadataValueImportModelRow.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticData.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureOperation.java
trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureOperation-validation.xml
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureOperation.jsp
trunk/echobase-ui/src/main/webapp/js/gridHelper.js
Modified: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java
===================================================================
--- trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java 2012-02-04 09:20:28 UTC (rev 306)
+++ trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java 2012-02-07 01:28:50 UTC (rev 307)
@@ -208,6 +208,13 @@
}
};
+ public static final Function<Gear, String> GEAR_NAME = new Function<Gear, String>() {
+ @Override
+ public String apply(Gear input) {
+ return input.getName();
+ }
+ };
+
public static final Function<Operation, String> OPERATION_ID = new Function<Operation, String>() {
@Override
public String apply(Operation input) {
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticDataImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticDataImportService.java 2012-02-04 09:20:28 UTC (rev 306)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticDataImportService.java 2012-02-07 01:28:50 UTC (rev 307)
@@ -68,8 +68,11 @@
EchoBaseUser user) throws ImportException {
Map<InputFile, CsvImportResult> result = Maps.newHashMap();
+ // get selected transit
Transit transit = getEntityById(Transit.class,
configuration.getTransitId());
+
+ // get selected vessel
Vessel vessel = getEntityById(Vessel.class,
configuration.getVesselId());
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesDataImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesDataImportService.java 2012-02-04 09:20:28 UTC (rev 306)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesDataImportService.java 2012-02-07 01:28:50 UTC (rev 307)
@@ -26,10 +26,10 @@
import com.google.common.collect.Maps;
import fr.ifremer.echobase.InputFile;
import fr.ifremer.echobase.entities.EchoBaseUser;
-import fr.ifremer.echobase.entities.data.GearMetadataValue;
-import fr.ifremer.echobase.entities.data.GearMetadataValueDAO;
-import fr.ifremer.echobase.entities.data.Operation;
-import fr.ifremer.echobase.entities.data.OperationDAO;
+import fr.ifremer.echobase.entities.data.Sample;
+import fr.ifremer.echobase.entities.data.SampleDAO;
+import fr.ifremer.echobase.entities.data.SampleData;
+import fr.ifremer.echobase.entities.data.SampleDataDAO;
import fr.ifremer.echobase.entities.data.Voyage;
import fr.ifremer.echobase.entities.references.Vessel;
import fr.ifremer.echobase.services.configurations.CatchesDataImportConfiguration;
@@ -75,9 +75,7 @@
SampleImportModel csvModel = new SampleImportModel(getCsvSeparator());
- OperationDAO dao = getDAO(Operation.class, OperationDAO.class);
- GearMetadataValueDAO metadataValuedao =
- getDAO(GearMetadataValue.class, GearMetadataValueDAO.class);
+ SampleDAO dao = getDAO(Sample.class, SampleDAO.class);
Reader reader = getInputFileReader(inputFile);
try {
@@ -103,10 +101,9 @@
SampleDataImportModel csvModel = new SampleDataImportModel(getCsvSeparator());
- OperationDAO dao = getDAO(Operation.class, OperationDAO.class);
- GearMetadataValueDAO metadataValuedao =
- getDAO(GearMetadataValue.class, GearMetadataValueDAO.class);
+ SampleDataDAO dao = getDAO(SampleData.class, SampleDataDAO.class);
+
Reader reader = getInputFileReader(inputFile);
try {
Import<SampleDataImportModelRow> importer =
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/OperationImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/OperationImportService.java 2012-02-04 09:20:28 UTC (rev 306)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/OperationImportService.java 2012-02-07 01:28:50 UTC (rev 307)
@@ -33,7 +33,10 @@
import fr.ifremer.echobase.entities.data.OperationDAO;
import fr.ifremer.echobase.entities.data.OperationMetadataValue;
import fr.ifremer.echobase.entities.data.OperationMetadataValueDAO;
-import fr.ifremer.echobase.entities.data.Voyage;
+import fr.ifremer.echobase.entities.data.Transect;
+import fr.ifremer.echobase.entities.data.Transit;
+import fr.ifremer.echobase.entities.references.DepthStratum;
+import fr.ifremer.echobase.entities.references.Gear;
import fr.ifremer.echobase.entities.references.GearMetadata;
import fr.ifremer.echobase.entities.references.OperationMetadata;
import fr.ifremer.echobase.entities.references.Vessel;
@@ -48,6 +51,7 @@
import org.nuiton.util.csv.ImportRuntimeException;
import java.io.Reader;
+import java.util.Arrays;
import java.util.Map;
/**
@@ -59,36 +63,61 @@
public class OperationImportService extends AbstractImportDataService<OperationImportConfiguration> {
@Override
- public Map<InputFile, CsvImportResult> startImport(OperationImportConfiguration configuration,
- EchoBaseUser user) throws ImportException {
+ public Map<InputFile, CsvImportResult> startImport(
+ OperationImportConfiguration configuration,
+ EchoBaseUser user) throws ImportException {
Map<InputFile, CsvImportResult> result = Maps.newHashMap();
+ // get selected transit
+ Transit transit = getEntityById(Transit.class,
+ configuration.getTransitId());
+
+ // get selected vessel
Vessel vessel = getEntityById(Vessel.class,
configuration.getVesselId());
- Voyage voyage = getEntityById(Voyage.class,
- configuration.getVoyageId());
+ // find out the correct transect to use
+ Transect transect = transit.getTransect(vessel);
- importOperationFile(configuration.getOperationFile(), voyage, vessel);
+ // authorize only to use this vessel in import files
+ Map<String, Vessel> vesselMap = Maps.uniqueIndex(
+ Arrays.asList(vessel), EchoBaseFunctions.VESSEL_NAME);
+ Map<String, Gear> gearMap = getEntitiesMap(
+ Gear.class, EchoBaseFunctions.GEAR_NAME);
+
+ importOperationFile(configuration.getOperationFile(),
+ transect,
+ vesselMap,
+ gearMap);
+
importOperationMetadataFile(configuration.getOperationMetadataFile(),
- voyage, vessel);
+ transect,
+ vesselMap);
importGearMetadataFile(configuration.getGearMetadataFile(),
- voyage,
- vessel);
+ transect,
+ vesselMap,
+ gearMap);
commitTransaction("Could not commit transaction of operation import");
return result;
}
protected void importOperationFile(InputFile inputFile,
- Voyage voyage,
- Vessel vessel) throws ImportException {
+ Transect transect,
+ Map<String, Vessel> vesselMap,
+ Map<String, Gear> gearMap) throws ImportException {
+ Map<String, DepthStratum> depthStratumMap = getEntitiesMap(
+ DepthStratum.class, EchoBaseFunctions.DEPTH_STRATUM_ID);
+
OperationImportModel csvModel =
- new OperationImportModel(getCsvSeparator());
+ new OperationImportModel(getCsvSeparator(),
+ vesselMap,
+ gearMap,
+ depthStratumMap);
OperationDAO dao = getDAO(Operation.class, OperationDAO.class);
@@ -99,8 +128,11 @@
for (OperationImportModelRow row : importer) {
- //TODO
+ Operation operationToCreate = row.getOperation();
+ Operation operation = create(dao, operationToCreate);
+
+ transect.addOperation(operation);
}
} catch (ImportRuntimeException e) {
@@ -111,20 +143,25 @@
}
protected void importOperationMetadataFile(InputFile inputFile,
- Voyage voyage,
- Vessel vessel) throws ImportException {
+ Transect transect,
+ Map<String, Vessel> vesselMap) throws ImportException {
Map<String, OperationMetadata> operationMetadatasByName =
getEntitiesMap(OperationMetadata.class,
EchoBaseFunctions.OPERATION_METADATA_NAME);
+ Map<String, Operation> operationById = Maps.uniqueIndex(
+ transect.getOperation(), EchoBaseFunctions.OPERATION_ID);
+
OperationMetadataValueImportModel csvModel =
- new OperationMetadataValueImportModel(getCsvSeparator());
+ new OperationMetadataValueImportModel(getCsvSeparator(),
+ vesselMap,
+ operationMetadatasByName,
+ operationById);
- OperationDAO dao = getDAO(Operation.class, OperationDAO.class);
- OperationMetadataValueDAO metadataValuedao =
- getDAO(OperationMetadataValue.class,
- OperationMetadataValueDAO.class);
+ OperationMetadataValueDAO dao = getDAO(
+ OperationMetadataValue.class,
+ OperationMetadataValueDAO.class);
Reader reader = getInputFileReader(inputFile);
try {
@@ -133,8 +170,15 @@
for (OperationMetadataValueImportModelRow row : importer) {
- //TODO
+ Operation operation = row.getOperation();
+ OperationMetadataValue operationMetadataValueToCreate =
+ row.getOperationMetadataValue();
+ OperationMetadataValue operationMetadataValue = create(
+ dao, operationMetadataValueToCreate);
+
+ operation.addOperationMetadataValue(operationMetadataValue);
+
}
} catch (ImportRuntimeException e) {
@@ -145,18 +189,25 @@
}
protected void importGearMetadataFile(InputFile inputFile,
- Voyage voyage,
- Vessel vessel) throws ImportException {
+ Transect transect,
+ Map<String, Vessel> vesselMap,
+ Map<String, Gear> gearMap) throws ImportException {
Map<String, GearMetadata> gearMetadatasByType =
getEntitiesMap(GearMetadata.class, EchoBaseFunctions.GEAR_METADATA_TYPE);
+ Map<String, Operation> operationById = Maps.uniqueIndex(
+ transect.getOperation(), EchoBaseFunctions.OPERATION_ID);
+
GearMetadataValueImportModel csvModel =
- new GearMetadataValueImportModel(getCsvSeparator());
+ new GearMetadataValueImportModel(getCsvSeparator(),
+ vesselMap,
+ gearMetadatasByType,
+ gearMap,
+ operationById);
- OperationDAO dao = getDAO(Operation.class, OperationDAO.class);
- GearMetadataValueDAO metadataValuedao =
- getDAO(GearMetadataValue.class, GearMetadataValueDAO.class);
+ GearMetadataValueDAO dao = getDAO(GearMetadataValue.class,
+ GearMetadataValueDAO.class);
Reader reader = getInputFileReader(inputFile);
try {
@@ -165,8 +216,15 @@
for (GearMetadataValueImportModelRow row : importer) {
- //TODO
+ Operation operation = row.getOperation();
+ GearMetadataValue gearMetadataValuetoCreate =
+ row.getGearMetadataValue();
+ GearMetadataValue gearMetadataValue = create(
+ dao, gearMetadataValuetoCreate);
+
+ operation.addGearMetadataValue(gearMetadataValue);
+
}
} catch (ImportRuntimeException e) {
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ResultsImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ResultsImportService.java 2012-02-04 09:20:28 UTC (rev 306)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ResultsImportService.java 2012-02-07 01:28:50 UTC (rev 307)
@@ -58,6 +58,7 @@
import org.nuiton.util.csv.ImportRuntimeException;
import java.io.Reader;
+import java.util.Arrays;
import java.util.Map;
/**
@@ -77,9 +78,14 @@
switch (importMode) {
case VOYAGE:
- Map<String, Voyage> voyageMap = getEntitiesMap(
- Voyage.class, EchoBaseFunctions.VOYAGE_NAME);
+ // get selected voyage
+ Voyage voyage = getEntityById(Voyage.class,
+ configuration.getVoyageId());
+ // authorize only the selected voyage to be imported
+ Map<String, Voyage> voyageMap = Maps.uniqueIndex(Arrays.asList(
+ voyage), EchoBaseFunctions.VOYAGE_NAME);
+
Map<String, Species> speciesMap = getEntitiesMap(
Species.class,
EchoBaseFunctions.SPECIES_BARACOUDA_CODE);
@@ -198,10 +204,11 @@
Voyage voyage = row.getVoyage();
- LengthWeightKey lengthWeightKey = create(dao);
+ LengthWeightKey lengthWeightKeyToCreate =
+ row.getLengthWeightKey();
+ LengthWeightKey lengthWeightKey = create(
+ dao, lengthWeightKeyToCreate);
- lengthWeightKey.setAParameter(row.getaParameter());
- lengthWeightKey.setBParameter(row.getbParameter());
//TODO should we import it ?
//lengthWeightKey.setMetadata(row.getMetadata());
@@ -261,15 +268,9 @@
Voyage voyage = row.getVoyage();
- LengthAgeKey lengthAgeKey = create(dao);
+ LengthAgeKey lengthAgeKeyToCreate = row.getLengthAgeKey();
+ LengthAgeKey lengthAgeKey = create(dao, lengthAgeKeyToCreate);
- lengthAgeKey.setAge(row.getAge());
- lengthAgeKey.setLength(row.getLength());
- lengthAgeKey.setPercentAtAge(row.getPercentAtAge());
- lengthAgeKey.setMetadata(row.getMetadata());
- lengthAgeKey.setSpecies(row.getSpecies());
- lengthAgeKey.setStrata(row.getStrata());
-
// attach it to voyage
voyage.addLengthAgeKey(lengthAgeKey);
@@ -314,8 +315,10 @@
if (!voyage.isEchotypeEmpty()) {
- echotype = Iterables.find(voyage.getEchotype(),
- EchoBasePredicates.newEchotypeByNamePredicate(echotypeName));
+ echotype = Iterables.find(
+ voyage.getEchotype(),
+ EchoBasePredicates.newEchotypeByNamePredicate(
+ echotypeName));
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/OperationImportConfiguration.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/OperationImportConfiguration.java 2012-02-04 09:20:28 UTC (rev 306)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/OperationImportConfiguration.java 2012-02-07 01:28:50 UTC (rev 307)
@@ -42,6 +42,9 @@
/** Selected voyage id where to import datas. */
protected String voyageId;
+ /** Selected transit id where to import datas. */
+ protected String transitId;
+
/** Selected vessel to use for transect. */
protected String vesselId;
@@ -71,6 +74,14 @@
this.voyageId = voyageId;
}
+ public String getTransitId() {
+ return transitId;
+ }
+
+ public void setTransitId(String transitId) {
+ this.transitId = transitId;
+ }
+
public String getVesselId() {
return vesselId;
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/AcousticDataImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/AcousticDataImportModel.java 2012-02-04 09:20:28 UTC (rev 306)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/AcousticDataImportModel.java 2012-02-07 01:28:50 UTC (rev 307)
@@ -107,29 +107,6 @@
newIgnoredColumn("MOVIES_EILayer\\eilayer\\sv");//BL
newIgnoredColumn("MOVIES_EILayer\\eilayer\\ni");//BM
newIgnoredColumn("MOVIES_EILayer\\eilayer\\nt");//BN
-
-// // Cell ESDU Datas
-// newIgnoredColumn("MOVIES_EILayer\\cellset2");//BO
-// newIgnoredColumn("MOVIES_EILayer\\cellset2\\cellnum");//BP
-// newIgnoredColumn("MOVIES_EILayer\\cellset2\\celltype");//BQ
-// newIgnoredColumn("MOVIES_EILayer\\cellset2\\depthstart");//BR
-// newIgnoredColumn("MOVIES_EILayer\\cellset2\\depthend");//BS
-// newIgnoredColumn("MOVIES_EILayer\\cellset2\\indexstart");//BT
-// newIgnoredColumn("MOVIES_EILayer\\cellset2\\indexend");//BU
-// newMandatoryColumn("MOVIES_EILayer\\cellset2\\datestart", AcousticDataImportModelRow.PROPERTY_CELL_DATE_START);//BV
-// newIgnoredColumn("MOVIES_EILayer\\cellset2\\dateend");//BW
-// newIgnoredColumn("MOVIES_EILayer\\cellset2\\diststart");//BX
-// newIgnoredColumn("MOVIES_EILayer\\cellset2\\distend");//BY
-// newIgnoredColumn("MOVIES_EILayer\\cellset2\\thresholdup");//BZ
-// newIgnoredColumn("MOVIES_EILayer\\cellset2\\thresholdlow");//CA
-// newIgnoredColumn("MOVIES_EILayer\\eilayer2");//CB
-// newMandatoryColumn("MOVIES_EILayer\\eilayer2\\sa", AcousticDataImportModelRow.PROPERTY_CELL_SA);//CC
-// newIgnoredColumn("MOVIES_EILayer\\eilayer2\\sv");//CD
-// newIgnoredColumn("MOVIES_EILayer\\eilayer2\\ni");//CE
-// newIgnoredColumn("MOVIES_EILayer\\eilayer2\\nt");//CF
-// newIgnoredColumn("MOVIES_EILayer\\boterr");//CG
-// newIgnoredColumn("MOVIES_EILayer\\boterr\\sa");//CH
-// newIgnoredColumn("MOVIES_EILayer\\boterr\\ni");//CI
}
@Override
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/GearMetadataValueImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/GearMetadataValueImportModel.java 2012-02-04 09:20:28 UTC (rev 306)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/GearMetadataValueImportModel.java 2012-02-07 01:28:50 UTC (rev 307)
@@ -24,7 +24,13 @@
package fr.ifremer.echobase.services.csv;
import fr.ifremer.echobase.entities.data.GearMetadataValue;
+import fr.ifremer.echobase.entities.data.Operation;
+import fr.ifremer.echobase.entities.references.Gear;
+import fr.ifremer.echobase.entities.references.GearMetadata;
+import fr.ifremer.echobase.entities.references.Vessel;
+import java.util.Map;
+
/**
* Model to import {@link GearMetadataValue}.
*
@@ -33,8 +39,28 @@
*/
public class GearMetadataValueImportModel extends CsvModelUtil.AbstractImportModel<GearMetadataValueImportModelRow> {
- public GearMetadataValueImportModel(char separator) {
+ public GearMetadataValueImportModel(char separator,
+ Map<String, Vessel> vesselMap,
+ Map<String, GearMetadata> gearMetadataMap,
+ Map<String, Gear> gearMap,
+ Map<String, Operation> operationMap) {
super(separator);
+
+ /*
+ vesselName
+ id
+ gearID
+ metadataType
+ gearMetadataValue
+ */
+
+ newMandatoryColumn("vesselName", GearMetadataValueImportModelRow.PROPERTY_VESSEL, CsvModelUtil.newForeignKeyValue(Vessel.class, vesselMap));
+ newMandatoryColumn("id", GearMetadataValueImportModelRow.PROPERTY_OPERATION, CsvModelUtil.newForeignKeyValue(Operation.class, operationMap));
+
+ newMandatoryColumn("metadataType", GearMetadataValue.PROPERTY_GEAR_METADATA, CsvModelUtil.newForeignKeyValue(GearMetadata.class, gearMetadataMap));
+ newMandatoryColumn("gearID", GearMetadataValue.PROPERTY_GEAR, CsvModelUtil.newForeignKeyValue(Gear.class, gearMap));
+ newMandatoryColumn("gearMetadataValue", GearMetadataValue.PROPERTY_DATA_VALUE);
+
}
@Override
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/GearMetadataValueImportModelRow.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/GearMetadataValueImportModelRow.java 2012-02-04 09:20:28 UTC (rev 306)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/GearMetadataValueImportModelRow.java 2012-02-07 01:28:50 UTC (rev 307)
@@ -23,16 +23,60 @@
*/
package fr.ifremer.echobase.services.csv;
+import fr.ifremer.echobase.entities.data.GearMetadataValue;
+import fr.ifremer.echobase.entities.data.GearMetadataValueImpl;
+import fr.ifremer.echobase.entities.data.Operation;
+import fr.ifremer.echobase.entities.data.Transect;
+import fr.ifremer.echobase.entities.references.GearMetadata;
+import fr.ifremer.echobase.entities.references.Vessel;
+
/**
- * Bean used as a row for import of {@link OperationMetadataValueImportModel}.
+ * Bean used as a row for import of {@link GearMetadataValueImportModel}.
*
* @author tchemit <chemit(a)codelutin.com>
* @since 0.3
*/
public class GearMetadataValueImportModelRow {
+ public static final String PROPERTY_VESSEL = Transect.PROPERTY_VESSEL;
+ public static final String PROPERTY_OPERATION = Transect.PROPERTY_OPERATION;
+
+ protected Vessel vessel;
+
+ protected Operation operation;
+
+ protected final GearMetadataValue gearMetadataValue;
+
public GearMetadataValueImportModelRow() {
+ gearMetadataValue = new GearMetadataValueImpl();
}
+ public GearMetadataValue getGearMetadataValue() {
+ return gearMetadataValue;
+ }
+
+ public void setGearMetadata(GearMetadata gearMetadata) {
+ gearMetadataValue.setGearMetadata(gearMetadata);
+ }
+
+ public void setDataValue(String dataValue) {
+ gearMetadataValue.setDataValue(dataValue);
+ }
+
+ public Operation getOperation() {
+ return operation;
+ }
+
+ public void setOperation(Operation operation) {
+ this.operation = operation;
+ }
+
+ public Vessel getVessel() {
+ return vessel;
+ }
+
+ public void setVessel(Vessel vessel) {
+ this.vessel = vessel;
+ }
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthAgeKeyImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthAgeKeyImportModel.java 2012-02-04 09:20:28 UTC (rev 306)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthAgeKeyImportModel.java 2012-02-07 01:28:50 UTC (rev 307)
@@ -53,15 +53,15 @@
this.strataMap = strataMap;
this.speciesMap = speciesMap;
- newMandatoryColumn(LengthAgeKeyImportModelRow.PROPERTY_AGE, CsvModelUtil.PRIMITIVE_INTEGER);
- newMandatoryColumn(LengthAgeKeyImportModelRow.PROPERTY_PERCENT_AT_AGE, CsvModelUtil.PRIMITIVE_FLOAT);
- newMandatoryColumn(LengthAgeKeyImportModelRow.PROPERTY_LENGTH, CsvModelUtil.PRIMITIVE_FLOAT);
- newMandatoryColumn(LengthAgeKeyImportModelRow.PROPERTY_METADATA);
-
newMandatoryColumn(LengthAgeKeyImportModelRow.PROPERTY_VOYAGE, CsvModelUtil.newForeignKeyValue(Voyage.class, voyageMap));
- newMandatoryColumn(LengthAgeKeyImportModelRow.PROPERTY_STRATA, CsvModelUtil.newForeignKeyValue(Strata.class, strataMap));
- newMandatoryColumn("codeMemo", LengthAgeKeyImportModelRow.PROPERTY_SPECIES, CsvModelUtil.newForeignKeyValue(Species.class, speciesMap));
+ newMandatoryColumn(LengthAgeKey.PROPERTY_AGE, CsvModelUtil.PRIMITIVE_INTEGER);
+ newMandatoryColumn(LengthAgeKey.PROPERTY_PERCENT_AT_AGE, CsvModelUtil.PRIMITIVE_FLOAT);
+ newMandatoryColumn(LengthAgeKey.PROPERTY_LENGTH, CsvModelUtil.PRIMITIVE_FLOAT);
+ newMandatoryColumn(LengthAgeKey.PROPERTY_METADATA);
+ newMandatoryColumn(LengthAgeKey.PROPERTY_STRATA, CsvModelUtil.newForeignKeyValue(Strata.class, strataMap));
+ newMandatoryColumn("codeMemo", LengthAgeKey.PROPERTY_SPECIES, CsvModelUtil.newForeignKeyValue(Species.class, speciesMap));
+
}
@Override
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthAgeKeyImportModelRow.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthAgeKeyImportModelRow.java 2012-02-04 09:20:28 UTC (rev 306)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthAgeKeyImportModelRow.java 2012-02-07 01:28:50 UTC (rev 307)
@@ -25,6 +25,7 @@
import fr.ifremer.echobase.entities.data.Voyage;
import fr.ifremer.echobase.entities.references.LengthAgeKey;
+import fr.ifremer.echobase.entities.references.LengthAgeKeyImpl;
import fr.ifremer.echobase.entities.references.Species;
import fr.ifremer.echobase.entities.references.Strata;
@@ -40,50 +41,20 @@
private static final long serialVersionUID = 1L;
- public static final String PROPERTY_SPECIES = LengthAgeKey.PROPERTY_SPECIES;
-
- public static final String PROPERTY_AGE = LengthAgeKey.PROPERTY_AGE;
-
public static final String PROPERTY_VOYAGE = "voyage";
- public static final String PROPERTY_LENGTH = LengthAgeKey.PROPERTY_LENGTH;
-
- public static final String PROPERTY_PERCENT_AT_AGE = LengthAgeKey.PROPERTY_PERCENT_AT_AGE;
-
- public static final String PROPERTY_METADATA = LengthAgeKey.PROPERTY_METADATA;
-
- public static final String PROPERTY_STRATA = LengthAgeKey.PROPERTY_STRATA;
-
- protected Species species;
-
- protected int age;
-
protected Voyage voyage;
- protected float length;
+ protected final LengthAgeKey lengthAgeKey;
- protected float percentAtAge;
-
- protected String metadata;
-
- protected Strata strata;
-
- public Species getSpecies() {
- return species;
+ public LengthAgeKeyImportModelRow() {
+ lengthAgeKey = new LengthAgeKeyImpl();
}
- public void setSpecies(Species species) {
- this.species = species;
+ public LengthAgeKey getLengthAgeKey() {
+ return lengthAgeKey;
}
- public int getAge() {
- return age;
- }
-
- public void setAge(int age) {
- this.age = age;
- }
-
public Voyage getVoyage() {
return voyage;
}
@@ -92,35 +63,27 @@
this.voyage = voyage;
}
- public float getLength() {
- return length;
+ public void setAge(int age) {
+ lengthAgeKey.setAge(age);
}
public void setLength(float length) {
- this.length = length;
+ lengthAgeKey.setLength(length);
}
- public float getPercentAtAge() {
- return percentAtAge;
- }
-
public void setPercentAtAge(float percentAtAge) {
- this.percentAtAge = percentAtAge;
+ lengthAgeKey.setPercentAtAge(percentAtAge);
}
- public String getMetadata() {
- return metadata;
- }
-
public void setMetadata(String metadata) {
- this.metadata = metadata;
+ lengthAgeKey.setMetadata(metadata);
}
- public Strata getStrata() {
- return strata;
+ public void setStrata(Strata strata) {
+ lengthAgeKey.setStrata(strata);
}
- public void setStrata(Strata strata) {
- this.strata = strata;
+ public void setSpecies(Species species) {
+ lengthAgeKey.setSpecies(species);
}
}
\ No newline at end of file
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthWeightKeyImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthWeightKeyImportModel.java 2012-02-04 09:20:28 UTC (rev 306)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthWeightKeyImportModel.java 2012-02-07 01:28:50 UTC (rev 307)
@@ -61,8 +61,8 @@
codeMemo
*/
- newMandatoryColumn(LengthWeightKeyImportModelRow.PROPERTY_APARAMETER, CsvModelUtil.PRIMITIVE_FLOAT);
- newMandatoryColumn(LengthWeightKeyImportModelRow.PROPERTY_BPARAMETER, CsvModelUtil.PRIMITIVE_FLOAT);
+ newMandatoryColumn(LengthWeightKey.PROPERTY_APARAMETER, CsvModelUtil.PRIMITIVE_FLOAT);
+ newMandatoryColumn(LengthWeightKey.PROPERTY_BPARAMETER, CsvModelUtil.PRIMITIVE_FLOAT);
newMandatoryColumn(LengthWeightKeyImportModelRow.PROPERTY_VOYAGE, CsvModelUtil.newForeignKeyValue(Voyage.class, voyageMap));
newMandatoryColumn(LengthWeightKeyImportModelRow.PROPERTY_SIZE_CATEGORY, CsvModelUtil.newForeignKeyValue(SizeCategory.class, sizeCategoryMap));
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthWeightKeyImportModelRow.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthWeightKeyImportModelRow.java 2012-02-04 09:20:28 UTC (rev 306)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthWeightKeyImportModelRow.java 2012-02-07 01:28:50 UTC (rev 307)
@@ -25,6 +25,7 @@
import fr.ifremer.echobase.entities.data.Voyage;
import fr.ifremer.echobase.entities.references.LengthWeightKey;
+import fr.ifremer.echobase.entities.references.LengthWeightKeyImpl;
import fr.ifremer.echobase.entities.references.SizeCategory;
import fr.ifremer.echobase.entities.references.Species;
@@ -46,20 +47,22 @@
public static final String PROPERTY_SIZE_CATEGORY = "sizeCategory";
- public static final String PROPERTY_APARAMETER = LengthWeightKey.PROPERTY_APARAMETER;
-
- public static final String PROPERTY_BPARAMETER = LengthWeightKey.PROPERTY_BPARAMETER;
-
protected Species species;
protected SizeCategory sizeCategory;
protected Voyage voyage;
- protected float aParameter;
+ protected final LengthWeightKey lengthWeightKey;
- protected float bParameter;
+ public LengthWeightKeyImportModelRow() {
+ lengthWeightKey = new LengthWeightKeyImpl();
+ }
+ public LengthWeightKey getLengthWeightKey() {
+ return lengthWeightKey;
+ }
+
public Species getSpecies() {
return species;
}
@@ -84,19 +87,11 @@
this.voyage = voyage;
}
- public float getaParameter() {
- return aParameter;
+ public void setBParameter(float BParameter) {
+ lengthWeightKey.setBParameter(BParameter);
}
- public void setaParameter(float aParameter) {
- this.aParameter = aParameter;
+ public void setAParameter(float AParameter) {
+ lengthWeightKey.setAParameter(AParameter);
}
-
- public float getbParameter() {
- return bParameter;
- }
-
- public void setbParameter(float bParameter) {
- this.bParameter = bParameter;
- }
}
\ No newline at end of file
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationImportModel.java 2012-02-04 09:20:28 UTC (rev 306)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationImportModel.java 2012-02-07 01:28:50 UTC (rev 307)
@@ -24,7 +24,12 @@
package fr.ifremer.echobase.services.csv;
import fr.ifremer.echobase.entities.data.Operation;
+import fr.ifremer.echobase.entities.references.DepthStratum;
+import fr.ifremer.echobase.entities.references.Gear;
+import fr.ifremer.echobase.entities.references.Vessel;
+import java.util.Map;
+
/**
* Model to import {@link Operation}.
*
@@ -33,8 +38,39 @@
*/
public class OperationImportModel extends CsvModelUtil.AbstractImportModel<OperationImportModelRow> {
- public OperationImportModel(char separator) {
+ public OperationImportModel(char separator,
+ Map<String, Vessel> vesselMap,
+ Map<String, Gear> gearMap,
+ Map<String, DepthStratum> depthStratumMap) {
super(separator);
+
+ /*
+ vesselName //
+ id //
+ depthStratumID //
+ gearShootingStartTime //
+ midHaulLatitude //
+ midHaulLongitude //
+ gearShootingStartLatitude //
+ gearShootingStartLongitude //
+ gearShootingEndTime //
+ gearShootingEndLatitude //
+ gearShootingEndLongitude //
+ gearName //
+ */
+ newMandatoryColumn("vesselName", OperationImportModelRow.PROPERTY_VESSEL, CsvModelUtil.newForeignKeyValue(Vessel.class, vesselMap));
+
+ newMandatoryColumn("gearName", Operation.PROPERTY_GEAR, CsvModelUtil.newForeignKeyValue(Gear.class, gearMap));
+ newMandatoryColumn("depthStratumID", Operation.PROPERTY_DEPTH_STRATUM, CsvModelUtil.newForeignKeyValue(DepthStratum.class, depthStratumMap));
+ newMandatoryColumn(Operation.PROPERTY_ID);
+ newMandatoryColumn(Operation.PROPERTY_MID_HAULE_LATITUDE, CsvModelUtil.PRIMITIVE_FLOAT);
+ newMandatoryColumn(Operation.PROPERTY_MID_HAULE_LONGITUDE, CsvModelUtil.PRIMITIVE_FLOAT);
+ newMandatoryColumn(Operation.PROPERTY_GEAR_SHOOTING_START_TIME, CsvModelUtil.DAY_TIME_SECOND);
+ newMandatoryColumn(Operation.PROPERTY_GEAR_SHOOTING_END_TIME, CsvModelUtil.DAY_TIME_SECOND);
+ newMandatoryColumn(Operation.PROPERTY_GEAR_SHOOTING_START_LATITUDE, CsvModelUtil.PRIMITIVE_FLOAT);
+ newMandatoryColumn(Operation.PROPERTY_GEAR_SHOOTING_END_LATITUDE, CsvModelUtil.PRIMITIVE_FLOAT);
+ newMandatoryColumn(Operation.PROPERTY_GEAR_SHOOTING_START_LONGITUDE, CsvModelUtil.PRIMITIVE_FLOAT);
+ newMandatoryColumn(Operation.PROPERTY_GEAR_SHOOTING_END_LONGITUDE, CsvModelUtil.PRIMITIVE_FLOAT);
}
@Override
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationImportModelRow.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationImportModelRow.java 2012-02-04 09:20:28 UTC (rev 306)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationImportModelRow.java 2012-02-07 01:28:50 UTC (rev 307)
@@ -23,6 +23,15 @@
*/
package fr.ifremer.echobase.services.csv;
+import fr.ifremer.echobase.entities.data.Operation;
+import fr.ifremer.echobase.entities.data.OperationImpl;
+import fr.ifremer.echobase.entities.data.Transect;
+import fr.ifremer.echobase.entities.references.DepthStratum;
+import fr.ifremer.echobase.entities.references.Gear;
+import fr.ifremer.echobase.entities.references.Vessel;
+
+import java.util.Date;
+
/**
* Bean used as a row for import of {@link OperationImportModel}.
*
@@ -31,8 +40,69 @@
*/
public class OperationImportModelRow {
+ public static final String PROPERTY_VESSEL = Transect.PROPERTY_VESSEL;
+ protected Vessel vessel;
+
+ protected final Operation operation;
+
public OperationImportModelRow() {
+ operation = new OperationImpl();
}
+ public Operation getOperation() {
+ return operation;
+ }
+
+ public Vessel getVessel() {
+ return vessel;
+ }
+
+ public void setVessel(Vessel vessel) {
+ this.vessel = vessel;
+ }
+
+ public void setId(String id) {
+ operation.setId(id);
+ }
+
+ public void setGearShootingStartTime(Date gearShootingStartTime) {
+ operation.setGearShootingStartTime(gearShootingStartTime);
+ }
+
+ public void setGearShootingEndTime(Date gearShootingEndTime) {
+ operation.setGearShootingEndTime(gearShootingEndTime);
+ }
+
+ public void setGearShootingStartLatitude(Float gearShootingStartLatitude) {
+ operation.setGearShootingStartLatitude(gearShootingStartLatitude);
+ }
+
+ public void setGearShootingEndLatitude(Float gearShootingEndLatitude) {
+ operation.setGearShootingEndLatitude(gearShootingEndLatitude);
+ }
+
+ public void setGearShootingStartLongitude(Float gearShootingStartLongitude) {
+ operation.setGearShootingStartLongitude(gearShootingStartLongitude);
+ }
+
+ public void setGearShootingEndLongitude(Float gearShootingEndLongitude) {
+ operation.setGearShootingEndLongitude(gearShootingEndLongitude);
+ }
+
+ public void setMidHauleLatitude(float midHauleLatitude) {
+ operation.setMidHauleLatitude(midHauleLatitude);
+ }
+
+ public void setMidHauleLongitude(float midHauleLongitude) {
+ operation.setMidHauleLongitude(midHauleLongitude);
+ }
+
+ public void setDepthStratum(DepthStratum depthStratum) {
+ operation.setDepthStratum(depthStratum);
+ }
+
+ public void setGear(Gear gear) {
+ operation.setGear(gear);
+ }
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationMetadataValueImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationMetadataValueImportModel.java 2012-02-04 09:20:28 UTC (rev 306)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationMetadataValueImportModel.java 2012-02-07 01:28:50 UTC (rev 307)
@@ -23,8 +23,13 @@
*/
package fr.ifremer.echobase.services.csv;
+import fr.ifremer.echobase.entities.data.Operation;
import fr.ifremer.echobase.entities.data.OperationMetadataValue;
+import fr.ifremer.echobase.entities.references.OperationMetadata;
+import fr.ifremer.echobase.entities.references.Vessel;
+import java.util.Map;
+
/**
* Model to import {@link OperationMetadataValue}.
*
@@ -33,8 +38,24 @@
*/
public class OperationMetadataValueImportModel extends CsvModelUtil.AbstractImportModel<OperationMetadataValueImportModelRow> {
- public OperationMetadataValueImportModel(char separator) {
+ public OperationMetadataValueImportModel(char separator,
+ Map<String, Vessel> vesselMap,
+ Map<String, OperationMetadata> operationMetadataMap,
+ Map<String, Operation> operationMap) {
super(separator);
+
+ /*
+ vesselName/
+ id/
+ metadataType/
+ operationMetadataValue/
+ */
+
+ newMandatoryColumn("vesselName", OperationMetadataValueImportModelRow.PROPERTY_VESSEL, CsvModelUtil.newForeignKeyValue(Vessel.class, vesselMap));
+ newMandatoryColumn("id", OperationMetadataValueImportModelRow.PROPERTY_OPERATION, CsvModelUtil.newForeignKeyValue(Operation.class, operationMap));
+
+ newMandatoryColumn("metadataType", OperationMetadataValue.PROPERTY_OPERATION_METADATA, CsvModelUtil.newForeignKeyValue(OperationMetadata.class, operationMetadataMap));
+ newMandatoryColumn("operationMetadataValue", OperationMetadataValue.PROPERTY_DATA_VALUE);
}
@Override
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationMetadataValueImportModelRow.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationMetadataValueImportModelRow.java 2012-02-04 09:20:28 UTC (rev 306)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationMetadataValueImportModelRow.java 2012-02-07 01:28:50 UTC (rev 307)
@@ -23,6 +23,13 @@
*/
package fr.ifremer.echobase.services.csv;
+import fr.ifremer.echobase.entities.data.Operation;
+import fr.ifremer.echobase.entities.data.OperationMetadataValue;
+import fr.ifremer.echobase.entities.data.OperationMetadataValueImpl;
+import fr.ifremer.echobase.entities.data.Transect;
+import fr.ifremer.echobase.entities.references.OperationMetadata;
+import fr.ifremer.echobase.entities.references.Vessel;
+
/**
* Bean used as a row for import of {@link OperationMetadataValueImportModel}.
*
@@ -31,8 +38,45 @@
*/
public class OperationMetadataValueImportModelRow {
+ public static final String PROPERTY_VESSEL = Transect.PROPERTY_VESSEL;
+ public static final String PROPERTY_OPERATION = Transect.PROPERTY_OPERATION;
+
+ protected Operation operation;
+
+ protected Vessel vessel;
+
+ protected final OperationMetadataValue operationMetadataValue;
+
public OperationMetadataValueImportModelRow() {
+ operationMetadataValue = new OperationMetadataValueImpl();
}
+ public OperationMetadataValue getOperationMetadataValue() {
+ return operationMetadataValue;
+ }
+
+ public void setOperationMetadata(OperationMetadata operationMetadata) {
+ operationMetadataValue.setOperationMetadata(operationMetadata);
+ }
+
+ public void setDataValue(String dataValue) {
+ operationMetadataValue.setDataValue(dataValue);
+ }
+
+ public Operation getOperation() {
+ return operation;
+ }
+
+ public void setOperation(Operation operation) {
+ this.operation = operation;
+ }
+
+ public Vessel getVessel() {
+ return vessel;
+ }
+
+ public void setVessel(Vessel vessel) {
+ this.vessel = vessel;
+ }
}
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticData.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticData.java 2012-02-04 09:20:28 UTC (rev 306)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticData.java 2012-02-07 01:28:50 UTC (rev 307)
@@ -24,7 +24,6 @@
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 fr.ifremer.echobase.services.configurations.CellPositionReference;
@@ -45,8 +44,8 @@
/** Universe of existing voyages. */
protected Map<String, String> voyages;
- /** Universe of existing vessels. */
- protected Map<String, String> vessels;
+// /** Universe of existing vessels. */
+// protected Map<String, String> vessels;
protected Map<String, String> cellPositionReferences;
@@ -68,7 +67,7 @@
newService(EchoBaseServiceSupport.class);
voyages = loadSortAndDecorate(service, Voyage.class);
- vessels = loadSortAndDecorate(service, Vessel.class);
+// vessels = loadSortAndDecorate(service, Vessel.class);
cellPositionReferences = decorateEnums(CellPositionReference.values());
if (getModel().getCellPositionReference() == null) {
@@ -83,9 +82,9 @@
return voyages;
}
- public Map<String, String> getVessels() {
- return vessels;
- }
+// public Map<String, String> getVessels() {
+// return vessels;
+// }
public Map<String, String> getCellPositionReferences() {
return cellPositionReferences;
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureOperation.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureOperation.java 2012-02-04 09:20:28 UTC (rev 306)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureOperation.java 2012-02-07 01:28:50 UTC (rev 307)
@@ -24,7 +24,6 @@
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.OperationImportConfiguration;
@@ -44,8 +43,8 @@
/** Universe of existing voyages. */
protected Map<String, String> voyages;
- /** Universe of existing vessels. */
- protected Map<String, String> vessels;
+// /** Universe of existing vessels. */
+// protected Map<String, String> vessels;
public ConfigureOperation() {
super(OperationImportConfiguration.class);
@@ -65,7 +64,7 @@
newService(EchoBaseServiceSupport.class);
voyages = loadSortAndDecorate(service, Voyage.class);
- vessels = loadSortAndDecorate(service, Vessel.class);
+// vessels = loadSortAndDecorate(service, Vessel.class);
return INPUT;
}
@@ -74,9 +73,9 @@
return voyages;
}
- public Map<String, String> getVessels() {
- return vessels;
- }
+// public Map<String, String> getVessels() {
+// return vessels;
+// }
public void setOperationFile(File file) {
getModel().getOperationFile().setFile(file);
Modified: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureOperation-validation.xml
===================================================================
--- trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureOperation-validation.xml 2012-02-04 09:20:28 UTC (rev 306)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureOperation-validation.xml 2012-02-07 01:28:50 UTC (rev 307)
@@ -36,6 +36,12 @@
</field-validator>
</field>
+ <field name="model.transitId">
+ <field-validator type="nrequiredstring">
+ <message key="echobase.error.import.transit.required"/>
+ </field-validator>
+ </field>
+
<field name="model.vesselId">
<field-validator type="nrequiredstring">
<message key="echobase.error.import.vessel.required"/>
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-02-04 09:20:28 UTC (rev 306)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticData.jsp 2012-02-07 01:28:50 UTC (rev 307)
@@ -31,68 +31,21 @@
Configuration <s:text name="echobase.common.importDataMode.accousticData"/>
</title>
-<s:url id="getTransitsUrl" action="getTransits" namespace="/importData"/>
-<s:url id="getVesselsUrl" action="getVessels" namespace="/importData"/>
-
<script type="text/javascript">
+
jQuery(document).ready(function () {
- var voyageSelectBox = $('[name="model.voyageId"]');
- var transitSelectBox = $('[name="model.transitId"]');
- var vesselSelectBox = $('[name="model.vesselId"]');
-
- voyageSelectBox.change({transitSelectBox:transitSelectBox,
- vesselSelectBox:vesselSelectBox}, function (event) {
-
- $.updateSelectBoxContent('${getTransitsUrl}',
- {voyageId:this.value},
- 'transits',
- event.data.transitSelectBox
- );
- event.data.vesselSelectBox.html("");
- });
-
- transitSelectBox.change({vesselSelectBox:vesselSelectBox}, function (event) {
-
- $.updateSelectBoxContent('${getVesselsUrl}',
- {transitId:this.value},
- 'vessels',
- event.data.vesselSelectBox);
- });
-
- var voyageId = "${model.voyageId}";
-
- if (voyageId) {
-
- console.info("reload voyageId " + voyageId);
- voyageSelectBox.change(voyageId);
- $.updateSelectBoxContent(
- '${getTransitsUrl}',
- {voyageId:voyageId},
- 'transits',
- transitSelectBox,
- function () {
-
- var transitId = "${model.transitId}";
- if (transitId) {
-
- transitSelectBox.val(transitId);
- $.updateSelectBoxContent('${getVesselsUrl}',
- {transitId:transitId},
- 'vessels',
- vesselSelectBox, function () {
-
- var vesselId = "${model.vesselId}";
- if (vesselId) {
- vesselSelectBox.val(vesselId);
- }
- });
- }
- }
- );
- }
-
+ $.autoSelectVoyageTransitAndVessel(
+ $('[name="model.voyageId"]'),
+ $('[name="model.transitId"]'),
+ $('[name="model.vesselId"]'),
+ '<s:url action="getTransits" namespace="/importData"/>',
+ '<s:url action="getVessels" namespace="/importData"/>',
+ '<s:property value="model.voyageId"/>',
+ '<s:property value="model.transitId"/>',
+ '<s:property value="model.vesselId"/>'
+ );
});
</script>
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureOperation.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureOperation.jsp 2012-02-04 09:20:28 UTC (rev 306)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureOperation.jsp 2012-02-07 01:28:50 UTC (rev 307)
@@ -23,6 +23,9 @@
--%>
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
+<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
+<script type="text/javascript"
+ src="<s:url value='/js/gridHelper.js' />"></script>
<title>
Configuration <s:text name="echobase.common.importDataMode.operation"/>
@@ -31,7 +34,16 @@
<script type="text/javascript">
jQuery(document).ready(function () {
-
+ $.autoSelectVoyageTransitAndVessel(
+ $('[name="model.voyageId"]'),
+ $('[name="model.transitId"]'),
+ $('[name="model.vesselId"]'),
+ '<s:url action="getTransits" namespace="/importData"/>',
+ '<s:url action="getVessels" namespace="/importData"/>',
+ '<s:property value="model.voyageId"/>',
+ '<s:property value="model.transitId"/>',
+ '<s:property value="model.vesselId"/>'
+ );
});
</script>
@@ -47,10 +59,12 @@
label='%{getText("echobase.common.voyage")}'
list="voyages" headerKey="" headerValue=""/>
- <s:select key="model.vesselId" required="true"
- label='%{getText("echobase.common.vessel")}'
- list="vessels" headerKey="" headerValue=""/>
+ <sj:select key="model.transitId" required="true"
+ label='%{getText("echobase.common.transit")}'/>
+ <sj:select key="model.vesselId" required="true"
+ label='%{getText("echobase.common.vessel")}'/>
+
<s:file key="operationFile" required="true"
label='%{getText("echobase.common.operationFile")}'/>
Modified: trunk/echobase-ui/src/main/webapp/js/gridHelper.js
===================================================================
--- trunk/echobase-ui/src/main/webapp/js/gridHelper.js 2012-02-04 09:20:28 UTC (rev 306)
+++ trunk/echobase-ui/src/main/webapp/js/gridHelper.js 2012-02-07 01:28:50 UTC (rev 307)
@@ -166,6 +166,58 @@
$('table tr:odd').addClass('odd');
});
+ },
+
+ // auto-selection des voyages - transit - vessel
+ autoSelectVoyageTransitAndVessel:function (voyageSelectBox, transitSelectBox, vesselSelectBox, getTransitsUrl, getVesselsUrl, voyageId, transitId, vesselId) {
+
+ voyageSelectBox.change({transitSelectBox:transitSelectBox,
+ vesselSelectBox:vesselSelectBox,
+ getTransitsUrl:getTransitsUrl}, function (event) {
+
+ $.updateSelectBoxContent(event.data.getTransitsUrl,
+ {voyageId:this.value},
+ 'transits',
+ event.data.transitSelectBox
+ );
+ event.data.vesselSelectBox.html("");
+ });
+
+ transitSelectBox.change({vesselSelectBox:vesselSelectBox,
+ getVesselsUrl:getVesselsUrl}, function (event) {
+
+ $.updateSelectBoxContent(event.data.getVesselsUrl,
+ {transitId:this.value},
+ 'vessels',
+ event.data.vesselSelectBox);
+ });
+
+ if (voyageId) {
+
+ voyageSelectBox.change(voyageId);
+ $.updateSelectBoxContent(
+ getTransitsUrl,
+ {voyageId:voyageId},
+ 'transits',
+ transitSelectBox, function () {
+
+ if (transitId) {
+
+ transitSelectBox.val(transitId);
+ $.updateSelectBoxContent(
+ getVesselsUrl,
+ {transitId:transitId},
+ 'vessels',
+ vesselSelectBox, function () {
+
+ if (vesselId) {
+ vesselSelectBox.val(vesselId);
+ }
+ });
+ }
+ }
+ );
+ }
}
});
@@ -200,6 +252,9 @@
},
addEvenAndOddClasses:function (gridId) {
return $(document).addEvenAndOddClasses(gridId);
+ },
+ autoSelectVoyageTransitAndVessel:function (voyageSelectBox, transitSelectBox, vesselSelectBox, getTransitsUrl, getVesselsUrl, voyageId, transitId, vesselId) {
+ return $(document).autoSelectVoyageTransitAndVessel(voyageSelectBox, transitSelectBox, vesselSelectBox, getTransitsUrl, getVesselsUrl, voyageId, transitId, vesselId);
}
});
})(jQuery);
1
0
04 Feb '12
Author: tchemit
Date: 2012-02-04 10:20:28 +0100 (Sat, 04 Feb 2012)
New Revision: 306
Url: http://forge.codelutin.com/repositories/revision/echobase/306
Log:
- prepare on structures for data import
- reformat code
- rename EchoBaseServiceContextImpl to DefaultEchoBaseServiceContext
- add some code to avoid nasty TopiaException everywhere (but should be done in Topia instead)
Added:
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DefaultEchoBaseServiceContext.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportException.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/GearMetadataValueImportModel.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/GearMetadataValueImportModelRow.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationImportModel.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationImportModelRow.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationMetadataValueImportModel.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationMetadataValueImportModelRow.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/RegionCellAssociationImportModel.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/RegionCellAssociationImportModelRow.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/RegionCellImportModel.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/SampleDataImportModel.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/SampleDataImportModelRow.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/SampleImportModel.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/SampleImportModelRow.java
Removed:
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceContextImpl.java
Modified:
trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java
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/CatchesDataImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceSupport.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EmbeddedApplicationService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDbService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/OperationImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ResultsImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AbstractEchobaseActionConfiguration.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransitImportModelRow.java
trunk/echobase-services/src/main/resources/i18n/echobase-services_fr_FR.properties
trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/AbstractEchoBaseServiceTest.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/AreaOfOperationLoader.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/CellLoader.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/DataProcessingLoader.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/EchotypeCategoryLoader.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/OperationLoader.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoader.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleLoader.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SpeciesCategoryLoader.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/AbstractToolTest.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationListener.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseSession.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/EchoBaseActionSupport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/embeddedApplication/Build.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticData.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/GetVessels.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importDb/Import.java
Modified: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java
===================================================================
--- trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -37,8 +37,10 @@
import fr.ifremer.echobase.entities.references.DepthStratum;
import fr.ifremer.echobase.entities.references.EchotypeCategory;
import fr.ifremer.echobase.entities.references.Gear;
+import fr.ifremer.echobase.entities.references.GearMetadata;
import fr.ifremer.echobase.entities.references.Mission;
import fr.ifremer.echobase.entities.references.OperationEvent;
+import fr.ifremer.echobase.entities.references.OperationMetadata;
import fr.ifremer.echobase.entities.references.ReferenceDatum;
import fr.ifremer.echobase.entities.references.ReferenceDatumType;
import fr.ifremer.echobase.entities.references.SampleDataType;
@@ -248,6 +250,20 @@
}
};
+ public static final Function<OperationMetadata, String> OPERATION_METADATA_NAME = new Function<OperationMetadata, String>() {
+ @Override
+ public String apply(OperationMetadata input) {
+ return input.getName();
+ }
+ };
+
+ public static final Function<GearMetadata, String> GEAR_METADATA_TYPE = new Function<GearMetadata, String>() {
+ @Override
+ public String apply(GearMetadata input) {
+ return input.getType();
+ }
+ };
+
public static String getSpeciesCategoryKey(Species species, SizeCategory sizeCategory, SexCategory sexCategory) {
String key = species.getBaracoudaCode();
if (sizeCategory != null) {
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AbstractImportDataService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AbstractImportDataService.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AbstractImportDataService.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -23,12 +23,22 @@
*/
package fr.ifremer.echobase.services;
+import com.google.common.base.Function;
+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.services.configurations.AbstractImportConfiguration;
import org.nuiton.topia.TopiaException;
+import org.nuiton.topia.persistence.TopiaDAO;
+import org.nuiton.topia.persistence.TopiaEntity;
+import java.io.BufferedReader;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
import java.io.IOException;
+import java.io.Reader;
+import java.util.List;
import java.util.Map;
/**
@@ -40,5 +50,68 @@
public abstract class AbstractImportDataService<M extends AbstractImportConfiguration> extends EchoBaseServiceSupport {
public abstract Map<InputFile, CsvImportResult> startImport(M configuration,
- EchoBaseUser user) throws IOException, TopiaException;
+ EchoBaseUser user) throws ImportException;
+
+
+ protected Reader getInputFileReader(InputFile inputFile) throws EchoBaseTechnicalException {
+ try {
+ Reader reader = new BufferedReader(new FileReader(inputFile.getFile()));
+ return reader;
+ } catch (FileNotFoundException e) {
+ throw new EchoBaseTechnicalException(
+ "Could not find import file " + inputFile.getFile(), e);
+ }
+ }
+
+ protected void closeReader(Reader reader, InputFile inputFile) {
+ try {
+ reader.close();
+ } catch (IOException e) {
+ throw new EchoBaseTechnicalException("Could not close reader on file " + inputFile.getFile(), e);
+ }
+ }
+
+ protected <E extends TopiaEntity, K> Map<K, E> getEntitiesMap(Class<E> entityType, Function<E, K> function) {
+ List<E> allVoyages = getEntities(entityType);
+ Map<K, E> voyageMap = Maps.uniqueIndex(
+ allVoyages, function);
+ return voyageMap;
+ }
+
+ protected <E extends TopiaEntity> E create(TopiaDAO<E> dao) {
+ try {
+ E result = dao.create();
+ return result;
+ } catch (TopiaException e) {
+ throw new EchoBaseTechnicalException("Could not create entity", e);
+ }
+ }
+
+ protected <E extends TopiaEntity> E create(TopiaDAO<E> dao, E entity) {
+ try {
+ E result = dao.create(entity);
+ return result;
+ } catch (TopiaException e) {
+ throw new EchoBaseTechnicalException("Could not create entity", e);
+ }
+ }
+
+ protected <E extends TopiaEntity> E create(TopiaDAO<E> dao, Object... properties) {
+ try {
+ E result = dao.create(properties);
+ return result;
+ } catch (TopiaException e) {
+ throw new EchoBaseTechnicalException("Could not create entity", e);
+ }
+ }
+
+ protected <E extends TopiaEntity> E findByProperties(TopiaDAO<E> dao, String propertyName, Object value,
+ Object... others) {
+ try {
+ E result = dao.findByProperties(propertyName, value, others);
+ return result;
+ } catch (TopiaException e) {
+ throw new EchoBaseTechnicalException("Could not obtain query db", e);
+ }
+ }
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticDataImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticDataImportService.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticDataImportService.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -46,17 +46,13 @@
import fr.ifremer.echobase.services.configurations.AccousticDataImportConfiguration;
import fr.ifremer.echobase.services.csv.AcousticDataImportModel;
import fr.ifremer.echobase.services.csv.AcousticDataImportModelRow;
-import org.nuiton.topia.TopiaException;
import org.nuiton.util.csv.Import;
+import org.nuiton.util.csv.ImportRuntimeException;
-import java.io.BufferedReader;
-import java.io.FileReader;
-import java.io.IOException;
import java.io.Reader;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
-import java.util.List;
import java.util.Map;
/**
@@ -69,36 +65,26 @@
@Override
public Map<InputFile, CsvImportResult> startImport(AccousticDataImportConfiguration configuration,
- EchoBaseUser user) throws IOException, TopiaException {
+ EchoBaseUser user) throws ImportException {
Map<InputFile, CsvImportResult> result = Maps.newHashMap();
- Transit transit = getEntityById(Transit.class, configuration.getTransitId());
- Vessel vessel = getEntityById(Vessel.class, configuration.getVesselId());
+ Transit transit = getEntityById(Transit.class,
+ configuration.getTransitId());
+ Vessel vessel = getEntityById(Vessel.class,
+ configuration.getVesselId());
// find out the correct transect to use
Transect transect = transit.getTransect(vessel);
- List<AcousticInstrument> acousticInstruments = getEntities(AcousticInstrument.class);
- Map<String, AcousticInstrument> acousticInstrumentsById = Maps.uniqueIndex(
- acousticInstruments, EchoBaseFunctions.ACOUSTIC_INSTRUMENT_ID);
-
- List<CellType> cellTypes = getEntities(CellType.class);
- Map<String, CellType> cellTypesById = Maps.uniqueIndex(
- cellTypes, EchoBaseFunctions.CELL_TYPE_ID);
-
- List<DataMetadata> dataMetadatas = getEntities(DataMetadata.class);
- Map<String, DataMetadata> dataMetadatasByName = Maps.uniqueIndex(
- dataMetadatas, EchoBaseFunctions.DATA_METADATA_NAME);
-
- CellType esduCellType = cellTypesById.get("Esdu");
+ CellType esduCellType = getEntityByProperty(
+ CellType.class, CellType.PROPERTY_ID, "Esdu");
Preconditions.checkNotNull(esduCellType);
- CellType elementaryCellType = cellTypesById.get("Elementary");
+ CellType elementaryCellType = getEntityByProperty(
+ CellType.class, CellType.PROPERTY_ID, "Elementary");
Preconditions.checkNotNull(elementaryCellType);
importMoviesFile(transect,
- acousticInstrumentsById,
- dataMetadatasByName,
esduCellType,
elementaryCellType,
configuration,
@@ -110,31 +96,38 @@
new SimpleDateFormat("yyyy-MM-dd hh:mm:ss'Z'");
private void importMoviesFile(Transect transect,
- Map<String, AcousticInstrument> instrumentsById,
- Map<String, DataMetadata> dataMetadatasByName,
CellType esduCellType,
CellType elementaryCellType,
AccousticDataImportConfiguration configuration,
- InputFile inputFile) throws TopiaException, IOException {
+ InputFile inputFile) throws ImportException {
- AcousticDataImportModel csvModel = new AcousticDataImportModel(serviceContext.getConfiguration().getCsvSeparator());
+ Map<String, AcousticInstrument> instrumentsById =
+ getEntitiesMap(AcousticInstrument.class,
+ EchoBaseFunctions.ACOUSTIC_INSTRUMENT_ID);
+ Map<String, DataMetadata> dataMetadatasByName = getEntitiesMap(
+ DataMetadata.class, EchoBaseFunctions.DATA_METADATA_NAME);
+
+ AcousticDataImportModel csvModel = new AcousticDataImportModel(
+ getCsvSeparator());
+
DataAcquisitionDAO dataAcquisitionDAO =
- (DataAcquisitionDAO) getDAO(DataAcquisition.class);
+ getDAO(DataAcquisition.class, DataAcquisitionDAO.class);
DataProcessingDAO dataProcessingDAO =
- (DataProcessingDAO) getDAO(DataProcessing.class);
- CellDAO cellDAO = (CellDAO) getDAO(Cell.class);
- DataDAO dataDAO = (DataDAO) getDAO(Data.class);
+ getDAO(DataProcessing.class, DataProcessingDAO.class);
+ CellDAO cellDAO = getDAO(Cell.class, CellDAO.class);
+ DataDAO dataDAO = getDAO(Data.class, DataDAO.class);
boolean addDataAcquisition = configuration.isAddDataAcquisition();
- Reader reader = new BufferedReader(new FileReader(inputFile.getFile()));
+ Reader reader = getInputFileReader(inputFile);
try {
- Import<AcousticDataImportModelRow> importer = Import.newImport(csvModel, reader);
+ Import<AcousticDataImportModelRow> importer =
+ Import.newImport(csvModel, reader);
DataAcquisition dataAcquisition = null;
DataProcessing dataProcessing = null;
Cell esduCell = null;
- Cell elementaryCell = null;
+ Cell elementaryCell;
for (AcousticDataImportModelRow row : importer) {
// Build the row acoustic instrument
@@ -216,9 +209,9 @@
// this is a esdu cell row
// create esdu cell
- esduCell = cellDAO.create(
- Cell.PROPERTY_CELL_TYPE, esduCellType,
- Cell.PROPERTY_NAME, esduCellId
+ esduCell = create(cellDAO,
+ Cell.PROPERTY_CELL_TYPE, esduCellType,
+ Cell.PROPERTY_NAME, esduCellId
);
// add it to data processing
@@ -246,9 +239,9 @@
// create the elementary cell
- elementaryCell = cellDAO.create(
- Cell.PROPERTY_CELL_TYPE, elementaryCellType,
- Cell.PROPERTY_NAME, elementaryCellId
+ elementaryCell = create(cellDAO,
+ Cell.PROPERTY_CELL_TYPE, elementaryCellType,
+ Cell.PROPERTY_NAME, elementaryCellId
);
// add it to esdu cell
@@ -283,16 +276,18 @@
}
+ } catch (ImportRuntimeException e) {
+ throw new ImportException(inputFile, e);
} finally {
- reader.close();
+ closeReader(reader, inputFile);
}
}
- private void createEsduCellData(AccousticDataImportConfiguration configuration,
- Cell cell,
- Map<String, DataMetadata> dataMetadatasByName,
- AcousticDataImportModelRow row,
- DataDAO dao) throws TopiaException {
+ protected void createEsduCellData(AccousticDataImportConfiguration configuration,
+ Cell cell,
+ Map<String, DataMetadata> dataMetadatasByName,
+ AcousticDataImportModelRow row,
+ DataDAO dao) {
DataMetadata dataMetadata;
Data data;
@@ -304,35 +299,35 @@
// create Latitude data
dataMetadata = dataMetadatasByName.get("Latitude" + suffix);
dataValue = row.getEsduCellDataLatitude();
- data = dao.create(Data.PROPERTY_DATA_METADATA, dataMetadata);
+ data = create(dao, Data.PROPERTY_DATA_METADATA, dataMetadata);
data.setDataValue(dataValue);
cell.addData(data);
// create Longitude data
dataMetadata = dataMetadatasByName.get("Longitude" + suffix);
dataValue = row.getEsduCellDataLongitude();
- data = dao.create(Data.PROPERTY_DATA_METADATA, dataMetadata);
+ data = create(dao, Data.PROPERTY_DATA_METADATA, dataMetadata);
data.setDataValue(dataValue);
cell.addData(data);
// create Depth data
dataMetadata = dataMetadatasByName.get("DepthRefSurface" + suffix);
dataValue = row.getEsduCellDataDepth();
- data = dao.create(Data.PROPERTY_DATA_METADATA, dataMetadata);
+ data = create(dao, Data.PROPERTY_DATA_METADATA, dataMetadata);
data.setDataValue(dataValue);
cell.addData(data);
// create Time data
dataMetadata = dataMetadatasByName.get("Time" + suffix);
dataValue = cellDateFormat.format(row.getCellDateStart());
- data = dao.create(Data.PROPERTY_DATA_METADATA, dataMetadata);
+ data = create(dao, Data.PROPERTY_DATA_METADATA, dataMetadata);
data.setDataValue(dataValue);
cell.addData(data);
// create AcousticDensity data
dataMetadata = dataMetadatasByName.get("sa");
dataValue = row.getEsduCellDataAcousticDensity();
- data = dao.create(Data.PROPERTY_DATA_METADATA, dataMetadata);
+ data = create(dao, Data.PROPERTY_DATA_METADATA, dataMetadata);
data.setDataValue(dataValue);
cell.addData(data);
}
@@ -341,7 +336,7 @@
Cell cell,
Map<String, DataMetadata> dataMetadatasByName,
AcousticDataImportModelRow row,
- DataDAO dao) throws TopiaException {
+ DataDAO dao) {
DataMetadata dataMetadata;
Data data;
@@ -370,21 +365,21 @@
// create depth start data
dataMetadata = dataMetadatasByName.get(startMeta);
dataValue = row.getCellDepthStart();
- data = dao.create(Data.PROPERTY_DATA_METADATA, dataMetadata);
+ data = create(dao, Data.PROPERTY_DATA_METADATA, dataMetadata);
data.setDataValue(dataValue);
cell.addData(data);
// create depth end data
dataMetadata = dataMetadatasByName.get(endMeta);
dataValue = row.getCellDepthEnd();
- data = dao.create(Data.PROPERTY_DATA_METADATA, dataMetadata);
+ data = create(dao, Data.PROPERTY_DATA_METADATA, dataMetadata);
data.setDataValue(dataValue);
cell.addData(data);
// create acoustic density data
dataMetadata = dataMetadatasByName.get("sa");
dataValue = row.getCellSa();
- data = dao.create(Data.PROPERTY_DATA_METADATA, dataMetadata);
+ data = create(dao, Data.PROPERTY_DATA_METADATA, dataMetadata);
data.setDataValue(dataValue);
cell.addData(data);
@@ -395,7 +390,7 @@
String softwareVersion,
String soundSpeedCalculations,
AcousticDataImportModelRow row,
- DataAcquisitionDAO dataAcquisitionDAO) throws TopiaException {
+ DataAcquisitionDAO dataAcquisitionDAO) {
String transceiverAcquisitionAbsorptionDescription =
configuration.getTransceiverAcquisitionAbsorptionDescription();
@@ -404,7 +399,7 @@
String pingDutyCycle = configuration.getPingDutyCycle();
String echosounderSoundSpeed = configuration.getEchosounderSoundSpeed();
- DataAcquisition dataAcquisition = dataAcquisitionDAO.create();
+ DataAcquisition dataAcquisition = create(dataAcquisitionDAO);
// fill from manual configuration
dataAcquisition.setAcousticInstrument(instrument);
@@ -450,7 +445,7 @@
String softwareVersion,
String soundSpeedCalculations,
AcousticDataImportModelRow row,
- DataProcessingDAO dataProcessingDAO) throws TopiaException {
+ DataProcessingDAO dataProcessingDAO) {
String transceiverAcquisitionAbsorptionDescription =
configuration.getTransceiverAcquisitionAbsorptionDescription();
@@ -462,7 +457,7 @@
String acousticDensityUnit = configuration.getAcousticDensityUnit();
String notes = configuration.getNotes();
- DataProcessing dataProcessing = dataProcessingDAO.create();
+ DataProcessing dataProcessing = create(dataProcessingDAO);
// fill from manual configuration
dataProcessing.setProcessingTemplate(processingTemplate);
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesDataImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesDataImportService.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesDataImportService.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -26,14 +26,25 @@
import com.google.common.collect.Maps;
import fr.ifremer.echobase.InputFile;
import fr.ifremer.echobase.entities.EchoBaseUser;
+import fr.ifremer.echobase.entities.data.GearMetadataValue;
+import fr.ifremer.echobase.entities.data.GearMetadataValueDAO;
+import fr.ifremer.echobase.entities.data.Operation;
+import fr.ifremer.echobase.entities.data.OperationDAO;
import fr.ifremer.echobase.entities.data.Voyage;
import fr.ifremer.echobase.entities.references.Vessel;
import fr.ifremer.echobase.services.configurations.CatchesDataImportConfiguration;
+import fr.ifremer.echobase.services.csv.SampleDataImportModel;
+import fr.ifremer.echobase.services.csv.SampleDataImportModelRow;
+import fr.ifremer.echobase.services.csv.SampleImportModel;
+import fr.ifremer.echobase.services.csv.SampleImportModelRow;
+import org.nuiton.util.csv.Import;
+import org.nuiton.util.csv.ImportRuntimeException;
+import java.io.Reader;
import java.util.Map;
/**
- * Service to launch a "catches data" import.
+ * Service to launch a "catches sample data" import.
*
* @author tchemit <chemit(a)codelutin.com>
* @since 0.3
@@ -42,7 +53,7 @@
@Override
public Map<InputFile, CsvImportResult> startImport(CatchesDataImportConfiguration configuration,
- EchoBaseUser user) {
+ EchoBaseUser user) throws ImportException {
Map<InputFile, CsvImportResult> result = Maps.newHashMap();
Voyage voyage = getEntityById(Voyage.class,
@@ -58,12 +69,60 @@
return result;
}
- private void importSampleFile(InputFile inputFile, Voyage voyage, Vessel vessel) {
- char csvSeparator = serviceContext.getConfiguration().getCsvSeparator();
+ private void importSampleFile(InputFile inputFile,
+ Voyage voyage,
+ Vessel vessel) throws ImportException {
+
+ SampleImportModel csvModel = new SampleImportModel(getCsvSeparator());
+
+ OperationDAO dao = getDAO(Operation.class, OperationDAO.class);
+ GearMetadataValueDAO metadataValuedao =
+ getDAO(GearMetadataValue.class, GearMetadataValueDAO.class);
+
+ Reader reader = getInputFileReader(inputFile);
+ try {
+ Import<SampleImportModelRow> importer =
+ Import.newImport(csvModel, reader);
+
+ for (SampleImportModelRow row : importer) {
+
+ //TODO
+
+ }
+
+ } catch (ImportRuntimeException e) {
+ throw new ImportException(inputFile, e);
+ } finally {
+ closeReader(reader, inputFile);
+ }
}
- private void importSampleDataFile(InputFile inputFile, Voyage voyage, Vessel vessel) {
- char csvSeparator = serviceContext.getConfiguration().getCsvSeparator();
+ private void importSampleDataFile(InputFile inputFile,
+ Voyage voyage,
+ Vessel vessel) throws ImportException {
+
+ SampleDataImportModel csvModel = new SampleDataImportModel(getCsvSeparator());
+
+ OperationDAO dao = getDAO(Operation.class, OperationDAO.class);
+ GearMetadataValueDAO metadataValuedao =
+ getDAO(GearMetadataValue.class, GearMetadataValueDAO.class);
+
+ Reader reader = getInputFileReader(inputFile);
+ try {
+ Import<SampleDataImportModelRow> importer =
+ Import.newImport(csvModel, reader);
+
+ for (SampleDataImportModelRow row : importer) {
+
+ //TODO
+
+ }
+
+ } catch (ImportRuntimeException e) {
+ throw new ImportException(inputFile, e);
+ } finally {
+ closeReader(reader, inputFile);
+ }
}
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataImportService.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataImportService.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -30,8 +30,11 @@
import fr.ifremer.echobase.InputFile;
import fr.ifremer.echobase.entities.EchoBaseUser;
import fr.ifremer.echobase.entities.data.Transect;
+import fr.ifremer.echobase.entities.data.TransectDAO;
import fr.ifremer.echobase.entities.data.Transit;
+import fr.ifremer.echobase.entities.data.TransitDAO;
import fr.ifremer.echobase.entities.data.Voyage;
+import fr.ifremer.echobase.entities.data.VoyageDAO;
import fr.ifremer.echobase.entities.references.AreaOfOperation;
import fr.ifremer.echobase.entities.references.Mission;
import fr.ifremer.echobase.entities.references.MissionDAO;
@@ -44,18 +47,16 @@
import fr.ifremer.echobase.services.csv.TransitImportModelRow;
import fr.ifremer.echobase.services.csv.VoyageImportModel;
import org.nuiton.topia.TopiaException;
-import org.nuiton.topia.persistence.TopiaDAO;
import org.nuiton.util.csv.Import;
import org.nuiton.util.csv.ImportModel;
+import org.nuiton.util.csv.ImportRuntimeException;
-import java.io.BufferedReader;
-import java.io.FileReader;
-import java.io.IOException;
import java.io.Reader;
import java.util.Date;
-import java.util.List;
import java.util.Map;
+import static org.nuiton.i18n.I18n._;
+
/**
* Service to launch a "common data" import.
*
@@ -66,7 +67,7 @@
@Override
public Map<InputFile, CsvImportResult> startImport(CommonDataImportConfiguration configuration,
- EchoBaseUser user) throws IOException, TopiaException {
+ EchoBaseUser user) throws ImportException {
Map<InputFile, CsvImportResult> result = Maps.newHashMap();
@@ -84,61 +85,51 @@
getEntityById(AreaOfOperation.class,
configuration.getAreaOfOperationId());
-
importVoyageFile(configuration.getVoyageFile(),
mission,
areaOfOperation,
configuration.getVoyageDescription(),
configuration.getDatum());
- List<Voyage> allVoyages = getEntities(Voyage.class);
- Map<String, Voyage> voyageMap = Maps.uniqueIndex(
- allVoyages, EchoBaseFunctions.VOYAGE_NAME);
importTransitFile(configuration.getTransitFile(),
- voyageMap,
configuration.getTransitRelatedActivity());
+
importTransectFile(configuration.getTransectFile(),
vessel,
- voyageMap,
configuration);
-
-
}
break;
case TRANSECT: {
- List<Voyage> allVoyages = getEntities(Voyage.class);
- Map<String, Voyage> voyageMap = Maps.uniqueIndex(
- allVoyages, EchoBaseFunctions.VOYAGE_NAME);
+
importTransectFile(configuration.getTransectFile(),
vessel,
- voyageMap,
configuration);
}
break;
}
-
commitTransaction("Could not commit transaction of common data import");
return result;
}
+
public Mission createMission(Mission mission) throws MissionNameAlreadyExistException {
-
+
Preconditions.checkNotNull(mission);
-
+
try {
- MissionDAO dao = (MissionDAO) getDAO(Mission.class);
+ MissionDAO dao = getDAO(Mission.class, MissionDAO.class);
// check mission name is unique
- boolean exists = dao.existByProperties(Mission.PROPERTY_NAME,
+ boolean exists = dao.existByProperties(Mission.PROPERTY_NAME,
mission.getName());
-
+
if (exists) {
throw new MissionNameAlreadyExistException();
}
- Mission result = dao.create(mission);
+ Mission result = create(dao, mission);
commitTransaction("Could not create mission " +
mission.getName());
return result;
@@ -151,43 +142,57 @@
Mission mission,
AreaOfOperation areaOfOperation,
String voyageDescription,
- String datum) throws IOException, TopiaException {
+ String datum) throws ImportException {
+ VoyageDAO dao = getDAO(Voyage.class, VoyageDAO.class);
- ImportModel<Voyage> csvModel = new VoyageImportModel(serviceContext.getConfiguration().getCsvSeparator());
+ ImportModel<Voyage> csvModel =
+ new VoyageImportModel(getCsvSeparator());
- TopiaDAO<Voyage> dao = getDAO(Voyage.class);
- Reader reader = new BufferedReader(new FileReader(inputFile.getFile()));
+
+ Reader reader = getInputFileReader(inputFile);
+ Import<Voyage> importer = Import.newImport(csvModel, reader);
try {
- Import<Voyage> importer = Import.newImport(csvModel, reader);
for (Voyage voyage : importer) {
- voyage.setMission(mission);
- voyage.setAreaOfOperation(areaOfOperation);
- voyage.setDescription(voyageDescription);
- voyage.setDatum(datum);
- dao.create(voyage);
+ Voyage createdVoyage = create(dao);
+
+ createdVoyage.setMission(mission);
+ createdVoyage.setAreaOfOperation(areaOfOperation);
+ createdVoyage.setDescription(voyageDescription);
+ createdVoyage.setDatum(datum);
+ createdVoyage.setName(voyage.getName());
+ createdVoyage.setStartDate(voyage.getStartDate());
+ createdVoyage.setEndDate(voyage.getEndDate());
+ createdVoyage.setStartPort(voyage.getStartPort());
+ createdVoyage.setEndPort(voyage.getEndPort());
}
+ } catch (ImportRuntimeException e) {
+ throw new ImportException(inputFile, e);
} finally {
- reader.close();
+ closeReader(reader, inputFile);
}
}
protected void importTransitFile(InputFile inputFile,
- Map<String, Voyage> voyageMap,
- String relatedActivity) throws TopiaException, IOException {
- TransitImportModel csvModel = new TransitImportModel(serviceContext.getConfiguration().getCsvSeparator(), voyageMap);
+ String relatedActivity) throws ImportException {
- TopiaDAO<Transit> dao = getDAO(Transit.class);
+ Map<String, Voyage> voyageMap = getEntitiesMap(
+ Voyage.class, EchoBaseFunctions.VOYAGE_NAME);
- Reader reader = new BufferedReader(new FileReader(inputFile.getFile()));
+ TransitImportModel csvModel = new TransitImportModel(getCsvSeparator(), voyageMap);
+
+ TransitDAO dao = getDAO(Transit.class, TransitDAO.class);
+
+ Reader reader = getInputFileReader(inputFile);
try {
- Import<TransitImportModelRow> importer = Import.newImport(csvModel, reader);
+ Import<TransitImportModelRow> importer =
+ Import.newImport(csvModel, reader);
for (TransitImportModelRow row : importer) {
Voyage voyage = row.getVoyage();
- Transit transit = dao.create();
+ Transit transit = create(dao);
transit.setDescription(row.getDescription());
transit.setStartLocality(row.getStartLocality());
@@ -199,27 +204,31 @@
voyage.addTransit(transit);
}
+ } catch (ImportRuntimeException e) {
+ throw new ImportException(inputFile, e);
} finally {
- reader.close();
+ closeReader(reader, inputFile);
}
}
private void importTransectFile(InputFile inputFile,
Vessel vessel,
- Map<String, Voyage> voyageMap,
CommonDataImportConfiguration configuration
- ) throws TopiaException, IOException {
+ ) throws ImportException {
+ Map<String, Voyage> voyageMap = getEntitiesMap(
+ Voyage.class, EchoBaseFunctions.VOYAGE_NAME);
+
String datum = configuration.getDatum();
String license = configuration.getTransectLicence();
String geospatialVerticalPositive = configuration.getTransectGeospatialVerticalPositive();
String binUnitsPingAxis = configuration.getTransectBinUnitsPingAxis();
- TransectImportModel csvModel = new TransectImportModel(serviceContext.getConfiguration().getCsvSeparator(), voyageMap);
+ TransectImportModel csvModel = new TransectImportModel(getCsvSeparator(), voyageMap);
- TopiaDAO<Transect> dao = getDAO(Transect.class);
+ TransectDAO dao = getDAO(Transect.class, TransectDAO.class);
- Reader reader = new BufferedReader(new FileReader(inputFile.getFile()));
+ Reader reader = getInputFileReader(inputFile);
try {
Import<TransectImportModelRow> importer =
Import.newImport(csvModel, reader);
@@ -232,14 +241,13 @@
Transit transit = voyage.getTransit(timeCoverageStart, timeCoverageEnd);
if (transit == null) {
- throw new EchoBaseTechnicalException(
- "Could not find transit for voyage " + voyage.getName() + " between " + timeCoverageStart + " and " + timeCoverageEnd);
+ throw new ImportException(
+ _("echobase.importError.no.transit.between.date",
+ voyage.getName(), timeCoverageStart, timeCoverageEnd));
}
- Transect transect = dao.create(
- Transect.PROPERTY_VESSEL, vessel
- );
-
+ Transect transect = create(dao);
+ transect.setVessel(vessel);
transect.setTitle(row.getTitle());
transect.setTransectAbstract(row.getTransectAbstract());
transect.setComment(row.getComment());
@@ -265,8 +273,10 @@
transit.addTransect(transect);
}
+ } catch (ImportRuntimeException e) {
+ throw new ImportException(inputFile, e);
} finally {
- reader.close();
+ closeReader(reader, inputFile);
}
}
Copied: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DefaultEchoBaseServiceContext.java (from rev 305, trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceContextImpl.java)
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DefaultEchoBaseServiceContext.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DefaultEchoBaseServiceContext.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -0,0 +1,122 @@
+/*
+ * #%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.base.Preconditions;
+import fr.ifremer.echobase.EchoBaseConfiguration;
+import fr.ifremer.echobase.entities.meta.DbMeta;
+import org.nuiton.topia.TopiaContext;
+
+import java.util.Locale;
+
+/**
+ * Instances of this class will be given to service factory.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.1
+ */
+public class DefaultEchoBaseServiceContext implements EchoBaseServiceContext {
+
+ protected TopiaContext transaction;
+
+ protected EchoBaseServiceFactory serviceFactory;
+
+ protected EchoBaseConfiguration configuration;
+
+ protected Locale locale;
+
+ protected DbMeta dbMeta;
+
+ public static EchoBaseServiceContext newContext(
+ EchoBaseServiceContext serviceContext,
+ TopiaContext transaction) {
+ return newContext(serviceContext.getLocale(),
+ transaction,
+ serviceContext.getConfiguration(),
+ serviceContext.getDbMeta(),
+ serviceContext.getServiceFactory()
+ );
+ }
+
+ public static EchoBaseServiceContext newContext(
+ Locale locale,
+ TopiaContext transaction,
+ EchoBaseConfiguration configuration,
+ DbMeta dbMeta,
+ EchoBaseServiceFactory serviceFactory) {
+ return new DefaultEchoBaseServiceContext(locale,
+ transaction,
+ configuration,
+ dbMeta,
+ serviceFactory);
+ }
+
+ protected DefaultEchoBaseServiceContext(Locale locale,
+ TopiaContext transaction,
+ EchoBaseConfiguration configuration,
+ DbMeta dbMeta,
+ EchoBaseServiceFactory serviceFactory) {
+ this.locale = locale;
+ this.transaction = transaction;
+ this.configuration = configuration;
+ this.dbMeta = dbMeta;
+ this.serviceFactory = serviceFactory;
+ }
+
+ @Override
+ public TopiaContext getTransaction() {
+ Preconditions.checkNotNull(transaction);
+ return transaction;
+ }
+
+ @Override
+ public void setTransaction(TopiaContext transaction) {
+ this.transaction = transaction;
+ }
+
+ @Override
+ public Locale getLocale() {
+ return locale;
+ }
+
+ @Override
+ public <E extends EchoBaseService> E newService(Class<E> clazz) {
+ return serviceFactory.newService(clazz, this);
+ }
+
+ @Override
+ public EchoBaseConfiguration getConfiguration() {
+ return configuration;
+ }
+
+ @Override
+ public DbMeta getDbMeta() {
+ return dbMeta;
+ }
+
+ @Override
+ public EchoBaseServiceFactory getServiceFactory() {
+ return serviceFactory;
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DefaultEchoBaseServiceContext.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/EchoBaseServiceContextImpl.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceContextImpl.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceContextImpl.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -1,122 +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.base.Preconditions;
-import fr.ifremer.echobase.EchoBaseConfiguration;
-import fr.ifremer.echobase.entities.meta.DbMeta;
-import org.nuiton.topia.TopiaContext;
-
-import java.util.Locale;
-
-/**
- * Instances of this class will be given to service factory.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.1
- */
-public class EchoBaseServiceContextImpl implements EchoBaseServiceContext {
-
- protected TopiaContext transaction;
-
- protected EchoBaseServiceFactory serviceFactory;
-
- protected EchoBaseConfiguration configuration;
-
- protected Locale locale;
-
- protected DbMeta dbMeta;
-
- public static EchoBaseServiceContext newContext(
- EchoBaseServiceContext serviceContext,
- TopiaContext transaction) {
- return newContext(serviceContext.getLocale(),
- transaction,
- serviceContext.getConfiguration(),
- serviceContext.getDbMeta(),
- serviceContext.getServiceFactory()
- );
- }
-
- public static EchoBaseServiceContext newContext(
- Locale locale,
- TopiaContext transaction,
- EchoBaseConfiguration configuration,
- DbMeta dbMeta,
- EchoBaseServiceFactory serviceFactory) {
- return new EchoBaseServiceContextImpl(locale,
- transaction,
- configuration,
- dbMeta,
- serviceFactory);
- }
-
- protected EchoBaseServiceContextImpl(Locale locale,
- TopiaContext transaction,
- EchoBaseConfiguration configuration,
- DbMeta dbMeta,
- EchoBaseServiceFactory serviceFactory) {
- this.locale = locale;
- this.transaction = transaction;
- this.configuration = configuration;
- this.dbMeta = dbMeta;
- this.serviceFactory = serviceFactory;
- }
-
- @Override
- public TopiaContext getTransaction() {
- Preconditions.checkNotNull(transaction);
- return transaction;
- }
-
- @Override
- public void setTransaction(TopiaContext transaction) {
- this.transaction = transaction;
- }
-
- @Override
- public Locale getLocale() {
- return locale;
- }
-
- @Override
- public <E extends EchoBaseService> E newService(Class<E> clazz) {
- return serviceFactory.newService(clazz, this);
- }
-
- @Override
- public EchoBaseConfiguration getConfiguration() {
- return configuration;
- }
-
- @Override
- public DbMeta getDbMeta() {
- return dbMeta;
- }
-
- @Override
- public EchoBaseServiceFactory getServiceFactory() {
- return serviceFactory;
- }
-}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceSupport.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceSupport.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceSupport.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -58,12 +58,12 @@
this.serviceContext = serviceContext;
}
- public <E extends TopiaEntity> List<E> getEntities(EchoBaseEntityEnum entityType) {
+ public final <E extends TopiaEntity> List<E> getEntities(EchoBaseEntityEnum entityType) {
Class<E> contract = (Class<E>) entityType.getContract();
return getEntities(contract);
}
- public <E extends TopiaEntity> List<E> getEntities(Class<E> entityType) {
+ public final <E extends TopiaEntity> List<E> getEntities(Class<E> entityType) {
Preconditions.checkNotNull(entityType);
try {
List<E> result = getDAO(entityType).findAll();
@@ -74,7 +74,7 @@
}
}
- public <E extends TopiaEntity> E getEntityById(Class<E> entityType, String id) {
+ public final <E extends TopiaEntity> E getEntityById(Class<E> entityType, String id) {
Preconditions.checkNotNull(entityType);
Preconditions.checkArgument(StringUtils.isNotEmpty(id));
try {
@@ -87,23 +87,42 @@
}
}
- protected TopiaContext getTransaction() {
+ public final <E extends TopiaEntity> E getEntityByProperty(Class<E> entityType,
+ String propertyId,
+ Object propertyValue) {
+ Preconditions.checkNotNull(entityType);
+ Preconditions.checkArgument(StringUtils.isNotEmpty(propertyId));
+ try {
+ E result = getDAO(entityType).findByProperty(propertyId, propertyValue);
+ return result;
+ } catch (TopiaException eee) {
+ throw new EchoBaseTechnicalException(
+ "Could not obtain data of property [" + propertyId + "] for type " +
+ entityType, eee);
+ }
+ }
+
+ protected final TopiaContext getTransaction() {
return serviceContext.getTransaction();
}
- protected Locale getLocale() {
+ protected final Locale getLocale() {
return serviceContext.getLocale();
}
- protected DbMeta getDbMeta() {
+ protected final DbMeta getDbMeta() {
return serviceContext.getDbMeta();
}
- protected EchoBaseConfiguration getConfiguration() {
+ protected final EchoBaseConfiguration getConfiguration() {
return serviceContext.getConfiguration();
}
- protected <E extends EchoBaseService> E getService(Class<E> serviceClass) {
+ protected char getCsvSeparator() {
+ return getConfiguration().getCsvSeparator();
+ }
+
+ protected final <E extends EchoBaseService> E getService(Class<E> serviceClass) {
if (services == null) {
services = Maps.newHashMap();
}
@@ -115,20 +134,31 @@
return service;
}
- protected <E extends TopiaEntity> TopiaDAO<E> getDAO(EchoBaseEntityEnum entityEnum) throws TopiaException {
+ protected final <E extends TopiaEntity> TopiaDAO<E> getDAO(EchoBaseEntityEnum entityEnum) {
TopiaDAO<E> dao = getDAO((Class<E>) entityEnum.getContract());
return dao;
}
- protected <E extends TopiaEntity> TopiaDAO<E> getDAO(Class<E> entityType) throws TopiaException {
- TopiaDAO<E> dao = EchoBaseDAOHelper.<E, TopiaDAO<E>>getDAO(
- getTransaction(),
- entityType);
+ protected final <E extends TopiaEntity> TopiaDAO<E> getDAO(Class<E> entityType) {
+ try {
+ TopiaDAO<E> dao = EchoBaseDAOHelper.<E, TopiaDAO<E>>getDAO(
+ getTransaction(),
+ entityType);
- return dao;
+ return dao;
+ } catch (TopiaException e) {
+ throw new EchoBaseTechnicalException("Could not obtain dao for type " + entityType, e);
+ }
}
- public void commitTransaction(String errorMessage) {
+ protected final <E extends TopiaEntity, D extends TopiaDAO<E>> D getDAO(Class<E> entityType, Class<D> daoType) {
+ TopiaDAO<E> dao = getDAO(
+ entityType);
+ Preconditions.checkState(daoType.isAssignableFrom(dao.getClass()));
+ return (D) dao;
+ }
+
+ public final void commitTransaction(String errorMessage) {
try {
getTransaction().commitTransaction();
} catch (TopiaException eee) {
@@ -136,7 +166,7 @@
}
}
- protected void flushTransaction() throws TopiaException {
+ protected final void flushTransaction() throws TopiaException {
TopiaContextImplementor tx = (TopiaContextImplementor) getTransaction();
tx.getHibernate().flush();
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EmbeddedApplicationService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EmbeddedApplicationService.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EmbeddedApplicationService.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -185,8 +185,8 @@
// create new service context (with new transaction)
EchoBaseServiceContext newServiceContext =
- EchoBaseServiceContextImpl.newContext(serviceContext,
- topiaContext);
+ DefaultEchoBaseServiceContext.newContext(serviceContext,
+ topiaContext);
// get user service from h2 db
UserService userService =
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-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDbService.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -164,7 +164,7 @@
static class MyImportToMap extends ImportToMap {
public static MyImportToMap newImportToMap(ImportModel<Map<String, Object>> model,
- Reader reader) {
+ Reader reader) {
return new MyImportToMap(model, reader);
}
Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportException.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportException.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportException.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -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 fr.ifremer.echobase.InputFile;
+import org.nuiton.util.csv.ImportRuntimeException;
+
+import static org.nuiton.i18n.I18n._;
+
+/**
+ * Exception when a import new data failed.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class ImportException extends Exception {
+
+ private static final long serialVersionUID = 1L;
+
+ public ImportException(String message) {
+ super(message);
+ }
+
+ public ImportException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public ImportException(InputFile inputfile, ImportRuntimeException importError) {
+ this(_("echobase.importError.fromFile", inputfile.getFile(),
+ importError.getMessage()), importError);
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportException.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/OperationImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/OperationImportService.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/OperationImportService.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -24,14 +24,30 @@
package fr.ifremer.echobase.services;
import com.google.common.collect.Maps;
+import fr.ifremer.echobase.EchoBaseFunctions;
import fr.ifremer.echobase.InputFile;
import fr.ifremer.echobase.entities.EchoBaseUser;
+import fr.ifremer.echobase.entities.data.GearMetadataValue;
+import fr.ifremer.echobase.entities.data.GearMetadataValueDAO;
+import fr.ifremer.echobase.entities.data.Operation;
+import fr.ifremer.echobase.entities.data.OperationDAO;
+import fr.ifremer.echobase.entities.data.OperationMetadataValue;
+import fr.ifremer.echobase.entities.data.OperationMetadataValueDAO;
import fr.ifremer.echobase.entities.data.Voyage;
+import fr.ifremer.echobase.entities.references.GearMetadata;
+import fr.ifremer.echobase.entities.references.OperationMetadata;
import fr.ifremer.echobase.entities.references.Vessel;
import fr.ifremer.echobase.services.configurations.OperationImportConfiguration;
-import org.nuiton.topia.TopiaException;
+import fr.ifremer.echobase.services.csv.GearMetadataValueImportModel;
+import fr.ifremer.echobase.services.csv.GearMetadataValueImportModelRow;
+import fr.ifremer.echobase.services.csv.OperationImportModel;
+import fr.ifremer.echobase.services.csv.OperationImportModelRow;
+import fr.ifremer.echobase.services.csv.OperationMetadataValueImportModel;
+import fr.ifremer.echobase.services.csv.OperationMetadataValueImportModelRow;
+import org.nuiton.util.csv.Import;
+import org.nuiton.util.csv.ImportRuntimeException;
-import java.io.IOException;
+import java.io.Reader;
import java.util.Map;
/**
@@ -42,10 +58,9 @@
*/
public class OperationImportService extends AbstractImportDataService<OperationImportConfiguration> {
-
@Override
public Map<InputFile, CsvImportResult> startImport(OperationImportConfiguration configuration,
- EchoBaseUser user) throws IOException, TopiaException {
+ EchoBaseUser user) throws ImportException {
Map<InputFile, CsvImportResult> result = Maps.newHashMap();
@@ -55,13 +70,13 @@
Voyage voyage = getEntityById(Voyage.class,
configuration.getVoyageId());
-
importOperationFile(configuration.getOperationFile(), voyage, vessel);
importOperationMetadataFile(configuration.getOperationMetadataFile(),
voyage, vessel);
- importgearMetadataFile(configuration.getGearMetadataFile(), voyage,
+ importGearMetadataFile(configuration.getGearMetadataFile(),
+ voyage,
vessel);
commitTransaction("Could not commit transaction of operation import");
@@ -70,22 +85,94 @@
protected void importOperationFile(InputFile inputFile,
Voyage voyage,
- Vessel vessel) {
- char csvSeparator = getConfiguration().getCsvSeparator();
+ Vessel vessel) throws ImportException {
+ OperationImportModel csvModel =
+ new OperationImportModel(getCsvSeparator());
+
+ OperationDAO dao = getDAO(Operation.class, OperationDAO.class);
+
+ Reader reader = getInputFileReader(inputFile);
+ try {
+ Import<OperationImportModelRow> importer =
+ Import.newImport(csvModel, reader);
+
+ for (OperationImportModelRow row : importer) {
+
+ //TODO
+
+ }
+
+ } catch (ImportRuntimeException e) {
+ throw new ImportException(inputFile, e);
+ } finally {
+ closeReader(reader, inputFile);
+ }
}
protected void importOperationMetadataFile(InputFile inputFile,
Voyage voyage,
- Vessel vessel) {
- char csvSeparator = getConfiguration().getCsvSeparator();
+ Vessel vessel) throws ImportException {
+ Map<String, OperationMetadata> operationMetadatasByName =
+ getEntitiesMap(OperationMetadata.class,
+ EchoBaseFunctions.OPERATION_METADATA_NAME);
+
+ OperationMetadataValueImportModel csvModel =
+ new OperationMetadataValueImportModel(getCsvSeparator());
+
+ OperationDAO dao = getDAO(Operation.class, OperationDAO.class);
+ OperationMetadataValueDAO metadataValuedao =
+ getDAO(OperationMetadataValue.class,
+ OperationMetadataValueDAO.class);
+
+ Reader reader = getInputFileReader(inputFile);
+ try {
+ Import<OperationMetadataValueImportModelRow> importer =
+ Import.newImport(csvModel, reader);
+
+ for (OperationMetadataValueImportModelRow row : importer) {
+
+ //TODO
+
+ }
+
+ } catch (ImportRuntimeException e) {
+ throw new ImportException(inputFile, e);
+ } finally {
+ closeReader(reader, inputFile);
+ }
}
- protected void importgearMetadataFile(InputFile inputFile,
+ protected void importGearMetadataFile(InputFile inputFile,
Voyage voyage,
- Vessel vessel) {
- char csvSeparator = getConfiguration().getCsvSeparator();
+ Vessel vessel) throws ImportException {
+ Map<String, GearMetadata> gearMetadatasByType =
+ getEntitiesMap(GearMetadata.class, EchoBaseFunctions.GEAR_METADATA_TYPE);
+
+ GearMetadataValueImportModel csvModel =
+ new GearMetadataValueImportModel(getCsvSeparator());
+
+ OperationDAO dao = getDAO(Operation.class, OperationDAO.class);
+ GearMetadataValueDAO metadataValuedao =
+ getDAO(GearMetadataValue.class, GearMetadataValueDAO.class);
+
+ Reader reader = getInputFileReader(inputFile);
+ try {
+ Import<GearMetadataValueImportModelRow> importer =
+ Import.newImport(csvModel, reader);
+
+ for (GearMetadataValueImportModelRow row : importer) {
+
+ //TODO
+
+ }
+
+ } catch (ImportRuntimeException e) {
+ throw new ImportException(inputFile, e);
+ } finally {
+ closeReader(reader, inputFile);
+ }
}
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ResultsImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ResultsImportService.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ResultsImportService.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -29,11 +29,14 @@
import fr.ifremer.echobase.EchoBasePredicates;
import fr.ifremer.echobase.InputFile;
import fr.ifremer.echobase.entities.EchoBaseUser;
+import fr.ifremer.echobase.entities.data.Cell;
+import fr.ifremer.echobase.entities.data.CellDAO;
import fr.ifremer.echobase.entities.data.Voyage;
import fr.ifremer.echobase.entities.references.DepthStratum;
import fr.ifremer.echobase.entities.references.Echotype;
import fr.ifremer.echobase.entities.references.LengthAgeKey;
import fr.ifremer.echobase.entities.references.LengthWeightKey;
+import fr.ifremer.echobase.entities.references.LengthWeightKeyDAO;
import fr.ifremer.echobase.entities.references.SizeCategory;
import fr.ifremer.echobase.entities.references.Species;
import fr.ifremer.echobase.entities.references.SpeciesCategory;
@@ -47,15 +50,14 @@
import fr.ifremer.echobase.services.csv.LengthAgeKeyImportModelRow;
import fr.ifremer.echobase.services.csv.LengthWeightKeyImportModel;
import fr.ifremer.echobase.services.csv.LengthWeightKeyImportModelRow;
-import org.nuiton.topia.TopiaException;
+import fr.ifremer.echobase.services.csv.RegionCellAssociationImportModel;
+import fr.ifremer.echobase.services.csv.RegionCellAssociationImportModelRow;
+import fr.ifremer.echobase.services.csv.RegionCellImportModel;
import org.nuiton.topia.persistence.TopiaDAO;
import org.nuiton.util.csv.Import;
+import org.nuiton.util.csv.ImportRuntimeException;
-import java.io.BufferedReader;
-import java.io.FileReader;
-import java.io.IOException;
import java.io.Reader;
-import java.util.List;
import java.util.Map;
/**
@@ -67,59 +69,41 @@
public class ResultsImportService extends AbstractImportDataService<ResultsImportConfiguration> {
@Override
- public Map<InputFile, CsvImportResult> startImport(ResultsImportConfiguration configuration, EchoBaseUser user) throws IOException, TopiaException {
+ public Map<InputFile, CsvImportResult> startImport(ResultsImportConfiguration configuration, EchoBaseUser user) throws ImportException {
Map<InputFile, CsvImportResult> result = Maps.newHashMap();
+ ResultsImportMode importMode = configuration.getImportMode();
- ResultsImportMode importMode = configuration.getImportMode();
switch (importMode) {
case VOYAGE:
- List<Voyage> allVoyages = getEntities(Voyage.class);
- Map<String, Voyage> voyageMap = Maps.uniqueIndex(
- allVoyages, EchoBaseFunctions.VOYAGE_NAME);
+ Map<String, Voyage> voyageMap = getEntitiesMap(
+ Voyage.class, EchoBaseFunctions.VOYAGE_NAME);
- List<Species> allSpecies =
- getEntities(Species.class);
- Map<String, Species> speciesMap = Maps.uniqueIndex(
- allSpecies, EchoBaseFunctions.SPECIES_BARACOUDA_CODE);
+ Map<String, Species> speciesMap = getEntitiesMap(
+ Species.class,
+ EchoBaseFunctions.SPECIES_BARACOUDA_CODE);
if (configuration.canImportLengthAgeKeyFile()) {
- List<Strata> allStratas =
- getEntities(Strata.class);
- Map<String, Strata> strataMap = Maps.uniqueIndex(
- allStratas, EchoBaseFunctions.STRATA_BY_NAME);
importLenthAgeKey(configuration.getLengthAgeKeyFile(),
voyageMap,
- strataMap,
speciesMap
);
}
if (configuration.canImportLengthWeightKeyFile()) {
- List<SizeCategory> allSizeCategorys =
- getEntities(SizeCategory.class);
- Map<String, SizeCategory> sizeCategoryMap = Maps.uniqueIndex(
- allSizeCategorys, EchoBaseFunctions.SIZE_CATEGORY_NAME);
importLenghtWeightKey(configuration.getLengthWeightKeyFile(),
voyageMap,
- sizeCategoryMap,
speciesMap
);
}
if (configuration.canImportEchotypeFile()) {
- List<DepthStratum> allDepthStratums =
- getEntities(DepthStratum.class);
- Map<String, DepthStratum> depthStratumMap = Maps.uniqueIndex(
- allDepthStratums, EchoBaseFunctions.DEPTH_STRATUM_ID);
-
importEchotypeFile(configuration.getEchotypeFile(),
voyageMap,
- depthStratumMap,
speciesMap
);
}
@@ -136,30 +120,76 @@
return result;
}
- protected void importRegionsFile(InputFile inputFile) {
+ protected void importRegionsFile(InputFile inputFile) throws ImportException {
+ RegionCellImportModel csvModel = new RegionCellImportModel(
+ serviceContext.getConfiguration().getCsvSeparator());
+
+ CellDAO dao = getDAO(Cell.class, CellDAO.class);
+
+ Reader reader = getInputFileReader(inputFile);
+ try {
+ Import<Cell> importer =
+ Import.newImport(csvModel, reader);
+
+ for (Cell row : importer) {
+
+ //TODO
+
+ }
+
+ } catch (ImportRuntimeException e) {
+ throw new ImportException(inputFile, e);
+ } finally {
+ closeReader(reader, inputFile);
+ }
}
- protected void importAssociationFile(InputFile inputFile) {
+ protected void importAssociationFile(InputFile inputFile) throws ImportException {
+ RegionCellAssociationImportModel csvModel = new RegionCellAssociationImportModel(
+ serviceContext.getConfiguration().getCsvSeparator());
+
+ CellDAO dao = getDAO(Cell.class, CellDAO.class);
+
+ Reader reader = getInputFileReader(inputFile);
+ try {
+ Import<RegionCellAssociationImportModelRow> importer =
+ Import.newImport(csvModel, reader);
+
+ for (RegionCellAssociationImportModelRow row : importer) {
+
+ //TODO
+
+ }
+
+ } catch (ImportRuntimeException e) {
+ throw new ImportException(inputFile, e);
+ } finally {
+ closeReader(reader, inputFile);
+ }
}
protected void importLenghtWeightKey(InputFile inputFile,
Map<String, Voyage> voyageMap,
- Map<String, SizeCategory> sizeCategoryMap,
- Map<String, Species> speciesMap) throws TopiaException, IOException {
+ Map<String, Species> speciesMap) throws ImportException {
+ Map<String, SizeCategory> sizeCategoryMap = getEntitiesMap(
+ SizeCategory.class,
+ EchoBaseFunctions.SIZE_CATEGORY_NAME);
+
LengthWeightKeyImportModel csvModel = new LengthWeightKeyImportModel(
serviceContext.getConfiguration().getCsvSeparator(),
voyageMap,
sizeCategoryMap,
speciesMap);
- TopiaDAO<LengthWeightKey> dao = getDAO(LengthWeightKey.class);
+ LengthWeightKeyDAO dao = getDAO(LengthWeightKey.class,
+ LengthWeightKeyDAO.class);
SpeciesCategoryDAO speciesCategoryDAO =
- (SpeciesCategoryDAO) getDAO(SpeciesCategory.class);
+ getDAO(SpeciesCategory.class, SpeciesCategoryDAO.class);
- Reader reader = new BufferedReader(new FileReader(inputFile.getFile()));
+ Reader reader = getInputFileReader(inputFile);
try {
Import<LengthWeightKeyImportModelRow> importer =
Import.newImport(csvModel, reader);
@@ -168,7 +198,7 @@
Voyage voyage = row.getVoyage();
- LengthWeightKey lengthWeightKey = dao.create();
+ LengthWeightKey lengthWeightKey = create(dao);
lengthWeightKey.setAParameter(row.getaParameter());
lengthWeightKey.setBParameter(row.getbParameter());
@@ -179,7 +209,8 @@
SizeCategory sizeCategory = row.getSizeCategory();
// find speciesCategory
- SpeciesCategory speciesCategory = speciesCategoryDAO.findByProperties(
+ SpeciesCategory speciesCategory = findByProperties(
+ speciesCategoryDAO,
SpeciesCategory.PROPERTY_SIZE_CATEGORY, sizeCategory,
SpeciesCategory.PROPERTY_SPECIES, species
);
@@ -187,9 +218,9 @@
if (speciesCategory == null) {
// not found, creates it
- speciesCategory = speciesCategoryDAO.create(
- SpeciesCategory.PROPERTY_SIZE_CATEGORY, sizeCategory,
- SpeciesCategory.PROPERTY_SPECIES, species
+ speciesCategory = create(speciesCategoryDAO,
+ SpeciesCategory.PROPERTY_SIZE_CATEGORY, sizeCategory,
+ SpeciesCategory.PROPERTY_SPECIES, species
);
}
@@ -197,29 +228,31 @@
// attach it to voyage
voyage.addLengthWeightKey(lengthWeightKey);
-
}
+ } catch (ImportRuntimeException e) {
+ throw new ImportException(inputFile, e);
} finally {
- reader.close();
+ closeReader(reader, inputFile);
}
-
}
protected void importLenthAgeKey(InputFile inputFile,
Map<String, Voyage> voyageMap,
- Map<String, Strata> startaMap,
- Map<String, Species> speciesMap) throws IOException, TopiaException {
+ Map<String, Species> speciesMap) throws ImportException {
+ Map<String, Strata> strataMap = getEntitiesMap(
+ Strata.class, EchoBaseFunctions.STRATA_BY_NAME);
+
LengthAgeKeyImportModel csvModel = new LengthAgeKeyImportModel(
serviceContext.getConfiguration().getCsvSeparator(),
voyageMap,
- startaMap,
+ strataMap,
speciesMap);
TopiaDAO<LengthAgeKey> dao = getDAO(LengthAgeKey.class);
- Reader reader = new BufferedReader(new FileReader(inputFile.getFile()));
+ Reader reader = getInputFileReader(inputFile);
try {
Import<LengthAgeKeyImportModelRow> importer =
Import.newImport(csvModel, reader);
@@ -228,7 +261,7 @@
Voyage voyage = row.getVoyage();
- LengthAgeKey lengthAgeKey = dao.create();
+ LengthAgeKey lengthAgeKey = create(dao);
lengthAgeKey.setAge(row.getAge());
lengthAgeKey.setLength(row.getLength());
@@ -242,16 +275,21 @@
}
+ } catch (ImportRuntimeException e) {
+ throw new ImportException(inputFile, e);
} finally {
- reader.close();
+ closeReader(reader, inputFile);
}
}
private void importEchotypeFile(InputFile inputFile,
Map<String, Voyage> voyageMap,
- Map<String, DepthStratum> depthStratumMap,
- Map<String, Species> speciesMap) throws TopiaException, IOException {
+ Map<String, Species> speciesMap) throws ImportException {
+ Map<String, DepthStratum> depthStratumMap = getEntitiesMap(
+ DepthStratum.class,
+ EchoBaseFunctions.DEPTH_STRATUM_ID);
+
EchotypeImportModel csvModel = new EchotypeImportModel(
serviceContext.getConfiguration().getCsvSeparator(),
voyageMap,
@@ -260,7 +298,7 @@
TopiaDAO<Echotype> dao = getDAO(Echotype.class);
- Reader reader = new BufferedReader(new FileReader(inputFile.getFile()));
+ Reader reader = getInputFileReader(inputFile);
try {
Import<EchotypeImportModelRow> importer =
Import.newImport(csvModel, reader);
@@ -284,9 +322,9 @@
if (echotype == null) {
// creates it
- echotype = dao.create(
- Echotype.PROPERTY_NAME, echotypeName,
- Echotype.PROPERTY_MEANING, row.getMeaning()
+ echotype = create(dao,
+ Echotype.PROPERTY_NAME, echotypeName,
+ Echotype.PROPERTY_MEANING, row.getMeaning()
);
DepthStratum depthStratum = row.getDepthStratum();
@@ -308,8 +346,10 @@
}
}
+ } catch (ImportRuntimeException e) {
+ throw new ImportException(inputFile, e);
} finally {
- reader.close();
+ closeReader(reader, inputFile);
}
}
}
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-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AbstractEchobaseActionConfiguration.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -48,6 +48,8 @@
private long endTime;
+ private Exception error;
+
public final int getNbSteps() {
return nbSteps;
}
@@ -86,6 +88,14 @@
this.endTime = endTime;
}
+ public Exception getError() {
+ return error;
+ }
+
+ public void setError(Exception error) {
+ this.error = error;
+ }
+
public String getActionTime() {
long sTime = getStartTime();
long eTime = getEndTime();
Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/GearMetadataValueImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/GearMetadataValueImportModel.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/GearMetadataValueImportModel.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -0,0 +1,44 @@
+/*
+ * #%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.csv;
+
+import fr.ifremer.echobase.entities.data.GearMetadataValue;
+
+/**
+ * Model to import {@link GearMetadataValue}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class GearMetadataValueImportModel extends CsvModelUtil.AbstractImportModel<GearMetadataValueImportModelRow> {
+
+ public GearMetadataValueImportModel(char separator) {
+ super(separator);
+ }
+
+ @Override
+ public GearMetadataValueImportModelRow newEmptyInstance() {
+ return new GearMetadataValueImportModelRow();
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/GearMetadataValueImportModel.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/csv/GearMetadataValueImportModelRow.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/GearMetadataValueImportModelRow.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/GearMetadataValueImportModelRow.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -0,0 +1,38 @@
+/*
+ * #%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.csv;
+
+/**
+ * Bean used as a row for import of {@link OperationMetadataValueImportModel}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class GearMetadataValueImportModelRow {
+
+
+ public GearMetadataValueImportModelRow() {
+ }
+
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/GearMetadataValueImportModelRow.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/csv/OperationImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationImportModel.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationImportModel.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -0,0 +1,44 @@
+/*
+ * #%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.csv;
+
+import fr.ifremer.echobase.entities.data.Operation;
+
+/**
+ * Model to import {@link Operation}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class OperationImportModel extends CsvModelUtil.AbstractImportModel<OperationImportModelRow> {
+
+ public OperationImportModel(char separator) {
+ super(separator);
+ }
+
+ @Override
+ public OperationImportModelRow newEmptyInstance() {
+ return new OperationImportModelRow();
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationImportModel.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/csv/OperationImportModelRow.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationImportModelRow.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationImportModelRow.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -0,0 +1,38 @@
+/*
+ * #%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.csv;
+
+/**
+ * Bean used as a row for import of {@link OperationImportModel}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class OperationImportModelRow {
+
+
+ public OperationImportModelRow() {
+ }
+
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationImportModelRow.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/csv/OperationMetadataValueImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationMetadataValueImportModel.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationMetadataValueImportModel.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -0,0 +1,44 @@
+/*
+ * #%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.csv;
+
+import fr.ifremer.echobase.entities.data.OperationMetadataValue;
+
+/**
+ * Model to import {@link OperationMetadataValue}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class OperationMetadataValueImportModel extends CsvModelUtil.AbstractImportModel<OperationMetadataValueImportModelRow> {
+
+ public OperationMetadataValueImportModel(char separator) {
+ super(separator);
+ }
+
+ @Override
+ public OperationMetadataValueImportModelRow newEmptyInstance() {
+ return new OperationMetadataValueImportModelRow();
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationMetadataValueImportModel.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/csv/OperationMetadataValueImportModelRow.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationMetadataValueImportModelRow.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationMetadataValueImportModelRow.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -0,0 +1,38 @@
+/*
+ * #%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.csv;
+
+/**
+ * Bean used as a row for import of {@link OperationMetadataValueImportModel}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class OperationMetadataValueImportModelRow {
+
+
+ public OperationMetadataValueImportModelRow() {
+ }
+
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/OperationMetadataValueImportModelRow.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/csv/RegionCellAssociationImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/RegionCellAssociationImportModel.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/RegionCellAssociationImportModel.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -0,0 +1,42 @@
+/*
+ * #%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.csv;
+
+/**
+ * Model to import cells associations from region cells and esdu cells.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class RegionCellAssociationImportModel extends CsvModelUtil.AbstractImportModel<RegionCellAssociationImportModelRow> {
+
+ public RegionCellAssociationImportModel(char separator) {
+ super(separator);
+ }
+
+ @Override
+ public RegionCellAssociationImportModelRow newEmptyInstance() {
+ return new RegionCellAssociationImportModelRow();
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/RegionCellAssociationImportModel.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/csv/RegionCellAssociationImportModelRow.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/RegionCellAssociationImportModelRow.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/RegionCellAssociationImportModelRow.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -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.csv;
+
+import fr.ifremer.echobase.entities.data.Cell;
+import fr.ifremer.echobase.entities.data.CellImpl;
+
+/**
+ * Bean used as a row for import of {@link RegionCellAssociationImportModel}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class RegionCellAssociationImportModelRow {
+
+
+ public RegionCellAssociationImportModelRow() {
+ }
+
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/RegionCellAssociationImportModelRow.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/csv/RegionCellImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/RegionCellImportModel.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/RegionCellImportModel.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -0,0 +1,45 @@
+/*
+ * #%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.csv;
+
+import fr.ifremer.echobase.entities.data.Cell;
+import fr.ifremer.echobase.entities.data.CellImpl;
+
+/**
+ * Model to import cells (with type "region").
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class RegionCellImportModel extends CsvModelUtil.AbstractImportModel<Cell> {
+
+ public RegionCellImportModel(char separator) {
+ super(separator);
+ }
+
+ @Override
+ public Cell newEmptyInstance() {
+ return new CellImpl();
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/RegionCellImportModel.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/csv/SampleDataImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/SampleDataImportModel.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/SampleDataImportModel.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -0,0 +1,44 @@
+/*
+ * #%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.csv;
+
+import fr.ifremer.echobase.entities.data.SampleData;
+
+/**
+ * Model to import {@link SampleData}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class SampleDataImportModel extends CsvModelUtil.AbstractImportModel<SampleDataImportModelRow> {
+
+ public SampleDataImportModel(char separator) {
+ super(separator);
+ }
+
+ @Override
+ public SampleDataImportModelRow newEmptyInstance() {
+ return new SampleDataImportModelRow();
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/SampleDataImportModel.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/csv/SampleDataImportModelRow.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/SampleDataImportModelRow.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/SampleDataImportModelRow.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -0,0 +1,38 @@
+/*
+ * #%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.csv;
+
+/**
+ * Bean used as a row for import of {@link SampleDataImportModel}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class SampleDataImportModelRow {
+
+
+ public SampleDataImportModelRow() {
+ }
+
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/SampleDataImportModelRow.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/csv/SampleImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/SampleImportModel.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/SampleImportModel.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -0,0 +1,44 @@
+/*
+ * #%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.csv;
+
+import fr.ifremer.echobase.entities.data.Sample;
+
+/**
+ * Model to import {@link Sample}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class SampleImportModel extends CsvModelUtil.AbstractImportModel<SampleImportModelRow> {
+
+ public SampleImportModel(char separator) {
+ super(separator);
+ }
+
+ @Override
+ public SampleImportModelRow newEmptyInstance() {
+ return new SampleImportModelRow();
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/SampleImportModel.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/csv/SampleImportModelRow.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/SampleImportModelRow.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/SampleImportModelRow.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -0,0 +1,38 @@
+/*
+ * #%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.csv;
+
+/**
+ * Bean used as a row for import of {@link SampleImportModel}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class SampleImportModelRow {
+
+
+ public SampleImportModelRow() {
+ }
+
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/SampleImportModelRow.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/csv/TransitImportModelRow.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransitImportModelRow.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransitImportModelRow.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -29,11 +29,11 @@
import java.util.Date;
/**
-* Bean used as a row for import of {@link TransitImportModel}.
-*
-* @author tchemit <chemit(a)codelutin.com>
-* @since 0.3
-*/
+ * Bean used as a row for import of {@link TransitImportModel}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
public class TransitImportModelRow {
public static final String PROPERTY_VOYAGE = "voyage";
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-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-services/src/main/resources/i18n/echobase-services_fr_FR.properties 2012-02-04 09:20:28 UTC (rev 306)
@@ -25,3 +25,5 @@
echobase.common.transectFile=Fichier des transects
echobase.common.transitFile=Fichier des transits
echobase.common.voyageFile=Fichier des voyages
+echobase.importError.fromFile=Erreur lors de l'import du fichier %s \: %s
+echobase.importError.no.transit.between.date=Pas de transit trouvé pour le voyage %s entre les dates %s et %s
Modified: trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/AbstractEchoBaseServiceTest.java
===================================================================
--- trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/AbstractEchoBaseServiceTest.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/AbstractEchoBaseServiceTest.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -94,7 +94,7 @@
}
protected <E extends EchoBaseService> E getService(Class<E> clazz) throws Exception {
- EchoBaseServiceContext serviceContext = EchoBaseServiceContextImpl.newContext(
+ EchoBaseServiceContext serviceContext = DefaultEchoBaseServiceContext.newContext(
Locale.getDefault(),
getTransaction(),
getConfig(),
Modified: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/AreaOfOperationLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/AreaOfOperationLoader.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/AreaOfOperationLoader.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -72,7 +72,7 @@
dao.create(AreaOfOperation.PROPERTY_NAME, codeZone);
if (log.isInfoEnabled()) {
log.info("Created areaOfOperation : " +
- areaOfOperation.getName());
+ areaOfOperation.getName());
}
}
}
Modified: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/CellLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/CellLoader.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/CellLoader.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -177,18 +177,27 @@
Map<Integer, DataQuality> dataQualitiesById;
DataMetadata surfaceMetadata;
+
DataMetadata esduLatitudeMetadata;
+
DataMetadata esduLongitudeMetadata;
+
DataMetadata esduDepthMetadata;
+
DataMetadata esduTimeMetadata;
+
DataMetadata elementaryStartSurfaceDepthMetadata;
+
DataMetadata elementaryEndSurfaceDepthMetadata;
+
DataMetadata elementaryStartBottomDepthMetadata;
+
DataMetadata elementaryEndBottonDepthMetadata;
private DataQuality nullDataQuality;
TopiaDAO<Cell> dao;
+
TopiaDAO<Data> dataDao;
String dataProcessingId;
@@ -371,15 +380,15 @@
String prefix = "[" + dataProcessingId + "] ";
log.info(prefix + "Found " + nbRegionData + " region datas for " +
- nbRegionCells + " regions cells.");
+ nbRegionCells + " regions cells.");
log.info(prefix + "Found " + nbEsduData + " esdu datas for " +
- nbEsduCells + " esdu cells.");
+ nbEsduCells + " esdu cells.");
log.info(prefix + "Found " + nbElementaryData +
- " elementary datas for " + nbElementaryCells +
- " elementary cells.");
+ " elementary datas for " + nbElementaryCells +
+ " elementary cells.");
log.info(prefix + "Total data " + (nbRegionData + nbEsduData +
- nbElementaryData) + " for " + (nbRegionCells + nbEsduCells +
- nbElementaryCells) + " cells");
+ nbElementaryData) + " for " + (nbRegionCells + nbEsduCells +
+ nbElementaryCells) + " cells");
}
}
@@ -502,7 +511,7 @@
int qualityId = flagAsDouble.intValue();
DataQuality dataQuality = dataQualitiesById.get(qualityId);
Preconditions.checkNotNull(dataQuality, "Could not find " +
- "dataQuality with id " + qualityId);
+ "dataQuality with id " + qualityId);
Cell esduCell = dao.create(
Cell.PROPERTY_CELL_TYPE, esduCellType,
Cell.PROPERTY_NAME, cellStringId,
Modified: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/DataProcessingLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/DataProcessingLoader.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/DataProcessingLoader.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -72,7 +72,7 @@
for (Map<String, Object> row : db.getTable("EI_CONFIGURATION")) {
String voyageName = (String) row.get("CAMPAGNE");
- Voyage voyage = getFK(voyagesByName,voyageName);
+ Voyage voyage = getFK(voyagesByName, voyageName);
Transit transit = voyage.getTransit().iterator().next();
Transect transect = transit.getTransect().iterator().next();
Modified: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/EchotypeCategoryLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/EchotypeCategoryLoader.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/EchotypeCategoryLoader.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -74,7 +74,7 @@
dao.create(EchotypeCategory.PROPERTY_NAME, code);
if (log.isInfoEnabled()) {
log.info("Created EchotypeCategory : " +
- areaOfOperation.getName());
+ areaOfOperation.getName());
}
}
}
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-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/EntityLoader.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -326,7 +326,7 @@
public void copyStreamToFile(File file,
FileType fileType) throws IOException {
String path = "/csv/" + fileType.name().toLowerCase() + "/" +
- file.getName();
+ file.getName();
InputStream stream = getClass().getResourceAsStream(path);
try {
Preconditions.checkNotNull(stream,
@@ -495,7 +495,7 @@
} catch (Exception eee) {
throw new EchoBaseTechnicalException(
"Could not import entities of type " +
- tableMeta.getSource(), eee);
+ tableMeta.getSource(), eee);
} finally {
importer.close();
Modified: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/OperationLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/OperationLoader.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/OperationLoader.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -123,25 +123,33 @@
//SONDE
OperationMetadata meanWaterDepthOperationMeta;
+
//JOUR_NUIT
OperationMetadata dielPeriodOperationMeta;
+
//SONDEDEB
OperationMetadata startWaterDepthOperationMeta;
+
//SONDEFIN
OperationMetadata endWaterDepthOperationMeta;
//LFUNES
GearMetadata cableLengthGearMeta;
+
//VMIN
GearMetadata minSpeedGearMeta;
+
//VMAX
GearMetadata maxSpeedGearMeta;
TopiaDAO<Operation> dao;
+
TopiaDAO<OperationMetadataValue> operationMetadataValueDAO;
+
TopiaDAO<GearMetadataValue> gearMetadataValueDAO;
Map<String, DepthStratum> depthStratumByName;
+
Map<String, Gear> gearByCasinoGearName;
@Override
@@ -261,7 +269,7 @@
DepthStratum depthStratum = null;
String depthStratumId = (String) row.get("STA_IMAGES");
if (StringUtils.isBlank(depthStratumId) ||
- "nul".equals(depthStratumId)) {
+ "nul".equals(depthStratumId)) {
messages.add("No depthStraum defined");
} else {
depthStratum = getFK(depthStratumByName, depthStratumId.trim());
Modified: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoader.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoader.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -50,12 +50,12 @@
/*
raptriBiometryDataType;sampleDataTypeMeaningEng;sampleDataType;sampleDataTypeMeaningFr;Units;Precision
*/
- model.addDefaultColumn(SampleDataType.PROPERTY_RAPTRI_BIOMETRY_DATA_TYPE,int.class);
- model.newMandatoryColumn("sampleDataTypeMeaningEng",SampleDataType.PROPERTY_MEANING_EN);
+ model.addDefaultColumn(SampleDataType.PROPERTY_RAPTRI_BIOMETRY_DATA_TYPE, int.class);
+ model.newMandatoryColumn("sampleDataTypeMeaningEng", SampleDataType.PROPERTY_MEANING_EN);
model.newMandatoryColumn("sampleDataType", SampleDataType.PROPERTY_NAME);
- model.newMandatoryColumn("sampleDataTypeMeaningFr",SampleDataType.PROPERTY_MEANING_FR);
- model.newMandatoryColumn("Units",SampleDataType.PROPERTY_UNITS);
- model.newMandatoryColumn("Precision",SampleDataType.PROPERTY_PRECISION);
+ model.newMandatoryColumn("sampleDataTypeMeaningFr", SampleDataType.PROPERTY_MEANING_FR);
+ model.newMandatoryColumn("Units", SampleDataType.PROPERTY_UNITS);
+ model.newMandatoryColumn("Precision", SampleDataType.PROPERTY_PRECISION);
return model;
}
}
\ No newline at end of file
Modified: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleLoader.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleLoader.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -111,12 +111,16 @@
}
protected SampleDataDAO sampleDataDAO;
+
protected SpeciesCategoryDAO speciesCategoryDAO;
+
protected TopiaDAO<Sample> dao;
protected Map<String, SizeCategory> sizeCategoryByName;
+
protected Map<String, SexCategory> sexCategoryByName;
+
protected Map<String, SpeciesCategory> speciesCategoryByName;
@Override
Modified: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SpeciesCategoryLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SpeciesCategoryLoader.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SpeciesCategoryLoader.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -136,8 +136,8 @@
if (log.isInfoEnabled()) {
log.info("Create speciesCategory speciesBaracoudaCode/size : " +
- species.getBaracoudaCode() + "/" +
- (sizeCategory == null ? null : sizeCategory.getName()));
+ species.getBaracoudaCode() + "/" +
+ (sizeCategory == null ? null : sizeCategory.getName()));
}
}
return speciesCategory;
@@ -162,8 +162,8 @@
if (log.isInfoEnabled()) {
log.info("Create speciesCategory speciesBaracoudaCode/sex : " +
- species.getBaracoudaCode() + "/" +
- (sexCategory == null ? null : sexCategory.getName()));
+ species.getBaracoudaCode() + "/" +
+ (sexCategory == null ? null : sexCategory.getName()));
}
}
return speciesCategory;
@@ -188,7 +188,7 @@
if (log.isInfoEnabled()) {
log.info("Create speciesCategory speciesBaracoudaCode : " +
- species.getBaracoudaCode());
+ species.getBaracoudaCode());
}
}
return speciesCategory;
Modified: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/AbstractToolTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/AbstractToolTest.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/AbstractToolTest.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -29,7 +29,7 @@
import fr.ifremer.echobase.entities.meta.DbMeta;
import fr.ifremer.echobase.services.EchoBaseService;
import fr.ifremer.echobase.services.EchoBaseServiceContext;
-import fr.ifremer.echobase.services.EchoBaseServiceContextImpl;
+import fr.ifremer.echobase.services.DefaultEchoBaseServiceContext;
import fr.ifremer.echobase.services.EchoBaseServiceFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -92,7 +92,7 @@
topiaContext = factory.newEmbeddedDatabase(testdir);
- serviceContext = EchoBaseServiceContextImpl.newContext(
+ serviceContext = DefaultEchoBaseServiceContext.newContext(
Locale.getDefault(),
topiaContext,
configuration,
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationListener.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationListener.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationListener.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -30,7 +30,7 @@
import fr.ifremer.echobase.entities.EchoBaseUserImpl;
import fr.ifremer.echobase.entities.meta.DbMeta;
import fr.ifremer.echobase.services.EchoBaseServiceContext;
-import fr.ifremer.echobase.services.EchoBaseServiceContextImpl;
+import fr.ifremer.echobase.services.DefaultEchoBaseServiceContext;
import fr.ifremer.echobase.services.EchoBaseServiceFactory;
import fr.ifremer.echobase.services.UserService;
import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport;
@@ -176,7 +176,7 @@
TopiaContext transaction = rootContext.beginTransaction();
try {
- EchoBaseServiceContext serviceContext = EchoBaseServiceContextImpl.newContext(
+ EchoBaseServiceContext serviceContext = DefaultEchoBaseServiceContext.newContext(
Locale.getDefault(),
transaction,
configuration,
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-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseSession.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -158,7 +158,7 @@
if (o != null && !type.isInstance(o)) {
throw new ClassCastException(
"parameter " + key + " should be of type " +
- type.getName() + " but was " + o.getClass().getName());
+ type.getName() + " but was " + o.getClass().getName());
}
return (T) o;
}
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-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/EchoBaseActionSupport.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -31,7 +31,7 @@
import fr.ifremer.echobase.services.DecoratorService;
import fr.ifremer.echobase.services.EchoBaseService;
import fr.ifremer.echobase.services.EchoBaseServiceContext;
-import fr.ifremer.echobase.services.EchoBaseServiceContextImpl;
+import fr.ifremer.echobase.services.DefaultEchoBaseServiceContext;
import fr.ifremer.echobase.services.EchoBaseServiceFactory;
import fr.ifremer.echobase.ui.EchoBaseApplicationContext;
import fr.ifremer.echobase.ui.EchoBaseSession;
@@ -144,7 +144,7 @@
*/
protected EchoBaseServiceContext getServiceContext() {
if (serviceContext == null) {
- serviceContext = EchoBaseServiceContextImpl.newContext(
+ serviceContext = DefaultEchoBaseServiceContext.newContext(
getLocale(),
getTransaction(),
getConfiguration(),
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/embeddedApplication/Build.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/embeddedApplication/Build.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/embeddedApplication/Build.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -23,8 +23,8 @@
*/
package fr.ifremer.echobase.ui.actions.embeddedApplication;
+import fr.ifremer.echobase.services.EmbeddedApplicationService;
import fr.ifremer.echobase.services.configurations.EmbeddedApplicationConfiguration;
-import fr.ifremer.echobase.services.EmbeddedApplicationService;
import fr.ifremer.echobase.ui.actions.AbstractWaitAndExecAction;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -60,7 +60,7 @@
protected void startAction(EmbeddedApplicationConfiguration model) throws Exception {
if (log.isInfoEnabled()) {
log.info("Start build of embedded application to file " +
- model.getFileName());
+ model.getFileName());
}
service.createEmbeddedApplication(model);
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticData.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticData.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticData.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -28,7 +28,6 @@
import fr.ifremer.echobase.services.EchoBaseServiceSupport;
import fr.ifremer.echobase.services.configurations.AccousticDataImportConfiguration;
import fr.ifremer.echobase.services.configurations.CellPositionReference;
-import fr.ifremer.echobase.services.configurations.CommonDataImportMode;
import java.io.File;
import java.util.Map;
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/GetVessels.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/GetVessels.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/GetVessels.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -27,7 +27,6 @@
import com.google.common.collect.Maps;
import fr.ifremer.echobase.entities.data.Transect;
import fr.ifremer.echobase.entities.data.Transit;
-import fr.ifremer.echobase.entities.data.Voyage;
import fr.ifremer.echobase.entities.references.Vessel;
import fr.ifremer.echobase.services.EchoBaseServiceSupport;
import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport;
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importDb/Import.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importDb/Import.java 2012-02-02 23:46:23 UTC (rev 305)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importDb/Import.java 2012-02-04 09:20:28 UTC (rev 306)
@@ -62,7 +62,7 @@
protected void startAction(ImportDbConfiguration model) throws Exception {
if (log.isInfoEnabled()) {
log.info("Start imports with file " +
- model.getInput().getFileName());
+ model.getInput().getFileName());
}
service.importDb(model, getEchoBaseSession().getEchoBaseUser());
1
0
r305 - in trunk: . echobase-entities/src/main/java/fr/ifremer/echobase echobase-entities/src/main/resources/i18n echobase-services/src/main/java/fr/ifremer/echobase/services echobase-services/src/main/java/fr/ifremer/echobase/services/csv echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData echobase-ui/src/main/webapp/WEB-INF/jsp/importData
by tchemit@users.forge.codelutin.com 02 Feb '12
by tchemit@users.forge.codelutin.com 02 Feb '12
02 Feb '12
Author: tchemit
Date: 2012-02-03 00:46:23 +0100 (Fri, 03 Feb 2012)
New Revision: 305
Url: http://forge.codelutin.com/repositories/revision/echobase/305
Log:
continue imports + use mavenpom 3.1
Modified:
trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java
trunk/echobase-entities/src/main/resources/i18n/echobase-entities_fr_FR.properties
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceSupport.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ResultsImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthAgeKeyImportModel.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/ConfigureCommonData.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureResults.java
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureOperation.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureResults.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAccousticData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressOperation.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressResults.jsp
trunk/pom.xml
Modified: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java
===================================================================
--- trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java 2012-02-02 22:58:29 UTC (rev 304)
+++ trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java 2012-02-02 23:46:23 UTC (rev 305)
@@ -77,13 +77,6 @@
}
};
- public static final Function<Species, String> SPECIES_CODE_MEMO = new Function<Species, String>() {
- @Override
- public String apply(Species input) {
- return input.getCodeMemo();
- }
- };
-
public static final Function<Vessel, String> VESSEL_NAME = new Function<Vessel, String>() {
@Override
public String apply(Vessel input) {
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-02-02 22:58:29 UTC (rev 304)
+++ trunk/echobase-entities/src/main/resources/i18n/echobase-entities_fr_FR.properties 2012-02-02 23:46:23 UTC (rev 305)
@@ -269,4 +269,3 @@
echobase.common.vesselType=
echobase.common.voyage=Campagne
echobase.config.data.directory.description=Chemin de l'application
-
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceSupport.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceSupport.java 2012-02-02 22:58:29 UTC (rev 304)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceSupport.java 2012-02-02 23:46:23 UTC (rev 305)
@@ -128,7 +128,7 @@
return dao;
}
- protected void commitTransaction(String errorMessage) {
+ public void commitTransaction(String errorMessage) {
try {
getTransaction().commitTransaction();
} catch (TopiaException eee) {
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ResultsImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ResultsImportService.java 2012-02-02 22:58:29 UTC (rev 304)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ResultsImportService.java 2012-02-02 23:46:23 UTC (rev 305)
@@ -82,9 +82,9 @@
List<Species> allSpecies =
getEntities(Species.class);
Map<String, Species> speciesMap = Maps.uniqueIndex(
- allSpecies, EchoBaseFunctions.SPECIES_CODE_MEMO);
+ allSpecies, EchoBaseFunctions.SPECIES_BARACOUDA_CODE);
- if (configuration.canImportLengthWeightKeyFile()) {
+ if (configuration.canImportLengthAgeKeyFile()) {
List<Strata> allStratas =
getEntities(Strata.class);
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthAgeKeyImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthAgeKeyImportModel.java 2012-02-02 22:58:29 UTC (rev 304)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthAgeKeyImportModel.java 2012-02-02 23:46:23 UTC (rev 305)
@@ -60,7 +60,7 @@
newMandatoryColumn(LengthAgeKeyImportModelRow.PROPERTY_VOYAGE, CsvModelUtil.newForeignKeyValue(Voyage.class, voyageMap));
newMandatoryColumn(LengthAgeKeyImportModelRow.PROPERTY_STRATA, CsvModelUtil.newForeignKeyValue(Strata.class, strataMap));
- newMandatoryColumn(LengthAgeKeyImportModelRow.PROPERTY_SPECIES, CsvModelUtil.newForeignKeyValue(Species.class, speciesMap));
+ newMandatoryColumn("codeMemo", LengthAgeKeyImportModelRow.PROPERTY_SPECIES, CsvModelUtil.newForeignKeyValue(Species.class, speciesMap));
}
Modified: 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 2012-02-02 22:58:29 UTC (rev 304)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/AbstractLaunchImport.java 2012-02-02 23:46:23 UTC (rev 305)
@@ -74,6 +74,8 @@
try {
service.startImport(model, getEchoBaseSession().getEchoBaseUser());
+
+ service.commitTransaction("Could not commit imported data");
} catch (Exception e) {
if (log.isErrorEnabled()) {
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonData.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonData.java 2012-02-02 22:58:29 UTC (rev 304)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonData.java 2012-02-02 23:46:23 UTC (rev 305)
@@ -87,17 +87,20 @@
getModel().setImportMode(CommonDataImportMode.ALL);
}
+
return INPUT;
}
@InputConfig(methodName = "input")
- public String modeAll() {
- return SUCCESS;
+ public String modeAll() throws Exception {
+
+ return execute();
}
@InputConfig(methodName = "input")
- public String modeTransect() {
- return SUCCESS;
+ public String modeTransect() throws Exception {
+
+ return execute();
}
public Map<String, String> getMissions() {
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureResults.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureResults.java 2012-02-02 22:58:29 UTC (rev 304)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureResults.java 2012-02-02 23:46:23 UTC (rev 305)
@@ -81,13 +81,15 @@
}
@InputConfig(methodName = "input")
- public String modeVoyage() {
- return SUCCESS;
+ public String modeVoyage() throws Exception {
+
+ return execute();
}
@InputConfig(methodName = "input")
- public String modeAcoustic() {
- return SUCCESS;
+ public String modeAcoustic() throws Exception {
+
+ return execute();
}
public Map<String, String> getVoyages() {
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-02-02 22:58:29 UTC (rev 304)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticData.jsp 2012-02-02 23:46:23 UTC (rev 305)
@@ -176,7 +176,7 @@
</fieldset>
<br/>
<s:submit action="configureAccousticData"
- value='%{getText("echobase.action.configureImport")}'/>
+ value='%{getText("echobase.action.import")}'/>
</s:form>
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-02-02 22:58:29 UTC (rev 304)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesData.jsp 2012-02-02 23:46:23 UTC (rev 305)
@@ -59,7 +59,7 @@
<br/>
<s:submit action="configureCatchesData"
- value='%{getText("echobase.action.configureImport")}'/>
+ value='%{getText("echobase.action.import")}'/>
</s:form>
\ No newline at end of file
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonData.jsp 2012-02-02 22:58:29 UTC (rev 304)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonData.jsp 2012-02-02 23:46:23 UTC (rev 305)
@@ -111,7 +111,7 @@
</s:a>
<br/>
<s:submit action="ConfigureCommonData-modeAll"
- value='%{getText("echobase.action.configureImport")}'/>
+ value='%{getText("echobase.action.import")}'/>
</s:form>
@@ -155,7 +155,7 @@
<br/>
<s:submit action="ConfigureCommonData-modeTransect"
- value='%{getText("echobase.action.configureImport")}'/>
+ value='%{getText("echobase.action.import")}'/>
</s:form>
\ No newline at end of file
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureOperation.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureOperation.jsp 2012-02-02 22:58:29 UTC (rev 304)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureOperation.jsp 2012-02-02 23:46:23 UTC (rev 305)
@@ -64,7 +64,7 @@
<br/>
<s:submit action="configureOperation"
- value='%{getText("echobase.action.configureImport")}'/>
+ value='%{getText("echobase.action.import")}'/>
</s:form>
\ No newline at end of file
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureResults.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureResults.jsp 2012-02-02 22:58:29 UTC (rev 304)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureResults.jsp 2012-02-02 23:46:23 UTC (rev 305)
@@ -40,7 +40,6 @@
var incomingVal = $('[name="model.importMode"][checked="checked"]').val();
$('#' + incomingVal).show();
-
});
</script>
@@ -75,7 +74,7 @@
<br/>
<s:submit action="ConfigureResults-modeVoyage"
- value='%{getText("echobase.action.configureImport")}'/>
+ value='%{getText("echobase.action.import")}'/>
</s:form>
@@ -107,6 +106,6 @@
<br/>
<s:submit action="ConfigureResults-modeAcoustic"
- value='%{getText("echobase.action.configureImport")}'/>
+ value='%{getText("echobase.action.import")}'/>
</s:form>
\ No newline at end of file
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAccousticData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAccousticData.jsp 2012-02-02 22:58:29 UTC (rev 304)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAccousticData.jsp 2012-02-02 23:46:23 UTC (rev 305)
@@ -25,7 +25,7 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
-<s:url id="url" action="import-AccousticData" namespace="/importData"/>
+<s:url id="url" action="importAccousticData" namespace="/importData"/>
<meta http-equiv="refresh" content="1;url=${url}"/>
<title>
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesData.jsp 2012-02-02 22:58:29 UTC (rev 304)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesData.jsp 2012-02-02 23:46:23 UTC (rev 305)
@@ -25,7 +25,7 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
-<s:url id="url" action="import-CatchesData" namespace="/importData"/>
+<s:url id="url" action="importCatchesData" namespace="/importData"/>
<meta http-equiv="refresh" content="1;url=${url}"/>
<title>
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonData.jsp 2012-02-02 22:58:29 UTC (rev 304)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonData.jsp 2012-02-02 23:46:23 UTC (rev 305)
@@ -25,7 +25,7 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
-<s:url id="url" action="import-CommonData" namespace="/importData"/>
+<s:url id="url" action="importCommonData" namespace="/importData"/>
<meta http-equiv="refresh" content="1;url=${url}"/>
<title>
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressOperation.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressOperation.jsp 2012-02-02 22:58:29 UTC (rev 304)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressOperation.jsp 2012-02-02 23:46:23 UTC (rev 305)
@@ -25,7 +25,7 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
-<s:url id="url" action="import-Operation" namespace="/importData"/>
+<s:url id="url" action="importOperation" namespace="/importData"/>
<meta http-equiv="refresh" content="1;url=${url}"/>
<title>
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressResults.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressResults.jsp 2012-02-02 22:58:29 UTC (rev 304)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressResults.jsp 2012-02-02 23:46:23 UTC (rev 305)
@@ -25,7 +25,7 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
-<s:url id="url" action="import-Results" namespace="/importData"/>
+<s:url id="url" action="importResults" namespace="/importData"/>
<meta http-equiv="refresh" content="1;url=${url}"/>
<title>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-02-02 22:58:29 UTC (rev 304)
+++ trunk/pom.xml 2012-02-02 23:46:23 UTC (rev 305)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom4redmine</artifactId>
- <version>3.0.7</version>
+ <version>3.1</version>
</parent>
<groupId>fr.ifremer</groupId>
@@ -120,10 +120,7 @@
<h2Version>1.3.163</h2Version>
<postgresqlVersion>9.1-901-1.jdbc4</postgresqlVersion>
<slf4jVersion>1.6.4</slf4jVersion>
- <!--<jettyVersion>7.5.3.v20111011</jettyVersion>-->
<jackcessVersion>1.2.6</jackcessVersion>
- <!-- This version does not work (missing javax.el api in overlay) -->
- <jettyVersion>8.1.0.RC5</jettyVersion>
<hibernateVersion>3.6.9.Final</hibernateVersion>
@@ -331,7 +328,7 @@
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-runner</artifactId>
- <version>${jettyVersion}</version>
+ <version>${jettyPluginVersion}</version>
<scope>provided</scope>
</dependency>
@@ -428,27 +425,6 @@
<version>${nuitonI18nVersion}</version>
</plugin>
- <!-- remove this when using mavenpom 3.1 -->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>wagon-maven-plugin</artifactId>
- <version>${wagonPluginVersion}</version>
- </plugin>
-
- <!-- remove this when using mavenpom 3.1 -->
- <plugin>
- <groupId>org.nuiton</groupId>
- <artifactId>helper-maven-plugin</artifactId>
- <version>1.4</version>
- </plugin>
-
- <!-- remove this when using mavenpom 3.1 -->
- <plugin>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty-maven-plugin</artifactId>
- <version>${jettyPluginVersion}</version>
- </plugin>
-
</plugins>
</pluginManagement>
1
0
02 Feb '12
Author: tchemit
Date: 2012-02-02 23:58:29 +0100 (Thu, 02 Feb 2012)
New Revision: 304
Url: http://forge.codelutin.com/repositories/revision/echobase/304
Log:
import nouvelles donn?\195?\169es
Added:
trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBasePredicates.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/MissionNameAlreadyExistException.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/OperationImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ResultsImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CellPositionReference.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataImportConfiguration.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataImportMode.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/OperationImportConfiguration.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/ResultsImportConfiguration.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/ResultsImportMode.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EchotypeImportModel.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EchotypeImportModelRow.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthAgeKeyImportModel.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthAgeKeyImportModelRow.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthWeightKeyImportModel.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthWeightKeyImportModelRow.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonData.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureOperation.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureResults.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/CreateMission.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonData.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchOperation.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchResults.java
trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonData-ConfigureCommonData-modeAll-validation.xml
trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonData-ConfigureCommonData-modeTransect-validation.xml
trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureOperation-validation.xml
trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureResults-ConfigureResults-modeAcoustic-validation.xml
trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureResults-ConfigureResults-modeVoyage-validation.xml
trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/CreateMission-createMission-validation.xml
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureOperation.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureResults.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/createMission.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressOperation.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressResults.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultOperation.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultResults.jsp
trunk/src/doc/reunions/reunion-2012-02-01.txt
Removed:
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticRegionDataImportService.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/AccousticRegionDataImportConfiguration.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/ConfigureAccousticRegionData.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualData.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReference.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataComplete.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransect.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticRegionData.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesIndividualData.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesReference.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataComplete.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataFromTransect.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/SelectedMissionMode.java
trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionData-validation.xml
trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualData-validation.xml
trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReference-validation.xml
trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataComplete-validation.xml
trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransect-validation.xml
trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureMission-validation.xml
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticRegionData.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/progressAccousticRegionData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesIndividualData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesReference.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonDataComplete.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonDataFromTransect.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticRegionData.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
Modified:
trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java
trunk/echobase-entities/src/main/resources/i18n/echobase-entities_fr_FR.properties
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/CatchesDataImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbEditorService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDataMode.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/CatchesDataImportConfiguration.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/AcousticDataImportModel.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/AcousticDataImportModelRow.java
trunk/echobase-services/src/main/resources/i18n/echobase-services_fr_FR.properties
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/ConfigureAccousticData.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesData.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/SelectImportType.java
trunk/echobase-ui/src/main/resources/config/struts-importData.xml
trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticData-validation.xml
trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesData-validation.xml
trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAccousticData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesData.jsp
trunk/echobase-ui/src/main/webapp/css/screen.css
Modified: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java
===================================================================
--- trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -46,6 +46,7 @@
import fr.ifremer.echobase.entities.references.SizeCategory;
import fr.ifremer.echobase.entities.references.Species;
import fr.ifremer.echobase.entities.references.SpeciesCategory;
+import fr.ifremer.echobase.entities.references.Strata;
import fr.ifremer.echobase.entities.references.Vessel;
import org.apache.commons.lang3.StringUtils;
import org.nuiton.topia.persistence.TopiaEntity;
@@ -76,6 +77,13 @@
}
};
+ public static final Function<Species, String> SPECIES_CODE_MEMO = new Function<Species, String>() {
+ @Override
+ public String apply(Species input) {
+ return input.getCodeMemo();
+ }
+ };
+
public static final Function<Vessel, String> VESSEL_NAME = new Function<Vessel, String>() {
@Override
public String apply(Vessel input) {
@@ -240,6 +248,13 @@
}
};
+ public static final Function<Strata, String> STRATA_BY_NAME = new Function<Strata, String>() {
+ @Override
+ public String apply(Strata input) {
+ return input.getName();
+ }
+ };
+
public static String getSpeciesCategoryKey(Species species, SizeCategory sizeCategory, SexCategory sexCategory) {
String key = species.getBaracoudaCode();
if (sizeCategory != null) {
Added: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBasePredicates.java
===================================================================
--- trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBasePredicates.java (rev 0)
+++ trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBasePredicates.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,61 @@
+/*
+ * #%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;
+
+import com.google.common.base.Predicate;
+import fr.ifremer.echobase.entities.references.AcousticInstrument;
+import fr.ifremer.echobase.entities.references.Echotype;
+
+/**
+ * Keep usefull precidates on model.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class EchoBasePredicates {
+
+ public static final Predicate<AcousticInstrument> IS_ACOUSTIC_INSTRUMENT_ME70 = new Predicate<AcousticInstrument>() {
+ @Override
+ public boolean apply(AcousticInstrument input) {
+ return input.getId().toUpperCase().contains("MEBS");
+ }
+ };
+
+ public static EchotypeByNamePredicate newEchotypeByNamePredicate(String name) {
+ return new EchotypeByNamePredicate(name);
+ }
+
+ public static class EchotypeByNamePredicate implements Predicate<Echotype> {
+ private final String echotypeName;
+
+ public EchotypeByNamePredicate(String echotypeName) {
+ this.echotypeName = echotypeName;
+ }
+
+ @Override
+ public boolean apply(Echotype input) {
+ return echotypeName.equals(input.getName());
+ }
+ }
+}
Property changes on: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBasePredicates.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
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-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-entities/src/main/resources/i18n/echobase-entities_fr_FR.properties 2012-02-02 22:58:29 UTC (rev 304)
@@ -15,7 +15,7 @@
echobase.common.ageCategory=
echobase.common.altCallsign=
echobase.common.aquisitionMethod=
-echobase.common.areaOfOperation=areaOfOperation
+echobase.common.areaOfOperation=AreaOfOperation
echobase.common.author=Auteur
echobase.common.authorEmail=Courriel de l'auteur
echobase.common.authorReference=
@@ -269,3 +269,4 @@
echobase.common.vesselType=
echobase.common.voyage=Campagne
echobase.config.data.directory.description=Chemin de l'application
+
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AbstractImportDataService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AbstractImportDataService.java 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AbstractImportDataService.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -39,5 +39,6 @@
*/
public abstract class AbstractImportDataService<M extends AbstractImportConfiguration> extends EchoBaseServiceSupport {
- public abstract Map<InputFile, CsvImportResult> startImport(M configuration, EchoBaseUser user) throws IOException, TopiaException;
+ public abstract Map<InputFile, CsvImportResult> startImport(M configuration,
+ EchoBaseUser user) throws IOException, TopiaException;
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticDataImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticDataImportService.java 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticDataImportService.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -26,6 +26,7 @@
import com.google.common.base.Preconditions;
import com.google.common.collect.Maps;
import fr.ifremer.echobase.EchoBaseFunctions;
+import fr.ifremer.echobase.EchoBasePredicates;
import fr.ifremer.echobase.InputFile;
import fr.ifremer.echobase.entities.EchoBaseUser;
import fr.ifremer.echobase.entities.data.Cell;
@@ -59,7 +60,7 @@
import java.util.Map;
/**
- * Service to launch a "common data complete" import.
+ * Service to launch a "acoustic data" import.
*
* @author tchemit <chemit(a)codelutin.com>
* @since 0.3
@@ -125,6 +126,8 @@
CellDAO cellDAO = (CellDAO) getDAO(Cell.class);
DataDAO dataDAO = (DataDAO) getDAO(Data.class);
+ boolean addDataAcquisition = configuration.isAddDataAcquisition();
+
Reader reader = new BufferedReader(new FileReader(inputFile.getFile()));
try {
Import<AcousticDataImportModelRow> importer = Import.newImport(csvModel, reader);
@@ -138,30 +141,55 @@
String sndname = row.getSndName();
String channelName = row.getChannelName();
String instrumentId = sndname + channelName;
- AcousticInstrument instrument = instrumentsById.get(instrumentId);
+ AcousticInstrument instrument =
+ instrumentsById.get(instrumentId);
+ boolean isME70 =
+ EchoBasePredicates.IS_ACOUSTIC_INSTRUMENT_ME70.apply(instrument);
if (dataAcquisition == null ||
!instrument.equals(dataAcquisition.getAcousticInstrument())) {
- // first dataAcquisition or new instrument
+ // need to use another data acquisition
String softwareVersion =
- getSoftwareVersion(configuration, instrument);
+ getSoftwareVersion(configuration, isME70);
+
String soundSpeedCalculations =
- getSoundSpeedCalculations(configuration, instrument);
+ getSoundSpeedCalculations(configuration, isME70);
- // create dataAcquisiton
- dataAcquisition = createDataAcquisition(
- configuration,
- instrument,
- softwareVersion,
- soundSpeedCalculations,
- row,
- dataAcquisitionDAO
- );
+ if (!addDataAcquisition && !transect.isDataAcquisitionEmpty()) {
- transect.addDataAcquisition(dataAcquisition);
+ // try to obtain an existing data acquisiton
+ for (DataAcquisition acquisition : transect.getDataAcquisition()) {
+
+ if (instrument.equals(acquisition.getAcousticInstrument())) {
+
+ // found a matching data acquisiotn from his acoustic instrument
+ dataAcquisition = acquisition;
+ break;
+ }
+ }
+ }
+
+ if (dataAcquisition == null) {
+
+ // need to create the data acquisition
+
+ // create dataAcquisiton
+ dataAcquisition = createDataAcquisition(
+ configuration,
+ instrument,
+ softwareVersion,
+ soundSpeedCalculations,
+ row,
+ dataAcquisitionDAO
+ );
+
+ // add it to transect
+ transect.addDataAcquisition(dataAcquisition);
+ }
+
// create data processing
dataProcessing = createDataProcessing(
configuration,
@@ -171,23 +199,29 @@
dataProcessingDAO
);
+ // add it to data acquisition
dataAcquisition.addDataProcessing(dataProcessing);
// must start a fresh new esdu cell
esduCell = null;
}
- Date startDate = row.getEsduCellStartDate();
+ int cellType = row.getCellType();
+
+ Date startDate = row.getCellDateStart();
String esduCellId = cellDateFormat.format(startDate);
- if (esduCell == null || !esduCellId.equals(esduCell.getName())) {
+ if (cellType == 4) {
+ // this is a esdu cell row
+
// create esdu cell
esduCell = cellDAO.create(
Cell.PROPERTY_CELL_TYPE, esduCellType,
Cell.PROPERTY_NAME, esduCellId
);
+ // add it to data processing
dataProcessing.addCell(esduCell);
// create esdu cell data
@@ -196,17 +230,19 @@
dataMetadatasByName,
row,
dataDAO);
+ } else {
- // force to create a new elementary cell
- elementaryCell = null;
- }
+ // this is a elementary cell row
- int cellNum = row.getElementaryCellNum();
+ int cellNum = row.getCellNum();
- String elementaryCellId = esduCellId + "_" + cellNum;
+ String elementaryCellId = esduCellId + "_" + cellNum;
- if (elementaryCell == null ||
- !elementaryCellId.equals(elementaryCell.getName())) {
+ if (esduCell == null) {
+ throw new IllegalStateException(
+ "No esdu cell where to attach the " +
+ "elementary cell " + elementaryCellId);
+ }
// create the elementary cell
@@ -214,15 +250,37 @@
Cell.PROPERTY_CELL_TYPE, elementaryCellType,
Cell.PROPERTY_NAME, elementaryCellId
);
+
+ // add it to esdu cell
esduCell.addChilds(elementaryCell);
+
+
+ // create datas of the elementary cell
+ createElementaryCellData(configuration,
+ elementaryCell,
+ dataMetadatasByName,
+ row,
+ dataDAO);
}
- // create datas of the elementary cell
- createElementaryCellData(configuration,
- elementaryCell,
- dataMetadatasByName,
- row,
- dataDAO);
+
+// if (esduCell == null ||
+// !esduCellId.equals(esduCell.getName())) {
+//
+//
+//
+// // force to create a new elementary cell
+// elementaryCell = null;
+// }
+//
+//
+//
+// if (elementaryCell == null ||
+// !elementaryCellId.equals(elementaryCell.getName())) {
+//
+//
+// }
+
}
} finally {
@@ -240,30 +298,33 @@
Data data;
String dataValue;
+ String suffix =
+ configuration.getCellPositionReference().getMetadataNameSuffix();
+
// create Latitude data
- dataMetadata = dataMetadatasByName.get("LatitudeStart");
+ dataMetadata = dataMetadatasByName.get("Latitude" + suffix);
dataValue = row.getEsduCellDataLatitude();
data = dao.create(Data.PROPERTY_DATA_METADATA, dataMetadata);
data.setDataValue(dataValue);
cell.addData(data);
// create Longitude data
- dataMetadata = dataMetadatasByName.get("LongitudeStart");
+ dataMetadata = dataMetadatasByName.get("Longitude" + suffix);
dataValue = row.getEsduCellDataLongitude();
data = dao.create(Data.PROPERTY_DATA_METADATA, dataMetadata);
data.setDataValue(dataValue);
cell.addData(data);
// create Depth data
- dataMetadata = dataMetadatasByName.get("DepthRefSurfaceStart");
+ dataMetadata = dataMetadatasByName.get("DepthRefSurface" + suffix);
dataValue = row.getEsduCellDataDepth();
data = dao.create(Data.PROPERTY_DATA_METADATA, dataMetadata);
data.setDataValue(dataValue);
cell.addData(data);
// create Time data
- dataMetadata = dataMetadatasByName.get("TimeStart");
- dataValue = row.getEsduCellDataTime();
+ dataMetadata = dataMetadatasByName.get("Time" + suffix);
+ dataValue = cellDateFormat.format(row.getCellDateStart());
data = dao.create(Data.PROPERTY_DATA_METADATA, dataMetadata);
data.setDataValue(dataValue);
cell.addData(data);
@@ -286,7 +347,7 @@
Data data;
String dataValue;
- int cellType = row.getElementaryCellType();
+ int cellType = row.getCellType();
String startMeta;
String endMeta;
@@ -304,27 +365,25 @@
startMeta = "DepthRefBottomStart";
endMeta = "DepthRefBottomEnd";
-
-
}
// create depth start data
dataMetadata = dataMetadatasByName.get(startMeta);
- dataValue = row.getElementaryCellDataDepthStart();
+ dataValue = row.getCellDepthStart();
data = dao.create(Data.PROPERTY_DATA_METADATA, dataMetadata);
data.setDataValue(dataValue);
cell.addData(data);
// create depth end data
dataMetadata = dataMetadatasByName.get(endMeta);
- dataValue = row.getElementaryCellDataDepthEnd();
+ dataValue = row.getCellDepthEnd();
data = dao.create(Data.PROPERTY_DATA_METADATA, dataMetadata);
data.setDataValue(dataValue);
cell.addData(data);
// create acoustic density data
dataMetadata = dataMetadatasByName.get("sa");
- dataValue = row.getElementaryCellDataAcousticDensity();
+ dataValue = row.getCellSa();
data = dao.create(Data.PROPERTY_DATA_METADATA, dataMetadata);
data.setDataValue(dataValue);
cell.addData(data);
@@ -447,28 +506,23 @@
}
private String getSoftwareVersion(AccousticDataImportConfiguration configuration,
- AcousticInstrument instrument) {
- String softwareVersionER60 = configuration.getAcquisitionSoftwareVersionER60();
- String softwareVersionME70 = configuration.getAcquisitionSoftwareVersionME70();
- String transceiverModel = instrument.getTransceiverModel();
- String result = softwareVersionER60;
-
- //FIXME Finish this algorithm
- if (transceiverModel.equals("ME70")) {
- result = softwareVersionME70;
+ boolean isME70) {
+ String result;
+ if (isME70) {
+ result = configuration.getAcquisitionSoftwareVersionME70();
+ } else {
+ result = configuration.getAcquisitionSoftwareVersionER60();
}
return result;
}
private String getSoundSpeedCalculations(AccousticDataImportConfiguration configuration,
- AcousticInstrument instrument) {
- String speedCalculationsER60 = configuration.getSoundSpeedCalculationsER60();
- String speedCalculationsME70 = configuration.getSoundSpeedCalculationsME70();
- String transceiverModel = instrument.getTransceiverModel();
- String result = speedCalculationsER60;
- //FIXME Finish this algorithm
- if (transceiverModel.equals("ME70")) {
- result = speedCalculationsME70;
+ boolean isME70) {
+ String result;
+ if (isME70) {
+ result = configuration.getSoundSpeedCalculationsME70();
+ } else {
+ result = configuration.getSoundSpeedCalculationsER60();
}
return result;
}
Deleted: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticRegionDataImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticRegionDataImportService.java 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticRegionDataImportService.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,58 +0,0 @@
-/*
- * #%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) {
- }
-
-
-}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesDataImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesDataImportService.java 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesDataImportService.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -26,12 +26,14 @@
import com.google.common.collect.Maps;
import fr.ifremer.echobase.InputFile;
import fr.ifremer.echobase.entities.EchoBaseUser;
+import fr.ifremer.echobase.entities.data.Voyage;
+import fr.ifremer.echobase.entities.references.Vessel;
import fr.ifremer.echobase.services.configurations.CatchesDataImportConfiguration;
import java.util.Map;
/**
- * Service to launch a "common data complete" import.
+ * Service to launch a "catches data" import.
*
* @author tchemit <chemit(a)codelutin.com>
* @since 0.3
@@ -39,26 +41,29 @@
public class CatchesDataImportService extends AbstractImportDataService<CatchesDataImportConfiguration> {
@Override
- public Map<InputFile, CsvImportResult> startImport(CatchesDataImportConfiguration configuration, EchoBaseUser user) {
+ 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);
+ Voyage voyage = getEntityById(Voyage.class,
+ configuration.getVoyageId());
+
+ Vessel vessel = getEntityById(Vessel.class,
+ configuration.getVesselId());
+
+ importSampleFile(configuration.getSampleFile(), voyage, vessel);
+
+ importSampleDataFile(configuration.getSampleDataFile(), voyage, vessel);
+
return result;
}
- private void importTbleStationFile(InputFile inputFile, char csvSeparator) {
+ private void importSampleFile(InputFile inputFile, Voyage voyage, Vessel vessel) {
+ char csvSeparator = serviceContext.getConfiguration().getCsvSeparator();
}
- private void importXtbleTriFile(InputFile inputFile, char csvSeparator) {
+ private void importSampleDataFile(InputFile inputFile, Voyage voyage, Vessel vessel) {
+ char csvSeparator = serviceContext.getConfiguration().getCsvSeparator();
}
- private void importTblMensurationFile(InputFile inputFile, char csvSeparator) {
- }
-
- private void importTblMensurationFileClass(InputFile inputFile, char csvSeparator) {
- }
}
Deleted: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesIndividualDataImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesIndividualDataImportService.java 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesIndividualDataImportService.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,52 +0,0 @@
-/*
- * #%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) {
- }
-}
Deleted: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesReferenceImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesReferenceImportService.java 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesReferenceImportService.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,60 +0,0 @@
-/*
- * #%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) {
- }
-}
Deleted: 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-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataCompleteImportService.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,242 +0,0 @@
-/*
- * #%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.EchoBaseFunctions;
-import fr.ifremer.echobase.EchoBaseTechnicalException;
-import fr.ifremer.echobase.InputFile;
-import fr.ifremer.echobase.entities.EchoBaseUser;
-import fr.ifremer.echobase.entities.data.Transect;
-import fr.ifremer.echobase.entities.data.Transit;
-import fr.ifremer.echobase.entities.data.Voyage;
-import fr.ifremer.echobase.entities.references.AreaOfOperation;
-import fr.ifremer.echobase.entities.references.Mission;
-import fr.ifremer.echobase.entities.references.Vessel;
-import fr.ifremer.echobase.services.configurations.CommonDataCompleteImportConfiguration;
-import fr.ifremer.echobase.services.csv.TransectImportModel;
-import fr.ifremer.echobase.services.csv.TransectImportModelRow;
-import fr.ifremer.echobase.services.csv.TransitImportModel;
-import fr.ifremer.echobase.services.csv.TransitImportModelRow;
-import fr.ifremer.echobase.services.csv.VoyageImportModel;
-import org.nuiton.topia.TopiaException;
-import org.nuiton.topia.persistence.TopiaDAO;
-import org.nuiton.util.csv.Import;
-import org.nuiton.util.csv.ImportModel;
-
-import java.io.BufferedReader;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.Reader;
-import java.util.Date;
-import java.util.List;
-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) throws IOException, TopiaException {
-
- Map<InputFile, CsvImportResult> result = Maps.newHashMap();
-
- Mission mission = getEntityById(Mission.class,
- configuration.getMissionId());
- AreaOfOperation areaOfOperation =
- getEntityById(AreaOfOperation.class,
- configuration.getAreaOfOperationId());
- Vessel vessel = getEntityById(Vessel.class,
- configuration.getVesselId());
-
- importVoyageFile(configuration.getVoyageFile(),
- mission,
- areaOfOperation,
- configuration.getVoyageDescription(),
- configuration.getDatum());
-
- List<Voyage> allVoyages = getEntities(Voyage.class);
- Map<String, Voyage> voyageMap = Maps.uniqueIndex(
- allVoyages, EchoBaseFunctions.VOYAGE_NAME);
-
- importTransitFile(configuration.getTransitFile(),
- voyageMap,
- configuration.getTransitRelatedActivity());
-
- importTransectFile(configuration.getTransectFile(),
- vessel,
- voyageMap,
- configuration.getDatum(),
- configuration.getTransectLicence(),
- configuration.getTransectGeospatialVerticalPositive(),
- configuration.getTransectBinUnitsPingAxis());
-
- importEchotypeFile(configuration.getEchotypeFile());
-
- commitTransaction("Could not commit transaction of common data import");
- 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);
- }
- }
-
- protected void importVoyageFile(InputFile inputFile,
- Mission mission,
- AreaOfOperation areaOfOperation,
- String voyageDescription,
- String datum) throws IOException, TopiaException {
-
-
- ImportModel<Voyage> csvModel = new VoyageImportModel(serviceContext.getConfiguration().getCsvSeparator());
-
- TopiaDAO<Voyage> dao = getDAO(Voyage.class);
- Reader reader = new BufferedReader(new FileReader(inputFile.getFile()));
- try {
- Import<Voyage> importer = Import.newImport(csvModel, reader);
- for (Voyage voyage : importer) {
- voyage.setMission(mission);
- voyage.setAreaOfOperation(areaOfOperation);
- voyage.setDescription(voyageDescription);
- voyage.setDatum(datum);
- dao.create(voyage);
- }
-
- } finally {
- reader.close();
- }
- }
-
- protected void importTransitFile(InputFile inputFile,
- Map<String, Voyage> voyageMap,
- String relatedActivity) throws TopiaException, IOException {
- TransitImportModel csvModel = new TransitImportModel(serviceContext.getConfiguration().getCsvSeparator(), voyageMap);
-
- TopiaDAO<Transit> dao = getDAO(Transit.class);
-
- Reader reader = new BufferedReader(new FileReader(inputFile.getFile()));
- try {
- Import<TransitImportModelRow> importer = Import.newImport(csvModel, reader);
- for (TransitImportModelRow row : importer) {
-
- Voyage voyage = row.getVoyage();
-
- Transit transit = dao.create();
-
- transit.setDescription(row.getDescription());
- transit.setStartLocality(row.getStartLocality());
- transit.setEndLocality(row.getEndLocality());
-
- transit.setStartTime(row.getStartTime());
- transit.setEndTime(row.getEndTime());
- transit.setRelatedActivity(relatedActivity);
- voyage.addTransit(transit);
- }
-
- } finally {
- reader.close();
- }
- }
-
- private void importTransectFile(InputFile inputFile,
- Vessel vessel,
- Map<String, Voyage> voyageMap,
- String datum,
- String license,
- String geospatialVerticalPositive,
- String binUnitsPingAxis
- ) throws TopiaException, IOException {
-
- TransectImportModel csvModel = new TransectImportModel(serviceContext.getConfiguration().getCsvSeparator(), voyageMap);
-
- TopiaDAO<Transect> dao = getDAO(Transect.class);
-
- Reader reader = new BufferedReader(new FileReader(inputFile.getFile()));
- try {
- Import<TransectImportModelRow> importer =
- Import.newImport(csvModel, reader);
- for (TransectImportModelRow row : importer) {
-
- Voyage voyage = row.getVoyage();
-
- Date timeCoverageStart = row.getTimeCoverageStart();
- Date timeCoverageEnd = row.getTimeCoverageEnd();
-
- Transit transit = voyage.getTransit(timeCoverageStart, timeCoverageEnd);
- if (transit == null) {
- throw new EchoBaseTechnicalException(
- "Could not find transit for voyage " + voyage.getName() + " between " + timeCoverageStart + " and " + timeCoverageEnd);
- }
-
- Transect transect = dao.create(
- Transect.PROPERTY_VESSEL, vessel
- );
-
- transect.setTitle(row.getTitle());
- transect.setTransectAbstract(row.getTransectAbstract());
- transect.setComment(row.getComment());
-
- transect.setDatum(datum);
- transect.setLicence(license);
- transect.setGeospatialVerticalPositive(geospatialVerticalPositive);
- transect.setBinUnitsPingAxis(binUnitsPingAxis);
-
- transect.setDateCreated(row.getDateCreated());
-
- transect.setTimeCoverageStart(timeCoverageStart);
- transect.setTimeCoverageEnd(timeCoverageEnd);
-
- transect.setGeospatialLatMin(row.getGeospatialLatMin());
- transect.setGeospatialLonMin(row.getGeospatialLonMin());
- transect.setGeospatialVerticalMin(row.getGeospatialVerticalMin());
-
- transect.setGeospatialLatMax(row.getGeospatialLatMax());
- transect.setGeospatialLonMax(row.getGeospatialLonMax());
- transect.setGeospatialVerticalMax(row.getGeospatialVerticalMax());
- transect.setLinestring(row.getLinestring());
- transit.addTransect(transect);
- }
-
- } finally {
- reader.close();
- }
- }
-
- private void importEchotypeFile(InputFile inputFile) {
-
- }
-
-}
Deleted: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataFromTransectImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataFromTransectImportService.java 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataFromTransectImportService.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,142 +0,0 @@
-/*
- * #%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.EchoBaseFunctions;
-import fr.ifremer.echobase.EchoBaseTechnicalException;
-import fr.ifremer.echobase.InputFile;
-import fr.ifremer.echobase.entities.EchoBaseUser;
-import fr.ifremer.echobase.entities.data.Transect;
-import fr.ifremer.echobase.entities.data.Transit;
-import fr.ifremer.echobase.entities.data.Voyage;
-import fr.ifremer.echobase.entities.references.Vessel;
-import fr.ifremer.echobase.services.configurations.CommonDataFromTransectImportConfiguration;
-import fr.ifremer.echobase.services.csv.TransectImportModel;
-import fr.ifremer.echobase.services.csv.TransectImportModelRow;
-import org.nuiton.topia.TopiaException;
-import org.nuiton.topia.persistence.TopiaDAO;
-import org.nuiton.util.csv.Import;
-
-import java.io.BufferedReader;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.Reader;
-import java.util.Date;
-import java.util.List;
-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) throws IOException, TopiaException {
- Map<InputFile, CsvImportResult> result = Maps.newHashMap();
-
- Voyage voyage = getEntityById(Voyage.class, configuration.getVoyageId());
- Vessel vessel = getEntityById(Vessel.class, configuration.getVesselId());
-
- List<Voyage> allVoyages = getEntities(Voyage.class);
- Map<String, Voyage> voyageMap = Maps.uniqueIndex(
- allVoyages, EchoBaseFunctions.VOYAGE_NAME);
-
- importTransectFile(configuration.getTransectFile(),
- voyage,
- voyageMap,
- vessel,
- configuration);
- return result;
- }
-
- private void importTransectFile(InputFile inputFile,
- Voyage voyage,
- Map<String, Voyage> voyageMap,
- Vessel vessel,
- CommonDataFromTransectImportConfiguration configuration
- ) throws TopiaException, IOException {
-
- String datum = configuration.getDatum();
- String license = configuration.getTransectLicence();
- String geospatialVerticalPositive = configuration.getTransectGeospatialVerticalPositive();
- String binUnitsPingAxis = configuration.getTransectBinUnitsPingAxis();
-
- TransectImportModel csvModel = new TransectImportModel(serviceContext.getConfiguration().getCsvSeparator(),
- voyageMap);
-
- TopiaDAO<Transect> dao = getDAO(Transect.class);
-
- Reader reader = new BufferedReader(new FileReader(inputFile.getFile()));
- try {
- Import<TransectImportModelRow> importer = Import.newImport(csvModel, reader);
- for (TransectImportModelRow row : importer) {
-
- Date timeCoverageStart = row.getTimeCoverageStart();
- Date timeCoverageEnd = row.getTimeCoverageEnd();
-
- Transit transit = voyage.getTransit(timeCoverageStart, timeCoverageEnd);
- if (transit == null) {
- throw new EchoBaseTechnicalException(
- "Could not find transit for voyage " +
- voyage.getName() + " between " + timeCoverageStart + " and " + timeCoverageEnd);
- }
-
- Transect transect =
- dao.create(Transect.PROPERTY_VESSEL, vessel);
-
- transect.setTitle(row.getTitle());
- transect.setTransectAbstract(row.getTransectAbstract());
- transect.setComment(row.getComment());
-
- transect.setDatum(datum);
- transect.setLicence(license);
- transect.setGeospatialVerticalPositive(geospatialVerticalPositive);
- transect.setBinUnitsPingAxis(binUnitsPingAxis);
-
- transect.setDateCreated(row.getDateCreated());
- transect.setTimeCoverageStart(timeCoverageStart);
- transect.setTimeCoverageEnd(timeCoverageEnd);
-
- transect.setGeospatialLatMin(row.getGeospatialLatMin());
- transect.setGeospatialLonMin(row.getGeospatialLonMin());
- transect.setGeospatialVerticalMin(row.getGeospatialVerticalMin());
-
- transect.setGeospatialLatMax(row.getGeospatialLatMax());
- transect.setGeospatialLonMax(row.getGeospatialLonMax());
- transect.setGeospatialVerticalMax(row.getGeospatialVerticalMax());
- transect.setLinestring(row.getLinestring());
- transit.addTransect(transect);
- }
-
- } finally {
- reader.close();
- }
- }
-
-}
Copied: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataImportService.java (from rev 303, trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataCompleteImportService.java)
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataImportService.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataImportService.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,274 @@
+/*
+ * #%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.base.Preconditions;
+import com.google.common.collect.Maps;
+import fr.ifremer.echobase.EchoBaseFunctions;
+import fr.ifremer.echobase.EchoBaseTechnicalException;
+import fr.ifremer.echobase.InputFile;
+import fr.ifremer.echobase.entities.EchoBaseUser;
+import fr.ifremer.echobase.entities.data.Transect;
+import fr.ifremer.echobase.entities.data.Transit;
+import fr.ifremer.echobase.entities.data.Voyage;
+import fr.ifremer.echobase.entities.references.AreaOfOperation;
+import fr.ifremer.echobase.entities.references.Mission;
+import fr.ifremer.echobase.entities.references.MissionDAO;
+import fr.ifremer.echobase.entities.references.Vessel;
+import fr.ifremer.echobase.services.configurations.CommonDataImportConfiguration;
+import fr.ifremer.echobase.services.configurations.CommonDataImportMode;
+import fr.ifremer.echobase.services.csv.TransectImportModel;
+import fr.ifremer.echobase.services.csv.TransectImportModelRow;
+import fr.ifremer.echobase.services.csv.TransitImportModel;
+import fr.ifremer.echobase.services.csv.TransitImportModelRow;
+import fr.ifremer.echobase.services.csv.VoyageImportModel;
+import org.nuiton.topia.TopiaException;
+import org.nuiton.topia.persistence.TopiaDAO;
+import org.nuiton.util.csv.Import;
+import org.nuiton.util.csv.ImportModel;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.Reader;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Service to launch a "common data" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class CommonDataImportService extends AbstractImportDataService<CommonDataImportConfiguration> {
+
+ @Override
+ public Map<InputFile, CsvImportResult> startImport(CommonDataImportConfiguration configuration,
+ EchoBaseUser user) throws IOException, TopiaException {
+
+ Map<InputFile, CsvImportResult> result = Maps.newHashMap();
+
+ CommonDataImportMode importMode = configuration.getImportMode();
+
+ Vessel vessel = getEntityById(Vessel.class,
+ configuration.getVesselId());
+
+ switch (importMode) {
+
+ case ALL: {
+ Mission mission = getEntityById(Mission.class,
+ configuration.getMissionId());
+ AreaOfOperation areaOfOperation =
+ getEntityById(AreaOfOperation.class,
+ configuration.getAreaOfOperationId());
+
+
+ importVoyageFile(configuration.getVoyageFile(),
+ mission,
+ areaOfOperation,
+ configuration.getVoyageDescription(),
+ configuration.getDatum());
+
+ List<Voyage> allVoyages = getEntities(Voyage.class);
+ Map<String, Voyage> voyageMap = Maps.uniqueIndex(
+ allVoyages, EchoBaseFunctions.VOYAGE_NAME);
+
+ importTransitFile(configuration.getTransitFile(),
+ voyageMap,
+ configuration.getTransitRelatedActivity());
+
+ importTransectFile(configuration.getTransectFile(),
+ vessel,
+ voyageMap,
+ configuration);
+
+
+ }
+ break;
+ case TRANSECT: {
+ List<Voyage> allVoyages = getEntities(Voyage.class);
+ Map<String, Voyage> voyageMap = Maps.uniqueIndex(
+ allVoyages, EchoBaseFunctions.VOYAGE_NAME);
+
+ importTransectFile(configuration.getTransectFile(),
+ vessel,
+ voyageMap,
+ configuration);
+ }
+ break;
+ }
+
+ commitTransaction("Could not commit transaction of common data import");
+ return result;
+ }
+
+ public Mission createMission(Mission mission) throws MissionNameAlreadyExistException {
+
+ Preconditions.checkNotNull(mission);
+
+ try {
+ MissionDAO dao = (MissionDAO) getDAO(Mission.class);
+
+ // check mission name is unique
+ boolean exists = dao.existByProperties(Mission.PROPERTY_NAME,
+ mission.getName());
+
+ if (exists) {
+ throw new MissionNameAlreadyExistException();
+ }
+ Mission result = dao.create(mission);
+ commitTransaction("Could not create mission " +
+ mission.getName());
+ return result;
+ } catch (TopiaException eee) {
+ throw new EchoBaseTechnicalException(eee);
+ }
+ }
+
+ protected void importVoyageFile(InputFile inputFile,
+ Mission mission,
+ AreaOfOperation areaOfOperation,
+ String voyageDescription,
+ String datum) throws IOException, TopiaException {
+
+
+ ImportModel<Voyage> csvModel = new VoyageImportModel(serviceContext.getConfiguration().getCsvSeparator());
+
+ TopiaDAO<Voyage> dao = getDAO(Voyage.class);
+ Reader reader = new BufferedReader(new FileReader(inputFile.getFile()));
+ try {
+ Import<Voyage> importer = Import.newImport(csvModel, reader);
+ for (Voyage voyage : importer) {
+ voyage.setMission(mission);
+ voyage.setAreaOfOperation(areaOfOperation);
+ voyage.setDescription(voyageDescription);
+ voyage.setDatum(datum);
+ dao.create(voyage);
+ }
+
+ } finally {
+ reader.close();
+ }
+ }
+
+ protected void importTransitFile(InputFile inputFile,
+ Map<String, Voyage> voyageMap,
+ String relatedActivity) throws TopiaException, IOException {
+ TransitImportModel csvModel = new TransitImportModel(serviceContext.getConfiguration().getCsvSeparator(), voyageMap);
+
+ TopiaDAO<Transit> dao = getDAO(Transit.class);
+
+ Reader reader = new BufferedReader(new FileReader(inputFile.getFile()));
+ try {
+ Import<TransitImportModelRow> importer = Import.newImport(csvModel, reader);
+ for (TransitImportModelRow row : importer) {
+
+ Voyage voyage = row.getVoyage();
+
+ Transit transit = dao.create();
+
+ transit.setDescription(row.getDescription());
+ transit.setStartLocality(row.getStartLocality());
+ transit.setEndLocality(row.getEndLocality());
+
+ transit.setStartTime(row.getStartTime());
+ transit.setEndTime(row.getEndTime());
+ transit.setRelatedActivity(relatedActivity);
+ voyage.addTransit(transit);
+ }
+
+ } finally {
+ reader.close();
+ }
+ }
+
+ private void importTransectFile(InputFile inputFile,
+ Vessel vessel,
+ Map<String, Voyage> voyageMap,
+ CommonDataImportConfiguration configuration
+ ) throws TopiaException, IOException {
+
+ String datum = configuration.getDatum();
+ String license = configuration.getTransectLicence();
+ String geospatialVerticalPositive = configuration.getTransectGeospatialVerticalPositive();
+ String binUnitsPingAxis = configuration.getTransectBinUnitsPingAxis();
+
+ TransectImportModel csvModel = new TransectImportModel(serviceContext.getConfiguration().getCsvSeparator(), voyageMap);
+
+ TopiaDAO<Transect> dao = getDAO(Transect.class);
+
+ Reader reader = new BufferedReader(new FileReader(inputFile.getFile()));
+ try {
+ Import<TransectImportModelRow> importer =
+ Import.newImport(csvModel, reader);
+ for (TransectImportModelRow row : importer) {
+
+ Voyage voyage = row.getVoyage();
+
+ Date timeCoverageStart = row.getTimeCoverageStart();
+ Date timeCoverageEnd = row.getTimeCoverageEnd();
+
+ Transit transit = voyage.getTransit(timeCoverageStart, timeCoverageEnd);
+ if (transit == null) {
+ throw new EchoBaseTechnicalException(
+ "Could not find transit for voyage " + voyage.getName() + " between " + timeCoverageStart + " and " + timeCoverageEnd);
+ }
+
+ Transect transect = dao.create(
+ Transect.PROPERTY_VESSEL, vessel
+ );
+
+ transect.setTitle(row.getTitle());
+ transect.setTransectAbstract(row.getTransectAbstract());
+ transect.setComment(row.getComment());
+
+ transect.setDatum(datum);
+ transect.setLicence(license);
+ transect.setGeospatialVerticalPositive(geospatialVerticalPositive);
+ transect.setBinUnitsPingAxis(binUnitsPingAxis);
+
+ transect.setDateCreated(row.getDateCreated());
+
+ transect.setTimeCoverageStart(timeCoverageStart);
+ transect.setTimeCoverageEnd(timeCoverageEnd);
+
+ transect.setGeospatialLatMin(row.getGeospatialLatMin());
+ transect.setGeospatialLonMin(row.getGeospatialLonMin());
+ transect.setGeospatialVerticalMin(row.getGeospatialVerticalMin());
+
+ transect.setGeospatialLatMax(row.getGeospatialLatMax());
+ transect.setGeospatialLonMax(row.getGeospatialLonMax());
+ transect.setGeospatialVerticalMax(row.getGeospatialVerticalMax());
+ transect.setLinestring(row.getLinestring());
+ transit.addTransect(transect);
+ }
+
+ } finally {
+ reader.close();
+ }
+ }
+
+
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataImportService.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/DbEditorService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbEditorService.java 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbEditorService.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -145,7 +145,7 @@
long timestamp = System.currentTimeMillis();
int index = 0;
for (FilterPagerBean.FilterRule rule : rules) {
- String ruleFilter = null;
+ String ruleFilter;
String field = rule.getField();
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-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDataMode.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -35,26 +35,20 @@
*/
public enum ImportDataMode implements I18nAble {
- /** Import all common data from Voyage to Operation. */
- CommonDataComplete(n_("echobase.common.importDataMode.commonDataComplete")),
+ /** Import Voyage / Transit / Transect. */
+ CommonData(n_("echobase.common.importDataMode.commonData")),
- /** Import all common data from Transect to Operation. */
- CommonDataFromTransect(n_("echobase.common.importDataMode.commonDataFromTransect")),
+ /** Import operations common data. */
+ Operation(n_("echobase.common.importDataMode.operation")),
- /** 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"));
+ /** Import results. */
+ Results(n_("echobase.common.importDataMode.results"));
private final String i18nKey;
Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/MissionNameAlreadyExistException.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/MissionNameAlreadyExistException.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/MissionNameAlreadyExistException.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,34 @@
+/*
+ * #%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;
+
+/**
+ * TODO
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class MissionNameAlreadyExistException extends Exception {
+ private static final long serialVersionUID = 1L;
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/MissionNameAlreadyExistException.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/OperationImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/OperationImportService.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/OperationImportService.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,91 @@
+/*
+ * #%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.entities.data.Voyage;
+import fr.ifremer.echobase.entities.references.Vessel;
+import fr.ifremer.echobase.services.configurations.OperationImportConfiguration;
+import org.nuiton.topia.TopiaException;
+
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * Service to launch a "operations" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class OperationImportService extends AbstractImportDataService<OperationImportConfiguration> {
+
+
+ @Override
+ public Map<InputFile, CsvImportResult> startImport(OperationImportConfiguration configuration,
+ EchoBaseUser user) throws IOException, TopiaException {
+
+ Map<InputFile, CsvImportResult> result = Maps.newHashMap();
+
+ Vessel vessel = getEntityById(Vessel.class,
+ configuration.getVesselId());
+
+ Voyage voyage = getEntityById(Voyage.class,
+ configuration.getVoyageId());
+
+
+ importOperationFile(configuration.getOperationFile(), voyage, vessel);
+
+ importOperationMetadataFile(configuration.getOperationMetadataFile(),
+ voyage, vessel);
+
+ importgearMetadataFile(configuration.getGearMetadataFile(), voyage,
+ vessel);
+
+ commitTransaction("Could not commit transaction of operation import");
+ return result;
+ }
+
+ protected void importOperationFile(InputFile inputFile,
+ Voyage voyage,
+ Vessel vessel) {
+ char csvSeparator = getConfiguration().getCsvSeparator();
+
+ }
+
+ protected void importOperationMetadataFile(InputFile inputFile,
+ Voyage voyage,
+ Vessel vessel) {
+ char csvSeparator = getConfiguration().getCsvSeparator();
+
+ }
+
+ protected void importgearMetadataFile(InputFile inputFile,
+ Voyage voyage,
+ Vessel vessel) {
+ char csvSeparator = getConfiguration().getCsvSeparator();
+
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/OperationImportService.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Copied: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ResultsImportService.java (from rev 303, trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticRegionDataImportService.java)
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ResultsImportService.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ResultsImportService.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,315 @@
+/*
+ * #%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.Iterables;
+import com.google.common.collect.Maps;
+import fr.ifremer.echobase.EchoBaseFunctions;
+import fr.ifremer.echobase.EchoBasePredicates;
+import fr.ifremer.echobase.InputFile;
+import fr.ifremer.echobase.entities.EchoBaseUser;
+import fr.ifremer.echobase.entities.data.Voyage;
+import fr.ifremer.echobase.entities.references.DepthStratum;
+import fr.ifremer.echobase.entities.references.Echotype;
+import fr.ifremer.echobase.entities.references.LengthAgeKey;
+import fr.ifremer.echobase.entities.references.LengthWeightKey;
+import fr.ifremer.echobase.entities.references.SizeCategory;
+import fr.ifremer.echobase.entities.references.Species;
+import fr.ifremer.echobase.entities.references.SpeciesCategory;
+import fr.ifremer.echobase.entities.references.SpeciesCategoryDAO;
+import fr.ifremer.echobase.entities.references.Strata;
+import fr.ifremer.echobase.services.configurations.ResultsImportConfiguration;
+import fr.ifremer.echobase.services.configurations.ResultsImportMode;
+import fr.ifremer.echobase.services.csv.EchotypeImportModel;
+import fr.ifremer.echobase.services.csv.EchotypeImportModelRow;
+import fr.ifremer.echobase.services.csv.LengthAgeKeyImportModel;
+import fr.ifremer.echobase.services.csv.LengthAgeKeyImportModelRow;
+import fr.ifremer.echobase.services.csv.LengthWeightKeyImportModel;
+import fr.ifremer.echobase.services.csv.LengthWeightKeyImportModelRow;
+import org.nuiton.topia.TopiaException;
+import org.nuiton.topia.persistence.TopiaDAO;
+import org.nuiton.util.csv.Import;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.Reader;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Service to launch a "results" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class ResultsImportService extends AbstractImportDataService<ResultsImportConfiguration> {
+
+ @Override
+ public Map<InputFile, CsvImportResult> startImport(ResultsImportConfiguration configuration, EchoBaseUser user) throws IOException, TopiaException {
+ Map<InputFile, CsvImportResult> result = Maps.newHashMap();
+
+
+ ResultsImportMode importMode = configuration.getImportMode();
+ switch (importMode) {
+ case VOYAGE:
+
+ List<Voyage> allVoyages = getEntities(Voyage.class);
+ Map<String, Voyage> voyageMap = Maps.uniqueIndex(
+ allVoyages, EchoBaseFunctions.VOYAGE_NAME);
+
+ List<Species> allSpecies =
+ getEntities(Species.class);
+ Map<String, Species> speciesMap = Maps.uniqueIndex(
+ allSpecies, EchoBaseFunctions.SPECIES_CODE_MEMO);
+
+ if (configuration.canImportLengthWeightKeyFile()) {
+
+ List<Strata> allStratas =
+ getEntities(Strata.class);
+ Map<String, Strata> strataMap = Maps.uniqueIndex(
+ allStratas, EchoBaseFunctions.STRATA_BY_NAME);
+ importLenthAgeKey(configuration.getLengthAgeKeyFile(),
+ voyageMap,
+ strataMap,
+ speciesMap
+ );
+ }
+
+ if (configuration.canImportLengthWeightKeyFile()) {
+ List<SizeCategory> allSizeCategorys =
+ getEntities(SizeCategory.class);
+ Map<String, SizeCategory> sizeCategoryMap = Maps.uniqueIndex(
+ allSizeCategorys, EchoBaseFunctions.SIZE_CATEGORY_NAME);
+
+ importLenghtWeightKey(configuration.getLengthWeightKeyFile(),
+ voyageMap,
+ sizeCategoryMap,
+ speciesMap
+ );
+ }
+
+ if (configuration.canImportEchotypeFile()) {
+
+ List<DepthStratum> allDepthStratums =
+ getEntities(DepthStratum.class);
+ Map<String, DepthStratum> depthStratumMap = Maps.uniqueIndex(
+ allDepthStratums, EchoBaseFunctions.DEPTH_STRATUM_ID);
+
+ importEchotypeFile(configuration.getEchotypeFile(),
+ voyageMap,
+ depthStratumMap,
+ speciesMap
+ );
+ }
+ break;
+ case ACOUSTIC:
+ if (configuration.canImportRegionsFile()) {
+ importRegionsFile(configuration.getRegionsFile());
+ }
+ if (configuration.canImportAssociationFile()) {
+ importAssociationFile(configuration.getAssociationFile());
+ }
+ break;
+ }
+ return result;
+ }
+
+ protected void importRegionsFile(InputFile inputFile) {
+
+ }
+
+ protected void importAssociationFile(InputFile inputFile) {
+ }
+
+ protected void importLenghtWeightKey(InputFile inputFile,
+ Map<String, Voyage> voyageMap,
+ Map<String, SizeCategory> sizeCategoryMap,
+ Map<String, Species> speciesMap) throws TopiaException, IOException {
+
+ LengthWeightKeyImportModel csvModel = new LengthWeightKeyImportModel(
+ serviceContext.getConfiguration().getCsvSeparator(),
+ voyageMap,
+ sizeCategoryMap,
+ speciesMap);
+
+ TopiaDAO<LengthWeightKey> dao = getDAO(LengthWeightKey.class);
+
+ SpeciesCategoryDAO speciesCategoryDAO =
+ (SpeciesCategoryDAO) getDAO(SpeciesCategory.class);
+
+ Reader reader = new BufferedReader(new FileReader(inputFile.getFile()));
+ try {
+ Import<LengthWeightKeyImportModelRow> importer =
+ Import.newImport(csvModel, reader);
+
+ for (LengthWeightKeyImportModelRow row : importer) {
+
+ Voyage voyage = row.getVoyage();
+
+ LengthWeightKey lengthWeightKey = dao.create();
+
+ lengthWeightKey.setAParameter(row.getaParameter());
+ lengthWeightKey.setBParameter(row.getbParameter());
+ //TODO should we import it ?
+ //lengthWeightKey.setMetadata(row.getMetadata());
+
+ Species species = row.getSpecies();
+ SizeCategory sizeCategory = row.getSizeCategory();
+
+ // find speciesCategory
+ SpeciesCategory speciesCategory = speciesCategoryDAO.findByProperties(
+ SpeciesCategory.PROPERTY_SIZE_CATEGORY, sizeCategory,
+ SpeciesCategory.PROPERTY_SPECIES, species
+ );
+
+ if (speciesCategory == null) {
+
+ // not found, creates it
+ speciesCategory = speciesCategoryDAO.create(
+ SpeciesCategory.PROPERTY_SIZE_CATEGORY, sizeCategory,
+ SpeciesCategory.PROPERTY_SPECIES, species
+ );
+ }
+
+ lengthWeightKey.setSpeciesCategory(speciesCategory);
+
+ // attach it to voyage
+ voyage.addLengthWeightKey(lengthWeightKey);
+
+ }
+
+ } finally {
+ reader.close();
+ }
+
+ }
+
+ protected void importLenthAgeKey(InputFile inputFile,
+ Map<String, Voyage> voyageMap,
+ Map<String, Strata> startaMap,
+ Map<String, Species> speciesMap) throws IOException, TopiaException {
+
+ LengthAgeKeyImportModel csvModel = new LengthAgeKeyImportModel(
+ serviceContext.getConfiguration().getCsvSeparator(),
+ voyageMap,
+ startaMap,
+ speciesMap);
+
+ TopiaDAO<LengthAgeKey> dao = getDAO(LengthAgeKey.class);
+
+ Reader reader = new BufferedReader(new FileReader(inputFile.getFile()));
+ try {
+ Import<LengthAgeKeyImportModelRow> importer =
+ Import.newImport(csvModel, reader);
+
+ for (LengthAgeKeyImportModelRow row : importer) {
+
+ Voyage voyage = row.getVoyage();
+
+ LengthAgeKey lengthAgeKey = dao.create();
+
+ lengthAgeKey.setAge(row.getAge());
+ lengthAgeKey.setLength(row.getLength());
+ lengthAgeKey.setPercentAtAge(row.getPercentAtAge());
+ lengthAgeKey.setMetadata(row.getMetadata());
+ lengthAgeKey.setSpecies(row.getSpecies());
+ lengthAgeKey.setStrata(row.getStrata());
+
+ // attach it to voyage
+ voyage.addLengthAgeKey(lengthAgeKey);
+
+ }
+
+ } finally {
+ reader.close();
+ }
+ }
+
+ private void importEchotypeFile(InputFile inputFile,
+ Map<String, Voyage> voyageMap,
+ Map<String, DepthStratum> depthStratumMap,
+ Map<String, Species> speciesMap) throws TopiaException, IOException {
+
+ EchotypeImportModel csvModel = new EchotypeImportModel(
+ serviceContext.getConfiguration().getCsvSeparator(),
+ voyageMap,
+ depthStratumMap,
+ speciesMap);
+
+ TopiaDAO<Echotype> dao = getDAO(Echotype.class);
+
+ Reader reader = new BufferedReader(new FileReader(inputFile.getFile()));
+ try {
+ Import<EchotypeImportModelRow> importer =
+ Import.newImport(csvModel, reader);
+
+ for (EchotypeImportModelRow row : importer) {
+
+ Voyage voyage = row.getVoyage();
+
+ String echotypeName = row.getName();
+
+ // check if there is a echotype for the voyage and this name
+ Echotype echotype = null;
+
+ if (!voyage.isEchotypeEmpty()) {
+
+ echotype = Iterables.find(voyage.getEchotype(),
+ EchoBasePredicates.newEchotypeByNamePredicate(echotypeName));
+
+ }
+
+ if (echotype == null) {
+
+ // creates it
+ echotype = dao.create(
+ Echotype.PROPERTY_NAME, echotypeName,
+ Echotype.PROPERTY_MEANING, row.getMeaning()
+ );
+
+ DepthStratum depthStratum = row.getDepthStratum();
+ echotype.setDepthStratum(depthStratum);
+
+ // attach it to voyage
+
+ voyage.addEchotype(echotype);
+ }
+
+ Species species = row.getSpecies();
+ Species existingSpecie =
+ echotype.getSpeciesByTopiaId(species.getTopiaId());
+
+ if (existingSpecie == null) {
+
+ // add this species
+ echotype.addSpecies(species);
+ }
+ }
+
+ } finally {
+ reader.close();
+ }
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ResultsImportService.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/configurations/AccousticDataImportConfiguration.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AccousticDataImportConfiguration.java 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AccousticDataImportConfiguration.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -48,6 +48,9 @@
/** Selected vessel id to find out transect where to import datas. */
protected String vesselId;
+ /** Flag to always add new dataAcquisition when a new instrument is found in movies file. */
+ protected boolean addDataAcquisition = true;
+
/** Manual transceiverAcquisitionAbsorptionDescription. */
protected String transceiverAcquisitionAbsorptionDescription = "(i) Equation: Francois and garrison 1982,(ii) CTD, (iii) nominal value for entire data set";
@@ -93,6 +96,9 @@
/** Manual notes. */
protected String notes;
+ /** Cell position reference for esdu cell datas. */
+ protected CellPositionReference cellPositionReference;
+
/** Movies file to import. */
protected final InputFile moviesFile;
@@ -126,6 +132,14 @@
this.vesselId = vesselId;
}
+ public boolean isAddDataAcquisition() {
+ return addDataAcquisition;
+ }
+
+ public void setAddDataAcquisition(boolean addDataAcquisition) {
+ this.addDataAcquisition = addDataAcquisition;
+ }
+
public String getTransceiverAcquisitionAbsorptionDescription() {
return transceiverAcquisitionAbsorptionDescription;
}
@@ -250,6 +264,14 @@
this.processingDescription = processingDescription;
}
+ public CellPositionReference getCellPositionReference() {
+ return cellPositionReference;
+ }
+
+ public void setCellPositionReference(CellPositionReference cellPositionReference) {
+ this.cellPositionReference = cellPositionReference;
+ }
+
@Override
public InputFile[] getInputFiles() {
return new InputFile[]{moviesFile};
Deleted: 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 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AccousticRegionDataImportConfiguration.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,90 +0,0 @@
-/*
- * #%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;
-
- /** 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 InputFile getRegionsFile() {
- return regionsFile;
- }
-
-
- public InputFile getAssociationFile() {
- return associationFile;
- }
-
- @Override
- public InputFile[] getInputFiles() {
- return new InputFile[]{regionsFile, associationFile};
- }
-}
Modified: 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 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesDataImportConfiguration.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -42,27 +42,20 @@
/** Selected voyage id where to import datas. */
protected String voyageId;
+ /** Selected vessel id to find out transect where to import datas. */
+ protected String vesselId;
+
/** Station file to import. */
- protected final InputFile tlbeStationFile;
+ protected final InputFile sampleFile;
/** Tri file to import. */
- protected final InputFile xtblTriFile;
+ protected final InputFile sampleDataFile;
- /** 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"));
+ sampleFile = InputFile.newFile(
+ l_(locale, "echobase.common.sampleFile"));
+ sampleDataFile = InputFile.newFile(
+ l_(locale, "echobase.common.sampleDatafile"));
}
public String getVoyageId() {
@@ -73,25 +66,24 @@
this.voyageId = voyageId;
}
- public InputFile getTlbeStationFile() {
- return tlbeStationFile;
+ public String getVesselId() {
+ return vesselId;
}
- public InputFile getXtblTriFile() {
- return xtblTriFile;
+ public void setVesselId(String vesselId) {
+ this.vesselId = vesselId;
}
- public InputFile getTblMensurationFile() {
- return tblMensurationFile;
+ public InputFile getSampleFile() {
+ return sampleFile;
}
- public InputFile getTblMensurationClasseFile() {
- return tblMensurationClasseFile;
+ public InputFile getSampleDataFile() {
+ return sampleDataFile;
}
@Override
public InputFile[] getInputFiles() {
- return new InputFile[]{tlbeStationFile, xtblTriFile,
- tblMensurationFile, tblMensurationClasseFile};
+ return new InputFile[]{sampleFile, sampleDataFile};
}
}
Deleted: 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 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesIndividualDataImportConfiguration.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,69 +0,0 @@
-/*
- * #%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};
- }
-}
Deleted: 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 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesReferenceImportConfiguration.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,67 +0,0 @@
-/*
- * #%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};
- }
-}
Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CellPositionReference.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CellPositionReference.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CellPositionReference.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,74 @@
+/*
+ * #%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.I18nAble;
+
+import static org.nuiton.i18n.I18n.n_;
+
+/**
+ * To define cell position reference in acoustic import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public enum CellPositionReference implements I18nAble {
+
+ /** Begin. */
+ START(n_("echobase.common.cellPositionReference.start")) {
+ @Override
+ public String getMetadataNameSuffix() {
+ return "Start";
+ }
+ },
+
+ /** Mid. */
+ MID(n_("echobase.common.cellPositionReference.mid")) {
+ @Override
+ public String getMetadataNameSuffix() {
+ return "Bary";
+ }
+ },
+
+ /** End. */
+ END(n_("echobase.common.cellPositionReference.end")) {
+ @Override
+ public String getMetadataNameSuffix() {
+ return "End";
+ }
+ };
+
+ private final String i18nKey;
+
+ CellPositionReference(String i18nKey) {
+ this.i18nKey = i18nKey;
+ }
+
+ @Override
+ public String getI18nKey() {
+ return i18nKey;
+ }
+
+ public abstract String getMetadataNameSuffix();
+}
\ No newline at end of file
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CellPositionReference.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/CommonDataCompleteImportConfiguration.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataCompleteImportConfiguration.java 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataCompleteImportConfiguration.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,185 +0,0 @@
-/*
- * #%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;
-
- /** Selected vessel to use for transect. */
- protected String vesselId;
-
- /** Manual description of voyage. */
- protected String voyageDescription;
-
- /** transit related activity. */
- protected String transitRelatedActivity;
-
- /** transect license. */
- protected String transectLicence;
-
- /** transect geospatialVerticalPositive. */
- protected String transectGeospatialVerticalPositive = "down";
-
- /** transect binUnitsPingAxis. */
- protected String transectBinUnitsPingAxis = "1 nautical mile";
-
- /** Manual datum to use in voyage. */
- protected String datum = "WGS84";
-
- /** Voyage file to import. */
- protected final InputFile voyageFile;
-
- /** Transit file to import. */
- protected final InputFile transitFile;
-
- /** Transect file to import. */
- protected final InputFile transectFile;
-
- /** Echotype file to import. */
- protected final InputFile echotypeFile;
-
- public CommonDataCompleteImportConfiguration(Locale locale) {
- voyageFile = InputFile.newFile(
- l_(locale, "echobase.common.voyageFile"));
- transitFile = InputFile.newFile(
- l_(locale, "echobase.common.transitFile"));
- transectFile = InputFile.newFile(
- l_(locale, "echobase.common.transectFile"));
- 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 getVesselId() {
- return vesselId;
- }
-
- public void setVesselId(String vesselId) {
- this.vesselId = vesselId;
- }
-
- 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 String getTransitRelatedActivity() {
- return transitRelatedActivity;
- }
-
- public void setTransitRelatedActivity(String transitRelatedActivity) {
- this.transitRelatedActivity = transitRelatedActivity;
- }
-
- public String getTransectLicence() {
- return transectLicence;
- }
-
- public void setTransectLicence(String transectLicence) {
- this.transectLicence = transectLicence;
- }
-
- public String getTransectGeospatialVerticalPositive() {
- return transectGeospatialVerticalPositive;
- }
-
- public void setTransectGeospatialVerticalPositive(String transectGeospatialVerticalPositive) {
- this.transectGeospatialVerticalPositive = transectGeospatialVerticalPositive;
- }
-
- public String getTransectBinUnitsPingAxis() {
- return transectBinUnitsPingAxis;
- }
-
- public void setTransectBinUnitsPingAxis(String transectBinUnitsPingAxis) {
- this.transectBinUnitsPingAxis = transectBinUnitsPingAxis;
- }
-
- public InputFile getVoyageFile() {
- return voyageFile;
- }
-
- public InputFile getTransitFile() {
- return transitFile;
- }
-
- public InputFile getTransectFile() {
- return transectFile;
- }
-
- public InputFile getEchotypeFile() {
- return echotypeFile;
- }
-
- @Override
- public InputFile[] getInputFiles() {
- return new InputFile[]{voyageFile, transitFile,
- transectFile, echotypeFile};
- }
-}
Deleted: 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 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataFromTransectImportConfiguration.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,124 +0,0 @@
-/*
- * #%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;
-
- /** Selected vessel to use for transect. */
- protected String vesselId;
-
- /** transect license. */
- protected String transectLicence;
-
- /** transect geospatialVerticalPositive. */
- protected String transectGeospatialVerticalPositive = "down";
-
- /** transect binUnitsPingAxis. */
- protected String transectBinUnitsPingAxis = "1 nautical mile";
-
- /** Manual datum to use in voyage. */
- protected String datum = "WGS84";
-
- /** Transect file to import. */
- protected final InputFile transectFile;
-
- public CommonDataFromTransectImportConfiguration(Locale locale) {
- transectFile = InputFile.newFile(
- l_(locale, "echobase.common.transectFile"));
- }
-
- 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 getDatum() {
- return datum;
- }
-
- public void setDatum(String datum) {
- this.datum = datum;
- }
-
- public String getTransectLicence() {
- return transectLicence;
- }
-
- public void setTransectLicence(String transectLicence) {
- this.transectLicence = transectLicence;
- }
-
- public String getTransectGeospatialVerticalPositive() {
- return transectGeospatialVerticalPositive;
- }
-
- public void setTransectGeospatialVerticalPositive(String transectGeospatialVerticalPositive) {
- this.transectGeospatialVerticalPositive = transectGeospatialVerticalPositive;
- }
-
- public String getTransectBinUnitsPingAxis() {
- return transectBinUnitsPingAxis;
- }
-
- public void setTransectBinUnitsPingAxis(String transectBinUnitsPingAxis) {
- this.transectBinUnitsPingAxis = transectBinUnitsPingAxis;
- }
-
- public InputFile getTransectFile() {
- return transectFile;
- }
-
- @Override
- public InputFile[] getInputFiles() {
- return new InputFile[]{transectFile};
- }
-}
Copied: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataImportConfiguration.java (from rev 303, trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataCompleteImportConfiguration.java)
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataImportConfiguration.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataImportConfiguration.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,197 @@
+/*
+ * #%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 CommonDataImportConfiguration extends AbstractImportConfiguration {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Selected import mode. */
+ protected CommonDataImportMode importMode;
+
+ /** Selected mission id to use in voyage. */
+ protected String missionId;
+
+ /** Selected voyage id to use (in mode 2). */
+ protected String voyageId;
+
+ /** Selected area of operation to use for voyage. */
+ protected String areaOfOperationId;
+
+ /** Selected vessel to use for transect. */
+ protected String vesselId;
+
+ /** Manual description of voyage. */
+ protected String voyageDescription;
+
+ /** transit related activity. */
+ protected String transitRelatedActivity;
+
+ /** transect license. */
+ protected String transectLicence;
+
+ /** transect geospatialVerticalPositive. */
+ protected String transectGeospatialVerticalPositive = "down";
+
+ /** transect binUnitsPingAxis. */
+ protected String transectBinUnitsPingAxis = "1 nautical mile";
+
+ /** Manual datum to use in voyage. */
+ protected String datum = "WGS84";
+
+ /** Voyage file to import. */
+ protected final InputFile voyageFile;
+
+ /** Transit file to import. */
+ protected final InputFile transitFile;
+
+ /** Transect file to import. */
+ protected final InputFile transectFile;
+
+ public CommonDataImportConfiguration(Locale locale) {
+ voyageFile = InputFile.newFile(
+ l_(locale, "echobase.common.voyageFile"));
+ transitFile = InputFile.newFile(
+ l_(locale, "echobase.common.transitFile"));
+ transectFile = InputFile.newFile(
+ l_(locale, "echobase.common.transectFile"));
+ }
+
+ public CommonDataImportMode getImportMode() {
+ return importMode;
+ }
+
+ public void setImportMode(CommonDataImportMode importMode) {
+ this.importMode = importMode;
+ }
+
+ 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 getVesselId() {
+ return vesselId;
+ }
+
+ public void setVesselId(String vesselId) {
+ this.vesselId = vesselId;
+ }
+
+ public String getVoyageId() {
+ return voyageId;
+ }
+
+ public void setVoyageId(String voyageId) {
+ this.voyageId = voyageId;
+ }
+
+ 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 String getTransitRelatedActivity() {
+ return transitRelatedActivity;
+ }
+
+ public void setTransitRelatedActivity(String transitRelatedActivity) {
+ this.transitRelatedActivity = transitRelatedActivity;
+ }
+
+ public String getTransectLicence() {
+ return transectLicence;
+ }
+
+ public void setTransectLicence(String transectLicence) {
+ this.transectLicence = transectLicence;
+ }
+
+ public String getTransectGeospatialVerticalPositive() {
+ return transectGeospatialVerticalPositive;
+ }
+
+ public void setTransectGeospatialVerticalPositive(String transectGeospatialVerticalPositive) {
+ this.transectGeospatialVerticalPositive = transectGeospatialVerticalPositive;
+ }
+
+ public String getTransectBinUnitsPingAxis() {
+ return transectBinUnitsPingAxis;
+ }
+
+ public void setTransectBinUnitsPingAxis(String transectBinUnitsPingAxis) {
+ this.transectBinUnitsPingAxis = transectBinUnitsPingAxis;
+ }
+
+ public InputFile getVoyageFile() {
+ return voyageFile;
+ }
+
+ public InputFile getTransitFile() {
+ return transitFile;
+ }
+
+ public InputFile getTransectFile() {
+ return transectFile;
+ }
+
+ @Override
+ public InputFile[] getInputFiles() {
+ return new InputFile[]{voyageFile, transitFile, transectFile};
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataImportConfiguration.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/CommonDataImportMode.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataImportMode.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataImportMode.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,54 @@
+/*
+ * #%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.I18nAble;
+
+import static org.nuiton.i18n.I18n.n_;
+
+/**
+ * To define common data import mode.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public enum CommonDataImportMode implements I18nAble {
+
+ /** Import Voyage / Transit / Transect. */
+ ALL(n_("echobase.common.commonDataImportMode.all")),
+
+ /** Import all common data from Transect to Operation. */
+ TRANSECT(n_("echobase.common.commonDataImportMode.transect"));
+
+ private final String i18nKey;
+
+ CommonDataImportMode(String i18nKey) {
+ this.i18nKey = i18nKey;
+ }
+
+ @Override
+ public String getI18nKey() {
+ return i18nKey;
+ }
+}
\ No newline at end of file
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataImportMode.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/OperationImportConfiguration.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/OperationImportConfiguration.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/OperationImportConfiguration.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,100 @@
+/*
+ * #%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 "operation" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class OperationImportConfiguration extends AbstractImportConfiguration {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Selected voyage id where to import datas. */
+ protected String voyageId;
+
+ /** Selected vessel to use for transect. */
+ protected String vesselId;
+
+ /** operation file to import. */
+ protected final InputFile operationFile;
+
+ /** operation metadatas file to import. */
+ protected final InputFile operationMetadataFile;
+
+ /** gear metadatas file to import. */
+ protected final InputFile gearMetadataFile;
+
+ public OperationImportConfiguration(Locale locale) {
+ operationFile = InputFile.newFile(
+ l_(locale, "echobase.common.operationFile"));
+ operationMetadataFile = InputFile.newFile(
+ l_(locale, "echobase.common.operationMetadataFile"));
+ gearMetadataFile = InputFile.newFile(
+ l_(locale, "echobase.common.gearMetadataFile"));
+ }
+
+ 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 InputFile getOperationFile() {
+ return operationFile;
+ }
+
+ public InputFile getOperationMetadataFile() {
+ return operationMetadataFile;
+ }
+
+ public InputFile getGearMetadataFile() {
+ return gearMetadataFile;
+ }
+
+ @Override
+ public InputFile[] getInputFiles() {
+ return new InputFile[]{operationFile,
+ operationMetadataFile,
+ gearMetadataFile};
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/OperationImportConfiguration.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Copied: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/ResultsImportConfiguration.java (from rev 303, trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AccousticRegionDataImportConfiguration.java)
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/ResultsImportConfiguration.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/ResultsImportConfiguration.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,148 @@
+/*
+ * #%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 "results" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class ResultsImportConfiguration 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;
+
+ protected ResultsImportMode importMode;
+
+ /** Region file to import. */
+ protected final InputFile regionsFile;
+
+ /** Region cell associations file to import. */
+ protected final InputFile associationFile;
+
+ /** Region echotype file to import. */
+ protected final InputFile echotypeFile;
+
+ /** LengthAgeKey file to import. */
+ protected final InputFile lengthAgeKeyFile;
+
+ /** LengthWeightKey file to import. */
+ protected final InputFile lengthWeightKeyFile;
+
+ public ResultsImportConfiguration(Locale locale) {
+ regionsFile = InputFile.newFile(
+ l_(locale, "echobase.common.regionsFile"));
+ associationFile = InputFile.newFile(
+ l_(locale, "echobase.common.associationFile"));
+ echotypeFile = InputFile.newFile(
+ l_(locale, "echobase.common.echotypeFile"));
+
+ lengthAgeKeyFile = InputFile.newFile(
+ l_(locale, "echobase.common.lengthAgeKeyFile"));
+ lengthWeightKeyFile = InputFile.newFile(
+ l_(locale, "echobase.common.lengthWeightKeyFile"));
+ }
+
+ 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 ResultsImportMode getImportMode() {
+ return importMode;
+ }
+
+ public void setImportMode(ResultsImportMode importMode) {
+ this.importMode = importMode;
+ }
+
+ public InputFile getRegionsFile() {
+ return regionsFile;
+ }
+
+ public boolean canImportRegionsFile() {
+ return regionsFile.getFile() != null;
+ }
+
+ public InputFile getAssociationFile() {
+ return associationFile;
+ }
+
+ public boolean canImportAssociationFile() {
+ return associationFile.getFile() != null;
+ }
+
+ public InputFile getEchotypeFile() {
+ return echotypeFile;
+ }
+
+ public boolean canImportEchotypeFile() {
+ return echotypeFile.getFile() != null;
+ }
+
+ public InputFile getLengthAgeKeyFile() {
+ return lengthAgeKeyFile;
+ }
+
+ public boolean canImportLengthAgeKeyFile() {
+ return lengthAgeKeyFile.getFile() != null;
+ }
+
+ public InputFile getLengthWeightKeyFile() {
+ return lengthWeightKeyFile;
+ }
+
+ public boolean canImportLengthWeightKeyFile() {
+ return lengthWeightKeyFile.getFile() != null;
+ }
+
+ @Override
+ public InputFile[] getInputFiles() {
+ return new InputFile[]{regionsFile, associationFile, echotypeFile,
+ lengthAgeKeyFile, lengthWeightKeyFile};
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/ResultsImportConfiguration.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/ResultsImportMode.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/ResultsImportMode.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/ResultsImportMode.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,54 @@
+/*
+ * #%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.I18nAble;
+
+import static org.nuiton.i18n.I18n.n_;
+
+/**
+ * To define results import mode.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public enum ResultsImportMode implements I18nAble {
+
+ /** Import results at voyage level. */
+ VOYAGE(n_("echobase.common.resultsImportMode.voyage")),
+
+ /** Import acoustic results. */
+ ACOUSTIC(n_("echobase.common.resultsImportMode.acoustic"));
+
+ private final String i18nKey;
+
+ ResultsImportMode(String i18nKey) {
+ this.i18nKey = i18nKey;
+ }
+
+ @Override
+ public String getI18nKey() {
+ return i18nKey;
+ }
+}
\ No newline at end of file
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/ResultsImportMode.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/csv/AcousticDataImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/AcousticDataImportModel.java 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/AcousticDataImportModel.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -90,46 +90,46 @@
// Cell elementary Datas
newIgnoredColumn("MOVIES_EILayer\\cellset");//AW
- newMandatoryColumn("MOVIES_EILayer\\cellset\\cellnum", AcousticDataImportModelRow.PROPERTY_ELEMENTARY_CELL_NUM, CsvModelUtil.INTEGER);//AX
- newMandatoryColumn("MOVIES_EILayer\\cellset\\celltype", AcousticDataImportModelRow.PROPERTY_ELEMENTARY_CELL_TYPE, CsvModelUtil.INTEGER);//AY
- newMandatoryColumn("MOVIES_EILayer\\cellset\\depthstart", AcousticDataImportModelRow.PROPERTY_ELEMENTARY_CELL_DATA_DEPTH_START);//AZ
- newMandatoryColumn("MOVIES_EILayer\\cellset\\depthend", AcousticDataImportModelRow.PROPERTY_ELEMENTARY_CELL_DATA_DEPTHEND);//BA
+ newMandatoryColumn("MOVIES_EILayer\\cellset\\cellnum", AcousticDataImportModelRow.PROPERTY_CELL_NUM, CsvModelUtil.INTEGER);//AX
+ newMandatoryColumn("MOVIES_EILayer\\cellset\\celltype", AcousticDataImportModelRow.PROPERTY_CELL_TYPE, CsvModelUtil.INTEGER);//AY
+ newMandatoryColumn("MOVIES_EILayer\\cellset\\depthstart", AcousticDataImportModelRow.PROPERTY_CELL_DEPTH_START);//AZ
+ newMandatoryColumn("MOVIES_EILayer\\cellset\\depthend", AcousticDataImportModelRow.PROPERTY_CELL_DEPTH_END);//BA
newIgnoredColumn("MOVIES_EILayer\\cellset\\indexstart");//BB
newIgnoredColumn("MOVIES_EILayer\\cellset\\indexend");//BC
- newMandatoryColumn("MOVIES_EILayer\\cellset\\datestart", AcousticDataImportModelRow.PROPERTY_ESDU_CELL_START_DATE, CsvModelUtil.IMPORT_DAY_TIME3);//BD
+ newMandatoryColumn("MOVIES_EILayer\\cellset\\datestart", AcousticDataImportModelRow.PROPERTY_CELL_DATE_START, CsvModelUtil.IMPORT_DAY_TIME3);//BD
newIgnoredColumn("MOVIES_EILayer\\cellset\\dateend");//BE
newIgnoredColumn("MOVIES_EILayer\\cellset\\diststart");//BF
newIgnoredColumn("MOVIES_EILayer\\cellset\\distend");//BG
newMandatoryColumn("MOVIES_EILayer\\cellset\\thresholdup", AcousticDataImportModelRow.PROPERTY_EI_THRESHOLD, CsvModelUtil.INTEGER);//BH
newIgnoredColumn("MOVIES_EILayer\\cellset\\thresholdlow");//BI
newIgnoredColumn("MOVIES_EILayer\\eilayer");//BJ
- newMandatoryColumn("MOVIES_EILayer\\eilayer\\sa", AcousticDataImportModelRow.PROPERTY_ELEMENTARY_CELL_DATA_ACOUSTIC_DENSITY);//BK
+ newMandatoryColumn("MOVIES_EILayer\\eilayer\\sa", AcousticDataImportModelRow.PROPERTY_CELL_SA);//BK
newIgnoredColumn("MOVIES_EILayer\\eilayer\\sv");//BL
newIgnoredColumn("MOVIES_EILayer\\eilayer\\ni");//BM
newIgnoredColumn("MOVIES_EILayer\\eilayer\\nt");//BN
- // Cell ESDU Datas
- newIgnoredColumn("MOVIES_EILayer\\cellset2");//BO
- newIgnoredColumn("MOVIES_EILayer\\cellset2\\cellnum");//BP
- newIgnoredColumn("MOVIES_EILayer\\cellset2\\celltype");//BQ
- newIgnoredColumn("MOVIES_EILayer\\cellset2\\depthstart");//BR
- newIgnoredColumn("MOVIES_EILayer\\cellset2\\depthend");//BS
- newIgnoredColumn("MOVIES_EILayer\\cellset2\\indexstart");//BT
- newIgnoredColumn("MOVIES_EILayer\\cellset2\\indexend");//BU
- newMandatoryColumn("MOVIES_EILayer\\cellset2\\datestart", AcousticDataImportModelRow.PROPERTY_ESDU_CELL_DATA_TIME);//BV
- newIgnoredColumn("MOVIES_EILayer\\cellset2\\dateend");//BW
- newIgnoredColumn("MOVIES_EILayer\\cellset2\\diststart");//BX
- newIgnoredColumn("MOVIES_EILayer\\cellset2\\distend");//BY
- newIgnoredColumn("MOVIES_EILayer\\cellset2\\thresholdup");//BZ
- newIgnoredColumn("MOVIES_EILayer\\cellset2\\thresholdlow");//CA
- newIgnoredColumn("MOVIES_EILayer\\eilayer2");//CB
- newMandatoryColumn("MOVIES_EILayer\\eilayer2\\sa", AcousticDataImportModelRow.PROPERTY_ESDU_CELL_DATA_ACOUSTIC_DENSITY);//CC
- newIgnoredColumn("MOVIES_EILayer\\eilayer2\\sv");//CD
- newIgnoredColumn("MOVIES_EILayer\\eilayer2\\ni");//CE
- newIgnoredColumn("MOVIES_EILayer\\eilayer2\\nt");//CF
- newIgnoredColumn("MOVIES_EILayer\\boterr");//CG
- newIgnoredColumn("MOVIES_EILayer\\boterr\\sa");//CH
- newIgnoredColumn("MOVIES_EILayer\\boterr\\ni");//CI
+// // Cell ESDU Datas
+// newIgnoredColumn("MOVIES_EILayer\\cellset2");//BO
+// newIgnoredColumn("MOVIES_EILayer\\cellset2\\cellnum");//BP
+// newIgnoredColumn("MOVIES_EILayer\\cellset2\\celltype");//BQ
+// newIgnoredColumn("MOVIES_EILayer\\cellset2\\depthstart");//BR
+// newIgnoredColumn("MOVIES_EILayer\\cellset2\\depthend");//BS
+// newIgnoredColumn("MOVIES_EILayer\\cellset2\\indexstart");//BT
+// newIgnoredColumn("MOVIES_EILayer\\cellset2\\indexend");//BU
+// newMandatoryColumn("MOVIES_EILayer\\cellset2\\datestart", AcousticDataImportModelRow.PROPERTY_CELL_DATE_START);//BV
+// newIgnoredColumn("MOVIES_EILayer\\cellset2\\dateend");//BW
+// newIgnoredColumn("MOVIES_EILayer\\cellset2\\diststart");//BX
+// newIgnoredColumn("MOVIES_EILayer\\cellset2\\distend");//BY
+// newIgnoredColumn("MOVIES_EILayer\\cellset2\\thresholdup");//BZ
+// newIgnoredColumn("MOVIES_EILayer\\cellset2\\thresholdlow");//CA
+// newIgnoredColumn("MOVIES_EILayer\\eilayer2");//CB
+// newMandatoryColumn("MOVIES_EILayer\\eilayer2\\sa", AcousticDataImportModelRow.PROPERTY_CELL_SA);//CC
+// newIgnoredColumn("MOVIES_EILayer\\eilayer2\\sv");//CD
+// newIgnoredColumn("MOVIES_EILayer\\eilayer2\\ni");//CE
+// newIgnoredColumn("MOVIES_EILayer\\eilayer2\\nt");//CF
+// newIgnoredColumn("MOVIES_EILayer\\boterr");//CG
+// newIgnoredColumn("MOVIES_EILayer\\boterr\\sa");//CH
+// newIgnoredColumn("MOVIES_EILayer\\boterr\\ni");//CI
}
@Override
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/AcousticDataImportModelRow.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/AcousticDataImportModelRow.java 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/AcousticDataImportModelRow.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -37,28 +37,24 @@
public static final String PROPERTY_SNDNAME = "sndname";
- public static final String PROPERTY_ESDU_CELL_START_DATE = "esduCellStartDate";
+ public static final String PROPERTY_CELL_TYPE = "cellType";
- public static final String PROPERTY_ELEMENTARY_CELL_TYPE = "elementaryCellType";
+ public static final String PROPERTY_CELL_NUM = "cellNum";
- public static final String PROPERTY_ELEMENTARY_CELL_NUM = "elementaryCellNum";
-
public static final String PROPERTY_ESDU_CELL_DATA_LATITUDE = "esduCellDataLatitude";
public static final String PROPERTY_ESDU_CELL_DATA_LONGITUDE = "esduCellDataLongitude";
public static final String PROPERTY_ESDU_CELL_DATA_DEPTH = "esduCellDataDepth";
- public static final String PROPERTY_ESDU_CELL_DATA_TIME = "esduCellDataTime";
+ public static final String PROPERTY_CELL_DATE_START = "cellDateStart";
- public static final String PROPERTY_ESDU_CELL_DATA_ACOUSTIC_DENSITY = "esduCellDataAcousticDensity";
+ public static final String PROPERTY_CELL_DEPTH_START = "cellDepthStart";
- public static final String PROPERTY_ELEMENTARY_CELL_DATA_DEPTH_START = "elementaryCellDataDepthStart";
+ public static final String PROPERTY_CELL_DEPTH_END = "cellDepthEnd";
- public static final String PROPERTY_ELEMENTARY_CELL_DATA_DEPTHEND = "elementaryCellDataDepthend";
+ public static final String PROPERTY_CELL_SA = "cellSa";
- public static final String PROPERTY_ELEMENTARY_CELL_DATA_ACOUSTIC_DENSITY = "elementaryCellDataAcousticDensity";
-
public static final String PROPERTY_TRANSCEIVER_ACQUISITION_PULSE_LENGTH = "transceiverAcquisitionPulseLength";
public static final String PROPERTY_TRANSCEIVER_ACQUISITION_GAIN = "transceiverAcquisitionGain";
@@ -81,7 +77,7 @@
protected String channelName;
- protected Date esduCellStartDate;
+ protected Date cellDateStart;
protected String esduCellDataLatitude;
@@ -91,15 +87,15 @@
protected String esduCellDataAcousticDensity;
- protected int elementaryCellType;
+ protected int cellType;
- protected int elementaryCellNum;
+ protected int cellNum;
- protected String elementaryCellDataDepthStart;
+ protected String cellDepthStart;
- protected String elementaryCellDataDepthEnd;
+ protected String cellDepthEnd;
- protected String elementaryCellDataAcousticDensity;
+ protected String cellSa;
protected float transceiverAcquisitionPulseLength;
@@ -119,8 +115,6 @@
protected float eiThreshold;
- private String esduCellDataTime;
-
public String getSndName() {
return sndName;
}
@@ -137,28 +131,28 @@
this.channelName = channelName;
}
- public Date getEsduCellStartDate() {
- return esduCellStartDate;
+ public Date getCellDateStart() {
+ return cellDateStart;
}
- public void setEsduCellStartDate(Date esduCellStartDate) {
- this.esduCellStartDate = esduCellStartDate;
+ public void setCellDateStart(Date cellDateStart) {
+ this.cellDateStart = cellDateStart;
}
- public int getElementaryCellType() {
- return elementaryCellType;
+ public int getCellType() {
+ return cellType;
}
- public void setElementaryCellType(int elementaryCellType) {
- this.elementaryCellType = elementaryCellType;
+ public void setCellType(int cellType) {
+ this.cellType = cellType;
}
- public int getElementaryCellNum() {
- return elementaryCellNum;
+ public int getCellNum() {
+ return cellNum;
}
- public void setElementaryCellNum(int elementaryCellNum) {
- this.elementaryCellNum = elementaryCellNum;
+ public void setCellNum(int cellNum) {
+ this.cellNum = cellNum;
}
public String getEsduCellDataLatitude() {
@@ -193,28 +187,28 @@
this.esduCellDataAcousticDensity = esduCellDataAcousticDensity;
}
- public String getElementaryCellDataDepthStart() {
- return elementaryCellDataDepthStart;
+ public String getCellDepthStart() {
+ return cellDepthStart;
}
- public void setElementaryCellDataDepthStart(String elementaryCellDataDepthStart) {
- this.elementaryCellDataDepthStart = elementaryCellDataDepthStart;
+ public void setCellDepthStart(String cellDepthStart) {
+ this.cellDepthStart = cellDepthStart;
}
- public String getElementaryCellDataDepthEnd() {
- return elementaryCellDataDepthEnd;
+ public String getCellDepthEnd() {
+ return cellDepthEnd;
}
- public void setElementaryCellDataDepthEnd(String elementaryCellDataDepthEnd) {
- this.elementaryCellDataDepthEnd = elementaryCellDataDepthEnd;
+ public void setCellDepthEnd(String cellDepthEnd) {
+ this.cellDepthEnd = cellDepthEnd;
}
- public String getElementaryCellDataAcousticDensity() {
- return elementaryCellDataAcousticDensity;
+ public String getCellSa() {
+ return cellSa;
}
- public void setElementaryCellDataAcousticDensity(String elementaryCellDataAcousticDensity) {
- this.elementaryCellDataAcousticDensity = elementaryCellDataAcousticDensity;
+ public void setCellSa(String cellSa) {
+ this.cellSa = cellSa;
}
public float getTransceiverAcquisitionPulseLength() {
@@ -289,11 +283,4 @@
this.eiThreshold = eiThreshold;
}
- public String getEsduCellDataTime() {
- return esduCellDataTime;
- }
-
- public void setEsduCellDataTime(String esduCellDataTime) {
- this.esduCellDataTime = esduCellDataTime;
- }
}
Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EchotypeImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EchotypeImportModel.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EchotypeImportModel.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,75 @@
+/*
+ * #%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.csv;
+
+import fr.ifremer.echobase.entities.data.Voyage;
+import fr.ifremer.echobase.entities.references.DepthStratum;
+import fr.ifremer.echobase.entities.references.Species;
+
+import java.util.Map;
+
+/**
+ * Model to import echotypes.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class EchotypeImportModel extends CsvModelUtil.AbstractImportModel<EchotypeImportModelRow> {
+
+ protected final Map<String, Voyage> voyageMap;
+
+ protected final Map<String, DepthStratum> depthStratumMap;
+
+ protected final Map<String, Species> speciesMap;
+
+ public EchotypeImportModel(char separator,
+ Map<String, Voyage> voyageMap,
+ Map<String, DepthStratum> depthStratumMap,
+ Map<String, Species> speciesMap) {
+ super(separator);
+ this.voyageMap = voyageMap;
+ this.depthStratumMap = depthStratumMap;
+ this.speciesMap = speciesMap;
+
+ /*
+ voyage
+ echotypeName
+ DepthStratumID
+ meaning
+ genusSpecies
+ */
+
+ newMandatoryColumn("echotypeName", EchotypeImportModelRow.PROPERTY_NAME);
+ newMandatoryColumn("meaning", EchotypeImportModelRow.PROPERTY_MEANING);
+ newMandatoryColumn(EchotypeImportModelRow.PROPERTY_VOYAGE, CsvModelUtil.newForeignKeyValue(Voyage.class, voyageMap));
+ newMandatoryColumn("DepthStratumID", EchotypeImportModelRow.PROPERTY_DEPTH_STRATUM, CsvModelUtil.newForeignKeyValue(DepthStratum.class, depthStratumMap));
+ newMandatoryColumn("genusSpecies", EchotypeImportModelRow.PROPERTY_SPECIES, CsvModelUtil.newForeignKeyValue(Species.class, speciesMap));
+
+ }
+
+ @Override
+ public EchotypeImportModelRow newEmptyInstance() {
+ return new EchotypeImportModelRow();
+ }
+}
\ No newline at end of file
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EchotypeImportModel.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/csv/EchotypeImportModelRow.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EchotypeImportModelRow.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EchotypeImportModelRow.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -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.csv;
+
+import fr.ifremer.echobase.entities.data.Voyage;
+import fr.ifremer.echobase.entities.references.DepthStratum;
+import fr.ifremer.echobase.entities.references.Species;
+
+import java.io.Serializable;
+
+/**
+ * Bean used as a row for import of {@link EchotypeImportModel}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class EchotypeImportModelRow implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ public static final String PROPERTY_VOYAGE = "voyage";
+
+ public static final String PROPERTY_NAME = "name";
+
+ public static final String PROPERTY_MEANING = "meaning";
+
+ public static final String PROPERTY_DEPTH_STRATUM = "depthStratum";
+
+ public static final String PROPERTY_SPECIES = "species";
+
+ protected Voyage voyage;
+
+ protected String name;
+
+ protected String meaning;
+
+ protected DepthStratum depthStratum;
+
+ protected Species species;
+
+ public Voyage getVoyage() {
+ return voyage;
+ }
+
+ public void setVoyage(Voyage voyage) {
+ this.voyage = voyage;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getMeaning() {
+ return meaning;
+ }
+
+ public void setMeaning(String meaning) {
+ this.meaning = meaning;
+ }
+
+ public DepthStratum getDepthStratum() {
+ return depthStratum;
+ }
+
+ public void setDepthStratum(DepthStratum depthStratum) {
+ this.depthStratum = depthStratum;
+ }
+
+ public Species getSpecies() {
+ return species;
+ }
+
+ public void setSpecies(Species species) {
+ this.species = species;
+ }
+}
\ No newline at end of file
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EchotypeImportModelRow.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/csv/LengthAgeKeyImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthAgeKeyImportModel.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthAgeKeyImportModel.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,71 @@
+/*
+ * #%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.csv;
+
+import fr.ifremer.echobase.entities.data.Voyage;
+import fr.ifremer.echobase.entities.references.LengthAgeKey;
+import fr.ifremer.echobase.entities.references.Species;
+import fr.ifremer.echobase.entities.references.Strata;
+
+import java.util.Map;
+
+/**
+ * Model to import {@link LengthAgeKey}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class LengthAgeKeyImportModel extends CsvModelUtil.AbstractImportModel<LengthAgeKeyImportModelRow> {
+
+ protected final Map<String, Voyage> voyageMap;
+
+ protected final Map<String, Strata> strataMap;
+
+ protected final Map<String, Species> speciesMap;
+
+ public LengthAgeKeyImportModel(char separator,
+ Map<String, Voyage> voyageMap,
+ Map<String, Strata> strataMap,
+ Map<String, Species> speciesMap) {
+ super(separator);
+ this.voyageMap = voyageMap;
+ this.strataMap = strataMap;
+ this.speciesMap = speciesMap;
+
+ newMandatoryColumn(LengthAgeKeyImportModelRow.PROPERTY_AGE, CsvModelUtil.PRIMITIVE_INTEGER);
+ newMandatoryColumn(LengthAgeKeyImportModelRow.PROPERTY_PERCENT_AT_AGE, CsvModelUtil.PRIMITIVE_FLOAT);
+ newMandatoryColumn(LengthAgeKeyImportModelRow.PROPERTY_LENGTH, CsvModelUtil.PRIMITIVE_FLOAT);
+ newMandatoryColumn(LengthAgeKeyImportModelRow.PROPERTY_METADATA);
+
+ newMandatoryColumn(LengthAgeKeyImportModelRow.PROPERTY_VOYAGE, CsvModelUtil.newForeignKeyValue(Voyage.class, voyageMap));
+ newMandatoryColumn(LengthAgeKeyImportModelRow.PROPERTY_STRATA, CsvModelUtil.newForeignKeyValue(Strata.class, strataMap));
+ newMandatoryColumn(LengthAgeKeyImportModelRow.PROPERTY_SPECIES, CsvModelUtil.newForeignKeyValue(Species.class, speciesMap));
+
+ }
+
+ @Override
+ public LengthAgeKeyImportModelRow newEmptyInstance() {
+ return new LengthAgeKeyImportModelRow();
+ }
+}
\ No newline at end of file
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthAgeKeyImportModel.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/csv/LengthAgeKeyImportModelRow.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthAgeKeyImportModelRow.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthAgeKeyImportModelRow.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,126 @@
+/*
+ * #%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.csv;
+
+import fr.ifremer.echobase.entities.data.Voyage;
+import fr.ifremer.echobase.entities.references.LengthAgeKey;
+import fr.ifremer.echobase.entities.references.Species;
+import fr.ifremer.echobase.entities.references.Strata;
+
+import java.io.Serializable;
+
+/**
+ * Bean used as a row for import of {@link LengthAgeKeyImportModel}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class LengthAgeKeyImportModelRow implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ public static final String PROPERTY_SPECIES = LengthAgeKey.PROPERTY_SPECIES;
+
+ public static final String PROPERTY_AGE = LengthAgeKey.PROPERTY_AGE;
+
+ public static final String PROPERTY_VOYAGE = "voyage";
+
+ public static final String PROPERTY_LENGTH = LengthAgeKey.PROPERTY_LENGTH;
+
+ public static final String PROPERTY_PERCENT_AT_AGE = LengthAgeKey.PROPERTY_PERCENT_AT_AGE;
+
+ public static final String PROPERTY_METADATA = LengthAgeKey.PROPERTY_METADATA;
+
+ public static final String PROPERTY_STRATA = LengthAgeKey.PROPERTY_STRATA;
+
+ protected Species species;
+
+ protected int age;
+
+ protected Voyage voyage;
+
+ protected float length;
+
+ protected float percentAtAge;
+
+ protected String metadata;
+
+ protected Strata strata;
+
+ public Species getSpecies() {
+ return species;
+ }
+
+ public void setSpecies(Species species) {
+ this.species = species;
+ }
+
+ public int getAge() {
+ return age;
+ }
+
+ public void setAge(int age) {
+ this.age = age;
+ }
+
+ public Voyage getVoyage() {
+ return voyage;
+ }
+
+ public void setVoyage(Voyage voyage) {
+ this.voyage = voyage;
+ }
+
+ public float getLength() {
+ return length;
+ }
+
+ public void setLength(float length) {
+ this.length = length;
+ }
+
+ public float getPercentAtAge() {
+ return percentAtAge;
+ }
+
+ public void setPercentAtAge(float percentAtAge) {
+ this.percentAtAge = percentAtAge;
+ }
+
+ public String getMetadata() {
+ return metadata;
+ }
+
+ public void setMetadata(String metadata) {
+ this.metadata = metadata;
+ }
+
+ public Strata getStrata() {
+ return strata;
+ }
+
+ public void setStrata(Strata strata) {
+ this.strata = strata;
+ }
+}
\ No newline at end of file
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthAgeKeyImportModelRow.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/csv/LengthWeightKeyImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthWeightKeyImportModel.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthWeightKeyImportModel.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,76 @@
+/*
+ * #%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.csv;
+
+import fr.ifremer.echobase.entities.data.Voyage;
+import fr.ifremer.echobase.entities.references.LengthWeightKey;
+import fr.ifremer.echobase.entities.references.SizeCategory;
+import fr.ifremer.echobase.entities.references.Species;
+
+import java.util.Map;
+
+/**
+ * Model to import {@link LengthWeightKey}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class LengthWeightKeyImportModel extends CsvModelUtil.AbstractImportModel<LengthWeightKeyImportModelRow> {
+
+ protected final Map<String, Voyage> voyageMap;
+
+ protected final Map<String, SizeCategory> sizeCategoryMap;
+
+ protected final Map<String, Species> speciesMap;
+
+ public LengthWeightKeyImportModel(char separator,
+ Map<String, Voyage> voyageMap,
+ Map<String, SizeCategory> sizeCategoryMap,
+ Map<String, Species> speciesMap) {
+ super(separator);
+ this.voyageMap = voyageMap;
+ this.sizeCategoryMap = sizeCategoryMap;
+ this.speciesMap = speciesMap;
+
+ /*
+ voyage
+ sizeCategory
+ aParameter
+ bParameter
+ codeMemo
+ */
+
+ newMandatoryColumn(LengthWeightKeyImportModelRow.PROPERTY_APARAMETER, CsvModelUtil.PRIMITIVE_FLOAT);
+ newMandatoryColumn(LengthWeightKeyImportModelRow.PROPERTY_BPARAMETER, CsvModelUtil.PRIMITIVE_FLOAT);
+
+ newMandatoryColumn(LengthWeightKeyImportModelRow.PROPERTY_VOYAGE, CsvModelUtil.newForeignKeyValue(Voyage.class, voyageMap));
+ newMandatoryColumn(LengthWeightKeyImportModelRow.PROPERTY_SIZE_CATEGORY, CsvModelUtil.newForeignKeyValue(SizeCategory.class, sizeCategoryMap));
+ newMandatoryColumn(LengthWeightKeyImportModelRow.PROPERTY_SPECIES, CsvModelUtil.newForeignKeyValue(Species.class, speciesMap));
+ }
+
+ @Override
+ public LengthWeightKeyImportModelRow newEmptyInstance() {
+ return new LengthWeightKeyImportModelRow();
+ }
+}
\ No newline at end of file
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthWeightKeyImportModel.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/csv/LengthWeightKeyImportModelRow.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthWeightKeyImportModelRow.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthWeightKeyImportModelRow.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,102 @@
+/*
+ * #%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.csv;
+
+import fr.ifremer.echobase.entities.data.Voyage;
+import fr.ifremer.echobase.entities.references.LengthWeightKey;
+import fr.ifremer.echobase.entities.references.SizeCategory;
+import fr.ifremer.echobase.entities.references.Species;
+
+import java.io.Serializable;
+
+/**
+ * Bean used as a row for import of {@link LengthWeightKeyImportModel}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class LengthWeightKeyImportModelRow implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ public static final String PROPERTY_VOYAGE = "voyage";
+
+ public static final String PROPERTY_SPECIES = "species";
+
+ public static final String PROPERTY_SIZE_CATEGORY = "sizeCategory";
+
+ public static final String PROPERTY_APARAMETER = LengthWeightKey.PROPERTY_APARAMETER;
+
+ public static final String PROPERTY_BPARAMETER = LengthWeightKey.PROPERTY_BPARAMETER;
+
+ protected Species species;
+
+ protected SizeCategory sizeCategory;
+
+ protected Voyage voyage;
+
+ protected float aParameter;
+
+ protected float bParameter;
+
+ public Species getSpecies() {
+ return species;
+ }
+
+ public void setSpecies(Species species) {
+ this.species = species;
+ }
+
+ public SizeCategory getSizeCategory() {
+ return sizeCategory;
+ }
+
+ public void setSizeCategory(SizeCategory sizeCategory) {
+ this.sizeCategory = sizeCategory;
+ }
+
+ public Voyage getVoyage() {
+ return voyage;
+ }
+
+ public void setVoyage(Voyage voyage) {
+ this.voyage = voyage;
+ }
+
+ public float getaParameter() {
+ return aParameter;
+ }
+
+ public void setaParameter(float aParameter) {
+ this.aParameter = aParameter;
+ }
+
+ public float getbParameter() {
+ return bParameter;
+ }
+
+ public void setbParameter(float bParameter) {
+ this.bParameter = bParameter;
+ }
+}
\ No newline at end of file
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/LengthWeightKeyImportModelRow.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
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-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-services/src/main/resources/i18n/echobase-services_fr_FR.properties 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,22 +1,27 @@
echobase.common.associationFile=Fichier d'associations de cellules
+echobase.common.cellPositionReference.end=Début
+echobase.common.cellPositionReference.mid=Milieu
+echobase.common.cellPositionReference.start=Fin
+echobase.common.commonDataImportMode.all=Import Voyage / Transit / Transects
+echobase.common.commonDataImportMode.transect=Import Transects
echobase.common.echotypeFile=Fichier echotype
+echobase.common.gearMetadataFile=Fichier Méta-données d'engin
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 donné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.importDataMode.catchesData=Import des données de pêche
+echobase.common.importDataMode.commonData=Import Voyage / Transit / Transect
+echobase.common.importDataMode.operation=Import des opérations
+echobase.common.importDataMode.results=Import des résultats
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.operationFile=Fichier Opérations
+echobase.common.operationMetadataFile=Fichier Méta-données opération
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.resultsImportMode.acoustic=Import des résultats acoustiques
+echobase.common.resultsImportMode.voyage=Import des résultats du voyage
+echobase.common.sampleDatafile=Fichier SampleData
+echobase.common.sampleFile=Fichier Sample
echobase.common.transectFile=Fichier des transects
echobase.common.transitFile=Fichier des transits
-echobase.common.voyageFile=Fichier des voayges
-echobase.common.xtblTriFile=Fichier Tri
+echobase.common.voyageFile=Fichier des voyages
Modified: 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 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/AbstractLaunchImport.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -72,7 +72,14 @@
log.info("Start imports for " + getModel());
}
- service.startImport(model, getEchoBaseSession().getEchoBaseUser());
+ try {
+ service.startImport(model, getEchoBaseSession().getEchoBaseUser());
+ } catch (Exception e) {
+
+ if (log.isErrorEnabled()) {
+ log.error("Could not do import ", e);
+ }
+ }
}
@Override
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticData.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticData.java 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticData.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -27,6 +27,8 @@
import fr.ifremer.echobase.entities.references.Vessel;
import fr.ifremer.echobase.services.EchoBaseServiceSupport;
import fr.ifremer.echobase.services.configurations.AccousticDataImportConfiguration;
+import fr.ifremer.echobase.services.configurations.CellPositionReference;
+import fr.ifremer.echobase.services.configurations.CommonDataImportMode;
import java.io.File;
import java.util.Map;
@@ -47,6 +49,8 @@
/** Universe of existing vessels. */
protected Map<String, String> vessels;
+ protected Map<String, String> cellPositionReferences;
+
public ConfigureAccousticData() {
super(AccousticDataImportConfiguration.class);
}
@@ -66,7 +70,13 @@
voyages = loadSortAndDecorate(service, Voyage.class);
vessels = loadSortAndDecorate(service, Vessel.class);
+ cellPositionReferences = decorateEnums(CellPositionReference.values());
+ if (getModel().getCellPositionReference() == null) {
+
+ getModel().setCellPositionReference(CellPositionReference.START);
+ }
+
return INPUT;
}
@@ -78,6 +88,10 @@
return vessels;
}
+ public Map<String, String> getCellPositionReferences() {
+ return cellPositionReferences;
+ }
+
public void setMoviesFile(File file) {
getModel().getMoviesFile().setFile(file);
}
Deleted: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionData.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionData.java 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionData.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,104 +0,0 @@
-/*
- * #%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 ConfigureAccousticRegionData 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 ConfigureAccousticRegionData() {
- 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);
- }
-}
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesData.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesData.java 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesData.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -24,6 +24,7 @@
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.CatchesDataImportConfiguration;
@@ -43,6 +44,9 @@
/** Universe of existing voyages. */
protected Map<String, String> voyages;
+ /** Universe of existing vessels. */
+ protected Map<String, String> vessels;
+
public ConfigureCatchesData() {
super(CatchesDataImportConfiguration.class);
}
@@ -61,6 +65,7 @@
newService(EchoBaseServiceSupport.class);
voyages = loadSortAndDecorate(service, Voyage.class);
+ vessels = loadSortAndDecorate(service, Vessel.class);
return INPUT;
}
@@ -69,51 +74,31 @@
return voyages;
}
- public void setTlbeStationFile(File file) {
- getModel().getTlbeStationFile().setFile(file);
+ public Map<String, String> getVessels() {
+ return vessels;
}
- public void setTlbeStationFileContentType(String contentType) {
- getModel().getTlbeStationFile().setContentType(contentType);
+ public void setSampleFile(File file) {
+ getModel().getSampleFile().setFile(file);
}
- public void setTlbeStationFileFileName(String fileName) {
- getModel().getTlbeStationFile().setFileName(fileName);
+ public void setSampleFileContentType(String contentType) {
+ getModel().getSampleFile().setContentType(contentType);
}
- public void setXtblTriFile(File file) {
- getModel().getXtblTriFile().setFile(file);
+ public void setSampleFileFileName(String fileName) {
+ getModel().getSampleFile().setFileName(fileName);
}
- public void setXtblTriFileContentType(String contentType) {
- getModel().getXtblTriFile().setContentType(contentType);
+ public void setSampleDataFile(File file) {
+ getModel().getSampleDataFile().setFile(file);
}
- public void setXtblTriFileFileName(String fileName) {
- getModel().getXtblTriFile().setFileName(fileName);
+ public void setSampleDataFileContentType(String contentType) {
+ getModel().getSampleDataFile().setContentType(contentType);
}
- public void setTblMensurationFile(File file) {
- getModel().getTblMensurationFile().setFile(file);
+ public void setSampleDataFileFileName(String fileName) {
+ getModel().getSampleDataFile().setFileName(fileName);
}
-
- 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);
- }
}
Deleted: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualData.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualData.java 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualData.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,83 +0,0 @@
-/*
- * #%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 ConfigureCatchesIndividualData extends AbstractConfigureImport<CatchesIndividualDataImportConfiguration> {
-
- private static final long serialVersionUID = 1L;
-
- /** Universe of existing voyages. */
- protected Map<String, String> voyages;
-
- public ConfigureCatchesIndividualData() {
- 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);
- }
-}
Deleted: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReference.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReference.java 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReference.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,72 +0,0 @@
-/*
- * #%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 ConfigureCatchesReference extends AbstractConfigureImport<CatchesReferenceImportConfiguration> {
-
- private static final long serialVersionUID = 1L;
-
- public ConfigureCatchesReference() {
- super(CatchesReferenceImportConfiguration.class);
- }
-
- @Override
- protected CatchesReferenceImportConfiguration createModel() {
- return new CatchesReferenceImportConfiguration(getLocale());
- }
-
- public void setLengthAgeKeyFile(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 setLengthWeightKeyFile(File file) {
- getModel().getLengthWeightKeyFile().setFile(file);
- }
-
- public void setLengthWeightKeyFileContentType(String contentType) {
- getModel().getLengthWeightKeyFile().setContentType(contentType);
- }
-
- public void setLengthWeightKeyFileFileName(String fileName) {
- getModel().getLengthWeightKeyFile().setFileName(fileName);
- }
-}
Copied: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonData.java (from rev 303, trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataComplete.java)
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonData.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonData.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,159 @@
+/*
+ * #%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.entities.data.Voyage;
+import fr.ifremer.echobase.entities.references.AreaOfOperation;
+import fr.ifremer.echobase.entities.references.Mission;
+import fr.ifremer.echobase.entities.references.Vessel;
+import fr.ifremer.echobase.services.EchoBaseServiceSupport;
+import fr.ifremer.echobase.services.configurations.CommonDataImportConfiguration;
+import fr.ifremer.echobase.services.configurations.CommonDataImportMode;
+
+import java.io.File;
+import java.util.Map;
+
+/**
+ * Configure a accoustic data import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class ConfigureCommonData extends AbstractConfigureImport<CommonDataImportConfiguration> {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Universe of existing missions. */
+ protected Map<String, String> missions;
+
+ /** Universe of existing voyages. */
+ protected Map<String, String> voyages;
+
+ /** Universe of existing area of operations. */
+ protected Map<String, String> areaOfOperations;
+
+ /** Universe of existing vessels. */
+ protected Map<String, String> vessels;
+
+ /** Universe of possible import modes. */
+ protected Map<String, String> importModes;
+
+ public ConfigureCommonData() {
+ super(CommonDataImportConfiguration.class);
+ }
+
+ @Override
+ protected CommonDataImportConfiguration createModel() {
+ return new CommonDataImportConfiguration(getLocale());
+ }
+
+ @Override
+ public String input() throws Exception {
+
+ super.input();
+
+ EchoBaseServiceSupport service =
+ newService(EchoBaseServiceSupport.class);
+
+ missions = loadSortAndDecorate(service, Mission.class);
+ voyages = loadSortAndDecorate(service, Voyage.class);
+ areaOfOperations = loadSortAndDecorate(service, AreaOfOperation.class);
+ vessels = loadSortAndDecorate(service, Vessel.class);
+ importModes = decorateEnums(CommonDataImportMode.values());
+
+ if (getModel().getImportMode() == null) {
+
+ getModel().setImportMode(CommonDataImportMode.ALL);
+ }
+ return INPUT;
+ }
+
+ @InputConfig(methodName = "input")
+ public String modeAll() {
+ return SUCCESS;
+ }
+
+ @InputConfig(methodName = "input")
+ public String modeTransect() {
+ return SUCCESS;
+ }
+
+ public Map<String, String> getMissions() {
+ return missions;
+ }
+
+ public Map<String, String> getVoyages() {
+ return voyages;
+ }
+
+ public Map<String, String> getAreaOfOperations() {
+ return areaOfOperations;
+ }
+
+ public Map<String, String> getVessels() {
+ return vessels;
+ }
+
+ public Map<String, String> getImportModes() {
+ return importModes;
+ }
+
+ public void setVoyageFile(File file) {
+ getModel().getVoyageFile().setFile(file);
+ }
+
+ public void setVoyageFileContentType(String contentType) {
+ getModel().getVoyageFile().setContentType(contentType);
+ }
+
+ public void setVoyageFileFileName(String fileName) {
+ getModel().getVoyageFile().setFileName(fileName);
+ }
+
+ public void setTransitFile(File file) {
+ getModel().getTransitFile().setFile(file);
+ }
+
+ public void setTransitFileContentType(String contentType) {
+ getModel().getTransitFile().setContentType(contentType);
+ }
+
+ public void setTransitFileFileName(String fileName) {
+ getModel().getTransitFile().setFileName(fileName);
+ }
+
+ public void setTransectFile(File file) {
+ getModel().getTransectFile().setFile(file);
+ }
+
+ public void setTransectFileContentType(String contentType) {
+ getModel().getTransectFile().setContentType(contentType);
+ }
+
+ public void setTransectFileFileName(String fileName) {
+ getModel().getTransectFile().setFileName(fileName);
+ }
+
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonData.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/ConfigureCommonDataComplete.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataComplete.java 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataComplete.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,196 +0,0 @@
-/*
- * #%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.entities.references.AreaOfOperation;
-import fr.ifremer.echobase.entities.references.Mission;
-import fr.ifremer.echobase.entities.references.MissionImpl;
-import fr.ifremer.echobase.entities.references.Vessel;
-import fr.ifremer.echobase.services.CommonDataCompleteImportService;
-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 ConfigureCommonDataComplete extends AbstractConfigureImport<CommonDataCompleteImportConfiguration> {
-
- private static final long serialVersionUID = 1L;
-
- /** Universe of existing missions. */
- protected Map<String, String> missions;
-
- /** Universe of existing area of operations. */
- protected Map<String, String> areaOfOperations;
-
- /** Universe of existing vessels. */
- protected Map<String, String> vessels;
-
- /** Universe of possible import modes. */
- protected Map<String, String> importModes;
-
- /** Selected import mode. */
- protected SelectedMissionMode importMode;
-
- /** mission to create (if asked to create a new mission). */
- protected Mission mission;
-
- public ConfigureCommonDataComplete() {
- 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);
- vessels = loadSortAndDecorate(service, Vessel.class);
-
- importModes = decorateEnums(SelectedMissionMode.values());
-
- if (importMode == null) {
- importMode = SelectedMissionMode.USE_EXISTING_MISSION;
- }
-
- return INPUT;
- }
-
- @InputConfig(methodName = "input")
- @Override
- public String execute() throws Exception {
-
- super.execute();
-
- if (importMode == SelectedMissionMode.CREATE_NEW_MISSION) {
-
- // create voyage in db
- CommonDataCompleteImportService service =
- newService(CommonDataCompleteImportService.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> getVessels() {
- return vessels;
- }
-
- 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 setVoyageFile(File file) {
- getModel().getVoyageFile().setFile(file);
- }
-
- public void setVoyageFileContentType(String contentType) {
- getModel().getVoyageFile().setContentType(contentType);
- }
-
- public void setVoyageFileFileName(String fileName) {
- getModel().getVoyageFile().setFileName(fileName);
- }
-
- public void setTransitFile(File file) {
- getModel().getTransitFile().setFile(file);
- }
-
- public void setTransitFileContentType(String contentType) {
- getModel().getTransitFile().setContentType(contentType);
- }
-
- public void setTransitFileFileName(String fileName) {
- getModel().getTransitFile().setFileName(fileName);
- }
-
- public void setTransectFile(File file) {
- getModel().getTransectFile().setFile(file);
- }
-
- public void setTransectFileContentType(String contentType) {
- getModel().getTransectFile().setContentType(contentType);
- }
-
- public void setTransectFileFileName(String fileName) {
- getModel().getTransectFile().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);
- }
-}
Deleted: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransect.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransect.java 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransect.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,92 +0,0 @@
-/*
- * #%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.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 ConfigureCommonDataFromTransect extends AbstractConfigureImport<CommonDataFromTransectImportConfiguration> {
-
- 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 ConfigureCommonDataFromTransect() {
- 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);
- vessels = loadSortAndDecorate(service, Vessel.class);
-
- return INPUT;
- }
-
- public Map<String, String> getVoyages() {
- return voyages;
- }
-
- public Map<String, String> getVessels() {
- return vessels;
- }
-
- public void setTransectFile(File file) {
- getModel().getTransectFile().setFile(file);
- }
-
- public void setTransectFileContentType(String contentType) {
- getModel().getTransectFile().setContentType(contentType);
- }
-
- public void setTransectFileFileName(String fileName) {
- getModel().getTransectFile().setFileName(fileName);
- }
-}
Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureOperation.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureOperation.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureOperation.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,116 @@
+/*
+ * #%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.OperationImportConfiguration;
+
+import java.io.File;
+import java.util.Map;
+
+/**
+ * TODO
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class ConfigureOperation extends AbstractConfigureImport<OperationImportConfiguration> {
+
+ 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 ConfigureOperation() {
+ super(OperationImportConfiguration.class);
+ }
+
+ @Override
+ protected OperationImportConfiguration createModel() {
+ return new OperationImportConfiguration(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 setOperationFile(File file) {
+ getModel().getOperationFile().setFile(file);
+ }
+
+ public void setOperationFileContentType(String contentType) {
+ getModel().getOperationFile().setContentType(contentType);
+ }
+
+ public void setOperationFileFileName(String fileName) {
+ getModel().getOperationFile().setFileName(fileName);
+ }
+
+ public void setOperationMetadataFile(File file) {
+ getModel().getOperationMetadataFile().setFile(file);
+ }
+
+ public void setOperationMetadataFileContentType(String contentType) {
+ getModel().getOperationMetadataFile().setContentType(contentType);
+ }
+
+ public void setOperationMetadataFileFileName(String fileName) {
+ getModel().getOperationMetadataFile().setFileName(fileName);
+ }
+
+ public void setGearMetadataFile(File file) {
+ getModel().getGearMetadataFile().setFile(file);
+ }
+
+ public void setGearMetadataFileContentType(String contentType) {
+ getModel().getGearMetadataFile().setContentType(contentType);
+ }
+
+ public void setGearMetadataFileFileName(String fileName) {
+ getModel().getGearMetadataFile().setFileName(fileName);
+ }
+}
\ No newline at end of file
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureOperation.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Copied: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureResults.java (from rev 303, trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionData.java)
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureResults.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureResults.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,164 @@
+/*
+ * #%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.entities.data.Voyage;
+import fr.ifremer.echobase.entities.references.Vessel;
+import fr.ifremer.echobase.services.EchoBaseServiceSupport;
+import fr.ifremer.echobase.services.configurations.ResultsImportConfiguration;
+import fr.ifremer.echobase.services.configurations.ResultsImportMode;
+
+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 ConfigureResults extends AbstractConfigureImport<ResultsImportConfiguration> {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Universe of existing voyages. */
+ protected Map<String, String> voyages;
+
+ /** Universe of existing vessels. */
+ protected Map<String, String> vessels;
+
+ /** Universe of possible import modes. */
+ protected Map<String, String> importModes;
+
+ public ConfigureResults() {
+ super(ResultsImportConfiguration.class);
+ }
+
+ @Override
+ protected ResultsImportConfiguration createModel() {
+ return new ResultsImportConfiguration(getLocale());
+ }
+
+ @Override
+ public String input() throws Exception {
+
+ super.input();
+
+ EchoBaseServiceSupport service =
+ newService(EchoBaseServiceSupport.class);
+
+ voyages = loadSortAndDecorate(service, Voyage.class);
+ vessels = loadSortAndDecorate(service, Vessel.class);
+ importModes = decorateEnums(ResultsImportMode.values());
+
+ if (getModel().getImportMode() == null) {
+
+ getModel().setImportMode(ResultsImportMode.VOYAGE);
+ }
+ return INPUT;
+ }
+
+ @InputConfig(methodName = "input")
+ public String modeVoyage() {
+ return SUCCESS;
+ }
+
+ @InputConfig(methodName = "input")
+ public String modeAcoustic() {
+ return SUCCESS;
+ }
+
+ public Map<String, String> getVoyages() {
+ return voyages;
+ }
+
+ public Map<String, String> getVessels() {
+ return vessels;
+ }
+
+ public Map<String, String> getImportModes() {
+ return importModes;
+ }
+
+ 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);
+ }
+
+ public void setLengthAgeKeyFile(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 setLengthWeightKeyFile(File file) {
+ getModel().getLengthWeightKeyFile().setFile(file);
+ }
+
+ public void setLengthWeightKeyFileContentType(String contentType) {
+ getModel().getLengthWeightKeyFile().setContentType(contentType);
+ }
+
+ public void setLengthWeightKeyFileFileName(String fileName) {
+ getModel().getLengthWeightKeyFile().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/ConfigureResults.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/CreateMission.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/CreateMission.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/CreateMission.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,82 @@
+/*
+ * #%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.base.Preconditions;
+import fr.ifremer.echobase.entities.references.Mission;
+import fr.ifremer.echobase.entities.references.MissionImpl;
+import fr.ifremer.echobase.services.CommonDataImportService;
+import fr.ifremer.echobase.services.MissionNameAlreadyExistException;
+import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * To create a new mission
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class CreateMission extends EchoBaseActionSupport {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(CreateMission.class);
+
+ /** Mission to create. */
+ protected Mission mission;
+
+ public Mission getMission() {
+ if (mission == null) {
+ mission = new MissionImpl();
+ }
+ return mission;
+ }
+
+ @Override
+ public String execute() throws Exception {
+
+ Preconditions.checkNotNull(mission);
+
+ String result = INPUT;
+
+ try {
+ CommonDataImportService service =
+ newService(CommonDataImportService.class);
+ Mission missionSaved = service.createMission(mission);
+
+ if (log.isInfoEnabled()) {
+ log.info("Created mission : " + missionSaved.getTopiaId());
+ }
+ getTransaction().commitTransaction();
+ addActionMessage(_("echobase.information.mission.created", missionSaved.getName()));
+ result = SUCCESS;
+ } catch (MissionNameAlreadyExistException e) {
+ addFieldError("mission.name",
+ _("echobase.error.mission.name.already.exist"));
+ }
+ return result;
+ }
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/CreateMission.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/LaunchAccousticRegionData.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticRegionData.java 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticRegionData.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,43 +0,0 @@
-/*
- * #%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 LaunchAccousticRegionData extends AbstractLaunchImport<AccousticRegionDataImportConfiguration, AccousticRegionDataImportService> {
-
- private static final long serialVersionUID = 1L;
-
- public LaunchAccousticRegionData() {
- super(AccousticRegionDataImportConfiguration.class, AccousticRegionDataImportService.class);
- }
-
-}
Deleted: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesIndividualData.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesIndividualData.java 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesIndividualData.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,43 +0,0 @@
-/*
- * #%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 LaunchCatchesIndividualData extends AbstractLaunchImport<CatchesIndividualDataImportConfiguration, CatchesIndividualDataImportService> {
-
- private static final long serialVersionUID = 1L;
-
- public LaunchCatchesIndividualData() {
- super(CatchesIndividualDataImportConfiguration.class, CatchesIndividualDataImportService.class);
- }
-
-}
Deleted: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesReference.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesReference.java 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesReference.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,43 +0,0 @@
-/*
- * #%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 LaunchCatchesReference extends AbstractLaunchImport<CatchesReferenceImportConfiguration, CatchesReferenceImportService> {
-
- private static final long serialVersionUID = 1L;
-
- public LaunchCatchesReference() {
- super(CatchesReferenceImportConfiguration.class, CatchesReferenceImportService.class);
- }
-
-}
Copied: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonData.java (from rev 303, trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataComplete.java)
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonData.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonData.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -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.CommonDataImportService;
+import fr.ifremer.echobase.services.configurations.CommonDataImportConfiguration;
+
+/**
+ * Configure a accoustic data import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class LaunchCommonData extends AbstractLaunchImport<CommonDataImportConfiguration, CommonDataImportService> {
+
+ private static final long serialVersionUID = 1L;
+
+ public LaunchCommonData() {
+ super(CommonDataImportConfiguration.class, CommonDataImportService.class);
+ }
+
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonData.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/LaunchCommonDataComplete.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataComplete.java 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataComplete.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,43 +0,0 @@
-/*
- * #%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 LaunchCommonDataComplete extends AbstractLaunchImport<CommonDataCompleteImportConfiguration, CommonDataCompleteImportService> {
-
- private static final long serialVersionUID = 1L;
-
- public LaunchCommonDataComplete() {
- super(CommonDataCompleteImportConfiguration.class, CommonDataCompleteImportService.class);
- }
-
-}
Deleted: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataFromTransect.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataFromTransect.java 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataFromTransect.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,43 +0,0 @@
-/*
- * #%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 LaunchCommonDataFromTransect extends AbstractLaunchImport<CommonDataFromTransectImportConfiguration, CommonDataFromTransectImportService> {
-
- private static final long serialVersionUID = 1L;
-
- public LaunchCommonDataFromTransect() {
- super(CommonDataFromTransectImportConfiguration.class, CommonDataFromTransectImportService.class);
- }
-
-}
Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchOperation.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchOperation.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchOperation.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,44 @@
+/*
+ * #%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.OperationImportService;
+import fr.ifremer.echobase.services.configurations.OperationImportConfiguration;
+
+/**
+ * TODO
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class LaunchOperation extends AbstractLaunchImport<OperationImportConfiguration, OperationImportService> {
+
+ private static final long serialVersionUID = 1L;
+
+ public LaunchOperation() {
+ super(OperationImportConfiguration.class,
+ OperationImportService.class);
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchOperation.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Copied: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchResults.java (from rev 303, trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticRegionData.java)
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchResults.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchResults.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -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.ResultsImportService;
+import fr.ifremer.echobase.services.configurations.ResultsImportConfiguration;
+
+/**
+ * Configure a "result" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class LaunchResults extends AbstractLaunchImport<ResultsImportConfiguration, ResultsImportService> {
+
+ private static final long serialVersionUID = 1L;
+
+ public LaunchResults() {
+ super(ResultsImportConfiguration.class, ResultsImportService.class);
+ }
+
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchResults.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
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-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/SelectImportType.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -61,7 +61,7 @@
modes = decorateEnums(ImportDataMode.values());
if (mode == null) {
- mode = ImportDataMode.CommonDataComplete;
+ mode = ImportDataMode.CommonData;
}
return INPUT;
}
Deleted: 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-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/SelectedMissionMode.java 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,51 +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 fr.ifremer.echobase.I18nAble;
-
-import static org.nuiton.i18n.I18n.n_;
-
-/**
- * Define import mode (use an existing voayge, or create a new one.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public enum SelectedMissionMode implements I18nAble {
-
- CREATE_NEW_MISSION(n_("echobase.common.importMode.createNewMission")),
- USE_EXISTING_MISSION(n_("echobase.common.importMode.useExistingMission"));
-
- private final String i18nKey;
-
- SelectedMissionMode(String i18nKey) {
- this.i18nKey = i18nKey;
- }
-
- @Override
- public String getI18nKey() {
- return i18nKey;
- }
-}
Modified: trunk/echobase-ui/src/main/resources/config/struts-importData.xml
===================================================================
--- trunk/echobase-ui/src/main/resources/config/struts-importData.xml 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/resources/config/struts-importData.xml 2012-02-02 22:58:29 UTC (rev 304)
@@ -45,6 +45,17 @@
</action>
<!-- Configure import -->
+ <action name="Configure*-*" method="{2}"
+ class="fr.ifremer.echobase.ui.actions.importData.Configure{1}">
+ <interceptor-ref name="paramsPrepareParamsStackLoggued"/>
+ <result name="input">/WEB-INF/jsp/importData/configure{1}.jsp</result>
+ <result type="redirectAction">
+ <param name="namespace">/importData</param>
+ <param name="actionName">import{1}</param>
+ </result>
+ </action>
+
+ <!-- Configure import -->
<action name="configure*"
class="fr.ifremer.echobase.ui.actions.importData.Configure{1}">
<interceptor-ref name="paramsPrepareParamsStackLoggued"/>
@@ -76,6 +87,18 @@
<result type="json"/>
</action>
+ <!-- Create a new mission -->
+ <action name="createMission"
+ class="fr.ifremer.echobase.ui.actions.importData.CreateMission">
+ <interceptor-ref name="paramsPrepareParamsStackLoggued"/>
+ <result name="input">/WEB-INF/jsp/importData/createMission.jsp</result>
+ <result type="redirectAction">
+ <param name="namespace">/importData</param>
+ <param name="actionName">configureCommonData</param>
+ <param name="method">input</param>
+ </result>
+ </action>
+
</package>
</struts>
Modified: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticData-validation.xml
===================================================================
--- trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticData-validation.xml 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticData-validation.xml 2012-02-02 22:58:29 UTC (rev 304)
@@ -44,6 +44,12 @@
</field-validator>
</field>
+ <field name="model.cellPositionReference">
+ <field-validator type="nrequired">
+ <message key="echobase.error.import.cellPositionReference.required"/>
+ </field-validator>
+ </field>
+
<field name="model.transceiverAcquisitionAbsorptionDescription">
<field-validator type="nrequiredstring">
<message key="echobase.error.import.transceiverAcquisitionAbsorptionDescription.required"/>
Deleted: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionData-validation.xml
===================================================================
--- trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionData-validation.xml 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionData-validation.xml 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,55 +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%
- -->
-<!DOCTYPE validators PUBLIC
- "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
- "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
-<validators>
-
- <field name="model.voyageId">
- <field-validator type="nrequiredstring">
- <message key="echobase.error.import.voyage.required"/>
- </field-validator>
- </field>
-
- <field name="model.vesselId">
- <field-validator type="nrequiredstring">
- <message key="echobase.error.import.vessel.required"/>
- </field-validator>
- </field>
-
- <field name="regionsFile">
- <field-validator type="nfieldexpression">
- <param name="expression">model.regionsFile.file!=null</param>
- <message key="echobase.error.import.regionsFile.required"/>
- </field-validator>
- </field>
-
- <field name="associationFile">
- <field-validator type="nfieldexpression">
- <param name="expression">model.associationFile.file!=null</param>
- <message key="echobase.error.import.associationFile.required"/>
- </field-validator>
- </field>
-
-</validators>
\ No newline at end of file
Modified: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesData-validation.xml
===================================================================
--- trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesData-validation.xml 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesData-validation.xml 2012-02-02 22:58:29 UTC (rev 304)
@@ -32,32 +32,18 @@
</field-validator>
</field>
- <field name="tlbeStationFile">
+ <field name="sampleFile">
<field-validator type="nfieldexpression">
- <param name="expression">model.tlbeStationFile.file!=null</param>
- <message key="echobase.error.import.tlbeStationFile.required"/>
+ <param name="expression">model.sampleFile.file!=null</param>
+ <message key="echobase.error.import.sampleFile.required"/>
</field-validator>
</field>
- <field name="xtblTriFile">
+ <field name="sampleDataFile">
<field-validator type="nfieldexpression">
- <param name="expression">model.xtblTriFile.file!=null</param>
- <message key="echobase.error.import.xtblTriFile.required"/>
+ <param name="expression">model.sampleDataFile.file!=null</param>
+ <message key="echobase.error.import.sampleDataFile.required"/>
</field-validator>
</field>
- <field name="tblMensurationFile">
- <field-validator type="nfieldexpression">
- <param name="expression">model.tblMensurationFile.file!=null</param>
- <message key="echobase.error.import.tblMensurationFile.required"/>
- </field-validator>
- </field>
-
- <field name="tblMensurationClasseFile">
- <field-validator type="nfieldexpression">
- <param name="expression">model.tblMensurationClasseFile.file!=null</param>
- <message key="echobase.error.import.tblMensurationClasseFile.required"/>
- </field-validator>
- </field>
-
</validators>
\ No newline at end of file
Deleted: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualData-validation.xml
===================================================================
--- trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualData-validation.xml 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualData-validation.xml 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,42 +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%
- -->
-<!DOCTYPE validators PUBLIC
- "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
- "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
-<validators>
-
- <field name="model.voyageId">
- <field-validator type="nrequiredstring">
- <message key="echobase.error.import.voyage.required"/>
- </field-validator>
- </field>
-
- <field name="individualDataFile">
- <field-validator type="nfieldexpression">
- <param name="expression">model.individualDataFile.file!=null</param>
- <message key="echobase.error.import.individualDataFile.required"/>
- </field-validator>
- </field>
-
-</validators>
\ No newline at end of file
Deleted: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReference-validation.xml
===================================================================
--- trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReference-validation.xml 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReference-validation.xml 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,43 +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%
- -->
-<!DOCTYPE validators PUBLIC
- "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
- "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
-<validators>
-
- <field name="lengthAgeKeyFile">
- <field-validator type="nfieldexpression">
- <param name="expression">model.lengthAgeKeyFile.file!=null</param>
- <message key="echobase.error.import.lengthAgeKeyFile.required"/>
- </field-validator>
- </field>
-
- <field name="lengthWeightKeyFile">
- <field-validator type="nfieldexpression">
- <param name="expression">model.lengthWeightKeyFile.file!=null</param>
- <message key="echobase.error.import.lengthWeightKeyFile.required"/>
- </field-validator>
- </field>
-
-</validators>
\ No newline at end of file
Copied: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonData-ConfigureCommonData-modeAll-validation.xml (from rev 303, trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataComplete-validation.xml)
===================================================================
--- trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonData-ConfigureCommonData-modeAll-validation.xml (rev 0)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonData-ConfigureCommonData-modeAll-validation.xml 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,104 @@
+<!--
+ #%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%
+ -->
+<!DOCTYPE validators PUBLIC
+ "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+ "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+<validators>
+
+ <field name="model.missionId">
+ <field-validator type="nrequiredstring">
+ <message key="echobase.error.import.mission.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.areaOfOperationId">
+ <field-validator type="nrequiredstring">
+ <message key="echobase.error.import.areaOfOperation.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.vesselId">
+ <field-validator type="nrequiredstring">
+ <message key="echobase.error.import.vessel.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.voyageDescription">
+ <field-validator type="nrequiredstring">
+ <message key="echobase.error.import.voyageDescription.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.transitRelatedActivity">
+ <field-validator type="nrequiredstring">
+ <message key="echobase.error.import.transitRelatedActivity.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.transectLicence">
+ <field-validator type="nrequiredstring">
+ <message key="echobase.error.import.transectLicence.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.transectGeospatialVerticalPositive">
+ <field-validator type="nrequiredstring">
+ <message key="echobase.error.import.transectGeospatialVerticalPositive.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.transectBinUnitsPingAxis">
+ <field-validator type="nrequiredstring">
+ <message key="echobase.error.import.transectBinUnitsPingAxis.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.datum">
+ <field-validator type="nrequiredstring">
+ <message key="echobase.error.import.datum.required"/>
+ </field-validator>
+ </field>
+
+ <field name="voyageFile">
+ <field-validator type="nfieldexpression">
+ <param name="expression">model.voyageFile.file!=null</param>
+ <message key="echobase.error.import.voyageFile.required"/>
+ </field-validator>
+ </field>
+
+ <field name="transitFile">
+ <field-validator type="nfieldexpression">
+ <param name="expression">model.transitFile.file!=null</param>
+ <message key="echobase.error.import.transitFile.required"/>
+ </field-validator>
+ </field>
+
+ <field name="transectFile">
+ <field-validator type="nfieldexpression">
+ <param name="expression">model.transectFile.file!=null</param>
+ <message key="echobase.error.import.transectFile.required"/>
+ </field-validator>
+ </field>
+
+</validators>
\ No newline at end of file
Property changes on: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonData-ConfigureCommonData-modeAll-validation.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Copied: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonData-ConfigureCommonData-modeTransect-validation.xml (from rev 303, trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransect-validation.xml)
===================================================================
--- trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonData-ConfigureCommonData-modeTransect-validation.xml (rev 0)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonData-ConfigureCommonData-modeTransect-validation.xml 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,73 @@
+<!--
+ #%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%
+ -->
+<!DOCTYPE validators PUBLIC
+ "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+ "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+<validators>
+
+ <field name="model.voyageId">
+ <field-validator type="nrequiredstring">
+ <message key="echobase.error.import.voyage.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.vesselId">
+ <field-validator type="nrequiredstring">
+ <message key="echobase.error.import.vessel.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.transectLicence">
+ <field-validator type="nrequiredstring">
+ <message key="echobase.error.import.transectLicence.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.transectGeospatialVerticalPositive">
+ <field-validator type="nrequiredstring">
+ <message
+ key="echobase.error.import.transectGeospatialVerticalPositive.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.transectBinUnitsPingAxis">
+ <field-validator type="nrequiredstring">
+ <message key="echobase.error.import.transectBinUnitsPingAxis.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.datum">
+ <field-validator type="nrequiredstring">
+ <message key="echobase.error.import.datum.required"/>
+ </field-validator>
+ </field>
+
+ <field name="transectFile">
+ <field-validator type="nfieldexpression">
+ <param name="expression">model.transectFile.file!=null</param>
+ <message key="echobase.error.import.transectFile.required"/>
+ </field-validator>
+ </field>
+
+</validators>
\ No newline at end of file
Property changes on: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonData-ConfigureCommonData-modeTransect-validation.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataComplete-validation.xml
===================================================================
--- trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataComplete-validation.xml 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataComplete-validation.xml 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,111 +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%
- -->
-<!DOCTYPE validators PUBLIC
- "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
- "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
-<validators>
-
- <field name="model.missionId">
- <field-validator type="nrequiredstring">
- <message key="echobase.error.import.mission.required"/>
- </field-validator>
- </field>
-
- <field name="model.areaOfOperationId">
- <field-validator type="nrequiredstring">
- <message key="echobase.error.import.areaOfOperation.required"/>
- </field-validator>
- </field>
-
- <field name="model.vesselId">
- <field-validator type="nrequiredstring">
- <message key="echobase.error.import.vessel.required"/>
- </field-validator>
- </field>
-
- <field name="model.voyageDescription">
- <field-validator type="nrequiredstring">
- <message key="echobase.error.import.voyageDescription.required"/>
- </field-validator>
- </field>
-
- <field name="model.transitRelatedActivity">
- <field-validator type="nrequiredstring">
- <message key="echobase.error.import.transitRelatedActivity.required"/>
- </field-validator>
- </field>
-
- <field name="model.transectLicence">
- <field-validator type="nrequiredstring">
- <message key="echobase.error.import.transectLicence.required"/>
- </field-validator>
- </field>
-
- <field name="model.transectGeospatialVerticalPositive">
- <field-validator type="nrequiredstring">
- <message key="echobase.error.import.transectGeospatialVerticalPositive.required"/>
- </field-validator>
- </field>
-
- <field name="model.transectBinUnitsPingAxis">
- <field-validator type="nrequiredstring">
- <message key="echobase.error.import.transectBinUnitsPingAxis.required"/>
- </field-validator>
- </field>
-
- <field name="model.datum">
- <field-validator type="nrequiredstring">
- <message key="echobase.error.import.datum.required"/>
- </field-validator>
- </field>
-
- <field name="voyageFile">
- <field-validator type="nfieldexpression">
- <param name="expression">model.voyageFile.file!=null</param>
- <message key="echobase.error.import.voyageFile.required"/>
- </field-validator>
- </field>
-
- <field name="transitFile">
- <field-validator type="nfieldexpression">
- <param name="expression">model.transitFile.file!=null</param>
- <message key="echobase.error.import.transitFile.required"/>
- </field-validator>
- </field>
-
- <field name="transectFile">
- <field-validator type="nfieldexpression">
- <param name="expression">model.transectFile.file!=null</param>
- <message key="echobase.error.import.transectFile.required"/>
- </field-validator>
- </field>
-
- <field name="echotypeFile">
- <field-validator type="nfieldexpression">
- <param name="expression">model.echotypeFile.file!=null</param>
- <message key="echobase.error.import.echotypeFile.required"/>
- </field-validator>
- </field>
-
-</validators>
\ No newline at end of file
Deleted: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransect-validation.xml
===================================================================
--- trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransect-validation.xml 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransect-validation.xml 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,73 +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%
- -->
-<!DOCTYPE validators PUBLIC
- "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
- "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
-<validators>
-
- <field name="model.voyageId">
- <field-validator type="nrequiredstring">
- <message key="echobase.error.import.voyage.required"/>
- </field-validator>
- </field>
-
- <field name="model.vesselId">
- <field-validator type="nrequiredstring">
- <message key="echobase.error.import.vessel.required"/>
- </field-validator>
- </field>
-
- <field name="model.transectLicence">
- <field-validator type="nrequiredstring">
- <message key="echobase.error.import.transectLicence.required"/>
- </field-validator>
- </field>
-
- <field name="model.transectGeospatialVerticalPositive">
- <field-validator type="nrequiredstring">
- <message
- key="echobase.error.import.transectGeospatialVerticalPositive.required"/>
- </field-validator>
- </field>
-
- <field name="model.transectBinUnitsPingAxis">
- <field-validator type="nrequiredstring">
- <message key="echobase.error.import.transectBinUnitsPingAxis.required"/>
- </field-validator>
- </field>
-
- <field name="model.datum">
- <field-validator type="nrequiredstring">
- <message key="echobase.error.import.datum.required"/>
- </field-validator>
- </field>
-
- <field name="transectFile">
- <field-validator type="nfieldexpression">
- <param name="expression">model.transectFile.file!=null</param>
- <message key="echobase.error.import.transectFile.required"/>
- </field-validator>
- </field>
-
-</validators>
\ No newline at end of file
Deleted: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureMission-validation.xml
===================================================================
--- trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureMission-validation.xml 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureMission-validation.xml 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,56 +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%
- -->
-<!DOCTYPE validators PUBLIC
- "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
- "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
-<validators>
-
- <field name="importMode">
- <field-validator type="required">
- <message key="echobase.error.import.importMode.required"/>
- </field-validator>
- </field>
-
- <field name="mission.topiaId">
- <field-validator type="nrequiredstring">
- <param name="skip">importMode.name() != "USE_EXISTING_MISSION"</param>
- <message key="echobase.error.import.mission.required"/>
- </field-validator>
- </field>
-
- <field name="mission.name">
- <field-validator type="nrequiredstring">
- <param name="skip">importMode.name() != "CREATE_NEW_MISSION"</param>
- <message key="echobase.error.import.missionName.required"/>
- </field-validator>
- </field>
-
- <field name="mission.missionAbstract">
- <field-validator type="nrequiredstring">
- <param name="skip">importMode.name() != "CREATE_NEW_MISSION"</param>
- <message key="echobase.error.import.missionAbstract.required"/>
- </field-validator>
- </field>
-
-</validators>
\ No newline at end of file
Added: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureOperation-validation.xml
===================================================================
--- trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureOperation-validation.xml (rev 0)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureOperation-validation.xml 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ #%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%
+ -->
+
+
+<!DOCTYPE validators PUBLIC
+ "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+ "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+
+<validators>
+
+ <field name="model.voyageId">
+ <field-validator type="nrequiredstring">
+ <message key="echobase.error.import.voyage.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.vesselId">
+ <field-validator type="nrequiredstring">
+ <message key="echobase.error.import.vessel.required"/>
+ </field-validator>
+ </field>
+
+ <field name="operationFile">
+ <field-validator type="nfieldexpression">
+ <param name="expression">model.operationFile.file!=null</param>
+ <message key="echobase.error.import.operationFile.required"/>
+ </field-validator>
+ </field>
+
+ <field name="operationMetadataFile">
+ <field-validator type="nfieldexpression">
+ <param name="expression">model.operationMetadataFile.file!=null</param>
+ <message key="echobase.error.import.operationMetadataFile.required"/>
+ </field-validator>
+ </field>
+
+ <field name="gearMetadataFile">
+ <field-validator type="nfieldexpression">
+ <param name="expression">model.gearMetadataFile.file!=null</param>
+ <message key="echobase.error.import.gearMetadataFile.required"/>
+ </field-validator>
+ </field>
+
+</validators>
\ No newline at end of file
Property changes on: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureOperation-validation.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureResults-ConfigureResults-modeAcoustic-validation.xml
===================================================================
--- trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureResults-ConfigureResults-modeAcoustic-validation.xml (rev 0)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureResults-ConfigureResults-modeAcoustic-validation.xml 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,55 @@
+<!--
+ #%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%
+ -->
+<!DOCTYPE validators PUBLIC
+ "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+ "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+<validators>
+
+ <field name="model.voyageId">
+ <field-validator type="nrequiredstring">
+ <message key="echobase.error.import.voyage.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.vesselId">
+ <field-validator type="nrequiredstring">
+ <message key="echobase.error.import.vessel.required"/>
+ </field-validator>
+ </field>
+
+ <field name="regionsFile">
+ <field-validator type="nfieldexpression">
+ <param name="expression">model.regionsFile.file!=null</param>
+ <message key="echobase.error.import.regionsFile.required"/>
+ </field-validator>
+ </field>
+
+ <field name="associationFile">
+ <field-validator type="nfieldexpression">
+ <param name="expression">model.associationFile.file!=null</param>
+ <message key="echobase.error.import.associationFile.required"/>
+ </field-validator>
+ </field>
+
+</validators>
\ No newline at end of file
Property changes on: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureResults-ConfigureResults-modeAcoustic-validation.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Copied: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureResults-ConfigureResults-modeVoyage-validation.xml (from rev 303, trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionData-validation.xml)
===================================================================
--- trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureResults-ConfigureResults-modeVoyage-validation.xml (rev 0)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureResults-ConfigureResults-modeVoyage-validation.xml 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,43 @@
+<!--
+ #%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%
+ -->
+<!DOCTYPE validators PUBLIC
+ "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+ "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+<validators>
+
+ <field name="model.voyageId">
+ <field-validator type="nrequiredstring">
+ <message key="echobase.error.import.voyage.required"/>
+ </field-validator>
+ </field>
+
+ <field name="lengthAgeKeyFile">
+ <field-validator type="nfieldexpression">
+ <param name="expression">model.lengthAgeKeyFile.file!=null ||
+ model.lengthWeightKeyFile.file!=null || model.echotypeFile.file!=null </param>
+ <message key="echobase.error.import.resultImportFile.required"/>
+ </field-validator>
+ </field>
+
+</validators>
\ No newline at end of file
Property changes on: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureResults-ConfigureResults-modeVoyage-validation.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/CreateMission-createMission-validation.xml
===================================================================
--- trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/CreateMission-createMission-validation.xml (rev 0)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/CreateMission-createMission-validation.xml 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ #%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%
+ -->
+
+
+<!DOCTYPE validators PUBLIC
+ "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+ "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+
+<validators>
+
+ <field name="mission.name">
+ <field-validator type="requiredstring">
+ <message key="echobase.error.import.missionName.required"/>
+ </field-validator>
+ </field>
+
+ <field name="mission.missionAbstract">
+ <field-validator type="requiredstring">
+ <message key="echobase.error.import.missionAbstract.required"/>
+ </field-validator>
+ </field>
+
+</validators>
\ No newline at end of file
Property changes on: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/CreateMission-createMission-validation.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
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-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,8 +1,10 @@
echobase.action.applySqlQuery=Appliquer la requête
echobase.action.backToUserList=Retour à la liste des utilisateurs
echobase.action.cloneSqlQuery=Cloner la requête
+echobase.action.configureImport=Configurer l'import
echobase.action.create=Créer
echobase.action.createEmbeddedApplication=Créer l'application
+echobase.action.createMission=Créer la mission
echobase.action.delete=Suppression
echobase.action.deleteSqlQuery=Supprimer la requête
echobase.action.downloadEmbeddedApplicationFile=Télécharger l'application embarquée
@@ -24,15 +26,15 @@
echobase.common.acousticDensityUnit=acousticDensityUnit
echobase.common.acquisitionSoftwareVersionER60=acquisitionSoftwareVersion (ER60 instrument)
echobase.common.acquisitionSoftwareVersionME70=acquisitionSoftwareVersion (ME70 instrument)
+echobase.common.addDataAcquisition=Toujours créer des DataAcqusitions
echobase.common.admin=Administrateur
+echobase.common.cellPositionReference=cellPositionReference
echobase.common.digitThreshold=digitThreshold
echobase.common.echosounderSoundSpeed=echosounderSoundSpeed
echobase.common.email=Email
echobase.common.entityType=Type d'entité
echobase.common.importDataMode=Type d'import
-echobase.common.importMode=Type de mission
-echobase.common.importMode.createNewMission=Créer une nouvelle mission
-echobase.common.importMode.useExistingMission=Utiliser une mission existante
+echobase.common.importMode=Type d'import
echobase.common.importResult=Résultat \:
echobase.common.inProgress=en cours...
echobase.common.jdbcLogin=Login de connexion
@@ -61,14 +63,17 @@
echobase.error.export.name.requiredstring=Le nom de l'export est obligatoire
echobase.error.export.sqlQuery.requiredstring=La requête de l'export est obligatoire
echobase.error.export.sqlQuery.wrongformat=La requêtes n'est pas valide
+echobase.error.import.acousticDensityUnit.required=acousticDensityUnit non renseigné
echobase.error.import.acquisitionSoftwareVersionER60.required=acquisitionSoftwareVersionER60 non renseigné
echobase.error.import.acquisitionSoftwareVersionME70.required=acquisitionSoftwareVersionME70 non renseigné
echobase.error.import.areaOfOperation.required=La sélection d'une zone d'opération est obligatoire
echobase.error.import.associationFile.required=La sélection d'un fichier Association est obligatoire
+echobase.error.import.cellPositionReference.required=La sélection d'un cellPositionReference est obligatoire
echobase.error.import.datum.required=Datum de la campagne non rengeigné
echobase.error.import.digitThreshold.required=digitThreshold non renseigné
echobase.error.import.echosounderSoundSpeed.required=echosounderSoundSpeed non renseigné
echobase.error.import.echotypeFile.required=La sélection d'un fichier Echotype est obligatoire
+echobase.error.import.gearMetadataFile.required=La sélection d'un fichier GearMetadata est obligatoire
echobase.error.import.importMode.required=Le mode d'import est obligatoire
echobase.error.import.individualDataFile.required=La sélection d'un fichier individualData est obligatoire
echobase.error.import.lengthAgeKeyFile.required=La sélection d'un fichier lengthAgeKey est obligatoire
@@ -80,16 +85,18 @@
echobase.error.import.missionName.required=Le nom de la mission est obligatoire
echobase.error.import.moviesFile.required=La sélection d'un fichier Movies est obligatoire
echobase.error.import.notes.required=Note des DataProcessing non renseigné
+echobase.error.import.operationFile.required=La sélection d'un fichier Operation est obligatoire
+echobase.error.import.operationMetadataFile.required=La sélection d'un fichier OperationMetadata est obligatoire
echobase.error.import.pingDutyCycle.required=pingDutyCycle non renseigné
echobase.error.import.processingDescription.required=processingDescription non renseigné
echobase.error.import.processingTemplate.required=processingTemplate non renseigné
echobase.error.import.regionsFile.required=La sélection d'un fichier Region est obligatoire
+echobase.error.import.resultImportFile.required=Veuillez donner au moins un fichier à importer
+echobase.error.import.sampleDataFile.required=La sélection d'un fichier SampleData est obligatoire
+echobase.error.import.sampleFile.required=La sélection d'un fichier Sample est obligatoire
echobase.error.import.soundSpeedCalculationsER60.required=soundSpeedCalculationsER60 non renseigné
echobase.error.import.soundSpeedCalculationsME70.required=soundSpeedCalculationsME70 non renseigné
echobase.error.import.sounderConstant.required=sounderConstant non renseigné
-echobase.error.import.tblMensurationClasseFile.required=La sélection d'un fichier tblMensurationClasse est obligatoire
-echobase.error.import.tblMensurationFile.required=La sélection d'un fichier tblMensuration est obligatoire
-echobase.error.import.tlbeStationFile.required=La sélection d'un fichier tlbeStation est obligatoire
echobase.error.import.transceiverAcquisitionAbsorptionDescription.required=transceiverAcquisitionAbsorptionDescription non renseigné
echobase.error.import.transectBinUnitsPingAxis.required=BinUnitsPingAxis des transtects non rengeigné
echobase.error.import.transectFile.required=La sélection d'un fichier Transect est obligatoire
@@ -107,6 +114,7 @@
echobase.error.importHistorical.input.required=Le fichier d'import est obligatoire
echobase.error.login.unknown=Utilisateur inconnu
echobase.error.login.wrongLogin=Le login est déjà utilisé
+echobase.error.mission.name.already.exist=Nom de mission déjà utilisé
echobase.error.no.embeddedApplication.configurationFound=La configuration de création d'application embarquée non trouvée
echobase.error.no.embeddedApplication.exportFileFound=L'application embarquée générée non trouvée
echobase.error.no.exportDb.configurationFound=La configuration de l'export de la base non trouvée
@@ -124,6 +132,8 @@
echobase.info.user.create=L'utilisateur '%s' a été créée
echobase.info.user.delete=L'utilisateur '%s' a été supprimé
echobase.info.user.update=L'utilisateur '%s' a été mis à jour
+echobase.information.create.mission=Si la mission n'existe, suivez le lien pour en créer une nouvelle.
+echobase.information.mission.created=La mission %s a été créée
echobase.label.admin.user.create=Création d'un utilisateur
echobase.label.admin.user.delete=Suppression d'un utilisateur
echobase.label.admin.user.edit=Mise à jour d'un utilisateur
@@ -161,7 +171,8 @@
echobase.legend.importData.configuration.resume=Résumé de la configuration 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.importData.configure.CommonData.selectMission=Sélection de la mission
+echobase.legend.importData.createMission=Caractéristiques de la nouvelle 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
@@ -183,6 +194,7 @@
echobase.message.warnImportInProgress=Merci de ne pas fermer la fenêtre pour pouvoir accéder aux résultats de l'import.
echobase.title.connectToDbInformations=Informations de connection à la base de données
echobase.title.createEmbeddedApplication=Création de l'application embarquée
+echobase.title.createMission=Créer une mission
echobase.title.dbEditor=Modification de la base
echobase.title.embeddedApplicationProgress=Création de l'application embarquée en cours
echobase.title.embeddedApplicationResult=Résultat de la création de l'application embarquée
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-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticData.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -27,8 +27,9 @@
<script type="text/javascript"
src="<s:url value='/js/gridHelper.js' />"></script>
-<title>Configuration <s:text
- name="echobase.common.importDataMode.accousticData"/></title>
+<title>
+ Configuration <s:text name="echobase.common.importDataMode.accousticData"/>
+</title>
<s:url id="getTransitsUrl" action="getTransits" namespace="/importData"/>
<s:url id="getVesselsUrl" action="getVessels" namespace="/importData"/>
@@ -66,28 +67,29 @@
console.info("reload voyageId " + voyageId);
voyageSelectBox.change(voyageId);
- $.updateSelectBoxContent('${getTransitsUrl}',
- {voyageId:voyageId},
- 'transits',
- transitSelectBox,
- function() {
+ $.updateSelectBoxContent(
+ '${getTransitsUrl}',
+ {voyageId:voyageId},
+ 'transits',
+ transitSelectBox,
+ function () {
- var transitId = "${model.transitId}";
- if (transitId) {
+ var transitId = "${model.transitId}";
+ if (transitId) {
- transitSelectBox.val(transitId);
- $.updateSelectBoxContent('${getVesselsUrl}',
- {transitId:transitId},
- 'vessels',
- vesselSelectBox, function() {
+ transitSelectBox.val(transitId);
+ $.updateSelectBoxContent('${getVesselsUrl}',
+ {transitId:transitId},
+ 'vessels',
+ vesselSelectBox, function () {
- var vesselId = "${model.vesselId}";
- if (vesselId) {
- vesselSelectBox.val(vesselId);
- }
- });
- }
- }
+ var vesselId = "${model.vesselId}";
+ if (vesselId) {
+ vesselSelectBox.val(vesselId);
+ }
+ });
+ }
+ }
);
}
@@ -111,6 +113,13 @@
<sj:select key="model.vesselId" required="true"
label='%{getText("echobase.common.vessel")}'/>
+ <s:select key="model.cellPositionReference" required="true"
+ label='%{getText("echobase.common.cellPositionReference")}'
+ list="cellPositionReferences" headerKey="" headerValue=""/>
+
+ <s:checkbox key="model.addDataAcquisition" required="true"
+ label='%{getText("echobase.common.addDataAcquisition")}'/>
+
<s:textfield key="model.transceiverAcquisitionAbsorptionDescription"
size="100" required="true"
label='%{getText("echobase.common.transceiverAcquisitionAbsorptionDescription")}'/>
@@ -167,7 +176,7 @@
</fieldset>
<br/>
<s:submit action="configureAccousticData"
- value='%{getText("echobase.action.import")}'/>
+ value='%{getText("echobase.action.configureImport")}'/>
</s:form>
Deleted: 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-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticRegionData.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,65 +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%
- --%>
-<%@page contentType="text/html" pageEncoding="UTF-8" %>
-<%@ taglib prefix="s" uri="/struts-tags" %>
-
-<title>Configuration <s:text
- name="echobase.common.importDataMode.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"/>
- </legend>
-
- <s:select key="model.voyageId" required="true"
- label='%{getText("echobase.common.voyage")}'
- list="voyages" headerKey="" headerValue=""/>
-
- <s:select key="model.vesselId" required="true"
- label='%{getText("echobase.common.vessel")}'
- list="vessels" headerKey="" headerValue=""/>
-
- <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="configureAccousticRegionData"
- value='%{getText("echobase.action.import")}'/>
-
-
-</s:form>
\ No newline at end of file
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-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesData.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -24,8 +24,9 @@
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
-<title>Configuration <s:text
- name="echobase.common.importDataMode.catchesData"/></title>
+<title>
+ Configuration <s:text name="echobase.common.importDataMode.catchesData"/>
+</title>
<script type="text/javascript">
@@ -45,23 +46,20 @@
label='%{getText("echobase.common.voyage")}'
list="voyages" headerKey="" headerValue=""/>
- <s:file key="tlbeStationFile" required="true"
- label='%{getText("echobase.common.tlbeStationFile")}'/>
+ <s:select key="model.vesselId" required="true"
+ label='%{getText("echobase.common.vessel")}'
+ list="vessels" headerKey="" headerValue=""/>
- <s:file key="xtblTriFile" required="true"
- label='%{getText("echobase.common.xtblTriFile")}'/>
+ <s:file key="sampleFile" required="true"
+ label='%{getText("echobase.common.sampleFile")}'/>
- <s:file key="tblMensurationFile" required="true"
- label='%{getText("echobase.common.tblMensurationFile")}'/>
-
- <s:file key="tblMensurationClasseFile" required="true"
- label='%{getText("echobase.common.tblMensurationClasseFile")}'/>
-
+ <s:file key="sampleDataFile" required="true"
+ label='%{getText("echobase.common.sampleDataFile")}'/>
</fieldset>
<br/>
<s:submit action="configureCatchesData"
- value='%{getText("echobase.action.import")}'/>
+ value='%{getText("echobase.action.configureImport")}'/>
</s:form>
\ No newline at end of file
Deleted: 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-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesIndividualData.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,60 +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%
- --%>
-<%@page contentType="text/html" pageEncoding="UTF-8" %>
-<%@ taglib prefix="s" uri="/struts-tags" %>
-
-<title>Configuration <s:text
- name="echobase.common.importDataMode.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"/>
- </legend>
-
- <s:select key="model.voyageId" 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="configureCatchesIndividualData"
- value='%{getText("echobase.action.import")}'/>
-
-
-</s:form>
\ No newline at end of file
Deleted: 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-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesReference.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,57 +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%
- --%>
-<%@page contentType="text/html" pageEncoding="UTF-8" %>
-<%@ taglib prefix="s" uri="/struts-tags" %>
-
-<title>Configuration <s:text
- name="echobase.common.importDataMode.catchesReferences"/></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"/>
- </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="configureCatchesReference"
- value='%{getText("echobase.action.import")}'/>
-
-
-</s:form>
\ No newline at end of file
Copied: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonData.jsp (from rev 303, trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataComplete.jsp)
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonData.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonData.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,161 @@
+<%--
+ #%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>
+ Configuration <s:text name="echobase.common.importDataMode.commonData"/>
+</title>
+
+<script type="text/javascript">
+
+ jQuery(document).ready(function () {
+
+ $('[name="model.importMode"]').change(function (event) {
+ $('[class~="importMode"]').hide();
+ $('#' + this.value).show();
+ $('#' + this.value+' .errorMessage').hide();
+ });
+
+ var incomingVal = $('[name="model.importMode"][checked="checked"]').val();
+ $('#' + incomingVal).show();
+
+ });
+</script>
+
+<s:radio id='mode' key='model.importMode' list="importModes" cssClass="cleanBoth"
+ label='%{getText("echobase.common.importMode")}'
+ required="true" template="myradiomap"/>
+
+<hr/>
+
+<%--Import mode = ALL--%>
+
+<s:form id="ALL" namespace="/importData" method="POST"
+ enctype="multipart/form-data" cssClass="hidden importMode">
+
+ <fieldset>
+ <legend>
+ <s:text name="echobase.legend.importData.configure"/>
+ </legend>
+
+ <s:select key="model.missionId" required="true"
+ label='%{getText("echobase.common.mission")} (*)'
+ list="missions" headerKey="" headerValue=""/>
+ <br/>
+
+ <s:hidden key="model.importMode" value="ALL" label=''/>
+
+ <s:select key="model.areaOfOperationId" required="true"
+ label='%{getText("echobase.common.areaOfOperation")}'
+ list="areaOfOperations" headerKey="" headerValue=""/>
+
+ <s:select key="model.vesselId" required="true"
+ label='%{getText("echobase.common.vessel")}'
+ list="vessels" 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:textfield key="model.transitRelatedActivity" size="40" required="true"
+ label='%{getText("echobase.common.transitRelatedActivity")}'/>
+
+ <s:textfield key="model.transectLicence" size="40" required="true"
+ label='%{getText("echobase.common.transectLicence")}'/>
+
+ <s:textfield key="model.transectGeospatialVerticalPositive" size="40"
+ required="true"
+ label='%{getText("echobase.common.transectGeospatialVerticalPositive")}'/>
+
+ <s:textfield key="model.transectBinUnitsPingAxis" size="40" required="true"
+ label='%{getText("echobase.common.transectBinUnitsPingAxis")}'/>
+
+ <s:file key="voyageFile" required="true"
+ label='%{getText("echobase.common.voyageFile")}'/>
+
+ <s:file key="transitFile" required="true"
+ label='%{getText("echobase.common.transitFile")}'/>
+
+ <s:file key="transectFile" required="true"
+ label='%{getText("echobase.common.transectFile")}'/>
+
+ </fieldset>
+
+ <br/>
+ (*) <s:a namespace="/importData" action="createMission" method="input">
+ <s:text name="echobase.information.create.mission"/>
+</s:a>
+ <br/>
+ <s:submit action="ConfigureCommonData-modeAll"
+ value='%{getText("echobase.action.configureImport")}'/>
+
+</s:form>
+
+<%--Import mode = TRANSECT --%>
+
+<s:form id='TRANSECT' namespace="/importData" method="POST"
+ enctype="multipart/form-data" cssClass="hidden importMode">
+
+ <fieldset>
+ <legend>
+ <s:text name="echobase.legend.importData.configure"/>
+ </legend>
+
+ <s:hidden key="model.importMode" value="TRANSECT" label=''/>
+
+ <s:select key="model.voyageId" required="true"
+ label='%{getText("echobase.common.voyage")}'
+ list="voyages" headerKey="" headerValue=""/>
+
+ <s:select key="model.vesselId" required="true"
+ label='%{getText("echobase.common.vessel")}'
+ list="vessels" headerKey="" headerValue=""/>
+
+ <s:textfield key="model.datum" size="40" required="true"
+ label='%{getText("echobase.common.datum")}'/>
+
+ <s:textfield key="model.transectLicence" size="40" required="true"
+ label='%{getText("echobase.common.transectLicence")}'/>
+
+ <s:textfield key="model.transectGeospatialVerticalPositive" size="40"
+ required="true"
+ label='%{getText("echobase.common.transectGeospatialVerticalPositive")}'/>
+
+ <s:textfield key="model.transectBinUnitsPingAxis" size="40" required="true"
+ label='%{getText("echobase.common.transectBinUnitsPingAxis")}'/>
+
+ <s:file key="transectFile" required="true"
+ label='%{getText("echobase.common.transectFile")}'/>
+
+ </fieldset>
+
+ <br/>
+ <s:submit action="ConfigureCommonData-modeTransect"
+ value='%{getText("echobase.action.configureImport")}'/>
+
+
+</s:form>
\ No newline at end of file
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonData.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: 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-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataComplete.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,168 +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%
- --%>
-<%@page contentType="text/html" pageEncoding="UTF-8" %>
-<%@ taglib prefix="s" uri="/struts-tags" %>
-
-<title>Configuration <s:text
- name="echobase.common.importDataMode.commonDataComplete"/></title>
-
-<script type="text/javascript">
-
- 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>
-
-<s:form namespace="/importData" method="POST" enctype="multipart/form-data">
-
- <fieldset>
- <legend>
- <s:text name="echobase.legend.importData.configure"/>
- </legend>
-
- <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" 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" required="true"
- label='%{getText("echobase.common.areaOfOperation")}'
- list="areaOfOperations" headerKey="" headerValue=""/>
-
- <s:select key="model.vesselId" required="true"
- label='%{getText("echobase.common.vessel")}'
- list="vessels" 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:textfield key="model.transitRelatedActivity" size="40" required="true"
- label='%{getText("echobase.common.transitRelatedActivity")}'/>
-
- <s:textfield key="model.transectLicence" size="40" required="true"
- label='%{getText("echobase.common.transectLicence")}'/>
-
- <s:textfield key="model.transectGeospatialVerticalPositive" size="40"
- required="true"
- label='%{getText("echobase.common.transectGeospatialVerticalPositive")}'/>
-
- <s:textfield key="model.transectBinUnitsPingAxis" size="40" required="true"
- label='%{getText("echobase.common.transectBinUnitsPingAxis")}'/>
-
- <s:file key="voyageFile" required="true"
- label='%{getText("echobase.common.voyageFile")}'/>
-
- <s:file key="transitFile" required="true"
- label='%{getText("echobase.common.transitFile")}'/>
-
- <s:file key="transectFile" required="true"
- label='%{getText("echobase.common.transectFile")}'/>
-
- <s:file key="echotypeFile" required="true"
- label='%{getText("echobase.common.echotypeFile")}'/>
-
- </fieldset>
-
- <br/>
- <s:submit action="configureCommonDataComplete"
- value='%{getText("echobase.action.import")}'/>
-
-
-</s:form>
\ No newline at end of file
Deleted: 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-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataFromTransect.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,76 +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%
- --%>
-<%@page contentType="text/html" pageEncoding="UTF-8" %>
-<%@ taglib prefix="s" uri="/struts-tags" %>
-
-<title>Configuration <s:text
- name="echobase.common.importDataMode.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"/>
- </legend>
-
- <s:select key="model.voyageId" required="true"
- label='%{getText("echobase.common.voyage")}'
- list="voyages" headerKey="" headerValue=""/>
-
- <s:select key="model.vesselId" required="true"
- label='%{getText("echobase.common.vessel")}'
- list="vessels" headerKey="" headerValue=""/>
-
- <s:textfield key="model.datum" size="40" required="true"
- label='%{getText("echobase.common.datum")}'/>
-
- <s:textfield key="model.transectLicence" size="40" required="true"
- label='%{getText("echobase.common.transectLicence")}'/>
-
- <s:textfield key="model.transectGeospatialVerticalPositive" size="40"
- required="true"
- label='%{getText("echobase.common.transectGeospatialVerticalPositive")}'/>
-
- <s:textfield key="model.transectBinUnitsPingAxis" size="40" required="true"
- label='%{getText("echobase.common.transectBinUnitsPingAxis")}'/>
-
- <s:file key="transectFile" required="true"
- label='%{getText("echobase.common.transectFile")}'/>
-
- </fieldset>
-
- <br/>
- <s:submit action="configureCommonDataFromTransect"
- value='%{getText("echobase.action.import")}'/>
-
-
-</s:form>
\ No newline at end of file
Copied: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureOperation.jsp (from rev 303, trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataFromTransect.jsp)
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureOperation.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureOperation.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -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>
+ Configuration <s:text name="echobase.common.importDataMode.operation"/>
+</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"/>
+ </legend>
+
+ <s:select key="model.voyageId" required="true"
+ label='%{getText("echobase.common.voyage")}'
+ list="voyages" headerKey="" headerValue=""/>
+
+ <s:select key="model.vesselId" required="true"
+ label='%{getText("echobase.common.vessel")}'
+ list="vessels" headerKey="" headerValue=""/>
+
+ <s:file key="operationFile" required="true"
+ label='%{getText("echobase.common.operationFile")}'/>
+
+ <s:file key="operationMetadataFile" required="true"
+ label='%{getText("echobase.common.operationMetadataFile")}'/>
+
+ <s:file key="gearMetadataFile" required="true"
+ label='%{getText("echobase.common.gearMetadataFile")}'/>
+
+ </fieldset>
+
+ <br/>
+ <s:submit action="configureOperation"
+ value='%{getText("echobase.action.configureImport")}'/>
+
+
+</s:form>
\ No newline at end of file
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureOperation.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Copied: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureResults.jsp (from rev 303, trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticRegionData.jsp)
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureResults.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureResults.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,112 @@
+<%--
+ #%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>
+ Configuration <s:text name="echobase.common.importDataMode.results"/>
+</title>
+
+<script type="text/javascript">
+
+ jQuery(document).ready(function () {
+
+ $('[name="model.importMode"]').change(function (event) {
+ $('[class~="importMode"]').hide();
+ $('#' + this.value).show();
+ $('#' + this.value+' .errorMessage').hide();
+ });
+
+ var incomingVal = $('[name="model.importMode"][checked="checked"]').val();
+ $('#' + incomingVal).show();
+
+ });
+</script>
+
+<s:radio id='mode' key='model.importMode' list="importModes" cssClass="cleanBoth"
+ label='%{getText("echobase.common.importMode")}'
+ required="true" template="myradiomap"/>
+
+<s:form id="VOYAGE" namespace="/importData" method="POST"
+ enctype="multipart/form-data" cssClass="hidden importMode">
+
+ <fieldset>
+ <legend>
+ <s:text name="echobase.legend.importData.configure"/>
+ </legend>
+
+ <s:hidden key="model.importMode" value="VOYAGE" label=''/>
+
+ <s:select key="model.voyageId" required="true"
+ label='%{getText("echobase.common.voyage")}'
+ list="voyages" headerKey="" headerValue=""/>
+
+ <s:file key="lengthAgeKeyFile" required="true"
+ label='%{getText("echobase.common.lengthAgeKeyFile")}'/>
+
+ <s:file key="lengthWeightKeyFile" required="true"
+ label='%{getText("echobase.common.lengthWeightKeyFile")}'/>
+
+ <s:file key="echotypeFile" required="true"
+ label='%{getText("echobase.common.echotypeFile")}'/>
+
+ </fieldset>
+
+ <br/>
+ <s:submit action="ConfigureResults-modeVoyage"
+ value='%{getText("echobase.action.configureImport")}'/>
+
+</s:form>
+
+<s:form id="ACOUSTIC" namespace="/importData" method="POST"
+ enctype="multipart/form-data" cssClass="hidden importMode">
+
+ <fieldset>
+ <legend>
+ <s:text name="echobase.legend.importData.configure"/>
+ </legend>
+
+ <s:hidden key="model.importMode" value="ACOUSTIC" label=''/>
+
+ <s:select key="model.voyageId" required="true"
+ label='%{getText("echobase.common.voyage")}'
+ list="voyages" headerKey="" headerValue=""/>
+
+ <s:select key="model.vesselId" required="true"
+ label='%{getText("echobase.common.vessel")}'
+ list="vessels" headerKey="" headerValue=""/>
+
+ <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="ConfigureResults-modeAcoustic"
+ value='%{getText("echobase.action.configureImport")}'/>
+
+</s:form>
\ No newline at end of file
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureResults.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/createMission.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/createMission.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/createMission.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,95 @@
+<%--
+ #%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.createMission"/></title>
+
+<s:form namespace="/importData" method="POST">
+
+ <fieldset>
+ <legend>
+ <s:text
+ name="echobase.legend.importData.createMission"/>
+ </legend>
+
+ <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")}'/>
+
+ </fieldset>
+
+ <br/>
+
+ <s:submit action="createMission"
+ value='%{getText("echobase.action.createMission")}'/>
+
+</s:form>
\ No newline at end of file
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/createMission.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAccousticData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAccousticData.jsp 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAccousticData.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -28,8 +28,10 @@
<s:url id="url" action="import-AccousticData" namespace="/importData"/>
<meta http-equiv="refresh" content="1;url=${url}"/>
-<title><s:text name="echobase.common.importDataMode.accousticData"/> <s:text
- name="echobase.common.inProgress"/></title>
+<title>
+ <s:text name="echobase.common.importDataMode.accousticData"/>
+ <s:text name="echobase.common.inProgress"/>
+</title>
<%-- TODO letellier 20111104 : Add warn icon --%>
<p><s:text name="echobase.message.warnImportInProgress"/></p>
Deleted: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAccousticRegionData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAccousticRegionData.jsp 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAccousticRegionData.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,41 +0,0 @@
-<%--
- #%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%
- --%>
-<%@page contentType="text/html" pageEncoding="UTF-8" %>
-<%@ taglib prefix="s" uri="/struts-tags" %>
-<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
-
-<s:url id="url" action="import-AccousticRegionData" namespace="/importData"/>
-<meta http-equiv="refresh" content="1;url=${url}"/>
-
-<title><s:text name="echobase.common.importDataMode.accousticRegionData"/>
- <s:text name="echobase.common.inProgress"/></title>
-
-<%-- TODO letellier 20111104 : Add warn icon --%>
-<p><s:text name="echobase.message.warnImportInProgress"/></p>
-
-<br/>
-
-<div>
- <sj:progressbar value="%{model.progression}"/>
-</div>
\ No newline at end of file
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesData.jsp 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesData.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -28,8 +28,10 @@
<s:url id="url" action="import-CatchesData" namespace="/importData"/>
<meta http-equiv="refresh" content="1;url=${url}"/>
-<title><s:text name="echobase.common.importDataMode.catchesData"/> <s:text
- name="echobase.common.inProgress"/></title>
+<title>
+ <s:text name="echobase.common.importDataMode.catchesData"/>
+ <s:text name="echobase.common.inProgress"/>
+</title>
<%-- TODO letellier 20111104 : Add warn icon --%>
<p><s:text name="echobase.message.warnImportInProgress"/></p>
Deleted: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesIndividualData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesIndividualData.jsp 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesIndividualData.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,41 +0,0 @@
-<%--
- #%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%
- --%>
-<%@page contentType="text/html" pageEncoding="UTF-8" %>
-<%@ taglib prefix="s" uri="/struts-tags" %>
-<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
-
-<s:url id="url" action="import-CatchesIndividualData" namespace="/importData"/>
-<meta http-equiv="refresh" content="1;url=${url}"/>
-
-<title><s:text name="echobase.common.importDataMode.accousticRegionData"/>
- <s:text name="echobase.common.inProgress"/></title>
-
-<%-- TODO letellier 20111104 : Add warn icon --%>
-<p><s:text name="echobase.message.warnImportInProgress"/></p>
-
-<br/>
-
-<div>
- <sj:progressbar value="%{model.progression}"/>
-</div>
\ No newline at end of file
Deleted: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesReference.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesReference.jsp 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesReference.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,41 +0,0 @@
-<%--
- #%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%
- --%>
-<%@page contentType="text/html" pageEncoding="UTF-8" %>
-<%@ taglib prefix="s" uri="/struts-tags" %>
-<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
-
-<s:url id="url" action="import-CatchesReference" namespace="/importData"/>
-<meta http-equiv="refresh" content="1;url=${url}"/>
-
-<title><s:text name="echobase.common.importDataMode.catchesReferences"/> <s:text
- name="echobase.common.inProgress"/></title>
-
-<%-- TODO letellier 20111104 : Add warn icon --%>
-<p><s:text name="echobase.message.warnImportInProgress"/></p>
-
-<br/>
-
-<div>
- <sj:progressbar value="%{model.progression}"/>
-</div>
\ No newline at end of file
Copied: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonData.jsp (from rev 303, trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonDataComplete.jsp)
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonData.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonData.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -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%
+ --%>
+<%@page contentType="text/html" pageEncoding="UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
+
+<s:url id="url" action="import-CommonData" namespace="/importData"/>
+<meta http-equiv="refresh" content="1;url=${url}"/>
+
+<title>
+ <s:text name="echobase.common.importDataMode.commonData"/>
+ <s:text name="echobase.common.inProgress"/>
+</title>
+
+<%-- TODO letellier 20111104 : Add warn icon --%>
+<p><s:text name="echobase.message.warnImportInProgress"/></p>
+
+<br/>
+
+<div>
+ <sj:progressbar value="%{model.progression}"/>
+</div>
\ No newline at end of file
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonData.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonDataComplete.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonDataComplete.jsp 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonDataComplete.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,41 +0,0 @@
-<%--
- #%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%
- --%>
-<%@page contentType="text/html" pageEncoding="UTF-8" %>
-<%@ taglib prefix="s" uri="/struts-tags" %>
-<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
-
-<s:url id="url" action="import-CommonDataComplete" namespace="/importData"/>
-<meta http-equiv="refresh" content="1;url=${url}"/>
-
-<title><s:text name="echobase.common.importDataMode.commonDataComplete"/>
- <s:text name="echobase.common.inProgress"/></title>
-
-<%-- TODO letellier 20111104 : Add warn icon --%>
-<p><s:text name="echobase.message.warnImportInProgress"/></p>
-
-<br/>
-
-<div>
- <sj:progressbar value="%{model.progression}"/>
-</div>
\ No newline at end of file
Deleted: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonDataFromTransect.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonDataFromTransect.jsp 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonDataFromTransect.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,42 +0,0 @@
-<%--
- #%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%
- --%>
-<%@page contentType="text/html" pageEncoding="UTF-8" %>
-<%@ taglib prefix="s" uri="/struts-tags" %>
-<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
-
-<s:url id="url" action="import-CommonDataFromTransect" namespace="/importData"/>
-<meta http-equiv="refresh" content="1;url=${url}"/>
-
-<title>
- <s:text name="echobase.common.importDataMode.commonDataFromTransect"/> <s:text
- name="echobase.common.inProgress"/></title>
-
-<%-- TODO letellier 20111104 : Add warn icon --%>
-<p><s:text name="echobase.message.warnImportInProgress"/></p>
-
-<br/>
-
-<div>
- <sj:progressbar value="%{model.progression}"/>
-</div>
\ No newline at end of file
Copied: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressOperation.jsp (from rev 303, trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonDataFromTransect.jsp)
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressOperation.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressOperation.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -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%
+ --%>
+<%@page contentType="text/html" pageEncoding="UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
+
+<s:url id="url" action="import-Operation" namespace="/importData"/>
+<meta http-equiv="refresh" content="1;url=${url}"/>
+
+<title>
+ <s:text name="echobase.common.importDataMode.operation"/>
+ <s:text name="echobase.common.inProgress"/>
+</title>
+
+<%-- TODO letellier 20111104 : Add warn icon --%>
+<p><s:text name="echobase.message.warnImportInProgress"/></p>
+
+<br/>
+
+<div>
+ <sj:progressbar value="%{model.progression}"/>
+</div>
\ No newline at end of file
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressOperation.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Copied: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressResults.jsp (from rev 303, trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAccousticRegionData.jsp)
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressResults.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressResults.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -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%
+ --%>
+<%@page contentType="text/html" pageEncoding="UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
+
+<s:url id="url" action="import-Results" namespace="/importData"/>
+<meta http-equiv="refresh" content="1;url=${url}"/>
+
+<title>
+ <s:text name="echobase.common.importDataMode.results"/>
+ <s:text name="echobase.common.inProgress"/>
+</title>
+
+<%-- TODO letellier 20111104 : Add warn icon --%>
+<p><s:text name="echobase.message.warnImportInProgress"/></p>
+
+<br/>
+
+<div>
+ <sj:progressbar value="%{model.progression}"/>
+</div>
\ No newline at end of file
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressResults.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticData.jsp 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticData.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -24,15 +24,15 @@
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
-<title><s:text name="echobase.common.importResult"/> <s:text
- name="echobase.common.importDataMode.accousticData"/></title>
+<title>
+ <s:text name="echobase.common.importResult"/>
+ <s:text name="echobase.common.importDataMode.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/>
Deleted: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticRegionData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticRegionData.jsp 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticRegionData.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,40 +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%
- --%>
-<%@page contentType="text/html" pageEncoding="UTF-8" %>
-<%@ taglib prefix="s" uri="/struts-tags" %>
-
-<title><s:text name="echobase.common.importResult"/> <s:text
- name="echobase.common.importDataMode.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>
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesData.jsp 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesData.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -24,15 +24,15 @@
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
-<title><s:text name="echobase.common.importResult"/> <s:text
- name="echobase.common.importDataMode.catchesData"/></title>
+<title>
+ <s:text name="echobase.common.importResult"/>
+ <s:text name="echobase.common.importDataMode.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/>
Deleted: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesIndividualData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesIndividualData.jsp 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesIndividualData.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,40 +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%
- --%>
-<%@page contentType="text/html" pageEncoding="UTF-8" %>
-<%@ taglib prefix="s" uri="/struts-tags" %>
-
-<title><s:text name="echobase.common.importResult"/> <s:text
- name="echobase.common.importDataMode.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>
Deleted: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesReference.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesReference.jsp 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesReference.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,40 +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%
- --%>
-<%@page contentType="text/html" pageEncoding="UTF-8" %>
-<%@ taglib prefix="s" uri="/struts-tags" %>
-
-<title><s:text name="echobase.common.importResult"/> <s:text
- name="echobase.common.importDataMode.catchesReferences"/></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>
Copied: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonData.jsp (from rev 303, trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataComplete.jsp)
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonData.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonData.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,42 @@
+<%--
+ #%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.common.importResult"/>
+ <s:text name="echobase.common.importDataMode.commonData"/>
+</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/resultCommonData.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataComplete.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataComplete.jsp 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataComplete.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,40 +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%
- --%>
-<%@page contentType="text/html" pageEncoding="UTF-8" %>
-<%@ taglib prefix="s" uri="/struts-tags" %>
-
-<title><s:text name="echobase.common.importResult"/> <s:text
- name="echobase.common.importDataMode.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>
Deleted: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataFromTransect.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataFromTransect.jsp 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataFromTransect.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -1,40 +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%
- --%>
-<%@page contentType="text/html" pageEncoding="UTF-8" %>
-<%@ taglib prefix="s" uri="/struts-tags" %>
-
-<title><s:text name="echobase.common.importResult"/> <s:text
- name="echobase.common.importDataMode.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>
Copied: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultOperation.jsp (from rev 303, trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataFromTransect.jsp)
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultOperation.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultOperation.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,40 @@
+<%--
+ #%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.common.importResult"/>
+ <s:text name="echobase.common.importDataMode.operation"/>
+</title>
+
+<fieldset>
+ <legend>
+ <s:text name="echobase.legend.importData.configuration.resume"/>
+ </legend>
+
+</fieldset>
+<br/>
+
+<div>TODO Result</div>
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultOperation.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Copied: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultResults.jsp (from rev 303, trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticRegionData.jsp)
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultResults.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultResults.jsp 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,40 @@
+<%--
+ #%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.common.importResult"/>
+ <s:text name="echobase.common.importDataMode.results"/>
+</title>
+
+<fieldset>
+ <legend>
+ <s:text name="echobase.legend.importData.configuration.resume"/>
+ </legend>
+
+</fieldset>
+<br/>
+
+<div>TODO Result</div>
Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultResults.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/echobase-ui/src/main/webapp/css/screen.css
===================================================================
--- trunk/echobase-ui/src/main/webapp/css/screen.css 2012-01-30 19:18:07 UTC (rev 303)
+++ trunk/echobase-ui/src/main/webapp/css/screen.css 2012-02-02 22:58:29 UTC (rev 304)
@@ -269,3 +269,13 @@
padding-left: 25px;
margin-left:0px;
}
+
+div#wwctrl_mode ul{
+ margin: 5px;
+ padding-left: 5px;
+}
+div#wwctrl_mode ul li{
+ list-style: none;
+ padding-left: 25px;
+ margin-left:0px;
+}
Copied: trunk/src/doc/reunions/reunion-2012-02-01.txt (from rev 303, trunk/src/doc/reunions/reunion-2012-01-12.txt)
===================================================================
--- trunk/src/doc/reunions/reunion-2012-02-01.txt (rev 0)
+++ trunk/src/doc/reunions/reunion-2012-02-01.txt 2012-02-02 22:58:29 UTC (rev 304)
@@ -0,0 +1,120 @@
+projet echobase
+---------------
+
+Mercredi 01 février 2012 (Ifremer)
+
+Présents : Mathieu et Tony
+
+Planning
+--------
+
+- import nouvelles données
+
+Import nouvelles données
+------------------------
+
+- pouvoir créer une nouvelle mission en indépendant (un autre écran)
+
+1) Un seul écran pour importer les données communes :
+
+mode 1: import d'un nouveau voyage / transit / transect
+mode 2: import d'un nouveau transect (renseigné par un voyage + un navire)
+
+OK.
+
+2) Import Operations
+
+- voyage
+- navire (connus dans les transects du voyage)
+
+- format des fichiers à définir
+Operation / OperationMetaData / GearMetaData
+
+OK.
+
+3) Import Samples
+
+- voyage
+- navire
+- fichier Sample
+- fichier SampleData
+- on utilisera une clef temporaire pour lier les Sample et SampleData)
+- pour retrouver les Operations, on se basera sur Operation#id
+
+4) Import Acoustic data
+
+mode 1: (celui implanté) va créer les data acquisition trouvées dans le fichier movie
+mode 2: (a faire) on créer le dataAcquisition uniquement s'il n'existe pas déjà pour le transect.
+
+OK.
+
+Rajouté un boolean (ajout de nouvelles données acoustiques) = mode 2
+OK
+
+- voyage
+- transit
+- navire
+
+- Cell Position Reference rajouter 3 jours une combobox Start - Mid - End pour retrouver
+les metadata à utiliser sur les data ESDU (suffix saufMid-> Bary)
+
+OK.
+
+- prendre en compte le nouveau format movies (suppression colonne) + comment sélectionner les acousticInstrument.
+
+OK réalisé.
+
+5) Import résultats
+
+mode 1: import au niveau du voyage
+ - sélection voyage
+ - fichier echotype
+ - relations taille-poids
+ - relations taille-age
+
+Chaque import est indépendant et optionnel.
+
+OK réalisé.
+
+mode 2: import acoustique
+ - sélection voyage
+ - sélection navire
+
+ on retrouvera les transits via les plages temporelles
+
+- ajoute les celles régions
+
+- et les résultats ???
+
+Charte graphique
+----------------
+
+- pour le désign globale c'est ok
+
+- revoir le logo, mathieu préfère celui en bas à gauche mais changer la police
+(celle du milieu conviennent mieux) et jouer sur le contraste pour le rendre
+plus lisible. ou bien celui avec les cercle concentriques 2ième ne partant du
+bas à droite mais changer la police!!!
+
+Ok envoyé à Aurelie.
+
+Action
+------
+
+- CodeLutin
+
+ - infra des imports
+ - finir import acoustic
+ - commencer import results
+ - relancer Aurelie pour la charte graphique
+ - corriger le journal de bords lors d'un import d'une table (problème de comparaison sur la nulitté).
+
+- Mathieu
+
+ - import operation (format et fichiers à fournir)
+ - import "sample" (format et fichiers à fournir)
+ - import "résultats" (echotype, taille-poids-age), + clarifier la partie acoustic
+
+Prochaine réunion :
+
+ - mercredi 8/02 14h30
\ No newline at end of file
1
0