MAJ V4.4.2 - ajout des styles pour les dates et les heures. Ajout des
styles pour les graphiques. Ajout dans la méthode analyseStyle des style des dates et des heures.
This commit is contained in:
parent
ab14e62680
commit
bdf7d1f861
@ -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" sourcepath="/cXML"/>
|
||||
<classpathentry kind="lib" path="C:/Users/pabr6/eclipse-workspace/cXML.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -34,7 +34,7 @@ public class commandes {
|
||||
//**version
|
||||
public static String version ="V4.4.2"; // La version actuelle
|
||||
public static String branch = "Origin";
|
||||
public static String Annee ="2022";
|
||||
public static String Annee ="2023";
|
||||
|
||||
//***************************************************
|
||||
//** Les commandes par défaut à travers la console **
|
||||
|
@ -6,9 +6,9 @@ import java.util.ArrayList;
|
||||
import cXML.Run;
|
||||
import cXML.node;
|
||||
import list.listeDesNodesAnalyseStyle;
|
||||
import list.listeDesNodesAvecEvalNameNode;
|
||||
import list.listeDesNodesEvalPlacement;
|
||||
import list.listeDesNodesRechercheByContenu;
|
||||
import list.listeEvalNameNode;
|
||||
import list.listeRechercheParAnchorPageNumber;
|
||||
|
||||
|
||||
@ -304,7 +304,7 @@ public class ecritureSujet {
|
||||
for(int k=0 ; k < no.size(); k++) {
|
||||
if(no.get(k)!=null) {
|
||||
no.get(k).getAttributs().put("evaluer", "false");
|
||||
if( listeDesNodesAvecEvalNameNode.isEvalNameNode(no.get(k))) no.get(k).getAttributs().put("evalNameNode", "0");
|
||||
if( listeEvalNameNode.isNodeEvalNameNode(no.get(k))) no.get(k).getAttributs().put("evalNameNode", "0");
|
||||
if(listeDesNodesSautEtTitre(no.get(k).getNomElt())) {no.get(k).getAttributs().put("saut", "false"); no.get(k).getAttributs().put("titre", "");}
|
||||
if(listeDesNodesRechercheByContenu.isRechercheByContenu(no.get(k))) {no.get(k).getAttributs().put("recherche_index", "false"); no.get(k).getAttributs().put("recherche_contenu_exact", "false");no.get(k).getAttributs().put("recherche_contenu_plus_proche_voisin", "false");no.get(k).getAttributs().put("allContent", "strict0");}
|
||||
if(listeDesNodesEvalPlacement.isPlacement(no.get(k)))no.get(k).getAttributs().put("evalPlacement", "0");
|
||||
|
@ -564,9 +564,13 @@ public class meptl {
|
||||
nodstyleparagraphe.addNode(a.NodesAyantAttribut(nodstyle, "style:family","text"));
|
||||
nodstyleparagraphe.addNode(a.NodesAyantAttribut(nodstyle, "style:family","section"));
|
||||
nodstyleparagraphe.addNode(a.NodesAyantAttribut(nodstyle, "style:family","graphic"));
|
||||
nodstyleparagraphe.addNode(nodstyle.retourneEnfantsByName("number:date-style", new ArrayList<node>()));
|
||||
nodstyleparagraphe.addNode(nodstyle.retourneEnfantsByName("number:time-style", new ArrayList<node>()));
|
||||
nodstyleparagraphe = ajouteValeurLesValeursDuStyleParagraphParent(nodstyleparagraphe);
|
||||
nodstyleparagraphe = ajouteValeurParDefautAuStyleParagraph(nodstyleparagraphe);
|
||||
|
||||
|
||||
//Nettoyer des nodes null les styles
|
||||
// nettoyerDesNoddesNull(nodstyleparagraphe);
|
||||
|
||||
//Le node numérotation des chapitres
|
||||
node nodnumerochapitre = new node();
|
||||
@ -669,6 +673,9 @@ public class meptl {
|
||||
}
|
||||
|
||||
|
||||
//Transformation des node number:date-style et number:time-style en style
|
||||
transformationNumberDateToStyle(nodstyleparagraphe, nodstructure);
|
||||
|
||||
// Struture et composition du document avec les pages
|
||||
// cette boucle utilise le node nodstructure
|
||||
ArrayList<node> nodpage = new ArrayList<node>();
|
||||
@ -682,6 +689,7 @@ public class meptl {
|
||||
|
||||
for(int j = 0 ; j< nodstructure.getNodes().size();j++) {
|
||||
|
||||
|
||||
page = nodpage.get(nodpage.size()-1); // dernière page enregistrer pour insérer des enfants en bas de la boucle
|
||||
|
||||
//******************************************************************************
|
||||
@ -979,6 +987,8 @@ public class meptl {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ajoute au node de la page les éléments sauf les paragraphes de texte
|
||||
page.getNodes().add(nodstructure.getNodes().get(j));
|
||||
|
||||
@ -1006,7 +1016,7 @@ public class meptl {
|
||||
if(nodpage.get(j).getAttributs().get("type").equals("automatique")) {
|
||||
if(nodpage.get(j-1).getAttributs().get("style:master-page-name")!=null) {
|
||||
node nod5 = a.retourneFirstNodeByNameAttributValue(nodstylepage, "style:master-page", "style:name", nodpage.get(j-1).getAttributs().get("style:master-page-name"));
|
||||
if(nod5.getAttributs().get("style:next-style-name")!=null) {
|
||||
if(nod5!=null) if(nod5.getAttributs().get("style:next-style-name")!=null) {
|
||||
nodpage.get(j).getAttributs().put("style:master-page-name", nod5.getAttributs().get("style:next-style-name"));
|
||||
}else {
|
||||
nodpage.get(j).getAttributs().put("style:master-page-name", nodpage.get(j-1).getAttributs().get("style:master-page-name"));
|
||||
@ -1041,7 +1051,7 @@ public class meptl {
|
||||
|
||||
if(nodpage.get(j-1).getAttributs().get("style:master-page-name")!=null) {
|
||||
node nod5 = a.retourneFirstNodeByNameAttributValue(nodstylepage, "style:master-page", "style:name", nodpage.get(j-1).getAttributs().get("style:master-page-name"));
|
||||
if(nod5.getAttributs().get("style:page-layout-name")!=null) {
|
||||
if(nod5!=null) if(nod5.getAttributs().get("style:page-layout-name")!=null) {
|
||||
node nod6 = a.retourneFirstNodeByNameAttributValue(nodstylepage, "style:page-layout", "style:name", nod5.getAttributs().get("style:page-layout-name"));
|
||||
if(nod6.getAttributs().get("style:page-usage")!=null) {
|
||||
usage2 = nod6.getAttributs().get("style:page-usage");
|
||||
@ -1064,7 +1074,7 @@ public class meptl {
|
||||
}else {
|
||||
if(nodpage.get(j).getAttributs().get("style:master-page-name")!=null) {
|
||||
node nod5 = a.retourneFirstNodeByNameAttributValue(nodstylepage, "style:master-page", "style:name", nodpage.get(j).getAttributs().get("style:master-page-name"));
|
||||
if(nod5.getAttributs().get("style:page-layout-name")!=null) {
|
||||
if(nod5!=null) if(nod5.getAttributs().get("style:page-layout-name")!=null) {
|
||||
node nod6 = a.retourneFirstNodeByNameAttributValue(nodstylepage, "style:page-layout", "style:name", nod5.getAttributs().get("style:page-layout-name"));
|
||||
if(nod6.getAttributs().get("style:page-usage")!=null) {
|
||||
nodpage.get(j).getAttributs().put("style:page-usage", nod6.getAttributs().get("style:page-usage"));
|
||||
@ -2654,12 +2664,21 @@ public class meptl {
|
||||
node LesStyleDefaut = null;
|
||||
|
||||
if(ensembleDesParagraphes.retourneEnfantsByNameExist("style:default-style")) {
|
||||
LesStyleDefaut = ensembleDesParagraphes.retourneFirstEnfantsByName("style:default-style");
|
||||
LesStyleDefaut = ensembleDesParagraphes.retourneFirstNodeByNameAndAttributValue("style:default-style","style:family","paragraph");
|
||||
if(LesStyleDefaut==null) return ensembleDesParagraphes;
|
||||
}
|
||||
|
||||
|
||||
|
||||
for(int i =0 ; i < ensembleDesParagraphes.getNodes().size(); i++) {
|
||||
|
||||
node nodStyle = ensembleDesParagraphes.getNodes().get(i);
|
||||
if(nodStyle.getAttributs().get("style:family")!=null) {
|
||||
if(!nodStyle.getAttributs().get("style:family").equals("paragraph")) continue;
|
||||
}else {
|
||||
continue;
|
||||
}
|
||||
|
||||
//le paragarph properties
|
||||
node nodeStyleParDefautParagraphProperties = LesStyleDefaut.retourneFirstEnfantsByName("style:paragraph-properties");
|
||||
node LesNodesStyleParagraph = nodStyle.retourneFirstEnfantsByName("style:paragraph-properties");
|
||||
@ -2789,8 +2808,50 @@ public class meptl {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Transformation des nodes number:date-style en style:style (pour évaluation avec analyseStyle;</br>
|
||||
* @param nodStyles
|
||||
*/
|
||||
private static void transformationNumberDateToStyle(node nodStyles, node structure) {
|
||||
for(int i = 0 ; i < nodStyles.getNodes().size();i++) {
|
||||
if(nodStyles.getNodes().get(i).getNomElt().equals("number:date-style")) {
|
||||
nodStyles.getNodes().get(i).setNomElt("style:style");
|
||||
nodStyles.getNodes().get(i).getAttributs().put("style:family", "number:date-style");
|
||||
String nameStyle= nodStyles.getNodes().get(i).getAttributs().get("style:name");
|
||||
node nod = structure.retourneFirstNodeByNameAndAttributValueExactStrict("text:date", "style:data-style-name", nameStyle);
|
||||
if(nod!=null) {
|
||||
nod.getAttributs().put("text:style-name", nameStyle);
|
||||
}
|
||||
}
|
||||
if(nodStyles.getNodes().get(i).getNomElt().equals("number:time-style")) {
|
||||
nodStyles.getNodes().get(i).setNomElt("style:style");
|
||||
nodStyles.getNodes().get(i).getAttributs().put("style:family", "number:time-style");
|
||||
String nameStyle= nodStyles.getNodes().get(i).getAttributs().get("style:name");
|
||||
node nod = structure.retourneFirstNodeByNameAndAttributValueExactStrict("text:time", "style:data-style-name", nameStyle);
|
||||
if(nod!=null) {
|
||||
nod.getAttributs().put("text:style-name", nameStyle);
|
||||
}else{
|
||||
nod = structure.retourneFirstNodeByNameAndAttributValueExactStrict("text:editing-duration", "style:data-style-name", nameStyle);
|
||||
if(nod!=null) {
|
||||
nod.getAttributs().put("text:style-name", nameStyle);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// @SuppressWarnings("unlikely-arg-type")
|
||||
// private static void nettoyerDesNoddesNull(node nodStyles) {
|
||||
// ArrayList<Integer> index = new ArrayList<Integer>();
|
||||
// for(int i = 0 ; i < nodStyles.getNodes().size();i++) {
|
||||
// if( nodStyles.getNodes().get(i)==null) {
|
||||
// index.add(i);
|
||||
// }
|
||||
// }
|
||||
// for(int i = index.size()-1 ; i >= 0 ;i--) {
|
||||
// nodStyles.getNodes().remove(index.get(i));
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
@ -126,6 +126,7 @@ public class analyseLesNodesEnfants {
|
||||
node StyleParagraphSujet = null;
|
||||
node StyleParagraphStudent = null;
|
||||
|
||||
|
||||
if(nodSujet.getAttributs().get("analyseStyle")!=null) {
|
||||
|
||||
if(nodSujet.getAttributs().get("analyseStyle").equals("true") && nodSujet.getAttributs().get("text:style-name")!=null) {
|
||||
@ -133,6 +134,8 @@ public class analyseLesNodesEnfants {
|
||||
StyleParagraphSujet = nodSujetParagraphs.retourneFirstNodeStyleByValueAttribut("style:style", "style:name", NameStyleParagrapheSujet);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(nodStudent!=null && StyleParagraphSujet!=null) {
|
||||
if(StyleParagraphSujet.getAttributs().get("evaluer")!=null) {
|
||||
if(StyleParagraphSujet.getAttributs().get("evaluer").equals("true")) {
|
||||
|
@ -57,106 +57,167 @@ public class evaluationAttribut {
|
||||
}
|
||||
}
|
||||
|
||||
if(nodeStyleParagraphStudent!=null) {
|
||||
if(nodeStyleParagraphSujet.retourneEnfantsByNameExist("style:paragraph-properties") && nodeStyleParagraphStudent.retourneEnfantsByNameExist("style:paragraph-properties") ) {
|
||||
node propertiesSujet = nodeStyleParagraphSujet.retourneFirstEnfantsByName("style:paragraph-properties");
|
||||
if(propertiesSujet.getAttributs().get("evaluer")!=null) {
|
||||
if(propertiesSujet.getAttributs().get("evaluer").equals("true")) {
|
||||
|
||||
node propertiesStudent = nodeStyleParagraphStudent.retourneFirstEnfantsByName("style:paragraph-properties");
|
||||
key = propertiesSujet.getAttributs().keys();
|
||||
while(key.hasMoreElements()) {
|
||||
String k = key.nextElement();
|
||||
if(propertiesSujet.getAttributs().get(k).contains("‼") || propertiesSujet.getAttributs().get(k).contains("‽")){
|
||||
if(propertiesStudent!=null) {
|
||||
String valueAttributStudent = propertiesStudent.getAttributs().get(k);
|
||||
String valueAttributSujet = propertiesSujet.getAttributs().get(k).replace("‼", "‽");
|
||||
node item = retourneNoteAvecResultatsAnalyse(nameItem,k, valueAttributStudent, valueAttributSujet,"style:paragraph-properties");
|
||||
retour.getNodes().add(item);
|
||||
}else {
|
||||
// if(nodeStyleParagraphStudent!=null) {
|
||||
// if(nodeStyleParagraphSujet.retourneEnfantsByNameExist("style:paragraph-properties") && nodeStyleParagraphStudent.retourneEnfantsByNameExist("style:paragraph-properties") ) {
|
||||
// node propertiesSujet = nodeStyleParagraphSujet.retourneFirstEnfantsByName("style:paragraph-properties");
|
||||
// if(propertiesSujet.getAttributs().get("evaluer")!=null) {
|
||||
// if(propertiesSujet.getAttributs().get("evaluer").equals("true")) {
|
||||
//
|
||||
// node propertiesStudent = nodeStyleParagraphStudent.retourneFirstEnfantsByName("style:paragraph-properties");
|
||||
// key = propertiesSujet.getAttributs().keys();
|
||||
// while(key.hasMoreElements()) {
|
||||
// String k = key.nextElement();
|
||||
// if(propertiesSujet.getAttributs().get(k).contains("‼") || propertiesSujet.getAttributs().get(k).contains("‽")){
|
||||
// if(propertiesStudent!=null) {
|
||||
// String valueAttributStudent = propertiesStudent.getAttributs().get(k);
|
||||
// String valueAttributSujet = propertiesSujet.getAttributs().get(k).replace("‼", "‽");
|
||||
// node item = retourneNoteAvecResultatsAnalyse(nameItem,k, valueAttributStudent, valueAttributSujet,"style:paragraph-properties");
|
||||
// retour.getNodes().add(item);
|
||||
// }else {
|
||||
// String valueAttributStudent = "null";
|
||||
// String valueAttributSujet = propertiesSujet.getAttributs().get(k).replace("‼", "‽");
|
||||
// node item = retourneNoteAvecResultatsAnalyse(nameItem, k, valueAttributStudent, valueAttributSujet,"style:paragraph-properties");
|
||||
// retour.getNodes().add(item);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }else {
|
||||
// node propertiesSujet = nodeStyleParagraphSujet.retourneFirstEnfantsByName("style:paragraph-properties");
|
||||
// if(propertiesSujet.getAttributs().get("evaluer")!=null) {
|
||||
// if(propertiesSujet.getAttributs().get("evaluer").equals("true")) {
|
||||
//
|
||||
// key = propertiesSujet.getAttributs().keys();
|
||||
// while(key.hasMoreElements()) {
|
||||
// String k = key.nextElement();
|
||||
// if(propertiesSujet.getAttributs().get(k).contains("‼") || propertiesSujet.getAttributs().get(k).contains("‽")){
|
||||
// String valueAttributStudent = "null";
|
||||
// String valueAttributSujet = propertiesSujet.getAttributs().get(k).replace("‼", "‽");
|
||||
//
|
||||
// node item = retourneNoteAvecResultatsAnalyse(nameItem, k, valueAttributStudent, valueAttributSujet,"style:paragraph-properties");
|
||||
// retour.getNodes().add(item);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if(nodeStyleParagraphStudent!=null) {
|
||||
// if(nodeStyleParagraphSujet.retourneEnfantsByNameExist("style:text-properties") && nodeStyleParagraphStudent.retourneEnfantsByNameExist("style:text-properties") ) {
|
||||
// node propertiesSujet = nodeStyleParagraphSujet.retourneFirstEnfantsByName("style:text-properties");
|
||||
// if(propertiesSujet.getAttributs().get("evaluer")!=null) {
|
||||
// if(propertiesSujet.getAttributs().get("evaluer").equals("true")) {
|
||||
//
|
||||
// node propertiesStudent = nodeStyleParagraphStudent.retourneFirstEnfantsByName("style:text-properties");
|
||||
// key = propertiesSujet.getAttributs().keys();
|
||||
// while(key.hasMoreElements()) {
|
||||
// String k = key.nextElement();
|
||||
// if(propertiesSujet.getAttributs().get(k).contains("‼") || propertiesSujet.getAttributs().get(k).contains("‽")){
|
||||
// if(propertiesStudent!=null) {
|
||||
// String valueAttributStudent = propertiesStudent.getAttributs().get(k);
|
||||
// String valueAttributSujet = propertiesSujet.getAttributs().get(k).replace("‼", "‽");
|
||||
//
|
||||
// node item = retourneNoteAvecResultatsAnalyse(nameItem,k, valueAttributStudent, valueAttributSujet,"style:text-properties");
|
||||
// retour.getNodes().add(item);
|
||||
// }else {
|
||||
// String valueAttributStudent = "null";
|
||||
// String valueAttributSujet = propertiesSujet.getAttributs().get(k).replace("‼", "‽");
|
||||
//
|
||||
// node item = retourneNoteAvecResultatsAnalyse(nameItem, k, valueAttributStudent, valueAttributSujet,"style:text-properties");
|
||||
// retour.getNodes().add(item);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }else {
|
||||
// node propertiesSujet = nodeStyleParagraphSujet.retourneFirstEnfantsByName("style:text-properties");
|
||||
// if(propertiesSujet.getAttributs().get("evaluer")!=null) {
|
||||
// if(propertiesSujet.getAttributs().get("evaluer").equals("true")) {
|
||||
//
|
||||
// key = propertiesSujet.getAttributs().keys();
|
||||
// while(key.hasMoreElements()) {
|
||||
// String k = key.nextElement();
|
||||
// if(propertiesSujet.getAttributs().get(k).contains("‼") || propertiesSujet.getAttributs().get(k).contains("‽")){
|
||||
// String valueAttributStudent = "null";
|
||||
// String valueAttributSujet = propertiesSujet.getAttributs().get(k).replace("‼", "‽");
|
||||
//
|
||||
// node item = retourneNoteAvecResultatsAnalyse(nameItem, k, valueAttributStudent, valueAttributSujet,"style:text-properties");
|
||||
// retour.getNodes().add(item);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
for(int i = 0 ; i < nodeStyleParagraphSujet.getNodes().size();i++) {
|
||||
String nameNodeSujet = nodeStyleParagraphSujet.getNodes().get(i).getNomElt();
|
||||
if(nodeStyleParagraphStudent!=null) {
|
||||
if(nodeStyleParagraphSujet.retourneEnfantsByNameExist(nameNodeSujet) && nodeStyleParagraphStudent.retourneEnfantsByNameExist(nameNodeSujet) ) {
|
||||
node propertiesSujet = nodeStyleParagraphSujet.retourneFirstEnfantsByName(nameNodeSujet);
|
||||
if(propertiesSujet.getAttributs().get("evaluer")!=null) {
|
||||
if(propertiesSujet.getAttributs().get("evaluer").equals("true")) {
|
||||
|
||||
node propertiesStudent = nodeStyleParagraphStudent.retourneFirstEnfantsByName(nameNodeSujet);
|
||||
key = propertiesSujet.getAttributs().keys();
|
||||
while(key.hasMoreElements()) {
|
||||
String k = key.nextElement();
|
||||
if(propertiesSujet.getAttributs().get(k).contains("‼") || propertiesSujet.getAttributs().get(k).contains("‽")){
|
||||
if(propertiesStudent!=null) {
|
||||
String valueAttributStudent = propertiesStudent.getAttributs().get(k);
|
||||
String valueAttributSujet = propertiesSujet.getAttributs().get(k).replace("‼", "‽");
|
||||
|
||||
node item = retourneNoteAvecResultatsAnalyse(nameItem,k, valueAttributStudent, valueAttributSujet,nameNodeSujet);
|
||||
retour.getNodes().add(item);
|
||||
}else {
|
||||
String valueAttributStudent = "null";
|
||||
String valueAttributSujet = propertiesSujet.getAttributs().get(k).replace("‼", "‽");
|
||||
|
||||
node item = retourneNoteAvecResultatsAnalyse(nameItem, k, valueAttributStudent, valueAttributSujet,nameNodeSujet);
|
||||
retour.getNodes().add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}else {
|
||||
if(nodeStyleParagraphSujet.retourneEnfantsByNameExist(nameNodeSujet)) {
|
||||
node propertiesSujet = nodeStyleParagraphSujet.retourneFirstEnfantsByName(nameNodeSujet);
|
||||
if(propertiesSujet.getAttributs().get("evaluer")!=null) {
|
||||
if(propertiesSujet.getAttributs().get("evaluer").equals("true")) {
|
||||
|
||||
key = propertiesSujet.getAttributs().keys();
|
||||
while(key.hasMoreElements()) {
|
||||
String k = key.nextElement();
|
||||
if(propertiesSujet.getAttributs().get(k).contains("‼") || propertiesSujet.getAttributs().get(k).contains("‽")){
|
||||
String valueAttributStudent = "null";
|
||||
String valueAttributSujet = propertiesSujet.getAttributs().get(k).replace("‼", "‽");
|
||||
node item = retourneNoteAvecResultatsAnalyse(nameItem, k, valueAttributStudent, valueAttributSujet,"style:paragraph-properties");
|
||||
|
||||
node item = retourneNoteAvecResultatsAnalyse(nameItem, k, valueAttributStudent, valueAttributSujet,nameNodeSujet);
|
||||
retour.getNodes().add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}else {
|
||||
node propertiesSujet = nodeStyleParagraphSujet.retourneFirstEnfantsByName("style:paragraph-properties");
|
||||
if(propertiesSujet.getAttributs().get("evaluer")!=null) {
|
||||
if(propertiesSujet.getAttributs().get("evaluer").equals("true")) {
|
||||
|
||||
key = propertiesSujet.getAttributs().keys();
|
||||
while(key.hasMoreElements()) {
|
||||
String k = key.nextElement();
|
||||
if(propertiesSujet.getAttributs().get(k).contains("‼") || propertiesSujet.getAttributs().get(k).contains("‽")){
|
||||
String valueAttributStudent = "null";
|
||||
String valueAttributSujet = propertiesSujet.getAttributs().get(k).replace("‼", "‽");
|
||||
|
||||
node item = retourneNoteAvecResultatsAnalyse(nameItem, k, valueAttributStudent, valueAttributSujet,"style:paragraph-properties");
|
||||
retour.getNodes().add(item);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(nodeStyleParagraphStudent!=null) {
|
||||
if(nodeStyleParagraphSujet.retourneEnfantsByNameExist("style:text-properties") && nodeStyleParagraphStudent.retourneEnfantsByNameExist("style:text-properties") ) {
|
||||
node propertiesSujet = nodeStyleParagraphSujet.retourneFirstEnfantsByName("style:text-properties");
|
||||
if(propertiesSujet.getAttributs().get("evaluer")!=null) {
|
||||
if(propertiesSujet.getAttributs().get("evaluer").equals("true")) {
|
||||
|
||||
node propertiesStudent = nodeStyleParagraphStudent.retourneFirstEnfantsByName("style:text-properties");
|
||||
key = propertiesSujet.getAttributs().keys();
|
||||
while(key.hasMoreElements()) {
|
||||
String k = key.nextElement();
|
||||
if(propertiesSujet.getAttributs().get(k).contains("‼") || propertiesSujet.getAttributs().get(k).contains("‽")){
|
||||
if(propertiesStudent!=null) {
|
||||
String valueAttributStudent = propertiesStudent.getAttributs().get(k);
|
||||
String valueAttributSujet = propertiesSujet.getAttributs().get(k).replace("‼", "‽");
|
||||
|
||||
node item = retourneNoteAvecResultatsAnalyse(nameItem,k, valueAttributStudent, valueAttributSujet,"style:text-properties");
|
||||
retour.getNodes().add(item);
|
||||
}else {
|
||||
String valueAttributStudent = "null";
|
||||
String valueAttributSujet = propertiesSujet.getAttributs().get(k).replace("‼", "‽");
|
||||
|
||||
node item = retourneNoteAvecResultatsAnalyse(nameItem, k, valueAttributStudent, valueAttributSujet,"style:text-properties");
|
||||
retour.getNodes().add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}else {
|
||||
node propertiesSujet = nodeStyleParagraphSujet.retourneFirstEnfantsByName("style:text-properties");
|
||||
if(propertiesSujet.getAttributs().get("evaluer")!=null) {
|
||||
if(propertiesSujet.getAttributs().get("evaluer").equals("true")) {
|
||||
|
||||
key = propertiesSujet.getAttributs().keys();
|
||||
while(key.hasMoreElements()) {
|
||||
String k = key.nextElement();
|
||||
if(propertiesSujet.getAttributs().get(k).contains("‼") || propertiesSujet.getAttributs().get(k).contains("‽")){
|
||||
String valueAttributStudent = "null";
|
||||
String valueAttributSujet = propertiesSujet.getAttributs().get(k).replace("‼", "‽");
|
||||
|
||||
node item = retourneNoteAvecResultatsAnalyse(nameItem, k, valueAttributStudent, valueAttributSujet,"style:text-properties");
|
||||
retour.getNodes().add(item);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return retour;
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,6 @@ import fenetres.create_act.mnEvaluerATraversAnalyseStyleTrue;
|
||||
import list.listeDesNodesAllContent;
|
||||
import list.listeDesNodesAnalyseStyle;
|
||||
import list.listeDesNodesAncrable;
|
||||
import list.listeDesNodesAvecEvalNameNode;
|
||||
import list.listeDesNodesAvecOU;
|
||||
import list.listeDesNodesContientEnfant;
|
||||
import list.listeDesNodesEvalPlacement;
|
||||
@ -161,7 +160,7 @@ public class createPopupMenu extends JPopupMenu {
|
||||
|
||||
|
||||
// Le groupe méthode évaluer le node
|
||||
if(listeDesNodesAvecEvalNameNode.isEvalNameNode(nod)||listeDesNodesAllContent.isAllContent(nod)||
|
||||
if(listeEvalNameNode.isNodeEvalNameNode(nod)||listeDesNodesAllContent.isAllContent(nod)||
|
||||
listeDesNodesPourEvaluationEntetePage.isEntete(nod) || listeDesNodesPourEvaluerPiedDePage.isPiedDePage(nod)||
|
||||
listeDesNodesPourEvaluerPage.isPage(nod) || listeDesNotesAEvaluer.isAEvaluer(nod)) {
|
||||
mnPopupTree.addSeparator();
|
||||
|
@ -12,6 +12,7 @@ import cXML.node;
|
||||
import fenetres.attributs;
|
||||
import fenetres.create;
|
||||
import list.listeAttributsAnalyseWriter;
|
||||
import list.listeNodesNonModifiableAttribut;
|
||||
|
||||
public class actAttribut extends AbstractAction{
|
||||
|
||||
@ -42,7 +43,7 @@ public class actAttribut extends AbstractAction{
|
||||
}
|
||||
|
||||
if(nbrAttribut>0) {
|
||||
if(nod.getLevel()>1 && !nod.chemin().contains("setting")) {
|
||||
if(listeNodesNonModifiableAttribut.isModifiableAttribut(nod.getNomElt())) {
|
||||
new attributs(nod,fenetres.create.getTextNodeSelect());
|
||||
}else {
|
||||
JOptionPane.showMessageDialog(null, "Vous ne pouvez pas modifier les attributs de ce node.");
|
||||
|
@ -33,7 +33,11 @@ public class actEvaluerStyleTrue extends AbstractAction{
|
||||
//** Place l'attribut EvaluerATraversAnalyseStyle=true au style qui doit être évaluer à travers d'analyseStyle **
|
||||
//** S'il y a des attributs évaluer avec ‽ alors change par ‼ **
|
||||
//***************************************************************************************************************
|
||||
node nodStyle = commandes.sujet.retourneFirstNodeByNameAndAttributValueExactStrict("style:style", "style:name", nod.getAttributs().get("text:style-name"));
|
||||
String nameStyle = nod.getAttributs().get("text:style-name");
|
||||
|
||||
node nodStyle = commandes.sujet.retourneFirstNodeByNameAndAttributValueExactStrict("style:style", "style:name", nameStyle);
|
||||
|
||||
|
||||
if(nodStyle!=null) {
|
||||
nodStyle.getAttributs().put("EvaluerATraversAnalyseStyle", "true");
|
||||
nodStyle.evaluerTrue();
|
||||
|
@ -94,6 +94,8 @@ public class actNewFichierAnalyse extends AbstractAction{
|
||||
|
||||
|
||||
commandes.sujet = meptl.LectureFichierEtudiantSousFormeDeNode(commandes.sujet,b,0);
|
||||
|
||||
|
||||
//Pour les sujets, il faut rechercher les nodes en doublons (par exemple : text:p, text:h, text:list-item)
|
||||
//L'information sera portée par l'attribut isDoublon="true"
|
||||
// Cela permet de recherche par le numéro du child.
|
||||
|
@ -85,83 +85,6 @@ public class listeAttributsAnalyseWriter {
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// if(attribut.equals("evaluer")) return true;
|
||||
// if(attribut.equals("addmenu")) return true;
|
||||
// if(attribut.equals("saut")) return true;
|
||||
// if(attribut.equals("titre")) return true;
|
||||
// if(attribut.equals("titre1")) return true;
|
||||
// if(attribut.equals("titre2")) return true;
|
||||
// if(attribut.equals("titre3")) return true;
|
||||
// if(attribut.equals("marquenode")) return true;
|
||||
// if(attribut.equals("information")) return true;
|
||||
// if(attribut.equals("poids")) return true;
|
||||
// if(attribut.equals("analyseStyle")) return true;
|
||||
// if(attribut.equals("index")) return true;
|
||||
// if(attribut.equals("recherche_index")) return true;
|
||||
// if(attribut.equals("recherche_contenu_exact")) return true;
|
||||
// if(attribut.equals("styletitre")) return true; //ancienne version, il faudra les supprimer au fur plus ajouter depuis la version v4.1.2
|
||||
// if(attribut.equals("recherche_anchor-page-number")) return true;
|
||||
// if(attribut.equals("recherche_contenu_plus_proche_voisin")) return true;
|
||||
// if(attribut.equals("numero")) return true;
|
||||
// if(attribut.equals("numeroabsolue")) return true;
|
||||
// if(attribut.equals("isDoublon")) return true;
|
||||
//
|
||||
//
|
||||
// // Les attributs évaluateurs
|
||||
// if(attribut.equals("EvaluerATraversAnalyseStyle")) return true;
|
||||
// if(attribut.equals("evalNameCreator")) return true;
|
||||
// if(attribut.equals("evalNameInitialCreator")) return true;
|
||||
// if(attribut.equals("evalNameLegacyStyle")) return true;
|
||||
// if(attribut.equals("allContent")) return true;
|
||||
// if(attribut.equals("evalNameNode")) return true;
|
||||
// if(attribut.equals("evalEntetePasActive")) return true;
|
||||
// if(attribut.equals("evalEnteteActive")) return true;
|
||||
// if(attribut.equals("evalPiedPagePasActive")) return true;
|
||||
// if(attribut.equals("evalPiedPageActive")) return true;
|
||||
// if(attribut.equals("evalNameSequence")) return true;
|
||||
// if(attribut.equals("evalNamePage")) return true;
|
||||
// if(attribut.equals("evalTextUserDefined")) return true;
|
||||
// if(attribut.equals("evalNumeroAbsoluePage")) return true;
|
||||
// if(attribut.equals("evalNumeroPage")) return true;
|
||||
// if(attribut.equals("evalPlacement")) return true;
|
||||
// if(attribut.equals("evalLastChild")) return true;
|
||||
// if(attribut.equals("evalFirstChild")) return true;
|
||||
// if(attribut.equals("evalAncrageNumeroAbsoluePage")) return true;
|
||||
//
|
||||
//
|
||||
//
|
||||
// //Les attribut placer dans le node fichier du fichier d'analyse
|
||||
// if(attribut.equals("analysis_filename")) return true;
|
||||
// if(attribut.equals("auteur")) return true;
|
||||
// if(attribut.equals("baremeABC")) return true;
|
||||
// if(attribut.equals("controleDateCreation")) return true;
|
||||
// if(attribut.equals("controle_Initial_Creator")) return true;
|
||||
// if(attribut.equals("creationDate")) return true;
|
||||
// if(attribut.equals("date")) return true;
|
||||
// if(attribut.equals("dateModification")) return true;
|
||||
// if(attribut.equals("dureeEdition")) return true;
|
||||
// if(attribut.equals("filename")) return true;
|
||||
// if(attribut.equals("hash")) return true;
|
||||
// if(attribut.equals("historiquePresent")) return true;
|
||||
// if(attribut.equals("link_help")) return true;
|
||||
// if(attribut.equals("link_sujet")) return true;
|
||||
// if(attribut.equals("metaSujet")) return true;
|
||||
// if(attribut.equals("notefrom")) return true;
|
||||
// if(attribut.equals("presenceMetaSujet")) return true;
|
||||
// if(attribut.equals("producteur")) return true;
|
||||
// if(attribut.equals("progression")) return true;
|
||||
// if(attribut.equals("version")) return true;
|
||||
//
|
||||
// //Le node OU
|
||||
// if(attribut.equals("OU")) return true;
|
||||
//
|
||||
//// if(attribut.equals("page_start:text_contenu_index")) return true;
|
||||
//
|
||||
//
|
||||
// return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -10,18 +10,26 @@ public class listeDesNodesAllContent {
|
||||
* @return
|
||||
*/
|
||||
public static boolean isAllContent(node nod) {
|
||||
if(nod.getNomElt().equals("text:title")) return true;
|
||||
if(nod.getNomElt().equals("text:subject")) return true;
|
||||
if(nod.getNomElt().equals("page")) return true;
|
||||
|
||||
if(nod.getNomElt().equals("text:page-number")) return false;
|
||||
if(nod.getNomElt().equals("text:page-count")) return false;
|
||||
if(nod.getNomElt().equals("OU")) return false;
|
||||
if(nod.getNomElt().equals("text:conditional-text")) return false;
|
||||
if(nod.getNomElt().contains("text:bookmark")) return false;
|
||||
String nameNode = nod.getNomElt();
|
||||
|
||||
|
||||
|
||||
if(nameNode.equals("text:title")) return true;
|
||||
if(nameNode.equals("text:subject")) return true;
|
||||
if(nameNode.equals("page")) return true;
|
||||
if(nameNode.equals("text:date")) return true;
|
||||
if(nameNode.equals("text:time")) return true;
|
||||
|
||||
if(nameNode.equals("number:text")) return false;
|
||||
if(nameNode.equals("text:page-number")) return false;
|
||||
if(nameNode.equals("text:page-count")) return false;
|
||||
if(nameNode.equals("OU")) return false;
|
||||
if(nameNode.equals("text:conditional-text")) return false;
|
||||
if(nameNode.contains("text:bookmark")) return false;
|
||||
|
||||
if(nod.retourneLesContenusEnfants("").length()<=0) return false;
|
||||
if(nod.getNomElt().contains("text:")) return true;
|
||||
if(nameNode.contains("text:")) return true;
|
||||
|
||||
|
||||
return true;
|
||||
|
@ -11,16 +11,6 @@ public class listeDesNodesAnalyseStyle {
|
||||
*/
|
||||
public static Boolean isAnalyseStyle(node nod) {
|
||||
if(nod.getAttributs().get("text:style-name")!=null) return true;
|
||||
|
||||
// if(nod.getAttributs().get("text:style-name")!=null) return true;
|
||||
// if(nod.getNomElt().contains("text:database-display")) return false;
|
||||
// if(nod.getNomElt().contains("text:bookmark")) return false;
|
||||
//
|
||||
// if(nod.getNomElt().contains("text:p")) return true;
|
||||
// if(nod.getNomElt().contains("text:list")) return true;
|
||||
// if(nod.getNomElt().contains("text:span")) return true;
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,8 @@ public class listeDesNodesAncrable {
|
||||
case "text:creator": return true;
|
||||
case "text:editing-cycles": return true;
|
||||
case "draw:frame": return true;
|
||||
case "text:date":return true;
|
||||
case "text:time":return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
|
@ -1,19 +0,0 @@
|
||||
package list;
|
||||
|
||||
import cXML.node;
|
||||
|
||||
public class listeDesNodesAvecEvalNameNode {
|
||||
|
||||
/**
|
||||
* Retourne TRUE si on peut utiliser la procédure evalNameNode.</br>
|
||||
* @param nod
|
||||
* @return
|
||||
*/
|
||||
public static boolean isEvalNameNode(node nod) {
|
||||
if(nod.getNomElt().contains("meta:")) return true;
|
||||
if(nod.getNomElt().contains("dc:")) return true;
|
||||
if(nod.getNomElt().contains("text:")) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
@ -23,8 +23,10 @@ public class listeDesNodesEvalPlacement {
|
||||
case "text:tab":return true;
|
||||
case "text:page-number":return true;
|
||||
case "draw:frame": return true;
|
||||
case "text:date": return true;
|
||||
case "text:time": return true;
|
||||
case "text:editing-duration": return true;
|
||||
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ public class listeEvalNameNode {
|
||||
if(nod.getNomElt().contains("dc:")) return true;
|
||||
if(nod.getNomElt().contains("text:")) return true;
|
||||
if(nod.getNomElt().contains("draw:")) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -17,13 +17,14 @@ public class listeNodeFormatageDirectDeWriter {
|
||||
//** Si le nom du style est P1, P2, ...Pxx, (les paragraphes)
|
||||
//** ou T1, T2, ..., Txx (Les caractères)
|
||||
//** ou L1, L2,.... (les listes)
|
||||
//** ou N1, N2, ..., (format des number date)
|
||||
//** Alors retourne true.
|
||||
if(nod.chemin().contains("style:paragraph")) {
|
||||
|
||||
node nodStyleParent = nod.retourneParentAyantLAttribut("style:name");
|
||||
|
||||
String nomDuStle = nodStyleParent.getAttributs().get("style:name");
|
||||
Pattern p = Pattern.compile("^P[0-9]{1,}$|^T[0-9]{1,}$|^L[0-9]{1,}$");
|
||||
Pattern p = Pattern.compile("^P[0-9]{1,}$|^T[0-9]{1,}$|^L[0-9]{1,}$|^N[0-9]{1,}$");
|
||||
Matcher m = p.matcher(nomDuStle);
|
||||
if(m.find()) return true;
|
||||
}
|
||||
|
29
src/list/listeNodesNonModifiableAttribut.java
Normal file
29
src/list/listeNodesNonModifiableAttribut.java
Normal file
@ -0,0 +1,29 @@
|
||||
package list;
|
||||
|
||||
|
||||
public class listeNodesNonModifiableAttribut {
|
||||
|
||||
public static boolean isModifiableAttribut(String nameNode){
|
||||
switch (nameNode) {
|
||||
case "setting": return false;
|
||||
case "style:default-style": return false;
|
||||
case "structurepage": return false;
|
||||
case "office:meta":return false;
|
||||
case "style:page":return false;
|
||||
case "style:paragraph":return false;
|
||||
case "sequences":return false;
|
||||
case "numerotationchapitre":return false;
|
||||
case "frames":return false;
|
||||
case "sections":return false;
|
||||
case "tableaux":return false;
|
||||
case "biblio":return false;
|
||||
case "tablematieres":return false;
|
||||
case "tableillustrations":return false;
|
||||
case "page":return false;
|
||||
default: return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user