Correct erreur avec attribut initial-Creator

This commit is contained in:
pablo rodriguez 2022-06-10 12:24:43 +02:00
parent cebfed7163
commit bc6b765fe5
71 changed files with 50 additions and 14 deletions

View File

@ -10,6 +10,6 @@
<classpathentry kind="lib" path="C:/Users/pabr6/eclipse-workspace/zip4j-1.2.7.jar"/> <classpathentry kind="lib" path="C:/Users/pabr6/eclipse-workspace/zip4j-1.2.7.jar"/>
<classpathentry kind="lib" path="C:/Users/pabr6/git/analyseWriter/MEPTL/miglayout15-swing.jar"/> <classpathentry kind="lib" path="C:/Users/pabr6/git/analyseWriter/MEPTL/miglayout15-swing.jar"/>
<classpathentry kind="lib" path="jgoodies-forms-1.8.0.jar" sourcepath="jgoodies-forms-1.8.0-sources.jar"/> <classpathentry kind="lib" path="jgoodies-forms-1.8.0.jar" sourcepath="jgoodies-forms-1.8.0-sources.jar"/>
<classpathentry kind="lib" path="C:/Users/pabr6/eclipse-workspace/cXML.jar"/> <classpathentry kind="lib" path="C:/Users/pabr6/eclipse-workspace/cXML.jar" sourcepath="/cXML"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>
</classpath> </classpath>

Binary file not shown.

1
bin/.gitignore vendored
View File

