Echobase-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
December 2011
- 2 participants
- 86 discussions
r198 - in trunk: echobase-entities/src/main/java/fr/ifremer/echobase echobase-entities/src/main/xmi echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders echobase-tools/src/test/resources/csv/new src/doc/reunions
by tchemit@users.forge.codelutin.com 16 Dec '11
by tchemit@users.forge.codelutin.com 16 Dec '11
16 Dec '11
Author: tchemit
Date: 2011-12-16 02:46:20 +0100 (Fri, 16 Dec 2011)
New Revision: 198
Url: http://forge.codelutin.com/repositories/revision/echobase/198
Log:
Import des Operation + Sample
Added:
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/AgeCategoryLoader.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/OperationLoader.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleLoader.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SpeciesCategoryLoader.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AgeCategoryLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SpeciesCategoryLoaderIT.java
trunk/echobase-tools/src/test/resources/csv/new/input-AgeCategory.csv
trunk/echobase-tools/src/test/resources/csv/new/input-SpeciesCategory.csv
Modified:
trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java
trunk/echobase-entities/src/main/xmi/echobase.zargo
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/CellLoader.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/EntityLoader.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AbstractLoaderIT.java
trunk/src/doc/reunions/reunion-2011-12-14.txt
Modified: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java
===================================================================
--- trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java 2011-12-15 21:53:41 UTC (rev 197)
+++ trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java 2011-12-16 01:46:20 UTC (rev 198)
@@ -25,6 +25,7 @@
import com.google.common.base.Function;
import fr.ifremer.echobase.entities.data.DataProcessing;
+import fr.ifremer.echobase.entities.data.Operation;
import fr.ifremer.echobase.entities.data.Voyage;
import fr.ifremer.echobase.entities.references.AcousticInstrument;
import fr.ifremer.echobase.entities.references.AreaOfOperation;
@@ -33,6 +34,7 @@
import fr.ifremer.echobase.entities.references.DataType;
import fr.ifremer.echobase.entities.references.DepthStratum;
import fr.ifremer.echobase.entities.references.EchotypeCategory;
+import fr.ifremer.echobase.entities.references.Gear;
import fr.ifremer.echobase.entities.references.Mission;
import fr.ifremer.echobase.entities.references.OperationEvent;
import fr.ifremer.echobase.entities.references.ReferenceDatum;
@@ -40,8 +42,10 @@
import fr.ifremer.echobase.entities.references.SampleDataType;
import fr.ifremer.echobase.entities.references.Species;
import fr.ifremer.echobase.entities.references.Vessel;
+import org.apache.commons.lang3.StringUtils;
import org.nuiton.topia.persistence.TopiaEntity;
+import javax.annotation.Nullable;
import java.io.File;
import java.util.Map;
@@ -174,6 +178,20 @@
return input.getName();
}
};
+ public static final Function<Gear, String> GEAR_CASINO_GEAR_NAME = new Function<Gear, String>() {
+ @Override
+ public String apply(Gear input) {
+ //FIXME : Remove the dummy test when all gear in db have a casino name
+ String casinoGearName = input.getCasinoGearName();
+ return StringUtils.isEmpty(casinoGearName) ? input.getName() : casinoGearName;
+ }
+ };
+ public static final Function<Operation, String> OPERATION_ID = new Function<Operation, String>() {
+ @Override
+ public String apply(Operation input) {
+ return input.getId();
+ }
+ };
public static Function<Map<String, Object>, String> newRowFunction(final String key) {
Modified: trunk/echobase-entities/src/main/xmi/echobase.zargo
===================================================================
(Binary files differ)
Added: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/AgeCategoryLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/AgeCategoryLoader.java (rev 0)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/AgeCategoryLoader.java 2011-12-16 01:46:20 UTC (rev 198)
@@ -0,0 +1,56 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.meta.TableMeta;
+import fr.ifremer.echobase.entities.references.AgeCategory;
+import fr.ifremer.echobase.services.models.EntityCsvModel;
+import fr.ifremer.echobase.tools.FileType;
+
+/**
+ * To load {@link AgeCategory} entities.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class AgeCategoryLoader extends EntityLoader<AgeCategory> {
+
+ public AgeCategoryLoader() {
+ super(AgeCategory.class, FileType.NEW);
+ }
+
+
+ @Override
+ protected EntityCsvModel<AgeCategory> createCsvImportModel(TableMeta meta) {
+
+ EntityCsvModel<AgeCategory> model = EntityCsvModel.newModel(
+ getCsvSeparator(),
+ meta
+ );
+ model.newMandatoryColumn(AgeCategory.PROPERTY_NAME);
+ model.newMandatoryColumn(AgeCategory.PROPERTY_MEANING);
+ return model;
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/AgeCategoryLoader.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/CellLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/CellLoader.java 2011-12-15 21:53:41 UTC (rev 197)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/CellLoader.java 2011-12-16 01:46:20 UTC (rev 198)
@@ -118,8 +118,7 @@
super.exportDatas(outputDir, targetType);
// also export Data
- TableMeta dataMeta = getTable(EchoBaseEntityEnum.Data);
- exportData(outputDir, targetType, dataMeta);
+ exportData(outputDir, targetType, getTable(EchoBaseEntityEnum.Data));
}
@Override
@@ -127,14 +126,12 @@
FileType targetType) throws IOException {
super.exportAssociations(outputDir, targetType);
- AssociationMeta associationMeta;
-
// also export cells associations
- associationMeta = getMeta().getAssociations(Cell.PROPERTY_CHILDS);
- exportAssociation(outputDir, targetType, associationMeta);
+ exportAssociation(outputDir, targetType,
+ getMeta().getAssociations(Cell.PROPERTY_CHILDS));
- associationMeta = getMeta().getAssociations(Cell.PROPERTY_DATA);
- exportAssociation(outputDir, targetType, associationMeta);
+ exportAssociation(outputDir, targetType,
+ getMeta().getAssociations(Cell.PROPERTY_DATA));
}
@Override
Modified: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/EntityLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/EntityLoader.java 2011-12-15 21:53:41 UTC (rev 197)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/EntityLoader.java 2011-12-16 01:46:20 UTC (rev 198)
@@ -400,22 +400,10 @@
return universe;
}
-// protected <E> E getFK(Map<String, E> universe, String fk) {
-// return getFK(universe, fk, true);
-// }
-
protected <E> E getFK(Map<String, E> universe, String fk) {
-// E entity = universe.get(lowerCase ? fk.toLowerCase() : fk);
E entity = universe.get(fk);
-// if (strict)
- Preconditions.checkNotNull(entity, "Could not find entity with id " + fk);
-// else {
-// if (entity == null) {
-// if (log.isWarnEnabled()) {
-// log.warn("Could not find entity with id " + fk);
-// }
-// }
-// }
+ Preconditions.checkNotNull(entity,
+ "Could not find entity with id " + fk);
return entity;
}
Added: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/OperationLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/OperationLoader.java (rev 0)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/OperationLoader.java 2011-12-16 01:46:20 UTC (rev 198)
@@ -0,0 +1,350 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Multimap;
+import com.google.common.collect.Multimaps;
+import com.healthmarketscience.jackcess.Database;
+import fr.ifremer.echobase.EchoBaseFunctions;
+import fr.ifremer.echobase.entities.EchoBaseEntityEnum;
+import fr.ifremer.echobase.entities.data.GearMetadataValue;
+import fr.ifremer.echobase.entities.data.Operation;
+import fr.ifremer.echobase.entities.data.OperationMetadataValue;
+import fr.ifremer.echobase.entities.data.Transect;
+import fr.ifremer.echobase.entities.data.Transit;
+import fr.ifremer.echobase.entities.data.Voyage;
+import fr.ifremer.echobase.entities.meta.TableMeta;
+import fr.ifremer.echobase.entities.references.DepthStratum;
+import fr.ifremer.echobase.entities.references.Gear;
+import fr.ifremer.echobase.entities.references.GearMetadata;
+import fr.ifremer.echobase.entities.references.GearMetadataDAO;
+import fr.ifremer.echobase.entities.references.OperationEvent;
+import fr.ifremer.echobase.entities.references.OperationMetadata;
+import fr.ifremer.echobase.entities.references.OperationMetadataDAO;
+import fr.ifremer.echobase.tools.FileType;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.nuiton.topia.TopiaException;
+import org.nuiton.topia.persistence.TopiaDAO;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * To load {@link Operation} entities.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class OperationLoader extends EntityLoader<Operation> {
+
+ /** Logger. */
+ private static final Log log =
+ LogFactory.getLog(OperationLoader.class);
+
+ public OperationLoader() {
+ super(Operation.class, EchoBaseEntityEnum.Transect,
+ Transect.PROPERTY_OPERATION, new EchoBaseEntityEnum[]{
+ EchoBaseEntityEnum.OperationMetadata,
+ EchoBaseEntityEnum.GearMetadata
+ },
+ FileType.BARACOUDA);
+ }
+
+ @Override
+ protected void exportDatas(File outputDir, FileType targetType) throws IOException {
+ super.exportDatas(outputDir, targetType);
+
+ // also export OperationMetadataValue
+ exportData(outputDir, targetType,
+ getTable(EchoBaseEntityEnum.OperationMetadataValue));
+
+ // also export GearMetadataValue
+ exportData(outputDir, targetType,
+ getTable(EchoBaseEntityEnum.GearMetadataValue));
+ }
+
+ @Override
+ protected void exportAssociations(File outputDir, FileType targetType) throws IOException {
+ super.exportAssociations(outputDir, targetType);
+
+ TableMeta meta = getMeta();
+
+ // export operation metadata values
+ exportAssociation(outputDir, targetType,
+ meta.getAssociations(Operation.PROPERTY_OPERATION_METADATA_VALUE));
+
+ // export gear metadata values
+ exportAssociation(outputDir, targetType,
+ meta.getAssociations(Operation.PROPERTY_GEAR_METADATA_VALUE));
+ }
+
+ @Override
+ protected void copyAndLoad(File outputDir) throws IOException, TopiaException {
+
+ super.copyAndLoad(outputDir);
+
+ copyAndLoadEntities(outputDir, getTable(EchoBaseEntityEnum.OperationMetadataValue), false, FileType.BARACOUDA);
+ copyAndLoadEntities(outputDir, getTable(EchoBaseEntityEnum.GearMetadataValue), false, FileType.BARACOUDA);
+
+ TableMeta meta = getMeta();
+
+ copyAndLoadEntities(outputDir, meta.getAssociations(Operation.PROPERTY_OPERATION_METADATA_VALUE), false, FileType.ASSOCIATION);
+ copyAndLoadEntities(outputDir, meta.getAssociations(Operation.PROPERTY_GEAR_METADATA_VALUE), false, FileType.ASSOCIATION);
+
+ }
+
+ @Override
+ protected void importBaracoudaEntities(Database db) throws IOException, TopiaException {
+
+ Map<String, Voyage> voyagesByName = getUniverse(
+ Voyage.class, EchoBaseFunctions.VOYAGE_NAME);
+
+ Map<String, DepthStratum> depthStratumByName = getUniverse(
+ DepthStratum.class, EchoBaseFunctions.DEPTH_STRATUM_ID);
+
+ Map<String, Gear> gearByCasinoGearName = getUniverse(
+ Gear.class, EchoBaseFunctions.GEAR_CASINO_GEAR_NAME);
+
+ OperationMetadataDAO operationMetadataDAO =
+ (OperationMetadataDAO) getDAO(OperationMetadata.class);
+
+ //SONDE
+ OperationMetadata MeanWaterDepthOperationMeta =
+ operationMetadataDAO.findByName("MeanWaterDepth");
+ Preconditions.checkNotNull(MeanWaterDepthOperationMeta);
+ //JOUR_NUIT
+ OperationMetadata DielPeriodOperationMeta =
+ operationMetadataDAO.findByName("DielPeriod");
+ Preconditions.checkNotNull(DielPeriodOperationMeta);
+ //SONDEDEB
+ OperationMetadata StartWaterDepthOperationMeta = operationMetadataDAO.findByProperties(
+ OperationMetadata.PROPERTY_NAME, "WaterDepth",
+ OperationMetadata.PROPERTY_OPERATION_EVENT + "." + OperationEvent.PROPERTY_NAME, "ShootingStart"
+ );
+ Preconditions.checkNotNull(StartWaterDepthOperationMeta);
+ //SONDEFIN
+ OperationMetadata EndWaterDepthOperationMeta = operationMetadataDAO.findByProperties(
+ OperationMetadata.PROPERTY_NAME, "WaterDepth",
+ OperationMetadata.PROPERTY_OPERATION_EVENT + "." + OperationEvent.PROPERTY_NAME, "HaulingEnd"
+ );
+ Preconditions.checkNotNull(EndWaterDepthOperationMeta);
+
+ GearMetadataDAO gearMetadataDAO =
+ (GearMetadataDAO) getDAO(GearMetadata.class);
+
+ //LFUNES
+ GearMetadata CableLengthGearMeta = gearMetadataDAO.findByType("CableLength");
+ Preconditions.checkNotNull(CableLengthGearMeta);
+
+ //VMIN
+ GearMetadata MinSpeedGearMeta = gearMetadataDAO.findByType("MinSpeed");
+ Preconditions.checkNotNull(MinSpeedGearMeta);
+
+ //VMAX
+ GearMetadata MaxSpeedGearMeta = gearMetadataDAO.findByType("MaxSpeed");
+ Preconditions.checkNotNull(MaxSpeedGearMeta);
+
+ TopiaDAO<Operation> dao = getDAO();
+ TopiaDAO<OperationMetadataValue> operationMetadataValueDAO =
+ getDAO(OperationMetadataValue.class);
+
+ TopiaDAO<GearMetadataValue> gearMetadataValueDAO =
+ getDAO(GearMetadataValue.class);
+
+ Multimap<String, Map<String, Object>> stationByCampagneName = Multimaps.index(
+ db.getTable("STATIONS"), EchoBaseFunctions.newRowFunction("CAMPAGNE"));
+
+ List<Operation> operations = Lists.newArrayList();
+
+ List<String> messages = Lists.newArrayList();
+
+ for (String voyageName : stationByCampagneName.keySet()) {
+ Voyage voyage = voyagesByName.get(voyageName);
+ Preconditions.checkNotNull(voyage);
+ Transit transit = voyage.getTransit().iterator().next();
+ Preconditions.checkNotNull(transit);
+ Transect transect = transit.getTransect().iterator().next();
+ Preconditions.checkNotNull(transect);
+ Collection<Map<String, Object>> rows =
+ stationByCampagneName.get(voyageName);
+ for (Map<String, Object> row : rows) {
+
+ String status = (String) row.get("ETAT");
+ if ("FICTIF".equalsIgnoreCase(status)) {
+
+ // skip fictif operation
+ continue;
+ }
+ String operationId = (String) row.get("NOSTA");
+
+ DepthStratum depthStratum = null;
+ String depthStratumId = (String) row.get("STA_IMAGES");
+ if (StringUtils.isBlank(depthStratumId) ||
+ "nul".equals(depthStratumId)) {
+ messages.add("No depthStraum defined");
+ } else {
+ depthStratum = getFK(depthStratumByName, depthStratumId.trim());
+ }
+
+ String gearId = (String) row.get("ENGIN");
+ if (gearId == null) {
+ messages.add("No gear id");
+ } else {
+ Gear gear = getFK(gearByCasinoGearName, gearId);
+
+ Float shootingStartLatitude = (Float) row.get("LATDEB");
+ if (shootingStartLatitude == null) {
+ messages.add("No shootingStartLatitude");
+ shootingStartLatitude = 0f;
+ }
+ Float shootingEndLatitude = (Float) row.get("LATDD");
+ if (shootingEndLatitude == null) {
+ messages.add("No shootingEndLatitude");
+ shootingEndLatitude = 0f;
+ }
+ Float shootingStartLongitude = (Float) row.get("LGDEB");
+ if (shootingStartLongitude == null) {
+ messages.add("No shootingStartLongitude");
+ shootingStartLongitude = 0f;
+ }
+ Float shootingEndLongitude = (Float) row.get("LGDD");
+ if (shootingEndLongitude == null) {
+ messages.add("No shootingEndLongitude");
+ shootingEndLongitude = 0f;
+ }
+
+ Date shootingStartTime = (Date) row.get("DHTUDEB");
+ Date shootingEndTime = (Date) row.get("DHTUFIN");
+
+ String comment = (String) row.get("COMMENTAIRE");
+
+ // create a operation
+ Operation operation = dao.create(
+ Operation.PROPERTY_ID, operationId,
+ Operation.PROPERTY_DEPTH_STRATUM, depthStratum,
+ Operation.PROPERTY_GEAR, gear,
+ Operation.PROPERTY_GEAR_SHOOTING_START_LATITUDE, shootingStartLatitude,
+ Operation.PROPERTY_GEAR_SHOOTING_END_LATITUDE, shootingEndLatitude,
+ Operation.PROPERTY_GEAR_SHOOTING_START_LONGITUDE, shootingStartLongitude,
+ Operation.PROPERTY_GEAR_SHOOTING_END_LONGITUDE, shootingEndLongitude,
+ Operation.PROPERTY_GEAR_SHOOTING_START_TIME, shootingStartTime,
+ Operation.PROPERTY_GEAR_SHOOTING_END_TIME, shootingEndTime,
+ Operation.PROPERTY_COMMENT, comment
+ );
+
+ addOperationMetadataValue(operationMetadataValueDAO,
+ operation,
+ MeanWaterDepthOperationMeta,
+ row.get("SONDE"));
+
+ addOperationMetadataValue(operationMetadataValueDAO,
+ operation,
+ DielPeriodOperationMeta,
+ row.get("JOUR_NUIT"));
+
+ addOperationMetadataValue(operationMetadataValueDAO,
+ operation,
+ StartWaterDepthOperationMeta,
+ row.get("SONDEDEB"));
+
+ addOperationMetadataValue(operationMetadataValueDAO,
+ operation,
+ EndWaterDepthOperationMeta,
+ row.get("SONDEFIN"));
+
+ addGearMetadataValue(gearMetadataValueDAO,
+ operation,
+ CableLengthGearMeta,
+ row.get("LFUNES"));
+
+ addGearMetadataValue(gearMetadataValueDAO,
+ operation,
+ MinSpeedGearMeta,
+ row.get("VMIN"));
+
+ addGearMetadataValue(gearMetadataValueDAO,
+ operation,
+ MaxSpeedGearMeta,
+ row.get("VMAX"));
+
+ operations.add(operation);
+ transect.addOperation(operation);
+
+ }
+ if (!messages.isEmpty()) {
+
+ if (log.isWarnEnabled()) {
+ log.warn("For operation " + operationId + ", status " + status + " : " + messages);
+ }
+ messages.clear();
+ }
+ }
+ }
+
+ if (log.isInfoEnabled()) {
+ log.info("Found " + operations.size() + " operation(s).");
+ }
+ }
+
+ protected void addOperationMetadataValue(TopiaDAO<OperationMetadataValue> dao,
+ Operation operation,
+ OperationMetadata meta,
+ Object value
+ ) throws TopiaException {
+ if (value == null) {
+ return;
+ }
+ OperationMetadataValue operationMetadataValue = dao.create(
+ OperationMetadataValue.PROPERTY_OPERATION_METADATA, meta,
+ OperationMetadataValue.PROPERTY_DATA_VALUE, value.toString()
+ );
+ operation.addOperationMetadataValue(operationMetadataValue);
+ }
+
+ protected void addGearMetadataValue(TopiaDAO<GearMetadataValue> dao,
+ Operation operation,
+ GearMetadata meta,
+ Object value
+ ) throws TopiaException {
+
+ if (value == null) {
+ return;
+ }
+ GearMetadataValue gearMetadataValue = dao.create(
+ GearMetadataValue.PROPERTY_GEAR_METADATA, meta,
+ GearMetadataValue.PROPERTY_DATA_VALUE, value.toString(),
+ GearMetadataValue.PROPERTY_GEAR, operation.getGear()
+ );
+ operation.addGearMetadataValue(gearMetadataValue);
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/OperationLoader.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleLoader.java (rev 0)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleLoader.java 2011-12-16 01:46:20 UTC (rev 198)
@@ -0,0 +1,329 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Multimap;
+import com.google.common.collect.Multimaps;
+import com.healthmarketscience.jackcess.Database;
+import fr.ifremer.echobase.EchoBaseFunctions;
+import fr.ifremer.echobase.entities.EchoBaseEntityEnum;
+import fr.ifremer.echobase.entities.data.Operation;
+import fr.ifremer.echobase.entities.data.Sample;
+import fr.ifremer.echobase.entities.data.SampleData;
+import fr.ifremer.echobase.entities.data.SampleDataDAO;
+import fr.ifremer.echobase.entities.meta.TableMeta;
+import fr.ifremer.echobase.entities.references.SampleDataType;
+import fr.ifremer.echobase.entities.references.SampleDataTypeDAO;
+import fr.ifremer.echobase.entities.references.SampleType;
+import fr.ifremer.echobase.entities.references.SampleTypeDAO;
+import fr.ifremer.echobase.entities.references.Species;
+import fr.ifremer.echobase.tools.FileType;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.nuiton.topia.TopiaException;
+import org.nuiton.topia.persistence.TopiaDAO;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Map;
+
+/**
+ * To load {@link Sample} entities.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class SampleLoader extends EntityLoader<Sample> {
+
+ /** Logger. */
+ private static final Log log =
+ LogFactory.getLog(SampleLoader.class);
+
+ public SampleLoader() {
+ super(Sample.class, EchoBaseEntityEnum.Operation,
+ Operation.PROPERTY_SAMPLE, new EchoBaseEntityEnum[]{
+ EchoBaseEntityEnum.SampleDataType,
+ EchoBaseEntityEnum.SampleType,
+ },
+ FileType.BARACOUDA);
+ }
+
+ @Override
+ protected void exportDatas(File outputDir, FileType targetType) throws IOException {
+ super.exportDatas(outputDir, targetType);
+
+ exportData(outputDir, targetType,
+ getTable(EchoBaseEntityEnum.SampleData));
+ }
+
+ @Override
+ protected void exportAssociations(File outputDir, FileType targetType) throws IOException {
+ super.exportAssociations(outputDir, targetType);
+
+ TableMeta meta = getMeta();
+
+ exportAssociation(outputDir, targetType,
+ meta.getAssociations(Sample.PROPERTY_SAMPLE_DATA));
+
+ }
+
+ @Override
+ protected void copyAndLoad(File outputDir) throws IOException, TopiaException {
+
+ super.copyAndLoad(outputDir);
+
+ copyAndLoadEntities(outputDir, getTable(EchoBaseEntityEnum.SampleData), false, FileType.BARACOUDA);
+
+ TableMeta meta = getMeta();
+
+ copyAndLoadEntities(outputDir, meta.getAssociations(Sample.PROPERTY_SAMPLE_DATA), false, FileType.ASSOCIATION);
+
+ }
+
+ @Override
+ protected void importBaracoudaEntities(Database db) throws IOException, TopiaException {
+
+ Map<String, Operation> operationById = getUniverse(
+ Operation.class, EchoBaseFunctions.OPERATION_ID);
+
+ Map<String, Species> speciesByName = getUniverse(
+ Species.class, EchoBaseFunctions.SPECIES_BARACOUDA_CODE);
+
+ Multimap<String, Map<String, Object>> mensurationByNosta = Multimaps.index(
+ db.getTable("MENSURATIONS", true),
+ EchoBaseFunctions.newRowFunction("NOSTA")
+ );
+
+ Multimap<String, Map<String, Object>> capturesByNosta = Multimaps.index(
+ db.getTable("CAPTURES", true),
+ EchoBaseFunctions.newRowFunction("NOSTA")
+ );
+ SampleTypeDAO sampleTypeDAO =
+ (SampleTypeDAO) getDAO(SampleType.class);
+
+ SampleType sampleTypeTotal = sampleTypeDAO.findByName("Total");
+ Preconditions.checkNotNull(sampleTypeTotal);
+ SampleType sampleTypeUnsorted = sampleTypeDAO.findByName("Unsorted");
+ Preconditions.checkNotNull(sampleTypeUnsorted);
+ SampleType sampleTypeSubsample = sampleTypeDAO.findByName("Subsample");
+ Preconditions.checkNotNull(sampleTypeSubsample);
+
+ SampleDataTypeDAO sampleDataTypeDAO =
+ (SampleDataTypeDAO) getDAO(SampleDataType.class);
+
+ SampleDataDAO sampleDataDAO = (SampleDataDAO) getDAO(SampleData.class);
+
+ SampleDataType sampleDataTypeMeanLength = sampleDataTypeDAO.findByName("MeanLengthcm");
+ Preconditions.checkNotNull(sampleDataTypeMeanLength);
+ SampleDataType sampleDataTypeMeanWeight = sampleDataTypeDAO.findByName("MeanWeightg");
+ Preconditions.checkNotNull(sampleDataTypeMeanWeight);
+ SampleDataType sampleDataTypeNoPerKg = sampleDataTypeDAO.findByName("NoPerKg");
+ Preconditions.checkNotNull(sampleDataTypeNoPerKg);
+ SampleDataType sampleDataTypeNumberAtLength = sampleDataTypeDAO.findByName("NumberAtLength");
+ Preconditions.checkNotNull(sampleDataTypeNumberAtLength);
+ SampleDataType sampleDataTypeWeightAtLength = sampleDataTypeDAO.findByName("WeightAtLengthkg");
+ Preconditions.checkNotNull(sampleDataTypeWeightAtLength);
+
+ TopiaDAO<Sample> dao = getDAO();
+
+ int nbSampleUnsorted = 0;
+ int nbSampleTotal = 0;
+ int nbSubSample = 0;
+
+ for (String operationId : capturesByNosta.keySet()) {
+ Preconditions.checkNotNull(operationId);
+ Operation operation = operationById.get(operationId);
+ if (operation == null) {
+ if (log.isWarnEnabled()) {
+ log.warn("Operation " + operationId + " not found...");
+ }
+ continue;
+ }
+ for (Map<String, Object> row : capturesByNosta.get(operationId)) {
+ String type = (String) row.get("CATEG");
+
+ SampleType sampleType;
+
+ if ("H".equals(type)) {
+ sampleType = sampleTypeUnsorted;
+ nbSampleUnsorted++;
+ } else {
+ sampleType = sampleTypeTotal;
+ nbSampleTotal++;
+ }
+
+ String speciesId = (String) row.get("GENRE_ESP");
+ Species species = getFK(speciesByName, speciesId);
+
+ Integer number = (Integer) row.get("NTOT");
+ if (number == null) {
+ if (log.isWarnEnabled()) {
+ log.warn("NTOT is null for operation " + operationId + "/" + speciesId);
+ }
+ number = 0;
+ }
+ Float weight = (Float) row.get("PT_ESP");
+
+ Sample sample = dao.create(
+ Sample.PROPERTY_SPECIES, species,
+ Sample.PROPERTY_SAMPLE_TYPE, sampleType,
+ Sample.PROPERTY_NUMBER_SAMPLED, number,
+ Sample.PROPERTY_SAMPLE_WEIGHT, weight
+ );
+
+ operation.addSample(sample);
+
+ addSampleData(sampleDataDAO,
+ sample,
+ sampleDataTypeMeanWeight,
+ "NA",
+ row.get("PMOY"));
+
+ addSampleData(sampleDataDAO,
+ sample,
+ sampleDataTypeMeanLength,
+ "NA",
+ row.get("LMOY"));
+
+ addSampleData(sampleDataDAO,
+ sample,
+ sampleDataTypeNoPerKg,
+ "NA",
+ row.get("MOULE_MENS"));
+
+ Collection<Map<String, Object>> mesnurationRows =
+ mensurationByNosta.get(operationId);
+
+ Float sampleWeight = (Float) row.get("PESP_MENS");
+ if (sampleWeight == null) {
+ if (log.isWarnEnabled()) {
+ log.warn("PESP_MENS is null for operation " + operationId + "/" + speciesId);
+ }
+ sampleWeight = 0f;
+ }
+ addSubSamples(dao,
+ sampleDataDAO,
+ sampleTypeSubsample,
+ sampleDataTypeNumberAtLength,
+ sampleDataTypeWeightAtLength,
+ operation,
+ type,
+ species,
+ sampleWeight,
+ mesnurationRows);
+
+ int nbSamples = operation.sizeSample();
+ nbSubSample += nbSamples - 1;
+ }
+ }
+
+
+ if (log.isInfoEnabled()) {
+ log.info("Found " + nbSampleTotal + " 'total' sample(s).");
+ log.info("Found " + nbSampleUnsorted + " 'unsorted' sample(s).");
+ log.info("Found " + nbSubSample + " 'sub' sample(s).");
+ log.info("Total " + (nbSampleTotal + nbSampleUnsorted + nbSubSample) + " sample(s).");
+ }
+ }
+
+ private void addSubSamples(TopiaDAO<Sample> dao,
+ SampleDataDAO sampleDataDAO,
+ SampleType sampleTypeSubsample,
+ SampleDataType sampleDataTypeNumberAtLength,
+ SampleDataType sampleDataTypeWeightAtLength,
+ Operation operation,
+ String type,
+ Species species,
+ Float sampleWeight,
+ Collection<Map<String, Object>> mesnurationRows) throws TopiaException {
+
+ String speciesId = species.getBaracoudaCode();
+
+ for (Map<String, Object> row : mesnurationRows) {
+ String categ = (String) row.get("CATEG");
+ if (!type.equals(categ)) {
+
+ // not good category
+ continue;
+ }
+ String rowSpeciesId = (String) row.get("GENRE_ESP");
+ if (!speciesId.equals(rowSpeciesId)) {
+
+ // not good species
+ continue;
+ }
+
+ // ok found a good row
+ Sample subsample = dao.create(
+ Sample.PROPERTY_SPECIES, species,
+ Sample.PROPERTY_SAMPLE_TYPE, sampleTypeSubsample,
+ Sample.PROPERTY_SAMPLE_WEIGHT, sampleWeight
+ );
+
+ Object lengthClass = row.get("TAILLE");
+
+ addSampleData(sampleDataDAO,
+ subsample,
+ sampleDataTypeNumberAtLength,
+ lengthClass,
+ row.get("NBIND")
+ );
+
+ addSampleData(sampleDataDAO,
+ subsample,
+ sampleDataTypeWeightAtLength,
+ lengthClass,
+ row.get("POIDSTAILLE")
+ );
+
+
+ operation.addSample(subsample);
+
+ }
+ }
+
+
+ protected void addSampleData(TopiaDAO<SampleData> dao,
+ Sample operation,
+ SampleDataType sampleDataType,
+ Object label,
+ Object value
+ ) throws TopiaException {
+
+ if (value == null || label == null) {
+ return;
+ }
+
+ SampleData sampleData = dao.create(
+ SampleData.PROPERTY_SAMPLE_DATA_TYPE, sampleDataType,
+ SampleData.PROPERTY_DATA_LABEL, label.toString(),
+ SampleData.PROPERTY_DATA_VALUE, Float.valueOf(value.toString())
+ );
+ operation.addSampleData(sampleData);
+ }
+
+
+}
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleLoader.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SpeciesCategoryLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SpeciesCategoryLoader.java (rev 0)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SpeciesCategoryLoader.java 2011-12-16 01:46:20 UTC (rev 198)
@@ -0,0 +1,58 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.meta.TableMeta;
+import fr.ifremer.echobase.entities.references.SpeciesCategory;
+import fr.ifremer.echobase.services.models.EntityCsvModel;
+import fr.ifremer.echobase.tools.FileType;
+
+/**
+ * To load {@link SpeciesCategory} entities.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class SpeciesCategoryLoader extends EntityLoader<SpeciesCategory> {
+
+ public SpeciesCategoryLoader() {
+ super(SpeciesCategory.class, FileType.NEW);
+ }
+
+
+ @Override
+ protected EntityCsvModel<SpeciesCategory> createCsvImportModel(TableMeta meta) {
+
+ EntityCsvModel<SpeciesCategory> model = EntityCsvModel.newModel(
+ getCsvSeparator(),
+ meta
+ );
+ model.newMandatoryColumn(SpeciesCategory.PROPERTY_SPECIES);
+ model.newMandatoryColumn(SpeciesCategory.PROPERTY_SIZE_CATEGORY);
+ model.newMandatoryColumn(SpeciesCategory.PROPERTY_AGE_CATEGORY);
+ model.newMandatoryColumn(SpeciesCategory.PROPERTY_SEX_CATEGORY);
+ return model;
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SpeciesCategoryLoader.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AbstractLoaderIT.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AbstractLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AbstractLoaderIT.java 2011-12-16 01:46:20 UTC (rev 198)
@@ -362,6 +362,9 @@
entityLoaders.add(newService(SizeCategoryLoader.class));
entityLoaders.add(newService(OperationMetadataLoader.class));
entityLoaders.add(newService(GearMetadataLoader.class));
+ entityLoaders.add(newService(GearLoader.class));
+ entityLoaders.add(newService(AgeCategoryLoader.class));
+ entityLoaders.add(newService(SpeciesCategoryLoader.class));
entityLoaders.add(newService(VoyageLoader.class));
entityLoaders.add(newService(TransitLoader.class));
@@ -369,6 +372,7 @@
entityLoaders.add(newService(DataAcquisitionLoader.class));
entityLoaders.add(newService(DataProcessingLoader.class));
entityLoaders.add(newService(CellLoader.class));
+ entityLoaders.add(newService(OperationLoader.class));
}
return entityLoaders;
}
Added: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AgeCategoryLoaderIT.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AgeCategoryLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AgeCategoryLoaderIT.java 2011-12-16 01:46:20 UTC (rev 198)
@@ -0,0 +1,46 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.AgeCategory;
+import org.junit.Test;
+
+/**
+ * To test the {@link AgeCategoryLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class AgeCategoryLoaderIT extends AbstractLoaderIT<AgeCategory, AgeCategoryLoader> {
+
+ public AgeCategoryLoaderIT() {
+ super(AgeCategoryLoader.class, 0, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AgeCategoryLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationLoaderIT.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationLoaderIT.java 2011-12-16 01:46:20 UTC (rev 198)
@@ -0,0 +1,46 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.data.Operation;
+import org.junit.Test;
+
+/**
+ * To test the {@link OperationLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class OperationLoaderIT extends AbstractLoaderIT<Operation, OperationLoader> {
+
+ public OperationLoaderIT() {
+ super(OperationLoader.class, 0, 1374);
+ }
+
+ @Test
+ public void testGenerateEntitiesFromBaracouda() throws Exception {
+ generateBaracoudaEntities();
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleLoaderIT.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleLoaderIT.java 2011-12-16 01:46:20 UTC (rev 198)
@@ -0,0 +1,46 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.data.Sample;
+import org.junit.Test;
+
+/**
+ * To test the {@link SampleLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class SampleLoaderIT extends AbstractLoaderIT<Sample, SampleLoader> {
+
+ public SampleLoaderIT() {
+ super(SampleLoader.class, 0, 208199);
+ }
+
+ @Test
+ public void testGenerateEntitiesFromBaracouda() throws Exception {
+ generateBaracoudaEntities();
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SpeciesCategoryLoaderIT.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SpeciesCategoryLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SpeciesCategoryLoaderIT.java 2011-12-16 01:46:20 UTC (rev 198)
@@ -0,0 +1,46 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.SpeciesCategory;
+import org.junit.Test;
+
+/**
+ * To test the {@link SpeciesCategoryLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class SpeciesCategoryLoaderIT extends AbstractLoaderIT<SpeciesCategory, SpeciesCategoryLoader> {
+
+ public SpeciesCategoryLoaderIT() {
+ super(SpeciesCategoryLoader.class, 0, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SpeciesCategoryLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/test/resources/csv/new/input-AgeCategory.csv
===================================================================
--- trunk/echobase-tools/src/test/resources/csv/new/input-AgeCategory.csv (rev 0)
+++ trunk/echobase-tools/src/test/resources/csv/new/input-AgeCategory.csv 2011-12-16 01:46:20 UTC (rev 198)
@@ -0,0 +1 @@
+name;meaning
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/test/resources/csv/new/input-AgeCategory.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/test/resources/csv/new/input-SpeciesCategory.csv
===================================================================
--- trunk/echobase-tools/src/test/resources/csv/new/input-SpeciesCategory.csv (rev 0)
+++ trunk/echobase-tools/src/test/resources/csv/new/input-SpeciesCategory.csv 2011-12-16 01:46:20 UTC (rev 198)
@@ -0,0 +1 @@
+species;sizeCategory;ageCategory;sexCategory
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/test/resources/csv/new/input-SpeciesCategory.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/src/doc/reunions/reunion-2011-12-14.txt
===================================================================
--- trunk/src/doc/reunions/reunion-2011-12-14.txt 2011-12-15 21:53:41 UTC (rev 197)
+++ trunk/src/doc/reunions/reunion-2011-12-14.txt 2011-12-16 01:46:20 UTC (rev 198)
@@ -49,6 +49,8 @@
- Remplissage du référentiel GearMetadata
- Remplissage du référentiel Gear
+- Import des opérations (depuis table STATIONS)
+
Action
------
1
0
15 Dec '11
Author: tchemit
Date: 2011-12-15 22:53:41 +0100 (Thu, 15 Dec 2011)
New Revision: 197
Url: http://forge.codelutin.com/repositories/revision/echobase/197
Log:
- rename LoaderTest to LoaderIT (otherwise run-loaders profile can not work)
- fill Gear references
- prepare Operation model
Added:
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/GearLoader.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AbstractLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AcousticInstrumentLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AreaOfOperationLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/BiometryScaleLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellMethodLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellTypeLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataAcquisitionLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataMetadataLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataProcessingLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataQualityLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataTypeLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DepthStratumLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/EchotypeCategoryLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/EchotypeLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/GearLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/GearMetadataLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/MissionLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationEventLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationMetadataLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/ReferenceDatumLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/ReferenceDatumTypeLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleTypeLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SexCategoryLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SizeCategoryLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SpeciesLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/StrataLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TSParametersLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TransectLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TransitLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VesselLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VesselTypeLoaderIT.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VoyageLoaderIT.java
trunk/echobase-tools/src/test/resources/csv/new/input-Gear.csv
Removed:
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AbstractLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AcousticInstrumentLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AreaOfOperationLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/BiometryScaleLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellMethodLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellTypeLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataAcquisitionLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataMetadataLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataProcessingLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataQualityLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataTypeLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DepthStratumLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/EchotypeCategoryLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/EchotypeLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/GearMetadataLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/MissionLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationEventLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationMetadataLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/ReferenceDatumLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/ReferenceDatumTypeLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleTypeLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SexCategoryLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SizeCategoryLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SpeciesLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/StrataLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TSParametersLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TransectLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TransitLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VesselLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VesselTypeLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VoyageLoaderTest.java
Modified:
trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseDecoratorProvider.java
trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/EntitiesUtil.java
trunk/echobase-entities/src/main/resources/i18n/echobase-entities_fr_FR.properties
trunk/echobase-entities/src/main/xmi/echobase.zargo
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/models/CsvModelUtil.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/models/EntityCsvModel.java
trunk/echobase-tools/pom.xml
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/EchotypeLoader.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoader.java
trunk/src/doc/reunions/reunion-2011-12-14.txt
Modified: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseDecoratorProvider.java
===================================================================
--- trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseDecoratorProvider.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseDecoratorProvider.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -59,7 +59,6 @@
import fr.ifremer.echobase.entities.references.GearCharacteristic;
import fr.ifremer.echobase.entities.references.GearCharacteristicValue;
import fr.ifremer.echobase.entities.references.GearMetadata;
-import fr.ifremer.echobase.entities.references.GearType;
import fr.ifremer.echobase.entities.references.Impacte;
import fr.ifremer.echobase.entities.references.LengthAgeKey;
import fr.ifremer.echobase.entities.references.MeasureType;
@@ -169,9 +168,6 @@
// GearMetadataValue decorator
registerJXPathDecorator(locale, GearMetadataValue.class, "${dataValue}$s");
- // GearType decorator
- registerJXPathDecorator(locale, GearType.class, "${name}$s");
-
// Impacte decorator
registerJXPathDecorator(locale, Impacte.class, "${measurementUnit}$s - ${species.genusSpecies}");
Modified: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/EntitiesUtil.java
===================================================================
--- trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/EntitiesUtil.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/EntitiesUtil.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -105,7 +105,6 @@
result.add(EchoBaseEntityEnum.CellMethod);
result.add(EchoBaseEntityEnum.AcousticInstrument);
result.add(EchoBaseEntityEnum.CategoryType);
- result.add(EchoBaseEntityEnum.GearType);
result.add(EchoBaseEntityEnum.CategoryMeaning);
result.add(EchoBaseEntityEnum.Species);
result.add(EchoBaseEntityEnum.GearCharacteristic);
@@ -173,6 +172,7 @@
result.add(EchoBaseEntityEnum.DataMetadata);
result.add(EchoBaseEntityEnum.OperationMetadata);
result.add(EchoBaseEntityEnum.GearMetadata);
+ result.add(EchoBaseEntityEnum.Gear);
return result.toArray(new EchoBaseEntityEnum[result.size()]);
}
Modified: trunk/echobase-entities/src/main/resources/i18n/echobase-entities_fr_FR.properties
===================================================================
--- trunk/echobase-entities/src/main/resources/i18n/echobase-entities_fr_FR.properties 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-entities/src/main/resources/i18n/echobase-entities_fr_FR.properties 2011-12-15 21:53:41 UTC (rev 197)
@@ -5,6 +5,7 @@
echobase.common.acousticDensityUnit=
echobase.common.acousticInstrument=
echobase.common.acquisitionSoftwareVersion=
+echobase.common.active=
echobase.common.addOffset=
echobase.common.admin=Administrateur
echobase.common.age=
@@ -26,6 +27,7 @@
echobase.common.calendar=
echobase.common.calibration=calibration
echobase.common.callsign=
+echobase.common.casinoGearName=
echobase.common.category=
echobase.common.categoryMeaning=
echobase.common.categoryRef=
@@ -78,11 +80,13 @@
echobase.common.exportQuery=Requête d'export
echobase.common.exportQueryDTO=
echobase.common.fillValue=
+echobase.common.fishingGear=
echobase.common.flagMeanings=
echobase.common.frequency=
echobase.common.gear=
echobase.common.gearCharacteristic=
echobase.common.gearCharacteristicValue=
+echobase.common.gearClassification=
echobase.common.gearMetadata=
echobase.common.gearMetadataValue=
echobase.common.gearShootingEndLatitude=
@@ -108,6 +112,7 @@
echobase.common.institution=Institution
echobase.common.invalidSince=
echobase.common.keywords=Môts clefs
+echobase.common.label=
echobase.common.lastModifiedDate=Date de dernière modification
echobase.common.lastModifiedUser=Utilisateur de dernière modification
echobase.common.length=
@@ -153,6 +158,7 @@
echobase.common.operator=
echobase.common.organisationLevelAcknowledgements=
echobase.common.organisationReferences=
+echobase.common.parentGear=
echobase.common.password=Mot de passe
echobase.common.percentAtAge=
echobase.common.pingDutyCycle=
@@ -196,6 +202,7 @@
echobase.common.startLocality=
echobase.common.startPort=
echobase.common.startTime=
+echobase.common.status=
echobase.common.strata=
echobase.common.taxonCode=
echobase.common.taxonFatherMemocode=
@@ -205,6 +212,7 @@
echobase.common.timeCoverageStart=
echobase.common.title=
echobase.common.tonnage=
+echobase.common.towed=
echobase.common.transceiverAcquisitionAbsorption=
echobase.common.transceiverAcquisitionAbsorptionDescription=
echobase.common.transceiverAcquisitionGain=
@@ -240,6 +248,7 @@
echobase.common.type=
echobase.common.unit=
echobase.common.units=
+echobase.common.updateDate=
echobase.common.validMax=
echobase.common.validMin=
echobase.common.validSince=
Modified: trunk/echobase-entities/src/main/xmi/echobase.zargo
===================================================================
(Binary files differ)
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/models/CsvModelUtil.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/models/CsvModelUtil.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/models/CsvModelUtil.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -40,6 +40,7 @@
import java.text.ParseException;
import java.util.Collection;
+import java.util.Date;
import java.util.Locale;
import java.util.Map;
@@ -83,6 +84,55 @@
return new AssociationValueParserFormatter<E>(entityType, universe);
}
+ public static final ValueParser<Date> IMPORT_DAY = new DateValue("dd/MM/yy");
+
+ public static class BooleanParserFormatter extends NullableParserFormatter<Boolean> {
+
+ public BooleanParserFormatter(Boolean defaultValue, boolean nullAllowed) {
+ super(defaultValue, nullAllowed);
+ }
+
+ @Override
+ public String format(Boolean bool) {
+ String value;
+ if (bool == null) {
+ if (nullAllowed) {
+ value = "?";
+ } else {
+ throw new IllegalArgumentException();
+ }
+ } else if (bool) {
+ value = "Y";
+ } else {
+ value = "N";
+ }
+ return value;
+ }
+
+ @Override
+ protected Boolean parseNoneEmptyValue(String value) {
+ Boolean result;
+ if ("?".equals(value)) {
+ result = null;
+ } else if ("Y".equals(value)) {
+ result = true;
+ } else if ("N".equals(value)) {
+ result = false;
+ } else {
+ result = Boolean.parseBoolean(value);
+ }
+ return result;
+ }
+ }
+
+ public static final ValueParser<Boolean> INT_TO_BOOLEAN_PARSER = new ValueParser<Boolean>() {
+
+ @Override
+ public Boolean parse(String value) {
+ return "1".equals(value);
+ }
+ };
+
public static class AssociationValueParserFormatter<E extends TopiaEntity> implements ValueParserFormatter<Collection<E>> {
protected final Class<E> entityType;
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/models/EntityCsvModel.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/models/EntityCsvModel.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/models/EntityCsvModel.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -30,6 +30,7 @@
import org.nuiton.util.csv.ImportExportModel;
import org.nuiton.util.csv.ImportableColumn;
import org.nuiton.util.csv.ModelBuilder;
+import org.nuiton.util.csv.ValueParser;
import java.util.Collection;
import java.util.Date;
@@ -232,6 +233,10 @@
return modelBuilder.newMandatoryColumn(headerName, headerName);
}
+ public <T> ImportableColumn<E, T> newMandatoryColumn(String headerName, String propertyName, ValueParser<T> valueParser) {
+ return modelBuilder.newMandatoryColumn(headerName, valueParser, CsvModelUtil.<E, T>newBeanProperty(propertyName));
+ }
+
protected EntityCsvModel(char separator,
TableMeta tableMeta) {
this.separator = separator;
Modified: trunk/echobase-tools/pom.xml
===================================================================
--- trunk/echobase-tools/pom.xml 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/pom.xml 2011-12-15 21:53:41 UTC (rev 197)
@@ -132,37 +132,21 @@
</plugin>
</plugins>
</pluginManagement>
-
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <excludes>**/*LoaderTest.java</excludes>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
</build>
<profiles>
<profile>
<id>run-loaders</id>
- <activation>
- <property>
- <name>runLoaders</name>
- <value>true</value>
- </property>
- </activation>
<build>
+ <defaultGoal>test</defaultGoal>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
- <include>**/*LoaderTest.java</include>
+ <include>**/*LoaderIT.java</include>
</includes>
</configuration>
</plugin>
Modified: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/EchotypeLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/EchotypeLoader.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/EchotypeLoader.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -42,162 +42,10 @@
*/
public class EchotypeLoader extends EntityLoader<Echotype> {
-// /** Logger. */
-// private static final Log log =
-// LogFactory.getLog(EchotypeLoader.class);
-
public EchotypeLoader() {
super(Echotype.class, FileType.NEW);
}
-// @Override
-// protected void importBaracoudaEntities(Database db) throws IOException, TopiaException {
-//
-// // require referenceDatum, dataType and cellMethod
-//
-// TopiaContext tx = serviceContext.getTransaction();
-//
-// List<DepthStratum> allDepthStratum = EchoBaseDAOHelper.getDepthStratumDAO(tx).findAll();
-// ImmutableMap<String, DepthStratum> depthStratumsById = Maps.uniqueIndex(allDepthStratum, EchoBaseFunctions.DEPTH_STRATUM_ID);
-//
-// List<EchotypeCategory> allEchotypeCategory = EchoBaseDAOHelper.getEchotypeCategoryDAO(tx).findAll();
-// ImmutableMap<String, EchotypeCategory> categoriesByName = Maps.uniqueIndex(allEchotypeCategory, EchoBaseFunctions.ECHO_TYPE_CATEGORY_NAME);
-//
-// // get all descriptions of echotyped indexed by their id
-// Map<Integer, Map<String, Object>> descriptEchoById = Maps.uniqueIndex(
-// db.getTable("EIT_DESCRIPT_ECHOS"), EchoBaseFunctions.newRowIntegerFunction("ID_DESCRIPTION_DEVIATION"));
-//
-// // obtain Species fro table ESPECE_ECHOS
-// ImmutableListMultimap<Integer, Map<String, Object>> especeEchoById = Multimaps.index(
-// db.getTable("ESPECE_ECHOS"), EchoBaseFunctions.newRowIntegerFunction("CODE_DESCRIPTION_DEVIATION"));
-//
-//
-// Set<Integer> ids = descriptEchoById.keySet();
-//
-// // obtain for each id the corresponding name in EIT_VALEUR_ECHOS
-// Map<Integer, String> pairs = Maps.newTreeMap();
-// for (Map<String, Object> row : db.getTable("EIT_VALEUR_ECHOS")) {
-// Integer id = (Integer) row.get("ID_DESCRIPTION_DEVIATION");
-// String name = (String) row.get("LIBELLE_DEVIATION");
-// if (!pairs.containsKey(id)) {
-//
-// // this id is new push the name
-// pairs.put(id, name);
-// if (pairs.size() == ids.size()) {
-// // ok all ids are covered
-// break;
-// }
-// }
-// }
-//
-// SpeciesDAO speciesDAO = EchoBaseDAOHelper.getSpeciesDAO(tx);
-//
-// TopiaDAO<Echotype> dao = getDAO();
-//
-// List<Echotype> echotypes = Lists.newArrayList();
-//
-// Set<String> missingDepthStratum = Sets.newHashSet();
-// Set<String> missingCategories = Sets.newHashSet();
-// Set<String> missingSpecies = Sets.newHashSet();
-//
-// // to get a cache of species
-// Map<String, Species> speciesMap = Maps.newTreeMap();
-//
-// for (Map.Entry<Integer, Map<String, Object>> entry : descriptEchoById.entrySet()) {
-// Map<String, Object> row = entry.getValue();
-//
-// Integer id = entry.getKey();
-//
-// String name = pairs.get(id);
-//
-// String meaning = (String) row.get("LIBELLE_DESCRIPTION_DEVIATION");
-//
-// // get echotype category
-// String categoryId = (String) row.get("TYPE_DEVIATION");
-// EchotypeCategory echotypeCategory = categoriesByName.get(categoryId.toLowerCase());
-// if (echotypeCategory == null) {
-// missingCategories.add(categoryId);
-// }
-//
-// // get echotype depthstratum
-// String depthStratumId = (String) row.get("IMAGES");
-// DepthStratum depthStratum = depthStratumsById.get(depthStratumId.toLowerCase());
-// if (depthStratum == null) {
-// missingDepthStratum.add(depthStratumId);
-// }
-//
-// // get all species for this id
-// ImmutableList<Map<String, Object>> speciesRows = especeEchoById.get(id);
-// for (Map<String, Object> speciesRow : speciesRows) {
-//
-// String speciesId = (String) speciesRow.get("GENRE_ESP");
-// Species species;
-// if (speciesMap.containsKey(speciesId.toLowerCase())) {
-//
-// // already in cache (even if was a not found species)
-// species = speciesMap.get(speciesId.toLowerCase());
-// } else {
-//
-// // first time this species is requested
-// species = speciesDAO.findByBaracoudaCode(speciesId);
-//
-// if (species == null) {
-// missingSpecies.add(speciesId);
-// }
-// speciesMap.put(speciesId.toLowerCase(), species);
-// }
-//
-// Echotype echotype = dao.create(Echotype.PROPERTY_ID, id,
-// Echotype.PROPERTY_NAME, name
-// );
-//
-// echotype.setSpecies(species);
-// echotype.setMeaning(meaning);
-// echotype.setSpecies(species);
-// echotype.setEchotypeCategory(echotypeCategory);
-// echotype.setDepthStratum(depthStratum);
-//
-// echotypes.add(echotype);
-// }
-// }
-//
-// if (!missingDepthStratum.isEmpty()) {
-//
-// // there is some missing id in this table
-// List<String> missingDepthStratumList = Lists.newArrayList(missingDepthStratum);
-// Collections.sort(missingDepthStratumList);
-//
-// if (log.isWarnEnabled()) {
-// log.warn("There is " + missingDepthStratumList.size() + " missing depth stratum ids in table EIT_DESCRIPT_ECHOS : " + missingDepthStratumList);
-// }
-// }
-// if (!missingCategories.isEmpty()) {
-//
-// // there is some missing id in this table
-// List<String> missingCategoriesList = Lists.newArrayList(missingDepthStratum);
-// Collections.sort(missingCategoriesList);
-//
-// if (log.isWarnEnabled()) {
-// log.warn("There is " + missingCategories.size() + " missing echotypecategories ids in table EIT_DESCRIPT_ECHOS : " + missingCategoriesList);
-// }
-// }
-//
-// if (!missingSpecies.isEmpty()) {
-//
-// // there is some missing id in this table
-// List<String> missingSpeciesList = Lists.newArrayList(missingSpecies);
-// Collections.sort(missingSpeciesList);
-//
-// if (log.isWarnEnabled()) {
-// log.warn("There is " + missingSpeciesList.size() + " missing species baracouda codesids in table ESPECE_ECHOS : " + missingSpeciesList);
-// }
-// }
-//
-// if (log.isInfoEnabled()) {
-// log.info("Found " + echotypes.size() + " Echotype(s).");
-// }
-// }
-
@Override
protected EntityCsvModel<Echotype> createCsvImportModel(TableMeta meta) {
Added: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/GearLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/GearLoader.java (rev 0)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/GearLoader.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,72 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.meta.TableMeta;
+import fr.ifremer.echobase.entities.references.Gear;
+import fr.ifremer.echobase.services.models.CsvModelUtil;
+import fr.ifremer.echobase.services.models.EntityCsvModel;
+import fr.ifremer.echobase.tools.FileType;
+
+import java.util.Date;
+
+/**
+ * {@link Gear} loader.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class GearLoader extends EntityLoader<Gear> {
+
+ public GearLoader() {
+ super(Gear.class, FileType.NEW);
+ }
+
+ @Override
+ protected EntityCsvModel<Gear> createCsvImportModel(TableMeta meta) {
+
+ EntityCsvModel<Gear> model = EntityCsvModel.newModel(
+ getCsvSeparator(),
+ meta
+ );
+
+ /*
+ CasinoGearName;ValidSince;InvalidSince;IsFishingGear;gearLabel;GearName;Description;UpdateDate;GearClassification;ParentGear;Status;IsActive;IsTowed
+ */
+ model.newMandatoryColumn("CasinoGearName", Gear.PROPERTY_CASINO_GEAR_NAME);
+ model.newMandatoryColumn("ValidSince", Gear.PROPERTY_VALID_SINCE, CsvModelUtil.IMPORT_DAY);
+ model.newMandatoryColumn("InvalidSince", Gear.PROPERTY_INVALID_SINCE, CsvModelUtil.IMPORT_DAY);
+ model.newMandatoryColumn("IsFishingGear", Gear.PROPERTY_FISHING_GEAR, CsvModelUtil.INT_TO_BOOLEAN_PARSER);
+ model.newMandatoryColumn("gearLabel", Gear.PROPERTY_LABEL);
+ model.newMandatoryColumn("GearName", Gear.PROPERTY_NAME);
+ model.newMandatoryColumn("Description", Gear.PROPERTY_DESCRIPTION);
+ model.addDefaultColumn("UpdateDate", Gear.PROPERTY_UPDATE_DATE, Date.class);
+ model.addDefaultColumn("GearClassification", Gear.PROPERTY_GEAR_CLASSIFICATION, int.class);
+ model.addDefaultColumn("ParentGear", Gear.PROPERTY_PARENT_GEAR, int.class);
+ model.addDefaultColumn("Status", Gear.PROPERTY_STATUS, int.class);
+ model.newMandatoryColumn("IsActive", Gear.PROPERTY_ACTIVE, CsvModelUtil.INT_TO_BOOLEAN_PARSER);
+ model.newMandatoryColumn("IsTowed", Gear.PROPERTY_TOWED, CsvModelUtil.INT_TO_BOOLEAN_PARSER);
+ return model;
+ }
+}
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/GearLoader.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoader.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoader.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -55,7 +55,7 @@
model.newMandatoryColumn("sampleDataType", SampleDataType.PROPERTY_NAME);
model.newMandatoryColumn("sampleDataTypeMeaningFr",SampleDataType.PROPERTY_MEANING_FR);
model.newMandatoryColumn("Units",SampleDataType.PROPERTY_UNITS);
- model.newMandatoryColumn("Precision",SampleDataType.PROPERTY_UNITS);
+ model.newMandatoryColumn("Precision",SampleDataType.PROPERTY_PRECISION);
return model;
}
}
\ No newline at end of file
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AbstractLoaderIT.java (from rev 195, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AbstractLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AbstractLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AbstractLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,376 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+import com.healthmarketscience.jackcess.Database;
+import fr.ifremer.echobase.entities.EchoBaseEntityEnum;
+import fr.ifremer.echobase.entities.meta.AssociationMeta;
+import fr.ifremer.echobase.entities.meta.DbMeta;
+import fr.ifremer.echobase.entities.meta.MetaFilenameAware;
+import fr.ifremer.echobase.entities.meta.TableMeta;
+import fr.ifremer.echobase.services.CsvImportResult;
+import fr.ifremer.echobase.tools.AbstractToolTest;
+import fr.ifremer.echobase.tools.FileType;
+import fr.ifremer.echobase.tools.TestHelper;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.nuiton.topia.TopiaException;
+import org.nuiton.topia.persistence.TopiaDAO;
+import org.nuiton.topia.persistence.TopiaEntity;
+import org.nuiton.util.FileUtil;
+
+import java.io.File;
+import java.io.IOException;
+import java.text.ParseException;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * Abstract entity loader test.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public abstract class AbstractLoaderIT<E extends TopiaEntity, L extends EntityLoader<E>> extends AbstractToolTest {
+
+ /** Logger. */
+ private static final Log log =
+ LogFactory.getLog(AbstractLoaderIT.class);
+
+ protected static File msAccessFile;
+
+ protected File exportdir;
+
+ protected L loader;
+
+ private final Class<L> loaderType;
+
+ private Database db;
+
+ protected final long expectedNewEntities;
+
+ protected final long expectedBaracoudaEntities;
+
+ protected boolean loadDependencies = true;
+
+ protected List<EntityLoader<?>> entityLoaders;
+
+
+ @BeforeClass
+ public static void beforeClass() {
+
+ AbstractToolTest.beforeClass();
+
+ msAccessFile = FileUtil.getFileFromPaths(TestHelper.getBasedir(),
+ "src",
+ "test",
+ "private",
+ "baracouda.mdb"
+ );
+ if (!msAccessFile.exists()) {
+ if (log.isWarnEnabled()) {
+ log.warn("Could not find " + msAccessFile +
+ ", the test will be skip.");
+ }
+ }
+ Assume.assumeTrue(msAccessFile.exists());
+ }
+
+ @Before
+ public void setUp() throws Exception {
+
+ super.setUp();
+
+ exportdir = new File(testdir, "export");
+
+ // exportdir should not exist
+ Assert.assertFalse(exportdir.exists());
+
+ // creates it
+ FileUtil.createDirectoryIfNecessary(exportdir);
+
+ // get loader
+ loader = newService(loaderType);
+
+ if (loadDependencies) {
+ loadDependencies();
+ }
+ }
+
+ protected AbstractLoaderIT(Class<L> loaderType,
+ long expectedNewEntities,
+ long expectedBaracoudaEntities) {
+ this.loaderType = loaderType;
+ this.expectedNewEntities = expectedNewEntities;
+ this.expectedBaracoudaEntities = expectedBaracoudaEntities;
+ }
+
+ protected void generateNewEntities() throws Exception {
+ Assume.assumeTrue(loader.canGenerateNew());
+
+ File inFile = new File(testdir, "input-" + loader.getEntityType().name() + ".csv");
+ File outFile = getTableFile(FileType.NEW);
+ Assert.assertFalse(inFile.exists());
+ Assert.assertFalse(outFile.exists());
+
+ loader.copyStreamToFile(inFile, FileType.NEW);
+
+ // input file now exists
+ Assert.assertTrue(inFile.exists());
+
+ loader.generateNewEntities(inFile, exportdir, true);
+
+ long beforeCount = getDAO().count();
+
+ // no species in initial db
+ Assert.assertEquals(0, beforeCount);
+
+ importEntities(outFile, expectedNewEntities);
+ }
+
+ protected void generateBaracoudaEntities() throws Exception {
+
+ File outFile = getTableFile(FileType.BARACOUDA);
+ Assert.assertFalse(outFile.exists());
+
+ long beforeCount = getDAO().count();
+
+ // no species in initial db
+ Assert.assertEquals(0, beforeCount);
+
+ launchEntitiesFromBaracouda(loader, getDb(), exportdir);
+
+ importEntities(outFile, expectedBaracoudaEntities);
+ }
+
+ protected void launchEntitiesFromBaracouda(L loader,
+ Database db,
+ File exportdir) throws IOException, TopiaException, ParseException {
+ loader.generateBaracoudaEntities(db, exportdir, true);
+ }
+
+ protected void loadDependencies() throws IOException, TopiaException {
+ Set<MetaFilenameAware> dones = Sets.newHashSet();
+ loadDependencies(dones);
+ }
+
+ protected void loadDependencies(Set<MetaFilenameAware> dones) throws IOException, TopiaException {
+
+ for (EchoBaseEntityEnum dependency : loader.getDependencies()) {
+ loadDependencies(dependency, dones);
+ }
+ for (EchoBaseEntityEnum dependency : loader.getExtraDependencies()) {
+ loadDependencies(dependency, dones);
+ }
+ AssociationMeta parentAssociationMeta =
+ loader.getParentAssociationMeta();
+ if (parentAssociationMeta != null) {
+ loadDependencies(parentAssociationMeta.getSource(), dones);
+ }
+ }
+
+ protected void loadDependencies(EchoBaseEntityEnum dependency,
+ Set<MetaFilenameAware> dones) throws IOException, TopiaException {
+ DbMeta dbMeta = serviceContext.getDbMeta();
+ TableMeta meta = dbMeta.getTable(dependency);
+ loadDependencies(meta, dones);
+ }
+
+ private void loadDependencies(MetaFilenameAware meta,
+ Set<MetaFilenameAware> dones) throws IOException, TopiaException {
+
+
+ // mark it as load (to prevent reloading of it twice)
+ if (!dones.add(meta)) {
+
+ // was already loaded
+ if (log.isDebugEnabled()) {
+ log.debug("Skip already loaded type " + meta);
+ }
+ return;
+ }
+
+ EntityLoader<? extends TopiaEntity> entityLoader =
+ getEntityLoader(meta.getSource().getContract());
+
+ if (meta instanceof AssociationMeta) {
+
+ // import association
+
+ loadDependencies(meta.getSource(), dones);
+ loadDependencies(((AssociationMeta) meta).getTarget(), dones);
+ entityLoader.copyAndLoadEntities(exportdir, meta, true, FileType.ASSOCIATION);
+
+ } else {
+
+ // load dependencies before
+ for (EchoBaseEntityEnum dependency : entityLoader.getDependencies()) {
+ loadDependencies(dependency, dones);
+ }
+ // load extra dependencies before
+ for (EchoBaseEntityEnum dependency : entityLoader.getExtraDependencies()) {
+ loadDependencies(dependency, dones);
+ }
+
+ if (log.isDebugEnabled()) {
+ log.debug("Load for " + meta);
+ }
+
+ if (entityLoader.canGenerateNew()) {
+
+ // copy and load new stuff
+ entityLoader.copyAndLoadEntities(exportdir, meta, true, FileType.NEW);
+ }
+
+ if (entityLoader.canGenerateBaracouda()) {
+
+ // copy and load of baracouda stuff
+ entityLoader.copyAndLoadEntities(exportdir, meta, true, FileType.BARACOUDA);
+ }
+
+ // load associations
+ AssociationMeta parentAssociationMeta =
+ entityLoader.getParentAssociationMeta();
+ if (parentAssociationMeta != null) {
+ loadDependencies(parentAssociationMeta, dones);
+ }
+ }
+
+ }
+
+ private TopiaDAO<E> getDAO() throws TopiaException {
+ return getDao(loader.getEntityClass());
+ }
+
+ private File getTableFile(FileType fileType) throws IOException {
+
+ File outFile = loader.getTableFile(exportdir, loader.getMeta(), fileType);
+ return outFile;
+ }
+
+ protected void importEntities(File inFile,
+ long nbExpected) throws IOException, TopiaException {
+
+ TopiaDAO<E> dao = getDAO();
+
+ // input file now exists
+ Assert.assertTrue(inFile.exists());
+
+ long beforeCount = dao.count();
+
+ // no species in initial db
+ Assert.assertEquals(0, beforeCount);
+
+ if (log.isInfoEnabled()) {
+ log.info("Import " + inFile);
+ }
+ CsvImportResult csvImportResult = getService().importDatas(
+ loader.getEntityType(),
+ inFile.getAbsolutePath(),
+ inFile,
+ true,
+ null
+ );
+ Assert.assertNotNull(csvImportResult);
+
+ long afterCount = dao.count();
+
+ // nbExpected entities after import
+ Assert.assertEquals(nbExpected, afterCount);
+
+ // no entity updated
+ Assert.assertEquals(0, csvImportResult.getNumberUpdated());
+
+ // all entities created
+ Assert.assertEquals(afterCount, csvImportResult.getNumberCreated());
+ }
+
+ protected Database getDb() throws IOException {
+ if (db == null) {
+ db = Database.open(msAccessFile);
+ }
+ return db;
+ }
+
+ public <E extends TopiaEntity> EntityLoader<E> getEntityLoader(Class<E> entityClass) {
+ EntityLoader<E> result = null;
+ for (EntityLoader<?> entityLoader : getEntityLoaders()) {
+ if (entityClass.equals(entityLoader.getEntityType().getContract())) {
+ result = (EntityLoader<E>) entityLoader;
+ break;
+ }
+ }
+ Preconditions.checkNotNull(result, "Could not find EntityLoader for " +
+ entityClass.getName());
+ return result;
+ }
+
+ public List<EntityLoader<?>> getEntityLoaders() {
+ if (entityLoaders == null) {
+ entityLoaders = Lists.newArrayList();
+ entityLoaders.add(newService(SpeciesLoader.class));
+ entityLoaders.add(newService(MissionLoader.class));
+ entityLoaders.add(newService(AreaOfOperationLoader.class));
+ entityLoaders.add(newService(AcousticInstrumentLoader.class));
+ entityLoaders.add(newService(DepthStratumLoader.class));
+ entityLoaders.add(newService(DataQualityLoader.class));
+ entityLoaders.add(newService(ReferenceDatumTypeLoader.class));
+ entityLoaders.add(newService(ReferenceDatumLoader.class));
+ entityLoaders.add(newService(DataTypeLoader.class));
+ entityLoaders.add(newService(CellTypeLoader.class));
+ entityLoaders.add(newService(CellMethodLoader.class));
+ entityLoaders.add(newService(DataMetadataLoader.class));
+ entityLoaders.add(newService(TSParametersLoader.class));
+ entityLoaders.add(newService(StrataLoader.class));
+ entityLoaders.add(newService(EchotypeCategoryLoader.class));
+ entityLoaders.add(newService(EchotypeLoader.class));
+ entityLoaders.add(newService(VesselTypeLoader.class));
+ entityLoaders.add(newService(VesselLoader.class));
+ entityLoaders.add(newService(OperationEventLoader.class));
+ entityLoaders.add(newService(SampleDataTypeLoader.class));
+ entityLoaders.add(newService(SampleTypeLoader.class));
+ entityLoaders.add(newService(BiometryScaleLoader.class));
+ entityLoaders.add(newService(SexCategoryLoader.class));
+ entityLoaders.add(newService(SizeCategoryLoader.class));
+ entityLoaders.add(newService(OperationMetadataLoader.class));
+ entityLoaders.add(newService(GearMetadataLoader.class));
+
+ entityLoaders.add(newService(VoyageLoader.class));
+ entityLoaders.add(newService(TransitLoader.class));
+ entityLoaders.add(newService(TransectLoader.class));
+ entityLoaders.add(newService(DataAcquisitionLoader.class));
+ entityLoaders.add(newService(DataProcessingLoader.class));
+ entityLoaders.add(newService(CellLoader.class));
+ }
+ return entityLoaders;
+ }
+
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AbstractLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AbstractLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AbstractLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AbstractLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,376 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import com.google.common.base.Preconditions;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
-import com.healthmarketscience.jackcess.Database;
-import fr.ifremer.echobase.entities.EchoBaseEntityEnum;
-import fr.ifremer.echobase.entities.meta.AssociationMeta;
-import fr.ifremer.echobase.entities.meta.DbMeta;
-import fr.ifremer.echobase.entities.meta.MetaFilenameAware;
-import fr.ifremer.echobase.entities.meta.TableMeta;
-import fr.ifremer.echobase.services.CsvImportResult;
-import fr.ifremer.echobase.tools.AbstractToolTest;
-import fr.ifremer.echobase.tools.FileType;
-import fr.ifremer.echobase.tools.TestHelper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.junit.Assert;
-import org.junit.Assume;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.nuiton.topia.TopiaException;
-import org.nuiton.topia.persistence.TopiaDAO;
-import org.nuiton.topia.persistence.TopiaEntity;
-import org.nuiton.util.FileUtil;
-
-import java.io.File;
-import java.io.IOException;
-import java.text.ParseException;
-import java.util.List;
-import java.util.Set;
-
-/**
- * Abstract entity loader test.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public abstract class AbstractLoaderTest<E extends TopiaEntity, L extends EntityLoader<E>> extends AbstractToolTest {
-
- /** Logger. */
- private static final Log log =
- LogFactory.getLog(AbstractLoaderTest.class);
-
- protected static File msAccessFile;
-
- protected File exportdir;
-
- protected L loader;
-
- private final Class<L> loaderType;
-
- private Database db;
-
- protected final long expectedNewEntities;
-
- protected final long expectedBaracoudaEntities;
-
- protected boolean loadDependencies = true;
-
- protected List<EntityLoader<?>> entityLoaders;
-
-
- @BeforeClass
- public static void beforeClass() {
-
- AbstractToolTest.beforeClass();
-
- msAccessFile = FileUtil.getFileFromPaths(TestHelper.getBasedir(),
- "src",
- "test",
- "private",
- "baracouda.mdb"
- );
- if (!msAccessFile.exists()) {
- if (log.isWarnEnabled()) {
- log.warn("Could not find " + msAccessFile +
- ", the test will be skip.");
- }
- }
- Assume.assumeTrue(msAccessFile.exists());
- }
-
- @Before
- public void setUp() throws Exception {
-
- super.setUp();
-
- exportdir = new File(testdir, "export");
-
- // exportdir should not exist
- Assert.assertFalse(exportdir.exists());
-
- // creates it
- FileUtil.createDirectoryIfNecessary(exportdir);
-
- // get loader
- loader = newService(loaderType);
-
- if (loadDependencies) {
- loadDependencies();
- }
- }
-
- protected AbstractLoaderTest(Class<L> loaderType,
- long expectedNewEntities,
- long expectedBaracoudaEntities) {
- this.loaderType = loaderType;
- this.expectedNewEntities = expectedNewEntities;
- this.expectedBaracoudaEntities = expectedBaracoudaEntities;
- }
-
- protected void generateNewEntities() throws Exception {
- Assume.assumeTrue(loader.canGenerateNew());
-
- File inFile = new File(testdir, "input-" + loader.getEntityType().name() + ".csv");
- File outFile = getTableFile(FileType.NEW);
- Assert.assertFalse(inFile.exists());
- Assert.assertFalse(outFile.exists());
-
- loader.copyStreamToFile(inFile, FileType.NEW);
-
- // input file now exists
- Assert.assertTrue(inFile.exists());
-
- loader.generateNewEntities(inFile, exportdir, true);
-
- long beforeCount = getDAO().count();
-
- // no species in initial db
- Assert.assertEquals(0, beforeCount);
-
- importEntities(outFile, expectedNewEntities);
- }
-
- protected void generateBaracoudaEntities() throws Exception {
-
- File outFile = getTableFile(FileType.BARACOUDA);
- Assert.assertFalse(outFile.exists());
-
- long beforeCount = getDAO().count();
-
- // no species in initial db
- Assert.assertEquals(0, beforeCount);
-
- launchEntitiesFromBaracouda(loader, getDb(), exportdir);
-
- importEntities(outFile, expectedBaracoudaEntities);
- }
-
- protected void launchEntitiesFromBaracouda(L loader,
- Database db,
- File exportdir) throws IOException, TopiaException, ParseException {
- loader.generateBaracoudaEntities(db, exportdir, true);
- }
-
- protected void loadDependencies() throws IOException, TopiaException {
- Set<MetaFilenameAware> dones = Sets.newHashSet();
- loadDependencies(dones);
- }
-
- protected void loadDependencies(Set<MetaFilenameAware> dones) throws IOException, TopiaException {
-
- for (EchoBaseEntityEnum dependency : loader.getDependencies()) {
- loadDependencies(dependency, dones);
- }
- for (EchoBaseEntityEnum dependency : loader.getExtraDependencies()) {
- loadDependencies(dependency, dones);
- }
- AssociationMeta parentAssociationMeta =
- loader.getParentAssociationMeta();
- if (parentAssociationMeta != null) {
- loadDependencies(parentAssociationMeta.getSource(), dones);
- }
- }
-
- protected void loadDependencies(EchoBaseEntityEnum dependency,
- Set<MetaFilenameAware> dones) throws IOException, TopiaException {
- DbMeta dbMeta = serviceContext.getDbMeta();
- TableMeta meta = dbMeta.getTable(dependency);
- loadDependencies(meta, dones);
- }
-
- private void loadDependencies(MetaFilenameAware meta,
- Set<MetaFilenameAware> dones) throws IOException, TopiaException {
-
-
- // mark it as load (to prevent reloading of it twice)
- if (!dones.add(meta)) {
-
- // was already loaded
- if (log.isDebugEnabled()) {
- log.debug("Skip already loaded type " + meta);
- }
- return;
- }
-
- EntityLoader<? extends TopiaEntity> entityLoader =
- getEntityLoader(meta.getSource().getContract());
-
- if (meta instanceof AssociationMeta) {
-
- // import association
-
- loadDependencies(meta.getSource(), dones);
- loadDependencies(((AssociationMeta) meta).getTarget(), dones);
- entityLoader.copyAndLoadEntities(exportdir, meta, true, FileType.ASSOCIATION);
-
- } else {
-
- // load dependencies before
- for (EchoBaseEntityEnum dependency : entityLoader.getDependencies()) {
- loadDependencies(dependency, dones);
- }
- // load extra dependencies before
- for (EchoBaseEntityEnum dependency : entityLoader.getExtraDependencies()) {
- loadDependencies(dependency, dones);
- }
-
- if (log.isDebugEnabled()) {
- log.debug("Load for " + meta);
- }
-
- if (entityLoader.canGenerateNew()) {
-
- // copy and load new stuff
- entityLoader.copyAndLoadEntities(exportdir, meta, true, FileType.NEW);
- }
-
- if (entityLoader.canGenerateBaracouda()) {
-
- // copy and load of baracouda stuff
- entityLoader.copyAndLoadEntities(exportdir, meta, true, FileType.BARACOUDA);
- }
-
- // load associations
- AssociationMeta parentAssociationMeta =
- entityLoader.getParentAssociationMeta();
- if (parentAssociationMeta != null) {
- loadDependencies(parentAssociationMeta, dones);
- }
- }
-
- }
-
- private TopiaDAO<E> getDAO() throws TopiaException {
- return getDao(loader.getEntityClass());
- }
-
- private File getTableFile(FileType fileType) throws IOException {
-
- File outFile = loader.getTableFile(exportdir, loader.getMeta(), fileType);
- return outFile;
- }
-
- protected void importEntities(File inFile,
- long nbExpected) throws IOException, TopiaException {
-
- TopiaDAO<E> dao = getDAO();
-
- // input file now exists
- Assert.assertTrue(inFile.exists());
-
- long beforeCount = dao.count();
-
- // no species in initial db
- Assert.assertEquals(0, beforeCount);
-
- if (log.isInfoEnabled()) {
- log.info("Import " + inFile);
- }
- CsvImportResult csvImportResult = getService().importDatas(
- loader.getEntityType(),
- inFile.getAbsolutePath(),
- inFile,
- true,
- null
- );
- Assert.assertNotNull(csvImportResult);
-
- long afterCount = dao.count();
-
- // nbExpected entities after import
- Assert.assertEquals(nbExpected, afterCount);
-
- // no entity updated
- Assert.assertEquals(0, csvImportResult.getNumberUpdated());
-
- // all entities created
- Assert.assertEquals(afterCount, csvImportResult.getNumberCreated());
- }
-
- protected Database getDb() throws IOException {
- if (db == null) {
- db = Database.open(msAccessFile);
- }
- return db;
- }
-
- public <E extends TopiaEntity> EntityLoader<E> getEntityLoader(Class<E> entityClass) {
- EntityLoader<E> result = null;
- for (EntityLoader<?> entityLoader : getEntityLoaders()) {
- if (entityClass.equals(entityLoader.getEntityType().getContract())) {
- result = (EntityLoader<E>) entityLoader;
- break;
- }
- }
- Preconditions.checkNotNull(result, "Could not find EntityLoader for " +
- entityClass.getName());
- return result;
- }
-
- public List<EntityLoader<?>> getEntityLoaders() {
- if (entityLoaders == null) {
- entityLoaders = Lists.newArrayList();
- entityLoaders.add(newService(SpeciesLoader.class));
- entityLoaders.add(newService(MissionLoader.class));
- entityLoaders.add(newService(AreaOfOperationLoader.class));
- entityLoaders.add(newService(AcousticInstrumentLoader.class));
- entityLoaders.add(newService(DepthStratumLoader.class));
- entityLoaders.add(newService(DataQualityLoader.class));
- entityLoaders.add(newService(ReferenceDatumTypeLoader.class));
- entityLoaders.add(newService(ReferenceDatumLoader.class));
- entityLoaders.add(newService(DataTypeLoader.class));
- entityLoaders.add(newService(CellTypeLoader.class));
- entityLoaders.add(newService(CellMethodLoader.class));
- entityLoaders.add(newService(DataMetadataLoader.class));
- entityLoaders.add(newService(TSParametersLoader.class));
- entityLoaders.add(newService(StrataLoader.class));
- entityLoaders.add(newService(EchotypeCategoryLoader.class));
- entityLoaders.add(newService(EchotypeLoader.class));
- entityLoaders.add(newService(VesselTypeLoader.class));
- entityLoaders.add(newService(VesselLoader.class));
- entityLoaders.add(newService(OperationEventLoader.class));
- entityLoaders.add(newService(SampleDataTypeLoader.class));
- entityLoaders.add(newService(SampleTypeLoader.class));
- entityLoaders.add(newService(BiometryScaleLoader.class));
- entityLoaders.add(newService(SexCategoryLoader.class));
- entityLoaders.add(newService(SizeCategoryLoader.class));
- entityLoaders.add(newService(OperationMetadataLoader.class));
- entityLoaders.add(newService(GearMetadataLoader.class));
-
- entityLoaders.add(newService(VoyageLoader.class));
- entityLoaders.add(newService(TransitLoader.class));
- entityLoaders.add(newService(TransectLoader.class));
- entityLoaders.add(newService(DataAcquisitionLoader.class));
- entityLoaders.add(newService(DataProcessingLoader.class));
- entityLoaders.add(newService(CellLoader.class));
- }
- return entityLoaders;
- }
-
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AcousticInstrumentLoaderIT.java (from rev 194, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AcousticInstrumentLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AcousticInstrumentLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AcousticInstrumentLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,46 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.AcousticInstrument;
+import org.junit.Test;
+
+/**
+ * To test the {@link AcousticInstrumentLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class AcousticInstrumentLoaderIT extends AbstractLoaderIT<AcousticInstrument, AcousticInstrumentLoader> {
+
+ public AcousticInstrumentLoaderIT() {
+ super(AcousticInstrumentLoader.class, 0, 20);
+ }
+
+ @Test
+ public void testGenerateEntitiesFromBaracouda() throws Exception {
+ generateBaracoudaEntities();
+ }
+
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AcousticInstrumentLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AcousticInstrumentLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AcousticInstrumentLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AcousticInstrumentLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,46 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.AcousticInstrument;
-import org.junit.Test;
-
-/**
- * To test the {@link AcousticInstrumentLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class AcousticInstrumentLoaderTest extends AbstractLoaderTest<AcousticInstrument, AcousticInstrumentLoader> {
-
- public AcousticInstrumentLoaderTest() {
- super(AcousticInstrumentLoader.class, 0, 20);
- }
-
- @Test
- public void testGenerateEntitiesFromBaracouda() throws Exception {
- generateBaracoudaEntities();
- }
-
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AreaOfOperationLoaderIT.java (from rev 194, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AreaOfOperationLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AreaOfOperationLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AreaOfOperationLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,46 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.AreaOfOperation;
+import org.junit.Test;
+
+/**
+ * To test the {@link AreaOfOperationLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class AreaOfOperationLoaderIT extends AbstractLoaderIT<AreaOfOperation, AreaOfOperationLoader> {
+
+ public AreaOfOperationLoaderIT() {
+ super(AreaOfOperationLoader.class, 0, 5);
+ }
+
+ @Test
+ public void testGenerateEntitiesFromBaracouda() throws Exception {
+ generateBaracoudaEntities();
+ }
+
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AreaOfOperationLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AreaOfOperationLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AreaOfOperationLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AreaOfOperationLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,46 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.AreaOfOperation;
-import org.junit.Test;
-
-/**
- * To test the {@link AreaOfOperationLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class AreaOfOperationLoaderTest extends AbstractLoaderTest<AreaOfOperation, AreaOfOperationLoader> {
-
- public AreaOfOperationLoaderTest() {
- super(AreaOfOperationLoader.class, 0, 5);
- }
-
- @Test
- public void testGenerateEntitiesFromBaracouda() throws Exception {
- generateBaracoudaEntities();
- }
-
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/BiometryScaleLoaderIT.java (from rev 195, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/BiometryScaleLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/BiometryScaleLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/BiometryScaleLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,45 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.BiometryScale;
+import org.junit.Test;
+
+/**
+ * To test the {@link BiometryScaleLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class BiometryScaleLoaderIT extends AbstractLoaderIT<BiometryScale, BiometryScaleLoader> {
+
+ public BiometryScaleLoaderIT() {
+ super(BiometryScaleLoader.class, 44, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/BiometryScaleLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/BiometryScaleLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/BiometryScaleLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/BiometryScaleLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,45 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.BiometryScale;
-import org.junit.Test;
-
-/**
- * To test the {@link BiometryScaleLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class BiometryScaleLoaderTest extends AbstractLoaderTest<BiometryScale, BiometryScaleLoader> {
-
- public BiometryScaleLoaderTest() {
- super(BiometryScaleLoader.class, 44, 0);
- }
-
- @Test
- public void testGenerateNewEntities() throws Exception {
- generateNewEntities();
- }
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellLoaderIT.java (from rev 196, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,233 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import com.google.common.base.Function;
+import com.google.common.collect.Collections2;
+import com.google.common.collect.Lists;
+import com.healthmarketscience.jackcess.Database;
+import fr.ifremer.echobase.EchoBaseIOUtil;
+import fr.ifremer.echobase.entities.EchoBaseEntityEnum;
+import fr.ifremer.echobase.entities.data.Cell;
+import fr.ifremer.echobase.entities.data.DataProcessing;
+import fr.ifremer.echobase.entities.meta.AssociationMeta;
+import fr.ifremer.echobase.entities.meta.MetaFilenameAware;
+import fr.ifremer.echobase.entities.meta.TableMeta;
+import fr.ifremer.echobase.services.DbEditorService;
+import fr.ifremer.echobase.tools.FileType;
+import fr.ifremer.echobase.tools.TestHelper;
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.junit.AfterClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.nuiton.topia.TopiaException;
+
+import java.io.File;
+import java.io.IOException;
+import java.text.ParseException;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * To test {@link CellLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+(a)RunWith(Parameterized.class)
+public class CellLoaderIT extends AbstractLoaderIT<Cell, CellLoader> {
+
+ /** Logger. */
+ private static final Log log =
+ LogFactory.getLog(CellLoaderIT.class);
+
+ /** Id of data processing to treat. */
+ private String dataProcessingId;
+
+ @Parameterized.Parameters
+ public static List<Object[]> data() {
+ return Arrays.asList(new Object[][]{
+ {"EIT_00_38", 0},
+ {"EIT_01_38", 0},
+ {"EIT_02_38", 0},
+ {"EIT_03_38", 0},
+ {"EIT_0310_38", 0},
+ {"EIT_04_38", 0},
+ {"EIT_05_38", 0},
+ {"EIT_0510_38", 0}, // with no region
+ {"EIT_06_38", 0},
+ {"EIT_07_38", 0},
+ {"EIT_08_38", 0},
+ {"EIT_09_38", 0},
+ {"EIT_10_38", 0},
+ {"EIT_83A_38", 0}, // with no region
+ {"EIT_83B_38", 0}, // with no region
+ {"EIT_84_38", 0}, // with no region
+ {"EIT_85_38", 0}, // with no region
+ {"EIT_86_38", 0}, // with no region
+ {"EIT_87_38", 0}, // with no region
+ {"EIT_89A_38", 0}, // with no region
+ {"EIT_89B_38", 0}, // with no region
+ {"EIT_90_38", 0}, // with no region
+ {"EIT_91_38", 0}, // with no region
+ {"EIT_92_38", 0}, // with no region
+ {"EIT_93_38", 0}, // with no region
+ {"EIT_94_38", 0}, // with no region
+ {"EIT_97_38", 0}, // with no region
+ {"EIT_98b_38", 0},
+ });
+ }
+
+ static boolean cacheLoaded;
+
+ static List<File> directoriesToMerge = Lists.newLinkedList();
+
+ @Override
+ public void setUp() throws Exception {
+
+ super.setUp();
+
+ if (!cacheLoaded) {
+
+ // load caches once for all
+
+ loader.loadCache(getDb());
+
+ cacheLoaded = true;
+ }
+ }
+
+ static CellLoader lastLoader;
+
+ @Override
+ public void tearDown() throws Exception {
+ lastLoader = loader;
+ super.tearDown();
+
+ if (log.isInfoEnabled()) {
+ log.info("TimeLogs : " + DbEditorService.timeLog.getCallCount());
+ }
+ }
+
+ @AfterClass
+ public static void afterClass() throws Exception {
+
+ // merge all results
+ if (CollectionUtils.isNotEmpty(directoriesToMerge)) {
+
+ // let's merge all result
+ File dir = TestHelper.getTestBasedir(CellLoaderIT.class);
+
+ TableMeta cellMeta = lastLoader.getMeta();
+ TableMeta dataMeta = lastLoader.getTable(EchoBaseEntityEnum.Data);
+ TableMeta dataProcessingMeta = lastLoader.getTable(EchoBaseEntityEnum.DataProcessing);
+ AssociationMeta dataProcessingToCellMetaAssociation = dataProcessingMeta.getAssociations(DataProcessing.PROPERTY_CELL);
+ AssociationMeta cellToCellMetaAssociation = cellMeta.getAssociations(Cell.PROPERTY_CHILDS);
+ AssociationMeta cellToDataMetaAssociation = cellMeta.getAssociations(Cell.PROPERTY_DATA);
+
+ ToFileFromMeta toCellFile = new ToFileFromMeta(lastLoader, cellMeta);
+ ToFileFromMeta toDataFile = new ToFileFromMeta(lastLoader, dataMeta);
+ ToFileFromMeta toDataProcessingToCellFile = new ToFileFromMeta(lastLoader, dataProcessingToCellMetaAssociation);
+ ToFileFromMeta toCellToCellFile = new ToFileFromMeta(lastLoader, cellToCellMetaAssociation);
+ ToFileFromMeta toCellToDataFile = new ToFileFromMeta(lastLoader, cellToDataMetaAssociation);
+
+ if (log.isInfoEnabled()) {
+ log.info("Will merge " + directoriesToMerge.size() + " data processing data into " + dir);
+ }
+
+ mergeFile(dir, toCellFile);
+ mergeFile(dir, toDataFile);
+ mergeFile(dir, toDataProcessingToCellFile);
+ mergeFile(dir, toCellToCellFile);
+ mergeFile(dir, toCellToDataFile);
+ }
+ }
+
+ protected static void mergeFile(File dir, ToFileFromMeta function) throws Exception {
+
+ File mergedFile = function.apply(dir);
+ if (log.isInfoEnabled()) {
+ log.info("Will merge to " + mergedFile.getName());
+ }
+
+ Collection<File> files = Collections2.transform(directoriesToMerge, function);
+
+ EchoBaseIOUtil.copyFile(mergedFile, files);
+ }
+
+ public CellLoaderIT(String dataProcessingId, int exceptedDataCount) {
+ super(CellLoader.class, 0, exceptedDataCount);
+ this.dataProcessingId = dataProcessingId;
+ }
+
+ @Test
+ public void generateEntitiesFromBaracouda() throws Exception {
+ generateBaracoudaEntities();
+ }
+
+ @Override
+ protected void launchEntitiesFromBaracouda(CellLoader loader,
+ Database db,
+ File exportdir) throws IOException, TopiaException, ParseException {
+
+ if (log.isInfoEnabled()) {
+ log.info("Export to " + exportdir);
+ }
+ directoriesToMerge.add(exportdir);
+ loader.generateEntitiesFromBaracouda(db, exportdir, dataProcessingId, true);
+ }
+
+ @Override
+ protected void importEntities(File inFile,
+ long nbExpected) throws IOException, TopiaException {
+ // do not use it
+ }
+
+ private static class ToFileFromMeta implements Function<File, File> {
+
+ private MetaFilenameAware meta;
+ private FileType fileType;
+ private CellLoader loader;
+
+ public ToFileFromMeta(CellLoader loader, MetaFilenameAware meta) {
+ this.meta = meta;
+ this.loader = loader;
+ fileType = meta instanceof AssociationMeta ? FileType.ASSOCIATION : FileType.BARACOUDA;
+ }
+
+ @Override
+ public File apply(File input) {
+
+ try {
+ return loader.getTableFile(input, meta, fileType);
+ } catch (IOException e) {
+ throw new IllegalStateException("Could not obtain table file", e);
+ }
+ }
+ }
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,233 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import com.google.common.base.Function;
-import com.google.common.collect.Collections2;
-import com.google.common.collect.Lists;
-import com.healthmarketscience.jackcess.Database;
-import fr.ifremer.echobase.EchoBaseIOUtil;
-import fr.ifremer.echobase.entities.EchoBaseEntityEnum;
-import fr.ifremer.echobase.entities.data.Cell;
-import fr.ifremer.echobase.entities.data.DataProcessing;
-import fr.ifremer.echobase.entities.meta.AssociationMeta;
-import fr.ifremer.echobase.entities.meta.MetaFilenameAware;
-import fr.ifremer.echobase.entities.meta.TableMeta;
-import fr.ifremer.echobase.services.DbEditorService;
-import fr.ifremer.echobase.tools.FileType;
-import fr.ifremer.echobase.tools.TestHelper;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.junit.AfterClass;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.nuiton.topia.TopiaException;
-
-import java.io.File;
-import java.io.IOException;
-import java.text.ParseException;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.List;
-
-/**
- * To test {@link CellLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-(a)RunWith(Parameterized.class)
-public class CellLoaderTest extends AbstractLoaderTest<Cell, CellLoader> {
-
- /** Logger. */
- private static final Log log =
- LogFactory.getLog(CellLoaderTest.class);
-
- /** Id of data processing to treat. */
- private String dataProcessingId;
-
- @Parameterized.Parameters
- public static List<Object[]> data() {
- return Arrays.asList(new Object[][]{
- {"EIT_00_38", 0},
- {"EIT_01_38", 0},
- {"EIT_02_38", 0},
- {"EIT_03_38", 0},
- {"EIT_0310_38", 0},
- {"EIT_04_38", 0},
- {"EIT_05_38", 0},
- {"EIT_0510_38", 0}, // with no region
- {"EIT_06_38", 0},
- {"EIT_07_38", 0},
- {"EIT_08_38", 0},
- {"EIT_09_38", 0},
- {"EIT_10_38", 0},
- {"EIT_83A_38", 0}, // with no region
- {"EIT_83B_38", 0}, // with no region
- {"EIT_84_38", 0}, // with no region
- {"EIT_85_38", 0}, // with no region
- {"EIT_86_38", 0}, // with no region
- {"EIT_87_38", 0}, // with no region
- {"EIT_89A_38", 0}, // with no region
- {"EIT_89B_38", 0}, // with no region
- {"EIT_90_38", 0}, // with no region
- {"EIT_91_38", 0}, // with no region
- {"EIT_92_38", 0}, // with no region
- {"EIT_93_38", 0}, // with no region
- {"EIT_94_38", 0}, // with no region
- {"EIT_97_38", 0}, // with no region
- {"EIT_98b_38", 0},
- });
- }
-
- static boolean cacheLoaded;
-
- static List<File> directoriesToMerge = Lists.newLinkedList();
-
- @Override
- public void setUp() throws Exception {
-
- super.setUp();
-
- if (!cacheLoaded) {
-
- // load caches once for all
-
- loader.loadCache(getDb());
-
- cacheLoaded = true;
- }
- }
-
- static CellLoader lastLoader;
-
- @Override
- public void tearDown() throws Exception {
- lastLoader = loader;
- super.tearDown();
-
- if (log.isInfoEnabled()) {
- log.info("TimeLogs : " + DbEditorService.timeLog.getCallCount());
- }
- }
-
- @AfterClass
- public static void afterClass() throws Exception {
-
- // merge all results
- if (CollectionUtils.isNotEmpty(directoriesToMerge)) {
-
- // let's merge all result
- File dir = TestHelper.getTestBasedir(CellLoaderTest.class);
-
- TableMeta cellMeta = lastLoader.getMeta();
- TableMeta dataMeta = lastLoader.getTable(EchoBaseEntityEnum.Data);
- TableMeta dataProcessingMeta = lastLoader.getTable(EchoBaseEntityEnum.DataProcessing);
- AssociationMeta dataProcessingToCellMetaAssociation = dataProcessingMeta.getAssociations(DataProcessing.PROPERTY_CELL);
- AssociationMeta cellToCellMetaAssociation = cellMeta.getAssociations(Cell.PROPERTY_CHILDS);
- AssociationMeta cellToDataMetaAssociation = cellMeta.getAssociations(Cell.PROPERTY_DATA);
-
- ToFileFromMeta toCellFile = new ToFileFromMeta(lastLoader, cellMeta);
- ToFileFromMeta toDataFile = new ToFileFromMeta(lastLoader, dataMeta);
- ToFileFromMeta toDataProcessingToCellFile = new ToFileFromMeta(lastLoader, dataProcessingToCellMetaAssociation);
- ToFileFromMeta toCellToCellFile = new ToFileFromMeta(lastLoader, cellToCellMetaAssociation);
- ToFileFromMeta toCellToDataFile = new ToFileFromMeta(lastLoader, cellToDataMetaAssociation);
-
- if (log.isInfoEnabled()) {
- log.info("Will merge " + directoriesToMerge.size() + " data processing data into " + dir);
- }
-
- mergeFile(dir, toCellFile);
- mergeFile(dir, toDataFile);
- mergeFile(dir, toDataProcessingToCellFile);
- mergeFile(dir, toCellToCellFile);
- mergeFile(dir, toCellToDataFile);
- }
- }
-
- protected static void mergeFile(File dir, ToFileFromMeta function) throws Exception {
-
- File mergedFile = function.apply(dir);
- if (log.isInfoEnabled()) {
- log.info("Will merge to " + mergedFile.getName());
- }
-
- Collection<File> files = Collections2.transform(directoriesToMerge, function);
-
- EchoBaseIOUtil.copyFile(mergedFile, files);
- }
-
- public CellLoaderTest(String dataProcessingId, int exceptedDataCount) {
- super(CellLoader.class, 0, exceptedDataCount);
- this.dataProcessingId = dataProcessingId;
- }
-
- @Test
- public void generateEntitiesFromBaracouda() throws Exception {
- generateBaracoudaEntities();
- }
-
- @Override
- protected void launchEntitiesFromBaracouda(CellLoader loader,
- Database db,
- File exportdir) throws IOException, TopiaException, ParseException {
-
- if (log.isInfoEnabled()) {
- log.info("Export to " + exportdir);
- }
- directoriesToMerge.add(exportdir);
- loader.generateEntitiesFromBaracouda(db, exportdir, dataProcessingId, true);
- }
-
- @Override
- protected void importEntities(File inFile,
- long nbExpected) throws IOException, TopiaException {
- // do not use it
- }
-
- private static class ToFileFromMeta implements Function<File, File> {
-
- private MetaFilenameAware meta;
- private FileType fileType;
- private CellLoader loader;
-
- public ToFileFromMeta(CellLoader loader, MetaFilenameAware meta) {
- this.meta = meta;
- this.loader = loader;
- fileType = meta instanceof AssociationMeta ? FileType.ASSOCIATION : FileType.BARACOUDA;
- }
-
- @Override
- public File apply(File input) {
-
- try {
- return loader.getTableFile(input, meta, fileType);
- } catch (IOException e) {
- throw new IllegalStateException("Could not obtain table file", e);
- }
- }
- }
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellMethodLoaderIT.java (from rev 194, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellMethodLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellMethodLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellMethodLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,46 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.CellMethod;
+import org.junit.Test;
+
+/**
+ * To test the {@link CellMethodLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class CellMethodLoaderIT extends AbstractLoaderIT<CellMethod, CellMethodLoader> {
+
+ public CellMethodLoaderIT() {
+ super(CellMethodLoader.class, 6, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellMethodLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellMethodLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellMethodLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellMethodLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,46 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.CellMethod;
-import org.junit.Test;
-
-/**
- * To test the {@link CellMethodLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class CellMethodLoaderTest extends AbstractLoaderTest<CellMethod, CellMethodLoader> {
-
- public CellMethodLoaderTest() {
- super(CellMethodLoader.class, 6, 0);
- }
-
- @Test
- public void testGenerateNewEntities() throws Exception {
- generateNewEntities();
- }
-
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellTypeLoaderIT.java (from rev 194, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellTypeLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellTypeLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellTypeLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,46 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.CellType;
+import org.junit.Test;
+
+/**
+ * To test the {@link CellTypeLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class CellTypeLoaderIT extends AbstractLoaderIT<CellType, CellTypeLoader> {
+
+ public CellTypeLoaderIT() {
+ super(CellTypeLoader.class, 6, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellTypeLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellTypeLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellTypeLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellTypeLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,46 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.CellType;
-import org.junit.Test;
-
-/**
- * To test the {@link CellTypeLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class CellTypeLoaderTest extends AbstractLoaderTest<CellType, CellTypeLoader> {
-
- public CellTypeLoaderTest() {
- super(CellTypeLoader.class, 6, 0);
- }
-
- @Test
- public void testGenerateNewEntities() throws Exception {
- generateNewEntities();
- }
-
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataAcquisitionLoaderIT.java (from rev 194, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataAcquisitionLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataAcquisitionLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataAcquisitionLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,46 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.data.DataAcquisition;
+import org.junit.Test;
+
+/**
+ * To test {@link DataAcquisitionLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class DataAcquisitionLoaderIT extends AbstractLoaderIT<DataAcquisition, DataAcquisitionLoader> {
+
+ public DataAcquisitionLoaderIT() {
+ super(DataAcquisitionLoader.class, 0, 28);
+ }
+
+ @Test
+ public void testGenerateEntitiesFromBaracouda() throws Exception {
+ generateBaracoudaEntities();
+ }
+
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataAcquisitionLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataAcquisitionLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataAcquisitionLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataAcquisitionLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,46 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.data.DataAcquisition;
-import org.junit.Test;
-
-/**
- * To test {@link DataAcquisitionLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class DataAcquisitionLoaderTest extends AbstractLoaderTest<DataAcquisition, DataAcquisitionLoader> {
-
- public DataAcquisitionLoaderTest() {
- super(DataAcquisitionLoader.class, 0, 28);
- }
-
- @Test
- public void testGenerateEntitiesFromBaracouda() throws Exception {
- generateBaracoudaEntities();
- }
-
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataMetadataLoaderIT.java (from rev 194, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataMetadataLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataMetadataLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataMetadataLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,51 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.DataMetadata;
+import org.junit.Test;
+
+/**
+ * To test the {@link ReferenceDatumTypeLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class DataMetadataLoaderIT extends AbstractLoaderIT<DataMetadata, DataMetadataLoader> {
+
+ public DataMetadataLoaderIT() {
+ super(DataMetadataLoader.class, 34, 28);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+
+ @Test
+ public void testGenerateEntitiesFromBaracouda() throws Exception {
+ generateBaracoudaEntities();
+ }
+
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataMetadataLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataMetadataLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataMetadataLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataMetadataLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,51 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.DataMetadata;
-import org.junit.Test;
-
-/**
- * To test the {@link ReferenceDatumTypeLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class DataMetadataLoaderTest extends AbstractLoaderTest<DataMetadata, DataMetadataLoader> {
-
- public DataMetadataLoaderTest() {
- super(DataMetadataLoader.class, 34, 28);
- }
-
- @Test
- public void testGenerateNewEntities() throws Exception {
- generateNewEntities();
- }
-
- @Test
- public void testGenerateEntitiesFromBaracouda() throws Exception {
- generateBaracoudaEntities();
- }
-
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataProcessingLoaderIT.java (from rev 194, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataProcessingLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataProcessingLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataProcessingLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,46 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.data.DataProcessing;
+import org.junit.Test;
+
+/**
+ * To test {@link DataProcessingLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class DataProcessingLoaderIT extends AbstractLoaderIT<DataProcessing, DataProcessingLoader> {
+
+ public DataProcessingLoaderIT() {
+ super(DataProcessingLoader.class, 0, 28);
+ }
+
+ @Test
+ public void testGenerateEntitiesFromBaracouda() throws Exception {
+ generateBaracoudaEntities();
+ }
+
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataProcessingLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataProcessingLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataProcessingLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataProcessingLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,46 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.data.DataProcessing;
-import org.junit.Test;
-
-/**
- * To test {@link DataProcessingLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class DataProcessingLoaderTest extends AbstractLoaderTest<DataProcessing, DataProcessingLoader> {
-
- public DataProcessingLoaderTest() {
- super(DataProcessingLoader.class, 0, 28);
- }
-
- @Test
- public void testGenerateEntitiesFromBaracouda() throws Exception {
- generateBaracoudaEntities();
- }
-
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataQualityLoaderIT.java (from rev 194, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataQualityLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataQualityLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataQualityLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,46 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.DataQuality;
+import org.junit.Test;
+
+/**
+ * To test the {@link DataQualityLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class DataQualityLoaderIT extends AbstractLoaderIT<DataQuality, DataQualityLoader> {
+
+ public DataQualityLoaderIT() {
+ super(DataQualityLoader.class, 8, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataQualityLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataQualityLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataQualityLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataQualityLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,46 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.DataQuality;
-import org.junit.Test;
-
-/**
- * To test the {@link DataQualityLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class DataQualityLoaderTest extends AbstractLoaderTest<DataQuality, DataQualityLoader> {
-
- public DataQualityLoaderTest() {
- super(DataQualityLoader.class, 8, 0);
- }
-
- @Test
- public void testGenerateNewEntities() throws Exception {
- generateNewEntities();
- }
-
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataTypeLoaderIT.java (from rev 194, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataTypeLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataTypeLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataTypeLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,46 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.DataType;
+import org.junit.Test;
+
+/**
+ * To test the {@link DataTypeLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class DataTypeLoaderIT extends AbstractLoaderIT<DataType, DataTypeLoader> {
+
+ public DataTypeLoaderIT() {
+ super(DataTypeLoader.class, 15, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataTypeLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataTypeLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataTypeLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DataTypeLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,46 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.DataType;
-import org.junit.Test;
-
-/**
- * To test the {@link DataTypeLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class DataTypeLoaderTest extends AbstractLoaderTest<DataType, DataTypeLoader> {
-
- public DataTypeLoaderTest() {
- super(DataTypeLoader.class, 15, 0);
- }
-
- @Test
- public void testGenerateNewEntities() throws Exception {
- generateNewEntities();
- }
-
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DepthStratumLoaderIT.java (from rev 194, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DepthStratumLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DepthStratumLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DepthStratumLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,46 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.DepthStratum;
+import org.junit.Test;
+
+/**
+ * To test the {@link DepthStratumLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class DepthStratumLoaderIT extends AbstractLoaderIT<DepthStratum, DepthStratumLoader> {
+
+ public DepthStratumLoaderIT() {
+ super(DepthStratumLoader.class, 0, 5);
+ }
+
+ @Test
+ public void testGenerateEntitiesFromBaracouda() throws Exception {
+ generateBaracoudaEntities();
+ }
+
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DepthStratumLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DepthStratumLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DepthStratumLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/DepthStratumLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,46 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.DepthStratum;
-import org.junit.Test;
-
-/**
- * To test the {@link DepthStratumLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class DepthStratumLoaderTest extends AbstractLoaderTest<DepthStratum, DepthStratumLoader> {
-
- public DepthStratumLoaderTest() {
- super(DepthStratumLoader.class, 0, 5);
- }
-
- @Test
- public void testGenerateEntitiesFromBaracouda() throws Exception {
- generateBaracoudaEntities();
- }
-
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/EchotypeCategoryLoaderIT.java (from rev 194, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/EchotypeCategoryLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/EchotypeCategoryLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/EchotypeCategoryLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,46 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.EchotypeCategory;
+import org.junit.Test;
+
+/**
+ * To test the {@link EchotypeCategoryLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class EchotypeCategoryLoaderIT extends AbstractLoaderIT<EchotypeCategory, EchotypeCategoryLoader> {
+
+ public EchotypeCategoryLoaderIT() {
+ super(EchotypeCategoryLoader.class, 0, 3);
+ }
+
+ @Test
+ public void testGenerateEntitiesFromBaracouda() throws Exception {
+ generateBaracoudaEntities();
+ }
+
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/EchotypeCategoryLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/EchotypeCategoryLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/EchotypeCategoryLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/EchotypeCategoryLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,46 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.EchotypeCategory;
-import org.junit.Test;
-
-/**
- * To test the {@link EchotypeCategoryLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class EchotypeCategoryLoaderTest extends AbstractLoaderTest<EchotypeCategory, EchotypeCategoryLoader> {
-
- public EchotypeCategoryLoaderTest() {
- super(EchotypeCategoryLoader.class, 0, 3);
- }
-
- @Test
- public void testGenerateEntitiesFromBaracouda() throws Exception {
- generateBaracoudaEntities();
- }
-
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/EchotypeLoaderIT.java (from rev 194, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/EchotypeLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/EchotypeLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/EchotypeLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,46 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.Echotype;
+import org.junit.Test;
+
+/**
+ * To test the {@link EchotypeLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class EchotypeLoaderIT extends AbstractLoaderIT<Echotype, EchotypeLoader> {
+
+ public EchotypeLoaderIT() {
+ super(EchotypeLoader.class, 183, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/EchotypeLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/EchotypeLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/EchotypeLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/EchotypeLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,46 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.Echotype;
-import org.junit.Test;
-
-/**
- * To test the {@link EchotypeLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class EchotypeLoaderTest extends AbstractLoaderTest<Echotype, EchotypeLoader> {
-
- public EchotypeLoaderTest() {
- super(EchotypeLoader.class, 183, 0);
- }
-
- @Test
- public void testGenerateNewEntities() throws Exception {
- generateNewEntities();
- }
-
-}
Added: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/GearLoaderIT.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/GearLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/GearLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,46 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.Gear;
+import org.junit.Test;
+
+/**
+ * To test the {@link GearLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class GearLoaderIT extends AbstractLoaderIT<Gear, GearLoader> {
+
+ public GearLoaderIT() {
+ super(GearLoader.class, 112, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/GearLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/GearMetadataLoaderIT.java (from rev 195, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/GearMetadataLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/GearMetadataLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/GearMetadataLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,45 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.GearMetadata;
+import org.junit.Test;
+
+/**
+ * To test the {@link GearMetadataLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class GearMetadataLoaderIT extends AbstractLoaderIT<GearMetadata, GearMetadataLoader> {
+
+ public GearMetadataLoaderIT() {
+ super(GearMetadataLoader.class, 3, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/GearMetadataLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/GearMetadataLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/GearMetadataLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/GearMetadataLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,45 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.GearMetadata;
-import org.junit.Test;
-
-/**
- * To test the {@link GearMetadataLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class GearMetadataLoaderTest extends AbstractLoaderTest<GearMetadata, GearMetadataLoader> {
-
- public GearMetadataLoaderTest() {
- super(GearMetadataLoader.class, 3, 0);
- }
-
- @Test
- public void testGenerateNewEntities() throws Exception {
- generateNewEntities();
- }
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/MissionLoaderIT.java (from rev 194, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/MissionLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/MissionLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/MissionLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,45 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.Mission;
+import org.junit.Test;
+
+/**
+ * To test the {@link MissionLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class MissionLoaderIT extends AbstractLoaderIT<Mission, MissionLoader> {
+
+ public MissionLoaderIT() {
+ super(MissionLoader.class, 0, 14);
+ }
+
+ @Test
+ public void testGenerateEntitiesFromBaracouda() throws Exception {
+ generateBaracoudaEntities();
+ }
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/MissionLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/MissionLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/MissionLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/MissionLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,45 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.Mission;
-import org.junit.Test;
-
-/**
- * To test the {@link MissionLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class MissionLoaderTest extends AbstractLoaderTest<Mission, MissionLoader> {
-
- public MissionLoaderTest() {
- super(MissionLoader.class, 0, 15);
- }
-
- @Test
- public void testGenerateEntitiesFromBaracouda() throws Exception {
- generateBaracoudaEntities();
- }
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationEventLoaderIT.java (from rev 195, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationEventLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationEventLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationEventLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,45 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.OperationEvent;
+import org.junit.Test;
+
+/**
+ * To test the {@link OperationEventLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class OperationEventLoaderIT extends AbstractLoaderIT<OperationEvent, OperationEventLoader> {
+
+ public OperationEventLoaderIT() {
+ super(OperationEventLoader.class, 7, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationEventLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationEventLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationEventLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationEventLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,45 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.OperationEvent;
-import org.junit.Test;
-
-/**
- * To test the {@link OperationEventLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class OperationEventLoaderTest extends AbstractLoaderTest<OperationEvent, OperationEventLoader> {
-
- public OperationEventLoaderTest() {
- super(OperationEventLoader.class, 7, 0);
- }
-
- @Test
- public void testGenerateNewEntities() throws Exception {
- generateNewEntities();
- }
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationMetadataLoaderIT.java (from rev 195, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationMetadataLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationMetadataLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationMetadataLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,45 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.OperationMetadata;
+import org.junit.Test;
+
+/**
+ * To test the {@link SexCategoryLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class OperationMetadataLoaderIT extends AbstractLoaderIT<OperationMetadata, OperationMetadataLoader> {
+
+ public OperationMetadataLoaderIT() {
+ super(OperationMetadataLoader.class, 4, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationMetadataLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationMetadataLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationMetadataLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationMetadataLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,45 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.OperationMetadata;
-import org.junit.Test;
-
-/**
- * To test the {@link SexCategoryLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class OperationMetadataLoaderTest extends AbstractLoaderTest<OperationMetadata, OperationMetadataLoader> {
-
- public OperationMetadataLoaderTest() {
- super(OperationMetadataLoader.class, 4, 0);
- }
-
- @Test
- public void testGenerateNewEntities() throws Exception {
- generateNewEntities();
- }
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/ReferenceDatumLoaderIT.java (from rev 194, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/ReferenceDatumLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/ReferenceDatumLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/ReferenceDatumLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,51 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.ReferenceDatum;
+import org.junit.Test;
+
+/**
+ * To test the {@link ReferenceDatumTypeLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class ReferenceDatumLoaderIT extends AbstractLoaderIT<ReferenceDatum, ReferenceDatumLoader> {
+
+ public ReferenceDatumLoaderIT() {
+ super(ReferenceDatumLoader.class, 4, 3);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+
+ @Test
+ public void testGenerateEntitiesFromBaracouda() throws Exception {
+ generateBaracoudaEntities();
+ }
+
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/ReferenceDatumLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/ReferenceDatumLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/ReferenceDatumLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/ReferenceDatumLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,51 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.ReferenceDatum;
-import org.junit.Test;
-
-/**
- * To test the {@link ReferenceDatumTypeLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class ReferenceDatumLoaderTest extends AbstractLoaderTest<ReferenceDatum, ReferenceDatumLoader> {
-
- public ReferenceDatumLoaderTest() {
- super(ReferenceDatumLoader.class, 4, 3);
- }
-
- @Test
- public void testGenerateNewEntities() throws Exception {
- generateNewEntities();
- }
-
- @Test
- public void testGenerateEntitiesFromBaracouda() throws Exception {
- generateBaracoudaEntities();
- }
-
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/ReferenceDatumTypeLoaderIT.java (from rev 194, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/ReferenceDatumTypeLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/ReferenceDatumTypeLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/ReferenceDatumTypeLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,46 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.ReferenceDatumType;
+import org.junit.Test;
+
+/**
+ * To test the {@link ReferenceDatumTypeLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class ReferenceDatumTypeLoaderIT extends AbstractLoaderIT<ReferenceDatumType, ReferenceDatumTypeLoader> {
+
+ public ReferenceDatumTypeLoaderIT() {
+ super(ReferenceDatumTypeLoader.class, 3, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/ReferenceDatumTypeLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/ReferenceDatumTypeLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/ReferenceDatumTypeLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/ReferenceDatumTypeLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,46 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.ReferenceDatumType;
-import org.junit.Test;
-
-/**
- * To test the {@link ReferenceDatumTypeLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class ReferenceDatumTypeLoaderTest extends AbstractLoaderTest<ReferenceDatumType, ReferenceDatumTypeLoader> {
-
- public ReferenceDatumTypeLoaderTest() {
- super(ReferenceDatumTypeLoader.class, 3, 0);
- }
-
- @Test
- public void testGenerateNewEntities() throws Exception {
- generateNewEntities();
- }
-
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoaderIT.java (from rev 195, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,45 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.SampleDataType;
+import org.junit.Test;
+
+/**
+ * To test the {@link SampleDataTypeLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class SampleDataTypeLoaderIT extends AbstractLoaderIT<SampleDataType, SampleDataTypeLoader> {
+
+ public SampleDataTypeLoaderIT() {
+ super(SampleDataTypeLoader.class, 134, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,45 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.SampleDataType;
-import org.junit.Test;
-
-/**
- * To test the {@link SampleDataTypeLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class SampleDataTypeLoaderTest extends AbstractLoaderTest<SampleDataType, SampleDataTypeLoader> {
-
- public SampleDataTypeLoaderTest() {
- super(SampleDataTypeLoader.class, 134, 0);
- }
-
- @Test
- public void testGenerateNewEntities() throws Exception {
- generateNewEntities();
- }
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleTypeLoaderIT.java (from rev 195, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleTypeLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleTypeLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleTypeLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,45 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.SampleType;
+import org.junit.Test;
+
+/**
+ * To test the {@link SampleTypeLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class SampleTypeLoaderIT extends AbstractLoaderIT<SampleType, SampleTypeLoader> {
+
+ public SampleTypeLoaderIT() {
+ super(SampleTypeLoader.class, 5, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleTypeLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleTypeLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleTypeLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleTypeLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,45 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.SampleType;
-import org.junit.Test;
-
-/**
- * To test the {@link SampleTypeLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class SampleTypeLoaderTest extends AbstractLoaderTest<SampleType, SampleTypeLoader> {
-
- public SampleTypeLoaderTest() {
- super(SampleTypeLoader.class, 5, 0);
- }
-
- @Test
- public void testGenerateNewEntities() throws Exception {
- generateNewEntities();
- }
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SexCategoryLoaderIT.java (from rev 195, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SexCategoryLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SexCategoryLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SexCategoryLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,45 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.SexCategory;
+import org.junit.Test;
+
+/**
+ * To test the {@link SexCategoryLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class SexCategoryLoaderIT extends AbstractLoaderIT<SexCategory, SexCategoryLoader> {
+
+ public SexCategoryLoaderIT() {
+ super(SexCategoryLoader.class, 4, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SexCategoryLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SexCategoryLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SexCategoryLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SexCategoryLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,45 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.SexCategory;
-import org.junit.Test;
-
-/**
- * To test the {@link SexCategoryLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class SexCategoryLoaderTest extends AbstractLoaderTest<SexCategory, SexCategoryLoader> {
-
- public SexCategoryLoaderTest() {
- super(SexCategoryLoader.class, 4, 0);
- }
-
- @Test
- public void testGenerateNewEntities() throws Exception {
- generateNewEntities();
- }
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SizeCategoryLoaderIT.java (from rev 195, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SizeCategoryLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SizeCategoryLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SizeCategoryLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,45 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.SizeCategory;
+import org.junit.Test;
+
+/**
+ * To test the {@link SizeCategoryLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class SizeCategoryLoaderIT extends AbstractLoaderIT<SizeCategory, SizeCategoryLoader> {
+
+ public SizeCategoryLoaderIT() {
+ super(SizeCategoryLoader.class, 4, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SizeCategoryLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SizeCategoryLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SizeCategoryLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SizeCategoryLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,45 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.SizeCategory;
-import org.junit.Test;
-
-/**
- * To test the {@link SizeCategoryLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class SizeCategoryLoaderTest extends AbstractLoaderTest<SizeCategory, SizeCategoryLoader> {
-
- public SizeCategoryLoaderTest() {
- super(SizeCategoryLoader.class, 4, 0);
- }
-
- @Test
- public void testGenerateNewEntities() throws Exception {
- generateNewEntities();
- }
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SpeciesLoaderIT.java (from rev 194, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SpeciesLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SpeciesLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SpeciesLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,46 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.Species;
+import org.junit.Test;
+
+/**
+ * To test the {@link SpeciesLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class SpeciesLoaderIT extends AbstractLoaderIT<Species, SpeciesLoader> {
+
+ public SpeciesLoaderIT() {
+ super(SpeciesLoader.class, 217, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SpeciesLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SpeciesLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SpeciesLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SpeciesLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,46 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.Species;
-import org.junit.Test;
-
-/**
- * To test the {@link SpeciesLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class SpeciesLoaderTest extends AbstractLoaderTest<Species, SpeciesLoader> {
-
- public SpeciesLoaderTest() {
- super(SpeciesLoader.class, 217, 0);
- }
-
- @Test
- public void testGenerateNewEntities() throws Exception {
- generateNewEntities();
- }
-
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/StrataLoaderIT.java (from rev 194, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/StrataLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/StrataLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/StrataLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,46 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.Strata;
+import org.junit.Test;
+
+/**
+ * To test the {@link StrataLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class StrataLoaderIT extends AbstractLoaderIT<Strata, StrataLoader> {
+
+ public StrataLoaderIT() {
+ super(StrataLoader.class, 0, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/StrataLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/StrataLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/StrataLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/StrataLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,46 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.Strata;
-import org.junit.Test;
-
-/**
- * To test the {@link StrataLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class StrataLoaderTest extends AbstractLoaderTest<Strata, StrataLoader> {
-
- public StrataLoaderTest() {
- super(StrataLoader.class, 0, 0);
- }
-
- @Test
- public void testGenerateNewEntities() throws Exception {
- generateNewEntities();
- }
-
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TSParametersLoaderIT.java (from rev 194, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TSParametersLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TSParametersLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TSParametersLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,46 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.TSParameters;
+import org.junit.Test;
+
+/**
+ * To test the {@link TSParametersLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class TSParametersLoaderIT extends AbstractLoaderIT<TSParameters, TSParametersLoader> {
+
+ public TSParametersLoaderIT() {
+ super(TSParametersLoader.class, 0, 422);
+ }
+
+ @Test
+ public void testGenerateEntitiesFromBaracouda() throws Exception {
+ generateBaracoudaEntities();
+ }
+
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TSParametersLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TSParametersLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TSParametersLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TSParametersLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,46 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.TSParameters;
-import org.junit.Test;
-
-/**
- * To test the {@link TSParametersLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class TSParametersLoaderTest extends AbstractLoaderTest<TSParameters, TSParametersLoader> {
-
- public TSParametersLoaderTest() {
- super(TSParametersLoader.class, 0, 422);
- }
-
- @Test
- public void testGenerateEntitiesFromBaracouda() throws Exception {
- generateBaracoudaEntities();
- }
-
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TransectLoaderIT.java (from rev 194, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TransectLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TransectLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TransectLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,46 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.data.Transect;
+import org.junit.Test;
+
+/**
+ * To test the {@link TransectLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class TransectLoaderIT extends AbstractLoaderIT<Transect, TransectLoader> {
+
+ public TransectLoaderIT() {
+ super(TransectLoader.class, 0, 42);
+ }
+
+ @Test
+ public void testGenerateEntitiesFromBaracouda() throws Exception {
+ generateBaracoudaEntities();
+ }
+
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TransectLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TransectLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TransectLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TransectLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,46 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.data.Transect;
-import org.junit.Test;
-
-/**
- * To test the {@link TransectLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class TransectLoaderTest extends AbstractLoaderTest<Transect, TransectLoader> {
-
- public TransectLoaderTest() {
- super(TransectLoader.class, 0, 42);
- }
-
- @Test
- public void testGenerateEntitiesFromBaracouda() throws Exception {
- generateBaracoudaEntities();
- }
-
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TransitLoaderIT.java (from rev 194, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TransitLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TransitLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TransitLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,46 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.data.Transit;
+import org.junit.Test;
+
+/**
+ * To test the {@link TransitLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class TransitLoaderIT extends AbstractLoaderIT<Transit, TransitLoader> {
+
+ public TransitLoaderIT() {
+ super(TransitLoader.class, 0, 42);
+ }
+
+ @Test
+ public void testGenerateEntitiesFromBaracouda() throws Exception {
+ generateBaracoudaEntities();
+ }
+
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TransitLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TransitLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TransitLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/TransitLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,46 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.data.Transit;
-import org.junit.Test;
-
-/**
- * To test the {@link TransitLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class TransitLoaderTest extends AbstractLoaderTest<Transit, TransitLoader> {
-
- public TransitLoaderTest() {
- super(TransitLoader.class, 0, 42);
- }
-
- @Test
- public void testGenerateEntitiesFromBaracouda() throws Exception {
- generateBaracoudaEntities();
- }
-
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VesselLoaderIT.java (from rev 194, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VesselLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VesselLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VesselLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,46 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.Vessel;
+import org.junit.Test;
+
+/**
+ * To test the {@link VesselLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class VesselLoaderIT extends AbstractLoaderIT<Vessel, VesselLoader> {
+
+ public VesselLoaderIT() {
+ super(VesselLoader.class, 0, 6);
+ }
+
+ @Test
+ public void testGenerateEntitiesFromBaracouda() throws Exception {
+ generateBaracoudaEntities();
+ }
+
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VesselLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VesselLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VesselLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VesselLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,46 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.Vessel;
-import org.junit.Test;
-
-/**
- * To test the {@link VesselLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class VesselLoaderTest extends AbstractLoaderTest<Vessel, VesselLoader> {
-
- public VesselLoaderTest() {
- super(VesselLoader.class, 0, 6);
- }
-
- @Test
- public void testGenerateEntitiesFromBaracouda() throws Exception {
- generateBaracoudaEntities();
- }
-
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VesselTypeLoaderIT.java (from rev 194, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VesselTypeLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VesselTypeLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VesselTypeLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,46 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.VesselType;
+import org.junit.Test;
+
+/**
+ * To test the {@link VesselTypeLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class VesselTypeLoaderIT extends AbstractLoaderIT<VesselType, VesselTypeLoader> {
+
+ public VesselTypeLoaderIT() {
+ super(VesselTypeLoader.class, 0, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VesselTypeLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VesselTypeLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VesselTypeLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VesselTypeLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,46 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.references.VesselType;
-import org.junit.Test;
-
-/**
- * To test the {@link VesselTypeLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class VesselTypeLoaderTest extends AbstractLoaderTest<VesselType, VesselTypeLoader> {
-
- public VesselTypeLoaderTest() {
- super(VesselTypeLoader.class, 0, 0);
- }
-
- @Test
- public void testGenerateNewEntities() throws Exception {
- generateNewEntities();
- }
-
-}
Copied: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VoyageLoaderIT.java (from rev 194, trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VoyageLoaderTest.java)
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VoyageLoaderIT.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VoyageLoaderIT.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,92 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.EchoBaseEntityEnum;
+import fr.ifremer.echobase.entities.data.Voyage;
+import fr.ifremer.echobase.entities.meta.AssociationMeta;
+import fr.ifremer.echobase.entities.meta.MetaFilenameAware;
+import fr.ifremer.echobase.tools.FileType;
+import org.junit.Assert;
+import org.junit.Test;
+import org.nuiton.topia.TopiaException;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Set;
+
+/**
+ * To test the {@link VoyageLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class VoyageLoaderIT extends AbstractLoaderIT<Voyage, VoyageLoader> {
+
+ public VoyageLoaderIT() {
+ super(VoyageLoader.class, 0, 42);
+ }
+
+ @Test
+ public void testGenerateEntitiesFromBaracouda() throws Exception {
+ generateBaracoudaEntities();
+ }
+
+ Set<MetaFilenameAware> dones;
+
+ @Override
+ protected void loadDependencies(Set<MetaFilenameAware> dones) throws IOException, TopiaException {
+ super.loadDependencies(dones);
+ this.dones = dones;
+ }
+
+ @Test
+ public void testGenerateEchotypeAssociation() throws Exception {
+
+ loadDependencies(EchoBaseEntityEnum.Voyage, dones);
+
+ AssociationMeta associationMeta =
+ loader.getMeta().getAssociations(Voyage.PROPERTY_ECHOTYPE);
+
+ File inFile = new File(testdir, "input-" + associationMeta.getFilename());
+
+ File outFile = loader.getTableFile(exportdir, associationMeta, FileType.ASSOCIATION);
+
+ Assert.assertFalse(inFile.exists());
+ Assert.assertFalse(outFile.exists());
+
+ loader.copyStreamToFile(inFile, FileType.NEW);
+
+ Assert.assertTrue(inFile.exists());
+
+
+ loader.generateEchotypeAssociation(
+ inFile,
+ outFile,
+ true
+ );
+
+ Assert.assertTrue(outFile.exists());
+ }
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VoyageLoaderIT.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VoyageLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VoyageLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/VoyageLoaderTest.java 2011-12-15 21:53:41 UTC (rev 197)
@@ -1,92 +0,0 @@
-/*
- * #%L
- * EchoBase :: Tools
- *
- * $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.tools.loaders;
-
-import fr.ifremer.echobase.entities.EchoBaseEntityEnum;
-import fr.ifremer.echobase.entities.data.Voyage;
-import fr.ifremer.echobase.entities.meta.AssociationMeta;
-import fr.ifremer.echobase.entities.meta.MetaFilenameAware;
-import fr.ifremer.echobase.tools.FileType;
-import org.junit.Assert;
-import org.junit.Test;
-import org.nuiton.topia.TopiaException;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Set;
-
-/**
- * To test the {@link VoyageLoader}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class VoyageLoaderTest extends AbstractLoaderTest<Voyage, VoyageLoader> {
-
- public VoyageLoaderTest() {
- super(VoyageLoader.class, 0, 42);
- }
-
- @Test
- public void testGenerateEntitiesFromBaracouda() throws Exception {
- generateBaracoudaEntities();
- }
-
- Set<MetaFilenameAware> dones;
-
- @Override
- protected void loadDependencies(Set<MetaFilenameAware> dones) throws IOException, TopiaException {
- super.loadDependencies(dones);
- this.dones = dones;
- }
-
- @Test
- public void testGenerateEchotypeAssociation() throws Exception {
-
- loadDependencies(EchoBaseEntityEnum.Voyage, dones);
-
- AssociationMeta associationMeta =
- loader.getMeta().getAssociations(Voyage.PROPERTY_ECHOTYPE);
-
- File inFile = new File(testdir, "input-" + associationMeta.getFilename());
-
- File outFile = loader.getTableFile(exportdir, associationMeta, FileType.ASSOCIATION);
-
- Assert.assertFalse(inFile.exists());
- Assert.assertFalse(outFile.exists());
-
- loader.copyStreamToFile(inFile, FileType.NEW);
-
- Assert.assertTrue(inFile.exists());
-
-
- loader.generateEchotypeAssociation(
- inFile,
- outFile,
- true
- );
-
- Assert.assertTrue(outFile.exists());
- }
-}
Added: trunk/echobase-tools/src/test/resources/csv/new/input-Gear.csv
===================================================================
--- trunk/echobase-tools/src/test/resources/csv/new/input-Gear.csv (rev 0)
+++ trunk/echobase-tools/src/test/resources/csv/new/input-Gear.csv 2011-12-15 21:53:41 UTC (rev 197)
@@ -0,0 +1,192 @@
+CasinoGearName;ValidSince;InvalidSince;IsFishingGear;gearLabel;GearName;Description;UpdateDate;GearClassification;ParentGear;Status;IsActive;IsTowed
+119x102;01/01/00;;1;119x102;Chalut pélagique 119/102;;;5;;;1;1
+36x47;01/01/00;;1;GV3647;Chalut de fond GOV 36/47;;;5;;;1;1
+57x52;01/01/00;;1;57x52;Chalut pélagique 57/52;;;5;;;1;1
+57x52-F LAR;01/01/00;;1;57x52;Chalut pélagique 57/52;;;5;;;1;1
+57x52-FFIL;01/01/00;;1;57x52;Chalut pélagique 57/52;;;5;;;1;1
+725OBS;01/01/00;;1;PS;Filets tournants avec coulisse (sennes coulissantes);"Nom anglais : Surrounding nets with purse lines (purse seines)
+code ISSCFG : 01.1.0";07/12/2011 16:31:24.407001;1;;1;1;0
+76x70;01/01/00;;1;76x70;Chalut pélagique 76/70;;;5;;;1;1
+76x70-F LAR;01/01/00;;1;76x70;Chalut pélagique 76/70;;;5;;;1;1
+76x70-FFIL;01/01/00;;1;76x70;Chalut pélagique 76/70;;;5;;;1;1
+942OBS;01/01/00;;1;942OBS;Chalut pélagique (2 navires);;;5;;;1;1
+Bolinche;01/01/00;;1;PS;Filets tournants avec coulisse (sennes coulissantes);"Nom anglais : Surrounding nets with purse lines (purse seines)
+code ISSCFG : 01.1.0";07/12/2011 16:31:24.407001;1;;1;1;0
+FC - NEUSTON;01/01/00;;0;NEUSTON;Chalut épi-pélagique « de surface » 1250mu;;;5;;;1;1
+FC ? NEUSTON;01/01/00;;0;NEUSTON;Chalut épi-pélagique « de surface » 1250mu;;;5;;;1;1
+FILET CARRE;01/01/00;;0;CARRE;FILET CARRE 500mu;;;5;;;1;1
+MEPEL;01/01/00;;0;MEPEL;Chalut meso-pel 50 m²;;;5;;;1;1
+MEPEL-DEBPEC;01/01/00;;0;MEPEL;Chalut meso-pel 50 m²;;;5;;;1;1
+NEUSTON;01/01/00;;0;NEUSTON;Chalut épi-pélagique « de surface » 1250mu;;;5;;;1;1
+Pélagique en boeufs;01/01/00;;1;PTM;Chaluts boeufs pélagiques;"Nom anglais : Pair trawls Midwater
+code ISSCFG : 03.2.2";07/12/2011 16:31:24.446356;1;20;1;1;1
+RP-F LAR;01/01/00;;1;70x72;Chalut pélagique 70/72 (pelacus 2007);;;5;;;1;1
+;01/01/00;;0;PTGM;Chalut Pélagique (PELMED);;;;;;;
+;;;1;BTF;Engins à appâts vivants;Pas de code ISSCFG officiel (=extension Ifremer du référentiel FAO);07/12/2011 16:31:24.758362;1;;0;;
+;;;1;CTB;Chalut de fond pour crustacés;"Nom anglais : Crustacean Trawl Bottom
+Pas de code ISSCFG officiel (=extension Ifremer du référentiel FAO)";07/12/2011 16:31:24.533508;1;16;0;1;1
+;;;1;DCL;DCP Lignes et palangres (non spécifiées);code ISSCFG : 09.9.0;07/12/2011 16:31:24.733670;1;;0;0;0
+;;;1;DCP;DCP Sennes tournantes coulissantes;code ISSCFG : 01.1.0;07/12/2011 16:31:24.734591;1;;0;1;0
+;;;1;DHB;Dragues à main manoeuvrées à partir du bateau;"Nom anglais : hand dredge operated from the boat
+Pas de code ISSCFG officiel (=extension Ifremer du référentiel FAO)";07/12/2011 16:31:24.535290;1;;1;1;1
+;;;1;DHS;Dragues à main manoeuvrées à partir du rivage;"Nom anglais : hand dredge operated from the shore
+Pas de code ISSCFG officiel (=extension Ifremer du référentiel FAO)";07/12/2011 16:31:24.536861;1;;1;1;1
+;;;1;DR;Dragues (non spécifiées);Pas de code ISSCFG officiel (=extension Ifremer du référentiel FAO);07/12/2011 16:31:24.538555;1;;0;1;1
+;;;1;DRB;Dragues remorquées par bateau;"Nom anglais : Boat dredges
+code ISSCFG : 04.1.0";07/12/2011 16:31:24.773612;1;66;1;1;1
+;;;1;DRH;Dragues à main;"Nom anglais : Hand dredges
+code ISSCFG : 04.2.0";07/12/2011 16:31:24.746489;1;66;0;1;1
+;;;1;FAG;Balais, Fagots ;"Nom anglais : prawn faggot
+Pas de code ISSCFG officiel (=extension Ifremer du référentiel FAO)";07/12/2011 16:31:24.540198;1;;1;0;0
+;;;1;FAR;Pièges aériens;"Nom anglais : Aerial traps
+code ISSCFG : 08.6.0";07/12/2011 16:31:24.750971;1;;1;0;0
+;;;1;FCN;Eperviers;"Nom anglais : Cast nets
+code ISSCFG : 06.1.0";07/12/2011 16:31:24.729465;1;;1;1;0
+;;;1;FDV;Apnée ;"Nom anglais : Free-diving
+Pas de code ISSCFG officiel (=extension Ifremer du référentiel FAO)";07/12/2011 16:31:24.541773;1;;1;1;0
+;;;1;FG;Autres engins retombants (non spécifiés);"Nom anglais : Falling gear (not specified)
+code ISSCFG : 06.9.0";07/12/2011 16:31:24.478923;1;;0;1;0
+;;;1;FIX;Pièges (non spécifiés);"Nom anglais : Traps (not specified)
+code ISSCFG : 08.9.0";07/12/2011 16:31:24.751964;1;;1;0;0
+;;;1;FOO;Pêche à pied ;"Nom anglais : shellfish-gathering / foot-fishing
+Pas de code ISSCFG officiel (=extension Ifremer du référentiel FAO)";07/12/2011 16:31:24.543235;1;;1;1;0
+;;;1;FPN;Filets pièges fixes non couverts;"Nom anglais : Stationary uncovered pound nets
+code ISSCFG : 08.1.0";07/12/2011 16:31:24.749940;1;;1;0;0
+;;;1;FPO;Nasses (casiers non spécifiés);"Nom anglais : Pots
+code ISSCFG : 08.2.0";07/12/2011 16:31:24.495699;1;;1;0;0
+;;;1;FSN;Filets à l'étalage (diables);"Nom anglais : Stow nets
+code ISSCFG : 08.4.0";07/12/2011 16:31:24.498878;1;;1;0;0
+;;;1;FWR;Barrages, parcs, bordigues,etc.;"Nom anglais : Barriers, fences, weirs,etc.
+code ISSCFG : 08.5.0";07/12/2011 16:31:24.500430;1;;1;0;0
+;;;1;FY_;Capéchades, Trabaques;code ISSCFG : 08.3.0;07/12/2011 16:31:24.820709;1;;1;0;0
+;;;1;FYK;Verveux;"Nom anglais : Fyke nets
+code ISSCFG : 08.3.0";07/12/2011 16:31:24.497265;1;;1;0;0
+;;;1;GEN;Filets maillants et filets emmêlants (non spécifiés);"Nom anglais : Gillnets and entangling nets (not specified)
+code ISSCFG : 07.9.0";07/12/2011 16:31:24.490610;1;;1;0;0
+;;;1;GES;Tamis ;"Nom anglais : Glass eel sieve
+Pas de code ISSCFG officiel (=extension Ifremer du référentiel FAO)";07/12/2011 16:31:24.544976;1;;1;1;1
+;;;1;GN;Filets maillants (non spécifiés);"Nom anglais : Gillnets (not specified)
+code ISSCFG : 07.9.1";07/12/2011 16:31:24.492356;1;;1;0;0
+;;;1;GNC;Filets maillants encerclants;"Nom anglais : Encircling gillnets
+code ISSCFG : 07.3.0";07/12/2011 16:31:24.810175;1;;1;1;0
+;;;1;GND;Filets maillants dérivants (filets dérivants);"Nom anglais : Driftnets
+code ISSCFG : 07.2.0";07/12/2011 16:31:24.482325;1;;1;0;0
+;;;1;GNE;Filets flottants (maillants calés);code ISSCFG : 07.1.0;07/12/2011 16:31:24.730379;1;;1;0;0
+;;;1;GNF;Filets maillants fixes (sur perches);"Nom anglais : Fixed gillnets (on stakes)
+code ISSCFG : 07.4.0";07/12/2011 16:31:24.748969;1;;1;0;0
+;;;1;GNS;Filets maillants calés (ancrés, filets maillants de fond à une nappe);"Nom anglais : Set gillnets (anchored)
+code ISSCFG : 07.1.0";07/12/2011 16:31:24.480637;1;;1;0;0
+;;;1;GTN;Trémails et filets maillants combinés;"Nom anglais : Combined gillnets-trammel nets
+code ISSCFG : 07.6.0";07/12/2011 16:31:24.809215;1;;1;0;0
+;;;1;GTR;Trémails;"Nom anglais : Trammel nets
+code ISSCFG : 07.5.0";07/12/2011 16:31:24.789066;1;;1;0;0
+;;;1;HAR;Harpons;"Nom anglais : Harpoons
+code ISSCFG : 10.1.0";07/12/2011 16:31:24.752945;1;;1;1;0
+;;;1;HES;Haveneaux, Épuisettes, Salabardes;code ISSCFG : 20.2.0;07/12/2011 16:31:24.802239;1;;1;1;0
+;;;1;HMD;Dragues mécanisées;"Nom anglais : Mechanized dredges
+code ISSCFG : 11.2.0";07/12/2011 16:31:24.754922;1;;1;1;1
+;;;1;HMP;Pompes;"Nom anglais : Pumps
+code ISSCFG : 11.1.0";07/12/2011 16:31:24.753922;1;;1;1;0
+;;;1;HMS;Scoubidou ;"Nom anglais : kelp (seaweed) harvest gear
+Pas de code ISSCFG officiel (=extension Ifremer du référentiel FAO)";07/12/2011 16:31:24.546704;1;;1;1;0
+;;;1;HMX;Engins de récolte (non spécifiés);"Nom anglais : Harvesting machines (not specified)
+code ISSCFG : 11.9.0";07/12/2011 16:31:24.755957;1;;0;1;0
+;;;1;LA;Filets tournants sans coulisse (filet lamparo);"Nom anglais : Surrounding nets without purse lines (lampara)
+code ISSCFG : 01.2.0";07/12/2011 16:31:24.415929;1;;1;1;0
+;;;1;LH;Lignes à main;"Nom anglais : Handlines
+Pas de code ISSCFG officiel (=extension Ifremer du référentiel FAO)";07/12/2011 16:31:24.548391;1;;1;0;0
+;;;1;LHM;Lignes à main et lignes avec cannes (mécanisées);"Nom anglais : Handlines and pole-lines (mechanized)
+code ISSCFG : 09.2.0";07/12/2011 16:31:24.509083;1;;1;0;0
+;;;1;LHP;Lignes à main et lignes avec cannes (manoeuvrées à la main);"Nom anglais : Handlines and pole-lines (hand operated)
+code ISSCFG : 09.1.0";07/12/2011 16:31:24.507360;1;;1;0;0
+;;;1;LL;Palangres (non spécifiées);"Nom anglais : Longlines (not specified)
+code ISSCFG : 09.5.0";07/12/2011 16:31:24.514432;1;;1;0;0
+;;;1;LLD;Palangres dérivantes;"Nom anglais : Drifting longlines
+code ISSCFG : 09.4.0";07/12/2011 16:31:24.769478;1;;1;0;0
+;;;1;LLF;Palangres calées flottantes;code ISSCFG : 09.3.0;07/12/2011 16:31:24.712660;1;;1;0;0
+;;;1;LLS;Palangres calées (fixes);"Nom anglais : Set longlines
+code ISSCFG : 09.3.0";07/12/2011 16:31:24.510704;1;;1;0;0
+;;;1;LN;Filets soulevés (non spécifiés);"Nom anglais : Lift nets (not specified)
+code ISSCFG : 05.9.0";07/12/2011 16:31:24.475497;1;;1;1;0
+;;;1;LNB;Filets soulevés manoeuvrés du bateau;"Nom anglais : Boat- operated lift nets
+code ISSCFG : 05.2.0";13/12/2011 09:54:34.515543;1;30;1;1;0
+;;;1;LNP;Filets soulevés portatifs;"Nom anglais : Portable lift nets
+code ISSCFG : 05.1.0";07/12/2011 16:31:24.470231;1;30;1;1;0
+;;;1;LNS;Filets soulevés fixes manoeuvrés du rivage;"Nom anglais : Shore-operated stationary lift nets
+code ISSCFG : 05.3.0";13/12/2011 09:54:49.063566;1;30;1;1;0
+;;;1;LSP;Lignes calées (avec ou sans canne);code ISSCFG : 09.3.0;07/12/2011 16:31:24.717796;1;;1;0;0
+;;;1;LTF;Lignes traînantes de fond;code ISSCFG : 09.6.0;07/12/2011 16:31:24.732639;1;;1;0;1
+;;;1;LTL;Lignes de traîne;"Nom anglais : Trolling lines
+code ISSCFG : 09.6.0";07/12/2011 16:31:24.713889;1;;1;0;1
+;;;1;LTP;Lignes de traîne profondes;code ISSCFG : 09.6.0;07/12/2011 16:31:24.728425;1;;1;0;1
+;;;1;LTS;Lignes de traîne de surface;code ISSCFG : 09.6.0;07/12/2011 16:31:24.727415;1;;1;0;1
+;;;1;LVD;Palangres verticales dérivantes;"Nom anglais : vertical drifting longline
+Pas de code ISSCFG officiel (=extension Ifremer du référentiel FAO)";07/12/2011 16:31:24.771250;1;;1;0;0
+;;;1;LVS;Palangres verticales de fond;"Nom anglais : vertical bottom set longline
+Pas de code ISSCFG officiel (=extension Ifremer du référentiel FAO)";07/12/2011 16:31:24.770400;1;;1;0;0
+;;;1;LX;Hameçons et lignes (non spécifiés);"Nom anglais : Hooks and lines (not specified)
+code ISSCFG : 09.9.0";07/12/2011 16:31:24.517992;1;;1;0;0
+;;;1;MIG;Miquelon Filets maillants dérivants;code ISSCFG : 07.2.0;07/12/2011 16:31:24.736450;1;;0;0;0
+;;;1;MIL;Miquelon Lignes et palangres (non spécifiées);code ISSCFG : 09.9.0;07/12/2011 16:31:24.735541;1;;0;0;0
+;;;1;MIS;Divers engins de pêche;"Nom anglais : Miscellaneous Gear
+code ISSCFG : 20.0.0";07/12/2011 16:31:24.526691;1;61;0;;
+;;;1;NK;Engins de pêche inconnus ou non spécifiés;"Nom anglais : Gear not know or not specified
+code ISSCFG : 99.0.0";07/12/2011 16:31:24.530050;1;;0;;
+;;;1;NO;Pas d'engin;Pas de code ISSCFG officiel (=extension Ifremer du référentiel FAO);07/12/2011 16:31:24.553262;1;;1;0;0
+;;;1;OFG;Autres engins fixes et autres (autres arts dormants);"Nom anglais : Other fixed gears and others not specified
+Pas de code ISSCFG officiel (=extension Ifremer du référentiel FAO)";07/12/2011 16:31:24.555477;1;;0;0;0
+;;;1;OT;Chaluts à panneaux (non spécifiés);"Nom anglais : Otter trawls (not specified)
+code ISSCFG : 03.4.9";07/12/2011 16:31:24.453184;1;;0;1;1
+;;;1;OTB;Chaluts de fond à panneaux;"Nom anglais : 0tter trawls Bottom
+code ISSCFG : 03.1.2";07/12/2011 16:31:24.433364;1;16;1;1;1
+;;;1;OTG;Autres engins remorqués (autres arts traînants);"Nom anglais : Other Gears
+Pas de code ISSCFG officiel (=extension Ifremer du référentiel FAO)";07/12/2011 16:31:24.557177;1;;0;1;1
+;;;1;OTM;Chaluts pélagiques à panneaux;"Nom anglais : Otter trawls Midwater
+code ISSCFG : 03.2.1";07/12/2011 16:31:24.444477;1;20;1;1;1
+;;;1;OTT;Chaluts jumeaux à panneaux;"Nom anglais : Otter twin trawl
+code ISSCFG : 03.3.0";07/12/2011 16:31:24.451529;1;;1;1;1
+;;;1;PRE;Charter de pêche récréative (lignes et palangres);code ISSCFG : 09.9.0;07/12/2011 16:31:24.738888;1;;1;0;0
+;;;1;PS;Filets tournants avec coulisse (sennes coulissantes);"Nom anglais : Surrounding nets with purse lines (purse seines)
+code ISSCFG : 01.1.0";07/12/2011 16:31:24.407001;1;;1;1;0
+;;;1;PS1;Sennes (à poche) manoeuvrées par un bateau;"Nom anglais : One boat operated purse seines
+code ISSCFG : 01.1.1";07/12/2011 16:31:24.410906;1;1;1;1;0
+;;;1;PS2;Sennes (à poche) manoeuvrées par deux bateaux;"Nom anglais : Two boats operated purse seines
+code ISSCFG : 01.1.2";07/12/2011 16:31:24.413219;1;1;1;1;0
+;;;1;PT;Chaluts boeufs (non spécifiés);"Nom anglais : Pair trawls (not specified)
+code ISSCFG : 03.5.9";07/12/2011 16:31:24.455721;1;;0;1;1
+;;;1;PTB;Chaluts boeufs de fond;"Nom anglais : Pair trawls Bottom
+code ISSCFG : 03.1.3";07/12/2011 16:31:24.435597;1;16;1;1;1
+;;;1;PTM;Chaluts boeufs pélagiques;"Nom anglais : Pair trawls Midwater
+code ISSCFG : 03.2.2";07/12/2011 16:31:24.446356;1;20;1;1;1
+;;;1;RG;Engins de pêche récréative;"Nom anglais : Recreational Fishing Gear
+code ISSCFG : 25.0.0";07/12/2011 16:31:24.528467;1;;0;;
+;;;1;SB;Sennes de plage;"Nom anglais : Beach seines
+code ISSCFG : 02.1.0";07/12/2011 16:31:24.418054;1;10;1;1;0
+;;;1;SDN;Sennes danoises (mouillées);"Nom anglais : Danish seines
+code ISSCFG : 02.2.1";07/12/2011 16:31:24.422422;1;10;1;1;0
+;;;1;SDV;Plongée sous-marine ;"Nom anglais : scuba-diving
+Pas de code ISSCFG officiel (=extension Ifremer du référentiel FAO)";07/12/2011 16:31:24.559088;1;;1;1;0
+;;;1;SPR;Sennes manoeuvrées par deux bateaux;"Nom anglais : Pair seines
+code ISSCFG : 02.2.3";07/12/2011 16:31:24.426787;1;10;1;1;0
+;;;1;SSC;Sennes écossaises (volantes);"Nom anglais : Scottish seines
+code ISSCFG : 02.2.2";07/12/2011 16:31:24.739896;1;10;1;1;0
+;;;1;SV;Sennes halées à bord;"Nom anglais : Boat or vessel seines
+code ISSCFG : 02.2.0";07/12/2011 16:31:24.420161;1;10;1;1;0
+;;;1;SX;Sennes (non spécifiées);"Nom anglais : Seine nets (not specified)
+code ISSCFG : 02.9.0";07/12/2011 16:31:24.429020;1;;1;1;0
+;;;1;TB;Chaluts de fond (non spécifié);"Nom anglais : Bottom trawls (not specified)
+code ISSCFG : 03.1.9";07/12/2011 16:31:24.442257;1;;1;1;1
+;;;1;TBB;Chaluts à perche;"Nom anglais : Beam Bottom trawls
+code ISSCFG : 03.1.1";07/12/2011 16:31:24.791360;1;16;1;1;1
+;;;1;TBN;Chaluts à langoustines;"Nom anglais : Nephrops Bottom trawls
+code ISSCFG : 03.1.4";07/12/2011 16:31:24.437667;1;16;1;1;1
+;;;1;TBS;Chaluts à crevettes (Fond);"Nom anglais : Shrimp Bottom trawls
+code ISSCFG : 03.1.5";07/12/2011 16:31:24.440049;1;16;1;1;1
+;;;1;TM;Chaluts pélagiques (non spécifiés);"Nom anglais : Midwater trawls (not specified)
+code ISSCFG : 03.2.9";07/12/2011 16:31:24.449861;1;;1;1;1
+;;;1;TMB;Gangui ;"Nom anglais : Mediterranean beam-trawl
+Pas de code ISSCFG officiel (=extension Ifremer du référentiel FAO)";07/12/2011 16:31:24.560687;1;;1;1;1
+;;;1;TMS;Chaluts à crevettes (Mi-profondeur);"Nom anglais : Shrimp trawls Midwater
+code ISSCFG : 03.2.3";07/12/2011 16:31:24.744006;1;20;1;1;1
+;;;1;TX;Autres chaluts (non spécifiés);"Nom anglais : Other trawls (not specified)
+code ISSCFG : 03.9.0";07/12/2011 16:31:24.457337;1;;0;1;1
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/test/resources/csv/new/input-Gear.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/src/doc/reunions/reunion-2011-12-14.txt
===================================================================
--- trunk/src/doc/reunions/reunion-2011-12-14.txt 2011-12-15 20:47:32 UTC (rev 196)
+++ trunk/src/doc/reunions/reunion-2011-12-14.txt 2011-12-15 21:53:41 UTC (rev 197)
@@ -47,6 +47,7 @@
- Remplissage du référentiel SizeCategory
- Remplissage du référentiel OperationMetadata
- Remplissage du référentiel GearMetadata
+- Remplissage du référentiel Gear
Action
------
1
0
r196 - trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders
by tchemit@users.forge.codelutin.com 15 Dec '11
by tchemit@users.forge.codelutin.com 15 Dec '11
15 Dec '11
Author: tchemit
Date: 2011-12-15 21:47:32 +0100 (Thu, 15 Dec 2011)
New Revision: 196
Url: http://forge.codelutin.com/repositories/revision/echobase/196
Log:
reput all cell loading
Modified:
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellLoaderTest.java
Modified: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellLoaderTest.java 2011-12-15 20:46:14 UTC (rev 195)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellLoaderTest.java 2011-12-15 20:47:32 UTC (rev 196)
@@ -73,33 +73,33 @@
public static List<Object[]> data() {
return Arrays.asList(new Object[][]{
{"EIT_00_38", 0},
-// {"EIT_01_38", 0},
-// {"EIT_02_38", 0},
-// {"EIT_03_38", 0},
-// {"EIT_0310_38", 0},
-// {"EIT_04_38", 0},
-// {"EIT_05_38", 0},
-// {"EIT_0510_38", 0}, // with no region
-// {"EIT_06_38", 0},
-// {"EIT_07_38", 0},
-// {"EIT_08_38", 0},
-// {"EIT_09_38", 0},
-// {"EIT_10_38", 0},
-// {"EIT_83A_38", 0}, // with no region
-// {"EIT_83B_38", 0}, // with no region
-// {"EIT_84_38", 0}, // with no region
-// {"EIT_85_38", 0}, // with no region
-// {"EIT_86_38", 0}, // with no region
-// {"EIT_87_38", 0}, // with no region
-// {"EIT_89A_38", 0}, // with no region
-// {"EIT_89B_38", 0}, // with no region
-// {"EIT_90_38", 0}, // with no region
-// {"EIT_91_38", 0}, // with no region
-// {"EIT_92_38", 0}, // with no region
-// {"EIT_93_38", 0}, // with no region
-// {"EIT_94_38", 0}, // with no region
-// {"EIT_97_38", 0}, // with no region
-// {"EIT_98b_38", 0},
+ {"EIT_01_38", 0},
+ {"EIT_02_38", 0},
+ {"EIT_03_38", 0},
+ {"EIT_0310_38", 0},
+ {"EIT_04_38", 0},
+ {"EIT_05_38", 0},
+ {"EIT_0510_38", 0}, // with no region
+ {"EIT_06_38", 0},
+ {"EIT_07_38", 0},
+ {"EIT_08_38", 0},
+ {"EIT_09_38", 0},
+ {"EIT_10_38", 0},
+ {"EIT_83A_38", 0}, // with no region
+ {"EIT_83B_38", 0}, // with no region
+ {"EIT_84_38", 0}, // with no region
+ {"EIT_85_38", 0}, // with no region
+ {"EIT_86_38", 0}, // with no region
+ {"EIT_87_38", 0}, // with no region
+ {"EIT_89A_38", 0}, // with no region
+ {"EIT_89B_38", 0}, // with no region
+ {"EIT_90_38", 0}, // with no region
+ {"EIT_91_38", 0}, // with no region
+ {"EIT_92_38", 0}, // with no region
+ {"EIT_93_38", 0}, // with no region
+ {"EIT_94_38", 0}, // with no region
+ {"EIT_97_38", 0}, // with no region
+ {"EIT_98b_38", 0},
});
}
1
0
15 Dec '11
Author: tchemit
Date: 2011-12-15 21:46:14 +0100 (Thu, 15 Dec 2011)
New Revision: 195
Url: http://forge.codelutin.com/repositories/revision/echobase/195
Log:
- reference model for catches
- remove toLowerCase in import
Added:
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/BiometryScaleLoader.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/GearMetadataLoader.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/OperationEventLoader.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/OperationMetadataLoader.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoader.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleTypeLoader.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SexCategoryLoader.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SizeCategoryLoader.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/BiometryScaleLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/GearMetadataLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationEventLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationMetadataLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleTypeLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SexCategoryLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SizeCategoryLoaderTest.java
trunk/echobase-tools/src/test/resources/csv/new/input-BiometryScale.csv
trunk/echobase-tools/src/test/resources/csv/new/input-GearMetadata.csv
trunk/echobase-tools/src/test/resources/csv/new/input-OperationEvent.csv
trunk/echobase-tools/src/test/resources/csv/new/input-OperationMetadata.csv
trunk/echobase-tools/src/test/resources/csv/new/input-SampleDataType.csv
trunk/echobase-tools/src/test/resources/csv/new/input-SampleType.csv
trunk/echobase-tools/src/test/resources/csv/new/input-SexCategory.csv
trunk/echobase-tools/src/test/resources/csv/new/input-SizeCategory.csv
Modified:
trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseDecoratorProvider.java
trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java
trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/EntitiesUtil.java
trunk/echobase-entities/src/main/resources/i18n/echobase-entities_fr_FR.properties
trunk/echobase-entities/src/main/xmi/echobase.zargo
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbImportService.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/CellLoader.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/EntityLoader.java
trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/VoyageLoader.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AbstractLoaderTest.java
trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellLoaderTest.java
trunk/echobase-tools/src/test/resources/csv/new/input-DataMetadata.csv
trunk/src/doc/reunions/reunion-2011-12-14.txt
Modified: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseDecoratorProvider.java
===================================================================
--- trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseDecoratorProvider.java 2011-12-15 11:05:49 UTC (rev 194)
+++ trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseDecoratorProvider.java 2011-12-15 20:46:14 UTC (rev 195)
@@ -73,7 +73,7 @@
import fr.ifremer.echobase.entities.references.ReferencingMethod;
import fr.ifremer.echobase.entities.references.SampleDataType;
import fr.ifremer.echobase.entities.references.SampleType;
-import fr.ifremer.echobase.entities.references.SexeCategory;
+import fr.ifremer.echobase.entities.references.SexCategory;
import fr.ifremer.echobase.entities.references.SizeCategory;
import fr.ifremer.echobase.entities.references.Species;
import fr.ifremer.echobase.entities.references.SpeciesCategory;
@@ -211,8 +211,8 @@
// SampleType decorator
registerJXPathDecorator(locale, SampleType.class, "${name}$s - level ${level}$s");
- // SexeCategory decorator
- registerJXPathDecorator(locale, SexeCategory.class, "${name}$s");
+ // SexCategory decorator
+ registerJXPathDecorator(locale, SexCategory.class, "${name}$s");
// SizeCategory decorator
registerJXPathDecorator(locale, SizeCategory.class, "${name}$s");
Modified: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java
===================================================================
--- trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java 2011-12-15 11:05:49 UTC (rev 194)
+++ trunk/echobase-entities/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java 2011-12-15 20:46:14 UTC (rev 195)
@@ -34,8 +34,10 @@
import fr.ifremer.echobase.entities.references.DepthStratum;
import fr.ifremer.echobase.entities.references.EchotypeCategory;
import fr.ifremer.echobase.entities.references.Mission;
+import fr.ifremer.echobase.entities.references.OperationEvent;
import fr.ifremer.echobase.entities.references.ReferenceDatum;
import fr.ifremer.echobase.entities.references.ReferenceDatumType;
+import fr.ifremer.echobase.entities.references.SampleDataType;
import fr.ifremer.echobase.entities.references.Species;
import fr.ifremer.echobase.entities.references.Vessel;
import org.nuiton.topia.persistence.TopiaEntity;
@@ -55,7 +57,7 @@
public static final Function<Voyage, String> VOYAGE_NAME = new Function<Voyage, String>() {
@Override
public String apply(Voyage input) {
- return input.getName().toLowerCase();
+ return input.getName();
}
};
@@ -69,14 +71,14 @@
public static final Function<Vessel, String> VESSEL_NAME = new Function<Vessel, String>() {
@Override
public String apply(Vessel input) {
- return input.getName().toLowerCase();
+ return input.getName();
}
};
public static final Function<AcousticInstrument, String> ACOUSTIC_INSTRUMENT_ID = new Function<AcousticInstrument, String>() {
@Override
public String apply(AcousticInstrument input) {
- return input.getId().toLowerCase();
+ return input.getId();
}
};
@@ -97,46 +99,46 @@
public static final Function<ReferenceDatumType, String> REFERENCE_DATUM_TYPE_NAME = new Function<ReferenceDatumType, String>() {
@Override
public String apply(ReferenceDatumType input) {
- return input.getName().toLowerCase();
+ return input.getName();
}
};
public static final Function<ReferenceDatum, String> REFERENCE_DATUM_ID = new Function<ReferenceDatum, String>() {
@Override
public String apply(ReferenceDatum input) {
- return input.getId().toLowerCase();
+ return input.getId();
}
};
public static final Function<Mission, String> MISSION_NAME = new Function<Mission, String>() {
@Override
public String apply(Mission input) {
- return input.getName().toLowerCase();
+ return input.getName();
}
};
public static final Function<AreaOfOperation, String> AREA_OF_OPERATION_NAME = new Function<AreaOfOperation, String>() {
@Override
public String apply(AreaOfOperation input) {
- return input.getName().toLowerCase();
+ return input.getName();
}
};
public static final Function<DataType, String> DATA_TYPE_NAME = new Function<DataType, String>() {
@Override
public String apply(DataType input) {
- return input.getName().toLowerCase();
+ return input.getName();
}
};
public static final Function<CellMethod, String> CELL_METHOD_NAME = new Function<CellMethod, String>() {
@Override
public String apply(CellMethod input) {
- return input.getName().toLowerCase();
+ return input.getName();
}
};
public static final Function<DataProcessing, String> DATA_PROCESSING_ID = new Function<DataProcessing, String>() {
@Override
public String apply(DataProcessing input) {
- return input.getId().toLowerCase();
+ return input.getId();
}
};
@@ -153,20 +155,33 @@
return input.getTopiaId();
}
};
- public static final Function<File,String> FILE_NAME = new Function<File, String>() {
+ public static final Function<File, String> FILE_NAME = new Function<File, String>() {
@Override
public String apply(File input) {
return input.getName();
}
};
+ public static final Function<SampleDataType, String> SAMPLE_DATA_TYPE_RAPRI_CODE = new Function<SampleDataType, String>() {
+ @Override
+ public String apply(SampleDataType input) {
+ return String.valueOf(input.getRaptriBiometryDataType());
+ }
+ };
+ public static final Function<OperationEvent, String> OPERATION_EVENT_NAME = new Function<OperationEvent, String>() {
+ @Override
+ public String apply(OperationEvent input) {
+ return input.getName();
+ }
+ };
+
public static Function<Map<String, Object>, String> newRowFunction(final String key) {
return new Function<Map<String, Object>, String>() {
@Override
public String apply(Map<String, Object> input) {
- String id = input.get(key).toString().toLowerCase();
+ String id = input.get(key).toString();
return id;
}
};
Modified: trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/EntitiesUtil.java
===================================================================
--- trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/EntitiesUtil.java 2011-12-15 11:05:49 UTC (rev 194)
+++ trunk/echobase-entities/src/main/java/fr/ifremer/echobase/entities/EntitiesUtil.java 2011-12-15 20:46:14 UTC (rev 195)
@@ -93,7 +93,7 @@
*/
public static EchoBaseEntityEnum[] getReferenceTypes() {
List<EchoBaseEntityEnum> result = Lists.newLinkedList();
- result.add(EchoBaseEntityEnum.SexeCategory);
+ result.add(EchoBaseEntityEnum.SexCategory);
result.add(EchoBaseEntityEnum.AgeCategory);
result.add(EchoBaseEntityEnum.SizeCategory);
result.add(EchoBaseEntityEnum.MeasureType);
@@ -119,6 +119,7 @@
result.add(EchoBaseEntityEnum.OperationType);
result.add(EchoBaseEntityEnum.MeasurementMetadata);
result.add(EchoBaseEntityEnum.SampleDataType);
+ result.add(EchoBaseEntityEnum.BiometryScale);
result.add(EchoBaseEntityEnum.SampleType);
result.add(EchoBaseEntityEnum.Vessel);
result.add(EchoBaseEntityEnum.Echotype);
@@ -148,7 +149,7 @@
List<EchoBaseEntityEnum> result = Lists.newLinkedList();
result.add(EchoBaseEntityEnum.Strata);
- result.add(EchoBaseEntityEnum.SexeCategory);
+ result.add(EchoBaseEntityEnum.SexCategory);
result.add(EchoBaseEntityEnum.AgeCategory);
result.add(EchoBaseEntityEnum.SizeCategory);
result.add(EchoBaseEntityEnum.Species);
@@ -170,6 +171,8 @@
result.add(EchoBaseEntityEnum.CellMethod);
result.add(EchoBaseEntityEnum.CellType);
result.add(EchoBaseEntityEnum.DataMetadata);
+ result.add(EchoBaseEntityEnum.OperationMetadata);
+ result.add(EchoBaseEntityEnum.GearMetadata);
return result.toArray(new EchoBaseEntityEnum[result.size()]);
}
Modified: trunk/echobase-entities/src/main/resources/i18n/echobase-entities_fr_FR.properties
===================================================================
--- trunk/echobase-entities/src/main/resources/i18n/echobase-entities_fr_FR.properties 2011-12-15 11:05:49 UTC (rev 194)
+++ trunk/echobase-entities/src/main/resources/i18n/echobase-entities_fr_FR.properties 2011-12-15 20:46:14 UTC (rev 195)
@@ -22,6 +22,7 @@
echobase.common.binSizePingAxis=
echobase.common.binSizeRangeAxis=
echobase.common.binUnitsPingAxis=
+echobase.common.biometryScale=
echobase.common.calendar=
echobase.common.calibration=calibration
echobase.common.callsign=
@@ -123,11 +124,15 @@
echobase.common.maxLatitude=
echobase.common.maxLongitude=
echobase.common.meaning=
+echobase.common.meaningEn=
+echobase.common.meaningFr=
echobase.common.measureType=
echobase.common.measurementBinSize=
echobase.common.measurementMetadata=
echobase.common.measurementUnit=
echobase.common.metadata=metadata
+echobase.common.metadataGroup=
+echobase.common.metadataType=
echobase.common.minLatitude=
echobase.common.minLongitude=
echobase.common.mission=mission
@@ -153,6 +158,7 @@
echobase.common.pingDutyCycle=
echobase.common.platform=
echobase.common.positive=
+echobase.common.precision=
echobase.common.principalInvestigator=Chercheur
echobase.common.principalInvestigatorEmail=Courriel du chercheur
echobase.common.processingDescription=
@@ -161,6 +167,7 @@
echobase.common.processingTemplate=
echobase.common.project=Projet
echobase.common.qualityDataFlagValues=
+echobase.common.raptriBiometryDataType=
echobase.common.referenceDatum=referenceDatum
echobase.common.referenceDatumType=
echobase.common.referencingMethod=
@@ -176,7 +183,7 @@
echobase.common.sampling=
echobase.common.scaleFactor=
echobase.common.seafloorSubstrate=
-echobase.common.sexeCategory=
+echobase.common.sexCategory=
echobase.common.sizeCategory=
echobase.common.soundSpeedCalculations=
echobase.common.sounderConstant=
Modified: trunk/echobase-entities/src/main/xmi/echobase.zargo
===================================================================
(Binary files differ)
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbImportService.java 2011-12-15 11:05:49 UTC (rev 194)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/DbImportService.java 2011-12-15 20:46:14 UTC (rev 195)
@@ -123,37 +123,10 @@
ZipFile zipFile = new ZipFile(file);
try {
-// MetaFilenameAware[] entries = getEntries();
-//
-// List<String> missingEntries = Lists.newArrayList();
Map<MetaFilenameAware, ZipEntry> entriestoConsume = discoverEntries(
file, zipFile);
-// // check that all mandatories
-// for (MetaFilenameAware entry : entries) {
-// String filename = entry.getFilename();
-// ZipEntry zipEntry = zipFile.getEntry("echobase/" + filename);
-//
-// if (zipEntry == null) {
-// missingEntries.add(filename);
-// } else {
-// entriestoConsume.put(entry, zipEntry);
-// }
-// }
-//
-// if (!missingEntries.isEmpty()) {
-//
-// if (log.isWarnEnabled()) {
-// log.warn("There is " + missingEntries.size() + "missing mandatory files " +
-// " in import " + file + "\n" + StringUtil.join(missingEntries, "\n", false));
-// }
-//
-//// throw new EchoBaseTechnicalException(
-//// "There is some missing mandatory files " +
-//// missingEntries + " in import " + file);
-// }
-
int size = entriestoConsume.size();
model.setNbSteps(size + 1);
Added: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/BiometryScaleLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/BiometryScaleLoader.java (rev 0)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/BiometryScaleLoader.java 2011-12-15 20:46:14 UTC (rev 195)
@@ -0,0 +1,67 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.EchoBaseFunctions;
+import fr.ifremer.echobase.entities.meta.TableMeta;
+import fr.ifremer.echobase.entities.references.BiometryScale;
+import fr.ifremer.echobase.entities.references.SampleDataType;
+import fr.ifremer.echobase.services.models.EntityCsvModel;
+import fr.ifremer.echobase.tools.FileType;
+
+import java.util.List;
+
+/**
+ * {@link BiometryScale} loader.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class BiometryScaleLoader extends EntityLoader<BiometryScale> {
+
+ public BiometryScaleLoader() {
+ super(BiometryScale.class, FileType.NEW);
+ }
+
+ @Override
+ protected EntityCsvModel<BiometryScale> createCsvImportModel(TableMeta meta) {
+
+ List<SampleDataType> sampleDataTypes =
+ getEntities(SampleDataType.class);
+
+ EntityCsvModel<BiometryScale> model = EntityCsvModel.newModel(
+ getCsvSeparator(),
+ meta
+ );
+
+ /*
+ raptriBiometryDataType;ScaleCode;ScaleMeaningEng;ScaleMeaningFr
+ */
+ model.addForeignKeyForImport("raptriBiometryDataType", BiometryScale.PROPERTY_SAMPLE_DATA_TYPE, SampleDataType.class, sampleDataTypes, EchoBaseFunctions.SAMPLE_DATA_TYPE_RAPRI_CODE);
+ model.addDefaultColumn("ScaleCode",BiometryScale.PROPERTY_CODE, int.class);
+ model.newMandatoryColumn("ScaleMeaningEng",BiometryScale.PROPERTY_MEANING_EN);
+ model.newMandatoryColumn("ScaleMeaningFr",BiometryScale.PROPERTY_MEANING_FR);
+ return model;
+ }
+}
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/BiometryScaleLoader.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/CellLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/CellLoader.java 2011-12-15 11:05:49 UTC (rev 194)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/CellLoader.java 2011-12-15 20:46:14 UTC (rev 195)
@@ -246,9 +246,9 @@
elementaryCellType = cellTypeDAO.findById("Elementary");
cellTypesByDepthStratumId = Maps.newTreeMap();
- cellTypesByDepthStratumId.put(CLAS_REGION.toLowerCase(),
+ cellTypesByDepthStratumId.put(CLAS_REGION,
cellTypeDAO.findById(REGION_PREFIX + CLAS_REGION));
- cellTypesByDepthStratumId.put(SURF_REGION.toLowerCase(),
+ cellTypesByDepthStratumId.put(SURF_REGION,
cellTypeDAO.findById(REGION_PREFIX + SURF_REGION));
Preconditions.checkNotNull(surfaceMetadata);
@@ -269,25 +269,26 @@
@Override
protected void importBaracoudaEntities(Database db) throws IOException, TopiaException {
- String processingId = dataProcessingId.toLowerCase();
-
loadDatas();
- DataProcessing dataProcessing = dataProcessingsById.get(processingId);
-
Preconditions.checkNotNull(tranchesByProcessingId);
Preconditions.checkNotNull(valeurEchosByProcessingId);
Preconditions.checkNotNull(scenarioByProcessingId);
Preconditions.checkNotNull(esduByProcessingId);
Preconditions.checkNotNull(trancheDefById);
Preconditions.checkNotNull(eiConfigurationByProcessingId);
+ Preconditions.checkNotNull(dataProcessingsById);
+ DataProcessing dataProcessing = dataProcessingsById.get(dataProcessingId);
+ Preconditions.checkNotNull(dataProcessing, "Could not find data processing with id " + dataProcessingId + " between " + dataProcessingsById.keySet());
+
// obtain acoustic dataMetadata for this data processing
DataMetadataDAO dataMetadataDAO =
EchoBaseDAOHelper.getDataMetadataDAO(getTransaction());
Map<String, Object> eiconfigurationRow =
- eiConfigurationByProcessingId.get(processingId);
+ eiConfigurationByProcessingId.get(dataProcessingId);
+ Preconditions.checkNotNull(eiconfigurationRow);
String unitSource = (String) eiconfigurationRow.get("ENERG_UNIT_SOURCE");
String campagne = (String) eiconfigurationRow.get("CAMPAGNE");
String longName = campagne + "_" + unitSource;
@@ -306,7 +307,7 @@
int nbElementaryData = 0;
Collection<Map<String, Object>> esduRows =
- esduByProcessingId.get(processingId);
+ esduByProcessingId.get(dataProcessingId);
Collection<Cell> esduCells;
@@ -315,18 +316,18 @@
// this is a region to grab
if (log.isInfoEnabled()) {
- log.info("DataProcessing " + processingId + " is with region");
+ log.info("DataProcessing " + dataProcessingId + " is with region");
}
Map<String, Object> postStrateRow = findPostStrateRow(
db,
- processingId
+ dataProcessingId
);
Preconditions.checkNotNull(postStrateRow);
// there is a region for this data processing
- Cell regionCell = createRegionCell(processingId,
+ Cell regionCell = createRegionCell(dataProcessingId,
postStrateRow,
esduRows,
acousticMetadata);
@@ -343,10 +344,10 @@
// means a data processing without any region
if (log.isInfoEnabled()) {
- log.info("DataProcessing " + processingId + " is with NO region");
+ log.info("DataProcessing " + dataProcessingId + " is with NO region");
}
- esduCells = createEsduCells(processingId,
+ esduCells = createEsduCells(dataProcessingId,
null,
esduRows,
acousticMetadata
@@ -394,7 +395,7 @@
String typeImage = (String) postStrateRow.get("Type_Image");
CellType cellType =
- cellTypesByDepthStratumId.get(typeImage.toLowerCase());
+ cellTypesByDepthStratumId.get(typeImage);
Cell regionCell = dao.create(
Cell.PROPERTY_CELL_TYPE, cellType,
@@ -720,7 +721,7 @@
// get first line in EIT_VALEUR_ECHO using ID_EI_DEVIATION, DHTU_DEVIATION
for (Map<String, Object> row : valeurEchos) {
- String id = row.get("ID_EI_DEVIATION").toString().toLowerCase();
+ String id = row.get("ID_EI_DEVIATION").toString();
if (!processingId.equals(id)) {
// not a good id
continue;
Modified: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/EntityLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/EntityLoader.java 2011-12-15 11:05:49 UTC (rev 194)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/EntityLoader.java 2011-12-15 20:46:14 UTC (rev 195)
@@ -26,9 +26,11 @@
import com.google.common.base.Charsets;
import com.google.common.base.Function;
import com.google.common.base.Preconditions;
+import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.healthmarketscience.jackcess.Database;
+import fr.ifremer.echobase.EchoBaseFunctions;
import fr.ifremer.echobase.EchoBaseTechnicalException;
import fr.ifremer.echobase.entities.EchoBaseEntityEnum;
import fr.ifremer.echobase.entities.meta.AssociationMeta;
@@ -39,6 +41,7 @@
import fr.ifremer.echobase.services.DbImportService;
import fr.ifremer.echobase.services.EchoBaseServiceContext;
import fr.ifremer.echobase.services.EchoBaseServiceSupport;
+import fr.ifremer.echobase.services.models.EntityAssociationImportModel;
import fr.ifremer.echobase.services.models.EntityCsvModel;
import fr.ifremer.echobase.tools.FileType;
import org.apache.commons.io.IOUtils;
@@ -49,6 +52,8 @@
import org.nuiton.topia.persistence.TopiaEntity;
import org.nuiton.util.FileUtil;
import org.nuiton.util.csv.Import;
+import org.nuiton.util.csv.ImportModel;
+import org.nuiton.util.csv.ImportToMap;
import java.io.BufferedReader;
import java.io.File;
@@ -56,6 +61,7 @@
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
+import java.io.Reader;
import java.io.Writer;
import java.text.ParseException;
import java.util.List;
@@ -345,7 +351,7 @@
BufferedReader bf = new BufferedReader(new FileReader(out));
try {
- service.importFile(meta, bf, result);
+ importFile(meta, bf, result);
} catch (EchoBaseTechnicalException eee) {
throw eee;
@@ -394,22 +400,112 @@
return universe;
}
+// protected <E> E getFK(Map<String, E> universe, String fk) {
+// return getFK(universe, fk, true);
+// }
+
protected <E> E getFK(Map<String, E> universe, String fk) {
- return getFK(universe, fk, true, true);
+// E entity = universe.get(lowerCase ? fk.toLowerCase() : fk);
+ E entity = universe.get(fk);
+// if (strict)
+ Preconditions.checkNotNull(entity, "Could not find entity with id " + fk);
+// else {
+// if (entity == null) {
+// if (log.isWarnEnabled()) {
+// log.warn("Could not find entity with id " + fk);
+// }
+// }
+// }
+ return entity;
}
- protected <E> E getFK(Map<String, E> universe, String fk, boolean lowerCase, boolean strict) {
- E entity = universe.get(lowerCase ? fk.toLowerCase() : fk);
- if (strict)
- Preconditions.checkNotNull(entity, "Could not find entity with id " + fk);
- else {
- if (entity == null) {
- if (log.isWarnEnabled()) {
- log.warn("Could not find entity with id " + fk);
+ public <E extends TopiaEntity> void importFile(MetaFilenameAware entry,
+ Reader reader,
+ CsvImportResult csvResult) throws IOException {
+
+ DbEditorService service = getDbEditorService();
+
+ if (entry instanceof AssociationMeta) {
+
+ // load a association input
+
+ AssociationMeta meta = (AssociationMeta) entry;
+
+ if (log.isInfoEnabled()) {
+ log.info("Will import " + meta);
+ }
+
+ EchoBaseEntityEnum source = meta.getSource();
+ EchoBaseEntityEnum target = meta.getTarget();
+ List<TopiaEntity> targetEntities = getEntities(target);
+ Map<String, TopiaEntity> targetsById =
+ Maps.uniqueIndex(targetEntities, EchoBaseFunctions.TO_TOPIAID);
+
+ ImportModel<Map<String, Object>> model =
+ EntityAssociationImportModel.newImportModel(
+ getConfiguration().getCsvSeparator(),
+ meta
+ );
+
+ EchoBaseEntityEnum sourceType = meta.getSource();
+
+ ImportToMap importer = ImportToMap.newImport(model, reader);
+
+ List<E> sourceEntities = getEntities(sourceType);
+ Map<String, E> sourcesById =
+ Maps.uniqueIndex(sourceEntities, EchoBaseFunctions.TO_TOPIAID);
+ try {
+ for (Map<String, Object> row : importer) {
+ String topiaId = (String) row.get(TopiaEntity.TOPIA_ID);
+ E e = sourcesById.get(topiaId);
+ String[] associations = (String[]) row.get("target");
+ List<TopiaEntity> associationEntities = Lists.newArrayList();
+ for (String association : associations) {
+ TopiaEntity targetEntity = targetsById.get(association);
+ associationEntities.add(targetEntity);
+ }
+ meta.setChilds(e, associationEntities);
+ csvResult.incrementsNumberUpdated();
}
+
+ } finally {
+
+ importer.close();
}
+
+ } else {
+
+ // normal entity table import
+
+ TableMeta meta = (TableMeta) entry;
+
+ if (log.isInfoEnabled()) {
+ log.info("Will import " + meta);
+ }
+
+ ImportModel<TopiaEntity> model = service.buildForImport(meta);
+
+ Import<TopiaEntity> importer = Import.newImport(model, reader);
+
+ try {
+ TopiaDAO<TopiaEntity> dao = getDAO(meta.getSource());
+ for (TopiaEntity entity : importer) {
+
+ TopiaEntity entityToSave = dao.create(TopiaEntity.TOPIA_ID,
+ entity.getTopiaId());
+
+ meta.copy(entity, entityToSave);
+
+ csvResult.incrementsNumberUpdated();
+ }
+ } catch (Exception eee) {
+ throw new EchoBaseTechnicalException("Could not import entities of type " + meta.getSource(), eee);
+ } finally {
+
+ importer.close();
+ }
+
}
- return entity;
}
}
Added: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/GearMetadataLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/GearMetadataLoader.java (rev 0)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/GearMetadataLoader.java 2011-12-15 20:46:14 UTC (rev 195)
@@ -0,0 +1,67 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.EchoBaseFunctions;
+import fr.ifremer.echobase.entities.EchoBaseEntityEnum;
+import fr.ifremer.echobase.entities.meta.TableMeta;
+import fr.ifremer.echobase.entities.references.GearMetadata;
+import fr.ifremer.echobase.entities.references.OperationEvent;
+import fr.ifremer.echobase.services.models.EntityCsvModel;
+import fr.ifremer.echobase.tools.FileType;
+
+import java.util.List;
+
+/**
+ * {@link GearMetadata} loader.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class GearMetadataLoader extends EntityLoader<GearMetadata> {
+
+ public GearMetadataLoader() {
+ super(GearMetadata.class, FileType.NEW);
+ }
+
+ @Override
+ protected EntityCsvModel<GearMetadata> createCsvImportModel(TableMeta meta) {
+
+ List<OperationEvent> events = getEntities(EchoBaseEntityEnum.OperationEvent);
+
+ EntityCsvModel<GearMetadata> model = EntityCsvModel.newModel(
+ getCsvSeparator(),
+ meta
+ );
+
+ /*
+ MetadataType;MetadataTypeMeaning;MetadataTypeGroup;OperationEvent
+ */
+ model.newMandatoryColumn("MetadataType", GearMetadata.PROPERTY_TYPE);
+ model.newMandatoryColumn("MetadataTypeMeaning", GearMetadata.PROPERTY_MEANING);
+ model.newMandatoryColumn("MetadataTypeGroup", GearMetadata.PROPERTY_METADATA_GROUP);
+ model.addForeignKeyForImport("OperationEvent", GearMetadata.PROPERTY_OPERATION_EVENT, OperationEvent.class, events, EchoBaseFunctions.OPERATION_EVENT_NAME);
+ return model;
+ }
+}
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/GearMetadataLoader.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/OperationEventLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/OperationEventLoader.java (rev 0)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/OperationEventLoader.java 2011-12-15 20:46:14 UTC (rev 195)
@@ -0,0 +1,53 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.meta.TableMeta;
+import fr.ifremer.echobase.entities.references.OperationEvent;
+import fr.ifremer.echobase.services.models.EntityCsvModel;
+import fr.ifremer.echobase.tools.FileType;
+
+/**
+ * {@link OperationEvent} loader.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class OperationEventLoader extends EntityLoader<OperationEvent> {
+
+ public OperationEventLoader() {
+ super(OperationEvent.class, FileType.NEW);
+ }
+
+ @Override
+ protected EntityCsvModel<OperationEvent> createCsvImportModel(TableMeta meta) {
+ EntityCsvModel<OperationEvent> model = EntityCsvModel.newModel(
+ getCsvSeparator(),
+ meta
+ );
+
+ model.newMandatoryColumn(OperationEvent.PROPERTY_NAME);
+ return model;
+ }
+}
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/OperationEventLoader.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/OperationMetadataLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/OperationMetadataLoader.java (rev 0)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/OperationMetadataLoader.java 2011-12-15 20:46:14 UTC (rev 195)
@@ -0,0 +1,68 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.EchoBaseFunctions;
+import fr.ifremer.echobase.entities.EchoBaseEntityEnum;
+import fr.ifremer.echobase.entities.meta.TableMeta;
+import fr.ifremer.echobase.entities.references.GearMetadata;
+import fr.ifremer.echobase.entities.references.OperationEvent;
+import fr.ifremer.echobase.entities.references.OperationMetadata;
+import fr.ifremer.echobase.services.models.EntityCsvModel;
+import fr.ifremer.echobase.tools.FileType;
+
+import java.util.List;
+
+/**
+ * {@link OperationMetadata} loader.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class OperationMetadataLoader extends EntityLoader<OperationMetadata> {
+
+ public OperationMetadataLoader() {
+ super(OperationMetadata.class, FileType.NEW);
+ }
+
+ @Override
+ protected EntityCsvModel<OperationMetadata> createCsvImportModel(TableMeta meta) {
+
+ List<OperationEvent> events = getEntities(EchoBaseEntityEnum.OperationEvent);
+
+ EntityCsvModel<OperationMetadata> model = EntityCsvModel.newModel(
+ getCsvSeparator(),
+ meta
+ );
+
+ /*
+ MetadataType;MetadataTypeMeaning;MetadataTypeGroup;OperationEvent
+ */
+ model.newMandatoryColumn("MetadataType", OperationMetadata.PROPERTY_NAME);
+ model.newMandatoryColumn("MetadataTypeMeaning", OperationMetadata.PROPERTY_MEANING);
+ model.newMandatoryColumn("MetadataTypeGroup", OperationMetadata.PROPERTY_METADATA_GROUP);
+ model.addForeignKeyForImport("OperationEvent", GearMetadata.PROPERTY_OPERATION_EVENT, OperationEvent.class, events, EchoBaseFunctions.OPERATION_EVENT_NAME);
+ return model;
+ }
+}
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/OperationMetadataLoader.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoader.java (rev 0)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoader.java 2011-12-15 20:46:14 UTC (rev 195)
@@ -0,0 +1,61 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.meta.TableMeta;
+import fr.ifremer.echobase.entities.references.SampleDataType;
+import fr.ifremer.echobase.services.models.EntityCsvModel;
+import fr.ifremer.echobase.tools.FileType;
+
+/**
+ * {@link SampleDataType} loader.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class SampleDataTypeLoader extends EntityLoader<SampleDataType> {
+
+ public SampleDataTypeLoader() {
+ super(SampleDataType.class, FileType.NEW);
+ }
+
+ @Override
+ protected EntityCsvModel<SampleDataType> createCsvImportModel(TableMeta meta) {
+ EntityCsvModel<SampleDataType> model = EntityCsvModel.newModel(
+ getCsvSeparator(),
+ meta
+ );
+
+ /*
+ raptriBiometryDataType;sampleDataTypeMeaningEng;sampleDataType;sampleDataTypeMeaningFr;Units;Precision
+ */
+ model.addDefaultColumn(SampleDataType.PROPERTY_RAPTRI_BIOMETRY_DATA_TYPE,int.class);
+ model.newMandatoryColumn("sampleDataTypeMeaningEng",SampleDataType.PROPERTY_MEANING_EN);
+ model.newMandatoryColumn("sampleDataType", SampleDataType.PROPERTY_NAME);
+ model.newMandatoryColumn("sampleDataTypeMeaningFr",SampleDataType.PROPERTY_MEANING_FR);
+ model.newMandatoryColumn("Units",SampleDataType.PROPERTY_UNITS);
+ model.newMandatoryColumn("Precision",SampleDataType.PROPERTY_UNITS);
+ return model;
+ }
+}
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoader.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleTypeLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleTypeLoader.java (rev 0)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleTypeLoader.java 2011-12-15 20:46:14 UTC (rev 195)
@@ -0,0 +1,58 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.meta.TableMeta;
+import fr.ifremer.echobase.entities.references.SampleDataType;
+import fr.ifremer.echobase.entities.references.SampleType;
+import fr.ifremer.echobase.services.models.EntityCsvModel;
+import fr.ifremer.echobase.tools.FileType;
+
+/**
+ * {@link SampleDataType} loader.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class SampleTypeLoader extends EntityLoader<SampleType> {
+
+ public SampleTypeLoader() {
+ super(SampleType.class, FileType.NEW);
+ }
+
+ @Override
+ protected EntityCsvModel<SampleType> createCsvImportModel(TableMeta meta) {
+ EntityCsvModel<SampleType> model = EntityCsvModel.newModel(
+ getCsvSeparator(),
+ meta
+ );
+
+ /*
+ name;meaning
+ */
+ model.newMandatoryColumn(SampleType.PROPERTY_NAME);
+ model.newMandatoryColumn(SampleType.PROPERTY_MEANING);
+ return model;
+ }
+}
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SampleTypeLoader.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SexCategoryLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SexCategoryLoader.java (rev 0)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SexCategoryLoader.java 2011-12-15 20:46:14 UTC (rev 195)
@@ -0,0 +1,57 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.meta.TableMeta;
+import fr.ifremer.echobase.entities.references.SexCategory;
+import fr.ifremer.echobase.services.models.EntityCsvModel;
+import fr.ifremer.echobase.tools.FileType;
+
+/**
+ * {@link SexCategory} loader.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class SexCategoryLoader extends EntityLoader<SexCategory> {
+
+ public SexCategoryLoader() {
+ super(SexCategory.class, FileType.NEW);
+ }
+
+ @Override
+ protected EntityCsvModel<SexCategory> createCsvImportModel(TableMeta meta) {
+ EntityCsvModel<SexCategory> model = EntityCsvModel.newModel(
+ getCsvSeparator(),
+ meta
+ );
+
+ /*
+ CategoryID;CategoryName
+ */
+ model.newMandatoryColumn("CategoryID", SexCategory.PROPERTY_NAME);
+ model.newMandatoryColumn("CategoryName", SexCategory.PROPERTY_MEANING);
+ return model;
+ }
+}
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SexCategoryLoader.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SizeCategoryLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SizeCategoryLoader.java (rev 0)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SizeCategoryLoader.java 2011-12-15 20:46:14 UTC (rev 195)
@@ -0,0 +1,58 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.meta.TableMeta;
+import fr.ifremer.echobase.entities.references.SexCategory;
+import fr.ifremer.echobase.entities.references.SizeCategory;
+import fr.ifremer.echobase.services.models.EntityCsvModel;
+import fr.ifremer.echobase.tools.FileType;
+
+/**
+ * {@link SexCategory} loader.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class SizeCategoryLoader extends EntityLoader<SizeCategory> {
+
+ public SizeCategoryLoader() {
+ super(SizeCategory.class, FileType.NEW);
+ }
+
+ @Override
+ protected EntityCsvModel<SizeCategory> createCsvImportModel(TableMeta meta) {
+ EntityCsvModel<SizeCategory> model = EntityCsvModel.newModel(
+ getCsvSeparator(),
+ meta
+ );
+
+ /*
+ CategoryID;CategoryName
+ */
+ model.newMandatoryColumn("CategoryID", SizeCategory.PROPERTY_NAME);
+ model.newMandatoryColumn("CategoryName", SizeCategory.PROPERTY_MEANING);
+ return model;
+ }
+}
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/SizeCategoryLoader.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/VoyageLoader.java
===================================================================
--- trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/VoyageLoader.java 2011-12-15 11:05:49 UTC (rev 194)
+++ trunk/echobase-tools/src/main/java/fr/ifremer/echobase/tools/loaders/VoyageLoader.java 2011-12-15 20:46:14 UTC (rev 195)
@@ -173,7 +173,7 @@
String idEchotype = (String) entity.get("ID_DESCRIPTION_DEVIATION");
String specieEchotype = (String) entity.get("GENRE_ESP");
Voyage voayge = getFK(voyages, campagneName);
- Species species = getFK(speciess, specieEchotype,false, true);
+ Species species = getFK(speciess, specieEchotype);
Echotype echotype = echotypeDAO.findByProperties(
Echotype.PROPERTY_ID, Integer.valueOf(idEchotype),
Echotype.PROPERTY_SPECIES, species
Modified: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AbstractLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AbstractLoaderTest.java 2011-12-15 11:05:49 UTC (rev 194)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/AbstractLoaderTest.java 2011-12-15 20:46:14 UTC (rev 195)
@@ -198,7 +198,7 @@
}
protected void loadDependencies(EchoBaseEntityEnum dependency,
- Set<MetaFilenameAware> dones) throws IOException, TopiaException {
+ Set<MetaFilenameAware> dones) throws IOException, TopiaException {
DbMeta dbMeta = serviceContext.getDbMeta();
TableMeta meta = dbMeta.getTable(dependency);
loadDependencies(meta, dones);
@@ -354,6 +354,14 @@
entityLoaders.add(newService(EchotypeLoader.class));
entityLoaders.add(newService(VesselTypeLoader.class));
entityLoaders.add(newService(VesselLoader.class));
+ entityLoaders.add(newService(OperationEventLoader.class));
+ entityLoaders.add(newService(SampleDataTypeLoader.class));
+ entityLoaders.add(newService(SampleTypeLoader.class));
+ entityLoaders.add(newService(BiometryScaleLoader.class));
+ entityLoaders.add(newService(SexCategoryLoader.class));
+ entityLoaders.add(newService(SizeCategoryLoader.class));
+ entityLoaders.add(newService(OperationMetadataLoader.class));
+ entityLoaders.add(newService(GearMetadataLoader.class));
entityLoaders.add(newService(VoyageLoader.class));
entityLoaders.add(newService(TransitLoader.class));
Added: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/BiometryScaleLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/BiometryScaleLoaderTest.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/BiometryScaleLoaderTest.java 2011-12-15 20:46:14 UTC (rev 195)
@@ -0,0 +1,45 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.BiometryScale;
+import org.junit.Test;
+
+/**
+ * To test the {@link BiometryScaleLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class BiometryScaleLoaderTest extends AbstractLoaderTest<BiometryScale, BiometryScaleLoader> {
+
+ public BiometryScaleLoaderTest() {
+ super(BiometryScaleLoader.class, 44, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/BiometryScaleLoaderTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellLoaderTest.java 2011-12-15 11:05:49 UTC (rev 194)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/CellLoaderTest.java 2011-12-15 20:46:14 UTC (rev 195)
@@ -73,33 +73,33 @@
public static List<Object[]> data() {
return Arrays.asList(new Object[][]{
{"EIT_00_38", 0},
- {"EIT_01_38", 0},
- {"EIT_02_38", 0},
- {"EIT_03_38", 0},
- {"EIT_0310_38", 0},
- {"EIT_04_38", 0},
- {"EIT_05_38", 0},
- {"EIT_0510_38", 0}, // with no region
- {"EIT_06_38", 0},
- {"EIT_07_38", 0},
- {"EIT_08_38", 0},
- {"EIT_09_38", 0},
- {"EIT_10_38", 0},
- {"EIT_83A_38", 0}, // with no region
- {"EIT_83B_38", 0}, // with no region
- {"EIT_84_38", 0}, // with no region
- {"EIT_85_38", 0}, // with no region
- {"EIT_86_38", 0}, // with no region
- {"EIT_87_38", 0}, // with no region
- {"EIT_89A_38", 0}, // with no region
- {"EIT_89B_38", 0}, // with no region
- {"EIT_90_38", 0}, // with no region
- {"EIT_91_38", 0}, // with no region
- {"EIT_92_38", 0}, // with no region
- {"EIT_93_38", 0}, // with no region
- {"EIT_94_38", 0}, // with no region
- {"EIT_97_38", 0}, // with no region
- {"EIT_98b_38", 0},
+// {"EIT_01_38", 0},
+// {"EIT_02_38", 0},
+// {"EIT_03_38", 0},
+// {"EIT_0310_38", 0},
+// {"EIT_04_38", 0},
+// {"EIT_05_38", 0},
+// {"EIT_0510_38", 0}, // with no region
+// {"EIT_06_38", 0},
+// {"EIT_07_38", 0},
+// {"EIT_08_38", 0},
+// {"EIT_09_38", 0},
+// {"EIT_10_38", 0},
+// {"EIT_83A_38", 0}, // with no region
+// {"EIT_83B_38", 0}, // with no region
+// {"EIT_84_38", 0}, // with no region
+// {"EIT_85_38", 0}, // with no region
+// {"EIT_86_38", 0}, // with no region
+// {"EIT_87_38", 0}, // with no region
+// {"EIT_89A_38", 0}, // with no region
+// {"EIT_89B_38", 0}, // with no region
+// {"EIT_90_38", 0}, // with no region
+// {"EIT_91_38", 0}, // with no region
+// {"EIT_92_38", 0}, // with no region
+// {"EIT_93_38", 0}, // with no region
+// {"EIT_94_38", 0}, // with no region
+// {"EIT_97_38", 0}, // with no region
+// {"EIT_98b_38", 0},
});
}
Added: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/GearMetadataLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/GearMetadataLoaderTest.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/GearMetadataLoaderTest.java 2011-12-15 20:46:14 UTC (rev 195)
@@ -0,0 +1,45 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.GearMetadata;
+import org.junit.Test;
+
+/**
+ * To test the {@link GearMetadataLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class GearMetadataLoaderTest extends AbstractLoaderTest<GearMetadata, GearMetadataLoader> {
+
+ public GearMetadataLoaderTest() {
+ super(GearMetadataLoader.class, 3, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/GearMetadataLoaderTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationEventLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationEventLoaderTest.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationEventLoaderTest.java 2011-12-15 20:46:14 UTC (rev 195)
@@ -0,0 +1,45 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.OperationEvent;
+import org.junit.Test;
+
+/**
+ * To test the {@link OperationEventLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class OperationEventLoaderTest extends AbstractLoaderTest<OperationEvent, OperationEventLoader> {
+
+ public OperationEventLoaderTest() {
+ super(OperationEventLoader.class, 7, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationEventLoaderTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationMetadataLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationMetadataLoaderTest.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationMetadataLoaderTest.java 2011-12-15 20:46:14 UTC (rev 195)
@@ -0,0 +1,45 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.OperationMetadata;
+import org.junit.Test;
+
+/**
+ * To test the {@link SexCategoryLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class OperationMetadataLoaderTest extends AbstractLoaderTest<OperationMetadata, OperationMetadataLoader> {
+
+ public OperationMetadataLoaderTest() {
+ super(OperationMetadataLoader.class, 4, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/OperationMetadataLoaderTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoaderTest.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoaderTest.java 2011-12-15 20:46:14 UTC (rev 195)
@@ -0,0 +1,45 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.SampleDataType;
+import org.junit.Test;
+
+/**
+ * To test the {@link SampleDataTypeLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class SampleDataTypeLoaderTest extends AbstractLoaderTest<SampleDataType, SampleDataTypeLoader> {
+
+ public SampleDataTypeLoaderTest() {
+ super(SampleDataTypeLoader.class, 134, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleDataTypeLoaderTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleTypeLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleTypeLoaderTest.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleTypeLoaderTest.java 2011-12-15 20:46:14 UTC (rev 195)
@@ -0,0 +1,45 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.SampleType;
+import org.junit.Test;
+
+/**
+ * To test the {@link SampleTypeLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class SampleTypeLoaderTest extends AbstractLoaderTest<SampleType, SampleTypeLoader> {
+
+ public SampleTypeLoaderTest() {
+ super(SampleTypeLoader.class, 5, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SampleTypeLoaderTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SexCategoryLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SexCategoryLoaderTest.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SexCategoryLoaderTest.java 2011-12-15 20:46:14 UTC (rev 195)
@@ -0,0 +1,45 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.SexCategory;
+import org.junit.Test;
+
+/**
+ * To test the {@link SexCategoryLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class SexCategoryLoaderTest extends AbstractLoaderTest<SexCategory, SexCategoryLoader> {
+
+ public SexCategoryLoaderTest() {
+ super(SexCategoryLoader.class, 4, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SexCategoryLoaderTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SizeCategoryLoaderTest.java
===================================================================
--- trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SizeCategoryLoaderTest.java (rev 0)
+++ trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SizeCategoryLoaderTest.java 2011-12-15 20:46:14 UTC (rev 195)
@@ -0,0 +1,45 @@
+/*
+ * #%L
+ * EchoBase :: Tools
+ *
+ * $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.tools.loaders;
+
+import fr.ifremer.echobase.entities.references.SizeCategory;
+import org.junit.Test;
+
+/**
+ * To test the {@link SizeCategoryLoader}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.2
+ */
+public class SizeCategoryLoaderTest extends AbstractLoaderTest<SizeCategory, SizeCategoryLoader> {
+
+ public SizeCategoryLoaderTest() {
+ super(SizeCategoryLoader.class, 4, 0);
+ }
+
+ @Test
+ public void testGenerateNewEntities() throws Exception {
+ generateNewEntities();
+ }
+}
Property changes on: trunk/echobase-tools/src/test/java/fr/ifremer/echobase/tools/loaders/SizeCategoryLoaderTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/test/resources/csv/new/input-BiometryScale.csv
===================================================================
--- trunk/echobase-tools/src/test/resources/csv/new/input-BiometryScale.csv (rev 0)
+++ trunk/echobase-tools/src/test/resources/csv/new/input-BiometryScale.csv 2011-12-15 20:46:14 UTC (rev 195)
@@ -0,0 +1,45 @@
+raptriBiometryDataType;ScaleCode;ScaleMeaningEng;ScaleMeaningFr
+3;0;Undetermined;indeterminé
+3;1;Male;male
+3;2;Female;femelle
+3;3;NA (IEO- Pelacus1007);Non renseigné (IEO- Pelacus1007)
+4;1;Immature/virgin;Immature/virgin
+4;2;Developing;Developing
+4;3;Prespawning;Prespawning
+4;4;Spawning;Spawning
+4;5;Spent;Spent
+4;6;Resting;Resting
+7;0;Easily readable;facile à lire
+7;1;Hardly readable;difficile à lire
+7;2;Unreadable;illisible
+7;3;Estimated (ex. juvenile otoliths);Estimée (ex. Otolimetrie juvenile)
+8;-1;To be checked by PG;à faire préciser par PG
+8;1;"opaque (""H"")";"opaque (""H"")"
+8;2;"hyalin (""O"")";"hyalin (""O"")"
+8;3;opaque/hyalin;opaque/hyalin
+23;1;No fat;No fat
+23;2;Low fat;Low fat
+23;3;Fat;Fat
+23;4;High fat;High fat
+24;0;no anisakis;zéro anisakis
+24;1;1-10 anisakis;1 à 10 anisakis
+24;2;10-20 anisakis;10 à 20 anisakis
+24;3;>20 anisakis;> 20 anisakis
+25;0;;
+25;1;IFREMER - NANTES (PG);IFREMER - NANTES (PG)
+25;2;IFREMER - LORIENT (ED);IFREMER - LORIENT (ED)
+25;3;AZTI + (PP);AZTI + (PP)
+25;4;AZTI (lecture AGE) + IFREMER Nantes (PG) (mesure rayon);AZTI (lecture AGE) + IFREMER Nantes (PG) (mesure rayon)
+25;5;EPHE - PERPIGNAN (PL);EPHE - PERPIGNAN (PL)
+25;6;IFREMER - IEO (double lecture à bord : Patrick-Carla);IFREMER - IEO (double lecture à bord : Patrick-Carla)
+25;7;biometrie et otolithe IFREMER-NANTES (PG) - génétique : EPHE;biometrie et otolithe IFREMER-NANTES (PG) - génétique : EPHE
+26;0;clé Taille/Age : NON Valide;clé Taille/Age : NON Valide
+26;1;clé Taille/Age : VALIDE;clé Taille/Age : VALIDE
+45;0;NA;NA
+45;1;Blanc ?;Blanc ?
+45;2;?;?
+45;3;Complète;Complète
+45;4;partielle;partielle
+49;0;NA;NA
+49;1;DROIT;DROIT
+49;2;GAUCHE;GAUCHE
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/test/resources/csv/new/input-BiometryScale.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/echobase-tools/src/test/resources/csv/new/input-DataMetadata.csv
===================================================================
--- trunk/echobase-tools/src/test/resources/csv/new/input-DataMetadata.csv 2011-12-15 11:05:49 UTC (rev 194)
+++ trunk/echobase-tools/src/test/resources/csv/new/input-DataMetadata.csv 2011-12-15 20:46:14 UTC (rev 195)
@@ -2,23 +2,23 @@
LongitudeStart;Longitude;Cell longitude;longitude;decimal_degrees_east;WGS84;east;;X;-180;180;;;999;CellStart;Longitude of cell start;
LatitudeStart;Latitude;Cell latitude;latitude;decimal_degrees_north;WGS84;north;;Y;-90;90;;;999;CellStart;Latitude of cell start;
TimeStart;Time;Time;time;days since 1899-01-01T00:00:00Z;;;gregorian;T;0;90000;;;99999;CellStart;Time of cell start;
-DepthRefSurfaceStart;Depth;Cell depth;depth;m;Sea surface;Down;;Z;0;12000;;;99999;CellStart;Depth of cell start, ref. surface;
-DepthRefBottomStart;Depth;Cell depth;depth;m;Sea floor;Up;;Z;0;12000;;;99999;CellStart;Depth of cell start, ref. bottom;
+DepthRefSurfaceStart;Depth;Cell depth;depth;m;Sea Surface;Down;;Z;0;12000;;;99999;CellStart;Depth of cell start, ref. surface;
+DepthRefBottomStart;Depth;Cell depth;depth;m;Sea Floor;Up;;Z;0;12000;;;99999;CellStart;Depth of cell start, ref. bottom;
LongitudeEnd;Longitude;Cell longitude;longitude;decimal_degrees_east;WGS84;east;;X;-180;180;;;999;CellEnd;Longitude of cell end;
LatitudeEnd;Latitude;Cell latitude;latitude;decimal_degrees_north;WGS84;north;;Y;-90;90;;;999;CellEnd;Latitude of cell end;
TimeEnd;Time;Time;time;days since 1899-01-01T00:00:00Z;;;gregorian;T;0;90000;;;99999;CellEnd;Time of cell end;
-DepthRefSurfaceEnd;Depth;Cell depth;depth;m;Sea surface;Down;;Z;0;12000;;;99999;CellEnd;Depth of cell end, ref. surface;
-DepthRefBottomEnd;Depth;Cell depth;depth;m;Sea floor;Up;;Z;0;12000;;;99999;CellEnd;Depth of cell end, ref. bottom;
+DepthRefSurfaceEnd;Depth;Cell depth;depth;m;Sea Surface;Down;;Z;0;12000;;;99999;CellEnd;Depth of cell end, ref. surface;
+DepthRefBottomEnd;Depth;Cell depth;depth;m;Sea Floor;Up;;Z;0;12000;;;99999;CellEnd;Depth of cell end, ref. bottom;
LongitudeBary;Longitude;Cell longitude;longitude;decimal_degrees_east;WGS84;east;;X;-180;180;;;999;CellBarycenter;Longitude of cell barycenter;
LatitudeBary;Latitude;Cell latitude;latitude;decimal_degrees_north;WGS84;north;;Y;-90;90;;;999;CellBarycenter;Latitude of cell barycenter;
TimeBary;Time;Time;time;days since 1899-01-01T00:00:00Z;;;gregorian;T;0;90000;;;99999;CellBarycenter;Time of cell barycenter;
-DepthRefSurfaceBary;Depth;Cell depth;depth;m;Sea surface;Down;;Z;0;12000;;;99999;CellBarycenter;Depth of cell barycenter, ref. surface;
-DepthRefBottomBary;Depth;Cell depth;depth;m;Sea floor;Up;;Z;0;12000;;;99999;CellBarycenter;Depth of cell barycenter, ref. bottom;
+DepthRefSurfaceBary;Depth;Cell depth;depth;m;Sea Surface;Down;;Z;0;12000;;;99999;CellBarycenter;Depth of cell barycenter, ref. surface;
+DepthRefBottomBary;Depth;Cell depth;depth;m;Sea Floor;Up;;Z;0;12000;;;99999;CellBarycenter;Depth of cell barycenter, ref. bottom;
LongitudeEnv;Longitude;Cell longitude;longitude;decimal_degrees_east;WGS84;east;;X;-180;180;;;999;CellEnveloppe;Longitude of cell enveloppe point;
LatitudeEnv;Latitude;Cell latitude;latitude;decimal_degrees_north;WGS84;north;;Y;-90;90;;;999;CellEnveloppe;Latitude of cell enveloppe point;
TimeEnv;Time;Time;time;days since 1899-01-01T00:00:00Z;;;gregorian;T;0;90000;;;99999;CellEnveloppe;Time of cell enveloppe point;
-DepthRefSurfaceEnv;Depth;Cell depth;depth;m;Sea surface;Down;;Z;0;12000;;;99999;CellEnveloppe;Depth of cell enveloppe point, ref. surface;
-DepthRefBottomEnv;Depth;Cell depth;depth;m;Sea floor;Up;;Z;0;12000;;;99999;CellEnveloppe;Depth of cell enveloppe point, ref. bottom;
+DepthRefSurfaceEnv;Depth;Cell depth;depth;m;Sea Surface;Down;;Z;0;12000;;;99999;CellEnveloppe;Depth of cell enveloppe point, ref. surface;
+DepthRefBottomEnv;Depth;Cell depth;depth;m;Sea Floor;Up;;Z;0;12000;;;99999;CellEnveloppe;Depth of cell enveloppe point, ref. bottom;
NASC;Acoustic density;Nautical area scattering coefficient;;m²/nmi²;;;;;0;3000000;;;99999;Mean;;
sa;Acoustic density;Area backscattering coefficient;sound_intensity_level_in_water;m²/m²;;;;;0;3000000;;;99999;Mean;;
sv;Acoustic density;Volume backscattering coefficient;acoustic_volume_backscatter;m-1;;;;;0;99999;;;99999;Mean;;
Added: trunk/echobase-tools/src/test/resources/csv/new/input-GearMetadata.csv
===================================================================
--- trunk/echobase-tools/src/test/resources/csv/new/input-GearMetadata.csv (rev 0)
+++ trunk/echobase-tools/src/test/resources/csv/new/input-GearMetadata.csv 2011-12-15 20:46:14 UTC (rev 195)
@@ -0,0 +1,4 @@
+MetadataType;MetadataTypeMeaning;MetadataTypeGroup;OperationEvent
+CableLength;Length of cable used;Cable;Global
+MinSpeed;Minimum speed during operation;Speed;Global
+MaxSpeed;Maximum speed during operation;Speed;Global
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/test/resources/csv/new/input-GearMetadata.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/test/resources/csv/new/input-OperationEvent.csv
===================================================================
--- trunk/echobase-tools/src/test/resources/csv/new/input-OperationEvent.csv (rev 0)
+++ trunk/echobase-tools/src/test/resources/csv/new/input-OperationEvent.csv 2011-12-15 20:46:14 UTC (rev 195)
@@ -0,0 +1,8 @@
+name
+Global;
+Average;
+ShootingStart;
+ShootingEnd;
+HaulingStart;
+HaulingEnd;
+Fishing;
Property changes on: trunk/echobase-tools/src/test/resources/csv/new/input-OperationEvent.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/test/resources/csv/new/input-OperationMetadata.csv
===================================================================
--- trunk/echobase-tools/src/test/resources/csv/new/input-OperationMetadata.csv (rev 0)
+++ trunk/echobase-tools/src/test/resources/csv/new/input-OperationMetadata.csv 2011-12-15 20:46:14 UTC (rev 195)
@@ -0,0 +1,5 @@
+MetadataType;MetadataTypeMeaning;MetadataTypeGroup;OperationEvent
+MeanWaterDepth;Mean water depth during operation;Depth;Average
+DielPeriod;1 : day, 0 : night;Diel;Global
+WaterDepth;Water depth at the beginning of the operation;Depth;ShootingStart
+WaterDepth;Water depth at the end of the operation;Depth;HaulingEnd
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/test/resources/csv/new/input-OperationMetadata.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/test/resources/csv/new/input-SampleDataType.csv
===================================================================
--- trunk/echobase-tools/src/test/resources/csv/new/input-SampleDataType.csv (rev 0)
+++ trunk/echobase-tools/src/test/resources/csv/new/input-SampleDataType.csv 2011-12-15 20:46:14 UTC (rev 195)
@@ -0,0 +1,135 @@
+raptriBiometryDataType;sampleDataTypeMeaningEng;sampleDataType;sampleDataTypeMeaningFr;Units;Precision
+1;Length (cm – precision unknown);Lcm;Longueur (cm);;NA
+2;Weight (g – precision unknown);Weightg;Poids (g);;NA
+3;Sex;Sex;Sexe;;
+4;Maturity;Maturity;Maturité;;
+5;Weight of the gonads (g – precision unknown);GonadicWeight;Poids des gonades (g);;
+6;Age;Age;Age;;
+7;Age reading fiability;Fiability;Fiabilité de la lecture d'age;;
+8;Edge type (1:opaque , 2:Hyalin, 3:opaq/hyali);EdgeType;Nature du bord de l'otholite;;
+9;Length at ring 1 (micron);L1;Longueur du rayon 1 (micron);micron;
+10;Length at ring 2 (micron);L2;Longueur du rayon 2 (micron);micron;
+11;Length at ring 3 (micron);L3;Longueur du rayon 3 (micron);micron;
+12;Length at ring 4 (micron);L4;LONGUEUR A L'ANNEAU 4 en micron;micron;
+13;Length at ring 5 (micron);L5;LONGUEUR A L'ANNEAU 5 en micron;micron;
+14;Length at ring 6 (micron);L6;LONGUEUR A L'ANNEAU 6 en micron;micron;
+15;Length at ring 7 (micron);L7;LONGUEUR A L'ANNEAU 7 en micron;micron;
+16;Length at ring 8 (micron);L8;LONGUEUR A L'ANNEAU 8 en micron;micron;
+17;Length at ring 9 (micron);L9;LONGUEUR A L'ANNEAU 9 en micron;micron;
+18;Length at ring 10 (micron);L10;LONGUEUR A L'ANNEAU 10 en micron;micron;
+19;Otolith total length (micron);LTOT;LONGUEUR TOTALE DE LA PIECE OSSEUSE (micron);micron;
+20;;MF1;MF1;;
+21;;#R1;ex #R1 (calcul de LTOT - L1) --> code DISPONIBLE);;
+23;Fat content;Fat;ENGRAISSEMENT;;
+24;Parasites;Parasites;PARASITES;;
+25;Laboratory where processed;Laboratory;Laboratoire de traitement;;
+26;Length-age key validation;TA;Validation Clé Taille/Age;;
+27;Locus – Genetics - PGI-m;PGI-m;Locus - Génétique - PGI-m;;
+28;Locus - Genetics – LDH1-m;LDH1-m;Locus - Génétique - LDH1-m;;
+29;Locus - Genetics - LDH2-m;LDH2-m;Locus - Génétique - LDH2-m;;
+30;Locus - Genetics - ME2-m;ME2-m;Locus - Génétique - ME2-m;;
+31;Locus - Genetics - MDH1-m;MDH1-m;Locus - Génétique - MDH1-m;;
+32;Locus - Genetics - PGM-m;PGM-m;Locus - Génétique - PGM-m;;
+33;Locus - Genetics - aGPD-m;aGPD-m;Locus - Génétique - aGPD-m;;
+34;Locus - Genetics - IDH-m;IDH-m;Locus - Génétique - IDH-m;;
+35;Locus - Genetics - AAT-f;AAT-f;Locus - Génétique - AAT-f;;
+36;Locus - Genetics - LGG-f;LGG-f;Locus - Génétique - LGG-f;;
+37;Locus - Genetics - PP-f;PP-f;Locus - Génétique - PP-f;;
+38;Locus - Genetics - LT-f;LT-f;Locus - Génétique - LT-f;;
+39;Locus - Genetics - IDH-f;IDH-f;Locus - Génétique - IDH-f;;
+40;Locus - Genetics - EST4m-m;EST4m-m;Locus - Génétique - EST4m-m;;
+41;Locus - Genetics - EST-f (PEL01 seul);EST-f;Locus - Génétique - EST-f (PEL01 seul);;
+42;Locus - Genetics - MDH2-m (PEL01 seul);MDH2-m;Locus - Génétique - MDH2-m (PEL01 seul);;
+43;Locus - Genetics - GDA-f (PEL01 seul);GDA-f;Locus - Génétique - GDA-f (PEL01 seul);;
+44;Standard length, without tail;SL;TAILLE STANDARD ( cm) - hors caudale;cm;
+45;Pigmentation;PIGMENT;PIGMENTATION;;
+46;Length of bony part radius;RTOT;LONGUEUR du RAYON de la pièce osseuse (en micron);micron;
+47;Nucleus length at otolith edge;RJNB;LONGUEUR du NUCLEUS au bord de l'otolithe (micron);micron;
+48;Trench length at otolith edge;LJG;LONGUEUR du SILLON au bord de l'otolithe (micron);micron;
+49;Otolith: left or right?;OTO_GD;OTOLITHE Gauche-Droit;;
+50;Number of growth rings of juvenile otolith, bloc 1;NJ01;OTOLITHE JUV Nb Accroissement bloc 1;;
+51;Number of growth rings of juvenile otolith, bloc 2;NJ02;OTOLITHE JUV Nb Accroissement bloc 2;;
+52;Number of growth rings of juvenile otolith, bloc 3;NJ03;OTOLITHE JUV Nb Accroissement bloc 3;;
+53;Number of growth rings of juvenile otolith, bloc 4;NJ04;OTOLITHE JUV Nb Accroissement bloc 4;;
+54;Number of growth rings of juvenile otolith, bloc 5;NJ05;OTOLITHE JUV Nb Accroissement bloc 5;;
+55;Number of growth rings of juvenile otolith, bloc 6;NJ06;OTOLITHE JUV Nb Accroissement bloc 6;;
+56;Number of growth rings of juvenile otolith, bloc 7;NJ07;OTOLITHE JUV Nb Accroissement bloc 7;;
+57;Number of growth rings of juvenile otolith, bloc 8;NJ08;OTOLITHE JUV Nb Accroissement bloc 8;;
+58;Number of growth rings of juvenile otolith, bloc 9;NJ09;OTOLITHE JUV Nb Accroissement bloc 9;;
+59;Number of growth rings of juvenile otolith, bloc 10;NJ10;OTOLITHE JUV Nb Accroissement bloc 10;;
+60;Number of growth rings of juvenile otolith, bloc 11;NJ11;OTOLITHE JUV Nb Accroissement bloc 11;;
+61;Number of growth rings of juvenile otolith, bloc 12;NJ12;OTOLITHE JUV Nb Accroissement bloc 12;;
+62;Number of growth rings of juvenile otolith, bloc 13;NJ13;OTOLITHE JUV Nb Accroissement bloc 13;;
+63;Number of growth rings of juvenile otolith, bloc 14;NJ14;OTOLITHE JUV Nb Accroissement bloc 14;;
+64;Number of growth rings of juvenile otolith, bloc 15;NJ15;OTOLITHE JUV Nb Accroissement bloc 15;;
+65;Number of growth rings of juvenile otolith, bloc 16;NJ16;OTOLITHE JUV Nb Accroissement bloc 16;;
+66;Number of growth rings of juvenile otolith, bloc 17;NJ17;OTOLITHE JUV Nb Accroissement bloc 17;;
+67;Number of growth rings of juvenile otolith, bloc 18;NJ18;OTOLITHE JUV Nb Accroissement bloc 18;;
+68;Number of growth rings of juvenile otolith, bloc 19;NJ19;OTOLITHE JUV Nb Accroissement bloc 19;;
+69;Number of growth rings of juvenile otolith, bloc 20;NJ20;OTOLITHE JUV Nb Accroissement bloc 20;;
+70;Number of growth rings of juvenile otolith, bloc 21;NJ21;OTOLITHE JUV Nb Accroissement bloc 21;;
+71;Number of growth rings of juvenile otolith, bloc 22;NJ22;OTOLITHE JUV Nb Accroissement bloc 22;;
+72;Number of growth rings of juvenile otolith, bloc 23;NJ23;OTOLITHE JUV Nb Accroissement bloc 23;;
+73;Number of growth rings of juvenile otolith, bloc 24;NJ24;OTOLITHE JUV Nb Accroissement bloc 24;;
+74;Number of growth rings of juvenile otolith, bloc 25;NJ25;OTOLITHE JUV Nb Accroissement bloc 25;;
+75;Number of growth rings of juvenile otolith, bloc 26;NJ26;OTOLITHE JUV Nb Accroissement bloc 26;;
+76;Number of growth rings of juvenile otolith, bloc 27;NJ27;OTOLITHE JUV Nb Accroissement bloc 27;;
+77;Number of growth rings of juvenile otolith, bloc 28;NJ28;OTOLITHE JUV Nb Accroissement bloc 28;;
+78;Number of growth rings of juvenile otolith, bloc 29;NJ29;OTOLITHE JUV Nb Accroissement bloc 29;;
+79;Number of growth rings of juvenile otolith, bloc 30;NJ30;OTOLITHE JUV Nb Accroissement bloc 30;;
+80;Growth of juvenile otolith ring, bloc 1;LJ01;OTOLITHE JUV Mesure(micron) Accroissement bloc 1;micron;
+81;Growth of juvenile otolith ring, bloc2;LJ02;OTOLITHE JUV Mesure(micron) Accroissement bloc 2;micron;
+82;Growth of juvenile otolith ring, bloc 3;LJ03;OTOLITHE JUV Mesure(micron) Accroissement bloc 3;micron;
+83;Growth of juvenile otolith ring, bloc 4;LJ04;OTOLITHE JUV Mesure(micron) Accroissement bloc 4;micron;
+84;Growth of juvenile otolith ring, bloc 5;LJ05;OTOLITHE JUV Mesure(micron) Accroissement bloc 5;micron;
+85;Growth of juvenile otolith ring, bloc 6;LJ06;OTOLITHE JUV Mesure(micron) Accroissement bloc 6;micron;
+86;Growth of juvenile otolith ring, bloc 7;LJ07;OTOLITHE JUV Mesure(micron) Accroissement bloc 7;micron;
+87;Growth of juvenile otolith ring, bloc 8;LJ08;OTOLITHE JUV Mesure(micron) Accroissement bloc 8;micron;
+88;Growth of juvenile otolith ring, bloc 9;LJ09;OTOLITHE JUV Mesure(micron) Accroissement bloc 9;micron;
+89;Growth of juvenile otolith ring, bloc 10;LJ10;OTOLITHE JUV Mesure(micron) Accroissement bloc 10;micron;
+90;Growth of juvenile otolith ring, bloc 11;LJ11;OTOLITHE JUV Mesure(micron) Accroissement bloc 11;micron;
+91;Growth of juvenile otolith ring, bloc 12;LJ12;OTOLITHE JUV Mesure(micron) Accroissement bloc 12;micron;
+92;Growth of juvenile otolith ring, bloc 13;LJ13;OTOLITHE JUV Mesure(micron) Accroissement bloc 13;micron;
+93;Growth of juvenile otolith ring, bloc 14;LJ14;OTOLITHE JUV Mesure(micron) Accroissement bloc 14;micron;
+94;Growth of juvenile otolith ring, bloc 15;LJ15;OTOLITHE JUV Mesure(micron) Accroissement bloc 15;micron;
+95;Growth of juvenile otolith ring, bloc 16;LJ16;OTOLITHE JUV Mesure(micron) Accroissement bloc 16;micron;
+96;Growth of juvenile otolith ring, bloc 17;LJ17;OTOLITHE JUV Mesure(micron) Accroissement bloc 17;micron;
+97;Growth of juvenile otolith ring, bloc 18;LJ18;OTOLITHE JUV Mesure(micron) Accroissement bloc 18;micron;
+98;Growth of juvenile otolith ring, bloc 19;LJ19;OTOLITHE JUV Mesure(micron) Accroissement bloc 19;micron;
+99;Growth of juvenile otolith ring, bloc 20;LJ20;OTOLITHE JUV Mesure(micron) Accroissement bloc 20;micron;
+100;Growth of juvenile otolith ring, bloc 21;LJ21;OTOLITHE JUV Mesure(micron) Accroissement bloc 21;micron;
+101;Growth of juvenile otolith ring, bloc 22;LJ22;OTOLITHE JUV Mesure(micron) Accroissement bloc 22;micron;
+102;Growth of juvenile otolith ring, bloc 23;LJ23;OTOLITHE JUV Mesure(micron) Accroissement bloc 23;micron;
+103;Growth of juvenile otolith ring, bloc 24;LJ24;OTOLITHE JUV Mesure(micron) Accroissement bloc 24;micron;
+104;Growth of juvenile otolith ring, bloc 25;LJ25;OTOLITHE JUV Mesure(micron) Accroissement bloc 25;micron;
+105;Growth of juvenile otolith ring, bloc 26;LJ26;OTOLITHE JUV Mesure(micron) Accroissement bloc 26;micron;
+106;Growth of juvenile otolith ring, bloc 27;LJ27;OTOLITHE JUV Mesure(micron) Accroissement bloc 27;micron;
+107;Growth of juvenile otolith ring, bloc 28;LJ28;OTOLITHE JUV Mesure(micron) Accroissement bloc 28;micron;
+108;Growth of juvenile otolith ring, bloc 29;LJ29;OTOLITHE JUV Mesure(micron) Accroissement bloc 29;micron;
+109;Growth of juvenile otolith ring, bloc 30;LJ30;OTOLITHE JUV Mesure(micron) Accroissement bloc 30;micron;
+110;Complementary information;INFO;INFO COMPLEMENTAIRE;;
+111;Total number of days, juvenile otolith;NJ00;OTOLITHE JUV Nb jours total;;
+112;Number at length;NumberAtLength;Nombre par classe de taille;;
+113;Weight at length (kg – precision unknown);WeightAtLengthkg;Poids par classe de taille (kg);;NA
+114;Mean length (cm);MeanLengthcm;Taille moyenne (cm);;
+115;Mean weight (g – precision unknown);MeanWeightg;Poids moyen (g);;NA
+116;Number of fish per kg;NoPerKg;Moule (Nombre d'individus par kg);;
+117;Total Length (cm – precision 1);LTcm1;Longueur Totale (cm);cm;1
+118;Total Length (cm – precision 0.5);LTcm0.5;Longueur Totale (1/2 cm);cm;0.5
+119;Total Length (mm – precision 1);LTmm1;Longueur Totale (mm);mm;1
+120;Fork Length (cm – precision 1);LFcm1;Longueur maxillaire supérieur - Fourche caudale;cm;1
+121;Width (cm – precision 1);LAcm1;Largeur;cm;1
+122;;LPCcm1;Longueur Pré supra Caudale;cm;1
+123;;LPAcm0.5;Longueur Pré Anale;cm;0.5
+124;;LMFcm1;Longueur maxillaire inférieur - Fourche caudale;cm;1
+125;Cephalothorax length (mm – precision 1);LCmm1;Longueur Céphalothoracique;mm;1
+126;Cephalothorax width (mm – precision 1);LACmm1;LArgeur Céphalothoracique;mm;1
+127;Height (mm – precision 1);Hmm1;Hauteur (mm);mm;1
+128;Height (cm – precision 0.5);Hcm0.5;Hauteur (1/2 cm);cm;0.5
+129;Mantel length (cm – precision 1);LMcm1;Longueur du Manteau (cm);cm;1
+130;Mantel length (cm – precision 0.5);LMcm0.1;Longueur du Manteau (1/2 cm);cm;0.5
+131;Curve standard length (cm – precision 0.5);LCScm0.1;Longueur Courbe Standard;cm;0.1
+132;Carapace direct length (cm – precision 0.1);LDScm0.1;Longueur Directe Standard;cm;0.1
+133;Carapace curve width (cm – precision 0.1);LACCcm0.1;LArgeur Courbe Carapace;cm;0.1
+134;Carapace direct width (cm – precision 0.1);LADCcm0.1;LArgeur Directe Carapace;cm;0.1
+135;Circumference (cm – precision 1);Ccm1;Circonférence;cm;1
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/test/resources/csv/new/input-SampleDataType.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/test/resources/csv/new/input-SampleType.csv
===================================================================
--- trunk/echobase-tools/src/test/resources/csv/new/input-SampleType.csv (rev 0)
+++ trunk/echobase-tools/src/test/resources/csv/new/input-SampleType.csv 2011-12-15 20:46:14 UTC (rev 195)
@@ -0,0 +1,6 @@
+name;meaning
+Individual;Measurement of individual fish
+Subsample;Measurement of a subsample of fish
+Total;Extrapolation results or total sorted catch
+Unsorted;Individual taken out before being sampled
+Sorted;Sample sorted
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/test/resources/csv/new/input-SampleType.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/test/resources/csv/new/input-SexCategory.csv
===================================================================
--- trunk/echobase-tools/src/test/resources/csv/new/input-SexCategory.csv (rev 0)
+++ trunk/echobase-tools/src/test/resources/csv/new/input-SexCategory.csv 2011-12-15 20:46:14 UTC (rev 195)
@@ -0,0 +1,5 @@
+CategoryID;CategoryName
+0;All
+G;Large
+P;Small
+TP;Very small
Property changes on: trunk/echobase-tools/src/test/resources/csv/new/input-SexCategory.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/echobase-tools/src/test/resources/csv/new/input-SizeCategory.csv
===================================================================
--- trunk/echobase-tools/src/test/resources/csv/new/input-SizeCategory.csv (rev 0)
+++ trunk/echobase-tools/src/test/resources/csv/new/input-SizeCategory.csv 2011-12-15 20:46:14 UTC (rev 195)
@@ -0,0 +1,5 @@
+CategoryID;CategoryName
+N;Not determined
+F;Female
+G;Large
+I;Immature
\ No newline at end of file
Property changes on: trunk/echobase-tools/src/test/resources/csv/new/input-SizeCategory.csv
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/src/doc/reunions/reunion-2011-12-14.txt
===================================================================
--- trunk/src/doc/reunions/reunion-2011-12-14.txt 2011-12-15 11:05:49 UTC (rev 194)
+++ trunk/src/doc/reunions/reunion-2011-12-14.txt 2011-12-15 20:46:14 UTC (rev 195)
@@ -34,6 +34,20 @@
- Le SampleData#dataValue peut-être nulle (Float et pas float).
+Réalisation modèle pêche
+------------------------
+
+- Report des modifications du modèle
+- Remplissage du référentiel OperationEvent
+- Remplissage du référentiel SampleDataType
+- Remplissage du référentiel SampleType
+- Création entité BiometryScale
+- Remplissage du référentiel BiometryScale
+- Remplissage du référentiel SexCategory
+- Remplissage du référentiel SizeCategory
+- Remplissage du référentiel OperationMetadata
+- Remplissage du référentiel GearMetadata
+
Action
------
1
0
r194 - trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importDb
by tchemit@users.forge.codelutin.com 15 Dec '11
by tchemit@users.forge.codelutin.com 15 Dec '11
15 Dec '11
Author: tchemit
Date: 2011-12-15 12:05:49 +0100 (Thu, 15 Dec 2011)
New Revision: 194
Url: http://forge.codelutin.com/repositories/revision/echobase/194
Log:
use exploded import service
Modified:
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importDb/LaunchImport.java
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importDb/LaunchImport.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importDb/LaunchImport.java 2011-12-15 11:05:26 UTC (rev 193)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importDb/LaunchImport.java 2011-12-15 11:05:49 UTC (rev 194)
@@ -26,7 +26,7 @@
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.Preparable;
import fr.ifremer.echobase.services.CsvImportResult;
-import fr.ifremer.echobase.services.DbImportExportService;
+import fr.ifremer.echobase.services.DbImportService;
import fr.ifremer.echobase.services.ImportDbConfiguration;
import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport;
import org.apache.commons.logging.Log;
@@ -54,7 +54,7 @@
protected CsvImportResult importResult;
/** service to execute the import. */
- protected transient DbImportExportService service;
+ protected transient DbImportService service;
protected ActionContext actionContext;
@@ -77,7 +77,7 @@
}
model = getEchoBaseSession().getImportDbConfiguration();
- service = newService(DbImportExportService.class);
+ service = newService(DbImportService.class);
}
@Override
@@ -88,9 +88,10 @@
ActionContext.setContext(actionContext);
// we must use a standalone transaction since it will pass through
- // in more thna one request
+ // in more than one request
- TopiaContextImplementor tx = (TopiaContextImplementor) serviceContext.getTransaction();
+ TopiaContextImplementor tx =
+ (TopiaContextImplementor) serviceContext.getTransaction();
TopiaContextImplementor rootContext = tx.getRootContext();
TopiaContext topiaContext = rootContext.beginTransaction();
serviceContext.setTransaction(topiaContext);
1
0
r193 - trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export
by tchemit@users.forge.codelutin.com 15 Dec '11
by tchemit@users.forge.codelutin.com 15 Dec '11
15 Dec '11
Author: tchemit
Date: 2011-12-15 12:05:26 +0100 (Thu, 15 Dec 2011)
New Revision: 193
Url: http://forge.codelutin.com/repositories/revision/echobase/193
Log:
fix layout
Modified:
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/createEmbeddedApplication.jsp
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/createEmbeddedApplication.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/createEmbeddedApplication.jsp 2011-12-15 11:05:12 UTC (rev 192)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/export/createEmbeddedApplication.jsp 2011-12-15 11:05:26 UTC (rev 193)
@@ -34,7 +34,7 @@
<fieldset>
<legend><s:text name="echobase.legend.embeddedApplication.configuration"/></legend>
- <s:checkboxlist list="voyages" key="voyageIds"
+ <s:checkboxlist list="voyages" key="voyageIds" template="mycheckboxlist"
label="%{getText('echobase.label.voyageToSelect')}"/>
<s:textfield key="fileName" required="true" size="100"
@@ -46,14 +46,19 @@
<s:if test="!hasActionErrors()">
<br/>
- <s:submit key="echobase.action.createEmbeddedApplication"
- action="downloadEmbeddedApplication"
- align="right"/>
+
</s:if>
</fieldset>
- <div>(*) Il s'agit du nom de l'archvie et du répertoire contenu dans l'archive,
+
+ <br/>
+
+ <s:submit key="echobase.action.createEmbeddedApplication"
+ action="downloadEmbeddedApplication"
+ align="right"/>
+
+ <div>(*) Il s'agit du nom de l'archive et du répertoire contenu dans l'archive,
l'extension <strong>.zip</strong> sera automatiquement rajoutée.</div>
</s:form>
1
0
r192 - trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importDb
by tchemit@users.forge.codelutin.com 15 Dec '11
by tchemit@users.forge.codelutin.com 15 Dec '11
15 Dec '11
Author: tchemit
Date: 2011-12-15 12:05:12 +0100 (Thu, 15 Dec 2011)
New Revision: 192
Url: http://forge.codelutin.com/repositories/revision/echobase/192
Log:
more time for wait in import db action
Modified:
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importDb/progress.jsp
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importDb/progress.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importDb/progress.jsp 2011-12-15 11:04:07 UTC (rev 191)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importDb/progress.jsp 2011-12-15 11:05:12 UTC (rev 192)
@@ -26,7 +26,7 @@
<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
<s:url id="url" action="doImport" namespace="/importDb"/>
-<meta http-equiv="refresh" content="1;url=${url}"/>
+<meta http-equiv="refresh" content="5;url=${url};"/>
<title><s:text name="echobase.title.importDbProgress"/></title>
1
0
r191 - in trunk/echobase-ui/src/main/env: dev/resources prod/resources
by tchemit@users.forge.codelutin.com 15 Dec '11
by tchemit@users.forge.codelutin.com 15 Dec '11
15 Dec '11
Author: tchemit
Date: 2011-12-15 12:04:07 +0100 (Thu, 15 Dec 2011)
New Revision: 191
Url: http://forge.codelutin.com/repositories/revision/echobase/191
Log:
improve log levels
Modified:
trunk/echobase-ui/src/main/env/dev/resources/log4j.properties
trunk/echobase-ui/src/main/env/prod/resources/log4j.properties
Modified: trunk/echobase-ui/src/main/env/dev/resources/log4j.properties
===================================================================
--- trunk/echobase-ui/src/main/env/dev/resources/log4j.properties 2011-12-15 11:03:47 UTC (rev 190)
+++ trunk/echobase-ui/src/main/env/dev/resources/log4j.properties 2011-12-15 11:04:07 UTC (rev 191)
@@ -33,3 +33,4 @@
log4j.logger.fr.ifremer.echobase=INFO
log4j.logger.org.nuiton=WARN
log4j.logger.org.nuiton.topia.migration=INFO
+log4j.logger.com.opensymphony.xwork2.util.logging.commons.CommonsLogger=ERROR
Modified: trunk/echobase-ui/src/main/env/prod/resources/log4j.properties
===================================================================
--- trunk/echobase-ui/src/main/env/prod/resources/log4j.properties 2011-12-15 11:03:47 UTC (rev 190)
+++ trunk/echobase-ui/src/main/env/prod/resources/log4j.properties 2011-12-15 11:04:07 UTC (rev 191)
@@ -29,5 +29,6 @@
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy/MM/dd hh:mm:ss} %5p (%F:%L) %m%n
-log4j.logger.fr.ifremer.echobase=WARN
+log4j.logger.fr.ifremer.echobase=INFO
log4j.logger.org.nuiton.topia.migration=INFO
+log4j.logger.com.opensymphony.xwork2.util.logging.commons.CommonsLogger=ERROR
1
0
Author: tchemit
Date: 2011-12-15 12:03:47 +0100 (Thu, 15 Dec 2011)
New Revision: 190
Url: http://forge.codelutin.com/repositories/revision/echobase/190
Log:
readd msaccess importer for float converter,... but perharps We could remove it
Modified:
trunk/echobase-ui/pom.xml
trunk/pom.xml
Modified: trunk/echobase-ui/pom.xml
===================================================================
--- trunk/echobase-ui/pom.xml 2011-12-15 11:03:18 UTC (rev 189)
+++ trunk/echobase-ui/pom.xml 2011-12-15 11:03:47 UTC (rev 190)
@@ -34,6 +34,11 @@
</dependency>
<dependency>
+ <groupId>fr.ird</groupId>
+ <artifactId>msaccess-importer</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.nuiton.web</groupId>
<artifactId>nuiton-struts2</artifactId>
</dependency>
@@ -287,27 +292,7 @@
</configuration>
</plugin>
- </plugins>
- </pluginManagement>
- </build>
-
- <profiles>
-
- <profile>
- <id>do-release</id>
- <activation>
- <property>
- <name>performRelease</name>
- <value>true</value>
- </property>
- </activation>
- <properties>
- <env>prod</env>
- </properties>
-
- <build>
- <plugins>
- <plugin>
+ <plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<archive>
@@ -332,10 +317,13 @@
</overlays>
</configuration>
</plugin>
- </plugins>
- </build>
- </profile>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <profiles>
+
<profile>
<id>selenium</id>
<activation>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-12-15 11:03:18 UTC (rev 189)
+++ trunk/pom.xml 2011-12-15 11:03:47 UTC (rev 190)
@@ -108,7 +108,7 @@
<eugenePluginVersion>2.4.1</eugenePluginVersion>
<topiaVersion>2.6.4</topiaVersion>
- <nuitonUtilsVersion>2.4.1-SNAPSHOT</nuitonUtilsVersion>
+ <nuitonUtilsVersion>2.4.1</nuitonUtilsVersion>
<nuitonI18nVersion>2.4.1</nuitonI18nVersion>
<nuitonWebVersion>1.8</nuitonWebVersion>
<msaccessImporterVersion>1.4.1</msaccessImporterVersion>
@@ -143,6 +143,13 @@
<!-- librairie d'access aux bases ms-access -->
<dependency>
+ <groupId>fr.ird</groupId>
+ <artifactId>msaccess-importer</artifactId>
+ <version>${msaccessImporterVersion}</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
<groupId>com.healthmarketscience.jackcess</groupId>
<artifactId>jackcess</artifactId>
<version>${jackcessVersion}</version>
1
0
r189 - in trunk/src: doc/reunions site/resources/model
by tchemit@users.forge.codelutin.com 15 Dec '11
by tchemit@users.forge.codelutin.com 15 Dec '11
15 Dec '11
Author: tchemit
Date: 2011-12-15 12:03:18 +0100 (Thu, 15 Dec 2011)
New Revision: 189
Url: http://forge.codelutin.com/repositories/revision/echobase/189
Log:
catches model + reunion CR
Added:
trunk/src/site/resources/model/referenceLengthAgeKey.png
trunk/src/site/resources/model/referenceOperation.png
trunk/src/site/resources/model/referenceStrata.png
trunk/src/site/resources/model/referenceWeightLengthKey.png
Modified:
trunk/src/doc/reunions/reunion-2011-12-14.txt
trunk/src/site/resources/model/dataAcoustic.png
trunk/src/site/resources/model/dataCatches.png
trunk/src/site/resources/model/dataCommon.png
trunk/src/site/resources/model/referenceAll.png
trunk/src/site/resources/model/referenceGear.png
Modified: trunk/src/doc/reunions/reunion-2011-12-14.txt
===================================================================
--- trunk/src/doc/reunions/reunion-2011-12-14.txt 2011-12-15 11:02:55 UTC (rev 188)
+++ trunk/src/doc/reunions/reunion-2011-12-14.txt 2011-12-15 11:03:18 UTC (rev 189)
@@ -3,7 +3,7 @@
Mercredi 14-12-2011 (Ifremer)
-Présents : Mathieu et Tony
+Présents : Mathieu, Vincent et Tony
Planning
--------
@@ -11,13 +11,42 @@
- Finaliser le modèle pêche et commencer ses imports
- Présentation de l'application (déployée sur Démo)
+Modèle pêche
+------------
+
+- présentation et discussion autour des modifications effectuées sur le modèle
+ pêche.
+
+- description des imports pêches historiques (depuis baracouda)
+
+Cela semble réalisable :)
+
+- Il reste quelques petits points à finaliser du côte de l'Ifremer
+ (fournir certains référentiels) mais c'est non bloquant pour effectuer
+ l'import des données.
+
+A noter :
+
+ -Station#engin : clef métier d'un engin dans baracouda
+
+ - Attention à bien vérifier que lorsqu'un nombre vaut 0, alors on récupère bien
+ depuis ms-access 0 et non pas null.
+
+ - Le SampleData#dataValue peut-être nulle (Float et pas float).
+
Action
------
- Code
+ - répercuter les modifications du modèle pêche
+ - commencer les import pêches depuis baracouda
+ - livrer une version 0.2 stable avec sur démo les données acoustiques.
+
- Ifremer
+ - fournir les référentiels manquants
+
Prochaine réunion :
- - Lundi 19 à 10h00 à l'Ifremer
\ No newline at end of file
+ - Lundi 19 à 10h00 à l'Ifremer avec Mathieu
\ No newline at end of file
Modified: trunk/src/site/resources/model/dataAcoustic.png
===================================================================
(Binary files differ)
Modified: trunk/src/site/resources/model/dataCatches.png
===================================================================
(Binary files differ)
Modified: trunk/src/site/resources/model/dataCommon.png
===================================================================
(Binary files differ)
Modified: trunk/src/site/resources/model/referenceAll.png
===================================================================
(Binary files differ)
Modified: trunk/src/site/resources/model/referenceGear.png
===================================================================
(Binary files differ)
Added: trunk/src/site/resources/model/referenceLengthAgeKey.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/model/referenceLengthAgeKey.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/src/site/resources/model/referenceOperation.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/model/referenceOperation.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/src/site/resources/model/referenceStrata.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/model/referenceStrata.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/src/site/resources/model/referenceWeightLengthKey.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/resources/model/referenceWeightLengthKey.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: svn:keywords
+ Author Date Id Revision HeadURL
1
0