r1519 - in trunk: tutti-service/src/main/java/fr/ifremer/tutti/service/psionimport tutti-service/src/main/resources/i18n tutti-service/src/test/java/fr/ifremer/tutti/service/psionimport tutti-service/src/test/resources/psion tutti-ui-swing/src/main/filtered-resources tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/action tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species tutti-ui-swing/src/mai
Author: tchemit Date: 2014-01-21 17:29:59 +0100 (Tue, 21 Jan 2014) New Revision: 1519 Url: http://forge.codelutin.com/projects/tutti/repository/revisions/1519 Log: refs #3876: Import de donn?\195?\169es depuis un ictyom?\195?\168tre (par lot) Added: trunk/tutti-service/src/test/resources/psion/protocol.tuttiProtocol trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/action/ImportPsionAction.java Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/psionimport/PsionImportBatchModel.java trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/psionimport/PsionImportModel.java trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/psionimport/PsionImportResult.java trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/psionimport/PsionImportService.java trunk/tutti-service/src/main/resources/i18n/tutti-service_en_GB.properties trunk/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/psionimport/PsionImportServiceTest.java trunk/tutti-service/src/test/resources/psion/CC053.IWA trunk/tutti-service/src/test/resources/psion/FM001.IWA trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-fr.properties trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiUIContext.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.css trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.jaxx trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/psionimport/PsionImportBatchModel.java =================================================================== --- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/psionimport/PsionImportBatchModel.java 2014-01-21 10:01:54 UTC (rev 1518) +++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/psionimport/PsionImportBatchModel.java 2014-01-21 16:29:59 UTC (rev 1519) @@ -24,11 +24,15 @@ * #L% */ +import com.google.common.collect.Lists; import com.google.common.collect.Maps; import fr.ifremer.tutti.persistence.entities.referential.Species; +import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.mutable.MutableInt; import java.io.Serializable; +import java.util.Iterator; +import java.util.List; import java.util.Map; /** @@ -39,6 +43,26 @@ */ public class PsionImportBatchModel { + public static class SampleCategory { + + protected final Integer categoryId; + + protected final Serializable categoryValue; + + public SampleCategory(Integer categoryId, Serializable categoryValue) { + this.categoryId = categoryId; + this.categoryValue = categoryValue; + } + + public Integer getCategoryId() { + return categoryId; + } + + public Serializable getCategoryValue() { + return categoryValue; + } + } + protected final Species species; protected final Integer lengthStepCaracteristicId; @@ -47,18 +71,23 @@ protected Float sampleWeight; - protected Integer categoryId; + protected final List<SampleCategory> categories; - protected Serializable categoryValue; - protected final Map<Float, MutableInt> frequencies; + protected String categoryCode; + public PsionImportBatchModel(Species species, Integer lengthStepCaracteristicId) { this.species = species; this.lengthStepCaracteristicId = lengthStepCaracteristicId; - frequencies = Maps.newTreeMap(); + this.frequencies = Maps.newTreeMap(); + this.categories = Lists.newArrayList(); } + public void setCategoryCode(String categoryCode) { + this.categoryCode = categoryCode; + } + public void setWeight(Float weight) { this.weight = weight; } @@ -68,23 +97,27 @@ } public void setCategory(Integer categoryId, Serializable categoryValue) { - this.categoryId = categoryId; - this.categoryValue = categoryValue; + SampleCategory category = new SampleCategory(categoryId, categoryValue); + categories.add(category); } - public void addFrequency(Float size) { + public void addFrequency(Float size, int number) { MutableInt mutableFloat = frequencies.get(size); if (mutableFloat == null) { mutableFloat = new MutableInt(0); frequencies.put(size, mutableFloat); } - mutableFloat.increment(); + mutableFloat.add(number); } public Species getSpecies() { return species; } + public String getCategoryCode() { + return categoryCode; + } + public Integer getLengthStepCaracteristicId() { return lengthStepCaracteristicId; } @@ -97,18 +130,18 @@ return sampleWeight; } - public Integer getCategoryId() { - return categoryId; + public Iterator<SampleCategory> getCategoryIterator() { + return categories.iterator(); } - public Serializable getCategoryValue() { - return categoryValue; - } - public boolean withFrequencies() { return !frequencies.isEmpty(); } + public boolean withCategories() { + return !categories.isEmpty(); + } + public Map<Float, MutableInt> getFrequencies() { return frequencies; } @@ -116,4 +149,15 @@ public int getNbFrequencies() { return frequencies.size(); } + + @Override + public String toString() { + return new ToStringBuilder(this) + .append("species", species.getSurveyCode()) + .append("categoryCode", categoryCode) + .append("weight", weight) + .append("sampleWeight", sampleWeight) + .append("frequencies", frequencies.size()) + .toString(); + } } Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/psionimport/PsionImportModel.java =================================================================== --- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/psionimport/PsionImportModel.java 2014-01-21 10:01:54 UTC (rev 1518) +++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/psionimport/PsionImportModel.java 2014-01-21 16:29:59 UTC (rev 1519) @@ -25,10 +25,15 @@ */ import com.google.common.collect.Lists; +import com.google.common.collect.Maps; import com.google.common.collect.Sets; import fr.ifremer.tutti.persistence.entities.referential.Species; +import org.apache.commons.lang3.mutable.MutableInt; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import java.util.List; +import java.util.Map; import java.util.Set; /** @@ -39,34 +44,25 @@ */ public class PsionImportModel { - protected final List<PsionImportBatchModel> batchs; + /** Logger. */ + private static final Log log = LogFactory.getLog(PsionImportModel.class); - protected final Set<String> ignoredSpecies; + protected final Map<String, PsionImportBatchModel> batchsByCategory; + protected final List<String> errors; + public PsionImportModel() { - batchs = Lists.newArrayList(); - ignoredSpecies = Sets.newHashSet(); + batchsByCategory = Maps.newLinkedHashMap(); + errors = Lists.newArrayList(); } - public void addBatch(PsionImportBatchModel batchModel) { - batchs.add(batchModel); - } - - public void addIgnoredSpecies(String species) { - ignoredSpecies.add(species); - } - public boolean withBatchs() { - return !batchs.isEmpty(); + return !batchsByCategory.isEmpty(); } - public Set<String> getIgnoredSpecies() { - return ignoredSpecies; - } - public Set<Species> getSpecies() { Set<Species> result = Sets.newLinkedHashSet(); - for (PsionImportBatchModel batch : batchs) { + for (PsionImportBatchModel batch : batchsByCategory.values()) { result.add(batch.getSpecies()); } return result; @@ -74,11 +70,55 @@ public List<PsionImportBatchModel> getBatchs(Species species) { List<PsionImportBatchModel> result = Lists.newArrayList(); - for (PsionImportBatchModel batch : batchs) { + for (PsionImportBatchModel batch : batchsByCategory.values()) { if (species.equals(batch.getSpecies())) { result.add(batch); } } return result; } + + public boolean withErrors() { + return !errors.isEmpty(); + } + + void addBatch(PsionImportBatchModel batchModel) { + + String cacheCode = batchModel.getSpecies().getSurveyCode() + "_" + batchModel.getCategoryCode(); + + PsionImportBatchModel mergeBatch = batchsByCategory.get(cacheCode); + + if (mergeBatch == null) { + + // new batch + batchsByCategory.put(cacheCode, batchModel); + + if (log.isInfoEnabled()) { + log.info("Added " + batchModel); + } + } else { + + // merge data with this batch + + mergeBatch.setWeight(mergeBatch.getWeight() + batchModel.getWeight()); + mergeBatch.setSampleWeight(mergeBatch.getSampleWeight() + batchModel.getSampleWeight()); + + for (Map.Entry<Float, MutableInt> entry : batchModel.getFrequencies().entrySet()) { + Float stepClass = entry.getKey(); + int number = entry.getValue().intValue(); + mergeBatch.addFrequency(stepClass, number); + } + if (log.isInfoEnabled()) { + log.info("Merged " + batchModel + " to " + mergeBatch); + } + } + } + + void addError(String error) { + errors.add(error); + } + + public List<String> getErrors() { + return errors; + } } Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/psionimport/PsionImportResult.java =================================================================== --- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/psionimport/PsionImportResult.java 2014-01-21 10:01:54 UTC (rev 1518) +++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/psionimport/PsionImportResult.java 2014-01-21 16:29:59 UTC (rev 1519) @@ -24,7 +24,10 @@ * #L% */ +import com.google.common.collect.Lists; + import java.io.File; +import java.util.List; /** * Created on 1/20/14. @@ -36,12 +39,13 @@ protected final File importFile; + protected final List<String> errors; + protected int nbImported; - protected int nbNotImported; - - public PsionImportResult(File importFile) { + public PsionImportResult(File importFile, List<String> errors) { this.importFile = importFile; + this.errors = Lists.newArrayList(errors); } public File getImportFile() { @@ -52,15 +56,19 @@ return nbImported; } - public int getNbNotImported() { - return nbNotImported; + public List<String> getErrors() { + return errors; } void incrementNbImported() { this.nbImported++; } - void incrementNbNotImported() { - this.nbNotImported++; + void addError(String error) { + errors.add(error); } + + public boolean isDone() { + return errors.isEmpty(); + } } Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/psionimport/PsionImportService.java =================================================================== --- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/psionimport/PsionImportService.java 2014-01-21 10:01:54 UTC (rev 1518) +++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/psionimport/PsionImportService.java 2014-01-21 16:29:59 UTC (rev 1519) @@ -50,9 +50,9 @@ import fr.ifremer.tutti.persistence.service.TuttiEnumerationFile; import fr.ifremer.tutti.service.AbstractTuttiService; import fr.ifremer.tutti.service.PersistenceService; -import fr.ifremer.tutti.service.TuttiDataContext; import fr.ifremer.tutti.service.TuttiServiceContext; import org.apache.commons.io.IOUtils; +import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.mutable.MutableInt; import org.apache.commons.logging.Log; @@ -63,6 +63,10 @@ import java.io.IOException; import java.io.Serializable; import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; @@ -81,43 +85,59 @@ private static final Log log = LogFactory.getLog(PsionImportService.class); - protected static final Set<String> SEX_VALUES = Sets.newHashSet( - "N", "n", "I", "i", "F", "f", "M", "m" - ); + protected static final Set<String> SEX_VALUES = Sets.newHashSet("I", "i", "F", "f", "M", "m"); - protected static final Set<String> MATURITY_VALUES = Sets.newHashSet( - "1", "2", "3", "4", "5" - ); + protected static final Set<String> MATURITY_VALUES = Sets.newHashSet("1", "2", "3", "4", "5"); + /** + * All usables keywords in a psion import. + * <p/> + * Created on 1/20/14. + * + * @author Tony Chemit <chemit@codelutin.com> + * @since 3.0.1 + */ + public static enum PsionImportKeyword { + + ESPE, + POID, + TAIL, + CATE, + LONG +// // ignored +// HEUR(true), +// AGEN(true), +// CAIS(true), +// TAXO(true), +// OUTI(true), +// PORT(true), +// DATE(true), +// HERE(true), +// NAVI(true), +// ENGI(true); + } + protected PersistenceService persistenceService; - protected char csvSeparator; + protected TuttiEnumerationFile enumerationFile; - protected TuttiDataContext dataContext; - protected CaracteristicQualitativeValue sortedCaracteristic; protected CaracteristicQualitativeValue unsortedCaracteristic; - protected Map<String, Species> speciesBySurveyCode; - - protected Map<String, SpeciesProtocol> speciesProtocolBySurveyCode; - protected Map<String, CaracteristicQualitativeValue> sexCaracteristicValues; protected Map<String, CaracteristicQualitativeValue> maturityCaracteristicValues; + protected final DateFormat df = new SimpleDateFormat("MM-dd-yyyy"); + @Override public void setServiceContext(TuttiServiceContext context) { super.setServiceContext(context); persistenceService = getService(PersistenceService.class); - csvSeparator = ';'; - dataContext = context.getDataContext(); + enumerationFile = persistenceService.getEnumerationFile(); - - TuttiEnumerationFile enumerationFile = persistenceService.getEnumerationFile(); - { // sorted/unsorted caracteristic Caracteristic caracteristic = persistenceService.getSortedUnsortedCaracteristic(); @@ -161,85 +181,117 @@ maturityCaracteristicValues.put("4", byIds.get(enumerationFile.QUALITATIVE_MATURITY_4_ID)); maturityCaracteristicValues.put("5", byIds.get(enumerationFile.QUALITATIVE_MATURITY_5_ID)); } + } - List<Species> allReferentSpecies = persistenceService.getReferentSpeciesWithSurveyCode( - persistenceService.getAllReferentSpecies()); + public PsionImportResult importFile(File psionFile, FishingOperation operation, CatchBatch catchBatch) { - speciesBySurveyCode = Maps.newTreeMap(); - for (Species species : allReferentSpecies) { + Preconditions.checkNotNull(psionFile); + Preconditions.checkArgument(psionFile.exists(), "Psion file " + psionFile + " does not exist."); + + TuttiProtocol protocol = persistenceService.getProtocol(); + + if (protocol == null) { + throw new ApplicationBusinessException(_("tutti.service.psionimport.error.no.protocol")); + } + + List<Species> allReferentSpecies = persistenceService.getAllReferentSpecies(); + List<Species> allSpeciesWithSurveyCode = persistenceService.getReferentSpeciesWithSurveyCode( + allReferentSpecies); + + Map<String, Species> speciesBySurveyCode = Maps.newTreeMap(); + for (Species species : allSpeciesWithSurveyCode) { if (species.getSurveyCode() != null) { speciesBySurveyCode.put(species.getSurveyCode(), species); } } + Map<String, SpeciesProtocol> speciesProtocolBySurveyCode = Maps.newTreeMap(); - speciesProtocolBySurveyCode = Maps.newTreeMap(); - - TuttiProtocol protocol = dataContext.getProtocol(); - - if (protocol == null) { - // not possible - //FIXME Deal with error - throw new IllegalStateException("Can't open psionImportService without a protocol"); - } - - List<SpeciesProtocol> speciesProtocols = protocol.getSpecies(); - for (SpeciesProtocol speciesProtocol : speciesProtocols) { + for (SpeciesProtocol speciesProtocol : protocol.getSpecies()) { if (speciesProtocol.getSpeciesSurveyCode() == null) { continue; } speciesProtocolBySurveyCode.put(speciesProtocol.getSpeciesSurveyCode(), speciesProtocol); } - } - public PsionImportResult importFile(File psionFile, FishingOperation operation, CatchBatch catchBatch) { + BatchContainer<SpeciesBatch> rootSpeciesBatch = + persistenceService.getRootSpeciesBatch(operation.getId(), null); - Preconditions.checkNotNull(psionFile); - Preconditions.checkArgument(psionFile.exists(), "Psion file " + psionFile + " does not exist."); + Set<Species> alreadyUsedSpecies = Sets.newHashSet(); + for (SpeciesBatch speciesBatch : rootSpeciesBatch.getChildren()) { + alreadyUsedSpecies.add(speciesBatch.getSpecies()); + } // load model - PsionImportModel importModel; + PsionImportModel importModel = new PsionImportModel(); try { - importModel = readImportFile(psionFile); + readImportFile(importModel, + psionFile, + operation, + speciesBySurveyCode, + speciesProtocolBySurveyCode, + alreadyUsedSpecies); } catch (IOException e) { - throw new ApplicationBusinessException(e.getMessage(), e.getCause()); + importModel.addError(e.getMessage()); } - // import in database - PsionImportResult result = persist(psionFile, importModel, operation, catchBatch); + PsionImportResult result = new PsionImportResult(psionFile, importModel.getErrors()); + if (importModel.withErrors()) { + if (log.isWarnEnabled()) { + log.warn("Won't import psion file, errors detected."); + } + } else { + // persist in db + persist(result, importModel, operation, catchBatch); + } + return result; } - protected PsionImportModel readImportFile(File arpFile) throws IOException { + protected void readImportFile(PsionImportModel importModel, + File importFile, + FishingOperation operation, + Map<String, Species> speciesBySurveyCode, + Map<String, SpeciesProtocol> speciesProtocolBySurveyCode, + Set<Species> alreadyUsedSpecies) throws IOException { - TuttiEnumerationFile enumerationFile = persistenceService.getEnumerationFile(); + BufferedReader reader = Files.newReader(importFile, Charsets.UTF_8); - PsionImportModel importModel = new PsionImportModel(); + try { - BufferedReader reader = Files.newReader(arpFile, Charsets.UTF_8); + reader.readLine(); // initiales saisisseurs + String operationCode = reader.readLine(); // Id du trait + String operationDateStr = reader.readLine(); // Date du trait - try { - PsionImportBatchModel batch = null; + Date operationDate; + try { + operationDate = df.parse(operationDateStr); + } catch (ParseException e) { - // first line, don't care - String line; + throw new IOException(_("tutti.service.psionimport.error.invalid.date.format")); + } - line = reader.readLine(); // initiales saisisseurs - line = reader.readLine(); // Id du trait - line = reader.readLine(); // Date du trait - line = reader.readLine(); // Heure de création du fichier - line = reader.readLine(); // Ligne blanche + boolean correctOperation = ObjectUtils.equals(operationCode, operation.getStationNumber()) && + ObjectUtils.equals(operationDate, operation.getGearShootingStartDate()); - int lineNumber = 6; + if (!correctOperation) { + throw new IOException(_("tutti.service.psionimport.error.invalid.operation")); + } + reader.readLine(); // Heure de création du fichier + reader.readLine(); // Ligne blanche + + int lineNumber = 5; + + PsionImportBatchModel batch = null; + + String line; String badSpecies = null; while ((line = reader.readLine()) != null) { lineNumber++; if (!line.contains(":")) { - throw new IOException( - "Format de la ligne (" + - lineNumber + ") incorrecte : " + line); + throw new IOException(_("tutti.service.psionimport.error.invalid.line.syntax", lineNumber, line)); } int endIndex = line.indexOf(':'); String commandStr = StringUtils.trim(line.substring(0, endIndex)); @@ -250,18 +302,9 @@ try { command = PsionImportKeyword.valueOf(commandStr); } catch (IllegalArgumentException e) { - throw new IOException( - "La commande " + commandStr + " n'est pas connue ligne (" + - lineNumber + ") "); + throw new IOException(_("tutti.service.psionimport.error.invalid.command.syntax", commandStr, lineNumber)); } - if (command.isIgnored()) { - if (log.isWarnEnabled()) { - log.warn("Ignoring command: " + command); - } - continue; - } - String value = StringUtils.trim(line.substring(endIndex + 1)); if (PsionImportKeyword.ESPE.equals(command)) { @@ -270,7 +313,7 @@ // register previous batch if (batch != null) { - addBatchToModel(importModel, batch); + importModel.addBatch(batch); } Species species = speciesBySurveyCode.get(value); @@ -278,11 +321,26 @@ if (species == null) { // could not load this species + badSpecies = value; + batch = null; + String error = _("tutti.service.psionimport.error.species.not.found", lineNumber, value); if (log.isWarnEnabled()) { - log.warn("Ligne " + lineNumber + " espèce " + value + " inconnue."); + log.warn(error); } + importModel.addError(error); + continue; + } + + if (alreadyUsedSpecies.contains(species)) { + + // can't use an already used species badSpecies = value; - importModel.addIgnoredSpecies(badSpecies); + batch = null; + String error = _("tutti.service.psionimport.error.species.already.used", lineNumber, value); + if (log.isWarnEnabled()) { + log.warn(error); + } + importModel.addError(error); continue; } @@ -293,11 +351,13 @@ String lengthStepCaracteristicId = speciesProtocol.getLengthStepPmfmId(); if (StringUtils.isBlank(lengthStepCaracteristicId)) { + badSpecies = value; + batch = null; + String error = _("tutti.service.psionimport.error.no.lengthClass.caracteristic", lineNumber, value); if (log.isWarnEnabled()) { - log.warn("Ligne " + lineNumber + " espèce " + value + " ignorée car pas de caractéristique de classe de taille renseignée dans le protocole."); + log.warn(error); } - badSpecies = value; - importModel.addIgnoredSpecies(badSpecies); + importModel.addError(error); continue; } batch = new PsionImportBatchModel(species, Integer.valueOf(lengthStepCaracteristicId)); @@ -315,8 +375,7 @@ // check batch exists if (batch == null) { throw new IOException( - "La ligne " + line + " (" + lineNumber + - ") n'est pas valide, elle doit être précédée par une ligne ESPE"); + _("tutti.service.psionimport.error.invalid.firstLine", line, lineNumber)); } switch (command) { @@ -336,54 +395,63 @@ case CATE: // add category - Integer caracteristicId; - CaracteristicQualitativeValue caracteristicQualitativeValue; + if (StringUtils.isBlank(value)) { + badSpecies = batch.getSpecies().getSurveyCode(); + batch = null; + String error = _("tutti.service.psionimport.error.invalid.category.syntax", lineNumber, value, badSpecies); - if (SEX_VALUES.contains(value)) { + if (log.isWarnEnabled()) { + log.warn(error); + } + importModel.addError(error); + continue; + } - // sex caracteristic - caracteristicId = enumerationFile.PMFM_ID_SEX; + if ("N".equals(value)) { - caracteristicQualitativeValue = sexCaracteristicValues.get(value); + // special case, no category - if (caracteristicQualitativeValue == null) { + } else { - //means non sexé - caracteristicId = null; - } + // guess all categories - } else if (MATURITY_VALUES.contains(value)) { + for (int i = 0, nbCategory = value.length(); i < nbCategory; i++) { + String categoryCode = value.substring(i, i + 1); - // maturity caracteristic - caracteristicId = enumerationFile.PMFM_ID_MATURITY; - caracteristicQualitativeValue = maturityCaracteristicValues.get(value); + PsionImportBatchModel.SampleCategory category = guessCategory(categoryCode); - } else { + if (category == null) { + badSpecies = batch.getSpecies().getSurveyCode(); + batch = null; + String error = _("tutti.service.psionimport.error.invalid.category.syntax", lineNumber, categoryCode, badSpecies); + if (log.isWarnEnabled()) { + log.warn(error); + } + importModel.addError( + error + ); + break; + } - if (log.isWarnEnabled()) { - log.warn("Ligne " + lineNumber + ", catégorisation '" + value + "' inconnue, espèce " + batch.getSpecies().getSurveyCode() + " ignorée"); + batch.setCategory(category.getCategoryId(), category.getCategoryValue()); } - badSpecies = batch.getSpecies().getSurveyCode(); - importModel.addIgnoredSpecies(badSpecies); - batch = null; - continue; -// throw new IOException( -// "Ligne " + lineNumber + ", catégorisation '" + value + "' inconnue"); + if (batch == null) { + + // at least one category was not ok + continue; + } } - batch.setCategory(caracteristicId, caracteristicQualitativeValue); + batch.setCategoryCode(value); + break; case LONG: // add frequency Float size = toFloat(value, lineNumber); - batch.addFrequency(size); + batch.addFrequency(size, 1); break; - - case OUTI: - // ignore it - break; } } } @@ -391,32 +459,24 @@ if (batch != null) { // save it - addBatchToModel(importModel, batch); + importModel.addBatch(batch); } reader.close(); - return importModel; } finally { IOUtils.closeQuietly(reader); } } - protected PsionImportResult persist(File arpFile, - PsionImportModel importModel, - FishingOperation operation, - CatchBatch catchBatch) { - PsionImportResult result = new PsionImportResult(arpFile); + protected void persist(PsionImportResult result, + PsionImportModel importModel, + FishingOperation operation, + CatchBatch catchBatch) { if (catchBatch != null) { - addFileAsAttachment(arpFile, catchBatch); + addFileAsAttachment(result.getImportFile(), catchBatch); } - // delete all species batches - BatchContainer<SpeciesBatch> rootSpeciesBatch = persistenceService.getRootSpeciesBatch(operation.getId(), null); - for (SpeciesBatch batch : rootSpeciesBatch.getChildren()) { - persistenceService.deleteSpeciesBatch(batch.getId()); - } - // insert all imported species batches TuttiEnumerationFile enumerationFile = persistenceService.getEnumerationFile(); @@ -425,10 +485,9 @@ for (Species specy : species) { - //FIXME Make sure this does work well with a none sex batch... List<PsionImportBatchModel> batchs = importModel.getBatchs(specy); - if (batchs.size() == 1 && batchs.get(0).getCategoryId() == null) { + if (batchs.size() == 1 && !batchs.get(0).withCategories()) { PsionImportBatchModel batchModel = batchs.get(0); @@ -436,10 +495,9 @@ SpeciesBatch batch = createSpeciesBatch(operation, batchModel.getSpecies(), batchModel.getWeight(), + batchModel.getSampleWeight(), enumerationFile.PMFM_ID_SORTED_UNSORTED, sortedCaracteristic); - //FIXME Check this is ok. - batch.setWeight(batchModel.getSampleWeight()); batch = persistenceService.createSpeciesBatch(batch, null); @@ -449,37 +507,109 @@ // batch with categories - SpeciesBatch batch = createSpeciesBatch(operation, - specy, - null, - enumerationFile.PMFM_ID_SORTED_UNSORTED, - sortedCaracteristic); + SpeciesBatch rootBatch = createSpeciesBatch(operation, + specy, + null, + null, + enumerationFile.PMFM_ID_SORTED_UNSORTED, + sortedCaracteristic); - batch = persistenceService.createSpeciesBatch(batch, null); + rootBatch = persistenceService.createSpeciesBatch(rootBatch, null); + for (PsionImportBatchModel batchModel : batchs) { - SpeciesBatch childBatch = createSpeciesBatch(operation, - batchModel.getSpecies(), - batchModel.getWeight(), - batchModel.getCategoryId(), - batchModel.getCategoryValue()); - //FIXME Check this is ok. - childBatch.setWeight(batchModel.getSampleWeight()); + SpeciesBatch parentBatch = rootBatch; - childBatch = persistenceService.createSpeciesBatch(childBatch, batch.getId()); + SpeciesBatch childBatch = null; + Iterator<PsionImportBatchModel.SampleCategory> categoryIterator = batchModel.getCategoryIterator(); + + while (categoryIterator.hasNext()) { + PsionImportBatchModel.SampleCategory sampleCategory = categoryIterator.next(); + + boolean lastCategory = !categoryIterator.hasNext(); + + Integer categoryId = sampleCategory.getCategoryId(); + Serializable categoryValue = sampleCategory.getCategoryValue(); + + if (lastCategory) { + + // always create the leaf + childBatch = createSpeciesBatch(operation, + specy, + batchModel.getWeight(), + batchModel.getSampleWeight(), + categoryId, + categoryValue); + } else { + + // try to find child in parent children + + childBatch = null; + for (SpeciesBatch speciesBatch : parentBatch.getChildBatchs()) { + + if (speciesBatch.getSampleCategoryId().equals(categoryId) && + speciesBatch.getSampleCategoryValue().equals(categoryValue)) { + childBatch = speciesBatch; + break; + } + } + + if (childBatch == null) { + + // must create it + childBatch = createSpeciesBatch(operation, + specy, + null, + null, + categoryId, + categoryValue); + } + } + + if (TuttiEntities.isNew(childBatch)) { + + // persist it + childBatch = persistenceService.createSpeciesBatch(childBatch, parentBatch.getId()); + parentBatch.addChildBatchs(childBatch); + } + + parentBatch = childBatch; + } + persistFrequencies(childBatch, batchModel); } } result.incrementNbImported(); } - for (String ignoredSpecies : importModel.getIgnoredSpecies()) { - result.incrementNbNotImported(); - } persistenceService.saveCatchBatch(catchBatch); + } + protected PsionImportBatchModel.SampleCategory guessCategory(String categoryCode) { + + PsionImportBatchModel.SampleCategory result = null; + + Integer caracteristicId; + CaracteristicQualitativeValue caracteristicQualitativeValue; + + if (SEX_VALUES.contains(categoryCode)) { + + // sex caracteristic + caracteristicId = enumerationFile.PMFM_ID_SEX; + caracteristicQualitativeValue = sexCaracteristicValues.get(categoryCode); + + result = new PsionImportBatchModel.SampleCategory(caracteristicId, caracteristicQualitativeValue); + + } else if (MATURITY_VALUES.contains(categoryCode)) { + + // maturity caracteristic + caracteristicId = enumerationFile.PMFM_ID_MATURITY; + caracteristicQualitativeValue = maturityCaracteristicValues.get(categoryCode); + + result = new PsionImportBatchModel.SampleCategory(caracteristicId, caracteristicQualitativeValue); + } return result; } @@ -506,19 +636,10 @@ persistenceService.saveSpeciesBatchFrequency(batch.getId(), toSave); } - protected void addBatchToModel(PsionImportModel importModel, - PsionImportBatchModel batch) throws IOException { - - if (log.isInfoEnabled()) { - log.info("Adding for species " + batch.getSpecies().getSurveyCode() + ", " + - batch.getNbFrequencies() + " batchs."); - } - importModel.addBatch(batch); - } - protected SpeciesBatch createSpeciesBatch(FishingOperation operation, Species species, Float catchWeight, + Float sampleWeight, Integer categoryId, Serializable cqv) { SpeciesBatch batch = SpeciesBatchs.newSpeciesBatch(); @@ -526,8 +647,11 @@ batch.setSampleCategoryId(categoryId); batch.setSampleCategoryValue(cqv); batch.setSpecies(species); - batch.setSampleCategoryWeight( - catchWeight == null ? null : TuttiEntities.roundKiloGram(catchWeight)); + batch.setSampleCategoryWeight(catchWeight == null ? null : TuttiEntities.roundKiloGram(catchWeight)); + //FIXME Check this is ok. + batch.setWeight(sampleWeight == null ? null : TuttiEntities.roundKiloGram(sampleWeight)); + + batch.setChildBatchs(Lists.<SpeciesBatch>newArrayList()); return batch; } @@ -537,7 +661,7 @@ attachment.setObjectId(Integer.valueOf(catchBatch.getId())); attachment.setName(f.getName()); String date = DateFormat.getDateTimeInstance().format(context.currentDate()); - String comment = _("tutti.service.arp.import.attachment.comment", date); + String comment = _("tutti.service.psion.import.attachment.comment", date); attachment.setComment(comment); persistenceService.createAttachment(attachment, f); } @@ -557,43 +681,4 @@ } return result; } - - /** - * All usables keywords in a psion import. - * <p/> - * Created on 1/20/14. - * - * @author Tony Chemit <chemit@codelutin.com> - * @since 3.0.1 - */ - public static enum PsionImportKeyword { - - ESPE(false), - POID(false), - TAIL(false), - CATE(false), - LONG(false), - - // ignored - HEUR(true), - AGEN(true), - CAIS(true), - TAXO(true), - OUTI(true), - PORT(true), - DATE(true), - HERE(true), - NAVI(true), - ENGI(true); - - private final boolean ignored; - - PsionImportKeyword(boolean ignored) { - this.ignored = ignored; - } - - public boolean isIgnored() { - return ignored; - } - } } Modified: trunk/tutti-service/src/main/resources/i18n/tutti-service_en_GB.properties =================================================================== --- trunk/tutti-service/src/main/resources/i18n/tutti-service_en_GB.properties 2014-01-21 10:01:54 UTC (rev 1518) +++ trunk/tutti-service/src/main/resources/i18n/tutti-service_en_GB.properties 2014-01-21 16:29:59 UTC (rev 1519) @@ -43,6 +43,7 @@ tutti.report.step.export.fishingOperation= tutti.report.step.generateReport= tutti.report.step.load.fishingOperation= +tutti.service.arp.import.attachment.comment= tutti.service.compressZipFile.error= tutti.service.context.serviceInstanciation.error= tutti.service.csv.parse.entityNotFound= @@ -144,6 +145,17 @@ tutti.service.protocol.import.benthos.error= tutti.service.protocol.import.species.error= tutti.service.protocol.import.taxonUsed.error= +tutti.service.psion.import.attachment.comment= +tutti.service.psionimport.error.invalid.category.syntax= +tutti.service.psionimport.error.invalid.command.syntax= +tutti.service.psionimport.error.invalid.date.format= +tutti.service.psionimport.error.invalid.firstLine= +tutti.service.psionimport.error.invalid.line.syntax= +tutti.service.psionimport.error.invalid.operation= +tutti.service.psionimport.error.no.lengthClass.caracteristic= +tutti.service.psionimport.error.no.protocol= +tutti.service.psionimport.error.species.already.used= +tutti.service.psionimport.error.species.not.found= tutti.service.pupitri.export.species.error= tutti.service.pupitri.import.attachment.comment= tutti.service.pupitri.import.carrousel.error= Modified: trunk/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties =================================================================== --- trunk/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties 2014-01-21 10:01:54 UTC (rev 1518) +++ trunk/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties 2014-01-21 16:29:59 UTC (rev 1519) @@ -144,6 +144,17 @@ tutti.service.protocol.import.benthos.error=Erreur lors de l'import du benthos du protocole %1s du fichier %2s tutti.service.protocol.import.species.error=Erreur lors de l'import des espèces du protocole %1s du fichier %2s tutti.service.protocol.import.taxonUsed.error=Le taxon référent d'id %s est déjà utilisé +tutti.service.psion.import.attachment.comment=Import Psion du %s +tutti.service.psionimport.error.invalid.category.syntax=Ligne %s, catégorisation '%s' inconnue, l'espèce %s sera ignorée +tutti.service.psionimport.error.invalid.command.syntax=Ligne %s, la commande '%s' n'est pas reconnue +tutti.service.psionimport.error.invalid.date.format=Format de la date du trait incorrecte (mm-dd-aaaa) +tutti.service.psionimport.error.invalid.firstLine=La ligne %s (%s) n'est pas valide, elle doit être précédée par une ligne ESPE +tutti.service.psionimport.error.invalid.line.syntax=Ligne %s, format incorrecte (%s) +tutti.service.psionimport.error.invalid.operation=Code station ou date du trait incorrect +tutti.service.psionimport.error.no.lengthClass.caracteristic=Ligne %s espèce '%s' ignorée car pas de caractéristique de classe de taille renseignée dans le protocole. +tutti.service.psionimport.error.no.protocol=Impossible de faire un import Psion sans protocol. +tutti.service.psionimport.error.species.already.used="Ligne %s, espèce '%s' déjà utilisée +tutti.service.psionimport.error.species.not.found=Ligne %s, espèce '%s' inconnue tutti.service.pupitri.export.species.error=Erreur lors de l'export des espèces pour Pupitri dans le fichier %s tutti.service.pupitri.import.attachment.comment=Import Pupitri du %s tutti.service.pupitri.import.carrousel.error=Erreur lors de l'import du fichier de carrousel %2s pour le trait %1s Modified: trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/psionimport/PsionImportServiceTest.java =================================================================== --- trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/psionimport/PsionImportServiceTest.java 2014-01-21 10:01:54 UTC (rev 1518) +++ trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/psionimport/PsionImportServiceTest.java 2014-01-21 16:29:59 UTC (rev 1519) @@ -42,6 +42,7 @@ import java.io.File; import java.io.IOException; +import java.util.List; /** * Created on 1/19/14. @@ -85,9 +86,9 @@ TuttiServiceContext serviceContext = dbResource.getServiceContext(); - File protocol = dbResource.copyClassPathResource("pupitri/ano-3898.tuttiProtocol", "ano-3898.tuttiProtocol"); + File protocol = dbResource.copyClassPathResource("psion/protocol.tuttiProtocol", "protocol.tuttiProtocol"); dbResource.getConfig().getApplicationConfig().setOption(TuttiConfigurationOption.DB_PROTOCOL_DIRECTORY.getKey(), protocol.getParentFile().getAbsolutePath()); - serviceContext.getDataContext().setProtocolId("ano-3898"); + serviceContext.getDataContext().setProtocolId("protocol"); dbResource.openDataContext(); @@ -103,86 +104,88 @@ @Test public void importCC053() throws IOException { - File trunk = dbResource.copyClassPathResource("psion/CC053.IWA", "CC053.IWA"); + File importFile = dbResource.copyClassPathResource("psion/CC053.IWA", "CC053.IWA"); FishingOperation operation = dataContext.operations.get(1); CatchBatch catchBatch = persistenceService.getCatchBatchFromFishingOperation(operation.getId()); catchBatch.setFishingOperation(operation); BatchContainer<SpeciesBatch> rootSpeciesBatch = persistenceService.getRootSpeciesBatch(operation.getId(), null); -// Assert.assertEquals(3, rootSpeciesBatch.sizeChildren()); - PsionImportResult arpImportResult = service.importFile(trunk, operation, catchBatch); + int oldNbBatchs = rootSpeciesBatch.sizeChildren(); - PsionImportResult importResult = service.importFile(trunk, operation, catchBatch); + PsionImportResult importResult = service.importFile(importFile, operation, catchBatch); int nbAdded = importResult.getNbImported(); - int nbNotAdded = importResult.getNbNotImported(); + List<String> errors = importResult.getErrors(); if (log.isInfoEnabled()) { log.info("Imported: " + nbAdded); - log.info("Ignored: " + nbNotAdded); + log.info("Errors: " + errors.size()); } - Assert.assertEquals(9, nbAdded); - Assert.assertEquals(9, nbNotAdded); + Assert.assertEquals(17, nbAdded); + Assert.assertEquals(0, errors.size()); + // no batch imported BatchContainer<SpeciesBatch> rootSpeciesBatchAfter = persistenceService.getRootSpeciesBatch(operation.getId(), null); - Assert.assertEquals(9, rootSpeciesBatchAfter.sizeChildren()); + Assert.assertEquals(oldNbBatchs + 17, rootSpeciesBatchAfter.sizeChildren()); } @Test public void importFM001() throws IOException { - File trunk = dbResource.copyClassPathResource("psion/FM001.IWA", "FM001.IWA"); + File importFile = dbResource.copyClassPathResource("psion/FM001.IWA", "FM001.IWA"); FishingOperation operation = dataContext.operations.get(1); CatchBatch catchBatch = persistenceService.getCatchBatchFromFishingOperation(operation.getId()); catchBatch.setFishingOperation(operation); BatchContainer<SpeciesBatch> rootSpeciesBatch = persistenceService.getRootSpeciesBatch(operation.getId(), null); -// Assert.assertEquals(3, rootSpeciesBatch.sizeChildren()); - PsionImportResult importResult = service.importFile(trunk, operation, catchBatch); + int oldNbBatchs = rootSpeciesBatch.sizeChildren(); + PsionImportResult importResult = service.importFile(importFile, operation, catchBatch); + int nbAdded = importResult.getNbImported(); - int nbNotAdded = importResult.getNbNotImported(); + List<String> errors = importResult.getErrors(); if (log.isInfoEnabled()) { log.info("Imported: " + nbAdded); - log.info("Ignored: " + nbNotAdded); + log.info("Errors: " + errors.size()); } - Assert.assertEquals(2, nbAdded); - Assert.assertEquals(8, nbNotAdded); + Assert.assertEquals(10, nbAdded); + Assert.assertEquals(0, errors.size()); BatchContainer<SpeciesBatch> rootSpeciesBatchAfter = persistenceService.getRootSpeciesBatch(operation.getId(), null); - Assert.assertEquals(2, rootSpeciesBatchAfter.sizeChildren()); + Assert.assertEquals(oldNbBatchs + 10, rootSpeciesBatchAfter.sizeChildren()); } @Test public void importCFchephren() throws IOException { - File trunk = dbResource.copyClassPathResource("psion/CFchephren 110612.IWA", "CFchephren 110612.IWA"); + File importFile = dbResource.copyClassPathResource("psion/CFchephren 110612.IWA", "CFchephren 110612.IWA"); FishingOperation operation = dataContext.operations.get(1); CatchBatch catchBatch = persistenceService.getCatchBatchFromFishingOperation(operation.getId()); catchBatch.setFishingOperation(operation); BatchContainer<SpeciesBatch> rootSpeciesBatch = persistenceService.getRootSpeciesBatch(operation.getId(), null); -// Assert.assertEquals(3, rootSpeciesBatch.sizeChildren()); - PsionImportResult importResult = service.importFile(trunk, operation, catchBatch); + int oldNbBatchs = rootSpeciesBatch.sizeChildren(); + PsionImportResult importResult = service.importFile(importFile, operation, catchBatch); int nbAdded = importResult.getNbImported(); - int nbNotAdded = importResult.getNbNotImported(); + List<String> errors = importResult.getErrors(); if (log.isInfoEnabled()) { log.info("Imported: " + nbAdded); - log.info("Ignored: " + nbNotAdded); + log.info("Errors: " + errors.size()); } Assert.assertEquals(0, nbAdded); - Assert.assertEquals(1, nbNotAdded); + Assert.assertEquals(1, errors.size()); + // no batch imported BatchContainer<SpeciesBatch> rootSpeciesBatchAfter = persistenceService.getRootSpeciesBatch(operation.getId(), null); - Assert.assertEquals(0, rootSpeciesBatchAfter.sizeChildren()); + Assert.assertEquals(oldNbBatchs, rootSpeciesBatchAfter.sizeChildren()); } } Modified: trunk/tutti-service/src/test/resources/psion/CC053.IWA =================================================================== --- trunk/tutti-service/src/test/resources/psion/CC053.IWA 2014-01-21 10:01:54 UTC (rev 1518) +++ trunk/tutti-service/src/test/resources/psion/CC053.IWA 2014-01-21 16:29:59 UTC (rev 1519) @@ -1,6 +1,6 @@ cc -053 -06-13-2013 +A +07-01-2013 07:19:11 ESPE : MERLMER @@ -346,11 +346,6 @@ LONG : 15 LONG : 14 LONG : 11.5 -ESPE : SQUIMAN -POID : 37 -TAIL : 37 -CATE : N -LONG : 27 ESPE : OCTOVUL POID : 11600 TAIL : 11600 Modified: trunk/tutti-service/src/test/resources/psion/FM001.IWA =================================================================== --- trunk/tutti-service/src/test/resources/psion/FM001.IWA 2014-01-21 10:01:54 UTC (rev 1518) +++ trunk/tutti-service/src/test/resources/psion/FM001.IWA 2014-01-21 16:29:59 UTC (rev 1519) @@ -1,6 +1,6 @@ fm -001 -05-24-2013 +A +07-01-2013 18:28:13 ESPE : HELIDAC @@ -20,8 +20,18 @@ ESPE : RAJAOXY POID : 115 TAIL : 115 +CATE : M +LONG : 34 +ESPE : RAJAOXY +POID : 115 +TAIL : 115 CATE : F1 LONG : 35 +ESPE : RAJAOXY +POID : 115 +TAIL : 115 +CATE : F2 +LONG : 36 ESPE : PHYIBLE POID : 235 TAIL : 235 Added: trunk/tutti-service/src/test/resources/psion/protocol.tuttiProtocol =================================================================== --- trunk/tutti-service/src/test/resources/psion/protocol.tuttiProtocol (rev 0) +++ trunk/tutti-service/src/test/resources/psion/protocol.tuttiProtocol 2014-01-21 16:29:59 UTC (rev 1519) @@ -0,0 +1,2427 @@ +id: 7a959cb1-2bf0-4876-8e20-ba0021c27835 +name: Protocole MEDITS +benthos: +- !SpeciesProtocol + id: e48d74a1-3ed9-4063-b970-fa95601ce813 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 907 + speciesSurveyCode: ALPHGLA + weightEnabled: true +- !SpeciesProtocol + id: bedf43f2-1ba4-404e-ada2-cdd5c66e67b3 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 886 + speciesSurveyCode: CHLOGRA + weightEnabled: true +- !SpeciesProtocol + id: 99d3c435-ce9e-48f2-a2e5-de1e30af1c05 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 931 + speciesSurveyCode: CRANSPP + weightEnabled: true +- !SpeciesProtocol + id: 6b2491d8-d237-489c-b98a-460594276fec + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 990 + speciesSurveyCode: DARDSPP + weightEnabled: true +- !SpeciesProtocol + id: cab84c60-0637-49b8-880e-74bf53fe8de8 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1140 + speciesSurveyCode: DORILAN + weightEnabled: true +- !SpeciesProtocol + id: ce1dc3a2-912b-439b-8930-83c6bb5a9112 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1012 + speciesSurveyCode: GALADIS + weightEnabled: true +- !SpeciesProtocol + id: ddfe6e29-03e4-4387-b052-a698f5087bf2 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1013 + speciesSurveyCode: GALAINT + weightEnabled: true +- !SpeciesProtocol + id: fe7f5f8d-bfac-4ae9-8e9e-3abed1c6aa1e + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1014 + speciesSurveyCode: GALANEX + weightEnabled: true +- !SpeciesProtocol + id: 03fd6fe9-9e9b-409e-96bf-57caa9e9419a + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1103 + speciesSurveyCode: GONERHO + weightEnabled: true +- !SpeciesProtocol + id: fb000dfa-157d-42d8-affe-3585b21addb0 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 951 + speciesSurveyCode: HOMAVUL + weightEnabled: true +- !SpeciesProtocol + id: 6e3a1545-86ff-41f7-ab1a-892c60e12a55 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1029 + speciesSurveyCode: HOMOBAR + weightEnabled: true +- !SpeciesProtocol + id: 6c61c141-d7de-4201-8291-53bfd17f856f + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1129 + speciesSurveyCode: INACSPP + weightEnabled: true +- !SpeciesProtocol + id: 6f594c41-c44a-4d26-a76a-a54ec9368862 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1136 + speciesSurveyCode: MACRSPP + weightEnabled: true +- !SpeciesProtocol + id: 50e66761-7754-4c68-bd89-b2a4a8749421 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1111 + speciesSurveyCode: MAJASQU + weightEnabled: true +- !SpeciesProtocol + id: c4fc0b86-0848-49b1-b150-8f2bf4ca2034 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1067 + speciesSurveyCode: MCPIDEP + weightEnabled: true +- !SpeciesProtocol + id: 242174d3-8ca9-4cf9-b8b9-21316ffa5a93 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1066 + speciesSurveyCode: MCPITUB + weightEnabled: true +- !SpeciesProtocol + id: a3915c98-71ec-4561-8673-95933e8edf70 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1075 + speciesSurveyCode: MCPIVER + weightEnabled: true +- !SpeciesProtocol + id: ac3f2c25-fc67-4820-95a2-1de26faf840c + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1015 + speciesSurveyCode: MUNISPP + weightEnabled: true +- !SpeciesProtocol + id: 83bf86a4-810d-4c9b-8dcb-37c66735b33c + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 999 + speciesSurveyCode: PAGUEXC + weightEnabled: true +- !SpeciesProtocol + id: 2c53f5e8-688b-4766-8b22-d62d92109f8a + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 994 + speciesSurveyCode: PAGUPRI + weightEnabled: true +- !SpeciesProtocol + id: baafb7ef-164c-4b98-975c-28c518a7315a + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 997 + speciesSurveyCode: PAGUSPP + weightEnabled: true +- !SpeciesProtocol + id: e26e4708-50e8-4947-b395-18dbd51e25fb + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 885 + speciesSurveyCode: PAPANAR + weightEnabled: true +- !SpeciesProtocol + id: c4b0705b-5657-480e-ad6b-4d6327de8073 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1028 + speciesSurveyCode: PAROCUV + weightEnabled: true +- !SpeciesProtocol + id: 33b8eb55-932c-488a-8de9-d4696a485c21 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 868 + speciesSurveyCode: PASISIV + weightEnabled: true +- !SpeciesProtocol + id: 2e4c871c-d943-4dff-8d8d-a23bf39f8482 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 866 + speciesSurveyCode: PASISPP + weightEnabled: true +- !SpeciesProtocol + id: 423733e0-43c8-48ef-b6b9-b0077b8a03ae + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 880 + speciesSurveyCode: PLESACA + weightEnabled: true +- !SpeciesProtocol + id: 2cc65b6e-4f4d-4757-aa89-40dd52f13f3c + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 881 + speciesSurveyCode: PLESANT + weightEnabled: true +- !SpeciesProtocol + id: 99805344-1325-4139-b3dd-f6e4690b5316 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 7185 + speciesSurveyCode: PLESEDW + weightEnabled: true +- !SpeciesProtocol + id: 6aa66a07-fcd1-4fdf-aec9-29ce15c595f9 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 882 + speciesSurveyCode: PLESGIG + weightEnabled: true +- !SpeciesProtocol + id: fe2af1be-2d65-4658-b587-49f22d4b939f + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 883 + speciesSurveyCode: PLESHET + weightEnabled: true +- !SpeciesProtocol + id: 5fde324e-f7a1-4516-9190-7eaf2239c69b + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 884 + speciesSurveyCode: PLESMAR + weightEnabled: true +- !SpeciesProtocol + id: 8a8129f5-f66a-4057-8282-6c6287e80629 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 879 + speciesSurveyCode: PLESSPP + weightEnabled: true +- !SpeciesProtocol + id: ff17d20e-bfa6-4752-8c52-5614a4d0ae3e + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 953 + speciesSurveyCode: POLCTYP + weightEnabled: true +- !SpeciesProtocol + id: 5b3ccbb3-2f1a-4b55-b5b3-69a0559edbb9 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 935 + speciesSurveyCode: PONPNOR + weightEnabled: true +- !SpeciesProtocol + id: ebc7e293-3dd4-4d9a-b314-fdc7b0a23d89 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 934 + speciesSurveyCode: PONPSPI + weightEnabled: true +- !SpeciesProtocol + id: 95fa55c4-f2f3-451f-ae27-3f520e43af38 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 928 + speciesSurveyCode: PONTCAT + weightEnabled: true +- !SpeciesProtocol + id: fa1a37a0-3623-47be-aaa4-4b6c725b8b1d + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 929 + speciesSurveyCode: PONTLAC + weightEnabled: true +- !SpeciesProtocol + id: d9a9967d-f191-4e6e-9a5c-a5dea4b8b774 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 10607 + speciesSurveyCode: PROCEDU + weightEnabled: true +- !SpeciesProtocol + id: bbf63159-be69-444d-a004-66a13a63088b + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 915 + speciesSurveyCode: PROCSPP + weightEnabled: true +- !SpeciesProtocol + id: 489084e7-7442-4ade-b356-cacb09e0ed3f + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 858 + speciesSurveyCode: SOLOMEM + weightEnabled: true +- !SpeciesProtocol + id: c0ed971f-8a60-4ddc-888a-866483167241 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 715 + speciesSurveyCode: SCALSCA + weightEnabled: true +- !SpeciesProtocol + id: 1e9007ee-a31d-451f-9ad2-f6de5048f4cb + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 837 + speciesSurveyCode: EUPHSPP + weightEnabled: true +- !SpeciesProtocol + id: 1a27e40d-2660-4e47-badd-0df6cb48efc1 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 831 + speciesSurveyCode: SQUIMAN + lengthStepPmfmId: 1417 + weightEnabled: true +- !SpeciesProtocol + id: 04601e60-e556-428c-8aec-2beb1d8a5784 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 353 + speciesSurveyCode: ATRIFRA + weightEnabled: true +- !SpeciesProtocol + id: 4a296117-cfea-41fa-ba1d-9ddee2480957 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 379 + speciesSurveyCode: CARDACU + weightEnabled: true +- !SpeciesProtocol + id: e16a2e50-fc6f-4255-897f-337286659f38 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 378 + speciesSurveyCode: CARDECH + weightEnabled: true +- !SpeciesProtocol + id: a70dcb6b-6dc1-48f3-b95c-d47b933ff50a + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 382 + speciesSurveyCode: CARDSPI + weightEnabled: true +- !SpeciesProtocol + id: a2c6201f-12f1-432a-b4a5-d5fa8b44e860 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 362 + speciesSurveyCode: PECTSPP + weightEnabled: true +- !SpeciesProtocol + id: fcba0a99-625d-4854-9305-da4a346dbcc9 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 261 + speciesSurveyCode: APORPES + weightEnabled: true +- !SpeciesProtocol + id: 90fca18f-1277-4de4-8ee2-50711a0fed72 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 262 + speciesSurveyCode: APORSER + weightEnabled: true +- !SpeciesProtocol + id: 84b81e6a-3b65-485d-9bca-f37ef670709f + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 305 + speciesSurveyCode: BUCCSPP + weightEnabled: true +- !SpeciesProtocol + id: e8c86081-2b02-4e6b-a82b-c28b2d3422fd + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 280 + speciesSurveyCode: CASSECH + weightEnabled: true +- !SpeciesProtocol + id: c43a3c68-95e0-405b-87c4-9c8313ef68a4 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 281 + speciesSurveyCode: CASSTYR + weightEnabled: true +- !SpeciesProtocol + id: b7aedc06-1d73-4a11-8369-c71f5d244f37 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 2451 + speciesSurveyCode: GIBBSPP + weightEnabled: true +- !SpeciesProtocol + id: dd2dfe21-db6d-4a42-a480-610051e55f4a + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 3928 + speciesSurveyCode: MUREBRA + weightEnabled: true +- !SpeciesProtocol + id: 37db060c-6c26-46f2-bce3-44cfb88f4c2c + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 292 + speciesSurveyCode: MURETRU + weightEnabled: true +- !SpeciesProtocol + id: d15aee86-46a1-4b67-9228-75ca54cbd4e2 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 318 + speciesSurveyCode: SCAPNIG + weightEnabled: true +- !SpeciesProtocol + id: 3fe5fc8e-0cc7-43cb-a9a6-16c7875a1011 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1189 + speciesSurveyCode: MICOSPP + weightEnabled: true +- !SpeciesProtocol + id: ca52cdab-2b66-4d37-8af8-b81529aa8d52 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1191 + speciesSurveyCode: MICOVUL + weightEnabled: true +- !SpeciesProtocol + id: 6ac82f3b-a242-4923-92ad-5eee494c0861 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 224 + speciesSurveyCode: MBBRYOZ + weightEnabled: true +- !SpeciesProtocol + id: 13b65cd0-a23c-47e0-a92c-30b68f2edde5 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 3671 + speciesSurveyCode: GRYPVIT + weightEnabled: true +- !SpeciesProtocol + id: 547f9754-999d-46c6-853e-83bb687604be + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 4626 + speciesSurveyCode: ADAMCAR + weightEnabled: true +- !SpeciesProtocol + id: a353ed3f-76e8-4c26-a270-17f06b539e14 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 133 + speciesSurveyCode: ALCYPAL + weightEnabled: true +- !SpeciesProtocol + id: c1023085-ad82-46a7-aef8-7bb04c5ef860 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 3037 + speciesSurveyCode: ALCYSPP + weightEnabled: true +- !SpeciesProtocol + id: 50328180-2c0b-410b-bd0f-875957542e42 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 6758 + speciesSurveyCode: FMVERET + weightEnabled: true +- !SpeciesProtocol + id: 3b787133-a724-411e-a625-8baf34542b7a + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 6804 + speciesSurveyCode: FUNIQUA + weightEnabled: true +- !SpeciesProtocol + id: d0cc902e-ad69-46e8-9448-c70b3f343d6f + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 2224 + speciesSurveyCode: ORACTIN + weightEnabled: true +- !SpeciesProtocol + id: f66c8ecd-afdf-4227-b10a-9ec3a34cb87c + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 7390 + speciesSurveyCode: ANTESPP + weightEnabled: true +- !SpeciesProtocol + id: 10d40446-c9e5-4822-9de5-4b746c24977c + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 11181 + speciesSurveyCode: ASTRIRR + weightEnabled: true +- !SpeciesProtocol + id: 3754b3ad-1723-4f42-a746-7a320da08171 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 11943 + speciesSurveyCode: ASTRSPP + weightEnabled: true +- !SpeciesProtocol + id: 78d430ba-4d36-42e5-bb53-0a03a3f4ac6a + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 6812 + speciesSurveyCode: CIDACID + weightEnabled: true +- !SpeciesProtocol + id: a28fbcad-63b7-4f7f-8d22-b26a3aafbd49 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1151 + speciesSurveyCode: CLOPHIU + weightEnabled: true +- !SpeciesProtocol + id: 9d5fc95c-52cc-4e29-a901-a832db1ad7f3 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 4235 + speciesSurveyCode: ECHNACU + weightEnabled: true +- !SpeciesProtocol + id: 14271e01-b001-427d-b14a-d65667dd47b5 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 3397 + speciesSurveyCode: HOLOSPP + weightEnabled: true +- !SpeciesProtocol + id: b3b6e938-7f0d-46eb-9cfb-3b7d48dc6919 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 4240 + speciesSurveyCode: LEPRSPP + weightEnabled: true +- !SpeciesProtocol + id: 24b681d8-981c-4257-b8e2-680e66bce967 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1155 + speciesSurveyCode: OPHUOPH + weightEnabled: true +- !SpeciesProtocol + id: ec4f46f8-6c1d-42a7-85bf-953694f97218 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1177 + speciesSurveyCode: STICREG + weightEnabled: true +- !SpeciesProtocol + id: c9e18e97-92fa-4c87-b032-dd2efc434ab3 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 395 + speciesSurveyCode: SPISSPP + weightEnabled: true +- !SpeciesProtocol + id: a88de136-eac9-4cca-b22c-5f7ca1d14da9 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 246 + speciesSurveyCode: CANIGRA + weightEnabled: true +- !SpeciesProtocol + id: 55b686b8-6249-408d-b303-77c58e1cff48 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 245 + speciesSurveyCode: CANIZIZ + weightEnabled: true +- !SpeciesProtocol + id: 667f6b5c-f295-4c00-b03e-c097b5cd3aed + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 226 + speciesSurveyCode: CLGASTE + weightEnabled: true +- !SpeciesProtocol + id: 11c25935-9e93-49b5-b4ef-22de3aac3d0e + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 12060 + speciesSurveyCode: FMAPLYS + weightEnabled: true +- !SpeciesProtocol + id: 6fe77fe1-fafe-4846-ac80-1ec79b15ee34 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 250 + speciesSurveyCode: TURRSPP + weightEnabled: true +- !SpeciesProtocol + id: 199934f5-b6a6-46cd-bfc6-db1e81c48e40 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 4413 + speciesSurveyCode: APLYSPP + weightEnabled: true +- !SpeciesProtocol + id: 338fa494-885b-4392-8d89-bc19ee5cbfbf + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 155 + speciesSurveyCode: APHRACU + weightEnabled: true +- !SpeciesProtocol + id: 751705d4-25f2-4bb4-9a53-96aed1fc3d84 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 196 + speciesSurveyCode: FMMALDA + weightEnabled: true +- !SpeciesProtocol + id: 443aa667-4773-443a-ae48-76f80d016310 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 3032 + speciesSurveyCode: FMSABED + weightEnabled: true +- !SpeciesProtocol + id: 42af4c8f-fe49-4e33-a539-d4a966726530 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 209 + speciesSurveyCode: FMSERPU + weightEnabled: true +- !SpeciesProtocol + id: 94bec064-27cf-40c2-b746-ee1ddb0ef089 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 150 + speciesSurveyCode: MBANNEL + weightEnabled: true +- !SpeciesProtocol + id: dbe23df9-1ef9-44f3-a272-7dec649b4e87 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 211 + speciesSurveyCode: STERSCU + weightEnabled: true +- !SpeciesProtocol + id: 3c55f53b-2998-46e6-b1bf-f2761df75b29 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 3668 + speciesSurveyCode: DENTSPP + weightEnabled: true +- !SpeciesProtocol + id: 1f798975-e4ca-4df6-9adb-184e1ca167a4 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 147 + speciesSurveyCode: SIPSNUD + weightEnabled: true +- !SpeciesProtocol + id: b0f41012-8aa8-4633-b632-8b415f721606 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 7 + speciesSurveyCode: MBPORIF + weightEnabled: true +- !SpeciesProtocol + id: 3df8daac-bf56-4041-8ff0-02899d7f6dca + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1182 + speciesSurveyCode: CLASCID + weightEnabled: true +gearUseFeaturePmfmId: !com.google.common.collect.Lists$TransformingRandomAccessList +- 833 +- 828 +- 905 +- 826 +individualObservationPmfmId: !com.google.common.collect.Lists$TransformingRandomAccessList +- 196 +- 174 +- 1435 +lengthClassesPmfmId: +- 1417 +- 299 +- 307 +species: +- !SpeciesProtocol + id: 4c712b41-ab72-4ab2-88ef-75eabbcd3f94 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 299 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 848 + speciesSurveyCode: ARISFOL + weightEnabled: true +- !SpeciesProtocol + id: 3d9610bd-cd71-4f8c-8bd9-e0ab89e3023c + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 299 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 849 + speciesSurveyCode: ARITANT + weightEnabled: true +- !SpeciesProtocol + id: cdc14002-96d8-42e5-abe0-07cab51e8bc0 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 299 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 855 + speciesSurveyCode: PAPELON + weightEnabled: true +- !SpeciesProtocol + id: 972082e1-b1bf-4228-b8f6-19c5f040792e + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 299 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 949 + speciesSurveyCode: NEPRNOR + weightEnabled: true +- !SpeciesProtocol + id: f3149d94-a711-45b3-b9b3-1f734454a06e + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 1417 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 507 + speciesSurveyCode: ILLECOI + weightEnabled: true +- !SpeciesProtocol + id: b1da88e2-55ae-49f6-9174-4c189cc98e54 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 1417 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 489 + speciesSurveyCode: LOLIVUL + weightEnabled: true +- !SpeciesProtocol + id: 0dc70454-fccc-46cf-9176-2e38cb5c5c3a + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1277 + speciesSurveyCode: CENTGRA + weightEnabled: true +- !SpeciesProtocol + id: 4f70310c-2dd3-452f-8f44-d90feb39248e + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1282 + speciesSurveyCode: SCYMLIC + weightEnabled: true +- !SpeciesProtocol + id: 0d57db02-07d7-4b24-85d7-b2ffffd6b255 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1275 + speciesSurveyCode: ETMOSPI + weightEnabled: true +- !SpeciesProtocol + id: bd461ac9-f897-4fcd-ab23-abbf981279f1 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1254 + speciesSurveyCode: GALEGAL + weightEnabled: true +- !SpeciesProtocol + id: 1c264e2f-96f9-423b-a54b-cb5aa762b0cc + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1245 + speciesSurveyCode: GALUMEL + weightEnabled: true +- !SpeciesProtocol + id: 6efe4eb1-e2a7-4fdb-89ad-3b2d6b47e2ec + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1222 + speciesSurveyCode: HEPTPER + weightEnabled: true +- !SpeciesProtocol + id: 48412543-cf57-452d-979a-4e908cdd3f4c + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1220 + speciesSurveyCode: HEXAGRI + weightEnabled: true +- !SpeciesProtocol + id: baeca8b7-a1d7-4224-b3d6-022f15c6be5a + calcifySampleEnabled: true + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 2050 + speciesSurveyCode: LOPHBUD + weightEnabled: true +- !SpeciesProtocol + id: ec5d8fb6-e26b-4e61-89d8-7c169fbe6096 + calcifySampleEnabled: true + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 2049 + speciesSurveyCode: LOPHPIS + weightEnabled: true +- !SpeciesProtocol + id: 73b81c79-5117-4475-a393-ede51babfebe + calcifySampleEnabled: true + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1540 + speciesSurveyCode: MERLMER + weightEnabled: true +- !SpeciesProtocol + id: 944b5f40-f4d0-4fce-8b5d-5df2eb7ef30d + calcifySampleEnabled: true + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1689 + speciesSurveyCode: MULLBAR + weightEnabled: true +- !SpeciesProtocol + id: c5174b9b-061d-46e5-9a36-259d8dbe7ebf + calcifySampleEnabled: true + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1690 + speciesSurveyCode: MULLSUR + weightEnabled: true +- !SpeciesProtocol + id: b6f62ed7-34ea-48f3-a91c-196e5be13d45 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1257 + speciesSurveyCode: MUSTAST + weightEnabled: true +- !SpeciesProtocol + id: 543a37c5-1b1a-49b4-9a1e-2c0022b17b5c + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1258 + speciesSurveyCode: MUSTMED + weightEnabled: true +- !SpeciesProtocol + id: 1cc14725-4f35-4669-9048-0613a698a356 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1256 + speciesSurveyCode: MUSTMUS + weightEnabled: true +- !SpeciesProtocol + id: 310f665a-7c07-48fd-a6fd-65f5b43bd098 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1329 + speciesSurveyCode: MYLIAQU + weightEnabled: true +- !SpeciesProtocol + id: b83d4fd8-391a-42d5-8003-c71ecb8a9937 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1263 + speciesSurveyCode: OXYNCEN + weightEnabled: true +- !SpeciesProtocol + id: 2ec145c1-0184-4c26-ae12-34fcd006c48b + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1312 + speciesSurveyCode: RAJAALB + weightEnabled: true +- !SpeciesProtocol + id: 5fca8811-4586-43f8-8908-2f83ee9fa90d + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1313 + speciesSurveyCode: RAJAAST + weightEnabled: true +- !SpeciesProtocol + id: d7b06817-a0d9-4b7e-aa7f-77acf6916ce1 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1306 + speciesSurveyCode: RAJABAT + weightEnabled: true +- !SpeciesProtocol + id: 7d20d463-8c8e-4b1e-95b9-21076ab708ca + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1310 + speciesSurveyCode: RAJACIR + weightEnabled: true +- !SpeciesProtocol + id: 933d3b3a-b4cb-4239-896b-1f13f7ea6938 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1302 + speciesSurveyCode: RAJACLA + weightEnabled: true +- !SpeciesProtocol + id: 02521403-26cc-4338-98fa-c437de064538 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1314 + speciesSurveyCode: RAJAMEL + weightEnabled: true +- !SpeciesProtocol + id: b8cb7a32-93c9-4203-9e52-a13691528e21 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1315 + speciesSurveyCode: RAJAMIR + weightEnabled: true +- !SpeciesProtocol + id: dca10109-c771-4290-adac-3220d72a15d9 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1308 + speciesSurveyCode: RAJAOXY + weightEnabled: true +- !SpeciesProtocol + id: eaec42f0-ca79-481c-9062-5b2787c552c4 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1316 + speciesSurveyCode: RAJAPOL + weightEnabled: true +- !SpeciesProtocol + id: 498f415a-bd36-4076-9dce-86015c89f678 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1318 + speciesSurveyCode: RAJAUND + weightEnabled: true +- !SpeciesProtocol + id: e8269d24-6773-4b7f-88a0-de3ecafa83d6 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1292 + speciesSurveyCode: RHINCEM + weightEnabled: true +- !SpeciesProtocol + id: 401bd28f-f102-4529-a535-c02cfe561424 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1293 + speciesSurveyCode: RHINRHI + weightEnabled: true +- !SpeciesProtocol + id: c1f9efff-260f-4855-9f5f-25cbddd76dd8 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1242 + speciesSurveyCode: SCYOCAN + weightEnabled: true +- !SpeciesProtocol + id: f4b01ee8-9dbc-4dfb-a597-668924690e98 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1243 + speciesSurveyCode: SCYOSTE + weightEnabled: true +- !SpeciesProtocol + id: 3309c9a2-6e23-47a5-bf3c-83719215f6bf + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1266 + speciesSurveyCode: SQUAACA + weightEnabled: true +- !SpeciesProtocol + id: 2c7cbd7d-d5a1-4ab8-b27d-90d561074a2a + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1267 + speciesSurveyCode: SQUABLA + weightEnabled: true +- !SpeciesProtocol + id: f13d6105-09e6-4485-9b23-6fa034a4a707 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1288 + speciesSurveyCode: SQUTACU + weightEnabled: true +- !SpeciesProtocol + id: f1fba700-1436-42b2-8be0-86781893fb29 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1289 + speciesSurveyCode: SQUTOCL + weightEnabled: true +- !SpeciesProtocol + id: 519bcc67-852a-4cd6-8328-cad0931e6732 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1287 + speciesSurveyCode: SQUTSQU + weightEnabled: true +- !SpeciesProtocol + id: 87fb8821-e053-4f5c-8940-4f5540fb85c8 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 174 + - 196 + speciesReferenceTaxonId: 1297 + speciesSurveyCode: TORPMAR + weightEnabled: true +- !SpeciesProtocol + id: a744eb4d-43a7-4e7c-b51b-6c9b0c5a56d9 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 299 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 957 + speciesSurveyCode: PALIELE + weightEnabled: true +- !SpeciesProtocol + id: 3e854d0b-7592-43be-9bf0-00152ad19cf0 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 299 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 853 + speciesSurveyCode: PENAKER + weightEnabled: true +- !SpeciesProtocol + id: f684a970-b662-473e-aeff-b3b25881dc42 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 1417 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 514 + speciesSurveyCode: OCTOVUL + weightEnabled: true +- !SpeciesProtocol + id: 04d6c377-d267-4897-bfeb-eda10b88b082 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 1417 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 522 + speciesSurveyCode: ELEDCIR + weightEnabled: true +- !SpeciesProtocol + id: 767b25a5-b89e-4dc7-82c3-6d7046f21e34 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 1417 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 521 + speciesSurveyCode: ELEDMOS + weightEnabled: true +- !SpeciesProtocol + id: 52d095a6-ad24-4d03-b318-95a6b6434f89 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 1417 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 467 + speciesSurveyCode: SEPIOFF + weightEnabled: true +- !SpeciesProtocol + id: 2d5ae016-cb48-498d-949c-bc99f84b1c9b + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 1417 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 509 + speciesSurveyCode: TODASAG + weightEnabled: true +- !SpeciesProtocol + id: 033ae020-e315-4b51-9f62-6408f436ec7e + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1912 + speciesSurveyCode: ASPICUC + weightEnabled: true +- !SpeciesProtocol + id: 0a405bc2-1330-4cbb-87d2-a925a9393991 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1698 + speciesSurveyCode: BOOPBOO + weightEnabled: true +- !SpeciesProtocol + id: f75aa101-3ba5-4577-a2fc-f40d907dc896 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1953 + speciesSurveyCode: CITHMAC + weightEnabled: true +- !SpeciesProtocol + id: 0f84dfac-6bed-40b8-8df6-78d2fc6f8fa9 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1700 + speciesSurveyCode: DIPLANN + weightEnabled: true +- !SpeciesProtocol + id: c5b257e3-8d83-4d59-8d22-ceba000efdaa + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1702 + speciesSurveyCode: DIPLPUN + weightEnabled: true +- !SpeciesProtocol + id: 6e72e9cb-285d-455d-b943-ca68288438a6 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1703 + speciesSurveyCode: DIPLSAR + weightEnabled: true +- !SpeciesProtocol + id: 521f937a-f6ce-44cf-a32a-5567eaf45e6a + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1704 + speciesSurveyCode: DIPLVUL + weightEnabled: true +- !SpeciesProtocol + id: c1a0bb60-ff2c-4430-9ea6-fdd80bc350dd + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1362 + speciesSurveyCode: ENGRENC + weightEnabled: true +- !SpeciesProtocol + id: 46b2419d-80e8-45ce-8845-1deb7c744300 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1632 + speciesSurveyCode: EPINSPP + weightEnabled: true +- !SpeciesProtocol + id: 67bca5b0-b534-41fd-a81e-969168446289 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1920 + speciesSurveyCode: EUTRGUR + weightEnabled: true +- !SpeciesProtocol + id: d787ebfa-c8fe-4fac-b8f5-16c2b70e462c + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1905 + speciesSurveyCode: HELIDAC + weightEnabled: true +- !SpeciesProtocol + id: 3ef4b084-2080-4e17-a8f4-eb5eae314151 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1961 + speciesSurveyCode: LEPMBOS + weightEnabled: true +- !SpeciesProtocol + id: d565422d-5a09-4f63-8df7-3736726d012d + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1710 + speciesSurveyCode: LITHMOR + weightEnabled: true +- !SpeciesProtocol + id: 7ab19715-e91b-4ff0-bd3d-605be8a890e6 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1553 + speciesSurveyCode: MICMPOU + weightEnabled: true +- !SpeciesProtocol + id: ff7b2f1b-50ae-4d8d-82ce-916ac63c60bd + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1714 + speciesSurveyCode: PAGEACA + weightEnabled: true +- !SpeciesProtocol + id: 0415fc50-f9ac-4ad6-a4b2-a9d2875e2a26 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1715 + speciesSurveyCode: PAGEBOG + weightEnabled: true +- !SpeciesProtocol + id: e0d8f887-16ff-4d44-a35a-70a35146d44b + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1713 + speciesSurveyCode: PAGEERY + weightEnabled: true +- !SpeciesProtocol + id: 17e577d9-9b23-430d-b6aa-b4600378ced7 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1695 + speciesSurveyCode: SPARPAG + weightEnabled: true +- !SpeciesProtocol + id: d84bc931-3c2a-4819-ad4f-e007a830accc + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1573 + speciesSurveyCode: PHYIBLE + weightEnabled: true +- !SpeciesProtocol + id: a334e7b1-73a8-410d-a348-ed6ad81846fb + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1641 + speciesSurveyCode: POLYAME + weightEnabled: true +- !SpeciesProtocol + id: cc57956b-1fa1-40a0-a913-1550c0479052 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1957 + speciesSurveyCode: PSETMAX + weightEnabled: true +- !SpeciesProtocol + id: aa43606f-a395-453a-9e5c-8e75320f5559 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1351 + speciesSurveyCode: SARDPIL + weightEnabled: true +- !SpeciesProtocol + id: 56846282-2998-455e-a3c0-5b5adca223af + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 3789 + speciesSurveyCode: SCOMPNE + weightEnabled: true +- !SpeciesProtocol + id: 7f637203-607f-4f24-9076-9ec6f05bcd7e + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1772 + speciesSurveyCode: SCOMSCO + weightEnabled: true +- !SpeciesProtocol + id: 3969d69f-a17d-47ff-87d4-af539ae8ed45 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1996 + speciesSurveyCode: SOLEVUL + weightEnabled: true +- !SpeciesProtocol + id: 466b5b93-b472-4c8a-aa08-5bf53d90bfa0 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1723 + speciesSurveyCode: SPICMAE + weightEnabled: true +- !SpeciesProtocol + id: 1ee6372f-c2e8-4633-8db9-36b5f487a005 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1724 + speciesSurveyCode: SPICSMA + weightEnabled: true +- !SpeciesProtocol + id: 933968a6-1352-474f-a408-9939ad16e5b1 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1663 + speciesSurveyCode: TRACMED + weightEnabled: true +- !SpeciesProtocol + id: 69f476b0-862e-47e1-b593-2bb096616f9e + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1662 + speciesSurveyCode: TRACTRA + weightEnabled: true +- !SpeciesProtocol + id: 3ca8616b-71db-40d3-9b50-caaf2ec20b41 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1921 + speciesSurveyCode: TRIGLUC + weightEnabled: true +- !SpeciesProtocol + id: f5adec71-9859-487d-b728-e2edf84dd1e7 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1922 + speciesSurveyCode: TRIPLAS + weightEnabled: true +- !SpeciesProtocol + id: 9c337552-d9ce-43c8-baee-bb8a16990f06 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1558 + speciesSurveyCode: TRISCAP + weightEnabled: true +- !SpeciesProtocol + id: 6a8c710e-561b-42fa-822b-38fae515f841 + countIfNoFrequencyEnabled: true + lengthStepPmfmId: 307 + mandatorySampleCategoryId: + - 198 + speciesReferenceTaxonId: 1619 + speciesSurveyCode: ZEUSFAB + weightEnabled: true +- !SpeciesProtocol + id: d6b592f0-715e-469c-b5f9-a878a40d96f0 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 495 + speciesSurveyCode: ABRAVER + weightEnabled: true +- !SpeciesProtocol + id: b7be5501-ab00-4d28-970d-0a6ea8c68f85 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 491 + speciesSurveyCode: ALLOSPP + weightEnabled: true +- !SpeciesProtocol + id: 3219f09e-3d2b-47ad-bf3d-3f47f5678989 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1358 + speciesSurveyCode: ALOSALO + weightEnabled: true +- !SpeciesProtocol + id: 056bdc4b-11da-42d1-9974-8c95d20a8ad1 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1359 + speciesSurveyCode: ALOSFAL + weightEnabled: true +- !SpeciesProtocol + id: 9382a0b5-cb31-41e7-a928-8bf9adf1232a + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1637 + speciesSurveyCode: ANTHANT + weightEnabled: true +- !SpeciesProtocol + id: 14ebb140-3775-4e69-aa2e-edec2d2aca44 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1547 + speciesSurveyCode: ANTOMEG + weightEnabled: true +- !SpeciesProtocol + id: 2455d46e-558b-4400-8578-e2dfee943d81 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1394 + speciesSurveyCode: ARGESPY + weightEnabled: true +- !SpeciesProtocol + id: 5b560316-efa2-47a6-a200-4f1d1c7f15d3 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1970 + speciesSurveyCode: ARNOSPP + weightEnabled: true +- !SpeciesProtocol + id: 2dcb33c5-27f9-4b4f-9899-09a8fc8a79fa + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1972 + speciesSurveyCode: ARNOIMP + weightEnabled: true +- !SpeciesProtocol + id: 8a757c0c-ba3e-4fb5-a909-cb064927de06 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1971 + speciesSurveyCode: ARNOLAT + weightEnabled: true +- !SpeciesProtocol + id: 3d2ab930-a3ae-427e-a051-fd10a1082fd6 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1973 + speciesSurveyCode: ARNORUP + weightEnabled: true +- !SpeciesProtocol + id: cf728432-af31-4025-bb73-dfe8c5c59dd3 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1974 + speciesSurveyCode: ARNOTHO + weightEnabled: true +- !SpeciesProtocol + id: 8eaf92d2-cc37-496d-8163-ebf04822a274 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1913 + speciesSurveyCode: ASPIOBS + weightEnabled: true +- !SpeciesProtocol + id: f716bcb0-4378-4e06-b98e-3f60a16aaad8 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 523 + speciesSurveyCode: BATISPO + weightEnabled: true +- !SpeciesProtocol + id: cdc46f8e-8e52-4c79-a2f2-03e028df5f13 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1818 + speciesSurveyCode: BLENOCE + weightEnabled: true +- !SpeciesProtocol + id: d3ba3646-93fd-40ef-93fb-832a3cb660e6 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 2004 + speciesSurveyCode: BUGLLUT + weightEnabled: true +- !SpeciesProtocol + id: cf2b786c-4982-4ff8-8e3d-79aadc7f538f + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1810 + speciesSurveyCode: CALMSPP + weightEnabled: true +- !SpeciesProtocol + id: a08a8d64-6347-49b1-a04c-515a40721381 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1811 + speciesSurveyCode: CALMLYR + weightEnabled: true +- !SpeciesProtocol + id: c023762c-40ab-45cf-86e1-e706d9379a4e + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1812 + speciesSurveyCode: CALMMAC + weightEnabled: true +- !SpeciesProtocol + id: d5efefa8-395d-4432-b742-42705c605c2c + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1814 + speciesSurveyCode: CALMRIS + weightEnabled: true +- !SpeciesProtocol + id: bd1b7e19-f2ee-4604-894c-c47d66538ceb + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1624 + speciesSurveyCode: CAPOAPE + weightEnabled: true +- !SpeciesProtocol + id: 62aeb758-506f-4d20-979c-57dcc774e9c0 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1860 + speciesSurveyCode: CARPACU + weightEnabled: true +- !SpeciesProtocol + id: 21b09e73-3869-47b4-92fd-ee4673b0e3c0 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1720 + speciesSurveyCode: CECACIR + weightEnabled: true +- !SpeciesProtocol + id: 864923f3-cc7f-4abd-a624-868e1f1e6731 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1279 + speciesSurveyCode: CENTUYA + weightEnabled: true +- !SpeciesProtocol + id: 1c48f803-e058-4c2c-a924-b29507422267 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1654 + speciesSurveyCode: CEPOMAC + weightEnabled: true +- !SpeciesProtocol + id: 432de6bf-9f6e-4790-946b-75da0c9929d5 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1383 + speciesSurveyCode: CHAUSLO + weightEnabled: true +- !SpeciesProtocol + id: e9f97268-2810-429d-9194-aac6768f25d3 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1335 + speciesSurveyCode: CHIMMON + weightEnabled: true +- !SpeciesProtocol + id: 254fde77-2969-479f-b1d5-73addd18449b + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1410 + speciesSurveyCode: CLORAGA + weightEnabled: true +- !SpeciesProtocol + id: 16e7adde-7c7a-4ff3-910b-e50f34ba777b + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1532 + speciesSurveyCode: COELCOE + weightEnabled: true +- !SpeciesProtocol + id: eec35479-9550-4bf5-aca6-b2f9388df19d + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1533 + speciesSurveyCode: COELOCC + weightEnabled: true +- !SpeciesProtocol + id: 3537d192-e998-4caa-b760-4cb6a8f4d0b7 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1467 + speciesSurveyCode: CONGCON + weightEnabled: true +- !SpeciesProtocol + id: 25dce34d-5ebe-488b-aad6-3734314a641c + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1474 + speciesSurveyCode: DALOIMB + weightEnabled: true +- !SpeciesProtocol + id: d54f1cca-cb49-40e1-a8c0-10ab46df1d6c + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1321 + speciesSurveyCode: DASICEN + weightEnabled: true +- !SpeciesProtocol + id: 4ad0e928-afe2-444b-aeb9-50a92b48622b + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1322 + speciesSurveyCode: DASIPAS + weightEnabled: true +- !SpeciesProtocol + id: 339c15a6-1518-44cd-b23f-722f21370bf0 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 3003 + speciesSurveyCode: DASITOR + weightEnabled: true +- !SpeciesProtocol + id: ef87ff58-12f9-496e-9d87-05ab13fc6906 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1323 + speciesSurveyCode: DASIVIO + weightEnabled: true +- !SpeciesProtocol + id: 7fe7b385-ce85-464d-8b87-ff88814d005b + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1789 + speciesSurveyCode: GOBIQUA + weightEnabled: true +- !SpeciesProtocol + id: 56032d3e-93c6-4940-989c-c77e6830a821 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1706 + speciesSurveyCode: DENTDEN + weightEnabled: true +- !SpeciesProtocol + id: ed034eaf-6fe9-4404-bbae-72a1d1fef38e + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1644 + speciesSurveyCode: DICELAB + weightEnabled: true +- !SpeciesProtocol + id: 15918297-cb98-49cb-905e-145e8d7231c9 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 10581 + speciesSurveyCode: DIPLCER + weightEnabled: true +- !SpeciesProtocol + id: f29352c8-5caf-4bbb-ab30-6c13b9c5cd6b + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1475 + speciesSurveyCode: ECHEMIR + weightEnabled: true +- !SpeciesProtocol + id: fff748a1-94b9-4623-827d-c3d10a0e1af6 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1648 + speciesSurveyCode: EPIGSPP + weightEnabled: true +- !SpeciesProtocol + id: 51909bed-9e38-4db2-bfe6-bfcab3dfce70 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1649 + speciesSurveyCode: EPIGCON + weightEnabled: true +- !SpeciesProtocol + id: 720c4f61-6aaa-4462-ba80-bbfebff36c8e + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1650 + speciesSurveyCode: EPIGDEN + weightEnabled: true +- !SpeciesProtocol + id: 48859723-699c-4662-b965-ef7020c2c526 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1586 + speciesSurveyCode: GADAMAR + weightEnabled: true +- !SpeciesProtocol + id: d43881ee-1fc7-4e03-8fa7-540e321547c2 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 7693 + speciesSurveyCode: GADIARG + weightEnabled: true +- !SpeciesProtocol + id: 56c555be-f691-4e6a-9d2e-925fd3afa638 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1579 + speciesSurveyCode: GAIDMED + weightEnabled: true +- !SpeciesProtocol + id: ee845d00-009b-46fd-883d-ebdb547e0f20 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1580 + speciesSurveyCode: GAIDVUL + weightEnabled: true +- !SpeciesProtocol + id: b4ea935c-957e-47ce-81ec-c471f15c135b + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1396 + speciesSurveyCode: GLOSLEI + weightEnabled: true +- !SpeciesProtocol + id: 87b2f346-a827-4516-9d08-184ca2c87c7f + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1783 + speciesSurveyCode: GOBISPP + weightEnabled: true +- !SpeciesProtocol + id: 9b165269-d44e-4ccf-a4be-a809a5eeadef + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1785 + speciesSurveyCode: GOBINIG + weightEnabled: true +- !SpeciesProtocol + id: 12476229-943a-4037-8b79-83f14da19921 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 501 + speciesSurveyCode: HISTSPP + weightEnabled: true +- !SpeciesProtocol + id: b3843058-f126-44f1-823e-cac25ba4b6f6 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 7700 + speciesSurveyCode: HOPLMED + weightEnabled: true +- !SpeciesProtocol + id: c6b6e928-c8f2-4e3c-a8c1-4a6463f6980c + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1428 + speciesSurveyCode: LAMASPP + weightEnabled: true +- !SpeciesProtocol + id: 6637d2d8-5ffb-4e2a-8277-d185a44c3061 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1429 + speciesSurveyCode: LAMACRO + weightEnabled: true +- !SpeciesProtocol + id: 3ab57331-ec76-44ee-bab7-96c780e603f0 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1590 + speciesSurveyCode: LEPOLEP + weightEnabled: true +- !SpeciesProtocol + id: f1b914a1-37bf-42c8-9387-920a422b9963 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1960 + speciesSurveyCode: LEPMWHS + weightEnabled: true +- !SpeciesProtocol + id: 7c41537e-af2a-49ba-9959-39fb85d56527 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1917 + speciesSurveyCode: LEPTCAV + weightEnabled: true +- !SpeciesProtocol + id: abaab523-9759-4ec4-b103-5df101d0b510 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1918 + speciesSurveyCode: LEPTDIE + weightEnabled: true +- !SpeciesProtocol + id: a2ce385c-0786-459b-aa26-02d936797165 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1791 + speciesSurveyCode: GOBIFRI + weightEnabled: true +- !SpeciesProtocol + id: 91008a01-63e4-4e37-bdc1-dec8f0f0e9a5 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1882 + speciesSurveyCode: LIZAAUR + weightEnabled: true +- !SpeciesProtocol + id: eddfe767-343e-4cc6-97af-59dd8367ba8d + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1881 + speciesSurveyCode: LIZARAM + weightEnabled: true +- !SpeciesProtocol + id: 1ec767ba-1430-4678-a88f-ab9cfca572c2 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1883 + speciesSurveyCode: LIZASAL + weightEnabled: true +- !SpeciesProtocol + id: db272acd-412c-4fa3-8750-e9ba6c664331 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 488 + speciesSurveyCode: LOLISPP + weightEnabled: true +- !SpeciesProtocol + id: 67fa6ded-3a71-4ee3-a68c-b9c66b915775 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 12582 + speciesSurveyCode: LOLIFOR + weightEnabled: true +- !SpeciesProtocol + id: 3c5f43b9-3c1b-4416-b4fb-ac9627e6f305 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1497 + speciesSurveyCode: MACOSCO + weightEnabled: true +- !SpeciesProtocol + id: 5b6f52bb-9014-47d5-a642-67465903521f + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1379 + speciesSurveyCode: MAURMUE + weightEnabled: true +- !SpeciesProtocol + id: b9928831-f097-434e-b023-ec19e673b328 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1551 + speciesSurveyCode: GADUMER + weightEnabled: true +- !SpeciesProtocol + id: 5a0dbd0c-a97b-4b03-8fa3-65cac4dcafce + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 2011 + speciesSurveyCode: MICUVAR + weightEnabled: true +- !SpeciesProtocol + id: 590ad66e-8a57-4fb6-9160-64216646fa4e + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1567 + speciesSurveyCode: MOLVDYP + weightEnabled: true +- !SpeciesProtocol + id: 8c123060-9d02-4938-ad86-867b14c37f6c + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1568 + speciesSurveyCode: MOLVMAC + weightEnabled: true +- !SpeciesProtocol + id: 08628555-a63c-4def-a9f0-330fdb250092 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1566 + speciesSurveyCode: MOLVMOL + weightEnabled: true +- !SpeciesProtocol + id: 7d640ad6-0104-4dde-9792-36d792e8be3b + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1593 + speciesSurveyCode: MORAMOR + weightEnabled: true +- !SpeciesProtocol + id: 27ac2050-f2f2-425b-a203-33171a22b0c4 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1877 + speciesSurveyCode: MUGICEP + weightEnabled: true +- !SpeciesProtocol + id: 3ff92ada-84b8-4b8c-9be2-346a39e2aeaf + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1414 + speciesSurveyCode: MYCOSPP + weightEnabled: true +- !SpeciesProtocol + id: acbc1c5d-3125-4ce3-816f-b92135e53cf5 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1464 + speciesSurveyCode: NETTMEL + weightEnabled: true +- !SpeciesProtocol + id: 5c12bd71-e723-413d-9be9-2e062646070b + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1527 + speciesSurveyCode: NEZUAEQ + weightEnabled: true +- !SpeciesProtocol + id: db8b2566-540d-4d22-aaea-cd2949136a31 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1528 + speciesSurveyCode: NEZUSCL + weightEnabled: true +- !SpeciesProtocol + id: 7bd39d56-8571-4936-9247-2c3f7db3ca8c + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1483 + speciesSurveyCode: NOTABON + weightEnabled: true +- !SpeciesProtocol + id: 35cdc743-e4bf-45a8-b80f-9ac6f50e6b3e + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1711 + speciesSurveyCode: OBLAMEL + weightEnabled: true +- !SpeciesProtocol + id: 7aa028ca-c686-4592-8482-10be13c54d77 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 513 + speciesSurveyCode: OCTOSPP + weightEnabled: true +- !SpeciesProtocol + id: 2acef86b-b195-4ff7-8164-874751de27e4 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 515 + speciesSurveyCode: OCTODEP + weightEnabled: true +- !SpeciesProtocol + id: 4d715d15-f9e1-4081-9d10-cf0f651b728d + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 517 + speciesSurveyCode: OCTOSAL + weightEnabled: true +- !SpeciesProtocol + id: ee9780a1-4ffc-43d1-bda0-8c180b59b18d + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1476 + speciesSurveyCode: OPHCRUF + weightEnabled: true +- !SpeciesProtocol + id: 99345448-fefe-468f-bd59-6a0ba827dc8c + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1857 + speciesSurveyCode: OPDIBAR + weightEnabled: true +- !SpeciesProtocol + id: 9b50141a-7e9f-45bb-8cb9-0609aec8952e + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1858 + speciesSurveyCode: OPDIROC + weightEnabled: true +- !SpeciesProtocol + id: 6282d580-dde1-4477-89dd-f6ab1e4e63f1 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1477 + speciesSurveyCode: OPHISER + weightEnabled: true +- !SpeciesProtocol + id: 44dbd32c-d339-4666-941b-8be80326a7d5 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1572 + speciesSurveyCode: PHYIPHY + weightEnabled: true +- !SpeciesProtocol + id: b333a01f-33af-4fae-a8ee-372cbf0afd08 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 519 + speciesSurveyCode: OCTOTET + weightEnabled: true +- !SpeciesProtocol + id: 3951b007-79c2-40f9-9ce2-f56f2b66e480 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1300 + speciesSurveyCode: RAJASPP + weightEnabled: true +- !SpeciesProtocol + id: dd590225-43f1-4403-8acb-6894ca3a7ebb + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1301 + speciesSurveyCode: RAJABRA + weightEnabled: true +- !SpeciesProtocol + id: 9ac0e7e4-563d-4f60-957e-22fe39c0860a + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1309 + speciesSurveyCode: RAJAFUL + weightEnabled: true +- !SpeciesProtocol + id: 7efd6a9a-1e6a-47da-915c-b68d1fd00017 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1304 + speciesSurveyCode: RAJAMON + weightEnabled: true +- !SpeciesProtocol + id: f4b357aa-1c5c-40d8-8acd-b1ecffa18025 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1311 + speciesSurveyCode: RAJANAE + weightEnabled: true +- !SpeciesProtocol + id: 003afb88-af45-457c-a84b-16975a529645 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1317 + speciesSurveyCode: RAJARDA + weightEnabled: true +- !SpeciesProtocol + id: 4ae3247b-a7d3-4d1d-bd78-9e866821c072 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 471 + speciesSurveyCode: ROSSMAC + weightEnabled: true +- !SpeciesProtocol + id: 88da67b0-2f77-4d0b-bed1-08f3102fcd98 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1775 + speciesSurveyCode: SADASAR + weightEnabled: true +- !SpeciesProtocol + id: 12079205-9148-41b1-9d64-a920793f70bb + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1716 + speciesSurveyCode: SARPSAL + weightEnabled: true +- !SpeciesProtocol + id: 14bfc0d8-46cd-4f85-805e-8549a0ab90b8 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1894 + speciesSurveyCode: SCORSPP + weightEnabled: true +- !SpeciesProtocol + id: 8d055995-0c6f-4f52-bc05-bc79cc35e867 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1895 + speciesSurveyCode: SCORELO + weightEnabled: true +- !SpeciesProtocol + id: 8eda25d1-73d8-4e79-80e4-0829fb8bd1c3 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1897 + speciesSurveyCode: SCORLOP + weightEnabled: true +- !SpeciesProtocol + id: 220da7a9-05cb-484b-b299-49658e585bff + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1898 + speciesSurveyCode: SCORMAD + weightEnabled: true +- !SpeciesProtocol + id: f27a7a08-2fa9-402a-8601-f8c26bb8f29d + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1899 + speciesSurveyCode: SCORNOT + weightEnabled: true +- !SpeciesProtocol + id: 19328f63-e90d-4be0-a332-9efe14c87038 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1896 + speciesSurveyCode: SCORPOR + weightEnabled: true +- !SpeciesProtocol + id: 6c7342d2-f50f-4231-bc91-5851e778a916 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1900 + speciesSurveyCode: SCORSCO + weightEnabled: true +- !SpeciesProtocol + id: 7b68433c-0e52-4369-9f13-9b300a0a31cb + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 466 + speciesSurveyCode: SEPISPP + weightEnabled: true +- !SpeciesProtocol + id: ec368e8f-6152-4828-9d85-38d2cd6fe2ab + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 468 + speciesSurveyCode: SEPIELE + weightEnabled: true +- !SpeciesProtocol + id: 72688083-ed6d-418c-8195-b7290d2aeeba + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 469 + speciesSurveyCode: SEPIORB + weightEnabled: true +- !SpeciesProtocol + id: 9bbb3bcb-f770-448e-8141-2a2a250dff45 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 476 + speciesSurveyCode: SEPOSPP + weightEnabled: true +- !SpeciesProtocol + id: bb6f45c4-c085-4809-b63a-1b0750f58ac2 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1628 + speciesSurveyCode: SERACAB + weightEnabled: true +- !SpeciesProtocol + id: 5976284b-a33e-4f31-aef3-cd5190f40b34 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1629 + speciesSurveyCode: SERAHEP + weightEnabled: true +- !SpeciesProtocol + id: 1b37cc5c-5164-4fa6-8f48-08173ace1507 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1995 + speciesSurveyCode: SOLESPP + weightEnabled: true +- !SpeciesProtocol + id: be091828-e022-4725-a682-f0e9ea3af3ba + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1998 + speciesSurveyCode: SOLEIMP + weightEnabled: true +- !SpeciesProtocol + id: 1075356e-b3b8-4c38-aba4-73f359a6b98b + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1999 + speciesSurveyCode: SOLEKLE + weightEnabled: true +- !SpeciesProtocol + id: 00d90ba4-c2af-408b-a497-30a4c35c34dc + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 2000 + speciesSurveyCode: SOLELAS + weightEnabled: true +- !SpeciesProtocol + id: f49aadd1-65ea-4820-bed9-583a25761cf6 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1997 + speciesSurveyCode: SOLESEN + weightEnabled: true +- !SpeciesProtocol + id: 220088e3-a661-48a1-a837-ab6a8888f170 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1693 + speciesSurveyCode: SPARAUR + weightEnabled: true +- !SpeciesProtocol + id: e3a09923-8414-4ad9-b131-825f41537ba7 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1874 + speciesSurveyCode: SPHYSPY + weightEnabled: true +- !SpeciesProtocol + id: ccf5602f-99b2-4976-a1b4-b27efedeaeb2 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1721 + speciesSurveyCode: SPICSPP + weightEnabled: true +- !SpeciesProtocol + id: 2d623cc1-c373-4b00-844f-7933d5599b56 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1718 + speciesSurveyCode: SPODCAN + weightEnabled: true +- !SpeciesProtocol + id: 01748fc9-794b-4951-9e0a-e38dfc479f30 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1356 + speciesSurveyCode: SPRASPR + weightEnabled: true +- !SpeciesProtocol + id: d49011fc-ec85-40de-afd0-e0ab033557ff + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1286 + speciesSurveyCode: SQUTSPP + weightEnabled: true +- !SpeciesProtocol + id: 23d7fd79-fa86-4f82-80f6-6a8d84c81171 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 6835 + speciesSurveyCode: STOMBOA + weightEnabled: true +- !SpeciesProtocol + id: 04dfc865-479b-4c52-b1fa-4c9ea6832eba + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 2018 + speciesSurveyCode: SYMPNIG + weightEnabled: true +- !SpeciesProtocol + id: c0331582-7102-4ce4-b3a0-07d49ae7c93e + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1815 + speciesSurveyCode: CALMPHA + weightEnabled: true +- !SpeciesProtocol + id: 9afd6c5b-773c-4d54-a378-5e194f8d5964 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 508 + speciesSurveyCode: TODIEBL + weightEnabled: true +- !SpeciesProtocol + id: d94abbd3-a93b-4ecb-ad20-26da4e3b8516 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1295 + speciesSurveyCode: TORPSPP + weightEnabled: true +- !SpeciesProtocol + id: cd2d62d0-edd9-4033-ad35-c376a5087fdf + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1298 + speciesSurveyCode: TORPNOB + weightEnabled: true +- !SpeciesProtocol + id: 2a676665-dd81-4df7-945e-006ee86ba7b8 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1296 + speciesSurveyCode: TORPTOR + weightEnabled: true +- !SpeciesProtocol + id: f57e191d-a6ec-49c5-a485-b437e5b290d1 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1760 + speciesSurveyCode: TRAHARA + weightEnabled: true +- !SpeciesProtocol + id: b35892d0-732f-4490-a369-32c35ee580cc + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1759 + speciesSurveyCode: TRAHDRA + weightEnabled: true +- !SpeciesProtocol + id: 500570c2-7875-4f17-a865-664c065631f4 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1761 + speciesSurveyCode: TRAHRAD + weightEnabled: true +- !SpeciesProtocol + id: a6c14a6b-f9a8-45be-ac57-0330bf385a05 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1664 + speciesSurveyCode: TRACPIC + weightEnabled: true +- !SpeciesProtocol + id: 729c0fba-b454-4bf8-a41d-6e513b63954f + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1910 + speciesSurveyCode: TRIGLYR + weightEnabled: true +- !SpeciesProtocol + id: dd584b99-1065-475f-8257-eaafc85dc0c8 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1560 + speciesSurveyCode: TRISLUS + weightEnabled: true +- !SpeciesProtocol + id: fb9842ce-13fa-48b8-b294-db418257f706 + countIfNoFrequencyEnabled: true + mandatorySampleCategoryId: [] + speciesReferenceTaxonId: 1764 + speciesSurveyCode: URANSCA + weightEnabled: true +vesselUseFeaturePmfmId: !com.google.common.collect.Lists$TransformingRandomAccessList +- 863 +- 862 +- 173 Modified: trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-fr.properties =================================================================== --- trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-fr.properties 2014-01-21 10:01:54 UTC (rev 1518) +++ trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-fr.properties 2014-01-21 16:29:59 UTC (rev 1519) @@ -1,5 +1,5 @@ #Generated by org.nuiton.jaxx.plugin.GenerateHelpIdsMojo -#Sun Jan 12 14:36:06 CET 2014 +#Tue Jan 21 11:51:19 CET 2014 tutti.config.help=config.html tutti.createAccidentalBatch.action.cancel.help=editFishingOperation.html\#captureCapturesAccidentellesActions tutti.createAccidentalBatch.action.saveAndClose.help=editFishingOperation.html\#captureCapturesAccidentellesActions @@ -255,6 +255,7 @@ tutti.editSpeciesBatch.action.editFrequencies.help=editFishingOperation.html\#captureEspecesActions tutti.editSpeciesBatch.action.exportMultiPost.help=editFishingOperation.html\#captureEspecesActions tutti.editSpeciesBatch.action.importMultiPost.help=editFishingOperation.html\#captureEspecesActions +tutti.editSpeciesBatch.action.importPsion.help= tutti.editSpeciesBatch.action.importPupitri.help=editFishingOperation.html\#captureEspecesActions tutti.editSpeciesBatch.action.removeBatch.help=editFishingOperation.html\#captureEspecesActions tutti.editSpeciesBatch.action.removeSubBatch.help=editFishingOperation.html\#captureEspecesActions Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiUIContext.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiUIContext.java 2014-01-21 10:01:54 UTC (rev 1518) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiUIContext.java 2014-01-21 16:29:59 UTC (rev 1519) @@ -54,6 +54,7 @@ import fr.ifremer.tutti.service.export.pdf.CatchesPdfExportService; import fr.ifremer.tutti.service.export.sumatra.CatchesSumatraExportService; import fr.ifremer.tutti.service.protocol.ProtocolImportExportService; +import fr.ifremer.tutti.service.psionimport.PsionImportService; import fr.ifremer.tutti.service.pupitri.PupitriImportExportService; import fr.ifremer.tutti.service.referential.ReferentialImportExportService; import fr.ifremer.tutti.service.referential.TuttiReferentialSynchronizeService; @@ -596,6 +597,10 @@ return serviceContext.getService(PupitriImportExportService.class); } + public PsionImportService getTuttiPsionImportExportService() { + return serviceContext.getService(PsionImportService.class); + } + public ReferentialImportExportService getTuttiReferentialImportExportService() { return serviceContext.getService(ReferentialImportExportService.class); } Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/action/ImportPsionAction.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/action/ImportPsionAction.java (rev 0) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/action/ImportPsionAction.java 2014-01-21 16:29:59 UTC (rev 1519) @@ -0,0 +1,173 @@ +package fr.ifremer.tutti.ui.swing.action; + +import com.google.common.base.Joiner; +import com.google.common.collect.Lists; +import fr.ifremer.tutti.persistence.entities.data.CatchBatch; +import fr.ifremer.tutti.persistence.entities.data.FishingOperation; +import fr.ifremer.tutti.persistence.entities.data.SampleCategoryModel; +import fr.ifremer.tutti.persistence.service.TuttiEnumerationFile; +import fr.ifremer.tutti.service.PersistenceService; +import fr.ifremer.tutti.service.psionimport.PsionImportResult; +import fr.ifremer.tutti.service.psionimport.PsionImportService; +import fr.ifremer.tutti.ui.swing.content.operation.FishingOperationsUI; +import fr.ifremer.tutti.ui.swing.content.operation.catches.EditCatchesUI; +import fr.ifremer.tutti.ui.swing.content.operation.catches.EditCatchesUIModel; +import fr.ifremer.tutti.ui.swing.content.operation.catches.species.ImportPupitriPopupUI; +import fr.ifremer.tutti.ui.swing.content.operation.catches.species.SpeciesBatchUI; +import fr.ifremer.tutti.ui.swing.content.operation.catches.species.SpeciesBatchUIHandler; +import fr.ifremer.tutti.ui.swing.content.operation.catches.species.SpeciesBatchUIModel; + +import javax.swing.JOptionPane; +import javax.swing.UIManager; +import java.io.File; +import java.util.List; + +import static org.nuiton.i18n.I18n._; + +/** + * Created on 1/21/14. + * + * @author Tony Chemit <chemit@codelutin.com> + * @since 3.1 + */ +public class ImportPsionAction extends AbstractTuttiAction<SpeciesBatchUIModel, SpeciesBatchUI, SpeciesBatchUIHandler> { + + protected File importedTrunkFile; + + protected ImportPupitriPopupUI importPupitriDialog; + + protected PersistenceService persistenceService; + + protected EditFishingOperationAction editAction; + + protected PsionImportResult importResult; + + public ImportPsionAction(SpeciesBatchUIHandler handler) { + super(handler, false); + persistenceService = getContext().getPersistenceService(); + importPupitriDialog = new ImportPupitriPopupUI(handler.getContext()); + } + + public EditFishingOperationAction getEditAction() { + if (editAction == null) { + FishingOperationsUI parentContainer = handler.getParentContainer(FishingOperationsUI.class); + editAction = getContext().getActionFactory().createLogicAction(parentContainer.getHandler(), + EditFishingOperationAction.class); + } + return editAction; + } + + @Override + public boolean prepareAction() throws Exception { + boolean result = true; + + // must check that sample category model is compatible for pupitri import + // means need some categories + + TuttiEnumerationFile enumerationFile = persistenceService.getEnumerationFile(); + SampleCategoryModel sampleCategoryModel = getDataContext().getSampleCategoryModel(); + + List<String> missingCategories = Lists.newArrayList(); +// if (!sampleCategoryModel.containsCategoryId(enumerationFile.PMFM_ID_SIZE_CATEGORY)) { +// missingCategories.add("<li>" + persistenceService.getSizeCategoryCaracteristic().getParameterName() + "</li>"); +// } + if (!sampleCategoryModel.containsCategoryId(enumerationFile.PMFM_ID_SEX)) { + missingCategories.add("<li>" + persistenceService.getSexCaracteristic().getParameterName() + "</li>"); + } + if (!sampleCategoryModel.containsCategoryId(enumerationFile.PMFM_ID_MATURITY)) { + missingCategories.add("<li>" + persistenceService.getMaturityCaracteristic().getParameterName() + "</li>"); + } + if (!missingCategories.isEmpty()) { + result = false; + JOptionPane.showMessageDialog( + getContext().getActionUI(), + _("tutti.editSpeciesBatch.action.importPsion.invalidSampleCategoryModel.message", Joiner.on("").join(missingCategories)), + _("tutti.editSpeciesBatch.action.importPsion.invalidSampleCategoryModel.title"), + JOptionPane.ERROR_MESSAGE, + UIManager.getIcon("error") + ); + } +// if (result) { +// +// SpeciesBatchUIModel speciesBatchUIModel = getUI().getModel(); +// if (speciesBatchUIModel.getRowCount() > 0) { +// String htmlMessage = String.format( +// AbstractTuttiUIHandler.CONFIRMATION_FORMAT, +// _("tutti.editSpeciesBatch.action.importPsion.existingData.message"), +// _("tutti.editSpeciesBatch.action.importPsion.existingData.help")); +// +// int answer = JOptionPane.showConfirmDialog(getContext().getActionUI(), +// htmlMessage, +// _("tutti.editSpeciesBatch.action.importPsion.existingData.title"), +// JOptionPane.OK_CANCEL_OPTION, +// JOptionPane.WARNING_MESSAGE); +// +// result = answer == JOptionPane.OK_OPTION; +// } +// } + + if (result) { + // choose file to import + importedTrunkFile = chooseFile( + _("tutti.editSpeciesBatch.action.title.choose.importPsionFile"), + _("tutti.editSpeciesBatch.action.choosePsionFile.import"), + "^.*\\.IWA", _("tutti.common.file.iwa")); + + result = importedTrunkFile != null; + } + + return result; + } + + @Override + public void doAction() throws Exception { + PsionImportService importService = getContext().getTuttiPsionImportExportService(); + + EditCatchesUI parentContainer = handler.getParentContainer(EditCatchesUI.class); + EditCatchesUIModel model = parentContainer.getModel(); + + FishingOperation operation = model.getFishingOperation(); + CatchBatch catchBatch = model.toEntity(); + + // import + importResult = importService.importFile(importedTrunkFile, + operation, + catchBatch); + + if (importResult.isDone()) { + + // reload operation + getEditAction().loadCatchBatch(operation); + } + } + + @Override + public void releaseAction() { + super.releaseAction(); + importedTrunkFile = null; + } + + @Override + public void postSuccessAction() { + super.postSuccessAction(); + + if (importResult.isDone()) { + + sendMessage(_("tutti.editSpeciesBatch.action.importPsion.success", + getModel().getRootNumber(), importResult.getNbImported())); + } else { + + StringBuilder sb = new StringBuilder(); + for (String s : importResult.getErrors()) { + sb.append("<li>").append(s).append("</li>"); + } + displayWarningMessage( + _("tutti.editSpeciesBatch.action.importPsion.no.matching.fishingOperation.title"), + "<html><body>" + + _("tutti.editSpeciesBatch.action.importPsion.no.matching.fishingOperation", sb.toString()) + + "</body></html>" + ); + sendMessage(_("tutti.editSpeciesBatch.action.importPsion.no.matching.data")); + } + } +} Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/action/ImportPsionAction.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.css =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.css 2014-01-21 10:01:54 UTC (rev 1518) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.css 2014-01-21 16:29:59 UTC (rev 1519) @@ -252,6 +252,15 @@ _help: {"tutti.editSpeciesBatch.action.importPupitri.help"}; } +#importPsionButton { + actionIcon: pupitri-import; + text: "tutti.editSpeciesBatch.action.importPsion"; + toolTipText: "tutti.editSpeciesBatch.action.importPsion.tip"; + i18nMnemonic: "tutti.editSpeciesBatch.action.importPsion.mnemonic"; + _applicationAction: {fr.ifremer.tutti.ui.swing.action.ImportPsionAction.class}; + _help: {"tutti.editSpeciesBatch.action.importPsion.help"}; +} + #importMultiPostButton { actionIcon: import; text: "tutti.editSpeciesBatch.action.importMultiPost"; Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.jaxx =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.jaxx 2014-01-21 10:01:54 UTC (rev 1518) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.jaxx 2014-01-21 16:29:59 UTC (rev 1519) @@ -64,6 +64,7 @@ <JToolBar id='speciesBatchTabToolBar'> <JButton id='importPupitriButton'/> + <JButton id='importPsionButton'/> <JButton id='importMultiPostButton'/> <JButton id='exportMultiPostButton'/> </JToolBar> Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties =================================================================== --- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2014-01-21 10:01:54 UTC (rev 1518) +++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2014-01-21 16:29:59 UTC (rev 1519) @@ -77,6 +77,7 @@ tutti.common.cancel= tutti.common.cancel.mnemonic= tutti.common.file.csv= +tutti.common.file.iwa= tutti.common.file.pdf= tutti.common.file.protocol= tutti.common.file.tuttiAccidental= @@ -948,6 +949,7 @@ tutti.editSpeciesBatch.action.changeSampleCategory= tutti.editSpeciesBatch.action.changeSampleCategory.mnemonic= tutti.editSpeciesBatch.action.changeSampleCategory.tip= +tutti.editSpeciesBatch.action.choosePsionFile.import= tutti.editSpeciesBatch.action.createBatch= tutti.editSpeciesBatch.action.createBatch.mnemonic= tutti.editSpeciesBatch.action.createBatch.tip= @@ -969,6 +971,18 @@ tutti.editSpeciesBatch.action.importMultiPost.sourceFile.title= tutti.editSpeciesBatch.action.importMultiPost.success= tutti.editSpeciesBatch.action.importMultiPost.tip= +tutti.editSpeciesBatch.action.importPsion= +tutti.editSpeciesBatch.action.importPsion.existingData.help= +tutti.editSpeciesBatch.action.importPsion.existingData.message= +tutti.editSpeciesBatch.action.importPsion.existingData.title= +tutti.editSpeciesBatch.action.importPsion.invalidSampleCategoryModel.message= +tutti.editSpeciesBatch.action.importPsion.invalidSampleCategoryModel.title= +tutti.editSpeciesBatch.action.importPsion.mnemonic= +tutti.editSpeciesBatch.action.importPsion.no.matching.data= +tutti.editSpeciesBatch.action.importPsion.no.matching.fishingOperation= +tutti.editSpeciesBatch.action.importPsion.no.matching.fishingOperation.title= +tutti.editSpeciesBatch.action.importPsion.success= +tutti.editSpeciesBatch.action.importPsion.tip= tutti.editSpeciesBatch.action.importPupitri= tutti.editSpeciesBatch.action.importPupitri.existingData.help= tutti.editSpeciesBatch.action.importPupitri.existingData.message= @@ -997,6 +1011,7 @@ tutti.editSpeciesBatch.action.splitBatch= tutti.editSpeciesBatch.action.splitBatch.mnemonic= tutti.editSpeciesBatch.action.splitBatch.tip= +tutti.editSpeciesBatch.action.title.choose.importPsionFile= tutti.editSpeciesBatch.error.sampleCategoryValue.notAvailable= tutti.editSpeciesBatch.field.speciesTotalInertWeight= tutti.editSpeciesBatch.field.speciesTotalInertWeight.tip= Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties =================================================================== --- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2014-01-21 10:01:54 UTC (rev 1518) +++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2014-01-21 16:29:59 UTC (rev 1519) @@ -70,6 +70,7 @@ tutti.common.cancel=Annuler tutti.common.cancel.mnemonic=A tutti.common.file.csv=Extension d'un fichier csv +tutti.common.file.iwa=Fichier d'import Psion tutti.common.file.pdf=Extension d'un fichier pdf tutti.common.file.protocol=Extension d'un fichier de protocole Tutti tutti.common.file.tuttiAccidental=Fichier d'import/export des lots de captures accidentelles @@ -941,6 +942,7 @@ tutti.editSpeciesBatch.action.changeSampleCategory=Modifier la catégorie tutti.editSpeciesBatch.action.changeSampleCategory.mnemonic=M tutti.editSpeciesBatch.action.changeSampleCategory.tip=Modifier la catégorie de la cellule sélectionnée +tutti.editSpeciesBatch.action.choosePsionFile.import=Importer tutti.editSpeciesBatch.action.createBatch=Créer un lot pour une espèce tutti.editSpeciesBatch.action.createBatch.mnemonic=C tutti.editSpeciesBatch.action.createBatch.tip=Créer un nouveau lot pour une espèce @@ -962,6 +964,18 @@ tutti.editSpeciesBatch.action.importMultiPost.sourceFile.title=Importer des lots d'espèces tutti.editSpeciesBatch.action.importMultiPost.success=Des lots d'espèces ont été importés depuis le fichier %s tutti.editSpeciesBatch.action.importMultiPost.tip=Importer des lots d'espèces créés sur un poste satellite +tutti.editSpeciesBatch.action.importPsion=Import Psion +tutti.editSpeciesBatch.action.importPsion.existingData.help=Que voulez-vous faire ?<ul><li><strong>Annuler</strong> pour ne pas importer les données Pupitri et conserver les espèces saisies</li><li><strong>OK</strong> pour supprimer les espèces existantes et les remplacer par les données de Pupitri</li></ul> +tutti.editSpeciesBatch.action.importPsion.existingData.message=Des espèces ont déjà été saisies dans la capture. Si vous continuez, elles vont être écrasées. +tutti.editSpeciesBatch.action.importPsion.existingData.title=Données existantes +tutti.editSpeciesBatch.action.importPsion.invalidSampleCategoryModel.message=<html><body>Le modèle de catégorisation n'est pas compatible pour un import psion.<br> Il manque les catégories suivantes \: <ul>%s</ul><hr/>Veuillez ajouter cette catégorie dans la configuration de catégorisation (menu administration).</body></html> +tutti.editSpeciesBatch.action.importPsion.invalidSampleCategoryModel.title=Modèle de catégorisation non compatible +tutti.editSpeciesBatch.action.importPsion.mnemonic=P +tutti.editSpeciesBatch.action.importPsion.no.matching.data=Import psion non réalisé (des erreurs ont été détectées lors de la lecture du fichier) +tutti.editSpeciesBatch.action.importPsion.no.matching.fishingOperation=L'import Psion n'a pas été réalisé, des erreurs ont été détectées \:<ul>%s</ul><br/>Aucun lot n'a donc été importé. +tutti.editSpeciesBatch.action.importPsion.no.matching.fishingOperation.title=Import Psion +tutti.editSpeciesBatch.action.importPsion.success=Import Psion réussi \: %1s espèces importées, %2s espèces rejetées +tutti.editSpeciesBatch.action.importPsion.tip=Import Psion tutti.editSpeciesBatch.action.importPupitri=Import Pupitri tutti.editSpeciesBatch.action.importPupitri.existingData.help=Que voulez-vous faire ?<ul><li><strong>Annuler</strong> pour ne pas importer les données Pupitri et conserver les espèces saisies</li><li><strong>OK</strong> pour supprimer les espèces existantes et les remplacer par les données de Pupitri</li></ul> tutti.editSpeciesBatch.action.importPupitri.existingData.message=Des espèces ont déjà été saisies dans la capture. Si vous continuez, elles vont être écrasées. @@ -990,6 +1004,7 @@ tutti.editSpeciesBatch.action.splitBatch=Catégoriser le lot tutti.editSpeciesBatch.action.splitBatch.mnemonic=C tutti.editSpeciesBatch.action.splitBatch.tip=Catégoriser le lot courant (celui de la ligne sélectionné) +tutti.editSpeciesBatch.action.title.choose.importPsionFile=Importer un fichier Psion tutti.editSpeciesBatch.error.sampleCategoryValue.notAvailable=La valeur %s de la catégorie %s est déjà utilisée tutti.editSpeciesBatch.field.speciesTotalInertWeight=Poids inerte trié tutti.editSpeciesBatch.field.speciesTotalInertWeight.tip=Poids de la fraction inerte restante après le tri des espèces (cailloux, vase, débris coquilliers, etc.)
participants (1)
-
tchemit@users.forge.codelutin.com