Index: tmp/org.txm.searchengine.core/src/org/txm/searchengine/core/SearchEnginesManager.java
===================================================================
--- tmp/org.txm.searchengine.core/src/org/txm/searchengine/core/SearchEnginesManager.java	(revision 787)
+++ tmp/org.txm.searchengine.core/src/org/txm/searchengine/core/SearchEnginesManager.java	(revision 788)
@@ -16,8 +16,8 @@
 	 * 
 	 * @return
 	 */
-	public static SearchEngine getCQPEngine() {
-		return (SearchEngine) Toolbox.getEngineManager(EngineType.SEARCH).getEngine("CQP");
+	public static SearchEngine getCQPSearchEngine() {
+		return (SearchEngine) Toolbox.getEngineManager(EngineType.SEARCH).getEngine("CQP"); //$NON-NLS-1$
 	}
 
 	/**
Index: tmp/org.txm.tigersearch.rcp/src/org/txm/function/tigersearch/TSIndex.java
===================================================================
--- tmp/org.txm.tigersearch.rcp/src/org/txm/function/tigersearch/TSIndex.java	(revision 787)
+++ tmp/org.txm.tigersearch.rcp/src/org/txm/function/tigersearch/TSIndex.java	(revision 788)
@@ -98,7 +98,7 @@
 		// get the cqp result of the query
 		//	long time = System.currentTimeMillis();
 		//		QueryResult result = corp.query(getQuery(), "index", true); //$NON-NLS-1$
-		boolean isTargetUsed = false;//CQPEngine.getCqiClient().subCorpusHasField(result.getQualifiedCqpId(), ICqiClient.CQI_CONST_FIELD_TARGET);
+		boolean isTargetUsed = false;//CQPSearchEngine.getCqiClient().subCorpusHasField(result.getQualifiedCqpId(), ICqiClient.CQI_CONST_FIELD_TARGET);
 
 		// System.out.println("nLines : "+nLines);
 		List<Match> matches;
Index: tmp/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ContextSubcorpus.java
===================================================================
--- tmp/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ContextSubcorpus.java	(revision 787)
+++ tmp/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ContextSubcorpus.java	(revision 788)
@@ -11,7 +11,7 @@
 import org.txm.core.results.TXMParameters;
 import org.txm.core.results.TXMResult;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.txm.searchengine.cqp.CQPEngine;
+import org.txm.searchengine.cqp.CQPSearchEngine;
 import org.txm.searchengine.cqp.MemCqiClient;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.clientExceptions.InvalidCqpIdException;
@@ -72,9 +72,9 @@
 
 	@Override
 	public boolean compute(IProgressMonitor monitor) throws IOException, CqiClientException, CqiServerError, InvalidCqpIdException {
-if (!(CQPEngine.getCqiClient() instanceof MemCqiClient));
+if (!(CQPSearchEngine.getCqiClient() instanceof MemCqiClient));
 		
-		MemCqiClient CQI = (MemCqiClient) CQPEngine.getCqiClient();
+		MemCqiClient CQI = (MemCqiClient) CQPSearchEngine.getCqiClient();
 		
 		BufferedReader keywordFileReader = new BufferedReader(new InputStreamReader(
 				new FileInputStream(keywordsFile), "UTF-8")); //$NON-NLS-1$
Index: tmp/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ValuesOfQuery.java
===================================================================
--- tmp/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ValuesOfQuery.java	(revision 787)
+++ tmp/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ValuesOfQuery.java	(revision 788)
@@ -13,7 +13,7 @@
 import org.txm.core.results.TXMParameters;
 import org.txm.core.results.TXMResult;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.txm.searchengine.cqp.CQPEngine;
+import org.txm.searchengine.cqp.CQPSearchEngine;
 import org.txm.searchengine.cqp.MemCqiClient;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.Corpus;
@@ -47,7 +47,7 @@
 
 	public boolean compute(File outputFile) throws CqiClientException, IOException, CqiServerError {
 		
-		if (!(CQPEngine.getCqiClient() instanceof MemCqiClient)) return false;
+		if (!(CQPSearchEngine.getCqiClient() instanceof MemCqiClient)) return false;
 		
 		monitor.beginTask("Start querying...", 100);
 		
@@ -58,7 +58,7 @@
 		//System.out.println("query done"+t.stop());t.start();
 		
 		//System.out.println("group query "+query+" and save in "+file.getAbsolutePath());t.start();
-		MemCqiClient cli = (MemCqiClient)CQPEngine.getCqiClient();
+		MemCqiClient cli = (MemCqiClient)CQPSearchEngine.getCqiClient();
 		cli.query("group "+result.getQualifiedCqpId()+" match "+prop.getName()+" > \""+file+"\";");
 		//System.out.println("query done"+t.stop());t.start();
 
@@ -125,16 +125,16 @@
 
 		String[] values = null;
 		if (prop instanceof StructuralUnitProperty) {
-			int[] structs = CQPEngine.getCqiClient().cpos2Struc(prop.getQualifiedName(), positions);
+			int[] structs = CQPSearchEngine.getCqiClient().cpos2Struc(prop.getQualifiedName(), positions);
 			positions = null;
 			structs = uniquify(structs);
-			values = CQPEngine.getCqiClient().struc2Str(prop.getQualifiedName(), structs);
+			values = CQPSearchEngine.getCqiClient().struc2Str(prop.getQualifiedName(), structs);
 			structs = null;
 		} else {
-			int[] indexes = CQPEngine.getCqiClient().cpos2Id(prop.getQualifiedName(), positions);
+			int[] indexes = CQPSearchEngine.getCqiClient().cpos2Id(prop.getQualifiedName(), positions);
 			positions = null;
 			indexes =  uniquify(indexes);
-			values = CQPEngine.getCqiClient().id2Str(prop.getQualifiedName(), indexes);
+			values = CQPSearchEngine.getCqiClient().id2Str(prop.getQualifiedName(), indexes);
 			indexes = null;
 		}
 
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/RelationsMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/RelationsMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/RelationsMacro.groovy	(revision 788)
@@ -33,7 +33,7 @@
 if (!ParametersDialog.open(this)) return;
 
 MainCorpus corpus = corpusViewSelection
-AbstractCqiClient CQI = CQPEngine.getCqiClient();
+AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
 def word = corpus.getWordProperty()
 def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
 
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/UnitsMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/UnitsMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/UnitsMacro.groovy	(revision 788)
@@ -28,7 +28,7 @@
 if (!ParametersDialog.open(this)) return;
 
 MainCorpus corpus = corpusViewSelection
-AbstractCqiClient CQI = CQPEngine.getCqiClient();
+AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
 def word = corpus.getWordProperty()
 def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
 
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CategorieGrammaticaleMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CategorieGrammaticaleMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CategorieGrammaticaleMacro.groovy	(revision 788)
@@ -82,7 +82,7 @@
 	}
 }
 
-def CQI = CQPEngine.getCqiClient()
+def CQI = CQPSearchEngine.getCqiClient()
 
 def prop = corpus.getProperty(word_property)
 if (prop == null) {
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/ChainesMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/ChainesMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/ChainesMacro.groovy	(revision 788)
@@ -88,7 +88,7 @@
 	}
 }
 
-def CQI = CQPEngine.getCqiClient()
+def CQI = CQPSearchEngine.getCqiClient()
 
 if (buildCQL) {
 	word_prop = corpus.getProperty("id")
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CompUnitPropertiesMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CompUnitPropertiesMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CompUnitPropertiesMacro.groovy	(revision 788)
@@ -36,7 +36,7 @@
 int n = 1;
 int nDiff = 0;
 MainCorpus corpus = corpusViewSelection
-AbstractCqiClient CQI = CQPEngine.getCqiClient();
+AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
 def word = corpus.getWordProperty()
 def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
 
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/UnitsSummaryMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/UnitsSummaryMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/UnitsSummaryMacro.groovy	(revision 788)
@@ -56,7 +56,7 @@
 if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3
 
 
-	def CQI = CQPEngine.getCqiClient()
+	def CQI = CQPSearchEngine.getCqiClient()
 
 def allresults = new LinkedHashMap()
 def props = new HashSet()
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/SchemasSummaryMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/SchemasSummaryMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/SchemasSummaryMacro.groovy	(revision 788)
@@ -45,7 +45,7 @@
 if (!ParametersDialog.open(this)) return
 if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3
 
-def CQI = CQPEngine.getCqiClient()
+def CQI = CQPSearchEngine.getCqiClient()
 
 def allresults = new LinkedHashMap()
 def props = new HashSet()
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/UnitsIndexMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/UnitsIndexMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/UnitsIndexMacro.groovy	(revision 788)
@@ -83,7 +83,7 @@
 	return
 }
 
-def CQI = CQPEngine.getCqiClient()
+def CQI = CQPSearchEngine.getCqiClient()
 
 def allresults = [:]
 for (def corpus : selection) {
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/StructuresIndexMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/StructuresIndexMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/StructuresIndexMacro.groovy	(revision 788)
@@ -126,7 +126,7 @@
 // Open the parameters input dialog box
 if (!ParametersDialog.open(this)) return;
 
-def CQI = CQPEngine.getCqiClient()
+def CQI = CQPSearchEngine.getCqiClient()
 
 def corpusStructs = structures.split(",") 			// ["act", "scene"]
 structProperties = structProperties.trim()
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/SchemasProgressionMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/SchemasProgressionMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/SchemasProgressionMacro.groovy	(revision 788)
@@ -74,7 +74,7 @@
 if (!ParametersDialog.open(this)) return
 	if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3
 
-def CQI = CQPEngine.getCqiClient()
+def CQI = CQPSearchEngine.getCqiClient()
 
 def limit_cql_matches = null;
 if (limit_cql != null && !limit_cql.getQueryString().equals("\"\"")) {
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/UnitsListMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/UnitsListMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/UnitsListMacro.groovy	(revision 788)
@@ -62,7 +62,7 @@
 if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3
 
 
-def CQI = CQPEngine.getCqiClient()
+def CQI = CQPSearchEngine.getCqiClient()
 
 //corpus = corpusViewSelection
 def allResults = [:]
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/CoefficientStabiliteMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/CoefficientStabiliteMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/CoefficientStabiliteMacro.groovy	(revision 788)
@@ -83,7 +83,7 @@
 	}
 }
 
-def CQI = CQPEngine.getCqiClient()
+def CQI = CQPSearchEngine.getCqiClient()
 
 def prop = corpus.getProperty(word_property)
 
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/NatureDuPremierMaillonMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/NatureDuPremierMaillonMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/NatureDuPremierMaillonMacro.groovy	(revision 788)
@@ -78,7 +78,7 @@
 	}
 }
 
-def CQI = CQPEngine.getCqiClient()
+def CQI = CQPSearchEngine.getCqiClient()
 
 def prop = corpus.getProperty(word_property)
 
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/CategorieGrammaticaleMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/CategorieGrammaticaleMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/CategorieGrammaticaleMacro.groovy	(revision 788)
@@ -82,7 +82,7 @@
 	}
 }
 
-def CQI = CQPEngine.getCqiClient()
+def CQI = CQPSearchEngine.getCqiClient()
 
 def prop = corpus.getProperty(word_property)
 if (prop == null) {
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CoefficientStabiliteMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CoefficientStabiliteMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CoefficientStabiliteMacro.groovy	(revision 788)
@@ -83,7 +83,7 @@
 	}
 }
 
-def CQI = CQPEngine.getCqiClient()
+def CQI = CQPSearchEngine.getCqiClient()
 
 def prop = corpus.getProperty(word_property)
 
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/AjoutDefinitudeMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/AjoutDefinitudeMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/AjoutDefinitudeMacro.groovy	(revision 788)
@@ -36,7 +36,7 @@
 if (!ParametersDialog.open(this)) return;
 
 MainCorpus corpus = corpusViewSelection
-AbstractCqiClient CQI = CQPEngine.getCqiClient();
+AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
 def word = corpus.getWordProperty()
 def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
 Structure structure = analecCorpus.getStructure()
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/CheckDuplicatesInSchemasMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/CheckDuplicatesInSchemasMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/CheckDuplicatesInSchemasMacro.groovy	(revision 788)
@@ -38,7 +38,7 @@
 if (!ParametersDialog.open(this)) return
 	if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3
 
-def CQI = CQPEngine.getCqiClient()
+def CQI = CQPSearchEngine.getCqiClient()
 
 def corpus = corpusViewSelection
 mainCorpus = corpus.getMainCorpus()
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/UnitsAnnotateMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/UnitsAnnotateMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/UnitsAnnotateMacro.groovy	(revision 788)
@@ -57,7 +57,7 @@
 if (!ParametersDialog.open(this)) return
 	if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3
 
-def CQI = CQPEngine.getCqiClient()
+def CQI = CQPSearchEngine.getCqiClient()
 
 if (unit_property_to_set.length() == 0) {
 	println "unit_property_to_set not set: aborting."
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/AjoutDefinitudeMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/AjoutDefinitudeMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/AjoutDefinitudeMacro.groovy	(revision 788)
@@ -36,7 +36,7 @@
 if (!ParametersDialog.open(this)) return;
 
 MainCorpus corpus = corpusViewSelection
-AbstractCqiClient CQI = CQPEngine.getCqiClient();
+AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
 def word = corpus.getWordProperty()
 def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
 Structure structure = analecCorpus.getStructure()
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/EmptyPropValuesMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/EmptyPropValuesMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/EmptyPropValuesMacro.groovy	(revision 788)
@@ -51,7 +51,7 @@
 		debug
 if (!ParametersDialog.open(this)) return
 
-	def CQI = CQPEngine.getCqiClient()
+	def CQI = CQPSearchEngine.getCqiClient()
 
 //corpus = corpusViewSelection
 for (def corpus : selection) {
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/SchemasListMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/SchemasListMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/SchemasListMacro.groovy	(revision 788)
@@ -88,7 +88,7 @@
 	}
 }
 
-def CQI = CQPEngine.getCqiClient()
+def CQI = CQPSearchEngine.getCqiClient()
 
 if (buildCQL) {
 	word_prop = corpus.getProperty("id")
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/UnitsCorrelationMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/UnitsCorrelationMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/UnitsCorrelationMacro.groovy	(revision 788)
@@ -69,7 +69,7 @@
 if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3
 
 
-def CQI = CQPEngine.getCqiClient()
+def CQI = CQPSearchEngine.getCqiClient()
 
 def correlations = [:]
 def values1 = new HashSet()
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/CompUnitPropertiesMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/CompUnitPropertiesMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/CompUnitPropertiesMacro.groovy	(revision 788)
@@ -39,7 +39,7 @@
 int n = 1;
 int nDiff = 0;
 MainCorpus corpus = corpusViewSelection
-AbstractCqiClient CQI = CQPEngine.getCqiClient();
+AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
 def word = corpus.getWordProperty()
 def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
 
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/RelationsListMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/RelationsListMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/RelationsListMacro.groovy	(revision 788)
@@ -33,7 +33,7 @@
 if (!ParametersDialog.open(this)) return;
 
 MainCorpus corpus = corpusViewSelection
-AbstractCqiClient CQI = CQPEngine.getCqiClient();
+AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
 def word = corpus.getWordProperty()
 visuAnalec.donnees.Corpus analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
 
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/UnitsProgressionMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/UnitsProgressionMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/UnitsProgressionMacro.groovy	(revision 788)
@@ -74,7 +74,7 @@
 if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3
 
 
-	def CQI = CQPEngine.getCqiClient()
+	def CQI = CQPSearchEngine.getCqiClient()
 
 def queries = []
 def queryResults = []
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/NatureDuPremierMaillonMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/NatureDuPremierMaillonMacro.groovy	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/NatureDuPremierMaillonMacro.groovy	(revision 788)
@@ -78,7 +78,7 @@
 	}
 }
 
-def CQI = CQPEngine.getCqiClient()
+def CQI = CQPSearchEngine.getCqiClient()
 
 def prop = corpus.getProperty(word_property)
 
Index: tmp/org.txm.analec.rcp/src/org/txm/analec/toolbar/AnnotationToolbar.java
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/analec/toolbar/AnnotationToolbar.java	(revision 787)
+++ tmp/org.txm.analec.rcp/src/org/txm/analec/toolbar/AnnotationToolbar.java	(revision 788)
@@ -102,8 +102,8 @@
 		List<Match> matches = result.getMatches();
 		int start, end;
 		//		try {
-		//			int[] indexes = CQPEngine.getCqiClient().str2Id(c.getProperty("id").getQualifiedName(), ids);
-		//			int[] positions = CQPEngine.getCqiClient().id2Cpos(c.getProperty("id").getQualifiedName(), indexes);
+		//			int[] indexes = CQPSearchEngine.getCqiClient().str2Id(c.getProperty("id").getQualifiedName(), ids);
+		//			int[] positions = CQPSearchEngine.getCqiClient().id2Cpos(c.getProperty("id").getQualifiedName(), indexes);
 		//		
 		//		} catch (Exception e) {
 		//			
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/importer/xmltxm/xmltxmLoader.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/importer/xmltxm/xmltxmLoader.groovy	(revision 787)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/importer/xmltxm/xmltxmLoader.groovy	(revision 788)
@@ -136,7 +136,7 @@
 //		println "Error: could not create a copy of metadata file "+allmetadatasfile.getAbsoluteFile();
 //		return;
 //	}
-//	metadatas = new Metadatas(copy, Toolbox.getParam(Toolbox.METADATA_ENCODING), Toolbox.getParam(Toolbox.METADATA_COLSEPARATOR), Toolbox.getParam(Toolbox.METADATA_TXTSEPARATOR), 1)
+//	metadatas = new Metadatas(copy, Toolbox.getMetadataEncoding(), Toolbox.getMetadataColumnSeparator(), Toolbox.getMetadataTextSeparator(), 1)
 //} else {
 //	println "no metadata file: "+allmetadatasfile
 //}
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/importer/discours/importer.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/importer/discours/importer.groovy	(revision 787)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/importer/discours/importer.groovy	(revision 788)
@@ -38,6 +38,7 @@
 
 import javax.xml.stream.*;
 
+import org.txm.core.preferences.TBXPreferences
 import java.io.BufferedWriter;
 import java.io.File;
 import java.io.FileInputStream;
@@ -95,7 +96,7 @@
 				println "Error: could not create a copy of metadata file "+csvfile.getAbsoluteFile();
 				return;
 			}
-			metadatas = new Metadatas(copy, Toolbox.getPreference(Toolbox.METADATA_ENCODING), Toolbox.getPreference(Toolbox.METADATA_COLSEPARATOR), Toolbox.getPreference(Toolbox.METADATA_TXTSEPARATOR), 1)
+			metadatas = new Metadatas(copy, Toolbox.getPreference(TBXPreferences.METADATA_ENCODING), Toolbox.getPreference(Toolbox.METADATA_COLSEPARATOR), Toolbox.getPreference(Toolbox.METADATA_TXTSEPARATOR), 1)
 		} else {
 			println "No metadata file: "+csvfile
 			println "Aborting"
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/importer/transcriber/pager.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/importer/transcriber/pager.groovy	(revision 787)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/importer/transcriber/pager.groovy	(revision 788)
@@ -653,7 +653,7 @@
 		writer.close();
 		output.close();
 
-		File txmhome = new File(org.txm.Toolbox.getParam(org.txm.Toolbox.USER_TXM_HOME));
+		File txmhome = new File(org.txm.Toolbox.getTXMHOMEPATH());
 		File xlsDir  = new File(txmhome, "xsl");
 		File xslfile = new File(xlsDir,"breakByMilestone.xsl");
 		if (!xslfile.exists()) {
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/importer/xtz/XTZImporter.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/importer/xtz/XTZImporter.groovy	(revision 787)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/importer/xtz/XTZImporter.groovy	(revision 788)
@@ -6,6 +6,7 @@
 
 import net.sf.saxon.style.XSLParam;
 
+import org.txm.core.preferences.TBXPreferences;
 import org.txm.importer.ApplyXsl2
 import org.txm.importer.CleanFile
 import org.txm.importer.MileStoneProjection
@@ -109,9 +110,9 @@
 				return;
 			}
 			metadata = new Metadatas(copy,
-			Toolbox.getPreference(Toolbox.METADATA_ENCODING),
-			Toolbox.getPreference(Toolbox.METADATA_COLSEPARATOR),
-			Toolbox.getPreference(Toolbox.METADATA_TXTSEPARATOR), 1)
+			Toolbox.getPreference(TBXPreferences.METADATA_ENCODING),
+			Toolbox.getPreference(TBXPreferences.METADATA_COLSEPARATOR),
+			Toolbox.getPreference(TBXPreferences.METADATA_TXTSEPARATOR), 1)
 		}
 
 		String cleanDirectories = module.getParameters().getKeyValueParameters().get(ImportKeys.CLEAN);
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/importer/xml/xmlLoader.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/importer/xml/xmlLoader.groovy	(revision 787)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/importer/xml/xmlLoader.groovy	(revision 788)
@@ -191,7 +191,7 @@
 		println "Error: could not create a copy of metadata file "+allmetadatasfile.getAbsoluteFile();
 		return;
 	}
-	metadatas = new Metadatas(copy, Toolbox.getParam(Toolbox.METADATA_ENCODING), Toolbox.getParam(Toolbox.METADATA_COLSEPARATOR), Toolbox.getParam(Toolbox.METADATA_TXTSEPARATOR), 1)
+	metadatas = new Metadatas(copy, Toolbox.getMetadataEncoding(), Toolbox.getMetadataColumnSeparator(), Toolbox.getMetadataTextSeparator(), 1)
 } else {
 	println " No metadata file: "+allmetadatasfile
 }
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/importer/factiva/factivaLoader.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/importer/factiva/factivaLoader.groovy	(revision 787)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/importer/factiva/factivaLoader.groovy	(revision 788)
@@ -180,7 +180,7 @@
 		println "Error: could not create a copy of metadata file "+allmetadatasfile.getAbsoluteFile();
 		return;
 	}
-	metadatas = new Metadatas(copy, Toolbox.getParam(Toolbox.METADATA_ENCODING), Toolbox.getParam(Toolbox.METADATA_COLSEPARATOR), Toolbox.getParam(Toolbox.METADATA_TXTSEPARATOR), 1)
+	metadatas = new Metadatas(copy, Toolbox.getMetadataEncoding(), Toolbox.getMetadataColumnSeparator(), Toolbox.getMetadataTextSeparator(), 1)
 } else
 	println "no metadata file: "+allmetadatasfile
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/importer/doc/docLoader.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/importer/doc/docLoader.groovy	(revision 787)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/importer/doc/docLoader.groovy	(revision 788)
@@ -212,7 +212,9 @@
 		println "Error: could not create a copy of the metadata.csv file "+allmetadatasfile.getAbsoluteFile();
 		return;
 	}
-	metadatas = new Metadatas(copy, Toolbox.getParam(Toolbox.METADATA_ENCODING), Toolbox.getParam(Toolbox.METADATA_COLSEPARATOR), Toolbox.getParam(Toolbox.METADATA_TXTSEPARATOR), 1)
+	metadatas = new Metadatas(copy, Toolbox.getMetadataEncoding(), 
+		Toolbox.getMetadataColumnSeparator(), 
+		Toolbox.getMetadataTextSeparator(), 1)
 } else {
 	println "no $allmetadatasfile metadata file found."
 }
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/export/ExportTextContentMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/export/ExportTextContentMacro.groovy	(revision 787)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/export/ExportTextContentMacro.groovy	(revision 788)
@@ -32,7 +32,7 @@
 if (!exportDir.exists()) exportDir.mkdirs()
 
 Corpus corpus = corpusViewSelection
-CQI = CQPEngine.getCqiClient();
+CQI = CQPSearchEngine.getCqiClient();
 
 def lineSeparatorStructure = corpus.getStructuralUnit(lineSeparatorStructureName)
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/oriflamms/analyse/AllographsMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/oriflamms/analyse/AllographsMacro.groovy	(revision 787)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/oriflamms/analyse/AllographsMacro.groovy	(revision 788)
@@ -55,7 +55,7 @@
 signRegExp = ~/$sign/
 characterRegExp = ~/$allograph/
 
-CQI = CQPEngine.getCqiClient();
+CQI = CQPSearchEngine.getCqiClient();
 text_su = corpus.getStructuralUnit("text")
 text_id = text_su.getProperty("id")
 pb_id = corpus.getProperty("pbid")
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/oriflamms/analyse/AbbreviationsAndSemanticsMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/oriflamms/analyse/AbbreviationsAndSemanticsMacro.groovy	(revision 787)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/oriflamms/analyse/AbbreviationsAndSemanticsMacro.groovy	(revision 788)
@@ -35,7 +35,7 @@
 println "corpora selection: "+corpusViewSelection
 
 def corpus = corpusViewSelection
-CQI = CQPEngine.getCqiClient();
+CQI = CQPSearchEngine.getCqiClient();
 def w = corpus.getStructuralUnit("w");
 
 def wordCorpus = (w == null)
@@ -95,7 +95,7 @@
 	int start = first_match.getStart()
 	int end = last_match.getEnd()
 
-	def CQI = CQPEngine.getCqiClient();
+	def CQI = CQPSearchEngine.getCqiClient();
 	int[] positions;
 	def r = corpus.query(new Query("[pbstart=\"0\"]"), "ABBRORI1", false)
 	def pb_pos = r.starts
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/oriflamms/analyse/AbbreviationsAndLinesMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/oriflamms/analyse/AbbreviationsAndLinesMacro.groovy	(revision 787)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/oriflamms/analyse/AbbreviationsAndLinesMacro.groovy	(revision 788)
@@ -90,7 +90,7 @@
 	int start = first_match.getStart()
 	int end = last_match.getEnd()
 
-	def CQI = CQPEngine.getCqiClient();
+	def CQI = CQPSearchEngine.getCqiClient();
 	int[] positions;
 	def r = corpus.query(new Query("[pbstart=\"0\"]"), "ABBRORI1", false)
 	def pb_pos = r.starts
@@ -176,7 +176,7 @@
 
 	int[] positions = new int[length]
 	for (int i = 0 ; i < length ; i++) positions[i] = from++;
-	def CQI = CQPEngine.getCqiClient();
+	def CQI = CQPSearchEngine.getCqiClient();
 
 	def abbrNs = CQI.cpos2Str(abbrn.getQualifiedName(), positions);
 	def allLetters = CQI.cpos2Str(lettersAll.getQualifiedName(), positions);
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/xml/ForceWordIDsMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/xml/ForceWordIDsMacro.groovy	(revision 0)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/xml/ForceWordIDsMacro.groovy	(revision 788)
@@ -0,0 +1,57 @@
+// STANDARD DECLARATIONS
+package org.txm.macro.xml
+
+import org.kohsuke.args4j.*
+import groovy.transform.Field
+import org.txm.rcp.swt.widget.parameters.*
+import org.txm.importer.StaxIdentityParser
+import javax.xml.stream.XMLStreamException
+
+@Field @Option(name="inputFile", usage="input XML file", widget="FileOpen", required=true, def="input.xml")
+def inputFile
+
+@Field @Option(name="outputFile", usage="output XML file", widget="FileSave", required=true, def="ouput.xml")
+def outputFile
+
+// Open the parameters input dialog box
+if (!ParametersDialog.open(this)) return;
+
+// END OF PARAMETERS
+
+if (!(inputFile.exists() && inputFile.canRead())) { println "Error: cannot found $inputFile"; return false;}
+
+outputFile.getParentFile().mkdirs()
+
+// build text id
+textid = inputFile.getName();
+if (textid.indexOf(".xml") > 0) {
+	textid = textid.substring(0, textid.indexOf(".xml"))
+}
+
+def parser = new StaxIdentityParser(inputFile) {
+	
+	int wordnumber = 1;
+	
+	protected void writeAttributes() throws XMLStreamException {
+		if (localname == "w") { // a word
+			boolean idwritten = false;
+			for (int i = 0 ; i < parser.getAttributeCount() ; i++) {
+				if (parser.getAttributeLocalName(i) == "id") { // update & backup
+					writeAttribute(parser.getAttributePrefix(i), parser.getAttributeLocalName(i), "w_"+textid+"_"+(wordnumber++)); // force id
+					writeAttribute(parser.getAttributePrefix(i), "foreign-id", parser.getAttributeValue(i)); // backup
+					idwritten = true;
+				} else {
+					writeAttribute(parser.getAttributePrefix(i), parser.getAttributeLocalName(i), parser.getAttributeValue(i));
+				}
+			}
+			
+			if (!idwritten) { // create id
+				writeAttribute(null, "id", "w_"+textid+"_"+(wordnumber++));
+			}
+		} else {
+			super.writeAttributes()
+		}
+	}
+}
+
+return parser.process(outputFile)
\ No newline at end of file
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/export/ExportTextsContentMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/export/ExportTextsContentMacro.groovy	(revision 787)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/export/ExportTextsContentMacro.groovy	(revision 788)
@@ -32,7 +32,7 @@
 if (!exportDir.exists()) exportDir.mkdirs()
 
 Corpus corpus = corpusViewSelection
-CQI = CQPEngine.getCqiClient();
+CQI = CQPSearchEngine.getCqiClient();
 
 def lineSeparatorStructure = corpus.getStructuralUnit(lineSeparatorStructureName)
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/export/ExportTextsMetadataMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/export/ExportTextsMetadataMacro.groovy	(revision 787)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/export/ExportTextsMetadataMacro.groovy	(revision 788)
@@ -24,7 +24,7 @@
 
 // BEGINNING
 def Corpus corpus = corpusViewSelection
-def CQI = CQPEngine.getCqiClient()
+def CQI = CQPSearchEngine.getCqiClient()
 def writer = tsvFile.newWriter("UTF-8")
 def internalTextProperties = ["project", "base", "path"]
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/importer/XTZImporterMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/importer/XTZImporterMacro.groovy	(revision 787)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/importer/XTZImporterMacro.groovy	(revision 788)
@@ -237,7 +237,7 @@
 		println "Error: could not create a copy of metadata file "+allmetadatasfile.getAbsoluteFile();
 		return;
 	}
-	metadatas = new Metadatas(copy, Toolbox.getParam(Toolbox.METADATA_ENCODING), Toolbox.getParam(Toolbox.METADATA_COLSEPARATOR), Toolbox.getParam(Toolbox.METADATA_TXTSEPARATOR), 1)
+	metadatas = new Metadatas(copy, Toolbox.getMetadataEncoding(), Toolbox.getMetadataColumnSeparator(), Toolbox.getMetadataTextSeparator(), 1)
 } else {
 	println "no metadata file: "+allmetadatasfile
 }
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/XMLStatistics.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/XMLStatistics.groovy	(revision 787)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/XMLStatistics.groovy	(revision 788)
@@ -101,7 +101,7 @@
 		for (File infile : srcdir.listFiles()) {
 			if (!infile.getName().endsWith(".xml")) continue
 
-				XMLStatistics diag = new XMLStatistics(infile.toURI().toURL())
+			XMLStatistics diag = new XMLStatistics(infile.toURI().toURL())
 			diag.setUsePaths(usePaths)
 			diag.setUseAttributes(useAttributes)
 			diag.setUseAttributeValues(useAttributeValues)
@@ -180,6 +180,7 @@
 			}
 		}
 	}
+	
 	public static void main(String[] args) {
 		File srcdir = new File("/home/mdecorde/xml/temoignagesnice/corpus Matrice - fichiers xmlisés/");
 		File outdir = new File("/home/mdecorde/xml/temoignagesnice/corpus Matrice - fichiers xmlisés/stats");
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/XMLFileStatistics.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/XMLFileStatistics.groovy	(revision 0)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/XMLFileStatistics.groovy	(revision 788)
@@ -0,0 +1,108 @@
+package org.txm.scripts
+
+import javax.xml.stream.*;
+
+import org.txm.importer.StaxIdentityParser;
+
+
+path = ""
+paths = [:]
+
+usePaths=true
+useAttributes=true
+useAttributeValues=false
+
+inputFile = new File("/home/mdecorde/xml/xmlw/test.xml")
+
+try {
+	usePaths=args["usePaths"]
+	useAttributes=args["useAttributes"]
+	useAttributeValues=args["useAttributeValues"]
+	inputFile=args["inputFile"]
+} catch(Exception e) { } // set the "args" map binding to set usePaths, useAttributes,useAttributeValues, inputFile
+
+inputFile = new File("/home/mdecorde/xml/xmlw/test.xml")
+
+
+inputurl = inputFile.toURI().toURL()
+inputData = inputurl.openStream()
+factory = XMLInputFactory.newInstance()
+parser = factory.createXMLStreamReader(inputData)
+
+try {
+	for (int event = parser.next(); event != XMLStreamConstants.END_DOCUMENT; event = parser.next()) {
+		switch (event) {
+			case XMLStreamConstants.NAMESPACE:
+				break
+			case XMLStreamConstants.START_ELEMENT:
+				localname = parser.getLocalName()
+				processStartElement()
+				break
+			case XMLStreamConstants.CHARACTERS:
+				break
+			case XMLStreamConstants.END_ELEMENT:
+				localname = parser.getLocalName()
+				processEndElement()
+				break
+			case XMLStreamConstants.PROCESSING_INSTRUCTION:
+				break
+			case XMLStreamConstants.DTD:
+				break
+			case XMLStreamConstants.CDATA:
+				break
+			case XMLStreamConstants.COMMENT:
+				break
+			case XMLStreamConstants.END_DOCUMENT:
+				break
+			case XMLStreamConstants.ENTITY_REFERENCE:
+				break
+		}
+	}
+} catch(Exception e) {
+	println("Unexpected error while parsing file "+inputurl+" : "+e);
+	e.printStackTrace();
+	parser.close();
+	return false;
+}
+
+return paths
+
+public void processEndElement() {
+	if (usePaths) {
+		path = path.substring(0, path.lastIndexOf("/"))
+	}
+}
+
+public void processStartElement() {
+	String localname = parser.getLocalName();
+	if (usePaths) {
+		path = path + "/$localname"
+	} else {
+		path = localname;
+	}
+
+	if (useAttributes) {
+		if (useAttributeValues) {
+			for(int i = 0 ; i < parser.getAttributeCount() ; i++)
+				if (!parser.getAttributeLocalName(i).matches(UNICATTRS))
+					path += "@"+parser.getAttributeLocalName(i)+"="+parser.getAttributeValue(i)
+		} else {
+			for(int i = 0 ; i < parser.getAttributeCount() ; i++)
+				path += "@"+parser.getAttributeLocalName(i)
+		}
+	}
+
+	println "++"
+	plusOne()
+	//super.processStartElement() // don't write :)
+}
+
+private void plusOne() {
+	if (!paths.containsKey(path)) {
+		paths[path] = 1
+	} else {
+		paths[path] =  paths[path]+1
+	}
+}
+
+
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/teitxm/Xml2Ana.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/teitxm/Xml2Ana.groovy	(revision 787)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/teitxm/Xml2Ana.groovy	(revision 788)
@@ -145,11 +145,11 @@
 	def anabalises = [];
 	protected void processStartElement()
 	{
-		println "checkTags=$checkTags";
-		println "parser=$parser";
+//		println "checkTags=$checkTags";
+//		println "parser=$parser";
 		firstElement++;
-		if (checkTags.containsKey(parser.getLocalName())) {
-			checkTags.put(parser.getLocalName(), true);
+		if (getCheckTags().containsKey(parser.getLocalName())) {
+			getCheckTags().put(parser.getLocalName(), true);
 		}
 		
 		switch (parser.getLocalName()) {
@@ -387,7 +387,7 @@
 	public String checkResp()
 	{
 		String rez ="found tags : \n";
-		for (String key : checkTags)
+		for (String key : checkTags.keySet())
 			rez += "\t"+key+"\n";
 		return rez;
 	}
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/functions/mesures/Diversity.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/functions/mesures/Diversity.groovy	(revision 787)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/functions/mesures/Diversity.groovy	(revision 788)
@@ -52,7 +52,7 @@
 		Property p = corpus.getProperty(property);
 		QueryResult result = corpus.query(new Query(query), "TMP", false);
 		int[] starts = result.getStarts();
-		int[] ids = CQPEngine.getCqiClient().cpos2Id(p.getQualifiedName(), starts);
+		int[] ids = CQPSearchEngine.getCqiClient().cpos2Id(p.getQualifiedName(), starts);
 		HashSet<Integer> set = new HashSet<Integer>();
 		for (int i : ids) set.add(i); // no double
 		return set.size();
Index: tmp/org.txm.treetagger.core/src/org/txm/treetagger/core/preferences/TreeTaggerPreferences.java
===================================================================
--- tmp/org.txm.treetagger.core/src/org/txm/treetagger/core/preferences/TreeTaggerPreferences.java	(revision 787)
+++ tmp/org.txm.treetagger.core/src/org/txm/treetagger/core/preferences/TreeTaggerPreferences.java	(revision 788)
@@ -49,7 +49,12 @@
 		// Default preferences
 		Preferences preferences = DefaultScope.INSTANCE.getNode(PREFERENCES_NODE);
 		
-		String installPath = System.getProperty("osgi.user.area") + "/TXM/treetagger"; //$NON-NLS-1$ //$NON-NLS-2$
+		String installPath = "/usr/lib/treetagger"; //"System.getProperty("osgi.user.area") + "/TXM/treetagger"; //$NON-NLS-1$ //$NON-NLS-2$
+		if (System.getProperty("os.name").contains("Windows")) {
+			installPath = "C:/Program Files/TreeTagger";
+		} else if (System.getProperty("os.name").contains("Mac")) {
+			installPath = "/Applications/TreeTagger";
+		}
 		
 		preferences.put(INSTALL_PATH, installPath);
 		preferences.put(MODELS_PATH, installPath + "/models"); //$NON-NLS-1$
Index: tmp/org.txm.core/src/java/org/txm/core/engines/EngineType.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/core/engines/EngineType.java	(revision 787)
+++ tmp/org.txm.core/src/java/org/txm/core/engines/EngineType.java	(revision 788)
@@ -14,7 +14,8 @@
 	STATS("statistics"),
 	CHARTS("charts"),
 	SCRIPT("scripts"),
-	ANNOTATION("annotations");
+	ANNOTATION("annotations"),
+	OTHER("others engines");
 
 	/**
 	 * Description.
Index: tmp/org.txm.core/src/java/org/txm/Toolbox.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/Toolbox.java	(revision 787)
+++ tmp/org.txm.core/src/java/org/txm/Toolbox.java	(revision 788)
@@ -648,4 +648,14 @@
 			super.finalize();
 		}
 	}
+	
+	public static String getMetadataEncoding() {
+		return TBXPreferences.getString(TBXPreferences.METADATA_ENCODING, TBXPreferences.PREFERENCES_NODE);
+	}
+	public static String getMetadataColumnSeparator(){
+		return TBXPreferences.getString(TBXPreferences.METADATA_COLSEPARATOR, TBXPreferences.PREFERENCES_NODE);
+	}
+	public static String getMetadataTextSeparator() {
+		return TBXPreferences.getString(TBXPreferences.METADATA_TXTSEPARATOR, TBXPreferences.PREFERENCES_NODE);
+	}
 }
Index: tmp/org.txm.index.rcp/src/org/txm/index/rcp/handlers/IndexToConcordance.java
===================================================================
--- tmp/org.txm.index.rcp/src/org/txm/index/rcp/handlers/IndexToConcordance.java	(revision 787)
+++ tmp/org.txm.index.rcp/src/org/txm/index/rcp/handlers/IndexToConcordance.java	(revision 788)
@@ -118,7 +118,7 @@
 ////			String queryname = "Q"+Corpus.getNextQueryCounter();
 ////			String interQueryString = queryname+"=intersect "+indexResult.getQualifiedCqpId()+" "+indexOccResult.getQualifiedCqpId()+";"; 
 ////			System.out.println("Compute inter query: "+interQueryString);
-////			((MemCqiClient)CQPEngine.getCqiClient()).query(interQueryString);
+////			((MemCqiClient)CQPSearchEngine.getCqiClient()).query(interQueryString);
 ////			
 ////			QueryResult inter = new QueryResult(queryname, queryname, corpus, new Query(interQueryString));
 ////			System.out.println("indexResult size: "+indexResult.getNMatch());
@@ -130,7 +130,7 @@
 ////		} catch (Exception e) {
 ////			e.printStackTrace();
 ////			try {
-////				System.out.println("CQP error: "+CQPEngine.getCqiClient().getLastError());
+////				System.out.println("CQP error: "+CQPSearchEngine.getCqiClient().getLastError());
 ////			} catch (Exception e1) {
 ////				e1.printStackTrace();
 ////			}
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/clientExceptions/CqiClientException.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/clientExceptions/CqiClientException.java	(revision 787)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/clientExceptions/CqiClientException.java	(revision 788)
@@ -61,7 +61,7 @@
 		super(cause);
 		if(cause instanceof java.net.SocketException){
 			if (counter++ < 5) {
-				//if(!CQPEngine.getCqiClient().reconnect()) CQPEngine.restart();
+				//if(!CQPSearchEngine.getCqiClient().reconnect()) CQPSearchEngine.restart();
 			}
 		}
 	}
@@ -78,7 +78,7 @@
 		super(message, cause);
 		if (cause instanceof java.net.SocketException)
 		{
-			//if(!CQPEngine.getCqiClient().reconnect()) CQPEngine.restart();
+			//if(!CQPSearchEngine.getCqiClient().reconnect()) CQPSearchEngine.restart();
 		}
 	}
 
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/LoadBinaryCorpus.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/LoadBinaryCorpus.java	(revision 787)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/LoadBinaryCorpus.java	(revision 788)
@@ -232,7 +232,7 @@
 //								DeleteDir.deleteDirectory(backup);
 //							} catch (Exception e) {
 //								System.out.println(Messages.LoadBinaryCorpus_3+e+Messages.LoadBinaryCorpus_7);
-//								//CQPEngine.getCqiClient().dropCorpus(name);
+//								//CQPSearchEngine.getCqiClient().dropCorpus(name);
 //								//Log.info(NLS.bind(Messages.AddBase_23, basename.toUpperCase())); 
 //								Log.info(Log.toString(e));
 //								//restoreCorpus(backup, corpusdir);
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java	(revision 787)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java	(revision 788)
@@ -266,8 +266,8 @@
 								@Override
 								public void run() {
 									try {
-										SearchEnginesManager.getCQPEngine().stop();
-										SearchEnginesManager.getCQPEngine().start(monitor);
+										SearchEnginesManager.getCQPSearchEngine().stop();
+										SearchEnginesManager.getCQPSearchEngine().start(monitor);
 										CorporaView.refresh();
 									} catch (Exception e) {
 										// TODO Auto-generated catch block
