Index: tmp/org.txm.information.core/.project
===================================================================
--- tmp/org.txm.information.core/.project	(revision 0)
+++ tmp/org.txm.information.core/.project	(revision 700)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.txm.information.core</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Property changes on: tmp/org.txm.information.core/.project
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.information.core/src/org/txm/information/core/messages/messages.properties
===================================================================
--- tmp/org.txm.information.core/src/org/txm/information/core/messages/messages.properties	(revision 0)
+++ tmp/org.txm.information.core/src/org/txm/information/core/messages/messages.properties	(revision 700)
@@ -0,0 +1,20 @@
+
+Diagnostic_0  = * Structural Units properties\n
+Diagnostic_1  = ** Failed to access corpus 
+Diagnostic_11 = \ structures
+Diagnostic_14 = Lexical Units properties (max {0} values)
+Diagnostic_16 = Number of structural units 
+Diagnostic_2  = ** Error
+Diagnostic_22 = Structural Units properties (max {0} values)
+Diagnostic_26 = No property
+Diagnostic_3  = Description of 
+Diagnostic_4  = \ properties
+Diagnostic_40 = * General Statistics\n
+Diagnostic_41 = - T 
+Diagnostic_43 = - Word properties 
+Diagnostic_49 = - S 
+Diagnostic_5  = General Statistics
+Diagnostic_6  = ** Failed to access corpus 
+Diagnostic_7  = Number of words 
+Diagnostic_8  = \ lexicon
+Diagnostic_9  = Number of word properties 

Property changes on: tmp/org.txm.information.core/src/org/txm/information/core/messages/messages.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.information.core/src/org/txm/information/core/messages/InformationCoreMessages.java
===================================================================
--- tmp/org.txm.information.core/src/org/txm/information/core/messages/InformationCoreMessages.java	(revision 0)
+++ tmp/org.txm.information.core/src/org/txm/information/core/messages/InformationCoreMessages.java	(revision 700)
@@ -0,0 +1,49 @@
+package org.txm.information.core.messages;
+
+import org.eclipse.osgi.util.NLS;
+import org.txm.utils.messages.Utf8NLS;
+
+
+/**
+ * Information core messages.
+ * 
+ * @author mdecorde
+ * @author sjacquot
+ *
+ */
+public class InformationCoreMessages extends NLS {
+
+	private static final String BUNDLE_NAME = "org.txm.information.core.messages.messages"; //$NON-NLS-1$
+
+	
+	public static String Diagnostic_0;
+	public static String Diagnostic_1;
+	public static String Diagnostic_11;
+	public static String Diagnostic_14;
+	public static String Diagnostic_16;
+	public static String Diagnostic_2;
+	public static String Diagnostic_22;
+	public static String Diagnostic_26;
+	public static String Diagnostic_3;
+	public static String Diagnostic_4;
+	public static String Diagnostic_40;
+	public static String Diagnostic_41;
+	public static String Diagnostic_43;
+	public static String Diagnostic_49;
+	public static String Diagnostic_5;
+	public static String Diagnostic_6;
+	public static String Diagnostic_7;
+	public static String Diagnostic_8;
+	public static String Diagnostic_9;
+
+	
+	
+	static {
+		// initialize resource bundle
+		Utf8NLS.initializeMessages(BUNDLE_NAME, InformationCoreMessages.class);
+	}
+
+	private InformationCoreMessages() {
+	}
+	
+}

Property changes on: tmp/org.txm.information.core/src/org/txm/information/core/messages/InformationCoreMessages.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.information.core/src/org/txm/information/core/messages/messages_ru.properties
===================================================================

