V4.1.1 amélioration de l'algorithme recherche par le plus proche voisin

This commit is contained in:
pablo rodriguez 2022-06-10 09:36:23 +02:00
parent 7f59cd5ea9
commit cebfed7163
80 changed files with 448 additions and 160 deletions

Binary file not shown.

4
bin/.gitignore vendored
View File

@ -1,5 +1 @@
/recherchecontenuplusprochevoisin.png
/recherchecontenuplusprochevoisin.svg
/recherchecontenuplusprochevoisinmini.png
/MEPTL/
/app/

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 770 B

View File

@ -0,0 +1,377 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
inkscape:export-ydpi="48"
inkscape:export-xdpi="48"
inkscape:export-filename="C:\Users\pabr6\git\analyseWriter\MEPTL\icons\recherchecontenuplusprochevoisin.png"
sodipodi:docname="recherchecontenuplusprochevoisin.svg"
inkscape:version="1.1.2 (b8e25be833, 2022-02-05)"
id="svg8"
version="1.1"
viewBox="0 0 12.7 12.7"
height="48"
width="48"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs
id="defs2">
<marker
style="overflow:visible"
id="Arrow2Mstart"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow2Mstart"
inkscape:isstock="true">
<path
transform="scale(0.6) translate(0,0)"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
style="stroke:context-stroke;fill-rule:evenodd;fill:context-stroke;stroke-width:0.62500000;stroke-linejoin:round"
id="path1812" />
</marker>
<marker
style="overflow:visible;"
id="Arrow2Mend"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow2Mend"
inkscape:isstock="true">
<path
transform="scale(0.6) rotate(180) translate(0,0)"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
style="stroke:context-stroke;fill-rule:evenodd;fill:context-stroke;stroke-width:0.62500000;stroke-linejoin:round;"
id="path1815" />
</marker>
<marker
style="overflow:visible"
id="Arrow2Lstart"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow2Lstart"
inkscape:isstock="true">
<path
transform="scale(1.1) translate(1,0)"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
style="stroke:context-stroke;fill-rule:evenodd;fill:context-stroke;stroke-width:0.62500000;stroke-linejoin:round"
id="path1806" />
</marker>
<linearGradient
id="k"
gradientTransform="matrix(7.1445318,0,0,7.1427803,-768.64762,-6969.2737)"
gradientUnits="userSpaceOnUse"
x1="122.75008"
x2="111.74973"
xlink:href="#b"
y1="991.62115"
y2="977.11713" />
<linearGradient
id="b">
<stop
offset="0"
stop-color="#0369a3"
id="stop7" />
<stop
offset="1"
stop-color="#1c99e0"
id="stop9" />
</linearGradient>
<linearGradient
id="j"
gradientUnits="userSpaceOnUse"
x1="108.00134"
x2="20.001341"
y1="122"
y2="6"
gradientTransform="matrix(0.89309547,0,0,0.89309547,11.888703,4.7007092)">
<stop
offset="0"
stop-color="#e6e6e6"
id="stop35" />
<stop
offset="1"
stop-color="#fff"
id="stop37" />
</linearGradient>
<linearGradient
id="i"
gradientUnits="userSpaceOnUse"
x1="108.00134"
x2="20.001341"
xlink:href="#b"
y1="130"
y2="14"
gradientTransform="matrix(0.89309547,0,0,0.89309547,11.888703,4.7007092)" />
<linearGradient
id="h"
gradientTransform="matrix(4.0188402,0,0,3.2746684,-830.28017,1969.2037)"
gradientUnits="userSpaceOnUse"
x2="0"
y1="-581.63782"
y2="-578.63782">
<stop
offset="0"
stop-color="#63bbee"
id="stop29" />
<stop
offset="1"
stop-color="#aadcf7"
id="stop31" />
</linearGradient>
<linearGradient
id="g"
gradientTransform="matrix(-3.750849,0,0,3.4929856,1388.0957,-4034.9161)"
gradientUnits="userSpaceOnUse"
x2="0"
xlink:href="#a"
y1="1173"
y2="1178" />
<linearGradient
id="a">
<stop
offset="0"
stop-color="#666"
id="stop2" />
<stop
offset="1"
stop-color="#333"
id="stop4" />
</linearGradient>
<linearGradient
id="f"
gradientTransform="matrix(3.750849,0,0,3.4929856,-1232.1391,-4033.8265)"
gradientUnits="userSpaceOnUse"
x2="0"
xlink:href="#a"
y1="1173"
y2="1178" />
<linearGradient
id="e"
gradientTransform="matrix(1.0716877,0,0,1.0915592,-239.24225,771.47081)"
gradientUnits="userSpaceOnUse"
x2="0"
y1="-629.66907"
y2="-635.54944">
<stop
offset="0"
stop-color="#18a303"
id="stop22" />
<stop
offset="1"
stop-color="#106802"
id="stop24" />
</linearGradient>
<linearGradient
id="d"
gradientTransform="matrix(3.750849,0,0,3.4929856,-1232.1391,-4029.4592)"
gradientUnits="userSpaceOnUse"
x2="0"
y1="1173"
y2="1178">
<stop
offset="0"
stop-color="#0369a3"
id="stop17" />
<stop
offset="1"
stop-color="#023f62"
id="stop19" />
</linearGradient>
<linearGradient
id="c"
gradientTransform="matrix(0,0.70651344,-1.1431621,0,1351.1749,-247.16436)"
gradientUnits="userSpaceOnUse"
x1="445.69522"
x2="441.38797"
y1="1103.5776"
y2="1099.8198">
<stop
offset="0"
stop-color="#e9b913"
id="stop12" />
<stop
offset="1"
stop-color="#ff0"
id="stop14" />
</linearGradient>
<linearGradient
id="k-5"
gradientTransform="matrix(0.71489533,0,0,0.73430879,-77.393665,-716.61847)"
gradientUnits="userSpaceOnUse"
x1="122.75008"
x2="111.74973"
xlink:href="#b"
y1="991.62115"
y2="977.11713" />
<linearGradient
id="j-6"
gradientUnits="userSpaceOnUse"
x1="108.00134"
x2="20.001341"
y1="122"
y2="6"
gradientTransform="matrix(0.08936482,0,0,0.09181408,0.70827577,0.33632492)">
<stop
offset="0"
stop-color="#e6e6e6"
id="stop35-5" />
<stop
offset="1"
stop-color="#fff"
id="stop37-4" />
</linearGradient>
</defs>
<sodipodi:namedview
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="-8"
inkscape:window-height="1009"
inkscape:window-width="1920"
inkscape:guide-bbox="true"
showguides="true"
units="px"
showgrid="false"
inkscape:document-rotation="0"
inkscape:current-layer="layer1"
inkscape:document-units="mm"
inkscape:cy="33.51606"
inkscape:cx="16.75803"
inkscape:zoom="7.3994378"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base"
inkscape:pagecheckerboard="0"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:snap-bbox="true"
inkscape:bbox-paths="true"
inkscape:bbox-nodes="true"
inkscape:snap-midpoints="true"
inkscape:object-paths="true"
inkscape:snap-global="false">
<sodipodi:guide
id="guide14"
orientation="1,0"
position="-2.471617e-08,4.4381936" />
<sodipodi:guide
position="9.3683919,2.4376775"
orientation="0,-1"
id="guide1667" />
<sodipodi:guide
position="-1.8236183,8.6236768"
orientation="1,0"
id="guide1669" />
<sodipodi:guide
position="9.3683919,7.2649024"
orientation="1,0"
id="guide1751" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:groupmode="layer"
inkscape:label="Calque 1"
transform="translate(-0.92013353,-0.34176359)">
<g
id="g3415"
transform="translate(0.71514442,0.21454333)">
<ellipse
style="fill:#d4aa00;stroke:none;stroke-width:1.3227;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
id="path1128"
cx="10.354302"
cy="6.8667359"
rx="1.8652228"
ry="1.9188584" />
<path
sodipodi:type="star"
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:#ff6600;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.77953;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;-inkscape-stroke:none;stop-color:#000000;stop-opacity:1"
id="path1254"
inkscape:flatsided="false"
sodipodi:sides="6"
sodipodi:cx="25.137045"
sodipodi:cy="21.623264"
sodipodi:r1="4.8445435"
sodipodi:r2="4.2631979"
sodipodi:arg1="1.1695675"
sodipodi:arg2="1.6931663"
inkscape:rounded="0.1"
inkscape:randomized="0"
d="m 27.029081,26.083063 c -0.223077,0.09464 -2.171913,-0.198901 -2.412422,-0.22848 -0.24051,-0.02958 -2.202397,-0.216997 -2.395895,-0.362868 -0.193498,-0.145871 -0.913703,-1.980382 -1.008341,-2.203459 -0.09464,-0.223077 -0.913274,-2.01583 -0.883695,-2.25634 0.02958,-0.24051 1.25821,-1.781481 1.404081,-1.974979 0.145871,-0.193498 1.289123,-1.798832 1.5122,-1.893471 0.223077,-0.09464 2.171913,0.198901 2.412422,0.22848 0.24051,0.02958 2.202397,0.216997 2.395895,0.362868 0.193498,0.145871 0.913702,1.980382 1.008341,2.203459 0.09464,0.223077 0.913273,2.01583 0.883695,2.256339 -0.02958,0.24051 -1.25821,1.781481 -1.404081,1.974979 -0.145871,0.193498 -1.289123,1.798833 -1.5122,1.893472 z"
transform="matrix(0.41381564,-0.04167224,0.04185445,0.41201407,-8.3724831,-1.040471)" />
<path
style="fill:none;stroke:#000000;stroke-width:0.465;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#Arrow2Mstart);marker-end:url(#Arrow2Mend)"
d="M 2.8867807,7.0641212 9.5140063,6.9894539"
id="path1786"
sodipodi:nodetypes="cc" />
<path
sodipodi:type="star"
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:#d40000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.77953;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;-inkscape-stroke:none;stop-color:#000000;stop-opacity:1"
id="path2094"
inkscape:flatsided="false"
sodipodi:sides="4"
sodipodi:cx="18.785212"
sodipodi:cy="3.2434897"
sodipodi:r1="3.6514277"
sodipodi:r2="2.1178281"
sodipodi:arg1="0.68052122"
sodipodi:arg2="1.4659194"
inkscape:rounded="0.1"
inkscape:randomized="0"
d="M 21.623265,5.5409616 C 21.458205,5.7448587 19.267808,5.3222191 19.006916,5.3496814 18.746024,5.3771437 16.691637,6.2466028 16.48774,6.0815432 16.283843,5.9164836 16.706482,3.7260859 16.67902,3.4651941 16.651558,3.2043023 15.782098,1.149915 15.947158,0.94601789 c 0.16506,-0.20389714 2.355457,0.21874251 2.616349,0.19128021 0.260892,-0.027462 2.315279,-0.89692144 2.519176,-0.73186185 0.203898,0.16505958 -0.218742,2.35545735 -0.19128,2.61634915 0.02746,0.2608918 0.896922,2.3152791 0.731862,2.5191762 z"
transform="matrix(0.53349298,0,0,0.57972829,-1.0708926,0.22055568)" />
<path
sodipodi:type="star"
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.77953;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;-inkscape-stroke:none;stop-color:#000000;stop-opacity:1"
id="path2951"
inkscape:flatsided="false"
sodipodi:sides="4"
sodipodi:cx="21.488119"
sodipodi:cy="36.08382"
sodipodi:r1="5.5145288"
sodipodi:r2="3.1984265"
sodipodi:arg1="0.94200004"
sodipodi:arg2="1.7273982"
inkscape:rounded="0.1"
inkscape:randomized="0"
d="m 24.731609,40.543619 c -0.32041,0.233025 -3.350987,-1.238721 -3.742325,-1.300511 -0.391337,-0.06179 -3.727938,0.404612 -3.960963,0.0842 -0.233026,-0.32041 1.238721,-3.350987 1.300511,-3.742324 0.06179,-0.391338 -0.404612,-3.727939 -0.0842,-3.960964 0.32041,-0.233025 3.350987,1.238721 3.742325,1.300511 0.391338,0.06179 3.727938,-0.404612 3.960964,-0.0842 0.233025,0.320409 -1.238721,3.350986 -1.300512,3.742324 -0.06179,0.391338 0.404613,3.727938 0.0842,3.960964 z"
transform="matrix(0.38019183,0,0,0.36424583,-1.2243821,-2.3426312)" />
<path
sodipodi:type="star"
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:#ff00ff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.77953;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;-inkscape-stroke:none;stop-color:#000000;stop-opacity:1"
id="path3261"
inkscape:flatsided="false"
sodipodi:sides="7"
sodipodi:cx="18.785212"
sodipodi:cy="3.2434897"
sodipodi:r1="3.6514277"
sodipodi:r2="2.1178281"
sodipodi:arg1="0.68052122"
sodipodi:arg2="1.1293202"
inkscape:rounded="0.1"
inkscape:randomized="0"
d="M 21.623265,5.5409616 C 21.49927,5.6941314 19.868279,5.0740627 19.690106,5.1582646 19.511932,5.2424666 18.955535,6.8962627 18.758473,6.8948196 18.561411,6.8933765 18.029293,5.2316093 17.852372,5.144807 17.675452,5.0580047 16.035554,5.654121 15.913816,5.4991517 15.792078,5.3441825 16.75953,3.8920613 16.717086,3.6996187 16.674643,3.5071761 15.186121,2.5967248 15.231378,2.4049244 15.276635,2.213124 17.015146,2.0641257 17.139141,1.910956 c 0.123994,-0.1531698 -0.09226,-1.88460019 0.08591,-1.96880214 0.178174,-0.08420195 1.378609,1.18212144 1.575671,1.18356454 0.197062,0.00144 1.415914,-1.2471641 1.592835,-1.16036181 0.176921,0.08680229 -0.06467,1.81488001 0.05707,1.96984921 0.121738,0.1549692 1.85788,0.329412 1.900324,0.5218546 0.04244,0.1924427 -1.459253,1.0809969 -1.50451,1.2727973 -0.04526,0.1918004 0.900825,1.6579342 0.77683,1.8111039 z"
transform="matrix(0.58370349,0,0,0.59514823,-6.3767842,0.54332465)" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 770 B

