Author: tchemit Date: 2013-07-05 18:36:48 +0200 (Fri, 05 Jul 2013) New Revision: 1116 Url: http://forge.codelutin.com/projects/tutti/repository/revisions/1116 Log: fixes #2711: [EXPORT GENERIQUE] points ?\195?\160 am?\195?\169liorer Added: trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/export/TuttiExportService2Test.java trunk/tutti-service/src/test/resources/tutti-test-read-dbExport.properties Modified: trunk/pom.xml trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/TuttiCsvUtil.java trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/CatchExportModel.java trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/CatchExportRow.java trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/TuttiExportService.java trunk/tutti-service/src/test/ trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/export/TuttiExportServiceTest.java trunk/tutti-ui-swing/src/license/THIRD-PARTY.properties Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2013-07-04 15:37:34 UTC (rev 1115) +++ trunk/pom.xml 2013-07-05 16:36:48 UTC (rev 1116) @@ -126,7 +126,7 @@ <eugenePluginVersion>2.6.2</eugenePluginVersion> <hibernateVersion>3.6.10.Final</hibernateVersion> - <jaxxVersion>2.5.23</jaxxVersion> + <jaxxVersion>2.5.22</jaxxVersion> <swingXVersion>1.6.4</swingXVersion> <xworkVersion>2.3.15</xworkVersion> Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/TuttiCsvUtil.java =================================================================== --- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/TuttiCsvUtil.java 2013-07-04 15:37:34 UTC (rev 1115) +++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/TuttiCsvUtil.java 2013-07-05 16:36:48 UTC (rev 1116) @@ -131,6 +131,11 @@ return newColumnForExportByDecorator(headerName, propertyName, decorator, null); } + public <T> ExportableColumn<M, T> newNullableColumnForExportByDecorator(String headerName, String propertyName, Decorator<T> decorator) { + DecoratorPropertyFormatter<T> valueFormatter = newDecoratorFormatter(decorator, ""); + return newNullableColumnForExport(headerName, propertyName, valueFormatter); + } + public <T> ExportableColumn<M, T> newColumnForExportByDecorator(String headerName, String propertyName, Decorator<T> decorator, String defaultNullValue) { DecoratorPropertyFormatter<T> valueFormatter = newDecoratorFormatter(decorator, defaultNullValue); return modelBuilder.newColumnForExport(headerName, propertyName, valueFormatter); Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/CatchExportModel.java =================================================================== --- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/CatchExportModel.java 2013-07-04 15:37:34 UTC (rev 1115) +++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/CatchExportModel.java 2013-07-05 16:36:48 UTC (rev 1116) @@ -37,11 +37,12 @@ import fr.ifremer.tutti.persistence.entities.referential.Caracteristic; import fr.ifremer.tutti.persistence.entities.referential.Gear; import fr.ifremer.tutti.persistence.entities.referential.Species; -import fr.ifremer.tutti.persistence.entities.referential.Vessel; import fr.ifremer.tutti.service.DecoratorService; import fr.ifremer.tutti.service.PersistenceService; import fr.ifremer.tutti.service.TuttiCsvUtil; import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import java.io.Serializable; import java.util.List; @@ -55,6 +56,9 @@ */ public class CatchExportModel extends TuttiCsvUtil.AbstractTuttiExportModel<CatchExportRow> { + /** Logger. */ + private static final Log log = LogFactory.getLog(CatchExportModel.class); + public static final String WEIGHT_OR_VOL_TYPE = "Poids"; Map<SampleCategoryEnum, Caracteristic> sampleCategoryToCaracteristics; @@ -102,7 +106,7 @@ // mensuration newNullableColumnForExport("Code_Longueur", CatchExportRow.FREQUENCY_LENGTH_STEP_CARACTERISTIC + "." + Caracteristic.PROPERTY_ID); - newColumnForExportByDecorator("Libelle_Longueur", CatchExportRow.FREQUENCY_LENGTH_STEP_CARACTERISTIC, decoratorService.getDecoratorByType(Caracteristic.class)); + newNullableColumnForExportByDecorator("Libelle_Longueur", CatchExportRow.FREQUENCY_LENGTH_STEP_CARACTERISTIC, decoratorService.getDecoratorByType(Caracteristic.class)); newNullableColumnForExport("Taille", CatchExportRow.FREQUENCY_LENGTH_STEP, TuttiCsvUtil.FLOAT); newNullableColumnForExport("NumOrdre_Taille_H2", CatchExportRow.FREQUENCY_RANK_ORDER, TuttiCsvUtil.INTEGER); newNullableColumnForExport("Poids_Classe_Taille", CatchExportRow.FREQUENCY_WEIGHT, TuttiCsvUtil.FLOAT); @@ -128,15 +132,13 @@ row.setCruise(cruise); row.setFishingOperation(operation); row.setSpecies(speciesBatch.getSpecies()); + row.addComment(speciesBatch.getComment()); if (TuttiEntities.isVracSpeciesBatch(speciesBatch)) { - Float speciesTotalWeight = speciesBatch.getSampleCategoryWeight(); - if (speciesTotalWeight == null) { - speciesTotalWeight = speciesBatch.getSampleCategoryComputedWeight(); - } prepareSortedRows(persistenceService, row, rows, speciesBatch, - speciesCatchRaisingFactor / speciesTotalWeight); + speciesCatchRaisingFactor + ); } else { prepareUnsortedRows(row, rows, speciesBatch); } @@ -147,15 +149,11 @@ row.setCruise(cruise); row.setFishingOperation(operation); row.setSpecies(benthosBatch.getSpecies()); - + row.addComment(benthosBatch.getComment()); if (TuttiEntities.isVracBenthosBatch(benthosBatch)) { - Float speciesTotalWeight = benthosBatch.getSampleCategoryWeight(); - if (speciesTotalWeight == null) { - speciesTotalWeight = benthosBatch.getSampleCategoryComputedWeight(); - } prepareSortedRows(persistenceService, row, rows, benthosBatch, - benthosCatchRaisingFactor / speciesTotalWeight); + benthosCatchRaisingFactor); } else { prepareUnsortedRows(row, rows, benthosBatch); } @@ -166,7 +164,7 @@ CatchExportRow currentRow, List<CatchExportRow> rows, SpeciesBatch speciesBatch, - Float catchRaisingFactor) { + Float raisingFactor) { prepareBatch(currentRow, speciesBatch.getSampleCategoryType(), @@ -184,6 +182,30 @@ List<SpeciesBatchFrequency> speciesBatchFrequency = persistenceService.getAllSpeciesBatchFrequency(speciesBatch.getId()); + // check if there is a sub sampling weight + // if so then adapt raisingFactor + + Float subWeight = TuttiExportService.getValueOrComputedValue( + speciesBatch.getWeight(), speciesBatch.getComputedWeight()); + + if (subWeight != null) { + + float batchWeight = TuttiExportService.getValueOrComputedValue( + speciesBatch.getSampleCategoryWeight(), + speciesBatch.getSampleCategoryComputedWeight()); + + if (batchWeight - subWeight > 0.0001f) { + // sub sample, adapt raising factor + raisingFactor *= batchWeight / subWeight; + + if (log.isDebugEnabled()) { + log.debug("Using a sub sample on leaf : " + + subWeight + " out of " + batchWeight + + ", new raising Factor= " + raisingFactor); + } + } + } + if (CollectionUtils.isEmpty(speciesBatchFrequency)) { // no frequency @@ -192,51 +214,58 @@ // Get reference weight - Float referenceWeight = speciesBatch.getWeight(); + Float referenceWeight = TuttiExportService.getValueOrComputedValue( + speciesBatch.getWeight(), + speciesBatch.getComputedWeight()); if (referenceWeight == null) { - referenceWeight = speciesBatch.getSampleCategoryWeight(); - } - if (referenceWeight == null) { - referenceWeight = speciesBatch.getSampleCategoryComputedWeight(); + referenceWeight = TuttiExportService.getValueOrComputedValue( + speciesBatch.getSampleCategoryWeight(), + speciesBatch.getSampleCategoryComputedWeight()); } - - computeRaisingFactor(row, - catchRaisingFactor, - referenceWeight); + setRaisingFactor(row, + raisingFactor, + referenceWeight); rows.add(row); } else { // there is some frequencies + boolean withNoWeightOnFrequencies = + speciesBatchFrequency.get(0).getWeight() == null; + Float referenceWeight = null; - if (speciesBatchFrequency.get(0).getWeight() == null) { + if (withNoWeightOnFrequencies) { + // no weight on frequencies use upper reference weight - referenceWeight = speciesBatch.getWeight(); + referenceWeight = TuttiExportService.getValueOrComputedValue( + speciesBatch.getWeight(), + speciesBatch.getComputedWeight()); if (referenceWeight == null) { - referenceWeight = speciesBatch.getSampleCategoryWeight(); + referenceWeight = TuttiExportService.getValueOrComputedValue( + speciesBatch.getSampleCategoryWeight(), + speciesBatch.getSampleCategoryComputedWeight()); } + } - if (referenceWeight == null) { - referenceWeight = speciesBatch.getSampleCategoryComputedWeight(); - } - } for (SpeciesBatchFrequency batchFrequency : speciesBatchFrequency) { CatchExportRow row = currentRow.copy(); row.setSpeciesFrequency(batchFrequency); rows.add(row); - if (referenceWeight == null) { + if (!withNoWeightOnFrequencies) { + + // use concrete frequency weight referenceWeight = batchFrequency.getWeight(); } - computeRaisingFactor(row, - catchRaisingFactor, - referenceWeight); + setRaisingFactor(row, + raisingFactor, + referenceWeight); } } @@ -244,12 +273,43 @@ // Yet another sample category to walk through + // Compute total child weights (to adapt raising factor if necessary) + + float childTotalWeight = 0f; for (SpeciesBatch childBatch : speciesBatch.getChildBatchs()) { + float childWeight = TuttiExportService.getValueOrComputedValue( + childBatch.getSampleCategoryWeight(), + childBatch.getSampleCategoryComputedWeight()); + childTotalWeight += childWeight; + } + + float currentWeight = TuttiExportService.getValueOrComputedValue( + speciesBatch.getSampleCategoryWeight(), + speciesBatch.getSampleCategoryComputedWeight()); + + if (currentWeight - childTotalWeight > 0.0001f) { + + // there is a sub sampling + // adapt raising factor + + // sub sample, adapt raising factor + raisingFactor *= currentWeight / childTotalWeight; + + if (log.isDebugEnabled()) { + log.debug("Using a sub sample for childs of category " + + speciesBatch + ": " + childTotalWeight + + " out of " + currentWeight + + ", new raising Factor= " + raisingFactor); + } + } + + for (SpeciesBatch childBatch : speciesBatch.getChildBatchs()) { prepareSortedRows(persistenceService, currentRow, rows, childBatch, - catchRaisingFactor); + raisingFactor + ); } } } @@ -280,7 +340,7 @@ CatchExportRow currentRow, List<CatchExportRow> rows, BenthosBatch benthosBatch, - Float catchRaisingFactor) { + Float raisingFactor) { prepareBatch(currentRow, benthosBatch.getSampleCategoryType(), @@ -298,6 +358,31 @@ List<BenthosBatchFrequency> benthosBatchFrequency = persistenceService.getAllBenthosBatchFrequency(benthosBatch.getId()); + // check if there is a sub sampling weight + // if so then adapt raisingFactor + + Float subWeight = TuttiExportService.getValueOrComputedValue( + benthosBatch.getWeight(), + benthosBatch.getComputedWeight()); + + if (subWeight != null) { + + float batchWeight = TuttiExportService.getValueOrComputedValue( + benthosBatch.getSampleCategoryWeight(), + benthosBatch.getSampleCategoryComputedWeight()); + + if (batchWeight - subWeight > 0.0001f) { + // sub sample, adapt raising factor + raisingFactor *= batchWeight / subWeight; + + if (log.isDebugEnabled()) { + log.debug("Using a sub sample on leaf : " + subWeight + + " out of " + batchWeight + + ", new raising Factor= " + raisingFactor); + } + } + } + if (CollectionUtils.isEmpty(benthosBatchFrequency)) { // no frequency @@ -306,19 +391,19 @@ // Get reference weight - Float referenceWeight = benthosBatch.getWeight(); + Float referenceWeight = TuttiExportService.getValueOrComputedValue( + benthosBatch.getWeight(), + benthosBatch.getComputedWeight()); if (referenceWeight == null) { - referenceWeight = benthosBatch.getSampleCategoryWeight(); + referenceWeight = TuttiExportService.getValueOrComputedValue( + benthosBatch.getSampleCategoryWeight(), + benthosBatch.getSampleCategoryComputedWeight()); } - if (referenceWeight == null) { - referenceWeight = benthosBatch.getSampleCategoryComputedWeight(); - } - - computeRaisingFactor(row, - catchRaisingFactor, - referenceWeight); + setRaisingFactor(row, + raisingFactor, + referenceWeight); rows.add(row); } else { @@ -326,19 +411,22 @@ Float referenceWeight = null; - if (benthosBatchFrequency.get(0).getWeight() == null) { + boolean withNoWeightOnFrequencies = + benthosBatchFrequency.get(0).getWeight() == null; + if (withNoWeightOnFrequencies) { + // no weight on frequencies use upper reference weight - referenceWeight = benthosBatch.getWeight(); + referenceWeight = TuttiExportService.getValueOrComputedValue( + benthosBatch.getWeight(), + benthosBatch.getComputedWeight()); if (referenceWeight == null) { - referenceWeight = benthosBatch.getSampleCategoryWeight(); + referenceWeight = TuttiExportService.getValueOrComputedValue( + benthosBatch.getSampleCategoryWeight(), + benthosBatch.getSampleCategoryComputedWeight()); } - - if (referenceWeight == null) { - referenceWeight = benthosBatch.getSampleCategoryComputedWeight(); - } } for (BenthosBatchFrequency batchFrequency : benthosBatchFrequency) { @@ -346,11 +434,13 @@ row.setBenthosFrequency(batchFrequency); rows.add(row); - if (referenceWeight == null) { + if (!withNoWeightOnFrequencies) { + + // use concrete frequency weight referenceWeight = batchFrequency.getWeight(); } - computeRaisingFactor(row, catchRaisingFactor, referenceWeight); + setRaisingFactor(row, raisingFactor, referenceWeight); } } @@ -358,12 +448,41 @@ // Yet another sample category to walk through + // Compute total child weights (to adapt raising factor if necessary) + + float childTotalWeight = 0f; for (BenthosBatch childBatch : benthosBatch.getChildBatchs()) { + float childWeight = TuttiExportService.getValueOrComputedValue( + childBatch.getSampleCategoryWeight(), + childBatch.getSampleCategoryComputedWeight()); + childTotalWeight += childWeight; + } + + Float currentWeight = TuttiExportService.getValueOrComputedValue( + benthosBatch.getSampleCategoryWeight(), + benthosBatch.getSampleCategoryComputedWeight()); + + if (currentWeight - childTotalWeight > 0.0001f) { + + // there is a sub sampling + // adapt raising factor + + // sub sample, adapt raising factor + raisingFactor *= currentWeight / childTotalWeight; + + if (log.isDebugEnabled()) { + log.debug("Using a sub sample for childs of category " + + benthosBatch + ": " + childTotalWeight + + " out of " + currentWeight + + ", new raising Factor= " + raisingFactor); + } + } + for (BenthosBatch childBatch : benthosBatch.getChildBatchs()) { prepareSortedRows(persistenceService, currentRow, rows, childBatch, - catchRaisingFactor); + raisingFactor); } } } @@ -391,10 +510,9 @@ rows.add(row); } - protected void computeRaisingFactor(CatchExportRow row, - float catchRaisingFactor, - float referenceWeight) { - float raisingFactor = referenceWeight / catchRaisingFactor; + protected void setRaisingFactor(CatchExportRow row, + float raisingFactor, + float referenceWeight) { row.setReferenceWeight(referenceWeight); row.setRaisingFactor(raisingFactor); } Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/CatchExportRow.java =================================================================== --- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/CatchExportRow.java 2013-07-04 15:37:34 UTC (rev 1115) +++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/CatchExportRow.java 2013-07-05 16:36:48 UTC (rev 1116) @@ -24,7 +24,9 @@ * #L% */ +import com.google.common.base.Joiner; import com.google.common.base.Preconditions; +import com.google.common.collect.Lists; import com.google.common.collect.Maps; import fr.ifremer.tutti.persistence.entities.data.BenthosBatchFrequency; import fr.ifremer.tutti.persistence.entities.data.Cruise; @@ -35,9 +37,11 @@ import fr.ifremer.tutti.persistence.entities.referential.Gear; import fr.ifremer.tutti.persistence.entities.referential.Species; import fr.ifremer.tutti.persistence.entities.referential.Vessel; +import org.apache.commons.lang3.StringUtils; import java.io.Serializable; import java.util.Date; +import java.util.List; import java.util.Map; /** @@ -96,6 +100,8 @@ protected Integer batchNumber; + protected List<String> comment; + public void setCruise(Cruise cruise) { this.cruise = cruise; } @@ -232,6 +238,24 @@ result.setRaisingFactor(raisingFactor); result.setReferenceWeight(referenceWeight); result.setBatchNumber(batchNumber); + result.comment = comment; return result; } + + public void addComment(String comment) { + if (this.comment == null) { + this.comment = Lists.newArrayList(); + } + this.comment.add(StringUtils.isEmpty(comment) ? "" : comment); + } + + public String getComment() { + String result; + if (comment == null) { + result = ""; + } else { + result = Joiner.on('|').join(comment); + } + return result; + } } \ No newline at end of file Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/TuttiExportService.java =================================================================== --- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/TuttiExportService.java 2013-07-04 15:37:34 UTC (rev 1115) +++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/TuttiExportService.java 2013-07-05 16:36:48 UTC (rev 1116) @@ -116,7 +116,7 @@ protected Caracteristic pmfmIdCaracteristic; - public static Float getValueOrComputedValue(Float value, Float computedValue) { + public static Float getValueOrComputedValue(Float value, Float computedValue) { return value == null ? computedValue : value; } @@ -526,20 +526,50 @@ rootSpeciesBatch, rootBenthosBatch); - Float totalWeight = catchBatch.getCatchTotalWeight(); + Float totalWeight = getValueOrComputedValue( + catchBatch.getCatchTotalWeight(), + catchBatch.getCatchTotalComputedWeight()); - if (totalWeight == null) { - totalWeight = catchBatch.getCatchTotalComputedWeight(); - } + Float totalUnsortedWeight = + catchBatch.getCatchTotalUnsortedComputedWeight(); - Float totalUnsortedWeight = catchBatch.getCatchTotalUnsortedComputedWeight(); - Float totalSpeciesWeight = catchBatch.getSpeciesTotalSampleSortedComputedWeight(); - Float totalBenthosWeight = catchBatch.getBenthosTotalSampleSortedComputedWeight(); + Float totalSortedSpeciesWeight = getValueOrComputedValue( + catchBatch.getSpeciesTotalSortedWeight(), + catchBatch.getSpeciesTotalSortedComputedWeight()); - Float speciesCatchRaisingFactor = (totalWeight - totalUnsortedWeight) / (totalSpeciesWeight); - Float benthosCatchRaisingFactor = (totalWeight - totalUnsortedWeight) / (totalBenthosWeight); + Float totalSampleSortedSpeciesWeight = + catchBatch.getSpeciesTotalSampleSortedComputedWeight(); + Float totalSortedBenthosWeight = getValueOrComputedValue( + catchBatch.getBenthosTotalSortedWeight(), + catchBatch.getBenthosTotalSortedComputedWeight()); + + Float totalSampleSortedBenthosWeight = + catchBatch.getBenthosTotalSampleSortedComputedWeight(); + + Float totalSortedWeight = catchBatch.getCatchTotalSortedComputedWeight(); + + // (Poids de la capture totale - poids du HV dans la capture totale) / (poids total capture triée - poids du HV dans la capture totale) + + Float catchRaisingFactor = (totalWeight - totalUnsortedWeight) / totalSortedWeight; + + Float speciesCatchRaisingFactor = totalSampleSortedSpeciesWeight == 0 ? 0 : (totalSortedSpeciesWeight / totalSampleSortedSpeciesWeight) * catchRaisingFactor; + Float benthosCatchRaisingFactor = totalSampleSortedBenthosWeight == 0 ? 0 : (totalSortedBenthosWeight / totalSampleSortedBenthosWeight) * catchRaisingFactor; + + if (log.isDebugEnabled()) { + String message = "\ncatchTotalWeight : " + totalWeight + + "\ncatchTotalUnsortedWeight : " + totalUnsortedWeight + + "\ntotalSampleSortedSpeciesWeight : " + totalSampleSortedSpeciesWeight + + "\ntotalSampleSortedBenthosWeight : " + totalSampleSortedBenthosWeight + + "\ntotalSortedWeight : " + totalSortedWeight + + "\ncatchRaisingFactor : " + catchRaisingFactor + + "\nspeciesCatchRaisingFactor : " + speciesCatchRaisingFactor + + "\nbenthosCatchRaisingFactor : " + benthosCatchRaisingFactor; + + log.debug(message); + } + List<CatchExportRow> rows = Lists.newArrayList(); exportContext.catchModel.prepareRows(persistenceService, rows, Property changes on: trunk/tutti-service/src/test ___________________________________________________________________ Modified: svn:ignore - dbCGFS + dbCGFS dbExport Added: trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/export/TuttiExportService2Test.java =================================================================== --- trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/export/TuttiExportService2Test.java (rev 0) +++ trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/export/TuttiExportService2Test.java 2013-07-05 16:36:48 UTC (rev 1116) @@ -0,0 +1,188 @@ +package fr.ifremer.tutti.service.export; + +/* + * #%L + * Tutti :: Service + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2012 - 2013 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import com.google.common.collect.Lists; +import com.google.common.io.Files; +import fr.ifremer.tutti.persistence.ProgressionModel; +import fr.ifremer.tutti.persistence.entities.TuttiEntities; +import fr.ifremer.tutti.persistence.entities.data.Cruise; +import fr.ifremer.tutti.persistence.entities.data.FishingOperation; +import fr.ifremer.tutti.persistence.entities.data.IndividualObservationBatch; +import fr.ifremer.tutti.persistence.entities.data.MarineLitterBatch; +import fr.ifremer.tutti.persistence.entities.data.Program; +import fr.ifremer.tutti.persistence.entities.referential.TuttiLocation; +import fr.ifremer.tutti.service.PersistenceService; +import fr.ifremer.tutti.service.ServiceDbResource; +import fr.ifremer.tutti.service.TuttiServiceContext; +import org.apache.commons.io.Charsets; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.junit.Assert; +import org.junit.Before; +import org.junit.ClassRule; +import org.junit.Test; + +import java.io.File; +import java.io.IOException; +import java.util.List; + +/** + * Test export of catches. + * + * @author tchemit <chemit@codelutin.com> + * @since 2.3.2 + */ +public class TuttiExportService2Test { + + /** Logger. */ + private static final Log log = + LogFactory.getLog(TuttiExportService2Test.class); + + @ClassRule + public static final ServiceDbResource dbResource = + ServiceDbResource.readDb("dbExport"); + + public static final String PROGRAM_ID = "CAM-TEST_ELEVATION"; + + public static final String CRUISE_ID = "100003"; + + public static final String OPERATION_1_ID = "100112"; + + public static final String OPERATION_2_ID = "100113"; + + public static final String CATCH_CONTENT = + "Annee;Serie;Serie_Partielle;Engin;Id_Operation;NumOrdre_Station;Poche;Navire;Taxon;Nom scientifique;Commentaire;VracHorsVrac;Num_Ordre_VracHorsVrac_H2;Tot_VracHorsVrac;Ech_VracHorsVrac;Type_Volume_Poids_VracHorsVrac;Unite_Volume_Poids_VracHorsVrac;Cat_Tri;Num_Ordre_Cat_Tri_H2;Tot_Cat_Tri;Ech_Cat_Tri;Type_Volume_Poids_Cat_Tri;Unite_Volume_Poids_Cat_Tri;Sexe;Num_Ordre_Sexe_H2;Tot_Sexe;Ech_Sexe;Type_Volume_Poids_Sexe;Unite_Volume_Poids_Sexe;Maturite;Num_Ordre_Maturite_H2;Tot_Maturite;Ech_Maturite;Type_Volume_Poids_Maturite;Unite_Volume_Poids_Maturite;Age;Num_Ordre_Age_H2;Tot_Age;Ech_Age;Type_Volume_Poids_Age;Unite_Volume_Poids_Age;Code_Longueur;Libelle_Longueur;Taille;NumOrdre_Taille_H2;Poids_Classe_Taille;Unite_Taille;Precision_Mesure;Nbr;Poids_Reference;Coef_Final_Elevation\n" + + "2013;test elevation;1;OTB 20/28.10;A;1;1;278970;1938;Agonus cataphractus;;Vrac;1;80.0;;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;;;;;;;;;80.0;5.4444447;\n" + + "2013;test elevation;1;OTB 20/28.10;A;1;1;278970;1358;Alosa alosa;;Vrac;2;;;Poids;;NA;;;;;;Mâle;1;60.0;;Poids;;NA;;;;;;NA;;;;;;;;;;;;;;60.0;5.4444447;\n" + + "2013;test elevation;1;OTB 20/28.10;A;1;1;278970;1358;Alosa alosa;;Vrac;2;;;Poids;;NA;;;;;;Femelle;2;40.0;;Poids;;NA;;;;;;NA;;;;;;306;Longueur totale (LT) - individu - totale - Mesure au cm par un observateur;5.0;1;0.6;cm;1.0;4;0.6;217.77779;\n" + + "2013;test elevation;1;OTB 20/28.10;A;1;1;278970;1358;Alosa alosa;;Vrac;2;;;Poids;;NA;;;;;;Femelle;2;40.0;;Poids;;NA;;;;;;NA;;;;;;306;Longueur totale (LT) - individu - totale - Mesure au cm par un observateur;6.0;2;0.4;cm;1.0;10;0.4;217.77779;\n" + + "2013;test elevation;1;OTB 20/28.10;A;1;1;278970;1938;Agonus cataphractus;;Hors Vrac;1;20.0;;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;;;;;;;;;20.0;1.0;\n" + + "2013;test elevation;1;OTB 20/28.10;B;2;1;278970;1938;Agonus cataphractus;;Vrac;1;80.0;;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;;;;;;;;;80.0;3.5;\n" + + "2013;test elevation;1;OTB 20/28.10;B;2;1;278970;1358;Alosa alosa;;Vrac;2;;;Poids;;NA;;;;;;Mâle;1;60.0;;Poids;;NA;;;;;;NA;;;;;;;;;;;;;;60.0;3.5;\n" + + "2013;test elevation;1;OTB 20/28.10;B;2;1;278970;1358;Alosa alosa;;Vrac;2;;;Poids;;NA;;;;;;Femelle;2;40.0;;Poids;;NA;;;;;;NA;;;;;;;;;;;;;;40.0;3.5;\n" + + "2013;test elevation;1;OTB 20/28.10;B;2;1;278970;1938;Agonus cataphractus;;Hors Vrac;1;20.0;;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;;;;;;;;;20.0;1.0;\n" + + "2013;test elevation;1;OTB 20/28.10;B;2;1;278970;4622;Abietinaria abietina;;Vrac;1;30.0;;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;;;;;;;;;30.0;7.0;\n" + + "2013;test elevation;1;OTB 20/28.10;B;2;1;278970;380;Acanthocardia echinata;;Vrac;2;18.0;;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;;;;;;;;;18.0;7.0;"; + + + protected TuttiExportService service; + + protected PersistenceService persistenceService; + + protected Program program; + + protected Cruise cruise; + + protected Cruise cruiseCGFS; + + protected List<FishingOperation> operations; + + protected List<MarineLitterBatch> marineLitters; + + protected List<IndividualObservationBatch> individualObservations; + + protected ProgressionModel progressionModel; + + protected File dataDirectory; + + @Before + public void setUp() throws Exception { + + dataDirectory = dbResource.getServiceConfig().getDataDirectory(); + + TuttiServiceContext serviceContext = dbResource.getServiceContext(); + + persistenceService = serviceContext.getService(PersistenceService.class); + + // set export country id in configuration + List<TuttiLocation> allCountry = persistenceService.getAllCountry(); + Assert.assertNotNull(allCountry); + Assert.assertFalse(allCountry.isEmpty()); + TuttiLocation franceCountry = TuttiEntities.splitById(allCountry).get("12"); + Assert.assertNotNull(franceCountry); + dbResource.getServiceConfig().setExportCountry(franceCountry.getId()); + + service = serviceContext.getService(TuttiExportService.class); + + loadData(PROGRAM_ID, CRUISE_ID); + Assert.assertEquals(2, operations.size()); + Assert.assertEquals(OPERATION_1_ID, operations.get(0).getId()); + Assert.assertEquals(OPERATION_2_ID, operations.get(1).getId()); + + progressionModel = new ProgressionModel(); + progressionModel.setTotal(8); + } + + @Test + public void exportCatches() throws Exception { + + TuttiExportService.ExportContext exportContext = + service.createExportContext(dataDirectory, null); + + try { + service.exportCatches(exportContext, cruise, operations); + } finally { + exportContext.close(); + } + assertFileContent("Catch export:\n", + exportContext.catchFile, + CATCH_CONTENT); + } + + protected void assertFileContent(String message, + File actualFile, + String expectedContent) throws IOException { + Assert.assertTrue(actualFile.exists()); + String fileContent = Files.toString(actualFile, + Charsets.UTF_8).trim(); + Assert.assertEquals(expectedContent, fileContent); + + if (log.isInfoEnabled()) { + log.info(message + fileContent); + } + } + + protected void loadData(String programId, String cruiseId) { + program = persistenceService.getProgram(programId); + Assert.assertNotNull(program); + + cruise = persistenceService.getCruise(cruiseId); + Assert.assertNotNull(cruise); + + operations = persistenceService.getAllFishingOperation(cruise.getId()); + Assert.assertNotNull(operations); + + // load fully operations + List<FishingOperation> loadedOperations = + Lists.newArrayListWithCapacity(operations.size()); + for (FishingOperation operation : operations) { + FishingOperation loadedOeration = + persistenceService.getFishingOperation(operation.getId()); + loadedOperations.add(loadedOeration); + } + operations = loadedOperations; + } +} Property changes on: trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/export/TuttiExportService2Test.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Modified: trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/export/TuttiExportServiceTest.java =================================================================== --- trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/export/TuttiExportServiceTest.java 2013-07-04 15:37:34 UTC (rev 1115) +++ trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/export/TuttiExportServiceTest.java 2013-07-05 16:36:48 UTC (rev 1116) @@ -78,15 +78,15 @@ public static final String OPERATION_2_ID = "100107"; public static final String SURVEY_CONTENT = - "Annee;Serie;Serie_Partielle;Navire;Pays;Zone_Etude;Id_Sismer;Nombre_de_poche;Date_Deb_Campagne;Port_Deb_Campagne;Date_Fin_Campagne;Port_Fin_Campagne;Engin;Chef_Mission;Resp_Salle_Tri;Commentaire\n" + - "2013;Campagne CGFS;;278970;FRA;CGFS - Manche Est / Sud Mer du Nord;Campagne CGFS_2013;1;01/05/2013 00:00:00;La Barbotière (Gujan-Mestras);31/05/2013 00:00:00;Etang de Palo;GOV 19.7/25.9;Vincent AURECHE;;;"; + "Annee;Serie;Serie_Partielle;Navire;Pays;Zone_Etude;Id_Sismer;Date_Deb_Campagne;Port_Deb_Campagne;Date_Fin_Campagne;Port_Fin_Campagne;Chef_Mission;Resp_Salle_Tri;Commentaire\n" + + "2013;Campagne CGFS;;278970;FRA;CGFS - Manche Est / Sud Mer du Nord;Campagne CGFS_2013;01/05/2013 00:00:00;La Barbotière (Gujan-Mestras);31/05/2013 00:00:00;Etang de Palo;Vincent AURECHE;;;"; public static final String OPERATION_WITH_NO_CATCH_CONTENT = - "Annee;Serie;Serie_Partielle;Id_Operation;NumOrdre_Station;Poche;Engin;Navire;DateDeb_Op;LatDeb;LongDeb;DateFin_Op;LatFin;LongFin;Duree;Strate;Sous-Strate;Localite;Validite_OP;Rectiligne;Distance;Ouv_Verticale;Ouv_Horizontale_Ailes;Ouv_Horizontale_Panneaux;Saisisseur;Commentaire;Poids_Total;Poids_Total_Calcule;Poids_Total_Vrac;Poids_Total_Vrac_Calcule;Poids_Total_HorsVrac;Poids_Total_HorsVrac_Calcule;Poids_Total_Non_Trie;Poids_Total_Non_Trie_Calcule;Poids_Total_Tremis;Poids_Total_Tremis_Calcule;Poids_Total_Carroussel;Poids_Total_Carroussel_Calcule;Poids_Total_Espece;Poids_Total_Espece_Calcule;Poids_Total_Espece_Vrac;Poids_Total_Espece_Vrac_Calcule;Poids_Total_Espece_Vrac_Trie;Poids_Total_Espece_Vrac_Trie_Calcule;Poids_Total_Espece_HorsVrac;Poids_Total_Espece_HorsVrac_Calcule;Poids_Total_Espece_Inerte_Trie;Poids_Total_Espece_Inerte_Trie_Calcule;Poids_Total_Espece_Vivant_non_detaille_trie;Poids_Total_Espece_Vivant_non_detaille_trie_Calcule;Poids_Total_Benthos;Poids_Total_Benthos_Calcule;Poids_Total_Benthos_Vrac;Poids_Total_Benthos_Vrac_Calcule;Poids_Total_Benthos_Vrac_Trie;Poids_Total_Benthos_Vrac_Trie_Calcule;Poids_Total_Benthos_HorsVrac;Poids_Total_Benthos_HorsVrac_Calcule;Poids_Total_Benthos_Inerte_Trie;Poids_Total_Benthos_Inerte_Trie_Calcule;Poids_Total_Benthos_Vivant_non_detaille_trie;Poids_Total_Benthos_Vivant_non_detaille_trie_Calcule;Poids_Total_Macro_Dechet;Poids_Total_Macro_Dechet_Calcule\n" + + "Annee;Serie;Serie_Partielle;Code_Station;Numero_Trait;Poche;Engin;Navire;DateDeb_Op;LatDeb;LongDeb;DateFin_Op;LatFin;LongFin;Duree;Strate;Sous-Strate;Localite;Validite_OP;Rectiligne;Distance;Ouv_Verticale;Ouv_Horizontale_Ailes;Ouv_Horizontale_Panneaux;Saisisseur;Commentaire;Poids_Total;Poids_Total_Calcule;Poids_Total_Vrac;Poids_Total_Vrac_Calcule;Poids_Total_HorsVrac;Poids_Total_HorsVrac_Calcule;Poids_Total_Non_Trie;Poids_Total_Non_Trie_Calcule;Poids_Total_Tremis;Poids_Total_Tremis_Calcule;Poids_Total_Carroussel;Poids_Total_Carroussel_Calcule;Poids_Total_Espece;Poids_Total_Espece_Calcule;Poids_Total_Espece_Vrac;Poids_Total_Espece_Vrac_Calcule;Poids_Total_Espece_Vrac_Trie;Poids_Total_Espece_Vrac_Trie_Calcule;Poids_Total_Espece_HorsVrac;Poids_Total_Espece_HorsVrac_Calcule;Poids_Total_Espece_Inerte_Trie;Poids_Total_Espece_Inerte_Trie_Calcule;Poids_Total_Espece_Vivant_non_detaille_trie;Poids_Total_Espece_Vivant_non_detaille_trie_Calcule;Poids_Total_Benthos;Poids_Total_Benthos_Calcule;Poids_Total_Benthos_Vrac;Poids_Total_Benthos_Vrac_Calcule;Poids_Total_Benthos_Vrac_Trie;Poids_Total_Benthos_Vrac_Trie_Calcule;Poids_Total_Benthos_HorsVrac;Poids_Total_Benthos_HorsVrac_Calcule;Poids_Total_Benthos_Inerte_Trie;Poids_Total_Benthos_Inerte_Trie_Calcule;Poids_Total_Benthos_Vivant_non_detaille_trie;Poids_Total_Benthos_Vivant_non_detaille_trie_Calcule;Poids_Total_Macro_Dechet;Poids_Total_Macro_Dechet_Calcule\n" + "2010;Campagne CGFS;;65;65;1;GOV 19.7/25.9;278970;13/10/2010 13:35:00;50.22833;0.31833;13/10/2010 14:05:00;50.22167;0.28333;30;Strate 4J;NA;Localité 4J2;N;Y;2512.0;NA;NA;NA;;avarie - chalut annulé completement à poil;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;"; public static final String OPERATION_CONTENT = - "Annee;Serie;Serie_Partielle;Id_Operation;NumOrdre_Station;Poche;Engin;Navire;DateDeb_Op;LatDeb;LongDeb;DateFin_Op;LatFin;LongFin;Duree;Strate;Sous-Strate;Localite;Validite_OP;Rectiligne;Distance;Ouv_Verticale;Ouv_Horizontale_Ailes;Ouv_Horizontale_Panneaux;Saisisseur;Commentaire;Poids_Total;Poids_Total_Calcule;Poids_Total_Vrac;Poids_Total_Vrac_Calcule;Poids_Total_HorsVrac;Poids_Total_HorsVrac_Calcule;Poids_Total_Non_Trie;Poids_Total_Non_Trie_Calcule;Poids_Total_Tremis;Poids_Total_Tremis_Calcule;Poids_Total_Carroussel;Poids_Total_Carroussel_Calcule;Poids_Total_Espece;Poids_Total_Espece_Calcule;Poids_Total_Espece_Vrac;Poids_Total_Espece_Vrac_Calcule;Poids_Total_Espece_Vrac_Trie;Poids_Total_Espece_Vrac_Trie_Calcule;Poids_Total_Espece_HorsVrac;Poids_Total_Espece_HorsVrac_Calcule;Poids_Total_Espece_Inerte_Trie;Poids_Total_Espece_Inerte_Trie_Calcule;Poids_Total_Espece_Vivant_non_detaille_trie;Poids_Total_Espece_Vivant_non_detaille_trie_Calcule;Poids_Total_Benthos;Poids_Total_Benthos_Calcule;Poids_Total_Benthos_Vrac;Poids_Total_Benthos_Vrac_Calcule;Poids_Total_Benthos_Vrac_Trie;Poids_Total_Benthos_Vrac_Trie_Calcule;Poids_Total_Benthos_HorsVrac;Poids_Total_Benthos_HorsVrac_Calcule;Poids_Total_Benthos_Inerte_Trie;Poids_Total_Benthos_Inerte_Trie_Calcule;Poids_Total_Benthos_Vivant_non_detaille_trie;Poids_Total_Benthos_Vivant_non_detaille_trie_Calcule;Poids_Total_Macro_Dechet;Poids_Total_Macro_Dechet_Calcule\n" + + "Annee;Serie;Serie_Partielle;Code_Station;Numero_Trait;Poche;Engin;Navire;DateDeb_Op;LatDeb;LongDeb;DateFin_Op;LatFin;LongFin;Duree;Strate;Sous-Strate;Localite;Validite_OP;Rectiligne;Distance;Ouv_Verticale;Ouv_Horizontale_Ailes;Ouv_Horizontale_Panneaux;Saisisseur;Commentaire;Poids_Total;Poids_Total_Calcule;Poids_Total_Vrac;Poids_Total_Vrac_Calcule;Poids_Total_HorsVrac;Poids_Total_HorsVrac_Calcule;Poids_Total_Non_Trie;Poids_Total_Non_Trie_Calcule;Poids_Total_Tremis;Poids_Total_Tremis_Calcule;Poids_Total_Carroussel;Poids_Total_Carroussel_Calcule;Poids_Total_Espece;Poids_Total_Espece_Calcule;Poids_Total_Espece_Vrac;Poids_Total_Espece_Vrac_Calcule;Poids_Total_Espece_Vrac_Trie;Poids_Total_Espece_Vrac_Trie_Calcule;Poids_Total_Espece_HorsVrac;Poids_Total_Espece_HorsVrac_Calcule;Poids_Total_Espece_Inerte_Trie;Poids_Total_Espece_Inerte_Trie_Calcule;Poids_Total_Espece_Vivant_non_detaille_trie;Poids_Total_Espece_Vivant_non_detaille_trie_Calcule;Poids_Total_Benthos;Poids_Total_Benthos_Calcule;Poids_Total_Benthos_Vrac;Poids_Total_Benthos_Vrac_Calcule;Poids_Total_Benthos_Vrac_Trie;Poids_Total_Benthos_Vrac_Trie_Calcule;Poids_Total_Benthos_HorsVrac;Poids_Total_Benthos_HorsVrac_Calcule;Poids_Total_Benthos_Inerte_Trie;Poids_Total_Benthos_Inerte_Trie_Calcule;Poids_Total_Benthos_Vivant_non_detaille_trie;Poids_Total_Benthos_Vivant_non_detaille_trie_Calcule;Poids_Total_Macro_Dechet;Poids_Total_Macro_Dechet_Calcule\n" + "2013;Campagne CGFS;;A;1;1;GOV 19.7/25.9;278970;01/05/2013 00:00:00;;;01/05/2013 00:23:00;;;23;Strate 1D;NA;Localité 1D2;?;N;;NA;NA;NA;Vincent AURECHE;op1;120.0;Y;100.0;Y;20.0;Y;0.0;Y;;?;;?;120.0;Y;100.0;Y;100.0;Y;20.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;6.0;Y;\n" + "2013;Campagne CGFS;;A;2;1;GOV 19.7/25.9;278970;11/05/2013 08:00:00;;;11/05/2013 08:23:00;;;23;Strate 1D;NA;Localité 1D2;?;N;;NA;NA;NA;Robert BELLAIL|Herve BARONE;OP2;0.0;Y;0.0;Y;0.0;Y;0.0;Y;;?;;?;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;"; @@ -101,72 +101,72 @@ "2013;Campagne CGFS;;A;2;1;308;Nombre d'engin - engin - totale - Déclaration d'un professionnel;2.0;"; public static final String CATCH_CONTENT = - "Annee;Serie;Serie_Partielle;Engin;Id_Operation;NumOrdre_Station;Poche;Navire;Taxon;VracHorsVrac;Num_Ordre_VracHorsVrac_H2;Tot_VracHorsVrac;Ech_VracHorsVrac;Type_Volume_Poids_VracHorsVrac;Unite_Volume_Poids_VracHorsVrac;Cat_Tri;Num_Ordre_Cat_Tri_H2;Tot_Cat_Tri;Ech_Cat_Tri;Type_Volume_Poids_Cat_Tri;Unite_Volume_Poids_Cat_Tri;Sexe;Num_Ordre_Sexe_H2;Tot_Sexe;Ech_Sexe;Type_Volume_Poids_Sexe;Unite_Volume_Poids_Sexe;Maturite;Num_Ordre_Maturite_H2;Tot_Maturite;Ech_Maturite;Type_Volume_Poids_Maturite;Unite_Volume_Poids_Maturite;Age;Num_Ordre_Age_H2;Tot_Age;Ech_Age;Type_Volume_Poids_Age;Unite_Volume_Poids_Age;Code_Longueur;Taille;NumOrdre_Taille_H2;Poids_Classe_Taille;Unite_Taille;Precision_Mesure;Nbr;Poids_Reference;Coef_Final_Elevation\n" + - "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;GWEN DREZ;11242;Vrac;1;100.0;;Poids;;G - Gros;1;80.0;;Poids;;Mâle;1;30.0;;Poids;;1 - Stade 1;1;10.0;5.0;Poids;;NA;;;;;;307;10.0;1;;cm;0.5;5;5.0;500.0;\n" + - "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;GWEN DREZ;11242;Vrac;1;100.0;;Poids;;G - Gros;1;80.0;;Poids;;Mâle;1;30.0;;Poids;;1 - Stade 1;1;10.0;5.0;Poids;;NA;;;;;;307;10.5;2;;cm;0.5;2;5.0;500.0;\n" + - "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;GWEN DREZ;11242;Vrac;1;100.0;;Poids;;G - Gros;1;80.0;;Poids;;Mâle;1;30.0;;Poids;;1 - Stade 1;1;10.0;5.0;Poids;;NA;;;;;;307;11.0;3;;cm;0.5;1;5.0;500.0;\n" + - "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;GWEN DREZ;11242;Vrac;1;100.0;;Poids;;G - Gros;1;80.0;;Poids;;Mâle;1;30.0;;Poids;;3 - Stade 3;3;10.0;;Poids;;NA;;;;;;307;11.0;1;;cm;0.5;5;10.0;1000.0;\n" + - "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;GWEN DREZ;11242;Vrac;1;100.0;;Poids;;G - Gros;1;80.0;;Poids;;Femelle;2;50.0;30.0;Poids;;3 - Stade 3;3;10.0;;Poids;;NA;;;;;;1425;10.0;1;;cm;;5;30.0;3000.0;\n" + - "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;GWEN DREZ;11242;Vrac;1;100.0;;Poids;;G - Gros;1;80.0;;Poids;;Femelle;2;50.0;30.0;Poids;;3 - Stade 3;3;10.0;;Poids;;NA;;;;;;1425;11.0;2;;cm;;6;30.0;3000.0;\n" + - "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;GWEN DREZ;11242;Vrac;1;100.0;;Poids;;G - Gros;1;80.0;;Poids;;Femelle;2;50.0;30.0;Poids;;3 - Stade 3;3;10.0;;Poids;;NA;;;;;;1425;12.0;3;;cm;;7;30.0;3000.0;\n" + - "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;GWEN DREZ;11242;Vrac;1;100.0;;Poids;;M - Moyen;2;20.0;;Poids;;Femelle;2;50.0;30.0;Poids;;3 - Stade 3;3;10.0;;Poids;;NA;;;;;;;;;;;;;20.0;2000.0;\n" + - "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;GWEN DREZ;11242;Hors Vrac;1;20.0;;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;;;;;;;2;20.0;1.0;"; + "Annee;Serie;Serie_Partielle;Engin;Id_Operation;NumOrdre_Station;Poche;Navire;Taxon;Nom scientifique;Commentaire;VracHorsVrac;Num_Ordre_VracHorsVrac_H2;Tot_VracHorsVrac;Ech_VracHorsVrac;Type_Volume_Poids_VracHorsVrac;Unite_Volume_Poids_VracHorsVrac;Cat_Tri;Num_Ordre_Cat_Tri_H2;Tot_Cat_Tri;Ech_Cat_Tri;Type_Volume_Poids_Cat_Tri;Unite_Volume_Poids_Cat_Tri;Sexe;Num_Ordre_Sexe_H2;Tot_Sexe;Ech_Sexe;Type_Volume_Poids_Sexe;Unite_Volume_Poids_Sexe;Maturite;Num_Ordre_Maturite_H2;Tot_Maturite;Ech_Maturite;Type_Volume_Poids_Maturite;Unite_Volume_Poids_Maturite;Age;Num_Ordre_Age_H2;Tot_Age;Ech_Age;Type_Volume_Poids_Age;Unite_Volume_Poids_Age;Code_Longueur;Libelle_Longueur;Taille;NumOrdre_Taille_H2;Poids_Classe_Taille;Unite_Taille;Precision_Mesure;Nbr;Poids_Reference;Coef_Final_Elevation\n" + + "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;278970;11242;Aaptos;;Vrac;1;100.0;;Poids;;G - Gros;1;80.0;;Poids;;Mâle;1;30.0;;Poids;;1 - Stade 1;1;10.0;5.0;Poids;;NA;;;;;;307;Longueur totale (LT) - individu - totale - Mesure au 1/2 cm par un observateur;10.0;1;;cm;0.5;5;5.0;3.0;\n" + + "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;278970;11242;Aaptos;;Vrac;1;100.0;;Poids;;G - Gros;1;80.0;;Poids;;Mâle;1;30.0;;Poids;;1 - Stade 1;1;10.0;5.0;Poids;;NA;;;;;;307;Longueur totale (LT) - individu - totale - Mesure au 1/2 cm par un observateur;10.5;2;;cm;0.5;2;5.0;3.0;\n" + + "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;278970;11242;Aaptos;;Vrac;1;100.0;;Poids;;G - Gros;1;80.0;;Poids;;Mâle;1;30.0;;Poids;;1 - Stade 1;1;10.0;5.0;Poids;;NA;;;;;;307;Longueur totale (LT) - individu - totale - Mesure au 1/2 cm par un observateur;11.0;3;;cm;0.5;1;5.0;3.0;\n" + + "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;278970;11242;Aaptos;;Vrac;1;100.0;;Poids;;G - Gros;1;80.0;;Poids;;Mâle;1;30.0;;Poids;;3 - Stade 3;3;10.0;;Poids;;NA;;;;;;307;Longueur totale (LT) - individu - totale - Mesure au 1/2 cm par un observateur;11.0;1;;cm;0.5;5;10.0;1.5;\n" + + "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;278970;11242;Aaptos;;Vrac;1;100.0;;Poids;;G - Gros;1;80.0;;Poids;;Femelle;2;50.0;30.0;Poids;;3 - Stade 3;3;10.0;;Poids;;NA;;;;;;1425;Longueur totale (LT) - individu - queue - Mesure au cm par un observateur;10.0;1;;cm;;5;30.0;1.6666666;\n" + + "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;278970;11242;Aaptos;;Vrac;1;100.0;;Poids;;G - Gros;1;80.0;;Poids;;Femelle;2;50.0;30.0;Poids;;3 - Stade 3;3;10.0;;Poids;;NA;;;;;;1425;Longueur totale (LT) - individu - queue - Mesure au cm par un observateur;11.0;2;;cm;;6;30.0;1.6666666;\n" + + "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;278970;11242;Aaptos;;Vrac;1;100.0;;Poids;;G - Gros;1;80.0;;Poids;;Femelle;2;50.0;30.0;Poids;;3 - Stade 3;3;10.0;;Poids;;NA;;;;;;1425;Longueur totale (LT) - individu - queue - Mesure au cm par un observateur;12.0;3;;cm;;7;30.0;1.6666666;\n" + + "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;278970;11242;Aaptos;;Vrac;1;100.0;;Poids;;M - Moyen;2;20.0;;Poids;;Femelle;2;50.0;30.0;Poids;;3 - Stade 3;3;10.0;;Poids;;NA;;;;;;;;;;;;;;20.0;1.0;\n" + + "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;278970;11242;Aaptos;;Hors Vrac;1;20.0;;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;;;;;;;;2;20.0;1.0;"; public static final String CATCH_CONTENT_2 = - "Annee;Serie;Serie_Partielle;Engin;Id_Operation;NumOrdre_Station;Poche;Navire;Taxon;VracHorsVrac;Num_Ordre_VracHorsVrac_H2;Tot_VracHorsVrac;Ech_VracHorsVrac;Type_Volume_Poids_VracHorsVrac;Unite_Volume_Poids_VracHorsVrac;Cat_Tri;Num_Ordre_Cat_Tri_H2;Tot_Cat_Tri;Ech_Cat_Tri;Type_Volume_Poids_Cat_Tri;Unite_Volume_Poids_Cat_Tri;Sexe;Num_Ordre_Sexe_H2;Tot_Sexe;Ech_Sexe;Type_Volume_Poids_Sexe;Unite_Volume_Poids_Sexe;Maturite;Num_Ordre_Maturite_H2;Tot_Maturite;Ech_Maturite;Type_Volume_Poids_Maturite;Unite_Volume_Poids_Maturite;Age;Num_Ordre_Age_H2;Tot_Age;Ech_Age;Type_Volume_Poids_Age;Unite_Volume_Poids_Age;Code_Longueur;Taille;NumOrdre_Taille_H2;Poids_Classe_Taille;Unite_Taille;Precision_Mesure;Nbr;Poids_Reference;Coef_Final_Elevation\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;365;Vrac;1;0.005;0.005;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;;;;;;;1;0.005;2.5E-5;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;491;Vrac;2;0.004;0.004;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;;;;;;;1;0.004;1.6000002E-5;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;300;Vrac;3;0.015;0.015;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;;;;;;;1;0.015;2.2499998E-4;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;1811;Vrac;4;0.07;0.07;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;;;;;;;1;0.07;0.0049;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;1644;Vrac;5;1.06;1.06;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;306;36.0;1;;cm;1.0;1;1.06;1.1235999;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;1644;Vrac;5;1.06;1.06;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;306;38.0;2;;cm;1.0;1;1.06;1.1235999;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;1362;Vrac;6;0.038;0.038;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;307;10.5;1;;cm;0.5;2;0.038;0.0014439999;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;1362;Vrac;6;0.038;0.038;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;307;12.5;2;;cm;0.5;1;0.038;0.0014439999;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;1362;Vrac;6;0.038;0.038;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;307;13.0;3;;cm;0.5;1;0.038;0.0014439999;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;1986;Vrac;7;0.66;0.66;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;306;25.0;1;;cm;1.0;1;0.66;0.4356;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;1986;Vrac;7;0.66;0.66;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;306;28.0;2;;cm;1.0;1;0.66;0.4356;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;1986;Vrac;7;0.66;0.66;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;306;30.0;3;;cm;1.0;1;0.66;0.4356;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;489;Vrac;8;0.28;0.28;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;302;9.0;1;;cm;1.0;1;0.28;0.0784;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;489;Vrac;8;0.28;0.28;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;302;10.0;2;;cm;1.0;3;0.28;0.0784;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;489;Vrac;8;0.28;0.28;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;302;11.0;3;;cm;1.0;2;0.28;0.0784;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;1988;Vrac;9;0.152;0.152;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;306;15.0;1;;cm;1.0;1;0.152;0.023103999;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;1988;Vrac;9;0.152;0.152;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;306;18.0;2;;cm;1.0;1;0.152;0.023103999;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;1690;Vrac;10;0.036;0.036;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;306;11.0;1;;cm;1.0;1;0.036;0.0012959999;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;1978;Vrac;11;0.852;0.852;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;306;26.0;1;;cm;1.0;1;0.852;0.725904;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;1978;Vrac;11;0.852;0.852;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;306;30.0;2;;cm;1.0;1;0.852;0.725904;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;1351;Vrac;12;0.022;0.022;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;307;10.5;1;;cm;0.5;1;0.022;4.8400002E-4;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;1772;Vrac;13;0.18;0.18;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;306;27.0;1;;cm;1.0;1;0.18;0.0324;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;1242;Vrac;14;;;Poids;;NA;;;;;;Femelle;1;1.0;1.0;Poids;;NA;;;;;;NA;;;;;;306;51.0;1;;cm;1.0;1;1.0;1.0;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;1242;Vrac;14;;;Poids;;NA;;;;;;Femelle;1;1.0;1.0;Poids;;NA;;;;;;NA;;;;;;306;55.0;2;;cm;1.0;1;1.0;1.0;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;1662;Vrac;15;;;Poids;;P - Petit;1;131.12;0.96;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;306;8.0;1;;cm;1.0;1;0.96;126.0;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;1662;Vrac;15;;;Poids;;P - Petit;1;131.12;0.96;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;306;9.0;2;;cm;1.0;20;0.96;126.0;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;1662;Vrac;15;;;Poids;;P - Petit;1;131.12;0.96;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;306;10.0;3;;cm;1.0;89;0.96;126.0;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;1662;Vrac;15;;;Poids;;P - Petit;1;131.12;0.96;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;306;11.0;4;;cm;1.0;5;0.96;126.0;\n" + - "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;GWEN DREZ;1662;Vrac;15;;;Poids;;G - Gros;2;0.13;0.13;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;306;23.0;1;;cm;1.0;1;0.13;17.0625;"; + "Annee;Serie;Serie_Partielle;Engin;Id_Operation;NumOrdre_Station;Poche;Navire;Taxon;Nom scientifique;Commentaire;VracHorsVrac;Num_Ordre_VracHorsVrac_H2;Tot_VracHorsVrac;Ech_VracHorsVrac;Type_Volume_Poids_VracHorsVrac;Unite_Volume_Poids_VracHorsVrac;Cat_Tri;Num_Ordre_Cat_Tri_H2;Tot_Cat_Tri;Ech_Cat_Tri;Type_Volume_Poids_Cat_Tri;Unite_Volume_Poids_Cat_Tri;Sexe;Num_Ordre_Sexe_H2;Tot_Sexe;Ech_Sexe;Type_Volume_Poids_Sexe;Unite_Volume_Poids_Sexe;Maturite;Num_Ordre_Maturite_H2;Tot_Maturite;Ech_Maturite;Type_Volume_Poids_Maturite;Unite_Volume_Poids_Maturite;Age;Num_Ordre_Age_H2;Tot_Age;Ech_Age;Type_Volume_Poids_Age;Unite_Volume_Poids_Age;Code_Longueur;Libelle_Longueur;Taille;NumOrdre_Taille_H2;Poids_Classe_Taille;Unite_Taille;Precision_Mesure;Nbr;Poids_Reference;Coef_Final_Elevation\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;365;Aequipecten opercularis;taxon;Vrac;1;0.005;0.005;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;;;;;;;;1;0.005;1.0;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;491;Alloteuthis;taxon;Vrac;2;0.004;0.004;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;;;;;;;;1;0.004;1.0;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;300;Buccinum undatum;taxon;Vrac;3;0.015;0.015;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;;;;;;;;1;0.015;1.0;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;1811;Callionymus lyra;taxon;Vrac;4;0.07;0.07;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;;;;;;;;1;0.07;1.0;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;1644;Dicentrarchus labrax;taxon;Vrac;5;1.06;1.06;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;306;Longueur totale (LT) - individu - totale - Mesure au cm par un observateur;36.0;1;;cm;1.0;1;1.06;1.0;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;1644;Dicentrarchus labrax;taxon;Vrac;5;1.06;1.06;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;306;Longueur totale (LT) - individu - totale - Mesure au cm par un observateur;38.0;2;;cm;1.0;1;1.06;1.0;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;1362;Engraulis encrasicolus;taxon;Vrac;6;0.038;0.038;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;307;Longueur totale (LT) - individu - totale - Mesure au 1/2 cm par un observateur;10.5;1;;cm;0.5;2;0.038;1.0;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;1362;Engraulis encrasicolus;taxon;Vrac;6;0.038;0.038;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;307;Longueur totale (LT) - individu - totale - Mesure au 1/2 cm par un observateur;12.5;2;;cm;0.5;1;0.038;1.0;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;1362;Engraulis encrasicolus;taxon;Vrac;6;0.038;0.038;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;307;Longueur totale (LT) - individu - totale - Mesure au 1/2 cm par un observateur;13.0;3;;cm;0.5;1;0.038;1.0;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;1986;Limanda limanda;taxon;Vrac;7;0.66;0.66;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;306;Longueur totale (LT) - individu - totale - Mesure au cm par un observateur;25.0;1;;cm;1.0;1;0.66;1.0;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;1986;Limanda limanda;taxon;Vrac;7;0.66;0.66;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;306;Longueur totale (LT) - individu - totale - Mesure au cm par un observateur;28.0;2;;cm;1.0;1;0.66;1.0;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;1986;Limanda limanda;taxon;Vrac;7;0.66;0.66;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;306;Longueur totale (LT) - individu - totale - Mesure au cm par un observateur;30.0;3;;cm;1.0;1;0.66;1.0;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;489;Loligo vulgaris;taxon;Vrac;8;0.28;0.28;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;302;Longueur du manteau (LM) - individu - manteau - Mesure au cm par un observateur;9.0;1;;cm;1.0;1;0.28;1.0;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;489;Loligo vulgaris;taxon;Vrac;8;0.28;0.28;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;302;Longueur du manteau (LM) - individu - manteau - Mesure au cm par un observateur;10.0;2;;cm;1.0;3;0.28;1.0;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;489;Loligo vulgaris;taxon;Vrac;8;0.28;0.28;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;302;Longueur du manteau (LM) - individu - manteau - Mesure au cm par un observateur;11.0;3;;cm;1.0;2;0.28;1.0;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;1988;Microstomus kitt;taxon;Vrac;9;0.152;0.152;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;306;Longueur totale (LT) - individu - totale - Mesure au cm par un observateur;15.0;1;;cm;1.0;1;0.152;1.0;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;1988;Microstomus kitt;taxon;Vrac;9;0.152;0.152;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;306;Longueur totale (LT) - individu - totale - Mesure au cm par un observateur;18.0;2;;cm;1.0;1;0.152;1.0;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;1690;Mullus surmuletus;taxon;Vrac;10;0.036;0.036;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;306;Longueur totale (LT) - individu - totale - Mesure au cm par un observateur;11.0;1;;cm;1.0;1;0.036;1.0;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;1978;Pleuronectes platessa;taxon;Vrac;11;0.852;0.852;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;306;Longueur totale (LT) - individu - totale - Mesure au cm par un observateur;26.0;1;;cm;1.0;1;0.852;1.0;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;1978;Pleuronectes platessa;taxon;Vrac;11;0.852;0.852;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;306;Longueur totale (LT) - individu - totale - Mesure au cm par un observateur;30.0;2;;cm;1.0;1;0.852;1.0;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;1351;Sardina pilchardus;taxon;Vrac;12;0.022;0.022;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;307;Longueur totale (LT) - individu - totale - Mesure au 1/2 cm par un observateur;10.5;1;;cm;0.5;1;0.022;1.0;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;1772;Scomber scombrus;taxon;Vrac;13;0.18;0.18;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;NA;;;;;;306;Longueur totale (LT) - individu - totale - Mesure au cm par un observateur;27.0;1;;cm;1.0;1;0.18;1.0;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;1242;Scyliorhinus canicula;taxon;Vrac;14;;;Poids;;NA;;;;;;Femelle;1;1.0;1.0;Poids;;NA;;;;;;NA;;;;;;306;Longueur totale (LT) - individu - totale - Mesure au cm par un observateur;51.0;1;;cm;1.0;1;1.0;1.0;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;1242;Scyliorhinus canicula;taxon;Vrac;14;;;Poids;;NA;;;;;;Femelle;1;1.0;1.0;Poids;;NA;;;;;;NA;;;;;;306;Longueur totale (LT) - individu - totale - Mesure au cm par un observateur;55.0;2;;cm;1.0;1;1.0;1.0;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;1662;Trachurus trachurus;taxon;Vrac;15;;;Poids;;P - Petit;1;131.12;0.96;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;306;Longueur totale (LT) - individu - totale - Mesure au cm par un observateur;8.0;1;;cm;1.0;1;0.96;136.58333;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;1662;Trachurus trachurus;taxon;Vrac;15;;;Poids;;P - Petit;1;131.12;0.96;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;306;Longueur totale (LT) - individu - totale - Mesure au cm par un observateur;9.0;2;;cm;1.0;20;0.96;136.58333;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;1662;Trachurus trachurus;taxon;Vrac;15;;;Poids;;P - Petit;1;131.12;0.96;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;306;Longueur totale (LT) - individu - totale - Mesure au cm par un observateur;10.0;3;;cm;1.0;89;0.96;136.58333;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;1662;Trachurus trachurus;taxon;Vrac;15;;;Poids;;P - Petit;1;131.12;0.96;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;306;Longueur totale (LT) - individu - totale - Mesure au cm par un observateur;11.0;4;;cm;1.0;5;0.96;136.58333;\n" + + "2010;Campagne CGFS;;GOV 19.7/25.9;20;20;1;278970;1662;Trachurus trachurus;taxon;Vrac;15;;;Poids;;G - Gros;2;0.13;0.13;Poids;;NA;;;;;;NA;;;;;;NA;;;;;;306;Longueur totale (LT) - individu - totale - Mesure au cm par un observateur;23.0;1;;cm;1.0;1;0.13;1.0;"; public static final String MARINE_LITTER_CONTENT = - "Annee;Serie;Serie_Partielle;Engin;Id_Operation;NumOrdre_Station;Poche;Navire;MarineLitterCategory;MarineLitterSizeCategory;Number;Weight;Comment\n" + - "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;GWEN DREZ;L1 PLASTIQUE;A: <5*5 cm= 25 cm2;2;5.0;S1;\n" + - "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;GWEN DREZ;L1a Sacs;B: <10*10 cm= 100 cm2;3;1.0;S2;"; + "Annee;Serie;Serie_Partielle;Engin;Id_Operation;NumOrdre_Station;Poche;Navire;MarineLitterCategory;MarineLitterSizeCategory;Number;Weight;Commentaire\n" + + "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;278970;L1 PLASTIQUE;A: <5*5 cm= 25 cm2;2;5.0;S1;\n" + + "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;278970;L1a Sacs;B: <10*10 cm= 100 cm2;3;1.0;S2;"; public static final String INDIVIDUAL_OBSERVATION_CONTENT = - "Annee;Serie;Serie_Partielle;Engin;Id_Operation;NumOrdre_Station;Poche;Navire;BatchId;ReferenceTaxonId;ReferenceTaxonName;Comment;CaracteristicId;CaracteristicValue\n" + - "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;GWEN DREZ;100000;11242;Aaptos;P1;1435;A20;\n" + - "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;GWEN DREZ;100000;11242;Aaptos;P1;1436;10;\n" + - "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;GWEN DREZ;100000;11242;Aaptos;P1;220;0.1;\n" + - "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;GWEN DREZ;100000;11242;Aaptos;P1;1433;307;\n" + - "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;GWEN DREZ;100000;11242;Aaptos;P1;307;10.0;\n" + - "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;GWEN DREZ;100000;11242;Aaptos;P1;101;10.0;\n" + - "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;GWEN DREZ;100000;11242;Aaptos;P1;46;0L - 0 VMS - 1 LB;\n" + - "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;GWEN DREZ;100000;11242;Aaptos;P1;1388;5.0;"; + "Annee;Serie;Serie_Partielle;Engin;Id_Operation;NumOrdre_Station;Poche;Navire;BatchId;ReferenceTaxonId;ReferenceTaxonName;Commentaire;CaracteristicId;CaracteristicValue\n" + + "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;278970;100000;11242;Aaptos;P1;1435;A20;\n" + + "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;278970;100000;11242;Aaptos;P1;1436;10;\n" + + "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;278970;100000;11242;Aaptos;P1;220;0.1;\n" + + "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;278970;100000;11242;Aaptos;P1;1433;307;\n" + + "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;278970;100000;11242;Aaptos;P1;307;10.0;\n" + + "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;278970;100000;11242;Aaptos;P1;101;10.0;\n" + + "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;278970;100000;11242;Aaptos;P1;46;0L - 0 VMS - 1 LB;\n" + + "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;278970;100000;11242;Aaptos;P1;1388;5.0;"; public static final String ACCIDENTAL_CATCH_CONTENT = - "Annee;Serie;Serie_Partielle;Engin;Id_Operation;NumOrdre_Station;Poche;Navire;BatchId;ReferenceTaxonId;ReferenceTaxonName;Comment;CaracteristicId;CaracteristicValue\n" + - "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;GWEN DREZ;100001;3835;Abalistes;;1393;Rejet mort;\n" + - "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;GWEN DREZ;100001;3835;Abalistes;;196;Femelle;\n" + - "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;GWEN DREZ;100001;3835;Abalistes;;220;10.0;\n" + - "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;GWEN DREZ;100001;3835;Abalistes;;1433;1425;\n" + - "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;GWEN DREZ;100001;3835;Abalistes;;1425;4.0;"; + "Annee;Serie;Serie_Partielle;Engin;Id_Operation;NumOrdre_Station;Poche;Navire;BatchId;ReferenceTaxonId;ReferenceTaxonName;Commentaire;CaracteristicId;CaracteristicValue\n" + + "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;278970;100001;3835;Abalistes;;1393;Rejet mort;\n" + + "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;278970;100001;3835;Abalistes;;196;Femelle;\n" + + "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;278970;100001;3835;Abalistes;;220;10.0;\n" + + "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;278970;100001;3835;Abalistes;;1433;1425;\n" + + "2013;Campagne CGFS;;GOV 19.7/25.9;A;1;1;278970;100001;3835;Abalistes;;1425;4.0;"; public static final String SPECIES_CONTENT = "Id;Code_Rubin;Nom Scientifique;Code campagne\n" + Copied: trunk/tutti-service/src/test/resources/tutti-test-read-dbExport.properties (from rev 1114, trunk/tutti-service/src/test/resources/tutti-test-read-dbCGFS.properties) =================================================================== --- trunk/tutti-service/src/test/resources/tutti-test-read-dbExport.properties (rev 0) +++ trunk/tutti-service/src/test/resources/tutti-test-read-dbExport.properties 2013-07-05 16:36:48 UTC (rev 1116) @@ -0,0 +1,27 @@ +### +# #%L +# Tutti :: Service +# $Id$ +# $HeadURL$ +# %% +# Copyright (C) 2012 - 2013 Ifremer +# %% +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program. If not, see +# <http://www.gnu.org/licenses/gpl-3.0.html>. +# #L% +### +tutti.persistence.db.directory=src/test/dbExport +tutti.persistence.jdbc.url=jdbc:hsqldb:file:src/test/dbExport/allegro +#tutti.persistence.jdbc.url=jdbc:hsqldb:hsql://localhost/allegro +#tutti.persistence.jdbc.createScript=src/test/dbEmpty/allegro.script \ No newline at end of file Modified: trunk/tutti-ui-swing/src/license/THIRD-PARTY.properties =================================================================== --- trunk/tutti-ui-swing/src/license/THIRD-PARTY.properties 2013-07-04 15:37:34 UTC (rev 1115) +++ trunk/tutti-ui-swing/src/license/THIRD-PARTY.properties 2013-07-05 16:36:48 UTC (rev 1116) @@ -22,15 +22,15 @@ # - MPL 1.1 # - New BSD License # - Public Domain +# - The AndroMDA Project # - The Apache Software License, Version 2.0 # - license.txt #------------------------------------------------------------------------------- # Please fill the missing licenses for dependencies : # # -#Thu May 23 12:15:03 CEST 2013 +#Wed Jul 03 16:24:14 CEST 2013 antlr--antlr--2.7.6=BSD License -commons-codec--commons-codec--1.2=The Apache Software License, Version 2.0 commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0 dom4j--dom4j--1.6.1=BSD License javax.persistence--persistence-api--1.0.2=COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0