Property changes on: tmp/org.txm.information.core/src/org/txm/information/core/messages/messages_ru.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.information.core/src/org/txm/information/core/messages/messages_fr.properties
===================================================================
--- tmp/org.txm.information.core/src/org/txm/information/core/messages/messages_fr.properties	(revision 0)
+++ tmp/org.txm.information.core/src/org/txm/information/core/messages/messages_fr.properties	(revision 700)
@@ -0,0 +1,20 @@
+
+Diagnostic_0  = <h3>Propriétés des structures\n
+Diagnostic_1  = ** Echec d'accès au corpus
+Diagnostic_11 = \ structures
+Diagnostic_14 = Propriétés des unités lexicales (max {0} valeurs)
+Diagnostic_16 = Nombre d'unités de structure 
+Diagnostic_2  = ** Erreur
+Diagnostic_22 = Propriétés des structures (max {0} valeurs)
+Diagnostic_26 = Pas de propriété
+Diagnostic_3  = Description du corpus 
+Diagnostic_4  = \ propriétés
+Diagnostic_40 = * Statistiques Générales\n
+Diagnostic_41 = - T
+Diagnostic_43 = - Propriétés de mot 
+Diagnostic_49 = - S
+Diagnostic_5  = Statistiques Générales
+Diagnostic_6  = ** Echec d'accès au corpus
+Diagnostic_7  = Nombre de mots 
+Diagnostic_8  = \ lexique
+Diagnostic_9  = Nombre de propriétés de mot 