View File

@ -42,21 +42,26 @@ public class analyseLesNodesEnfants {
//***************************************************
//** Recherche le node correspondant de l'étudiant **
//***************************************************
if(nod2Student!=null) {
if(nod2Student.containElementByName(nameNode)) {
nodStudentCorrespondantAuNodSujet = rechercherUnNodeStudent.rechercheLeNodeEnCascade(nameNode,nodEnfantSujet,nodStudent,nod1Student,nod2Student,a);
}
}
if(nodStudentCorrespondantAuNodSujet==null && nod1Student!=null) {
if(nod1Student.containElementByName(nameNode)) {
nodStudentCorrespondantAuNodSujet = rechercherUnNodeStudent.rechercheLeNodeEnCascade(nameNode,nodEnfantSujet,nodStudent,nod1Student,nod2Student,a);
}
}
if(nodStudentCorrespondantAuNodSujet==null && nodStudent!=null) {
if(nodStudent.containElementByName(nameNode)) {
nodStudentCorrespondantAuNodSujet = rechercherUnNodeStudent.rechercheLeNodeEnCascade(nameNode,nodEnfantSujet,nodStudent,nod1Student,nod2Student,a);
if(nodEnfantSujet.getAttributs().get("evaluer")!=null) {
if(nodEnfantSujet.getAttributs().get("evaluer").equals("true")) {
if(nod2Student!=null) {
if(nod2Student.containElementByName(nameNode)) {
nodStudentCorrespondantAuNodSujet = rechercherUnNodeStudent.rechercheLeNodeEnCascade(nameNode,nodEnfantSujet,nodStudent,nod1Student,nod2Student,a);
}
}
if(nodStudentCorrespondantAuNodSujet==null && nod1Student!=null) {
if(nod1Student.containElementByName(nameNode)) {
nodStudentCorrespondantAuNodSujet = rechercherUnNodeStudent.rechercheLeNodeEnCascade(nameNode,nodEnfantSujet,nodStudent,nod1Student,nod2Student,a);
}
}
if(nodStudentCorrespondantAuNodSujet==null && nodStudent!=null) {
if(nodStudent.containElementByName(nameNode)) {
nodStudentCorrespondantAuNodSujet = rechercherUnNodeStudent.rechercheLeNodeEnCascade(nameNode,nodEnfantSujet,nodStudent,nod1Student,nod2Student,a);
}
}
}
}
//**************************************************************
//** Analyse attribut et contenu du node enfant de l'étudiant **

View File

@ -33,7 +33,7 @@ public class commandes {
public static node nodeCSV = null;
//**version
public static String version ="V4.1.0"; // La version actuelle
public static String version ="V4.1.1"; // La version actuelle
public static String branch = "Origin";
public static String Annee ="2022";

View File

@ -301,7 +301,7 @@ public class ecritureSujet {
no.get(k).getAttributs().put("evaluer", "false");
if(listeDesNodesAvecEvalNode(no.get(k).getNomElt())) 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(listeDesNodesRechercheIndex(no.get(k).getNomElt())) {no.get(k).getAttributs().put("recherche_index", "false"); no.get(k).getAttributs().put("recherche_contenu_exact", "false");}
if(listeDesNodesByRecherche(no.get(k).getNomElt())) {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");}
if(listeDesNodesAnalyseStyle(no.get(k).getNomElt())) no.get(k).getAttributs().put("analyseStyle", "false");
if(listeDesNodesAllContent(no.get(k).getNomElt())) no.get(k).getAttributs().put("allContent", "strict0");
if(listeDesRechercheAnchorPageNumber(no.get(k).getNomElt())) no.get(k).getAttributs().put("recherche_anchor-page-number", "false");
@ -344,7 +344,7 @@ public class ecritureSujet {
* @param nameNode
* @return
*/
public static boolean listeDesNodesRechercheIndex(String nameNode) {
public static boolean listeDesNodesByRecherche(String nameNode) {
if(nameNode.contains("text:")) return true;
if(nameNode.equals("draw:text-box")) return true;
return false;

View File

@ -3090,68 +3090,12 @@ public class meptl {
return ensembleDesParagraphes;
}
// /**
// * Ajoute les valeurs par défauts pour les styles de paragraphes.<br>
// * <br>
// * @param LesStyleStudents : Tous les styles de paragraphes du fichiers de l'étudiants.
// * @param styleParagraph : le node dont il faut ajouter les valerus par défauts.
// * @return le node styleParagraph.
// */
// public static node ajouteValeurParDefautAuStyleParagraph(node ensembleDesParagraphes , node styleParagraph) {
//
// node LesStyleDefaut = null;
//
// if(ensembleDesParagraphes.retourneEnfantsByNameExist("style:default-style")) {
// LesStyleDefaut = ensembleDesParagraphes.retourneFirstEnfantsByName("style:default-style");
// }
//
// if(LesStyleDefaut!=null && styleParagraph!=null) {
//
// //le paragarph properties
// node nodeStyleParDefautParagraphProperties = LesStyleDefaut.retourneFirstEnfantsByName("style:paragraph-properties");
// node LesNodesStyleParagraph = styleParagraph.retourneFirstEnfantsByName("style:paragraph-properties");
// Enumeration<String > K = nodeStyleParDefautParagraphProperties.getAttributs().keys();
// while(K.hasMoreElements()){
// String Key = K.nextElement();
// if(LesNodesStyleParagraph.getNomElt().equals("style:paragraph-properties")) {
// if(LesNodesStyleParagraph.getAttributs().get(Key)==null) {
// LesNodesStyleParagraph.getAttributs().put(Key, nodeStyleParDefautParagraphProperties.getAttributs().get(Key));
// }
// }else {
// node n = new node();
// n.setNomElt("style:paragraph-properties");
// n.setAttributs(nodeStyleParDefautParagraphProperties.getAttributs());
// styleParagraph.getNodes().add(n);
// break;
// }
// }
//
// //le text properties
// node nodeStyleParDefautTextProperties = LesStyleDefaut.retourneFirstEnfantsByName("style:text-properties");
// node LesNodesStyleText = styleParagraph.retourneFirstEnfantsByName("style:text-properties");
// K = nodeStyleParDefautTextProperties.getAttributs().keys();
// while(K.hasMoreElements()){
// String Key = K.nextElement();
// if(LesNodesStyleText.getNomElt().equals("style:text-properties")) {
// if(LesNodesStyleText.getAttributs().get(Key)==null) {
// LesNodesStyleText.getAttributs().put(Key, nodeStyleParDefautTextProperties.getAttributs().get(Key));
// }
// }else {
// node n = new node();
// n.setNomElt("style:text-properties");
// n.setAttributs(nodeStyleParDefautTextProperties.getAttributs());
// styleParagraph.getNodes().add(n);
// break;
// }
// }
//
//
//
// }
// return styleParagraph;
// }
//
/**
*
* @param ensembleDesParagraphes
* @return
*/
public static node ajouteValeurLesValeursDuStyleParagraphParent(node ensembleDesParagraphes) {
for(int i = 0 ; i < ensembleDesParagraphes.getNodes().size(); i++) {
@ -3215,69 +3159,7 @@ public class meptl {
}
// /**
// * Même méthode que "ajouteValeurParDefautAuStyleParagraph".<br>
// * <br>
// * @param ensembleDesParagraphes
// * @param styleParagraph
// * @return
// */
// public static node ajouteValeurLesValeursDuStyleParagraphParent(node ensembleDesParagraphes , node styleParagraph) {
//
// node parent = null;
// if(styleParagraph.getAttributs().get("style:parent-style-name")!=null) {
// String nameStyleParent = styleParagraph.getAttributs().get("style:parent-style-name");
// if(ensembleDesParagraphes.retourneFirstNodeByNameAndAttributValue("style:style", "style:name", nameStyleParent)!=null) {
// parent = ensembleDesParagraphes.retourneFirstNodeByNameAndAttributValue("style:style", "style:name", nameStyleParent);
// }
// }
//
//
// if(parent!=null) {
//
// //le paragraph properties
// node nodeStyleParDefautParagraphProperties = parent.retourneFirstEnfantsByName("style:paragraph-properties");
// node LesNodesStyleParagraph = styleParagraph.retourneFirstEnfantsByName("style:paragraph-properties");
// Enumeration<String > K = nodeStyleParDefautParagraphProperties.getAttributs().keys();
// while(K.hasMoreElements()){
// String Key = K.nextElement();
// if(LesNodesStyleParagraph.getNomElt().equals("style:paragraph-properties")) {
// if(LesNodesStyleParagraph.getAttributs().get(Key)==null) {
// LesNodesStyleParagraph.getAttributs().put(Key, nodeStyleParDefautParagraphProperties.getAttributs().get(Key));
// }
// }else {
// node n = new node();
// n.setNomElt("style:paragraph-properties");
// n.setAttributs(nodeStyleParDefautParagraphProperties.getAttributs());
// styleParagraph.getNodes().add(n);
// break;
// }
// }
//
// //le text properties
// node nodeStyleParDefautTextProperties = parent.retourneFirstEnfantsByName("style:text-properties");
// node LesNodesStyleText = styleParagraph.retourneFirstEnfantsByName("style:text-properties");
// K = nodeStyleParDefautTextProperties.getAttributs().keys();
// while(K.hasMoreElements()){
// String Key = K.nextElement();
// if(LesNodesStyleText.getNomElt().equals("style:text-properties")) {
// if(LesNodesStyleText.getAttributs().get(Key)==null) {
// LesNodesStyleText.getAttributs().put(Key, nodeStyleParDefautTextProperties.getAttributs().get(Key));
// }
// }else {
// node n = new node();
// n.setNomElt("style:text-properties");
// n.setAttributs(nodeStyleParDefautTextProperties.getAttributs());
// styleParagraph.getNodes().add(n);
// break;
// }
// }
// }
// return styleParagraph;
// }
//

View File

@ -31,9 +31,15 @@ public class rechercherUnNodeStudent {
//** Recherche le node par le contenu exact du node en intégrant les contenus des nodes enfants **
//************************************************************************************************
if(nodSujet.getAttributs().get("recherche_contenu_plus_proche_voisin")!=null && nodSujet.retourneLesContenusEnfants("").length()>2){
nodStudent = findNodeParContenuPlusProcheVoisin(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a);
if(nodStudent != null) {return nodStudent;}
System.out.println("N'a pas trouvé par le plus proche voisin");
if(nodSujet.getAttributs().get("recherche_contenu_plus_proche_voisin").equals("true")){
nodStudent = findNodeParContenuPlusProcheVoisin(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a);
if(nodStudent != null) {
System.out.println("A trouvé le node "+ nameNode + " par le plus proche voisin avec le contenu =" + nodSujet.retourneLesContenusEnfants(""));
return nodStudent;
}else {
System.out.println("N'a pas trouvé le node "+ nameNode + " par le plus proche voisin avec le contenu =" + nodSujet.retourneLesContenusEnfants(""));
}
}
}
@ -188,10 +194,16 @@ public class rechercherUnNodeStudent {
if(nodSujet.getAttributs().get("recherche_contenu_plus_proche_voisin").equals("true")) {
if(!nodSujet.retourneLesContenusEnfants("").isEmpty()) {
System.out.println("recherche par le contenu plus proche voisin");
if(nod0Student!=null) System.out.println("nod0Student "+ nod0Student.toString() + " contenu=" + nod0Student.retourneLesContenusEnfants(""));
if(nod1Student!=null) System.out.println("nod1Student "+ nod1Student.toString() + " contenu=" + nod1Student.retourneLesContenusEnfants(""));
if(nod2Student!=null) System.out.println("nod2Student "+ nod2Student.toString() + " contenu=" + nod2Student.retourneLesContenusEnfants(""));
String valueAttribut = outils.withoutCodeAndPointPourRechercheContenuExact(nodSujet.retourneLesContenusEnfants(""));
if(nod0Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod0Student.getNodes(), valueAttribut, nodSujet.getNomElt());
if(nod1Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod1Student.getNodes(), valueAttribut, nodSujet.getNomElt());
if(nod2Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod2Student.getNodes(), valueAttribut, nodSujet.getNomElt());
System.out.println("Contenu recherché = " + valueAttribut);
if(nod0Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod0Student.getNodes(), valueAttribut, nodSujet.getNomElt(),0.5,null);
if(nod1Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod1Student.getNodes(), valueAttribut, nodSujet.getNomElt(),0.5,null);
if(nod2Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod2Student.getNodes(), valueAttribut, nodSujet.getNomElt(),0.5,null);
}
}
return nodStudent;

View File

@ -279,8 +279,9 @@ public class attributs extends JFrame {
if(listeAttributPasEvaluable(Leslabels.get(i).getText())) {Lesevaluer.get(i).setEnabled(false);Lespoints.get(i).setEnabled(false);}
}
//*******************
//** Bouton valide **
//*******************
btnValide.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
@ -290,7 +291,7 @@ public class attributs extends JFrame {
if(nodStyleParent!=null) {
String nomDuStle = nodStyleParent.getAttributs().get("style:name");
Pattern p = Pattern.compile("^P[0-9]{1,}$");
Pattern p = Pattern.compile("^P[0-9]{1,}$|^T[0-9]{1,}$");
Matcher m = p.matcher(nomDuStle);
if(m.find()) {
codeEvaluateur = "";

View File

@ -237,9 +237,22 @@ public class create extends JFrame {
if(nod!=null) {
boolean nodeSetting = false;
boolean nodeFormatageDirectePasDeTitrePasAddMenu = false;
if(nod.chemin().contains("setting")) nodeSetting=true;
node nodStyleParent = nod.retourneParentAyantLAttribut("style:name");
if(nodStyleParent!=null) {
String nomDuStle = nodStyleParent.getAttributs().get("style:name");
Pattern p = Pattern.compile("^P[0-9]{1,}$|^T[0-9]{1,}$");
Matcher m = p.matcher(nomDuStle);
if(m.find()) {
nodeFormatageDirectePasDeTitrePasAddMenu = true;
}
}
//Menu Evaluer
JMenu mnEvaluer = new JMenu("Evaluer");
mnEvaluer.add(actEvalueTrue);
@ -365,10 +378,12 @@ public class create extends JFrame {
mnNiveauSup1.setIcon( new ImageIcon(create.class.getResource("/resources/attributanalysewritermini.png")));
JMenu mnPourFeedback = new JMenu("Pour représentation feedback");
mnPourFeedback.add(mnSaut);
mnPourFeedback.addSeparator();
mnPourFeedback.add(mnTitre);
mnPourFeedback.addSeparator();
mnPourFeedback.add(mnAddMenuNiveauSup1);
if(!nodeFormatageDirectePasDeTitrePasAddMenu) {
mnPourFeedback.addSeparator();
mnPourFeedback.add(mnTitre);
mnPourFeedback.addSeparator();
mnPourFeedback.add(mnAddMenuNiveauSup1);
}
mnNiveauSup1.add(mnPourFeedback);
if(!nod.getNomElt().equals("page")) {
mnNiveauSup1.addSeparator();
@ -384,7 +399,7 @@ public class create extends JFrame {
mnNiveauSup1.addSeparator();
mnNiveauSup1.add(actevalNameCreator);
}
if(ecritureSujet.listeDesNodesRechercheIndex(nod.getNomElt())) {
if(ecritureSujet.listeDesNodesByRecherche(nod.getNomElt())) {
mnNiveauSup1.addSeparator();
mnNiveauSup1.add(mnRechercheIndex);
mnNiveauSup1.addSeparator();
@ -1629,7 +1644,7 @@ public class create extends JFrame {
DefaultMutableTreeNode selectNode = (DefaultMutableTreeNode) tree.getSelectionPath().getLastPathComponent();
node nod = (node) selectNode.getUserObject();
nod.getAttributs().put("recherche_contenu_plus_proche_voisin", "true");
nod.getAttributs().put("recherche_contenu_plus_proche_voisin", "false");
textNodeSelect.refreshAffichage(nod);
}
};