v4.1.0 ajout de la recherche un node par le contenu du plus proche

voisin.
This commit is contained in:
pablo rodriguez 2022-06-09 20:35:59 +02:00
parent 1ca9b19d16
commit adf591a178
80 changed files with 501 additions and 14 deletions

Binary file not shown.

3
bin/.gitignore vendored
View File

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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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.

BIN
bin/app/create$57.class Normal file

Binary file not shown.

BIN
bin/app/create$58.class Normal file

Binary file not shown.

BIN
bin/app/create$59.class Normal file

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 770 B

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

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

View File

@ -26,6 +26,7 @@ public class listeAttributsAnalyseWriter {
if(attribut.equals("evalNameCreator")) return true;
if(attribut.equals("evalNameInitialCreator")) return true;
if(attribut.equals("recherche_anchor-page-number")) return true;
if(attribut.equals("recherche_contenu_plus_proche_voisin")) return true;
return false;
}

View File

@ -27,6 +27,16 @@ public class rechercherUnNodeStudent {
node nodStudent =null;
//************************************************************************************************
//** 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");
}
//************************************************************************************************
//** Recherche le node par le contenu exact du node en intégrant les contenus des nodes enfants **
//************************************************************************************************
@ -35,6 +45,7 @@ public class rechercherUnNodeStudent {
if(nodStudent != null) return nodStudent;
}
//***********************************
//** Recherche le node par l'index **
//***********************************
@ -162,6 +173,32 @@ public class rechercherUnNodeStudent {
return nodStudent;
}
/**
* Recherche par le contenu par le plus proche voisin. Englobe les contenus des nodes enfants.</br>
* @param nameNode
* @param nodSujet
* @param nod0Student
* @param nod1Student
* @param nod2Student
* @param a
* @return
*/
private static node findNodeParContenuPlusProcheVoisin(String nameNode, node nodSujet,node nod0Student, node nod1Student, node nod2Student, Run a ) {
node nodStudent = null;
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");
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());
}
}
return nodStudent;
}
/**
* Recherche par l'attribut index.</br>
* @param nameNode

View File

@ -36,6 +36,7 @@ public class afficheText extends JEditorPane {
String imagereanalyseStyle = "<img src="+afficheText.class.getResource("/resources/evaluerstylemini.png").toString()+">";
String imagereEvaleNode = "<img src="+afficheText.class.getResource("/resources/evalnodemini.png").toString()+">";
String imagereRechercheAncragePage= "<img src="+afficheText.class.getResource("/resources/rechercheancragepagemini.png").toString()+">";
String imagereRecherchePlusProcheVoisin= "<img src="+afficheText.class.getResource("/resources/recherchecontenuplusprochevoisinmini.png").toString()+">";
StringBuilder sb = new StringBuilder();
@ -107,6 +108,11 @@ public class afficheText extends JEditorPane {
if(Lesattributsdunode.get(i).equals("recherche_anchor-page-number") && nod.getAttributs().get(Lesattributsdunode.get(i)).equals("true")) {
sb.append("<li class=\"p4\">"+imagereRechercheAncragePage + " <b>" + Lesattributsdunode.get(i) + "=\"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
}
if(Lesattributsdunode.get(i).equals("recherche_contenu_plus_proche_voisin") && nod.getAttributs().get(Lesattributsdunode.get(i)).equals("true")) {
sb.append("<li class=\"p4\">"+imagereRecherchePlusProcheVoisin + " <b>" + Lesattributsdunode.get(i) + "=\"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
}
// sb.append("<li class=\"p4\"><b>" + Lesattributsdunode.get(i) + "=\"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
}
@ -240,6 +246,8 @@ public class afficheText extends JEditorPane {
text.append("<br><p>Fichier d'analyse :</p>");
text.append("<p><b>"+commandes.PathFilenameAnalysis+"</b></p>");
setContentType("text/html");
setText(text.toString());
}

View File

@ -61,6 +61,7 @@ public class create extends JFrame {
private afficheText textNodeSelect = new afficheText();
private JToolBar toolBar_1;
private JMenuBar menuBar = new JMenuBar();
JButton buttonEvaluate;
TreePath cheminVersLeNode;
JToggleButton tglbtnTousLesNodes;
@ -308,13 +309,22 @@ public class create extends JFrame {
mnRechercheIndex.addSeparator();
mnRechercheIndex.add(actRechercheIndexfalse);
//Menu recherche par le contenu
JMenu mnRechercheContenu = new JMenu("Recherche par le contenu");
//Menu recherche par le contenu Exact
JMenu mnRechercheContenu = new JMenu("Recherche par le contenu exact");
mnRechercheContenu.setIcon(new ImageIcon(create.class.getResource("/resources/recherchecontenumini.png")));
mnRechercheContenu.add(actRechercheContenutrue);
mnRechercheContenu.addSeparator();
mnRechercheContenu.add(actRechercheContenufalse);
//Menu recherche par le contenu plus proche voisin
JMenu mnRechercheContenuPlusProcheVoisin = new JMenu("Recherche par le contenu exact");
mnRechercheContenuPlusProcheVoisin.setIcon(new ImageIcon(create.class.getResource("/resources/recherchecontenuplusprochevoisin.png")));
mnRechercheContenuPlusProcheVoisin.add(actRechercheContenuPlusProcheVoisintrue);
mnRechercheContenuPlusProcheVoisin.addSeparator();
mnRechercheContenuPlusProcheVoisin.add(actRechercheContenuPlusProcheVoisinfalse);
//Menu analyseStyle (évaluer le style du paragraphe)
JMenu mnAnalyseStyle = new JMenu("Evaluer le style");
mnAnalyseStyle.setIcon(new ImageIcon(create.class.getResource("/resources/evaluerstylemini.png")));
@ -380,6 +390,8 @@ public class create extends JFrame {
mnNiveauSup1.addSeparator();
mnNiveauSup1.add(mnRechercheContenu);
mnNiveauSup1.addSeparator();
mnNiveauSup1.add(mnRechercheContenuPlusProcheVoisin);
mnNiveauSup1.addSeparator();
mnNiveauSup1.add(mnAnalyseStyle);
}
if(ecritureSujet.listeDesRechercheAnchorPageNumber(nod.getNomElt())) {
@ -525,8 +537,12 @@ public class create extends JFrame {
toolBar_1.addSeparator();
JButton button = toolBar_1.add( actEvaluer );
button.setIcon(new ImageIcon(create.class.getResource("/resources/evaluate.png")));
buttonEvaluate = toolBar_1.add( actEvaluer );
buttonEvaluate.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
}
});
buttonEvaluate.setIcon(new ImageIcon(create.class.getResource("/resources/evaluate.png")));
toolBar_1.addSeparator();
@ -664,9 +680,11 @@ public class create extends JFrame {
commandes.sujetSauvegarde = commandes.sujet.clone();
commandes.sujet.supprimeTousLesNodesEvaluerFalseOuNull();
commandes.fichierAnalyseValide=false;
textNodeSelect.setContentType("text/html");
textNodeSelect.setText("<hr><h1>Affiche uniquement les nodes évalués par l'application.</h1><hr>"
+ "<br><h2><u>Le chemin vers chaque node évalué est constitué de node évalué.</u><br>"
+ "Si vous enregistrez maintenant, vous enregistrez le fichier d'analyse avec <u>uniquement</u> les nodes évalués.</h2>");
buttonEvaluate.setEnabled(false);
constructionTree();
} catch (CloneNotSupportedException e1) {
e1.printStackTrace();
@ -674,9 +692,11 @@ public class create extends JFrame {
}else {
try {
commandes.sujet = commandes.sujetSauvegarde.clone();
buttonEvaluate.setEnabled(true);
} catch (CloneNotSupportedException e1) {
e1.printStackTrace();
}
textNodeSelect.setContentType("text/html");
textNodeSelect.setText("<hr><h1>Affiche tous les nodes évalués ou pas.</h1><hr>");
commandes.fichierAnalyseValide=true;
constructionTree();
@ -817,11 +837,11 @@ public class create extends JFrame {
Run.ecritureNodeEnXML(commandes.sujet, commandes.nameSujet ,commandes.PathFilenameAnalysis,"sujet");
if(m.find()) {
textNodeSelect.setText("Le fichier \"" + commandes.nameSujet + " a été renregistré.\n\n"
+ "Il se trouve dans le dossier " + commandes.path);
textNodeSelect.setText("Le fichier \"" + commandes.nameSujet + " a été réenregistré.\n\n"
+ "Il se trouve dans le dossier " + commandes.PathFilenameAnalysis);
}else {
textNodeSelect.setText("Le fichier \"" + commandes.nameSujet + ".xml\" a été renregistré.\n\n"
+ "Il se trouve dans le dossier " + commandes.path);
textNodeSelect.setText("Le fichier \"" + commandes.nameSujet + ".xml\" a été réenregistré.\n\n"
+ "Il se trouve dans le dossier " + commandes.PathFilenameAnalysis);
}
System.out.println( input + "Save" );
@ -1551,6 +1571,26 @@ public class create extends JFrame {
textNodeSelect.refreshAffichage(nod);
}
};
/**
* Recherche le node par le contenu true
*/
private AbstractAction actRechercheContenuPlusProcheVoisintrue= new AbstractAction() {
private static final long serialVersionUID = 1L;
{
putValue( Action.NAME, "Plus proche voisin : true" );
putValue( Action.SHORT_DESCRIPTION, "Recherche par le contenu du plus proche voisin." );
}
@Override public void actionPerformed( ActionEvent e ) {
DefaultMutableTreeNode selectNode = (DefaultMutableTreeNode) tree.getSelectionPath().getLastPathComponent();
node nod = (node) selectNode.getUserObject();
nod.getAttributs().put("recherche_contenu_plus_proche_voisin", "true");
textNodeSelect.refreshAffichage(nod);
}
};
/**
* Recherche le node par le contenu false
@ -1573,6 +1613,26 @@ public class create extends JFrame {
}
};
/**
* Recherche le node par le contenu true
*/
private AbstractAction actRechercheContenuPlusProcheVoisinfalse= new AbstractAction() {
private static final long serialVersionUID = 1L;
{
putValue( Action.NAME, "Plus proche voisin : false" );
putValue( Action.SHORT_DESCRIPTION, "Ne recherche pas par le contenu du plus proche voisin." );
}
@Override public void actionPerformed( ActionEvent e ) {
DefaultMutableTreeNode selectNode = (DefaultMutableTreeNode) tree.getSelectionPath().getLastPathComponent();
node nod = (node) selectNode.getUserObject();
nod.getAttributs().put("recherche_contenu_plus_proche_voisin", "true");
textNodeSelect.refreshAffichage(nod);
}
};
/**
* Recherche par le numéro de la page true
*/
@ -2235,6 +2295,7 @@ public class create extends JFrame {
new verificationFichierAnalyse();
if(commandes.fichierAnalyseValide) {
constructionTree();
textNodeSelect.afficheChargementFichierAnalyse();

View File

@ -58,7 +58,7 @@ public class filechooserXML extends JFileChooser {
private void openFileXML(File file) {
commandes.path = file.getPath().substring(0,file.getPath().lastIndexOf("\\"));
commandes.PathFilenameAnalysis = file.getPath();
commandes.PathFilenameAnalysis = getCurrentDirectory().getPath();
commandes.nameSujet = file.getName().toString();
BufferedReader br;

Binary file not shown.

After

Width:  |  Height:  |  Size: 770 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 770 B