Property changes on: tmp/org.txm.information.core/src/org/txm/information/core/messages/messages_fr.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.information.core/src/org/txm/information/core/functions/Information.java
===================================================================
--- tmp/org.txm.information.core/src/org/txm/information/core/functions/Information.java	(revision 0)
+++ tmp/org.txm.information.core/src/org/txm/information/core/functions/Information.java	(revision 700)
@@ -0,0 +1,682 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
+// Lyon 2, University of Franche-Comté, University of Nice
+// Sophia Antipolis, University of Paris 3.
+// 
+// The TXM platform is free software: you can redistribute it
+// and/or modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation,
+// either version 2 of the License, or (at your option) any
+// later version.
+// 
+// The TXM platform is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied
+// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+// PURPOSE. See the GNU General Public License for more
+// details.
+// 
+// You should have received a copy of the GNU General
+// Public License along with the TXM platform. If not, see
+// http://www.gnu.org/licenses.
+// 
+// 
+// 
+// $LastChangedDate: 2016-09-19 10:31:00 +0200 (Mon, 19 Sep 2016) $
+// $LastChangedRevision: 3298 $
+// $LastChangedBy: mdecorde $ 
+//
+package org.txm.information.core.functions;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.UnsupportedEncodingException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Locale;
+
+import org.eclipse.osgi.util.NLS;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.core.preferences.TXMPreferences;
+import org.txm.core.results.Parameter;
+import org.txm.core.results.TXMParameters;
+import org.txm.core.results.TXMResult;
+import org.txm.information.core.messages.InformationCoreMessages;
+import org.txm.information.core.preferences.InformationPreferences;
+import org.txm.objects.Base;
+import org.txm.searchengine.cqp.AbstractCqiClient;
+import org.txm.searchengine.cqp.CQPPreferences;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.CorpusManager;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.StructuralUnit;
+import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
+import org.txm.searchengine.cqp.corpus.WordProperty;
+import org.txm.utils.AsciiUtils;
+import org.txm.utils.logger.Log;
+
+// TODO: Auto-generated Javadoc
+/**
+ * compute a diagnostic of Corpus, sub corpus and partition @ author mdecorde.
+ */
+public class Information extends TXMResult {
+	// Base base;
+	/** The corpus. */
+	Corpus corpus;
+	
+	// Numbers
+	/** The T. */
+	int T = 0; // number of word
+
+	/** The N properties. */
+	int NProperties = 0; // number of word properties
+	//HashMap<String, Integer> propertiesCounts = new HashMap<String, Integer>(); // properties counts
+	/** The properties values. */
+	HashMap<String, List<String>> propertiesValues = new HashMap<String, List<String>>(); // properties values
+
+	/** The N structures. */
+	int NStructures = 0; // number of structures
+	
+	/** The structures counts. */
+	HashMap<String, Integer> structuresCounts = new HashMap<String, Integer>(); // structures counts
+
+	/** The internal architecture. */
+	List<String> internalArchitecture = new ArrayList<String>(); // wtc structures = propertiesCounts keys but ordered
+	
+	/** The hierarchie counts. */
+	HashMap<String, Integer> hierarchieCounts = new HashMap<String, Integer>(); // hierarchic structures counts
+	
+	/** The internal architecture properties. */
+	HashMap<String, HashMap<String, List<String>>> internalArchitectureProperties = new HashMap<String, HashMap<String, List<String>>>(); // hierarchic structures counts
+	
+	/** The internal architecture properties counts. */
+	HashMap<String, HashMap<String, Integer>> internalArchitecturePropertiesCounts = new HashMap<String, HashMap<String, Integer>>(); // hierarchic structures counts
+
+	// Annotations description
+	/** The annotations types. */
+	HashMap<String, Integer> annotationsTypes = new HashMap<String, Integer>(); // for each annotation its description
+	
+	/** The annotations origins. */
+	HashMap<String, Integer> annotationsOrigins = new HashMap<String, Integer>(); // for each annoation its origin description
+
+	// Import description
+	/** The import description. */
+	String importDescription = ""; //$NON-NLS-1$
+	
+	/** The properties. */
+	List<WordProperty> properties;
+	
+	/** The structures. */
+	List<StructuralUnit> structures;
+
+	/**
+	 * The HTML file.
+	 */
+	protected File file;
+
+	
+	
+	/**
+	 * The maximum number of word property values to display.
+	 */
+	@Parameter(key=InformationPreferences.MAX_VALUE)
+	protected int maxPropertiesToDisplay;
+	
+	
+	
+	/**
+	 * Instantiates a new Information.
+	 *
+	 * @param corpus a MainCorpus or a SubCorpus
+	 */
+	public Information(Corpus corpus) {
+		super(corpus);
+		this.corpus = corpus;
+	}
+
+	/**
+	 * Sets the maximum properties to display.
+	 * @param maxPropertiesToDisplay
+	 */
+	public void setParameters(int maxPropertiesToDisplay) {
+		this.maxPropertiesToDisplay = maxPropertiesToDisplay;
+		if (this.maxPropertiesToDisplay <= 0) {
+			this.maxPropertiesToDisplay = 10;
+		}
+		this.dirty = true;
+	}
+	
+
+//	public boolean setParameters(TXMParameters parameters) {
+//		try {
+//			Integer max = null;
+//			Object o = parameters.get(CQPPreferences.MAX_VALUE);
+//			if (o instanceof Integer) max = (Integer)o;
+//			else if (o instanceof String) max = Integer.parseInt(o.toString());
+//			
+//			this.setParameters(max);
+//		} catch (Exception e) {
+//			System.out.println("Error while setting parameters of Informations: "+e.getLocalizedMessage());
+//			return false;
+//		}
+//		return true;
+//	}
+	
+	/**
+	 * Step general infos.
+	 */
+	public void stepGeneralInfos()
+	{
+		try {
+			properties = corpus.getProperties();
+			NProperties = properties.size();
+		} catch (CqiClientException e) {
+			Log.severe(InformationCoreMessages.Diagnostic_1 + corpus.getName() + InformationCoreMessages.Diagnostic_4);
+			Log.printStackTrace(e);
+			return;
+		}
+		
+		try {
+			T = corpus.getSize();// corpus.getLexicon(corpus.getProperty("id")).nbrOfToken();
+		} catch (CqiClientException e) {
+			Log.severe(InformationCoreMessages.Diagnostic_6 + corpus.getName() + InformationCoreMessages.Diagnostic_8);
+			Log.printStackTrace(e);
+			return;
+		} 
+	}
+	
+	/**
+	 * step2.
+	 * randomly position are choose
+	 */
+	public void stepLexicalProperties()
+	{
+		AbstractCqiClient cqiClient = CorpusManager.getCorpusManager().getCqiClient();
+		for (Property p : properties) {
+			//int size;
+			try {
+				//size = CorpusManager.getCorpusManager().getCqiClient().lexiconSize(p.getQualifiedName());
+				//propertiesCounts.put(p.getName(), size);
+				//List<String> list = Arrays.asList(corpus.getLexicon(p).getForms(this.maxvalue));
+
+				int[] positions = new int[Math.min(maxPropertiesToDisplay, T)];
+				for(int i = 0 ; i < Math.min(maxPropertiesToDisplay, T) ; i++) {
+					positions[i] = i;
+				}
+				
+				//ArrayList<String> values = new ArrayList<String>();
+				LinkedHashSet<String> values = new LinkedHashSet<String>(cqiClient.getSingleData(p, positions));
+				propertiesValues.put(p.getName(), new ArrayList<String>(values));
+			} catch (Exception e) {
+				Log.printStackTrace(e);
+			}
+		}
+	}
+	
+	/**
+	 * Step structural units.
+	 */
+	public void stepStructuralUnits()
+	{
+		try {
+			structures = corpus.getOrderedStructuralUnits();
+		} catch (CqiClientException e) {
+			Log.severe(InformationCoreMessages.Diagnostic_1 + corpus.getName() + InformationCoreMessages.Diagnostic_11);
+			Log.printStackTrace(e);
+			return;
+		}
+		NStructures = structures.size();
+		for (StructuralUnit su : structures) { // for each structural unit
+			internalArchitecture.add(su.getName());
+			hierarchieCounts.put(su.getName(), -1);
+			internalArchitectureProperties.put(su.getName(), new HashMap<String, List<String>>());
+			internalArchitecturePropertiesCounts.put(su.getName(), new HashMap<String, Integer>());
+			
+			if (su.getProperties().size() > 0) {
+				for (StructuralUnitProperty sup : su.getProperties())  {// for each of its property
+					try {
+						List<String> allvalues = sup.getValues(corpus);
+						internalArchitectureProperties.get(su.getName()).put(sup.getName(), allvalues.subList(0, Math.min(allvalues.size(), maxPropertiesToDisplay)));
+						internalArchitecturePropertiesCounts.get(su.getName()).put(sup.getName(), allvalues.size());
+					} catch (Exception e) {
+						ArrayList<String> list = new ArrayList<String>(1);
+						list.add(InformationCoreMessages.Diagnostic_2);
+						internalArchitectureProperties.get(su.getName()).put(sup.getName(), list);
+						internalArchitecturePropertiesCounts.get(su.getName()).put(sup.getName(), -1);
+					}
+				}
+			}
+		}
+	}
+
+//	/**
+//	 * Instantiates a new diagnostic.
+//	 *
+//	 * @param partition the partition
+//	 * @throws CqiClientException the cqi client exception
+//	 */
+//	public Information(Partition partition) throws CqiClientException {
+//		corpus = partition.getCorpus();
+//		this.partition = partition;
+//		int T = corpus.getSize();
+//		System.out.println(InformationCoreMessages.Diagnostic_12);
+//		int nbParts = partition.getNPart();
+//		List<String> partNames = partition.getPartNames();
+//		List<Integer> partSizes = new ArrayList<Integer>();
+//		List<List<Property>> partProperties = new ArrayList<List<Property>>();
+//		List<String> partQueries = new ArrayList<String>();
+//		for (Part part : partition.getParts()) {
+//			partSizes.add(part.getSize());
+//			partProperties.add(part.getProperties());
+//			partQueries.add(part.getQuery().getQueryString());
+//		}
+//	}
+
+	/**
+	 * dump the results of the diagnostic in a String containing HTML code.
+	 *
+	 * @return the string
+	 */
+	public String htmlDump() {
+		StringBuffer buff = new StringBuffer();
+
+		buff.append("<? version=\"1.0\" encoding=\"UTF-8\"?>\n" + //$NON-NLS-1$
+				"<html>" + //$NON-NLS-1$
+				"<head>" + //$NON-NLS-1$
+				"<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\";'>"+InformationCoreMessages.Diagnostic_3 + this.corpus.getName() + "</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$
+		}
+		
+		buff.append("<h3 style'font-family:\"Arial\";'>"+InformationCoreMessages.Diagnostic_5+ "</h3>\n"); //$NON-NLS-1$ //$NON-NLS-2$ 
+
+		
+		
+		// counts
+		buff.append("<ul>\n"); //$NON-NLS-1$
+		buff.append("<li>" + InformationCoreMessages.Diagnostic_7 + T + "</li>\n"); //$NON-NLS-1$ //$NON-NLS-2$ 
+		buff
+		.append("<li>" + InformationCoreMessages.Diagnostic_9 + (NProperties - 1) + "</li>\n"); //$NON-NLS-2$ //$NON-NLS-1$
+		buff.append("<li>" + InformationCoreMessages.Diagnostic_16 + NStructures + "</li>\n"); //$NON-NLS-2$ //$NON-NLS-1$
+		buff.append("</ul>\n"); //$NON-NLS-1$
+
+		// Propriétés d'occurrences
+		buff.append("<h3 style'font-family:\"Arial\";'>"+NLS.bind(InformationCoreMessages.Diagnostic_14, maxPropertiesToDisplay) + "</h3>\n"); //$NON-NLS-1$ //$NON-NLS-2$ 
+		ArrayList<String> properties = new ArrayList<String>(propertiesValues.keySet());
+		Collections.sort(properties);
+		buff.append("<ul>\n"); //$NON-NLS-1$
+		for (String s : properties) {
+			if (!s.equals("id")) //$NON-NLS-1$
+			{
+				//buff.append("<li> " + s + " (" + propertiesCounts.get(s) + ") : "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+				buff.append("<li> " + s + " : "); //$NON-NLS-1$ //$NON-NLS-2$ 
+				for (String v : propertiesValues.get(s))
+					buff.append(v + ", "); //$NON-NLS-1$
+				buff.append("..."); //$NON-NLS-1$
+				buff.append("</li>\n"); //$NON-NLS-1$ 
+			}
+		}
+		buff.append("</ul>\n"); //$NON-NLS-1$
+
+		// Propriété de structures
+		buff.append("<h3 style'font-family:\"Arial\";'>"+NLS.bind(InformationCoreMessages.Diagnostic_22, maxPropertiesToDisplay)+"</h3>\n"); //$NON-NLS-1$ //$NON-NLS-2$
+		buff.append("<ul>\n"); //$NON-NLS-1$
+		for (String s : internalArchitecture) {
+			StringBuffer subbuffer = new StringBuffer();
+			if (s.equals("txmcorpus")) //$NON-NLS-1$
+				continue;//ignore the txmcorpus structure
+			
+			properties = new ArrayList<String>(internalArchitectureProperties.get(s).keySet());
+			
+			subbuffer.append("<li> " + s + "\n<ul>\n"); //$NON-NLS-1$ //$NON-NLS-2$
+			if (internalArchitectureProperties.get(s).keySet().size() == 0)
+				subbuffer.append("<li>"+InformationCoreMessages.Diagnostic_26+"</li>\n"); //$NON-NLS-1$ //$NON-NLS-2$ 
+
+			
+			//System.out.println("struct: "+s+" >> "+properties);
+			Collections.sort(properties);
+			//System.out.println("struct: "+s+" >sort> "+properties);
+			int nbOfValues = 0;
+			for (String ps : properties) {
+				if (!ps.equals("project") && !ps.equals("base") ) //$NON-NLS-1$ //$NON-NLS-2$ 
+				{
+					//System.out.println("struct: "+s+" >> "+ps);
+					int valuecount = internalArchitecturePropertiesCounts.get(s).get(ps);
+					ArrayList<String> values = new ArrayList<String>(internalArchitectureProperties.get(s).get(ps));
+					subbuffer.append("<li> " + ps + " (" + valuecount + ") = "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+					//System.out.println("VALUES: "+values);
+					Collections.sort(values);
+					for (int i = 0 ; i < values.size() ; i++) {
+						nbOfValues++;
+						String psv = values.get(i);
+						if (psv != null && psv.length() > 0)
+							subbuffer.append(psv.replace("<", "&lt;")); //$NON-NLS-1$ //$NON-NLS-2$
+						else
+							subbuffer.append("\"\""); //$NON-NLS-1$
+						
+						if (i == values.size() -1)
+							subbuffer.append("."); //$NON-NLS-1$
+						else
+							subbuffer.append(", "); //$NON-NLS-1$
+						
+						if (i >= maxPropertiesToDisplay) {
+							subbuffer.append("..."); //$NON-NLS-1$
+							break;
+						}
+					}
+					subbuffer.append("</li>\n"); //$NON-NLS-1$
+				}
+			}
+			subbuffer.append("</ul>\n</li>\n"); //$NON-NLS-1$
+			if (nbOfValues > 0) {
+				buff.append(subbuffer);
+			}
+		}
+		buff.append("</ul>\n"); //$NON-NLS-1$
+		buff.append("</body>\n"); //$NON-NLS-1$
+		buff.append("</html>\n"); //$NON-NLS-1$
+		
+		return buff.toString();
+	}
+
+	
+	
+	/**
+	 * dump the result in the console.
+	 *
+	 * @param maxvalue the maxvalue
+	 * @return the string
+	 */
+	public String dump(int maxvalue) {
+		StringBuffer buff = new StringBuffer();
+
+		buff.append(InformationCoreMessages.Diagnostic_40);
+		buff.append(InformationCoreMessages.Diagnostic_41 + String.format(Locale.FRANCE,"%,d", T) + "\n"); //$NON-NLS-1$ 
+		buff.append(InformationCoreMessages.Diagnostic_43 + String.format("%,d", NProperties) + "\n"); //$NON-NLS-1$ 
+		/*for (String s : propertiesCounts.keySet())
+			if (!s.equals("id")) //$NON-NLS-1$
+				buff.append(" - " + s + " " + propertiesCounts.get(s) + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+				*/
+		buff.append(InformationCoreMessages.Diagnostic_49 + String.format("%,d", NStructures) + "\n"); //$NON-NLS-1$ 
+		for (String s : structuresCounts.keySet())
+			buff.append(" - " + s + "\n");//+structuresCounts.get(s)+"\n"); //$NON-NLS-1$ //$NON-NLS-2$
+
+		/*
+		 * buff.append("* Structural Units counts\n"); for(String s :
+		 * internalArchitecture)
+		 * buff.append(" - "+s+" "+hierarchieCounts.get(s)+"\n");
+		 */
+		buff.append(InformationCoreMessages.Diagnostic_0);
+		for (String s : internalArchitecture) {
+			buff.append(" - " + s + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+			for (String ps : internalArchitectureProperties.get(s).keySet()) {
+				if (!(s.equals("text") && (ps.equals("project") || ps.equals("base") || ps.equals("id")))) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+				{
+					buff
+					.append("   - " + ps + "(" + internalArchitectureProperties.get(s).get(ps).size() + ") = "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+					int valuecount = 0;
+					for (String psv : internalArchitectureProperties.get(s)
+							.get(ps)) {
+						buff.append(psv);
+						if (valuecount++ >= maxvalue) {
+							buff.append("..."); //$NON-NLS-1$
+							break;
+						}
+						if (valuecount < internalArchitectureProperties.get(s)
+								.get(ps).size())
+							buff.append(", "); //$NON-NLS-1$
+					}
+
+					buff.append("\n"); //$NON-NLS-1$
+				}
+			}
+		}
+
+		return buff.toString();
+	}
+
+	/**
+	 * dump the result in the console with maxvalue=30.
+	 *
+	 * @return the string
+	 */
+	public String dump() {
+		return dump(30);
+	}
+
+	/**
+	 * Gets the name.
+	 *
+	 * @return the name
+	 */
+	public String getName() {
+		return corpus.getName();
+	}
+
+	/**
+	 * Gets the base.
+	 *
+	 * @return the base
+	 */
+	public Base getBase() {
+		return corpus.getBase();
+	}
+
+	/**
+	 * Gets the t.
+	 *
+	 * @return the t
+	 */
+	public int getT() {
+		return T;
+	}
+
+	/**
+	 * Gets the n properties.
+	 *
+	 * @return the n properties
+	 */
+	public int getNProperties() {
+		return NProperties;
+	}
+
+	/**
+	 * Gets the internal architecture.
+	 *
+	 * @return the internal architecture
+	 */
+	public List<String> getInternalArchitecture() {
+		return internalArchitecture;
+	}
+
+	/**
+	 * Gets the n structures.
+	 *
+	 * @return the n structures
+	 */
+	public int getNStructures() {
+		return NStructures;
+	}
+
+	/**
+	 * Gets the structures counts.
+	 *
+	 * @return the structures counts
+	 */
+	public HashMap<String, Integer> getStructuresCounts() {
+		return structuresCounts;
+	}
+
+	/**
+	 * Gets the annotations types.
+	 *
+	 * @return the annotations types
+	 */
+	public HashMap<String, Integer> getAnnotationsTypes() {
+		return annotationsTypes;
+	}
+
+	/**
+	 * Gets the annotations origins.
+	 *
+	 * @return the annotations origins
+	 */
+	public HashMap<String, Integer> getAnnotationsOrigins() {
+		return annotationsOrigins;
+	}
+
+	/**
+	 * Gets the import description.
+	 *
+	 * @return the import description
+	 */
+	public String getImportDescription() {
+		return importDescription;
+	}
+
+	/**
+	 * dump the diagnostic in a text file.
+	 *
+	 * @param outfile the outfile
+	 * @param maxvalue the maxvalue
+	 * @return true, if successful
+	 */
+	public boolean toTxt(File outfile, String encoding, int maxvalue) {
+		BufferedWriter writer = null;
+		try {
+			writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outfile),	encoding));
+		} catch (UnsupportedEncodingException e1) {
+			org.txm.utils.logger.Log.printStackTrace(e1);
+			return false;
+		} catch (FileNotFoundException e1) {
+			org.txm.utils.logger.Log.printStackTrace(e1);
+			return false;
+		}
+
+		try {
+			writer.write(this.dump(maxvalue));
+			writer.close();
+		} catch (IOException e) {
+			org.txm.utils.logger.Log.printStackTrace(e);
+			return false;
+		}
+
+		return true;
+	}
+
+	/**
+	 * dump the diagnostic in a HTML file.
+	 *
+	 * @param outfile the outfile
+	 * @return true, if successful
+	 */
+	public boolean toHTML(File outfile) {
+		OutputStreamWriter writer;
+		try {
+			writer = new OutputStreamWriter(new FileOutputStream(outfile), "UTF-8"); //$NON-NLS-1$
+			writer.write(this.htmlDump());
+			writer.close();
+		} catch (IOException e) {
+			org.txm.utils.logger.Log.printStackTrace(e);
+			return false;
+		}
+
+		return true;
+	}
+
+	/**
+	 * dump the diagnostic in a text file, maxvalue = 100.
+	 *
+	 * @param outfile the outfile
+	 * @return true, if successful
+	 */
+	public boolean toTxt(File outfile) {
+		return toTxt(outfile, "UTF-8", 100); //$NON-NLS-1$
+	}
+
+	@Override
+	public void clean() {
+		// TODO Auto-generated method stub
+	}
+
+	@Override
+	public boolean toTxt(File outfile, String encoding, String colseparator, String txtseparator) throws Exception {
+		return toTxt(outfile, encoding, 100);
+	}
+
+	@Override
+	public String getSimpleName() {
+		return "Informations";
+	}
+
+	@Override
+	public String getDetails() {
+		return "" + T;
+	}
+
+	@Override
+	protected boolean _compute() throws Exception {
+		
+		this.beginTask("Computing informations...", 3);
+		this.stepGeneralInfos();
+		this.worked(1);
+		
+		this.stepLexicalProperties();
+		this.worked(1);
+		
+		this.stepStructuralUnits();
+		this.worked(1);
+		
+		String txmhome = TXMPreferences.getString(TBXPreferences.USER_TXM_HOME, TBXPreferences.PREFERENCES_NODE);
+		String filename = corpus.getParent().getName() + "-" + corpus.getName(); //$NON-NLS-1$
+		filename = AsciiUtils.buildId(filename);
+		file = new File(txmhome, "results/" + filename + "-infos.html"); //$NON-NLS-1$ //$NON-NLS-2$
+		
+		this.toHTML(file);
+		return true;
+	}
+	
+	/**
+	 * Gets the HTML file.
+	 * @return the HTML file
+	 */
+	public File getHTMLFile() {
+		return file;
+	}
+
+	@Override
+	public boolean canCompute() {
+		return corpus != null;
+	}
+
+	@Override
+	public boolean setParameters(TXMParameters parameters) {
+		this.maxPropertiesToDisplay = parameters.getInteger(InformationPreferences.MAX_VALUE);
+		return true;
+	}
+
+	@Override
+	public boolean loadParameters() {
+		// nothing to do
+		return true;
+	}
+
+	
+	@Override
+	public boolean saveParameters() {
+		// nothing to do
+		return true;
+	}
+}

