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 3017)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/core/functions/summary/Summary.java	(revision 3018)
@@ -4,7 +4,9 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 
+import org.apache.commons.lang.StringUtils;
 import org.txm.core.messages.TXMCoreMessages;
+import org.txm.core.results.Parameter;
 import org.txm.core.results.TXMParameters;
 import org.txm.core.results.TXMResult;
 import org.txm.objects.Edition;
@@ -26,14 +28,14 @@
 	
 	TreeNode treenodes = new TreeNode("root"); //$NON-NLS-1$
 	
-	private ArrayList<StructuralUnitProperty> properties;
+	@Parameter(key = "props")
+	protected ArrayList<StructuralUnitProperty> properties;
 	
 	public Summary(MainCorpus corpus) {
 		super(corpus);
 		this.corpus = corpus;
 	}
 	
-	
 	@Override
 	public boolean canCompute() {
 		return corpus != null && properties != null && properties.size() > 0;
@@ -41,14 +43,12 @@
 	
 	@Override
 	public boolean setParameters(TXMParameters parameters) {
-		// TODO Auto-generated method stub
 		System.err.println("Summary.setParameters(): not yet implemented.");
 		return true;
 	}
 	
 	@Override
 	public boolean loadParameters() {
-		// TODO Auto-generated method stub
 		System.err.println("Summary.loadParameters(): not yet implemented.");
 		return true;
 	}
@@ -56,7 +56,6 @@
 	
 	@Override
 	public boolean saveParameters() {
-		// TODO Auto-generated method stub
 		System.err.println("Summary.saveParameters(): not yet implemented.");
 		return true;
 	}
@@ -68,6 +67,7 @@
 		treenodes.id = corpus.getID();
 		treenodes.start = 0;
 		treenodes.parent = null;
+		treenodes.clear();
 		// get all type of structures
 		for (int j = 0; j < properties.size(); j++) {
 			String suname = properties.get(j).getStructuralUnit().getName();
@@ -88,6 +88,8 @@
 				System.out.println(suname + ": starts.length " + starts.length + " != ends.length " + ends.length); //$NON-NLS-1$ //$NON-NLS-2$
 				return false;
 			}
+			
+			// create the nodes list
 			for (int i = 0; i < starts.length; i++) {
 				// System.out.println("suname: "+suname+" start: "+m.getStart());
 				TreeNode node = new TreeNode();
@@ -101,6 +103,7 @@
 		// this.print();
 		
 		// System.out.println("sorting... "+treenodes.size()+" nodes");
+		// sorting and create hierarchy nodes
 		processNodeList(treenodes);
 		
 		// System.out.println("checking result..."+treenodes.size()+" nodes");
@@ -116,12 +119,11 @@
 		return treenodes;
 	}
 	
-	
-	
 	private void processNodeList(TreeNode nodes) {
 		// System.out.println("+processing node list: "+nodes.size());
-		if (nodes.size() == 0)
+		if (nodes.size() == 0) {
 			return;
+		}
 		
 		// 1st loop
 		// System.out.println("1st loop: "+nodes.size());
@@ -137,8 +139,9 @@
 						node.add(n2);
 						nodes.remove(j);
 						j--;
-						if (j < i)
+						if (j < i) {
 							i--;
+						}
 					}
 				}
 			}
@@ -157,8 +160,9 @@
 	}
 	
 	public void print() {
-		for (TreeNode node : treenodes)
+		for (TreeNode node : treenodes) {
 			System.out.println("\n" + node); //$NON-NLS-1$
+		}
 	}
 	
 	
@@ -238,7 +242,6 @@
 			return true;
 		}
 		
-		
 		public TreeNode(String struct) {
 			this();
 			this.struct = struct;
@@ -247,8 +250,9 @@
 		@Override
 		public String toString() {
 			String str = struct + "(" + start + ", " + end + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-			if (size() > 0)
+			if (size() > 0) {
 				str += "\n\t" + super.toString(); //$NON-NLS-1$
+			}
 			return str;
 		}
 		
@@ -271,26 +275,33 @@
 	
 	@Override
 	public String getName() {
-		// TODO Auto-generated method stub
-		return null;
+		if (properties != null && properties.size() > 0) {
+			return corpus.getName();
+		}
+		else {
+			return StringUtils.join(properties, ", ");
+		}
 	}
 	
 	@Override
 	public String getSimpleName() {
-		// TODO Auto-generated method stub
-		return null;
+		if (properties != null && properties.size() > 0) {
+			return corpus.getName();
+		}
+		else {
+			return StringUtils.join(properties, ", ");
+		}
 	}
 	
 	@Override
 	public String getDetails() {
 		// TODO Auto-generated method stub
-		return null;
+		return "" + corpus + " " + properties;
 	}
 	
 	@Override
 	public void clean() {
 		// TODO Auto-generated method stub
-		
 	}
 	
 	
@@ -309,4 +320,8 @@
 	public String getResultType() {
 		return "Summary";
 	}
+	
+	public MainCorpus getCorpus() {
+		return corpus;
+	}
 }
