diff --git a/base/archiveBase.zip b/base/archiveBase.zip index 9c5afa4..e0281c8 100644 Binary files a/base/archiveBase.zip and b/base/archiveBase.zip differ diff --git a/base/base.xml b/base/base.xml index 3df5120..168ca0d 100644 --- a/base/base.xml +++ b/base/base.xml @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/base/base_sauvegarde.xml b/base/base_sauvegarde.xml index 25ba0bd..e5575b3 100644 --- a/base/base_sauvegarde.xml +++ b/base/base_sauvegarde.xml @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/resources/parametreImportationIncriptions.png b/resources/parametreImportationIncriptions.png new file mode 100644 index 0000000..c7f66a1 Binary files /dev/null and b/resources/parametreImportationIncriptions.png differ diff --git a/resources/parametreImportationIncriptions.svg b/resources/parametreImportationIncriptions.svg new file mode 100644 index 0000000..7f24bee --- /dev/null +++ b/resources/parametreImportationIncriptions.svg @@ -0,0 +1,268 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Inscriptions/importInscriptionXLS.java b/src/Inscriptions/importInscriptionXLS.java index b8e2f64..c8d593c 100644 --- a/src/Inscriptions/importInscriptionXLS.java +++ b/src/Inscriptions/importInscriptionXLS.java @@ -24,9 +24,7 @@ import outils.supprimeCaracatresSpeciaux; public class importInscriptionXLS { public static void importe(File file) { - if(commandes.nBase==null) { - commandes.nBase = recupeBases.recupeLaBase(); - } + if(commandes.nBase==null) commandes.nBase = recupeBases.recupeLaBase(); noeud nYear = null; if(commandes.nBase.getAttributes("defaut_Year")!=null) { @@ -71,19 +69,22 @@ public class importInscriptionXLS { boolean mailpersoPresent = false; boolean mailPresent = false; boolean portablePresent = false; + for (Cell cell : sheet.getRow(0)) { if(cell.getCellType()==CellType.STRING) { - if(cell.getStringCellValue().equals("Individu - Nom")) nomPresent=true; - if(cell.getStringCellValue().equals("Individu - Prénom")) prenomPresent=true; - if(cell.getStringCellValue().equals("Individu - Code Etudiant")) codePresent=true; - if(cell.getStringCellValue().equals("IAE - Version d'étape (lib. web)")) formationPresent=true; - if(cell.getStringCellValue().equals("Profil étudiant (lib.)")) profilPresent=true; - if(cell.getStringCellValue().equals("Bac ou équivalence (lib.)")) bacPresent=true; - if(cell.getStringCellValue().equals("Individu - Email personnel")) mailpersoPresent=true; - if(cell.getStringCellValue().equals("Individu - Email")) mailPresent=true; - if(cell.getStringCellValue().equals("Individu - Tél. portable")) portablePresent=true; + String nameColumns = supprimeCaracatresSpeciaux.TousLesCaracatresSpeciaux(cell.getStringCellValue()); + if(nameColumns.equals(commandes.nomColonneNomEtudiant)) nomPresent=true; + if(nameColumns.equals(commandes.nomColonnePrenomEtudiant)) prenomPresent=true; + if(nameColumns.equals(commandes.nomColonneCodeEtudiant)) codePresent=true; + if(nameColumns.equals(commandes.nomColonneFormation)) formationPresent=true; + if(nameColumns.equals(commandes.nomColonneProfilEtudiant)) profilPresent=true; + if(nameColumns.equals(commandes.nomColonneBacEtudiant)) bacPresent=true; + if(nameColumns.equals(commandes.nomColonneMailPersoEtudiant)) mailpersoPresent=true; + if(nameColumns.equals(commandes.nomColonneMailUnivEtudiant)) mailPresent=true; + if(nameColumns.equals(commandes.nomColonnePortableEtudiant)) portablePresent=true; } } + if(!(nomPresent&&prenomPresent&&codePresent&&formationPresent&&profilPresent &&bacPresent&&mailpersoPresent&&mailPresent&&portablePresent)) { JOptionPane.showMessageDialog(null, "Ce n'est pas une feuille d'inscription de luniversité d'Artois."); @@ -116,8 +117,8 @@ public class importInscriptionXLS { // Création ou insertion des informations récupéré dans le HashMap Student; - if(Student.get("IAE - Version d'étape (lib. web)")!=null) { - String nameFormation = supprimeCaracatresSpeciaux.TousLesCaracatresSpeciaux(Student.get("IAE - Version d'étape (lib. web)")); + if(Student.get(commandes.nomColonneExcel_Formation)!=null) { + String nameFormation = supprimeCaracatresSpeciaux.TousLesCaracatresSpeciaux(Student.get(commandes.nomColonneExcel_Formation)); noeud nFormation = null; // récupère le noeud formation ou bien création du noeud formation @@ -142,7 +143,7 @@ public class importInscriptionXLS { nYear.addChild(nFormation); } - String nameNoeudStudent = "n"+String.valueOf(Student.get("Individu - Code Etudiant")); + String nameNoeudStudent = "n"+String.valueOf(Student.get(commandes.nomColonneExcel_CodeEtudiant)); noeud nStudent = null; if(nFormation.getChild(nameNoeudStudent)!=null) { nStudent = nFormation.getChild(nameNoeudStudent); @@ -154,15 +155,15 @@ public class importInscriptionXLS { // Les noms de colonnes obligatoires pour la création // Le noms des colonnes subissent un traitement pour supprimer les espaces et les carcatères spéciaux. for (Map.Entry entry : Student.entrySet()) { - if(entry.getKey().equals("Individu - Nom") - || entry.getKey().equals("Individu - Prénom") - || entry.getKey().equals("Individu - Code Etudiant") - || entry.getKey().equals("IAE - Version d'étape (lib. web)") - || entry.getKey().equals("Profil étudiant (lib.)") - || entry.getKey().equals("Bac ou équivalence (lib.)") - || entry.getKey().equals("Individu - Email personnel") - || entry.getKey().equals("Individu - Email") - || entry.getKey().equals("Individu - Tél. portable")) { + if(entry.getKey().equals(commandes.nomColonneExcel_NomEtudiant) + || entry.getKey().equals(commandes.nomColonneExcel_PrenomEtudiant) + || entry.getKey().equals(commandes.nomColonneExcel_CodeEtudiant) + || entry.getKey().equals(commandes.nomColonneExcel_Formation) + || entry.getKey().equals(commandes.nomColonneExcel_ProfilEtudiant) + || entry.getKey().equals(commandes.nomColonneExcel_BacEtudiant) + || entry.getKey().equals(commandes.nomColonneExcel_MailPersoEtudiant) + || entry.getKey().equals(commandes.nomColonneExcel_MailUnivEtudiant) + || entry.getKey().equals(commandes.nomColonneExcel_PortableEtudiant)) { nStudent.setAttribut(supprimeCaracatresSpeciaux.TousLesCaracatresSpeciaux(entry.getKey()), entry.getValue()); } } diff --git a/src/Windows/Window_demarre.java b/src/Windows/Window_demarre.java index 8d7184c..280414d 100644 --- a/src/Windows/Window_demarre.java +++ b/src/Windows/Window_demarre.java @@ -30,6 +30,7 @@ import Inscriptions.importInscriptionCSV; import Inscriptions.importInscriptionXLS; import base.CreateUpdateZipArchive; import base.Hash; +import base.correspondanceNomDeColonneInscription; import base.recupeBases; import base.sauvegardeXMLBase; import exportations.exportBaseToExcel; @@ -75,8 +76,12 @@ public class Window_demarre extends JFrame { // mise à jour de la base de données si nouvelle version de l'application utilisé. - commandes.nBase=recupeBases.recupeLaBase(); + commandes.nBase=recupeBases.recupeLaBase(); + + // Chargement des noms des colonnes qui ont servi pendant l'inscription des étudiant + correspondanceNomDeColonneInscription.chargement(); + // Mise à jour de la version VersionChecker.UpdateVersion(commandes.nBase); if(commandes.blocageApplication) { @@ -155,10 +160,9 @@ public class Window_demarre extends JFrame { frmEvalwriter.setResizable(false); btnExporterTouteLaBase = new JButton("Exporter toute la base dans
un classeur MS Excel"); - btnExporterTouteLaBase.setHorizontalAlignment(SwingConstants.LEFT); btnExporterTouteLaBase.setIcon(new ImageIcon(Window_demarre.class.getResource("/resources/exportbasetoexcel.png"))); btnExporterTouteLaBase.setFont(new Font("Arial", Font.BOLD, 16)); - btnExporterTouteLaBase.setBounds(22, 724, 377, 78); + btnExporterTouteLaBase.setBounds(10, 432, 377, 60); frmEvalwriter.getContentPane().add(btnExporterTouteLaBase); @@ -177,20 +181,16 @@ public class Window_demarre extends JFrame { lblTitre.setFont(new Font("Pacifico", Font.PLAIN, 26)); lblTitre.setBounds(10, 35, 753, 202); frmEvalwriter.getContentPane().add(lblTitre); - - btnMiseAJourDepuisClasseur.setHorizontalAlignment(SwingConstants.LEFT); btnMiseAJourDepuisClasseur.setIcon(new ImageIcon(Window_demarre.class.getResource("/resources/majInscriptionToBase.png"))); btnMiseAJourDepuisClasseur.setFont(new Font("Arial", Font.BOLD, 16)); - btnMiseAJourDepuisClasseur.setBounds(10, 428, 377, 134); + btnMiseAJourDepuisClasseur.setBounds(10, 501, 377, 60); frmEvalwriter.getContentPane().add(btnMiseAJourDepuisClasseur); btnGestionnaire.setIcon(new ImageIcon(Window_demarre.class.getResource("/resources/gestionnaire_bouton.png"))); btnGestionnaire.setFont(new Font("Arial", Font.BOLD, 16)); - btnGestionnaire.setBounds(397, 328, 366, 263); + btnGestionnaire.setBounds(397, 432, 366, 159); frmEvalwriter.getContentPane().add(btnGestionnaire); - - btnimporterDesInscriptionsdepuisClasseur.setHorizontalAlignment(SwingConstants.LEFT); btnimporterDesInscriptionsdepuisClasseur.setIcon(new ImageIcon(Window_demarre.class.getResource("/resources/bouton_inscription_excel.png"))); btnimporterDesInscriptionsdepuisClasseur.setFont(new Font("Arial", Font.BOLD, 16)); btnimporterDesInscriptionsdepuisClasseur.setBounds(10, 328, 377, 60); @@ -239,6 +239,17 @@ public class Window_demarre extends JFrame { frmEvalwriter.getContentPane().add(btnAideImportationInscriptionCSV); btnAideImportationInscriptionCSV.setForeground(Color.GRAY); + JButton btnNewButton = new JButton("Paramètres des importations
des inscriptions"); + btnNewButton.setForeground(Color.GRAY); + btnNewButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + } + }); + btnNewButton.setFont(new Font("Arial", Font.BOLD, 16)); + btnNewButton.setIcon(new ImageIcon(Window_demarre.class.getResource("/resources/parametreImportationIncriptions.png"))); + btnNewButton.setBounds(397, 328, 366, 60); + frmEvalwriter.getContentPane().add(btnNewButton); + btnHelpDownload.setVisible(commandes.newVersion); @@ -297,6 +308,10 @@ public class Window_demarre extends JFrame { public void actionPerformed(ActionEvent e) { File f = FileChooserXLSX.retourneFileXLSX(); if(f!=null) { + // chargement des noms des colonne pour incription + correspondanceNomDeColonneInscription.chargement(); + + // Importation des inscription importInscriptionXLS.importe(f); } } @@ -415,5 +430,4 @@ public class Window_demarre extends JFrame { } lblFondImage.setIcon(new ImageIcon(resizedImage)); } - } diff --git a/src/Windows/Window_gestionnaire.java b/src/Windows/Window_gestionnaire.java index cb62a85..08e4f3b 100644 --- a/src/Windows/Window_gestionnaire.java +++ b/src/Windows/Window_gestionnaire.java @@ -681,9 +681,9 @@ public class Window_gestionnaire extends JFrame { public void actionPerformed(ActionEvent e) { if(nStudent!=null) { - String nomStudent = nStudent.getAttributes("Individu_-_Nom"); - String prenomStudent = nStudent.getAttributes("Individu_-_Prenom"); - String codeStudent = nStudent.getAttributes("Individu_-_Code_Etudiant"); + String nomStudent = nStudent.getAttributes(commandes.nomColonneNomEtudiant); + String prenomStudent = nStudent.getAttributes(commandes.nomColonnePrenomEtudiant); + String codeStudent = nStudent.getAttributes(commandes.nomColonneCodeEtudiant); String nomFormation = cFormations.getSelectedItem().toString(); int userChoice = JOptionPane.showConfirmDialog(null, "Vous êtes sur le point de supprimer de la formation : \"" + nomFormation +"\"
" @@ -694,6 +694,7 @@ public class Window_gestionnaire extends JFrame { if (userChoice == JOptionPane.YES_OPTION) { System.out.println("Vous avez choisi Oui."); commandes.nBase.getChild(nomFormation).removeChild(nStudent); + sauvegardeXMLBase.save(commandes.nBase,saveType.SANS_MESSAGE,""); majTable(); } else if (userChoice == JOptionPane.NO_OPTION) { System.out.println("Vous avez choisi Non."); @@ -849,9 +850,9 @@ public class Window_gestionnaire extends JFrame { for (int i = 0; i < table.getColumnCount(); i++) { rowData[i] = table.getValueAt(selectedRow, i); } - int indexCode = head.get("Individu_-_Code_Etudiant"); - int indexNom = head.get("Individu_-_Nom"); - int indexPrenom = head.get("Individu_-_Prenom"); + int indexCode = head.get(commandes.nomColonneCodeEtudiant); + int indexNom = head.get(commandes.nomColonneNomEtudiant); + int indexPrenom = head.get(commandes.nomColonnePrenomEtudiant); if(rowData[indexPrenom]!=null && rowData[indexNom]!=null && rowData[indexCode]!=null) { lblInformationStudent.setText(rowData[indexPrenom].toString() + " " + rowData[indexNom].toString() + " - " + rowData[indexCode].toString() ); @@ -952,7 +953,6 @@ public class Window_gestionnaire extends JFrame { if(cGroupeProjet.getItemCount()>0) selectedGroupeProjet = cGroupeProjet.getSelectedItem().toString(); if(cRegime.getItemCount()>0) selectedRegime = cRegime.getSelectedItem().toString(); - cGroupeTD.removeAllItems(); cGroupeTP.removeAllItems(); cLV1.removeAllItems(); @@ -1279,19 +1279,27 @@ public class Window_gestionnaire extends JFrame { if(nYears!=null) { noeud nFormation = nYears.getChild(cFormations.getSelectedItem().toString()); - String[][] data = new String[nFormation.getChildren().size()][34] ; + int nombreAttribut = 40; + if(nFormation.getFirstChild()!=null) nombreAttribut = nFormation.getFirstChild().getNumberAttribut(); + + String[][] data = new String[nFormation.getChildren().size()][nombreAttribut] ; // création de l'entête int indexCol = 0; int compteur = 0; noeud firstStudent = nFormation.getFirstChild(); + + if(firstStudent==null) { + firstStudent = new noeud("tester"); + } + for (Map.Entry entry : firstStudent.getAttributes().entrySet()) { String key = entry.getKey(); if(chckToutesLesColonnes.isSelected() ) { headTable.put(key, indexCol); indexCol++; }else { - if(key.equals("Individu_-_Nom") || key.equals("Individu_-_Prenom") || key.equals("Individu_-_Code_Etudiant")) { + if(key.equals(commandes.nomColonneNomEtudiant) || key.equals(commandes.nomColonnePrenomEtudiant) || key.equals(commandes.nomColonneCodeEtudiant)) { headTable.put(key, indexCol); indexCol++; } @@ -1362,7 +1370,7 @@ public class Window_gestionnaire extends JFrame { if(!textPaneNom.getText().isEmpty()) { searchStudent=true; - nameStudent = nStudent.getAttributes("Individu_-_Nom").toLowerCase(); + nameStudent = nStudent.getAttributes(commandes.nomColonneNomEtudiant).toLowerCase(); String nameSearch = textPaneNom.getText().toLowerCase(); boolean commencePar = nameStudent.matches("^"+nameSearch+".*"); if(commencePar) containNameStudent=true; @@ -1386,10 +1394,10 @@ public class Window_gestionnaire extends JFrame { if(headTable.get(entry.getKey())!=null) { String key = entry.getKey(); if(chckToutesLesColonnes.isSelected() ) { - data[indexRow][headTable.get(key)] = entry.getValue(); + if(!key.equals(commandes.nomColonneFormation)) data[indexRow][headTable.get(key)] = entry.getValue(); }else { int indexColumn = headTable.get(key); - if(key.equals("Individu_-_Nom") || key.equals("Individu_-_Prenom") || key.equals("Individu_-_Code_Etudiant")) { + if(key.equals(commandes.nomColonneNomEtudiant) || key.equals(commandes.nomColonnePrenomEtudiant) || key.equals(commandes.nomColonneCodeEtudiant)) { data[indexRow][indexColumn] = entry.getValue(); } if(chckGroupePrincipal.isSelected() && key.equals("Groupe_Principal") ) { @@ -1479,8 +1487,8 @@ public class Window_gestionnaire extends JFrame { if (row != -1 && column != -1) { String key = getColumnsName()[column]; - if(key.equals("IAE_-_Etape_lib.") || key.equals("Individu_-_Code_Etudiant") - || key.equals("Individu_-_Email")) { + if(key.equals(commandes.nomColonneFormation) || key.equals(commandes.nomColonneCodeEtudiant) + || key.equals(commandes.nomColonneMailUnivEtudiant)) { JOptionPane.showMessageDialog(null, "Impossible de modifier ce contenu.
" + "Actualisez la table pour ne plus voir votre saisie.", "Erreur", JOptionPane.ERROR_MESSAGE); return; @@ -1489,7 +1497,7 @@ public class Window_gestionnaire extends JFrame { String value = (String) table.getValueAt(row, column); // Obtenir l'indice de la colonne "Individu_-_Code_Etudiant" - int columnIndex = table.getColumnModel().getColumnIndex("Individu_-_Code_Etudiant"); + int columnIndex = table.getColumnModel().getColumnIndex(commandes.nomColonneCodeEtudiant); String numeroEtudiant = (String) table.getModel().getValueAt(row, columnIndex); noeud nF = commandes.nBase.getChild(defautYear).getChild(cFormations.getSelectedItem().toString()); diff --git a/src/base/base.java b/src/base/base.java index 44b1375..2fd56fd 100644 --- a/src/base/base.java +++ b/src/base/base.java @@ -30,6 +30,32 @@ public class base { nBase.setAttribut("date_derniere_modification",DateEnClairFR(aujourdhui)); nBase.setAttribut("version",commandes.version); + // Chargement des noms des colonnes par défaut pour inscrire des étudiants. + correspondanceNomDeColonneInscription.chargementParDefaut(); + + nBase.setAttribut("Formation",commandes.nomColonneFormation); + nBase.setAttribut(commandes.nomColonneCodeEtudiant,commandes.nomColonneCodeEtudiant); + nBase.setAttribut(commandes.nomColonneNomEtudiant,commandes.nomColonneNomEtudiant); + nBase.setAttribut(commandes.nomColonnePrenomEtudiant,commandes.nomColonnePrenomEtudiant); + nBase.setAttribut(commandes.nomColonneProfilEtudiant,commandes.nomColonneProfilEtudiant); + nBase.setAttribut(commandes.nomColonneBacEtudiant,commandes.nomColonneBacEtudiant); + nBase.setAttribut(commandes.nomColonnePortableEtudiant,commandes.nomColonnePortableEtudiant); + nBase.setAttribut(commandes.nomColonneMailPersoEtudiant,commandes.nomColonneMailPersoEtudiant); + nBase.setAttribut(commandes.nomColonneMailUnivEtudiant,commandes.nomColonneMailUnivEtudiant); + + nBase.setAttribut("Excel_Formation",commandes.nomColonneExcel_Formation); + nBase.setAttribut("Excel_"+commandes.nomColonneCodeEtudiant,commandes.nomColonneExcel_CodeEtudiant); + nBase.setAttribut("Excel_"+commandes.nomColonneNomEtudiant,commandes.nomColonneExcel_NomEtudiant); + nBase.setAttribut("Excel_"+commandes.nomColonnePrenomEtudiant,commandes.nomColonneExcel_PrenomEtudiant); + nBase.setAttribut("Excel_"+commandes.nomColonneProfilEtudiant,commandes.nomColonneExcel_ProfilEtudiant); + nBase.setAttribut("Excel_"+commandes.nomColonneBacEtudiant,commandes.nomColonneExcel_BacEtudiant); + nBase.setAttribut("Excel_"+commandes.nomColonnePortableEtudiant,commandes.nomColonneExcel_PortableEtudiant); + nBase.setAttribut("Excel_"+commandes.nomColonneMailPersoEtudiant,commandes.nomColonneExcel_MailPersoEtudiant); + nBase.setAttribut("Excel_"+commandes.nomColonneMailUnivEtudiant,commandes.nomColonneExcel_MailUnivEtudiant); + + + + String defaultValue = "2022-2023"; String userInput = JOptionPane.showInputDialog("Quelle est l'année universitaire ? ",defaultValue); @@ -58,16 +84,14 @@ public class base { } else { - System.out.println("Le format est valide, mais le premier nombre n'est pas inférieur au second nombre."); JPanel panel = new JPanel(); - JLabel message = new JLabel("

Le format est valide, la première année n'est pas inférieure à la seconde année.

" + JLabel message = new JLabel("

Le format est valide, la première année n'est pas inférieure à la seconde année d'une année.

" + "

Exemple de format : 2023-2024

"); panel.add(message); JOptionPane.showMessageDialog(null, panel, "Erreur", JOptionPane.ERROR_MESSAGE); } } else { - System.out.println("Le format est invalide."); JPanel panel = new JPanel(); JLabel message = new JLabel("

Le format est invalide.

" + "

Exemple de format : 2023-2024

"); diff --git a/src/base/correspondanceNomDeColonneInscription.java b/src/base/correspondanceNomDeColonneInscription.java new file mode 100644 index 0000000..d639708 --- /dev/null +++ b/src/base/correspondanceNomDeColonneInscription.java @@ -0,0 +1,88 @@ +package base; + +import java.util.HashMap; + +import outils.commandes; +import outils.supprimeCaracatresSpeciaux; + +public class correspondanceNomDeColonneInscription { + + public static void chargement() { + // Valeurs par défaut + commandes.nomColonneFormation = commandes.nBase.getAttributes("Formation"); + commandes.nomColonneNomEtudiant = commandes.nBase.getAttributes("Individu_-_Nom"); + commandes.nomColonnePrenomEtudiant = commandes.nBase.getAttributes("Individu_-_Prenom"); + commandes.nomColonneCodeEtudiant = commandes.nBase.getAttributes("Individu_-_Code_Etudiant"); + commandes.nomColonneProfilEtudiant = commandes.nBase.getAttributes("Profil_etudiant_lib."); + commandes.nomColonneBacEtudiant = commandes.nBase.getAttributes("Bac_ou_equivalence_lib."); + commandes.nomColonnePortableEtudiant = commandes.nBase.getAttributes("Individu_-_Tel._portable"); + commandes.nomColonneMailPersoEtudiant = commandes.nBase.getAttributes("Individu_-_Email_personnel"); + commandes.nomColonneMailUnivEtudiant = commandes.nBase.getAttributes("Individu_-_Email"); + + commandes.nomColonneExcel_Formation = commandes.nBase.getAttributes("Excel_Formation"); + commandes.nomColonneExcel_NomEtudiant = commandes.nBase.getAttributes("Excel_Individu_-_Nom"); + commandes.nomColonneExcel_PrenomEtudiant = commandes.nBase.getAttributes("Excel_Individu_-_Prenom"); + commandes.nomColonneExcel_CodeEtudiant = commandes.nBase.getAttributes("Excel_Individu_-_Code_Etudiant"); + commandes.nomColonneExcel_ProfilEtudiant = commandes.nBase.getAttributes("Excel_Profil_etudiant_lib."); + commandes.nomColonneExcel_BacEtudiant = commandes.nBase.getAttributes("Excel_Bac_ou_equivalence_lib."); + commandes.nomColonneExcel_PortableEtudiant = commandes.nBase.getAttributes("Excel_Individu_-_Tel._portable"); + commandes.nomColonneExcel_MailPersoEtudiant = commandes.nBase.getAttributes("Excel_Individu_-_Email_personnel"); + commandes.nomColonneExcel_MailUnivEtudiant = commandes.nBase.getAttributes("Excel_Individu_-_Email"); + + } + + /** + * chargement des noms des colonnes dans le classeur des inscriptions. + * Ce classeur est fourni par le service administratif DSI qui le transmet au secrétarait de chaque UFR. + * Ce classeur doit contenir ces colonnes après traitement des caractères. + */ + public static void chargementParDefaut() { + + commandes.nomColonneExcel_Formation = "IAE - Version d'étape (lib. web)"; + commandes.nomColonneExcel_NomEtudiant = "Individu - Nom"; + commandes.nomColonneExcel_PrenomEtudiant = "Individu - Prénom"; + commandes.nomColonneExcel_CodeEtudiant = "Individu - Code Etudiant"; + commandes.nomColonneExcel_ProfilEtudiant = "Profil étudiant (lib.)"; + commandes.nomColonneExcel_BacEtudiant = "Bac ou équivalence (lib.)"; + commandes.nomColonneExcel_PortableEtudiant = "Individu - Tél. portable"; + commandes.nomColonneExcel_MailPersoEtudiant = "Individu - Email personnel"; + commandes.nomColonneExcel_MailUnivEtudiant = "Individu - Email"; + + commandes.nomColonneFormation = supprimeCaracatresSpeciaux.TousLesCaracatresSpeciaux(commandes.nomColonneExcel_Formation);//"IAE_-_Version_detape_lib._web"; + commandes.nomColonneNomEtudiant = supprimeCaracatresSpeciaux.TousLesCaracatresSpeciaux(commandes.nomColonneExcel_NomEtudiant);//"Individu_-_Nom"; + commandes.nomColonnePrenomEtudiant = supprimeCaracatresSpeciaux.TousLesCaracatresSpeciaux(commandes.nomColonneExcel_PrenomEtudiant);; //"Individu_-_Prenom"; + commandes.nomColonneCodeEtudiant = supprimeCaracatresSpeciaux.TousLesCaracatresSpeciaux(commandes.nomColonneExcel_CodeEtudiant);//"Individu_-_Code_Etudiant"; + commandes.nomColonneProfilEtudiant = supprimeCaracatresSpeciaux.TousLesCaracatresSpeciaux(commandes.nomColonneExcel_ProfilEtudiant); //"Profil_etudiant_lib."; + commandes.nomColonneBacEtudiant = supprimeCaracatresSpeciaux.TousLesCaracatresSpeciaux(commandes.nomColonneExcel_BacEtudiant);//"Bac_ou_equivalence_lib."; + commandes.nomColonnePortableEtudiant = supprimeCaracatresSpeciaux.TousLesCaracatresSpeciaux(commandes.nomColonneExcel_PortableEtudiant);//"Individu_-_Tel._portable"; + commandes.nomColonneMailPersoEtudiant = supprimeCaracatresSpeciaux.TousLesCaracatresSpeciaux(commandes.nomColonneExcel_MailPersoEtudiant);//"Individu_-_Email_personnel"; + commandes.nomColonneMailUnivEtudiant = supprimeCaracatresSpeciaux.TousLesCaracatresSpeciaux(commandes.nomColonneExcel_MailUnivEtudiant);//"Individu_-_Email"; + } + + public static void modifierLesNoms(HashMap nomColonne) { + + String nomColonneFormationDansBase = commandes.nBase.getAttributes("Formation"); + + + commandes.nomColonneFormation = nomColonne.get("Formation"); +// commandes.nomColonneNomEtudiant = nomColonne.get("Individu_-_Nom"); +// commandes.nomColonneNomEtudiant = nomColonne.get("Individu_-_Prenom"); +// commandes.nomColonneCodeEtudiant = nomColonne.get("Individu_-_Code_Etudiant"); +// commandes.nomColonneProfilEtudiant = nomColonne.get("Profil étudiant (lib.)"); +// commandes.nomColonneProfilEtudiant = nomColonne.get("Bac ou équivalence (lib.)"); +// commandes.nomColonnePortableEtudiant = nomColonne.get("Individu - Tél. portable"); +// commandes.nomColonneMailPersoEtudiant = nomColonne.get("Individu - Email personnel"); +// commandes.nomColonneMailUnivEtudiant = nomColonne.get("Individu - Email"); + + String baseString = commandes.nBase.toWrite(); + + String regex = "\\s"+nomColonneFormationDansBase + "="; + String texte = " " + nomColonne.get("Formation") + "="; + baseString = baseString.replaceAll(regex,texte); + + + + } + + +} diff --git a/src/exportations/CreateCalcWorkbook.java b/src/exportations/CreateCalcWorkbook.java index 16d10cd..ff6ea62 100644 --- a/src/exportations/CreateCalcWorkbook.java +++ b/src/exportations/CreateCalcWorkbook.java @@ -4,6 +4,8 @@ import java.awt.BorderLayout; import java.awt.Dimension; import java.io.FileOutputStream; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; import javax.swing.JFrame; import javax.swing.JLabel; @@ -88,6 +90,8 @@ public class CreateCalcWorkbook extends JFrame{ try (Workbook workbook = new XSSFWorkbook()) { int rows = data.length; // Nombre de lignes int columns = data[0].length; + List nomDesFeuillesPresentes = new ArrayList(); + int compteurNom = 1; // Créer un style de cellule avec des bordures CellStyle cellStyle = workbook.createCellStyle(); @@ -103,8 +107,19 @@ public class CreateCalcWorkbook extends JFrame{ String nameFormation = new String((String) data[i][0]); String[][] data1 = (String[][]) data[i][columns-1]; - + String nomFeuille = new String(nameFormation); + + if(nomFeuille.length()>26) { + nomFeuille = nomFeuille.substring(0, 26); + } + if(!nomDesFeuillesPresentes.contains(nomFeuille)) { + nomDesFeuillesPresentes.add(nomFeuille); + }else { + nomFeuille = nomFeuille + "_" +String.valueOf(compteurNom++); + nomDesFeuillesPresentes.add(nomFeuille); + } + Sheet sheet = workbook.createSheet(nomFeuille); //Entête de la première ligne @@ -119,19 +134,21 @@ public class CreateCalcWorkbook extends JFrame{ // Boucle pour insérer les données dans les colonnes int rowNum = 1; - for (Object[] rowData : data1) { - Row row = sheet.createRow(rowNum++); - - int colNum = 0; - for (Object cellData : rowData) { - Cell cell = row.createCell(colNum++); - if (cellData instanceof String) { - cell.setCellValue((String) cellData); - } else if (cellData instanceof Integer) { - cell.setCellValue((Integer) cellData); - } - cell.setCellStyle(cellStyle); - } + if(data1!=null) { + for (Object[] rowData : data1) { + Row row = sheet.createRow(rowNum++); + + int colNum = 0; + for (Object cellData : rowData) { + Cell cell = row.createCell(colNum++); + if (cellData instanceof String) { + cell.setCellValue((String) cellData); + } else if (cellData instanceof Integer) { + cell.setCellValue((Integer) cellData); + } + cell.setCellStyle(cellStyle); + } + } } for(int j = 0 ; j < tailleHead; j++) { diff --git a/src/exportations/exportBaseToExcel.java b/src/exportations/exportBaseToExcel.java index 87ce07d..0094a54 100644 --- a/src/exportations/exportBaseToExcel.java +++ b/src/exportations/exportBaseToExcel.java @@ -20,29 +20,25 @@ public class exportBaseToExcel { } - - public static void exportBase() { // Données Object[][] data = new Object[commandes.nBase.getChild(commandes.nBase.getAttributes("defaut_Year")).getNumberChildren()][33]; - int indexFormation = 0 ; for(noeud formation : commandes.nBase.getChild(commandes.nBase.getAttributes("defaut_Year")).getChildren()) { - - data[indexFormation][0] = formation.getFirstChild().getAttributes("IAE_-_Version_detape_lib._web"); + data[indexFormation][0] = formation.getName(); data[indexFormation][1] = "Formation"; - data[indexFormation][2] = "Individu_-_Code_Etudiant"; - data[indexFormation][3] = "Individu_-_Prenom"; - data[indexFormation][4] = "Individu_-_Nom"; - data[indexFormation][5] = "Profil_etudiant_lib."; - data[indexFormation][6] = "Individu_-_Tel._portable"; - data[indexFormation][7] = "Individu_-_Email_personnel"; - data[indexFormation][8] = "Individu_-_Email"; + data[indexFormation][2] = commandes.nomColonneCodeEtudiant; //.nBase.getAttributes("Individu_-_Code_Etudiant"); + data[indexFormation][3] = commandes.nomColonnePrenomEtudiant; //nBase.getAttributes("Individu_-_Prenom"); + data[indexFormation][4] = commandes.nomColonneNomEtudiant; //nBase.getAttributes("Individu_-_Nom"); + data[indexFormation][5] = commandes.nomColonneProfilEtudiant; //nBase.getAttributes("Profil_etudiant_lib."); + data[indexFormation][6] = commandes.nomColonnePortableEtudiant; //nBase.getAttributes("Individu_-_Tel._portable"); + data[indexFormation][7] = commandes.nomColonneMailPersoEtudiant; //nBase.getAttributes("Individu_-_Email_personnel"); + data[indexFormation][8] = commandes.nomColonneMailUnivEtudiant; //nBase.getAttributes("Individu_-_Email"); data[indexFormation][9] = "Groupe_Principal"; data[indexFormation][10] = "Groupe_TD"; data[indexFormation][11] = "Groupe_LV1"; @@ -67,42 +63,41 @@ public class exportBaseToExcel { data[indexFormation][30] = "Num_convention_2"; data[indexFormation][31] = "Periode_2"; - String[][] data1 = new String[formation.getNumberChildren()][32]; + String[][] data1 = new String[formation.getNumberChildren()][31]; int indexStudent = 0; for(noeud nStudent : formation.getChildren()) { - data1[indexStudent][0] = nStudent.getAttributes("IAE_-_Version_detape_lib._web");; - data1[indexStudent][1] = nStudent.getAttributes("Individu_-_Code_Etudiant"); - data1[indexStudent][2] = nStudent.getAttributes("Individu_-_Prenom"); - data1[indexStudent][3] = nStudent.getAttributes("Individu_-_Nom"); - data1[indexStudent][4] = nStudent.getAttributes("Profil_etudiant_lib."); - data1[indexStudent][5] = nStudent.getAttributes("Individu_-_Tel._portable"); - data1[indexStudent][6] = nStudent.getAttributes("Individu_-_Email_personnel"); - data1[indexStudent][7] = nStudent.getAttributes("Individu_-_Email"); - data1[indexStudent][8] = nStudent.getAttributes("Groupe"); - data1[indexStudent][9] = nStudent.getAttributes("Groupe_Principal"); - data1[indexStudent][10] = nStudent.getAttributes("Groupe_TD"); - data1[indexStudent][11] = nStudent.getAttributes("Groupe_LV1"); - data1[indexStudent][12] = nStudent.getAttributes("Groupe_LV2"); - data1[indexStudent][13] = nStudent.getAttributes("LV1"); - data1[indexStudent][14] = nStudent.getAttributes("LV2"); - data1[indexStudent][15] = nStudent.getAttributes("Regime"); - data1[indexStudent][16] = nStudent.getAttributes("Groupe_TP"); - data1[indexStudent][17] = nStudent.getAttributes("Groupe_Informatique"); - data1[indexStudent][18] = nStudent.getAttributes("Groupe_Projet"); - data1[indexStudent][19] = nStudent.getAttributes("Groupe_Doc"); - data1[indexStudent][20] = nStudent.getAttributes("Atelier-rentree_horaire"); - data1[indexStudent][21] = nStudent.getAttributes("Atelier_pre-rentree_enseignant"); - data1[indexStudent][22] = nStudent.getAttributes("Atelier_pre-rentree_salle"); - data1[indexStudent][23] = nStudent.getAttributes("UE_Libre"); - data1[indexStudent][24] = nStudent.getAttributes("Covoiturage"); - data1[indexStudent][25] = nStudent.getAttributes("Etudiant_Covoiturage"); - data1[indexStudent][26] = nStudent.getAttributes("Stage_1"); - data1[indexStudent][27] = nStudent.getAttributes("Num_convention_1"); - data1[indexStudent][28] = nStudent.getAttributes("Periode_1"); - data1[indexStudent][29] = nStudent.getAttributes("Stage_2"); - data1[indexStudent][30] = nStudent.getAttributes("Num_convention_2"); - data1[indexStudent][31] = nStudent.getAttributes("Periode_2"); + data1[indexStudent][0] = nStudent.getAttributes(commandes.nomColonneFormation); + data1[indexStudent][1] = nStudent.getAttributes(commandes.nomColonneCodeEtudiant); + data1[indexStudent][2] = nStudent.getAttributes(commandes.nomColonnePrenomEtudiant); + data1[indexStudent][3] = nStudent.getAttributes(commandes.nomColonneNomEtudiant); + data1[indexStudent][4] = nStudent.getAttributes(commandes.nomColonneProfilEtudiant); + data1[indexStudent][5] = nStudent.getAttributes(commandes.nomColonnePortableEtudiant); + data1[indexStudent][6] = nStudent.getAttributes(commandes.nomColonneMailPersoEtudiant); + data1[indexStudent][7] = nStudent.getAttributes(commandes.nomColonneMailUnivEtudiant); + data1[indexStudent][8] = nStudent.getAttributes("Groupe_Principal"); + data1[indexStudent][9] = nStudent.getAttributes("Groupe_TD"); + data1[indexStudent][10] = nStudent.getAttributes("Groupe_LV1"); + data1[indexStudent][11] = nStudent.getAttributes("Groupe_LV2"); + data1[indexStudent][12] = nStudent.getAttributes("LV1"); + data1[indexStudent][13] = nStudent.getAttributes("LV2"); + data1[indexStudent][14] = nStudent.getAttributes("Regime"); + data1[indexStudent][15] = nStudent.getAttributes("Groupe_TP"); + data1[indexStudent][16] = nStudent.getAttributes("Groupe_Informatique"); + data1[indexStudent][17] = nStudent.getAttributes("Groupe_Projet"); + data1[indexStudent][18] = nStudent.getAttributes("Groupe_Doc"); + data1[indexStudent][19] = nStudent.getAttributes("Atelier-rentree_horaire"); + data1[indexStudent][20] = nStudent.getAttributes("Atelier_pre-rentree_enseignant"); + data1[indexStudent][21] = nStudent.getAttributes("Atelier_pre-rentree_salle"); + data1[indexStudent][22] = nStudent.getAttributes("UE_Libre"); + data1[indexStudent][23] = nStudent.getAttributes("Covoiturage"); + data1[indexStudent][24] = nStudent.getAttributes("Etudiant_Covoiturage"); + data1[indexStudent][25] = nStudent.getAttributes("Stage_1"); + data1[indexStudent][26] = nStudent.getAttributes("Num_convention_1"); + data1[indexStudent][27] = nStudent.getAttributes("Periode_1"); + data1[indexStudent][28] = nStudent.getAttributes("Stage_2"); + data1[indexStudent][29] = nStudent.getAttributes("Num_convention_2"); + data1[indexStudent][30] = nStudent.getAttributes("Periode_2"); data[indexFormation][32] = data1; @@ -153,13 +148,13 @@ public class exportBaseToExcel { data[0][0] = nTable.getFirstChild().getAttributes("IAE_-_Version_detape_lib._web"); data[0][1] = "Formation"; - data[0][2] = "Individu_-_Code_Etudiant"; - data[0][3] = "Individu_-_Prenom"; - data[0][4] = "Individu_-_Nom"; - data[0][5] = "Profil_etudiant_lib."; - data[0][6] = "Individu_-_Tel._portable"; - data[0][7] = "Individu_-_Email_personnel"; - data[0][8] = "Individu_-_Email"; + data[0][2] = commandes.nomColonneFormation; //"Individu_-_Code_Etudiant"; + data[0][3] = commandes.nomColonnePrenomEtudiant;//"Individu_-_Prenom"; + data[0][4] = commandes.nomColonneNomEtudiant;//"Individu_-_Nom"; + data[0][5] = commandes.nomColonneProfilEtudiant;//"Profil_etudiant_lib."; + data[0][6] = commandes.nomColonnePortableEtudiant; //"Individu_-_Tel._portable"; + data[0][7] = commandes.nomColonneMailPersoEtudiant; //"Individu_-_Email_personnel"; + data[0][8] = commandes.nomColonneMailUnivEtudiant; //"Individu_-_Email"; data[0][9] = "Groupe_Principal"; data[0][10] = "Groupe_TD"; data[0][11] = "Groupe_LV1"; @@ -189,14 +184,14 @@ public class exportBaseToExcel { int indexStudent = 0; for(noeud nStudent : nTable.getChildren()) { - data1[indexStudent][0] = nStudent.getAttributes("IAE_-_Version_detape_lib._web");; - data1[indexStudent][1] = nStudent.getAttributes("Individu_-_Code_Etudiant"); - data1[indexStudent][2] = nStudent.getAttributes("Individu_-_Prenom"); - data1[indexStudent][3] = nStudent.getAttributes("Individu_-_Nom"); - data1[indexStudent][4] = nStudent.getAttributes("Profil_etudiant_lib."); - data1[indexStudent][5] = nStudent.getAttributes("Individu_-_Tel._portable"); - data1[indexStudent][6] = nStudent.getAttributes("Individu_-_Email_personnel"); - data1[indexStudent][7] = nStudent.getAttributes("Individu_-_Email"); + data1[indexStudent][0] = nStudent.getAttributes(commandes.nomColonneFormation);; + data1[indexStudent][1] = nStudent.getAttributes(commandes.nomColonneCodeEtudiant); + data1[indexStudent][2] = nStudent.getAttributes(commandes.nomColonnePrenomEtudiant); + data1[indexStudent][3] = nStudent.getAttributes(commandes.nomColonneNomEtudiant); + data1[indexStudent][4] = nStudent.getAttributes(commandes.nomColonneProfilEtudiant); + data1[indexStudent][5] = nStudent.getAttributes(commandes.nomColonnePortableEtudiant); + data1[indexStudent][6] = nStudent.getAttributes(commandes.nomColonneMailPersoEtudiant); + data1[indexStudent][7] = nStudent.getAttributes(commandes.nomColonneMailUnivEtudiant); data1[indexStudent][8] = nStudent.getAttributes("Groupe_Principal"); data1[indexStudent][9] = nStudent.getAttributes("Groupe_TD"); data1[indexStudent][10] = nStudent.getAttributes("Groupe_LV1"); diff --git a/src/gestion_version/VersionChecker.java b/src/gestion_version/VersionChecker.java index aafdca4..5a47c44 100644 --- a/src/gestion_version/VersionChecker.java +++ b/src/gestion_version/VersionChecker.java @@ -10,6 +10,7 @@ import java.util.regex.Pattern; import javax.swing.JOptionPane; +import base.correspondanceNomDeColonneInscription; import base.recupeBases; import base.sauvegardeXMLBase; import base.sauvegardeXMLBase.saveType; @@ -189,12 +190,36 @@ public class VersionChecker { if(versionDeLaBase.equals("1.0.4")) { + correspondanceNomDeColonneInscription.chargementParDefaut(); + + nBase.setAttribut("Formation",commandes.nomColonneFormation); + nBase.setAttribut(commandes.nomColonneCodeEtudiant,commandes.nomColonneCodeEtudiant); + nBase.setAttribut(commandes.nomColonneNomEtudiant,commandes.nomColonneNomEtudiant); + nBase.setAttribut(commandes.nomColonnePrenomEtudiant,commandes.nomColonnePrenomEtudiant); + nBase.setAttribut(commandes.nomColonneProfilEtudiant,commandes.nomColonneProfilEtudiant); + nBase.setAttribut(commandes.nomColonneBacEtudiant,commandes.nomColonneBacEtudiant); + nBase.setAttribut(commandes.nomColonnePortableEtudiant,commandes.nomColonnePortableEtudiant); + nBase.setAttribut(commandes.nomColonneMailPersoEtudiant,commandes.nomColonneMailPersoEtudiant); + nBase.setAttribut(commandes.nomColonneMailUnivEtudiant,commandes.nomColonneMailUnivEtudiant); + + nBase.setAttribut("Excel_Formation",commandes.nomColonneExcel_Formation); + nBase.setAttribut("Excel_"+commandes.nomColonneCodeEtudiant,commandes.nomColonneExcel_CodeEtudiant); + nBase.setAttribut("Excel_"+commandes.nomColonneNomEtudiant,commandes.nomColonneExcel_NomEtudiant); + nBase.setAttribut("Excel_"+commandes.nomColonnePrenomEtudiant,commandes.nomColonneExcel_PrenomEtudiant); + nBase.setAttribut("Excel_"+commandes.nomColonneProfilEtudiant,commandes.nomColonneExcel_ProfilEtudiant); + nBase.setAttribut("Excel_"+commandes.nomColonneBacEtudiant,commandes.nomColonneExcel_BacEtudiant); + nBase.setAttribut("Excel_"+commandes.nomColonnePortableEtudiant,commandes.nomColonneExcel_PortableEtudiant); + nBase.setAttribut("Excel_"+commandes.nomColonneMailPersoEtudiant,commandes.nomColonneExcel_MailPersoEtudiant); + nBase.setAttribut("Excel_"+commandes.nomColonneMailUnivEtudiant,commandes.nomColonneExcel_MailUnivEtudiant); + + for(noeud nFormation : nBase.getFirstChild().getChildren()) { nFormation.setAttribut("Colonne_Groupe_TP", "true"); for(noeud nStudent : nFormation.getChildren()) { nStudent.addAttribute("Groupe_TP", ""); } } + } diff --git a/src/importations/importAllBaseToExcel.java b/src/importations/importAllBaseToExcel.java index 96b2d33..7d77b5d 100644 --- a/src/importations/importAllBaseToExcel.java +++ b/src/importations/importAllBaseToExcel.java @@ -19,6 +19,11 @@ import outils.commandes; import outils.noeud; import outils.supprimeCaracatresSpeciaux; +/** + * Mise à jour de la base depuis un classeur Ms Excel. + * @author pabr6 + * + */ public class importAllBaseToExcel { public static void lecture(File file) { diff --git a/src/outils/commandes.java b/src/outils/commandes.java index 9f38a18..f7c54c2 100644 --- a/src/outils/commandes.java +++ b/src/outils/commandes.java @@ -5,6 +5,30 @@ public class commandes { public static noeud nBase = null; // La base de données sous forme de noeud. public static String version = "1.0.5"; // La version actuelle + + // nom des colonnes après traitement des caractères (Accès à la base XML) + public static String nomColonneFormation = null; + public static String nomColonneNomEtudiant = null; + public static String nomColonnePrenomEtudiant = null; + public static String nomColonneCodeEtudiant = null; + public static String nomColonneProfilEtudiant = null; + public static String nomColonneBacEtudiant = null; + public static String nomColonnePortableEtudiant = null; + public static String nomColonneMailPersoEtudiant = null; + public static String nomColonneMailUnivEtudiant = null; + + // nom des colonnes avant traitement des caractères (Accès au classeur des inscriptions) + public static String nomColonneExcel_Formation = null; + public static String nomColonneExcel_NomEtudiant = null; + public static String nomColonneExcel_PrenomEtudiant = null; + public static String nomColonneExcel_CodeEtudiant = null; + public static String nomColonneExcel_ProfilEtudiant = null; + public static String nomColonneExcel_BacEtudiant = null; + public static String nomColonneExcel_PortableEtudiant = null; + public static String nomColonneExcel_MailPersoEtudiant = null; + public static String nomColonneExcel_MailUnivEtudiant = null; + + // Messages et sécurité public static Boolean newVersion = false; //Permet de vérifier l'existance d'un nouvelle version. public static Boolean helpme1 = false; //M'aider à compléter mon service annuel. diff --git a/src/outils/noeud.java b/src/outils/noeud.java index acbcec2..91bcbe2 100644 --- a/src/outils/noeud.java +++ b/src/outils/noeud.java @@ -233,6 +233,7 @@ public class noeud implements Cloneable{ /** * Clone de l'objet. + * Le noeud cloné n'a pas de Parent. */ public noeud clone() throws CloneNotSupportedException { noeud cloned = (noeud) super.clone(); @@ -242,10 +243,19 @@ public class noeud implements Cloneable{ if(this.content!=null) cloned.content = new String(this.content); cloned.attributes = new TreeMap(this.attributes); cloned.children = new ArrayList(this.children); -// if(this.Parent!=null) cloned.Parent = this.Parent.clone(); - - return cloned; + } + + /** + * Changement du nom d'un attribut. + * @param oldName + * @param newName + */ + public void changeAttributName(String oldName, String newName) { + if(attributes.get(oldName)==null) return; + String value = attributes.get(oldName); + attributes.remove(oldName); + attributes.put(newName, value); } diff --git a/src/resources/parametreImportationIncriptions.png b/src/resources/parametreImportationIncriptions.png new file mode 100644 index 0000000..c7f66a1 Binary files /dev/null and b/src/resources/parametreImportationIncriptions.png differ