Property changes on: tmp/org.txm.information.core/src/org/txm/information/core/functions/Information.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.information.core/src/org/txm/information/core/package.html
===================================================================
--- tmp/org.txm.information.core/src/org/txm/information/core/package.html	(revision 0)
+++ tmp/org.txm.information.core/src/org/txm/information/core/package.html	(revision 700)
@@ -0,0 +1,5 @@
+<html>
+<body>
+<p>Diagnostic function</p>
+</body>
+</html>
\ No newline at end of file

Property changes on: tmp/org.txm.information.core/src/org/txm/information/core/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.information.core/src/org/txm/information/core/preferences/InformationPreferences.java
===================================================================
--- tmp/org.txm.information.core/src/org/txm/information/core/preferences/InformationPreferences.java	(revision 0)
+++ tmp/org.txm.information.core/src/org/txm/information/core/preferences/InformationPreferences.java	(revision 700)
@@ -0,0 +1,36 @@
+package org.txm.information.core.preferences;
+
+
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.service.prefs.Preferences;
+import org.txm.core.preferences.TXMPreferences;
+
+/**
+ * Information preferences initializer.
+ * @author sjacquot
+ *
+ */
+public class InformationPreferences extends TXMPreferences {
+
+	// auto populate the preference node qualifier from the current bundle id
+	public static final String PREFERENCES_NODE = FrameworkUtil.getBundle(InformationPreferences.class).getSymbolicName();
+	
+	public static final String PREFERENCES_PREFIX = "information_"; //$NON-NLS-1$
+	
+	
+	/**
+	 * The maximum number of word property values to display.
+	 */
+	public static final String MAX_VALUE = PREFERENCES_PREFIX + "max_properties_to_display"; //$NON-NLS-1$
+
+	
+	@Override
+	public void initializeDefaultPreferences() {
+		Preferences preferences = DefaultScope.INSTANCE.getNode(PREFERENCES_NODE);
+		
+		preferences.putInt(MAX_VALUE, 10);
+		
+	}
+	
+}

