r433 - in trunk: echobase-services/src/main/java/fr/ifremer/echobase/services/importdata echobase-services/src/main/java/fr/ifremer/echobase/services/importdata/csv echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData echobase-ui/src/main/webapp/WEB-INF/jsp/importData
Author: tchemit Date: 2012-03-28 19:54:51 +0200 (Wed, 28 Mar 2012) New Revision: 433 Url: http://forge.codelutin.com/repositories/revision/echobase/433 Log: do last import : Map Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/importdata/ResultsMapCellImportService.java trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/importdata/csv/MapCellImportModel.java trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/importdata/csv/MapCellImportRow.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureResults.java trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureResults-ConfigureResults-modeMap-validation.xml trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureResults.jsp Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/importdata/ResultsMapCellImportService.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/importdata/ResultsMapCellImportService.java 2012-03-28 17:53:48 UTC (rev 432) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/importdata/ResultsMapCellImportService.java 2012-03-28 17:54:51 UTC (rev 433) @@ -32,19 +32,24 @@ import fr.ifremer.echobase.csv.EchoBaseImport; import fr.ifremer.echobase.entities.EchoBaseEntityEnum; import fr.ifremer.echobase.entities.EchoBaseUser; +import fr.ifremer.echobase.entities.data.Category; +import fr.ifremer.echobase.entities.data.CategoryDAO; 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.DataDAO; +import fr.ifremer.echobase.entities.data.Result; +import fr.ifremer.echobase.entities.data.ResultDAO; import fr.ifremer.echobase.entities.data.Voyage; import fr.ifremer.echobase.entities.references.CellType; import fr.ifremer.echobase.entities.references.DataMetadata; -import fr.ifremer.echobase.entities.references.DepthStratum; +import fr.ifremer.echobase.entities.references.SizeCategory; +import fr.ifremer.echobase.entities.references.Species; +import fr.ifremer.echobase.entities.references.SpeciesCategory; +import fr.ifremer.echobase.entities.references.SpeciesCategoryDAO; import fr.ifremer.echobase.services.ImportException; import fr.ifremer.echobase.services.importdata.csv.MapCellImportModel; import fr.ifremer.echobase.services.importdata.csv.MapCellImportRow; -import fr.ifremer.echobase.services.importdata.csv.MapCellResultImportModel; -import fr.ifremer.echobase.services.importdata.csv.MapCellResultImportRow; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.nuiton.util.csv.ImportRuntimeException; @@ -77,30 +82,16 @@ public List<CsvFileImportResult> startImport(ResultsImportConfiguration configuration, EchoBaseUser user) throws ImportException { - List<CsvFileImportResult> result = Lists.newLinkedList(); - // get selected voyage Voyage voyage = getEntityById(Voyage.class, configuration.getVoyageId()); InputFile inputFile = configuration.getMapsFile(); - if (inputFile.hasFile()) { - CsvFileImportResult importResult = importMapFile( - configuration, - inputFile, voyage); + CsvFileImportResult importResult = importMapFile( + configuration, inputFile, voyage); - addResultAndLog(result, inputFile, - importResult, user); - } - inputFile = configuration.getMapResultFile(); - if (inputFile.hasFile()) { - CsvFileImportResult importResult = importMapResultFile( - configuration, - inputFile, voyage); - - addResultAndLog(result, inputFile, importResult, user); - } - + List<CsvFileImportResult> result = Lists.newLinkedList(); + addResultAndLog(result, inputFile, importResult, user); return result; } @@ -108,41 +99,67 @@ InputFile inputFile, Voyage voyage) throws ImportException { + String resultLabel = configuration.getResultLabel(); + CellType cellType = getEntityByProperty( CellType.class, CellType.PROPERTY_ID, "Map"); Preconditions.checkNotNull(cellType); - DataMetadata dataXMeta = getEntityByProperty( - DataMetadata.class, DataMetadata.PROPERTY_NAME, "LongitudeEnd"); - Preconditions.checkNotNull(dataXMeta); + DataMetadata dataLongitudeMeta = getEntityByProperty( + DataMetadata.class, DataMetadata.PROPERTY_NAME, "GridCellLongitude"); + Preconditions.checkNotNull(dataLongitudeMeta); - DataMetadata dataYMeta = getEntityByProperty( - DataMetadata.class, DataMetadata.PROPERTY_NAME, "LatitudeEnd"); - Preconditions.checkNotNull(dataYMeta); + DataMetadata dataLatitudeMeta = getEntityByProperty( + DataMetadata.class, DataMetadata.PROPERTY_NAME, "GridCellLatitude"); + Preconditions.checkNotNull(dataLatitudeMeta); - DataMetadata dataDepthSurfaceMeta = getEntityByProperty( - DataMetadata.class, DataMetadata.PROPERTY_NAME, "DepthRefSurfaceEnd"); - Preconditions.checkNotNull(dataDepthSurfaceMeta); + DataMetadata dataDepthMeta = getEntityByProperty( + DataMetadata.class, DataMetadata.PROPERTY_NAME, "GridCellDepth"); + Preconditions.checkNotNull(dataDepthMeta); - DataMetadata dataDepthBottomMeta = getEntityByProperty( - DataMetadata.class, DataMetadata.PROPERTY_NAME, "DepthRefBottomEnd"); - Preconditions.checkNotNull(dataDepthBottomMeta); + DataMetadata dataLongitudeLagMeta = getEntityByProperty( + DataMetadata.class, DataMetadata.PROPERTY_NAME, "GridLongitudeLag"); + Preconditions.checkNotNull(dataLongitudeLagMeta); - DataMetadata dataSurfaceMeta = getEntityByProperty( - DataMetadata.class, DataMetadata.PROPERTY_NAME, "Surface"); - Preconditions.checkNotNull(dataSurfaceMeta); + DataMetadata dataLatitudeLagMeta = getEntityByProperty( + DataMetadata.class, DataMetadata.PROPERTY_NAME, "GridLatitudeLag"); + Preconditions.checkNotNull(dataLatitudeLagMeta); + DataMetadata dataDepthLagMeta = getEntityByProperty( + DataMetadata.class, DataMetadata.PROPERTY_NAME, "GridDepthLag"); + Preconditions.checkNotNull(dataDepthLagMeta); + // authorize only the selected voyage to be imported Map<String, Voyage> voyageMap = Maps.uniqueIndex(Arrays.asList( voyage), EchoBaseFunctions.VOYAGE_NAME); - Map<String, DepthStratum> depthStratumMap = getEntitiesMap( - DepthStratum.class, - EchoBaseFunctions.DEPTH_STRATUM_ID); + Map<String, Species> speciesMap = getEntitiesMap( + Species.class, EchoBaseFunctions.SPECIES_BARACOUDA_CODE); + Map<String, SizeCategory> sizeCategoryMap = Maps.newTreeMap(); + sizeCategoryMap.putAll(getEntitiesMap( + SizeCategory.class, EchoBaseFunctions.SIZE_CATEGORY_NAME)); + + Map<String, DataMetadata> dataMetadataMap = getEntitiesMap( + DataMetadata.class, EchoBaseFunctions.DATA_METADATA_NAME); + + // first get header of file to detect which results to import + String[] header = EchoBaseImport.getHeader(inputFile.getFile(), + getCsvSeparator()); + + + List<DataMetadata> metas = getMetas( + MapCellImportModel.COLUMN_NAMES_TO_EXCLUDE, + dataMetadataMap, + header); + MapCellImportModel csvModel = new MapCellImportModel( - serviceContext.getConfiguration().getCsvSeparator(), cellType, - voyageMap, depthStratumMap); + serviceContext.getConfiguration().getCsvSeparator(), + cellType, + voyageMap, + speciesMap, + sizeCategoryMap, + metas); if (log.isInfoEnabled()) { log.info("Starts import of Map cells from file " + @@ -153,8 +170,14 @@ inputFile.getFileName()); CellDAO dao = getDAO(Cell.class, CellDAO.class); + DataDAO dataDao = getDAO(Data.class, DataDAO.class); + ResultDAO resultDao = getDAO(Result.class, ResultDAO.class); + SpeciesCategoryDAO speciesCategoryDAO = + getDAO(SpeciesCategory.class, SpeciesCategoryDAO.class); + CategoryDAO categoryDAO = getDAO(Category.class, CategoryDAO.class); + Reader reader = getInputFileReader(inputFile); try { EchoBaseImport<MapCellImportRow> importer = @@ -162,111 +185,85 @@ configuration.incrementsProgression(); - int rowNumber = 0; for (MapCellImportRow row : importer) { - rowNumber++; configuration.incrementsProgression(); - //TODO Do me - Cell cell = create(dao, row.getCell()); voyage.addPostCell(cell); importResult.incrementsNumberCreated(EchoBaseEntityEnum.Cell); + + // add gridCellLongitude data createCellData(dataDao, cell, - dataXMeta, - String.valueOf(row.getDataX()), + dataLongitudeMeta, + String.valueOf(row.getGridCellLongitude()), importResult ); + // add gridCellLatitude data createCellData(dataDao, cell, - dataYMeta, - String.valueOf(row.getDataY()), + dataLatitudeMeta, + String.valueOf(row.getGridCellLatitude()), importResult ); - String depthStratumId = row.getDepthStratum().getId(); + // add gridCellDepth data + createCellData(dataDao, + cell, + dataDepthMeta, + String.valueOf(row.getGridCellDepth()), + importResult + ); - DataMetadata depth = null; - - if ("SURF".equals(depthStratumId)) { - - depth = dataDepthSurfaceMeta; - } else if ("CLAS".equals(depthStratumId)) { - depth = dataDepthBottomMeta; - - } else { - throw new ImportException( - "[Line " + rowNumber + - "] Depth stratum should be 'SURF' or 'CLAS', " + - "but was " + depthStratumId); - } - + // add gridLongitudeLag data createCellData(dataDao, cell, - depth, - String.valueOf(row.getDataZ()), + dataLongitudeLagMeta, + String.valueOf(row.getGridLongitudeLag()), importResult ); + // add gridLatitudeLag data createCellData(dataDao, cell, - dataSurfaceMeta, - String.valueOf(row.getDataLag()), + dataLatitudeLagMeta, + String.valueOf(row.getGridLatitudeLag()), importResult ); + // add gridDepthLag data createCellData(dataDao, cell, - dataSurfaceMeta, - String.valueOf(row.getDataValue()), + dataDepthLagMeta, + String.valueOf(row.getGridDepthLag()), importResult ); - } - return importResult; - } catch (ImportRuntimeException e) { - throw new ImportException(getLocale(), inputFile, e); - } finally { - closeReader(reader, inputFile); - } - } + List<Result> results = row.getResult(); - protected CsvFileImportResult importMapResultFile(ResultsImportConfiguration configuration, - InputFile inputFile, - Voyage voyage) throws ImportException { - MapCellResultImportModel csvModel = new MapCellResultImportModel( - serviceContext.getConfiguration().getCsvSeparator()); + Category category = getResultCategory(categoryDAO, + speciesCategoryDAO, + null, + row.getSpecies(), + row.getSizeCategory(), + null, + importResult); - if (log.isInfoEnabled()) { - log.info("Starts import of Map cell results from file " + - inputFile.getFileName()); - } + for (Result result : results) { - String resultLabel = configuration.getResultLabel(); + result.setCategory(category); + result.setResultLabel(resultLabel); - CsvFileImportResult importResult = new CsvFileImportResult( - inputFile.getFileName()); + Result resultCreated = create(resultDao, result); - CellDAO dao = getDAO(Cell.class, CellDAO.class); + cell.addResult(resultCreated); - Reader reader = getInputFileReader(inputFile); - try { - EchoBaseImport<MapCellResultImportRow> importer = - EchoBaseImport.newImport(csvModel, reader); - - configuration.incrementsProgression(); - for (MapCellResultImportRow row : importer) { - - configuration.incrementsProgression(); - - //TODO Do me - - importResult.incrementsNumberUpdated(EchoBaseEntityEnum.Cell); + importResult.incrementsNumberCreated(EchoBaseEntityEnum.Result); + } } return importResult; @@ -277,18 +274,4 @@ } } - - private void createCellData(DataDAO dao, - Cell cell, - DataMetadata dataMetaData, - String dataValue, - CsvFileImportResult importResult) { - - Data data = create(dao); - data.setDataMetadata(dataMetaData); - data.setDataValue(dataValue); - cell.addData(data); - - importResult.incrementsNumberCreated(EchoBaseEntityEnum.Data); - } } Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/importdata/csv/MapCellImportModel.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/importdata/csv/MapCellImportModel.java 2012-03-28 17:53:48 UTC (rev 432) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/importdata/csv/MapCellImportModel.java 2012-03-28 17:54:51 UTC (rev 433) @@ -27,8 +27,11 @@ import fr.ifremer.echobase.csv.EchobaseCsvUtil; import fr.ifremer.echobase.entities.data.Voyage; import fr.ifremer.echobase.entities.references.CellType; -import fr.ifremer.echobase.entities.references.DepthStratum; +import fr.ifremer.echobase.entities.references.DataMetadata; +import fr.ifremer.echobase.entities.references.SizeCategory; +import fr.ifremer.echobase.entities.references.Species; +import java.util.List; import java.util.Map; /** @@ -39,30 +42,53 @@ */ public class MapCellImportModel extends AbstractImportModel<MapCellImportRow> { + public static final String[] COLUMN_NAMES_TO_EXCLUDE = { + MapCellImportRow.PROPERTY_NAME, + "baracoudaCode", + MapCellImportRow.PROPERTY_DATA_GRID_CELL_LONGITUDE, + MapCellImportRow.PROPERTY_DATA_GRID_CELL_LATITUDE, + MapCellImportRow.PROPERTY_DATA_GRID_CELL_DEPTH, + MapCellImportRow.PROPERTY_DATA_GRID_LONGITUDE_LAG, + MapCellImportRow.PROPERTY_DATA_GRID_LATITUDE_LAG, + MapCellImportRow.PROPERTY_DATA_GRID_DEPTH_LAG, + MapCellImportRow.PROPERTY_VOYAGE, + MapCellImportRow.PROPERTY_SIZE_CATEGORY + }; + protected final CellType cellType; public MapCellImportModel(char separator, CellType cellType, Map<String, Voyage> voyageMap, - Map<String, DepthStratum> depthStramMap) { + Map<String, Species> speciesMap, + Map<String, SizeCategory> sizeCategoryMap, + List<DataMetadata> dataMetadatas) { super(separator); this.cellType = cellType; newForeignKeyColumn(MapCellImportRow.PROPERTY_VOYAGE, Voyage.class, Voyage.PROPERTY_NAME, voyageMap); - newForeignKeyColumn(MapCellImportRow.PROPERTY_DEPTH_STRATUM, DepthStratum.class, DepthStratum.PROPERTY_ID, depthStramMap); + newMandatoryColumn(MapCellImportRow.PROPERTY_NAME); + newForeignKeyColumn("baracoudaCode", MapCellImportRow.PROPERTY_SPECIES, Species.class, Species.PROPERTY_BARACOUDA_CODE, speciesMap); + newForeignKeyColumn(MapCellImportRow.PROPERTY_SIZE_CATEGORY, SizeCategory.class, SizeCategory.PROPERTY_NAME, sizeCategoryMap); - newMandatoryColumn(MapCellImportRow.PROPERTY_NAME); - newMandatoryColumn("x", MapCellImportRow.PROPERTY_DATA_X, EchobaseCsvUtil.PRIMITIVE_FLOAT); - newMandatoryColumn("y", MapCellImportRow.PROPERTY_DATA_Y, EchobaseCsvUtil.PRIMITIVE_FLOAT); - newMandatoryColumn("z", MapCellImportRow.PROPERTY_DATA_Z, EchobaseCsvUtil.PRIMITIVE_FLOAT); - newMandatoryColumn("lag", MapCellImportRow.PROPERTY_DATA_LAG, EchobaseCsvUtil.PRIMITIVE_FLOAT); - newMandatoryColumn("value", MapCellImportRow.PROPERTY_DATA_VALUE, EchobaseCsvUtil.PRIMITIVE_FLOAT); + newMandatoryColumn(MapCellImportRow.PROPERTY_DATA_GRID_CELL_LONGITUDE, EchobaseCsvUtil.PRIMITIVE_FLOAT); + newMandatoryColumn(MapCellImportRow.PROPERTY_DATA_GRID_CELL_LATITUDE, EchobaseCsvUtil.PRIMITIVE_FLOAT); + newMandatoryColumn(MapCellImportRow.PROPERTY_DATA_GRID_CELL_DEPTH, EchobaseCsvUtil.PRIMITIVE_FLOAT); + newMandatoryColumn(MapCellImportRow.PROPERTY_DATA_GRID_LONGITUDE_LAG, EchobaseCsvUtil.PRIMITIVE_FLOAT); + newMandatoryColumn(MapCellImportRow.PROPERTY_DATA_GRID_LATITUDE_LAG, EchobaseCsvUtil.PRIMITIVE_FLOAT); + newMandatoryColumn(MapCellImportRow.PROPERTY_DATA_GRID_DEPTH_LAG, EchobaseCsvUtil.PRIMITIVE_FLOAT); + + for (DataMetadata metadata : dataMetadatas) { + newMandatoryColumn( + metadata.getName(), + EchobaseCsvUtil.newResultValueParser(metadata, false), + EchobaseCsvUtil.<MapCellImportRow>newResultValueSetter()); + } } @Override public MapCellImportRow newEmptyInstance() { - MapCellImportRow row = new MapCellImportRow(); - row.getCell().setCellType(cellType); + MapCellImportRow row = new MapCellImportRow(cellType); return row; } } \ No newline at end of file Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/importdata/csv/MapCellImportRow.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/importdata/csv/MapCellImportRow.java 2012-03-28 17:53:48 UTC (rev 432) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/importdata/csv/MapCellImportRow.java 2012-03-28 17:54:51 UTC (rev 433) @@ -23,53 +23,73 @@ */ package fr.ifremer.echobase.services.importdata.csv; +import com.google.common.collect.Lists; +import fr.ifremer.echobase.csv.EchobaseCsvUtil; import fr.ifremer.echobase.entities.data.Cell; import fr.ifremer.echobase.entities.data.CellImpl; +import fr.ifremer.echobase.entities.data.Result; import fr.ifremer.echobase.entities.data.Voyage; -import fr.ifremer.echobase.entities.references.DepthStratum; +import fr.ifremer.echobase.entities.references.CellType; +import fr.ifremer.echobase.entities.references.SizeCategory; +import fr.ifremer.echobase.entities.references.Species; +import java.util.List; + /** * Bean used as a row for import of {@link MapCellImportModel}. * * @author tchemit <chemit@codelutin.com> * @since 0.3 */ -public class MapCellImportRow { +public class MapCellImportRow implements EchobaseCsvUtil.ResultAble { public static final String PROPERTY_NAME = "name"; public static final String PROPERTY_VOYAGE = "voyage"; - public static final String PROPERTY_DEPTH_STRATUM = "depthStratum"; + public static final String PROPERTY_CELL = "cell"; - public static final String PROPERTY_DATA_X = "dataX"; + public static final String PROPERTY_SPECIES = "species"; - public static final String PROPERTY_DATA_Y = "dataY"; + public static final String PROPERTY_SIZE_CATEGORY = "sizeCategory"; - public static final String PROPERTY_DATA_Z = "dataZ"; + public static final String PROPERTY_DATA_GRID_CELL_LONGITUDE = "gridCellLongitude"; - public static final String PROPERTY_DATA_LAG = "dataLag"; + public static final String PROPERTY_DATA_GRID_CELL_LATITUDE = "gridCellLatitude"; - public static final String PROPERTY_DATA_VALUE = "dataValue"; + public static final String PROPERTY_DATA_GRID_CELL_DEPTH = "gridCellDepth"; + public static final String PROPERTY_DATA_GRID_LONGITUDE_LAG = "gridLongitudeLag"; + + public static final String PROPERTY_DATA_GRID_LATITUDE_LAG = "gridLatitudeLag"; + + public static final String PROPERTY_DATA_GRID_DEPTH_LAG = "gridDepthLag"; + protected Voyage voyage; - protected DepthStratum depthStratum; - protected final Cell cell; - protected float dataX; + protected List<Result> result = Lists.newArrayList(); - protected float dataY; + protected Species species; - protected float dataZ; + protected SizeCategory sizeCategory; - protected float dataLag; + protected float gridCellLongitude; - protected float dataValue; + protected float gridCellLatitude; - public MapCellImportRow() { + protected float gridCellDepth; + + protected float gridLongitudeLag; + + protected float gridLatitudeLag; + + protected float gridDepthLag; + + public MapCellImportRow(CellType cellType) { this.cell = new CellImpl(); + this.cell.setCellType(cellType); } public Cell getCell() { @@ -80,30 +100,42 @@ return voyage; } - public DepthStratum getDepthStratum() { - return depthStratum; + public Species getSpecies() { + return species; } - public float getDataX() { - return dataX; + public SizeCategory getSizeCategory() { + return sizeCategory; } - public float getDataY() { - return dataY; + public List<Result> getResult() { + return result; } - public float getDataZ() { - return dataZ; + public float getGridCellLongitude() { + return gridCellLongitude; } - public float getDataLag() { - return dataLag; + public float getGridCellLatitude() { + return gridCellLatitude; } - public float getDataValue() { - return dataValue; + public float getGridCellDepth() { + return gridCellDepth; } + public float getGridLongitudeLag() { + return gridLongitudeLag; + } + + public float getGridLatitudeLag() { + return gridLatitudeLag; + } + + public float getGridDepthLag() { + return gridDepthLag; + } + public void setName(String name) { getCell().setName(name); } @@ -112,27 +144,40 @@ this.voyage = voyage; } - public void setDepthStratum(DepthStratum depthStratum) { - this.depthStratum = depthStratum; + public void setSpecies(Species species) { + this.species = species; } - public void setDataX(float dataX) { - this.dataX = dataX; + public void setSizeCategory(SizeCategory sizeCategory) { + this.sizeCategory = sizeCategory; } - public void setDataY(float dataY) { - this.dataY = dataY; + public void setGridCellLongitude(float GridCellLongitude) { + this.gridCellLongitude = GridCellLongitude; } - public void setDataZ(float dataZ) { - this.dataZ = dataZ; + public void setGridCellLatitude(float GridCellLatitude) { + this.gridCellLatitude = GridCellLatitude; } - public void setDataLag(float dataLag) { - this.dataLag = dataLag; + public void setGridCellDepth(float GridCellDepth) { + this.gridCellDepth = GridCellDepth; } - public void setDataValue(float dataValue) { - this.dataValue = dataValue; + public void setGridLongitudeLag(float GridLongitudeLag) { + this.gridLongitudeLag = GridLongitudeLag; } + + public void setGridLatitudeLag(float GridLatitudeLag) { + this.gridLatitudeLag = GridLatitudeLag; + } + + public void setGridDepthLag(float GridDepthLag) { + this.gridDepthLag = GridDepthLag; + } + + @Override + public void addResult(Result result) { + this.result.add(result); + } } \ No newline at end of file Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureResults.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureResults.java 2012-03-28 17:53:48 UTC (rev 432) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureResults.java 2012-03-28 17:54:51 UTC (rev 433) @@ -193,18 +193,6 @@ getModel().getMapsFile().setFileName(fileName); } - public void setMapResultFile(File file) { - getModel().getMapResultFile().setFile(file); - } - - public void setMapResultFileContentType(String contentType) { - getModel().getMapResultFile().setContentType(contentType); - } - - public void setMapResultFileFileName(String fileName) { - getModel().getMapResultFile().setFileName(fileName); - } - public void setLengthAgeKeyFile(File file) { getModel().getLengthAgeKeyFile().setFile(file); } Modified: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureResults-ConfigureResults-modeMap-validation.xml =================================================================== --- trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureResults-ConfigureResults-modeMap-validation.xml 2012-03-28 17:53:48 UTC (rev 432) +++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureResults-ConfigureResults-modeMap-validation.xml 2012-03-28 17:54:51 UTC (rev 433) @@ -44,11 +44,4 @@ </field-validator> </field> - <field name="mapResultFile"> - <field-validator type="nfieldexpression"> - <param name="expression">model.mapResultFile.file!=null</param> - <message key="echobase.error.import.mapResultFile.required"/> - </field-validator> - </field> - </validators> \ No newline at end of file Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureResults.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureResults.jsp 2012-03-28 17:53:48 UTC (rev 432) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureResults.jsp 2012-03-28 17:54:51 UTC (rev 433) @@ -218,7 +218,7 @@ <s:text name="echobase.legend.importData.configure"/> </legend> - <s:hidden key="model.importMode" value="REGION" label=''/> + <s:hidden key="model.importMode" value="MAP" label=''/> <s:select key="model.voyageId" required="true" label='%{getText("echobase.common.voyage")}' @@ -229,9 +229,6 @@ <s:file key="mapsFile" required="true" label='%{getText("echobase.common.cellMapsFile")}'/> - - <s:file key="mapResultFile" required="true" - label='%{getText("echobase.common.cellMapResultFile")}'/> </fieldset> <br/> <s:submit action="ConfigureResults-modeMap" key='echobase.action.import'/>
participants (1)
-
tchemit@users.forge.codelutin.com