r304 - 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/configurations echobase-services/src/main/java/fr/ifremer/echobase/services/csv echobase-services/src/main/resources/i18n echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData echobase-ui/src/main/resources/config echobase-ui/src/main/resources/f
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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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
participants (1)
-
tchemit@users.forge.codelutin.com