Property changes on: tmp/org.txm.information.core/src/org/txm/information/core/preferences/InformationPreferences.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.information.core/build.properties
===================================================================
--- tmp/org.txm.information.core/build.properties	(revision 0)
+++ tmp/org.txm.information.core/build.properties	(revision 700)
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

Property changes on: tmp/org.txm.information.core/build.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.information.core/plugin.xml
===================================================================
--- tmp/org.txm.information.core/plugin.xml	(revision 0)
+++ tmp/org.txm.information.core/plugin.xml	(revision 700)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         point="org.eclipse.core.runtime.preferences">
+      <initializer
+            class="org.txm.information.core.preferences.InformationPreferences">
+      </initializer>
+   </extension>
+
+</plugin>

Property changes on: tmp/org.txm.information.core/plugin.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.information.core/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- tmp/org.txm.information.core/.settings/org.eclipse.jdt.core.prefs	(revision 0)
+++ tmp/org.txm.information.core/.settings/org.eclipse.jdt.core.prefs	(revision 700)
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6

Property changes on: tmp/org.txm.information.core/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.information.core/.classpath
===================================================================
--- tmp/org.txm.information.core/.classpath	(revision 0)
+++ tmp/org.txm.information.core/.classpath	(revision 700)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Property changes on: tmp/org.txm.information.core/.classpath
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.information.core/META-INF/MANIFEST.MF
===================================================================
--- tmp/org.txm.information.core/META-INF/MANIFEST.MF	(revision 0)
+++ tmp/org.txm.information.core/META-INF/MANIFEST.MF	(revision 700)
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Information Core
+Bundle-SymbolicName: org.txm.information.core;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: Textometrie.org
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Export-Package: org.txm.information.core.functions,
+ org.txm.information.core.messages,
+ org.txm.information.core.preferences
+Require-Bundle: org.txm.utils,
+ org.txm.core;bundle-version="0.8.0",
+ org.txm.searchengine.cqp.core;bundle-version="1.1.0"

Property changes on: tmp/org.txm.information.core/META-INF/MANIFEST.MF
___________________________________________________________________
Added: svn:mime-type
   + text/plain

