Author: echatellier Date: 2012-08-07 15:40:47 +0200 (Tue, 07 Aug 2012) New Revision: 1031 Url: http://forge.codelutin.com/repositories/revision/coser/1031 Log: refs #1331 : G?\195?\169rer les esp?\195?\168ces par C_Perm, AA_Valide ou L_Valide Added: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/SpeciesComboRenderer.java trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/SpeciesTableCellRenderer.java Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/CoserUtils.java trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Project.java trunk/coser-business/src/main/java/fr/ifremer/coser/services/CommonService.java trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java trunk/coser-business/src/main/java/fr/ifremer/coser/services/PublicationService.java trunk/coser-business/src/test/java/fr/ifremer/coser/services/ProjectServiceTest.java trunk/coser-ui/src/main/java/fr/ifremer/coser/Coser.java trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlHandler.java trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectCreationView.jaxx trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectEditView.jaxx trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectHandler.java trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/replay/SelectionReplayHandler.java trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/CoserUtils.java =================================================================== --- trunk/coser-business/src/main/java/fr/ifremer/coser/CoserUtils.java 2012-08-06 15:01:20 UTC (rev 1030) +++ trunk/coser-business/src/main/java/fr/ifremer/coser/CoserUtils.java 2012-08-07 13:40:47 UTC (rev 1031) @@ -29,8 +29,13 @@ import java.io.StringReader; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; +import java.util.Comparator; import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.LinkedList; import java.util.List; +import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -219,4 +224,25 @@ } return result; } + + /** + * Sort a map by value. + * See http://stackoverflow.com/a/2581754/1165234 + * + * @param map map to sort + * @return sorted map + */ + public static <K, V extends Comparable<? super V>> Map<K, V> sortByValue(Map<K, V> map) { + List<Map.Entry<K, V>> list = new LinkedList<Map.Entry<K, V>>(map.entrySet()); + Collections.sort( list, new Comparator<Map.Entry<K, V>>() { + public int compare( Map.Entry<K, V> o1, Map.Entry<K, V> o2 ) { + return (o1.getValue()).compareTo( o2.getValue() ); + } + }); + Map<K, V> result = new LinkedHashMap<K, V>(); + for (Map.Entry<K, V> entry : list) { + result.put(entry.getKey(), entry.getValue()); + } + return result; + } } Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Project.java =================================================================== --- trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Project.java 2012-08-06 15:01:20 UTC (rev 1030) +++ trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Project.java 2012-08-07 13:40:47 UTC (rev 1031) @@ -414,20 +414,20 @@ Date date = new Date(Long.parseLong(props.getProperty("project.creationdate"))); setCreationDate(date); } - + // species field type was added in 1.3+ // missing values for previous project are considered as L_Valide - if (props.contains("project.storageSpeciesType")) { + if (props.containsKey("project.storageSpeciesType")) { setStorageSpeciesType(SpeciesFieldType.valueOf(props.getProperty("project.storageSpeciesType"))); } else { setStorageSpeciesType(SpeciesFieldType.C_Valide); } - if (props.contains("project.displaySpeciesType")) { + if (props.containsKey("project.displaySpeciesType")) { setDisplaySpeciesType(SpeciesFieldType.valueOf(props.getProperty("project.displaySpeciesType"))); } else { setDisplaySpeciesType(SpeciesFieldType.C_Valide); } - if (props.contains("project.outputSpeciesType")) { + if (props.containsKey("project.outputSpeciesType")) { setOutputSpeciesType(SpeciesFieldType.valueOf(props.getProperty("project.outputSpeciesType"))); } else { setOutputSpeciesType(SpeciesFieldType.C_Valide); Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/services/CommonService.java =================================================================== --- trunk/coser-business/src/main/java/fr/ifremer/coser/services/CommonService.java 2012-08-06 15:01:20 UTC (rev 1030) +++ trunk/coser-business/src/main/java/fr/ifremer/coser/services/CommonService.java 2012-08-07 13:40:47 UTC (rev 1031) @@ -54,8 +54,8 @@ import fr.ifremer.coser.CoserBusinessConfig; import fr.ifremer.coser.CoserBusinessException; import fr.ifremer.coser.CoserConstants; +import fr.ifremer.coser.CoserConstants.Category; import fr.ifremer.coser.CoserUtils; -import fr.ifremer.coser.CoserConstants.Category; import fr.ifremer.coser.bean.Project; import fr.ifremer.coser.data.AbstractDataEntity; import fr.ifremer.coser.data.Catch; @@ -148,8 +148,7 @@ if (line == null || line.length <= 1) { throw new CoserBusinessException(_("Can't read file '%s'. Check CSV file separator", file.getAbsolutePath())); - } - else { + } else { if (originalLoading) { checkFileHeader(file, category, line); if (category.isDataCategory()) { @@ -174,8 +173,7 @@ } } catch (IOException ex) { throw new CoserBusinessException("Can't read file", ex); - } - finally { + } finally { IOUtils.closeQuietly(csvReader); } @@ -228,8 +226,7 @@ StringUtils.join(frHeaders, ", "), StringUtils.join(enHeaders, ", "))); } - } - else { + } else { if (!Arrays.equals(line, enHeaders)) { throw new CoserBusinessException(_("Wrong header detected in file %s. Found : %s, expected %s", file.getName(), @@ -299,10 +296,13 @@ * * @param content content to save * @param file file to save to + * @param project project used only to get species output field (can be null) + * @param category category used to replace species output field if needed (can be null) * * @throws CoserBusinessException */ - public void storeDataWhithoutQuote(DataStorage content, File file) throws CoserBusinessException { + public void storeDataWhithoutQuote(DataStorage content, File file, Map<String, String> refTaxSpecies, Category category) throws CoserBusinessException { + // save content Writer writer = null; try { @@ -320,10 +320,20 @@ } String contentData = contentDatas[i]; + + // for some category, need to swap species output field with + // user preference (since 1.3) + if ((category == Category.CATCH && i == Catch.INDEX_SPECIES) || + (category == Category.LENGTH && i == Length.INDEX_SPECIES)) { + // can not exists, stay unchanged + if (refTaxSpecies.containsKey(contentData)) { + contentData = refTaxSpecies.get(contentData); + } + } + if (contentData.indexOf(CoserConstants.CSV_SEPARATOR_CHAR) > -1) { writer.write("\"" + contentData + "\""); - } - else { + } else { writer.write(contentData); } } @@ -331,8 +341,7 @@ } } catch (IOException ex) { throw new CoserBusinessException("Can't save data", ex); - } - finally { + } finally { IOUtils.closeQuietly(writer); } } Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java =================================================================== --- trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java 2012-08-06 15:01:20 UTC (rev 1030) +++ trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java 2012-08-07 13:40:47 UTC (rev 1031) @@ -81,6 +81,7 @@ import fr.ifremer.coser.bean.Project; import fr.ifremer.coser.bean.RSufiResult; import fr.ifremer.coser.bean.Selection; +import fr.ifremer.coser.bean.SpeciesFieldType; import fr.ifremer.coser.command.Command; import fr.ifremer.coser.command.DeleteLineCommand; import fr.ifremer.coser.command.MergeSpeciesCommand; @@ -376,7 +377,7 @@ * Just load non category data (reftax). * * @param projectName project name to open - * @param parentDirectory optionnal custom parent directory (for results) + * @param parentDirectory optional custom parent directory (for results) * @return loaded project with data * @throws CoserBusinessException */ @@ -429,8 +430,7 @@ } } catch (IOException ex) { throw new CoserBusinessException("Can't read control properties file", ex); - } - finally { + } finally { IOUtils.closeQuietly(inputStream); } } @@ -462,8 +462,7 @@ } } catch (IOException ex) { throw new CoserBusinessException("Can't read selection properties file", ex); - } - finally { + } finally { IOUtils.closeQuietly(inputStream); } @@ -492,8 +491,7 @@ } } catch (IOException ex) { throw new CoserBusinessException("Can't read project properties file", ex); - } - finally { + } finally { IOUtils.closeQuietly(inputStream); } @@ -1945,45 +1943,23 @@ } /** - * Get species name in project. - * - * Used in control ui (graph). - * - * @param container data container - * @return species - */ - public List<String> getProjectSpecies(AbstractDataContainer container) { - List<String> result = new ArrayList<String>(); - - Iterator<String[]> itTuple = container.getCatch().iterator(true); - while (itTuple.hasNext()) { - String[] tuple = itTuple.next(); - String species = tuple[Catch.INDEX_SPECIES]; - if (!result.contains(species)) { - result.add(species); - } - } - - Collections.sort(result); - return result; - } - - /** * Get species name in project with data in [{@code beginYear}-{@code endYear}]. * * Used in selection ui. * + * Cette liste est issue du fichier captures (petit fichier, mais suffisant). + * * Les especes sont determinées : * - en lisant les traits pour determiner les traits à partir des zones * - en lisant les captures pour determiner les especes à partir des traits * - en filtrant la liste des especes * - * @param project project * @param container data container - * @param filterSpecyType filterSpecyType (can be null or empty) + * @param project project (can be {@code null}, no filtering) + * @param filterSpecyType filterSpecyType (can be {@code null}, no filtering) * @return species */ - public List<String> getProjectSpecies(Project project, AbstractDataContainer container, Collection<String> filterSpecyType) { + public List<String> getProjectSpecies(AbstractDataContainer container, Project project, Collection<String> filterSpecyType) { // first get species with trait list List<String> result = new ArrayList<String>(); @@ -1998,62 +1974,65 @@ } } - // load map SpecyName > numSys - Map<String, Integer> map = new HashMap<String, Integer>(); - Iterator<String[]> refTaxIterator = project.getRefTaxSpecies().iterator(true); - while (refTaxIterator.hasNext()) { - // "C_Perm";"NumSys";"NivSys";"C_VALIDE";"L_VALIDE";"AA_VALIDE";"C_TxPère";"Taxa" - String[] tuple = refTaxIterator.next(); - String specyName = tuple[3]; - Integer iNumSys = Integer.valueOf(tuple[1]); - map.put(specyName, iNumSys); - } - - // load specy type map SpecyTypeName > [min, max] - // iteration sur les type d'especes - Map<String, Integer[]> mapType = new HashMap<String, Integer[]>(); - Iterator<String[]> itTypeSpecies = project.getTypeEspeces().iterator(true); - while (itTypeSpecies.hasNext()) { - // "Types";"Commentaire";"NumSys min";"NumSys max","Code" - String[] tuple = itTypeSpecies.next(); - String specyType = tuple[0]; - - if (filterSpecyType != null && filterSpecyType.contains(specyType)) { - Integer iMinNumSys = Integer.valueOf(tuple[2]); - Integer iMaxNumSys = Integer.valueOf(tuple[3]); - mapType.put(specyType, new Integer[]{iMinNumSys, iMaxNumSys}); + // filtering is optionnal + if (project != null && filterSpecyType != null) { + // load map SpecyName > numSys + Map<String, Integer> map = new HashMap<String, Integer>(); + Iterator<String[]> refTaxIterator = project.getRefTaxSpecies().iterator(true); + while (refTaxIterator.hasNext()) { + // "C_Perm";"NumSys";"NivSys";"C_VALIDE";"L_VALIDE";"AA_VALIDE";"C_TxPère";"Taxa" + String[] tuple = refTaxIterator.next(); + String specyName = tuple[3]; + Integer iNumSys = Integer.valueOf(tuple[1]); + map.put(specyName, iNumSys); } - } - - // iteration sur les especes trouvées - Iterator<String> itSpecies = result.iterator(); - while (itSpecies.hasNext()) { - String specy = itSpecies.next(); - Integer specyNumSys = map.get(specy); - - if (specyNumSys == null) { - // ca ne peut pas arriver, ce cs est valider - // par un control - if (log.isWarnEnabled()) { - log.warn("Can't find specy " + specy + " in reftax"); + + // load specy type map SpecyTypeName > [min, max] + // iteration sur les type d'especes + Map<String, Integer[]> mapType = new HashMap<String, Integer[]>(); + Iterator<String[]> itTypeSpecies = project.getTypeEspeces().iterator(true); + while (itTypeSpecies.hasNext()) { + // "Types";"Commentaire";"NumSys min";"NumSys max","Code" + String[] tuple = itTypeSpecies.next(); + String specyType = tuple[0]; + + if (filterSpecyType != null && filterSpecyType.contains(specyType)) { + Integer iMinNumSys = Integer.valueOf(tuple[2]); + Integer iMaxNumSys = Integer.valueOf(tuple[3]); + mapType.put(specyType, new Integer[]{iMinNumSys, iMaxNumSys}); } - itSpecies.remove(); - continue; } - - // test si le numsys est dans les bornes d'un - // des type d'espece demandé - boolean foundInFilter = false; - for (Integer[] bornes : mapType.values()) { - if (specyNumSys >= bornes[0] - && specyNumSys <= bornes[1]){ - foundInFilter = true; + + // iteration sur les especes trouvées + Iterator<String> itSpecies = result.iterator(); + while (itSpecies.hasNext()) { + String specy = itSpecies.next(); + Integer specyNumSys = map.get(specy); + + if (specyNumSys == null) { + // ca ne peut pas arriver, ce cs est valider + // par un control + if (log.isWarnEnabled()) { + log.warn("Can't find specy " + specy + " in reftax"); + } + itSpecies.remove(); + continue; } + + // test si le numsys est dans les bornes d'un + // des type d'espece demandé + boolean foundInFilter = false; + for (Integer[] bornes : mapType.values()) { + if (specyNumSys >= bornes[0] + && specyNumSys <= bornes[1]){ + foundInFilter = true; + } + } + + if (!foundInFilter) { + itSpecies.remove(); + } } - - if (!foundInFilter) { - itSpecies.remove(); - } } Collections.sort(result); @@ -2750,7 +2729,8 @@ } DataStorage content = getProjectContent(project, selection, category, false); - commonService.storeDataWhithoutQuote(content, dataFile); + Map<String, String> reftaxSpecies = getReftaxSpeciesDisplayFieldMap(project, true); + commonService.storeDataWhithoutQuote(content, dataFile, reftaxSpecies, category); } } @@ -3017,4 +2997,105 @@ selection.setSelectedSpeciesSizeAllYear(localSpeciesSizeAllYear); selection.setSelectedSpeciesMaturity(localSpeciesMaturity); } + + /** + * Retourne une map de transcription entre la valeur de stockage de l'espece + * et la valeur retranscrite à l'utilisateur suivant les préférences qu'il + * a renseigner dans le projet. + * La map est triée sur le "VALEUR" et non sur la clé (pour la visualisation + * soit triée suivant la représentation de l'utilisateur). + * + * Les données sont issues du reftax. + * + * @param project le projet pour avoir accès au reftax + * @param outputField meme algorithm, mais renvoi une map de correspondance + * pour le champ de sortie + * @since 1.3 + */ + public Map<String, String> getReftaxSpeciesDisplayFieldMap(Project project, boolean outputField) { + Map<String, String> speciesMap = new HashMap<String, String>(); + + // "C_Perm";"NumSys";"NivSys";"C_VALIDE";"L_VALIDE";"AA_VALIDE";"C_TxPère";"Taxa" + Iterator<String[]> itData = project.getRefTaxSpecies().iterator(true); + while (itData.hasNext()) { + String[] tuple = itData.next(); + String key = null; + String value = null; + + switch (project.getStorageSpeciesType()) { + case C_Valide: + key = tuple[3]; + break; + case C_PERM: + key = tuple[0]; + break; + case L_Valide: + key = tuple[4]; + break; + } + + SpeciesFieldType valueField = outputField ? project.getOutputSpeciesType(): + project.getDisplaySpeciesType(); + + switch (valueField) { + case C_Valide: + value = tuple[3]; + break; + case C_PERM: + value = tuple[0]; + break; + case L_Valide: + value = tuple[4]; + break; + } + + speciesMap.put(key, value); + } + + return CoserUtils.sortByValue(speciesMap); + } + + /* + * Retourne le nom d'affichage d'une espèce pour l'utilisateur suivant + * les préférences qu'il a choisit. + * + * @param project le projet pour avoir accès au reftax + * @param speciesId le code a retranscrire + * @return display name + * @since 1.3 + * + public String getSpeciesDisplayField(Project project, String speciesId) { + + // "C_Perm";"NumSys";"NivSys";"C_VALIDE";"L_VALIDE";"AA_VALIDE";"C_TxPère";"Taxa" + int index = -1; + switch (project.getStorageSpeciesType()) { + case C_Valide: + index = ((ReftaxMemoryDataStorage)project.getRefTaxSpecies()).indexOfCValide(speciesId); + break; + case C_PERM: + index = ((ReftaxMemoryDataStorage)project.getRefTaxSpecies()).indexOfCode(speciesId); + break; + case L_Valide: + index = ((ReftaxMemoryDataStorage)project.getRefTaxSpecies()).indexOfLValide(speciesId); + break; + } + + String speciesText = speciesId; + if (index >= 0) { + String[] data = project.getRefTaxSpecies().get(index); + switch (project.getDisplaySpeciesType()) { + case C_Valide: + speciesText = data[3]; + break; + case C_PERM: + speciesText = data[0]; + break; + case L_Valide: + speciesText = data[4]; + break; + } + } + + return speciesText; + }*/ } Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/services/PublicationService.java =================================================================== --- trunk/coser-business/src/main/java/fr/ifremer/coser/services/PublicationService.java 2012-08-06 15:01:20 UTC (rev 1030) +++ trunk/coser-business/src/main/java/fr/ifremer/coser/services/PublicationService.java 2012-08-07 13:40:47 UTC (rev 1031) @@ -1133,7 +1133,7 @@ } } - commonService.storeDataWhithoutQuote(subDataStorage, result); + commonService.storeDataWhithoutQuote(subDataStorage, result, null, null); } catch (IOException ex) { throw new CoserBusinessException("Can't save csv file", ex); } @@ -1199,7 +1199,7 @@ } } - commonService.storeDataWhithoutQuote(subDataStorage, result); + commonService.storeDataWhithoutQuote(subDataStorage, result, null, null); } catch (IOException ex) { throw new CoserBusinessException("Can't save csv file", ex); } Modified: trunk/coser-business/src/test/java/fr/ifremer/coser/services/ProjectServiceTest.java =================================================================== --- trunk/coser-business/src/test/java/fr/ifremer/coser/services/ProjectServiceTest.java 2012-08-06 15:01:20 UTC (rev 1030) +++ trunk/coser-business/src/test/java/fr/ifremer/coser/services/ProjectServiceTest.java 2012-08-07 13:40:47 UTC (rev 1031) @@ -321,35 +321,35 @@ // all data List<String> allStrata = projectService.filterDataYearsAndGetStrata(project, selection, years20102011); projectService.filterDataStrata(project, selection, allStrata); - List<String> species = projectService.getProjectSpecies(project, selection, allPpeciesType); + List<String> species = projectService.getProjectSpecies(selection, project, allPpeciesType); Assert.assertEquals(4, species.size()); // data in 2011 projectService.loadControlDataToSelection(project, selection); allStrata = projectService.filterDataYearsAndGetStrata(project, selection, years2011); projectService.filterDataStrata(project, selection, allStrata); - species = projectService.getProjectSpecies(project, selection, allPpeciesType); + species = projectService.getProjectSpecies(selection, project, allPpeciesType); Assert.assertEquals(4, species.size()); // all strata but no data for years projectService.loadControlDataToSelection(project, selection); allStrata = projectService.filterDataYearsAndGetStrata(project, selection, years2009); projectService.filterDataStrata(project, selection, allStrata); - species = projectService.getProjectSpecies(project, selection, allPpeciesType); + species = projectService.getProjectSpecies(selection, project, allPpeciesType); Assert.assertEquals(0, species.size()); // test with no strata projectService.loadControlDataToSelection(project, selection); allStrata = projectService.filterDataYearsAndGetStrata(project, selection, years20102011); projectService.filterDataStrata(project, selection, new ArrayList<String>()); - species = projectService.getProjectSpecies(project, selection, allPpeciesType); + species = projectService.getProjectSpecies(selection, project, allPpeciesType); Assert.assertEquals(0, species.size()); // test with only one stratum projectService.loadControlDataToSelection(project, selection); allStrata = projectService.filterDataYearsAndGetStrata(project, selection, years20102011); projectService.filterDataStrata(project, selection, Collections.singletonList("STR6")); - species = projectService.getProjectSpecies(project, selection, allPpeciesType); + species = projectService.getProjectSpecies(selection, project, allPpeciesType); Assert.assertEquals(4, species.size()); } @@ -373,15 +373,15 @@ project = projectService.mergeSpecies(project, selection, "COSER_SPECIES_1_3", null, "COSER_SPECIES1", "COSER_SPECIES3"); Assert.assertEquals(19, selection.getCatch().size()); Assert.assertEquals(28, selection.getLength().size()); - Assert.assertTrue(projectService.getProjectSpecies(selection).contains("COSER_SPECIES_1_3")); - Assert.assertFalse(projectService.getProjectSpecies(selection).contains("COSER_SPECIES1")); + Assert.assertTrue(projectService.getProjectSpecies(selection, null, null).contains("COSER_SPECIES_1_3")); + Assert.assertFalse(projectService.getProjectSpecies(selection, null, null).contains("COSER_SPECIES1")); // second merge project = projectService.mergeSpecies(project, selection, "COSER_SPECIES_2_4", null, "COSER_SPECIES2", "COSER_SPECIES4"); Assert.assertEquals(13, selection.getCatch().size()); Assert.assertEquals(26, selection.getLength().size()); - Assert.assertTrue(projectService.getProjectSpecies(selection).contains("COSER_SPECIES_2_4")); - Assert.assertFalse(projectService.getProjectSpecies(selection).contains("COSER_SPECIES4")); + Assert.assertTrue(projectService.getProjectSpecies(selection, null, null).contains("COSER_SPECIES_2_4")); + Assert.assertFalse(projectService.getProjectSpecies(selection, null, null).contains("COSER_SPECIES4")); projectService.createProjectSelection(project, selection); } Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/Coser.java =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/Coser.java 2012-08-06 15:01:20 UTC (rev 1030) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/Coser.java 2012-08-07 13:40:47 UTC (rev 1031) @@ -25,6 +25,7 @@ package fr.ifremer.coser; import java.io.File; +import java.util.Map; import javax.swing.SwingUtilities; import javax.swing.UIManager; @@ -41,9 +42,9 @@ import com.bbn.openmap.MapBean; +import fr.ifremer.coser.bean.Project; import fr.ifremer.coser.services.CommandService; import fr.ifremer.coser.services.ControlService; -import fr.ifremer.coser.services.CommonService; import fr.ifremer.coser.services.ProjectService; import fr.ifremer.coser.services.PublicationService; import fr.ifremer.coser.services.WebService; Added: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/SpeciesComboRenderer.java =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/SpeciesComboRenderer.java (rev 0) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/SpeciesComboRenderer.java 2012-08-07 13:40:47 UTC (rev 1031) @@ -0,0 +1,61 @@ +/* + * #%L + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2012 Ifremer, Codelutin, Chatellier Eric + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +package fr.ifremer.coser.ui.common; + +import java.awt.Component; +import java.util.Map; + +import javax.swing.DefaultListCellRenderer; +import javax.swing.JList; + +/** + * L'editeur remplace la valeur présente dans le fichier csv pour l'especes + * par un autre nom (latin valide, code...) + * + * @author echatellier + * @since 1.3 + */ +public class SpeciesComboRenderer extends DefaultListCellRenderer { + + /** serialVersionUID. */ + private static final long serialVersionUID = 3747535342745177615L; + + protected Map<String, String> reftaxSpecies; + + public SpeciesComboRenderer(Map<String, String> reftaxSpecies) { + this.reftaxSpecies = reftaxSpecies; + } + + @Override + public Component getListCellRendererComponent(JList list, Object value, + int index, boolean isSelected, boolean cellHasFocus) { + String speciesId = (String)value; + if (reftaxSpecies.containsKey(speciesId)) { + speciesId = reftaxSpecies.get(speciesId); + } + + return super.getListCellRendererComponent(list, speciesId, index, isSelected, + cellHasFocus); + } +} Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/SpeciesComboRenderer.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/SpeciesTableCellRenderer.java =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/SpeciesTableCellRenderer.java (rev 0) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/SpeciesTableCellRenderer.java 2012-08-07 13:40:47 UTC (rev 1031) @@ -0,0 +1,61 @@ +/* + * #%L + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2012 Ifremer, Codelutin, Chatellier Eric + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +package fr.ifremer.coser.ui.common; + +import java.awt.Component; +import java.util.Map; + +import javax.swing.JTable; +import javax.swing.table.DefaultTableCellRenderer; + +/** + * L'editeur remplace la valeur présente dans le fichier csv pour l'especes + * par un autre nom (latin valide, code...) + * + * @author echatellier + * @since 1.3 + */ +public class SpeciesTableCellRenderer extends DefaultTableCellRenderer { + + /** serialVersionUID. */ + private static final long serialVersionUID = -1913267872081009935L; + + protected Map<String, String> reftaxSpecies; + + public SpeciesTableCellRenderer(Map<String, String> reftaxSpecies) { + this.reftaxSpecies = reftaxSpecies; + } + + @Override + public Component getTableCellRendererComponent(JTable table, Object value, + boolean isSelected, boolean hasFocus, int row, int column) { + + String speciesId = (String)value; + if (reftaxSpecies.containsKey(speciesId)) { + speciesId = reftaxSpecies.get(speciesId); + } + return super.getTableCellRendererComponent(table, speciesId, isSelected, hasFocus, + row, column); + } +} Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/SpeciesTableCellRenderer.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlHandler.java =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlHandler.java 2012-08-06 15:01:20 UTC (rev 1030) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlHandler.java 2012-08-07 13:40:47 UTC (rev 1031) @@ -24,7 +24,6 @@ package fr.ifremer.coser.ui.control; import static org.nuiton.i18n.I18n._; -import static org.nuiton.i18n.I18n.n_; import java.awt.BorderLayout; import java.awt.GridBagConstraints; @@ -33,16 +32,18 @@ import java.awt.Rectangle; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; import java.awt.event.MouseEvent; import java.beans.Introspector; import java.io.File; import java.util.ArrayList; -import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.UUID; +import javax.swing.JComboBox; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JMenuItem; @@ -69,8 +70,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.jdesktop.swingx.JXTreeTable; -import org.jdesktop.swingx.treetable.DefaultMutableTreeTableNode; -import org.jdesktop.swingx.treetable.DefaultTreeTableModel; +import org.jdesktop.swingx.combobox.ListComboBoxModel; import org.jdesktop.swingx.treetable.TreeTableNode; import org.jfree.chart.ChartPanel; import org.jfree.chart.JFreeChart; @@ -85,7 +85,6 @@ import fr.ifremer.coser.command.Command; import fr.ifremer.coser.control.ControlError; import fr.ifremer.coser.control.ControlErrorGroup; -import fr.ifremer.coser.control.DiffCatchLengthControlError; import fr.ifremer.coser.control.SpeciesControlError; import fr.ifremer.coser.data.AbstractDataEntity; import fr.ifremer.coser.data.Catch; @@ -97,6 +96,8 @@ import fr.ifremer.coser.services.ProjectService; import fr.ifremer.coser.services.PublicationService; import fr.ifremer.coser.ui.common.DataHandler; +import fr.ifremer.coser.ui.common.SpeciesComboRenderer; +import fr.ifremer.coser.ui.common.SpeciesTableCellRenderer; import fr.ifremer.coser.ui.util.CoserProgressBar; /** @@ -112,6 +113,8 @@ private static final Log log = LogFactory.getLog(ControlHandler.class); + protected static final String REFTAX_SPECIES_FIELD = "reftaxSpecies"; + /** * Init control view. * @@ -121,6 +124,19 @@ CoserConfig config = controlView.getContextValue(CoserConfig.class); boolean localUsed = config.getValidatorsDirectory().isDirectory(); controlView.getLocalControlUsedLabel().setVisible(localUsed); + + // about dans le context de la map des traductions d'especes + // du reftax par rapport aux preferences du projet + ProjectService projectService = controlView.getContextValue(ProjectService.class); + Project project = controlView.getContextValue(Project.class); + Map<String, String> reftaxSpecies = projectService.getReftaxSpeciesDisplayFieldMap(project, false); + controlView.setContextValue(reftaxSpecies, REFTAX_SPECIES_FIELD); + + // fixe les editeurs qui affiche les noms d'espèces différement + // de leur nom de stockage + SpeciesTableCellRenderer renderer = new SpeciesTableCellRenderer(reftaxSpecies); + controlView.getControlDataTableCatch().getColumnModel().getColumn(4).setCellRenderer(renderer); + controlView.getControlDataTableLength().getColumnModel().getColumn(4).setCellRenderer(renderer); } /** @@ -819,46 +835,82 @@ final String stringBeanFieldName = beanFieldName + "AsString"; JLabel label = new JLabel(headerValue + "\u2009:"); - final JTextField fieldTextField = new JTextField(fieldValue); - fieldTextField.getDocument().addDocumentListener(new DocumentListener() { - @Override - public void insertUpdate(DocumentEvent event) { - valueChanged(event); - } + panel.add(label, new GridBagConstraints(0, fieldIndex, 1, 1, 0, 0, + GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets( + 1, 1, 1, 1), 0, 0)); - @Override - public void removeUpdate(DocumentEvent event) { - valueChanged(event); + if ((category == Category.CATCH && fieldIndex == Catch.INDEX_SPECIES) || + (category == Category.LENGTH && fieldIndex == Length.INDEX_SPECIES)) { + // combo box used to choose for species in list + Map<String, String> reftaxSpecies = view.getContextValue(Map.class, REFTAX_SPECIES_FIELD); + List<String> domain = new ArrayList<String>(reftaxSpecies.keySet()); + // ajout de la valeur pour que même si elle n'existe pas + // elle soit sélectionnée + if (reftaxSpecies.containsKey(fieldValue)) { + domain.add(0, fieldValue); } - - @Override - public void changedUpdate(DocumentEvent event) { - valueChanged(event); - } - - protected void valueChanged(DocumentEvent event) { - try { - PropertyUtils.setProperty(finalBean, stringBeanFieldName, fieldTextField.getText()); - } catch (Exception ex) { - if (log.isErrorEnabled()) { - log.error("Can't set property value (" + stringBeanFieldName + ")", ex); + ListComboBoxModel<String> speciesComboModel = new ListComboBoxModel<String>(domain); + JComboBox speciesCombo = new JComboBox(speciesComboModel); + speciesCombo.setRenderer(new SpeciesComboRenderer(reftaxSpecies)); + speciesCombo.setSelectedItem(fieldValue); + speciesCombo.addItemListener(new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + if (e.getStateChange() == ItemEvent.SELECTED) { + String value = (String)e.getItem(); + try { + PropertyUtils.setProperty(finalBean, stringBeanFieldName, value); + } catch (Exception ex) { + if (log.isErrorEnabled()) { + log.error("Can't set property value (" + stringBeanFieldName + ")", ex); + } + } } } - } - }); - - panel.add(label, new GridBagConstraints(0, fieldIndex, 1, 1, 0, 0, - GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets( - 1, 1, 1, 1), 0, 0)); - panel.add(SwingUtil.boxComponentWithJxLayer(fieldTextField), new GridBagConstraints(1, fieldIndex, 1, 1, 1, 0, - GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets( - 1, 1, 1, 1), 0, 0)); - - // permet de dire a jaxx que les erreurs sur les - // champs d'origine, et les champs string pointent sur le - // même composant - validator.setFieldRepresentation(beanFieldName, fieldTextField); - validator.setFieldRepresentation(stringBeanFieldName, fieldTextField); + }); + panel.add(SwingUtil.boxComponentWithJxLayer(speciesCombo), new GridBagConstraints(1, fieldIndex, 1, 1, 1, 0, + GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets( + 1, 1, 1, 1), 0, 0)); + // permet de dire a jaxx que les erreurs sur les + // champs d'origine, et les champs string pointent sur le + // même composant + validator.setFieldRepresentation(beanFieldName, speciesCombo); + validator.setFieldRepresentation(stringBeanFieldName, speciesCombo); + } else { + final JTextField fieldTextField = new JTextField(fieldValue); + fieldTextField.getDocument().addDocumentListener(new DocumentListener() { + @Override + public void insertUpdate(DocumentEvent event) { + valueChanged(event); + } + @Override + public void removeUpdate(DocumentEvent event) { + valueChanged(event); + } + @Override + public void changedUpdate(DocumentEvent event) { + valueChanged(event); + } + protected void valueChanged(DocumentEvent event) { + try { + PropertyUtils.setProperty(finalBean, stringBeanFieldName, fieldTextField.getText()); + } catch (Exception ex) { + if (log.isErrorEnabled()) { + log.error("Can't set property value (" + stringBeanFieldName + ")", ex); + } + } + } + }); + panel.add(SwingUtil.boxComponentWithJxLayer(fieldTextField), new GridBagConstraints(1, fieldIndex, 1, 1, 1, 0, + GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets( + 1, 1, 1, 1), 0, 0)); + + // permet de dire a jaxx que les erreurs sur les + // champs d'origine, et les champs string pointent sur le + // même composant + validator.setFieldRepresentation(beanFieldName, fieldTextField); + validator.setFieldRepresentation(stringBeanFieldName, fieldTextField); + } } validator.installUIs(); Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectCreationView.jaxx =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectCreationView.jaxx 2012-08-06 15:01:20 UTC (rev 1030) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectCreationView.jaxx 2012-08-07 13:40:47 UTC (rev 1031) @@ -201,7 +201,7 @@ <cell anchor="west"> <JLabel text="coser.ui.project.storageSpeciesType" /> </cell> - <cell columns="2"> + <cell anchor="west" columns="2"> <JComboBox id="projectStorageSpeciesType" model="{new org.jdesktop.swingx.combobox.EnumComboBoxModel(SpeciesFieldType.class)}" renderer="{new SpeciesFieldTypeListRenderer()}" onItemStateChanged="getProject().setStorageSpeciesType((SpeciesFieldType)projectStorageSpeciesType.getSelectedItem())"/> @@ -211,7 +211,7 @@ <cell anchor="west"> <JLabel text="coser.ui.project.displaySpeciesType" /> </cell> - <cell columns="2"> + <cell anchor="west" columns="2"> <JComboBox id="projectDisplaySpeciesType" model="{new org.jdesktop.swingx.combobox.EnumComboBoxModel(SpeciesFieldType.class)}" renderer="{new SpeciesFieldTypeListRenderer()}" onItemStateChanged="getProject().setDisplaySpeciesType((SpeciesFieldType)projectDisplaySpeciesType.getSelectedItem())"/> @@ -221,7 +221,7 @@ <cell anchor="west"> <JLabel text="coser.ui.project.outputSpeciesType" /> </cell> - <cell columns="2"> + <cell anchor="west" columns="2"> <JComboBox id="projectOutputSpeciesType" model="{new org.jdesktop.swingx.combobox.EnumComboBoxModel(SpeciesFieldType.class)}" renderer="{new SpeciesFieldTypeListRenderer()}" onItemStateChanged="getProject().setOutputSpeciesType((SpeciesFieldType)projectOutputSpeciesType.getSelectedItem())"/> Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectEditView.jaxx =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectEditView.jaxx 2012-08-06 15:01:20 UTC (rev 1030) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectEditView.jaxx 2012-08-07 13:40:47 UTC (rev 1031) @@ -92,8 +92,8 @@ <cell> <JComboBox id="projectStorageSpeciesType" model="{new org.jdesktop.swingx.combobox.EnumComboBoxModel(SpeciesFieldType.class)}" renderer="{new SpeciesFieldTypeListRenderer()}" - enabled="false" - selectedItem="{getProject().getStorageSpeciesType()}"/> + selectedItem="{getProject().getStorageSpeciesType()}" + enabled="false" /> </cell> </row> <row> @@ -103,8 +103,8 @@ <cell> <JComboBox id="projectDisplaySpeciesType" model="{new org.jdesktop.swingx.combobox.EnumComboBoxModel(SpeciesFieldType.class)}" renderer="{new SpeciesFieldTypeListRenderer()}" - onItemStateChanged="getProject().setDisplaySpeciesType((SpeciesFieldType)projectDisplaySpeciesType.getSelectedItem())" - selectedItem="{getProject().getDisplaySpeciesType()}"/> + selectedItem="{getProject().getDisplaySpeciesType()}" + onItemStateChanged="getProject().setDisplaySpeciesType((SpeciesFieldType)projectDisplaySpeciesType.getSelectedItem())" /> </cell> </row> <row> @@ -114,8 +114,8 @@ <cell> <JComboBox id="projectOutputSpeciesType" model="{new org.jdesktop.swingx.combobox.EnumComboBoxModel(SpeciesFieldType.class)}" renderer="{new SpeciesFieldTypeListRenderer()}" - onItemStateChanged="getProject().setOutputSpeciesType((SpeciesFieldType)projectOutputSpeciesType.getSelectedItem())" - selectedItem="{getProject().getOutputSpeciesType()}"/> + selectedItem="{getProject().getOutputSpeciesType()}" + onItemStateChanged="getProject().setOutputSpeciesType((SpeciesFieldType)projectOutputSpeciesType.getSelectedItem())" /> </cell> </row> <row> Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectHandler.java =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectHandler.java 2012-08-06 15:01:20 UTC (rev 1030) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/project/ProjectHandler.java 2012-08-07 13:40:47 UTC (rev 1031) @@ -314,8 +314,8 @@ ProjectService projectService = projectView.getContextValue(ProjectService.class); CoserFrame parent = projectView.getContextValue(CoserFrame.class, JAXXUtil.PARENT); - setWaitCursor(projectView); try { + setWaitCursor(projectView); Project project = projectService.openProject(projectName); parent.getHandler().projectLoaded(project); parent.getHandler().showSummaryView(); @@ -325,7 +325,8 @@ } JOptionPane.showMessageDialog(projectView, ex.getMessage(), _("coser.ui.project.openError"), JOptionPane.ERROR_MESSAGE); + } finally { + setDefaultCursor(projectView); } - setDefaultCursor(projectView); } } Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java 2012-08-06 15:01:20 UTC (rev 1030) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java 2012-08-07 13:40:47 UTC (rev 1031) @@ -486,7 +486,7 @@ speciesTypes.add((String)selectedSpeciesType); } - List<String> filteredSpecies = projectService.getProjectSpecies(project, selection, speciesTypes); + List<String> filteredSpecies = projectService.getProjectSpecies(selection, project, speciesTypes); // ne fait pas apparaitre les especes deja selectionnées List<String> selectedSpecies = view.getSelectedSpeciesListModel().getSpecies(); @@ -889,6 +889,7 @@ if (canBeValidated) { try { service.validSelection(project, selection); + selection.setValidated(true); JOptionPane.showMessageDialog(view, _("coser.ui.selection.selectionValidated"), _("coser.ui.selection.selectionTitle"), JOptionPane.INFORMATION_MESSAGE); } catch (CoserBusinessException ex) { @@ -1398,19 +1399,23 @@ */ public void extractRSufiData(SelectionRsufiView view) { - ProjectService projectService = view.getContextValue(ProjectService.class); - Project project = view.getContextValue(Project.class); - Selection selection = view.getContextValue(Selection.class); - - String directoryPath = view.getResultExtractDataField().getText(); - File directory = new File(directoryPath); try { + setWaitCursor(view); + ProjectService projectService = view.getContextValue(ProjectService.class); + Project project = view.getContextValue(Project.class); + Selection selection = view.getContextValue(Selection.class); + + String directoryPath = view.getResultExtractDataField().getText(); + File directory = new File(directoryPath); + projectService.extractRSUfiData(project, selection, directory, false); JOptionPane.showMessageDialog(view, _("coser.ui.selection.rsufidataextracted"), _("coser.ui.selection.selectionTitle"), JOptionPane.INFORMATION_MESSAGE); } catch (CoserBusinessException ex) { throw new CoserException("Can't extract rsufi files", ex); + } finally { + setDefaultCursor(view); } } Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/replay/SelectionReplayHandler.java =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/replay/SelectionReplayHandler.java 2012-08-06 15:01:20 UTC (rev 1030) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/replay/SelectionReplayHandler.java 2012-08-07 13:40:47 UTC (rev 1031) @@ -248,7 +248,7 @@ } // init next step - List<String> currentSpecies = projectService.getProjectSpecies(project, selection, null); + List<String> currentSpecies = projectService.getProjectSpecies(selection, project, null); view.getSelectedSpeciesListModel().setSpecies(currentSpecies); ((CoserListSelectionModel)view.getSelectedSpeciesList().getSelectionModel()).setSelectedObjects(replayedSelection.getSelectedSpecies()); Modified: trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties =================================================================== --- trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties 2012-08-06 15:01:20 UTC (rev 1030) +++ trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties 2012-08-07 13:40:47 UTC (rev 1031) @@ -107,9 +107,9 @@ coser.ui.mainview.accesswontrolwithselection=Can't access control interface since selection exists in project \!\n\nIn order to maintain consistency between the controlled data\nand data used to create selection, create a new project\nor remove selections to access to the control interface. coser.ui.mainview.titleempty=Contrôle et Sélection RSufi coser.ui.mainview.titleproject=Contrôle et Sélection RSufi (%s) -coser.ui.project.lValideSpeciesTypeDesc=Species latin name coser.ui.project.addMaps=Add map… coser.ui.project.cPermSpeciesTypeDesc=Numeric species code +coser.ui.project.cValideSpeciesTypeDesc=Alphabetic species code coser.ui.project.catchFile=Catch file \: coser.ui.project.createProject=Create project coser.ui.project.createProjectMissingCodeTypeSpecies=File 'CodeTypeSpecies' is not valid \!\n(check configuration \: coser.reference.typeSpecies) @@ -118,7 +118,7 @@ coser.ui.project.displaySpeciesType=Display field \: coser.ui.project.editProject=Edit project coser.ui.project.haulFile=Haul file \: -coser.ui.project.cValideSpeciesTypeDesc=Alphabetic species code +coser.ui.project.lValideSpeciesTypeDesc=Species latin name coser.ui.project.lengthFile=Length file \: coser.ui.project.maps=Maps \: coser.ui.project.missingFile=Missing file Modified: trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties =================================================================== --- trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties 2012-08-06 15:01:20 UTC (rev 1030) +++ trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties 2012-08-07 13:40:47 UTC (rev 1031) @@ -107,9 +107,9 @@ coser.ui.mainview.accesswontrolwithselection=Impossible d'acceder à l'interface de contrôle alors que des sélections existent \!\n\nDans le but de garder une cohérence entre les données contrôlées et les données\nutilisées pour créer les sélections, créez un nouveau projet\nou supprimer les sélections du projet pour accèder de nouveau à l'interface de contrôle. coser.ui.mainview.titleempty=Contrôle et Sélection RSufi coser.ui.mainview.titleproject=Contrôle et Sélection RSufi (%s) -coser.ui.project.lValideSpeciesTypeDesc=Nom latin des espèces coser.ui.project.addMaps=Ajouter… coser.ui.project.cPermSpeciesTypeDesc=Code numerique des espèces +coser.ui.project.cValideSpeciesTypeDesc=Code alphabetique des espèces coser.ui.project.catchFile=Fichier de captures \: coser.ui.project.createProject=Créer le projet coser.ui.project.createProjectMissingCodeTypeSpecies=Le fichier 'CodeTypeEspeces' n'est pas valide \!\n(vérifiez la configuration \: coser.reference.typeSpecies) @@ -118,7 +118,7 @@ coser.ui.project.displaySpeciesType=Champ pour affichage \: coser.ui.project.editProject=Modifier le projet coser.ui.project.haulFile=Fichier des traits \: -coser.ui.project.cValideSpeciesTypeDesc=Code alphabetique des espèces +coser.ui.project.lValideSpeciesTypeDesc=Nom latin des espèces coser.ui.project.lengthFile=Fichier des tailles \: coser.ui.project.maps=Cartes \: coser.ui.project.missingFile=Fichier manquant