Echobase-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
January 2012
- 2 participants
- 75 discussions
r293 - in trunk: echobase-entities/src/main/java/fr/ifremer/echobase 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-ui/src/main/resources/i18n echobase-ui/src/main/webapp/WEB-INF/jsp/importData
by tchemit@users.forge.codelutin.com 26 Jan '12
by tchemit@users.forge.codelutin.com 26 Jan '12
26 Jan '12
Author: tchemit
Date: 2012-01-26 11:54:27 +0100 (Thu, 26 Jan 2012)
New Revision: 293
Url: http://forge.codelutin.com/repositories/revision/echobase/293
Log:
- improve csv model api
- finalize acousticData import (service side)
- improve comma data import (use real bean instead of a Map)
Added:
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/java/fr/ifremer/echobase/services/csv/TransectImportModelRow.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransitImportModelRow.java
Removed:
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/models/
Modified:
trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticDataImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/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/AccousticDataImportConfiguration.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/CsvModelUtil.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EntityAssociationExportModel.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EntityAssociationImportModel.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EntityCsvModel.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/ExportQueryCsvModel.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransectImportModel.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransitImportModel.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/VoyageImportModel.java
trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticData.jsp
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-26 10:52:23 UTC (rev 292)
+++ trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java 2012-01-26 10:54:27 UTC (rev 293)
@@ -30,6 +30,8 @@
import fr.ifremer.echobase.entities.references.AcousticInstrument;
import fr.ifremer.echobase.entities.references.AreaOfOperation;
import fr.ifremer.echobase.entities.references.CellMethod;
+import fr.ifremer.echobase.entities.references.CellType;
+import fr.ifremer.echobase.entities.references.DataMetadata;
import fr.ifremer.echobase.entities.references.DataQuality;
import fr.ifremer.echobase.entities.references.DataType;
import fr.ifremer.echobase.entities.references.DepthStratum;
@@ -88,6 +90,13 @@
}
};
+ public static final Function<CellType, String> CELL_TYPE_ID = new Function<CellType, String>() {
+ @Override
+ public String apply(CellType input) {
+ return input.getId();
+ }
+ };
+
public static final Function<DepthStratum, String> DEPTH_STRATUM_ID = new Function<DepthStratum, String>() {
@Override
public String apply(DepthStratum input) {
@@ -129,18 +138,21 @@
return input.getName();
}
};
+
public static final Function<DataType, String> DATA_TYPE_NAME = new Function<DataType, String>() {
@Override
public String apply(DataType input) {
return input.getName();
}
};
+
public static final Function<CellMethod, String> CELL_METHOD_NAME = new Function<CellMethod, String>() {
@Override
public String apply(CellMethod input) {
return input.getName();
}
};
+
public static final Function<DataProcessing, String> DATA_PROCESSING_ID = new Function<DataProcessing, String>() {
@Override
public String apply(DataProcessing input) {
@@ -154,6 +166,7 @@
return input.getQualityDataFlagValues();
}
};
+
public static final Function<TopiaEntity, String> TO_TOPIAID = new Function<TopiaEntity, String>() {
@Override
@@ -161,12 +174,14 @@
return input.getTopiaId();
}
};
+
public static final Function<File, String> FILE_NAME = new Function<File, String>() {
@Override
public String apply(File input) {
return input.getName();
}
};
+
public static final Function<SampleDataType, String> SAMPLE_DATA_TYPE_RAPTRI_CODE = new Function<SampleDataType, String>() {
@Override
public String apply(SampleDataType input) {
@@ -180,6 +195,7 @@
return input.getName();
}
};
+
public static final Function<Gear, String> GEAR_CASINO_GEAR_NAME = new Function<Gear, String>() {
@Override
public String apply(Gear input) {
@@ -195,6 +211,7 @@
return input.getId();
}
};
+
public static final Function<SizeCategory, String> SIZE_CATEGORY_NAME = new Function<SizeCategory, String>() {
@Override
public String apply(SizeCategory input) {
@@ -216,7 +233,14 @@
}
};
- public static String getSpeciesCategoryKey(Species species, SizeCategory sizeCategory,SexCategory sexCategory) {
+ public static final Function<DataMetadata, String> DATA_METADATA_NAME = new Function<DataMetadata, String>() {
+ @Override
+ public String apply(DataMetadata input) {
+ return input.getName();
+ }
+ };
+
+ public static String getSpeciesCategoryKey(Species species, SizeCategory sizeCategory, SexCategory sexCategory) {
String key = species.getBaracoudaCode();
if (sizeCategory != null) {
key += "_" + sizeCategory.getName();
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-26 10:52:23 UTC (rev 292)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticDataImportService.java 2012-01-26 10:54:27 UTC (rev 293)
@@ -23,11 +23,39 @@
*/
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.InputFile;
import fr.ifremer.echobase.entities.EchoBaseUser;
+import fr.ifremer.echobase.entities.data.Cell;
+import fr.ifremer.echobase.entities.data.CellDAO;
+import fr.ifremer.echobase.entities.data.Data;
+import fr.ifremer.echobase.entities.data.DataAcquisition;
+import fr.ifremer.echobase.entities.data.DataAcquisitionDAO;
+import fr.ifremer.echobase.entities.data.DataDAO;
+import fr.ifremer.echobase.entities.data.DataProcessing;
+import fr.ifremer.echobase.entities.data.DataProcessingDAO;
+import fr.ifremer.echobase.entities.data.Transect;
+import fr.ifremer.echobase.entities.data.Transit;
+import fr.ifremer.echobase.entities.references.AcousticInstrument;
+import fr.ifremer.echobase.entities.references.CellType;
+import fr.ifremer.echobase.entities.references.DataMetadata;
+import fr.ifremer.echobase.entities.references.Vessel;
import fr.ifremer.echobase.services.configurations.AccousticDataImportConfiguration;
+import fr.ifremer.echobase.services.csv.AcousticDataImportModel;
+import fr.ifremer.echobase.services.csv.AcousticDataImportModelRow;
+import org.nuiton.topia.TopiaException;
+import org.nuiton.util.csv.Import;
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.Reader;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
import java.util.Map;
/**
@@ -40,14 +68,409 @@
@Override
public Map<InputFile, CsvImportResult> startImport(AccousticDataImportConfiguration configuration,
- EchoBaseUser user) {
+ EchoBaseUser user) throws IOException, TopiaException {
Map<InputFile, CsvImportResult> result = Maps.newHashMap();
- char csvSeparator = serviceContext.getConfiguration().getCsvSeparator();
- importMoviesFile(configuration.getMoviesFile(), csvSeparator);
+
+ Transit transit = getEntityById(Transit.class, configuration.getTransitId());
+ Vessel vessel = getEntityById(Vessel.class, configuration.getVesselId());
+
+ // find out the correct transect to use
+ Transect transect = transit.getTransect(vessel);
+
+ List<AcousticInstrument> acousticInstruments = getEntities(AcousticInstrument.class);
+ Map<String, AcousticInstrument> acousticInstrumentsById = Maps.uniqueIndex(
+ acousticInstruments, EchoBaseFunctions.ACOUSTIC_INSTRUMENT_ID);
+
+ List<CellType> cellTypes = getEntities(CellType.class);
+ Map<String, CellType> cellTypesById = Maps.uniqueIndex(
+ cellTypes, EchoBaseFunctions.CELL_TYPE_ID);
+
+ List<DataMetadata> dataMetadatas = getEntities(DataMetadata.class);
+ Map<String, DataMetadata> dataMetadatasByName = Maps.uniqueIndex(
+ dataMetadatas, EchoBaseFunctions.DATA_METADATA_NAME);
+
+ CellType esduCellType = cellTypesById.get("Esdu");
+ Preconditions.checkNotNull(esduCellType);
+
+ CellType elementaryCellType = cellTypesById.get("Elementary");
+ Preconditions.checkNotNull(elementaryCellType);
+
+ importMoviesFile(transect,
+ acousticInstrumentsById,
+ dataMetadatasByName,
+ esduCellType,
+ elementaryCellType,
+ configuration,
+ configuration.getMoviesFile());
return result;
}
- private void importMoviesFile(InputFile inputFile, char csvSeparator) {
+ private final DateFormat cellDateFormat =
+ new SimpleDateFormat("yyyy-MM-dd hh:mm:ss'Z'");
+
+ private void importMoviesFile(Transect transect,
+ Map<String, AcousticInstrument> instrumentsById,
+ Map<String, DataMetadata> dataMetadatasByName,
+ CellType esduCellType,
+ CellType elementaryCellType,
+ AccousticDataImportConfiguration configuration,
+ InputFile inputFile) throws TopiaException, IOException {
+
+ AcousticDataImportModel csvModel = new AcousticDataImportModel(serviceContext.getConfiguration().getCsvSeparator());
+
+ DataAcquisitionDAO dataAcquisitionDAO =
+ (DataAcquisitionDAO) getDAO(DataAcquisition.class);
+ DataProcessingDAO dataProcessingDAO =
+ (DataProcessingDAO) getDAO(DataProcessing.class);
+ CellDAO cellDAO = (CellDAO) getDAO(Cell.class);
+ DataDAO dataDAO = (DataDAO) getDAO(Data.class);
+
+ Reader reader = new BufferedReader(new FileReader(inputFile.getFile()));
+ try {
+ Import<AcousticDataImportModelRow> importer = Import.newImport(csvModel, reader);
+ DataAcquisition dataAcquisition = null;
+ DataProcessing dataProcessing = null;
+ Cell esduCell = null;
+ Cell elementaryCell = null;
+ for (AcousticDataImportModelRow row : importer) {
+
+ // Build the row acoustic instrument
+ String sndname = row.getSndName();
+ String channelName = row.getChannelName();
+ String instrumentId = sndname + channelName;
+ AcousticInstrument instrument = instrumentsById.get(instrumentId);
+
+ if (dataAcquisition == null ||
+ !instrument.equals(dataAcquisition.getAcousticInstrument())) {
+
+ // first dataAcquisition or new instrument
+
+ String softwareVersion =
+ getSoftwareVersion(configuration, instrument);
+ String soundSpeedCalculations =
+ getSoundSpeedCalculations(configuration, instrument);
+
+ // create dataAcquisiton
+ dataAcquisition = createDataAcquisition(
+ configuration,
+ instrument,
+ softwareVersion,
+ soundSpeedCalculations,
+ row,
+ dataAcquisitionDAO
+ );
+
+ transect.addDataAcquisition(dataAcquisition);
+
+ // create data processing
+ dataProcessing = createDataProcessing(
+ configuration,
+ softwareVersion,
+ soundSpeedCalculations,
+ row,
+ dataProcessingDAO
+ );
+
+ dataAcquisition.addDataProcessing(dataProcessing);
+
+ // must start a fresh new esdu cell
+ esduCell = null;
+ }
+
+ Date startDate = row.getEsduCellStartDate();
+ String esduCellId = cellDateFormat.format(startDate);
+
+ if (esduCell == null || !esduCellId.equals(esduCell.getName())) {
+
+ // create esdu cell
+ esduCell = cellDAO.create(
+ Cell.PROPERTY_CELL_TYPE, esduCellType,
+ Cell.PROPERTY_NAME, esduCellId
+ );
+
+ dataProcessing.addCell(esduCell);
+
+ // create esdu cell data
+ createEsduCellData(configuration,
+ esduCell,
+ dataMetadatasByName,
+ row,
+ dataDAO);
+
+ // force to create a new elementary cell
+ elementaryCell = null;
+ }
+
+ int cellNum = row.getElementaryCellNum();
+
+ String elementaryCellId = esduCellId + "_" + cellNum;
+
+ if (elementaryCell == null ||
+ !elementaryCellId.equals(elementaryCell.getName())) {
+
+ // create the elementary cell
+
+ elementaryCell = cellDAO.create(
+ Cell.PROPERTY_CELL_TYPE, elementaryCellType,
+ Cell.PROPERTY_NAME, elementaryCellId
+ );
+ esduCell.addChilds(elementaryCell);
+ }
+
+ // create datas of the elementary cell
+ createElementaryCellData(configuration,
+ elementaryCell,
+ dataMetadatasByName,
+ row,
+ dataDAO);
+ }
+
+ } finally {
+ reader.close();
+ }
}
+ private void createEsduCellData(AccousticDataImportConfiguration configuration,
+ Cell cell,
+ Map<String, DataMetadata> dataMetadatasByName,
+ AcousticDataImportModelRow row,
+ DataDAO dao) throws TopiaException {
+
+ DataMetadata dataMetadata;
+ Data data;
+ String dataValue;
+
+ // create Latitude data
+ dataMetadata = dataMetadatasByName.get("LatitudeStart");
+ dataValue = row.getEsduCellDataLatitude();
+ data = dao.create(Data.PROPERTY_DATA_METADATA, dataMetadata);
+ data.setDataValue(dataValue);
+ cell.addData(data);
+
+ // create Longitude data
+ dataMetadata = dataMetadatasByName.get("LongitudeStart");
+ dataValue = row.getEsduCellDataLongitude();
+ data = dao.create(Data.PROPERTY_DATA_METADATA, dataMetadata);
+ data.setDataValue(dataValue);
+ cell.addData(data);
+
+ // create Depth data
+ dataMetadata = dataMetadatasByName.get("DepthRefSurfaceStart");
+ 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();
+ data = dao.create(Data.PROPERTY_DATA_METADATA, dataMetadata);
+ data.setDataValue(dataValue);
+ cell.addData(data);
+
+ // create AcousticDensity data
+ dataMetadata = dataMetadatasByName.get("sa");
+ dataValue = row.getEsduCellDataAcousticDensity();
+ data = dao.create(Data.PROPERTY_DATA_METADATA, dataMetadata);
+ data.setDataValue(dataValue);
+ cell.addData(data);
+ }
+
+ private void createElementaryCellData(AccousticDataImportConfiguration configuration,
+ Cell cell,
+ Map<String, DataMetadata> dataMetadatasByName,
+ AcousticDataImportModelRow row,
+ DataDAO dao) throws TopiaException {
+
+ DataMetadata dataMetadata;
+ Data data;
+ String dataValue;
+
+ int cellType = row.getElementaryCellType();
+
+ String startMeta;
+ String endMeta;
+
+ if (cellType == 0) {
+
+ // surface
+
+ startMeta = "DepthRefSurfaceStart";
+ endMeta = "DepthRefSurfaceEnd";
+
+ } else {
+
+ // bottom
+
+ startMeta = "DepthRefBottomStart";
+ endMeta = "DepthRefBottomEnd";
+
+
+ }
+
+ // create depth start data
+ dataMetadata = dataMetadatasByName.get(startMeta);
+ dataValue = row.getElementaryCellDataDepthStart();
+ 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();
+ 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();
+ data = dao.create(Data.PROPERTY_DATA_METADATA, dataMetadata);
+ data.setDataValue(dataValue);
+ cell.addData(data);
+
+ }
+
+ private DataAcquisition createDataAcquisition(AccousticDataImportConfiguration configuration,
+ AcousticInstrument instrument,
+ String softwareVersion,
+ String soundSpeedCalculations,
+ AcousticDataImportModelRow row,
+ DataAcquisitionDAO dataAcquisitionDAO) throws TopiaException {
+
+ String transceiverAcquisitionAbsorptionDescription =
+ configuration.getTransceiverAcquisitionAbsorptionDescription();
+ String loggedDataFormat = configuration.getLoggedDataFormat();
+ String loggedDataDatatype = configuration.getLoggedDataDatatype();
+ String pingDutyCycle = configuration.getPingDutyCycle();
+ String echosounderSoundSpeed = configuration.getEchosounderSoundSpeed();
+
+ DataAcquisition dataAcquisition = dataAcquisitionDAO.create();
+
+ // fill from manual configuration
+ dataAcquisition.setAcousticInstrument(instrument);
+ dataAcquisition.setTransceiverAcquisitionAbsorptionDescription(transceiverAcquisitionAbsorptionDescription);
+ dataAcquisition.setAcquisitionSoftwareVersion(softwareVersion);
+ dataAcquisition.setLoggedDataFormat(loggedDataFormat);
+ dataAcquisition.setLoggedDataDatatype(loggedDataDatatype);
+ dataAcquisition.setPingDutyCycle(pingDutyCycle);
+ dataAcquisition.setEchosounderSoundSpeed(echosounderSoundSpeed);
+ dataAcquisition.setSoundSpeedCalculations(soundSpeedCalculations);
+
+ // fill from csv file
+ Float transceiverAcquisitionAbsorption =
+ row.getTransceiverAcquisitionAbsorption();
+ Float transducerAcquisitionBeamAngleAthwartship =
+ row.getTransducerAcquisitionBeamAngleAthwartship();
+ Float transducerAcquisitionBeamAngleAlongship =
+ row.getTransducerAcquisitionBeamAngleAlongship();
+ Float transducerAcquisitionPsi =
+ row.getTransducerAcquisitionPsi();
+ Float transceiverAcquisitionPower =
+ row.getTransceiverAcquisitionPower();
+ Float transceiverAcquisitionPulseLength =
+ row.getTransceiverAcquisitionPulseLength();
+ Float transceiverAcquisitionGain =
+ row.getTransceiverAcquisitionGain();
+ Float transceiverAcquisitionSacorrection =
+ row.getTransceiverAcquisitionSacorrection();
+
+ dataAcquisition.setTransceiverAcquisitionAbsorption(transceiverAcquisitionAbsorption);
+ dataAcquisition.setTransducerAcquisitionBeamAngleAthwartship(transducerAcquisitionBeamAngleAthwartship);
+ dataAcquisition.setTransducerAcquisitionBeamAngleAlongship(transducerAcquisitionBeamAngleAlongship);
+ dataAcquisition.setTransducerAcquisitionPsi(transducerAcquisitionPsi);
+ dataAcquisition.setTransceiverAcquisitionPower(transceiverAcquisitionPower);
+ dataAcquisition.setTransceiverAcquisitionPulseLength(transceiverAcquisitionPulseLength);
+ dataAcquisition.setTransceiverAcquisitionGain(transceiverAcquisitionGain);
+ dataAcquisition.setTransceiverAcquisitionSacorrection(transceiverAcquisitionSacorrection);
+
+ return dataAcquisition;
+ }
+
+ private DataProcessing createDataProcessing(AccousticDataImportConfiguration configuration,
+ String softwareVersion,
+ String soundSpeedCalculations,
+ AcousticDataImportModelRow row,
+ DataProcessingDAO dataProcessingDAO) throws TopiaException {
+
+ String transceiverAcquisitionAbsorptionDescription =
+ configuration.getTransceiverAcquisitionAbsorptionDescription();
+ String echosounderSoundSpeed = configuration.getEchosounderSoundSpeed();
+ String processingTemplate = configuration.getProcessingTemplate();
+ String processingDescription = configuration.getProcessingDescription();
+ Float sounderConstant = configuration.getSounderConstant();
+ float digitThreshold = configuration.getDigitThreshold();
+ String acousticDensityUnit = configuration.getAcousticDensityUnit();
+ String notes = configuration.getNotes();
+
+ DataProcessing dataProcessing = dataProcessingDAO.create();
+
+ // fill from manual configuration
+ dataProcessing.setProcessingTemplate(processingTemplate);
+ dataProcessing.setProcessingDescription(processingDescription);
+ dataProcessing.setSounderConstant(sounderConstant);
+ dataProcessing.setDigitThreshold(digitThreshold);
+ dataProcessing.setAcousticDensityUnit(acousticDensityUnit);
+ dataProcessing.setNotes(notes);
+ dataProcessing.setProcessingSoftwareVersion(softwareVersion);
+ dataProcessing.setTransceiverProcessingAbsorptionDescription(transceiverAcquisitionAbsorptionDescription);
+ dataProcessing.setEchosounderSoundSpeed(echosounderSoundSpeed);
+ dataProcessing.setSoundSpeedCalculations(soundSpeedCalculations);
+
+ // fill from csv file
+
+ Float transceiverAcquisitionAbsorption =
+ row.getTransceiverAcquisitionAbsorption();
+ Float transducerAcquisitionBeamAngleAthwartship =
+ row.getTransducerAcquisitionBeamAngleAthwartship();
+ Float transducerAcquisitionBeamAngleAlongship =
+ row.getTransducerAcquisitionBeamAngleAlongship();
+ Float transducerAcquisitionPsi =
+ row.getTransducerAcquisitionPsi();
+
+ Float transceiverAcquisitionGain =
+ row.getTransceiverAcquisitionGain();
+ Float transceiverAcquisitionSacorrection =
+ row.getTransceiverAcquisitionSacorrection();
+ Float eIThreshold = row.getEiThreshold();
+
+ dataProcessing.setEiThreshold(eIThreshold);
+ dataProcessing.setTransceiverProcessingSacorrection(transceiverAcquisitionSacorrection);
+ dataProcessing.setTransceiverProcessingAbsorption(transceiverAcquisitionAbsorption);
+ dataProcessing.setTransceiverProcessingGain(transceiverAcquisitionGain);
+ dataProcessing.setTransducerProcessingPsi(transducerAcquisitionPsi);
+ dataProcessing.setTransducerProcessingBeamAngleAthwartship(transducerAcquisitionBeamAngleAthwartship);
+ dataProcessing.setTransducerProcessingBeamAngleAlongship(transducerAcquisitionBeamAngleAlongship);
+
+
+ return dataProcessing;
+ }
+
+ 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;
+ }
+ 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;
+ }
+ return result;
+ }
+
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataCompleteImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataCompleteImportService.java 2012-01-26 10:52:23 UTC (rev 292)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataCompleteImportService.java 2012-01-26 10:54:27 UTC (rev 293)
@@ -36,13 +36,14 @@
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 org.nuiton.util.csv.ImportToMap;
import java.io.BufferedReader;
import java.io.FileReader;
@@ -66,17 +67,19 @@
Map<InputFile, CsvImportResult> result = Maps.newHashMap();
- char csvSeparator = serviceContext.getConfiguration().getCsvSeparator();
- Mission mission = getEntityById(Mission.class, configuration.getMissionId());
- AreaOfOperation areaOfOperation = getEntityById(AreaOfOperation.class, configuration.getAreaOfOperationId());
- Vessel vessel = getEntityById(Vessel.class, configuration.getVesselId());
+ 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(),
- csvSeparator);
+ configuration.getDatum());
List<Voyage> allVoyages = getEntities(Voyage.class);
Map<String, Voyage> voyageMap = Maps.uniqueIndex(
@@ -84,8 +87,7 @@
importTransitFile(configuration.getTransitFile(),
voyageMap,
- configuration.getTransitRelatedActivity(),
- csvSeparator);
+ configuration.getTransitRelatedActivity());
importTransectFile(configuration.getTransectFile(),
vessel,
@@ -93,10 +95,9 @@
configuration.getDatum(),
configuration.getTransectLicence(),
configuration.getTransectGeospatialVerticalPositive(),
- configuration.getTransectBinUnitsPingAxis(),
- csvSeparator);
+ configuration.getTransectBinUnitsPingAxis());
- importEchotypeFile(configuration.getEchotypeFile(), csvSeparator);
+ importEchotypeFile(configuration.getEchotypeFile());
commitTransaction("Could not commit transaction of common data import");
return result;
@@ -117,11 +118,10 @@
Mission mission,
AreaOfOperation areaOfOperation,
String voyageDescription,
- String datum,
- char csvSeparator) throws IOException, TopiaException {
+ String datum) throws IOException, TopiaException {
- ImportModel<Voyage> csvModel = new VoyageImportModel(csvSeparator);
+ ImportModel<Voyage> csvModel = new VoyageImportModel(serviceContext.getConfiguration().getCsvSeparator());
TopiaDAO<Voyage> dao = getDAO(Voyage.class);
Reader reader = new BufferedReader(new FileReader(inputFile.getFile()));
@@ -142,27 +142,26 @@
protected void importTransitFile(InputFile inputFile,
Map<String, Voyage> voyageMap,
- String relatedActivity,
- char csvSeparator) throws TopiaException, IOException {
- TransitImportModel csvModel = new TransitImportModel(csvSeparator, 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 {
- ImportToMap importer = ImportToMap.newImport(csvModel, reader);
- for (Map<String, Object> row : importer) {
+ Import<TransitImportModelRow> importer = Import.newImport(csvModel, reader);
+ for (TransitImportModelRow row : importer) {
- Voyage voyage = (Voyage) row.get(TransitImportModel.TRANSIT_VoyageId);
+ Voyage voyage = row.getVoyage();
Transit transit = dao.create();
- transit.setDescription((String) row.get(Transit.PROPERTY_DESCRIPTION));
- transit.setStartLocality((String) row.get(Transit.PROPERTY_START_LOCALITY));
- transit.setEndLocality((String) row.get(Transit.PROPERTY_END_LOCALITY));
+ transit.setDescription(row.getDescription());
+ transit.setStartLocality(row.getStartLocality());
+ transit.setEndLocality(row.getEndLocality());
- transit.setStartTime((Date) row.get(Transit.PROPERTY_START_TIME));
- transit.setEndTime((Date) row.get(Transit.PROPERTY_END_TIME));
+ transit.setStartTime(row.getStartTime());
+ transit.setEndTime(row.getEndTime());
transit.setRelatedActivity(relatedActivity);
voyage.addTransit(transit);
}
@@ -178,23 +177,23 @@
String datum,
String license,
String geospatialVerticalPositive,
- String binUnitsPingAxis,
- char csvSeparator
+ String binUnitsPingAxis
) throws TopiaException, IOException {
- TransectImportModel csvModel = new TransectImportModel(csvSeparator, voyageMap);
+ TransectImportModel csvModel = new TransectImportModel(serviceContext.getConfiguration().getCsvSeparator(), voyageMap);
TopiaDAO<Transect> dao = getDAO(Transect.class);
Reader reader = new BufferedReader(new FileReader(inputFile.getFile()));
try {
- ImportToMap importer = ImportToMap.newImport(csvModel, reader);
- for (Map<String, Object> row : importer) {
+ Import<TransectImportModelRow> importer =
+ Import.newImport(csvModel, reader);
+ for (TransectImportModelRow row : importer) {
- Voyage voyage = (Voyage) row.get(TransectImportModel.TRANSECT_VoyageId);
+ Voyage voyage = row.getVoyage();
- Date timeCoverageStart = (Date) row.get(Transect.PROPERTY_TIME_COVERAGE_START);
- Date timeCoverageEnd = (Date) row.get(Transect.PROPERTY_TIME_COVERAGE_END);
+ Date timeCoverageStart = row.getTimeCoverageStart();
+ Date timeCoverageEnd = row.getTimeCoverageEnd();
Transit transit = voyage.getTransit(timeCoverageStart, timeCoverageEnd);
if (transit == null) {
@@ -206,29 +205,28 @@
Transect.PROPERTY_VESSEL, vessel
);
- transect.setTitle((String) row.get(Transect.PROPERTY_TITLE));
- transect.setTransectAbstract((String) row.get(Transect.PROPERTY_TRANSECT_ABSTRACT));
- transect.setComment((String) row.get(Transect.PROPERTY_COMMENT));
+ 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((Date) row.get(Transect.PROPERTY_DATE_CREATED));
+ transect.setDateCreated(row.getDateCreated());
transect.setTimeCoverageStart(timeCoverageStart);
transect.setTimeCoverageEnd(timeCoverageEnd);
- transect.setGeospatialLatMin((Float) row.get(Transect.PROPERTY_GEOSPATIAL_LAT_MIN));
- transect.setGeospatialLonMin((Float) row.get(Transect.PROPERTY_GEOSPATIAL_LON_MIN));
- transect.setGeospatialVerticalMin((Float) row.get(Transect.PROPERTY_GEOSPATIAL_VERTICAL_MIN));
+ transect.setGeospatialLatMin(row.getGeospatialLatMin());
+ transect.setGeospatialLonMin(row.getGeospatialLonMin());
+ transect.setGeospatialVerticalMin(row.getGeospatialVerticalMin());
- transect.setGeospatialLatMax((Float) row.get(Transect.PROPERTY_GEOSPATIAL_LAT_MAX));
- transect.setGeospatialLonMax((Float) row.get(Transect.PROPERTY_GEOSPATIAL_LON_MAX));
- transect.setGeospatialVerticalMax((Float) row.get(Transect.PROPERTY_GEOSPATIAL_VERTICAL_MAX));
- transect.setLinestring((String) row.get(Transect.PROPERTY_LINESTRING));
-
+ transect.setGeospatialLatMax(row.getGeospatialLatMax());
+ transect.setGeospatialLonMax(row.getGeospatialLonMax());
+ transect.setGeospatialVerticalMax(row.getGeospatialVerticalMax());
+ transect.setLinestring(row.getLinestring());
transit.addTransect(transect);
}
@@ -237,7 +235,7 @@
}
}
- private void importEchotypeFile(InputFile inputFile, char csvSeparator) {
+ private void importEchotypeFile(InputFile inputFile) {
}
Modified: 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-26 10:52:23 UTC (rev 292)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataFromTransectImportService.java 2012-01-26 10:54:27 UTC (rev 293)
@@ -34,9 +34,10 @@
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.ImportToMap;
+import org.nuiton.util.csv.Import;
import java.io.BufferedReader;
import java.io.FileReader;
@@ -59,7 +60,6 @@
EchoBaseUser user) throws IOException, TopiaException {
Map<InputFile, CsvImportResult> result = Maps.newHashMap();
- char csvSeparator = serviceContext.getConfiguration().getCsvSeparator();
Voyage voyage = getEntityById(Voyage.class, configuration.getVoyageId());
Vessel vessel = getEntityById(Vessel.class, configuration.getVesselId());
@@ -71,11 +71,7 @@
voyage,
voyageMap,
vessel,
- configuration.getDatum(),
- configuration.getTransectLicence(),
- configuration.getTransectGeospatialVerticalPositive(),
- configuration.getTransectBinUnitsPingAxis(),
- csvSeparator);
+ configuration);
return result;
}
@@ -83,24 +79,26 @@
Voyage voyage,
Map<String, Voyage> voyageMap,
Vessel vessel,
- String datum,
- String license,
- String geospatialVerticalPositive,
- String binUnitsPingAxis,
- char csvSeparator
+ CommonDataFromTransectImportConfiguration configuration
) throws TopiaException, IOException {
- TransectImportModel csvModel = new TransectImportModel(csvSeparator, voyageMap);
+ 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 {
- ImportToMap importer = ImportToMap.newImport(csvModel, reader);
- for (Map<String, Object> row : importer) {
+ Import<TransectImportModelRow> importer = Import.newImport(csvModel, reader);
+ for (TransectImportModelRow row : importer) {
- Date timeCoverageStart = (Date) row.get(Transect.PROPERTY_TIME_COVERAGE_START);
- Date timeCoverageEnd = (Date) row.get(Transect.PROPERTY_TIME_COVERAGE_END);
+ Date timeCoverageStart = row.getTimeCoverageStart();
+ Date timeCoverageEnd = row.getTimeCoverageEnd();
Transit transit = voyage.getTransit(timeCoverageStart, timeCoverageEnd);
if (transit == null) {
@@ -109,31 +107,30 @@
voyage.getName() + " between " + timeCoverageStart + " and " + timeCoverageEnd);
}
- Transect transect = dao.create(
- Transect.PROPERTY_VESSEL, vessel
- );
+ Transect transect =
+ dao.create(Transect.PROPERTY_VESSEL, vessel);
- transect.setTitle((String) row.get(Transect.PROPERTY_TITLE));
- transect.setTransectAbstract((String) row.get(Transect.PROPERTY_TRANSECT_ABSTRACT));
- transect.setComment((String) row.get(Transect.PROPERTY_COMMENT));
+ 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((Date) row.get(Transect.PROPERTY_DATE_CREATED));
+ transect.setDateCreated(row.getDateCreated());
transect.setTimeCoverageStart(timeCoverageStart);
transect.setTimeCoverageEnd(timeCoverageEnd);
- transect.setGeospatialLatMin((Float) row.get(Transect.PROPERTY_GEOSPATIAL_LAT_MIN));
- transect.setGeospatialLonMin((Float) row.get(Transect.PROPERTY_GEOSPATIAL_LON_MIN));
- transect.setGeospatialVerticalMin((Float) row.get(Transect.PROPERTY_GEOSPATIAL_VERTICAL_MIN));
+ transect.setGeospatialLatMin(row.getGeospatialLatMin());
+ transect.setGeospatialLonMin(row.getGeospatialLonMin());
+ transect.setGeospatialVerticalMin(row.getGeospatialVerticalMin());
- transect.setGeospatialLatMax((Float) row.get(Transect.PROPERTY_GEOSPATIAL_LAT_MAX));
- transect.setGeospatialLonMax((Float) row.get(Transect.PROPERTY_GEOSPATIAL_LON_MAX));
- transect.setGeospatialVerticalMax((Float) row.get(Transect.PROPERTY_GEOSPATIAL_VERTICAL_MAX));
- transect.setLinestring((String) row.get(Transect.PROPERTY_LINESTRING));
+ transect.setGeospatialLatMax(row.getGeospatialLatMax());
+ transect.setGeospatialLonMax(row.getGeospatialLonMax());
+ transect.setGeospatialVerticalMax(row.getGeospatialVerticalMax());
+ transect.setLinestring(row.getLinestring());
transit.addTransect(transect);
}
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-26 10:52:23 UTC (rev 292)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AccousticDataImportConfiguration.java 2012-01-26 10:54:27 UTC (rev 293)
@@ -42,24 +42,61 @@
/** Selected voyage id where to import datas. */
protected String voyageId;
+ /** Selected transit id where to import datas. */
+ protected String transitId;
+
/** Selected vessel id to find out transect where to import datas. */
protected String vesselId;
+ /** Manual transceiverAcquisitionAbsorptionDescription. */
+ protected String transceiverAcquisitionAbsorptionDescription = "(i) Equation: Francois and garrison 1982,(ii) CTD, (iii) nominal value for entire data set";
+
+ /** Manual acquisitionSoftwareVersion (ER60 instrument). */
+ protected String acquisitionSoftwareVersionER60;
+
+ /** Manual acquisitionSoftwareVersion (ME70 instrument). */
+ protected String acquisitionSoftwareVersionME70;
+
+ /** Manual loggedDataFormat. */
+ protected String loggedDataFormat = ".hac and .raw formats";
+
+ /** Manual loggedDataDatatype. */
+ protected String loggedDataDatatype = "‘raw’ digitisation samples";
+
+ /** Manual pingDutyCycle. */
+ protected String pingDutyCycle = "Ifremer's standard ping duty cycle";
+
/** Manual echosounderSoundSpeed. */
protected String echosounderSoundSpeed = "Variable";
- /** Manual soundSpeedCalculations. */
- protected String soundSpeedCalculations = "SVProbe";
+ /** Manual soundSpeedCalculations (ER60 instrument). */
+ protected String soundSpeedCalculationsER60 = "(i) Equation: Mackenzie (1980), (ii) CTD, (iii) nominal value for entire data set";
- /** Manual pingDutyCycle. */
- protected String pingDutyCycle = "ME70Table";
+ /** Manual soundSpeedCalculations (ME70 instrument). */
+ protected String soundSpeedCalculationsME70 = "(i) Equation: Mackenzie (1980), (ii) Hull-mounted thermosalinometer, (iii) surface absorption value recomputed every 30s and applied to the entire data set";
+ /** Manual sounderConstant. */
+ protected Float sounderConstant;
+
+ /** Manual processingTemplate. */
+ protected String processingTemplate;
+
+ /** Manual processingDescription. */
+ protected String processingDescription;
+
+ /** Manual digitThreshold. */
+ protected float digitThreshold = -100f;
+
+ /** Manual acousticDensityUnit. */
+ protected String acousticDensityUnit = "sA";
+
/** Manual notes. */
protected String notes;
/** Movies file to import. */
protected final InputFile moviesFile;
+
public AccousticDataImportConfiguration(Locale locale) {
moviesFile = InputFile.newFile(l_(locale, "echobase.common.moviesFile"));
}
@@ -72,6 +109,15 @@
this.voyageId = voyageId;
}
+
+ public String getTransitId() {
+ return transitId;
+ }
+
+ public void setTransitId(String transitId) {
+ this.transitId = transitId;
+ }
+
public String getVesselId() {
return vesselId;
}
@@ -80,22 +126,46 @@
this.vesselId = vesselId;
}
- public String getEchosounderSoundSpeed() {
- return echosounderSoundSpeed;
+ public String getTransceiverAcquisitionAbsorptionDescription() {
+ return transceiverAcquisitionAbsorptionDescription;
}
- public void setEchosounderSoundSpeed(String echosounderSoundSpeed) {
- this.echosounderSoundSpeed = echosounderSoundSpeed;
+ public void setTransceiverAcquisitionAbsorptionDescription(String transceiverAcquisitionAbsorptionDescription) {
+ this.transceiverAcquisitionAbsorptionDescription = transceiverAcquisitionAbsorptionDescription;
}
- public String getSoundSpeedCalculations() {
- return soundSpeedCalculations;
+ public String getAcquisitionSoftwareVersionER60() {
+ return acquisitionSoftwareVersionER60;
}
- public void setSoundSpeedCalculations(String soundSpeedCalculations) {
- this.soundSpeedCalculations = soundSpeedCalculations;
+ public void setAcquisitionSoftwareVersionER60(String acquisitionSoftwareVersionER60) {
+ this.acquisitionSoftwareVersionER60 = acquisitionSoftwareVersionER60;
}
+ public String getAcquisitionSoftwareVersionME70() {
+ return acquisitionSoftwareVersionME70;
+ }
+
+ public void setAcquisitionSoftwareVersionME70(String acquisitionSoftwareVersionME70) {
+ this.acquisitionSoftwareVersionME70 = acquisitionSoftwareVersionME70;
+ }
+
+ public String getLoggedDataFormat() {
+ return loggedDataFormat;
+ }
+
+ public void setLoggedDataFormat(String loggedDataFormat) {
+ this.loggedDataFormat = loggedDataFormat;
+ }
+
+ public String getLoggedDataDatatype() {
+ return loggedDataDatatype;
+ }
+
+ public void setLoggedDataDatatype(String loggedDataDatatype) {
+ this.loggedDataDatatype = loggedDataDatatype;
+ }
+
public String getPingDutyCycle() {
return pingDutyCycle;
}
@@ -104,6 +174,54 @@
this.pingDutyCycle = pingDutyCycle;
}
+ public String getEchosounderSoundSpeed() {
+ return echosounderSoundSpeed;
+ }
+
+ public void setEchosounderSoundSpeed(String echosounderSoundSpeed) {
+ this.echosounderSoundSpeed = echosounderSoundSpeed;
+ }
+
+ public String getSoundSpeedCalculationsER60() {
+ return soundSpeedCalculationsER60;
+ }
+
+ public void setSoundSpeedCalculationsER60(String soundSpeedCalculationsER60) {
+ this.soundSpeedCalculationsER60 = soundSpeedCalculationsER60;
+ }
+
+ public String getSoundSpeedCalculationsME70() {
+ return soundSpeedCalculationsME70;
+ }
+
+ public void setSoundSpeedCalculationsME70(String soundSpeedCalculationsME70) {
+ this.soundSpeedCalculationsME70 = soundSpeedCalculationsME70;
+ }
+
+ public Float getSounderConstant() {
+ return sounderConstant;
+ }
+
+ public void setSounderConstant(Float sounderConstant) {
+ this.sounderConstant = sounderConstant;
+ }
+
+ public float getDigitThreshold() {
+ return digitThreshold;
+ }
+
+ public void setDigitThreshold(float digitThreshold) {
+ this.digitThreshold = digitThreshold;
+ }
+
+ public String getAcousticDensityUnit() {
+ return acousticDensityUnit;
+ }
+
+ public void setAcousticDensityUnit(String acousticDensityUnit) {
+ this.acousticDensityUnit = acousticDensityUnit;
+ }
+
public String getNotes() {
return notes;
}
@@ -116,6 +234,22 @@
return moviesFile;
}
+ public String getProcessingTemplate() {
+ return processingTemplate;
+ }
+
+ public void setProcessingTemplate(String processingTemplate) {
+ this.processingTemplate = processingTemplate;
+ }
+
+ public String getProcessingDescription() {
+ return processingDescription;
+ }
+
+ public void setProcessingDescription(String processingDescription) {
+ this.processingDescription = processingDescription;
+ }
+
@Override
public InputFile[] getInputFiles() {
return new InputFile[]{moviesFile};
Added: 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 (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/AcousticDataImportModel.java 2012-01-26 10:54:27 UTC (rev 293)
@@ -0,0 +1,139 @@
+/*
+ * #%L
+ * EchoBase :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.services.csv;
+
+import fr.ifremer.echobase.entities.data.Cell;
+import fr.ifremer.echobase.entities.data.Data;
+import fr.ifremer.echobase.entities.data.DataAcquisition;
+import fr.ifremer.echobase.entities.data.DataProcessing;
+
+/**
+ * To import acoustic datas (says {@link DataAcquisition},
+ * {@link DataProcessing}, {@link Cell} and {@link Data}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class AcousticDataImportModel extends CsvModelUtil.AbstractImportModel<AcousticDataImportModelRow> {
+
+ public AcousticDataImportModel(char separator) {
+ super(separator);
+ newIgnoredColumn("MOVIES_EILayer");//A
+ newIgnoredColumn("MOVIES_EILayer\\sndset");//B
+ newMandatoryColumn("MOVIES_EILayer\\sndset\\sndname", AcousticDataImportModelRow.PROPERTY_SNDNAME);//C
+ newIgnoredColumn("MOVIES_EILayer\\sndset\\sndident");//D
+ newIgnoredColumn("MOVIES_EILayer\\sndset\\softChannelId");//E
+ newMandatoryColumn("MOVIES_EILayer\\sndset\\channelName", AcousticDataImportModelRow.PROPERTY_CHANNEL_NAME);//F
+ newIgnoredColumn("MOVIES_EILayer\\sndset\\dataType");//G
+ newIgnoredColumn("MOVIES_EILayer\\sndset\\beamType");//H
+ newIgnoredColumn("MOVIES_EILayer\\sndset\\acousticFrequency");//I
+ newIgnoredColumn("MOVIES_EILayer\\sndset\\startSample");//J
+ newIgnoredColumn("MOVIES_EILayer\\sndset\\mainBeamAlongSteeringAngle");//K
+ newIgnoredColumn("MOVIES_EILayer\\sndset\\mainBeamAthwartSteeringAngle");//L
+ newMandatoryColumn("MOVIES_EILayer\\sndset\\absorptionCoef", AcousticDataImportModelRow.PROPERTY_TRANSCEIVER_ACQUISITION_ABSORPTION, CsvModelUtil.FLOAT);//M
+ newMandatoryColumn("MOVIES_EILayer\\sndset\\transmissionPower", AcousticDataImportModelRow.PROPERTY_TRANSCEIVER_ACQUISITION_POWER, CsvModelUtil.INTEGER);//N
+ newMandatoryColumn("MOVIES_EILayer\\sndset\\beamAlongAngleSensitivity", AcousticDataImportModelRow.PROPERTY_TRANSDUCER_ACQUISITION_BEAM_ANGLE_ALONGSHIP, CsvModelUtil.FLOAT);//O
+ newMandatoryColumn("MOVIES_EILayer\\sndset\\beamAthwartAngleSensitivity", AcousticDataImportModelRow.PROPERTY_TRANSDUCER_ACQUISITION_BEAM_ANGLE_ATHWARTSHIP, CsvModelUtil.FLOAT);//P
+ newIgnoredColumn("MOVIES_EILayer\\sndset\\beam3dBWidthAlong");//Q
+ newIgnoredColumn("MOVIES_EILayer\\sndset\\beam3dBWidthAthwart");//R
+ newMandatoryColumn("MOVIES_EILayer\\sndset\\beamEquTwoWayAngle", AcousticDataImportModelRow.PROPERTY_TRANSDUCER_ACQUISITION_PSI, CsvModelUtil.FLOAT);//S
+ newMandatoryColumn("MOVIES_EILayer\\sndset\\beamGain", AcousticDataImportModelRow.PROPERTY_TRANSCEIVER_ACQUISITION_GAIN, CsvModelUtil.FLOAT);//T
+ newMandatoryColumn("MOVIES_EILayer\\sndset\\beamSACorrection", AcousticDataImportModelRow.PROPERTY_TRANSCEIVER_ACQUISITION_SACORRECTION, CsvModelUtil.FLOAT);//U
+ newIgnoredColumn("MOVIES_EILayer\\sndset\\bottomDetectionMinDepth");//V
+ newIgnoredColumn("MOVIES_EILayer\\sndset\\bottomDetectionMaxDepth");//W
+ newIgnoredColumn("MOVIES_EILayer\\sndset\\bottomDetectionMinLevel");//X
+ newIgnoredColumn("MOVIES_EILayer\\sndset\\AlongTXRXWeightId");//Y
+ newIgnoredColumn("MOVIES_EILayer\\sndset\\AthwartTXRXWeightId");//Z
+ newIgnoredColumn("MOVIES_EILayer\\sndset\\splitBeamAlongTXRXWeightId");//AA
+ newIgnoredColumn("MOVIES_EILayer\\sndset\\splitBeamAthwartTXRXWeightId");//AB
+ newIgnoredColumn("MOVIES_EILayer\\sndset\\bandWidth");//AC
+ newIgnoredColumn("MOVIES_EILayer\\sndset\\tvgminrange");//AD
+ newIgnoredColumn("MOVIES_EILayer\\sndset\\tvgmaxrange");//AE
+ newMandatoryColumn("MOVIES_EILayer\\sndset\\pulseduration", AcousticDataImportModelRow.PROPERTY_TRANSCEIVER_ACQUISITION_PULSE_LENGTH, CsvModelUtil.FLOAT);//AF
+ newIgnoredColumn("MOVIES_EILayer\\shipnav");//AG
+ newMandatoryColumn("MOVIES_EILayer\\shipnav\\lat", AcousticDataImportModelRow.PROPERTY_ESDU_CELL_DATA_LATITUDE);//AH
+ newMandatoryColumn("MOVIES_EILayer\\shipnav\\long", AcousticDataImportModelRow.PROPERTY_ESDU_CELL_DATA_LONGITUDE);//AI
+ newIgnoredColumn("MOVIES_EILayer\\shipnav\\alt");//AJ
+ newIgnoredColumn("MOVIES_EILayer\\shipnav\\gndspeed");//AK
+ newIgnoredColumn("MOVIES_EILayer\\shipnav\\gndcourse");//AL
+ newIgnoredColumn("MOVIES_EILayer\\shipnav\\surfspeed");//AM
+ newIgnoredColumn("MOVIES_EILayer\\shipnav\\surfcourse");//AN
+ newIgnoredColumn("MOVIES_EILayer\\shipnav\\driftspeed");//AO
+ newIgnoredColumn("MOVIES_EILayer\\shipnav\\driftcourse");//AP
+ newIgnoredColumn("MOVIES_EILayer\\shipnav\\heading");//AQ
+ newIgnoredColumn("MOVIES_EILayer\\shipnav\roll");//AR
+ newIgnoredColumn("MOVIES_EILayer\\shipnav\\pitch");//AS
+ newIgnoredColumn("MOVIES_EILayer\\shipnav\\heave");//AT
+ newMandatoryColumn("MOVIES_EILayer\\shipnav\\depth", AcousticDataImportModelRow.PROPERTY_ESDU_CELL_DATA_DEPTH);//AU
+ newIgnoredColumn("MOVIES_EILayer\\shipnav\\draught");//AV
+
+ // 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
+ 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
+ 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
+ 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
+ }
+
+ @Override
+ public AcousticDataImportModelRow newEmptyInstance() {
+ return new AcousticDataImportModelRow();
+ }
+}
\ No newline at end of file
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/AcousticDataImportModel.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/AcousticDataImportModelRow.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/AcousticDataImportModelRow.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/AcousticDataImportModelRow.java 2012-01-26 10:54:27 UTC (rev 293)
@@ -0,0 +1,299 @@
+/*
+ * #%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 java.util.Date;
+
+/**
+ * Bean of a row for {@link AcousticDataImportModel} import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class AcousticDataImportModelRow {
+
+ public static final String PROPERTY_CHANNEL_NAME = "channelName";
+
+ public static final String PROPERTY_SNDNAME = "sndname";
+
+ public static final String PROPERTY_ESDU_CELL_START_DATE = "esduCellStartDate";
+
+ public static final String PROPERTY_ELEMENTARY_CELL_TYPE = "elementaryCellType";
+
+ 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_ESDU_CELL_DATA_ACOUSTIC_DENSITY = "esduCellDataAcousticDensity";
+
+ public static final String PROPERTY_ELEMENTARY_CELL_DATA_DEPTH_START = "elementaryCellDataDepthStart";
+
+ public static final String PROPERTY_ELEMENTARY_CELL_DATA_DEPTHEND = "elementaryCellDataDepthend";
+
+ 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";
+
+ public static final String PROPERTY_TRANSCEIVER_ACQUISITION_ABSORPTION = "transceiverAcquisitionAbsorption";
+
+ public static final String PROPERTY_TRANSDUCER_ACQUISITION_BEAM_ANGLE_ATHWARTSHIP = "transducerAcquisitionBeamAngleAthwartship";
+
+ public static final String PROPERTY_TRANSDUCER_ACQUISITION_BEAM_ANGLE_ALONGSHIP = "transducerAcquisitionBeamAngleAlongship";
+
+ public static final String PROPERTY_TRANSDUCER_ACQUISITION_PSI = "transducerAcquisitionPsi";
+
+ public static final String PROPERTY_TRANSCEIVER_ACQUISITION_POWER = "transceiverAcquisitionPower";
+
+ public static final String PROPERTY_TRANSCEIVER_ACQUISITION_SACORRECTION = "transceiverAcquisitionSacorrection";
+
+ public static final String PROPERTY_EI_THRESHOLD = "eiThreshold";
+
+ protected String sndName;
+
+ protected String channelName;
+
+ protected Date esduCellStartDate;
+
+ protected String esduCellDataLatitude;
+
+ protected String esduCellDataLongitude;
+
+ protected String esduCellDataDepth;
+
+ protected String esduCellDataAcousticDensity;
+
+ protected int elementaryCellType;
+
+ protected int elementaryCellNum;
+
+ protected String elementaryCellDataDepthStart;
+
+ protected String elementaryCellDataDepthEnd;
+
+ protected String elementaryCellDataAcousticDensity;
+
+ protected float transceiverAcquisitionPulseLength;
+
+ protected float transceiverAcquisitionGain;
+
+ protected float transceiverAcquisitionAbsorption;
+
+ protected float transceiverAcquisitionPower;
+
+ protected float transceiverAcquisitionSacorrection;
+
+ protected float transducerAcquisitionBeamAngleAthwartship;
+
+ protected float transducerAcquisitionBeamAngleAlongship;
+
+ protected float transducerAcquisitionPsi;
+
+ protected float eiThreshold;
+
+ private String esduCellDataTime;
+
+ public String getSndName() {
+ return sndName;
+ }
+
+ public void setSndName(String sndName) {
+ this.sndName = sndName;
+ }
+
+ public String getChannelName() {
+ return channelName;
+ }
+
+ public void setChannelName(String channelName) {
+ this.channelName = channelName;
+ }
+
+ public Date getEsduCellStartDate() {
+ return esduCellStartDate;
+ }
+
+ public void setEsduCellStartDate(Date esduCellStartDate) {
+ this.esduCellStartDate = esduCellStartDate;
+ }
+
+ public int getElementaryCellType() {
+ return elementaryCellType;
+ }
+
+ public void setElementaryCellType(int elementaryCellType) {
+ this.elementaryCellType = elementaryCellType;
+ }
+
+ public int getElementaryCellNum() {
+ return elementaryCellNum;
+ }
+
+ public void setElementaryCellNum(int elementaryCellNum) {
+ this.elementaryCellNum = elementaryCellNum;
+ }
+
+ public String getEsduCellDataLatitude() {
+ return esduCellDataLatitude;
+ }
+
+ public void setEsduCellDataLatitude(String esduCellDataLatitude) {
+ this.esduCellDataLatitude = esduCellDataLatitude;
+ }
+
+ public String getEsduCellDataLongitude() {
+ return esduCellDataLongitude;
+ }
+
+ public void setEsduCellDataLongitude(String esduCellDataLongitude) {
+ this.esduCellDataLongitude = esduCellDataLongitude;
+ }
+
+ public String getEsduCellDataDepth() {
+ return esduCellDataDepth;
+ }
+
+ public void setEsduCellDataDepth(String esduCellDataDepth) {
+ this.esduCellDataDepth = esduCellDataDepth;
+ }
+
+ public String getEsduCellDataAcousticDensity() {
+ return esduCellDataAcousticDensity;
+ }
+
+ public void setEsduCellDataAcousticDensity(String esduCellDataAcousticDensity) {
+ this.esduCellDataAcousticDensity = esduCellDataAcousticDensity;
+ }
+
+ public String getElementaryCellDataDepthStart() {
+ return elementaryCellDataDepthStart;
+ }
+
+ public void setElementaryCellDataDepthStart(String elementaryCellDataDepthStart) {
+ this.elementaryCellDataDepthStart = elementaryCellDataDepthStart;
+ }
+
+ public String getElementaryCellDataDepthEnd() {
+ return elementaryCellDataDepthEnd;
+ }
+
+ public void setElementaryCellDataDepthEnd(String elementaryCellDataDepthEnd) {
+ this.elementaryCellDataDepthEnd = elementaryCellDataDepthEnd;
+ }
+
+ public String getElementaryCellDataAcousticDensity() {
+ return elementaryCellDataAcousticDensity;
+ }
+
+ public void setElementaryCellDataAcousticDensity(String elementaryCellDataAcousticDensity) {
+ this.elementaryCellDataAcousticDensity = elementaryCellDataAcousticDensity;
+ }
+
+ public float getTransceiverAcquisitionPulseLength() {
+ return transceiverAcquisitionPulseLength;
+ }
+
+ public void setTransceiverAcquisitionPulseLength(float transceiverAcquisitionPulseLength) {
+ this.transceiverAcquisitionPulseLength = transceiverAcquisitionPulseLength;
+ }
+
+ public float getTransceiverAcquisitionGain() {
+ return transceiverAcquisitionGain;
+ }
+
+ public void setTransceiverAcquisitionGain(float transceiverAcquisitionGain) {
+ this.transceiverAcquisitionGain = transceiverAcquisitionGain;
+ }
+
+ public float getTransceiverAcquisitionAbsorption() {
+ return transceiverAcquisitionAbsorption;
+ }
+
+ public void setTransceiverAcquisitionAbsorption(float transceiverAcquisitionAbsorption) {
+ this.transceiverAcquisitionAbsorption = transceiverAcquisitionAbsorption;
+ }
+
+ public float getTransceiverAcquisitionPower() {
+ return transceiverAcquisitionPower;
+ }
+
+ public void setTransceiverAcquisitionPower(float transceiverAcquisitionPower) {
+ this.transceiverAcquisitionPower = transceiverAcquisitionPower;
+ }
+
+ public float getTransceiverAcquisitionSacorrection() {
+ return transceiverAcquisitionSacorrection;
+ }
+
+ public void setTransceiverAcquisitionSacorrection(float transceiverAcquisitionSacorrection) {
+ this.transceiverAcquisitionSacorrection = transceiverAcquisitionSacorrection;
+ }
+
+ public float getTransducerAcquisitionBeamAngleAthwartship() {
+ return transducerAcquisitionBeamAngleAthwartship;
+ }
+
+ public void setTransducerAcquisitionBeamAngleAthwartship(float transducerAcquisitionBeamAngleAthwartship) {
+ this.transducerAcquisitionBeamAngleAthwartship = transducerAcquisitionBeamAngleAthwartship;
+ }
+
+ public float getTransducerAcquisitionBeamAngleAlongship() {
+ return transducerAcquisitionBeamAngleAlongship;
+ }
+
+ public void setTransducerAcquisitionBeamAngleAlongship(float transducerAcquisitionBeamAngleAlongship) {
+ this.transducerAcquisitionBeamAngleAlongship = transducerAcquisitionBeamAngleAlongship;
+ }
+
+ public float getTransducerAcquisitionPsi() {
+ return transducerAcquisitionPsi;
+ }
+
+ public void setTransducerAcquisitionPsi(float transducerAcquisitionPsi) {
+ this.transducerAcquisitionPsi = transducerAcquisitionPsi;
+ }
+
+ public float getEiThreshold() {
+ return eiThreshold;
+ }
+
+ public void setEiThreshold(float eiThreshold) {
+ this.eiThreshold = eiThreshold;
+ }
+
+ public String getEsduCellDataTime() {
+ return esduCellDataTime;
+ }
+
+ public void setEsduCellDataTime(String esduCellDataTime) {
+ this.esduCellDataTime = esduCellDataTime;
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/AcousticDataImportModelRow.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/CsvModelUtil.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/CsvModelUtil.java 2012-01-26 10:52:23 UTC (rev 292)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/CsvModelUtil.java 2012-01-26 10:54:27 UTC (rev 293)
@@ -39,10 +39,14 @@
import org.nuiton.util.csv.ImportExportModel;
import org.nuiton.util.csv.ImportModel;
import org.nuiton.util.csv.ImportableColumn;
+import org.nuiton.util.csv.ImportableExportableColumn;
import org.nuiton.util.csv.ModelBuilder;
import org.nuiton.util.csv.ValueFormatter;
+import org.nuiton.util.csv.ValueGetter;
+import org.nuiton.util.csv.ValueGetterSetter;
import org.nuiton.util.csv.ValueParser;
import org.nuiton.util.csv.ValueParserFormatter;
+import org.nuiton.util.csv.ValueSetter;
import java.sql.Timestamp;
import java.text.ParseException;
@@ -116,6 +120,8 @@
public static final ValueParser<Date> IMPORT_DAY_TIME2 = new DateValue("dd-MM-yy HH:mm:ss");
+ public static final ValueParser<Date> IMPORT_DAY_TIME3 = new DateValue("dd-MM-yy HH:mm aa");
+
public static final ValueParser<Boolean> INT_TO_BOOLEAN_PARSER = new ValueParser<Boolean>() {
@Override
@@ -323,6 +329,34 @@
public final Iterable<ImportableColumn<E, Object>> getColumnsForImport() {
return (Iterable) modelBuilder.getColumnsForImport();
}
+
+ public <T> ImportableColumn<E, T> newIgnoredColumn(String headerName) {
+ return modelBuilder.newIgnoredColumn(headerName);
+ }
+
+ public ImportableColumn<E, String> newMandatoryColumn(String headerName) {
+ return modelBuilder.newMandatoryColumn(headerName, headerName);
+ }
+
+ public ImportableColumn<E, String> newMandatoryColumn(String headerName, String propertyName) {
+ return modelBuilder.newMandatoryColumn(headerName, propertyName);
+ }
+
+ public <T> ImportableColumn<E, T> newMandatoryColumn(String headerName, ValueParser<T> valueParser) {
+ return modelBuilder.newMandatoryColumn(headerName, headerName, valueParser);
+ }
+
+ public <T> ImportableColumn<E, T> newMandatoryColumn(String headerName, String propertyName, ValueParser<T> valueParser) {
+ return modelBuilder.newMandatoryColumn(headerName, propertyName, valueParser);
+ }
+
+ public ImportableColumn<E, String> newMandatoryColumn(String headerName, ValueSetter<E, String> eStringValueSetter) {
+ return modelBuilder.newMandatoryColumn(headerName, eStringValueSetter);
+ }
+
+ public <T> ImportableColumn<E, T> newMandatoryColumn(String headerName, ValueParser<T> valueParser, ValueSetter<E, T> etValueSetter) {
+ return modelBuilder.newMandatoryColumn(headerName, valueParser, etValueSetter);
+ }
}
public static abstract class AbstractImportExportModel<E> implements ImportExportModel<E> {
@@ -354,6 +388,82 @@
public final Iterable<ImportableColumn<E, Object>> getColumnsForImport() {
return (Iterable) modelBuilder.getColumnsForImport();
}
+
+ public <T> ImportableColumn<E, T> newIgnoredColumn(String headerName) {
+ return modelBuilder.newIgnoredColumn(headerName);
+ }
+
+ public ImportableColumn<E, String> newMandatoryColumn(String headerName) {
+ return modelBuilder.newMandatoryColumn(headerName, headerName);
+ }
+
+ public ImportableColumn<E, String> newMandatoryColumn(String headerName, String propertyName) {
+ return modelBuilder.newMandatoryColumn(headerName, propertyName);
+ }
+
+ public <T> ImportableColumn<E, T> newMandatoryColumn(String headerName, ValueParser<T> valueParser) {
+ return modelBuilder.newMandatoryColumn(headerName, headerName, valueParser);
+ }
+
+ public <T> ImportableColumn<E, T> newMandatoryColumn(String headerName, String propertyName, ValueParser<T> valueParser) {
+ return modelBuilder.newMandatoryColumn(headerName, propertyName, valueParser);
+ }
+
+ public ImportableColumn<E, String> newMandatoryColumn(String headerName, ValueSetter<E, String> eStringValueSetter) {
+ return modelBuilder.newMandatoryColumn(headerName, eStringValueSetter);
+ }
+
+ public <T> ImportableColumn<E, T> newMandatoryColumn(String headerName, ValueParser<T> valueParser, ValueSetter<E, T> etValueSetter) {
+ return modelBuilder.newMandatoryColumn(headerName, valueParser, etValueSetter);
+ }
+
+ public ExportableColumn<E, String> newColumnForExport(String headerName) {
+ return modelBuilder.newColumnForExport(headerName, headerName);
+ }
+
+ public ExportableColumn<E, String> newColumnForExport(String headerName, String propertyName) {
+ return modelBuilder.newColumnForExport(headerName, propertyName);
+ }
+
+ public ExportableColumn<E, String> newColumnForExport(String headerName, ValueGetter<E, String> eStringValueGetter) {
+ return modelBuilder.newColumnForExport(headerName, eStringValueGetter);
+ }
+
+ public <T> ExportableColumn<E, T> newColumnForExport(String headerName, ValueFormatter<T> valueFormatter) {
+ return modelBuilder.newColumnForExport(headerName, headerName, valueFormatter);
+ }
+
+ public <T> ExportableColumn<E, T> newColumnForExport(String headerName, String propertyName, ValueFormatter<T> valueFormatter) {
+ return modelBuilder.newColumnForExport(headerName, propertyName, valueFormatter);
+ }
+
+ public <T> ExportableColumn<E, T> newColumnForExport(String headerName, ValueGetter<E, T> etValueGetter, ValueFormatter<T> valueFormatter) {
+ return modelBuilder.newColumnForExport(headerName, etValueGetter, valueFormatter);
+ }
+
+ public ImportableExportableColumn<E, String> newColumnForImportExport(String headerName) {
+ return modelBuilder.newColumnForImportExport(headerName, headerName);
+ }
+
+ public ImportableExportableColumn<E, String> newColumnForImportExport(String headerName, String propertyName) {
+ return modelBuilder.newColumnForImportExport(headerName, propertyName);
+ }
+
+ public ImportableExportableColumn<E, String> newColumnForImportExport(String headerName, ValueGetterSetter<E, String> eStringValueGetterSetter) {
+ return modelBuilder.newColumnForImportExport(headerName, eStringValueGetterSetter);
+ }
+
+ public <T> ImportableExportableColumn<E, T> newColumnForImportExport(String headerName, ValueParserFormatter<T> valueParserFormatter) {
+ return modelBuilder.newColumnForImportExport(headerName, headerName, valueParserFormatter);
+ }
+
+ public <T> ImportableExportableColumn<E, T> newColumnForImportExport(String headerName, String propertyName, ValueParserFormatter<T> valueParserFormatter) {
+ return modelBuilder.newColumnForImportExport(headerName, propertyName, valueParserFormatter);
+ }
+
+ public <T> ImportableExportableColumn<E, T> newColumnForImportExport(String headerName, ValueGetterSetter<E, T> etValueGetterSetter, ValueParserFormatter<T> valueParserFormatter) {
+ return modelBuilder.newColumnForImportExport(headerName, etValueGetterSetter, valueParserFormatter);
+ }
}
public static abstract class AbstractExportModel<E> implements ExportModel<E> {
@@ -377,5 +487,28 @@
return (Iterable) modelBuilder.getColumnsForExport();
}
+ public ExportableColumn<E, String> newColumnForExport(String headerName) {
+ return modelBuilder.newColumnForExport(headerName, headerName);
+ }
+
+ public ExportableColumn<E, String> newColumnForExport(String headerName, String propertyName) {
+ return modelBuilder.newColumnForExport(headerName, propertyName);
+ }
+
+ public ExportableColumn<E, String> newColumnForExport(String headerName, ValueGetter<E, String> eStringValueGetter) {
+ return modelBuilder.newColumnForExport(headerName, eStringValueGetter);
+ }
+
+ public <T> ExportableColumn<E, T> newColumnForExport(String headerName, ValueFormatter<T> valueFormatter) {
+ return modelBuilder.newColumnForExport(headerName, headerName, valueFormatter);
+ }
+
+ public <T> ExportableColumn<E, T> newColumnForExport(String headerName, String propertyName, ValueFormatter<T> valueFormatter) {
+ return modelBuilder.newColumnForExport(headerName, propertyName, valueFormatter);
+ }
+
+ public <T> ExportableColumn<E, T> newColumnForExport(String headerName, ValueGetter<E, T> etValueGetter, ValueFormatter<T> valueFormatter) {
+ return modelBuilder.newColumnForExport(headerName, etValueGetter, valueFormatter);
+ }
}
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EntityAssociationExportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EntityAssociationExportModel.java 2012-01-26 10:52:23 UTC (rev 292)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EntityAssociationExportModel.java 2012-01-26 10:54:27 UTC (rev 293)
@@ -45,14 +45,12 @@
meta);
// topiaId <-> topiaId
- model.modelBuilder.newColumnForExport(
- TopiaEntity.TOPIA_ID,
+ model.newColumnForExport(
TopiaEntity.TOPIA_ID
);
- model.modelBuilder.newColumnForExport(
+ model.newColumnForExport(
meta.getName(),
- meta.getName(),
CsvModelUtil.newAssociationValueFormatter()
);
return model;
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EntityAssociationImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EntityAssociationImportModel.java 2012-01-26 10:52:23 UTC (rev 292)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EntityAssociationImportModel.java 2012-01-26 10:54:27 UTC (rev 293)
@@ -46,13 +46,13 @@
separator, meta);
// topiaId <-> topiaId
- model.modelBuilder.newMandatoryColumn(
+ model.newMandatoryColumn(
TopiaEntity.TOPIA_ID,
CsvModelUtil.<Map<String, Object>, String>newMapProperty(TopiaEntity.TOPIA_ID)
);
// add association -> target
- model.modelBuilder.newMandatoryColumn(
+ model.newMandatoryColumn(
meta.getName(),
CsvModelUtil.ASSOCIATION_VALUE_PARSER,
CsvModelUtil.<Map<String, Object>, String[]>newMapProperty("target")
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EntityCsvModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EntityCsvModel.java 2012-01-26 10:52:23 UTC (rev 292)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/EntityCsvModel.java 2012-01-26 10:54:27 UTC (rev 293)
@@ -26,8 +26,6 @@
import com.google.common.base.Function;
import fr.ifremer.echobase.entities.meta.TableMeta;
import org.nuiton.topia.persistence.TopiaEntity;
-import org.nuiton.util.csv.ImportableColumn;
-import org.nuiton.util.csv.ValueParser;
import java.util.Collection;
import java.util.Date;
@@ -57,10 +55,6 @@
return new EntityCsvModel<E>(separator, tableMeta, idHeader);
}
- public <T> ImportableColumn<E, T> newIgnoredColumn(String headerName) {
- return modelBuilder.newIgnoredColumn(headerName);
- }
-
@Override
public E newEmptyInstance() {
return (E) tableMeta.newEntity();
@@ -69,9 +63,8 @@
public void addForeignKeyForExport(String propertyName,
Class<TopiaEntity> entityType) {
- modelBuilder.newColumnForExport(
+ newColumnForExport(
propertyName,
- propertyName,
CsvModelUtil.newForeignKeyValue(entityType)
);
}
@@ -82,7 +75,7 @@
Collection<E> universe,
Function<E, String> transform) {
- modelBuilder.newMandatoryColumn(
+ newMandatoryColumn(
headerName,
propertyName,
CsvModelUtil.newForeignKeyValue(entityType, universe, transform)
@@ -95,7 +88,7 @@
Collection<E> universe,
Function<E, String> transform) {
- modelBuilder.newMandatoryColumn(
+ newMandatoryColumn(
headerName,
propertyName,
CsvModelUtil.newForeignKeyValueAssociation(entityType, universe, transform)
@@ -106,9 +99,8 @@
Class<E> entityType,
Collection<E> universe) {
- modelBuilder.newMandatoryColumn(
+ newMandatoryColumn(
propertyName,
- propertyName,
CsvModelUtil.newForeignKeyValue(entityType, universe)
);
}
@@ -116,7 +108,7 @@
public void addNewColumnForExport(String headerName,
String propertyName,
CsvModelUtil.ForeignKeyDecoratedValue<TopiaEntity> topiaEntityForeignKeyDecoratedValue) {
- modelBuilder.newColumnForExport(
+ newColumnForExport(
headerName,
propertyName,
topiaEntityForeignKeyDecoratedValue
@@ -133,67 +125,67 @@
Class<?> type) {
if (Date.class.equals(type)) {
- modelBuilder.newColumnForImportExport(
+ newColumnForImportExport(
headerName,
propertyName,
CsvModelUtil.DAY_TIME_SECOND_WITH_TIMESTAMP
);
} else if (double.class.equals(type)) {
- modelBuilder.newColumnForImportExport(
+ newColumnForImportExport(
headerName,
propertyName,
CsvModelUtil.DOUBLE_PRIMITIVE
);
} else if (Double.class.equals(type)) {
- modelBuilder.newColumnForImportExport(
+ newColumnForImportExport(
headerName,
propertyName,
CsvModelUtil.DOUBLE
);
} else if (long.class.equals(type)) {
- modelBuilder.newColumnForImportExport(
+ newColumnForImportExport(
headerName,
propertyName,
CsvModelUtil.PRIMITIVE_LONG
);
} else if (Long.class.equals(type)) {
- modelBuilder.newColumnForImportExport(
+ newColumnForImportExport(
headerName,
propertyName,
CsvModelUtil.LONG
);
} else if (float.class.equals(type)) {
- modelBuilder.newColumnForImportExport(
+ newColumnForImportExport(
headerName,
propertyName,
CsvModelUtil.PRIMITIVE_FLOAT
);
} else if (Float.class.equals(type)) {
- modelBuilder.newColumnForImportExport(
+ newColumnForImportExport(
headerName,
propertyName,
CsvModelUtil.FLOAT
);
} else if (int.class.equals(type)) {
- modelBuilder.newColumnForImportExport(
+ newColumnForImportExport(
headerName,
propertyName,
CsvModelUtil.PRIMITIVE_INTEGER
);
} else if (Integer.class.equals(type)) {
- modelBuilder.newColumnForImportExport(
+ newColumnForImportExport(
headerName,
propertyName,
CsvModelUtil.INTEGER
);
} else if (boolean.class.equals(type)) {
- modelBuilder.newColumnForImportExport(
+ newColumnForImportExport(
headerName,
propertyName,
CsvModelUtil.PRIMITIVE_BOOLEAN
);
} else if (Boolean.class.equals(type)) {
- modelBuilder.newColumnForImportExport(
+ newColumnForImportExport(
headerName,
propertyName,
CsvModelUtil.BOOLEAN
@@ -201,26 +193,26 @@
} else {
// string
- modelBuilder.newColumnForImportExport(
+ newColumnForImportExport(
headerName,
propertyName
);
}
}
- public ImportableColumn<E, String> newMandatoryColumn(String headerName,
- String propertyName) {
- return modelBuilder.newMandatoryColumn(headerName, propertyName);
- }
+// public ImportableColumn<E, String> newMandatoryColumn(String headerName,
+// String propertyName) {
+// return modelBuilder.newMandatoryColumn(headerName, propertyName);
+// }
+//
+// public ImportableColumn<E, String> newMandatoryColumn(String headerName) {
+// return modelBuilder.newMandatoryColumn(headerName, headerName);
+// }
+//
+// public <T> ImportableColumn<E, T> newMandatoryColumn(String headerName, String propertyName, ValueParser<T> valueParser) {
+// return modelBuilder.newMandatoryColumn(headerName, valueParser, CsvModelUtil.<E, T>newBeanProperty(propertyName));
+// }
- public ImportableColumn<E, String> newMandatoryColumn(String headerName) {
- return modelBuilder.newMandatoryColumn(headerName, headerName);
- }
-
- public <T> ImportableColumn<E, T> newMandatoryColumn(String headerName, String propertyName, ValueParser<T> valueParser) {
- return modelBuilder.newMandatoryColumn(headerName, valueParser, CsvModelUtil.<E, T>newBeanProperty(propertyName));
- }
-
protected EntityCsvModel(char separator,
TableMeta tableMeta) {
super(separator);
@@ -231,7 +223,7 @@
TableMeta tableMeta,
String idHeader) {
this(separator, tableMeta);
- modelBuilder.newColumnForImportExport(
+ newColumnForImportExport(
idHeader,
TopiaEntity.TOPIA_ID
);
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/ExportQueryCsvModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/ExportQueryCsvModel.java 2012-01-26 10:52:23 UTC (rev 292)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/ExportQueryCsvModel.java 2012-01-26 10:54:27 UTC (rev 293)
@@ -39,9 +39,8 @@
public ExportQueryCsvModel(char separator, String[] columnHeaders) {
super(separator);
for (String columnHeader : columnHeaders) {
- modelBuilder.newColumnForExport(
+ newColumnForExport(
columnHeader,
- columnHeader,
CsvModelUtil.TO_STRING_FORMATTER
);
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransectImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransectImportModel.java 2012-01-26 10:52:23 UTC (rev 292)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransectImportModel.java 2012-01-26 10:54:27 UTC (rev 293)
@@ -23,7 +23,6 @@
*/
package fr.ifremer.echobase.services.csv;
-import fr.ifremer.echobase.entities.data.Transect;
import fr.ifremer.echobase.entities.data.Voyage;
import java.util.Map;
@@ -34,38 +33,36 @@
* @author tchemit <chemit(a)codelutin.com>
* @since 0.3
*/
-public class TransectImportModel extends CsvModelUtil.AbstractImportModel<Map<String, Object>> {
+public class TransectImportModel extends CsvModelUtil.AbstractImportModel<TransectImportModelRow> {
- public static final String TRANSECT_VoyageId = "voyageName";
-
protected final Map<String, Voyage> voyageMap;
public TransectImportModel(char separator,
Map<String, Voyage> voyageMap) {
super(separator);
this.voyageMap = voyageMap;
- modelBuilder.newMandatoryColumn(Transect.PROPERTY_TITLE, Transect.PROPERTY_TITLE);
- modelBuilder.newMandatoryColumn(Transect.PROPERTY_TRANSECT_ABSTRACT, Transect.PROPERTY_TRANSECT_ABSTRACT);
- modelBuilder.newMandatoryColumn(Transect.PROPERTY_STRATUM, Transect.PROPERTY_STRATUM);
- modelBuilder.newMandatoryColumn(Transect.PROPERTY_COMMENT, Transect.PROPERTY_COMMENT);
- modelBuilder.newMandatoryColumn(TRANSECT_VoyageId, TRANSECT_VoyageId, CsvModelUtil.newForeignKeyValue(Voyage.class, voyageMap));
+ newMandatoryColumn(TransectImportModelRow.PROPERTY_TITLE);
+ newMandatoryColumn(TransectImportModelRow.PROPERTY_TRANSECT_ABSTRACT);
+ newMandatoryColumn(TransectImportModelRow.PROPERTY_STRATUM);
+ newMandatoryColumn(TransectImportModelRow.PROPERTY_COMMENT);
+ newMandatoryColumn("voyageName", TransectImportModelRow.PROPERTY_VOYAGE, CsvModelUtil.newForeignKeyValue(Voyage.class, voyageMap));
- modelBuilder.newMandatoryColumn(Transect.PROPERTY_DATE_CREATED, Transect.PROPERTY_DATE_CREATED, CsvModelUtil.IMPORT_DAY_TIME2);
- modelBuilder.newMandatoryColumn(Transect.PROPERTY_TIME_COVERAGE_START, Transect.PROPERTY_TIME_COVERAGE_START, CsvModelUtil.IMPORT_DAY_TIME2);
- modelBuilder.newMandatoryColumn(Transect.PROPERTY_TIME_COVERAGE_END, Transect.PROPERTY_TIME_COVERAGE_END, CsvModelUtil.IMPORT_DAY_TIME2);
+ newMandatoryColumn(TransectImportModelRow.PROPERTY_DATE_CREATED, CsvModelUtil.IMPORT_DAY_TIME2);
+ newMandatoryColumn(TransectImportModelRow.PROPERTY_TIME_COVERAGE_START, CsvModelUtil.IMPORT_DAY_TIME2);
+ newMandatoryColumn(TransectImportModelRow.PROPERTY_TIME_COVERAGE_END, CsvModelUtil.IMPORT_DAY_TIME2);
- modelBuilder.newMandatoryColumn(Transect.PROPERTY_GEOSPATIAL_LON_MIN, Transect.PROPERTY_GEOSPATIAL_LON_MIN, CsvModelUtil.PRIMITIVE_FLOAT);
- modelBuilder.newMandatoryColumn(Transect.PROPERTY_GEOSPATIAL_LAT_MIN, Transect.PROPERTY_GEOSPATIAL_LAT_MIN, CsvModelUtil.PRIMITIVE_FLOAT);
- modelBuilder.newMandatoryColumn(Transect.PROPERTY_GEOSPATIAL_VERTICAL_MIN, Transect.PROPERTY_GEOSPATIAL_VERTICAL_MIN, CsvModelUtil.PRIMITIVE_FLOAT);
- modelBuilder.newMandatoryColumn(Transect.PROPERTY_GEOSPATIAL_LON_MAX, Transect.PROPERTY_GEOSPATIAL_LON_MAX, CsvModelUtil.PRIMITIVE_FLOAT);
- modelBuilder.newMandatoryColumn(Transect.PROPERTY_GEOSPATIAL_LAT_MAX, Transect.PROPERTY_GEOSPATIAL_LAT_MAX, CsvModelUtil.PRIMITIVE_FLOAT);
- modelBuilder.newMandatoryColumn(Transect.PROPERTY_GEOSPATIAL_VERTICAL_MAX, Transect.PROPERTY_GEOSPATIAL_VERTICAL_MAX, CsvModelUtil.PRIMITIVE_FLOAT);
- modelBuilder.newMandatoryColumn(Transect.PROPERTY_LINESTRING, Transect.PROPERTY_LINESTRING);
+ newMandatoryColumn(TransectImportModelRow.PROPERTY_GEOSPATIAL_LON_MIN, CsvModelUtil.PRIMITIVE_FLOAT);
+ newMandatoryColumn(TransectImportModelRow.PROPERTY_GEOSPATIAL_LAT_MIN, CsvModelUtil.PRIMITIVE_FLOAT);
+ newMandatoryColumn(TransectImportModelRow.PROPERTY_GEOSPATIAL_VERTICAL_MIN, CsvModelUtil.PRIMITIVE_FLOAT);
+ newMandatoryColumn(TransectImportModelRow.PROPERTY_GEOSPATIAL_LON_MAX, CsvModelUtil.PRIMITIVE_FLOAT);
+ newMandatoryColumn(TransectImportModelRow.PROPERTY_GEOSPATIAL_LAT_MAX, CsvModelUtil.PRIMITIVE_FLOAT);
+ newMandatoryColumn(TransectImportModelRow.PROPERTY_GEOSPATIAL_VERTICAL_MAX, CsvModelUtil.PRIMITIVE_FLOAT);
+ newMandatoryColumn(TransectImportModelRow.PROPERTY_LINESTRING);
}
@Override
- public Map<String, Object> newEmptyInstance() {
- return null;
+ public TransectImportModelRow newEmptyInstance() {
+ return new TransectImportModelRow();
}
}
Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransectImportModelRow.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransectImportModelRow.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransectImportModelRow.java 2012-01-26 10:54:27 UTC (rev 293)
@@ -0,0 +1,220 @@
+/*
+ * #%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 java.io.Serializable;
+import java.util.Date;
+
+/**
+ * Bean used as a row for import of {@link TransectImportModel}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class TransectImportModelRow implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ public static final String PROPERTY_VOYAGE = "voyage";
+
+ public static final String PROPERTY_TITLE = "title";
+
+ public static final String PROPERTY_TRANSECT_ABSTRACT = "transectAbstract";
+
+ public static final String PROPERTY_COMMENT = "comment";
+
+ public static final String PROPERTY_DATE_CREATED = "dateCreated";
+
+ public static final String PROPERTY_GEOSPATIAL_LON_MIN = "geospatialLonMin";
+
+ public static final String PROPERTY_GEOSPATIAL_LON_MAX = "geospatialLonMax";
+
+ public static final String PROPERTY_GEOSPATIAL_LAT_MIN = "geospatialLatMin";
+
+ public static final String PROPERTY_GEOSPATIAL_LAT_MAX = "geospatialLatMax";
+
+ public static final String PROPERTY_LINESTRING = "linestring";
+
+ public static final String PROPERTY_GEOSPATIAL_VERTICAL_MIN = "geospatialVerticalMin";
+
+ public static final String PROPERTY_GEOSPATIAL_VERTICAL_MAX = "geospatialVerticalMax";
+
+ public static final String PROPERTY_TIME_COVERAGE_START = "timeCoverageStart";
+
+ public static final String PROPERTY_TIME_COVERAGE_END = "timeCoverageEnd";
+
+ public static final String PROPERTY_STRATUM = "stratum";
+
+ protected String title;
+
+ protected String transectAbstract;
+
+ protected String stratum;
+
+ protected String comment;
+
+ protected String linestring;
+
+ protected Voyage voyage;
+
+ protected Date dateCreated;
+
+ protected Date timeCoverageStart;
+
+ protected Date timeCoverageEnd;
+
+ protected float geospatialLonMin;
+
+ protected float geospatialLonMax;
+
+ protected float geospatialLatMin;
+
+ protected float geospatialLatMax;
+
+ protected float geospatialVerticalMin;
+
+ protected float geospatialVerticalMax;
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public String getTransectAbstract() {
+ return transectAbstract;
+ }
+
+ public void setTransectAbstract(String transectAbstract) {
+ this.transectAbstract = transectAbstract;
+ }
+
+ public String getStratum() {
+ return stratum;
+ }
+
+ public void setStratum(String stratum) {
+ this.stratum = stratum;
+ }
+
+ public String getComment() {
+ return comment;
+ }
+
+ public void setComment(String comment) {
+ this.comment = comment;
+ }
+
+ public String getLinestring() {
+ return linestring;
+ }
+
+ public void setLinestring(String linestring) {
+ this.linestring = linestring;
+ }
+
+ public Voyage getVoyage() {
+ return voyage;
+ }
+
+ public void setVoyage(Voyage voyage) {
+ this.voyage = voyage;
+ }
+
+ public Date getDateCreated() {
+ return dateCreated;
+ }
+
+ public void setDateCreated(Date dateCreated) {
+ this.dateCreated = dateCreated;
+ }
+
+ public Date getTimeCoverageStart() {
+ return timeCoverageStart;
+ }
+
+ public void setTimeCoverageStart(Date timeCoverageStart) {
+ this.timeCoverageStart = timeCoverageStart;
+ }
+
+ public Date getTimeCoverageEnd() {
+ return timeCoverageEnd;
+ }
+
+ public void setTimeCoverageEnd(Date timeCoverageEnd) {
+ this.timeCoverageEnd = timeCoverageEnd;
+ }
+
+ public float getGeospatialLonMin() {
+ return geospatialLonMin;
+ }
+
+ public void setGeospatialLonMin(float geospatialLonMin) {
+ this.geospatialLonMin = geospatialLonMin;
+ }
+
+ public float getGeospatialLonMax() {
+ return geospatialLonMax;
+ }
+
+ public void setGeospatialLonMax(float geospatialLonMax) {
+ this.geospatialLonMax = geospatialLonMax;
+ }
+
+ public float getGeospatialLatMin() {
+ return geospatialLatMin;
+ }
+
+ public void setGeospatialLatMin(float geospatialLatMin) {
+ this.geospatialLatMin = geospatialLatMin;
+ }
+
+ public float getGeospatialLatMax() {
+ return geospatialLatMax;
+ }
+
+ public void setGeospatialLatMax(float geospatialLatMax) {
+ this.geospatialLatMax = geospatialLatMax;
+ }
+
+ public float getGeospatialVerticalMin() {
+ return geospatialVerticalMin;
+ }
+
+ public void setGeospatialVerticalMin(float geospatialVerticalMin) {
+ this.geospatialVerticalMin = geospatialVerticalMin;
+ }
+
+ public float getGeospatialVerticalMax() {
+ return geospatialVerticalMax;
+ }
+
+ public void setGeospatialVerticalMax(float geospatialVerticalMax) {
+ this.geospatialVerticalMax = geospatialVerticalMax;
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransectImportModelRow.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/TransitImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransitImportModel.java 2012-01-26 10:52:23 UTC (rev 292)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransitImportModel.java 2012-01-26 10:54:27 UTC (rev 293)
@@ -23,7 +23,6 @@
*/
package fr.ifremer.echobase.services.csv;
-import fr.ifremer.echobase.entities.data.Transit;
import fr.ifremer.echobase.entities.data.Voyage;
import java.util.Map;
@@ -34,7 +33,7 @@
* @author tchemit <chemit(a)codelutin.com>
* @since 0.3
*/
-public class TransitImportModel extends CsvModelUtil.AbstractImportModel<Map<String, Object>> {
+public class TransitImportModel extends CsvModelUtil.AbstractImportModel<TransitImportModelRow> {
public static final String TRANSIT_VoyageId = "voyageName";
@@ -44,16 +43,16 @@
Map<String, Voyage> voyageMap) {
super(separator);
this.voyageMap = voyageMap;
- modelBuilder.newMandatoryColumn(TRANSIT_VoyageId, TRANSIT_VoyageId, CsvModelUtil.newForeignKeyValue(Voyage.class, voyageMap));
- modelBuilder.newMandatoryColumn(Transit.PROPERTY_DESCRIPTION, Transit.PROPERTY_DESCRIPTION);
- modelBuilder.newMandatoryColumn(Transit.PROPERTY_START_TIME, Transit.PROPERTY_START_TIME, CsvModelUtil.DAY_TIME);
- modelBuilder.newMandatoryColumn(Transit.PROPERTY_END_TIME, Transit.PROPERTY_END_TIME, CsvModelUtil.DAY_TIME);
- modelBuilder.newMandatoryColumn(Transit.PROPERTY_START_LOCALITY, Transit.PROPERTY_START_LOCALITY);
- modelBuilder.newMandatoryColumn(Transit.PROPERTY_END_LOCALITY, Transit.PROPERTY_END_LOCALITY);
+ newMandatoryColumn("voyageName", TransitImportModelRow.PROPERTY_VOYAGE, CsvModelUtil.newForeignKeyValue(Voyage.class, voyageMap));
+ newMandatoryColumn(TransitImportModelRow.PROPERTY_DESCRIPTION);
+ newMandatoryColumn(TransitImportModelRow.PROPERTY_START_TIME, CsvModelUtil.DAY_TIME);
+ newMandatoryColumn(TransitImportModelRow.PROPERTY_END_TIME, CsvModelUtil.DAY_TIME);
+ newMandatoryColumn(TransitImportModelRow.PROPERTY_START_LOCALITY);
+ newMandatoryColumn(TransitImportModelRow.PROPERTY_END_LOCALITY);
}
@Override
- public Map<String, Object> newEmptyInstance() {
- return null;
+ public TransitImportModelRow newEmptyInstance() {
+ return new TransitImportModelRow();
}
}
Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransitImportModelRow.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransitImportModelRow.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransitImportModelRow.java 2012-01-26 10:54:27 UTC (rev 293)
@@ -0,0 +1,120 @@
+/*
+ * #%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.Transit;
+import fr.ifremer.echobase.entities.data.Voyage;
+
+import java.util.Date;
+
+/**
+* Bean used as a row for import of {@link TransitImportModel}.
+*
+* @author tchemit <chemit(a)codelutin.com>
+* @since 0.3
+*/
+public class TransitImportModelRow {
+
+ public static final String PROPERTY_VOYAGE = "voyage";
+
+ public static final String PROPERTY_DESCRIPTION = Transit.PROPERTY_DESCRIPTION;
+
+ public static final String PROPERTY_START_TIME = Transit.PROPERTY_START_TIME;
+
+ public static final String PROPERTY_END_TIME = Transit.PROPERTY_END_TIME;
+
+ public static final String PROPERTY_START_LOCALITY = Transit.PROPERTY_START_LOCALITY;
+
+ public static final String PROPERTY_END_LOCALITY = Transit.PROPERTY_END_LOCALITY;
+
+ protected Voyage voyage;
+
+ protected String description;
+
+ protected String relatedActivity;
+
+ protected Date startTime;
+
+ protected Date endTime;
+
+ protected String startLocality;
+
+ protected String endLocality;
+
+ public Voyage getVoyage() {
+ return voyage;
+ }
+
+ public void setVoyage(Voyage voyage) {
+ this.voyage = voyage;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getRelatedActivity() {
+ return relatedActivity;
+ }
+
+ public void setRelatedActivity(String relatedActivity) {
+ this.relatedActivity = relatedActivity;
+ }
+
+ public Date getStartTime() {
+ return startTime;
+ }
+
+ public void setStartTime(Date startTime) {
+ this.startTime = startTime;
+ }
+
+ public Date getEndTime() {
+ return endTime;
+ }
+
+ public void setEndTime(Date endTime) {
+ this.endTime = endTime;
+ }
+
+ public String getStartLocality() {
+ return startLocality;
+ }
+
+ public void setStartLocality(String startLocality) {
+ this.startLocality = startLocality;
+ }
+
+ public String getEndLocality() {
+ return endLocality;
+ }
+
+ public void setEndLocality(String endLocality) {
+ this.endLocality = endLocality;
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransitImportModelRow.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/VoyageImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/VoyageImportModel.java 2012-01-26 10:52:23 UTC (rev 292)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/VoyageImportModel.java 2012-01-26 10:54:27 UTC (rev 293)
@@ -36,11 +36,11 @@
public VoyageImportModel(char separator) {
super(separator);
- modelBuilder.newMandatoryColumn(Voyage.PROPERTY_NAME, Voyage.PROPERTY_NAME);
- modelBuilder.newMandatoryColumn(Voyage.PROPERTY_START_DATE, Voyage.PROPERTY_START_DATE, CsvModelUtil.DAY);
- modelBuilder.newMandatoryColumn(Voyage.PROPERTY_END_DATE, Voyage.PROPERTY_END_DATE, CsvModelUtil.DAY);
- modelBuilder.newMandatoryColumn(Voyage.PROPERTY_START_PORT, Voyage.PROPERTY_START_PORT);
- modelBuilder.newMandatoryColumn(Voyage.PROPERTY_END_PORT, Voyage.PROPERTY_END_PORT);
+ newMandatoryColumn(Voyage.PROPERTY_NAME);
+ newMandatoryColumn(Voyage.PROPERTY_START_DATE, CsvModelUtil.DAY);
+ newMandatoryColumn(Voyage.PROPERTY_END_DATE, CsvModelUtil.DAY);
+ newMandatoryColumn(Voyage.PROPERTY_START_PORT);
+ newMandatoryColumn(Voyage.PROPERTY_END_PORT);
}
@Override
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-26 10:52:23 UTC (rev 292)
+++ trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties 2012-01-26 10:54:27 UTC (rev 293)
@@ -21,7 +21,11 @@
echobase.action.return=Retour
echobase.action.save=Sauvegarder
echobase.action.saveSqlQuery=Enregistrer la requête
+echobase.common.acousticDensityUnit=acousticDensityUnit
+echobase.common.acquisitionSoftwareVersionER60=acquisitionSoftwareVersion (ER60 instrument)
+echobase.common.acquisitionSoftwareVersionME70=acquisitionSoftwareVersion (ME70 instrument)
echobase.common.admin=Administrateur
+echobase.common.digitThreshold=digitThreshold
echobase.common.echosounderSoundSpeed=echosounderSoundSpeed
echobase.common.email=Email
echobase.common.entityType=Type d'entité
@@ -34,10 +38,15 @@
echobase.common.jdbcLogin=Login de connexion
echobase.common.jdbcPassword=Mot de passe
echobase.common.jdbcUrl=Url de connexion
+echobase.common.loggedDataDatatype=loggedDataDatatype
+echobase.common.loggedDataFormat=loggedDataFormat
echobase.common.notes=notes
echobase.common.password=Mot de passe
echobase.common.pingDutyCycle=pingDutyCycle
echobase.common.soundSpeedCalculations=soundSpeedCalculations
+echobase.common.soundSpeedCalculationsER60=soundSpeedCalculations (ER60 instrument)
+echobase.common.soundSpeedCalculationsME70=soundSpeedCalculations (ME70 instrument)
+echobase.common.sounderConstant=sounderConstant
echobase.common.transectBinUnitsPingAxis=BinUnitsPingAxis (transect)
echobase.common.transectGeospatialVerticalPositive=GeospatialVerticalPositive (transect)
echobase.common.transectLicence=Licence (transect)
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-26 10:52:23 UTC (rev 292)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticData.jsp 2012-01-26 10:54:27 UTC (rev 293)
@@ -45,19 +45,56 @@
label='%{getText("echobase.common.voyage")}'
list="voyages" headerKey="" headerValue=""/>
+ <s:select name="model.transitId" value="''" required="true"
+ label='%{getText("echobase.common.transit")}'
+ list="transits" headerKey="" headerValue=""/>
+
<s:select name="model.vesselId" value="''" required="true"
label='%{getText("echobase.common.vessel")}'
list="vessels" headerKey="" headerValue=""/>
- <s:textfield key="model.echosounderSoundSpeed" size="40" required="true"
- label='%{getText("echobase.common.echosounderSoundSpeed")}'/>
+ <s:textfield key="model.transceiverAcquisitionAbsorptionDescription" size="40" required="true"
+ label='%{getText("echobase.common.transceiverAcquisitionAbsorptionDescription")}'/>
- <s:textfield key="model.soundSpeedCalculations" size="40" required="true"
- label='%{getText("echobase.common.soundSpeedCalculations")}'/>
+ <s:textfield key="model.acquisitionSoftwareVersionER60" size="40" required="true"
+ label='%{getText("echobase.common.acquisitionSoftwareVersionER60")}'/>
+ <s:textfield key="model.acquisitionSoftwareVersionME70" size="40" required="true"
+ label='%{getText("echobase.common.acquisitionSoftwareVersionME70")}'/>
+
+ <s:textfield key="model.loggedDataFormat" size="40" required="true"
+ label='%{getText("echobase.common.loggedDataFormat")}'/>
+
+ <s:textfield key="model.loggedDataDatatype" size="40" required="true"
+ label='%{getText("echobase.common.loggedDataDatatype")}'/>
+
<s:textfield key="model.pingDutyCycle" size="40" required="true"
label='%{getText("echobase.common.pingDutyCycle")}'/>
+ <s:textfield key="model.echosounderSoundSpeed" size="40" required="true"
+ label='%{getText("echobase.common.echosounderSoundSpeed")}'/>
+
+ <s:textfield key="model.soundSpeedCalculationsER60" size="40" required="true"
+ label='%{getText("echobase.common.soundSpeedCalculationsER60")}'/>
+
+ <s:textfield key="model.soundSpeedCalculationsME70" size="40" required="true"
+ label='%{getText("echobase.common.soundSpeedCalculationsME70")}'/>
+
+ <s:textfield key="model.sounderConstant" size="40" required="true"
+ label='%{getText("echobase.common.sounderConstant")}'/>
+
+ <s:textfield key="model.processingTemplate" size="40" required="true"
+ label='%{getText("echobase.common.processingTemplate")}'/>
+
+ <s:textfield key="model.processingDescription" size="40" required="true"
+ label='%{getText("echobase.common.processingDescription")}'/>
+
+ <s:textfield key="model.digitThreshold" size="40" required="true"
+ label='%{getText("echobase.common.digitThreshold")}'/>
+
+ <s:textfield key="model.acousticDensityUnit" size="40" required="true"
+ label='%{getText("echobase.common.acousticDensityUnit")}'/>
+
<s:textfield key="model.notes" size="40" required="true"
label='%{getText("echobase.common.notes")}'/>
1
0
r292 - in trunk/echobase-entities/src/main: java/fr/ifremer/echobase/entities/data xmi
by tchemit@users.forge.codelutin.com 26 Jan '12
by tchemit@users.forge.codelutin.com 26 Jan '12
26 Jan '12
Author: tchemit
Date: 2012-01-26 11:52:23 +0100 (Thu, 26 Jan 2012)
New Revision: 292
Url: http://forge.codelutin.com/repositories/revision/echobase/292
Log:
add some usefull methods on Voyage and Transit
Added:
trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/data/TransitImpl.java
Modified:
trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/data/VoyageImpl.java
trunk/echobase-entities/src/main/xmi/echobase.zargo
Added: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/data/TransitImpl.java
===================================================================
--- trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/data/TransitImpl.java (rev 0)
+++ trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/data/TransitImpl.java 2012-01-26 10:52:23 UTC (rev 292)
@@ -0,0 +1,47 @@
+/*
+ * #%L
+ * EchoBase :: Entities
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.entities.data;
+
+import com.google.common.base.Preconditions;
+import fr.ifremer.echobase.entities.references.Vessel;
+
+public class TransitImpl extends TransitAbstract {
+
+ private static final long serialVersionUID = 3775200869632533299L;
+
+ @Override
+ public Transect getTransect(Vessel vessel) {
+ Preconditions.checkNotNull(vessel);
+ Transect result = null;
+ if (!isTransectEmpty()) {
+ for (Transect t : transect) {
+ if (vessel.equals(t.getVessel())) {
+ result = t;
+ break;
+ }
+ }
+ }
+ return result;
+ }
+} //TransitImpl
Property changes on: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/data/TransitImpl.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/data/VoyageImpl.java
===================================================================
--- trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/data/VoyageImpl.java 2012-01-25 10:53:18 UTC (rev 291)
+++ trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/data/VoyageImpl.java 2012-01-26 10:52:23 UTC (rev 292)
@@ -23,7 +23,7 @@
*/
package fr.ifremer.echobase.entities.data;
-import org.apache.commons.collections.CollectionUtils;
+import com.google.common.base.Preconditions;
import java.util.Date;
@@ -40,8 +40,10 @@
@Override
public Transit getTransit(Date startTime, Date endDate) {
+ Preconditions.checkNotNull(startTime);
+ Preconditions.checkNotNull(endDate);
Transit result = null;
- if (CollectionUtils.isNotEmpty(getTransit())) {
+ if (!isTransitEmpty()) {
for (Transit t : getTransit()) {
Date transitStartTime = t.getStartTime();
Date transitEndTime = t.getEndTime();
Modified: trunk/echobase-entities/src/main/xmi/echobase.zargo
===================================================================
(Binary files differ)
1
0
r291 - in trunk: . echobase-tools/src/test/java/fr/ifremer/echobase/tools echobase-ui/src/main/java/fr/ifremer/echobase/ui echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData
by tchemit@users.forge.codelutin.com 25 Jan '12
by tchemit@users.forge.codelutin.com 25 Jan '12
25 Jan '12
Author: tchemit
Date: 2012-01-25 11:53:18 +0100 (Wed, 25 Jan 2012)
New Revision: 291
Url: http://forge.codelutin.com/repositories/revision/echobase/291
Log:
update struts2 version, add pom name + update svn properties + usage of rename EchoBaseTopiaRootContextFactory
Modified:
trunk/
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/AbstractToolTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/TestHelper.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationListener.java
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/ConfigureAccousticRegionData-validation.xml
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/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/ConfigureCommonDataFromTransect-validation.xml
trunk/pom.xml
Property changes on: trunk
___________________________________________________________________
Modified: svn:ignore
- target
*.ipr
*.iws
*.iml
*.log
+ target
*.ipr
*.iws
*.iml
*.log
.idea
Modified: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/AbstractToolTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/AbstractToolTest.java 2012-01-25 10:51:42 UTC (rev 290)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/AbstractToolTest.java 2012-01-25 10:53:18 UTC (rev 291)
@@ -25,9 +25,8 @@
import com.google.common.base.Supplier;
import fr.ifremer.echobase.EchoBaseConfiguration;
-import fr.ifremer.echobase.EchoBaseTopiaRootContextSupplierFactory;
+import fr.ifremer.echobase.EchoBaseTopiaRootContextFactory;
import fr.ifremer.echobase.entities.EchoBaseDAOHelper;
-import fr.ifremer.echobase.entities.EchoBaseEntityEnum;
import fr.ifremer.echobase.entities.meta.DbMeta;
import fr.ifremer.echobase.services.EchoBaseService;
import fr.ifremer.echobase.services.EchoBaseServiceContext;
@@ -89,8 +88,8 @@
log.debug("Test directory = " + testdir);
}
- EchoBaseTopiaRootContextSupplierFactory factory =
- new EchoBaseTopiaRootContextSupplierFactory();
+ EchoBaseTopiaRootContextFactory factory =
+ new EchoBaseTopiaRootContextFactory();
topiaContextSupplier = factory.newEmbeddedDatabase(testdir);
Modified: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/TestHelper.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/TestHelper.java 2012-01-25 10:51:42 UTC (rev 290)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/TestHelper.java 2012-01-25 10:53:18 UTC (rev 291)
@@ -24,7 +24,7 @@
package fr.ifremer.echobase.tools;
import com.google.common.base.Supplier;
-import fr.ifremer.echobase.EchoBaseTopiaRootContextSupplierFactory;
+import fr.ifremer.echobase.EchoBaseTopiaRootContextFactory;
import fr.ifremer.echobase.entities.EchoBaseEntityEnum;
import org.apache.commons.io.FileUtils;
import org.apache.commons.logging.Log;
@@ -96,8 +96,8 @@
}
public static TopiaContext getRootContext(File dbDir) {
- EchoBaseTopiaRootContextSupplierFactory factory =
- new EchoBaseTopiaRootContextSupplierFactory();
+ EchoBaseTopiaRootContextFactory factory =
+ new EchoBaseTopiaRootContextFactory();
Supplier<TopiaContext> topiaContextSupplier =
factory.newEmbeddedDatabase(dbDir);
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationListener.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationListener.java 2012-01-25 10:51:42 UTC (rev 290)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationListener.java 2012-01-25 10:53:18 UTC (rev 291)
@@ -26,7 +26,7 @@
import com.google.common.base.Supplier;
import fr.ifremer.echobase.EchoBaseConfiguration;
import fr.ifremer.echobase.EchoBaseTechnicalException;
-import fr.ifremer.echobase.EchoBaseTopiaRootContextSupplierFactory;
+import fr.ifremer.echobase.EchoBaseTopiaRootContextFactory;
import fr.ifremer.echobase.entities.EchoBaseUser;
import fr.ifremer.echobase.entities.EchoBaseUserImpl;
import fr.ifremer.echobase.entities.meta.DbMeta;
@@ -98,8 +98,8 @@
if (log.isInfoEnabled()) {
log.info("Initializing RootContextSupplier...");
}
- EchoBaseTopiaRootContextSupplierFactory factory =
- new EchoBaseTopiaRootContextSupplierFactory();
+ EchoBaseTopiaRootContextFactory factory =
+ new EchoBaseTopiaRootContextFactory();
rootContextSupplier = factory.newDatabaseFromConfig(configuration);
applicationContext.setRootContextSupplier(rootContextSupplier);
DbMeta dbMeta = DbMeta.newDbMeta();
@@ -161,8 +161,8 @@
dbConf.put("hibernate.hbm2ddl.auto", isCreated?"update": "create");
- EchoBaseTopiaRootContextSupplierFactory factory =
- new EchoBaseTopiaRootContextSupplierFactory();
+ EchoBaseTopiaRootContextFactory factory =
+ new EchoBaseTopiaRootContextFactory();
Supplier<TopiaContext> topiaContextSupplier =
factory.newDatabaseFromProperties(dbConf);
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-25 10:51:42 UTC (rev 290)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticData-validation.xml 2012-01-25 10:53:18 UTC (rev 291)
@@ -2,8 +2,8 @@
#%L
EchoBase :: UI
- $Id: ConfigureFiles-validation.xml 136 2011-11-27 10:09:45Z tchemit $
- $HeadURL: http://svn.forge.codelutin.com/svn/echobase/trunk/echobase-ui/src/main/reso… $
+ $Id$
+ $HeadURL$
%%
Copyright (C) 2011 Ifremer, Codelutin
%%
Property changes on: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticData-validation.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: 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-25 10:51:42 UTC (rev 290)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionData-validation.xml 2012-01-25 10:53:18 UTC (rev 291)
@@ -2,8 +2,8 @@
#%L
EchoBase :: UI
- $Id: ConfigureFiles-validation.xml 136 2011-11-27 10:09:45Z tchemit $
- $HeadURL: http://svn.forge.codelutin.com/svn/echobase/trunk/echobase-ui/src/main/reso… $
+ $Id$
+ $HeadURL$
%%
Copyright (C) 2011 Ifremer, Codelutin
%%
Property changes on: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionData-validation.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
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-25 10:51:42 UTC (rev 290)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesData-validation.xml 2012-01-25 10:53:18 UTC (rev 291)
@@ -2,8 +2,8 @@
#%L
EchoBase :: UI
- $Id: ConfigureFiles-validation.xml 136 2011-11-27 10:09:45Z tchemit $
- $HeadURL: http://svn.forge.codelutin.com/svn/echobase/trunk/echobase-ui/src/main/reso… $
+ $Id$
+ $HeadURL$
%%
Copyright (C) 2011 Ifremer, Codelutin
%%
Property changes on: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesData-validation.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: 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-25 10:51:42 UTC (rev 290)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualData-validation.xml 2012-01-25 10:53:18 UTC (rev 291)
@@ -2,8 +2,8 @@
#%L
EchoBase :: UI
- $Id: ConfigureFiles-validation.xml 136 2011-11-27 10:09:45Z tchemit $
- $HeadURL: http://svn.forge.codelutin.com/svn/echobase/trunk/echobase-ui/src/main/reso… $
+ $Id$
+ $HeadURL$
%%
Copyright (C) 2011 Ifremer, Codelutin
%%
Property changes on: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualData-validation.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: 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-25 10:51:42 UTC (rev 290)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReference-validation.xml 2012-01-25 10:53:18 UTC (rev 291)
@@ -2,8 +2,8 @@
#%L
EchoBase :: UI
- $Id: ConfigureFiles-validation.xml 136 2011-11-27 10:09:45Z tchemit $
- $HeadURL: http://svn.forge.codelutin.com/svn/echobase/trunk/echobase-ui/src/main/reso… $
+ $Id$
+ $HeadURL$
%%
Copyright (C) 2011 Ifremer, Codelutin
%%
Property changes on: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReference-validation.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: 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-25 10:51:42 UTC (rev 290)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransect-validation.xml 2012-01-25 10:53:18 UTC (rev 291)
@@ -2,8 +2,8 @@
#%L
EchoBase :: UI
- $Id: ConfigureFiles-validation.xml 136 2011-11-27 10:09:45Z tchemit $
- $HeadURL: http://svn.forge.codelutin.com/svn/echobase/trunk/echobase-ui/src/main/reso… $
+ $Id$
+ $HeadURL$
%%
Copyright (C) 2011 Ifremer, Codelutin
%%
Property changes on: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransect-validation.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-01-25 10:51:42 UTC (rev 290)
+++ trunk/pom.xml 2012-01-25 10:53:18 UTC (rev 291)
@@ -28,6 +28,7 @@
<!-- *** Project Information ************************************* -->
<!-- ************************************************************* -->
+ <name>EchoBase</name>
<description>Projet EchoBase</description>
<inceptionYear>2011</inceptionYear>
<url>http://maven-site.forge.codelutin.com/echobase</url>
@@ -113,7 +114,7 @@
<nuitonI18nVersion>2.4.1</nuitonI18nVersion>
<nuitonWebVersion>1.9.1</nuitonWebVersion>
<msaccessImporterVersion>1.4.1</msaccessImporterVersion>
- <struts2Version>2.3.1.1</struts2Version>
+ <struts2Version>2.3.1.2</struts2Version>
<jqueryPluginVersion>3.2.1</jqueryPluginVersion>
<seleniumVersion>2.16.1</seleniumVersion>
<h2Version>1.3.163</h2Version>
1
0
r290 - in trunk/echobase-services/src: main/java/fr/ifremer/echobase/services main/java/fr/ifremer/echobase/services/configurations main/java/fr/ifremer/echobase/services/csv test/java/fr/ifremer/echobase test/java/fr/ifremer/echobase/services
by tchemit@users.forge.codelutin.com 25 Jan '12
by tchemit@users.forge.codelutin.com 25 Jan '12
25 Jan '12
Author: tchemit
Date: 2012-01-25 11:51:42 +0100 (Wed, 25 Jan 2012)
New Revision: 290
Url: http://forge.codelutin.com/repositories/revision/echobase/290
Log:
- finalize common data import
- reformat + imports
- usage of renames EchoBaseTopiaRootContextFactory
Added:
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransectImportModel.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransitImportModel.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/VoyageImportModel.java
Modified:
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/CsvImportResult.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbEditorService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DecoratorService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceContextImpl.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceSupport.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EmbeddedApplicationService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ExportQueryService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDbService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesDataImportConfiguration.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataCompleteImportConfiguration.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/CsvModelUtil.java
trunk/echobase-services/src/test/java/fr/ifremer/echobase/TestHelper.java
trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/AbstractEchoBaseServiceTest.java
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataCompleteImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataCompleteImportService.java 2012-01-25 10:50:25 UTC (rev 289)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataCompleteImportService.java 2012-01-25 10:51:42 UTC (rev 290)
@@ -31,13 +31,13 @@
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.data.VoyageImpl;
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.CsvModelUtil;
-import org.apache.commons.collections.CollectionUtils;
+import fr.ifremer.echobase.services.csv.TransectImportModel;
+import fr.ifremer.echobase.services.csv.TransitImportModel;
+import fr.ifremer.echobase.services.csv.VoyageImportModel;
import org.nuiton.topia.TopiaException;
import org.nuiton.topia.persistence.TopiaDAO;
import org.nuiton.util.csv.Import;
@@ -106,7 +106,7 @@
try {
Mission result = getDAO(Mission.class).create(mission);
commitTransaction("Could not create mission " +
- mission.getName());
+ mission.getName());
return result;
} catch (TopiaException eee) {
throw new EchoBaseTechnicalException(eee);
@@ -186,18 +186,22 @@
TopiaDAO<Transect> dao = getDAO(Transect.class);
- /*
- modelBuilder.newMandatoryColumn(TRANSECT_stratum, TRANSECT_stratum);
- modelBuilder.newMandatoryColumn(TRANSECT_datef, TRANSECT_datef, CsvModelUtil.DAY);
- modelBuilder.newMandatoryColumn(TRANSECT_heuref, TRANSECT_heuref, CsvModelUtil.TIME);
- */
Reader reader = new BufferedReader(new FileReader(inputFile.getFile()));
try {
ImportToMap importer = ImportToMap.newImport(csvModel, reader);
for (Map<String, Object> row : importer) {
- Voyage voyage = (Voyage) row.get(TransectImportModel.TRANSECT_VoyageID);
+ Voyage voyage = (Voyage) row.get(TransectImportModel.TRANSECT_VoyageId);
+ Date timeCoverageStart = (Date) row.get(Transect.PROPERTY_TIME_COVERAGE_START);
+ Date timeCoverageEnd = (Date) row.get(Transect.PROPERTY_TIME_COVERAGE_END);
+
+ 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
);
@@ -212,9 +216,9 @@
transect.setBinUnitsPingAxis(binUnitsPingAxis);
transect.setDateCreated((Date) row.get(Transect.PROPERTY_DATE_CREATED));
- transect.setTimeCoverageStart((Date) row.get(Transect.PROPERTY_TIME_COVERAGE_START));
- transect.setTimeCoverageEnd((Date) row.get(Transect.PROPERTY_TIME_COVERAGE_END));
+ transect.setTimeCoverageStart(timeCoverageStart);
+ transect.setTimeCoverageEnd(timeCoverageEnd);
transect.setGeospatialLatMin((Float) row.get(Transect.PROPERTY_GEOSPATIAL_LAT_MIN));
transect.setGeospatialLonMin((Float) row.get(Transect.PROPERTY_GEOSPATIAL_LON_MIN));
@@ -223,24 +227,8 @@
transect.setGeospatialLatMax((Float) row.get(Transect.PROPERTY_GEOSPATIAL_LAT_MAX));
transect.setGeospatialLonMax((Float) row.get(Transect.PROPERTY_GEOSPATIAL_LON_MAX));
transect.setGeospatialVerticalMax((Float) row.get(Transect.PROPERTY_GEOSPATIAL_VERTICAL_MAX));
+ transect.setLinestring((String) row.get(Transect.PROPERTY_LINESTRING));
- // find out the transit where to reattach the transect
- List<Transit> transits = voyage.getTransit();
-
- Transit transit = null;
-
- if (CollectionUtils.isNotEmpty(transits)) {
- for (Transit aTransit : transits) {
- transit = aTransit;
- break;
- }
- }
- if (transit == null) {
- throw new EchoBaseTechnicalException(
- "Could not find transit to reattach transect " +
- transect.getTitle());
- }
-
transit.addTransect(transect);
}
@@ -253,84 +241,4 @@
}
- protected static class VoyageImportModel extends CsvModelUtil.AbstractImportModel<Voyage> {
-
- public VoyageImportModel(char separator) {
- super(separator);
- modelBuilder.newMandatoryColumn("VoyageName", Voyage.PROPERTY_NAME);
- modelBuilder.newMandatoryColumn("VoyageStartDate", Voyage.PROPERTY_START_DATE, CsvModelUtil.DAY);
- modelBuilder.newMandatoryColumn("VoyageEndDate", Voyage.PROPERTY_END_DATE, CsvModelUtil.DAY);
- modelBuilder.newMandatoryColumn("StartPort", Voyage.PROPERTY_START_PORT);
- modelBuilder.newMandatoryColumn("EndPort", Voyage.PROPERTY_END_PORT);
- }
-
- @Override
- public Voyage newEmptyInstance() {
- return new VoyageImpl();
- }
- }
-
- protected static class TransitImportModel extends CsvModelUtil.AbstractImportModel<Map<String, Object>> {
-
- public static final String TRANSIT_VoyageId = "VoyageId";
-
- protected final Map<String, Voyage> voyageMap;
-
- public TransitImportModel(char separator,
- Map<String, Voyage> voyageMap) {
- super(separator);
- this.voyageMap = voyageMap;
- modelBuilder.newMandatoryColumn(TRANSIT_VoyageId, TRANSIT_VoyageId, CsvModelUtil.newForeignKeyValue(Voyage.class, voyageMap));
- modelBuilder.newMandatoryColumn("TransitName", Transit.PROPERTY_DESCRIPTION);
- modelBuilder.newMandatoryColumn("StartTime", Transit.PROPERTY_START_TIME, CsvModelUtil.DAY_TIME);
- modelBuilder.newMandatoryColumn("EndTime", Transit.PROPERTY_END_TIME, CsvModelUtil.DAY_TIME);
- modelBuilder.newMandatoryColumn("StartLocality", Transit.PROPERTY_START_LOCALITY);
- modelBuilder.newMandatoryColumn("EndLocality", Transit.PROPERTY_END_LOCALITY);
- }
-
- @Override
- public Map<String, Object> newEmptyInstance() {
- return null;
- }
- }
-
- protected static class TransectImportModel extends CsvModelUtil.AbstractImportModel<Map<String, Object>> {
-
- public static final String TRANSECT_stratum = "stratum";
- public static final String TRANSECT_VoyageID = "VoyageID";
- public static final String TRANSECT_datef = "datef";
- public static final String TRANSECT_heuref = "heuref";
-
- protected final Map<String, Voyage> voyageMap;
-
- public TransectImportModel(char separator,
- Map<String, Voyage> voyageMap) {
- super(separator);
- this.voyageMap = voyageMap;
-
- modelBuilder.newMandatoryColumn("Title", Transect.PROPERTY_TITLE);
- modelBuilder.newMandatoryColumn("abstract", Transect.PROPERTY_TRANSECT_ABSTRACT);
- modelBuilder.newMandatoryColumn(TRANSECT_stratum, TRANSECT_stratum);
- modelBuilder.newMandatoryColumn("comment", Transect.PROPERTY_COMMENT);
- modelBuilder.newMandatoryColumn(TRANSECT_VoyageID, TRANSECT_VoyageID, CsvModelUtil.newForeignKeyValue(Voyage.class, voyageMap));
- modelBuilder.newMandatoryColumn(TRANSECT_datef, TRANSECT_datef, CsvModelUtil.DAY);
- modelBuilder.newMandatoryColumn(TRANSECT_heuref, TRANSECT_heuref, CsvModelUtil.TIME);
-
- modelBuilder.newMandatoryColumn("DateCreated", Transect.PROPERTY_DATE_CREATED, CsvModelUtil.IMPORT_DAY2);
- modelBuilder.newMandatoryColumn("TimeCoverageStart", Transect.PROPERTY_TIME_COVERAGE_START, CsvModelUtil.TIME);
- modelBuilder.newMandatoryColumn("TimeCoverageEnd", Transect.PROPERTY_TIME_COVERAGE_END, CsvModelUtil.TIME);
- modelBuilder.newMandatoryColumn("GeospatialLonMin", Transect.PROPERTY_GEOSPATIAL_LON_MIN, CsvModelUtil.PRIMITIVE_FLOAT);
- modelBuilder.newMandatoryColumn("GeospatialLatMin", Transect.PROPERTY_GEOSPATIAL_LAT_MIN, CsvModelUtil.PRIMITIVE_FLOAT);
- modelBuilder.newMandatoryColumn("GeospatialVerticalMin", Transect.PROPERTY_GEOSPATIAL_VERTICAL_MIN, CsvModelUtil.PRIMITIVE_FLOAT);
- modelBuilder.newMandatoryColumn("GeospatialLonMax", Transect.PROPERTY_GEOSPATIAL_LON_MAX, CsvModelUtil.PRIMITIVE_FLOAT);
- modelBuilder.newMandatoryColumn("GeospatialLatMax", Transect.PROPERTY_GEOSPATIAL_LAT_MAX, CsvModelUtil.PRIMITIVE_FLOAT);
- modelBuilder.newMandatoryColumn("GeospatialVerticalMax", Transect.PROPERTY_GEOSPATIAL_VERTICAL_MAX, CsvModelUtil.PRIMITIVE_FLOAT);
- }
-
- @Override
- public Map<String, Object> newEmptyInstance() {
- return null;
- }
-
- }
}
Modified: 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-25 10:50:25 UTC (rev 289)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataFromTransectImportService.java 2012-01-25 10:51:42 UTC (rev 290)
@@ -24,6 +24,7 @@
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;
@@ -32,8 +33,7 @@
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.CsvModelUtil;
-import org.apache.commons.collections.CollectionUtils;
+import fr.ifremer.echobase.services.csv.TransectImportModel;
import org.nuiton.topia.TopiaException;
import org.nuiton.topia.persistence.TopiaDAO;
import org.nuiton.util.csv.ImportToMap;
@@ -63,8 +63,13 @@
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.getDatum(),
configuration.getTransectLicence(),
@@ -76,6 +81,7 @@
private void importTransectFile(InputFile inputFile,
Voyage voyage,
+ Map<String, Voyage> voyageMap,
Vessel vessel,
String datum,
String license,
@@ -84,21 +90,25 @@
char csvSeparator
) throws TopiaException, IOException {
- TransectImportModel csvModel = new TransectImportModel(csvSeparator);
+ TransectImportModel csvModel = new TransectImportModel(csvSeparator, voyageMap);
TopiaDAO<Transect> dao = getDAO(Transect.class);
- /*
- modelBuilder.newMandatoryColumn(TRANSECT_stratum, TRANSECT_stratum);
- modelBuilder.newMandatoryColumn(TRANSECT_datef, TRANSECT_datef, CsvModelUtil.DAY);
- modelBuilder.newMandatoryColumn(TRANSECT_heuref, TRANSECT_heuref, CsvModelUtil.TIME);
- */
Reader reader = new BufferedReader(new FileReader(inputFile.getFile()));
try {
ImportToMap importer = ImportToMap.newImport(csvModel, reader);
for (Map<String, Object> row : importer) {
+ Date timeCoverageStart = (Date) row.get(Transect.PROPERTY_TIME_COVERAGE_START);
+ Date timeCoverageEnd = (Date) row.get(Transect.PROPERTY_TIME_COVERAGE_END);
+ 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
);
@@ -113,10 +123,9 @@
transect.setBinUnitsPingAxis(binUnitsPingAxis);
transect.setDateCreated((Date) row.get(Transect.PROPERTY_DATE_CREATED));
- transect.setTimeCoverageStart((Date) row.get(Transect.PROPERTY_TIME_COVERAGE_START));
- transect.setTimeCoverageEnd((Date) row.get(Transect.PROPERTY_TIME_COVERAGE_END));
+ transect.setTimeCoverageStart(timeCoverageStart);
+ transect.setTimeCoverageEnd(timeCoverageEnd);
-
transect.setGeospatialLatMin((Float) row.get(Transect.PROPERTY_GEOSPATIAL_LAT_MIN));
transect.setGeospatialLonMin((Float) row.get(Transect.PROPERTY_GEOSPATIAL_LON_MIN));
transect.setGeospatialVerticalMin((Float) row.get(Transect.PROPERTY_GEOSPATIAL_VERTICAL_MIN));
@@ -124,24 +133,7 @@
transect.setGeospatialLatMax((Float) row.get(Transect.PROPERTY_GEOSPATIAL_LAT_MAX));
transect.setGeospatialLonMax((Float) row.get(Transect.PROPERTY_GEOSPATIAL_LON_MAX));
transect.setGeospatialVerticalMax((Float) row.get(Transect.PROPERTY_GEOSPATIAL_VERTICAL_MAX));
-
- // find out the transit where to reattach the transect
- List<Transit> transits = voyage.getTransit();
-
- Transit transit = null;
-
- if (CollectionUtils.isNotEmpty(transits)) {
- for (Transit aTransit : transits) {
- transit = aTransit;
- break;
- }
- }
- if (transit == null) {
- throw new EchoBaseTechnicalException(
- "Could not find transit to reattach transect " +
- transect.getTitle());
- }
-
+ transect.setLinestring((String) row.get(Transect.PROPERTY_LINESTRING));
transit.addTransect(transect);
}
@@ -150,38 +142,4 @@
}
}
- protected static class TransectImportModel extends CsvModelUtil.AbstractImportModel<Map<String, Object>> {
-
- public static final String TRANSECT_stratum = "stratum";
- public static final String TRANSECT_VoyageID = "VoyageID";
- public static final String TRANSECT_datef = "datef";
- public static final String TRANSECT_heuref = "heuref";
-
- public TransectImportModel(char separator) {
- super(separator);
-
- modelBuilder.newMandatoryColumn("Title", Transect.PROPERTY_TITLE);
- modelBuilder.newMandatoryColumn("abstract", Transect.PROPERTY_TRANSECT_ABSTRACT);
- modelBuilder.newMandatoryColumn(TRANSECT_stratum, TRANSECT_stratum);
- modelBuilder.newMandatoryColumn("comment", Transect.PROPERTY_COMMENT);
- modelBuilder.newMandatoryColumn(TRANSECT_datef, TRANSECT_datef, CsvModelUtil.DAY);
- modelBuilder.newMandatoryColumn(TRANSECT_heuref, TRANSECT_heuref, CsvModelUtil.TIME);
-
- modelBuilder.newMandatoryColumn("DateCreated", Transect.PROPERTY_DATE_CREATED, CsvModelUtil.IMPORT_DAY2);
- modelBuilder.newMandatoryColumn("TimeCoverageStart", Transect.PROPERTY_TIME_COVERAGE_START, CsvModelUtil.TIME);
- modelBuilder.newMandatoryColumn("TimeCoverageEnd", Transect.PROPERTY_TIME_COVERAGE_END, CsvModelUtil.TIME);
- modelBuilder.newMandatoryColumn("GeospatialLonMin", Transect.PROPERTY_GEOSPATIAL_LON_MIN, CsvModelUtil.PRIMITIVE_FLOAT);
- modelBuilder.newMandatoryColumn("GeospatialLatMin", Transect.PROPERTY_GEOSPATIAL_LAT_MIN, CsvModelUtil.PRIMITIVE_FLOAT);
- modelBuilder.newMandatoryColumn("GeospatialVerticalMin", Transect.PROPERTY_GEOSPATIAL_VERTICAL_MIN, CsvModelUtil.PRIMITIVE_FLOAT);
- modelBuilder.newMandatoryColumn("GeospatialLonMax", Transect.PROPERTY_GEOSPATIAL_LON_MAX, CsvModelUtil.PRIMITIVE_FLOAT);
- modelBuilder.newMandatoryColumn("GeospatialLatMax", Transect.PROPERTY_GEOSPATIAL_LAT_MAX, CsvModelUtil.PRIMITIVE_FLOAT);
- modelBuilder.newMandatoryColumn("GeospatialVerticalMax", Transect.PROPERTY_GEOSPATIAL_VERTICAL_MAX, CsvModelUtil.PRIMITIVE_FLOAT);
- }
-
- @Override
- public Map<String, Object> newEmptyInstance() {
- return null;
- }
-
- }
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CsvImportResult.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CsvImportResult.java 2012-01-25 10:50:25 UTC (rev 289)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CsvImportResult.java 2012-01-25 10:51:42 UTC (rev 290)
@@ -57,7 +57,7 @@
String importFileName,
boolean createIfNotFound) {
CsvImportResult result = new CsvImportResult(entityType, importFileName,
- createIfNotFound);
+ createIfNotFound);
return result;
}
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-25 10:50:25 UTC (rev 289)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbEditorService.java 2012-01-25 10:51:42 UTC (rev 290)
@@ -381,7 +381,7 @@
} catch (Exception eee) {
throw new EchoBaseTechnicalException(
"Could not obtain property [" + propertyName +
- "] value from entity " + entity.getTopiaId(), eee);
+ "] value from entity " + entity.getTopiaId(), eee);
}
String formatedValue;
try {
@@ -389,8 +389,8 @@
} catch (Exception eee) {
throw new EchoBaseTechnicalException(
"Could not format property [" + propertyName +
- "] from value [" + value +
- "] from entity " + entity.getTopiaId(), eee);
+ "] from value [" + value +
+ "] from entity " + entity.getTopiaId(), eee);
}
row.put(propertyName, formatedValue);
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DecoratorService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DecoratorService.java 2012-01-25 10:50:25 UTC (rev 289)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DecoratorService.java 2012-01-25 10:51:42 UTC (rev 290)
@@ -61,7 +61,7 @@
Preconditions.checkNotNull(
decorator,
"Could not find decorator for type " + type +
- " and context " + context
+ " and context " + context
);
return decorator;
}
@@ -104,7 +104,7 @@
Preconditions.checkNotNull(
decorator,
"Could not find decorator for type " + object.getClass() +
- " and context " + context
+ " and context " + context
);
DecoratorUtil.sort((JXPathDecorator<O>) decorator, list, 0);
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceContextImpl.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceContextImpl.java 2012-01-25 10:50:25 UTC (rev 289)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceContextImpl.java 2012-01-25 10:51:42 UTC (rev 290)
@@ -54,10 +54,10 @@
EchoBaseServiceContext serviceContext,
TopiaContext transaction) {
return newContext(serviceContext.getLocale(),
- transaction,
- serviceContext.getConfiguration(),
- serviceContext.getDbMeta(),
- serviceContext.getServiceFactory()
+ transaction,
+ serviceContext.getConfiguration(),
+ serviceContext.getDbMeta(),
+ serviceContext.getServiceFactory()
);
}
@@ -68,10 +68,10 @@
DbMeta dbMeta,
EchoBaseServiceFactory serviceFactory) throws TopiaException {
return newContext(locale,
- topiaContextSupplier.get().beginTransaction(),
- configuration,
- dbMeta,
- serviceFactory);
+ topiaContextSupplier.get().beginTransaction(),
+ configuration,
+ dbMeta,
+ serviceFactory);
}
public static EchoBaseServiceContext newContext(
@@ -81,10 +81,10 @@
DbMeta dbMeta,
EchoBaseServiceFactory serviceFactory) {
return new EchoBaseServiceContextImpl(locale,
- transaction,
- configuration,
- dbMeta,
- serviceFactory);
+ transaction,
+ configuration,
+ dbMeta,
+ serviceFactory);
}
protected EchoBaseServiceContextImpl(Locale locale,
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceSupport.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceSupport.java 2012-01-25 10:50:25 UTC (rev 289)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EchoBaseServiceSupport.java 2012-01-25 10:51:42 UTC (rev 290)
@@ -83,7 +83,7 @@
} catch (TopiaException eee) {
throw new EchoBaseTechnicalException(
"Could not obtain data of id [" + id + "] for type " +
- entityType, eee);
+ entityType, eee);
}
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EmbeddedApplicationService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EmbeddedApplicationService.java 2012-01-25 10:50:25 UTC (rev 289)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/EmbeddedApplicationService.java 2012-01-25 10:51:42 UTC (rev 290)
@@ -28,7 +28,7 @@
import com.google.common.base.Supplier;
import fr.ifremer.echobase.EchoBaseIOUtil;
import fr.ifremer.echobase.EchoBaseTechnicalException;
-import fr.ifremer.echobase.EchoBaseTopiaRootContextSupplierFactory;
+import fr.ifremer.echobase.EchoBaseTopiaRootContextFactory;
import fr.ifremer.echobase.entities.EchoBaseEntityEnum;
import fr.ifremer.echobase.entities.EchoBaseUser;
import fr.ifremer.echobase.entities.EntitiesUtil;
@@ -73,6 +73,7 @@
START_SH("startEchobase.bat", "startEchobase.bat");
protected final String inputFileName;
+
protected final String outputFileName;
EmbeddedFile(String inputFileName, String outputFileName) {
@@ -134,7 +135,7 @@
} catch (Exception eee) {
throw new EchoBaseTechnicalException(
"Could not create zip structure at location " +
- dir, eee);
+ dir, eee);
}
EchoBaseIOUtil.compressZipFile(zipFile, dir);
@@ -176,7 +177,7 @@
// create new h2 db
Supplier<TopiaContext> topiaContextSupplier =
- new EchoBaseTopiaRootContextSupplierFactory().newEmbeddedDatabase(zipDirectory);
+ new EchoBaseTopiaRootContextFactory().newEmbeddedDatabase(zipDirectory);
TopiaContext rootContext = topiaContextSupplier.get();
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ExportQueryService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ExportQueryService.java 2012-01-25 10:50:25 UTC (rev 289)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ExportQueryService.java 2012-01-25 10:51:42 UTC (rev 290)
@@ -238,7 +238,7 @@
// get row number (getRow() begins at 1)
int rowNumber = set.getRow() - 1;
if (rowNumber < pager.getRecordStartIndex() ||
- rowNumber >= pager.getRecordEndIndex()) {
+ rowNumber >= pager.getRecordEndIndex()) {
// out of pager bound, by returning null
// result will not be take in account
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDbService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDbService.java 2012-01-25 10:50:25 UTC (rev 289)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDbService.java 2012-01-25 10:51:42 UTC (rev 290)
@@ -155,7 +155,7 @@
}
if (!missingEntries.isEmpty() && log.isWarnEnabled()) {
log.warn("There is " + missingEntries.size() + " missing files " +
- " in import " + file + "\n" + StringUtil.join(missingEntries, "\n", false));
+ " in import " + file + "\n" + StringUtil.join(missingEntries, "\n", false));
}
return result;
@@ -265,8 +265,8 @@
String sourceTableName = source.getContract().getSimpleName();
String table = targetTableName;
if (source == EchoBaseEntityEnum.Voyage && target == EchoBaseEntityEnum.Echotype ||
- source == EchoBaseEntityEnum.Echotype && target == EchoBaseEntityEnum.Species ||
- source == EchoBaseEntityEnum.Voyage && target == EchoBaseEntityEnum.Strata) {
+ source == EchoBaseEntityEnum.Echotype && target == EchoBaseEntityEnum.Species ||
+ source == EchoBaseEntityEnum.Voyage && target == EchoBaseEntityEnum.Strata) {
// relation *-*
table = getNormalizedTableName(sourceTableName, targetTableName);
updateString = "INSERT INTO " + table + " (" + sourceTableName + "," + targetTableName + ") VALUES('%s','%s');";
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-25 10:50:25 UTC (rev 289)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesDataImportConfiguration.java 2012-01-25 10:51:42 UTC (rev 290)
@@ -92,6 +92,6 @@
@Override
public InputFile[] getInputFiles() {
return new InputFile[]{tlbeStationFile, xtblTriFile,
- tblMensurationFile, tblMensurationClasseFile};
+ tblMensurationFile, tblMensurationClasseFile};
}
}
Modified: 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-25 10:50:25 UTC (rev 289)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataCompleteImportConfiguration.java 2012-01-25 10:51:42 UTC (rev 290)
@@ -180,6 +180,6 @@
@Override
public InputFile[] getInputFiles() {
return new InputFile[]{voyageFile, transitFile,
- transectFile, echotypeFile};
+ transectFile, echotypeFile};
}
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/CsvModelUtil.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/CsvModelUtil.java 2012-01-25 10:50:25 UTC (rev 289)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/CsvModelUtil.java 2012-01-25 10:51:42 UTC (rev 290)
@@ -107,15 +107,14 @@
return new AssociationValueParserFormatter<E>(null, null);
}
- public static <E extends TopiaEntity> AssociationValueParserFormatter<E> newAssociationValueParserFormatter(Class<E> entityType,
- Map<String, E> universe) {
- return new AssociationValueParserFormatter<E>(entityType, universe);
- }
+// public static <E extends TopiaEntity> AssociationValueParserFormatter<E> newAssociationValueParserFormatter(Class<E> entityType,
+// Map<String, E> universe) {
+// return new AssociationValueParserFormatter<E>(entityType, universe);
+// }
public static final ValueParser<Date> IMPORT_DAY = new DateValue("dd/MM/yy");
- public static final ValueParser<Date> IMPORT_DAY2 = new DateValue("dd-MM-yy");
- public static final ValueParser<Date> TIME = new DateValue("HH:mm:ss");
+ public static final ValueParser<Date> IMPORT_DAY_TIME2 = new DateValue("dd-MM-yy HH:mm:ss");
public static final ValueParser<Boolean> INT_TO_BOOLEAN_PARSER = new ValueParser<Boolean>() {
@@ -129,10 +128,11 @@
@Override
protected Float parseNoneEmptyValue(String value) {
- if ("NA".equals(value)) {
- return null;
+ Float result = null;
+ if (!"NA".equals(value)) {
+ result = super.parseNoneEmptyValue(value);
}
- return super.parseNoneEmptyValue(value);
+ return result;
}
};
@@ -167,14 +167,17 @@
@Override
public String format(Collection<E> e) {
+
+ String value;
if (CollectionUtils.isEmpty(e)) {
- return "";
+ value = "";
+ } else {
+ Collection<String> ids = Lists.newArrayList();
+ for (E e1 : e) {
+ ids.add(e1.getTopiaId());
+ }
+ value = StringUtil.join(ids, "|", true);
}
- Collection<String> ids = Lists.newArrayList();
- for (E e1 : e) {
- ids.add(e1.getTopiaId());
- }
- String value = StringUtil.join(ids, "|", true);
return value;
}
}
Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransectImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransectImportModel.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransectImportModel.java 2012-01-25 10:51:42 UTC (rev 290)
@@ -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.Transect;
+import fr.ifremer.echobase.entities.data.Voyage;
+
+import java.util.Map;
+
+/**
+ * Model to import transects.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class TransectImportModel extends CsvModelUtil.AbstractImportModel<Map<String, Object>> {
+
+ public static final String TRANSECT_VoyageId = "voyageName";
+
+ protected final Map<String, Voyage> voyageMap;
+
+ public TransectImportModel(char separator,
+ Map<String, Voyage> voyageMap) {
+ super(separator);
+ this.voyageMap = voyageMap;
+ modelBuilder.newMandatoryColumn(Transect.PROPERTY_TITLE, Transect.PROPERTY_TITLE);
+ modelBuilder.newMandatoryColumn(Transect.PROPERTY_TRANSECT_ABSTRACT, Transect.PROPERTY_TRANSECT_ABSTRACT);
+ modelBuilder.newMandatoryColumn(Transect.PROPERTY_STRATUM, Transect.PROPERTY_STRATUM);
+ modelBuilder.newMandatoryColumn(Transect.PROPERTY_COMMENT, Transect.PROPERTY_COMMENT);
+ modelBuilder.newMandatoryColumn(TRANSECT_VoyageId, TRANSECT_VoyageId, CsvModelUtil.newForeignKeyValue(Voyage.class, voyageMap));
+
+ modelBuilder.newMandatoryColumn(Transect.PROPERTY_DATE_CREATED, Transect.PROPERTY_DATE_CREATED, CsvModelUtil.IMPORT_DAY_TIME2);
+ modelBuilder.newMandatoryColumn(Transect.PROPERTY_TIME_COVERAGE_START, Transect.PROPERTY_TIME_COVERAGE_START, CsvModelUtil.IMPORT_DAY_TIME2);
+ modelBuilder.newMandatoryColumn(Transect.PROPERTY_TIME_COVERAGE_END, Transect.PROPERTY_TIME_COVERAGE_END, CsvModelUtil.IMPORT_DAY_TIME2);
+
+ modelBuilder.newMandatoryColumn(Transect.PROPERTY_GEOSPATIAL_LON_MIN, Transect.PROPERTY_GEOSPATIAL_LON_MIN, CsvModelUtil.PRIMITIVE_FLOAT);
+ modelBuilder.newMandatoryColumn(Transect.PROPERTY_GEOSPATIAL_LAT_MIN, Transect.PROPERTY_GEOSPATIAL_LAT_MIN, CsvModelUtil.PRIMITIVE_FLOAT);
+ modelBuilder.newMandatoryColumn(Transect.PROPERTY_GEOSPATIAL_VERTICAL_MIN, Transect.PROPERTY_GEOSPATIAL_VERTICAL_MIN, CsvModelUtil.PRIMITIVE_FLOAT);
+ modelBuilder.newMandatoryColumn(Transect.PROPERTY_GEOSPATIAL_LON_MAX, Transect.PROPERTY_GEOSPATIAL_LON_MAX, CsvModelUtil.PRIMITIVE_FLOAT);
+ modelBuilder.newMandatoryColumn(Transect.PROPERTY_GEOSPATIAL_LAT_MAX, Transect.PROPERTY_GEOSPATIAL_LAT_MAX, CsvModelUtil.PRIMITIVE_FLOAT);
+ modelBuilder.newMandatoryColumn(Transect.PROPERTY_GEOSPATIAL_VERTICAL_MAX, Transect.PROPERTY_GEOSPATIAL_VERTICAL_MAX, CsvModelUtil.PRIMITIVE_FLOAT);
+ modelBuilder.newMandatoryColumn(Transect.PROPERTY_LINESTRING, Transect.PROPERTY_LINESTRING);
+ }
+
+ @Override
+ public Map<String, Object> newEmptyInstance() {
+ return null;
+ }
+
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransectImportModel.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/TransitImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransitImportModel.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransitImportModel.java 2012-01-25 10:51:42 UTC (rev 290)
@@ -0,0 +1,59 @@
+/*
+ * #%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.Transit;
+import fr.ifremer.echobase.entities.data.Voyage;
+
+import java.util.Map;
+
+/**
+ * Model to import Transits.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class TransitImportModel extends CsvModelUtil.AbstractImportModel<Map<String, Object>> {
+
+ public static final String TRANSIT_VoyageId = "voyageName";
+
+ protected final Map<String, Voyage> voyageMap;
+
+ public TransitImportModel(char separator,
+ Map<String, Voyage> voyageMap) {
+ super(separator);
+ this.voyageMap = voyageMap;
+ modelBuilder.newMandatoryColumn(TRANSIT_VoyageId, TRANSIT_VoyageId, CsvModelUtil.newForeignKeyValue(Voyage.class, voyageMap));
+ modelBuilder.newMandatoryColumn(Transit.PROPERTY_DESCRIPTION, Transit.PROPERTY_DESCRIPTION);
+ modelBuilder.newMandatoryColumn(Transit.PROPERTY_START_TIME, Transit.PROPERTY_START_TIME, CsvModelUtil.DAY_TIME);
+ modelBuilder.newMandatoryColumn(Transit.PROPERTY_END_TIME, Transit.PROPERTY_END_TIME, CsvModelUtil.DAY_TIME);
+ modelBuilder.newMandatoryColumn(Transit.PROPERTY_START_LOCALITY, Transit.PROPERTY_START_LOCALITY);
+ modelBuilder.newMandatoryColumn(Transit.PROPERTY_END_LOCALITY, Transit.PROPERTY_END_LOCALITY);
+ }
+
+ @Override
+ public Map<String, Object> newEmptyInstance() {
+ return null;
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/TransitImportModel.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/VoyageImportModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/VoyageImportModel.java (rev 0)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/VoyageImportModel.java 2012-01-25 10:51:42 UTC (rev 290)
@@ -0,0 +1,50 @@
+/*
+ * #%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.data.VoyageImpl;
+
+/**
+ * Model to import Voyages.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class VoyageImportModel extends CsvModelUtil.AbstractImportModel<Voyage> {
+
+ public VoyageImportModel(char separator) {
+ super(separator);
+ modelBuilder.newMandatoryColumn(Voyage.PROPERTY_NAME, Voyage.PROPERTY_NAME);
+ modelBuilder.newMandatoryColumn(Voyage.PROPERTY_START_DATE, Voyage.PROPERTY_START_DATE, CsvModelUtil.DAY);
+ modelBuilder.newMandatoryColumn(Voyage.PROPERTY_END_DATE, Voyage.PROPERTY_END_DATE, CsvModelUtil.DAY);
+ modelBuilder.newMandatoryColumn(Voyage.PROPERTY_START_PORT, Voyage.PROPERTY_START_PORT);
+ modelBuilder.newMandatoryColumn(Voyage.PROPERTY_END_PORT, Voyage.PROPERTY_END_PORT);
+ }
+
+ @Override
+ public Voyage newEmptyInstance() {
+ return new VoyageImpl();
+ }
+}
Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/VoyageImportModel.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/echobase-services/src/test/java/fr/ifremer/echobase/TestHelper.java
===================================================================
--- trunk/echobase-services/src/test/java/fr/ifremer/echobase/TestHelper.java 2012-01-25 10:50:25 UTC (rev 289)
+++ trunk/echobase-services/src/test/java/fr/ifremer/echobase/TestHelper.java 2012-01-25 10:51:42 UTC (rev 290)
@@ -67,8 +67,8 @@
}
public static TopiaContext getRootContext(File dbDir) {
- EchoBaseTopiaRootContextSupplierFactory factory =
- new EchoBaseTopiaRootContextSupplierFactory();
+ EchoBaseTopiaRootContextFactory factory =
+ new EchoBaseTopiaRootContextFactory();
Supplier<TopiaContext> topiaContextSupplier =
factory.newEmbeddedDatabase(dbDir);
Modified: trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/AbstractEchoBaseServiceTest.java
===================================================================
--- trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/AbstractEchoBaseServiceTest.java 2012-01-25 10:50:25 UTC (rev 289)
+++ trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/AbstractEchoBaseServiceTest.java 2012-01-25 10:51:42 UTC (rev 290)
@@ -24,11 +24,9 @@
package fr.ifremer.echobase.services;
import com.google.common.base.Supplier;
-import com.google.common.collect.Lists;
import fr.ifremer.echobase.EchoBaseConfiguration;
-import fr.ifremer.echobase.EchoBaseTopiaRootContextSupplierFactory;
+import fr.ifremer.echobase.EchoBaseTopiaRootContextFactory;
import fr.ifremer.echobase.TestHelper;
-import fr.ifremer.echobase.entities.EchoBaseEntityEnum;
import fr.ifremer.echobase.entities.MockEntityVisitorCreator;
import fr.ifremer.echobase.entities.meta.DbMeta;
import junit.framework.Assert;
@@ -38,7 +36,6 @@
import org.nuiton.topia.persistence.TopiaEntity;
import java.io.File;
-import java.util.List;
import java.util.Locale;
/**
@@ -66,8 +63,8 @@
public TopiaContext getTransaction() throws Exception {
if (transaction == null || transaction.isClosed()) {
- EchoBaseTopiaRootContextSupplierFactory factory =
- new EchoBaseTopiaRootContextSupplierFactory();
+ EchoBaseTopiaRootContextFactory factory =
+ new EchoBaseTopiaRootContextFactory();
File basedir = TestHelper.getBasedir();
File target = new File(basedir, "/target");
Supplier<TopiaContext> topiaContextSupplier = factory.newEmbeddedDatabase(target);
1
0
r289 - in trunk/echobase-entities/src/main: java/fr/ifremer/echobase java/fr/ifremer/echobase/entities java/fr/ifremer/echobase/entities/data resources/i18n xmi
by tchemit@users.forge.codelutin.com 25 Jan '12
by tchemit@users.forge.codelutin.com 25 Jan '12
25 Jan '12
Author: tchemit
Date: 2012-01-25 11:50:25 +0100 (Wed, 25 Jan 2012)
New Revision: 289
Url: http://forge.codelutin.com/repositories/revision/echobase/289
Log:
rename EchoBaseTopiaRootContextSupplierFactory to EchoBaseTopiaRootContextFactory, introduce getTransit method on Voyage, add Transect#stratum field
Added:
trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseTopiaRootContextFactory.java
trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/data/
trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/data/VoyageImpl.java
Removed:
trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseTopiaRootContextSupplierFactory.java
Modified:
trunk/echobase-entities/src/main/resources/i18n/echobase-entities_fr_FR.properties
trunk/echobase-entities/src/main/xmi/echobase.zargo
Copied: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseTopiaRootContextFactory.java (from rev 288, trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseTopiaRootContextSupplierFactory.java)
===================================================================
--- trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseTopiaRootContextFactory.java (rev 0)
+++ trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseTopiaRootContextFactory.java 2012-01-25 10:50:25 UTC (rev 289)
@@ -0,0 +1,148 @@
+/*
+ * #%L
+ * Extranet NF-Logement :: Entities
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 Cerqual
+ * %%
+ * 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.Supplier;
+import com.google.common.collect.Sets;
+import com.google.common.io.Closeables;
+import fr.ifremer.echobase.entities.EchoBaseDAOHelper;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.nuiton.topia.TopiaContext;
+import org.nuiton.topia.TopiaContextFactory;
+import org.nuiton.topia.TopiaNotFoundException;
+import org.nuiton.topia.TopiaRuntimeException;
+import org.nuiton.topia.replication.TopiaReplicationService;
+import org.nuiton.topia.replication.TopiaReplicationServiceImpl;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+import java.util.Set;
+
+/**
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.1
+ */
+public class EchoBaseTopiaRootContextFactory {
+
+ /** Logger. */
+ private static final Log log =
+ LogFactory.getLog(EchoBaseTopiaRootContextFactory.class);
+
+ protected static class EchoBaseTopiaRootContextSupplier implements Supplier<TopiaContext> {
+
+ protected TopiaContext rootContext;
+
+ public EchoBaseTopiaRootContextSupplier(TopiaContext rootContext) {
+ this.rootContext = rootContext;
+ }
+
+ @Override
+ public TopiaContext get() {
+ return rootContext;
+ }
+ }
+
+ public Supplier<TopiaContext> newEmbeddedDatabase(File dir) {
+
+ File databaseFile = new File(dir, "db");
+
+ String databaseAbsolutePath = databaseFile.getAbsolutePath();
+
+ // prepare call to topia-context factory
+ Properties properties = new Properties();
+ InputStream input = null;
+ try {
+ input = getClass().getResourceAsStream("/topia-h2.properties");
+ properties.load(input);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ } finally {
+ Closeables.closeQuietly(input);
+ }
+ properties.setProperty(
+ TopiaContextFactory.CONFIG_URL,
+ "jdbc:h2:file:" + databaseAbsolutePath + "/echobase");
+
+ // add entities to the context
+ properties.setProperty(
+ TopiaContextFactory.CONFIG_PERSISTENCE_CLASSES,
+ EchoBaseDAOHelper.getImplementationClassesAsString());
+
+ // add topiaReplicationService in the context
+ properties.setProperty(TopiaReplicationService.TOPIA_SERVICE_NAME,
+ TopiaReplicationServiceImpl.class.getName());
+
+ TopiaContext rootContext;
+ try {
+ rootContext = TopiaContextFactory.getContext(properties);
+ } catch (TopiaNotFoundException e) {
+ throw new TopiaRuntimeException(e);
+ }
+
+ if (log.isDebugEnabled()) {
+ log.debug("will output database in " + databaseAbsolutePath);
+ }
+
+ return new EchoBaseTopiaRootContextSupplier(rootContext);
+ }
+
+ public Supplier<TopiaContext> newDatabaseFromConfig(EchoBaseConfiguration config) {
+
+ Properties properties = config.getProperties();
+
+ return newDatabaseFromProperties(properties);
+ }
+
+ public Supplier<TopiaContext> newDatabaseFromProperties(Properties properties) {
+
+ if (log.isDebugEnabled()) {
+ log.debug("Database settings are :");
+ Set<String> keysToDisplay = Sets.newHashSet(
+ "hibernate.dialect",
+ "hibernate.connection.driver_class",
+ "hibernate.connection.url",
+ "hibernate.connection.username");
+ for (String key : keysToDisplay) {
+ log.debug(String.format("%s=%s", key, properties.getProperty(key)));
+ }
+ }
+
+ // add entities to the context
+ String classesKey = TopiaContextFactory.CONFIG_PERSISTENCE_CLASSES;
+ String classesValue = EchoBaseDAOHelper.getImplementationClassesAsString();
+ properties.setProperty(classesKey, classesValue);
+
+ TopiaContext rootContext;
+ try {
+ rootContext = TopiaContextFactory.getContext(properties);
+ } catch (TopiaNotFoundException e) {
+ throw new TopiaRuntimeException(e);
+ }
+
+ return new EchoBaseTopiaRootContextSupplier(rootContext);
+ }
+}
Property changes on: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseTopiaRootContextFactory.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseTopiaRootContextSupplierFactory.java
===================================================================
--- trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseTopiaRootContextSupplierFactory.java 2012-01-17 18:00:35 UTC (rev 288)
+++ trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseTopiaRootContextSupplierFactory.java 2012-01-25 10:50:25 UTC (rev 289)
@@ -1,148 +0,0 @@
-/*
- * #%L
- * Extranet NF-Logement :: Entities
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 Cerqual
- * %%
- * 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.Supplier;
-import com.google.common.collect.Sets;
-import com.google.common.io.Closeables;
-import fr.ifremer.echobase.entities.EchoBaseDAOHelper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.nuiton.topia.TopiaContext;
-import org.nuiton.topia.TopiaContextFactory;
-import org.nuiton.topia.TopiaNotFoundException;
-import org.nuiton.topia.TopiaRuntimeException;
-import org.nuiton.topia.replication.TopiaReplicationService;
-import org.nuiton.topia.replication.TopiaReplicationServiceImpl;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
-import java.util.Set;
-
-/**
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.1
- */
-public class EchoBaseTopiaRootContextSupplierFactory {
-
- /** Logger. */
- private static final Log log =
- LogFactory.getLog(EchoBaseTopiaRootContextSupplierFactory.class);
-
- protected static class EchoBaseTopiaRootContextSupplier implements Supplier<TopiaContext> {
-
- protected TopiaContext rootContext;
-
- public EchoBaseTopiaRootContextSupplier(TopiaContext rootContext) {
- this.rootContext = rootContext;
- }
-
- @Override
- public TopiaContext get() {
- return rootContext;
- }
- }
-
- public Supplier<TopiaContext> newEmbeddedDatabase(File dir) {
-
- File databaseFile = new File(dir, "db");
-
- String databaseAbsolutePath = databaseFile.getAbsolutePath();
-
- // prepare call to topia-context factory
- Properties properties = new Properties();
- InputStream input = null;
- try {
- input = getClass().getResourceAsStream("/topia-h2.properties");
- properties.load(input);
- } catch (IOException e) {
- throw new RuntimeException(e);
- } finally {
- Closeables.closeQuietly(input);
- }
- properties.setProperty(
- TopiaContextFactory.CONFIG_URL,
- "jdbc:h2:file:" + databaseAbsolutePath + "/echobase");
-
- // add entities to the context
- properties.setProperty(
- TopiaContextFactory.CONFIG_PERSISTENCE_CLASSES,
- EchoBaseDAOHelper.getImplementationClassesAsString());
-
- // add topiaReplicationService in the context
- properties.setProperty(TopiaReplicationService.TOPIA_SERVICE_NAME,
- TopiaReplicationServiceImpl.class.getName());
-
- TopiaContext rootContext;
- try {
- rootContext = TopiaContextFactory.getContext(properties);
- } catch (TopiaNotFoundException e) {
- throw new TopiaRuntimeException(e);
- }
-
- if (log.isDebugEnabled()) {
- log.debug("will output database in " + databaseAbsolutePath);
- }
-
- return new EchoBaseTopiaRootContextSupplier(rootContext);
- }
-
- public Supplier<TopiaContext> newDatabaseFromConfig(EchoBaseConfiguration config) {
-
- Properties properties = config.getProperties();
-
- return newDatabaseFromProperties(properties);
- }
-
- public Supplier<TopiaContext> newDatabaseFromProperties(Properties properties) {
-
- if (log.isDebugEnabled()) {
- log.debug("Database settings are :");
- Set<String> keysToDisplay = Sets.newHashSet(
- "hibernate.dialect",
- "hibernate.connection.driver_class",
- "hibernate.connection.url",
- "hibernate.connection.username");
- for (String key : keysToDisplay) {
- log.debug(String.format("%s=%s", key, properties.getProperty(key)));
- }
- }
-
- // add entities to the context
- String classesKey = TopiaContextFactory.CONFIG_PERSISTENCE_CLASSES;
- String classesValue = EchoBaseDAOHelper.getImplementationClassesAsString();
- properties.setProperty(classesKey, classesValue);
-
- TopiaContext rootContext;
- try {
- rootContext = TopiaContextFactory.getContext(properties);
- } catch (TopiaNotFoundException e) {
- throw new TopiaRuntimeException(e);
- }
-
- return new EchoBaseTopiaRootContextSupplier(rootContext);
- }
-}
Added: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/data/VoyageImpl.java
===================================================================
--- trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/data/VoyageImpl.java (rev 0)
+++ trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/data/VoyageImpl.java 2012-01-25 10:50:25 UTC (rev 289)
@@ -0,0 +1,65 @@
+/*
+ * #%L
+ * EchoBase :: Entities
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.entities.data;
+
+import org.apache.commons.collections.CollectionUtils;
+
+import java.util.Date;
+
+/**
+ * Default implementation of {@link Voyage}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class VoyageImpl extends VoyageAbstract {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public Transit getTransit(Date startTime, Date endDate) {
+
+ Transit result = null;
+ if (CollectionUtils.isNotEmpty(getTransit())) {
+ for (Transit t : getTransit()) {
+ Date transitStartTime = t.getStartTime();
+ Date transitEndTime = t.getEndTime();
+ if (transitEndTime.before(startTime)) {
+ // transit before required range
+ continue;
+ }
+ if (transitStartTime.after(endDate)) {
+
+ // transit after required range
+ continue;
+ }
+
+ // ok transit contains required range
+ result = t;
+ break;
+ }
+ }
+ return result;
+ }
+}
Property changes on: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/data/VoyageImpl.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-17 18:00:35 UTC (rev 288)
+++ trunk/echobase-entities/src/main/resources/i18n/echobase-entities_fr_FR.properties 2012-01-25 10:50:25 UTC (rev 289)
@@ -217,6 +217,7 @@
echobase.common.startTime=
echobase.common.status=
echobase.common.strata=
+echobase.common.stratum=
echobase.common.swimbladder=
echobase.common.swimbladderType=
echobase.common.taxonCode=
Modified: trunk/echobase-entities/src/main/xmi/echobase.zargo
===================================================================
(Binary files differ)
1
0
r288 - in trunk: echobase-services/src/main/java/fr/ifremer/echobase/services echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/dbeditor echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/exportQuery echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/user
by tchemit@users.forge.codelutin.com 17 Jan '12
by tchemit@users.forge.codelutin.com 17 Jan '12
17 Jan '12
Author: tchemit
Date: 2012-01-17 19:00:35 +0100 (Tue, 17 Jan 2012)
New Revision: 288
Url: http://forge.codelutin.com/repositories/revision/echobase/288
Log:
use PagerBean dfrom nuiton-utils
Removed:
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/Pager.java
Modified:
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbEditorService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ExportQueryService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/UserService.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/AbstractJSONPaginedAction.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/dbeditor/GetEntities.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/exportQuery/GetExportQueryResult.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/user/GetUsers.java
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbEditorService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbEditorService.java 2012-01-17 17:56:39 UTC (rev 287)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbEditorService.java 2012-01-17 18:00:35 UTC (rev 288)
@@ -41,8 +41,10 @@
import org.nuiton.topia.framework.TopiaQuery;
import org.nuiton.topia.persistence.TopiaDAO;
import org.nuiton.topia.persistence.TopiaEntity;
+import org.nuiton.util.PagerUtil;
import org.nuiton.util.beans.BeanMonitor;
import org.nuiton.util.beans.PropertyDiff;
+import org.nuiton.util.csv.ExportModel;
import org.nuiton.util.csv.ExportableColumn;
import org.nuiton.util.csv.ImportExportModel;
import org.nuiton.util.csv.ImportableColumn;
@@ -86,7 +88,7 @@
//TODO Use an object to filter datas
public Map<?, ?>[] getDatas(EchoBaseEntityEnum entityType,
- Pager pager,
+ PagerUtil.PagerBean pager,
String sidx,
Boolean ascendantOrder) {
@@ -113,7 +115,7 @@
}
public <E extends TopiaEntity> List<E> getEntities(TableMeta tableMeta,
- Pager pager,
+ PagerUtil.PagerBean pager,
String sidx,
Boolean ascendantOrder,
String extraWhereQuery) {
@@ -132,18 +134,18 @@
if (pager != null) {
pager.setRecords(count);
- pager.computeIndexesAndPageCount();
+ PagerUtil.computeRecordIndexesAndPagesNumber(pager);
- int from = pager.getStartIndex();
- int to = pager.getEndIndex();
+ int from = pager.getRecordStartIndex();
+ int to = pager.getRecordEndIndex();
if (log.isDebugEnabled()) {
log.debug("Count = " + count);
- log.debug("page = " + pager.getPageNumber());
+ log.debug("page = " + pager.getPageIndex());
log.debug("pageSize = " + pager.getPageSize());
log.debug("from = " + from);
log.debug("to = " + to);
- log.debug("pageCount= " + pager.getPageCount());
+ log.debug("pageCount= " + pager.getPagesNumber());
}
if (StringUtils.isNotEmpty(sidx)) {
@@ -176,7 +178,7 @@
try {
TopiaDAO<?> dao = getDAO(entityEnum.getContract());
TopiaEntity entity = dao.findByTopiaId(topiaId);
- ImportExportModel<TopiaEntity> model = buildForLoad(tableMeta, TopiaEntity.TOPIA_ID, true);
+ ExportModel<TopiaEntity> model = buildForLoad(tableMeta, TopiaEntity.TOPIA_ID, true);
return loadRow(entity, model);
} catch (TopiaException eee) {
throw new EchoBaseTechnicalException("Could not obtain data", eee);
@@ -364,7 +366,7 @@
protected <E extends TopiaEntity> Map<String, Object> loadRow(
E entity,
- ImportExportModel<E> loadModel) {
+ ExportModel<E> loadModel) {
Map<String, Object> row = Maps.newLinkedHashMap();
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ExportQueryService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ExportQueryService.java 2012-01-17 17:56:39 UTC (rev 287)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ExportQueryService.java 2012-01-17 18:00:35 UTC (rev 288)
@@ -36,6 +36,7 @@
import org.nuiton.topia.framework.TopiaContextImplementor;
import org.nuiton.topia.framework.TopiaSQLQuery;
import org.nuiton.topia.persistence.TopiaDAO;
+import org.nuiton.util.PagerUtil;
import org.nuiton.util.csv.Export;
import java.sql.Connection;
@@ -108,7 +109,7 @@
}
}
- public Map<String, Object>[] executeSql(String sql, Pager pager) {
+ public Map<String, Object>[] executeSql(String sql, PagerUtil.PagerBean pager) {
// get a query to count all rows for the request
GenericSQLQuery sqlQuery = new GenericSQLQuery(sql, pager);
@@ -171,9 +172,9 @@
private final String sql;
- private final Pager pager;
+ private final PagerUtil.PagerBean pager;
- public GenericSQLQuery(String sql, Pager pager) {
+ public GenericSQLQuery(String sql, PagerUtil.PagerBean pager) {
this.sql = sql;
this.pager = pager;
}
@@ -225,7 +226,7 @@
log.info("For request " + sql + ", nb rows = " + nbRows);
}
pager.setRecords(nbRows);
- pager.computeIndexesAndPageCount();
+ PagerUtil.computeRecordIndexesAndPagesNumber(pager);
}
}
@@ -236,8 +237,8 @@
// get row number (getRow() begins at 1)
int rowNumber = set.getRow() - 1;
- if (rowNumber < pager.getStartIndex() ||
- rowNumber >= pager.getEndIndex()) {
+ if (rowNumber < pager.getRecordStartIndex() ||
+ rowNumber >= pager.getRecordEndIndex()) {
// out of pager bound, by returning null
// result will not be take in account
Deleted: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/Pager.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/Pager.java 2012-01-17 17:56:39 UTC (rev 287)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/Pager.java 2012-01-17 18:00:35 UTC (rev 288)
@@ -1,109 +0,0 @@
-/*
- * #%L
- * EchoBase :: Services
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 Ifremer, Codelutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.echobase.services;
-
-import org.apache.commons.lang3.tuple.Pair;
-import org.nuiton.util.PagerUtil;
-
-import java.io.Serializable;
-
-/**
- * A simple pager bean.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.1
- */
-public class Pager implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- protected int records;
-
- protected int startIndex;
-
- protected int endIndex;
-
- protected int pageNumber;
-
- protected int pageSize;
-
- protected int pageCount;
-
- public int getRecords() {
- return records;
- }
-
- public int getStartIndex() {
- return startIndex;
- }
-
- public int getEndIndex() {
- return endIndex;
- }
-
- public int getPageNumber() {
- return pageNumber;
- }
-
- public int getPageSize() {
- return pageSize;
- }
-
- public int getPageCount() {
- return pageCount;
- }
-
- public void setRecords(int records) {
- this.records = records;
- }
-
- public void setStartIndex(int startIndex) {
- this.startIndex = startIndex;
- }
-
- public void setEndIndex(int endIndex) {
- this.endIndex = endIndex;
- }
-
- public void setPageNumber(int pageNumber) {
- this.pageNumber = pageNumber;
- }
-
- public void setPageSize(int pageSize) {
- this.pageSize = pageSize;
- }
-
- public void setPageCount(int pageCount) {
- this.pageCount = pageCount;
- }
-
- public void computeIndexesAndPageCount() {
- Pair<Integer, Integer> pageBound =
- PagerUtil.getPageBound(records, pageNumber, pageSize);
- startIndex = pageBound.getLeft();
- endIndex = pageBound.getRight();
- pageCount = PagerUtil.getTotalPage(records, pageSize);
- }
-
-}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/UserService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/UserService.java 2012-01-17 17:56:39 UTC (rev 287)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/UserService.java 2012-01-17 18:00:35 UTC (rev 288)
@@ -32,6 +32,7 @@
import org.apache.commons.lang3.StringUtils;
import org.nuiton.topia.TopiaException;
import org.nuiton.topia.framework.TopiaQuery;
+import org.nuiton.util.PagerUtil;
import org.nuiton.util.StringUtil;
import java.util.List;
@@ -54,7 +55,7 @@
return getUsers(null);
}
- public List<EchoBaseUser> getUsers(Pager pager) {
+ public List<EchoBaseUser> getUsers(PagerUtil.PagerBean pager) {
try {
List<EchoBaseUser> users;
@@ -67,9 +68,9 @@
// get user count
long count = dao.count();
pager.setRecords((int) count);
- pager.computeIndexesAndPageCount();
+ PagerUtil.computeRecordIndexesAndPagesNumber(pager);
TopiaQuery query = dao.createQuery("e");
- query.setLimit(pager.getStartIndex(), pager.getEndIndex() - 1);
+ query.setLimit(pager.getRecordStartIndex(), pager.getRecordEndIndex() - 1);
users = dao.findAllByQuery(query);
}
return users;
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/AbstractJSONPaginedAction.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/AbstractJSONPaginedAction.java 2012-01-17 17:56:39 UTC (rev 287)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/AbstractJSONPaginedAction.java 2012-01-17 18:00:35 UTC (rev 288)
@@ -23,10 +23,10 @@
*/
package fr.ifremer.echobase.ui.actions;
-import fr.ifremer.echobase.services.Pager;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.json.JSONException;
import org.apache.struts2.json.JSONUtil;
+import org.nuiton.util.PagerUtil;
/**
* Abstract JSON action with pagination support.
@@ -46,7 +46,7 @@
public abstract Integer getRecords();
- protected Pager pager = new Pager();
+ protected PagerUtil.PagerBean pager = PagerUtil.newPagerBean();
// sorting order - asc or desc
protected String sord;
@@ -61,7 +61,7 @@
}
public void setPage(Integer page) {
- pager.setPageNumber(page);
+ pager.setPageIndex(page);
}
public String getSord() {
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/dbeditor/GetEntities.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/dbeditor/GetEntities.java 2012-01-17 17:56:39 UTC (rev 287)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/dbeditor/GetEntities.java 2012-01-17 18:00:35 UTC (rev 288)
@@ -65,12 +65,12 @@
@Override
public Integer getPage() {
- return pager.getPageNumber();
+ return pager.getPageIndex();
}
@Override
public Integer getTotal() {
- return pager.getPageCount();
+ return pager.getPagesNumber();
}
@Override
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/exportQuery/GetExportQueryResult.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/exportQuery/GetExportQueryResult.java 2012-01-17 17:56:39 UTC (rev 287)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/exportQuery/GetExportQueryResult.java 2012-01-17 18:00:35 UTC (rev 288)
@@ -59,12 +59,12 @@
@Override
public Integer getPage() {
- return pager.getPageNumber();
+ return pager.getPageIndex();
}
@Override
public Integer getTotal() {
- return pager.getPageCount();
+ return pager.getPagesNumber();
}
@Override
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/user/GetUsers.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/user/GetUsers.java 2012-01-17 17:56:39 UTC (rev 287)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/user/GetUsers.java 2012-01-17 18:00:35 UTC (rev 288)
@@ -54,12 +54,12 @@
@Override
public Integer getPage() {
- return pager.getPageNumber();
+ return pager.getPageIndex();
}
@Override
public Integer getTotal() {
- return pager.getPageCount();
+ return pager.getPagesNumber();
}
@Override
1
0
Author: tchemit
Date: 2012-01-17 18:56:39 +0100 (Tue, 17 Jan 2012)
New Revision: 287
Url: http://forge.codelutin.com/repositories/revision/echobase/287
Log:
add plugin in pom
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-01-17 17:55:41 UTC (rev 286)
+++ trunk/pom.xml 2012-01-17 17:56:39 UTC (rev 287)
@@ -109,7 +109,7 @@
<eugenePluginVersion>2.4.2</eugenePluginVersion>
<topiaVersion>2.6.6</topiaVersion>
- <nuitonUtilsVersion>2.4.2</nuitonUtilsVersion>
+ <nuitonUtilsVersion>2.4.4</nuitonUtilsVersion>
<nuitonI18nVersion>2.4.1</nuitonI18nVersion>
<nuitonWebVersion>1.9.1</nuitonWebVersion>
<msaccessImporterVersion>1.4.1</msaccessImporterVersion>
@@ -416,12 +416,6 @@
</plugin>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>wagon-maven-plugin</artifactId>
- <version>${wagonPluginVersion}</version>
- </plugin>
-
- <plugin>
<groupId>org.nuiton.eugene</groupId>
<artifactId>maven-eugene-plugin</artifactId>
<version>${eugenePluginVersion}</version>
@@ -435,11 +429,25 @@
<!-- remove this when using mavenpom 3.1 -->
<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>wagon-maven-plugin</artifactId>
+ <version>${wagonPluginVersion}</version>
+ </plugin>
+
+ <!-- remove this when using mavenpom 3.1 -->
+ <plugin>
<groupId>org.nuiton</groupId>
<artifactId>helper-maven-plugin</artifactId>
<version>1.4</version>
</plugin>
+ <!-- remove this when using mavenpom 3.1 -->
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-maven-plugin</artifactId>
+ <version>${jettyPluginVersion}</version>
+ </plugin>
+
</plugins>
</pluginManagement>
1
0
r286 - trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv
by tchemit@users.forge.codelutin.com 17 Jan '12
by tchemit@users.forge.codelutin.com 17 Jan '12
17 Jan '12
Author: tchemit
Date: 2012-01-17 18:55:41 +0100 (Tue, 17 Jan 2012)
New Revision: 286
Url: http://forge.codelutin.com/repositories/revision/echobase/286
Log:
fix import/export
Modified:
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/CsvModelUtil.java
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/CsvModelUtil.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/CsvModelUtil.java 2012-01-15 22:12:51 UTC (rev 285)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/CsvModelUtil.java 2012-01-17 17:55:41 UTC (rev 286)
@@ -344,7 +344,7 @@
@Override
public final Iterable<ExportableColumn<E, Object>> getColumnsForExport() {
- return (Iterable) modelBuilder.getColumnsForImport();
+ return (Iterable) modelBuilder.getColumnsForExport();
}
@Override
@@ -371,7 +371,7 @@
@Override
public final Iterable<ExportableColumn<E, Object>> getColumnsForExport() {
- return (Iterable) modelBuilder.getColumnsForImport();
+ return (Iterable) modelBuilder.getColumnsForExport();
}
}
1
0
r285 - in trunk/echobase-ui/src/main: java/fr/ifremer/echobase/ui/actions/importData resources/config resources/fr/ifremer/echobase/ui/actions/importData resources/i18n webapp/WEB-INF/jsp/importData
by tchemit@users.forge.codelutin.com 15 Jan '12
by tchemit@users.forge.codelutin.com 15 Jan '12
15 Jan '12
Author: tchemit
Date: 2012-01-15 23:12:51 +0100 (Sun, 15 Jan 2012)
New Revision: 285
Url: http://forge.codelutin.com/repositories/revision/echobase/285
Log:
rename import data actions
make import data configure validation ok
improve i18n for import data
Added:
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/ConfigureAccousticRegionData.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/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/LaunchAccousticData.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/LaunchCatchesData.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
Removed:
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticDataImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionDataImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesDataImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualDataImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReferenceImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataCompleteImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransectImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticDataImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticRegionDataImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesDataImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesIndividualDataImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesReferenceImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataCompleteImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataFromTransectImport.java
Modified:
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/ConfigureAccousticRegionData-validation.xml
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/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/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/configureAccousticRegionData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesIndividualData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesReference.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataComplete.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataFromTransect.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAccousticData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAccousticRegionData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesData.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/resultAccousticData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticRegionData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesIndividualData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesReference.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataComplete.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataFromTransect.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/selectImportType.jsp
Copied: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticData.java (from rev 267, trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticDataImport.java)
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticData.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticData.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -0,0 +1,92 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.entities.data.Voyage;
+import fr.ifremer.echobase.entities.references.Vessel;
+import fr.ifremer.echobase.services.EchoBaseServiceSupport;
+import fr.ifremer.echobase.services.configurations.AccousticDataImportConfiguration;
+
+import java.io.File;
+import java.util.Map;
+
+/**
+ * Configure a accoustic data import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class ConfigureAccousticData extends AbstractConfigureImport<AccousticDataImportConfiguration> {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Universe of existing voyages. */
+ protected Map<String, String> voyages;
+
+ /** Universe of existing vessels. */
+ protected Map<String, String> vessels;
+
+ public ConfigureAccousticData() {
+ super(AccousticDataImportConfiguration.class);
+ }
+
+ @Override
+ protected AccousticDataImportConfiguration createModel() {
+ return new AccousticDataImportConfiguration(getLocale());
+ }
+
+ @Override
+ public String input() throws Exception {
+
+ super.input();
+
+ EchoBaseServiceSupport service =
+ newService(EchoBaseServiceSupport.class);
+
+ voyages = loadSortAndDecorate(service, Voyage.class);
+ vessels = loadSortAndDecorate(service, Vessel.class);
+
+ return INPUT;
+ }
+
+ public Map<String, String> getVoyages() {
+ return voyages;
+ }
+
+ public Map<String, String> getVessels() {
+ return vessels;
+ }
+
+ public void setMoviesFile(File file) {
+ getModel().getMoviesFile().setFile(file);
+ }
+
+ public void setMoviesFileContentType(String contentType) {
+ getModel().getMoviesFile().setContentType(contentType);
+ }
+
+ public void setMoviesFileFileName(String fileName) {
+ getModel().getMoviesFile().setFileName(fileName);
+ }
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticData.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/ConfigureAccousticDataImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticDataImport.java 2012-01-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticDataImport.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -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.AccousticDataImportConfiguration;
-
-import java.io.File;
-import java.util.Map;
-
-/**
- * Configure a accoustic data import.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.3
- */
-public class ConfigureAccousticDataImport extends AbstractConfigureImport<AccousticDataImportConfiguration> {
-
- private static final long serialVersionUID = 1L;
-
- /** Universe of existing voyages. */
- protected Map<String, String> voyages;
-
- /** Universe of existing vessels. */
- protected Map<String, String> vessels;
-
- public ConfigureAccousticDataImport() {
- super(AccousticDataImportConfiguration.class);
- }
-
- @Override
- protected AccousticDataImportConfiguration createModel() {
- return new AccousticDataImportConfiguration(getLocale());
- }
-
- @Override
- public String input() throws Exception {
-
- super.input();
-
- EchoBaseServiceSupport service =
- newService(EchoBaseServiceSupport.class);
-
- voyages = loadSortAndDecorate(service, Voyage.class);
- vessels = loadSortAndDecorate(service, Vessel.class);
-
- return INPUT;
- }
-
- public Map<String, String> getVoyages() {
- return voyages;
- }
-
- public Map<String, String> getVessels() {
- return vessels;
- }
-
- public void setMoviesFile(File file) {
- getModel().getMoviesFile().setFile(file);
- }
-
- public void setMoviesFileContentType(String contentType) {
- getModel().getMoviesFile().setContentType(contentType);
- }
-
- public void setMoviesFileFileName(String fileName) {
- getModel().getMoviesFile().setFileName(fileName);
- }
-}
Copied: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionData.java (from rev 267, trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionDataImport.java)
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionData.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionData.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -0,0 +1,104 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.entities.data.Voyage;
+import fr.ifremer.echobase.entities.references.Vessel;
+import fr.ifremer.echobase.services.EchoBaseServiceSupport;
+import fr.ifremer.echobase.services.configurations.AccousticRegionDataImportConfiguration;
+
+import java.io.File;
+import java.util.Map;
+
+/**
+ * Configure a "accoustic region data" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class 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);
+ }
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionData.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/ConfigureAccousticRegionDataImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionDataImport.java 2012-01-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionDataImport.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -1,104 +0,0 @@
-/*
- * #%L
- * EchoBase :: UI
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 - 2012 Ifremer, Codelutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.echobase.ui.actions.importData;
-
-import fr.ifremer.echobase.entities.data.Voyage;
-import fr.ifremer.echobase.entities.references.Vessel;
-import fr.ifremer.echobase.services.EchoBaseServiceSupport;
-import fr.ifremer.echobase.services.configurations.AccousticRegionDataImportConfiguration;
-
-import java.io.File;
-import java.util.Map;
-
-/**
- * Configure a "accoustic region data" import.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.3
- */
-public class ConfigureAccousticRegionDataImport extends AbstractConfigureImport<AccousticRegionDataImportConfiguration> {
-
- private static final long serialVersionUID = 1L;
-
- /** Universe of existing voyages. */
- protected Map<String, String> voyages;
-
- /** Universe of existing vessels. */
- protected Map<String, String> vessels;
-
- public ConfigureAccousticRegionDataImport() {
- super(AccousticRegionDataImportConfiguration.class);
- }
-
- @Override
- protected AccousticRegionDataImportConfiguration createModel() {
- return new AccousticRegionDataImportConfiguration(getLocale());
- }
-
- @Override
- public String input() throws Exception {
-
- super.input();
-
- EchoBaseServiceSupport service =
- newService(EchoBaseServiceSupport.class);
-
- voyages = loadSortAndDecorate(service, Voyage.class);
- vessels = loadSortAndDecorate(service, Vessel.class);
-
- return INPUT;
- }
-
- public Map<String, String> getVoyages() {
- return voyages;
- }
-
- public Map<String, String> getVessels() {
- return vessels;
- }
-
- public void setRegionsFile(File file) {
- getModel().getRegionsFile().setFile(file);
- }
-
- public void setRegionsFileContentType(String contentType) {
- getModel().getRegionsFile().setContentType(contentType);
- }
-
- public void setRegionsFileFileName(String fileName) {
- getModel().getRegionsFile().setFileName(fileName);
- }
-
- public void setAssociationFile(File file) {
- getModel().getAssociationFile().setFile(file);
- }
-
- public void setAssociationFileContentType(String contentType) {
- getModel().getAssociationFile().setContentType(contentType);
- }
-
- public void setAssociationFileFileName(String fileName) {
- getModel().getAssociationFile().setFileName(fileName);
- }
-}
Copied: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesData.java (from rev 267, trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesDataImport.java)
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesData.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesData.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -0,0 +1,119 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.entities.data.Voyage;
+import fr.ifremer.echobase.services.EchoBaseServiceSupport;
+import fr.ifremer.echobase.services.configurations.CatchesDataImportConfiguration;
+
+import java.io.File;
+import java.util.Map;
+
+/**
+ * Configure a "catches data" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class ConfigureCatchesData extends AbstractConfigureImport<CatchesDataImportConfiguration> {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Universe of existing voyages. */
+ protected Map<String, String> voyages;
+
+ public ConfigureCatchesData() {
+ super(CatchesDataImportConfiguration.class);
+ }
+
+ @Override
+ protected CatchesDataImportConfiguration createModel() {
+ return new CatchesDataImportConfiguration(getLocale());
+ }
+
+ @Override
+ public String input() throws Exception {
+
+ super.input();
+
+ EchoBaseServiceSupport service =
+ newService(EchoBaseServiceSupport.class);
+
+ voyages = loadSortAndDecorate(service, Voyage.class);
+
+ return INPUT;
+ }
+
+ public Map<String, String> getVoyages() {
+ return voyages;
+ }
+
+ public void setTlbeStationFile(File file) {
+ getModel().getTlbeStationFile().setFile(file);
+ }
+
+ public void setTlbeStationFileContentType(String contentType) {
+ getModel().getTlbeStationFile().setContentType(contentType);
+ }
+
+ public void setTlbeStationFileFileName(String fileName) {
+ getModel().getTlbeStationFile().setFileName(fileName);
+ }
+
+ public void setXtblTriFile(File file) {
+ getModel().getXtblTriFile().setFile(file);
+ }
+
+ public void setXtblTriFileContentType(String contentType) {
+ getModel().getXtblTriFile().setContentType(contentType);
+ }
+
+ public void setXtblTriFileFileName(String fileName) {
+ getModel().getXtblTriFile().setFileName(fileName);
+ }
+
+ public void setTblMensurationFile(File file) {
+ getModel().getTblMensurationFile().setFile(file);
+ }
+
+ public void setTblMensurationFileContentType(String contentType) {
+ getModel().getTblMensurationFile().setContentType(contentType);
+ }
+
+ public void setTblMensurationFileFileName(String fileName) {
+ getModel().getTblMensurationFile().setFileName(fileName);
+ }
+
+ public void setTblMensurationClasseFile(File file) {
+ getModel().getTblMensurationClasseFile().setFile(file);
+ }
+
+ public void setTblMensurationClasseFileContentType(String contentType) {
+ getModel().getTblMensurationClasseFile().setContentType(contentType);
+ }
+
+ public void setTblMensurationClasseFileFileName(String fileName) {
+ getModel().getTblMensurationClasseFile().setFileName(fileName);
+ }
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesData.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/ConfigureCatchesDataImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesDataImport.java 2012-01-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesDataImport.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -1,119 +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.CatchesDataImportConfiguration;
-
-import java.io.File;
-import java.util.Map;
-
-/**
- * Configure a "catches data" import.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.3
- */
-public class ConfigureCatchesDataImport extends AbstractConfigureImport<CatchesDataImportConfiguration> {
-
- private static final long serialVersionUID = 1L;
-
- /** Universe of existing voyages. */
- protected Map<String, String> voyages;
-
- public ConfigureCatchesDataImport() {
- super(CatchesDataImportConfiguration.class);
- }
-
- @Override
- protected CatchesDataImportConfiguration createModel() {
- return new CatchesDataImportConfiguration(getLocale());
- }
-
- @Override
- public String input() throws Exception {
-
- super.input();
-
- EchoBaseServiceSupport service =
- newService(EchoBaseServiceSupport.class);
-
- voyages = loadSortAndDecorate(service, Voyage.class);
-
- return INPUT;
- }
-
- public Map<String, String> getVoyages() {
- return voyages;
- }
-
- public void setTlbeStationFile(File file) {
- getModel().getTlbeStationFile().setFile(file);
- }
-
- public void setTlbeStationFileContentType(String contentType) {
- getModel().getTlbeStationFile().setContentType(contentType);
- }
-
- public void setTlbeStationFileFileName(String fileName) {
- getModel().getTlbeStationFile().setFileName(fileName);
- }
-
- public void setXtblTriFile(File file) {
- getModel().getXtblTriFile().setFile(file);
- }
-
- public void setXtblTriFileContentType(String contentType) {
- getModel().getXtblTriFile().setContentType(contentType);
- }
-
- public void setXtblTriFileFileName(String fileName) {
- getModel().getXtblTriFile().setFileName(fileName);
- }
-
- public void setTblMensurationFile(File file) {
- getModel().getTblMensurationFile().setFile(file);
- }
-
- public void setTblMensurationFileContentType(String contentType) {
- getModel().getTblMensurationFile().setContentType(contentType);
- }
-
- public void setTblMensurationFileFileName(String fileName) {
- getModel().getTblMensurationFile().setFileName(fileName);
- }
-
- public void setTblMensurationClasseFile(File file) {
- getModel().getTblMensurationClasseFile().setFile(file);
- }
-
- public void setTblMensurationClasseFileContentType(String contentType) {
- getModel().getTblMensurationClasseFile().setContentType(contentType);
- }
-
- public void setTblMensurationClasseFileFileName(String fileName) {
- getModel().getTblMensurationClasseFile().setFileName(fileName);
- }
-}
Copied: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualData.java (from rev 267, trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualDataImport.java)
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualData.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualData.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -0,0 +1,83 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.entities.data.Voyage;
+import fr.ifremer.echobase.services.EchoBaseServiceSupport;
+import fr.ifremer.echobase.services.configurations.CatchesIndividualDataImportConfiguration;
+
+import java.io.File;
+import java.util.Map;
+
+/**
+ * Configure a "catches individual data" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class 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);
+ }
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualData.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/ConfigureCatchesIndividualDataImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualDataImport.java 2012-01-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualDataImport.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -1,83 +0,0 @@
-/*
- * #%L
- * EchoBase :: UI
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 - 2012 Ifremer, Codelutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.echobase.ui.actions.importData;
-
-import fr.ifremer.echobase.entities.data.Voyage;
-import fr.ifremer.echobase.services.EchoBaseServiceSupport;
-import fr.ifremer.echobase.services.configurations.CatchesIndividualDataImportConfiguration;
-
-import java.io.File;
-import java.util.Map;
-
-/**
- * Configure a "catches individual data" import.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.3
- */
-public class ConfigureCatchesIndividualDataImport extends AbstractConfigureImport<CatchesIndividualDataImportConfiguration> {
-
- private static final long serialVersionUID = 1L;
-
- /** Universe of existing voyages. */
- protected Map<String, String> voyages;
-
- public ConfigureCatchesIndividualDataImport() {
- super(CatchesIndividualDataImportConfiguration.class);
- }
-
- @Override
- protected CatchesIndividualDataImportConfiguration createModel() {
- return new CatchesIndividualDataImportConfiguration(getLocale());
- }
-
- @Override
- public String input() throws Exception {
-
- super.input();
-
- EchoBaseServiceSupport service =
- newService(EchoBaseServiceSupport.class);
-
- voyages = loadSortAndDecorate(service, Voyage.class);
-
- return INPUT;
- }
-
- public Map<String, String> getVoyages() {
- return voyages;
- }
-
- public void setIndividualDataFile(File file) {
- getModel().getIndividualDataFile().setFile(file);
- }
-
- public void setIndividualDataFileContentType(String contentType) {
- getModel().getIndividualDataFile().setContentType(contentType);
- }
-
- public void setIndividualDataFileFileName(String fileName) {
- getModel().getIndividualDataFile().setFileName(fileName);
- }
-}
Copied: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReference.java (from rev 267, trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReferenceImport.java)
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReference.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReference.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -0,0 +1,72 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.services.configurations.CatchesReferenceImportConfiguration;
+
+import java.io.File;
+
+/**
+ * Configure a accoustic data import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class 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);
+ }
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReference.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/ConfigureCatchesReferenceImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReferenceImport.java 2012-01-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReferenceImport.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -1,72 +0,0 @@
-/*
- * #%L
- * EchoBase :: UI
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 - 2012 Ifremer, Codelutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.echobase.ui.actions.importData;
-
-import fr.ifremer.echobase.services.configurations.CatchesReferenceImportConfiguration;
-
-import java.io.File;
-
-/**
- * Configure a accoustic data import.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.3
- */
-public class ConfigureCatchesReferenceImport extends AbstractConfigureImport<CatchesReferenceImportConfiguration> {
-
- private static final long serialVersionUID = 1L;
-
- public ConfigureCatchesReferenceImport() {
- super(CatchesReferenceImportConfiguration.class);
- }
-
- @Override
- protected CatchesReferenceImportConfiguration createModel() {
- return new CatchesReferenceImportConfiguration(getLocale());
- }
-
- public void setLengthAgeKeyFileFile(File file) {
- getModel().getLengthAgeKeyFile().setFile(file);
- }
-
- public void setLengthAgeKeyFileContentType(String contentType) {
- getModel().getLengthAgeKeyFile().setContentType(contentType);
- }
-
- public void setLengthAgeKeyFileFileName(String fileName) {
- getModel().getLengthAgeKeyFile().setFileName(fileName);
- }
-
- public void setLengthWeightKeyFileFile(File file) {
- getModel().getLengthWeightKeyFile().setFile(file);
- }
-
- public void setLengthWeightKeyFileContentType(String contentType) {
- getModel().getLengthWeightKeyFile().setContentType(contentType);
- }
-
- public void setLengthWeightKeyFileFileName(String fileName) {
- getModel().getLengthWeightKeyFile().setFileName(fileName);
- }
-}
Copied: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataComplete.java (from rev 284, trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataCompleteImport.java)
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataComplete.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataComplete.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -0,0 +1,196 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import com.opensymphony.xwork2.interceptor.annotations.InputConfig;
+import fr.ifremer.echobase.entities.references.AreaOfOperation;
+import fr.ifremer.echobase.entities.references.Mission;
+import fr.ifremer.echobase.entities.references.MissionImpl;
+import fr.ifremer.echobase.entities.references.Vessel;
+import fr.ifremer.echobase.services.CommonDataCompleteImportService;
+import fr.ifremer.echobase.services.EchoBaseServiceSupport;
+import fr.ifremer.echobase.services.configurations.CommonDataCompleteImportConfiguration;
+
+import java.io.File;
+import java.util.Map;
+
+/**
+ * Configure a accoustic data import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class ConfigureCommonDataComplete extends AbstractConfigureImport<CommonDataCompleteImportConfiguration> {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Universe of existing missions. */
+ protected Map<String, String> missions;
+
+ /** Universe of existing area of operations. */
+ protected Map<String, String> areaOfOperations;
+
+ /** Universe of existing vessels. */
+ protected Map<String, String> vessels;
+
+ /** Universe of possible import modes. */
+ protected Map<String, String> importModes;
+
+ /** Selected import mode. */
+ protected SelectedMissionMode importMode;
+
+ /** mission to create (if asked to create a new mission). */
+ protected Mission mission;
+
+ public ConfigureCommonDataComplete() {
+ super(CommonDataCompleteImportConfiguration.class);
+ }
+
+ @Override
+ protected CommonDataCompleteImportConfiguration createModel() {
+ return new CommonDataCompleteImportConfiguration(getLocale());
+ }
+
+ @Override
+ public String input() throws Exception {
+
+ super.input();
+
+ EchoBaseServiceSupport service =
+ newService(EchoBaseServiceSupport.class);
+
+ missions = loadSortAndDecorate(service, Mission.class);
+ areaOfOperations = loadSortAndDecorate(service, AreaOfOperation.class);
+ vessels = loadSortAndDecorate(service, Vessel.class);
+
+ importModes = decorateEnums(SelectedMissionMode.values());
+
+ if (importMode == null) {
+ importMode = SelectedMissionMode.USE_EXISTING_MISSION;
+ }
+
+ return INPUT;
+ }
+
+ @InputConfig(methodName = "input")
+ @Override
+ public String execute() throws Exception {
+
+ super.execute();
+
+ if (importMode == SelectedMissionMode.CREATE_NEW_MISSION) {
+
+ // create voyage in db
+ CommonDataCompleteImportService service =
+ newService(CommonDataCompleteImportService.class);
+
+ Mission missionToCreate = getMission();
+
+ Mission missionSaved = service.createMission(missionToCreate);
+
+ getModel().setMissionId(missionSaved.getTopiaId());
+ }
+
+ return SUCCESS;
+ }
+
+ public Map<String, String> getMissions() {
+ return missions;
+ }
+
+ public Map<String, String> getAreaOfOperations() {
+ return areaOfOperations;
+ }
+
+ public Map<String, String> getVessels() {
+ return vessels;
+ }
+
+ public Map<String, String> getImportModes() {
+ return importModes;
+ }
+
+ public SelectedMissionMode getImportMode() {
+ return importMode;
+ }
+
+ public Mission getMission() {
+ if (mission == null) {
+ mission = new MissionImpl();
+ }
+ return mission;
+ }
+
+ public void setImportMode(SelectedMissionMode importMode) {
+ this.importMode = importMode;
+ }
+
+ public void setVoyageFile(File file) {
+ getModel().getVoyageFile().setFile(file);
+ }
+
+ public void setVoyageFileContentType(String contentType) {
+ getModel().getVoyageFile().setContentType(contentType);
+ }
+
+ public void setVoyageFileFileName(String fileName) {
+ getModel().getVoyageFile().setFileName(fileName);
+ }
+
+ public void setTransitFile(File file) {
+ getModel().getTransitFile().setFile(file);
+ }
+
+ public void setTransitFileContentType(String contentType) {
+ getModel().getTransitFile().setContentType(contentType);
+ }
+
+ public void setTransitFileFileName(String fileName) {
+ getModel().getTransitFile().setFileName(fileName);
+ }
+
+ public void setTransectFile(File file) {
+ getModel().getTransectFile().setFile(file);
+ }
+
+ public void setTransectFileContentType(String contentType) {
+ getModel().getTransectFile().setContentType(contentType);
+ }
+
+ public void setTransectFileFileName(String fileName) {
+ getModel().getTransectFile().setFileName(fileName);
+ }
+
+ public void setEchotypeFile(File file) {
+ getModel().getEchotypeFile().setFile(file);
+ }
+
+ public void setEchotypeFileContentType(String contentType) {
+ getModel().getEchotypeFile().setContentType(contentType);
+ }
+
+ public void setEchotypeFileFileName(String fileName) {
+ getModel().getEchotypeFile().setFileName(fileName);
+ }
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataComplete.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/ConfigureCommonDataCompleteImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataCompleteImport.java 2012-01-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataCompleteImport.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -1,194 +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.references.AreaOfOperation;
-import fr.ifremer.echobase.entities.references.Mission;
-import fr.ifremer.echobase.entities.references.MissionImpl;
-import fr.ifremer.echobase.entities.references.Vessel;
-import fr.ifremer.echobase.services.CommonDataCompleteImportService;
-import fr.ifremer.echobase.services.EchoBaseServiceSupport;
-import fr.ifremer.echobase.services.configurations.CommonDataCompleteImportConfiguration;
-
-import java.io.File;
-import java.util.Map;
-
-/**
- * Configure a accoustic data import.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.3
- */
-public class ConfigureCommonDataCompleteImport 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 ConfigureCommonDataCompleteImport() {
- super(CommonDataCompleteImportConfiguration.class);
- }
-
- @Override
- protected CommonDataCompleteImportConfiguration createModel() {
- return new CommonDataCompleteImportConfiguration(getLocale());
- }
-
- @Override
- public String input() throws Exception {
-
- super.input();
-
- EchoBaseServiceSupport service =
- newService(EchoBaseServiceSupport.class);
-
- missions = loadSortAndDecorate(service, Mission.class);
- areaOfOperations = loadSortAndDecorate(service, AreaOfOperation.class);
- vessels = loadSortAndDecorate(service, Vessel.class);
-
- importModes = decorateEnums(SelectedMissionMode.values());
-
- if (importMode == null) {
- importMode = SelectedMissionMode.USE_EXISTING_MISSION;
- }
-
- return INPUT;
- }
-
- @Override
- public String execute() throws Exception {
-
- super.execute();
-
- if (importMode == SelectedMissionMode.CREATE_NEW_MISSION) {
-
- // create voyage in db
- 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);
- }
-}
Copied: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransect.java (from rev 284, trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransectImport.java)
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransect.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransect.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -0,0 +1,92 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.entities.data.Voyage;
+import fr.ifremer.echobase.entities.references.Vessel;
+import fr.ifremer.echobase.services.EchoBaseServiceSupport;
+import fr.ifremer.echobase.services.configurations.CommonDataFromTransectImportConfiguration;
+
+import java.io.File;
+import java.util.Map;
+
+/**
+ * Configure a "common data from transect" import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class ConfigureCommonDataFromTransect extends AbstractConfigureImport<CommonDataFromTransectImportConfiguration> {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Universe of existing voyages. */
+ protected Map<String, String> voyages;
+
+ /** Universe of existing vessels. */
+ protected Map<String, String> vessels;
+
+ public ConfigureCommonDataFromTransect() {
+ super(CommonDataFromTransectImportConfiguration.class);
+ }
+
+ @Override
+ protected CommonDataFromTransectImportConfiguration createModel() {
+ return new CommonDataFromTransectImportConfiguration(getLocale());
+ }
+
+ @Override
+ public String input() throws Exception {
+
+ super.input();
+
+ EchoBaseServiceSupport service =
+ newService(EchoBaseServiceSupport.class);
+
+ voyages = loadSortAndDecorate(service, Voyage.class);
+ vessels = loadSortAndDecorate(service, Vessel.class);
+
+ return INPUT;
+ }
+
+ public Map<String, String> getVoyages() {
+ return voyages;
+ }
+
+ public Map<String, String> getVessels() {
+ return vessels;
+ }
+
+ public void setTransectFile(File file) {
+ getModel().getTransectFile().setFile(file);
+ }
+
+ public void setTransectFileContentType(String contentType) {
+ getModel().getTransectFile().setContentType(contentType);
+ }
+
+ public void setTransectFileFileName(String fileName) {
+ getModel().getTransectFile().setFileName(fileName);
+ }
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransect.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/ConfigureCommonDataFromTransectImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransectImport.java 2012-01-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransectImport.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -1,92 +0,0 @@
-/*
- * #%L
- * EchoBase :: UI
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 - 2012 Ifremer, Codelutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.echobase.ui.actions.importData;
-
-import fr.ifremer.echobase.entities.data.Voyage;
-import fr.ifremer.echobase.entities.references.Vessel;
-import fr.ifremer.echobase.services.EchoBaseServiceSupport;
-import fr.ifremer.echobase.services.configurations.CommonDataFromTransectImportConfiguration;
-
-import java.io.File;
-import java.util.Map;
-
-/**
- * Configure a "common data from transect" import.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.3
- */
-public class ConfigureCommonDataFromTransectImport 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 ConfigureCommonDataFromTransectImport() {
- super(CommonDataFromTransectImportConfiguration.class);
- }
-
- @Override
- protected CommonDataFromTransectImportConfiguration createModel() {
- return new CommonDataFromTransectImportConfiguration(getLocale());
- }
-
- @Override
- public String input() throws Exception {
-
- super.input();
-
- EchoBaseServiceSupport service =
- newService(EchoBaseServiceSupport.class);
-
- voyages = loadSortAndDecorate(service, Voyage.class);
- 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);
- }
-}
Copied: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticData.java (from rev 267, trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticDataImport.java)
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticData.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticData.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -0,0 +1,43 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.services.AccousticDataImportService;
+import fr.ifremer.echobase.services.configurations.AccousticDataImportConfiguration;
+
+/**
+ * Configure a accoustic data import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class LaunchAccousticData extends AbstractLaunchImport<AccousticDataImportConfiguration, AccousticDataImportService> {
+
+ private static final long serialVersionUID = 1L;
+
+ public LaunchAccousticData() {
+ super(AccousticDataImportConfiguration.class, AccousticDataImportService.class);
+ }
+
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticData.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/LaunchAccousticDataImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticDataImport.java 2012-01-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticDataImport.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -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.AccousticDataImportService;
-import fr.ifremer.echobase.services.configurations.AccousticDataImportConfiguration;
-
-/**
- * Configure a accoustic data import.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.3
- */
-public class LaunchAccousticDataImport extends AbstractLaunchImport<AccousticDataImportConfiguration, AccousticDataImportService> {
-
- private static final long serialVersionUID = 1L;
-
- public LaunchAccousticDataImport() {
- super(AccousticDataImportConfiguration.class, AccousticDataImportService.class);
- }
-
-}
Copied: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticRegionData.java (from rev 267, trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticRegionDataImport.java)
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticRegionData.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticRegionData.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -0,0 +1,43 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.services.AccousticRegionDataImportService;
+import fr.ifremer.echobase.services.configurations.AccousticRegionDataImportConfiguration;
+
+/**
+ * Configure a accoustic data import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class LaunchAccousticRegionData extends AbstractLaunchImport<AccousticRegionDataImportConfiguration, AccousticRegionDataImportService> {
+
+ private static final long serialVersionUID = 1L;
+
+ public LaunchAccousticRegionData() {
+ super(AccousticRegionDataImportConfiguration.class, AccousticRegionDataImportService.class);
+ }
+
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticRegionData.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/LaunchAccousticRegionDataImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticRegionDataImport.java 2012-01-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticRegionDataImport.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -1,43 +0,0 @@
-/*
- * #%L
- * EchoBase :: UI
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 - 2012 Ifremer, Codelutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.echobase.ui.actions.importData;
-
-import fr.ifremer.echobase.services.AccousticRegionDataImportService;
-import fr.ifremer.echobase.services.configurations.AccousticRegionDataImportConfiguration;
-
-/**
- * Configure a accoustic data import.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.3
- */
-public class LaunchAccousticRegionDataImport extends AbstractLaunchImport<AccousticRegionDataImportConfiguration, AccousticRegionDataImportService> {
-
- private static final long serialVersionUID = 1L;
-
- public LaunchAccousticRegionDataImport() {
- super(AccousticRegionDataImportConfiguration.class, AccousticRegionDataImportService.class);
- }
-
-}
Copied: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesData.java (from rev 267, trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesDataImport.java)
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesData.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesData.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -0,0 +1,43 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.services.CatchesDataImportService;
+import fr.ifremer.echobase.services.configurations.CatchesDataImportConfiguration;
+
+/**
+ * Configure a accoustic data import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class LaunchCatchesData extends AbstractLaunchImport<CatchesDataImportConfiguration, CatchesDataImportService> {
+
+ private static final long serialVersionUID = 1L;
+
+ public LaunchCatchesData() {
+ super(CatchesDataImportConfiguration.class, CatchesDataImportService.class);
+ }
+
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesData.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/LaunchCatchesDataImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesDataImport.java 2012-01-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesDataImport.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -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.CatchesDataImportService;
-import fr.ifremer.echobase.services.configurations.CatchesDataImportConfiguration;
-
-/**
- * Configure a accoustic data import.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.3
- */
-public class LaunchCatchesDataImport extends AbstractLaunchImport<CatchesDataImportConfiguration, CatchesDataImportService> {
-
- private static final long serialVersionUID = 1L;
-
- public LaunchCatchesDataImport() {
- super(CatchesDataImportConfiguration.class, CatchesDataImportService.class);
- }
-
-}
Copied: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesIndividualData.java (from rev 267, trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesIndividualDataImport.java)
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesIndividualData.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesIndividualData.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -0,0 +1,43 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.services.CatchesIndividualDataImportService;
+import fr.ifremer.echobase.services.configurations.CatchesIndividualDataImportConfiguration;
+
+/**
+ * Configure a accoustic data import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class LaunchCatchesIndividualData extends AbstractLaunchImport<CatchesIndividualDataImportConfiguration, CatchesIndividualDataImportService> {
+
+ private static final long serialVersionUID = 1L;
+
+ public LaunchCatchesIndividualData() {
+ super(CatchesIndividualDataImportConfiguration.class, CatchesIndividualDataImportService.class);
+ }
+
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesIndividualData.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/LaunchCatchesIndividualDataImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesIndividualDataImport.java 2012-01-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesIndividualDataImport.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -1,43 +0,0 @@
-/*
- * #%L
- * EchoBase :: UI
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 - 2012 Ifremer, Codelutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.echobase.ui.actions.importData;
-
-import fr.ifremer.echobase.services.CatchesIndividualDataImportService;
-import fr.ifremer.echobase.services.configurations.CatchesIndividualDataImportConfiguration;
-
-/**
- * Configure a accoustic data import.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.3
- */
-public class LaunchCatchesIndividualDataImport extends AbstractLaunchImport<CatchesIndividualDataImportConfiguration, CatchesIndividualDataImportService> {
-
- private static final long serialVersionUID = 1L;
-
- public LaunchCatchesIndividualDataImport() {
- super(CatchesIndividualDataImportConfiguration.class, CatchesIndividualDataImportService.class);
- }
-
-}
Copied: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesReference.java (from rev 267, trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesReferenceImport.java)
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesReference.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesReference.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -0,0 +1,43 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.services.CatchesReferenceImportService;
+import fr.ifremer.echobase.services.configurations.CatchesReferenceImportConfiguration;
+
+/**
+ * Configure a accoustic data import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class LaunchCatchesReference extends AbstractLaunchImport<CatchesReferenceImportConfiguration, CatchesReferenceImportService> {
+
+ private static final long serialVersionUID = 1L;
+
+ public LaunchCatchesReference() {
+ super(CatchesReferenceImportConfiguration.class, CatchesReferenceImportService.class);
+ }
+
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesReference.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/LaunchCatchesReferenceImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesReferenceImport.java 2012-01-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesReferenceImport.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -1,43 +0,0 @@
-/*
- * #%L
- * EchoBase :: UI
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 - 2012 Ifremer, Codelutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.echobase.ui.actions.importData;
-
-import fr.ifremer.echobase.services.CatchesReferenceImportService;
-import fr.ifremer.echobase.services.configurations.CatchesReferenceImportConfiguration;
-
-/**
- * Configure a accoustic data import.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.3
- */
-public class LaunchCatchesReferenceImport extends AbstractLaunchImport<CatchesReferenceImportConfiguration, CatchesReferenceImportService> {
-
- private static final long serialVersionUID = 1L;
-
- public LaunchCatchesReferenceImport() {
- super(CatchesReferenceImportConfiguration.class, CatchesReferenceImportService.class);
- }
-
-}
Copied: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataComplete.java (from rev 267, trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataCompleteImport.java)
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataComplete.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataComplete.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -0,0 +1,43 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.services.CommonDataCompleteImportService;
+import fr.ifremer.echobase.services.configurations.CommonDataCompleteImportConfiguration;
+
+/**
+ * Configure a accoustic data import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class LaunchCommonDataComplete extends AbstractLaunchImport<CommonDataCompleteImportConfiguration, CommonDataCompleteImportService> {
+
+ private static final long serialVersionUID = 1L;
+
+ public LaunchCommonDataComplete() {
+ super(CommonDataCompleteImportConfiguration.class, CommonDataCompleteImportService.class);
+ }
+
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataComplete.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/LaunchCommonDataCompleteImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataCompleteImport.java 2012-01-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataCompleteImport.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -1,43 +0,0 @@
-/*
- * #%L
- * EchoBase :: UI
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 - 2012 Ifremer, Codelutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.echobase.ui.actions.importData;
-
-import fr.ifremer.echobase.services.CommonDataCompleteImportService;
-import fr.ifremer.echobase.services.configurations.CommonDataCompleteImportConfiguration;
-
-/**
- * Configure a accoustic data import.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.3
- */
-public class LaunchCommonDataCompleteImport extends AbstractLaunchImport<CommonDataCompleteImportConfiguration, CommonDataCompleteImportService> {
-
- private static final long serialVersionUID = 1L;
-
- public LaunchCommonDataCompleteImport() {
- super(CommonDataCompleteImportConfiguration.class, CommonDataCompleteImportService.class);
- }
-
-}
Copied: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataFromTransect.java (from rev 267, trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataFromTransectImport.java)
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataFromTransect.java (rev 0)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataFromTransect.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -0,0 +1,43 @@
+/*
+ * #%L
+ * EchoBase :: UI
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Ifremer, Codelutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.echobase.ui.actions.importData;
+
+import fr.ifremer.echobase.services.CommonDataFromTransectImportService;
+import fr.ifremer.echobase.services.configurations.CommonDataFromTransectImportConfiguration;
+
+/**
+ * Configure a accoustic data import.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class LaunchCommonDataFromTransect extends AbstractLaunchImport<CommonDataFromTransectImportConfiguration, CommonDataFromTransectImportService> {
+
+ private static final long serialVersionUID = 1L;
+
+ public LaunchCommonDataFromTransect() {
+ super(CommonDataFromTransectImportConfiguration.class, CommonDataFromTransectImportService.class);
+ }
+
+}
Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataFromTransect.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/LaunchCommonDataFromTransectImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataFromTransectImport.java 2012-01-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataFromTransectImport.java 2012-01-15 22:12:51 UTC (rev 285)
@@ -1,43 +0,0 @@
-/*
- * #%L
- * EchoBase :: UI
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 - 2012 Ifremer, Codelutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.echobase.ui.actions.importData;
-
-import fr.ifremer.echobase.services.CommonDataFromTransectImportService;
-import fr.ifremer.echobase.services.configurations.CommonDataFromTransectImportConfiguration;
-
-/**
- * Configure a accoustic data import.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.3
- */
-public class LaunchCommonDataFromTransectImport extends AbstractLaunchImport<CommonDataFromTransectImportConfiguration, CommonDataFromTransectImportService> {
-
- private static final long serialVersionUID = 1L;
-
- public LaunchCommonDataFromTransectImport() {
- super(CommonDataFromTransectImportConfiguration.class, CommonDataFromTransectImportService.class);
- }
-
-}
Modified: trunk/echobase-ui/src/main/resources/config/struts-importData.xml
===================================================================
--- trunk/echobase-ui/src/main/resources/config/struts-importData.xml 2012-01-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/resources/config/struts-importData.xml 2012-01-15 22:12:51 UTC (rev 285)
@@ -46,7 +46,7 @@
<!-- Configure import -->
<action name="configure*"
- class="fr.ifremer.echobase.ui.actions.importData.Configure{1}Import">
+ 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">
@@ -57,7 +57,7 @@
<!-- Starts import -->
<action name="import*"
- class="fr.ifremer.echobase.ui.actions.importData.Launch{1}Import">
+ class="fr.ifremer.echobase.ui.actions.importData.Launch{1}">
<interceptor-ref name="basicStackLoggued"/>
<interceptor-ref name="execAndWait"/>
<result name="wait">/WEB-INF/jsp/importData/progress{1}.jsp</result>
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-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticData-validation.xml 2012-01-15 22:12:51 UTC (rev 285)
@@ -57,8 +57,9 @@
</field-validator>
</field>
- <field name="model.moviesFile.file">
- <field-validator type="required">
+ <field name="moviesFile">
+ <field-validator type="nfieldexpression">
+ <param name="expression">model.moviesFile.file!=null</param>
<message key="echobase.error.import.moviesFile.required"/>
</field-validator>
</field>
Modified: 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-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionData-validation.xml 2012-01-15 22:12:51 UTC (rev 285)
@@ -38,14 +38,16 @@
</field-validator>
</field>
- <field name="model.regionsFile.file">
- <field-validator type="required">
+ <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="model.associationFile.file">
- <field-validator type="required">
+ <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>
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-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesData-validation.xml 2012-01-15 22:12:51 UTC (rev 285)
@@ -32,26 +32,30 @@
</field-validator>
</field>
- <field name="model.tlbeStationFile.file">
- <field-validator type="required">
+ <field name="tlbeStationFile">
+ <field-validator type="nfieldexpression">
+ <param name="expression">model.tlbeStationFile.file!=null</param>
<message key="echobase.error.import.tlbeStationFile.required"/>
</field-validator>
</field>
- <field name="model.xtblTriFile.file">
- <field-validator type="required">
+ <field name="xtblTriFile">
+ <field-validator type="nfieldexpression">
+ <param name="expression">model.xtblTriFile.file!=null</param>
<message key="echobase.error.import.xtblTriFile.required"/>
</field-validator>
</field>
- <field name="model.tblMensurationFile.file">
- <field-validator type="required">
+ <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="model.tblMensurationClasseFile.file">
- <field-validator type="required">
+ <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>
Modified: 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-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualData-validation.xml 2012-01-15 22:12:51 UTC (rev 285)
@@ -32,8 +32,9 @@
</field-validator>
</field>
- <field name="model.individualDataFile.file">
- <field-validator type="required">
+ <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>
Modified: 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-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReference-validation.xml 2012-01-15 22:12:51 UTC (rev 285)
@@ -26,14 +26,16 @@
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
- <field name="model.lengthAgeKeyFile.file">
- <field-validator type="required">
+ <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="model.lengthWeightKeyFile.file">
- <field-validator type="required">
+ <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>
Modified: 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-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataComplete-validation.xml 2012-01-15 22:12:51 UTC (rev 285)
@@ -80,26 +80,30 @@
</field-validator>
</field>
- <field name="model.voyageFile.file">
- <field-validator type="required">
+ <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="model.transitFile.file">
- <field-validator type="required">
+ <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="model.transectFile.file">
- <field-validator type="required">
+ <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="model.echotypeFile.file">
- <field-validator type="required">
+ <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>
Modified: 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-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransect-validation.xml 2012-01-15 22:12:51 UTC (rev 285)
@@ -63,8 +63,9 @@
</field-validator>
</field>
- <field name="model.transectFile.file">
- <field-validator type="required">
+ <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>
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-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties 2012-01-15 22:12:51 UTC (rev 285)
@@ -19,27 +19,29 @@
echobase.action.reloadSqlQuery=Recharger
echobase.action.reset=Annuler
echobase.action.return=Retour
-echobase.common.transitRelatedActivity=RelatedActivity (transit)
-echobase.common.transectLicence=Licence (transect)
-echobase.common.transectGeospatialVerticalPositive=GeospatialVerticalPositive (transect)
-echobase.common.transectBinUnitsPingAxis=BinUnitsPingAxis (transect)
-echobase.common.echosounderSoundSpeed=echosounderSoundSpeed
-echobase.common.soundSpeedCalculations=soundSpeedCalculations
-echobase.common.pingDutyCycle=pingDutyCycle
-echobase.common.notes=notes
echobase.action.save=Sauvegarder
echobase.action.saveSqlQuery=Enregistrer la requête
echobase.common.admin=Administrateur
+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.importResult=Résultat \:
+echobase.common.inProgress=en cours...
echobase.common.jdbcLogin=Login de connexion
echobase.common.jdbcPassword=Mot de passe
echobase.common.jdbcUrl=Url de connexion
+echobase.common.notes=notes
echobase.common.password=Mot de passe
+echobase.common.pingDutyCycle=pingDutyCycle
+echobase.common.soundSpeedCalculations=soundSpeedCalculations
+echobase.common.transectBinUnitsPingAxis=BinUnitsPingAxis (transect)
+echobase.common.transectGeospatialVerticalPositive=GeospatialVerticalPositive (transect)
+echobase.common.transectLicence=Licence (transect)
+echobase.common.transitRelatedActivity=RelatedActivity (transit)
echobase.common.user=Utilisateur
echobase.common.voyageDescription=Description
echobase.error.bad.password=Mot de passe incorrrect
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-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticData.jsp 2012-01-15 22:12:51 UTC (rev 285)
@@ -24,7 +24,8 @@
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
-<title>Configuration <s:text name="echobase.common.importDataMode.accousticData"/></title>
+<title>Configuration <s:text
+ name="echobase.common.importDataMode.accousticData"/></title>
<script type="text/javascript">
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticRegionData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticRegionData.jsp 2012-01-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticRegionData.jsp 2012-01-15 22:12:51 UTC (rev 285)
@@ -24,7 +24,8 @@
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
-<title>Configuration <s:text name="echobase.common.importDataMode.accousticRegionData"/></title>
+<title>Configuration <s:text
+ name="echobase.common.importDataMode.accousticRegionData"/></title>
<script type="text/javascript">
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-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesData.jsp 2012-01-15 22:12:51 UTC (rev 285)
@@ -24,7 +24,8 @@
<%@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">
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesIndividualData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesIndividualData.jsp 2012-01-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesIndividualData.jsp 2012-01-15 22:12:51 UTC (rev 285)
@@ -24,7 +24,8 @@
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
-<title>Configuration <s:text name="echobase.common.importDataMode.catchesIndividualData"/></title>
+<title>Configuration <s:text
+ name="echobase.common.importDataMode.catchesIndividualData"/></title>
<script type="text/javascript">
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesReference.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesReference.jsp 2012-01-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesReference.jsp 2012-01-15 22:12:51 UTC (rev 285)
@@ -24,7 +24,8 @@
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
-<title>Configuration <s:text name="echobase.common.importDataMode.catchesReferences"/></title>
+<title>Configuration <s:text
+ name="echobase.common.importDataMode.catchesReferences"/></title>
<script type="text/javascript">
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataComplete.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataComplete.jsp 2012-01-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataComplete.jsp 2012-01-15 22:12:51 UTC (rev 285)
@@ -24,7 +24,8 @@
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
-<title>Configuration <s:text name="echobase.common.importDataMode.commonDataComplete"/></title>
+<title>Configuration <s:text
+ name="echobase.common.importDataMode.commonDataComplete"/></title>
<script type="text/javascript">
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataFromTransect.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataFromTransect.jsp 2012-01-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataFromTransect.jsp 2012-01-15 22:12:51 UTC (rev 285)
@@ -24,7 +24,8 @@
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
-<title>Configuration <s:text name="echobase.common.importDataMode.commonDataFromTransect"/></title>
+<title>Configuration <s:text
+ name="echobase.common.importDataMode.commonDataFromTransect"/></title>
<script type="text/javascript">
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-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAccousticData.jsp 2012-01-15 22:12:51 UTC (rev 285)
@@ -28,7 +28,8 @@
<s:url id="url" action="import-AccousticData" namespace="/importData"/>
<meta http-equiv="refresh" content="1;url=${url}"/>
-<title><s:text name="echobase.title.importDataProgress"/></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>
Modified: 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-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAccousticRegionData.jsp 2012-01-15 22:12:51 UTC (rev 285)
@@ -28,7 +28,8 @@
<s:url id="url" action="import-AccousticRegionData" namespace="/importData"/>
<meta http-equiv="refresh" content="1;url=${url}"/>
-<title><s:text name="echobase.title.importDataProgress"/></title>
+<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>
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-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesData.jsp 2012-01-15 22:12:51 UTC (rev 285)
@@ -28,7 +28,8 @@
<s:url id="url" action="import-CatchesData" namespace="/importData"/>
<meta http-equiv="refresh" content="1;url=${url}"/>
-<title><s:text name="echobase.title.importDataProgress"/></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>
Modified: 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-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesIndividualData.jsp 2012-01-15 22:12:51 UTC (rev 285)
@@ -28,7 +28,8 @@
<s:url id="url" action="import-CatchesIndividualData" namespace="/importData"/>
<meta http-equiv="refresh" content="1;url=${url}"/>
-<title><s:text name="echobase.title.importDataProgress"/></title>
+<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>
Modified: 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-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesReference.jsp 2012-01-15 22:12:51 UTC (rev 285)
@@ -28,7 +28,8 @@
<s:url id="url" action="import-CatchesReference" namespace="/importData"/>
<meta http-equiv="refresh" content="1;url=${url}"/>
-<title><s:text name="echobase.title.importDataProgress"/></title>
+<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>
Modified: 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-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonDataComplete.jsp 2012-01-15 22:12:51 UTC (rev 285)
@@ -28,7 +28,8 @@
<s:url id="url" action="import-CommonDataComplete" namespace="/importData"/>
<meta http-equiv="refresh" content="1;url=${url}"/>
-<title><s:text name="echobase.title.importDataProgress"/></title>
+<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>
Modified: 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-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonDataFromTransect.jsp 2012-01-15 22:12:51 UTC (rev 285)
@@ -28,7 +28,9 @@
<s:url id="url" action="import-CommonDataFromTransect" namespace="/importData"/>
<meta http-equiv="refresh" content="1;url=${url}"/>
-<title><s:text name="echobase.title.importDataProgress"/></title>
+<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>
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-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticData.jsp 2012-01-15 22:12:51 UTC (rev 285)
@@ -24,7 +24,8 @@
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
-<title><s:text name="echobase.title.importDataResult.accousticData"/></title>
+<title><s:text name="echobase.common.importResult"/> <s:text
+ name="echobase.common.importDataMode.accousticData"/></title>
<fieldset>
<legend>
Modified: 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-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticRegionData.jsp 2012-01-15 22:12:51 UTC (rev 285)
@@ -24,7 +24,8 @@
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
-<title><s:text name="echobase.title.importDataResult.accousticRegionData"/></title>
+<title><s:text name="echobase.common.importResult"/> <s:text
+ name="echobase.common.importDataMode.accousticRegionData"/></title>
<fieldset>
<legend>
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-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesData.jsp 2012-01-15 22:12:51 UTC (rev 285)
@@ -24,7 +24,8 @@
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
-<title><s:text name="echobase.title.importDataResult.catchesData"/></title>
+<title><s:text name="echobase.common.importResult"/> <s:text
+ name="echobase.common.importDataMode.catchesData"/></title>
<fieldset>
<legend>
Modified: 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-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesIndividualData.jsp 2012-01-15 22:12:51 UTC (rev 285)
@@ -24,7 +24,8 @@
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
-<title><s:text name="echobase.title.importDataResult.catchesIndividualData"/></title>
+<title><s:text name="echobase.common.importResult"/> <s:text
+ name="echobase.common.importDataMode.catchesIndividualData"/></title>
<fieldset>
<legend>
Modified: 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-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesReference.jsp 2012-01-15 22:12:51 UTC (rev 285)
@@ -24,7 +24,8 @@
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
-<title><s:text name="echobase.title.importDataResult.catchesReference"/></title>
+<title><s:text name="echobase.common.importResult"/> <s:text
+ name="echobase.common.importDataMode.catchesReferences"/></title>
<fieldset>
<legend>
Modified: 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-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataComplete.jsp 2012-01-15 22:12:51 UTC (rev 285)
@@ -24,7 +24,8 @@
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
-<title><s:text name="echobase.title.importDataResult.commonDataComplete"/></title>
+<title><s:text name="echobase.common.importResult"/> <s:text
+ name="echobase.common.importDataMode.commonDataComplete"/></title>
<fieldset>
<legend>
Modified: 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-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataFromTransect.jsp 2012-01-15 22:12:51 UTC (rev 285)
@@ -24,7 +24,8 @@
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
-<title><s:text name="echobase.title.importDataResult.commonDataFromTransect"/></title>
+<title><s:text name="echobase.common.importResult"/> <s:text
+ name="echobase.common.importDataMode.commonDataFromTransect"/></title>
<fieldset>
<legend>
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/selectImportType.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/selectImportType.jsp 2012-01-15 21:33:13 UTC (rev 284)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/selectImportType.jsp 2012-01-15 22:12:51 UTC (rev 285)
@@ -31,12 +31,12 @@
function updateMode(newValue) {
// change the action target
$('#selectImportType_configure').attr('name',
- 'action:configure-'+newValue+'!input');
+ 'action:configure-' + newValue + '!input');
}
jQuery(document).ready(function () {
- $('[name="mode"]').change(function(event) {
+ $('[name="mode"]').change(function (event) {
updateMode(this.value);
});
var val = $('[name="mode"][checked="checked"]').val();
@@ -52,7 +52,7 @@
</legend>
<s:radio key='mode' list="modes" cssClass="cleanBoth"
label='%{getText("echobase.common.importDataMode")}'
- required="true" template="myradiomap" />
+ required="true" template="myradiomap"/>
</fieldset>
1
0
15 Jan '12
Author: tchemit
Date: 2012-01-15 22:33:13 +0100 (Sun, 15 Jan 2012)
New Revision: 284
Url: http://forge.codelutin.com/repositories/revision/echobase/284
Log:
add import data configuration + clean jsp and i18n (to send it to Aurelie)
Added:
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/ConfigureAccousticRegionData-validation.xml
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/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/webapp/WEB-INF/jsp/importData/progressAccousticData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAccousticRegionData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesData.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
Removed:
trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureFiles-validation.xml
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureFiles.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureMission.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progress.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/result.jsp
Modified:
trunk/echobase-tools/src/test/resources/csv/new/input-TSParameters.csv
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationListener.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataCompleteImport.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransectImport.java
trunk/echobase-ui/src/main/resources/config/struts-importData.xml
trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties
trunk/echobase-ui/src/main/webapp/WEB-INF/includes/header.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/connectToDbInformations.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/dbeditor/dbeditor.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/exportQuery/exportQuery.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/exportQuery/exportQueryResult.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/home.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticRegionData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesIndividualData.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesReference.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataComplete.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataFromTransect.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/selectImportType.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/modificationLogs.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/user/Create.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/user/Delete.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/user/Update.jsp
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/user/userList.jsp
Property changes on: trunk/echobase-tools/src/test/resources/csv/new/input-TSParameters.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationListener.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationListener.java 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationListener.java 2012-01-15 21:33:13 UTC (rev 284)
@@ -218,7 +218,7 @@
"admin user (password admin).");
}
- service.createDefaultAdminUser();
+ service.createDefaultUsers();
}
} finally {
transaction.closeContext();
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataCompleteImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataCompleteImport.java 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataCompleteImport.java 2012-01-15 21:33:13 UTC (rev 284)
@@ -26,6 +26,7 @@
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;
@@ -43,12 +44,15 @@
private static final long serialVersionUID = 1L;
- /** Universe of existing voyages. */
+ /** Universe of existing missions. */
protected Map<String, String> missions;
- /** Universe of existing 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;
@@ -77,6 +81,7 @@
missions = loadSortAndDecorate(service, Mission.class);
areaOfOperations = loadSortAndDecorate(service, AreaOfOperation.class);
+ vessels = loadSortAndDecorate(service, Vessel.class);
importModes = decorateEnums(SelectedMissionMode.values());
@@ -116,6 +121,10 @@
return areaOfOperations;
}
+ public Map<String, String> getVessels() {
+ return vessels;
+ }
+
public Map<String, String> getImportModes() {
return importModes;
}
@@ -135,18 +144,42 @@
this.importMode = importMode;
}
- public void setCasinoFile(File file) {
- getModel().getCasinoFile().setFile(file);
+ public void setVoyageFile(File file) {
+ getModel().getVoyageFile().setFile(file);
}
- public void setCasinoFileContentType(String contentType) {
- getModel().getCasinoFile().setContentType(contentType);
+ public void setVoyageFileContentType(String contentType) {
+ getModel().getVoyageFile().setContentType(contentType);
}
- public void setCasinoFileFileName(String fileName) {
- getModel().getCasinoFile().setFileName(fileName);
+ 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);
}
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransectImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransectImport.java 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransectImport.java 2012-01-15 21:33:13 UTC (rev 284)
@@ -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.CommonDataFromTransectImportConfiguration;
@@ -43,6 +44,9 @@
/** Universe of existing voyages. */
protected Map<String, String> voyages;
+ /** Universe of existing vessels. */
+ protected Map<String, String> vessels;
+
public ConfigureCommonDataFromTransectImport() {
super(CommonDataFromTransectImportConfiguration.class);
}
@@ -61,6 +65,7 @@
newService(EchoBaseServiceSupport.class);
voyages = loadSortAndDecorate(service, Voyage.class);
+ vessels = loadSortAndDecorate(service, Vessel.class);
return INPUT;
}
@@ -69,15 +74,19 @@
return voyages;
}
- public void setCasinoFile(File file) {
- getModel().getCasinoFile().setFile(file);
+ public Map<String, String> getVessels() {
+ return vessels;
}
- public void setCasinoFileContentType(String contentType) {
- getModel().getCasinoFile().setContentType(contentType);
+ public void setTransectFile(File file) {
+ getModel().getTransectFile().setFile(file);
}
- public void setCasinoFileFileName(String fileName) {
- getModel().getCasinoFile().setFileName(fileName);
+ public void setTransectFileContentType(String contentType) {
+ getModel().getTransectFile().setContentType(contentType);
}
+
+ public void setTransectFileFileName(String fileName) {
+ getModel().getTransectFile().setFileName(fileName);
+ }
}
Modified: trunk/echobase-ui/src/main/resources/config/struts-importData.xml
===================================================================
--- trunk/echobase-ui/src/main/resources/config/struts-importData.xml 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/resources/config/struts-importData.xml 2012-01-15 21:33:13 UTC (rev 284)
@@ -39,13 +39,13 @@
<result name="input">/WEB-INF/jsp/importData/selectImportType.jsp</result>
<result type="redirectAction">
<param name="namespace">/importData</param>
- <param name="actionName">configure-${mode}</param>
+ <param name="actionName">configure${mode}</param>
<param name="method">input</param>
</result>
</action>
<!-- Configure import -->
- <action name="configure-*"
+ <action name="configure*"
class="fr.ifremer.echobase.ui.actions.importData.Configure{1}Import">
<interceptor-ref name="paramsPrepareParamsStackLoggued"/>
<result name="input">/WEB-INF/jsp/importData/configure{1}.jsp</result>
@@ -56,11 +56,11 @@
</action>
<!-- Starts import -->
- <action name="import-*"
+ <action name="import*"
class="fr.ifremer.echobase.ui.actions.importData.Launch{1}Import">
<interceptor-ref name="basicStackLoggued"/>
<interceptor-ref name="execAndWait"/>
- <result name="wait">/WEB-INF/jsp/importData/progress.jsp</result>
+ <result name="wait">/WEB-INF/jsp/importData/progress{1}.jsp</result>
<result>/WEB-INF/jsp/importData/result{1}.jsp</result>
</action>
Added: 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 (rev 0)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticData-validation.xml 2012-01-15 21:33:13 UTC (rev 284)
@@ -0,0 +1,66 @@
+<!--
+ #%L
+ EchoBase :: UI
+
+ $Id: ConfigureFiles-validation.xml 136 2011-11-27 10:09:45Z tchemit $
+ $HeadURL: http://svn.forge.codelutin.com/svn/echobase/trunk/echobase-ui/src/main/reso… $
+ %%
+ 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.echosounderSoundSpeed">
+ <field-validator type="nrequiredstring">
+ <message key="echobase.error.import.echosounderSoundSpeed.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.soundSpeedCalculations">
+ <field-validator type="nrequiredstring">
+ <message
+ key="echobase.error.import.soundSpeedCalculations.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.notes">
+ <field-validator type="nrequiredstring">
+ <message key="echobase.error.import.notes.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.moviesFile.file">
+ <field-validator type="required">
+ <message key="echobase.error.import.moviesFile.required"/>
+ </field-validator>
+ </field>
+
+</validators>
\ No newline at end of file
Added: 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 (rev 0)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionData-validation.xml 2012-01-15 21:33:13 UTC (rev 284)
@@ -0,0 +1,53 @@
+<!--
+ #%L
+ EchoBase :: UI
+
+ $Id: ConfigureFiles-validation.xml 136 2011-11-27 10:09:45Z tchemit $
+ $HeadURL: http://svn.forge.codelutin.com/svn/echobase/trunk/echobase-ui/src/main/reso… $
+ %%
+ 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.regionsFile.file">
+ <field-validator type="required">
+ <message key="echobase.error.import.regionsFile.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.associationFile.file">
+ <field-validator type="required">
+ <message key="echobase.error.import.associationFile.required"/>
+ </field-validator>
+ </field>
+
+</validators>
\ No newline at end of file
Added: 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 (rev 0)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesData-validation.xml 2012-01-15 21:33:13 UTC (rev 284)
@@ -0,0 +1,59 @@
+<!--
+ #%L
+ EchoBase :: UI
+
+ $Id: ConfigureFiles-validation.xml 136 2011-11-27 10:09:45Z tchemit $
+ $HeadURL: http://svn.forge.codelutin.com/svn/echobase/trunk/echobase-ui/src/main/reso… $
+ %%
+ 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.tlbeStationFile.file">
+ <field-validator type="required">
+ <message key="echobase.error.import.tlbeStationFile.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.xtblTriFile.file">
+ <field-validator type="required">
+ <message key="echobase.error.import.xtblTriFile.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.tblMensurationFile.file">
+ <field-validator type="required">
+ <message key="echobase.error.import.tblMensurationFile.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.tblMensurationClasseFile.file">
+ <field-validator type="required">
+ <message key="echobase.error.import.tblMensurationClasseFile.required"/>
+ </field-validator>
+ </field>
+
+</validators>
\ No newline at end of file
Added: 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 (rev 0)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualData-validation.xml 2012-01-15 21:33:13 UTC (rev 284)
@@ -0,0 +1,41 @@
+<!--
+ #%L
+ EchoBase :: UI
+
+ $Id: ConfigureFiles-validation.xml 136 2011-11-27 10:09:45Z tchemit $
+ $HeadURL: http://svn.forge.codelutin.com/svn/echobase/trunk/echobase-ui/src/main/reso… $
+ %%
+ 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.individualDataFile.file">
+ <field-validator type="required">
+ <message key="echobase.error.import.individualDataFile.required"/>
+ </field-validator>
+ </field>
+
+</validators>
\ No newline at end of file
Added: 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 (rev 0)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReference-validation.xml 2012-01-15 21:33:13 UTC (rev 284)
@@ -0,0 +1,41 @@
+<!--
+ #%L
+ EchoBase :: UI
+
+ $Id: ConfigureFiles-validation.xml 136 2011-11-27 10:09:45Z tchemit $
+ $HeadURL: http://svn.forge.codelutin.com/svn/echobase/trunk/echobase-ui/src/main/reso… $
+ %%
+ 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.lengthAgeKeyFile.file">
+ <field-validator type="required">
+ <message key="echobase.error.import.lengthAgeKeyFile.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.lengthWeightKeyFile.file">
+ <field-validator type="required">
+ <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/ConfigureCommonDataComplete-validation.xml (from rev 267, trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureFiles-validation.xml)
===================================================================
--- trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataComplete-validation.xml (rev 0)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataComplete-validation.xml 2012-01-15 21:33:13 UTC (rev 284)
@@ -0,0 +1,107 @@
+<!--
+ #%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="model.voyageFile.file">
+ <field-validator type="required">
+ <message key="echobase.error.import.voyageFile.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.transitFile.file">
+ <field-validator type="required">
+ <message key="echobase.error.import.transitFile.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.transectFile.file">
+ <field-validator type="required">
+ <message key="echobase.error.import.transectFile.required"/>
+ </field-validator>
+ </field>
+
+ <field name="model.echotypeFile.file">
+ <field-validator type="required">
+ <message key="echobase.error.import.echotypeFile.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/ConfigureCommonDataComplete-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/ConfigureCommonDataFromTransect-validation.xml
===================================================================
--- trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransect-validation.xml (rev 0)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransect-validation.xml 2012-01-15 21:33:13 UTC (rev 284)
@@ -0,0 +1,72 @@
+<!--
+ #%L
+ EchoBase :: UI
+
+ $Id: ConfigureFiles-validation.xml 136 2011-11-27 10:09:45Z tchemit $
+ $HeadURL: http://svn.forge.codelutin.com/svn/echobase/trunk/echobase-ui/src/main/reso… $
+ %%
+ 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="model.transectFile.file">
+ <field-validator type="required">
+ <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/ConfigureFiles-validation.xml
===================================================================
--- trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureFiles-validation.xml 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureFiles-validation.xml 2012-01-15 21:33:13 UTC (rev 284)
@@ -1,81 +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.mission">
- <field-validator type="required">
- <message key="echobase.error.import.mission.required"/>
- </field-validator>
- </field>
-
- <field name="importDataMode">
- <field-validator type="required">
- <message key="echobase.error.import.importDataMode.required"/>
- </field-validator>
- </field>
-
- <field name="acoustic">
- <field-validator type="nfieldexpression">
- <param name="expression">model.acousticFile.file != null</param>
- <param name="skip">importDataMode.name() != "ALL" && importDataMode.name() != "ACOUSTIC"</param>
- <message key="echobase.error.import.acousticFile.required"/>
- </field-validator>
- </field>
-
- <field name="capture">
- <field-validator type="nfieldexpression">
- <param name="expression">model.captureFile.file != null</param>
- <param name="skip">importDataMode.name() != "ALL"</param>
- <message key="echobase.error.import.captureFile.required"/>
- </field-validator>
- </field>
-
- <field name="lectureAgeGen">
- <field-validator type="nfieldexpression">
- <param name="expression">model.lectureAgeGenFile.file != null</param>
- <param name="skip">importDataMode.name() != "ALL"</param>
- <message key="echobase.error.import.lectureAgeGenFile.required"/>
- </field-validator>
- </field>
-
- <field name="events">
- <field-validator type="nfieldexpression">
- <param name="expression">model.eventsFile.file != null</param>
- <param name="skip">importDataMode.name() != "ALL"</param>
- <message key="echobase.error.import.eventsFile.required"/>
- </field-validator>
- </field>
-
- <field name="typeEchoSpecies">
- <field-validator type="nfieldexpression">
- <param name="expression">model.typeEchoSpeciesFile.file != null</param>
- <param name="skip">importDataMode.name() != "ALL"</param>
- <message key="echobase.error.import.typeEchoSpeciesFile.required"/>
- </field-validator>
- </field>
-
-</validators>
\ No newline at end of file
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-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties 2012-01-15 21:33:13 UTC (rev 284)
@@ -19,11 +19,17 @@
echobase.action.reloadSqlQuery=Recharger
echobase.action.reset=Annuler
echobase.action.return=Retour
+echobase.common.transitRelatedActivity=RelatedActivity (transit)
+echobase.common.transectLicence=Licence (transect)
+echobase.common.transectGeospatialVerticalPositive=GeospatialVerticalPositive (transect)
+echobase.common.transectBinUnitsPingAxis=BinUnitsPingAxis (transect)
+echobase.common.echosounderSoundSpeed=echosounderSoundSpeed
+echobase.common.soundSpeedCalculations=soundSpeedCalculations
+echobase.common.pingDutyCycle=pingDutyCycle
+echobase.common.notes=notes
echobase.action.save=Sauvegarder
echobase.action.saveSqlQuery=Enregistrer la requête
-echobase.action.validateImportMission=Valider la mission
echobase.common.admin=Administrateur
-echobase.common.comment=Commentaire
echobase.common.email=Email
echobase.common.entityType=Type d'entité
echobase.common.importDataMode=Type d'import
@@ -42,16 +48,38 @@
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.fileDontExist=Fichier inexistant
-echobase.error.fileNotFound=Fichier non trouvé
+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.datum.required=Datum de la campagne non rengeigné
+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.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
+echobase.error.import.lengthWeightKeyFile.required=La sélection d'un fichier lengthWeightKey est obligatoire
echobase.error.import.mission.required=La sélection d'une mission est obligatoire
echobase.error.import.missionAbstract.required=Le résumé de la mission est obligatoire
echobase.error.import.missionName.required=Le nom de la mission est obligatoire
-echobase.error.importArgument=
+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.regionsFile.required=La sélection d'un fichier Region est obligatoire
+echobase.error.import.soundSpeedCalculations.required=soundSpeedCalculations 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.transectBinUnitsPingAxis.required=BinUnitsPingAxis des transtects non rengeigné
+echobase.error.import.transectFile.required=La sélection d'un fichier Transect est obligatoire
+echobase.error.import.transectGeospatialVerticalPositive.required=GeospatialVerticalPositive des transtects non rengeigné
+echobase.error.import.transectLicence.required=Licence des transtects non rengeigné
+echobase.error.import.transitFile.required=La sélection d'un fichier Transit est obligatoire
+echobase.error.import.transitRelatedActivity.required=RelatedActivity des transits non rengeigné
+echobase.error.import.vessel.required=La sélection d'un navire est obligatoire
+echobase.error.import.voyage.required=La sélection d'une campagne est obligatoire
+echobase.error.import.voyageDescription.required=Description de la campagne non rengeigné
+echobase.error.import.voyageFile.required=La sélection d'un fichier Voyage est obligatoire
+echobase.error.import.xtblTriFile.required=La sélection d'un fichier xtblTri est obligatoire
echobase.error.importFile.required=Fichier d'import obligatoire
echobase.error.importHistorical.input.required=Le fichier d'import est obligatoire
-echobase.error.login.password.requiredstring=Le mot de passe est obligatoire
echobase.error.login.unknown=Utilisateur inconnu
echobase.error.login.wrongLogin=Le login est déjà utilisé
echobase.error.no.embeddedApplication.configurationFound=La configuration de création d'application embarquée non trouvée
@@ -63,7 +91,6 @@
echobase.error.warlocation.notFound=L'application n'a pas été trouvé à l'emplacement suivant %s
echobase.header.request.result=Résultat de la requête sql
echobase.header.user.gridTitle=Liste des utilisateurs
-echobase.header.voyageSelect=Selectionnez une campagne
echobase.info.dbeditor.propertyDiffsResult=Résultat d'import de données
echobase.info.no.sqlQuery.saved=Aucune requête d'export sql enregistrée
echobase.info.no.sqlQuery.selected=Aucune requête d'export sql sélectionnée
@@ -80,7 +107,6 @@
echobase.label.embeddedWarFileName=Nom du war à utiliser
echobase.label.exportDbFileName=Nom du fichier d'export
echobase.label.exportFileName=Nom du fichier d'export
-echobase.label.import.access=Base access
echobase.label.import.accoustique=Fichier accoustique
echobase.label.import.events=Fichier evenements
echobase.label.import.lectureAgeGen=Fichier lecture age
@@ -100,6 +126,7 @@
echobase.label.sqlQueries=Requêtes enregistrées
echobase.label.user.login=Utilisateur \: %s
echobase.label.voyageToSelect=Voyage à exporter
+echobase.legend.connectionToDb.detail=Détail de la connection à la base de données
echobase.legend.dbeditor.edit=Edition de '%s'
echobase.legend.embeddedApplication.configuration=Configuration de l'application embarquée
echobase.legend.exportDb.configuration.files=Configuration de l'export
@@ -114,33 +141,28 @@
echobase.legend.importFileResult=Résultat de l'import %s
echobase.legend.sqlQuery.configuration=Configuration de la requête
echobase.legend.sqlQuery.result=Résultats de la requête
-echobase.menu.connectToDbInformations=Se connecter à la base
+echobase.menu.connectToDbInformations=Informations de connection à la base de données
echobase.menu.createEmbeddedApplication=Créer une application embarquée
echobase.menu.dbeditor=Modifier les données
echobase.menu.export=Exporter des données
echobase.menu.exportDb=Exporter une base complête
echobase.menu.importData=Importer des données
echobase.menu.importDb=Importer une base complête
-echobase.menu.logs=Visualiser les modifications
+echobase.menu.logs=Journal des modifications
echobase.menu.users=Gérer les utilisateurs
echobase.message.askAdministratorPassword=Demander à un administrateur le mot de passe pour l'utilisateur donné
-echobase.message.modified.property=Propriété '%s', ancienne valeur \: %s, nouvelle valeur \: %s
echobase.message.no.row.selected=Aucune donnée sélectionnée
echobase.message.noEntrySelection=Aucune entrée sélectionnée
echobase.message.warnEmbeddedApplicationInProgress=Merci de ne pas fermer la fenêtre pour pouvoir accéder aux résultats de la création de l'application embarquée.
echobase.message.warnExportInProgress=Merci de ne pas fermer la fenêtre pour pouvoir accéder aux résultats de l'export.
echobase.message.warnImportInProgress=Merci de ne pas fermer la fenêtre pour pouvoir accéder aux résultats de l'import.
-echobase.title.admin.user.create=Création d'un utilisateur
-echobase.title.admin.user.delete=Suppression d'un utilisateur
-echobase.title.admin.user.edit=Edition d'un utilisateur
-echobase.title.connectToDbInformations=Se connecter à la base de données
-echobase.title.connectionToDb.detail=Détail de la connection à la base de données
+echobase.title.connectToDbInformations=Informations de connection à la base de données
echobase.title.createEmbeddedApplication=Création de l'application embarquée
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
echobase.title.entityModificationLogs=Journal des modifications
-echobase.title.export=Export
+echobase.title.export=Export Sql
echobase.title.exportDb=Export complet de la base
echobase.title.exportDbProgress=Export complêt de la base de données en cours
echobase.title.exportDbResult=Résultat de l'export complêt de la base de données
@@ -151,7 +173,6 @@
echobase.title.importDataProgress=Import de données en cours
echobase.title.importDataResult=Résultats de l'import de données
echobase.title.importDb=Import de données historiques
-echobase.title.importDb.configuration=Configuration d'un import de base de données
echobase.title.importDbProgress=Import de données en cours
echobase.title.importDbResult=Résultats de l'import de données
echobase.title.importTable=Importer une table
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/includes/header.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/includes/header.jsp 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/includes/header.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -78,16 +78,6 @@
<s:text name="echobase.menu.dbeditor"/>
</s:a>
</li>
- <li>
- <s:a action="logs" namespace="/user">
- <s:text name="echobase.menu.logs"/>
- </s:a>
- </li>
- <li>
- <s:a action="connectToDbInformations" namespace="/user">
- <s:text name="echobase.menu.connectToDbInformations"/>
- </s:a>
- </li>
<s:if test="%{userIsAdmin}">
<li>
<s:a action="userList" namespace="/user">
@@ -101,6 +91,16 @@
</s:a>
</li>
</s:if>
+ <li>
+ <s:a action="logs" namespace="/user">
+ <s:text name="echobase.menu.logs"/>
+ </s:a>
+ </li>
+ <li>
+ <s:a action="connectToDbInformations" namespace="/user">
+ <s:text name="echobase.menu.connectToDbInformations"/>
+ </s:a>
+ </li>
</ul>
</div>
</div>
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/connectToDbInformations.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/connectToDbInformations.jsp 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/connectToDbInformations.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -29,7 +29,7 @@
<br/>
<fieldset>
- <legend><s:text name="echobase.title.connectionToDb.detail"/></legend>
+ <legend><s:text name="echobase.legend.connectionToDb.detail"/></legend>
<s:label key="jdbcUrl" label='%{getText("echobase.common.jdbcUrl")}'/>
<s:label key="jdbcLogin" label='%{getText("echobase.common.jdbcLogin")}'/>
<s:label key="jdbcPassword" label='%{getText("echobase.common.jdbcPassword")} (*)'/>
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/dbeditor/dbeditor.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/dbeditor/dbeditor.jsp 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/dbeditor/dbeditor.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -196,11 +196,13 @@
<s:if test="tableSelected">
<sj:tabbedpanel id="io" collapsible="true">
- <sj:tab id="tab_importForm" target="importForm" title="ss"
- label="%{getText('echobase.title.importTable')}"/>
+ <sj:tab id="tab_importForm" target="importForm"
+ key='echobase.title.importTable'/>
+ <%--label="%{getText('echobase.title.importTable')}"/>--%>
<sj:tab id="tab_exportForm" target="exportForm"
- label="%{getText('echobase.title.exportTable')}"/>
+ key="echobase.title.exportTable"/>
+ <%--label="%{getText('echobase.title.exportTable')}"/>--%>
<s:form id="importForm" namespace="/dbeditor" method="post"
enctype="multipart/form-data">
@@ -246,7 +248,7 @@
autowidth="true" rownumbers="false" viewrecords="true"
navigatorEdit="false" navigatorSearch="true"
navigatorDelete="false" navigatorAdd="false"
- rowList="10,15,20, 50" rowNum="10"
+ rowList="10,15,20,50,100,250,500" rowNum="10"
onSelectRowTopics="datas-rowSelect"
onCompleteTopics="datas-clearSelect"
navigatorSearchOptions="{multipleGroup:false,showQuery:true,multipleSearch:true,sopt:['eq','ne','cn','nc','bw','bn','ew','en','lt','le','gt','ge','nu','nn','in','ni']}">
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/exportQuery/exportQuery.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/exportQuery/exportQuery.jsp 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/exportQuery/exportQuery.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -72,7 +72,7 @@
<s:set var="queryExists" value="query.topiaId != null && query.topiaId != ''"/>
-<s:form id="exportQueryForm" namespace="/export">
+<s:form id="exportQueryForm" namespace="/exportQuery">
<s:select key="query.topiaId" label="%{getText('echobase.label.sqlQueries')}"
list="queries" headerKey="" headerValue=""/>
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/exportQuery/exportQueryResult.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/exportQuery/exportQueryResult.jsp 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/exportQuery/exportQueryResult.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -53,8 +53,8 @@
navigator="true" autowidth="true" rownumbers="false"
navigatorEdit="false" navigatorDelete="false"
navigatorSearch="false" navigatorRefresh="false"
- navigatorAdd="false" rowList="10,15,20,50" rowNum="10"
- viewrecords="true">
+ navigatorAdd="false" rowList="10,15,20,50,100,250,500"
+ rowNum="10" viewrecords="true">
<s:iterator value="columnNames" var="name" status="status">
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/home.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/home.jsp 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/home.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -24,5 +24,3 @@
<%@ page language="java" contentType="text/html" pageEncoding="utf-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<title><s:text name="echobase.title.welcome"/></title>
-
-<h2><s:text name="echobase.title.welcome"/></h2>
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-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticData.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -24,7 +24,7 @@
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
-<title><s:text name="echobase.title.configure.accousticData"/></title>
+<title>Configuration <s:text name="echobase.common.importDataMode.accousticData"/></title>
<script type="text/javascript">
@@ -48,18 +48,24 @@
label='%{getText("echobase.common.vessel")}'
list="vessels" headerKey="" headerValue=""/>
- <s:textfield key="model.field1" size="40" required="true"
- label='%{getText("echobase.common.field1")}'/>
+ <s:textfield key="model.echosounderSoundSpeed" size="40" required="true"
+ label='%{getText("echobase.common.echosounderSoundSpeed")}'/>
- <s:textfield key="model.field2" size="40" required="true"
- label='%{getText("echobase.common.field2")}'/>
+ <s:textfield key="model.soundSpeedCalculations" size="40" required="true"
+ label='%{getText("echobase.common.soundSpeedCalculations")}'/>
+ <s:textfield key="model.pingDutyCycle" size="40" required="true"
+ label='%{getText("echobase.common.pingDutyCycle")}'/>
+
+ <s:textfield key="model.notes" size="40" required="true"
+ label='%{getText("echobase.common.notes")}'/>
+
<s:file key="moviesFile" required="true"
label='%{getText("echobase.common.moviesFile")}'/>
</fieldset>
<br/>
- <s:submit action="configure-AccousticData"
+ <s:submit action="configureAccousticData"
value='%{getText("echobase.action.import")}'/>
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticRegionData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticRegionData.jsp 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticRegionData.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -24,7 +24,7 @@
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
-<title><s:text name="echobase.title.configure.accousticRegionData"/></title>
+<title>Configuration <s:text name="echobase.common.importDataMode.accousticRegionData"/></title>
<script type="text/javascript">
@@ -48,12 +48,6 @@
label='%{getText("echobase.common.vessel")}'
list="vessels" headerKey="" headerValue=""/>
- <s:textfield key="model.field1" size="40" required="true"
- label='%{getText("echobase.common.name")}'/>
-
- <s:textfield key="model.field2" size="40" required="true"
- label='%{getText("echobase.common.name")}'/>
-
<s:file key="regionsFile" required="true"
label='%{getText("echobase.common.regionsFile")}'/>
@@ -63,7 +57,7 @@
</fieldset>
<br/>
- <s:submit action="configure-AccousticRegionData"
+ <s:submit action="configureAccousticRegionData"
value='%{getText("echobase.action.import")}'/>
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-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesData.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -24,7 +24,7 @@
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
-<title><s:text name="echobase.title.configure.catchesData"/></title>
+<title>Configuration <s:text name="echobase.common.importDataMode.catchesData"/></title>
<script type="text/javascript">
@@ -59,7 +59,7 @@
</fieldset>
<br/>
- <s:submit action="configure-CatchesData"
+ <s:submit action="configureCatchesData"
value='%{getText("echobase.action.import")}'/>
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesIndividualData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesIndividualData.jsp 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesIndividualData.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -24,7 +24,7 @@
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
-<title><s:text name="echobase.title.configure.catchesIndividualData"/></title>
+<title>Configuration <s:text name="echobase.common.importDataMode.catchesIndividualData"/></title>
<script type="text/javascript">
@@ -52,7 +52,7 @@
</fieldset>
<br/>
- <s:submit action="configure-CatchesIndividualData"
+ <s:submit action="configureCatchesIndividualData"
value='%{getText("echobase.action.import")}'/>
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesReference.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesReference.jsp 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesReference.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -24,7 +24,7 @@
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
-<title><s:text name="echobase.title.configure.catchesReference"/></title>
+<title>Configuration <s:text name="echobase.common.importDataMode.catchesReferences"/></title>
<script type="text/javascript">
@@ -49,7 +49,7 @@
</fieldset>
<br/>
- <s:submit action="configure-CatchesReference"
+ <s:submit action="configureCatchesReference"
value='%{getText("echobase.action.import")}'/>
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataComplete.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataComplete.jsp 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataComplete.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -24,7 +24,7 @@
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
-<title><s:text name="echobase.title.configure.commonDataComplete"/></title>
+<title>Configuration <s:text name="echobase.common.importDataMode.commonDataComplete"/></title>
<script type="text/javascript">
@@ -49,7 +49,8 @@
<fieldset>
<legend>
- <s:text name="echobase.legend.importData.configure.commonDataComplete.selectMission"/>
+ <s:text
+ name="echobase.legend.importData.configure.commonDataComplete.selectMission"/>
</legend>
<s:radio key='importMode' list="importModes"
@@ -121,22 +122,45 @@
label='%{getText("echobase.common.areaOfOperation")}'
list="areaOfOperations" headerKey="" headerValue=""/>
+ <s:select key="model.vesselId" value="''" 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:file key="casinoFile" required="true"
- label='%{getText("echobase.common.casinoFile")}'/>
+ <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="configure-CommonDataComplete"
+ <s:submit action="configureCommonDataComplete"
value='%{getText("echobase.action.import")}'/>
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataFromTransect.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataFromTransect.jsp 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataFromTransect.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -24,7 +24,7 @@
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
-<title><s:text name="echobase.title.configure.commonDataFromTransect"/></title>
+<title>Configuration <s:text name="echobase.common.importDataMode.commonDataFromTransect"/></title>
<script type="text/javascript">
@@ -45,13 +45,30 @@
label='%{getText("echobase.common.voyage")}'
list="voyages" headerKey="" headerValue=""/>
- <s:file key="casinoFile" required="true"
- label='%{getText("echobase.common.casinoFile")}'/>
+ <s:select key="model.vesselId" value="''" 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="configure-CommonDataFromTransect"
+ <s:submit action="configureCommonDataFromTransect"
value='%{getText("echobase.action.import")}'/>
Deleted: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureFiles.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureFiles.jsp 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureFiles.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -1,106 +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.title.importData"/></title>
-
-<script type="text/javascript">
-
- function updateMode(newValue) {
- switch (newValue) {
- case "ALL":
- $('[class="inputFile"]').show();
- break;
- case "ACOUSTIC":
- $('[class="inputFile"]').hide();
- $('#acousticFile').show();
- break;
- }
- }
-
- jQuery(document).ready(function () {
-
-
- $('[name="importDataMode"]').change(function(event) {
- updateMode(this.value);
- });
- var val = $('[name="importDataMode"][checked="checked"]').val();
- updateMode(val);
- });
-</script>
-
-<s:form namespace="/importData" method="POST" enctype="multipart/form-data">
-
- <fieldset>
- <legend>
- <s:text name="echobase.legend.importData.configuration.mission.resume"/>
- </legend>
- <s:label value="%{model.mission.name}"
- key='echobase.common.name'/>
-
- <s:label value="%{model.mission.missionAbstract}"
- key='echobase.common.missionAbstract'/>
- </fieldset>
-
- <hr/>
- <fieldset>
- <legend>
- <s:text name="echobase.legend.importData.configuration.files"/>
- </legend>
-
- <s:hidden key="missionId" label=''/>
-
- <s:radio key='importDataMode' list="importDataModes"
- label='%{getText("echobase.common.importDataMode")}'
- required="true"/>
- <hr/>
- <div class="inputFile" id="acousticFile">
- <s:file id="acoustic" name="acoustic" required="true"
- key="echobase.label.import.accoustique"/>
- </div>
- <div class="inputFile" id="captureFile">
- <s:file name="capture" required="true"
- key="echobase.label.import.pecherie"/>
- </div>
- <div class="inputFile" id="lectureAgeGenFile">
- <s:file name="lectureAgeGen" required="true"
- key="echobase.label.import.lectureAgeGen"/>
- </div>
- <div class="inputFile" id="eventsFile">
- <s:file name="events" required="true"
- key="echobase.label.import.events"/>
- </div>
- <div class="inputFile" id="typeEchoSpeciesFile">
- <s:file name="typeEchoSpecies" required="true"
- key="echobase.label.import.typeEchoSpecies"/>
-
- </div>
- </fieldset>
- <br/>
- <s:submit action="configureFiles"
- value='%{getText("echobase.action.import")}'/>
-
-
-</s:form>
\ No newline at end of file
Deleted: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureMission.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureMission.jsp 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureMission.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -1,156 +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" %>
-<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
-
-<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>
-<title><s:text name="echobase.title.importData.configuration"/></title>
-
-<s:form id="importForm" namespace="/importData" method="POST">
-
- <fieldset>
- <legend>
- <s:text name="echobase.legend.importData.configuration.mission"/>
- </legend>
-
- <s:radio key='importMode' list="importModes"
- label='%{getText("echobase.common.importMode")}'
- required="true"/>
-
- <hr/>
-
- <div id='USE_EXISTING_MISSION' class='importMode'>
- <s:select name="mission.topiaId" value="''"
- label='%{getText("echobase.common.mission")}'
- list="missions" headerKey="" headerValue=""/>
- </div>
-
- <div id='CREATE_NEW_MISSION' class='importMode'>
-
- <%--
- String PROPERTY_NAME = "missionName";
-
- String PROPERTY_LITTERATURE_REFERENCES = "litteratureReferences";
-
- String PROPERTY_MISSION_ABSTRACT = "missionAbstract";
-
- String PROPERTY_PROJECT = "project";
-
- String PROPERTY_PLATFORM = "platform";
-
- String PROPERTY_INSTITUTION = "institution";
-
- String PROPERTY_KEYWORDS = "keywords";
-
- String PROPERTY_DATA_CENTRE = "dataCentre";
-
- String PROPERTY_DATA_CENTRE_EMAIL = "dataCentreEmail";
-
- String PROPERTY_AUTHOR = "author";
-
- String PROPERTY_AUTHOR_EMAIL = "authorEmail";
-
- String PROPERTY_PRINCIPAL_INVESTIGATOR = "principalInvestigator";
-
- String PROPERTY_PRINCIPAL_INVESTIGATOR_EMAIL = "principalInvestigatorEmail";
-
- String PROPERTY_ORGANISATION_REFERENCES = "organisationReferences";
-
- String PROPERTY_DISTRIBUTION_STATEMENT = "distributionStatement";
-
- String PROPERTY_ORGANISATION_LEVEL_ACKNOWLEDGEMENTS = "organisationLevelAcknowledgements";
-
- String PROPERTY_SOURCE = "source";
- --%>
-
- <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:submit value='%{getText("echobase.action.validateImportMission")}'
- action="configureMission"/>
-</s:form>
\ No newline at end of file
Deleted: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progress.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progress.jsp 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progress.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -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" %>
-<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
-
-<s:url id="url" action="import" namespace="/importData"/>
-<meta http-equiv="refresh" content="1;url=${url}"/>
-
-<title><s:text name="echobase.title.importDataProgress"/></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
Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAccousticData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAccousticData.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAccousticData.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -0,0 +1,40 @@
+<%--
+ #%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-AccousticData" namespace="/importData"/>
+<meta http-equiv="refresh" content="1;url=${url}"/>
+
+<title><s:text name="echobase.title.importDataProgress"/></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/progressAccousticData.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/progressAccousticRegionData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAccousticRegionData.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressAccousticRegionData.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -0,0 +1,40 @@
+<%--
+ #%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.title.importDataProgress"/></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/progressAccousticRegionData.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/progressCatchesData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesData.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesData.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -0,0 +1,40 @@
+<%--
+ #%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-CatchesData" namespace="/importData"/>
+<meta http-equiv="refresh" content="1;url=${url}"/>
+
+<title><s:text name="echobase.title.importDataProgress"/></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/progressCatchesData.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/progressCatchesIndividualData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesIndividualData.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesIndividualData.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -0,0 +1,40 @@
+<%--
+ #%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.title.importDataProgress"/></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/progressCatchesIndividualData.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/progressCatchesReference.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesReference.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCatchesReference.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -0,0 +1,40 @@
+<%--
+ #%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.title.importDataProgress"/></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/progressCatchesReference.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/progressCommonDataComplete.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonDataComplete.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonDataComplete.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -0,0 +1,40 @@
+<%--
+ #%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.title.importDataProgress"/></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/progressCommonDataComplete.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/progressCommonDataFromTransect.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonDataFromTransect.jsp (rev 0)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/progressCommonDataFromTransect.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -0,0 +1,40 @@
+<%--
+ #%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.title.importDataProgress"/></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/progressCommonDataFromTransect.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/result.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/result.jsp 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/result.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -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><s:text name="echobase.title.importDataResult"/></title>
-
-<fieldset>
- <legend>
- <s:text name="echobase.legend.importData.configuration.mission.resume"/>
- </legend>
- <s:label value="%{model.mission.missionName}"
- key='echobase.common.missionName'/>
-
- <s:label value="%{model.mission.missionAbstract}"
- key='echobase.common.missionAbstract'/>
-</fieldset>
-<br/>
-<s:iterator value="importResult" var="entry">
- <s:set var="inputFile" value="%{#entry.key}"/>
- <s:set var="result" value="%{#entry.value}"/>
- <fieldset>
- <legend>
- <s:text name="echobase.legend.importFileResult">
- <s:param><strong><s:property
- value="%{#inputFile.label}"/></strong></s:param>
- </s:text>
- </legend>
-
- <s:label value="%{#inputFile.fileName}"
- label="%{getText('echobase.label.importFile')}"/>
-
- <s:label value="%{#result.numberCreated}"
- label="%{getText('echobase.label.numberOfCreatedEntities')}"/>
-
- <s:label value="%{#result.numberUpdated}"
- label="%{getText('echobase.label.numberOfUpdatedEntities')}"/>
- </fieldset>
-</s:iterator>
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/selectImportType.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/selectImportType.jsp 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/selectImportType.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -44,7 +44,7 @@
});
</script>
-<s:form namespace="/importData" method="POST">
+<s:form namespace="/importData" method="GET">
<fieldset>
<legend>
@@ -57,7 +57,8 @@
</fieldset>
<br/>
- <s:submit action="configure" value='%{getText("echobase.action.import")}'/>
+ <s:submit action="selectImportType"
+ value='%{getText("echobase.action.import")}'/>
</s:form>
\ No newline at end of file
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/modificationLogs.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/modificationLogs.jsp 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/modificationLogs.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -32,9 +32,11 @@
jQuery(document).ready(function () {
$.addRowSelectTopic('datas', function(event){
var text = $("tr[aria-selected=true] td[aria-describedby='datas_modificationText']").text();
+ console.info("New selection = "+text);
$('#modificationTextContainter').html(text);
});
$.addClearSelectTopic('datas', function(event){
+ console.info("Clear selection = ");
$('#modificationTextContainter').html("${emptySelection}");
});
});
@@ -50,9 +52,9 @@
autowidth="true" rownumbers="false" viewrecords="true"
navigatorEdit="false" navigatorSearch="false"
navigatorDelete="false" navigatorAdd="false"
- rowList="10,15,20, 50" rowNum="10"
+ rowList="10,15,20,50,100,250,500" rowNum="10"
onSelectRowTopics='datas-rowSelect'
- onCompleteTopics='datas-cleanSelect'>
+ onCompleteTopics="datas-clearSelect">
<sjg:gridColumn name="entityType" sortable="true"
title="%{getText('echobase.common.entityType')}"/>
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/user/Create.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/user/Create.jsp 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/user/Create.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -27,8 +27,6 @@
<title><s:text name="echobase.label.admin.user.create"/></title>
-<h2><s:text name="echobase.label.admin.user.create"/></h2>
-
<s:form method="post" validate="true" namespace="/user">
<fieldset>
<legend>
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/user/Delete.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/user/Delete.jsp 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/user/Delete.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -27,8 +27,6 @@
<title><s:text name="echobase.label.admin.user.delete"/></title>
-<h2><s:text name="echobase.label.admin.user.delete"/></h2>
-
<s:form method="post" validate="true" namespace="/user">
<fieldset>
<legend>
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/user/Update.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/user/Update.jsp 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/user/Update.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -27,8 +27,6 @@
<title><s:text name="echobase.label.admin.user.edit"/></title>
-<h2><s:text name="echobase.label.admin.user.edit"/></h2>
-
<s:form method="post" validate="true" namespace="/user">
<fieldset>
<legend>
@@ -37,10 +35,12 @@
<s:hidden key="user.id" label=""/>
<s:textfield key="user.email" label="%{getText('echobase.common.email')}"
size="40" readonly="true"/>
- <s:password name="user.password" value="" label="%{getText('echobase.common.password')} (*)"
+ <s:password name="user.password" value=""
+ label="%{getText('echobase.common.password')} (*)"
size="40"/>
<s:checkbox key="user.admin" label="%{getText('echobase.common.admin')}"/>
<br/>
+
<div class="cleanBoth">
(*) Pour ne pas modifier le mot de passe laisser ce champs vide
</div>
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/user/userList.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/user/userList.jsp 2012-01-15 21:31:49 UTC (rev 283)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/user/userList.jsp 2012-01-15 21:33:13 UTC (rev 284)
@@ -47,9 +47,6 @@
});
</script>
-<h2><s:text name="echobase.title.users"/></h2>
-<br/>
-
<sjg:grid id="users" caption="%{getText('echobase.header.user.gridTitle')}"
dataType="json" href="%{loadUrl}" gridModel="users"
pager="true" pagerButtons="true" pagerInput="true"
@@ -59,11 +56,11 @@
navigatorEdit="false" navigatorDelete="false"
navigatorSearch="false" navigatorRefresh="false"
navigatorAdd="false" viewrecords="true"
- rowList="10,15,20, 50" rowNum="10"
+ rowList="10,15,20,50,100,250,500" rowNum="10"
navigatorExtraButtons="{
add: { title : 'Ajouter', icon: 'ui-icon-plus', topic: 'users-rowAdd' },
update: { title : 'Mettre à jour', icon: 'ui-icon-pencil', topic: 'users-rowUpdate' },
- delete : { title : 'Supprimer', icon: 'ui-icon-trash', topic: 'users-rowDelete' }
+ delete: { title : 'Supprimer', icon: 'ui-icon-trash', topic: 'users-rowDelete' }
}">
<sjg:gridColumn name="id" title="id" hidden="true"/>
<sjg:gridColumn name="email" width="600" title='%{getText("echobase.common.email")}'
1
0