@ -1 +1,2 @@
/MEPTL/ /MEPTL/
/app/

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1605,7 +1605,7 @@ public class meptl {
b = nodStudent.retourneFirstEnfantsByName("meta:initial-creator"); b = nodStudent.retourneFirstEnfantsByName("meta:initial-creator");
if(b.getNomElt().equals("meta:initial-creator")) { if(b.getNomElt().equals("meta:initial-creator")) {
if(nodSujet.getAttributs().get("Initial_Creator")!=null) { if(nodSujet.getAttributs().get("Initial_Creator")!=null) {
if( !b.getContenu().equals(nodSujet.getAttributs().get("Initial_Creator"))) { if( !b.getContenu().get(0).equals(nodSujet.getAttributs().get("Initial_Creator"))) {
manqueInitialCreator = true; manqueInitialCreator = true;
} }
}else { }else {
@ -2262,8 +2262,8 @@ public class meptl {
} }
if(Boolean.valueOf(erreurs.getAttributs().get("manqueInitialCreator"))) { if(Boolean.valueOf(erreurs.getAttributs().get("manqueInitialCreator"))) {
Text.append("\n Erreur : La propriété personnalisé \"Sujet\" n'est pas correct."); Text.append("\n Erreur : Le créateur initial ne correspond pas au créateur initial du fichier fourni à l'étudiant.");
System.out.println("\t Erreur : La propriété personnalisé \"Sujet\" n'est pas correct."); System.out.println("\t Erreur : Le créateur initial n'est pas correct.");
} }
} }
Text.append("\n"); Text.append("\n");
@ -3221,7 +3221,7 @@ public class meptl {
private static node evalNameInitialCreator(node retour, node nodStudent, String nameCreator, String point, String nameElt) { private static node evalNameInitialCreator(node retour, node nodStudent, String nameCreator, String point, String nameElt) {
node item = null; node item = null;
if(nodStudent!=null) { if(nodStudent!=null) {
item = retourneNoteAvecResultatsAnalyse(nameCreator,"name", nodStudent.getAttributs().get("initial-creator"),nameCreator + "↑‽" +point, nameElt ); item = retourneNoteAvecResultatsAnalyse(nameCreator,"name", nodStudent.getContenu().get(0),nameCreator + "↑‽" +point, nameElt );
}else { }else {
outils.IncrementPointTotal(Integer.valueOf(point)); outils.IncrementPointTotal(Integer.valueOf(point));
item = new node(nameCreator, "Erreur", "Nom du créateur" , "null", nameCreator, 2, outils.getPointEnJeu(),nameElt); item = new node(nameCreator, "Erreur", "Nom du créateur" , "null", nameCreator, 2, outils.getPointEnJeu(),nameElt);

View File

@ -34,10 +34,10 @@ public class rechercherUnNodeStudent {
if(nodSujet.getAttributs().get("recherche_contenu_plus_proche_voisin").equals("true")){ if(nodSujet.getAttributs().get("recherche_contenu_plus_proche_voisin").equals("true")){
nodStudent = findNodeParContenuPlusProcheVoisin(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a); nodStudent = findNodeParContenuPlusProcheVoisin(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a);
if(nodStudent != null) { if(nodStudent != null) {
System.out.println("A trouvé le node "+ nameNode + " par le plus proche voisin avec le contenu =" + nodSujet.retourneLesContenusEnfants("")); // System.out.println("A trouvé le node "+ nameNode + " par le plus proche voisin avec le contenu =" + nodSujet.retourneLesContenusEnfants(""));
return nodStudent; return nodStudent;
}else { }else {
System.out.println("N'a pas trouvé le node "+ nameNode + " par le plus proche voisin avec le contenu =" + nodSujet.retourneLesContenusEnfants("")); // System.out.println("N'a pas trouvé le node "+ nameNode + " par le plus proche voisin avec le contenu =" + nodSujet.retourneLesContenusEnfants(""));
} }
} }
} }
@ -193,14 +193,14 @@ public class rechercherUnNodeStudent {
node nodStudent = null; node nodStudent = null;
if(nodSujet.getAttributs().get("recherche_contenu_plus_proche_voisin").equals("true")) { if(nodSujet.getAttributs().get("recherche_contenu_plus_proche_voisin").equals("true")) {
if(!nodSujet.retourneLesContenusEnfants("").isEmpty()) { if(!nodSujet.retourneLesContenusEnfants("").isEmpty()) {
System.out.println("recherche par le contenu plus proche voisin"); // System.out.println("recherche par le contenu plus proche voisin");
if(nod0Student!=null) System.out.println("nod0Student "+ nod0Student.toString() + " contenu=" + nod0Student.retourneLesContenusEnfants("")); // if(nod0Student!=null) System.out.println("nod0Student "+ nod0Student.toString() + " contenu=" + nod0Student.retourneLesContenusEnfants(""));
if(nod1Student!=null) System.out.println("nod1Student "+ nod1Student.toString() + " contenu=" + nod1Student.retourneLesContenusEnfants("")); // if(nod1Student!=null) System.out.println("nod1Student "+ nod1Student.toString() + " contenu=" + nod1Student.retourneLesContenusEnfants(""));
if(nod2Student!=null) System.out.println("nod2Student "+ nod2Student.toString() + " contenu=" + nod2Student.retourneLesContenusEnfants("")); // if(nod2Student!=null) System.out.println("nod2Student "+ nod2Student.toString() + " contenu=" + nod2Student.retourneLesContenusEnfants(""));
String valueAttribut = outils.withoutCodeAndPointPourRechercheContenuExact(nodSujet.retourneLesContenusEnfants("")); String valueAttribut = outils.withoutCodeAndPointPourRechercheContenuExact(nodSujet.retourneLesContenusEnfants(""));
System.out.println("Contenu recherché = " + valueAttribut); // System.out.println("Contenu recherché = " + valueAttribut);
if(nod0Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod0Student.getNodes(), valueAttribut, nodSujet.getNomElt(),0.5,null); if(nod0Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod0Student.getNodes(), valueAttribut, nodSujet.getNomElt(),0.5,null);
if(nod1Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod1Student.getNodes(), valueAttribut, nodSujet.getNomElt(),0.5,null); if(nod1Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod1Student.getNodes(), valueAttribut, nodSujet.getNomElt(),0.5,null);
if(nod2Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod2Student.getNodes(), valueAttribut, nodSujet.getNomElt(),0.5,null); if(nod2Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod2Student.getNodes(), valueAttribut, nodSujet.getNomElt(),0.5,null);

View File

@ -37,6 +37,8 @@ public class afficheText extends JEditorPane {
String imagereEvaleNode = "<img src="+afficheText.class.getResource("/resources/evalnodemini.png").toString()+">"; String imagereEvaleNode = "<img src="+afficheText.class.getResource("/resources/evalnodemini.png").toString()+">";
String imagereRechercheAncragePage= "<img src="+afficheText.class.getResource("/resources/rechercheancragepagemini.png").toString()+">"; String imagereRechercheAncragePage= "<img src="+afficheText.class.getResource("/resources/rechercheancragepagemini.png").toString()+">";
String imagereRecherchePlusProcheVoisin= "<img src="+afficheText.class.getResource("/resources/recherchecontenuplusprochevoisinmini.png").toString()+">"; String imagereRecherchePlusProcheVoisin= "<img src="+afficheText.class.getResource("/resources/recherchecontenuplusprochevoisinmini.png").toString()+">";
String imagerePremierAuteur= "<img src="+afficheText.class.getResource("/resources/auteurcreateurmini.png").toString()+">";
String imagereDernierEditeur= "<img src="+afficheText.class.getResource("/resources/auteurediteurmini.png").toString()+">";
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@ -111,6 +113,12 @@ public class afficheText extends JEditorPane {
if(Lesattributsdunode.get(i).equals("recherche_contenu_plus_proche_voisin") && nod.getAttributs().get(Lesattributsdunode.get(i)).equals("true")) { if(Lesattributsdunode.get(i).equals("recherche_contenu_plus_proche_voisin") && nod.getAttributs().get(Lesattributsdunode.get(i)).equals("true")) {
sb.append("<li class=\"p4\">"+imagereRecherchePlusProcheVoisin + " <b>" + Lesattributsdunode.get(i) + "=\"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>"); sb.append("<li class=\"p4\">"+imagereRecherchePlusProcheVoisin + " <b>" + Lesattributsdunode.get(i) + "=\"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
} }
if(Lesattributsdunode.get(i).equals("evalNameInitialCreator") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
sb.append("<li class=\"p4\">"+imagerePremierAuteur + " <b>" + Lesattributsdunode.get(i) + "=\"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
}
if(Lesattributsdunode.get(i).equals("evalNameCreator") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
sb.append("<li class=\"p4\">"+imagereDernierEditeur + " <b>" + Lesattributsdunode.get(i) + "=\"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
}

View File

@ -200,6 +200,14 @@ public class create extends JFrame {
} }
} }
if(nod.getAttributs().get("evalNameNode")!=null) {
try {
point = point + Integer.valueOf(nod.getAttributs().get("evalNameNode"));
} catch (Exception e) {
JOptionPane.showInternalMessageDialog(null, "Erreur dans la valeur de l'attribut evalNameCreator");
}
}
Enumeration<String> key = nod.getAttributs().keys(); Enumeration<String> key = nod.getAttributs().keys();
while(key.hasMoreElements()) { while(key.hasMoreElements()) {
String k = key.nextElement(); String k = key.nextElement();

View File

@ -106,7 +106,7 @@ public class mainApp extends JFrame implements ActionListener{
lblNewLabel.setBounds(10, 25, 470, 74); lblNewLabel.setBounds(10, 25, 470, 74);
frmEvalwriter.getContentPane().add(lblNewLabel); frmEvalwriter.getContentPane().add(lblNewLabel);
JButton btnNewButton = new JButton("Informations"); JButton btnNewButton = new JButton("Version & Documentation");
btnNewButton.setHorizontalAlignment(SwingConstants.LEFT); btnNewButton.setHorizontalAlignment(SwingConstants.LEFT);
btnNewButton.addActionListener(new ActionListener() { btnNewButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
@ -115,8 +115,27 @@ public class mainApp extends JFrame implements ActionListener{
}); });
btnNewButton.setFont(new Font("Arial", Font.PLAIN, 14)); btnNewButton.setFont(new Font("Arial", Font.PLAIN, 14));
btnNewButton.setIcon(new ImageIcon(mainApp.class.getResource("/resources/apropos.png"))); btnNewButton.setIcon(new ImageIcon(mainApp.class.getResource("/resources/apropos.png")));
btnNewButton.setBounds(34, 270, 180, 60); btnNewButton.setBounds(34, 270, 200, 60);
frmEvalwriter.getContentPane().add(btnNewButton); frmEvalwriter.getContentPane().add(btnNewButton);
JButton btnTutoriels = new JButton("Tutoriels");
btnTutoriels.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
String url = "https://www.youtube.com/channel/UCBSfItcCVnbRJdQbVE9ppjQ";
java.awt.Desktop.getDesktop().browse(java.net.URI.create(url));
}
catch (java.io.IOException e1) {
System.out.println(e1.getMessage());
}
System.out.println( "Affiche les tutoriels." );
}
});
btnTutoriels.setIcon(new ImageIcon(mainApp.class.getResource("/resources/tutoriel.png")));
btnTutoriels.setHorizontalAlignment(SwingConstants.LEFT);
btnTutoriels.setFont(new Font("Arial", Font.PLAIN, 14));
btnTutoriels.setBounds(254, 270, 200, 60);
frmEvalwriter.getContentPane().add(btnTutoriels);
} }