r256 - in trunk: echobase-services/src/main/java/fr/ifremer/echobase/services echobase-services/src/main/java/fr/ifremer/echobase/services/configurations echobase-services/src/main/resources/i18n echobase-ui/src/main/java/fr/ifremer/echobase/ui echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData echobase-ui/src/main/resources/config echobase-ui/src/main/resources/i18n echobase-ui/src/main/webapp/WEB-INF/includes echobase-ui/src/main/webapp/WEB-INF/jsp/importData src/doc/re
Author: tchemit Date: 2012-01-11 14:08:20 +0100 (Wed, 11 Jan 2012) New Revision: 256 Url: http://forge.codelutin.com/repositories/revision/echobase/256 Log: prepare squeleton of import datas Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AbstractImportDataService.java trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticDataImportService.java trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticRegionDataImportService.java trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesDataImportService.java trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesIndividualDataImportService.java trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesReferenceImportService.java trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataCompleteImportService.java trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataFromTransectImportService.java trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AbstractImportConfiguration.java trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AccousticDataImportConfiguration.java trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AccousticRegionDataImportConfiguration.java trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesDataImportConfiguration.java trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesIndividualDataImportConfiguration.java trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesReferenceImportConfiguration.java trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataCompleteImportConfiguration.java trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataFromTransectImportConfiguration.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/AbstractConfigureImport.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/AbstractLaunchImport.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticDataImport.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionDataImport.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesDataImport.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualDataImport.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReferenceImport.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataCompleteImport.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransectImport.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticDataImport.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticRegionDataImport.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesDataImport.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesIndividualDataImport.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesReferenceImport.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataCompleteImport.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataFromTransectImport.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/SelectImportType.java trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticData.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticRegionData.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesData.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesIndividualData.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesReference.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataComplete.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataFromTransect.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticData.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticRegionData.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesData.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesIndividualData.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesReference.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataComplete.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataFromTransect.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/selectImportType.jsp trunk/src/doc/reunions/reunion-2012-01-11.txt Removed: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDataService.java trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/ImportDataConfiguration.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureFiles.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureMission.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/Import.java Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDataMode.java trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDbService.java trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AbstractEchobaseActionConfiguration.java trunk/echobase-services/src/main/resources/i18n/echobase-services_fr_FR.properties trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseSession.java trunk/echobase-ui/src/main/resources/config/struts-importData.xml trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties trunk/echobase-ui/src/main/webapp/WEB-INF/includes/header.jsp Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AbstractImportDataService.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AbstractImportDataService.java (rev 0) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AbstractImportDataService.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,41 @@ +/* + * #%L + * EchoBase :: Services + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.services; + +import fr.ifremer.echobase.InputFile; +import fr.ifremer.echobase.entities.EchoBaseUser; +import fr.ifremer.echobase.services.configurations.AbstractImportConfiguration; + +import java.util.Map; + +/** + * Abstract data import service. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public abstract class AbstractImportDataService<M extends AbstractImportConfiguration> extends EchoBaseServiceSupport { + + public abstract Map<InputFile, CsvImportResult> startImport(M configuration, EchoBaseUser user); +} Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AbstractImportDataService.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticDataImportService.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticDataImportService.java (rev 0) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticDataImportService.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,53 @@ +/* + * #%L + * EchoBase :: Services + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.services; + +import com.google.common.collect.Maps; +import fr.ifremer.echobase.InputFile; +import fr.ifremer.echobase.entities.EchoBaseUser; +import fr.ifremer.echobase.services.configurations.AccousticDataImportConfiguration; + +import java.util.Map; + +/** + * Service to launch a "common data complete" import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class AccousticDataImportService extends AbstractImportDataService<AccousticDataImportConfiguration> { + + @Override + public Map<InputFile, CsvImportResult> startImport(AccousticDataImportConfiguration configuration, + EchoBaseUser user) { + Map<InputFile, CsvImportResult> result = Maps.newHashMap(); + char csvSeparator = serviceContext.getConfiguration().getCsvSeparator(); + importMoviesFile(configuration.getMoviesFile(), csvSeparator); + return result; + } + + private void importMoviesFile(InputFile inputFile, char csvSeparator) { + } + +} Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticDataImportService.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticRegionDataImportService.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticRegionDataImportService.java (rev 0) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticRegionDataImportService.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,58 @@ +/* + * #%L + * EchoBase :: Services + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.services; + +import com.google.common.collect.Maps; +import fr.ifremer.echobase.InputFile; +import fr.ifremer.echobase.entities.EchoBaseUser; +import fr.ifremer.echobase.services.configurations.AccousticRegionDataImportConfiguration; + +import java.util.Map; + +/** + * Service to launch a "common data complete" import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class AccousticRegionDataImportService extends AbstractImportDataService<AccousticRegionDataImportConfiguration> { + + @Override + public Map<InputFile, CsvImportResult> startImport(AccousticRegionDataImportConfiguration configuration, EchoBaseUser user) { + Map<InputFile, CsvImportResult> result = Maps.newHashMap(); + char csvSeparator = serviceContext.getConfiguration().getCsvSeparator(); + importRegionsFile(configuration.getRegionsFile(), csvSeparator); + importAssociationFile(configuration.getAssociationFile(), csvSeparator); + return result; + } + + private void importRegionsFile(InputFile inputFile, char csvSeparator) { + } + + + private void importAssociationFile(InputFile inputFile, char csvSeparator) { + } + + +} Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/AccousticRegionDataImportService.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesDataImportService.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesDataImportService.java (rev 0) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesDataImportService.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,64 @@ +/* + * #%L + * EchoBase :: Services + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.services; + +import com.google.common.collect.Maps; +import fr.ifremer.echobase.InputFile; +import fr.ifremer.echobase.entities.EchoBaseUser; +import fr.ifremer.echobase.services.configurations.CatchesDataImportConfiguration; + +import java.util.Map; + +/** + * Service to launch a "common data complete" import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class CatchesDataImportService extends AbstractImportDataService<CatchesDataImportConfiguration> { + + @Override + public Map<InputFile, CsvImportResult> startImport(CatchesDataImportConfiguration configuration, EchoBaseUser user) { + Map<InputFile, CsvImportResult> result = Maps.newHashMap(); + + char csvSeparator = serviceContext.getConfiguration().getCsvSeparator(); + importTbleStationFile(configuration.getTlbeStationFile(), csvSeparator); + importXtbleTriFile(configuration.getXtblTriFile(), csvSeparator); + importTblMensurationFile(configuration.getTblMensurationFile(), csvSeparator); + importTblMensurationFileClass(configuration.getTblMensurationClasseFile(), csvSeparator); + return result; + } + + private void importTbleStationFile(InputFile inputFile, char csvSeparator) { + } + + private void importXtbleTriFile(InputFile inputFile, char csvSeparator) { + } + + private void importTblMensurationFile(InputFile inputFile, char csvSeparator) { + } + + private void importTblMensurationFileClass(InputFile inputFile, char csvSeparator) { + } +} Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesDataImportService.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesIndividualDataImportService.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesIndividualDataImportService.java (rev 0) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesIndividualDataImportService.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,52 @@ +/* + * #%L + * EchoBase :: Services + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.services; + +import com.google.common.collect.Maps; +import fr.ifremer.echobase.InputFile; +import fr.ifremer.echobase.entities.EchoBaseUser; +import fr.ifremer.echobase.services.configurations.CatchesIndividualDataImportConfiguration; + +import java.util.Map; + +/** + * Service to launch a "common data complete" import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class CatchesIndividualDataImportService extends AbstractImportDataService<CatchesIndividualDataImportConfiguration> { + + @Override + public Map<InputFile, CsvImportResult> startImport(CatchesIndividualDataImportConfiguration configuration, EchoBaseUser user) { + Map<InputFile, CsvImportResult> result = Maps.newHashMap(); + + char csvSeparator = serviceContext.getConfiguration().getCsvSeparator(); + importIndividialDataFile(configuration.getIndividualDataFile(), csvSeparator); + return result; + } + + private void importIndividialDataFile(InputFile inputFile, char csvSeparator) { + } +} Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesIndividualDataImportService.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesReferenceImportService.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesReferenceImportService.java (rev 0) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesReferenceImportService.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,60 @@ +/* + * #%L + * EchoBase :: Services + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.services; + +import com.google.common.collect.Maps; +import fr.ifremer.echobase.InputFile; +import fr.ifremer.echobase.entities.EchoBaseUser; +import fr.ifremer.echobase.services.configurations.CatchesReferenceImportConfiguration; + +import java.util.Map; + +/** + * Service to launch a "catches references" import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class CatchesReferenceImportService extends AbstractImportDataService<CatchesReferenceImportConfiguration> { + + @Override + public Map<InputFile, CsvImportResult> startImport(CatchesReferenceImportConfiguration configuration, EchoBaseUser user) { + + Map<InputFile, CsvImportResult> result = Maps.newHashMap(); + char csvSeparator = serviceContext.getConfiguration().getCsvSeparator(); + + importLenthAgeKey(configuration.getLengthAgeKeyFile(), csvSeparator); + + importLenghtWeightKey(configuration.getLengthWeightKeyFile(), csvSeparator); + + return result; + } + + protected void importLenghtWeightKey(InputFile inputFile, char csvSeparator) { + + } + + protected void importLenthAgeKey(InputFile inputFile, char csvSeparator) { + } +} Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CatchesReferenceImportService.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataCompleteImportService.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataCompleteImportService.java (rev 0) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataCompleteImportService.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,56 @@ +/* + * #%L + * EchoBase :: Services + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.services; + +import com.google.common.collect.Maps; +import fr.ifremer.echobase.InputFile; +import fr.ifremer.echobase.entities.EchoBaseUser; +import fr.ifremer.echobase.services.configurations.CommonDataCompleteImportConfiguration; + +import java.util.Map; + +/** + * Service to launch a "common data complete" import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class CommonDataCompleteImportService extends AbstractImportDataService<CommonDataCompleteImportConfiguration> { + + @Override + public Map<InputFile, CsvImportResult> startImport(CommonDataCompleteImportConfiguration configuration, EchoBaseUser user) { + Map<InputFile, CsvImportResult> result = Maps.newHashMap(); + char csvSeparator = serviceContext.getConfiguration().getCsvSeparator(); + importCasinoFile(configuration.getCasinoFile(), csvSeparator); + importEchotypeFile(configuration.getEchotypeFile(), csvSeparator); + return result; + } + + private void importCasinoFile(InputFile casinoFile, char csvSeparator) { + } + + private void importEchotypeFile(InputFile echotypeFile, char csvSeparator) { + + } +} Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataCompleteImportService.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataFromTransectImportService.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataFromTransectImportService.java (rev 0) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataFromTransectImportService.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,53 @@ +/* + * #%L + * EchoBase :: Services + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.services; + +import com.google.common.collect.Maps; +import fr.ifremer.echobase.InputFile; +import fr.ifremer.echobase.entities.EchoBaseUser; +import fr.ifremer.echobase.services.configurations.CommonDataFromTransectImportConfiguration; + +import java.util.Map; + +/** + * Service to launch a "common data complete" import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class CommonDataFromTransectImportService extends AbstractImportDataService<CommonDataFromTransectImportConfiguration> { + + @Override + public Map<InputFile, CsvImportResult> startImport(CommonDataFromTransectImportConfiguration configuration, EchoBaseUser user) { + Map<InputFile, CsvImportResult> result = Maps.newHashMap(); + + char csvSeparator = serviceContext.getConfiguration().getCsvSeparator(); + importCasinoFile(configuration.getCasinoFile(), csvSeparator); + return result; + } + + protected void importCasinoFile(InputFile inputFile, char csvSeparator) { + + } +} Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/CommonDataFromTransectImportService.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDataMode.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDataMode.java 2012-01-10 16:44:31 UTC (rev 255) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDataMode.java 2012-01-11 13:08:20 UTC (rev 256) @@ -33,11 +33,27 @@ */ public enum ImportDataMode { - /** Import only acoustic file. */ - ACOUSTIC(n_("echobase.common.importDataMode.acoustic")), - /** Import all files. */ - ALL(n_("echobase.common.importDataMode.all")); + /** Import all common data from Voyage to Operation. */ + CommonDataComplete(n_("echobase.common.importDataMode.commonDataComplete")), + /** Import all common data from Transect to Operation. */ + CommonDataFromTransect(n_("echobase.common.importDataMode.commonDataFromTransect")), + + /** Import all common data from Voyage to Operation. */ + CatchesReference(n_("echobase.common.importDataMode.catchesReferences")), + + /** Import catches data (unsorted, total, but no individual ones). */ + CatchesData(n_("echobase.common.importDataMode.catchesData")), + + /** Import individual catches data. */ + CatchesIndividualData(n_("echobase.common.importDataMode.catchesIndividualData")), + + /** Import accoustic data (Cells ESDU and Elementary). */ + AccousticData(n_("echobase.common.importDataMode.accousticData")), + + /** Import accoustic region cells. */ + AccousticRegionData(n_("echobase.common.importDataMode.accousticRegionData")); + private final String i18nKey; ImportDataMode(String i18nKey) { Deleted: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDataService.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDataService.java 2012-01-10 16:44:31 UTC (rev 255) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDataService.java 2012-01-11 13:08:20 UTC (rev 256) @@ -1,270 +0,0 @@ -/* - * #%L - * EchoBase :: Services - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2011 Ifremer, Codelutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package fr.ifremer.echobase.services; - -import com.google.common.collect.Maps; -import fr.ifremer.echobase.EchoBaseTechnicalException; -import fr.ifremer.echobase.InputFile; -import fr.ifremer.echobase.entities.references.Mission; -import fr.ifremer.echobase.services.configurations.ImportDataConfiguration; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.nuiton.topia.TopiaException; - -import java.io.File; -import java.util.Map; - -/** - * Service to import datas. - * - * @author tchemit <chemit@codelutin.com> - * @since 0.2 - */ -public class ImportDataService extends EchoBaseServiceSupport { - - /** Logger. */ - private static final Log log = LogFactory.getLog(ImportDataService.class); - - public Mission createMission(Mission mission) { - try { - Mission result = getDAO(Mission.class).create(mission); - commitTransaction("Could not create mission " + - mission.getName()); - return result; - } catch (TopiaException eee) { - throw new EchoBaseTechnicalException(eee); - } - } - - public Map<InputFile, CsvImportResult> startImport(ImportDataConfiguration configuration) { - - Map<InputFile, CsvImportResult> result = Maps.newHashMap(); - - - ImportDataMode importDataMode = configuration.getImportDataMode(); - switch (importDataMode) { - case ACOUSTIC: - doImportAcoustic(configuration, result); - break; - case ALL: - doImportAll(configuration, result); - break; - default: - throw new IllegalStateException( - "Can not know what to do with importDataMode " + - importDataMode); - - } - - - return result; - } - - protected void doImportAcoustic(ImportDataConfiguration configuration, - Map<InputFile, CsvImportResult> result) { - - Mission mission = configuration.getMission(); - - // compute nb step to treate (means nb imports to do) - configuration.computeSteps(); - - if (log.isInfoEnabled()) { - log.info("Starts data import with mission " + - mission.getName()); - } - - InputFile acousticFile = configuration.getAcousticFile(); - if (acousticFile.getFile() != null) { - - // do acoustic import - try { - CsvImportResult importResult = - importAcoustic(mission, acousticFile); - configuration.incrementsProgression(); - result.put(acousticFile, importResult); - } finally { - deleteFile(acousticFile); - } - } - } - - protected void doImportAll(ImportDataConfiguration configuration, - Map<InputFile, CsvImportResult> result) { - - Mission mission = configuration.getMission(); - - // compute nb step to treate (means nb imports to do) - configuration.computeSteps(); - - if (log.isInfoEnabled()) { - log.info("Starts data import with mission " + - mission.getName()); - } - - InputFile acousticFile = configuration.getAcousticFile(); - if (acousticFile.getFile() != null) { - - // do acoustic import - try { - CsvImportResult importResult = - importAcoustic(mission, acousticFile); - configuration.incrementsProgression(); - result.put(acousticFile, importResult); - } finally { - deleteFile(acousticFile); - } - } - - InputFile captureFile = configuration.getCaptureFile(); - if (captureFile.getFile() != null) { - - // do capture import - try { - CsvImportResult importResult = - importCapture(mission, captureFile); - configuration.incrementsProgression(); - result.put(captureFile, importResult); - } finally { - deleteFile(captureFile); - } - } - - InputFile eventsFile = configuration.getEventsFile(); - if (eventsFile.getFile() != null) { - - // do events import - try { - CsvImportResult importResult = - importEvents(mission, eventsFile); - configuration.incrementsProgression(); - result.put(eventsFile, importResult); - } finally { - deleteFile(eventsFile); - } - } - - InputFile lectureAgeGenFile = configuration.getLectureAgeGenFile(); - if (lectureAgeGenFile.getFile() != null) { - - // do lecture age gen import - try { - CsvImportResult importResult = - importLectureAgeGen(mission, lectureAgeGenFile); - configuration.incrementsProgression(); - result.put(lectureAgeGenFile, importResult); - } finally { - deleteFile(lectureAgeGenFile); - } - } - - InputFile typeEchoSpeciesFile = configuration.getTypeEchoSpeciesFile(); - if (typeEchoSpeciesFile.getFile() != null) { - - // do echo species import - try { - CsvImportResult importResult = - importTypeEchoSpecies(mission, typeEchoSpeciesFile); - configuration.incrementsProgression(); - result.put(typeEchoSpeciesFile, importResult); - } finally { - deleteFile(typeEchoSpeciesFile); - } - } - } - - protected void deleteFile(InputFile input) { - File file = input.getFile(); - - if (log.isInfoEnabled()) { - log.info("Will delete import file " + file); - } - boolean wasDel = file.delete(); - if (!wasDel) { - throw new EchoBaseTechnicalException("Could not delete file " + file); - } - } - - protected CsvImportResult importAcoustic(Mission mission, - InputFile importFile) { - if (log.isInfoEnabled()) { - log.info("Starts " + importFile.getLabel() + " with file " + - importFile.getFile()); - } - CsvImportResult result = CsvImportResult.newResult(null, importFile.getFileName(), false); - prepareImport(); - return result; - } - - protected CsvImportResult importCapture(Mission mission, - InputFile importFile) { - if (log.isInfoEnabled()) { - log.info("Starts " + importFile.getLabel() + " with file " + - importFile.getFile()); - } - CsvImportResult result = CsvImportResult.newResult(null, importFile.getFileName(), false); - prepareImport(); - return result; - } - - protected CsvImportResult importEvents(Mission mission, - InputFile importFile) { - if (log.isInfoEnabled()) { - log.info("Starts " + importFile.getLabel() + " with file " + - importFile.getFile()); - } - CsvImportResult result = CsvImportResult.newResult(null, importFile.getFileName(), false); - prepareImport(); - return result; - } - - protected CsvImportResult importLectureAgeGen(Mission mission, - InputFile importFile) { - if (log.isInfoEnabled()) { - log.info("Starts " + importFile.getLabel() + " with file " + - importFile.getFile()); - } - CsvImportResult result = CsvImportResult.newResult(null, importFile.getFileName(), false); - prepareImport(); - return result; - } - - protected CsvImportResult importTypeEchoSpecies(Mission mission, - InputFile importFile) { - if (log.isInfoEnabled()) { - log.info("Starts " + importFile.getLabel() + " with file " + - importFile.getFile()); - } - CsvImportResult result = CsvImportResult.newResult(null, importFile.getFileName(), false); - prepareImport(); - return result; - } - - protected void prepareImport() { - try { - Thread.sleep(2000); - } catch (InterruptedException e) { - // ignore - } - } -} Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDbService.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDbService.java 2012-01-10 16:44:31 UTC (rev 255) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/ImportDbService.java 2012-01-11 13:08:20 UTC (rev 256) @@ -257,8 +257,9 @@ String targetTableName = target.getContract().getSimpleName(); String sourceTableName = source.getContract().getSimpleName(); String table = targetTableName; - if (source == EchoBaseEntityEnum.Voyage && target == EchoBaseEntityEnum.Echotype) { - table = targetTableName + "_" + sourceTableName; + if (source == EchoBaseEntityEnum.Voyage && target == EchoBaseEntityEnum.Echotype || + source == EchoBaseEntityEnum.Echotype && target == EchoBaseEntityEnum.Species) { + table = sourceTableName + "_" + targetTableName; updateString = "UPDATE " + table + " SET " + sourceTableName + " = '%s' WHERE " + meta.getName() + " ='%s';"; } else if (source == EchoBaseEntityEnum.Voyage && target == EchoBaseEntityEnum.Strata) { table = targetTableName + "_" + source.getContract().getSimpleName(); Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AbstractEchobaseActionConfiguration.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AbstractEchobaseActionConfiguration.java 2012-01-10 16:44:31 UTC (rev 255) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AbstractEchobaseActionConfiguration.java 2012-01-11 13:08:20 UTC (rev 256) @@ -45,6 +45,7 @@ private float progression; private long startTime; + private long endTime; public final int getNbSteps() { @@ -90,7 +91,7 @@ long eTime = getEndTime(); return StringUtil.convertTime(eTime - sTime); } - + public void beginAction() { setStartTime(System.nanoTime()); } Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AbstractImportConfiguration.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AbstractImportConfiguration.java (rev 0) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AbstractImportConfiguration.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,51 @@ +/* + * #%L + * EchoBase :: Services + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.services.configurations; + +import fr.ifremer.echobase.InputFile; + +import java.io.File; + +/** + * Common import data configuration. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public abstract class AbstractImportConfiguration extends AbstractEchobaseActionConfiguration { + + private static final long serialVersionUID = 1L; + + protected File workingDirectory; + + public File getWorkingDirectory() { + return workingDirectory; + } + + public void setWorkingDirectory(File workingDirectory) { + this.workingDirectory = workingDirectory; + } + + public abstract InputFile[] getInputFiles(); +} Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AbstractImportConfiguration.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AccousticDataImportConfiguration.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AccousticDataImportConfiguration.java (rev 0) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AccousticDataImportConfiguration.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,101 @@ +/* + * #%L + * EchoBase :: Services + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.services.configurations; + +import fr.ifremer.echobase.InputFile; + +import java.util.Locale; + +import static org.nuiton.i18n.I18n.l_; + +/** + * Configuration of a "accoustic datas" import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class AccousticDataImportConfiguration extends AbstractImportConfiguration { + + private static final long serialVersionUID = 1L; + + /** Selected voyage id where to import datas. */ + protected String voyageId; + + /** Selected vessel id to find out transect where to import datas. */ + protected String vesselId; + + /** Manual field 1. */ + protected String field1; + + /** Manual field 2. */ + protected String field2; + + /** Movies file to import. */ + protected final InputFile moviesFile; + + public AccousticDataImportConfiguration(Locale locale) { + moviesFile = InputFile.newFile(l_(locale, "echobase.common.moviesFile")); + } + + public String getVoyageId() { + return voyageId; + } + + public void setVoyageId(String voyageId) { + this.voyageId = voyageId; + } + + public String getVesselId() { + return vesselId; + } + + public void setVesselId(String vesselId) { + this.vesselId = vesselId; + } + + public String getField1() { + return field1; + } + + public void setField1(String field1) { + this.field1 = field1; + } + + public String getField2() { + return field2; + } + + public void setField2(String field2) { + this.field2 = field2; + } + + public InputFile getMoviesFile() { + return moviesFile; + } + + @Override + public InputFile[] getInputFiles() { + return new InputFile[]{moviesFile}; + } +} Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AccousticDataImportConfiguration.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AccousticRegionDataImportConfiguration.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AccousticRegionDataImportConfiguration.java (rev 0) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AccousticRegionDataImportConfiguration.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,111 @@ +/* + * #%L + * EchoBase :: Services + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.services.configurations; + +import fr.ifremer.echobase.InputFile; + +import java.util.Locale; + +import static org.nuiton.i18n.I18n.l_; + +/** + * Configuration of a "accoustic region data" import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class AccousticRegionDataImportConfiguration extends AbstractImportConfiguration { + + private static final long serialVersionUID = 1L; + + + /** Selected voyage id where to import datas. */ + protected String voyageId; + + /** Selected vessel id to find out transect where to import datas. */ + protected String vesselId; + + /** Manual field 1. */ + protected String field1; + + /** Manual field 2. */ + protected String field2; + + /** Region file to import. */ + protected final InputFile regionsFile; + + /** Region cell associations file to import. */ + protected final InputFile associationFile; + + public AccousticRegionDataImportConfiguration(Locale locale) { + regionsFile = InputFile.newFile(l_(locale, "echobase.common.regionsFile")); + associationFile = InputFile.newFile(l_(locale, "echobase.common.associationFile")); + } + + public String getVoyageId() { + return voyageId; + } + + public void setVoyageId(String voyageId) { + this.voyageId = voyageId; + } + + public String getVesselId() { + return vesselId; + } + + public void setVesselId(String vesselId) { + this.vesselId = vesselId; + } + + public String getField1() { + return field1; + } + + public void setField1(String field1) { + this.field1 = field1; + } + + public String getField2() { + return field2; + } + + public void setField2(String field2) { + this.field2 = field2; + } + + public InputFile getRegionsFile() { + return regionsFile; + } + + + public InputFile getAssociationFile() { + return associationFile; + } + + @Override + public InputFile[] getInputFiles() { + return new InputFile[]{regionsFile, associationFile}; + } +} Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/AccousticRegionDataImportConfiguration.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesDataImportConfiguration.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesDataImportConfiguration.java (rev 0) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesDataImportConfiguration.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,93 @@ +/* + * #%L + * EchoBase :: Services + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.services.configurations; + +import fr.ifremer.echobase.InputFile; + +import java.util.Locale; + +import static org.nuiton.i18n.I18n.l_; + +/** + * Configuration of a "catches data import". + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class CatchesDataImportConfiguration extends AbstractImportConfiguration { + + private static final long serialVersionUID = 1L; + + /** Selected voyage id where to import datas. */ + protected String voyageId; + + /** Station file to import. */ + protected final InputFile tlbeStationFile; + + /** Tri file to import. */ + protected final InputFile xtblTriFile; + + /** Mensuration data file to import. */ + protected final InputFile tblMensurationFile; + + /** Mensuration classes file to import. */ + protected final InputFile tblMensurationClasseFile; + + public CatchesDataImportConfiguration(Locale locale) { + tlbeStationFile = InputFile.newFile(l_(locale, "echobase.common.tlbeStationFile")); + xtblTriFile = InputFile.newFile(l_(locale, "echobase.common.xtblTriFile")); + tblMensurationFile = InputFile.newFile(l_(locale, "echobase.common.tblMensurationFile")); + tblMensurationClasseFile = InputFile.newFile(l_(locale, "echobase.common.tblMensurationClasseFile")); + } + + public String getVoyageId() { + return voyageId; + } + + public void setVoyageId(String voyageId) { + this.voyageId = voyageId; + } + + public InputFile getTlbeStationFile() { + return tlbeStationFile; + } + + + public InputFile getXtblTriFile() { + return xtblTriFile; + } + + public InputFile getTblMensurationFile() { + return tblMensurationFile; + } + + public InputFile getTblMensurationClasseFile() { + return tblMensurationClasseFile; + } + + @Override + public InputFile[] getInputFiles() { + return new InputFile[]{tlbeStationFile, xtblTriFile, tblMensurationFile, tblMensurationClasseFile}; + } +} Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesDataImportConfiguration.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesIndividualDataImportConfiguration.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesIndividualDataImportConfiguration.java (rev 0) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesIndividualDataImportConfiguration.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,68 @@ +/* + * #%L + * EchoBase :: Services + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.services.configurations; + +import fr.ifremer.echobase.InputFile; + +import java.util.Locale; + +import static org.nuiton.i18n.I18n.l_; + +/** + * Configuration of a "catches individual data" import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class CatchesIndividualDataImportConfiguration extends AbstractImportConfiguration { + + private static final long serialVersionUID = 1L; + + /** Selected voyage id where to import datas. */ + protected String voyageId; + + /** Individual input file to import. */ + protected final InputFile individualDataFile; + + public CatchesIndividualDataImportConfiguration(Locale locale) { + individualDataFile = InputFile.newFile(l_(locale, "echobase.common.individualDataFile")); + } + + public String getVoyageId() { + return voyageId; + } + + public void setVoyageId(String voyageId) { + this.voyageId = voyageId; + } + + public InputFile getIndividualDataFile() { + return individualDataFile; + } + + @Override + public InputFile[] getInputFiles() { + return new InputFile[]{individualDataFile}; + } +} Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesIndividualDataImportConfiguration.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesReferenceImportConfiguration.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesReferenceImportConfiguration.java (rev 0) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesReferenceImportConfiguration.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,65 @@ +/* + * #%L + * EchoBase :: Services + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.services.configurations; + +import fr.ifremer.echobase.InputFile; + +import java.util.Locale; + +import static org.nuiton.i18n.I18n.l_; + +/** + * Configuration of a "catches references" import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class CatchesReferenceImportConfiguration extends AbstractImportConfiguration { + + private static final long serialVersionUID = 1L; + + /** LengthAgeKey file to import. */ + protected final InputFile lengthAgeKeyFile; + + /** LengthWeightKey file to import. */ + protected final InputFile lengthWeightKeyFile; + + public CatchesReferenceImportConfiguration(Locale locale) { + lengthAgeKeyFile = InputFile.newFile(l_(locale, "echobase.common.lengthAgeKeyFile")); + lengthWeightKeyFile = InputFile.newFile(l_(locale, "echobase.common.lengthWeightKeyFile")); + } + + public InputFile getLengthAgeKeyFile() { + return lengthAgeKeyFile; + } + + public InputFile getLengthWeightKeyFile() { + return lengthWeightKeyFile; + } + + @Override + public InputFile[] getInputFiles() { + return new InputFile[]{lengthAgeKeyFile, lengthWeightKeyFile}; + } +} Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CatchesReferenceImportConfiguration.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataCompleteImportConfiguration.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataCompleteImportConfiguration.java (rev 0) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataCompleteImportConfiguration.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,109 @@ +/* + * #%L + * EchoBase :: Services + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.services.configurations; + +import fr.ifremer.echobase.InputFile; + +import java.util.Locale; + +import static org.nuiton.i18n.I18n.l_; + +/** + * Configuration of a "common data complete" import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class CommonDataCompleteImportConfiguration extends AbstractImportConfiguration { + + private static final long serialVersionUID = 1L; + + /** Selected mission id to use in voyage. */ + protected String missionId; + + /** Selected area of operation to use for voyage. */ + protected String areaOfOperationId; + + /** Manual description of voyage. */ + protected String voyageDescription; + + /** Manual datum to use in voyage. */ + protected String datum = "WGS84"; + + /** Casino file to import. */ + protected final InputFile casinoFile; + + /** Echotype file to import. */ + protected final InputFile echotypeFile; + + public CommonDataCompleteImportConfiguration(Locale locale) { + casinoFile = InputFile.newFile(l_(locale, "echobase.common.casinoFile")); + echotypeFile = InputFile.newFile(l_(locale, "echobase.common.echotypeFile")); + } + + public String getMissionId() { + return missionId; + } + + public void setMissionId(String missionId) { + this.missionId = missionId; + } + + public String getAreaOfOperationId() { + return areaOfOperationId; + } + + public void setAreaOfOperationId(String areaOfOperationId) { + this.areaOfOperationId = areaOfOperationId; + } + + public String getVoyageDescription() { + return voyageDescription; + } + + public void setVoyageDescription(String voyageDescription) { + this.voyageDescription = voyageDescription; + } + + public String getDatum() { + return datum; + } + + public void setDatum(String datum) { + this.datum = datum; + } + + public InputFile getCasinoFile() { + return casinoFile; + } + + public InputFile getEchotypeFile() { + return echotypeFile; + } + + @Override + public InputFile[] getInputFiles() { + return new InputFile[]{casinoFile, echotypeFile}; + } +} Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataCompleteImportConfiguration.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataFromTransectImportConfiguration.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataFromTransectImportConfiguration.java (rev 0) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataFromTransectImportConfiguration.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,68 @@ +/* + * #%L + * EchoBase :: Services + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.services.configurations; + +import fr.ifremer.echobase.InputFile; + +import java.util.Locale; + +import static org.nuiton.i18n.I18n.l_; + +/** + * Configuration of a "common data from transect" import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class CommonDataFromTransectImportConfiguration extends AbstractImportConfiguration { + + private static final long serialVersionUID = 1L; + + /** Selected voyage id where to import datas. */ + protected String voyageId; + + /** Casino file to import. */ + protected final InputFile casinoFile; + + public CommonDataFromTransectImportConfiguration(Locale locale) { + casinoFile = InputFile.newFile(l_(locale, "echobase.common.casinoFile")); + } + + public String getVoyageId() { + return voyageId; + } + + public void setVoyageId(String voyageId) { + this.voyageId = voyageId; + } + + public InputFile getCasinoFile() { + return casinoFile; + } + + @Override + public InputFile[] getInputFiles() { + return new InputFile[]{casinoFile}; + } +} Property changes on: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/CommonDataFromTransectImportConfiguration.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Deleted: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/ImportDataConfiguration.java =================================================================== --- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/ImportDataConfiguration.java 2012-01-10 16:44:31 UTC (rev 255) +++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/configurations/ImportDataConfiguration.java 2012-01-11 13:08:20 UTC (rev 256) @@ -1,141 +0,0 @@ -/* - * #%L - * EchoBase :: Services - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2011 Ifremer, Codelutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package fr.ifremer.echobase.services.configurations; - -import fr.ifremer.echobase.InputFile; -import fr.ifremer.echobase.entities.references.Mission; -import fr.ifremer.echobase.services.ImportDataMode; -import org.apache.commons.io.FileUtils; - -import java.io.File; -import java.io.IOException; -import java.util.Locale; - -import static org.nuiton.i18n.I18n.l_; - -/** - * Configuration of an import data action. - * - * @author tchemit <chemit@codelutin.com> - * @since 0.2 - */ -public class ImportDataConfiguration extends AbstractEchobaseActionConfiguration { - - private static final long serialVersionUID = 1L; - - /** Mission used for the import (may not be in db if needed to be created). */ - protected Mission mission; - - protected ImportDataMode importDataMode; - - protected File workingDirectory; - - protected InputFile acousticFile; - - protected InputFile captureFile; - - protected InputFile lectureAgeGenFile; - - protected InputFile eventsFile; - - protected InputFile typeEchoSpeciesFile; - - public ImportDataConfiguration(Locale locale) { - acousticFile = InputFile.newFile( - l_(locale, "echobase.common.acousticImport")); - captureFile = InputFile.newFile( - l_(locale, "echobase.common.captureImport")); - lectureAgeGenFile = InputFile.newFile( - l_(locale, "echobase.common.lectureAgeGenImport")); - eventsFile = InputFile.newFile( - l_(locale, "echobase.common.eventsImport")); - typeEchoSpeciesFile = InputFile.newFile( - l_(locale, "echobase.common.typeEchoSpeciesImport")); - } - - public ImportDataMode getImportDataMode() { - return importDataMode; - } - - public File getWorkingDirectory() { - return workingDirectory; - } - - public Mission getMission() { - return mission; - } - - public InputFile getAcousticFile() { - return acousticFile; - } - - public InputFile getCaptureFile() { - return captureFile; - } - - public InputFile getLectureAgeGenFile() { - return lectureAgeGenFile; - } - - public InputFile getEventsFile() { - return eventsFile; - } - - public InputFile getTypeEchoSpeciesFile() { - return typeEchoSpeciesFile; - } - - public void setImportDataMode(ImportDataMode importDataMode) { - this.importDataMode = importDataMode; - } - - public void setWorkingDirectory(File workingDirectory) { - this.workingDirectory = workingDirectory; - } - - public void setMission(Mission mission) { - this.mission = mission; - } - - public void computeSteps() { - int nbSteps = 0; - switch (importDataMode) { - case ALL: - nbSteps = 5; - break; - case ACOUSTIC: - nbSteps = 1; - break; - default: - } - setNbSteps(nbSteps); - } - - @Override - public void destroy() throws IOException { - if (workingDirectory != null) { - FileUtils.deleteDirectory(workingDirectory); - } - } -} Modified: trunk/echobase-services/src/main/resources/i18n/echobase-services_fr_FR.properties =================================================================== --- trunk/echobase-services/src/main/resources/i18n/echobase-services_fr_FR.properties 2012-01-10 16:44:31 UTC (rev 255) +++ trunk/echobase-services/src/main/resources/i18n/echobase-services_fr_FR.properties 2012-01-11 13:08:20 UTC (rev 256) @@ -1,8 +1,20 @@ -echobase.common.acousticImport=Import Acoustique -echobase.common.captureImport=Import Pêcherie -echobase.common.eventsImport=Import Evènements -echobase.common.importDataMode.acoustic=Import Acoustic -echobase.common.importDataMode.all=Import globale -echobase.common.importDbFile=File d'import (zip) -echobase.common.lectureAgeGenImport=Import Lecture Agen Gen -echobase.common.typeEchoSpeciesImport=Import Type EchoSpecies +echobase.common.associationFile=Fichier d'associations de cellules +echobase.common.casinoFile=Fichier Casino +echobase.common.echotypeFile=Fichier echotype +echobase.common.importDataMode.accousticData=Import des données accoustiques +echobase.common.importDataMode.accousticRegionData=Import des cellules régions (accoustique) +echobase.common.importDataMode.catchesData=Import des donées de pêche non biométrie +echobase.common.importDataMode.catchesIndividualData=Import des données de pêche biométire +echobase.common.importDataMode.catchesReferences=Import du référentiel pêche +echobase.common.importDataMode.commonDataComplete=Import de données communes +echobase.common.importDataMode.commonDataFromTransect=Import des données communes (à partir du transect) +echobase.common.importDbFile=Fichier d'import (zip) +echobase.common.individualDataFile=Fichier de données individuelles +echobase.common.lengthAgeKeyFile=Fichier de relation Taille-Age +echobase.common.lengthWeightKeyFile=Fichier de relation Taille-Poids +echobase.common.moviesFile=Fichier Movies +echobase.common.regionsFile=Fichier des régions +echobase.common.tblMensurationClasseFile=Fichier de classes de mensuration +echobase.common.tblMensurationFile=Fichier de mensuration +echobase.common.tlbeStationFile=Fichier des stations +echobase.common.xtblTriFile=Fichier Tri Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseSession.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseSession.java 2012-01-10 16:44:31 UTC (rev 255) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseSession.java 2012-01-11 13:08:20 UTC (rev 256) @@ -24,9 +24,9 @@ package fr.ifremer.echobase.ui; import fr.ifremer.echobase.entities.EchoBaseUser; +import fr.ifremer.echobase.services.configurations.AbstractImportConfiguration; import fr.ifremer.echobase.services.configurations.EmbeddedApplicationConfiguration; import fr.ifremer.echobase.services.configurations.ExportDbConfiguration; -import fr.ifremer.echobase.services.configurations.ImportDataConfiguration; import fr.ifremer.echobase.services.configurations.ImportDbConfiguration; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -48,9 +48,6 @@ /** Key to set User connected in this session. */ protected static final String PROPERTY_ECHO_BASE_USER = "echobaseUser"; - /** Key to keep import data configuration in this session. */ - protected static final String PROPERTY_IMPORT_DATA_CONFIGURATION = "importDataConfiguration"; - /** Key to keep import db configuration in this session. */ protected static final String PROPERTY_IMPORT_DB_CONFIGURATION = "importDbConfiguration"; @@ -81,14 +78,6 @@ set(PROPERTY_ECHO_BASE_USER, echoBaseUser); } - public ImportDataConfiguration getImportDataConfiguration() { - return get(PROPERTY_IMPORT_DATA_CONFIGURATION, ImportDataConfiguration.class); - } - - public void setImportDataConfiguration(ImportDataConfiguration configuration) { - set(PROPERTY_IMPORT_DATA_CONFIGURATION, configuration); - } - public ImportDbConfiguration getImportDbConfiguration() { return get(PROPERTY_IMPORT_DB_CONFIGURATION, ImportDbConfiguration.class); } @@ -113,6 +102,18 @@ set(PROPERTY_EMBEDDED_APPLICATION_CONFIGURATION, configuration); } + public <M extends AbstractImportConfiguration> M getImportDataConfiguration(Class<M> configurationType) { + return get(configurationType.getSimpleName(), configurationType); + } + + public <M extends AbstractImportConfiguration> void setImportDataConfiguration(M configuration) { + set(configuration.getClass().getSimpleName(), configuration); + } + + public <M extends AbstractImportConfiguration> void removeImportDataConfiguration(Class<M> configurationType) { + set(configurationType.getSimpleName(), null); + } + /** * Remove form this session, the object from his given key and returns it. * Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/AbstractConfigureImport.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/AbstractConfigureImport.java (rev 0) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/AbstractConfigureImport.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,121 @@ +/* + * #%L + * EchoBase :: UI + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.ui.actions.importData; + +import com.opensymphony.xwork2.interceptor.annotations.InputConfig; +import fr.ifremer.echobase.InputFile; +import fr.ifremer.echobase.services.EchoBaseServiceSupport; +import fr.ifremer.echobase.services.configurations.AbstractImportConfiguration; +import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport; +import org.apache.commons.io.FileUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.nuiton.topia.persistence.TopiaEntity; +import org.nuiton.util.FileUtil; + +import java.io.File; +import java.util.List; +import java.util.Map; + +/** + * Configure a accoustic data import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public abstract class AbstractConfigureImport<M extends AbstractImportConfiguration> extends EchoBaseActionSupport { + + private static final long serialVersionUID = 1L; + + /** Logger. */ + private static final Log log = + LogFactory.getLog(AbstractConfigureImport.class); + + protected final Class<M> modelType; + + protected M model; + + protected AbstractConfigureImport(Class<M> modelType) { + this.modelType = modelType; + } + + public final M getModel() { + if (model == null) { + model = createModel(); + } + return model; + } + + protected abstract M createModel(); + + @Override + public String input() throws Exception { + + // always remove configuration from session anytime coming here + getEchoBaseSession().removeImportDataConfiguration(modelType); + + return INPUT; + } + + @InputConfig(methodName = "input") + @Override + public String execute() throws Exception { + + M importModel = getModel(); + File tempDirectory = FileUtils.getTempDirectory(); + File dataDirectory = new File( + tempDirectory, + "echobase-importData-" + System.currentTimeMillis()); + FileUtil.createDirectoryIfNecessary(dataDirectory); + importModel.setWorkingDirectory(dataDirectory); + if (log.isInfoEnabled()) { + log.info("Temporary directory to use : " + dataDirectory); + } + + for (InputFile inputFile : importModel.getInputFiles()) { + copyFile(inputFile, dataDirectory); + } + setInSession(importModel); + return SUCCESS; + } + + + protected final void setInSession(M model) { + getEchoBaseSession().setImportDataConfiguration(model); + } + + protected final M getFromSession() { + return getEchoBaseSession().getImportDataConfiguration(modelType); + } + + public final void setModel(M model) { + this.model = model; + } + + protected <E extends TopiaEntity> Map<String, String> loadSortAndDecorate(EchoBaseServiceSupport service, Class<E> beanType) { + + List<E> beans = service.getEntities(beanType); + return getDecoratorService().sortAndDecorate(getLocale(), beans, null); + } +} Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/AbstractConfigureImport.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/AbstractLaunchImport.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/AbstractLaunchImport.java (rev 0) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/AbstractLaunchImport.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,87 @@ +/* + * #%L + * EchoBase :: UI + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.ui.actions.importData; + +import fr.ifremer.echobase.services.AbstractImportDataService; +import fr.ifremer.echobase.services.configurations.AbstractImportConfiguration; +import fr.ifremer.echobase.ui.actions.AbstractWaitAndExecAction; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * TODO + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class AbstractLaunchImport<M extends AbstractImportConfiguration, S extends AbstractImportDataService<M>> extends AbstractWaitAndExecAction<M> { + + private static final long serialVersionUID = 1L; + + /** Logger. */ + private static final Log log = LogFactory.getLog(AbstractLaunchImport.class); + + protected final Class<M> modelType; + + protected final Class<S> serviceType; + + protected transient S service; + + protected AbstractLaunchImport(Class<M> modelType, Class<S> serviceType) { + this.modelType = modelType; + this.serviceType = serviceType; + } + + @Override + protected M initModel() { + return getEchoBaseSession().getImportDataConfiguration(modelType); + } + + @Override + public void prepare() throws Exception { + + super.prepare(); + + service = newService(serviceType); + } + + @Override + protected void startAction(M model) throws Exception { + if (log.isInfoEnabled()) { + log.info("Start imports for " + getModel()); + } + + service.startImport(model, getEchoBaseSession().getEchoBaseUser()); + } + + @Override + protected void closeAction(M model) throws Exception { + + // clean configuration + model.destroy(); + + // remove configuration from session + getEchoBaseSession().removeImportDataConfiguration(modelType); + } +} Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/AbstractLaunchImport.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticDataImport.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticDataImport.java (rev 0) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticDataImport.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,92 @@ +/* + * #%L + * EchoBase :: UI + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.ui.actions.importData; + +import fr.ifremer.echobase.entities.data.Voyage; +import fr.ifremer.echobase.entities.references.Vessel; +import fr.ifremer.echobase.services.EchoBaseServiceSupport; +import fr.ifremer.echobase.services.configurations.AccousticDataImportConfiguration; + +import java.io.File; +import java.util.Map; + +/** + * Configure a accoustic data import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class ConfigureAccousticDataImport extends AbstractConfigureImport<AccousticDataImportConfiguration> { + + private static final long serialVersionUID = 1L; + + /** Universe of existing voyages. */ + protected Map<String, String> voyages; + + /** Universe of existing vessels. */ + protected Map<String, String> vessels; + + public ConfigureAccousticDataImport() { + super(AccousticDataImportConfiguration.class); + } + + @Override + protected AccousticDataImportConfiguration createModel() { + return new AccousticDataImportConfiguration(getLocale()); + } + + @Override + public String input() throws Exception { + + super.input(); + + EchoBaseServiceSupport service = + newService(EchoBaseServiceSupport.class); + + voyages = loadSortAndDecorate(service, Voyage.class); + vessels = loadSortAndDecorate(service, Vessel.class); + + return INPUT; + } + + public Map<String, String> getVoyages() { + return voyages; + } + + public Map<String, String> getVessels() { + return vessels; + } + + public void setMoviesFile(File file) { + getModel().getMoviesFile().setFile(file); + } + + public void setMoviesFileContentType(String contentType) { + getModel().getMoviesFile().setContentType(contentType); + } + + public void setMoviesFileFileName(String fileName) { + getModel().getMoviesFile().setFileName(fileName); + } +} Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticDataImport.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionDataImport.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionDataImport.java (rev 0) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionDataImport.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,104 @@ +/* + * #%L + * EchoBase :: UI + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.ui.actions.importData; + +import fr.ifremer.echobase.entities.data.Voyage; +import fr.ifremer.echobase.entities.references.Vessel; +import fr.ifremer.echobase.services.EchoBaseServiceSupport; +import fr.ifremer.echobase.services.configurations.AccousticRegionDataImportConfiguration; + +import java.io.File; +import java.util.Map; + +/** + * Configure a "accoustic region data" import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class ConfigureAccousticRegionDataImport extends AbstractConfigureImport<AccousticRegionDataImportConfiguration> { + + private static final long serialVersionUID = 1L; + + /** Universe of existing voyages. */ + protected Map<String, String> voyages; + + /** Universe of existing vessels. */ + protected Map<String, String> vessels; + + public ConfigureAccousticRegionDataImport() { + super(AccousticRegionDataImportConfiguration.class); + } + + @Override + protected AccousticRegionDataImportConfiguration createModel() { + return new AccousticRegionDataImportConfiguration(getLocale()); + } + + @Override + public String input() throws Exception { + + super.input(); + + EchoBaseServiceSupport service = + newService(EchoBaseServiceSupport.class); + + voyages = loadSortAndDecorate(service, Voyage.class); + vessels = loadSortAndDecorate(service, Vessel.class); + + return INPUT; + } + + public Map<String, String> getVoyages() { + return voyages; + } + + public Map<String, String> getVessels() { + return vessels; + } + + public void setRegionsFile(File file) { + getModel().getRegionsFile().setFile(file); + } + + public void setRegionsFileContentType(String contentType) { + getModel().getRegionsFile().setContentType(contentType); + } + + public void setRegionsFileFileName(String fileName) { + getModel().getRegionsFile().setFileName(fileName); + } + + public void setAssociationFile(File file) { + getModel().getAssociationFile().setFile(file); + } + + public void setAssociationFileContentType(String contentType) { + getModel().getAssociationFile().setContentType(contentType); + } + + public void setAssociationFileFileName(String fileName) { + getModel().getAssociationFile().setFileName(fileName); + } +} Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureAccousticRegionDataImport.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesDataImport.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesDataImport.java (rev 0) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesDataImport.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,119 @@ +/* + * #%L + * EchoBase :: UI + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.ui.actions.importData; + +import fr.ifremer.echobase.entities.data.Voyage; +import fr.ifremer.echobase.services.EchoBaseServiceSupport; +import fr.ifremer.echobase.services.configurations.CatchesDataImportConfiguration; + +import java.io.File; +import java.util.Map; + +/** + * Configure a "catches data" import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class ConfigureCatchesDataImport extends AbstractConfigureImport<CatchesDataImportConfiguration> { + + private static final long serialVersionUID = 1L; + + /** Universe of existing voyages. */ + protected Map<String, String> voyages; + + public ConfigureCatchesDataImport() { + super(CatchesDataImportConfiguration.class); + } + + @Override + protected CatchesDataImportConfiguration createModel() { + return new CatchesDataImportConfiguration(getLocale()); + } + + @Override + public String input() throws Exception { + + super.input(); + + EchoBaseServiceSupport service = + newService(EchoBaseServiceSupport.class); + + voyages = loadSortAndDecorate(service, Voyage.class); + + return INPUT; + } + + public Map<String, String> getVoyages() { + return voyages; + } + + public void setTlbeStationFile(File file) { + getModel().getTlbeStationFile().setFile(file); + } + + public void setTlbeStationFileContentType(String contentType) { + getModel().getTlbeStationFile().setContentType(contentType); + } + + public void setTlbeStationFileFileName(String fileName) { + getModel().getTlbeStationFile().setFileName(fileName); + } + + public void setXtblTriFile(File file) { + getModel().getXtblTriFile().setFile(file); + } + + public void setXtblTriFileContentType(String contentType) { + getModel().getXtblTriFile().setContentType(contentType); + } + + public void setXtblTriFileFileName(String fileName) { + getModel().getXtblTriFile().setFileName(fileName); + } + + public void setTblMensurationFile(File file) { + getModel().getTblMensurationFile().setFile(file); + } + + public void setTblMensurationFileContentType(String contentType) { + getModel().getTblMensurationFile().setContentType(contentType); + } + + public void setTblMensurationFileFileName(String fileName) { + getModel().getTblMensurationFile().setFileName(fileName); + } + + public void setTblMensurationClasseFile(File file) { + getModel().getTblMensurationClasseFile().setFile(file); + } + + public void setTblMensurationClasseFileContentType(String contentType) { + getModel().getTblMensurationClasseFile().setContentType(contentType); + } + + public void setTblMensurationClasseFileFileName(String fileName) { + getModel().getTblMensurationClasseFile().setFileName(fileName); + } +} Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesDataImport.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualDataImport.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualDataImport.java (rev 0) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualDataImport.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,83 @@ +/* + * #%L + * EchoBase :: UI + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.ui.actions.importData; + +import fr.ifremer.echobase.entities.data.Voyage; +import fr.ifremer.echobase.services.EchoBaseServiceSupport; +import fr.ifremer.echobase.services.configurations.CatchesIndividualDataImportConfiguration; + +import java.io.File; +import java.util.Map; + +/** + * Configure a "catches individual data" import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class ConfigureCatchesIndividualDataImport extends AbstractConfigureImport<CatchesIndividualDataImportConfiguration> { + + private static final long serialVersionUID = 1L; + + /** Universe of existing voyages. */ + protected Map<String, String> voyages; + + public ConfigureCatchesIndividualDataImport() { + super(CatchesIndividualDataImportConfiguration.class); + } + + @Override + protected CatchesIndividualDataImportConfiguration createModel() { + return new CatchesIndividualDataImportConfiguration(getLocale()); + } + + @Override + public String input() throws Exception { + + super.input(); + + EchoBaseServiceSupport service = + newService(EchoBaseServiceSupport.class); + + voyages = loadSortAndDecorate(service, Voyage.class); + + return INPUT; + } + + public Map<String, String> getVoyages() { + return voyages; + } + + public void setIndividualDataFile(File file) { + getModel().getIndividualDataFile().setFile(file); + } + + public void setIndividualDataFileContentType(String contentType) { + getModel().getIndividualDataFile().setContentType(contentType); + } + + public void setIndividualDataFileFileName(String fileName) { + getModel().getIndividualDataFile().setFileName(fileName); + } +} Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesIndividualDataImport.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReferenceImport.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReferenceImport.java (rev 0) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReferenceImport.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,72 @@ +/* + * #%L + * EchoBase :: UI + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.ui.actions.importData; + +import fr.ifremer.echobase.services.configurations.CatchesReferenceImportConfiguration; + +import java.io.File; + +/** + * Configure a accoustic data import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class ConfigureCatchesReferenceImport extends AbstractConfigureImport<CatchesReferenceImportConfiguration> { + + private static final long serialVersionUID = 1L; + + public ConfigureCatchesReferenceImport() { + super(CatchesReferenceImportConfiguration.class); + } + + @Override + protected CatchesReferenceImportConfiguration createModel() { + return new CatchesReferenceImportConfiguration(getLocale()); + } + + public void setLengthAgeKeyFileFile(File file) { + getModel().getLengthAgeKeyFile().setFile(file); + } + + public void setLengthAgeKeyFileContentType(String contentType) { + getModel().getLengthAgeKeyFile().setContentType(contentType); + } + + public void setLengthAgeKeyFileFileName(String fileName) { + getModel().getLengthAgeKeyFile().setFileName(fileName); + } + + public void setLengthWeightKeyFileFile(File file) { + getModel().getLengthWeightKeyFile().setFile(file); + } + + public void setLengthWeightKeyFileContentType(String contentType) { + getModel().getLengthWeightKeyFile().setContentType(contentType); + } + + public void setLengthWeightKeyFileFileName(String fileName) { + getModel().getLengthWeightKeyFile().setFileName(fileName); + } +} Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCatchesReferenceImport.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataCompleteImport.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataCompleteImport.java (rev 0) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataCompleteImport.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,163 @@ +/* + * #%L + * EchoBase :: UI + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.ui.actions.importData; + +import com.google.common.collect.Maps; +import fr.ifremer.echobase.entities.references.AreaOfOperation; +import fr.ifremer.echobase.entities.references.Mission; +import fr.ifremer.echobase.entities.references.MissionImpl; +import fr.ifremer.echobase.services.EchoBaseServiceSupport; +import fr.ifremer.echobase.services.configurations.CommonDataCompleteImportConfiguration; + +import java.io.File; +import java.util.Map; + +/** + * Configure a accoustic data import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class ConfigureCommonDataCompleteImport extends AbstractConfigureImport<CommonDataCompleteImportConfiguration> { + + private static final long serialVersionUID = 1L; + + /** Universe of existing voyages. */ + protected Map<String, String> missions; + + /** Universe of existing voyages. */ + protected Map<String, String> areaOfOperations; + + /** Universe of possible import modes. */ + protected Map<String, String> importModes; + + /** Selected import mode. */ + protected SelectedMissionMode importMode; + + /** mission to use. */ + protected Mission mission; + + public ConfigureCommonDataCompleteImport() { + super(CommonDataCompleteImportConfiguration.class); + } + + @Override + protected CommonDataCompleteImportConfiguration createModel() { + return new CommonDataCompleteImportConfiguration(getLocale()); + } + + @Override + public String input() throws Exception { + + super.input(); + + EchoBaseServiceSupport service = + newService(EchoBaseServiceSupport.class); + + missions = loadSortAndDecorate(service, Mission.class); + + areaOfOperations = loadSortAndDecorate(service, AreaOfOperation.class); + + importModes = Maps.newLinkedHashMap(); + for (SelectedMissionMode mode : SelectedMissionMode.values()) { + importModes.put(mode.name(), _(mode.getI18nKey())); + } + + if (importMode == null) { + importMode = SelectedMissionMode.USE_EXISTING_MISSION; + } + + return INPUT; + } + + @Override + public String execute() throws Exception { + + super.execute(); + + if (importMode == SelectedMissionMode.CREATE_NEW_MISSION) { + + // create voyage in db + ImportDataService service = newService(ImportDataService.class); + Mission missionToCreate = getMission(); + + Mission missionSaved = service.createMission(missionToCreate); + + getModel().setMissionId(missionSaved.getTopiaId()); + } + + return SUCCESS; + } + + public Map<String, String> getMissions() { + return missions; + } + + public Map<String, String> getAreaOfOperations() { + return areaOfOperations; + } + + public Map<String, String> getImportModes() { + return importModes; + } + + public SelectedMissionMode getImportMode() { + return importMode; + } + + public Mission getMission() { + if (mission == null) { + mission = new MissionImpl(); + } + return mission; + } + + public void setImportMode(SelectedMissionMode importMode) { + this.importMode = importMode; + } + + public void setCasinoFile(File file) { + getModel().getCasinoFile().setFile(file); + } + + public void setCasinoFileContentType(String contentType) { + getModel().getCasinoFile().setContentType(contentType); + } + + public void setCasinoFileFileName(String fileName) { + getModel().getCasinoFile().setFileName(fileName); + } + + public void setEchotypeFile(File file) { + getModel().getEchotypeFile().setFile(file); + } + + public void setEchotypeFileContentType(String contentType) { + getModel().getEchotypeFile().setContentType(contentType); + } + + public void setEchotypeFileFileName(String fileName) { + getModel().getEchotypeFile().setFileName(fileName); + } +} Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataCompleteImport.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransectImport.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransectImport.java (rev 0) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransectImport.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,83 @@ +/* + * #%L + * EchoBase :: UI + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.ui.actions.importData; + +import fr.ifremer.echobase.entities.data.Voyage; +import fr.ifremer.echobase.services.EchoBaseServiceSupport; +import fr.ifremer.echobase.services.configurations.CommonDataFromTransectImportConfiguration; + +import java.io.File; +import java.util.Map; + +/** + * Configure a "common data from transect" import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class ConfigureCommonDataFromTransectImport extends AbstractConfigureImport<CommonDataFromTransectImportConfiguration> { + + private static final long serialVersionUID = 1L; + + /** Universe of existing voyages. */ + protected Map<String, String> voyages; + + public ConfigureCommonDataFromTransectImport() { + super(CommonDataFromTransectImportConfiguration.class); + } + + @Override + protected CommonDataFromTransectImportConfiguration createModel() { + return new CommonDataFromTransectImportConfiguration(getLocale()); + } + + @Override + public String input() throws Exception { + + super.input(); + + EchoBaseServiceSupport service = + newService(EchoBaseServiceSupport.class); + + voyages = loadSortAndDecorate(service, Voyage.class); + + return INPUT; + } + + public Map<String, String> getVoyages() { + return voyages; + } + + public void setCasinoFile(File file) { + getModel().getCasinoFile().setFile(file); + } + + public void setCasinoFileContentType(String contentType) { + getModel().getCasinoFile().setContentType(contentType); + } + + public void setCasinoFileFileName(String fileName) { + getModel().getCasinoFile().setFileName(fileName); + } +} Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureCommonDataFromTransectImport.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Deleted: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureFiles.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureFiles.java 2012-01-10 16:44:31 UTC (rev 255) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureFiles.java 2012-01-11 13:08:20 UTC (rev 256) @@ -1,206 +0,0 @@ -/* - * #%L - * EchoBase :: UI - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2011 Ifremer, Codelutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package fr.ifremer.echobase.ui.actions.importData; - -import com.google.common.collect.Maps; -import com.opensymphony.xwork2.Preparable; -import fr.ifremer.echobase.entities.references.Mission; -import fr.ifremer.echobase.services.EchoBaseServiceSupport; -import fr.ifremer.echobase.services.configurations.ImportDataConfiguration; -import fr.ifremer.echobase.services.ImportDataMode; -import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport; -import org.apache.commons.io.FileUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.nuiton.util.FileUtil; - -import java.io.File; -import java.util.Map; - -/** - * Action to load input files to import. - * - * @author tchemit <chemit@codelutin.com> - * @since 0.2 - */ -public class ConfigureFiles extends EchoBaseActionSupport implements Preparable { - - private static final long serialVersionUID = 1L; - - /** Logger. */ - private static final Log log = LogFactory.getLog(ConfigureFiles.class); - - /** Import data configuration to push in session. */ - protected ImportDataConfiguration model; - - /** Id of selected voyage used in import. */ - protected String missionId; - - /** Universe of possible import modes. */ - protected Map<String, String> importDataModes; - - public void setMissionId(String missionId) { - this.missionId = missionId; - } - - public void setImportDataMode(ImportDataMode importDataMode) { - getModel().setImportDataMode(importDataMode); - } - - public void setAcoustic(File file) { - getModel().getAcousticFile().setFile(file); - } - - public void setAcousticContentType(String contentType) { - getModel().getAcousticFile().setContentType(contentType); - } - - public void setAcousticFileName(String fileName) { - getModel().getAcousticFile().setFileName(fileName); - } - - public void setCapture(File file) { - getModel().getCaptureFile().setFile(file); - } - - public void setCaptureContentType(String contentType) { - getModel().getCaptureFile().setContentType(contentType); - } - - public void setCaptureFileName(String fileName) { - getModel().getCaptureFile().setFileName(fileName); - } - - public void setLectureAgeGen(File file) { - getModel().getLectureAgeGenFile().setFile(file); - } - - public void setLectureAgeGenContentType(String contentType) { - getModel().getLectureAgeGenFile().setContentType(contentType); - } - - public void setLectureAgeGenFileName(String fileName) { - getModel().getLectureAgeGenFile().setFileName(fileName); - } - - public void setEvents(File file) { - getModel().getEventsFile().setFile(file); - } - - public void setEventsContentType(String contentType) { - getModel().getEventsFile().setContentType(contentType); - } - - public void setEventsFileName(String fileName) { - getModel().getEventsFile().setFileName(fileName); - } - - public void setTypeEchoSpecies(File file) { - getModel().getTypeEchoSpeciesFile().setFile(file); - } - - public void setTypeEchoSpeciesContentType(String contentType) { - getModel().getTypeEchoSpeciesFile().setContentType(contentType); - } - - public void setTypeEchoSpeciesFileName(String fileName) { - getModel().getTypeEchoSpeciesFile().setFileName(fileName); - } - - public String getMissionId() { - return missionId; - } - - public ImportDataMode getImportDataMode() { - return getModel().getImportDataMode(); - } - - public ImportDataConfiguration getModel() { - if (model == null) { - model = new ImportDataConfiguration(getLocale()); - } - return model; - } - - public Map<String, String> getImportDataModes() { - return importDataModes; - } - - @Override - public String input() throws Exception { - - // remove configuration from session - getEchoBaseSession().setImportDataConfiguration(null); - - return INPUT; - } - - @Override - public String execute() throws Exception { - - ImportDataConfiguration importModel = getModel(); - File tempDirectory = FileUtils.getTempDirectory(); - File dataDirectory = new File( - tempDirectory, - "echobase-importData-" + System.currentTimeMillis()); - FileUtil.createDirectoryIfNecessary(dataDirectory); - importModel.setWorkingDirectory(dataDirectory); - if (log.isInfoEnabled()) { - log.info("Temporary directory to use : " + dataDirectory); - } - copyFile(importModel.getAcousticFile(), dataDirectory); - copyFile(importModel.getCaptureFile(), dataDirectory); - copyFile(importModel.getEventsFile(), dataDirectory); - copyFile(importModel.getLectureAgeGenFile(), dataDirectory); - copyFile(importModel.getTypeEchoSpeciesFile(), dataDirectory); - - getEchoBaseSession().setImportDataConfiguration(importModel); - return SUCCESS; - } - - @Override - public void prepare() throws Exception { - - EchoBaseServiceSupport service = - newService(EchoBaseServiceSupport.class); - - Mission mission = service.getEntityById(Mission.class, missionId); - ImportDataConfiguration configuration = getModel(); - configuration.setMission(mission); - - importDataModes = Maps.newLinkedHashMap(); - for (ImportDataMode mode : ImportDataMode.values()) { - importDataModes.put(mode.name(), _(mode.getI18nKey())); - } - - if (log.isInfoEnabled()) { - log.info("Incoming importDataMode " + - configuration.getImportDataMode()); - } - if (configuration.getImportDataMode() == null) { - configuration.setImportDataMode(ImportDataMode.ALL); - } - } - -} Deleted: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureMission.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureMission.java 2012-01-10 16:44:31 UTC (rev 255) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureMission.java 2012-01-11 13:08:20 UTC (rev 256) @@ -1,125 +0,0 @@ -/* - * #%L - * EchoBase :: UI - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2011 Ifremer, Codelutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package fr.ifremer.echobase.ui.actions.importData; - -import com.google.common.collect.Maps; -import com.opensymphony.xwork2.interceptor.annotations.InputConfig; -import fr.ifremer.echobase.entities.references.Mission; -import fr.ifremer.echobase.entities.references.MissionImpl; -import fr.ifremer.echobase.services.EchoBaseServiceSupport; -import fr.ifremer.echobase.services.ImportDataService; -import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import java.util.List; -import java.util.Map; - -/** - * Configure the mission to use in the data import. - * - * @author tchemit <chemit@codelutin.com> - * @since 0.2 - */ -public class ConfigureMission extends EchoBaseActionSupport { - - private static final long serialVersionUID = 1L; - - /** Logger. */ - private static final Log log = LogFactory.getLog(ConfigureMission.class); - - /** Universe of existing missions. */ - protected Map<String, String> missions; - - /** Universe of possible import modes. */ - protected Map<String, String> importModes; - - /** Selected import mode. */ - protected SelectedMissionMode importMode; - - /** mission to use. */ - protected Mission mission; - - public Mission getMission() { - if (mission == null) { - mission = new MissionImpl(); - } - return mission; - } - - public Map<String, String> getImportModes() { - return importModes; - } - - public Map<String, String> getMissions() { - return missions; - } - - public SelectedMissionMode getImportMode() { - return importMode; - } - - public void setImportMode(SelectedMissionMode importMode) { - this.importMode = importMode; - } - - @Override - public String input() throws Exception { - importModes = Maps.newLinkedHashMap(); - for (SelectedMissionMode mode : SelectedMissionMode.values()) { - importModes.put(mode.name(), _(mode.getI18nKey())); - } - - if (importMode == null) { - importMode = SelectedMissionMode.USE_EXISTING_MISSION; - } - - EchoBaseServiceSupport service = - newService(EchoBaseServiceSupport.class); - - List<Mission> allMissions = service.getEntities(Mission.class); - missions = sortAndDecorate(allMissions, null); - - if (log.isInfoEnabled()) { - log.info("File errors : " + getFieldErrors()); - } - return INPUT; - } - - @InputConfig(methodName = "input") - @Override - public String execute() throws Exception { - - if (importMode == SelectedMissionMode.CREATE_NEW_MISSION) { - - // create voyage in db - ImportDataService service = newService(ImportDataService.class); - Mission missionToCreate = getMission(); - - mission = service.createMission(missionToCreate); - } - return SUCCESS; - } - -} Deleted: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/Import.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/Import.java 2012-01-10 16:44:31 UTC (rev 255) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/Import.java 2012-01-11 13:08:20 UTC (rev 256) @@ -1,93 +0,0 @@ -/* - * #%L - * EchoBase :: UI - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2011 Ifremer, Codelutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package fr.ifremer.echobase.ui.actions.importData; - -import com.opensymphony.xwork2.Preparable; -import fr.ifremer.echobase.InputFile; -import fr.ifremer.echobase.services.CsvImportResult; -import fr.ifremer.echobase.services.configurations.ImportDataConfiguration; -import fr.ifremer.echobase.services.ImportDataService; -import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import java.util.Map; - -/** - * To launch the import data process. - * - * @author tchemit <chemit@codelutin.com> - * @since 0.2 - */ -public class Import extends EchoBaseActionSupport implements Preparable { - - private static final long serialVersionUID = 1L; - - /** Logger. */ - private static final Log log = LogFactory.getLog(Import.class); - - /** Import data configuration to push in session. */ - protected ImportDataConfiguration model; - - protected Map<InputFile, CsvImportResult> importResult; - - protected transient ImportDataService service; - - public ImportDataConfiguration getModel() { - return model; - } - - public Map<InputFile, CsvImportResult> getImportResult() { - return importResult; - } - - @Override - public void prepare() throws Exception { - - model = getEchoBaseSession().getImportDataConfiguration(); - - service = newService(ImportDataService.class); - } - - @Override - public String execute() throws Exception { - - try { - if (log.isInfoEnabled()) { - log.info("Start imports with mission " + - model.getMission().getName()); - } - - importResult = service.startImport(model); - return SUCCESS; - } finally { - - // clean configuration - model.destroy(); - - // remove configuration from session - getEchoBaseSession().setImportDataConfiguration(null); - } - } -} Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticDataImport.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticDataImport.java (rev 0) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticDataImport.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,43 @@ +/* + * #%L + * EchoBase :: UI + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.ui.actions.importData; + +import fr.ifremer.echobase.services.AccousticDataImportService; +import fr.ifremer.echobase.services.configurations.AccousticDataImportConfiguration; + +/** + * Configure a accoustic data import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class LaunchAccousticDataImport extends AbstractLaunchImport<AccousticDataImportConfiguration, AccousticDataImportService> { + + private static final long serialVersionUID = 1L; + + public LaunchAccousticDataImport() { + super(AccousticDataImportConfiguration.class, AccousticDataImportService.class); + } + +} Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticDataImport.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticRegionDataImport.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticRegionDataImport.java (rev 0) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticRegionDataImport.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,43 @@ +/* + * #%L + * EchoBase :: UI + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.ui.actions.importData; + +import fr.ifremer.echobase.services.AccousticRegionDataImportService; +import fr.ifremer.echobase.services.configurations.AccousticRegionDataImportConfiguration; + +/** + * Configure a accoustic data import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class LaunchAccousticRegionDataImport extends AbstractLaunchImport<AccousticRegionDataImportConfiguration, AccousticRegionDataImportService> { + + private static final long serialVersionUID = 1L; + + public LaunchAccousticRegionDataImport() { + super(AccousticRegionDataImportConfiguration.class, AccousticRegionDataImportService.class); + } + +} Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchAccousticRegionDataImport.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesDataImport.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesDataImport.java (rev 0) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesDataImport.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,43 @@ +/* + * #%L + * EchoBase :: UI + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.ui.actions.importData; + +import fr.ifremer.echobase.services.CatchesDataImportService; +import fr.ifremer.echobase.services.configurations.CatchesDataImportConfiguration; + +/** + * Configure a accoustic data import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class LaunchCatchesDataImport extends AbstractLaunchImport<CatchesDataImportConfiguration, CatchesDataImportService> { + + private static final long serialVersionUID = 1L; + + public LaunchCatchesDataImport() { + super(CatchesDataImportConfiguration.class, CatchesDataImportService.class); + } + +} Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesDataImport.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesIndividualDataImport.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesIndividualDataImport.java (rev 0) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesIndividualDataImport.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,43 @@ +/* + * #%L + * EchoBase :: UI + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.ui.actions.importData; + +import fr.ifremer.echobase.services.CatchesIndividualDataImportService; +import fr.ifremer.echobase.services.configurations.CatchesIndividualDataImportConfiguration; + +/** + * Configure a accoustic data import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class LaunchCatchesIndividualDataImport extends AbstractLaunchImport<CatchesIndividualDataImportConfiguration, CatchesIndividualDataImportService> { + + private static final long serialVersionUID = 1L; + + public LaunchCatchesIndividualDataImport() { + super(CatchesIndividualDataImportConfiguration.class, CatchesIndividualDataImportService.class); + } + +} Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesIndividualDataImport.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesReferenceImport.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesReferenceImport.java (rev 0) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesReferenceImport.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,43 @@ +/* + * #%L + * EchoBase :: UI + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.ui.actions.importData; + +import fr.ifremer.echobase.services.CatchesReferenceImportService; +import fr.ifremer.echobase.services.configurations.CatchesReferenceImportConfiguration; + +/** + * Configure a accoustic data import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class LaunchCatchesReferenceImport extends AbstractLaunchImport<CatchesReferenceImportConfiguration, CatchesReferenceImportService> { + + private static final long serialVersionUID = 1L; + + public LaunchCatchesReferenceImport() { + super(CatchesReferenceImportConfiguration.class, CatchesReferenceImportService.class); + } + +} Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCatchesReferenceImport.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataCompleteImport.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataCompleteImport.java (rev 0) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataCompleteImport.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,43 @@ +/* + * #%L + * EchoBase :: UI + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.ui.actions.importData; + +import fr.ifremer.echobase.services.CommonDataCompleteImportService; +import fr.ifremer.echobase.services.configurations.CommonDataCompleteImportConfiguration; + +/** + * Configure a accoustic data import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class LaunchCommonDataCompleteImport extends AbstractLaunchImport<CommonDataCompleteImportConfiguration, CommonDataCompleteImportService> { + + private static final long serialVersionUID = 1L; + + public LaunchCommonDataCompleteImport() { + super(CommonDataCompleteImportConfiguration.class, CommonDataCompleteImportService.class); + } + +} Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataCompleteImport.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataFromTransectImport.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataFromTransectImport.java (rev 0) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataFromTransectImport.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,43 @@ +/* + * #%L + * EchoBase :: UI + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.ui.actions.importData; + +import fr.ifremer.echobase.services.CommonDataFromTransectImportService; +import fr.ifremer.echobase.services.configurations.CommonDataFromTransectImportConfiguration; + +/** + * Configure a accoustic data import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class LaunchCommonDataFromTransectImport extends AbstractLaunchImport<CommonDataFromTransectImportConfiguration, CommonDataFromTransectImportService> { + + private static final long serialVersionUID = 1L; + + public LaunchCommonDataFromTransectImport() { + super(CommonDataFromTransectImportConfiguration.class, CommonDataFromTransectImportService.class); + } + +} Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchCommonDataFromTransectImport.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/SelectImportType.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/SelectImportType.java (rev 0) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/SelectImportType.java 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,78 @@ +/* + * #%L + * EchoBase :: UI + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.ui.actions.importData; + +import com.google.common.collect.Maps; +import fr.ifremer.echobase.services.ImportDataMode; +import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport; + +import java.util.Map; + +/** + * To select the type of import to configure. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class SelectImportType extends EchoBaseActionSupport { + + private static final long serialVersionUID = 1L; + + protected ImportDataMode mode; + + /** Universe of possible import modes. */ + protected Map<String, String> modes; + + public Map<String, String> getModes() { + + return modes; + } + + public ImportDataMode getMode() { + return mode; + } + + public void setMode(ImportDataMode mode) { + this.mode = mode; + } + + + @Override + public String input() throws Exception { + modes = Maps.newLinkedHashMap(); + for (SelectedMissionMode mode : SelectedMissionMode.values()) { + modes.put(mode.name(), _(mode.getI18nKey())); + } + + if (mode == null) { + mode = ImportDataMode.CommonDataComplete; + } + return INPUT; + } + + @Override + public String execute() throws Exception { + return SUCCESS; + } +} Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/SelectImportType.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Modified: trunk/echobase-ui/src/main/resources/config/struts-importData.xml =================================================================== --- trunk/echobase-ui/src/main/resources/config/struts-importData.xml 2012-01-10 16:44:31 UTC (rev 255) +++ trunk/echobase-ui/src/main/resources/config/struts-importData.xml 2012-01-11 13:08:20 UTC (rev 256) @@ -32,38 +32,36 @@ <package name="importData" extends="loggued" namespace="/importData"> - <!-- Configure import mission --> - <action name="configureMission" - class="fr.ifremer.echobase.ui.actions.importData.ConfigureMission"> + <!-- Select import type --> + <action name="selectImportType" + class="fr.ifremer.echobase.ui.actions.importData.SelectImportType"> <interceptor-ref name="paramsPrepareParamsStackLoggued"/> - <result name="input">/WEB-INF/jsp/importData/configureMission.jsp</result> + <result name="input">/WEB-INF/jsp/importData/selectImportType.jsp</result> <result type="redirectAction"> <param name="namespace">/importData</param> - <param name="actionName">configureFiles</param> + <param name="actionName">configure-${mode}</param> <param name="method">input</param> - <param name="missionId">${mission.topiaId}</param> </result> </action> - <!-- Configure import files --> - <action name="configureFiles" - class="fr.ifremer.echobase.ui.actions.importData.ConfigureFiles"> + <!-- Configure import --> + <action name="configure-*" + class="fr.ifremer.echobase.ui.actions.importData.Configure{1}Import"> <interceptor-ref name="paramsPrepareParamsStackLoggued"/> - <result name="input">/WEB-INF/jsp/importData/configureFiles.jsp</result> + <result name="input">/WEB-INF/jsp/importData/configure{1}.jsp</result> <result type="redirectAction"> <param name="namespace">/importData</param> - <param name="actionName">import</param> + <param name="actionName">import{1}</param> </result> </action> <!-- Starts import --> - <action name="import" - class="fr.ifremer.echobase.ui.actions.importData.Import" - method="execute"> + <action name="import-*" + class="fr.ifremer.echobase.ui.actions.importData.Launch{1}Import"> <interceptor-ref name="basicStackLoggued"/> <interceptor-ref name="execAndWait"/> <result name="wait">/WEB-INF/jsp/importData/progress.jsp</result> - <result>/WEB-INF/jsp/importData/result.jsp</result> + <result>/WEB-INF/jsp/importData/result{1}.jsp</result> </action> </package> Modified: trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties =================================================================== --- trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties 2012-01-10 16:44:31 UTC (rev 255) +++ trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties 2012-01-11 13:08:20 UTC (rev 256) @@ -105,6 +105,8 @@ echobase.legend.importData.configuration.files=Choix des fichiers d'import echobase.legend.importData.configuration.mission=Configurer la mission echobase.legend.importData.configuration.mission.resume=Résumé de la mission à utiliser +echobase.legend.importData.configuration.resume=Résumé de la configuration d'import +echobase.legend.importData.configuration.selectImportType=Type d'import echobase.legend.importDb.configuration.files=Choix du fichier d'import de la base complête (fichier zip) echobase.legend.importFileResult=Résultat de l'import %s echobase.legend.sqlQuery.configuration=Configuration de la requête @@ -142,6 +144,7 @@ echobase.title.exportTable=Exporter une table echobase.title.importData=Import de données echobase.title.importData.configuration=Configuration d'un import de données +echobase.title.importData.selectImportType=Sélection du type d'import echobase.title.importDataProgress=Import de données en cours echobase.title.importDataResult=Résultats de l'import de données echobase.title.importDb=Import de données historiques Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/includes/header.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/includes/header.jsp 2012-01-10 16:44:31 UTC (rev 255) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/includes/header.jsp 2012-01-11 13:08:20 UTC (rev 256) @@ -65,7 +65,7 @@ </li> </s:if> <li> - <s:a action="configureMission" namespace="/importData" method="input"> + <s:a action="selectImportType" namespace="/importData" method="input"> <s:text name="echobase.menu.importData"/></s:a> </li> <li> Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticData.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticData.jsp (rev 0) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticData.jsp 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,67 @@ +<%-- + #%L + EchoBase :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 Ifremer, Codelutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@page contentType="text/html" pageEncoding="UTF-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> + +<title><s:text name="echobase.title.configure.accousticData"/></title> + +<script type="text/javascript"> + + jQuery(document).ready(function () { + + }); +</script> + +<s:form namespace="/importData" method="POST" enctype="multipart/form-data"> + + <fieldset> + <legend> + <s:text name="echobase.legend.importData.configure.accousticData"/> + </legend> + + <s:select name="model.voyageId" value="''" required="true" + label='%{getText("echobase.common.voyage")}' + list="voyages" headerKey="" headerValue=""/> + + <s:select name="model.vesselId" value="''" required="true" + label='%{getText("echobase.common.vessel")}' + list="vessels" headerKey="" headerValue=""/> + + <s:textfield key="model.field1" size="40" required="true" + label='%{getText("echobase.common.name")}'/> + + <s:textfield key="model.field2" size="40" required="true" + label='%{getText("echobase.common.name")}'/> + + <s:file key="moviesFile" required="true" + label='%{getText("echobase.common.moviesFile")}'/> + + </fieldset> + <br/> + <s:submit action="configure-AccousticData" + value='%{getText("echobase.action.import")}'/> + + +</s:form> + Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticData.jsp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticRegionData.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticRegionData.jsp (rev 0) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticRegionData.jsp 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,70 @@ +<%-- + #%L + EchoBase :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 Ifremer, Codelutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@page contentType="text/html" pageEncoding="UTF-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> + +<title><s:text name="echobase.title.configure.accousticRegionData"/></title> + +<script type="text/javascript"> + + jQuery(document).ready(function () { + + }); +</script> + +<s:form namespace="/importData" method="POST" enctype="multipart/form-data"> + + <fieldset> + <legend> + <s:text name="echobase.legend.importData.configure.accousticRegionData"/> + </legend> + + <s:select key="model.voyageId" value="''" required="true" + label='%{getText("echobase.common.voyage")}' + list="voyages" headerKey="" headerValue=""/> + + <s:select key="model.vesselId" value="''" required="true" + label='%{getText("echobase.common.vessel")}' + list="vessels" headerKey="" headerValue=""/> + + <s:textfield key="model.field1" size="40" required="true" + label='%{getText("echobase.common.name")}'/> + + <s:textfield key="model.field2" size="40" required="true" + label='%{getText("echobase.common.name")}'/> + + <s:file key="regionsFile" required="true" + label='%{getText("echobase.common.regionsFile")}'/> + + <s:file key="associationFile" required="true" + label='%{getText("echobase.common.associationFile")}'/> + + </fieldset> + + <br/> + <s:submit action="configure-AccousticRegionData" + value='%{getText("echobase.action.import")}'/> + + +</s:form> \ No newline at end of file Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureAccousticRegionData.jsp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesData.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesData.jsp (rev 0) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesData.jsp 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,66 @@ +<%-- + #%L + EchoBase :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 Ifremer, Codelutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@page contentType="text/html" pageEncoding="UTF-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> + +<title><s:text name="echobase.title.configure.catchesData"/></title> + +<script type="text/javascript"> + + jQuery(document).ready(function () { + + }); +</script> + +<s:form namespace="/importData" method="POST" enctype="multipart/form-data"> + + <fieldset> + <legend> + <s:text name="echobase.legend.importData.configure.catchesData"/> + </legend> + + <s:select key="model.voyageId" value="''" required="true" + label='%{getText("echobase.common.voyage")}' + list="voyages" headerKey="" headerValue=""/> + + <s:file key="tlbeStationFile" required="true" + label='%{getText("echobase.common.tlbeStationFile")}'/> + + <s:file key="xtblTriFile" required="true" + label='%{getText("echobase.common.xtblTriFile")}'/> + + <s:file key="tblMensurationFile" required="true" + label='%{getText("echobase.common.tblMensurationFile")}'/> + + <s:file key="tblMensurationClasseFile" required="true" + label='%{getText("echobase.common.tblMensurationClasseFile")}'/> + + </fieldset> + + <br/> + <s:submit action="configure-CatchesData" + value='%{getText("echobase.action.import")}'/> + + +</s:form> \ No newline at end of file Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesData.jsp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesIndividualData.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesIndividualData.jsp (rev 0) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesIndividualData.jsp 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,59 @@ +<%-- + #%L + EchoBase :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 Ifremer, Codelutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@page contentType="text/html" pageEncoding="UTF-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> + +<title><s:text name="echobase.title.configure.catchesIndividualData"/></title> + +<script type="text/javascript"> + + jQuery(document).ready(function () { + + }); +</script> + +<s:form namespace="/importData" method="POST" enctype="multipart/form-data"> + + <fieldset> + <legend> + <s:text + name="echobase.legend.importData.configure.catchesIndividualData"/> + </legend> + + <s:select key="model.voyageId" value="''" required="true" + label='%{getText("echobase.common.voyage")}' + list="voyages" headerKey="" headerValue=""/> + + + <s:file key="individualDataFile" required="true" + label='%{getText("echobase.common.individualDataFile")}'/> + + </fieldset> + + <br/> + <s:submit action="configure-CatchesIndividualData" + value='%{getText("echobase.action.import")}'/> + + +</s:form> \ No newline at end of file Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesIndividualData.jsp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesReference.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesReference.jsp (rev 0) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesReference.jsp 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,56 @@ +<%-- + #%L + EchoBase :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 Ifremer, Codelutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@page contentType="text/html" pageEncoding="UTF-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> + +<title><s:text name="echobase.title.configure.catchesReference"/></title> + +<script type="text/javascript"> + + jQuery(document).ready(function () { + + }); +</script> + +<s:form namespace="/importData" method="POST" enctype="multipart/form-data"> + + <fieldset> + <legend> + <s:text name="echobase.legend.importData.configure.catchesReference"/> + </legend> + + <s:file key="lengthAgeKeyFile" required="true" + label='%{getText("echobase.common.lengthAgeKeyFile")}'/> + + <s:file key="lengthWeightKeyFile" required="true" + label='%{getText("echobase.common.lengthWeightKeyFile")}'/> + + </fieldset> + + <br/> + <s:submit action="configure-CatchesReference" + value='%{getText("echobase.action.import")}'/> + + +</s:form> \ No newline at end of file Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCatchesReference.jsp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataComplete.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataComplete.jsp (rev 0) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataComplete.jsp 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,70 @@ +<%-- + #%L + EchoBase :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 Ifremer, Codelutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@page contentType="text/html" pageEncoding="UTF-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> + +<title><s:text name="echobase.title.configure.commonDataComplete"/></title> + +<script type="text/javascript"> + + jQuery(document).ready(function () { + + }); +</script> + +<s:form namespace="/importData" method="POST" enctype="multipart/form-data"> + + <fieldset> + <legend> + <s:text name="echobase.legend.importData.configure.commonDataComplete"/> + </legend> + + <s:select key="model.missionId" value="''" required="true" + label='%{getText("echobase.common.mission")}' + list="missions" headerKey="" headerValue=""/> + + <s:select key="model.areaOfOperationId" value="''" required="true" + label='%{getText("echobase.common.areaOfOperation")}' + list="areaOfOperations" headerKey="" headerValue=""/> + + <s:textfield key="model.voyageDescription" size="40" required="true" + label='%{getText("echobase.common.voyageDescription")}'/> + + <s:textfield key="model.datum" size="40" required="true" + label='%{getText("echobase.common.datum")}'/> + + <s:file key="casinoFile" required="true" + label='%{getText("echobase.common.casinoFile")}'/> + + <s:file key="echotypeFile" required="true" + label='%{getText("echobase.common.echotypeFile")}'/> + + </fieldset> + + <br/> + <s:submit action="configure-CommonDataComplete" + value='%{getText("echobase.action.import")}'/> + + +</s:form> \ No newline at end of file Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataComplete.jsp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataFromTransect.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataFromTransect.jsp (rev 0) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataFromTransect.jsp 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,58 @@ +<%-- + #%L + EchoBase :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 Ifremer, Codelutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@page contentType="text/html" pageEncoding="UTF-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> + +<title><s:text name="echobase.title.configure.commonDataFromTransect"/></title> + +<script type="text/javascript"> + + jQuery(document).ready(function () { + + }); +</script> + +<s:form namespace="/importData" method="POST" enctype="multipart/form-data"> + + <fieldset> + <legend> + <s:text + name="echobase.legend.importData.configure.commonDataFromTransect"/> + </legend> + + <s:select key="model.voyageId" value="''" required="true" + label='%{getText("echobase.common.voyage")}' + list="voyages" headerKey="" headerValue=""/> + + <s:file key="casinoFile" required="true" + label='%{getText("echobase.common.casinoFile")}'/> + + </fieldset> + + <br/> + <s:submit action="configure-CommonDataFromTransect" + value='%{getText("echobase.action.import")}'/> + + +</s:form> \ No newline at end of file Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureCommonDataFromTransect.jsp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticData.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticData.jsp (rev 0) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticData.jsp 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,39 @@ +<%-- + #%L + EchoBase :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 Ifremer, Codelutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@page contentType="text/html" pageEncoding="UTF-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> + +<title><s:text name="echobase.title.importDataResult.accousticData"/></title> + +<fieldset> + <legend> + <s:text name="echobase.legend.importData.configuration.resume"/> + </legend> + <s:label value="%{model.mission.missionName}" + key='echobase.common.missionName'/> + +</fieldset> +<br/> + +<div>TODO Result</div> Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticData.jsp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticRegionData.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticRegionData.jsp (rev 0) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticRegionData.jsp 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,39 @@ +<%-- + #%L + EchoBase :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 Ifremer, Codelutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@page contentType="text/html" pageEncoding="UTF-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> + +<title><s:text name="echobase.title.importDataResult.accousticRegionData"/></title> + +<fieldset> + <legend> + <s:text name="echobase.legend.importData.configuration.resume"/> + </legend> + <s:label value="%{model.mission.missionName}" + key='echobase.common.missionName'/> + +</fieldset> +<br/> + +<div>TODO Result</div> Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultAccousticRegionData.jsp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesData.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesData.jsp (rev 0) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesData.jsp 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,39 @@ +<%-- + #%L + EchoBase :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 Ifremer, Codelutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@page contentType="text/html" pageEncoding="UTF-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> + +<title><s:text name="echobase.title.importDataResult.catchesData"/></title> + +<fieldset> + <legend> + <s:text name="echobase.legend.importData.configuration.resume"/> + </legend> + <s:label value="%{model.mission.missionName}" + key='echobase.common.missionName'/> + +</fieldset> +<br/> + +<div>TODO Result</div> Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesData.jsp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesIndividualData.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesIndividualData.jsp (rev 0) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesIndividualData.jsp 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,39 @@ +<%-- + #%L + EchoBase :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 Ifremer, Codelutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@page contentType="text/html" pageEncoding="UTF-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> + +<title><s:text name="echobase.title.importDataResult.catchesIndividualData"/></title> + +<fieldset> + <legend> + <s:text name="echobase.legend.importData.configuration.resume"/> + </legend> + <s:label value="%{model.mission.missionName}" + key='echobase.common.missionName'/> + +</fieldset> +<br/> + +<div>TODO Result</div> Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesIndividualData.jsp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesReference.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesReference.jsp (rev 0) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesReference.jsp 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,39 @@ +<%-- + #%L + EchoBase :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 Ifremer, Codelutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@page contentType="text/html" pageEncoding="UTF-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> + +<title><s:text name="echobase.title.importDataResult.catchesReference"/></title> + +<fieldset> + <legend> + <s:text name="echobase.legend.importData.configuration.resume"/> + </legend> + <s:label value="%{model.mission.missionName}" + key='echobase.common.missionName'/> + +</fieldset> +<br/> + +<div>TODO Result</div> Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCatchesReference.jsp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataComplete.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataComplete.jsp (rev 0) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataComplete.jsp 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,39 @@ +<%-- + #%L + EchoBase :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 Ifremer, Codelutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@page contentType="text/html" pageEncoding="UTF-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> + +<title><s:text name="echobase.title.importDataResult.commonDataComplete"/></title> + +<fieldset> + <legend> + <s:text name="echobase.legend.importData.configuration.resume"/> + </legend> + <s:label value="%{model.mission.missionName}" + key='echobase.common.missionName'/> + +</fieldset> +<br/> + +<div>TODO Result</div> Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataComplete.jsp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataFromTransect.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataFromTransect.jsp (rev 0) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataFromTransect.jsp 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,39 @@ +<%-- + #%L + EchoBase :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 Ifremer, Codelutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@page contentType="text/html" pageEncoding="UTF-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> + +<title><s:text name="echobase.title.importDataResult.commonDataFromTransect"/></title> + +<fieldset> + <legend> + <s:text name="echobase.legend.importData.configuration.resume"/> + </legend> + <s:label value="%{model.mission.missionName}" + key='echobase.common.missionName'/> + +</fieldset> +<br/> + +<div>TODO Result</div> Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/resultCommonDataFromTransect.jsp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/selectImportType.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/selectImportType.jsp (rev 0) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/selectImportType.jsp 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,110 @@ +<%-- + #%L + EchoBase :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 Ifremer, Codelutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@page contentType="text/html" pageEncoding="UTF-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> + +<title><s:text name="echobase.title.importData.selectImportType"/></title> + +<script type="text/javascript"> + + function updateMode(newValue) { + switch (newValue) { + case "ALL": + $('[class="inputFile"]').show(); + break; + case "ACOUSTIC": + $('[class="inputFile"]').hide(); + $('#acousticFile').show(); + break; + } + } + + jQuery(document).ready(function () { + + + $('[name="importDataMode"]').change(function(event) { + updateMode(this.value); + }); + var val = $('[name="importDataMode"][checked="checked"]').val(); + updateMode(val); + }); +</script> + +<s:form namespace="/importData" method="POST" enctype="multipart/form-data"> + + <fieldset> + <legend> + <s:text name="echobase.legend.importData.configuration.selectImportType"/> + </legend> + <s:radio key='mode' list="modes" + label='%{getText("echobase.common.importDataMode")}' + required="true"/> + + <s:label value="%{model.mission.name}" + key='echobase.common.name'/> + + <s:label value="%{model.mission.missionAbstract}" + key='echobase.common.missionAbstract'/> + </fieldset> + + <hr/> + <fieldset> + <legend> + <s:text name="echobase.legend.importData.configuration.files"/> + </legend> + + <s:hidden key="missionId" label=''/> + + <s:radio key='importDataMode' list="importDataModes" + label='%{getText("echobase.common.importDataMode")}' + required="true"/> + <hr/> + <div class="inputFile" id="acousticFile"> + <s:file id="acoustic" name="acoustic" required="true" + key="echobase.label.import.accoustique"/> + </div> + <div class="inputFile" id="captureFile"> + <s:file name="capture" required="true" + key="echobase.label.import.pecherie"/> + </div> + <div class="inputFile" id="lectureAgeGenFile"> + <s:file name="lectureAgeGen" required="true" + key="echobase.label.import.lectureAgeGen"/> + </div> + <div class="inputFile" id="eventsFile"> + <s:file name="events" required="true" + key="echobase.label.import.events"/> + </div> + <div class="inputFile" id="typeEchoSpeciesFile"> + <s:file name="typeEchoSpecies" required="true" + key="echobase.label.import.typeEchoSpecies"/> + + </div> + </fieldset> + <br/> + <s:submit action="configureFiles" + value='%{getText("echobase.action.import")}'/> + + +</s:form> \ No newline at end of file Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/selectImportType.jsp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/src/doc/reunions/reunion-2012-01-11.txt =================================================================== --- trunk/src/doc/reunions/reunion-2012-01-11.txt (rev 0) +++ trunk/src/doc/reunions/reunion-2012-01-11.txt 2012-01-11 13:08:20 UTC (rev 256) @@ -0,0 +1,29 @@ +projet echobase +--------------- + +Jeudi 12 janvier 2012 (Nemo) + +Présents : Aurelie et Tony + +Planning +-------- + +- definir une charte graphique + +Charte graphique EchoBase +------------------------- + +Action +------ + +- CodeLutin + + - + +- Aurelie + + - + +Prochaine réunion : + + - ? \ No newline at end of file Property changes on: trunk/src/doc/reunions/reunion-2012-01-11.txt ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native
participants (1)
-
tchemit@users.forge.codelutin.com