MAJ V5.0.0 amélioration des recherches par index notament pour les

cellules d'une table.
This commit is contained in:
pablo rodriguez 2024-03-21 09:19:25 +01:00
parent 76d972e180
commit 398acdefc7
46 changed files with 39 additions and 29 deletions

2
aW.xml
View File

@ -2,7 +2,7 @@
<launch4jConfig> <launch4jConfig>
<dontWrapJar>false</dontWrapJar> <dontWrapJar>false</dontWrapJar>
<headerType>gui</headerType> <headerType>gui</headerType>
<jar>C:\Users\pabr6\git\analyseWriter\MEPTL\analyseWriter.jar</jar> <jar>C:\Users\pabr6\git\analyseWriter\analyseWriter.jar</jar>
<outfile>C:\Users\pabr6\git\analyseWriter\MEPTL\analyseWriter.exe</outfile> <outfile>C:\Users\pabr6\git\analyseWriter\MEPTL\analyseWriter.exe</outfile>
<errTitle>Erreur</errTitle> <errTitle>Erreur</errTitle>
<cmdLine></cmdLine> <cmdLine></cmdLine>

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.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -184,7 +184,6 @@ public class ecritureSujet {
nod.getNodes().add(nodframe); nod.getNodes().add(nodframe);
} }
// //
//sections //sections
node nodsection = nod.retourneFirstEnfantsByName("sections"); node nodsection = nod.retourneFirstEnfantsByName("sections");
@ -194,7 +193,6 @@ public class ecritureSujet {
nodsection.getAttributs().put("addmenu", "false"); nodsection.getAttributs().put("addmenu", "false");
nodsection.getAttributs().put("poids", "1"); nodsection.getAttributs().put("poids", "1");
nodsection.getAttributs().put("titre", "Les sections"); nodsection.getAttributs().put("titre", "Les sections");
nodsection = addAttributsAnalyseWriter(nodsection, "text:section"); nodsection = addAttributsAnalyseWriter(nodsection, "text:section");
nod.getNodes().add(nodsection); nod.getNodes().add(nodsection);
} }
@ -213,7 +211,6 @@ public class ecritureSujet {
nod.getNodes().add(nodtableaux); nod.getNodes().add(nodtableaux);
} }
// //
//biblio //biblio
node nodbiblio = nod.retourneFirstEnfantsByName("biblio"); node nodbiblio = nod.retourneFirstEnfantsByName("biblio");

View File

