MAJ V4.5.0
Amélioration de la méthode TraitementIntervalle. Prise en charge des valerus négatives. L'index des illustration maintenant recherche et analyse tous les nodes.
This commit is contained in:
parent
62758c840c
commit
e6e62e15f7
@ -12,6 +12,6 @@
|
||||
<classpathentry kind="lib" path="C:/Users/pabr6/git/analyseWriter/MEPTL/miglayout15-swing.jar"/>
|
||||
<classpathentry kind="lib" path="jgoodies-forms-1.8.0.jar" sourcepath="jgoodies-forms-1.8.0-sources.jar"/>
|
||||
<classpathentry kind="lib" path="C:/Users/pabr6/eclipse-workspace/Exportation documentation analyseWriter/plugins/documentation.analyseWriter_1.0.0.202212032022.jar"/>
|
||||
<classpathentry kind="lib" path="C:/Users/pabr6/eclipse-workspace/cXML.jar"/>
|
||||
<classpathentry kind="lib" path="C:/Users/pabr6/eclipse-workspace/cXML.jar" sourcepath="/cXML"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
Binary file not shown.
File diff suppressed because one or more lines are too long
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.
@ -6,6 +6,8 @@ import java.util.Date;
|
||||
import java.util.Dictionary;
|
||||
import java.util.Hashtable;
|
||||
|
||||
import javax.swing.JEditorPane;
|
||||
|
||||
import cXML.Run;
|
||||
import cXML.node;
|
||||
import calcul.formatDateWriter;
|
||||
@ -21,7 +23,7 @@ public class VerificationHistorique {
|
||||
* @throws ParseException
|
||||
* @throws CloneNotSupportedException
|
||||
*/
|
||||
public static node verificationHistorique(node verification, Run a) throws ParseException, CloneNotSupportedException {
|
||||
public static node verificationHistorique(node verification, Run a, JEditorPane txt) throws ParseException, CloneNotSupportedException {
|
||||
|
||||
|
||||
node verif = new node();
|
||||
@ -39,8 +41,9 @@ public class VerificationHistorique {
|
||||
|
||||
commandes.message.append("\n\n***** DEBUT VERIFICATION DES HISTORIQUES DES MODIFICATION ****\n");
|
||||
|
||||
|
||||
int nbFichier = LesFichiers.size();
|
||||
for(int i = 0 ; i < LesFichiers.size() ; i++) {
|
||||
|
||||
node nodStudent = new node();
|
||||
nodStudent.setNomElt("fichier");
|
||||
nodStudent.setAttributs(LesFichiers.get(i).getAttributs());
|
||||
@ -57,7 +60,9 @@ public class VerificationHistorique {
|
||||
int compteurnombreCorrespondancesSuivi = 0;
|
||||
int compteurnombreCorrespondancesconsecutive = 0;
|
||||
|
||||
System.out.println(LesFichiers.get(i).getAttributs().get("dossier") + " - number of modifications : " + nombreModifications);
|
||||
// Affichage
|
||||
txt.setText("Analyse du fichier " + i + " / " + nbFichier +"\n"
|
||||
+LesFichiers.get(i).getAttributs().get("dossier") + " - number of modifications : " + nombreModifications);
|
||||
commandes.message.append("\n"+LesFichiers.get(i).getAttributs().get("dossier") + " - number of modifications : " + nombreModifications);
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
@ -28,6 +28,7 @@ import cXML.node;
|
||||
import calcul.formatDateWriter;
|
||||
import evaluer.analyseFichier;
|
||||
import evaluer.evaluation;
|
||||
import fenetres.evaluate;
|
||||
import net.lingala.zip4j.exception.ZipException;
|
||||
|
||||
|
||||
@ -343,10 +344,18 @@ public class meptl {
|
||||
// renomme le node text:table-of-content-source en text:table-of-content-sourceTitreIndex
|
||||
ArrayList<node> A = a.retourneNames(nodbody, "text:table-of-content");
|
||||
for(int j = 0 ; j<A.size(); j++) {
|
||||
if(A.get(j).retourneFirstEnfantsByName("text:index-title-template").getContenu().size()>0) {
|
||||
String titreIndex=A.get(j).retourneFirstEnfantsByName("text:index-title-template").getContenu().get(0).toLowerCase();
|
||||
titreIndex = titreIndex.replace(" ", "_");
|
||||
A.get(j).retourneFirstEnfantsByName("text:table-of-content-source").setNomElt("text:table-of-content-source"+titreIndex);
|
||||
nodtable.getNodes().add(A.get(j));
|
||||
}else {
|
||||
String titreIndex = "null";
|
||||
titreIndex = titreIndex.replace(" ", "_");
|
||||
A.get(j).retourneFirstEnfantsByName("text:table-of-content-source").setNomElt("text:table-of-content-source"+titreIndex);
|
||||
nodtable.getNodes().add(A.get(j));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1053,7 +1062,7 @@ public class meptl {
|
||||
verification.getNodes().add(nodStudent);
|
||||
}
|
||||
//a.ecritureNodeEnXML(verification, "VerificationHistorique","",false); //écriture du node de l'étudiant
|
||||
verif = VerificationHistorique.verificationHistorique(verification, a); // vérification des correspondances entre les fichiers
|
||||
verif = VerificationHistorique.verificationHistorique(verification, a, evaluate.getTxtpnmessages()); // vérification des correspondances entre les fichiers
|
||||
|
||||
//********************************
|
||||
//** Ecriture du node verif.xml **
|
||||
|
@ -693,8 +693,9 @@ public class analyseLesNodesPrincipaux {
|
||||
int pointTotalDebut = evaluation.getPointTotal();
|
||||
node table = new node();
|
||||
table.setNomElt("tableillustrations");
|
||||
String TitreTable = evaluation.withoutCodeAndPoint(nodSujetTableI.getNodes().get(i).retourneFirstEnfantsByName("text:index-title").retourneLesContenusEnfants(""));
|
||||
node nodSujet = a.retourneFirstNodeParagrapheContain(a.retourneNames(nodSujetTableI, "text:index-body"), TitreTable);
|
||||
String TitreTable = evaluation.withoutCodeAndPoint(nodSujetTableI.getNodes().get(i).retourneFirstEnfantsByName("text:index-title-template").retourneLesContenusEnfants(""));
|
||||
node nodSujet = a.retourneFirstNodeByFindContent(nodSujetTableI.getNodes(),TitreTable);
|
||||
nodSujet = nodSujet.retourneParentByNameNode("text:illustration-index");
|
||||
|
||||
//*****************************
|
||||
//** Ajoute un saut de ligne **
|
||||
@ -709,76 +710,20 @@ public class analyseLesNodesPrincipaux {
|
||||
//*******************************
|
||||
//** Recherche le node Student **
|
||||
//*******************************
|
||||
node nodStudent = a.retourneFirstNodeParagrapheContain(a.retourneNames(nodStudentTableI, "text:index-body"), TitreTable);
|
||||
node nodStudent = a.retourneFirstNodeByFindContent(nodStudentTableI.getNodes(),TitreTable);
|
||||
if(nodStudent!=null) nodStudent = nodStudent.retourneParentByNameNode("text:illustration-index");
|
||||
if(nodStudent==null) if(nodStudentTableI!=null) if(nodStudentTableI.getNodes().size()>0) nodStudent = nodStudentTableI.getNodes().get(0);
|
||||
|
||||
|
||||
//*********************************************
|
||||
//** analyse les attributs des nodes <table> **
|
||||
//*********************************************
|
||||
table = evaluationAttribut.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 = evaluationAttribut.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 = evaluationAttribut.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 = evaluationAttribut.evalLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j).getNodes().get(k), table, "ana:tableillustration", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
|
||||
}
|
||||
}
|
||||
}else {
|
||||
table = evaluationAttribut.evalLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j), table, "ana:tableillustration", nodSujet.getNodes().get(j).getNomElt());
|
||||
}
|
||||
}else {
|
||||
table = evaluationAttribut.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 = evaluationAttribut.evalLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j).getNodes().get(k), table, "ana:tableillustration", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//*******************************
|
||||
//** Recherche le node Student **
|
||||
//*******************************
|
||||
nodSujet = nodSujet.getParent().retourneFirstEnfantsByName("text:illustration-index-sourceIllustrations");
|
||||
if(nodStudent!=null) {
|
||||
nodStudent = nodStudent.getParent().retourneFirstEnfantsByName("text:illustration-index-sourceIllustrations");
|
||||
//*********************************************
|
||||
//** analyse les attributs des nodes <table> **
|
||||
//*********************************************
|
||||
table = evaluationAttribut.evalLesAttributEtContenuDuNode(nodStudent, nodSujet, table, "ana:tableillustration", nodSujet.getNomElt());
|
||||
|
||||
//**************************************************************************************
|
||||
//** Parcours les nodes enfants du node <text:illustration-index-sourceIllustrations> **
|
||||
//**************************************************************************************
|
||||
for(int j =0 ; j < nodSujet.getNodes().size();j++) {
|
||||
if(nodStudent!=null) {
|
||||
if(j<nodStudent.getNodes().size()) {
|
||||
table = evaluationAttribut.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 = evaluationAttribut.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 = evaluationAttribut.evalLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j).getNodes().get(k), table, "ana:tableillustration", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
|
||||
}
|
||||
}
|
||||
}else {
|
||||
table = evaluationAttribut.evalLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j), table, "ana:tableillustration", nodSujet.getNodes().get(j).getNomElt());
|
||||
}
|
||||
}else {
|
||||
table = evaluationAttribut.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 = evaluationAttribut.evalLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j).getNodes().get(k), table, "ana:tableillustration", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//************************************
|
||||
//** analyse tous les nodes enfants **
|
||||
//************************************
|
||||
table = analyseLesNodesEnfants.nodeNext(table, "ana:tableillustration", nodStudent, null, null, nodSujet, null, null, nodmenu,a);
|
||||
|
||||
//****************************************************************
|
||||
//** Insère les attributs des points dans les node de l'analyse **
|
||||
|
@ -215,7 +215,7 @@ public class evaluation {
|
||||
Pattern p = Pattern.compile("^#[a-z0-9]{6} ([0-9]{1,}\\.[0-9]{1,}|[0-9]{1,})[a-z]{2}");
|
||||
Matcher m = p.matcher(Sujet.trim());
|
||||
if(m.find()) {
|
||||
if(Traitementombrage(Sujet, A).equals("Correct : ")) {
|
||||
if(TraitementOmbrage(Sujet, A).equals("Correct : ")) {
|
||||
IncrementPointClass(pointEnJeu);
|
||||
return "Correct : +" + pointString;
|
||||
}else {
|
||||
@ -381,14 +381,19 @@ public class evaluation {
|
||||
}
|
||||
|
||||
|
||||
// rechercher un digite une ou plusieurs fois en fin.
|
||||
Pattern p = Pattern.compile("[^0-9\\.]");
|
||||
// Rechercher un digite une ou plusieurs fois en fin.
|
||||
// Pattern p = Pattern.compile("[^0-9\\.]"); //uniquement des valeur positive
|
||||
Pattern p = Pattern.compile("[^-?0-9\\.]"); //Avec des valeurs négatives
|
||||
|
||||
|
||||
// remplacement de toutes les occurrences par ""
|
||||
if(Text[0]!=null) Text[0]= p.matcher(Text[0]).replaceAll("");
|
||||
if(Text[1]!=null) Text[1] = p.matcher(Text[1]).replaceAll("");
|
||||
|
||||
A = p.matcher(A).replaceAll("");
|
||||
|
||||
|
||||
|
||||
double b0=0.0;
|
||||
double b1=0.0;
|
||||
try{
|
||||
@ -554,7 +559,7 @@ public class evaluation {
|
||||
* @param B
|
||||
* @return
|
||||
*/
|
||||
private static String Traitementombrage(String Sujet, String B) {
|
||||
private static String TraitementOmbrage(String Sujet, String B) {
|
||||
if(Sujet.isEmpty()) return "Erreur : ";
|
||||
if(B==null) return "Erreur : ";
|
||||
|
||||
|
@ -106,7 +106,7 @@ public class evaluerLesFichiersEtudiants implements Runnable{
|
||||
//** Ecriture du node verif.xml **
|
||||
//********************************
|
||||
try {
|
||||
verif = VerificationHistorique.verificationHistorique(verification, a);
|
||||
verif = VerificationHistorique.verificationHistorique(verification, a,txt);
|
||||
Run.ecritureNodeEnXML(verif, "Verif",commandes.path, Run.TypeFile.Verif );
|
||||
} catch (IOException | ParseException | CloneNotSupportedException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -67,13 +67,12 @@ public class allContent extends JFrame {
|
||||
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
||||
setBounds(100, 100, 589, 366);
|
||||
|
||||
// setTitle("allContent");
|
||||
ImageIcon img = new ImageIcon(getClass().getResource("/evalwriter.png") );
|
||||
int screenWidth = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getWidth();
|
||||
int screenHeight = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getHeight();
|
||||
setLocation(( (screenWidth) - getWidth()) / 2, (screenHeight - getHeight()) / 2);
|
||||
|
||||
setTitle("allContent - " + commandes.Titre + " " + commandes.version + " " + commandes.branch);
|
||||
setTitle("Méthode allContent - " + commandes.Titre + " " + commandes.version + " " + commandes.branch);
|
||||
setIconImage(img.getImage());
|
||||
|
||||
|
||||
@ -188,6 +187,11 @@ public class allContent extends JFrame {
|
||||
}
|
||||
}
|
||||
}
|
||||
if(nod.getNomElt().equals("text:index-body")) {
|
||||
for(int i = 0 ; i < nod.getNodes().size(); i++) {
|
||||
placeAtrtibutAllContentDansLesNodesDeLaPage(nod,comboBoxValeur.getSelectedItem().toString(),point);
|
||||
}
|
||||
}
|
||||
|
||||
J.refreshAffichage(nod);
|
||||
}
|
||||
@ -218,11 +222,11 @@ public class allContent extends JFrame {
|
||||
}
|
||||
|
||||
|
||||
private void placeAtrtibutAllContentDansLesNodesDeLaPage(node nodePage,String methode, Integer point) {
|
||||
for(int i = 0 ; i < nodePage.getNodes().size(); i++) {
|
||||
if( listeDesNodesAllContent.isAllContent(nodePage.getNodes().get(i))){
|
||||
nodePage.getNodes().get(i).getAttributs().put("allContent", methode+String.valueOf(point));
|
||||
nodePage.getNodes().get(i).evaluerAllChildTrue(); }
|
||||
private void placeAtrtibutAllContentDansLesNodesDeLaPage(node nod,String methode, Integer point) {
|
||||
for(int i = 0 ; i < nod.getNodes().size(); i++) {
|
||||
if( listeDesNodesAllContent.isAllContent(nod.getNodes().get(i))){
|
||||
nod.getNodes().get(i).getAttributs().put("allContent", methode+String.valueOf(point));
|
||||
nod.getNodes().get(i).evaluerAllChildTrue(); }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@ public class listeDesNodesAllContent {
|
||||
case "page":return true;
|
||||
case "text:time":return true;
|
||||
case "structurepage":return true;
|
||||
case "text:index-body":return true;
|
||||
|
||||
case "number:text":return false;
|
||||
case "text:page-count":return false;
|
||||
|
@ -15,6 +15,7 @@ public static boolean isContientEnfant(node nod) {
|
||||
case "text:list": return true;
|
||||
case "text:list-item": return true;
|
||||
case "text:note":return true;
|
||||
case "text:index-body":return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user