MAJ & optimisation du code
This commit is contained in:
parent
b36433ce05
commit
273b97bb4a
Binary file not shown.
|
@ -1 +0,0 @@
|
|||
/MEPTL/
|
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.
|
@ -1,15 +1,14 @@
|
|||
package MEPTL;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
import cXML.node;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author pablo rodriguez - 2000
|
||||
* @author pablo rodriguez
|
||||
*
|
||||
*/
|
||||
public class HTML {
|
||||
|
@ -221,14 +220,10 @@ public class HTML {
|
|||
public static String Table(node nod) {
|
||||
|
||||
String code = HTML.SautLigne();
|
||||
if(nod.getAttributs().get("titre")!=null) if(!nod.getAttributs().get("titre").isEmpty()) {
|
||||
code = code + HTML.H1(nod.getAttributs().get("titre"),nod.getAttributs().get("id"))+ HTML.SautLigne() ;
|
||||
}else {
|
||||
code = code + HTML.H1("",nod.getAttributs().get("id"))+ HTML.SautLigne() ;
|
||||
}
|
||||
code = addSautEtTitres(code,nod);
|
||||
|
||||
//ajoute le commentaire
|
||||
if(!nod.getContenu().isEmpty()) if(nod.getNodes().size()==1) code = code + HTML.Paragraph_classp6(nod.getContenu().get(0)) + HTML.SautLigne();
|
||||
if(!nod.getContenu().isEmpty()) if(nod.getNodes().size()>0) code = code + HTML.Paragraph_classp6(nod.getContenu().get(0)) + HTML.SautLigne();
|
||||
|
||||
code = code + HTML.TableEntete(); //ajoute l'entête
|
||||
|
||||
|
@ -248,25 +243,16 @@ public class HTML {
|
|||
|
||||
code = code + HTML.Table(Tst, Key, valueStudent, valueSujet, niveau);
|
||||
}else {
|
||||
|
||||
code = addSautEtTitres(code,nod.getNodes().get(k));
|
||||
|
||||
|
||||
if(nod.getNodes().get(k).getAttributs().get("titre")!=null) if(!nod.getNodes().get(k).getAttributs().get("titre").isEmpty()){
|
||||
code = code + HTML.SautLigne() + HTML.H2(nod.getNodes().get(k).getAttributs().get("titre"))
|
||||
+ HTML.SautLigne();
|
||||
}else {
|
||||
code = code + HTML.SautLigne();
|
||||
}
|
||||
|
||||
|
||||
if(nod.getNodes().get(k).getAttributs().get("saut")!=null) if(nod.getNodes().get(k).getAttributs().get("saut").equals("true")) {
|
||||
code = code + HTML.SautLigne();
|
||||
}
|
||||
|
||||
if(!nod.getContenu().isEmpty()) code = code + HTML.Paragraph_classp6(nod.getContenu().get(0)) + HTML.SautLigne();
|
||||
|
||||
for(int l = 0 ; l < nod.getNodes().get(k).getNodes().size() ; l++) {
|
||||
if(!nod.getNodes().get(k).getNodes().get(l).getNomElt().equals("saut")){
|
||||
String Tst = nod.getNodes().get(k).getNodes().get(l).getAttributs().get("resultat");
|
||||
// String Key = outils.Traduction(nod.getNodes().get(k).getNodes().get(l).getAttributs().get("elt") + " " + outils.withoutCodeAndPoint(nod.getNodes().get(k).getNodes().get(l).getAttributs().get("attribut")));
|
||||
|
||||
String Key2 = outils.traduction.get(nod.getNodes().get(k).getNodes().get(l).getAttributs().get("elt") + " " + outils.withoutCodeAndPoint(nod.getNodes().get(k).getNodes().get(l).getAttributs().get("attribut")));
|
||||
if(Key2==null) Key2 = nod.getNodes().get(k).getNodes().get(l).getAttributs().get("elt") + " " + outils.withoutCodeAndPoint(nod.getNodes().get(k).getNodes().get(l).getAttributs().get("attribut"));
|
||||
String valueStudent = nod.getNodes().get(k).getNodes().get(l).getAttributs().get("valueStudent");
|
||||
|
@ -275,9 +261,7 @@ public class HTML {
|
|||
|
||||
code = code + HTML.Table(Tst, Key2, valueStudent, valueSujet, niveau);
|
||||
}else {
|
||||
if(nod.getNodes().get(k).getNodes().get(l).getAttributs().get("titre")!=null) code = code + HTML.SautLigneOnduleBleu(nod.getNodes().get(k).getNodes().get(l).getAttributs().get("titre"));
|
||||
if(nod.getNodes().get(k).getNodes().get(l).getAttributs().get("titre1")!=null) code = code + HTML.SautLigneOnduleBleu(nod.getNodes().get(k).getNodes().get(l).getAttributs().get("titre1"));
|
||||
if(nod.getNodes().get(k).getNodes().get(l).getAttributs().get("titre2")!=null) code = code + HTML.SautP8(nod.getNodes().get(k).getNodes().get(l).getAttributs().get("titre2"));
|
||||
code = addSautEtTitres(code,nod.getNodes().get(k).getNodes().get(l));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -292,6 +276,27 @@ public class HTML {
|
|||
}
|
||||
|
||||
|
||||
private static String addSautEtTitres(String code, node nodeAna) {
|
||||
if(nodeAna.getNomElt().equals("saut")) {
|
||||
code = code + HTML.SautLigne();
|
||||
}
|
||||
if(nodeAna.getAttributs().get("titre")!=null) if(!nodeAna.getAttributs().get("titre").isEmpty()){
|
||||
if(nodeAna.getAttributs().get("id")!=null) code = code + HTML.SautLigne()+ HTML.H1(nodeAna.getAttributs().get("titre"),nodeAna.getAttributs().get("id")) + HTML.SautLigne(); ;
|
||||
if(nodeAna.getAttributs().get("id")==null) code = code + HTML.SautLigne()+ HTML.H1(nodeAna.getAttributs().get("titre")) + HTML.SautLigne(); ;
|
||||
}
|
||||
if(nodeAna.getAttributs().get("titre1")!=null) if(!nodeAna.getAttributs().get("titre1").isEmpty()){
|
||||
code = code + HTML.SautLigne() + HTML.H2(nodeAna.getAttributs().get("titre1")) + HTML.SautLigne(); ;
|
||||
}
|
||||
if(nodeAna.getAttributs().get("titre2")!=null) if(!nodeAna.getAttributs().get("titre2").isEmpty()){
|
||||
code = code + HTML.SautLigne() + HTML.SautLigneOnduleBleu(nodeAna.getAttributs().get("titre2")) + HTML.SautLigne(); ;
|
||||
}
|
||||
if(nodeAna.getAttributs().get("titre3")!=null) if(!nodeAna.getAttributs().get("titre3").isEmpty()){
|
||||
code = code + HTML.SautLigne() + HTML.SautP8(nodeAna.getAttributs().get("titre3")) + HTML.SautLigne(); ;
|
||||
}
|
||||
return code;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Table correct pour application des styles
|
||||
public static String TableApplStyle(String NomStyle,ArrayList<String> T, ArrayList<String> S, boolean erreur) {
|
||||
|
@ -411,7 +416,10 @@ public class HTML {
|
|||
"";
|
||||
}
|
||||
|
||||
// image de la progression
|
||||
/**
|
||||
* Image SVG de la progression
|
||||
* @return
|
||||
*/
|
||||
public static String imgProgression() {
|
||||
return "<svg\r\n" +
|
||||
" xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\r\n" +
|
||||
|
@ -2494,7 +2502,11 @@ public class HTML {
|
|||
" </g>\r\n" +
|
||||
"</svg>";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Image SVG de la note A.
|
||||
* @return
|
||||
*/
|
||||
public static String NoteA( ) {
|
||||
return "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n"
|
||||
+ "<!-- Created with Inkscape (http://www.inkscape.org/) -->\r\n"
|
||||
|
@ -2838,6 +2850,10 @@ public class HTML {
|
|||
+ "</svg>\r\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Image SVG de la note B
|
||||
* @return
|
||||
*/
|
||||
public static String NoteB() {
|
||||
return "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n"
|
||||
+ "<!-- Created with Inkscape (http://www.inkscape.org/) -->\r\n"
|
||||
|
@ -3164,6 +3180,10 @@ public class HTML {
|
|||
+ "</svg>\r\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Image SVG de la note C
|
||||
* @return
|
||||
*/
|
||||
public static String NoteC() {
|
||||
return "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n"
|
||||
+ "<!-- Created with Inkscape (http://www.inkscape.org/) -->\r\n"
|
||||
|
@ -5406,6 +5426,10 @@ public class HTML {
|
|||
+ "</svg>\r\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Image SVG de la note D
|
||||
* @return
|
||||
*/
|
||||
public static String NoteD() {
|
||||
return "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n"
|
||||
+ "<!-- Created with Inkscape (http://www.inkscape.org/) -->\r\n"
|
||||
|
@ -5520,6 +5544,10 @@ public class HTML {
|
|||
+ "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Image SVG de la note E
|
||||
* @return
|
||||
*/
|
||||
public static String NoteE() {
|
||||
return "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n"
|
||||
+ "<!-- Created with Inkscape (http://www.inkscape.org/) -->\r\n"
|
||||
|
@ -5610,7 +5638,10 @@ public class HTML {
|
|||
+ "";
|
||||
}
|
||||
|
||||
// image du bouton interrogation
|
||||
/**
|
||||
* Image SVG Interoorgation
|
||||
* @return
|
||||
*/
|
||||
public static String imgInterogation() {
|
||||
return "<svg\r\n"
|
||||
+ " width=\"5.2916665mm\"\r\n"
|
||||
|
@ -5689,91 +5720,72 @@ public class HTML {
|
|||
* Retourne l'entête et les styles CSS du formulaire
|
||||
* @return
|
||||
*/
|
||||
public static String getHTMLenteteEtCssFormulaireHTML() {
|
||||
Date aujourdhui = new Date();
|
||||
DateFormat mediumDateFormat = DateFormat.getDateTimeInstance(DateFormat.MEDIUM,DateFormat.MEDIUM);
|
||||
|
||||
return "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\r"
|
||||
+ "<html>\r"
|
||||
+ "<head>\r"
|
||||
+ "<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\"/>\r"
|
||||
+ "<title>Analyse mise en page d'un texte long</title>\r"
|
||||
|
||||
+ "<meta name=\"generator\" content=\"AnalyseWriter V1.0\"/>"
|
||||
+ "<meta name=\"author\" content=\"Pablo Rodriguez\"/>"
|
||||
+ "<meta name=\"created\" content=\""+ mediumDateFormat.format(aujourdhui) +"\"/>"
|
||||
+ "<meta name=\"changedby\" content=\"Pablo Rodriguez\"/>"
|
||||
+ "<meta name=\"changed\" content=\"" + mediumDateFormat.format(aujourdhui) + "\"/>"
|
||||
|
||||
+"<style type=\"text/css\">"
|
||||
public static String getStyleCSS() {
|
||||
// Date aujourdhui = new Date();
|
||||
// DateFormat mediumDateFormat = DateFormat.getDateTimeInstance(DateFormat.MEDIUM,DateFormat.MEDIUM);
|
||||
return "\r<style type=\"text/css\">\r"
|
||||
+ "p.pablo { margin-bottom: 0.25cm; line-height: 100%; background: transparent; margin-left: 1cm; }"
|
||||
+ ".header {background-color: #f1f1f1;padding: 30px;text-align:center;}"
|
||||
+ "h1 { margin-bottom: 0.25cm; background: transparent;}"
|
||||
+ "h2 {color: blue;font-size:22pt;margin-bottom: 0cm; margin-top: 0cm; line-height: 110%; background: transparent; margin-left: 20pt; margin-right: 10px; text-decoration: underline overline;}"
|
||||
+ "h3 {font-size:18pt;margin-bottom: 0cm; margin-top: 0cm; line-height: 110%; background: transparent; margin-left: 20pt;}"
|
||||
+ "header.h1.western { font-family: \"Arial\"; font-size: 18pt; font-weight: bold; backgroung: #adff2f;}"
|
||||
+ ".header p {color:blue; font-size:30px;}"
|
||||
+ ".triche {background: #AA0000;padding-top: 5px;padding-right: 5px;padding-bottom: 5px;padding-left: 5px;width=80%;margin-top:18px; box-shadow: 5px 10px 18px #800000;}"
|
||||
+ ".triche p {color:white; font-size:16px;margin-left:10px;margin-bottom:6px;margin-top:6px}"
|
||||
+ ".header h4 {text-align:left;font-family: \"Arial\"; font-size: 12pt; font-weight: bold; line-height: 110%;}"
|
||||
+ "h4.western { font-family: \"Arial\"; font-size: 14pt; font-style: italic; font-weight: bold; line-height: 40%}"
|
||||
+ "a:link { color: #000080; so-language: zxx; text-decoration: underline }"
|
||||
+ "a:visited { color: #800000; so-language: zxx; text-decoration: underline }"
|
||||
+ "a:link { color: #000099; so-language: zxx; text-decoration: underline; margin-left: 10px; }"
|
||||
+ "a:visited { color: #99000; so-language: zxx; text-decoration: underline; margin-left: 10px; }"
|
||||
+ "hr { display: block; margin-top: 0.5em; margin-bottom: 8em; margin-left: 2em; margin-right: 2em; border-style: inset; border-width: 4px;}"
|
||||
+ "spanpablo { float: right; width: 8em; font-size: 250%; font-family: algerian, courier; line-height: 80%; margin-right: 1%; color: red; text-align: center}"
|
||||
+ "p.p1{margin-bottom: 0cm; margin-top: 0cm; line-height: 100%; background: transparent; margin-left: 0cm; white-space: pre;}"
|
||||
+ "p.p8{font-size:14pt;margin-bottom: 0cm; margin-top: 0cm; line-height: 110%; background: transparent; margin-left: 8pt; margin-right: 10px;}"
|
||||
+ "p.p9{font-size:16pt;margin-bottom: 12px;text-align: left; margin-top: 0cm; line-height: 110%; background: transparent; margin-left: 40pt; margin-right: 0cm;text-decoration: underline overline wavy blue;text-shadow: 0px 1px #101010;}"
|
||||
+ "p.p10{font-size:12pt;margin-bottom: 12px;text-align: left; margin-top: 0cm; line-height: 110%; background: transparent; margin-left: 30pt; margin-right: 0cm;text-decoration: underline overline wavy red;}"
|
||||
+ ".commentaire{margin-left: 0px; margin-bottom: 24px; margin-top: 24px;font-size:1.4rem}"
|
||||
+ "p.p2{margin-left: 0px; margin-bottom: 0cm; margin-top: 4px; line-height: 115%}"
|
||||
+ "p.p3{margin-left: 20px; line-height: 100%; border: 1px solid black; background-color: lightcyan; margin-right: 10px; }"
|
||||
+ "p.p4{margin-left: 0px; margin-bottom: 0cm; margin-top: 4px; margin-right: 4px; line-height: 115%; background: darkblue; color:white; font-size: 20px; white-space: pre;}"
|
||||
+ "p.p5{margin-left: 80px; margin-bottom: 0cm; margin-top: 4px; margin-right: 80px; line-height: 115%; background: red; color:white; font-size: 20px;}"
|
||||
+ "p.p6{margin-left: 0px; margin-bottom: 0cm; margin-top: 4px; margin-right: 4px; line-height: 115%; background: beige; color:darkcyan; font-size: 20px; white-space: pre;}"
|
||||
+ "p.p6{margin-left: 80px; margin-bottom: 0cm; margin-top: 4px; margin-right: 80px; line-height: 115%; background: beige; color:darkcyan; font-size: 20px;}"
|
||||
+ "p.p7{margin-left: 80px; margin-bottom: 0cm; margin-top: 4px; margin-right: 80px; line-height: 115%; background: #7FFF00; font-size: 20px;}"
|
||||
+ "#navbar {overflow: hidden;background-color: #333;width:100%;box-shadow: 5px 10px 8px #888888;}"
|
||||
+ "#navbar a {float: left;display: block;color: #f2f2f2;text-align: center;padding: 14px 16px;text-decoration: none;font-size: 17px;}"
|
||||
+ "#navbar a:hover {background-color: #ddd;color: black;}"
|
||||
+ "#navbar a.active {background-color: #4CAF50;color: white;}"
|
||||
+ "#navbar a.active2 {background-color: #FF8050;color: white;}"
|
||||
+ "#navbar a.active {background-color: #4CAF50;color: white;margin-left:0px;}"
|
||||
+ "#navbar a.active2 {background-color: #FF8050;color: white;margin-left:0px;}"
|
||||
+ "#navbar a.active3 {background-color: #5080FF;color: white;margin-left:0px;}"
|
||||
+ "div.sticky {position: fixed;top: 0;width: 100%;}"
|
||||
+ ".sticky + .content {padding-top: 60px;}"
|
||||
+ "#navbar2 {overflow: hidden; background-color: #333;}"
|
||||
+ "#navbar2 a {float: left; font-size: 18px; color: white; text-align: center; padding: 16px 18px; text-decoration: none;}"
|
||||
+ ".dropdown {position: relative; display: inline-block;}"
|
||||
+ ".dropbtn:hover, .dropbtn:focus { background-color: #3e8e41;}"
|
||||
+ ".dropdown-content {display: none; position: absolute; background-color: #f9f9f9; min-width: 160px; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);}"
|
||||
+ ".dropdown-content a {color: black; padding: 12px 16px; text-decoration: none; display: block;}"
|
||||
+ ".dropdown-content a:hover {background-color: #f1f1f1}"
|
||||
+".show {display:block;}"
|
||||
+ "#myDropdown {background-color: #508050;color: black;}"
|
||||
+ ".menu-box{display: none;}"
|
||||
+ ".menuopen{display: block;}"
|
||||
+ ".tooltip {position: relative;display: inline-block;border-bottom: 1px dotted black;}"
|
||||
+ ".tooltip .tooltiptext {visibility: hidden;background-color: black;color: #fff;text-align: center;border-radius: 6px;padding: 5px 0;position: absolute;z-index: 1;margin-left: -30px; width: 120px;top: 100%;left: 10%;}"
|
||||
+ ".tooltip .tooltiptext {visibility: hidden;background-color: black;color: #fff;text-align: center;border-radius: 6px;padding: 5px 0;position: absolute;z-index: 1;margin-left: -30px; width: 260px;top: 100%;left: 10%;}"
|
||||
+ ".tooltip .tooltiptext::after {content: \" \";position: absolute;bottom: 100%;left: 50%;margin-left: -5px;border-width: 5px;border-style: solid;border-color: transparent transparent black transparent;}"
|
||||
+ ".tooltip:hover .tooltiptext {visibility: visible;}"
|
||||
+ ".tooltip1 {position: relative;display: inline-block;border-bottom: 1px dotted black;}"
|
||||
+ ".tooltip1 .tooltiptext1 {visibility: hidden;background-color: #0000CC;color: #fff;text-align: left;border-radius: 4px;padding: 10px;position: absolute;z-index: 1;margin-left: -40px; width: 280px;top: 100%;left: 10%;}"
|
||||
+ ".tooltip1 .tooltiptext1::after {content: \" \";position: absolute;bottom: 100%;left: 50%;margin-left: -5px;border-width: 5px;border-style: solid;border-color: transparent transparent #0000CC transparent;}"
|
||||
+ ".tooltip1:hover .tooltiptext1 {visibility: visible;}"
|
||||
+ ".tooltip2 {position: relative;display: inline-block;border-bottom: 1px dotted black;}"
|
||||
+ ".tooltip2 .tooltiptext2 {visibility: hidden;background-color: black;color: #fff;text-align: center;border-radius: 6px;padding: 5px 0;position: absolute;z-index: 1;margin-top: -15px; width: 240px;left: 110%;}"
|
||||
+ ".tooltip2 .tooltiptext2::after {content: \" \";position: absolute;top: 50%;right: 100%;margin-top: -5px;border-width: 5px;border-style: solid;border-color: transparent black transparent transparent;}"
|
||||
+ ".tooltip2 .tooltiptext2 {visibility: hidden;background-color: black;color: #fff;text-align: left;border-radius: 8px;padding: 8px;position: absolute;z-index: 1;margin-left: -40px; width: 340px;top: 100%;left: 10%;}"
|
||||
+ ".tooltip2 .tooltiptext2::after {content: \" \";position: absolute;bottom: 100%;left: 50%;margin-left: -5px;border-width: 5px;border-style: solid;border-color: transparent transparent black transparent;}"
|
||||
+ ".tooltip2:hover .tooltiptext2 {visibility: visible;}"
|
||||
+ "</style>"
|
||||
|
||||
+"</head>\r";
|
||||
+ ".footer {position: fixed;left: 0;bottom: 0;width: 100%;background-color: white;color: black;text-align: center;}"
|
||||
+"\r</style>\r";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retourne l'ouverture de la balise body
|
||||
* @return
|
||||
*/
|
||||
public static String getHTMLdebutBody(double note, String noteFrom, String NumSujet, String dossier, double proportioncorrect, String progression) {
|
||||
DecimalFormat df1 = new DecimalFormat("##.##");
|
||||
Date aujourdhui = new Date();
|
||||
DateFormat mediumDateFormat = DateFormat.getDateTimeInstance(DateFormat.MEDIUM,DateFormat.MEDIUM);
|
||||
|
||||
return "<body lang=\"fr-FR\" link=\"#000080\" vlink=\"#800000\" dir=\"ltr\">\r"
|
||||
+"<div class=\"header\">"
|
||||
+"<h1 id=\"#top\" class=\"western\" align=\"center\" style=\"margin-left: 1cm; margin-right: 1cm; border: 2.00pt solid #ffffff; padding: 0.4cm 0.1cm; background: #505050\">\r\n" +
|
||||
"<font color=\"#ffffff\" size=\"6\" style=\"font-size: 26pt\">Feedback - Analyse LibreOffice Writer<br/>"+HTML.imgLogos()+"</font></h1>\r"
|
||||
+"<p><spanpablo>" + df1.format(note) + " / " + noteFrom +"<br/><span style=\"color:blue; font-size:30px\">Sujet "+ NumSujet +"</span></spanpablo></p>\r"
|
||||
+"<h4>Date d'analyse : <font color=\"#0000ff\">"+ mediumDateFormat.format(aujourdhui) + "</font><br/>"
|
||||
+"<div class=\"tooltip2\">Dossier étudiant : <font color=\"#0000ff\"><b>"+ dossier + "</b></font><span class=\"tooltiptext2\">Dossier téléchargé depuis la plateforme Moodle.</span></div><br/>"
|
||||
+"Analyse MEPTL : sujet "+ NumSujet + "<br/>\r"
|
||||
+"Méthode : <div class=\"tooltip\"><font color=\"#0000ff\">Progression " + progression + "</font><span class=\"tooltiptext\">Explication<br/>"+ HTML.imgProgression() +"</span></div> - Proportion correcte du fichier analysé : " + Math.floor(proportioncorrect*10000)/100 + "%<br/>"
|
||||
+"<br/><font color=\"#808080\" style=\"font-size: 9pt\"><i>Auteur : P. Rodriguez - Licence GPL v3.0 - Avril 2020</i></font></h4>"
|
||||
+"</div>";
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne la fermeture de la balise body et html
|
||||
* @return
|
||||
*/
|
||||
public static String getHTMLfinBodyHTML() {
|
||||
return "</body>\r</html>";
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne le code HTML du menu
|
||||
|
@ -5784,7 +5796,7 @@ public class HTML {
|
|||
|
||||
String codeHTMLMenu= "<div id=\"navbar\" onclick=\"toggleMenu()\"><a class=\"active\" href=\"#top\">Note</a>";
|
||||
for(int i =0 ; i < items.size(); i++) {
|
||||
codeHTMLMenu = codeHTMLMenu + "<a class=\"active3\" href=\"#"+ items.get(i).getAttributs().get("id") + "\">" + items.get(i).getAttributs().get("titre") + "</a>";
|
||||
codeHTMLMenu = codeHTMLMenu + "<a class=\"active3\" href=\""+ items.get(i).getAttributs().get("id") + "\">" + items.get(i).getAttributs().get("titre") + "</a>";
|
||||
}
|
||||
codeHTMLMenu = codeHTMLMenu + "</div>";
|
||||
|
||||
|
|
|
@ -28,10 +28,16 @@ public class analyseLesNodesEnfants {
|
|||
nodEnfantSujet = nodSujet.getNodes().get(j);
|
||||
String nameNode = nodEnfantSujet.getNomElt();
|
||||
|
||||
|
||||
//*****************************
|
||||
//** Ajoute un saut de ligne **
|
||||
//*****************************
|
||||
PourAnalyse = meptl.addSaut(nodEnfantSujet, PourAnalyse);
|
||||
|
||||
//********************************
|
||||
//** Ajoute des sauts et titres **
|
||||
//********************************
|
||||
PourAnalyse = meptl.addNodeSautTitre(nodEnfantSujet, PourAnalyse); // ajoute des saut de page s'il y a des sauts avec des titres
|
||||
PourAnalyse = meptl.addNodeSautTitre(nodEnfantSujet, PourAnalyse);
|
||||
|
||||
//***************************************************
|
||||
//** Recherche le node correspondant de l'étudiant **
|
||||
|
@ -55,7 +61,7 @@ public class analyseLesNodesEnfants {
|
|||
//**************************************************************
|
||||
//** Analyse attribut et contenu du node enfant de l'étudiant **
|
||||
//**************************************************************
|
||||
PourAnalyse = meptl.analyseLesAttributEtContenuDuNode(nodStudentCorrespondantAuNodSujet, nodEnfantSujet, PourAnalyse, nomDuNodePourAnalyse,nameNode);
|
||||
PourAnalyse = meptl.evalLesAttributEtContenuDuNode(nodStudentCorrespondantAuNodSujet, nodEnfantSujet, PourAnalyse, nomDuNodePourAnalyse,nameNode);
|
||||
|
||||
//*******************************
|
||||
//** méthode analyseStyle=true **
|
||||
|
@ -114,10 +120,21 @@ public class analyseLesNodesEnfants {
|
|||
//ajoute les valeurs par défaut.
|
||||
if(StyleParagraphStudent!=null) StyleParagraphStudent = meptl.ajouteValeurParDefautAuStyleParagraph(nodStudentParagraphs , StyleParagraphStudent);
|
||||
|
||||
//*****************************
|
||||
//** Ajoute un saut de ligne **
|
||||
//*****************************
|
||||
PourAnalyse = meptl.addSaut(StyleParagraphSujet, PourAnalyse);
|
||||
|
||||
//********************************
|
||||
//** Ajoute des sauts et titres **
|
||||
//********************************
|
||||
PourAnalyse = meptl.addNodeSautTitre(StyleParagraphSujet, PourAnalyse);
|
||||
|
||||
|
||||
//**************************************************************
|
||||
//** Analyse attribut et contenu du node enfant de l'étudiant **
|
||||
//**************************************************************
|
||||
PourAnalyse = meptl.analyseLesAttributAnalyseStyle(StyleParagraphStudent, StyleParagraphSujet, PourAnalyse, nomDuNodePourAnalyse,"style:style");
|
||||
PourAnalyse = meptl.evalLesAttributAnalyseStyle(StyleParagraphStudent, StyleParagraphSujet, PourAnalyse, nomDuNodePourAnalyse,"style:style");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -47,35 +47,41 @@ public class analyseLesNodesPrincipaux {
|
|||
biblio.setNomElt("biblio");
|
||||
biblio.getAttributs().put("namebiblio", nomDeLaBiblio);
|
||||
|
||||
if(nodSujetBibio.getAttributs().get("titre")!=null) {
|
||||
biblio.getAttributs().put("titre", nodSujetBibio.getAttributs().get("titre"));
|
||||
}
|
||||
//*****************************
|
||||
//** Ajoute un saut de ligne **
|
||||
//*****************************
|
||||
biblio = meptl.addSaut(nodSujetBibio,biblio);
|
||||
|
||||
//*********************
|
||||
//** Ajoute un titre **
|
||||
//*********************
|
||||
biblio = meptl.addNodeSautTitre(nodSujetBibio,biblio);
|
||||
|
||||
|
||||
String TitreTable = outils.withoutCodeAndPoint(nodSujetBibio.retourneFirstEnfantsByName("text:index-title").retourneLesContenusEnfants(""));
|
||||
|
||||
node nodSujet = a.retourneFirstNodeParagrapheContain(a.retourneNames(nodSujetBiblio, "text:index-body"), TitreTable);
|
||||
node nodStudent = a.retourneFirstNodeParagrapheContain(a.retourneNames(nodStudentBiblio, "text:index-body"), TitreTable);
|
||||
|
||||
biblio = meptl.analyseLesAttributEtContenuDuNode(nodStudent, nodSujet, biblio, "ana:biblio", nodSujet.getNomElt());
|
||||
biblio = meptl.evalLesAttributEtContenuDuNode(nodStudent, nodSujet, biblio, "ana:biblio", nodSujet.getNomElt());
|
||||
|
||||
for(int j =0 ; j < nodSujet.getNodes().size();j++) {
|
||||
if(nodStudent!=null) {
|
||||
if(j<nodStudent.getNodes().size()) {
|
||||
biblio = meptl.analyseLesAttributEtContenuDuNode(nodStudent.getNodes().get(j), nodSujet.getNodes().get(j), biblio, "ana:biblio", nodSujet.getNodes().get(j).getNomElt());
|
||||
biblio = meptl.evalLesAttributEtContenuDuNode(nodStudent.getNodes().get(j), nodSujet.getNodes().get(j), biblio, "ana:biblio", nodSujet.getNodes().get(j).getNomElt());
|
||||
for(int k=0; k<nodSujet.getNodes().get(j).getNodes().size();k++) {
|
||||
if(k<nodStudent.getNodes().get(j).getNodes().size()) {
|
||||
biblio = meptl.analyseLesAttributEtContenuDuNode(nodStudent.getNodes().get(j).getNodes().get(k), nodSujet.getNodes().get(j).getNodes().get(k), biblio, "ana:biblio", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
|
||||
biblio = meptl.evalLesAttributEtContenuDuNode(nodStudent.getNodes().get(j).getNodes().get(k), nodSujet.getNodes().get(j).getNodes().get(k), biblio, "ana:biblio", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
|
||||
}else {
|
||||
biblio = meptl.analyseLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j).getNodes().get(k), biblio, "ana:biblio", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
|
||||
biblio = meptl.evalLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j).getNodes().get(k), biblio, "ana:biblio", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
|
||||
}
|
||||
}
|
||||
}else {
|
||||
biblio = meptl.analyseLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j), biblio, "ana:biblio", nodSujet.getNodes().get(j).getNomElt());
|
||||
biblio = meptl.evalLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j), biblio, "ana:biblio", nodSujet.getNodes().get(j).getNomElt());
|
||||
}
|
||||
}else {
|
||||
biblio = meptl.analyseLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j), biblio, "ana:biblio", nodSujet.getNodes().get(j).getNomElt());
|
||||
biblio = meptl.evalLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j), biblio, "ana:biblio", nodSujet.getNodes().get(j).getNomElt());
|
||||
for(int k=0; k<nodSujet.getNodes().get(j).getNodes().size();k++) {
|
||||
biblio = meptl.analyseLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j).getNodes().get(k), biblio, "ana:biblio", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
|
||||
biblio = meptl.evalLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j).getNodes().get(k), biblio, "ana:biblio", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -128,6 +134,7 @@ public class analyseLesNodesPrincipaux {
|
|||
//*******************************************************************
|
||||
for(int i = 0 ; i < nodSujetNumerotation.getNodes().size(); i++) {
|
||||
if(nodSujetNumerotation.getNodes().get(i).getNomElt().equals("text:outline-level-style")) {
|
||||
node numerotationSujet = nodSujetNumerotation.getNodes().get(i);
|
||||
int pointDebut = outils.getPointsClass();
|
||||
int pointTotalDebut = outils.getPointTotal();
|
||||
String levelnumrotation = outils.withoutCodeAndPoint(nodSujetNumerotation.getNodes().get(i).getAttributs().get("text:level"));
|
||||
|
@ -136,13 +143,26 @@ public class analyseLesNodesPrincipaux {
|
|||
numerotation.getAttributs().put("level", levelnumrotation);
|
||||
if(nodSujetNumerotation.getNodes().get(i).getAttributs().get("titre")!=null) numerotation.getAttributs().put("titre", nodSujetNumerotation.getNodes().get(i).getAttributs().get("titre"));
|
||||
|
||||
//*****************************
|
||||
//** Ajoute un saut de ligne **
|
||||
//*****************************
|
||||
numerotation = meptl.addSaut(numerotationSujet,numerotation);
|
||||
|
||||
//*********************
|
||||
//** Ajoute un titre **
|
||||
//*********************
|
||||
numerotation = meptl.addNodeSautTitre(numerotationSujet,numerotation);
|
||||
|
||||
//*******************************
|
||||
//** Recherche le node Student **
|
||||
//*******************************
|
||||
node numerotationStudent = a.retourneFirstNodeByNameAttributValue(nodStudentNumerotation, "text:outline-level-style", "text:level", levelnumrotation);
|
||||
node numerotationSujet = nodSujetNumerotation.getNodes().get(i);
|
||||
|
||||
|
||||
//********************************************
|
||||
//** analyse les attributs des nodes <page> **
|
||||
//********************************************
|
||||
numerotation = meptl.analyseLesAttributEtContenuDuNode(numerotationStudent, numerotationSujet, numerotation, "ana:numerotation",numerotationSujet.getNomElt());
|
||||
numerotation = meptl.evalLesAttributEtContenuDuNode(numerotationStudent, numerotationSujet, numerotation, "ana:numerotation",numerotationSujet.getNomElt());
|
||||
|
||||
//************************************
|
||||
//** analyse tous les nodes enfants **
|
||||
|
@ -209,6 +229,11 @@ public class analyseLesNodesPrincipaux {
|
|||
frame.setNomElt("frame");
|
||||
frame.getAttributs().put("nameframe", nomDuFrame);
|
||||
|
||||
//*****************************
|
||||
//** Ajoute un saut de ligne **
|
||||
//*****************************
|
||||
frame = meptl.addSaut(frameSujet,frame);
|
||||
|
||||
//*********************
|
||||
//** Ajoute un titre **
|
||||
//*********************
|
||||
|
@ -222,7 +247,7 @@ public class analyseLesNodesPrincipaux {
|
|||
//********************************************
|
||||
//** analyse les attributs des nodes <page> **
|
||||
//********************************************
|
||||
frame = meptl.analyseLesAttributEtContenuDuNode(frameStudent, frameSujet, frame, "ana:frame",frameSujet.getNomElt());
|
||||
frame = meptl.evalLesAttributEtContenuDuNode(frameStudent, frameSujet, frame, "ana:frame",frameSujet.getNomElt());
|
||||
|
||||
//************************************
|
||||
//** analyse tous les nodes enfants **
|
||||
|
@ -282,6 +307,11 @@ public class analyseLesNodesPrincipaux {
|
|||
node nodSujet = sujet.get(i);
|
||||
String namenode = nodSujet.getNomElt();
|
||||
|
||||
//*****************************
|
||||
//** Ajoute un saut de ligne **
|
||||
//*****************************
|
||||
nodmeta = meptl.addSaut(nodSujet,nodmeta);
|
||||
|
||||
//*********************
|
||||
//** Ajoute un titre **
|
||||
//*********************
|
||||
|
@ -299,7 +329,7 @@ public class analyseLesNodesPrincipaux {
|
|||
//** Recherche le node Student **
|
||||
//*******************************
|
||||
node nodStudent = a.retourneFirstNodeByNameAttributContainsValueNetTexte(nodStudentMeta, namenode,k,outils.withoutCodeAndPointPourRechercheContenuExact(valueOfAttribut));
|
||||
nodmeta = meptl.analyseLesAttributEtContenuDuNode(nodStudent, nodSujet, nodmeta, "ana:meta", namenode);
|
||||
nodmeta = meptl.evalLesAttributEtContenuDuNode(nodStudent, nodSujet, nodmeta, "ana:meta", namenode);
|
||||
}
|
||||
}
|
||||
}else {
|
||||
|
@ -310,12 +340,12 @@ public class analyseLesNodesPrincipaux {
|
|||
|
||||
if(NStudent!=null) {
|
||||
if(!NStudent.isEmpty()) {
|
||||
nodmeta = meptl.analyseLesAttributEtContenuDuNode(NStudent.get(0), sujet.get(i), nodmeta, "ana:meta", namenode);
|
||||
nodmeta = meptl.evalLesAttributEtContenuDuNode(NStudent.get(0), sujet.get(i), nodmeta, "ana:meta", namenode);
|
||||
}else {
|
||||
nodmeta = meptl.analyseLesAttributEtContenuDuNode(null, sujet.get(i), nodmeta, "ana:meta", namenode);
|
||||
nodmeta = meptl.evalLesAttributEtContenuDuNode(null, sujet.get(i), nodmeta, "ana:meta", namenode);
|
||||
}
|
||||
}else {
|
||||
nodmeta = meptl.analyseLesAttributEtContenuDuNode(null, sujet.get(i), nodmeta, "ana:meta", namenode);
|
||||
nodmeta = meptl.evalLesAttributEtContenuDuNode(null, sujet.get(i), nodmeta, "ana:meta", namenode);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -361,7 +391,7 @@ public class analyseLesNodesPrincipaux {
|
|||
//*******************************************************
|
||||
//** Parcours les nodes enfants du node <text:section> **
|
||||
//*******************************************************
|
||||
for(int i = 0 ; i < nodSujetSections.getNodes().size(); i++) { //niveau 1
|
||||
for(int i = 0 ; i < nodSujetSections.getNodes().size(); i++) {
|
||||
if(nodSujetSections.getNodes().get(i).getNomElt().equals("text:section")) {
|
||||
node sectionSujet = nodSujetSections.getNodes().get(i);
|
||||
int pointDebut = outils.getPointsClass();
|
||||
|
@ -372,6 +402,11 @@ public class analyseLesNodesPrincipaux {
|
|||
section.setNomElt("section");
|
||||
section.getAttributs().put("namesection", nomDeLaSection);
|
||||
|
||||
//*****************************
|
||||
//** Ajoute un saut de ligne **
|
||||
//*****************************
|
||||
section = meptl.addSaut(sectionSujet,section);
|
||||
|
||||
//*********************
|
||||
//** Ajoute un titre **
|
||||
//*********************
|
||||
|
@ -385,7 +420,7 @@ public class analyseLesNodesPrincipaux {
|
|||
//***********************************************
|
||||
//** analyse les attributs des nodes <section> **
|
||||
//***********************************************
|
||||
section = meptl.analyseLesAttributEtContenuDuNode(sectionStudent, sectionSujet, section, "ana:section",sectionSujet.getNomElt());
|
||||
section = meptl.evalLesAttributEtContenuDuNode(sectionStudent, sectionSujet, section, "ana:section",sectionSujet.getNomElt());
|
||||
|
||||
//************************************
|
||||
//** analyse tous les nodes enfants **
|
||||
|
@ -493,7 +528,7 @@ public class analyseLesNodesPrincipaux {
|
|||
node nodseq = new node();
|
||||
nodseq.setNomElt("sequences");
|
||||
nodseq.setAttributs(nodSujetSequence.getAttributs());
|
||||
nodseq.setContenu(nodSujetSequence.getContenu()); //ajoute le commantire
|
||||
nodseq.setContenu(nodSujetSequence.getContenu()); //ajoute le commentaire
|
||||
|
||||
//***************************************
|
||||
//** Ajoute l'identifiant pour le menu **
|
||||
|
@ -520,6 +555,11 @@ public class analyseLesNodesPrincipaux {
|
|||
seq.setNomElt("sequence");
|
||||
seq.getAttributs().put("name", nomSequence);
|
||||
|
||||
//*****************************
|
||||
//** Ajoute un saut de ligne **
|
||||
//*****************************
|
||||
seq = meptl.addSaut(seqSujet,seq);
|
||||
|
||||
//*********************
|
||||
//** Ajoute un titre **
|
||||
//*********************
|
||||
|
@ -538,7 +578,7 @@ public class analyseLesNodesPrincipaux {
|
|||
//***********************************************
|
||||
//** analyse les attributs des nodes <section> **
|
||||
//***********************************************
|
||||
seq = meptl.analyseLesAttributEtContenuDuNode(seqStudent, seqSujet, seq, "ana:seq",seqSujet.getNomElt());
|
||||
seq = meptl.evalLesAttributEtContenuDuNode(seqStudent, seqSujet, seq, "ana:seq",seqSujet.getNomElt());
|
||||
|
||||
//****************************************************************
|
||||
//** Insère les attributs des points dans les node de l'analyse **
|
||||
|
@ -588,7 +628,7 @@ public class analyseLesNodesPrincipaux {
|
|||
//******************************************************
|
||||
//** Parcours les nodes enfants du node <table:table> **
|
||||
//******************************************************
|
||||
for(int i = 0 ; i < nodSujetTableaux.getNodes().size(); i++) { //niveau 1
|
||||
for(int i = 0 ; i < nodSujetTableaux.getNodes().size(); i++) {
|
||||
if(nodSujetTableaux.getNodes().get(i).getNomElt().equals("table:table")) {
|
||||
int pointDebut = outils.getPointsClass();
|
||||
int pointTotalDebut = outils.getPointTotal();
|
||||
|
@ -599,6 +639,11 @@ public class analyseLesNodesPrincipaux {
|
|||
tableau.setNomElt("tableau");
|
||||
tableau.getAttributs().put("nametableau", nomDeLaTable);
|
||||
|
||||
//*****************************
|
||||
//** Ajoute un saut de ligne **
|
||||
//*****************************
|
||||
tableau = meptl.addSaut(tableSujet,tableau);
|
||||
|
||||
//*********************
|
||||
//** Ajoute un titre **
|
||||
//*********************
|
||||
|
@ -612,7 +657,7 @@ public class analyseLesNodesPrincipaux {
|
|||
//***************************************************
|
||||
//** analyse les attributs des nodes <table:table> **
|
||||
//***************************************************
|
||||
tableau = meptl.analyseLesAttributEtContenuDuNode(tableauStudent, tableSujet, tableau, "ana:tableau",tableSujet.getNomElt());
|
||||
tableau = meptl.evalLesAttributEtContenuDuNode(tableauStudent, tableSujet, tableau, "ana:tableau",tableSujet.getNomElt());
|
||||
|
||||
//************************************
|
||||
//** analyse tous les nodes enfants **
|
||||
|
@ -713,72 +758,88 @@ public class analyseLesNodesPrincipaux {
|
|||
nodTablesMs.setAttributs(nodSujetTableI.getAttributs());//ajoute tous les attributs du sujet
|
||||
nodTablesMs.setContenu(nodSujetTableI.getContenu());//ajoute le commentaire du sujet
|
||||
|
||||
//ajoute l'identifiant pour le menu
|
||||
//***************************************
|
||||
//** Ajoute l'identifiant pour le menu **
|
||||
//***************************************
|
||||
if(a.retourneFirstNodeByNameAttributValue(nodmenu, "item", "name", "tableillustrations")!=null) {
|
||||
nodTablesMs.getAttributs().put("id", a.retourneFirstNodeByNameAttributValue(nodmenu, "item", "name", "tableillustrations").getAttributs().get("id"));
|
||||
}
|
||||
|
||||
//initialise les points
|
||||
//***************************
|
||||
//** initialise les points **
|
||||
//***************************
|
||||
outils.initiliseLesPoints();
|
||||
|
||||
|
||||
for(int i = 0 ; i < nodSujetTableI.getNodes().size(); i++) {
|
||||
if(nodSujetTableI.getNodes().get(i).getNomElt().equals("text:illustration-index")) {
|
||||
int pointDebut = outils.getPointsClass();
|
||||
int pointTotalDebut = outils.getPointTotal();
|
||||
node table = new node();
|
||||
table.setNomElt("tableillustrations");
|
||||
String TitreTable = outils.withoutCodeAndPoint(nodSujetTableI.getNodes().get(i).retourneFirstEnfantsByName("text:index-title").retourneLesContenusEnfants(""));
|
||||
node nodSujet = a.retourneFirstNodeParagrapheContain(a.retourneNames(nodSujetTableI, "text:index-body"), TitreTable);
|
||||
|
||||
//*****************************
|
||||
//** Ajoute un saut de ligne **
|
||||
//*****************************
|
||||
table = meptl.addSaut(nodSujet,table);
|
||||
|
||||
//*********************
|
||||
//** Ajoute un titre **
|
||||
//*********************
|
||||
if(nodSujetTableI.getNodes().get(i).getAttributs().get("titre")!=null) {
|
||||
String titre = nodSujetTableI.getNodes().get(i).getAttributs().get("titre");
|
||||
if(!titre.isEmpty()) table.getAttributs().put("titre", titre);
|
||||
}
|
||||
table = meptl.addNodeSautTitre(nodSujet,table);
|
||||
|
||||
|
||||
int pointDebut = outils.getPointsClass();
|
||||
int pointTotalDebut = outils.getPointTotal();
|
||||
String TitreTable = outils.withoutCodeAndPoint(nodSujetTableI.getNodes().get(i).retourneFirstEnfantsByName("text:index-title").retourneLesContenusEnfants(""));
|
||||
|
||||
node nodSujet = a.retourneFirstNodeParagrapheContain(a.retourneNames(nodSujetTableI, "text:index-body"), TitreTable);
|
||||
//*******************************
|
||||
//** Recherche le node Student **
|
||||
//*******************************
|
||||
node nodStudent = a.retourneFirstNodeParagrapheContain(a.retourneNames(nodStudentTableI, "text:index-body"), TitreTable);
|
||||
|
||||
table = meptl.analyseLesAttributEtContenuDuNode(nodStudent, nodSujet, table, "ana:tableillustration", nodSujet.getNomElt());
|
||||
//*********************************************
|
||||
//** analyse les attributs des nodes <table> **
|
||||
//*********************************************
|
||||
table = meptl.evalLesAttributEtContenuDuNode(nodStudent, nodSujet, table, "ana:tableillustration", nodSujet.getNomElt());
|
||||
|
||||
//****************************************************************
|
||||
//** Parcours les nodes enfants du node <text:illustration-index> **
|
||||
//****************************************************************
|
||||
for(int j =0 ; j < nodSujet.getNodes().size();j++) {
|
||||
if(nodStudent!=null) {
|
||||
if(j<nodStudent.getNodes().size()) {
|
||||
table = meptl.analyseLesAttributEtContenuDuNode(nodStudent.getNodes().get(j), nodSujet.getNodes().get(j), table, "ana:tableillustration", nodSujet.getNodes().get(j).getNomElt());
|
||||
table = meptl.evalLesAttributEtContenuDuNode(nodStudent.getNodes().get(j), nodSujet.getNodes().get(j), table, "ana:tableillustration", nodSujet.getNodes().get(j).getNomElt());
|
||||
for(int k=0; k<nodSujet.getNodes().get(j).getNodes().size();k++) {
|
||||
if(k<nodStudent.getNodes().get(j).getNodes().size()) {
|
||||
table = meptl.analyseLesAttributEtContenuDuNode(nodStudent.getNodes().get(j).getNodes().get(k), nodSujet.getNodes().get(j).getNodes().get(k), table, "ana:tableillustration", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
|
||||
table = meptl.evalLesAttributEtContenuDuNode(nodStudent.getNodes().get(j).getNodes().get(k), nodSujet.getNodes().get(j).getNodes().get(k), table, "ana:tableillustration", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
|
||||
}else {
|
||||
table = meptl.analyseLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j).getNodes().get(k), table, "ana:tableillustration", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
|
||||
table = meptl.evalLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j).getNodes().get(k), table, "ana:tableillustration", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
|
||||
}
|
||||
}
|
||||
}else {
|
||||
table = meptl.analyseLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j), table, "ana:tableillustration", nodSujet.getNodes().get(j).getNomElt());
|
||||
table = meptl.evalLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j), table, "ana:tableillustration", nodSujet.getNodes().get(j).getNomElt());
|
||||
}
|
||||
}else {
|
||||
table = meptl.analyseLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j), table, "ana:tableillustration", nodSujet.getNodes().get(j).getNomElt());
|
||||
table = meptl.evalLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j), table, "ana:tableillustration", nodSujet.getNodes().get(j).getNomElt());
|
||||
for(int k=0; k<nodSujet.getNodes().get(j).getNodes().size();k++) {
|
||||
table = meptl.analyseLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j).getNodes().get(k), table, "ana:tableillustration", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
|
||||
table = meptl.evalLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j).getNodes().get(k), table, "ana:tableillustration", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//****************************************************************
|
||||
//** Insère les attributs des points dans les node de l'analyse **
|
||||
//****************************************************************
|
||||
table.getAttributs().put("point", String.valueOf(outils.getPointsClass()-pointDebut));
|
||||
table.getAttributs().put("pointTotal", String.valueOf(outils.getPointTotal()-pointTotalDebut));
|
||||
nodTablesMs.getNodes().add(table);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
nodTablesMs.getAttributs().put("pointgagner",String.valueOf(outils.getPointsClass()));
|
||||
nodTablesMs.getAttributs().put("pointtotal",String.valueOf(outils.getPointTotal()));
|
||||
nodTablesMs.getAttributs().put("proportioncorrect",String.valueOf(outils.getProportionCorrect()));
|
||||
nodTablesMs.setClose(true);
|
||||
//****************************************************************
|
||||
//** Insère les attributs des points dans les node de l'analyse **
|
||||
//****************************************************************
|
||||
nodTablesMs.getAttributs().put("pointgagner",String.valueOf(outils.getPointsClass()));
|
||||
nodTablesMs.getAttributs().put("pointtotal",String.valueOf(outils.getPointTotal()));
|
||||
nodTablesMs.getAttributs().put("proportioncorrect",String.valueOf(outils.getProportionCorrect()));
|
||||
nodTablesMs.setClose(true);
|
||||
|
||||
return nodTablesMs;
|
||||
}
|
||||
|
||||
|
@ -796,12 +857,16 @@ public class analyseLesNodesPrincipaux {
|
|||
nodTablesMs.setAttributs(nodSujetTableM.getAttributs());//ajoute tous les attributs du sujet
|
||||
nodTablesMs.setContenu(nodSujetTableM.getContenu());//ajoute le commentaire du sujet
|
||||
|
||||
//ajoute l'identifiant pour le menu
|
||||
//***************************************
|
||||
//** Ajoute l'identifiant pour le menu **
|
||||
//***************************************
|
||||
if(a.retourneFirstNodeByNameAttributValue(nodmenu, "item", "name", "tablematieres")!=null) {
|
||||
nodTablesMs.getAttributs().put("id", a.retourneFirstNodeByNameAttributValue(nodmenu, "item", "name", "tablematieres").getAttributs().get("id"));
|
||||
}
|
||||
|
||||
//initialise les points
|
||||
//***************************
|
||||
//** initialise les points **
|
||||
//***************************
|
||||
outils.initiliseLesPoints();
|
||||
|
||||
|
||||
|
@ -809,59 +874,74 @@ public class analyseLesNodesPrincipaux {
|
|||
if(nodSujetTableM.getNodes().get(i).getNomElt().equals("text:table-of-content")) {
|
||||
node table = new node();
|
||||
table.setNomElt("tablematiere");
|
||||
|
||||
//*********************
|
||||
//** Ajoute un titre **
|
||||
//*********************
|
||||
if(nodSujetTableM.getNodes().get(i).getAttributs().get("titre")!=null) {
|
||||
String titre = nodSujetTableM.getNodes().get(i).getAttributs().get("titre");
|
||||
if(!titre.isEmpty()) table.getAttributs().put("titre", titre);
|
||||
}
|
||||
|
||||
|
||||
int pointDebut = outils.getPointsClass();
|
||||
int pointTotalDebut = outils.getPointTotal();
|
||||
String TitreTable = outils.withoutCodeAndPoint(nodSujetTableM.getNodes().get(i).retourneFirstEnfantsByName("text:index-title").retourneLesContenusEnfants(""));
|
||||
|
||||
node nodSujet = a.retourneFirstNodeParagrapheContain(a.retourneNames(nodSujetTableM, "text:index-body"), TitreTable);
|
||||
node nodStudent = a.retourneFirstNodeParagrapheContain(a.retourneNames(nodStudentTableM, "text:index-body"), TitreTable);
|
||||
|
||||
table = meptl.analyseLesAttributEtContenuDuNode(nodStudent, nodSujet, table, "ana:tablematiere", nodSujet.getNomElt());
|
||||
//*****************************
|
||||
//** Ajoute un saut de ligne **
|
||||
//*****************************
|
||||
table = meptl.addSaut(nodSujet,table);
|
||||
|
||||
//*********************
|
||||
//** Ajoute un titre **
|
||||
//*********************
|
||||
table = meptl.addNodeSautTitre(nodSujet,table);
|
||||
|
||||
//*******************************
|
||||
//** Recherche le node Student **
|
||||
//*******************************
|
||||
node nodStudent = a.retourneFirstNodeParagrapheContain(a.retourneNames(nodStudentTableM, "text:index-body"), TitreTable);
|
||||
|
||||
//*********************************************
|
||||
//** analyse les attributs des nodes <table> **
|
||||
//*********************************************
|
||||
table = meptl.evalLesAttributEtContenuDuNode(nodStudent, nodSujet, table, "ana:tablematiere", nodSujet.getNomElt());
|
||||
|
||||
//****************************************************************
|
||||
//** Parcours les nodes enfants du node <text:table-of-content> **
|
||||
//****************************************************************
|
||||
for(int j =0 ; j < nodSujet.getNodes().size();j++) {
|
||||
if(nodStudent!=null) {
|
||||
if(j<nodStudent.getNodes().size()) {
|
||||
table = meptl.analyseLesAttributEtContenuDuNode(nodStudent.getNodes().get(j), nodSujet.getNodes().get(j), table, "ana:tablematiere", nodSujet.getNodes().get(j).getNomElt());
|
||||
table = meptl.evalLesAttributEtContenuDuNode(nodStudent.getNodes().get(j), nodSujet.getNodes().get(j), table, "ana:tablematiere", nodSujet.getNodes().get(j).getNomElt());
|
||||
for(int k=0; k<nodSujet.getNodes().get(j).getNodes().size();k++) {
|
||||
if(k<nodStudent.getNodes().get(j).getNodes().size()) {
|
||||
table = meptl.analyseLesAttributEtContenuDuNode(nodStudent.getNodes().get(j).getNodes().get(k), nodSujet.getNodes().get(j).getNodes().get(k), table, "ana:tablematiere", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
|
||||
table = meptl.evalLesAttributEtContenuDuNode(nodStudent.getNodes().get(j).getNodes().get(k), nodSujet.getNodes().get(j).getNodes().get(k), table, "ana:tablematiere", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
|
||||
}else {
|
||||
table = meptl.analyseLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j).getNodes().get(k), table, "ana:tablematiere", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
|
||||
table = meptl.evalLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j).getNodes().get(k), table, "ana:tablematiere", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
|
||||
}
|
||||
}
|
||||
}else {
|
||||
table = meptl.analyseLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j), table, "ana:tablematiere", nodSujet.getNodes().get(j).getNomElt());
|
||||
table = meptl.evalLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j), table, "ana:tablematiere", nodSujet.getNodes().get(j).getNomElt());
|
||||
}
|
||||
}else {
|
||||
table = meptl.analyseLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j), table, "ana:tablematiere", nodSujet.getNodes().get(j).getNomElt());
|
||||
table = meptl.evalLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j), table, "ana:tablematiere", nodSujet.getNodes().get(j).getNomElt());
|
||||
for(int k=0; k<nodSujet.getNodes().get(j).getNodes().size();k++) {
|
||||
table = meptl.analyseLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j).getNodes().get(k), table, "ana:tablematiere", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
|
||||
table = meptl.evalLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j).getNodes().get(k), table, "ana:tablematiere", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//****************************************************************
|
||||
//** Insère les attributs des points dans les node de l'analyse **
|
||||
//****************************************************************
|
||||
table.getAttributs().put("point", String.valueOf(outils.getPointsClass()-pointDebut));
|
||||
table.getAttributs().put("pointTotal", String.valueOf(outils.getPointTotal()-pointTotalDebut));
|
||||
nodTablesMs.getNodes().add(table);
|
||||
|
||||
}
|
||||
}
|
||||
//****************************************************************
|
||||
//** Insère les attributs des points dans les node de l'analyse **
|
||||
//****************************************************************
|
||||
nodTablesMs.getAttributs().put("pointgagner",String.valueOf(outils.getPointsClass()));
|
||||
nodTablesMs.getAttributs().put("pointtotal",String.valueOf(outils.getPointTotal()));
|
||||
nodTablesMs.getAttributs().put("proportioncorrect",String.valueOf(outils.getProportionCorrect()));
|
||||
nodTablesMs.setClose(true);
|
||||
|
||||
nodTablesMs.getAttributs().put("pointgagner",String.valueOf(outils.getPointsClass()));
|
||||
nodTablesMs.getAttributs().put("pointtotal",String.valueOf(outils.getPointTotal()));
|
||||
nodTablesMs.getAttributs().put("proportioncorrect",String.valueOf(outils.getProportionCorrect()));
|
||||
nodTablesMs.setClose(true);
|
||||
return nodTablesMs;
|
||||
}
|
||||
|
||||
|
@ -904,6 +984,11 @@ public class analyseLesNodesPrincipaux {
|
|||
page.setNomElt("page");
|
||||
page.getAttributs().put("name", nomDeLaPage);
|
||||
|
||||
//*****************************
|
||||
//** Ajoute un saut de ligne **
|
||||
//*****************************
|
||||
page = meptl.addSaut(pageSujet,page);
|
||||
|
||||
//*********************
|
||||
//** Ajoute un titre **
|
||||
//*********************
|
||||
|
@ -917,7 +1002,7 @@ public class analyseLesNodesPrincipaux {
|
|||
//********************************************
|
||||
//** analyse les attributs des nodes <page> **
|
||||
//********************************************
|
||||
page = meptl.analyseLesAttributEtContenuDuNode(pageStudent, pageSujet, page, "ana:page",pageSujet.getNomElt());
|
||||
page = meptl.evalLesAttributEtContenuDuNode(pageStudent, pageSujet, page, "ana:page",pageSujet.getNomElt());
|
||||
|
||||
//**********************************************
|
||||
//** Analyse de tous les autres nodes enfants **
|
||||
|
@ -980,87 +1065,106 @@ public class analyseLesNodesPrincipaux {
|
|||
paragraph.setNomElt("paragraph");
|
||||
paragraph.getAttributs().put("name", nomDuParagraph);
|
||||
|
||||
//*****************************
|
||||
//** Ajoute un saut de ligne **
|
||||
//*****************************
|
||||
paragraph = meptl.addSaut(paragraphSujet,paragraph);
|
||||
|
||||
//*********************
|
||||
//** Ajoute un titre **
|
||||
//*********************
|
||||
if(paragraphSujet.getAttributs().get("titre")!=null) {
|
||||
paragraph.getAttributs().put("titre", nodSujetParagraph.getNodes().get(i).getAttributs().get("titre"));
|
||||
}
|
||||
paragraph = meptl.addNodeSautTitre(paragraphSujet,paragraph);
|
||||
|
||||
//*******************************
|
||||
//** Recherche le node Student **
|
||||
//*******************************
|
||||
node paragraphStudent = a.retourneFirstNodeByNameAttributValue(nodStudentParagraph, "style:style", "style:name", nomDuParagraph);
|
||||
|
||||
// ajoute les valeurs par héritage
|
||||
//**************************************************************
|
||||
//** Ajoute les valeurs par héritage au node paragraphStudent **
|
||||
//**************************************************************
|
||||
if(paragraphStudent!=null) paragraphStudent = meptl.ajouteValeurLesValeursDuStyleParagraphParent(nodStudentParagraph, paragraphStudent);
|
||||
|
||||
// ajoute les valeurs par défauts
|
||||
//************************************************************
|
||||
//** Ajoute les valeurs par défaut au node paragraphStudent **
|
||||
//************************************************************
|
||||
if(paragraphStudent!=null) paragraphStudent = meptl.ajouteValeurParDefautAuStyleParagraph(nodStudentParagraph, paragraphStudent);
|
||||
|
||||
// analyse les attributs du node
|
||||
paragraph = meptl.analyseLesAttributEtContenuDuNode(paragraphStudent, paragraphSujet, paragraph, "ana:paragraph",paragraphSujet.getNomElt());
|
||||
//*************************************************
|
||||
//** analyse les attributs des nodes <paragraph> **
|
||||
//*************************************************
|
||||
paragraph = meptl.evalLesAttributEtContenuDuNode(paragraphStudent, paragraphSujet, paragraph, "ana:paragraph",paragraphSujet.getNomElt());
|
||||
|
||||
// les enfants du premier niveau du node
|
||||
for(int j = 0 ; j < paragraphSujet.getNodes().size();j++ ) {
|
||||
|
||||
node nodSujet = paragraphSujet.getNodes().get(j);
|
||||
String nameNode = nodSujet.getNomElt();
|
||||
node nodStudent = null;
|
||||
if(paragraphStudent!=null) {
|
||||
if(paragraphStudent.retourneFirstEnfantsByName(nameNode).getNomElt().equals(nameNode)) {
|
||||
nodStudent = paragraphStudent.retourneFirstEnfantsByName(nameNode);
|
||||
}
|
||||
}
|
||||
//************************************
|
||||
//** analyse tous les nodes enfants **
|
||||
//************************************
|
||||
paragraph = analyseLesNodesEnfants.nodeNext(paragraph, "ana:paragraph", paragraphStudent, null, null, paragraphSujet, null, null, a);
|
||||
|
||||
|
||||
//insère un saut si titre pas vide et saut=true
|
||||
paragraph = meptl.addNodeSautTitre(nodSujet, paragraph);
|
||||
|
||||
// analyse attribut et contenu des enfants du premier niveau
|
||||
paragraph = meptl.analyseLesAttributEtContenuDuNode(nodStudent, nodSujet, paragraph, "ana:paragraph",nodSujet.getNomElt());
|
||||
// // les enfants du premier niveau du node
|
||||
// for(int j = 0 ; j < paragraphSujet.getNodes().size();j++ ) {
|
||||
//
|
||||
// node nodSujet = paragraphSujet.getNodes().get(j);
|
||||
// String nameNode = nodSujet.getNomElt();
|
||||
// node nodStudent = null;
|
||||
// if(paragraphStudent!=null) {
|
||||
// if(paragraphStudent.retourneFirstEnfantsByName(nameNode).getNomElt().equals(nameNode)) {
|
||||
// nodStudent = paragraphStudent.retourneFirstEnfantsByName(nameNode);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //insère un saut si titre pas vide et saut=true
|
||||
// paragraph = meptl.addNodeSautTitre(nodSujet, paragraph);
|
||||
//
|
||||
// // analyse attribut et contenu des enfants du premier niveau
|
||||
// paragraph = meptl.evalLesAttributEtContenuDuNode(nodStudent, nodSujet, paragraph, "ana:paragraph",nodSujet.getNomElt());
|
||||
//
|
||||
//
|
||||
// for(int k = 0 ; k < nodSujet.getNodes().size();k++) {
|
||||
// node nod2Sujet = nodSujet.getNodes().get(k);
|
||||
// String nameNode2 = nod2Sujet.getNomElt();
|
||||
// node nod2Student = null;
|
||||
// if(nodStudent!=null) if(nodStudent.retourneFirstEnfantsByName(nameNode2).getNomElt().equals(nameNode2)) {
|
||||
// nod2Student = paragraphStudent.retourneFirstEnfantsByName(nameNode2);
|
||||
// }
|
||||
//
|
||||
// //insère un saut si titre pas vide et saut=true
|
||||
// paragraph = meptl.addNodeSautTitre(nod2Sujet, paragraph);
|
||||
//
|
||||
// // analyse attribut et contenu des enfants du second niveau
|
||||
// paragraph = meptl.evalLesAttributEtContenuDuNode(nod2Student, nod2Sujet, paragraph, "ana:paragraph",nod2Sujet.getNomElt() );
|
||||
//
|
||||
// for(int l = 0 ; l < nod2Sujet.getNodes().size();l++) {
|
||||
// node nod3Sujet = nod2Sujet.getNodes().get(l);
|
||||
// String nameNode3 = nod3Sujet.getNomElt();
|
||||
// node nod3Student = null;
|
||||
// if(nod2Student!=null) if(nod2Student.retourneFirstEnfantsByName(nameNode3).getNomElt().equals(nameNode3)) {
|
||||
// nod3Student = paragraphStudent.retourneFirstEnfantsByName(nameNode3);
|
||||
// }
|
||||
//
|
||||
// //insère un saut si titre pas vide et saut=true
|
||||
// paragraph = meptl.addNodeSautTitre(nod3Sujet, paragraph);
|
||||
//
|
||||
// // analyse attribut et contenu des enfants du troisième niveau
|
||||
// paragraph = meptl.evalLesAttributEtContenuDuNode(nod3Student, nod3Sujet, paragraph, "ana:paragraph", nod3Sujet.getNomElt());
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
for(int k = 0 ; k < nodSujet.getNodes().size();k++) {
|
||||
node nod2Sujet = nodSujet.getNodes().get(k);
|
||||
String nameNode2 = nod2Sujet.getNomElt();
|
||||
node nod2Student = null;
|
||||
if(nodStudent!=null) if(nodStudent.retourneFirstEnfantsByName(nameNode2).getNomElt().equals(nameNode2)) {
|
||||
nod2Student = paragraphStudent.retourneFirstEnfantsByName(nameNode2);
|
||||
}
|
||||
|
||||
//insère un saut si titre pas vide et saut=true
|
||||
paragraph = meptl.addNodeSautTitre(nod2Sujet, paragraph);
|
||||
|
||||
// analyse attribut et contenu des enfants du second niveau
|
||||
paragraph = meptl.analyseLesAttributEtContenuDuNode(nod2Student, nod2Sujet, paragraph, "ana:paragraph",nod2Sujet.getNomElt() );
|
||||
|
||||
for(int l = 0 ; l < nod2Sujet.getNodes().size();l++) {
|
||||
node nod3Sujet = nod2Sujet.getNodes().get(l);
|
||||
String nameNode3 = nod3Sujet.getNomElt();
|
||||
node nod3Student = null;
|
||||
if(nod2Student!=null) if(nod2Student.retourneFirstEnfantsByName(nameNode3).getNomElt().equals(nameNode3)) {
|
||||
nod3Student = paragraphStudent.retourneFirstEnfantsByName(nameNode3);
|
||||
}
|
||||
|
||||
//insère un saut si titre pas vide et saut=true
|
||||
paragraph = meptl.addNodeSautTitre(nod3Sujet, paragraph);
|
||||
|
||||
// analyse attribut et contenu des enfants du troisième niveau
|
||||
paragraph = meptl.analyseLesAttributEtContenuDuNode(nod3Student, nod3Sujet, paragraph, "ana:paragraph", nod3Sujet.getNomElt());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//****************************************************************
|
||||
//** Insère les attributs des points dans les node de l'analyse **
|
||||
//****************************************************************
|
||||
paragraph.getAttributs().put("point", String.valueOf(outils.getPointsClass()-pointDebut));
|
||||
paragraph.getAttributs().put("pointTotal", String.valueOf(outils.getPointTotal()-pointTotalDebut));
|
||||
nodparagraphs.getNodes().add(paragraph);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//****************************************************************
|
||||
//** Insère les attributs des points dans les node de l'analyse **
|
||||
//****************************************************************
|
||||
nodparagraphs.getAttributs().put("pointgagner",String.valueOf(outils.getPointsClass()));
|
||||
nodparagraphs.getAttributs().put("pointtotal",String.valueOf(outils.getPointTotal()));
|
||||
nodparagraphs.getAttributs().put("proportioncorrect",String.valueOf(outils.getProportionCorrect()));
|
||||
|
@ -1072,7 +1176,7 @@ public class analyseLesNodesPrincipaux {
|
|||
* Cette méthode permet d'analyse la structure du document.</br>
|
||||
* La structure de l'étudiant est comparé avec la structure du sujet.</br>
|
||||
* Le node d'analyse est retourné.</br>
|
||||
* Le nom du node analysé pour cette partie est <page> puis <ana:page>.</br>
|
||||
* Le nom du node analysé pour cette partie est page puis ana:page.</br>
|
||||
* <br>
|
||||
* @param nodStudentS : node de la structure de l'étudiant.
|
||||
* @param nodSujetS : node de la structure du sujet.
|
||||
|
@ -1117,6 +1221,11 @@ public class analyseLesNodesPrincipaux {
|
|||
page.getAttributs().put("namepage", nomDeLaPage);
|
||||
page.getAttributs().put("numeroabsolue", numeroabsolue);
|
||||
|
||||
//*****************************
|
||||
//** Ajoute un saut de ligne **
|
||||
//*****************************
|
||||
page = meptl.addSaut(pageSujet,page);
|
||||
|
||||
//*********************
|
||||
//** Ajoute un titre **
|
||||
//*********************
|
||||
|
@ -1130,7 +1239,7 @@ public class analyseLesNodesPrincipaux {
|
|||
//********************************************
|
||||
//** analyse les attributs des nodes <page> **
|
||||
//********************************************
|
||||
page = meptl.analyseLesAttributEtContenuDuNode(pageStudent, pageSujet, page, "ana:page",pageSujet.getNomElt());
|
||||
page = meptl.evalLesAttributEtContenuDuNode(pageStudent, pageSujet, page, "ana:page",pageSujet.getNomElt());
|
||||
|
||||
//************************************
|
||||
//** analyse tous les nodes enfants **
|
||||
|
|
|
@ -24,6 +24,7 @@ public class commandes {
|
|||
public static boolean analyse = false; //analyse des fichiers étudiants
|
||||
public static boolean ecritCode = false; // -write : ecriture du code du sujet
|
||||
public static boolean ecritSujet = false; // -sujet : ecriture 2 du code du sujet, uniquement les nodes évalués
|
||||
public static boolean ecritNodeAnalyse = false;
|
||||
public static boolean ecritNoteCSV = false; // ecriture note.csv
|
||||
public static boolean writefiles = false; // -writefiles permet d'écrire tous les fichiers XML après la lecture en node
|
||||
public static boolean calculLeHashDuFichier = false; // -hash retourne le hash du fichier d'analyse
|
||||
|
@ -82,18 +83,21 @@ public class commandes {
|
|||
if(args.length==0) {badCommand=true; System.out.println("Il doit y avoir une commande.");System.out.println("Vous pouvez saisir les commandes -aide ou -help pour obtenir la liste des commandes.");}
|
||||
for(int i = 0 ; i < args.length ; i++) {
|
||||
if(args[i].equals("-use")) if((i+1)<args.length) { if(!args[i+1].contains(".xml")) {badCommand=true; System.out.println("La commande -use doit être suivi du nom du fichier.");}}else {badCommand=true; System.out.println("La commande -use doit être suivi du nom du fichier.");}
|
||||
|
||||
if(args[i].contains(".xml")) {
|
||||
Matcher m = Pattern.compile("{1,}.xml$").matcher(args[i]);
|
||||
if(m.find()) {nameSujet = args[i];}else {badCommand=true;System.out.println("Il y a un problème avec l'extension du fichier d'analyse.\nL'extension doit être \".xml\".");};
|
||||
if(i-1>=0){
|
||||
if(args[i-1].equals("-use")) analyse=true;
|
||||
if(args[i-1].equals("-hash")) calculLeHashDuFichier=true;
|
||||
if(!analyse&&!calculLeHashDuFichier) {
|
||||
if(args[i-1].equals("-a")) ecritNodeAnalyse=true;
|
||||
if(!analyse&&!calculLeHashDuFichier&&!ecritNodeAnalyse) {
|
||||
badCommand=true;
|
||||
System.out.println("Les commandes -use ou -hash doit être suivi du nom du fichier d'analyse.");
|
||||
System.out.println("Les commandes -use ou -hash ou -a doit être suivi du nom du fichier d'analyse.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(args[i].contains(".csv")) {
|
||||
Matcher m = Pattern.compile("{1,}.csv$").matcher(args[i]);
|
||||
if(m.find()) {fourniCSV=true; nameCSV = args[i];}else {badCommand=true;System.out.println("Il y a un problème avec l'extension du fichier CSV.\nL'extension doit être \".csv\".");}
|
||||
|
@ -156,6 +160,10 @@ public class commandes {
|
|||
if(args.length>2) {System.out.println("\n\n***\nLa commande -hash suivi du nom du fichier d'analyse doit être la seule commande.\n***");clotureWithError();}
|
||||
calculLeHashDuFichier=true;
|
||||
}
|
||||
if(args[i].equals("-a")) {
|
||||
if(args.length>2) {System.out.println("\n\n***\nLa commande -a suivi du nom du fichier d'analyse doit être la seule commande.\n***");clotureWithError();}
|
||||
ecritNodeAnalyse=true;
|
||||
}
|
||||
if(args[i].equals("-sujet")) {
|
||||
if(!(analyse&&args.length==3&&Command.contains("-use"))) {badCommand=true; System.out.println("Vous devez saisir la commande -use suivi du fichier d'analyse et après vous pouvez saisir la commande -sujet.");}
|
||||
ecritSujet=true;
|
||||
|
@ -209,7 +217,7 @@ public class commandes {
|
|||
&&!args[i].contains(".csv")&&!args[i].contains(".svg")&&!args[i].contains(".xml")&&!args[i].contains("-nofeedback")&&!args[i].contains("-help")&&!args[i].equals("-aide")
|
||||
&&!args[i].equals("-about")&&!args[i].equals("-nonote") &&!args[i].equals("-dest")&&!args[i].equals("-sujet")&&!args[i].equals("-nologo")
|
||||
&&!args[i].equals("-licence")&&!args[i].equals("-zipfeedback")&&!args[i].equals("-newLogo")&&!args[i].equals("-f")&&!m.find()&&!args[i].equals("-writefiles")
|
||||
&&!args[i].equals("-hash")&&!m.find()) {
|
||||
&&!args[i].equals("-hash")&&!m.find() &&!args[i].equals("-a")&&!m.find()) {
|
||||
badCommand=true; System.out.println("La commande " + args[i] + " est inconnu.");System.out.println("Vous pouvez taper \"java -jar analyseWriter.jar -aide\" pour obtenir la liste des commandes.");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,83 +80,22 @@ public class feedbacks {
|
|||
|
||||
// auteur du sujet
|
||||
String auteurSujet = nodana.retourneFirstEnfantsByName("ouverture").getAttributs().get("auteur");
|
||||
if(auteurSujet==null) auteurSujet="";
|
||||
|
||||
|
||||
//création du feedback
|
||||
fichier.append("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\r"
|
||||
+ "<html>\r"
|
||||
+ "<head>\r"
|
||||
+ "<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\"/>\r"
|
||||
+ "<title>Analyse LibreOffice Calc</title>\r");
|
||||
+ "<title>Fichier généré par AnalyseWriter - Développeur : Pablo Rodriguez</title>\r");
|
||||
|
||||
fichier.append("<meta name=\"generator\" content=\"AnalyseMEPTL V1.0\"/>"
|
||||
+ "<meta name=\"author\" content=\"Pablo Rodriguez\"/>"
|
||||
+ "<meta name=\"created\" content=\""+ nodana.retourneFirstEnfantsByName("ouverture").getAttributs().get("date") +"\"/>");
|
||||
fichier.append("\r<meta name=\"generator\" content=\"AnalyseWriter "+commandes.version+"\"/>"
|
||||
+ "\r<meta name=\"author\" content=\""+auteurSujet+"\"/>"
|
||||
+ "\r<meta name=\"created\" content=\""+ nodana.retourneFirstEnfantsByName("ouverture").getAttributs().get("date") +"\"/>");
|
||||
|
||||
|
||||
fichier.append("<style type=\"text/css\">"
|
||||
+ "p.pablo { margin-bottom: 0.25cm; line-height: 100%; background: transparent; margin-left: 1cm; }"
|
||||
+ ".header {background-color: #f1f1f1;padding: 30px;text-align:center;}"
|
||||
+ "h1 { margin-bottom: 0.25cm; background: transparent;}"
|
||||
+ "h2 {color: blue;font-size:22pt;margin-bottom: 0cm; margin-top: 0cm; line-height: 110%; background: transparent; margin-left: 20pt; margin-right: 10px; text-decoration: underline overline;}"
|
||||
+ "h3 {font-size:18pt;margin-bottom: 0cm; margin-top: 0cm; line-height: 110%; background: transparent; margin-left: 20pt;}"
|
||||
+ "header.h1.western { font-family: \"Arial\"; font-size: 18pt; font-weight: bold; backgroung: #adff2f;}"
|
||||
+ ".header p {color:blue; font-size:30px;}"
|
||||
+ ".triche {background: #AA0000;padding-top: 5px;padding-right: 5px;padding-bottom: 5px;padding-left: 5px;width=80%;margin-top:18px; box-shadow: 5px 10px 18px #800000;}"
|
||||
+ ".triche p {color:white; font-size:16px;margin-left:10px;margin-bottom:6px;margin-top:6px}"
|
||||
+ ".header h4 {text-align:left;font-family: \"Arial\"; font-size: 12pt; font-weight: bold; line-height: 110%;}"
|
||||
+ "h4.western { font-family: \"Arial\"; font-size: 14pt; font-style: italic; font-weight: bold; line-height: 40%}"
|
||||
+ "a:link { color: #000099; so-language: zxx; text-decoration: underline; margin-left: 10px; }"
|
||||
+ "a:visited { color: #99000; so-language: zxx; text-decoration: underline; margin-left: 10px; }"
|
||||
+ "hr { display: block; margin-top: 0.5em; margin-bottom: 8em; margin-left: 2em; margin-right: 2em; border-style: inset; border-width: 4px;}"
|
||||
+ "spanpablo { float: right; width: 8em; font-size: 250%; font-family: algerian, courier; line-height: 80%; margin-right: 1%; color: red; text-align: center}"
|
||||
+ "p.p1{margin-bottom: 0cm; margin-top: 0cm; line-height: 100%; background: transparent; margin-left: 0cm; white-space: pre;}"
|
||||
+ "p.p8{font-size:14pt;margin-bottom: 0cm; margin-top: 0cm; line-height: 110%; background: transparent; margin-left: 8pt; margin-right: 10px;}"
|
||||
+ "p.p9{font-size:16pt;margin-bottom: 12px;text-align: left; margin-top: 0cm; line-height: 110%; background: transparent; margin-left: 40pt; margin-right: 0cm;text-decoration: underline overline wavy blue;text-shadow: 0px 1px #101010;}"
|
||||
+ "p.p10{font-size:12pt;margin-bottom: 12px;text-align: left; margin-top: 0cm; line-height: 110%; background: transparent; margin-left: 30pt; margin-right: 0cm;text-decoration: underline overline wavy red;}"
|
||||
+ ".commentaire{margin-left: 0px; margin-bottom: 24px; margin-top: 24px;font-size:1.4rem}"
|
||||
+ "p.p2{margin-left: 0px; margin-bottom: 0cm; margin-top: 4px; line-height: 115%}"
|
||||
+ "p.p3{margin-left: 20px; line-height: 100%; border: 1px solid black; background-color: lightcyan; margin-right: 10px; }"
|
||||
+ "p.p4{margin-left: 0px; margin-bottom: 0cm; margin-top: 4px; margin-right: 4px; line-height: 115%; background: darkblue; color:white; font-size: 20px; white-space: pre;}"
|
||||
+ "p.p5{margin-left: 80px; margin-bottom: 0cm; margin-top: 4px; margin-right: 80px; line-height: 115%; background: red; color:white; font-size: 20px;}"
|
||||
+ "p.p6{margin-left: 80px; margin-bottom: 0cm; margin-top: 4px; margin-right: 80px; line-height: 115%; background: beige; color:darkcyan; font-size: 20px;}"
|
||||
+ "p.p7{margin-left: 80px; margin-bottom: 0cm; margin-top: 4px; margin-right: 80px; line-height: 115%; background: #7FFF00; font-size: 20px;}"
|
||||
+ "#navbar {overflow: hidden;background-color: #333;width:100%;box-shadow: 5px 10px 8px #888888;}"
|
||||
+ "#navbar a {float: left;display: block;color: #f2f2f2;text-align: center;padding: 14px 16px;text-decoration: none;font-size: 17px;}"
|
||||
+ "#navbar a:hover {background-color: #ddd;color: black;}"
|
||||
+ "#navbar a.active {background-color: #4CAF50;color: white;margin-left:0px;}"
|
||||
+ "#navbar a.active2 {background-color: #FF8050;color: white;margin-left:0px;}"
|
||||
+ "#navbar a.active3 {background-color: #5080FF;color: white;margin-left:0px;}"
|
||||
+ "div.sticky {position: fixed;top: 0;width: 100%;}"
|
||||
+ ".sticky + .content {padding-top: 60px;}"
|
||||
+ "#navbar2 {overflow: hidden; background-color: #333;}"
|
||||
+ "#navbar2 a {float: left; font-size: 18px; color: white; text-align: center; padding: 16px 18px; text-decoration: none;}"
|
||||
+ ".dropdown {position: relative; display: inline-block;}"
|
||||
+ ".dropbtn:hover, .dropbtn:focus { background-color: #3e8e41;}"
|
||||
+ ".dropdown-content {display: none; position: absolute; background-color: #f9f9f9; min-width: 160px; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);}"
|
||||
+ ".dropdown-content a {color: black; padding: 12px 16px; text-decoration: none; display: block;}"
|
||||
+ ".dropdown-content a:hover {background-color: #f1f1f1}"
|
||||
+".show {display:block;}"
|
||||
+ "#myDropdown {background-color: #508050;color: black;}"
|
||||
+ ".menu-box{display: none;}"
|
||||
+ ".menuopen{display: block;}"
|
||||
+ ".tooltip {position: relative;display: inline-block;border-bottom: 1px dotted black;}"
|
||||
+ ".tooltip .tooltiptext {visibility: hidden;background-color: black;color: #fff;text-align: center;border-radius: 6px;padding: 5px 0;position: absolute;z-index: 1;margin-left: -30px; width: 260px;top: 100%;left: 10%;}"
|
||||
+ ".tooltip .tooltiptext::after {content: \" \";position: absolute;bottom: 100%;left: 50%;margin-left: -5px;border-width: 5px;border-style: solid;border-color: transparent transparent black transparent;}"
|
||||
+ ".tooltip:hover .tooltiptext {visibility: visible;}"
|
||||
+ ".tooltip1 {position: relative;display: inline-block;border-bottom: 1px dotted black;}"
|
||||
+ ".tooltip1 .tooltiptext1 {visibility: hidden;background-color: #0000CC;color: #fff;text-align: left;border-radius: 4px;padding: 10px;position: absolute;z-index: 1;margin-left: -40px; width: 280px;top: 100%;left: 10%;}"
|
||||
+ ".tooltip1 .tooltiptext1::after {content: \" \";position: absolute;bottom: 100%;left: 50%;margin-left: -5px;border-width: 5px;border-style: solid;border-color: transparent transparent #0000CC transparent;}"
|
||||
+ ".tooltip1:hover .tooltiptext1 {visibility: visible;}"
|
||||
+ ".tooltip2 {position: relative;display: inline-block;border-bottom: 1px dotted black;}"
|
||||
+ ".tooltip2 .tooltiptext2 {visibility: hidden;background-color: black;color: #fff;text-align: left;border-radius: 8px;padding: 8px;position: absolute;z-index: 1;margin-left: -40px; width: 340px;top: 100%;left: 10%;}"
|
||||
+ ".tooltip2 .tooltiptext2::after {content: \" \";position: absolute;bottom: 100%;left: 50%;margin-left: -5px;border-width: 5px;border-style: solid;border-color: transparent transparent black transparent;}"
|
||||
+ ".tooltip2:hover .tooltiptext2 {visibility: visible;}"
|
||||
+ ".footer {position: fixed;left: 0;bottom: 0;width: 100%;background-color: white;color: black;text-align: center;}"
|
||||
+"</style>");
|
||||
fichier.append(HTML.getStyleCSS());
|
||||
|
||||
fichier.append("</head>\r");
|
||||
fichier.append("\r</head>\r");
|
||||
fichier.append("<body lang=\"fr-FR\" link=\"#000080\" vlink=\"#800000\" dir=\"ltr\">\r");
|
||||
|
||||
fichier.append("<div class=\"header\">");
|
||||
|
@ -347,14 +286,17 @@ public class feedbacks {
|
|||
|
||||
fichier.append(HTML.TableEnteteTableurSynthese());
|
||||
String IdError = ""; // permet de récupérer les id des menu ou la proportioncorrect est NaN. (à cause de l'attribut analyseStyle=true)
|
||||
|
||||
for(int k = 0 ; k < nodana.getNodes().size();k++) {
|
||||
if(nodana.getNodes().get(k).getAttributs().get("addmenu")!=null) if(nodana.getNodes().get(k).getAttributs().get("addmenu").equals("true")) {
|
||||
if(!nodana.getNodes().get(k).getAttributs().get("proportioncorrect").equals("NaN")) {
|
||||
fichier.append(HTML.TablePointsSyntheseStyle(nodana.getNodes().get(k).getAttributs().get("titre"),Double.valueOf(nodana.getNodes().get(k).getAttributs().get("proportioncorrect")),nodana.getNodes().get(k).getAttributs().get("pointtotal") + " pt",nodana.getNodes().get(k).getAttributs().get("pointgagner") + " pt", nodana.getNodes().get(k).getAttributs().get("poids"),nodana.getNodes().get(k).getAttributs().get("id")));
|
||||
}else {
|
||||
IdError = IdError + nodana.getNodes().get(k).getAttributs().get("id");
|
||||
}
|
||||
}
|
||||
if(nodana.getNodes().get(k).getAttributs().get("addmenu")!=null) {
|
||||
if(nodana.getNodes().get(k).getAttributs().get("addmenu").equals("true")) {
|
||||
if(!nodana.getNodes().get(k).getAttributs().get("proportioncorrect").equals("NaN")) {
|
||||
fichier.append(HTML.TablePointsSyntheseStyle(nodana.getNodes().get(k).getAttributs().get("titre"),Double.valueOf(nodana.getNodes().get(k).getAttributs().get("proportioncorrect")),nodana.getNodes().get(k).getAttributs().get("pointtotal") + " pt",nodana.getNodes().get(k).getAttributs().get("pointgagner") + " pt", nodana.getNodes().get(k).getAttributs().get("poids"),nodana.getNodes().get(k).getAttributs().get("id")));
|
||||
}else {
|
||||
IdError = IdError + nodana.getNodes().get(k).getAttributs().get("id");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@ public class meptl {
|
|||
//***********************************************************************************
|
||||
//** PREPARATION du node Sujet pour analyse -use file.xml ou -use file.xml -sujet **
|
||||
//***********************************************************************************
|
||||
if(commandes.analyse) {
|
||||
if(commandes.analyse||commandes.ecritNodeAnalyse) {
|
||||
nodeSujet = chargementsujet(commandes.nameSujet, true);
|
||||
|
||||
if(nodeSujet==null) {
|
||||
|
@ -281,17 +281,23 @@ public class meptl {
|
|||
//**********************************
|
||||
//** Analyse des fichiers student **
|
||||
//**********************************
|
||||
if(commandes.analyse) {
|
||||
node init = InitialisationAvantAnalyse(nodeSujet);
|
||||
if(commandes.analyse||commandes.ecritNodeAnalyse) {
|
||||
node init =verificationFichierAnalyse.InitialisationAvantAnalyse(nodeSujet);
|
||||
if(!Boolean.valueOf(init.getAttributs().get("erreur"))) {
|
||||
// a.ecritureNodeEnXML(nodStudent, "fichier student",patch,false,""); //écriture du node analyse de l'étudiant
|
||||
// a.ecritureNodeEnXML(nodStudent, "fichier student",patch,false,""); //écriture du node nodStudent de l'étudiant
|
||||
node ana = analyse(nodStudent, nodeSujet, i, a);
|
||||
// a.ecritureNodeEnXML(ana, "nodana"+ana.retourneFirstEnfantsByName("ouverture").getAttributs().get("dossier"),"",false,""); //écriture du node analyse de l'étudiant
|
||||
|
||||
//**************************************************
|
||||
//** Ecriture des fichiers d'analyse des students **
|
||||
//**************************************************
|
||||
if(commandes.ecritNodeAnalyse) {
|
||||
Run.ecritureNodeEnXML(ana, "nodana"+ana.retourneFirstEnfantsByName("ouverture").getAttributs().get("dossier"),"",false,""); //écriture du node analyse de l'étudiant
|
||||
}
|
||||
|
||||
//****************************
|
||||
//** Création des feedbacks **
|
||||
//****************************
|
||||
if(!commandes.sansFeeback) {
|
||||
if(!commandes.sansFeeback&&!commandes.ecritNodeAnalyse) {
|
||||
if(!commandes.zipfeedback) {
|
||||
//feedback(ana, verif); //classique directement dans le répertoire
|
||||
feedbacks.feedback(ana,verif, false);
|
||||
|
@ -951,84 +957,7 @@ public class meptl {
|
|||
|
||||
|
||||
|
||||
/**
|
||||
* Vérification du node sujet (premier node <b>fichier</b> et des paramètres.<br>
|
||||
* <br>
|
||||
* @param nodSujet
|
||||
* @return
|
||||
*/
|
||||
private static node InitialisationAvantAnalyse(node nodSujet) {
|
||||
node initSujet = new node();
|
||||
initSujet.setNomElt("init");
|
||||
|
||||
boolean erreur=false;
|
||||
boolean erreurNomPremierNodeFichier=false;
|
||||
boolean erreurManqueAttributEvaluerPremierNodeFichier=false;
|
||||
boolean erreurValeurAttributEvaluerPremierNodeFichier=false;
|
||||
boolean erreurPasNodesEnfantsAuPremierNodeFichier=false;
|
||||
boolean erreurPasAttributMetaSujetAuPremierNodeFichier=false;
|
||||
boolean erreurValeurVideAttributMetaSujetAuPremierNodeFichier=false;
|
||||
boolean erreurValeurAttributProgressionNonConvertibleEnDouble=false;
|
||||
boolean erreurValeurAttributNoteFromNonConvertibleEnDouble=false;
|
||||
|
||||
if(!nodSujet.getNomElt().equals("fichier")) {
|
||||
erreur=true;
|
||||
erreurNomPremierNodeFichier = true;
|
||||
}
|
||||
if(nodSujet.getAttributs().get("evaluer")==null) {
|
||||
erreur=true;
|
||||
erreurManqueAttributEvaluerPremierNodeFichier = true;
|
||||
}
|
||||
if(!nodSujet.getAttributs().get("evaluer").equals("true")) {
|
||||
erreur=true;
|
||||
erreurValeurAttributEvaluerPremierNodeFichier=true;
|
||||
}
|
||||
if(nodSujet.getNodes().size()==0) {
|
||||
erreur=true;
|
||||
erreurPasNodesEnfantsAuPremierNodeFichier=true;
|
||||
}
|
||||
if(nodSujet.getAttributs().get("metaSujet")==null) {
|
||||
erreur=true;
|
||||
erreurPasAttributMetaSujetAuPremierNodeFichier=true;
|
||||
}
|
||||
if(nodSujet.getAttributs().get("metaSujet")!=null) {
|
||||
if(nodSujet.getAttributs().get("metaSujet").isEmpty()) {
|
||||
erreur=true;
|
||||
erreurValeurVideAttributMetaSujetAuPremierNodeFichier=true;
|
||||
}
|
||||
}
|
||||
if(nodSujet.getAttributs().get("progression")!=null) {
|
||||
String p = nodSujet.getAttributs().get("progression");
|
||||
try {
|
||||
Double.valueOf(p);
|
||||
} catch (Exception e) {
|
||||
erreur=true;
|
||||
erreurValeurAttributProgressionNonConvertibleEnDouble=true;
|
||||
}
|
||||
}
|
||||
if(nodSujet.getAttributs().get("notefrom")!=null) {
|
||||
String p = nodSujet.getAttributs().get("notefrom");
|
||||
try {
|
||||
Double.valueOf(p);
|
||||
} catch (Exception e) {
|
||||
erreur=true;
|
||||
erreurValeurAttributNoteFromNonConvertibleEnDouble=true;
|
||||
}
|
||||
}
|
||||
|
||||
initSujet.getAttributs().put("erreur",String.valueOf(erreur));
|
||||
initSujet.getAttributs().put("erreurNomPremierNodeFichier",String.valueOf(erreurNomPremierNodeFichier));
|
||||
initSujet.getAttributs().put("erreurManqueAttributEvaluerPremierNodeFichier",String.valueOf(erreurManqueAttributEvaluerPremierNodeFichier));
|
||||
initSujet.getAttributs().put("erreurValeurAttributEvaluerPremierNodeFichier",String.valueOf(erreurValeurAttributEvaluerPremierNodeFichier));
|
||||
initSujet.getAttributs().put("erreurPasNodesEnfantsAuPremierNodeFichier",String.valueOf(erreurPasNodesEnfantsAuPremierNodeFichier));
|
||||
initSujet.getAttributs().put("erreurPasAttributMetaSujetAuPremierNodeFichier",String.valueOf(erreurPasAttributMetaSujetAuPremierNodeFichier));
|
||||
initSujet.getAttributs().put("erreurValeurVideAttributMetaSujetAuPremierNodeFichier",String.valueOf(erreurValeurVideAttributMetaSujetAuPremierNodeFichier));
|
||||
initSujet.getAttributs().put("erreurValeurAttributProgressionNonConvertibleEnDouble",String.valueOf(erreurValeurAttributProgressionNonConvertibleEnDouble));
|
||||
initSujet.getAttributs().put("erreurValeurAttributNoteFromNonConvertibleEnDouble",String.valueOf(erreurValeurAttributNoteFromNonConvertibleEnDouble));
|
||||
|
||||
return initSujet;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Début de l'analyse par comparaison du node étudiant avec le node sujet.
|
||||
* @param nodStudent, le node étudiant.
|
||||
|
@ -1524,7 +1453,7 @@ public class meptl {
|
|||
* @param nameElt : le nom de l'élément (node) analysé.
|
||||
* @return le node <b>retour</b> avec tous les nodes enfants <b>nameItem</b> contenant les différentes analyse.
|
||||
*/
|
||||
public static node analyseLesAttributEtContenuDuNode(node nodeStudent, node sujet, node retour, String nameItem, String nameElt) {
|
||||
public static node evalLesAttributEtContenuDuNode(node nodeStudent, node sujet, node retour, String nameItem, String nameElt) {
|
||||
Enumeration<String> key = sujet.getAttributs().keys();
|
||||
while(key.hasMoreElements()) {
|
||||
String k = key.nextElement();
|
||||
|
@ -1564,9 +1493,9 @@ public class meptl {
|
|||
|
||||
if(k.equals("evalNameInitialCreator") && sujet.getNomElt().equals("meta:initial-creator")) {
|
||||
if(nodeStudent!=null) {
|
||||
retour = analyseNameInitialCreator(retour,nodeStudent, nodeStudent.getContenu().get(0), sujet.getAttributs().get("evalNameInitialCreator"),"Créateur");
|
||||
retour = evalNameInitialCreator(retour,nodeStudent, nodeStudent.getContenu().get(0), sujet.getAttributs().get("evalNameInitialCreator"),"Créateur");
|
||||
}else {
|
||||
retour = analyseNameInitialCreator(retour,null, "Créateur inconnu", sujet.getAttributs().get("evalNameInitialCreator"),"Créateur");
|
||||
retour = evalNameInitialCreator(retour,null, "Créateur inconnu", sujet.getAttributs().get("evalNameInitialCreator"),"Créateur");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1660,7 +1589,7 @@ public class meptl {
|
|||
* @param nameElt : le nom de l'élément (node) analysé.
|
||||
* @return le node <b>retour</b> avec tous les nodes enfants <b>nameItem</b> contenant les différentes analyse.
|
||||
*/
|
||||
public static node analyseLesAttributAnalyseStyle(node nodeStyleParagraphStudent, node nodeStyleParagraphSujet, node retour, String nameItem, String nameElt) {
|
||||
public static node evalLesAttributAnalyseStyle(node nodeStyleParagraphStudent, node nodeStyleParagraphSujet, node retour, String nameItem, String nameElt) {
|
||||
|
||||
Enumeration<String> key = nodeStyleParagraphSujet.getAttributs().keys();
|
||||
while(key.hasMoreElements()) {
|
||||
|
@ -1868,7 +1797,7 @@ public class meptl {
|
|||
/**
|
||||
* Ajoute dans le node nodanalyse.</br>
|
||||
* Le node saut et son attribut titre</br>
|
||||
* Et place un titre1, ou titre2, ou titre3</br>
|
||||
* Et place un titre, ou titre1, ou titre2, ou titre3</br>
|
||||
* <br>
|
||||
* @param nod
|
||||
* @return
|
||||
|
@ -1881,6 +1810,13 @@ public class meptl {
|
|||
N.setClose(true);
|
||||
nodanalyse.getNodes().add(N);
|
||||
}
|
||||
if(nodSujet.getAttributs().get("titre1")!=null) {
|
||||
node N = new node();
|
||||
N.setNomElt("saut");
|
||||
N.getAttributs().put("titre1", nodSujet.getAttributs().get("titre1"));
|
||||
N.setClose(true);
|
||||
nodanalyse.getNodes().add(N);
|
||||
}
|
||||
if(nodSujet.getAttributs().get("titre2")!=null) {
|
||||
node N = new node();
|
||||
N.setNomElt("saut");
|
||||
|
@ -1899,6 +1835,26 @@ public class meptl {
|
|||
return nodanalyse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajoute un saut de ligne.</br>
|
||||
* @param nodSujet
|
||||
* @param nodanalyse
|
||||
* @return
|
||||
*/
|
||||
public static node addSaut(node nodSujet, node nodanalyse) {
|
||||
if(nodSujet.getAttributs().get("saut")!=null) {
|
||||
if(nodSujet.getAttributs().get("saut").equalsIgnoreCase("true")) {
|
||||
node N = new node();
|
||||
N.setNomElt("saut");
|
||||
//N.getAttributs().put("titre", "");
|
||||
N.setClose(true);
|
||||
nodanalyse.getNodes().add(N);
|
||||
}
|
||||
}
|
||||
|
||||
return nodanalyse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Vérirication des historiques
|
||||
* @param verification
|
||||
|
@ -2696,7 +2652,7 @@ public class meptl {
|
|||
* @param nameElt
|
||||
* @return
|
||||
*/
|
||||
private static node analyseNameInitialCreator(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;
|
||||
if(nodStudent!=null) {
|
||||
item = retourneNoteAvecResultatsAnalyse(nameCreator,"name", nodStudent.getAttributs().get("initial-creator"),nameCreator + "↑‽" +point, nameElt );
|
||||
|
|
|
@ -57,6 +57,13 @@ public class rechercherUnNodeStudent {
|
|||
nodStudent = findDrawFrame(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a);
|
||||
}
|
||||
|
||||
//*************************************************
|
||||
//** Recherche le nodes text:date par text:fixed **
|
||||
//*************************************************
|
||||
if(nameNode.equals("text:date")) {
|
||||
nodStudent = findTextDate(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a);
|
||||
}
|
||||
|
||||
//***********************************************
|
||||
//** Recherche le nodes text:xxx par text:name **
|
||||
//***********************************************
|
||||
|
@ -84,6 +91,7 @@ public class rechercherUnNodeStudent {
|
|||
if(nameNode.equals("text:h")) {
|
||||
nodStudent = findByContentWithTolerance(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a);
|
||||
}
|
||||
|
||||
|
||||
//*******************************************************
|
||||
//** Recherche le node par l'index mais si pas demandé **
|
||||
|
@ -92,6 +100,12 @@ public class rechercherUnNodeStudent {
|
|||
nodStudent = findByIndexEvenIsFalse(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a);
|
||||
}
|
||||
|
||||
//****************************************************************
|
||||
//** Recherche le node text:conditional-text par text:condition **
|
||||
//****************************************************************
|
||||
if(nameNode.equals("text:conditional-text") ) {
|
||||
nodStudent = findTextConditional(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a);
|
||||
}
|
||||
|
||||
//***************************************************************
|
||||
//** Recherche le node table:table-column par table:style-name **
|
||||
|
@ -106,7 +120,6 @@ public class rechercherUnNodeStudent {
|
|||
if(nameNode.equals("text:tab") || nameNode.equals("style:graphic-properties")) {
|
||||
nodStudent = findByContentZero(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a);
|
||||
}
|
||||
|
||||
|
||||
//*****************************************************************
|
||||
//** Recherche Le node text:p par les différents contenu du node **
|
||||
|
@ -185,55 +198,123 @@ public class rechercherUnNodeStudent {
|
|||
|
||||
node nodStudent =null;
|
||||
|
||||
//si le node "text:p" contient un "text:user-defined" alors le recherche par le "text:name" de ce node "text:user-defined"
|
||||
if(nodSujet.containElementByName("text:user-defined")) {
|
||||
String valueAttribut = outils.withoutCodeAndPoint(nodSujet.retourneFirstEnfantsByName("text:user-defined").getAttributs().get("text:name"));
|
||||
if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue("text:p","text:user-defined", "text:name", valueAttribut);
|
||||
if(nod1Student!=null) if(nodStudent==null) nodStudent = nod1Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue("text:p","text:user-defined", "text:name", valueAttribut);
|
||||
if(nod0Student!=null) if(nodStudent==null) nodStudent = nod0Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue("text:p","text:user-defined", "text:name", valueAttribut);
|
||||
}
|
||||
//si le node "text:p" contient un "text:conditional-text" alors le recherche par le "text:condition" de ce node "text:conditional-text"
|
||||
if(nodSujet.containElementByName("text:conditional-text")) {
|
||||
String valueAttribut = outils.withoutCodeAndPoint(nodSujet.retourneFirstEnfantsByName("text:conditional-text").getAttributs().get("text:condition"));
|
||||
if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue("text:p","text:conditional-text", "text:condition", valueAttribut);
|
||||
if(nod1Student!=null) if(nodStudent==null) nodStudent = nod1Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue("text:p","text:conditional-text", "text:condition", valueAttribut);
|
||||
if(nod0Student!=null) if(nodStudent==null) nodStudent = nod0Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue("text:p","text:conditional-text", "text:condition", valueAttribut);
|
||||
}
|
||||
//si le node "text:p" contient un "text:database-display" alors le recherche par le "text:column-name" de ce node "text:database-display"
|
||||
if(nodSujet.containElementByName("text:database-display")) {
|
||||
String valueAttribut = outils.withoutCodeAndPoint(nodSujet.retourneFirstEnfantsByName("text:database-display").getAttributs().get("text:column-name"));
|
||||
if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue("text:p","text:database-display", "text:column-name", valueAttribut);
|
||||
if(nod1Student!=null) if(nodStudent==null) nodStudent = nod1Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue("text:p","text:database-display", "text:column-name", valueAttribut);
|
||||
if(nod0Student!=null) if(nodStudent==null) nodStudent = nod0Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue("text:p","text:database-display", "text:column-name", valueAttribut);
|
||||
}
|
||||
//si le node "text:p" contient un "text:date" alors le recherche par le "text:fixed" de ce node "text:date"
|
||||
if(nodSujet.containElementByName("text:date")) {
|
||||
String valueAttribut = outils.withoutCodeAndPoint(nodSujet.retourneFirstEnfantsByName("text:date").getAttributs().get("text:fixed"));
|
||||
if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue("text:p","text:date", "text:fixed", valueAttribut);
|
||||
if(nod1Student!=null) if(nodStudent==null) nodStudent = nod1Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue("text:p","text:date", "text:fixed", valueAttribut);
|
||||
if(nod0Student!=null) if(nodStudent==null) nodStudent = nod0Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue("text:p","text:date", "text:fixed", valueAttribut);
|
||||
}
|
||||
if(nodSujet.containElementByName("text:subject")) {
|
||||
if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstEnfantsByNameNode1ContainNameNode2("text:p","text:subject");
|
||||
if(nod1Student!=null) if(nodStudent==null) nodStudent = nod1Student.retourneFirstEnfantsByNameNode1ContainNameNode2("text:p","text:subject");
|
||||
if(nod0Student!=null) if(nodStudent==null) nodStudent = nod0Student.retourneFirstEnfantsByNameNode1ContainNameNode2("text:p","text:subject");
|
||||
}
|
||||
if(nodSujet.containElementByName("text:title")) {
|
||||
if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstEnfantsByNameNode1ContainNameNode2("text:p","text:title");
|
||||
if(nod1Student!=null) if(nodStudent==null) nodStudent = nod1Student.retourneFirstEnfantsByNameNode1ContainNameNode2("text:p","text:title");
|
||||
if(nod0Student!=null) if(nodStudent==null) nodStudent = nod0Student.retourneFirstEnfantsByNameNode1ContainNameNode2("text:p","text:title");
|
||||
}
|
||||
if(nodSujet.containElementByName("text:initial-creator")) {
|
||||
if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstEnfantsByNameNode1ContainNameNode2("text:p","text:initial-creator");
|
||||
if(nod1Student!=null) if(nodStudent==null) nodStudent = nod1Student.retourneFirstEnfantsByNameNode1ContainNameNode2("text:p","text:initial-creator");
|
||||
if(nod0Student!=null) if(nodStudent==null) nodStudent = nod0Student.retourneFirstEnfantsByNameNode1ContainNameNode2("text:p","text:initial-creator");
|
||||
}
|
||||
if(nodSujet.containElementByName("text:creator")) {
|
||||
if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstEnfantsByNameNode1ContainNameNode2("text:p","text:creator");
|
||||
if(nod1Student!=null) if(nodStudent==null) nodStudent = nod1Student.retourneFirstEnfantsByNameNode1ContainNameNode2("text:p","text:creator");
|
||||
if(nod0Student!=null) if(nodStudent==null) nodStudent = nod0Student.retourneFirstEnfantsByNameNode1ContainNameNode2("text:p","text:creator");
|
||||
if(!nodSujet.getNodes().isEmpty()) return null;
|
||||
|
||||
String nameNodeSujet = nodSujet.getNomElt();
|
||||
|
||||
if(nodSujet.getNodes().size()>0) {
|
||||
for(int i = 0; i < nodSujet.getNodes().size() ; i++) {
|
||||
if(nodSujet.getNodes().get(i)!=null) {
|
||||
node nodEnfantSujet = nodSujet.getNodes().get(i);
|
||||
String nameNodeEnfantSujet = nodEnfantSujet.getNomElt();
|
||||
|
||||
if(nameNodeEnfantSujet.equals("text:user-defined")) {
|
||||
String valueAttribut = outils.withoutCodeAndPoint(nodSujet.retourneFirstEnfantsByName("text:user-defined").getAttributs().get("text:name"));
|
||||
if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue(nameNodeSujet,"text:user-defined", "text:name", valueAttribut);
|
||||
if(nod1Student!=null) if(nodStudent==null) nodStudent = nod1Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue(nameNodeSujet,"text:user-defined", "text:name", valueAttribut);
|
||||
if(nod0Student!=null) if(nodStudent==null) nodStudent = nod0Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue(nameNodeSujet,"text:user-defined", "text:name", valueAttribut);
|
||||
}
|
||||
|
||||
if(nameNodeEnfantSujet.equals("text:conditional-text")) {
|
||||
String valueAttribut = outils.withoutCodeAndPoint(nodSujet.retourneFirstEnfantsByName("text:conditional-text").getAttributs().get("text:condition"));
|
||||
if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue(nameNodeSujet,"text:conditional-text", "text:condition", valueAttribut);
|
||||
if(nod1Student!=null) if(nodStudent==null) nodStudent = nod1Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue(nameNodeSujet,"text:conditional-text", "text:condition", valueAttribut);
|
||||
if(nod0Student!=null) if(nodStudent==null) nodStudent = nod0Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue(nameNodeSujet,"text:conditional-text", "text:condition", valueAttribut);
|
||||
}
|
||||
|
||||
if(nameNodeEnfantSujet.equals("text:database-display")) {
|
||||
String valueAttribut = outils.withoutCodeAndPoint(nodSujet.retourneFirstEnfantsByName("text:database-display").getAttributs().get("text:column-name"));
|
||||
if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue(nameNodeSujet,"text:database-display", "text:column-name", valueAttribut);
|
||||
if(nod1Student!=null) if(nodStudent==null) nodStudent = nod1Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue(nameNodeSujet,"text:database-display", "text:column-name", valueAttribut);
|
||||
if(nod0Student!=null) if(nodStudent==null) nodStudent = nod0Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue(nameNodeSujet,"text:database-display", "text:column-name", valueAttribut);
|
||||
}
|
||||
|
||||
if(nameNodeEnfantSujet.equals("text:date")) {
|
||||
String valueAttribut = outils.withoutCodeAndPoint(nodSujet.retourneFirstEnfantsByName("text:date").getAttributs().get("text:fixed"));
|
||||
if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue(nameNodeSujet,"text:date", "text:fixed", valueAttribut);
|
||||
if(nod1Student!=null) if(nodStudent==null) nodStudent = nod1Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue(nameNodeSujet,"text:date", "text:fixed", valueAttribut);
|
||||
if(nod0Student!=null) if(nodStudent==null) nodStudent = nod0Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue(nameNodeSujet,"text:date", "text:fixed", valueAttribut);
|
||||
}
|
||||
|
||||
if(nameNodeEnfantSujet.equals("text:subject")) {
|
||||
if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstEnfantsByNameNode1ContainNameNode2(nameNodeSujet,"text:subject");
|
||||
if(nod1Student!=null) if(nodStudent==null) nodStudent = nod1Student.retourneFirstEnfantsByNameNode1ContainNameNode2(nameNodeSujet,"text:subject");
|
||||
if(nod0Student!=null) if(nodStudent==null) nodStudent = nod0Student.retourneFirstEnfantsByNameNode1ContainNameNode2(nameNodeSujet,"text:subject");
|
||||
}
|
||||
|
||||
if(nameNodeEnfantSujet.equals("text:title")) {
|
||||
if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstEnfantsByNameNode1ContainNameNode2(nameNodeSujet,"text:title");
|
||||
if(nod1Student!=null) if(nodStudent==null) nodStudent = nod1Student.retourneFirstEnfantsByNameNode1ContainNameNode2(nameNodeSujet,"text:title");
|
||||
if(nod0Student!=null) if(nodStudent==null) nodStudent = nod0Student.retourneFirstEnfantsByNameNode1ContainNameNode2(nameNodeSujet,"text:title");
|
||||
}
|
||||
|
||||
if(nameNodeEnfantSujet.equals("text:initial-creator")) {
|
||||
if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstEnfantsByNameNode1ContainNameNode2(nameNodeSujet,"text:initial-creator");
|
||||
if(nod1Student!=null) if(nodStudent==null) nodStudent = nod1Student.retourneFirstEnfantsByNameNode1ContainNameNode2(nameNodeSujet,"text:initial-creator");
|
||||
if(nod0Student!=null) if(nodStudent==null) nodStudent = nod0Student.retourneFirstEnfantsByNameNode1ContainNameNode2(nameNodeSujet,"text:initial-creator");
|
||||
}
|
||||
|
||||
if(nameNodeEnfantSujet.equals("text:creator")) {
|
||||
if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstEnfantsByNameNode1ContainNameNode2(nameNodeSujet,"text:creator");
|
||||
if(nod1Student!=null) if(nodStudent==null) nodStudent = nod1Student.retourneFirstEnfantsByNameNode1ContainNameNode2(nameNodeSujet,"text:creator");
|
||||
if(nod0Student!=null) if(nodStudent==null) nodStudent = nod0Student.retourneFirstEnfantsByNameNode1ContainNameNode2(nameNodeSujet,"text:creator");
|
||||
}
|
||||
|
||||
|
||||
if(nodStudent!=null) return nodStudent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// //si le node "text:p" contient un "text:user-defined" alors le recherche par le "text:name" de ce node "text:user-defined"
|
||||
// if(nodSujet.containElementByName("text:user-defined")) {
|
||||
// String valueAttribut = outils.withoutCodeAndPoint(nodSujet.retourneFirstEnfantsByName("text:user-defined").getAttributs().get("text:name"));
|
||||
// if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue("text:p","text:user-defined", "text:name", valueAttribut);
|
||||
// if(nod1Student!=null) if(nodStudent==null) nodStudent = nod1Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue("text:p","text:user-defined", "text:name", valueAttribut);
|
||||
// if(nod0Student!=null) if(nodStudent==null) nodStudent = nod0Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue("text:p","text:user-defined", "text:name", valueAttribut);
|
||||
// }
|
||||
// //si le node "text:p" contient un "text:conditional-text" alors le recherche par le "text:condition" de ce node "text:conditional-text"
|
||||
// if(nodSujet.containElementByName("text:conditional-text")) {
|
||||
// String valueAttribut = outils.withoutCodeAndPoint(nodSujet.retourneFirstEnfantsByName("text:conditional-text").getAttributs().get("text:condition"));
|
||||
// if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue("text:p","text:conditional-text", "text:condition", valueAttribut);
|
||||
// if(nod1Student!=null) if(nodStudent==null) nodStudent = nod1Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue("text:p","text:conditional-text", "text:condition", valueAttribut);
|
||||
// if(nod0Student!=null) if(nodStudent==null) nodStudent = nod0Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue("text:p","text:conditional-text", "text:condition", valueAttribut);
|
||||
// }
|
||||
// //si le node "text:p" contient un "text:database-display" alors le recherche par le "text:column-name" de ce node "text:database-display"
|
||||
// if(nodSujet.containElementByName("text:database-display")) {
|
||||
// String valueAttribut = outils.withoutCodeAndPoint(nodSujet.retourneFirstEnfantsByName("text:database-display").getAttributs().get("text:column-name"));
|
||||
// if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue("text:p","text:database-display", "text:column-name", valueAttribut);
|
||||
// if(nod1Student!=null) if(nodStudent==null) nodStudent = nod1Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue("text:p","text:database-display", "text:column-name", valueAttribut);
|
||||
// if(nod0Student!=null) if(nodStudent==null) nodStudent = nod0Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue("text:p","text:database-display", "text:column-name", valueAttribut);
|
||||
// }
|
||||
// //si le node "text:p" contient un "text:date" alors le recherche par le "text:fixed" de ce node "text:date"
|
||||
// if(nodSujet.containElementByName("text:date")) {
|
||||
// String valueAttribut = outils.withoutCodeAndPoint(nodSujet.retourneFirstEnfantsByName("text:date").getAttributs().get("text:fixed"));
|
||||
// if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue("text:p","text:date", "text:fixed", valueAttribut);
|
||||
// if(nod1Student!=null) if(nodStudent==null) nodStudent = nod1Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue("text:p","text:date", "text:fixed", valueAttribut);
|
||||
// if(nod0Student!=null) if(nodStudent==null) nodStudent = nod0Student.retourneFirstNodeByNameContainsNodeByNameAndAttributValue("text:p","text:date", "text:fixed", valueAttribut);
|
||||
// }
|
||||
// if(nodSujet.containElementByName("text:subject")) {
|
||||
// if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstEnfantsByNameNode1ContainNameNode2("text:p","text:subject");
|
||||
// if(nod1Student!=null) if(nodStudent==null) nodStudent = nod1Student.retourneFirstEnfantsByNameNode1ContainNameNode2("text:p","text:subject");
|
||||
// if(nod0Student!=null) if(nodStudent==null) nodStudent = nod0Student.retourneFirstEnfantsByNameNode1ContainNameNode2("text:p","text:subject");
|
||||
// }
|
||||
// if(nodSujet.containElementByName("text:title")) {
|
||||
// if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstEnfantsByNameNode1ContainNameNode2("text:p","text:title");
|
||||
// if(nod1Student!=null) if(nodStudent==null) nodStudent = nod1Student.retourneFirstEnfantsByNameNode1ContainNameNode2("text:p","text:title");
|
||||
// if(nod0Student!=null) if(nodStudent==null) nodStudent = nod0Student.retourneFirstEnfantsByNameNode1ContainNameNode2("text:p","text:title");
|
||||
// }
|
||||
// if(nodSujet.containElementByName("text:initial-creator")) {
|
||||
// if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstEnfantsByNameNode1ContainNameNode2("text:p","text:initial-creator");
|
||||
// if(nod1Student!=null) if(nodStudent==null) nodStudent = nod1Student.retourneFirstEnfantsByNameNode1ContainNameNode2("text:p","text:initial-creator");
|
||||
// if(nod0Student!=null) if(nodStudent==null) nodStudent = nod0Student.retourneFirstEnfantsByNameNode1ContainNameNode2("text:p","text:initial-creator");
|
||||
// }
|
||||
// if(nodSujet.containElementByName("text:creator")) {
|
||||
// if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstEnfantsByNameNode1ContainNameNode2("text:p","text:creator");
|
||||
// if(nod1Student!=null) if(nodStudent==null) nodStudent = nod1Student.retourneFirstEnfantsByNameNode1ContainNameNode2("text:p","text:creator");
|
||||
// if(nod0Student!=null) if(nodStudent==null) nodStudent = nod0Student.retourneFirstEnfantsByNameNode1ContainNameNode2("text:p","text:creator");
|
||||
// }
|
||||
|
||||
|
||||
//** Recherche par contenu
|
||||
if(!nodSujet.getContenu().isEmpty()) {
|
||||
|
@ -243,7 +324,7 @@ public class rechercherUnNodeStudent {
|
|||
if(nod0Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByFindContentExact(nod0Student.getNodes(), valueAttribut, nodSujet.getNomElt());
|
||||
}
|
||||
|
||||
//** Recherche le node par index uniquement. Si trouve pa retourne un null.
|
||||
//** Recherche le node par index uniquement même si pas demandé. Si trouve pas retourne un null.
|
||||
if(nodSujet.getAttributs().get("index")!=null){
|
||||
String valueAttribut = nodSujet.getAttributs().get("index");
|
||||
if(nod2Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByNameAttributValue(nod2Student.getNodes(), nodSujet.getNomElt(),"index",valueAttribut);
|
||||
|
@ -285,6 +366,26 @@ public class rechercherUnNodeStudent {
|
|||
return nodStudent;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param nameNode
|
||||
* @param nodSujet
|
||||
* @param nod0Student
|
||||
* @param nod1Student
|
||||
* @param nod2Student
|
||||
* @param a
|
||||
* @return
|
||||
*/
|
||||
private static node findTextConditional(String nameNode, node nodSujet,node nod0Student, node nod1Student, node nod2Student, Run a) {
|
||||
node nodStudent = null;
|
||||
String valueAttribut = outils.withoutCodeAndPoint(nodSujet.getAttributs().get("text:condition"));
|
||||
if(nod2Student!=null) nodStudent = a.retourneFirstNodeByNameAttributValue(nod2Student, nameNode, "text:condition", valueAttribut);
|
||||
if(nod1Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByNameAttributValue(nod1Student, nameNode, "text:condition", valueAttribut);
|
||||
if(nod0Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByNameAttributValue(nod0Student, nameNode, "text:condition", valueAttribut);
|
||||
|
||||
return nodStudent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Recherche Le node text:section par l'attribut text:name;</br>
|
||||
* @param nameNode
|
||||
|
@ -303,6 +404,26 @@ public class rechercherUnNodeStudent {
|
|||
|
||||
return nodStudent;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param nameNode
|
||||
* @param nodSujet
|
||||
* @param nod0Student
|
||||
* @param nod1Student
|
||||
* @param nod2Student
|
||||
* @param a
|
||||
* @return
|
||||
*/
|
||||
private static node findTextDate(String nameNode, node nodSujet,node nod0Student, node nod1Student, node nod2Student, Run a) {
|
||||
node nodStudent = null;
|
||||
String valueAttribut = outils.withoutCodeAndPoint(nodSujet.getAttributs().get("text:fixed"));
|
||||
if(nod2Student!=null) nodStudent = a.retourneFirstNodeByNameAttributValue(nod2Student, nameNode, "text:fixed", valueAttribut);
|
||||
if(nod1Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByNameAttributValue(nod1Student, nameNode, "text:fixed", valueAttribut);
|
||||
if(nod0Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByNameAttributValue(nod0Student, nameNode, "text:fixed", valueAttribut);
|
||||
|
||||
return nodStudent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Recherche le node par son nom. Retourne le premier node qui correspond au nom du node.</br>
|
||||
|
@ -335,9 +456,10 @@ public class rechercherUnNodeStudent {
|
|||
*/
|
||||
private static node findDataBase(String nameNode, node nodSujet,node nod0Student, node nod1Student, node nod2Student, Run a) {
|
||||
node nodStudent = null;
|
||||
if(nod2Student!=null) nodStudent = a.retourneFirstNodeByNameAttributValue(nod2Student, nameNode, "text:column-name", outils.withoutCodeAndPoint(nodSujet.getAttributs().get("text:column-name")));
|
||||
if(nod1Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByNameAttributValue(nod1Student, nameNode, "text:column-name", outils.withoutCodeAndPoint(nodSujet.getAttributs().get("text:column-name")));
|
||||
if(nod0Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByNameAttributValue(nod0Student, nameNode, "text:column-name", outils.withoutCodeAndPoint(nodSujet.getAttributs().get("text:column-name")));
|
||||
String valueAttribut = outils.withoutCodeAndPoint(nodSujet.getAttributs().get("text:column-name"));
|
||||
if(nod2Student!=null) nodStudent = a.retourneFirstNodeByNameAttributValue(nod2Student, nameNode, "text:column-name", valueAttribut);
|
||||
if(nod1Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByNameAttributValue(nod1Student, nameNode, "text:column-name", valueAttribut);
|
||||
if(nod0Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByNameAttributValue(nod0Student, nameNode, "text:column-name", valueAttribut);
|
||||
|
||||
return nodStudent;
|
||||
}
|
||||
|
|
|
@ -199,6 +199,89 @@ public class verificationFichierAnalyse {
|
|||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Vérification du node sujet (premier node <b>fichier</b> et des paramètres.<br>
|
||||
* <br>
|
||||
* @param nodSujet
|
||||
* @return
|
||||
*/
|
||||
public static node InitialisationAvantAnalyse(node nodSujet) {
|
||||
node initSujet = new node();
|
||||
initSujet.setNomElt("init");
|
||||
|
||||
boolean erreur=false;
|
||||
boolean erreurNomPremierNodeFichier=false;
|
||||
boolean erreurManqueAttributEvaluerPremierNodeFichier=false;
|
||||
boolean erreurValeurAttributEvaluerPremierNodeFichier=false;
|
||||
boolean erreurPasNodesEnfantsAuPremierNodeFichier=false;
|
||||
boolean erreurPasAttributMetaSujetAuPremierNodeFichier=false;
|
||||
boolean erreurValeurVideAttributMetaSujetAuPremierNodeFichier=false;
|
||||
boolean erreurValeurAttributProgressionNonConvertibleEnDouble=false;
|
||||
boolean erreurValeurAttributNoteFromNonConvertibleEnDouble=false;
|
||||
|
||||
if(!nodSujet.getNomElt().equals("fichier")) {
|
||||
erreur=true;
|
||||
erreurNomPremierNodeFichier = true;
|
||||
}
|
||||
if(nodSujet.getAttributs().get("evaluer")==null) {
|
||||
erreur=true;
|
||||
erreurManqueAttributEvaluerPremierNodeFichier = true;
|
||||
}
|
||||
if(nodSujet.getAttributs().get("evaluer")!=null) {
|
||||
if(!nodSujet.getAttributs().get("evaluer").equals("true")) {
|
||||
erreur=true;
|
||||
erreurValeurAttributEvaluerPremierNodeFichier=true;
|
||||
}
|
||||
}
|
||||
if(nodSujet.getNodes().isEmpty()) {
|
||||
erreur=true;
|
||||
erreurPasNodesEnfantsAuPremierNodeFichier=true;
|
||||
}
|
||||
if(nodSujet.getAttributs().get("metaSujet")==null) {
|
||||
erreur=true;
|
||||
erreurPasAttributMetaSujetAuPremierNodeFichier=true;
|
||||
}
|
||||
if(nodSujet.getAttributs().get("metaSujet")!=null) {
|
||||
if(nodSujet.getAttributs().get("metaSujet").isEmpty()) {
|
||||
erreur=true;
|
||||
erreurValeurVideAttributMetaSujetAuPremierNodeFichier=true;
|
||||
}
|
||||
}
|
||||
if(nodSujet.getAttributs().get("progression")!=null) {
|
||||
String p = nodSujet.getAttributs().get("progression");
|
||||
try {
|
||||
Double.valueOf(p);
|
||||
} catch (Exception e) {
|
||||
erreur=true;
|
||||
erreurValeurAttributProgressionNonConvertibleEnDouble=true;
|
||||
}
|
||||
}
|
||||
if(nodSujet.getAttributs().get("notefrom")!=null) {
|
||||
String p = nodSujet.getAttributs().get("notefrom");
|
||||
try {
|
||||
Double.valueOf(p);
|
||||
} catch (Exception e) {
|
||||
erreur=true;
|
||||
erreurValeurAttributNoteFromNonConvertibleEnDouble=true;
|
||||
}
|
||||
}
|
||||
|
||||
initSujet.getAttributs().put("erreur",String.valueOf(erreur));
|
||||
initSujet.getAttributs().put("erreurNomPremierNodeFichier",String.valueOf(erreurNomPremierNodeFichier));
|
||||
initSujet.getAttributs().put("erreurManqueAttributEvaluerPremierNodeFichier",String.valueOf(erreurManqueAttributEvaluerPremierNodeFichier));
|
||||
initSujet.getAttributs().put("erreurValeurAttributEvaluerPremierNodeFichier",String.valueOf(erreurValeurAttributEvaluerPremierNodeFichier));
|
||||
initSujet.getAttributs().put("erreurPasNodesEnfantsAuPremierNodeFichier",String.valueOf(erreurPasNodesEnfantsAuPremierNodeFichier));
|
||||
initSujet.getAttributs().put("erreurPasAttributMetaSujetAuPremierNodeFichier",String.valueOf(erreurPasAttributMetaSujetAuPremierNodeFichier));
|
||||
initSujet.getAttributs().put("erreurValeurVideAttributMetaSujetAuPremierNodeFichier",String.valueOf(erreurValeurVideAttributMetaSujetAuPremierNodeFichier));
|
||||
initSujet.getAttributs().put("erreurValeurAttributProgressionNonConvertibleEnDouble",String.valueOf(erreurValeurAttributProgressionNonConvertibleEnDouble));
|
||||
initSujet.getAttributs().put("erreurValeurAttributNoteFromNonConvertibleEnDouble",String.valueOf(erreurValeurAttributNoteFromNonConvertibleEnDouble));
|
||||
|
||||
return initSujet;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Vérification de la présence de l'attribut addmenu=true lorsque l'attribut evaluer=true.<br>
|
||||
* Uniquement pour les nodes principaux.<br>
|
||||
|
@ -648,7 +731,7 @@ public class verificationFichierAnalyse {
|
|||
System.out.println("\t\t│ │");
|
||||
System.out.println("\t\t│ (')_(') │");
|
||||
System.out.println("\t\t│ ( `.° ) │");
|
||||
System.out.println("\t\t│ (\")__(\") .. à bientôt, analyseWriter. │");
|
||||
System.out.println("\t\t│ (\")__(\") .. à bientôt, analyseWriter. │");
|
||||
System.out.println("\t\t└───────────────────────────────────────────────────────────┘");
|
||||
System.out.println();
|
||||
System.exit(0);
|
||||
|
|
Loading…
Reference in New Issue