@ -93,11 +93,12 @@ public class meptl {
/** /**
* Retourne le node menu qui est réalisé à partir de l'attibut "<b>addmenu=true</b>".<br> * Retourne le node menu qui est réalisé à partir de l'attibut "<b>addmenu=true</b>".<br>
* L'attribut "<b>addmenu=true</b>" se trouve uniquement dans les node de niveu 1 (les nodes principaux).<br> * L'attribut "<b>addmenu=true</b>" se trouve uniquement dans les node de niveu 1 (les nodes principaux).<br>
* * Retourne le node avec ce shéma <item niveau=".." name="..." id="...."/><br>
* @param nod Le node dans lequel on recherche les node * <br>
* @param menu Le node menu. * @param nod : Le node dans lequel on recherche les nodes.
* @param niv Le niveau du node. * @param menu : Le node menu.
* @param Compteur Le compteur permet d'incrémenter les niveaux des nodes. * @param niv : Le niveau du node.
* @param Compteur : Le compteur permet d'incrémenter les niveaux des nodes.
* @return Le node menu est retourner avec des nodes "<b>item</b>" ajoutés. * @return Le node menu est retourner avec des nodes "<b>item</b>" ajoutés.
*/ */
public static node retourneNodeMenu(node nod , node menu, Integer niv, Integer Compteur) { public static node retourneNodeMenu(node nod , node menu, Integer niv, Integer Compteur) {
@ -163,13 +164,13 @@ public class meptl {
commandes.message.append("\n Ajouter l'attribut \"titre\" à ce node."); commandes.message.append("\n Ajouter l'attribut \"titre\" à ce node.");
commandes.message.append("\n******************************************************"); commandes.message.append("\n******************************************************");
} }
if(nod.getAttributs().get("titre").isEmpty()){ if(nod.getAttributs().get("titre").isEmpty()){
System.out.println("** -- Ajouter l'attribut \"titre\" une valeur."); System.out.println("** -- Ajouter l'attribut \"titre\" une valeur.");
commandes.message.append("\n******************************************************"); commandes.message.append("\n******************************************************");
commandes.message.append("\n Ajouter l'attribut \"titre\" une valeur."); commandes.message.append("\n Ajouter l'attribut \"titre\" une valeur.");
commandes.message.append("\n******************************************************"); commandes.message.append("\n******************************************************");
} }
if(nod.getAttributs().get("titre1").isEmpty()){ if(nod.getAttributs().get("titre1").isEmpty()){
System.out.println("** -- Ajouter l'attribut \"titre1\" une valeur."); System.out.println("** -- Ajouter l'attribut \"titre1\" une valeur.");
commandes.message.append("\n******************************************************"); commandes.message.append("\n******************************************************");
@ -229,7 +230,7 @@ public class meptl {
node nodecontent = nod.retourneFirstEnfantsByName("office:document-content"); node nodecontent = nod.retourneFirstEnfantsByName("office:document-content");
node nodestyle = nod.retourneFirstEnfantsByName("office:document-styles"); node nodestyle = nod.retourneFirstEnfantsByName("office:document-styles");
node nodbody = nod.retourneFirstEnfantsByName("office:text"); //a.NodeFirstName(nodecontent, "office:text"); node nodbody = nod.retourneFirstEnfantsByName("office:text"); //a.NodeFirstName(nodecontent, "office:text");
//
node nodmeta = nod.retourneFirstEnfantsByName("office:meta"); node nodmeta = nod.retourneFirstEnfantsByName("office:meta");
// ajoute les créateurs ou éditeur dans les nodes dc:creator ou meta:initial-creator // ajoute les créateurs ou éditeur dans les nodes dc:creator ou meta:initial-creator
@ -277,6 +278,10 @@ public class meptl {
nodstyleparagraphe.addNode(a.NodesAyantAttribut(nodstyle, "style:family","text")); nodstyleparagraphe.addNode(a.NodesAyantAttribut(nodstyle, "style:family","text"));
nodstyleparagraphe.addNode(a.NodesAyantAttribut(nodstyle, "style:family","section")); nodstyleparagraphe.addNode(a.NodesAyantAttribut(nodstyle, "style:family","section"));
nodstyleparagraphe.addNode(a.NodesAyantAttribut(nodstyle, "style:family","graphic")); nodstyleparagraphe.addNode(a.NodesAyantAttribut(nodstyle, "style:family","graphic"));
nodstyleparagraphe.addNode(a.NodesAyantAttribut(nodstyle, "style:family","table"));
nodstyleparagraphe.addNode(a.NodesAyantAttribut(nodstyle, "style:family","table-column"));
nodstyleparagraphe.addNode(a.NodesAyantAttribut(nodstyle, "style:family","table-row"));
nodstyleparagraphe.addNode(a.NodesAyantAttribut(nodstyle, "style:family","table-cell"));
nodstyleparagraphe.addNode(nodstyle.retourneEnfantsByName("number:date-style", new ArrayList<node>())); nodstyleparagraphe.addNode(nodstyle.retourneEnfantsByName("number:date-style", new ArrayList<node>()));
nodstyleparagraphe.addNode(nodstyle.retourneEnfantsByName("number:time-style", new ArrayList<node>())); nodstyleparagraphe.addNode(nodstyle.retourneEnfantsByName("number:time-style", new ArrayList<node>()));
nodstyleparagraphe = ajouteValeurLesValeursDuStyleParagraphParent(nodstyleparagraphe); nodstyleparagraphe = ajouteValeurLesValeursDuStyleParagraphParent(nodstyleparagraphe);
@ -656,12 +661,13 @@ public class meptl {
fichier.getNodes().add(nodframe); fichier.getNodes().add(nodframe);
fichier.getNodes().add(nodsection); fichier.getNodes().add(nodsection);
// nodtableaux = a.numeroteNameNode(nodtableaux, "0");
fichier.getNodes().add(nodtableaux); fichier.getNodes().add(nodtableaux);
//nodbiblio = a.numeroteNameNode(nodbiblio, "0"); //ajoute les numéros d'index et des attributs // nodbiblio = a.numeroteNameNode(nodbiblio, "0"); //ajoute les numéros d'index et des attributs
fichier.getNodes().add(nodbiblio); fichier.getNodes().add(nodbiblio);
//nodtable = a.numeroteNameNode(nodtable, "0"); //ajoute les numéros d'index et des attributs //nodtable = a.numeroteNameNode(nodtable, "0"); //ajoute les numéros d'index et des attributs
fichier.getNodes().add(nodtable); fichier.getNodes().add(nodtable);
//nodillustrations = a.numeroteNameNode(nodillustrations, "0"); //ajoute les numéros d'index et des attributs // nodillustrations = a.numeroteNameNode(nodillustrations, "0"); //ajoute les numéros d'index et des attributs
fichier.getNodes().add(nodillustrations); fichier.getNodes().add(nodillustrations);
structurePage = a.numeroteNameNode(structurePage,""); //ajoute les numéros d'index et des attributs structurePage = a.numeroteNameNode(structurePage,""); //ajoute les numéros d'index et des attributs

View File

@ -34,7 +34,6 @@ public class rechercherUnNodeStudent {
node nodStudent =null; node nodStudent =null;
//************************************************************************************************ //************************************************************************************************
//** Recherche le node par le contenu exact du node en intégrant les contenus des nodes enfants ** //** Recherche le node par le contenu exact du node en intégrant les contenus des nodes enfants **
@ -72,7 +71,9 @@ public class rechercherUnNodeStudent {
//*********************************************************************************************************************** //***********************************************************************************************************************
//** Recherche les nodes text:p, text:h, text:span, text:list, text:note, text:tab par le contenu textuel ** //** Recherche les nodes text:p, text:h, text:span, text:list, text:note, text:tab **
//** text:line-break, text:note, text:tab, text:index-body, text:index-title, text:index-title-template **
//** text:table-of-content par le contenu textuel **
//** Si le node possède un node text:user-defined alors utilise la méthode findLeNodeTextpParDesNodesEnfantsSpecifique ** //** Si le node possède un node text:user-defined alors utilise la méthode findLeNodeTextpParDesNodesEnfantsSpecifique **
//*********************************************************************************************************************** //***********************************************************************************************************************
if(nodSujet.getNomElt().contains("text:")) { if(nodSujet.getNomElt().contains("text:")) {
@ -131,6 +132,8 @@ public class rechercherUnNodeStudent {
nodStudent = findTable(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a); nodStudent = findTable(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a);
} }
//************************************************************************* //*************************************************************************
//** Recherche le node text:h par le contenu avec tolérance de caractère ** //** Recherche le node text:h par le contenu avec tolérance de caractère **
//************************************************************************* //*************************************************************************

View File

@ -70,9 +70,7 @@ public class actNewFichierAnalyse extends AbstractAction{
chooser.setAcceptAllFileFilterUsed(true); chooser.setAcceptAllFileFilterUsed(true);
if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) { if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
System.out.println("getCurrentDirectory(): " + chooser.getCurrentDirectory()); commandes.initialiseParametresSettingProprietes();
System.out.println("getSelectedFile() : " + chooser.getSelectedFile().getAbsolutePath());
commandes.initialiseParametresSettingProprietes();;
commandes.fichierAnalyseValide=true; commandes.fichierAnalyseValide=true;
commandes.path = chooser.getCurrentDirectory().getAbsolutePath(); commandes.path = chooser.getCurrentDirectory().getAbsolutePath();
commandes.PathFilenameAnalysis = chooser.getCurrentDirectory().getAbsolutePath(); commandes.PathFilenameAnalysis = chooser.getCurrentDirectory().getAbsolutePath();

View File

@ -579,8 +579,8 @@ public class analyseLesNodesPrincipaux {
//*************************************** //***************************************
//** Ajoute l'identifiant pour le menu ** //** Ajoute l'identifiant pour le menu **
//*************************************** //***************************************
if(a.retourneFirstNodeByNameAttributValue(nodmenu, "item", "name", "tableau")!=null) { if(a.retourneFirstNodeByNameAttributValue(nodmenu, "item", "name", "tableaux")!=null) {
nodtableaux.getAttributs().put("id", a.retourneFirstNodeByNameAttributValue(nodmenu, "item", "name", "tableau").getAttributs().get("id")); nodtableaux.getAttributs().put("id", a.retourneFirstNodeByNameAttributValue(nodmenu, "item", "name", "tableaux").getAttributs().get("id"));
} }
//*************************** //***************************
@ -622,7 +622,7 @@ public class analyseLesNodesPrincipaux {
//******************************* //*******************************
//** Recherche le node Student ** //** Recherche le node Student **
//******************************* //*******************************
node tableauStudent = a.retourneFirstNodeByNameAttributValue(nodStudentTableaux, "table:table", "table:name", nomDeLaTable); node tableauStudent = a.retourneFirstNodeByNameAttribut_ValueLowerTrim(nodStudentTableaux, "table:table", "table:name", nomDeLaTable);
//*************************************************** //***************************************************
//** analyse les attributs des nodes <table:table> ** //** analyse les attributs des nodes <table:table> **

View File

@ -9,11 +9,11 @@ public class baliseStyle {
public static String balise() { public static String balise() {
return "<style type=\"text/css\">" return "<style type=\"text/css\">"
+ "h1 {margin-bottom: 0.25cm;font-size: 24pt;font-family:\"Arial\";text-align:center;font-weight: bold;}" + "h1 {color:#010100;margin-bottom: 0.25cm;font-size: 24pt;font-family:\"Arial\";text-align:center;font-weight: bold;}"
+ "h2 {margin-bottom: 0.25cm;font-size: 16pt;font-family:\"Arial\";text-align:center;font-weight: bold;}" + "h2 {color:#010100;margin-bottom: 0.25cm;font-size: 18pt;font-family:\"Arial\";text-align:center;font-weight: bold;}"
+ "h3 {margin-bottom: 0.25cm;font-size: 16pt;font-family:\"Arial\";text-align:left;font-weight: bold;}" + "h3 {color:#010100;margin-bottom: 0.25cm;font-size: 18pt;font-family:\"Arial\";text-align:left;font-weight: bold;}"
+ "h4 {text-align:left;font-family: \"Arial\"; font-size: 16pt; font-weight: bold; line-height: 110%;}" + "h4 {color:#010100;text-align:left;font-family: \"Arial\"; font-size: 18pt; font-weight: bold; line-height: 110%;}"
+ "p {font-family:\"Arial\";font-size: 15pt;margin-bottom: 0cm; margin-top: 0cm; line-height: 0%; background: transparent; margin-left: 0cm; white-space: pre;}" + "p {color:#010100;font-family:\"Arial\";font-size: 18pt;margin-bottom: 0cm; margin-top: 0cm; line-height: 0%; background: transparent; margin-left: 0cm; white-space: pre;}"
+ "hr { display: block; margin-top: 0.5em; margin-bottom: 8em; margin-left: 2em; margin-right: 2em; border-style: inset; border-width: 4px;}" + "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}" + "spanpablo { float: right; width: 8em; font-size: 250%; font-family: algerian, courier; line-height: 80%; margin-right: 1%; color: red; text-align: center}"
+ ".p1{color:blue;font-family:\"Arial\";font-size: 14pt;margin-bottom: 0cm; margin-top: 0cm; line-height: 0%; background: transparent; margin-left: 0cm; white-space: pre;}" + ".p1{color:blue;font-family:\"Arial\";font-size: 14pt;margin-bottom: 0cm; margin-top: 0cm; line-height: 0%; background: transparent; margin-left: 0cm; white-space: pre;}"

View File

@ -72,6 +72,7 @@ import action.actTitre3;
import cXML.Run; import cXML.Run;
import cXML.node; import cXML.node;
import menucontextuel.CreatePopupMenu; import menucontextuel.CreatePopupMenu;
import java.awt.event.ActionListener;
@ -209,7 +210,7 @@ public final class create extends JFrame {
splitPane1.setDividerLocation(0.25); splitPane1.setDividerLocation(0.25);
textNodeSelect.setBackground(new Color(255, 242, 155)); textNodeSelect.setBackground(Color.LIGHT_GRAY);
rightScrollPane.setViewportView(textNodeSelect); rightScrollPane.setViewportView(textNodeSelect);
textNodeSelect.setFont(new Font("Monospaced", Font.PLAIN, 15)); textNodeSelect.setFont(new Font("Monospaced", Font.PLAIN, 15));
@ -431,6 +432,10 @@ public final class create extends JFrame {
toolBarPrincipal.add(btnSaveEvaluation); toolBarPrincipal.add(btnSaveEvaluation);
JButton btnNewFichierAnalyse = toolBarPrincipal.add( new actNewFichierAnalyse() ); JButton btnNewFichierAnalyse = toolBarPrincipal.add( new actNewFichierAnalyse() );
btnNewFichierAnalyse.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
}
});
btnNewFichierAnalyse.setIcon(new ImageIcon(create.class.getResource("/resources/fichierODF.png"))); btnNewFichierAnalyse.setIcon(new ImageIcon(create.class.getResource("/resources/fichierODF.png")));

View File

@ -395,8 +395,9 @@ public class evaluate extends JFrame {
txtpnmessages = new afficheText(); txtpnmessages = new afficheText();
txtpnmessages.setForeground(Color.BLACK);
txtpnmessages.setFont(new Font("Tahoma", Font.PLAIN, 16)); txtpnmessages.setFont(new Font("Tahoma", Font.PLAIN, 16));
txtpnmessages.setBackground(new Color(255, 242, 155)); txtpnmessages.setBackground(Color.LIGHT_GRAY);
txtpnmessages.setContentType("text/html"); txtpnmessages.setContentType("text/html");
txtpnmessages.setText(baliseStyle.balise() + "<hr><h1 class\"city\">*** Charger un fichier d'analyse. ***</h1><hr>"); txtpnmessages.setText(baliseStyle.balise() + "<hr><h1 class\"city\">*** Charger un fichier d'analyse. ***</h1><hr>");
scrollPane.setViewportView(txtpnmessages); scrollPane.setViewportView(txtpnmessages);