Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/CwbEncode.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/CwbEncode.java	(revision 1161)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/CwbEncode.java	(revision 1162)
@@ -327,6 +327,8 @@
 		}
 
 		for (File corpus : corpora.listFiles()) {
+			if (!corpus.isDirectory()) continue;
+			
 			System.out.println(TXMCoreMessages.CwbEncode_27 + corpus.getName());
 			File data = new File(corpus, "data"); //$NON-NLS-1$
 
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/CorpusManager.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/CorpusManager.java	(revision 1161)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/CorpusManager.java	(revision 1162)
@@ -130,7 +130,7 @@
 		}
 
 		for (MainCorpus corpus : CorpusManager.corpora) {
-			if (corpus.getName().equals(corpusName)) {
+			if (corpus.getID().equals(corpusName)) {
 				// System.out.println("found corpus "+corpusName);
 				return corpus;
 			}
@@ -158,7 +158,7 @@
 		if (corpora == null)
 			return false;
 		for (MainCorpus c : corpora)
-			if (name.equals(c.getName()))
+			if (name.equals(c.getID()))
 				return true;
 		return false;
 	}
@@ -225,7 +225,7 @@
 			corpora.remove(corpus);
 		if (CQPSearchEngine.isInitialized()) {
 			try {
-				CQPSearchEngine.getCqiClient().dropCorpus(corpus.getName());
+				CQPSearchEngine.getCqiClient().dropCorpus(corpus.getID());
 			} catch (Exception e) {
 				Log.warning("Warning while removing corpus: Failed to drop corpus "+corpus);
 				Log.printStackTrace(e);
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/core/functions/summary/Summary.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/core/functions/summary/Summary.java	(revision 1161)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/core/functions/summary/Summary.java	(revision 1162)
@@ -60,7 +60,7 @@
 	@Override
 	protected boolean _compute() throws Exception {
 		treenodes.end = corpus.getSize();
-		treenodes.id = corpus.getName();
+		treenodes.id = corpus.getID();
 		treenodes.start = 0;
 		treenodes.parent = null;
 		// get all type of structures
Index: tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/commands/ExportStandoff.java
===================================================================
--- tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/commands/ExportStandoff.java	(revision 1161)
+++ tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/commands/ExportStandoff.java	(revision 1162)
@@ -83,7 +83,7 @@
 		MainCorpus corpus = (MainCorpus) s;
 		String path = Toolbox.getTxmHomePath();
 		dialog.setFilterPath(path); //To set a specific path
-		dialog.setFileName(corpus.getName()+"_annotations.zip");
+		dialog.setFileName(corpus.getID()+"_annotations.zip");
 		dialog.setFilterExtensions(new String[]{"*.zip"});
 		if (dialog.open() != null) {
 			StatusLine.setMessage(TXMUIMessages.ExportAnnotation_0);
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/BasesView.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/BasesView.java	(revision 1161)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/BasesView.java	(revision 1162)
@@ -137,7 +137,7 @@
 				TreeSelection selection = (TreeSelection) tv.getSelection();
 				if (selection.getFirstElement() instanceof CQPCorpus) {
 					CQPCorpus corpus = (CQPCorpus)selection.getFirstElement();
-					File selectedItem = new File(corpus.getProjectDirectory(), "cqp/"+corpus.getName()+".cqp");
+					File selectedItem = new File(corpus.getProjectDirectory(), "cqp/"+corpus.getID()+".cqp");
 					if (selectedItem.exists())
 						EditFile.openfile(selectedItem.getAbsolutePath());
 				} else if (selection.getFirstElement() instanceof Text) {
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/QueriesView.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/QueriesView.java	(revision 1161)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/QueriesView.java	(revision 1162)
@@ -183,7 +183,7 @@
 					FileWriter writer = new FileWriter(output);
 					writer.write(TXMUIMessages.QueriesView_5);
 					for (MainCorpus b : CorpusManager.getCorpusManager().getCorpora()) {
-						writer.write(" " + b.getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+						writer.write(" " + b.getID() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
 						for (SavedQuery q : b.getQueriesLog()) {
 							writer.write("  " + q + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
 						}
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java	(revision 1161)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java	(revision 1162)
@@ -165,10 +165,12 @@
 	 * Linked editors.
 	 */
 	protected ArrayList<EditorPart> linkedEditors = null;
+	
+	/**
+	 * debug purpose variable -> easier to fetch information that the getResult() method
+	 */
 	private T result;
 
-
-
 	@Override
 	public void init(IEditorSite site, IEditorInput input) throws PartInitException {
 		this.setSite(site);
Index: tmp/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/conversion/CorpusRuledConvertion.java
===================================================================
--- tmp/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/conversion/CorpusRuledConvertion.java	(revision 1161)
+++ tmp/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/conversion/CorpusRuledConvertion.java	(revision 1162)
@@ -56,7 +56,7 @@
 			System.out.println("'txm' directory not found in "+binaryCorpusDirectory.getAbsolutePath());
 			return false;
 		}
-		File txmCorpusDirectory = new File(txmDirectory, corpus.getName());
+		File txmCorpusDirectory = new File(txmDirectory, corpus.getID());
 		if (!txmCorpusDirectory.exists()) {
 			System.out.println("'"+corpus.getName()+"' corpus directory not found in "+txmDirectory.getAbsolutePath());
 			return false;
Index: tmp/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/AnnotationWriter.java
===================================================================
--- tmp/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/AnnotationWriter.java	(revision 1161)
+++ tmp/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/AnnotationWriter.java	(revision 1162)
@@ -91,7 +91,7 @@
 		List<String> textsIds = corpus.getProject().getTextsID();
 		System.out.println("Exporting annotations of "+StringUtils.join(textsIds, ", ")+".");
 
-		File resultDirectory = new File(Toolbox.getTxmHomePath(), "results/"+corpus.getName()+"_annotations");
+		File resultDirectory = new File(Toolbox.getTxmHomePath(), "results/"+corpus.getID()+"_annotations");
 		DeleteDir.deleteDirectory(resultDirectory);
 		resultDirectory.mkdirs();
 		if (!(resultDirectory.exists() && resultDirectory.canWrite())) {
@@ -100,7 +100,7 @@
 		}
 		
 		File inputDirectory = corpus.getProjectDirectory();
-		File corpusTxmDirectory = new File(inputDirectory, "txm/"+corpus.getName());
+		File corpusTxmDirectory = new File(inputDirectory, "txm/"+corpus.getID());
 		
 		System.out.println("Writing annotations XML files in "+resultDirectory);
 		for (String textid : textsIds) { 
@@ -143,7 +143,7 @@
 		List<String> textsIds = corpus.getProject().getTextsID();
 
 		File inputDirectory = corpus.getProjectDirectory();
-		File txmDirectory = new File(inputDirectory, "txm/"+corpus.getName());
+		File txmDirectory = new File(inputDirectory, "txm/"+corpus.getID());
 
 		ArrayList<Annotation> textAnnotations = new ArrayList<Annotation>();
 		HashMap<String, ArrayList<Annotation>> annotationsPerTexts = new HashMap<String, ArrayList<Annotation>>();
Index: tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/editors/TIGERSearchEditor.java
===================================================================
--- tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/editors/TIGERSearchEditor.java	(revision 1161)
+++ tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/editors/TIGERSearchEditor.java	(revision 1162)
@@ -162,7 +162,7 @@
 	}
 
 	protected void initializeFields() {
-		String id = corpus.getName();
+		String id = corpus.getID();
 		File configfile = new File(corpus.getProjectDirectory(),"tiger/tigersearch.logprop");
 		File registrydir = new File(corpus.getProjectDirectory(), "tiger");
 
Index: tmp/org.txm.tigersearch.rcp/src/org/txm/searchengine/ts/TIGERSearchEngine.java
===================================================================
--- tmp/org.txm.tigersearch.rcp/src/org/txm/searchengine/ts/TIGERSearchEngine.java	(revision 1161)
+++ tmp/org.txm.tigersearch.rcp/src/org/txm/searchengine/ts/TIGERSearchEngine.java	(revision 1162)
@@ -46,7 +46,7 @@
 		File configfile = new File(tigerDirectory, "tigersearch.logprop");
 		TSCorpusManager manager = new TSCorpusManager(tigerDirectory, configfile);
 		
-		TSResult result = manager.getCorpus(corpus.getName()).query(query.getQueryString());
+		TSResult result = manager.getCorpus(corpus.getID()).query(query.getQueryString());
 		ResultForest forest = result.getForest();
 		System.out.println("TIGERSearch: forest size="+forest.getForestSize());
 		MatchResult mresult = result.getMatchResult();
@@ -65,7 +65,7 @@
 		//TODO implement a corpora of TIGER corpus
 		File buildDirectory = new File(corpus.getProjectDirectory(), "tiger");
 		return	new File(buildDirectory, "tigersearch.logprop").exists() && 
-		 new File(buildDirectory, corpus.getName()).exists();
+		 new File(buildDirectory, corpus.getID()).exists();
 	}
 
 	
Index: tmp/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/handlers/Apply.java
===================================================================
--- tmp/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/handlers/Apply.java	(revision 1161)
+++ tmp/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/handlers/Apply.java	(revision 1162)
@@ -66,7 +66,7 @@
 	public static void apply(CQPCorpus corpus, final File model, final String[] properties, final String[] options) {
 		final MainCorpus mainCorpus = corpus.getMainCorpus();
 		final File corpusBinaryDirectory = mainCorpus.getProjectDirectory();
-		final File txmDirectory = new File(corpusBinaryDirectory, "txm/"+mainCorpus.getName());
+		final File txmDirectory = new File(corpusBinaryDirectory, "txm/"+mainCorpus.getID());
 		
 		if (!txmDirectory.exists()) {
 			System.out.println("Can't apply TreeTagger to a corpus with no XML-TXM files.");
Index: tmp/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/handlers/LemmaProjection.java
===================================================================
--- tmp/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/handlers/LemmaProjection.java	(revision 1161)
+++ tmp/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/handlers/LemmaProjection.java	(revision 1162)
@@ -94,7 +94,7 @@
 			final String targetproperty, final LinkedHashSet<String> formAsLemmaPosList, final LinkedHashSet<String> sourceprioritylist) {
 		final MainCorpus mainCorpus = corpus.getMainCorpus();
 		final File corpusBinaryDirectory = mainCorpus.getProjectDirectory();
-		final File txmDirectory = new File(corpusBinaryDirectory, "txm/"+mainCorpus.getName());
+		final File txmDirectory = new File(corpusBinaryDirectory, "txm/"+mainCorpus.getID());
 
 		if (!txmDirectory.exists()) {
 			System.out.println("Can't process a corpus with no XML-TXM files directory: "+txmDirectory);
Index: tmp/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/handlers/RemoveProperties.java
===================================================================
--- tmp/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/handlers/RemoveProperties.java	(revision 1161)
+++ tmp/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/handlers/RemoveProperties.java	(revision 1162)
@@ -75,7 +75,7 @@
 	public static void apply(final CQPCorpus corpus, final HashSet<String> propertiesSet) {
 		final MainCorpus mainCorpus = corpus.getMainCorpus();
 		final File corpusBinaryDirectory = mainCorpus.getProjectDirectory();
-		final File txmDirectory = new File(corpusBinaryDirectory, "txm/"+mainCorpus.getName());
+		final File txmDirectory = new File(corpusBinaryDirectory, "txm/"+mainCorpus.getID());
 
 		if (!txmDirectory.exists()) {
 			System.out.println("Can't process a corpus with no XML-TXM files directory: "+txmDirectory);
Index: tmp/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/handlers/Train.java
===================================================================
--- tmp/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/handlers/Train.java	(revision 1161)
+++ tmp/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/handlers/Train.java	(revision 1162)
@@ -213,7 +213,7 @@
 					
 					// create TT SRC file from CWB indexes
 					
-					File ttSrcFile = new File(treetaggerSrcDirectory, mainCorpus.getName()+".tt");
+					File ttSrcFile = new File(treetaggerSrcDirectory, mainCorpus.getID()+".tt");
 					System.out.println("TT SRC file: "+ttSrcFile.getAbsolutePath());
 					BufferedOutputStream fos = new BufferedOutputStream(new FileOutputStream(ttSrcFile));
 					PrintStream ps = new PrintStream(fos);
Index: tmp/org.txm.index.core/src/org/txm/index/core/functions/___Lexicon2.java
===================================================================
--- tmp/org.txm.index.core/src/org/txm/index/core/functions/___Lexicon2.java	(revision 1161)
+++ tmp/org.txm.index.core/src/org/txm/index/core/functions/___Lexicon2.java	(revision 1162)
@@ -196,7 +196,7 @@
 		// System.out.println("in "+this.getCqpId()+" look for cached lexicon "+property);
 		// System.out.println("not found");
 		this.subTask("Computing lexicon size...");
-		Log.finest(IndexCoreMessages.LEXICON_RESULT_TYPE + corpus.getName());
+		Log.finest(IndexCoreMessages.LEXICON_RESULT_TYPE + corpus.getID());
 		int lexiconSize;
 		try {
 			lexiconSize = CorpusManager.getCorpusManager().getCqiClient().lexiconSize(property.getQualifiedName());
Index: tmp/org.txm.index.core/src/org/txm/index/core/functions/Lexicon.java
===================================================================
--- tmp/org.txm.index.core/src/org/txm/index/core/functions/Lexicon.java	(revision 1161)
+++ tmp/org.txm.index.core/src/org/txm/index/core/functions/Lexicon.java	(revision 1162)
@@ -195,7 +195,7 @@
 		// System.out.println("in "+this.getCqpId()+" look for cached lexicon "+property);
 		// System.out.println("not found");
 		this.subTask("Computing lexicon size...");
-		Log.finest(IndexCoreMessages.LEXICON_RESULT_TYPE + corpus.getName());
+		Log.finest(IndexCoreMessages.LEXICON_RESULT_TYPE + corpus.getID());
 		int lexiconSize;
 		try {
 			lexiconSize = CorpusManager.getCorpusManager().getCqiClient().lexiconSize(property.getQualifiedName());
Index: tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java
===================================================================
--- tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java	(revision 1161)
+++ tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java	(revision 1162)
@@ -1151,16 +1151,6 @@
 			}
 		});
 
-		//		List<String> krnames = corpus.getKnowledgeRepositoryNames();
-		//		if (krnames==null){
-		//			System.out.println("Corpus "+corpus.getName()+" has no KR ");
-		//		}else {
-		//			
-		//			for(String krname : krnames){
-		//				System.out.println("Corpus "+corpus.getName()+" has KR "+krname);
-		//			}
-		//		}
-
 		queryArea.layout();
 
 
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CreationChainesMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CreationChainesMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CreationChainesMacro.groovy	(revision 1162)
@@ -28,7 +28,7 @@
 int nUpdated = 0 // count the number of updated CHAINE
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName()); // analec corpus has the same name has the TXM corpus
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID()); // analec corpus has the same name has the TXM corpus
 Structure structure = analecCorpus.getStructure()
 if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units
 	println "Error: corpus structure does not contains unit with name=$unit_type"
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/ResetAnnotationsMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/ResetAnnotationsMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/ResetAnnotationsMacro.groovy	(revision 1162)
@@ -20,7 +20,7 @@
 if (!ParametersDialog.open(this)) return;
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 def structure = analecCorpus.getStructure()
 
 Class[] classes = [Unite.class, Relation.class, Schema.class]
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 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/RelationsMacro.groovy	(revision 1162)
@@ -35,7 +35,7 @@
 MainCorpus corpus = corpusViewSelection
 AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
 def word = corpus.getWordProperty()
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 
 int n = 1;
 def relations = analecCorpus.getRelations(relation_type)
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/DensiteReferentielleMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/DensiteReferentielleMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/DensiteReferentielleMacro.groovy	(revision 1162)
@@ -29,7 +29,7 @@
 // END OF PARAMETERS
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 
 // check unit parameters
 if (!analecCorpus.getStructure().getUnites().contains(unit_type)) {
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 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/UnitsMacro.groovy	(revision 1162)
@@ -30,7 +30,7 @@
 MainCorpus corpus = corpusViewSelection
 AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
 def word = corpus.getWordProperty()
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 
 int n = 1;
 def units = analecCorpus.getUnites(unit_type)
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/UnitTypesMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/UnitTypesMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/UnitTypesMacro.groovy	(revision 1162)
@@ -23,7 +23,7 @@
 if (!ParametersDialog.open(this)) return;
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 def map = new HashMap()
 def unitesInSchema = []
 def n = 0
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 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CategorieGrammaticaleMacro.groovy	(revision 1162)
@@ -52,7 +52,7 @@
 // END OF PARAMETERS
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
 
 if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) {
 	println "No schema with name=$schema_type"
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CheckAnnotationStructureValuesMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CheckAnnotationStructureValuesMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CheckAnnotationStructureValuesMacro.groovy	(revision 1162)
@@ -28,7 +28,7 @@
 // END OF PARAMETERS
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 def structure = analecCorpus.getStructure()
 
 def unit_types = structure.getTypes(Unite.class);
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 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/ChainesMacro.groovy	(revision 1162)
@@ -56,7 +56,7 @@
 // END OF PARAMETERS
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
 
 // check Schema parameters
 if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) {
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/export/ExportToGlozz1_0_0Macro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/export/ExportToGlozz1_0_0Macro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/export/ExportToGlozz1_0_0Macro.groovy	(revision 1162)
@@ -97,7 +97,7 @@
 	// CORPUS ANALEC (GET THE ANNOTATIONS)
 
 	// note that unit_type has been defined with an option of the dialog at the beginning
-	def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+	def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 
 	// list of properties
 
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/export/ExportToGlozz1_1_0Macro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/export/ExportToGlozz1_1_0Macro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/export/ExportToGlozz1_1_0Macro.groovy	(revision 1162)
@@ -136,7 +136,7 @@
 	// CORPUS ANALEC (GET THE ANNOTATIONS)
 
 	// note that unit_type has been defined with an option of the dialog at the beginning
-	def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+	def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 
 	// list of properties
 
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/export/ExportToGlozzMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/export/ExportToGlozzMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/export/ExportToGlozzMacro.groovy	(revision 1162)
@@ -97,7 +97,7 @@
 	// CORPUS ANALEC (GET THE ANNOTATIONS)
 
 	// note that unit_type has been defined with an option of the dialog at the beginning
-	def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+	def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 
 	// list of properties
 
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 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CompUnitPropertiesMacro.groovy	(revision 1162)
@@ -38,7 +38,7 @@
 MainCorpus corpus = corpusViewSelection
 AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
 def word = corpus.getWordProperty()
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 
 def units = analecCorpus.getUnites(unit_type)
 units.sort() { a, b -> a.getDeb() <=> b.getDeb() ?: a.getFin() <=> b.getFin() }
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/UnitTypesInSchemaMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/UnitTypesInSchemaMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/UnitTypesInSchemaMacro.groovy	(revision 1162)
@@ -23,7 +23,7 @@
 if (!ParametersDialog.open(this)) return;
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 def map = new HashMap()
 def unitesInSchema = []
 def n = 0
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/Fropos2CategorieMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/Fropos2CategorieMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/Fropos2CategorieMacro.groovy	(revision 1162)
@@ -84,7 +84,7 @@
 	println "Error: CQP corpus does not contains the word property with name=$pos_property_name"
 	return
 }
-analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
+analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
 vue = AnalecCorpora.getVue(corpus.getName())
 structure = analecCorpus.getStructure()
 if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units
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 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/StructuresIndexMacro.groovy	(revision 1162)
@@ -260,8 +260,8 @@
 
 selection.each { corpus ->
 
-	corpusName = corpus.getName()
-	mainCorpusName = corpus.getMainCorpus().getName()
+	corpusName = corpus.getID()
+	mainCorpusName = corpus.getMainCorpus().getID()
 	println "Corpus = "+corpusName
 	println "Corpus QualifiedCqpId = "+corpus.getCqpId()
 	println "MainCorpus = "+mainCorpusName
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 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/SchemasProgressionMacro.groovy	(revision 1162)
@@ -174,7 +174,7 @@
 
 
 
-		def queryResult = new FakeQueryResult(corpus.getName(), corpus, query, starts, ends, null)
+		def queryResult = new FakeQueryResult(corpus.getID(), corpus, query, starts, ends, null)
 
 		queries << query
 		queryResults << queryResult
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 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/UnitsListMacro.groovy	(revision 1162)
@@ -126,7 +126,7 @@
 	for (def corpus : allResults.keySet()) {
 		def selectedUnits = allResults[corpus]
 		println "$corpus units: "+selectedUnits.size()
-		println AnalecUtils.getCQL(corpus.getName(), selectedUnits)
+		println AnalecUtils.getCQL(corpus.getID(), selectedUnits)
 	}
 } else if (output_mode == "CONCORDANCE") {
 
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/NombreDeChainesMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/NombreDeChainesMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/NombreDeChainesMacro.groovy	(revision 1162)
@@ -44,7 +44,7 @@
 // END OF PARAMETERS
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
 
 // check Schema parameters
 if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) {
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/DistanceInterMaillonnaireMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/DistanceInterMaillonnaireMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/DistanceInterMaillonnaireMacro.groovy	(revision 1162)
@@ -43,7 +43,7 @@
 if (!ParametersDialog.open(this)) return;
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
 
 // check Schema parameters
 if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) {
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 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/NatureDuPremierMaillonMacro.groovy	(revision 1162)
@@ -48,7 +48,7 @@
 // END OF PARAMETERS
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
 
 if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) {
 	println "No schema with name=$schema_type"
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 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/CategorieGrammaticaleMacro.groovy	(revision 1162)
@@ -52,7 +52,7 @@
 // END OF PARAMETERS
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
 
 if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) {
 	println "No schema with name=$schema_type"
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/LongueurMoyenneMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/LongueurMoyenneMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/LongueurMoyenneMacro.groovy	(revision 1162)
@@ -46,7 +46,7 @@
 // END OF PARAMETERS
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
 
 // check Schema parameters
 if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) {
@@ -153,7 +153,7 @@
 r.addVectorToWorkspace("freq", slens2.values() as int[])
 r.addVectorToWorkspace("flen", flens as int[])
 
-def corpusName = corpus.getName()
+def corpusName = corpus.getID()
 
 def PNGFile = File.createTempFile("txm", ".png", new File(Toolbox.getTxmHomePath(), "results"))
 def PNGFilePath = PNGFile.getAbsolutePath()
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/AllMesuresMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/AllMesuresMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/AllMesuresMacro.groovy	(revision 1162)
@@ -51,7 +51,7 @@
 for (def corpus : corpusViewSelections) { // for each corpus selected in the corpora view
 	if (!(corpus instanceof MainCorpus)) continue; // check if the corpus is a maincorpus
 	def line = [] ; table << line // create and add a new table line
-	line << corpus.getName() // add the corpus name in the first column
+	line << corpus.getID() // add the corpus name in the first column
 	
 	println "*** Computing mesures for $corpus" // each macro return a "result" and a "data"
 
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 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/CoefficientStabiliteMacro.groovy	(revision 1162)
@@ -51,7 +51,7 @@
 // END OF PARAMETERS
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
 
 // check Schema parameters
 if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) {
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/DensiteReferentielleMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/DensiteReferentielleMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/DensiteReferentielleMacro.groovy	(revision 1162)
@@ -29,7 +29,7 @@
 // END OF PARAMETERS
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 
 // check unit parameters
 if (!analecCorpus.getStructure().getUnites().contains(unit_type)) {
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/CQPUtils.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/CQPUtils.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/CQPUtils.groovy	(revision 1162)
@@ -9,7 +9,7 @@
 def getCorpusByName(name) {
 	def cl = CorpusManager.getCorpusManager().getCorpora()
 	def rc = cl.find {
-		it.getName() == name
+		it.getID() == name
 	}
 	
 	if (rc) return rc
@@ -18,7 +18,7 @@
 	rc = cl.find { c ->
 		def scl = c.getSubcorpora()
 		def rrsc = scl.find { sc ->
-			sc.getName() == name
+			sc.getID() == name
 		}
 		rsc = rrsc
 	}
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 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CoefficientStabiliteMacro.groovy	(revision 1162)
@@ -51,7 +51,7 @@
 // END OF PARAMETERS
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
 
 // check Schema parameters
 if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) {
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/PremierMaillonMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/PremierMaillonMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/PremierMaillonMacro.groovy	(revision 1162)
@@ -31,7 +31,7 @@
 if (!ParametersDialog.open(this)) return;
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 Structure structure = analecCorpus.getStructure()
 if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units
 	println "Error: corpus structure does not contains unit with name=$unit_type"
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Fropos2CategorieMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Fropos2CategorieMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Fropos2CategorieMacro.groovy	(revision 1162)
@@ -84,8 +84,8 @@
 	println "Error: CQP corpus does not contains the word property with name=$pos_property_name"
 	return
 }
-analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
-vue = AnalecCorpora.getVue(corpus.getName())
+analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
+vue = AnalecCorpora.getVue(corpus.getID())
 structure = analecCorpus.getStructure()
 if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units
 	println "Error: corpus structure does not contains unit with name=$unit_type"
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Frpos2CategorieDemocratMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Frpos2CategorieDemocratMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Frpos2CategorieDemocratMacro.groovy	(revision 1162)
@@ -179,8 +179,8 @@
 	println "Error: CQP corpus does not contains the word property with name=$pos_property_name"
 	return
 }
-analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
-vue = AnalecCorpora.getVue(corpus.getName())
+analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
+vue = AnalecCorpora.getVue(corpus.getID())
 structure = analecCorpus.getStructure()
 if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units
 	println "Error: corpus structure does not contains unit with name=$unit_type"
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/PremierMaillonMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/PremierMaillonMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/PremierMaillonMacro.groovy	(revision 1162)
@@ -31,7 +31,7 @@
 if (!ParametersDialog.open(this)) return;
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 Structure structure = analecCorpus.getStructure()
 if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units
 	println "Error: corpus structure does not contains unit with name=$unit_type"
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Si2SingletonMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Si2SingletonMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Si2SingletonMacro.groovy	(revision 1162)
@@ -35,8 +35,8 @@
 corpus = corpusViewSelection
 CQI = CQPSearchEngine.getCqiClient()
 word = corpus.getWordProperty()
-analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
-vue = AnalecCorpora.getVue(corpus.getName())
+analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
+vue = AnalecCorpora.getVue(corpus.getID())
 structure = analecCorpus.getStructure()
 if (!structure.getUnites().contains(unitType)) { // check if the structure contains the unitType units
 	println "Error: corpus structure does not contains unit with name=$unitType"
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/ConcordanceToUnitMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/ConcordanceToUnitMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/ConcordanceToUnitMacro.groovy	(revision 1162)
@@ -47,7 +47,7 @@
 
 // check the analec corpus is ready
 MainCorpus corpus = concordance.getCorpus().getMainCorpus();
-String name = corpus.getName()
+String name = corpus.getID()
 if (!AnalecCorpora.isAnnotationStructureReady(name)) {
 	println "Annotation structure is not ready."
 	return
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 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/AjoutDefinitudeMacro.groovy	(revision 1162)
@@ -38,7 +38,7 @@
 MainCorpus corpus = corpusViewSelection
 AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
 def word = corpus.getWordProperty()
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 Structure structure = analecCorpus.getStructure()
 if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units
 	println "Error: corpus structure does not contains unit with name=$unit_type"
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Frpos2CattexMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Frpos2CattexMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Frpos2CattexMacro.groovy	(revision 1162)
@@ -185,8 +185,8 @@
 	println "Error: CQP corpus does not contains the word property with name=$pos_property_name"
 	return
 }
-analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
-vue = AnalecCorpora.getVue(corpus.getName())
+analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
+vue = AnalecCorpora.getVue(corpus.getID())
 structure = analecCorpus.getStructure()
 if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units
 	println "Error: corpus structure does not contains unit with name=$unit_type"
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/CreationRelationsMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/CreationRelationsMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/CreationRelationsMacro.groovy	(revision 1162)
@@ -33,7 +33,7 @@
 int nCreated = 0 // count the number of created RELATION
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName()); // analec corpus has the same name has the TXM corpus
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID()); // analec corpus has the same name has the TXM corpus
 Structure structure = analecCorpus.getStructure()
 if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units
 	println "Error: corpus structure does not contains unit with name=$unit_type"
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/PROPERanaphoriquesMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/PROPERanaphoriquesMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/PROPERanaphoriquesMacro.groovy	(revision 1162)
@@ -48,8 +48,8 @@
 	println "Error: CQP corpus does not contains the word property with name=$pos_property_name"
 	return
 }
-analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
-vue = AnalecCorpora.getVue(corpus.getName())
+analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
+vue = AnalecCorpora.getVue(corpus.getID())
 structure = analecCorpus.getStructure()
 if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units
 	println "Error: corpus structure does not contains unit with name=$unit_type"
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Frpos2CategorieMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Frpos2CategorieMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Frpos2CategorieMacro.groovy	(revision 1162)
@@ -179,8 +179,8 @@
 	println "Error: CQP corpus does not contains the word property with name=$pos_property_name"
 	return
 }
-analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
-vue = AnalecCorpora.getVue(corpus.getName())
+analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
+vue = AnalecCorpora.getVue(corpus.getID())
 structure = analecCorpus.getStructure()
 if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units
 	println "Error: corpus structure does not contains unit with name=$unit_type"
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/CreationChainesMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/CreationChainesMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/CreationChainesMacro.groovy	(revision 1162)
@@ -30,7 +30,7 @@
 int nUpdated = 0 // count the number of updated CHAINE
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName()); // analec corpus has the same name has the TXM corpus
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID()); // analec corpus has the same name has the TXM corpus
 Structure structure = analecCorpus.getStructure()
 if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units
 	println "Error: corpus structure does not contains unit with name=$unit_type"
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/ResetAnnotationsMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/ResetAnnotationsMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/ResetAnnotationsMacro.groovy	(revision 1162)
@@ -20,7 +20,7 @@
 if (!ParametersDialog.open(this)) return;
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 def structure = analecCorpus.getStructure()
 
 Class[] classes = [Unite.class, Relation.class, Schema.class]
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Fropos2CattexMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Fropos2CattexMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Fropos2CattexMacro.groovy	(revision 1162)
@@ -172,8 +172,8 @@
 	println "Error: CQP corpus does not contains the word property with name=$pos_property_name"
 	return
 }
-analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
-vue = AnalecCorpora.getVue(corpus.getName())
+analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
+vue = AnalecCorpora.getVue(corpus.getID())
 structure = analecCorpus.getStructure()
 if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units
 	println "Error: corpus structure does not contains unit with name=$unit_type"
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/AccessibiliteMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/AccessibiliteMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/AccessibiliteMacro.groovy	(revision 1162)
@@ -45,8 +45,8 @@
 corpus = corpusViewSelection
 CQI = CQPSearchEngine.getCqiClient()
 
-analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
-vue = AnalecCorpora.getVue(corpus.getName())
+analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
+vue = AnalecCorpora.getVue(corpus.getID())
 structure = analecCorpus.getStructure()
 if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units
 	println "Error: corpus structure does not contains unit with name=$unit_type"
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/RetoucheComplementDuNomMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/RetoucheComplementDuNomMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/RetoucheComplementDuNomMacro.groovy	(revision 1162)
@@ -41,8 +41,8 @@
 CQI = CQPSearchEngine.getCqiClient()
 word = corpus.getWordProperty()
 
-analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
-vue = AnalecCorpora.getVue(corpus.getName())
+analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
+vue = AnalecCorpora.getVue(corpus.getID())
 structure = analecCorpus.getStructure()
 if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units
 	println "Error: corpus structure does not contains unit with name=$unit_type"
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/CheckAnnotationStructureValuesMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/CheckAnnotationStructureValuesMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/CheckAnnotationStructureValuesMacro.groovy	(revision 1162)
@@ -28,7 +28,7 @@
 // END OF PARAMETERS
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 def structure = analecCorpus.getStructure()
 
 def unit_types = structure.getTypes(Unite.class);
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/LongueurDesMentionsMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/LongueurDesMentionsMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/LongueurDesMentionsMacro.groovy	(revision 1162)
@@ -67,8 +67,8 @@
 	println "Error: CQP corpus does not contains the word property with name=$pos_property_name"
 	return
 }
-analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
-vue = AnalecCorpora.getVue(corpus.getName())
+analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
+vue = AnalecCorpora.getVue(corpus.getID())
 structure = analecCorpus.getStructure()
 if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units
 	println "Error: corpus structure does not contains unit with name=$unit_type"
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/AnalecUtils.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/AnalecUtils.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/AnalecUtils.groovy	(revision 1162)
@@ -122,7 +122,7 @@
 
 	def matches = null
 	if (limit_cql != null && !limit_cql.getQueryString().equals("\"\"")) {
-		Subcorpus limitssubcorpus = corpus.createSubcorpus(limit_cql, corpus.getName().toUpperCase())
+		Subcorpus limitssubcorpus = corpus.createSubcorpus(limit_cql, corpus.getID().toUpperCase())
 		matches = limitssubcorpus.getMatches();
 		limitssubcorpus.delete();
 	} else {
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 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/AjoutDefinitudeMacro.groovy	(revision 1162)
@@ -38,7 +38,7 @@
 MainCorpus corpus = corpusViewSelection
 AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
 def word = corpus.getWordProperty()
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 Structure structure = analecCorpus.getStructure()
 if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units
 	println "Error: corpus structure does not contains unit with name=$unit_type"
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CreationRelationsMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CreationRelationsMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CreationRelationsMacro.groovy	(revision 1162)
@@ -33,7 +33,7 @@
 int nCreated = 0 // count the number of created RELATION
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName()); // analec corpus has the same name has the TXM corpus
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID()); // analec corpus has the same name has the TXM corpus
 Structure structure = analecCorpus.getStructure()
 if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units
 	println "Error: corpus structure does not contains unit with name=$unit_type"
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/SchemaTypesMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/SchemaTypesMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/SchemaTypesMacro.groovy	(revision 1162)
@@ -17,7 +17,7 @@
 }
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 
 def schemas = analecCorpus.getTousSchemas()
 def set = new HashMap()
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/UnitTypesMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/UnitTypesMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/UnitTypesMacro.groovy	(revision 1162)
@@ -23,7 +23,7 @@
 if (!ParametersDialog.open(this)) return;
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 def map = new HashMap()
 def unitesInSchema = []
 def n = 0
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/SchemaTypesMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/SchemaTypesMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/SchemaTypesMacro.groovy	(revision 1162)
@@ -17,7 +17,7 @@
 }
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 
 def schemas = analecCorpus.getTousSchemas()
 def set = new HashMap()
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 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/CompUnitPropertiesMacro.groovy	(revision 1162)
@@ -41,7 +41,7 @@
 MainCorpus corpus = corpusViewSelection
 AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
 def word = corpus.getWordProperty()
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 
 def units = analecCorpus.getUnites(unit_type)
 units.sort() { a, b -> a.getDeb() <=> b.getDeb() ?: a.getFin() <=> b.getFin() }
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 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/RelationsListMacro.groovy	(revision 1162)
@@ -35,7 +35,7 @@
 MainCorpus corpus = corpusViewSelection
 AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
 def word = corpus.getWordProperty()
-visuAnalec.donnees.Corpus analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+visuAnalec.donnees.Corpus analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 
 int n = 1;
 def relations = null
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/UnitTypesInSchemaMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/UnitTypesInSchemaMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/UnitTypesInSchemaMacro.groovy	(revision 1162)
@@ -23,7 +23,7 @@
 if (!ParametersDialog.open(this)) return;
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 def map = new HashMap()
 def unitesInSchema = []
 def n = 0
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/UnitTypesNotInSchemaMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/UnitTypesNotInSchemaMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/UnitTypesNotInSchemaMacro.groovy	(revision 1162)
@@ -22,7 +22,7 @@
 if (!ParametersDialog.open(this)) return;
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 
 def unitesInSchema = new HashSet()
 for (def schema : analecCorpus.getSchemas(schema_type)) {
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 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/UnitsProgressionMacro.groovy	(revision 1162)
@@ -93,7 +93,6 @@
 	if (limit_cql != null && !limit_cql.getQueryString().equals("\"\"")) query += limit_cql
 	if (schema_ursql != null && schema_ursql.length() > 0) { if (query.length() > 0) query += " & "; query += ""+schema_ursql+ " >"}
 	if (unit_ursql != null && unit_ursql.length() > 0) query += " "+unit_ursql
-	if (query == "") query = corpus.getName()
 	query = new CQLQuery(query)
 	int[] starts = new int[selectedUnits.size()];
 	int[] ends = new int[selectedUnits.size()];
@@ -105,7 +104,7 @@
 		unitsinformations << AnalecUtils.toString(CQI, word, unite);
 		n++
 	}
-	def queryResult = new FakeQueryResult(corpus.getName(), corpus, query, starts, ends, null)
+	def queryResult = new FakeQueryResult(corpus.getID(), corpus, query, starts, ends, null)
 	queries << query
 	queryResults << queryResult
 	informations << unitsinformations
@@ -123,7 +122,7 @@
 		
 		for (def v : propvalues.keySet().sort()) {
 			selectedUnits = propvalues[v]
-			query = corpus.getName()+" "+limit_cql
+			query = corpus.getID()+" "+limit_cql
 			query = new CQLQuery(v)
 			starts = new int[selectedUnits.size()];
 			ends = new int[selectedUnits.size()];
@@ -135,7 +134,7 @@
 				unitsinformations << AnalecUtils.toString(CQI, word, unite);
 				n++
 			}
-			queryResult = new FakeQueryResult(corpus.getName(), corpus, query, starts, ends, null)
+			queryResult = new FakeQueryResult(corpus.getID(), corpus, query, starts, ends, null)
 			queries << query
 			queryResults << queryResult
 			informations << unitsinformations
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 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/SchemasListMacro.groovy	(revision 1162)
@@ -56,7 +56,7 @@
 // END OF PARAMETERS
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
 
 // check Schema parameters
 if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) {
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/NombreDeChainesMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/NombreDeChainesMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/NombreDeChainesMacro.groovy	(revision 1162)
@@ -44,7 +44,7 @@
 // END OF PARAMETERS
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
 
 // check Schema parameters
 if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) {
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/DistanceInterMaillonnaireMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/DistanceInterMaillonnaireMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/DistanceInterMaillonnaireMacro.groovy	(revision 1162)
@@ -43,7 +43,7 @@
 if (!ParametersDialog.open(this)) return;
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
 
 // check Schema parameters
 if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) {
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 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/NatureDuPremierMaillonMacro.groovy	(revision 1162)
@@ -48,7 +48,7 @@
 // END OF PARAMETERS
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
 
 if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) {
 	println "No schema with name=$schema_type"
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/LongueurMoyenneMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/LongueurMoyenneMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/LongueurMoyenneMacro.groovy	(revision 1162)
@@ -48,7 +48,7 @@
 // END OF PARAMETERS
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
 
 // check Schema parameters
 if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) {
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/UnitTypesNotInSchemaMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/UnitTypesNotInSchemaMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/UnitTypesNotInSchemaMacro.groovy	(revision 1162)
@@ -22,7 +22,7 @@
 if (!ParametersDialog.open(this)) return;
 
 MainCorpus corpus = corpusViewSelection
-def analecCorpus = AnalecCorpora.getCorpus(corpus.getName());
+def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
 
 def unitesInSchema = new HashSet()
 for (def schema : analecCorpus.getSchemas(schema_type)) {
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/analec/Frpos2CategorieMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/analec/Frpos2CategorieMacro.groovy	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/analec/Frpos2CategorieMacro.groovy	(revision 1162)
@@ -179,7 +179,7 @@
 	println "Error: CQP corpus does not contains the word property with name=$pos_property_name"
 	return
 }
-analecCorpus = AnalecCorpora.getCorpus(corpus.getName())
+analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
 vue = AnalecCorpora.getVue(corpus.getName())
 structure = analecCorpus.getStructure()
 if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units
Index: tmp/org.txm.analec.rcp/src/org/txm/analec/commands/SaveCorpus.java
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/analec/commands/SaveCorpus.java	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/analec/commands/SaveCorpus.java	(revision 1162)
@@ -45,7 +45,7 @@
 
 	public static boolean save(final MainCorpus mainCorpus, ExecutionEvent event) {
 		File binaryCorpusDirectory = mainCorpus.getProjectDirectory();
-		File fichierCorpus = new File(binaryCorpusDirectory, "/analec/"+mainCorpus.getName()+".ec"); //$NON-NLS-1$ //$NON-NLS-2$
+		File fichierCorpus = new File(binaryCorpusDirectory, "/analec/"+mainCorpus.getID()+".ec"); //$NON-NLS-1$ //$NON-NLS-2$
 		Corpus corpus = AnalecCorpora.getCorpus(mainCorpus);
 		System.out.println(Messages.SaveCorpus_3+corpus+Messages.SaveCorpus_1+fichierCorpus);
 		if (!AnalecCorpora.saveCorpus(mainCorpus)) {
Index: tmp/org.txm.analec.rcp/src/org/txm/analec/commands/ExportGlozzCorpus.java
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/analec/commands/ExportGlozzCorpus.java	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/analec/commands/ExportGlozzCorpus.java	(revision 1162)
@@ -73,7 +73,7 @@
 	
 	public static void export(File exportDirectory, MainCorpus mainCorpus, String unit_type) throws NumberFormatException, IOException, CqiServerError, CqiClientException {
 		ExportToGlozzMacro exporter = new ExportToGlozzMacro();
-		File exportFile = new File(exportDirectory, mainCorpus.getName());
+		File exportFile = new File(exportDirectory, mainCorpus.getID());
 		exporter.doExport(mainCorpus, unit_type, exportFile.getAbsolutePath());
 		return;
 	}
Index: tmp/org.txm.analec.rcp/src/org/txm/analec/commands/SaveVue.java
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/analec/commands/SaveVue.java	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/analec/commands/SaveVue.java	(revision 1162)
@@ -36,7 +36,7 @@
 		corpus = AnalecCorpora.getCorpus(mainCorpus);
 
 		File binaryCorpusDirectory = mainCorpus.getProjectDirectory();
-		File fichierVue = new File(binaryCorpusDirectory, "/analec/"+mainCorpus.getName()+".ecv"); //$NON-NLS-1$ //$NON-NLS-2$
+		File fichierVue = new File(binaryCorpusDirectory, "/analec/"+mainCorpus.getID()+".ecv"); //$NON-NLS-1$ //$NON-NLS-2$
 		System.out.println(Messages.SaveVue_3+corpus+Messages.SaveVue_4+fichierVue);
 
 		if (!FichiersJava.enregistrerCorpus(corpus, fichierVue)) {
Index: tmp/org.txm.analec.rcp/src/org/txm/analec/commands/ExportTEICorpus.java
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/analec/commands/ExportTEICorpus.java	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/analec/commands/ExportTEICorpus.java	(revision 1162)
@@ -81,7 +81,7 @@
 	}
 	
 	public static boolean export(boolean standoffAnnotations, File outputDirectory, boolean createArchive, IProgressMonitor monitor, MainCorpus mainCorpus, Corpus analecCorpus, Vue vue) throws Exception {
-		String name = mainCorpus.getName();
+		String name = mainCorpus.getID();
 		File finalOutputDirectory = new File(outputDirectory, name);
 		int n = 2;
 		while (finalOutputDirectory.exists()) {
Index: tmp/org.txm.analec.rcp/src/org/txm/analec/commands/SaveStructure.java
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/analec/commands/SaveStructure.java	(revision 1161)
+++ tmp/org.txm.analec.rcp/src/org/txm/analec/commands/SaveStructure.java	(revision 1162)
@@ -39,7 +39,7 @@
 		Corpus corpus = AnalecCorpora.getCorpus(mainCorpus);
 
 		File binaryCorpusDirectory = mainCorpus.getProjectDirectory();
-		File fichierStructure = new File(binaryCorpusDirectory, "/analec/"+mainCorpus.getName()+".ecs"); //$NON-NLS-1$ //$NON-NLS-2$
+		File fichierStructure = new File(binaryCorpusDirectory, "/analec/"+mainCorpus.getID()+".ecs"); //$NON-NLS-1$ //$NON-NLS-2$
 		System.out.println(Messages.SaveStructure_3+corpus+Messages.SaveStructure_4+fichierStructure);
 
 		if (!FichiersJava.enregistrerStructure(corpus, fichierStructure)) {
Index: tmp/org.txm.para.rcp/src/org/txm/para/rcp/editors/ParaBrowserEditor.java
===================================================================
--- tmp/org.txm.para.rcp/src/org/txm/para/rcp/editors/ParaBrowserEditor.java	(revision 1161)
+++ tmp/org.txm.para.rcp/src/org/txm/para/rcp/editors/ParaBrowserEditor.java	(revision 1162)
@@ -704,7 +704,7 @@
 				// if (i==0){
 				MainCorpus corpus = it.next();
 				System.out.println("CORPUS ################### " //$NON-NLS-1$
-						+ corpus.getName());
+						+ corpus.getID());
 				newValue = paraBrowser.getNextOrPrevious(corpus, selectedStructuralUnit,
 						selectedStructuralUnitParaId, selectedValue, findNext);
 				// }
Index: tmp/org.txm.para.rcp/src/org/txm/para/rcp/editors/CorpusSelection.java
===================================================================
--- tmp/org.txm.para.rcp/src/org/txm/para/rcp/editors/CorpusSelection.java	(revision 1161)
+++ tmp/org.txm.para.rcp/src/org/txm/para/rcp/editors/CorpusSelection.java	(revision 1162)
@@ -296,13 +296,11 @@
 							+ selectedCorpus.size() + "]"); //$NON-NLS-1$
 			availableCorpusView.removeAll();
 			for (MainCorpus corpus : availableCorpus) {
-				if (!corpus.getName().equals("id")) //$NON-NLS-1$
-					availableCorpusView.add(corpus.getName());
+					availableCorpusView.add(corpus.getID());
 			}
 			selectedCorpusView.removeAll();
 			for (MainCorpus corpus : selectedCorpus) {
-				if (!corpus.getName().equals("id")) //$NON-NLS-1$
-					selectedCorpusView.add(corpus.getName());
+					selectedCorpusView.add(corpus.getID());
 			}
 
 			availableCorpusView.getParent().layout();
Index: tmp/org.txm.core/src/java/org/txm/objects/Project.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Project.java	(revision 1161)
+++ tmp/org.txm.core/src/java/org/txm/objects/Project.java	(revision 1162)
@@ -1028,9 +1028,9 @@
 		return this.preferenceScope;
 	}
 
-	public CorpusBuild getCorpusBuild(String name) {
+	public CorpusBuild getCorpusBuild(String id) {
 		for (CorpusBuild build : getCorpusBuilds()) {
-			if (name.equals(build.getName())) {
+			if (id.equals(build.getID())) {
 				return build;
 			}
 		}
Index: tmp/org.txm.dictionary.rcp/src/org/txm/macro/frolex/CreateFrolexMacro.groovy
===================================================================
--- tmp/org.txm.dictionary.rcp/src/org/txm/macro/frolex/CreateFrolexMacro.groovy	(revision 1161)
+++ tmp/org.txm.dictionary.rcp/src/org/txm/macro/frolex/CreateFrolexMacro.groovy	(revision 1162)
@@ -64,7 +64,7 @@
 
 			bfmCorpus = cm.getCorpus("BFM2016LEX")
 			for (MainCorpus corpus : cm.getCorpora()) {
-				if (corpus.getName().equals("BFM2016LEX")) bfmCorpus = cm.getCorpus("BFM2016LEX")
+				if (corpus.getID().equals("BFM2016LEX")) bfmCorpus = cm.getCorpus("BFM2016LEX")
 			}
 		} catch (Exception e) {
 			System.out.println("Necessary corpus are missing: "+e)
Index: tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/GSERunner.java
===================================================================
--- tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/GSERunner.java	(revision 1161)
+++ tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/GSERunner.java	(revision 1162)
@@ -55,7 +55,7 @@
 	public static GSERunner buildDefaultGSE() {
 		File rootDir = new File(Toolbox.getTxmHomePath(), "scripts/groovy/");
 		// check if script root dir was changed
-		if (defaultScriptRootDir.equals(rootDir) && defaultGSE != null) {
+		if (defaultScriptRootDir != null && defaultScriptRootDir.equals(rootDir) && defaultGSE != null) {
 //			try {
 //				defaultGSE.getGroovyClassLoader().addURL(rootDir.toURI().toURL());
 //			} catch (MalformedURLException e) {
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/prototypes/advancedPartition.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/prototypes/advancedPartition.groovy	(revision 1161)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/prototypes/advancedPartition.groovy	(revision 1162)
@@ -244,10 +244,10 @@
 		// TODO : Log
 		println ''
 		if(index == 0)	{
-			println 'Pocessing Structural Unit Property "' + sup.getFullName() + '" on mother corpus "' + corpus.getName() + '"';
+			println 'Processing Structural Unit Property "' + sup.getFullName() + '" on mother corpus "' + corpus.getID() + '"';
 		}
 		else	{
-			println 'Pocessing Structural Unit Property "' + sup.getFullName() + '" on subcorpus part "' + tmpPartName + '"';
+			println 'Processing Structural Unit Property "' + sup.getFullName() + '" on subcorpus part "' + tmpPartName + '"';
 		}
 		println ''
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/prototypes/cqp/SaveSubCorpusMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/prototypes/cqp/SaveSubCorpusMacro.groovy	(revision 1161)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/prototypes/cqp/SaveSubCorpusMacro.groovy	(revision 1162)
@@ -44,7 +44,7 @@
 outputStreamBin.writeInt(36193928+1);
 outputStreamBin.writeBytes(regFile.getAbsolutePath()+"/");
 outputStreamBin.write(0)
-outputStreamBin.writeBytes(maincorpus.getName());
+outputStreamBin.writeBytes(maincorpus.getID());
 //outputStreamBin.write(0)
 l2 = outputStreamBin.size()-3
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/prototypes/edition/XTZEditionBuilderMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/prototypes/edition/XTZEditionBuilderMacro.groovy	(revision 1161)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/prototypes/edition/XTZEditionBuilderMacro.groovy	(revision 1162)
@@ -40,10 +40,10 @@
 // END OF PARAMETERS
 
 File binDirectory = corpus.getProject().getProjectDirectory()
-File txmDirectory = new File(binDirectory, "txm/"+corpus.getName().toUpperCase())
+File txmDirectory = new File(binDirectory, "txm/"+corpus.getID().toUpperCase())
 
 File HTMLDirectory = new File(binDirectory, "HTML")
-File newEditionDirectory = new File(HTMLDirectory, corpus.getName().toUpperCase()+"/"+editionName)
+File newEditionDirectory = new File(HTMLDirectory, corpus.getID().toUpperCase()+"/"+editionName)
 
 BaseParameters parameters = corpus.getProject().params
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/edition/FacsEditionBuilderMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/edition/FacsEditionBuilderMacro.groovy	(revision 1161)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/edition/FacsEditionBuilderMacro.groovy	(revision 1162)
@@ -59,10 +59,10 @@
 
 if (args.size() == 0) { // the "corpus" variable exists
 	binDirectory = corpus.getProject().getProjectDirectory()
-	txmDirectory = new File(binDirectory, "txm/"+corpus.getName().toUpperCase())
+	txmDirectory = new File(binDirectory, "txm/"+corpus.getID().toUpperCase())
 	tokenizedDirectory = new File(binDirectory, "tokenized")
 	HTMLDirectory = new File(binDirectory, "HTML")
-	newEditionDirectory = new File(HTMLDirectory, corpus.getName().toUpperCase()+"/"+editionName)
+	newEditionDirectory = new File(HTMLDirectory, corpus.getID().toUpperCase()+"/"+editionName)
 	params = corpus.getProject().params
 } else { // the "corpus" variable does not exist, get informations from the "args" map
 	binDirectory = args["binDirectory"]
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/edition/EditionUpdaterMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/edition/EditionUpdaterMacro.groovy	(revision 1161)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/edition/EditionUpdaterMacro.groovy	(revision 1162)
@@ -64,7 +64,7 @@
 
 if (args.size() == 0) { // corpus informations
 	defaultEditionName = corpus.getDefaultEdition()
-	corpusName = corpus.getName()
+	corpusName = corpus.getID()
 	binDirectory = corpus.getProject().getProjectDirectory()
 	txmDirectory = new File(binDirectory, "txm/"+corpusName.toUpperCase())
 	params = corpus.getProject().params
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/commands/CrossedPartitionBuilderMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/commands/CrossedPartitionBuilderMacro.groovy	(revision 1161)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/commands/CrossedPartitionBuilderMacro.groovy	(revision 1162)
@@ -243,7 +243,7 @@
 
 		if (DEBUG) {
 			if (index == 0)	{
-				println 'Pocessing Structural Unit Property "' + sup.getFullName() + '" on mother corpus "' + corpus.getName() + '"';
+				println 'Pocessing Structural Unit Property "' + sup.getFullName() + '" on mother corpus "' + corpus.getID() + '"';
 			} else {
 				println 'Pocessing Structural Unit Property "' + sup.getFullName() + '" on subcorpus part "' + tmpPartName + '"';
 			}
Index: tmp/org.txm.oriflamms.rcp/groovy/org/txm/macro/oriflamms/analyse/AllographsMacro.groovy
===================================================================
--- tmp/org.txm.oriflamms.rcp/groovy/org/txm/macro/oriflamms/analyse/AllographsMacro.groovy	(revision 1161)
+++ tmp/org.txm.oriflamms.rcp/groovy/org/txm/macro/oriflamms/analyse/AllographsMacro.groovy	(revision 1162)
@@ -23,7 +23,7 @@
 }
 
 Corpus corpus = corpusViewSelection;
-if (!corpus.getName().endsWith("C")) {
+if (!corpus.getID().endsWith("C")) {
 	println "The selected Corpus is not a character corpus."
 	return;
 }
Index: tmp/org.txm.oriflamms.rcp/src/org/txm/oriflamms/functions/UpdateCorpusImagePaths.java
===================================================================
--- tmp/org.txm.oriflamms.rcp/src/org/txm/oriflamms/functions/UpdateCorpusImagePaths.java	(revision 1161)
+++ tmp/org.txm.oriflamms.rcp/src/org/txm/oriflamms/functions/UpdateCorpusImagePaths.java	(revision 1162)
@@ -21,7 +21,7 @@
 			System.out.println("Error: no html directory: "+htmlDir);
 			return false;
 		}
-		File corpushtmlDir = new File(htmlDir, corpus.getName());
+		File corpushtmlDir = new File(htmlDir, corpus.getID());
 		if (!corpushtmlDir.exists()) {
 			System.out.println("Error: no html corpus directory: "+corpushtmlDir);
 			return false;
Index: tmp/org.txm.properties.core/src/org/txm/properties/core/functions/Properties.java
===================================================================
--- tmp/org.txm.properties.core/src/org/txm/properties/core/functions/Properties.java	(revision 1161)
+++ tmp/org.txm.properties.core/src/org/txm/properties/core/functions/Properties.java	(revision 1162)
@@ -289,7 +289,7 @@
 				"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>" + //$NON-NLS-1$
 				"</head>" + //$NON-NLS-1$
 				"<body>\n"); //$NON-NLS-1$
-		buff.append("<h2 style'font-family:\"Arial\";'>"+PropertiesCoreMessages.Properties_3 + this.corpus.getName() + "</h2>\n"); //$NON-NLS-2$ //$NON-NLS-1$
+		buff.append("<h2 style'font-family:\"Arial\";'>"+PropertiesCoreMessages.Properties_3 + this.corpus.getName() +"(id="+this.corpus.getID()+")</h2>\n"); //$NON-NLS-2$ //$NON-NLS-1$
 		
 		if (corpus.getDescription() != null && corpus.getDescription().length() > 0) {
 			buff.append("<p>"+corpus.getDescription()+"</p>"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -621,7 +621,7 @@
 		String txmhome = Toolbox.getTxmHomePath();
 		String filename = corpus.getMainCorpus() + "-" + corpus.getName(); //$NON-NLS-1$
 		if (corpus instanceof MainCorpus) {
-			filename = corpus.getName(); //$NON-NLS-1$
+			filename = corpus.getID(); //$NON-NLS-1$
 		}
 		
 		filename = AsciiUtils.buildId(filename);
