2022-04-25 13:25:20 +02:00
package MEPTL ;
2022-05-03 16:02:02 +02:00
import java.io.IOException ;
2022-04-25 13:25:20 +02:00
import java.util.Dictionary ;
import java.util.Enumeration ;
import java.util.regex.Matcher ;
import java.util.regex.Pattern ;
2022-07-10 11:42:47 +02:00
import javax.swing.JOptionPane ;
2022-05-03 16:02:02 +02:00
import cXML.Run ;
2022-04-25 13:25:20 +02:00
import cXML.node ;
2022-06-16 16:45:48 +02:00
import evaluer.evaluation ;
2022-04-25 13:25:20 +02:00
2022-05-03 16:02:02 +02:00
/ * *
*
* @author pablo rodriguez
*
* Vérification du fichier d ' analyse .
*
* /
2022-04-25 13:25:20 +02:00
public class verificationFichierAnalyse {
2022-05-25 10:43:11 +02:00
2022-04-25 13:25:20 +02:00
public static boolean erreur = false ;
2022-05-24 18:25:41 +02:00
public static StringBuilder messageErreur = new StringBuilder ( ) ;
2022-05-25 10:43:11 +02:00
static node verifSujet = new node ( ) ;
2022-04-25 13:25:20 +02:00
2022-05-24 18:25:41 +02:00
public verificationFichierAnalyse ( ) throws CloneNotSupportedException {
2022-05-03 16:02:02 +02:00
2022-05-26 20:10:24 +02:00
erreur = false ; //réïnitialise la variable erreur.
2022-05-24 18:25:41 +02:00
if ( commandes . sujet = = null ) {
2022-07-10 11:42:47 +02:00
commandes . fichierAnalyseValide = false ;
JOptionPane . showMessageDialog ( null , " <html><h1 style= \" text-align:center; \" >Ce fichier d'analyse est null.</h1> " , " Erreur " , JOptionPane . ERROR_MESSAGE ) ;
}
if ( commandes . fichierAnalyseValide ) if ( ! commandes . sujet . getNomElt ( ) . equals ( " fichier " ) ) {
commandes . fichierAnalyseValide = false ;
2022-11-13 11:57:18 +01:00
JOptionPane . showMessageDialog ( null , " <html><h1 style= \" text-align:center; \" >Ce fichier n'est pas un fichier<br>d'analyseWriter</h1></html> " , " Erreur " , JOptionPane . ERROR_MESSAGE ) ;
2022-04-25 13:25:20 +02:00
}
2022-04-25 14:54:45 +02:00
//** Vérification des attributs du node fichier
2022-07-10 11:42:47 +02:00
if ( commandes . fichierAnalyseValide ) if ( commandes . sujet . getAttributs ( ) . size ( ) > 0 ) {
if ( commandes . fichierAnalyseValide ) verificationNodeFichier ( commandes . sujet . getAttributs ( ) ) ;
2022-04-25 13:25:20 +02:00
} else {
2022-07-10 11:42:47 +02:00
commandes . fichierAnalyseValide = false ;
JOptionPane . showMessageDialog ( null , " <html><h1 style= \" text-align:center; \" >Le premier node du classeur n'a pas d'attribut.</h1> " , " Erreur " , JOptionPane . ERROR_MESSAGE ) ;
2022-04-25 13:25:20 +02:00
}
2022-05-03 16:02:02 +02:00
//** Verification du hash et du nom du fichier d'analyse
2022-07-10 11:42:47 +02:00
if ( commandes . fichierAnalyseValide ) {
commandes . hash = String . valueOf ( Run . HashNode ( commandes . sujet , 0 ) ) ;
if ( commandes . sujet . getAttributs ( ) . get ( " analysis_filename " ) ! = null ) {
if ( ! commandes . sujet . getAttributs ( ) . get ( " analysis_filename " ) . equals ( commandes . nameSujet ) ) {
commandes . MAJnameAnalysisFile = true ;
}
2022-05-03 16:02:02 +02:00
}
2022-07-10 11:42:47 +02:00
if ( commandes . sujet . getAttributs ( ) . get ( " hash " ) = = null ) {
commandes . MAJFichierAnalyse = true ;
} else {
if ( ! commandes . sujet . getAttributs ( ) . get ( " hash " ) . equals ( commandes . hash ) ) {
commandes . MAJFichierAnalyse = true ;
}
2022-05-03 16:02:02 +02:00
}
2022-07-10 11:42:47 +02:00
if ( commandes . MAJFichierAnalyse | | commandes . MAJnameAnalysisFile ) {
messagMiseAJourFichierAnalyse ( commandes . hash ) ;
}
//** Vérification des attributs du node style:paragraph et vérification style de paragraphe par défaut
if ( commandes . sujet . retourneEnfantsByNameExist ( " style:paragraph " ) ) {
verificationNodeEvaluate ( commandes . sujet . retourneFirstEnfantsByName ( " style:paragraph " ) . getAttributs ( ) , " style:paragraph " ) ;
if ( commandes . sujet . retourneFirstEnfantsByName ( " style:paragraph " ) . retourneEnfantsByNameExist ( " style:default-style " ) ) {
verifcationStyleParagraphDefaut ( commandes . sujet . retourneFirstEnfantsByName ( " style:paragraph " ) . retourneFirstEnfantsByName ( " style:default-style " ) ) ;
}
}
//Vérification des attributs du node office:meta
if ( commandes . sujet . retourneEnfantsByNameExist ( " office:meta " ) ) {
verificationNodeEvaluate ( commandes . sujet . retourneFirstEnfantsByName ( " office:meta " ) . getAttributs ( ) , " office:meta " ) ;
verifLongContenuNode ( commandes . sujet . retourneFirstEnfantsByName ( " office:meta " ) ) ;
}
//Vérification des attributs du node style:page
if ( commandes . sujet . retourneEnfantsByNameExist ( " style:page " ) ) {
verificationNodeEvaluate ( commandes . sujet . retourneFirstEnfantsByName ( " style:page " ) . getAttributs ( ) , " style:page " ) ;
verifLongContenuNode ( commandes . sujet . retourneFirstEnfantsByName ( " style:page " ) ) ;
}
//Vérification des attributs du node sequences
if ( commandes . sujet . retourneEnfantsByNameExist ( " sequences " ) ) {
verificationNodeEvaluate ( commandes . sujet . retourneFirstEnfantsByName ( " sequences " ) . getAttributs ( ) , " sequences " ) ;
verifLongContenuNode ( commandes . sujet . retourneFirstEnfantsByName ( " sequences " ) ) ;
}
//Vérification des attributs du node numerotationchapitre
if ( commandes . sujet . retourneEnfantsByNameExist ( " numerotationchapitre " ) ) {
verificationNodeEvaluate ( commandes . sujet . retourneFirstEnfantsByName ( " numerotationchapitre " ) . getAttributs ( ) , " numerotationchapitre " ) ;
verifLongContenuNode ( commandes . sujet . retourneFirstEnfantsByName ( " numerotationchapitre " ) ) ;
2022-04-25 13:25:20 +02:00
}
2022-07-10 11:42:47 +02:00
//Vérification des attributs du node frames
if ( commandes . sujet . retourneEnfantsByNameExist ( " frames " ) ) {
verificationNodeEvaluate ( commandes . sujet . retourneFirstEnfantsByName ( " frames " ) . getAttributs ( ) , " frames " ) ;
verifLongContenuNode ( commandes . sujet . retourneFirstEnfantsByName ( " frames " ) ) ;
}
//Vérification des attributs du node sections
if ( commandes . sujet . retourneEnfantsByNameExist ( " sections " ) ) {
verificationNodeEvaluate ( commandes . sujet . retourneFirstEnfantsByName ( " sections " ) . getAttributs ( ) , " sections " ) ;
verifLongContenuNode ( commandes . sujet . retourneFirstEnfantsByName ( " sections " ) ) ;
}
//Vérification des attributs du node sections
if ( commandes . sujet . retourneEnfantsByNameExist ( " tableaux " ) ) {
verificationNodeEvaluate ( commandes . sujet . retourneFirstEnfantsByName ( " tableaux " ) . getAttributs ( ) , " tableaux " ) ;
verifLongContenuNode ( commandes . sujet . retourneFirstEnfantsByName ( " tableaux " ) ) ;
}
//Vérification des attributs du node biblio
if ( commandes . sujet . retourneEnfantsByNameExist ( " biblio " ) ) {
verificationNodeEvaluate ( commandes . sujet . retourneFirstEnfantsByName ( " biblio " ) . getAttributs ( ) , " biblio " ) ;
verifLongContenuNode ( commandes . sujet . retourneFirstEnfantsByName ( " biblio " ) ) ;
}
//Vérification des attributs du node tablematieres
if ( commandes . sujet . retourneEnfantsByNameExist ( " tablematieres " ) ) {
verificationNodeEvaluate ( commandes . sujet . retourneFirstEnfantsByName ( " tablematieres " ) . getAttributs ( ) , " tablematieres " ) ;
verifLongContenuNode ( commandes . sujet . retourneFirstEnfantsByName ( " tablematieres " ) ) ;
}
//Vérification des attributs du node tableillustrations
if ( commandes . sujet . retourneEnfantsByNameExist ( " tableillustrations " ) ) {
verificationNodeEvaluate ( commandes . sujet . retourneFirstEnfantsByName ( " tableillustrations " ) . getAttributs ( ) , " tableillustrations " ) ;
verifLongContenuNode ( commandes . sujet . retourneFirstEnfantsByName ( " tableillustrations " ) ) ;
}
//Vérification des attributs du node structurepage
if ( commandes . sujet . retourneEnfantsByNameExist ( " structurepage " ) ) {
verificationNodeEvaluate ( commandes . sujet . retourneFirstEnfantsByName ( " structurepage " ) . getAttributs ( ) , " structurepage " ) ;
verifLongContenuNode ( commandes . sujet . retourneFirstEnfantsByName ( " structurepage " ) ) ;
}
//vérification du node structure
// if(commandes.sujet.retourneEnfantsByNameExist("structurepage")) {
// verifNodeAutoriserDansStructure(commandes.sujet.retourneFirstEnfantsByName("structurepage"));
// }
//vérification du node setting
if ( commandes . sujet . retourneEnfantsByNameExist ( " setting " ) ) {
verificationNodeSetting ( commandes . sujet . retourneFirstEnfantsByName ( " setting " ) ) ;
}
2022-04-25 13:25:20 +02:00
}
2022-05-24 18:25:41 +02:00
2022-05-25 15:28:58 +02:00
// Mise à jour de la variable fichierAnalyseValide
2022-07-10 11:42:47 +02:00
if ( erreur ) {
2022-11-13 11:57:18 +01:00
System . out . println ( " Erreur dans le fichier d'analyse " ) ;
2022-05-25 15:28:58 +02:00
commandes . fichierAnalyseValide = false ;
2022-11-13 11:57:18 +01:00
} else {
System . out . println ( " Pas d'erreur dans le fichier d'analyse " ) ;
commandes . fichierAnalyseValide = true ;
2022-05-25 15:28:58 +02:00
}
2022-05-25 10:43:11 +02:00
2022-04-25 13:25:20 +02:00
}
2022-05-24 18:25:41 +02:00
/ * *
2023-02-11 09:43:12 +01:00
* Vérification des attributs du node fichier .
2022-05-24 18:25:41 +02:00
* @param attribut
* /
2022-04-25 13:25:20 +02:00
private static void verificationNodeFichier ( Dictionary < String , String > attribut ) {
2022-05-25 10:43:11 +02:00
boolean erreurNomPremierNodeFichier = false ;
boolean erreurManqueAttributEvaluerPremierNodeFichier = false ;
boolean erreurValeurAttributEvaluerPremierNodeFichier = false ;
boolean erreurPasNodesEnfantsAuPremierNodeFichier = false ;
boolean erreurPasAttributMetaSujetAuPremierNodeFichier = false ;
boolean erreurValeurVideAttributMetaSujetAuPremierNodeFichier = false ;
boolean erreurValeurAttributProgressionNonConvertibleEnDouble = false ;
boolean erreurValeurAttributNoteFromNonConvertibleEnDouble = false ;
boolean erreurValeurAttributBaremeABCNonConvertibleEnLogique = false ;
boolean erreurValeurAttributcontroleDateCreationNonConvertibleEnLogique = false ;
2023-02-11 09:43:12 +01:00
boolean erreurValeurAttributcontroleDateModificationMiniNonConvertibleEnLogique = false ;
2022-05-25 10:43:11 +02:00
boolean erreurValeurAttributpresenceMetaSujetConvertibleEnLogique = false ;
boolean erreurValeurAttributcontrole_Initial_CreatorConvertibleEnLogique = false ;
boolean erreurValeurAttributhistoriquePresentConvertibleEnLogique = false ;
2022-04-25 13:25:20 +02:00
// le node fichier doit avoir l'attribut evaluer=true
if ( attribut . get ( " evaluer " ) = = null ) {
2022-07-10 11:42:47 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <fichier>. " ) ;
commandes . message . append ( " \ nL'attribut \" evaluer \" a été supprimé. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
JOptionPane . showMessageDialog ( null , " <html>Dans le node <fichier>, l'attribut \" <b>evaluer</b> \" a été supprimé. "
+ " <br>Ce node doit contenir evaluer= \" true \" . "
+ " <br>Sélectionner ce node est cliqué sur évaluer.</html> " , " Avertissement " , JOptionPane . WARNING_MESSAGE ) ;
2022-05-25 10:43:11 +02:00
erreurManqueAttributEvaluerPremierNodeFichier = true ;
2022-04-25 13:25:20 +02:00
} else {
2022-07-10 11:42:47 +02:00
if ( ! attribut . get ( " evaluer " ) . equals ( " true " ) ) {
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <fichier>. " ) ;
2022-07-10 11:42:47 +02:00
commandes . message . append ( " \ nL'attribut \" evaluer \" doit avoir la valeur \" true \" . " ) ;
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
2022-07-10 11:42:47 +02:00
JOptionPane . showMessageDialog ( null , " <html>Dans le node <fichier>, l'attribut \" <b>evaluer</b> \" n'est pas a \" <b>true</b> \" . "
+ " <br>Ce node doit contenir <b>evaluer= \" true \" </b> pour pouvoir évaluer les nodes enfants. "
+ " <br>Sélectionner ce node est cliqué sur évaluer.</html> " , " Avertissement " , JOptionPane . WARNING_MESSAGE ) ;
2022-04-25 13:25:20 +02:00
}
}
2022-05-25 15:28:58 +02:00
2022-05-25 10:43:11 +02:00
// le node fichier doit contenir l'attribut metaSujet et une valeur non vide
2022-04-25 13:25:20 +02:00
if ( attribut . get ( " metaSujet " ) = = null ) {
2022-07-10 11:42:47 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <fichier>. " ) ;
commandes . message . append ( " \ nL'attribut \" metaSujet \" a été supprimé. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
JOptionPane . showMessageDialog ( null , " <html>Dans le node <fichier>, l'attribut \" <b>metaSujet</b> \" a été supprimé. "
+ " <br>Ce node doit contenir l'attribut \" <b>metaSujet</b> \" . Il permet d'identifier le sujet de l'exercice. "
+ " <br>Sélectionner le node <fichier> est cliqué sur propriété du fichier pour ajouter un sujet.</html> " , " Avertissement " , JOptionPane . WARNING_MESSAGE ) ;
erreurPasAttributMetaSujetAuPremierNodeFichier = true ;
2022-05-24 18:25:41 +02:00
}
if ( attribut . get ( " metaSujet " ) ! = null ) if ( attribut . get ( " metaSujet " ) . isEmpty ( ) ) {
2022-07-10 11:42:47 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <fichier>. " ) ;
commandes . message . append ( " \ nL'attribut \" metaSujet \" n'a pas de valeur. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
JOptionPane . showMessageDialog ( null , " <html>Dans le node <fichier>, l'attribut \" metaSujet \" ne possède pas de valeur. "
+ " <br>Ce node doit contenir l'attribut <b>metaSujet= \" Un sujet \" </b>. Il permet d'identifier le sujet de l'exercice. "
+ " <br>Sélectionner le node <fichier> est cliqué sur propriété du fichier pour ajouter un sujet.</html> " , " Avertissement " , JOptionPane . WARNING_MESSAGE ) ;
2022-05-25 10:43:11 +02:00
erreurValeurVideAttributMetaSujetAuPremierNodeFichier = true ;
2022-04-25 13:25:20 +02:00
}
2022-05-25 10:43:11 +02:00
if ( attribut . get ( " progression " ) ! = null ) {
String p = attribut . get ( " progression " ) ;
2022-05-09 21:22:50 +02:00
try {
Double . valueOf ( p ) ;
} catch ( Exception e ) {
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <fichier>. " ) ;
2022-07-10 11:42:47 +02:00
commandes . message . append ( " \ nL'attribut \" progression \" n'a pas une valeur numérique entière ou décimale. " ) ;
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
2022-07-10 11:42:47 +02:00
JOptionPane . showMessageDialog ( null , " <html>Dans le node <fichier>, l'attribut \" <b>progression</b> \" ne possède pas une valeur correcte. "
+ " <br>La valeur de la \" <b>progression</b> \" doit être une valeur numérique entière ou décimale. "
+ " <br>Sélectionner le node <fichier> est cliqué sur propriété du fichier pour modifier le coef. de progression.</html> " , " Avertissement " , JOptionPane . WARNING_MESSAGE ) ;
2022-05-09 21:22:50 +02:00
erreurValeurAttributProgressionNonConvertibleEnDouble = true ;
}
}
2022-05-25 10:43:11 +02:00
if ( attribut . get ( " notefrom " ) ! = null ) {
String p = attribut . get ( " notefrom " ) ;
2022-05-09 21:22:50 +02:00
try {
Double . valueOf ( p ) ;
} catch ( Exception e ) {
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <fichier>. " ) ;
commandes . message . append ( " \ nL'attribut \" noteFrom \" n'a pas une valeur numérique. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-07-10 11:42:47 +02:00
JOptionPane . showMessageDialog ( null , " <html>Dans le node <fichier>, l'attribut \" <b>notefrom</b> \" ne possède pas une valeur correcte. "
+ " <br>La valeur de la \" <b>notefrome</b> \" doit être une valeur numérique entière ou décimale. "
+ " <br>Sélectionner le node <fichier> est cliqué sur les propriétés du fichier.</html> " , " Avertissement " , JOptionPane . WARNING_MESSAGE ) ;
erreurValeurAttributNoteFromNonConvertibleEnDouble = true ;
2022-05-09 21:22:50 +02:00
}
2022-05-25 10:43:11 +02:00
}
if ( attribut . get ( " baremeABC " ) ! = null ) {
String p = attribut . get ( " baremeABC " ) ;
2022-07-10 11:42:47 +02:00
if ( ! ( p . equals ( " true " ) | | p . equals ( " false " ) ) ) {
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <fichier>. " ) ;
commandes . message . append ( " \ nL'attribut \" baremeABC \" n'a pas une valeur logique. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-07-10 11:42:47 +02:00
JOptionPane . showMessageDialog ( null , " <html>Dans le node <fichier>, l'attribut \" <b>baremeABC</b> \" ne possède pas une valeur correcte. "
+ " <br>La valeur de la \" <b>baremeABC</b> \" doit être une valeur logique \" <b>true</b> \" ou \" <b>false</b> \" . "
+ " <br>Sélectionner le node <fichier> est cliqué sur les propriété du fichier.</html> " , " Avertissement " , JOptionPane . WARNING_MESSAGE ) ;
2022-05-25 10:43:11 +02:00
erreurValeurAttributBaremeABCNonConvertibleEnLogique = true ;
}
}
2023-02-11 09:43:12 +01:00
2022-05-25 10:43:11 +02:00
if ( attribut . get ( " controleDateCreation " ) ! = null ) {
String p = attribut . get ( " controleDateCreation " ) ;
2022-07-10 11:42:47 +02:00
if ( ! ( p . equals ( " true " ) | | p . equals ( " false " ) ) ) {
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <fichier>. " ) ;
commandes . message . append ( " \ nL'attribut \" controleDateCreation \" n'a pas une valeur logique. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-07-10 11:42:47 +02:00
JOptionPane . showMessageDialog ( null , " <html>Dans le node <fichier>, l'attribut \" <b>controleDateCreation</b> \" ne possède pas une valeur correcte. "
+ " <br>La valeur de la \" <b>controleDateCreation</b> \" doit être une valeur logique \" <b>true</b> \" ou \" <b>false</b> \" . "
+ " <br>Sélectionner le node <fichier> est cliqué sur les propriétés du fichier.</html> " , " Avertissement " , JOptionPane . WARNING_MESSAGE ) ;
2022-05-25 10:43:11 +02:00
erreurValeurAttributcontroleDateCreationNonConvertibleEnLogique = true ;
}
}
2023-02-11 09:43:12 +01:00
if ( attribut . get ( " controleDateModificationMini " ) ! = null ) {
String p = attribut . get ( " controleDateModificationMini " ) ;
if ( ! ( p . equals ( " true " ) | | p . equals ( " false " ) ) ) {
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <fichier>. " ) ;
commandes . message . append ( " \ nL'attribut \" controleDateModificationMini \" n'a pas une valeur logique. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
JOptionPane . showMessageDialog ( null , " <html>Dans le node <fichier>, l'attribut \" <b>controleDateModificationMini</b> \" ne possède pas une valeur correcte. "
+ " <br>La valeur de la \" <b>controleDateCreation</b> \" doit être une valeur logique \" <b>true</b> \" ou \" <b>false</b> \" . "
+ " <br>Sélectionner le node <fichier> est cliqué sur les propriétés du fichier.</html> " , " Avertissement " , JOptionPane . WARNING_MESSAGE ) ;
erreurValeurAttributcontroleDateModificationMiniNonConvertibleEnLogique = true ;
}
}
2022-05-25 10:43:11 +02:00
if ( attribut . get ( " presenceMetaSujet " ) ! = null ) {
String p = attribut . get ( " presenceMetaSujet " ) ;
2022-05-25 15:28:58 +02:00
if ( ! ( p . equalsIgnoreCase ( " true " ) | | p . equalsIgnoreCase ( " false " ) ) ) {
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <fichier>. " ) ;
commandes . message . append ( " \ nL'attribut \" presenceMetaSujet \" n'a pas une valeur logique. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-07-10 11:42:47 +02:00
JOptionPane . showMessageDialog ( null , " <html>Dans le node <fichier>, l'attribut \" <b>presenceMetaSujet</b> \" ne possède pas une valeur correcte. "
+ " <br>La valeur de la \" <b>presenceMetaSujet</b> \" doit être une valeur logique \" <b>true</b> \" ou \" <b>false</b> \" . "
+ " <br>Sélectionner le node <fichier> est cliqué sur les propriétés du fichier.</html> " , " Avertissement " , JOptionPane . WARNING_MESSAGE ) ;
2022-05-25 10:43:11 +02:00
erreurValeurAttributpresenceMetaSujetConvertibleEnLogique = true ;
}
}
if ( attribut . get ( " controle_Initial_Creator " ) ! = null ) {
String p = attribut . get ( " controle_Initial_Creator " ) ;
2022-07-10 11:42:47 +02:00
if ( ! ( p . equals ( " true " ) | | p . equals ( " false " ) ) ) {
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <fichier>. " ) ;
commandes . message . append ( " \ nL'attribut \" controle_Initial_Creator \" n'a pas une valeur logique. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-07-10 11:42:47 +02:00
JOptionPane . showMessageDialog ( null , " <html>Dans le node <fichier>, l'attribut \" <b>controle_Initial_Creator</b> \" ne possède pas une valeur correcte. "
+ " <br>La valeur de la \" <b>controle_Initial_Creator</b> \" doit être une valeur logique \" <b>true</b> \" ou \" <b>false</b> \" . "
+ " <br>Sélectionner le node <fichier> est cliqué sur les propriétés du fichier.</html> " , " Avertissement " , JOptionPane . WARNING_MESSAGE ) ;
2022-05-25 10:43:11 +02:00
erreurValeurAttributcontrole_Initial_CreatorConvertibleEnLogique = true ;
}
}
if ( attribut . get ( " historiquePresent " ) ! = null ) {
String p = attribut . get ( " historiquePresent " ) ;
2022-07-10 11:42:47 +02:00
if ( ! ( p . equals ( " true " ) | | p . equals ( " false " ) ) ) {
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <fichier>. " ) ;
commandes . message . append ( " \ nL'attribut \" historiquePresent \" n'a pas une valeur logique. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-07-10 11:42:47 +02:00
JOptionPane . showMessageDialog ( null , " <html>Dans le node <fichier>, l'attribut \" <b>historiquePresent</b> \" ne possède pas une valeur correcte. "
+ " <br>La valeur de la \" <b>historiquePresent</b> \" doit être une valeur logique \" <b>true</b> \" ou \" <b>false</b> \" . "
+ " <br>Sélectionner le node <fichier> est cliqué sur les propriétés du fichier.</html> " , " Avertissement " , JOptionPane . WARNING_MESSAGE ) ;
2022-05-25 10:43:11 +02:00
erreurValeurAttributhistoriquePresentConvertibleEnLogique = true ;
}
}
2022-05-09 21:22:50 +02:00
2022-05-25 10:43:11 +02:00
verifSujet . getAttributs ( ) . put ( " erreur " , String . valueOf ( erreur ) ) ;
verifSujet . getAttributs ( ) . put ( " erreurNomPremierNodeFichier " , String . valueOf ( erreurNomPremierNodeFichier ) ) ;
verifSujet . getAttributs ( ) . put ( " erreurManqueAttributEvaluerPremierNodeFichier " , String . valueOf ( erreurManqueAttributEvaluerPremierNodeFichier ) ) ;
verifSujet . getAttributs ( ) . put ( " erreurValeurAttributEvaluerPremierNodeFichier " , String . valueOf ( erreurValeurAttributEvaluerPremierNodeFichier ) ) ;
verifSujet . getAttributs ( ) . put ( " erreurPasNodesEnfantsAuPremierNodeFichier " , String . valueOf ( erreurPasNodesEnfantsAuPremierNodeFichier ) ) ;
verifSujet . getAttributs ( ) . put ( " erreurPasAttributMetaSujetAuPremierNodeFichier " , String . valueOf ( erreurPasAttributMetaSujetAuPremierNodeFichier ) ) ;
verifSujet . getAttributs ( ) . put ( " erreurValeurVideAttributMetaSujetAuPremierNodeFichier " , String . valueOf ( erreurValeurVideAttributMetaSujetAuPremierNodeFichier ) ) ;
verifSujet . getAttributs ( ) . put ( " erreurValeurAttributProgressionNonConvertibleEnDouble " , String . valueOf ( erreurValeurAttributProgressionNonConvertibleEnDouble ) ) ;
verifSujet . getAttributs ( ) . put ( " erreurValeurAttributNoteFromNonConvertibleEnDouble " , String . valueOf ( erreurValeurAttributNoteFromNonConvertibleEnDouble ) ) ;
verifSujet . getAttributs ( ) . put ( " erreurValeurAttributNoteFromNonConvertibleEnDouble " , String . valueOf ( erreurValeurAttributNoteFromNonConvertibleEnDouble ) ) ;
verifSujet . getAttributs ( ) . put ( " erreurValeurAttributBaremeABCNonConvertibleEnLogique " , String . valueOf ( erreurValeurAttributBaremeABCNonConvertibleEnLogique ) ) ;
verifSujet . getAttributs ( ) . put ( " erreurValeurAttributcontroleDateCreationNonConvertibleEnLogique " , String . valueOf ( erreurValeurAttributcontroleDateCreationNonConvertibleEnLogique ) ) ;
2023-02-11 09:43:12 +01:00
verifSujet . getAttributs ( ) . put ( " erreurValeurAttributcontroleDateModificationMiniNonConvertibleEnLogique " , String . valueOf ( erreurValeurAttributcontroleDateModificationMiniNonConvertibleEnLogique ) ) ;
2022-05-25 10:43:11 +02:00
verifSujet . getAttributs ( ) . put ( " erreurValeurAttributpresenceMetaSujetConvertibleEnLogique " , String . valueOf ( erreurValeurAttributpresenceMetaSujetConvertibleEnLogique ) ) ;
verifSujet . getAttributs ( ) . put ( " erreurValeurAttributcontrole_Initial_CreatorConvertibleEnLogique " , String . valueOf ( erreurValeurAttributcontrole_Initial_CreatorConvertibleEnLogique ) ) ;
verifSujet . getAttributs ( ) . put ( " erreurValeurAttributhistoriquePresentConvertibleEnLogique " , String . valueOf ( erreurValeurAttributhistoriquePresentConvertibleEnLogique ) ) ;
}
2022-05-09 21:22:50 +02:00
2022-04-25 13:25:20 +02:00
/ * *
* Vérification de la présence de l ' attribut addmenu = true lorsque l ' attribut evaluer = true . < br >
* Uniquement pour les nodes principaux . < br >
* < br >
* @param attribut
* @param nameNode
* /
private static void verificationNodeEvaluate ( Dictionary < String , String > attribut , String nameNode ) {
if ( attribut . get ( " evaluer " ) ! = null ) {
if ( attribut . get ( " evaluer " ) . equals ( " true " ) ) {
if ( attribut . get ( " addmenu " ) ! = null ) {
if ( ! attribut . get ( " addmenu " ) . equals ( " true " ) ) {
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node < " + nameNode + " >. " ) ;
commandes . message . append ( " \ nLe node principal < " + nameNode + " > doit contenir l'attribut \" addmenu=true \" . " ) ;
commandes . message . append ( " \ nPour cette version, Il est necessaire de créer un lien de menu du node principal. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-04-25 13:25:20 +02:00
erreur = true ;
}
} else {
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node < " + nameNode + " >. " ) ;
commandes . message . append ( " \ nLe node principal < " + nameNode + " > doit contenir l'attribut \" addmenu=true \" . Cet attribut a été supprimé. " ) ;
commandes . message . append ( " \ nPour cette version, Il est necessaire de créer un lien de menu du node principal. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-04-25 13:25:20 +02:00
erreur = true ;
}
}
}
}
2022-05-03 16:02:02 +02:00
/ * *
* Vérification des nodes autorisé dans la structure .
* @param structure
* @throws CloneNotSupportedException
* /
2022-06-02 15:47:54 +02:00
@SuppressWarnings ( " unused " )
2022-04-25 13:25:20 +02:00
private static void verifNodeAutoriserDansStructure ( node structure ) throws CloneNotSupportedException {
String nom = structure . getNomElt ( ) ;
if ( nom . equals ( " text:p " ) | | nom . equals ( " text:h " ) | | nom . equals ( " text:database-display " ) | | nom . equals ( " table:table-cell " )
| | nom . equals ( " text:section " ) | | nom . equals ( " draw:frame " ) | | nom . equals ( " text:user-defined " ) | | nom . equals ( " table:table-row " )
| | nom . equals ( " table:table-row " ) | | nom . equals ( " structurepage " ) | | nom . equals ( " page " ) | | nom . contains ( " text:table-of-content " )
| | nom . contains ( " text:illustration " ) | | nom . equals ( " text:note " ) | | nom . equals ( " text:conditional-text " ) | | nom . equals ( " text:date " )
| | nom . contains ( " style:graphic-properties " ) | | nom . isEmpty ( ) ) {
} else {
Enumeration < String > key = structure . getAttributs ( ) . keys ( ) ;
while ( key . hasMoreElements ( ) ) {
String k = key . nextElement ( ) ;
if ( structure . getAttributs ( ) . get ( k ) . contains ( " ‽ " ) ) {
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
System . out . println ( " **-** ERREUR dans le fichier d'analyse, dans le node <structurepage>. " ) ;
2022-04-25 14:54:45 +02:00
System . out . println ( " Le node " + nom + " ne peut pas contenir des attributs évalués. " ) ;
2022-05-26 20:10:24 +02:00
System . out . println ( " Mais, le node " + nom + " peut contenir l'attribut \" evaluer=true \" ce qui permettra l'évaluation des nodes enfants mais aucun attribut de ce node sera évalué. " ) ;
2022-04-25 13:25:20 +02:00
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <structurepage>. " ) ;
commandes . message . append ( " Le node " + nom + " ne peut pas contenir des attributs évalués. " ) ;
commandes . message . append ( " \ nMais, le node " + nom + " peut contenir l'attribut \" evaluer=true \" ce qui permettra l'évaluation des nodes enfants mais aucun attribut de ce node sera évalué. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-04-25 13:25:20 +02:00
erreur = true ;
}
}
}
//verification des nodes autorisés dans la structure
for ( int i = 0 ; i < structure . getNodes ( ) . size ( ) ; i + + ) {
nom = structure . getNodes ( ) . get ( i ) . getNomElt ( ) ;
if ( nom . equals ( " text:p " ) | | nom . equals ( " text:h " ) | | nom . equals ( " text:database-display " ) | | nom . equals ( " table:table-cell " )
| | nom . equals ( " text:section " ) | | nom . equals ( " draw:frame " ) | | nom . equals ( " text:user-defined " ) | | nom . equals ( " table:table-row " )
| | nom . equals ( " table:table-row " ) | | nom . equals ( " structurepage " ) | | nom . equals ( " page " ) | | nom . contains ( " text:table-of-content " )
| | nom . contains ( " text:illustration " ) | | nom . equals ( " text:note " ) | | nom . equals ( " text:conditional-text " )
| | nom . contains ( " style:graphic-properties " ) | | nom . equals ( " text:date " ) | | nom . isEmpty ( ) ) {
} else {
Enumeration < String > key = structure . getNodes ( ) . get ( i ) . getAttributs ( ) . keys ( ) ;
while ( key . hasMoreElements ( ) ) {
String k = key . nextElement ( ) ;
if ( structure . getNodes ( ) . get ( i ) . getAttributs ( ) . get ( k ) . contains ( " ‽ " ) ) {
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
System . out . println ( " **-** ERREUR dans le fichier d'analyse, dans le node <structurepage>. " ) ;
2022-04-25 14:54:45 +02:00
System . out . println ( " Le node " + nom + " ne peut pas contenir des attributs évalués. " ) ;
2022-05-26 20:10:24 +02:00
System . out . println ( " Mais, le node " + nom + " peut contenir l'attribut \" evaluer=true \" ce qui permettra l'évaluation des nodes enfants mais aucun attribut de ce node sera évalué. " ) ;
2022-04-25 13:25:20 +02:00
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <structurepage>. " ) ;
commandes . message . append ( " Le node " + nom + " ne peut pas contenir des attributs évalués. " ) ;
commandes . message . append ( " \ nMais, le node " + nom + " peut contenir l'attribut \" evaluer=true \" ce qui permettra l'évaluation des nodes enfants mais aucun attribut de ce node sera évalué. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-04-25 13:25:20 +02:00
erreur = true ;
}
}
}
verifNodeAutoriserDansStructure ( structure . getNodes ( ) . get ( i ) ) ;
}
}
/ * *
2022-04-29 19:17:58 +02:00
* Evaluation du node setting
2022-04-25 13:25:20 +02:00
* @param attribut
* @param nameNode
* /
private static void verificationNodeSetting ( node setting ) {
if ( setting . getAttributs ( ) . get ( " culture " ) ! = null ) {
if ( ! setting . getAttributs ( ) . get ( " culture " ) . equals ( " FR " ) ) {
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
System . out . println ( " **-** AVERTISSEMENT dans le fichier d'analyse, dans le node <setting>. " ) ;
System . out . println ( " La culture ne peut pas être différent de \" FR \" . " ) ;
2022-04-25 13:25:20 +02:00
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nAVERTISSEMENT dans le fichier d'analyse, dans le node <setting>. " ) ;
commandes . message . append ( " \ nLa culture ne peut pas être différent de \" FR \" . " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-04-25 13:25:20 +02:00
}
}
if ( setting . containElementByName ( " csv " ) ) {
node csv = setting . retourneFirstEnfantsByName ( " csv " ) ;
if ( csv . getAttributs ( ) . get ( " encoding " ) ! = null ) {
if ( ! csv . getAttributs ( ) . get ( " encoding " ) . equals ( " UTF-8 " ) & & ! csv . getAttributs ( ) . get ( " encoding " ) . equals ( " US-ASCII " ) & & ! csv . getAttributs ( ) . get ( " encoding " ) . equals ( " ISO-8859-1 " )
& & ! csv . getAttributs ( ) . get ( " encoding " ) . equals ( " UTF-16BE " ) & & ! csv . getAttributs ( ) . get ( " encoding " ) . equals ( " UTF-16LE " ) & & ! csv . getAttributs ( ) . get ( " encoding " ) . equals ( " UTF-16 " ) ) {
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
System . out . println ( " **-** AVERTISSEMENT dans le fichier d'analyse, dans le node <setting>. " ) ;
System . out . println ( " L'encodage ne peut pas être " + csv . getAttributs ( ) . get ( " encoding " ) ) ;
2022-04-25 13:25:20 +02:00
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nAVERTISSEMENT dans le fichier d'analyse, dans le node <setting>. " ) ;
commandes . message . append ( " \ nL'encodage ne peut pas être " + csv . getAttributs ( ) . get ( " encoding " ) ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-04-25 13:25:20 +02:00
}
}
}
if ( setting . containElementByName ( " zip " ) ) {
node zip = setting . retourneFirstEnfantsByName ( " zip " ) ;
if ( zip . getAttributs ( ) . get ( " size " ) ! = null ) {
Long size = ( long ) 0 ;
try {
size = Long . valueOf ( zip . getAttributs ( ) . get ( " size " ) ) ;
} catch ( Exception e ) {
2022-05-26 20:10:24 +02:00
System . out . println ( " **-** ERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
System . out . println ( " \ nLa taille du fichier doit être une valeur numérique (sans décimales). " ) ;
System . out . println ( ) ;
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
commandes . message . append ( " \ nLa taille du fichier doit être une valeur numérique (sans décimales). " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-05-25 10:43:11 +02:00
verifSujet . getAttributs ( ) . put ( " erreurTailleSize " , " true " ) ;
2022-04-25 13:25:20 +02:00
erreur = true ;
}
if ( size < 1000000 ) {
2022-05-26 20:10:24 +02:00
System . out . println ( " **-** ERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
System . out . println ( " La taille de l'archive ZIP est trop faible (supérieure à 1 000 000). " ) ;
System . out . println ( ) ;
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
commandes . message . append ( " \ nLa taille de l'archive ZIP est trop faible (supérieure à 1 000 000). " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-05-25 10:43:11 +02:00
verifSujet . getAttributs ( ) . put ( " erreurTailleSize " , " true " ) ;
2022-04-25 14:54:45 +02:00
erreur = true ;
}
if ( size > 100000000 ) {
2022-05-26 20:10:24 +02:00
System . out . println ( " **-** ERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
System . out . println ( " La taille de l'archive ZIP est trop grande (inférieur à 100 000 000). " ) ;
System . out . println ( ) ;
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
commandes . message . append ( " \ nLa taille de l'archive ZIP est trop grande (inférieur à 100 000 000). " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-05-25 10:43:11 +02:00
verifSujet . getAttributs ( ) . put ( " erreurTailleSize " , " true " ) ;
2022-04-25 13:25:20 +02:00
erreur = true ;
}
}
2022-05-25 10:43:11 +02:00
2022-04-25 13:25:20 +02:00
if ( zip . getAttributs ( ) . get ( " name " ) ! = null ) {
String name = zip . getAttributs ( ) . get ( " name " ) ;
Pattern pt = Pattern . compile ( " [^a-zA-Z0-9] " ) ; // avec les chiffres "[^a-zA-Z0-9]"
Matcher match = pt . matcher ( name ) ;
if ( match . find ( ) ) {
2022-05-26 20:10:24 +02:00
System . out . println ( ) ;
System . out . println ( " **-** ERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
System . out . println ( " Le nom de l'archive \" nameZip \ n ne doit pas contenir de caractères spéciaux. " ) ;
System . out . println ( ) ;
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
commandes . message . append ( " \ nLe nom de l'archive \" nameZip \ n ne doit pas contenir de caractères spéciaux. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-05-25 10:43:11 +02:00
verifSujet . getAttributs ( ) . put ( " erreurNameArchive " , " true " ) ;
2022-04-25 13:25:20 +02:00
erreur = true ;
}
}
}
2022-05-25 10:43:11 +02:00
2022-04-25 13:25:20 +02:00
if ( setting . containElementByName ( " plagiarism " ) ) {
node plagiarism = setting . retourneFirstEnfantsByName ( " plagiarism " ) ;
if ( plagiarism . getAttributs ( ) . get ( " number_match " ) ! = null ) {
int number_match = - 1 ;
try {
number_match = Integer . valueOf ( plagiarism . getAttributs ( ) . get ( " number_match " ) ) ;
} catch ( Exception e ) {
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
System . out . println ( " **-** ERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
2022-04-25 14:54:45 +02:00
System . out . println ( " Le nombre de correspondance \" number_match \" doit être une valeur numérique. " ) ;
2022-04-25 13:25:20 +02:00
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
commandes . message . append ( " \ nLe nombre de correspondance \" number_match \" doit être une valeur numérique. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-04-25 13:25:20 +02:00
erreur = true ;
}
if ( number_match < 0 ) {
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
System . out . println ( " **-** ERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
2022-04-25 14:54:45 +02:00
System . out . println ( " Le nombre de correspondance \" number_match \" doit être unevaleur positive. " ) ;
2022-04-25 13:25:20 +02:00
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
commandes . message . append ( " \ nLe nombre de correspondance \" number_match \" doit être unevaleur positive. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-04-25 13:25:20 +02:00
erreur = true ;
}
}
if ( plagiarism . getAttributs ( ) . get ( " mini_number_modification " ) ! = null ) {
int mini_number_modification = - 1 ;
try {
mini_number_modification = Integer . valueOf ( plagiarism . getAttributs ( ) . get ( " mini_number_modification " ) ) ;
} catch ( Exception e ) {
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
System . out . println ( " **-** ERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
2022-04-25 14:54:45 +02:00
System . out . println ( " Le nombre minimum de modification \" mini_number_modification \" doit être une valeur numérique. " ) ;
2022-04-25 13:25:20 +02:00
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
commandes . message . append ( " \ nLe nombre minimum de modification \" mini_number_modification \" doit être une valeur numérique. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-04-25 13:25:20 +02:00
erreur = true ;
}
if ( mini_number_modification < - 1 ) {
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
System . out . println ( " **-** ERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
2022-04-25 14:54:45 +02:00
System . out . println ( " Le nombre minimum de modification \" mini_number_modification \" doit être une valeur positive. " ) ;
2022-04-25 13:25:20 +02:00
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
commandes . message . append ( " \ nLe nombre minimum de modification \" mini_number_modification \" doit être une valeur positive. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-04-25 13:25:20 +02:00
erreur = true ;
}
}
if ( plagiarism . getAttributs ( ) . get ( " nombres_modifications_simultané_maxi " ) ! = null ) {
int nombres_modifications_simultané_maxi = - 1 ;
try {
nombres_modifications_simultané_maxi = Integer . valueOf ( plagiarism . getAttributs ( ) . get ( " nombres_modifications_simultané_maxi " ) ) ;
} catch ( Exception e ) {
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
System . out . println ( " **-** ERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
2022-04-25 14:54:45 +02:00
System . out . println ( " Le nombre de modifications simultanées \" nombres_modifications_simultané_maxi \" doit être une valeur numérique. " ) ;
2022-04-25 13:25:20 +02:00
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
commandes . message . append ( " \ nLe nombre de modifications simultanées \" nombres_modifications_simultané_maxi \" doit être une valeur numérique. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-04-25 13:25:20 +02:00
erreur = true ;
}
if ( nombres_modifications_simultané_maxi < 0 ) {
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
System . out . println ( " **-** ERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
2022-04-25 14:54:45 +02:00
System . out . println ( " Le nombre de modifications simultanées \" nombres_modifications_simultané_maxi \" doit être une valeur positive. " ) ;
2022-04-25 13:25:20 +02:00
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
commandes . message . append ( " \ nLe nombre de modifications simultanées \" nombres_modifications_simultané_maxi \" doit être une valeur positive. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-04-25 13:25:20 +02:00
erreur = true ;
}
}
}
if ( setting . containElementByName ( " text:similarity " ) ) {
node similarity = setting . retourneFirstEnfantsByName ( " text:similarity " ) ;
if ( similarity . getAttributs ( ) . get ( " tolerance_characters " ) ! = null ) {
int tolerance_characters = - 1 ;
try {
tolerance_characters = Integer . valueOf ( similarity . getAttributs ( ) . get ( " tolerance_characters " ) ) ;
} catch ( Exception e ) {
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
System . out . println ( " **-** ERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
2022-04-25 14:54:45 +02:00
System . out . println ( " La tolérance de catactère \" tolerance_characters \" n'est pas un entier. " ) ;
2022-04-25 13:25:20 +02:00
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
commandes . message . append ( " \ nLa tolérance de catactère \" tolerance_characters \" n'est pas un entier. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-04-25 13:25:20 +02:00
erreur = true ;
}
if ( tolerance_characters < 0 ) {
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
System . out . println ( " **-** ERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
2022-04-25 14:54:45 +02:00
System . out . println ( " La tolérance de catactère \" tolerance_characters \" doit être une valeur positive. " ) ;
2022-04-25 13:25:20 +02:00
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
commandes . message . append ( " \ nLa tolérance de catactère \" tolerance_characters \" doit être une valeur positive. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-04-25 13:25:20 +02:00
erreur = true ;
}
}
if ( similarity . getAttributs ( ) . get ( " tolerance_text " ) ! = null ) {
double tolerance_text = 0 . 0 ;
try {
tolerance_text = Double . valueOf ( similarity . getAttributs ( ) . get ( " tolerance_text " ) ) ;
} catch ( Exception e ) {
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
System . out . println ( " **-** ERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
2022-04-25 14:54:45 +02:00
System . out . println ( " La tolérance sur le texte (similitude) \" tolerance_text \" doit être un numérique compris entre 0.01 et 0.99. " ) ;
2022-04-25 13:25:20 +02:00
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
commandes . message . append ( " \ nLa tolérance sur le texte (similitude) \" tolerance_text \" doit être un numérique compris entre 0.01 et 0.99. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
erreur = true ;
2022-04-25 13:25:20 +02:00
}
if ( tolerance_text < 0 | | tolerance_text > 1 ) {
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
System . out . println ( " **-** ERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
2022-04-25 14:54:45 +02:00
System . out . println ( " La tolérance sur le texte (similitude) \" tolerance_text \" doit être un numérique compris entre 0.01 et 0.99. " ) ;
2022-04-25 13:25:20 +02:00
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node <setting>. " ) ;
commandes . message . append ( " \ nLa tolérance sur le texte (similitude) \" tolerance_text \" doit être un numérique compris entre 0.01 et 0.99. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-04-25 13:25:20 +02:00
erreur = true ;
}
}
}
}
2022-05-03 16:02:02 +02:00
/ * *
* Avertissement sur le style de paragraphe par défaut . < / br >
2022-05-24 18:25:41 +02:00
* Ne doit pas contenir l ' attribut evaleur = true .
2022-05-03 16:02:02 +02:00
* @param styleParagraphDefault
* /
2022-04-25 13:25:20 +02:00
private static void verifcationStyleParagraphDefaut ( node styleParagraphDefault ) {
if ( styleParagraphDefault . getAttributs ( ) . get ( " evaluer " ) ! = null ) {
if ( styleParagraphDefault . getAttributs ( ) . get ( " evaluer " ) . equals ( " true " ) ) {
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
System . out . println ( " **-** AVERTISSEMENT dans le fichier d'analyse, dans le node <style:default-style>. " ) ;
2022-04-25 14:54:45 +02:00
System . out . println ( " Le node \" style:default-style \" ne doit pas contenir l'attribut \" evaluer=true \" . " ) ;
System . out . println ( " Les valeurs par défaut dans les styles de paragraphe (les nodes \" style:style \" ) ont été ajouté. " ) ;
2022-04-25 13:25:20 +02:00
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nAVERTISSEMENT dans le fichier d'analyse, dans le node <style:default-style>. " ) ;
commandes . message . append ( " \ nLe node <style:default-style> ne doit pas contenir l'attribut evaluer= \" true \" . " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-04-25 13:25:20 +02:00
}
}
}
2022-04-29 19:17:58 +02:00
/ * *
2022-05-24 18:25:41 +02:00
* Le contenu d ' un node doit être supérieur à 3 caractères pour qu ' il puisse être évalué .
2022-04-29 19:17:58 +02:00
* @param nod
* /
private static void verifLongContenuNode ( node nod ) {
2022-06-02 15:47:54 +02:00
if ( nod = = null ) return ;
if ( ! nod . getContenu ( ) . isEmpty ( ) ) if ( nod . getContenu ( ) . contains ( " ‽ " ) ) {
2022-04-29 19:17:58 +02:00
if ( nod . getAttributs ( ) . get ( " evaluer " ) ! = null ) {
if ( nod . getAttributs ( ) . get ( " evaluer " ) . equalsIgnoreCase ( " true " ) ) {
2022-06-16 16:45:48 +02:00
if ( evaluation . NetTexte ( nod . getContenu ( ) . get ( 0 ) ) . length ( ) < = 3 ) {
2022-04-29 19:17:58 +02:00
System . out . println ( ) ;
System . out . println ( " **-** ERREUR dans le fichier d'analyse, le node \" " + nod . getNomElt ( ) + " \" . " ) ;
System . out . println ( " Le contenu du node est : " + nod . getContenu ( ) ) ;
System . out . println ( " Le contenu du node doit avoir plus de 3 caractères pour qu'il puisse être évalué. " ) ;
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node < " + nod . getNomElt ( ) + " >. " ) ;
commandes . message . append ( " \ nLe contenu du node est : " + nod . getContenu ( ) ) ;
commandes . message . append ( " \ nLe contenu du node doit avoir plus de 3 caractères pour qu'il puisse être évalué. " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-04-29 19:17:58 +02:00
erreur = true ;
}
}
}
}
2022-06-02 15:47:54 +02:00
if ( ! nod . getAttributs ( ) . isEmpty ( ) ) if ( nod . getAttributs ( ) . get ( " allContent " ) ! = null & & nod . getAttributs ( ) . get ( " evaluer " ) ! = null ) {
2022-04-29 19:17:58 +02:00
if ( nod . getAttributs ( ) . get ( " evaluer " ) . equalsIgnoreCase ( " true " ) ) {
String A = nod . getAttributs ( ) . get ( " allContent " ) ;
Pattern pt = Pattern . compile ( " [1-9]$|[1-9][0-9]$ " ) ;
Matcher match = pt . matcher ( A ) ;
if ( match . find ( ) ) {
2022-05-03 16:02:02 +02:00
if ( nod . retourneLesContenusEnfants ( " " ) . contains ( " ‽ " ) ) {
2022-04-29 19:17:58 +02:00
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
System . out . println ( " **-** ERREUR dans le fichier d'analyse, dans le node < " + nod . getNomElt ( ) + " >. " ) ;
2022-04-29 19:17:58 +02:00
System . out . println ( " Le node possède l'attribut allContent= \" " + nod . getAttributs ( ) . get ( " allContent " ) + " \" " ) ;
System . out . println ( " Et un des nodes enfants possède un contenu évalué directement par l'évaluateur ‽ " ) ;
System . out . println ( ) ;
2022-05-26 20:10:24 +02:00
commandes . message . append ( " \ n************************************************** " ) ;
commandes . message . append ( " \ nERREUR dans le fichier d'analyse, dans le node < " + nod . getNomElt ( ) + " >. " ) ;
commandes . message . append ( " \ nLe node possède l'attribut allContent= \" " + nod . getAttributs ( ) . get ( " allContent " ) + " \" " ) ;
commandes . message . append ( " \ nEt un des nodes enfants possède un contenu évalué directement par l'évaluateur ‽ " ) ;
commandes . message . append ( " \ n************************************************** " ) ;
2022-04-29 19:17:58 +02:00
erreur = true ;
}
}
}
}
for ( int i = 0 ; i < nod . getNodes ( ) . size ( ) ; i + + ) {
verifLongContenuNode ( nod . getNodes ( ) . get ( i ) ) ;
}
}
2022-05-25 10:43:11 +02:00
2022-05-03 16:02:02 +02:00
/ * *
* Mise à jour du hash et du nom du fichier d ' analyse . < / br >
* @throws CloneNotSupportedException
* @throws IOException
* /
2022-05-04 09:16:50 +02:00
public static void MiseAJourFichierAnalyse ( ) throws CloneNotSupportedException , IOException {
2022-05-27 11:40:08 +02:00
2022-06-11 16:53:59 +02:00
commandes . hash = String . valueOf ( Run . HashNode ( commandes . sujet , 0 ) ) ;
2022-05-27 11:40:08 +02:00
2022-05-03 16:02:02 +02:00
boolean maj = false ;
2022-06-11 16:53:59 +02:00
if ( commandes . sujet . getAttributs ( ) . get ( " hash " ) = = null ) {
2022-05-03 16:02:02 +02:00
maj = true ;
} else {
2022-06-11 16:53:59 +02:00
if ( ! commandes . sujet . getAttributs ( ) . get ( " hash " ) . equals ( commandes . hash ) ) {
2022-05-03 16:02:02 +02:00
maj = true ;
}
}
2022-06-11 16:53:59 +02:00
if ( commandes . sujet . getAttributs ( ) . get ( " analysis_filename " ) = = null ) {
2022-05-03 16:02:02 +02:00
maj = true ;
} else {
2022-12-23 19:24:59 +01:00
if ( ! commandes . analysis_filename . isEmpty ( ) ) {
if ( ! commandes . sujet . getAttributs ( ) . get ( " analysis_filename " ) . equals ( commandes . analysis_filename ) ) {
maj = true ;
}
2022-05-03 16:02:02 +02:00
}
}
2022-12-23 19:24:59 +01:00
2022-05-03 16:02:02 +02:00
if ( maj ) {
2022-12-23 19:24:59 +01:00
2022-06-11 16:53:59 +02:00
commandes . sujet . getAttributs ( ) . put ( " hash " , commandes . hash ) ;
commandes . sujet . getAttributs ( ) . put ( " analysis_filename " , commandes . nameSujet ) ;
2022-05-25 18:21:23 +02:00
2022-06-11 16:53:59 +02:00
commandes . message . append ( " <hr><h1>Le hash du code de l'évaluation ou le nom du fichier d'analyse</h1><hr> " ) ;
commandes . message . append ( " <p> a été mise à jour dans le fichier d'analyse.</p> " ) ;
commandes . message . append ( " <br> " ) ;
commandes . message . append ( " <p> Le hash du code de l'évaluation est : " + commandes . hash + " </p> " ) ;
commandes . message . append ( " <p> Le nom du fichier d'analyse est : " + commandes . analysis_filename + " </p> " ) ;
commandes . message . append ( " <hr> " ) ;
commandes . message . append ( " <br> " ) ;
2022-05-25 18:21:23 +02:00
2022-06-11 16:53:59 +02:00
String cheminVersFichierAnalyse = commandes . PathFilenameAnalysis ;
2022-05-27 11:40:08 +02:00
if ( ! commandes . console ) cheminVersFichierAnalyse = commandes . PathFilenameAnalysis . substring ( 0 , commandes . PathFilenameAnalysis . lastIndexOf ( " \\ " ) ) ;
2022-06-11 16:53:59 +02:00
if ( commandes . analysis_filename . contains ( " . " ) ) {
2023-01-22 18:57:02 +01:00
// Run.ecritureNodeEnXML(commandes.sujet,commandes.analysis_filename.substring(0, commandes.nameSujet.lastIndexOf(".")),cheminVersFichierAnalyse,Run.TypeFile.Sujet);
Run . ecritureNodeEnXML ( commandes . sujet , commandes . analysis_filename . substring ( 0 , commandes . analysis_filename . lastIndexOf ( " . " ) ) , cheminVersFichierAnalyse , Run . TypeFile . Sujet ) ;
2022-05-25 18:21:23 +02:00
} else {
2022-12-23 19:24:59 +01:00
Run . ecritureNodeEnXML ( commandes . sujet , commandes . analysis_filename , cheminVersFichierAnalyse , Run . TypeFile . Sujet ) ;
2022-05-25 18:21:23 +02:00
}
2022-05-27 11:40:08 +02:00
2023-01-22 18:57:02 +01:00
commandes . message . append ( " <p>**********************************************************</p> " ) ;
commandes . message . append ( " <p> Ecriture du fichier avec le nouveau hash.</p> " ) ;
commandes . message . append ( " <p>**********************************************************</p> " ) ;
2022-05-03 16:02:02 +02:00
} else {
2022-12-23 19:24:59 +01:00
2022-06-11 16:53:59 +02:00
commandes . message . append ( " <p>**********************************************************</p> " ) ;
commandes . message . append ( " <p> Vérification du hash et du nom du fichier correct.</p> " ) ;
commandes . message . append ( " <p>**********************************************************</p> " ) ;
2022-05-26 20:10:24 +02:00
2022-05-03 16:02:02 +02:00
}
//** bye bye analyseWriter
2022-05-25 18:21:23 +02:00
if ( commandes . console ) commandes . clotureApplication ( ) ;
2022-05-03 16:02:02 +02:00
}
2022-06-02 15:47:54 +02:00
/ * *
*
* @param nomFichier
* @throws CloneNotSupportedException
* @throws IOException
* /
public static void MiseAJourHashNomFichierAnalyse ( String nomFichier ) throws CloneNotSupportedException , IOException {
if ( ! nomFichier . contains ( " .xml " ) ) nomFichier = nomFichier + " .xml " ;
commandes . hash = String . valueOf ( Run . HashNode ( commandes . sujet , 0 ) ) ;
commandes . sujet . getAttributs ( ) . put ( " hash " , String . valueOf ( commandes . hash ) ) ;
commandes . analysis_filename = nomFichier ;
commandes . sujet . getAttributs ( ) . put ( " analysis_filename " , nomFichier ) ;
}
2022-05-24 18:25:41 +02:00
/ * *
* Permet l ' écriture du fichier sujet . xml sans les nodes non évaluer .
* @throws CloneNotSupportedException
* @throws IOException
* /
2022-05-03 16:02:02 +02:00
static public void ecrisLeFichierSujetXML ( ) throws CloneNotSupportedException , IOException {
2022-05-24 18:25:41 +02:00
node nodeSujet = meptl . chargementFichierAnalyse ( commandes . nameSujet , true ) ;
2022-05-03 16:02:02 +02:00
nodeSujet . getAttributs ( ) . put ( " hash " , String . valueOf ( Run . HashNode ( nodeSujet , 0 ) ) ) ;
nodeSujet . getAttributs ( ) . put ( " analysis_filename " , " sujet.xml " ) ;
2022-12-23 19:24:59 +01:00
Run . ecritureNodeEnXML ( nodeSujet , " sujet " , commandes . path , Run . TypeFile . Sujet ) ; // ecriture du node sujet. Uniquement les nodes évalués.
commandes . message . append ( " <p> Un nouveau fichier d'analyse a été créé dans le dossier courant.</p> " ) ;
2022-05-03 16:02:02 +02:00
System . out . println ( " \ t \ t┌─────────────────────────────────────────────────────────────────────┐ " ) ;
System . out . println ( " \ t \ t│ Un nouveau fichier \" sujet.xml \" a été créé dans le dossier courant. │ " ) ;
System . out . println ( " \ t \ t└─────────────────────────────────────────────────────────────────────┘ " ) ;
System . out . println ( ) ;
//** bye bye analyseWriter
commandes . clotureApplication ( ) ;
}
static private void messagMiseAJourFichierAnalyse ( String hash ) {
int nbespace = " ───────────────────────────┐ " . length ( ) - hash . length ( ) ;
if ( nbespace < 0 ) nbespace = 1 ;
2022-05-04 09:16:50 +02:00
int nbespace2 = " ───────────────────────────────┐ " . length ( ) - commandes . nameSujet . length ( ) ;
2022-05-03 16:02:02 +02:00
if ( nbespace2 < 0 ) nbespace2 = 1 ;
System . out . println ( " \ t \ t┌────────────────────────────────────────────────────────────────────┐ " ) ;
System . out . println ( " \ t \ t│ A la fin de l'évaluation. │ " ) ;
System . out . println ( " \ t \ t│ Il y aura une mise à jour du fichier d'analyse. │ " ) ;
System . out . println ( " \ t \ t│ │ " ) ;
System . out . println ( " \ t \ t│ Le hash du code de l'évaluation est : " + hash + new String ( new char [ nbespace ] ) . replace ( " \ 0 " , " " ) + " │ " ) ;
System . out . println ( " \ t \ t│ Le nom du fichier d'analyse est : " + commandes . nameSujet + new String ( new char [ nbespace2 ] ) . replace ( " \ 0 " , " " ) + " │ " ) ;
System . out . println ( " \ t \ t│ │ " ) ;
System . out . println ( " \ t \ t└────────────────────────────────────────────────────────────────────┘ " ) ;
System . out . println ( ) ;
}
static public void messagMiseAJourFichierAnalyseAprèsAnalyse ( ) {
int nbespace = " ───────────────────────────┐ " . length ( ) - commandes . hash . length ( ) ;
if ( nbespace < 0 ) nbespace = 1 ;
2022-05-04 09:16:50 +02:00
int nbespace2 = " ───────────────────────────────┐ " . length ( ) - commandes . hash . length ( ) ;
2022-05-03 16:02:02 +02:00
if ( nbespace2 < 0 ) nbespace2 = 1 ;
System . out . println ( " \ t \ t┌────────────────────────────────────────────────────────────────────┐ " ) ;
System . out . println ( " \ t \ t│ Mise à jour du fichier d'analyse │ " ) ;
System . out . println ( " \ t \ t│ │ " ) ;
System . out . println ( " \ t \ t│ Le hash du code de l'évaluation est : " + commandes . hash + new String ( new char [ nbespace ] ) . replace ( " \ 0 " , " " ) + " │ " ) ;
System . out . println ( " \ t \ t│ Le nom du fichier d'analyse est : " + commandes . nameSujet + new String ( new char [ nbespace2 ] ) . replace ( " \ 0 " , " " ) + " │ " ) ;
System . out . println ( " \ t \ t│ │ " ) ;
System . out . println ( " \ t \ t└────────────────────────────────────────────────────────────────────┘ " ) ;
System . out . println ( ) ;
}
2022-04-25 13:25:20 +02:00
/ * *
* Clôture lorsqu ' il y a une erreur dans le fichier d ' analyse
* /
public static void clotureWithErrorInanalyzeFile ( ) {
System . out . println ( ) ;
2022-05-03 16:02:02 +02:00
System . out . println ( " \ t \ t┌───────────────────────────────────────────────────────────┐ " ) ;
System . out . println ( " \ t \ t│ Vous avez commis une erreur dans le fichier d'analyse. │ " ) ;
System . out . println ( " \ t \ t│ │ " ) ;
System . out . println ( " \ t \ t│ Vous devez rechercher l'erreur dans le fichier │ " ) ;
System . out . println ( " \ t \ t│ d'analyse. Lisez les informations au-dessus. │ " ) ;
System . out . println ( " \ t \ t│ │ " ) ;
System . out . println ( " \ t \ t│ (')_(') │ " ) ;
System . out . println ( " \ t \ t│ ( `.° ) │ " ) ;
2022-05-09 21:22:50 +02:00
System . out . println ( " \ t \ t│ ( \" )__( \" ) .. à bientôt, analyseWriter. │ " ) ;
2022-05-03 16:02:02 +02:00
System . out . println ( " \ t \ t└───────────────────────────────────────────────────────────┘ " ) ;
2022-04-25 13:25:20 +02:00
System . out . println ( ) ;
2022-05-24 18:25:41 +02:00
if ( commandes . console ) System . exit ( 0 ) ;
2022-04-25 13:25:20 +02:00
}
}