Index: tmp/org.txm.core/src/java/org/txm/core/preferences/TXMPreferences.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/core/preferences/TXMPreferences.java	(revision 446)
+++ tmp/org.txm.core/src/java/org/txm/core/preferences/TXMPreferences.java	(revision 447)
@@ -1,8 +1,9 @@
 package org.txm.core.preferences;
 
-import java.lang.reflect.Field;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Iterator;
+import java.util.Set;
 
 import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
 import org.eclipse.core.runtime.preferences.DefaultScope;
@@ -10,7 +11,8 @@
 import org.eclipse.core.runtime.preferences.IScopeContext;
 import org.eclipse.core.runtime.preferences.InstanceScope;
 import org.osgi.service.prefs.BackingStoreException;
-import org.txm.core.results.ITXMResult;
+import org.txm.core.results.TXMResult;
+import org.txm.core.results.TXMParameters;
 
 
 
@@ -23,13 +25,13 @@
  * - alternative specified global value
  * - alternative specified default value
  * TODO: methods that puts a value in the local node does not check if the value is the default value of the parent, it should be removed from the local node if it's the default value
- * of command scope or alternative scope so the preference will not be saved in the local scope .prefs file if its a default value. 
+ * of command scope or alternative scope so the preference will not be saved in the local scope .prefs file if its a default value.
  * TODO: when we'll use IProject for managing Corporas, the local node should be stored in the ProjectScope instead of in the InstanceScope.
  * TODO: need to determine if we'll use this class to persistence of TXM results. At this moment, we persist result by calling flush() that creates a file named by the result node qualifier,
  *  eg. org.txm.partition.core.functions.PartitionDimensions@732982cb.prefs
  * (We can also define a custom Scope to do that, for example to change the saved object location or the filename)
- * 
- * 
+ *
+ *
  * @author sjacquot
  *
  */
@@ -38,362 +40,662 @@
 // Otherwise, to avoid that we need to define our own Scope, but the problem will disappear when
 // we'll use the ProjectScope.
 public abstract class TXMPreferences extends AbstractPreferenceInitializer {
-	
-	// FIXME: here we must use a ProjectScope when we use IProject for the corporas of TXM
+
+	// FIXME: here we must use a ProjectScope when we'll use IProject for the corporas of TXM
 	public static IScopeContext scope = InstanceScope.INSTANCE;
-	
+
 	/**
 	 * Alternative nodes to look up when getting a preference.
 	 */
 	public static ArrayList<String> alternativeNodesQualifiers = new ArrayList<String>();
-	
+
 	/**
 	 * Stores a pairs of key / value in a local node dedicated to the specified result. The node qualifier is generated by the <code>Object.toString()</code> method.
 	 * @param result
 	 * @param key
 	 * @param value
 	 */
-	public static void putLocalBoolean(ITXMResult result, String key, boolean value)	{
-		scope.getNode(getId(result)).putBoolean(key, value);
+	public static void putLocalBoolean(TXMResult result, String key, boolean value)	{
+		scope.getNode(result.getUUID()).putBoolean(key, value);
 	}
-	
-	
 
+
 	/**
+	 * Looks for the value of the specified <code>key</code> in the specified parameters and preference nodes.
+	 * Returns the value of a key in the specified parameters if exists.
+	 * Otherwise try to get it from the local result node if exists.
+	 * Otherwise try to get it from the specified node qualifier if exists.
+	 * Otherwise try to get it from the specified alternative node qualifiers defined in the list <code>TXMPreferences.alternativeNodesQualifiers</code>.
+	 * Returns <code>false</code> if no value has been found for the specified key.
+	 * @param commandParameters
+	 * @param nodeQualifier
+	 * @param result
+	 * @param key
+	 * @return
+	 */
+	public static boolean getBoolean(String key, TXMParameters commandParameters, TXMResult result, String nodeQualifier)	{
+		if(commandParameters != null && commandParameters.get(key) != null)	{
+			return (Boolean) commandParameters.get(key);
+		}
+		return getBoolean(key, result, nodeQualifier);
+	}
+
+
+	public static boolean getBoolean(String key, TXMParameters commandParameters, TXMResult result)	{
+		return getBoolean(key, commandParameters, result, result.getPreferencesNodeQualifier());
+	}
+	
+	/**
 	 * Looks for the value of the specified <code>key</code> in preference nodes.
 	 * Returns the value of the local result node if exists.
 	 * Otherwise try to get it from the specified node qualifier if exists.
 	 * Otherwise try to get it from the specified alternative node qualifiers defined in the list <code>TXMPreferences.alternativeNodesQualifiers</code>.
-	 * Returns <code>true</code> if no value has been found for the specified key.
+	 * Returns defaultValue if no value has been found for the specified key.
 	 * @param nodeQualifier
 	 * @param result
 	 * @param key
 	 * @return
 	 */
-	public static boolean getBoolean(String nodeQualifier, ITXMResult result, String key, boolean defaultValue)	{
+	public static boolean getBoolean(String key, TXMResult result, String nodeQualifier, boolean defaultValue)	{
 
 		nodeQualifier = findNodeQualifier(nodeQualifier, result, key);
-		
+
 		defaultValue = DefaultScope.INSTANCE.getNode(nodeQualifier).getBoolean(key, defaultValue);
 		return scope.getNode(nodeQualifier).getBoolean(key, defaultValue);
 	}
-	
-	public static boolean getBoolean(String nodeQualifier, ITXMResult result, String key)	{
-		return getBoolean(nodeQualifier, result, key, false);
-	}
-	
+
 	/**
-	 * 
+	 * Looks for the value of the specified <code>key</code> in preference nodes.
+	 * Returns the value of the local result node if exists.
+	 * Otherwise try to get it from the specified node qualifier if exists.
+	 * Otherwise try to get it from the specified alternative node qualifiers defined in the list <code>TXMPreferences.alternativeNodesQualifiers</code>.
+	 * Returns <code>false</code> if no value has been found for the specified key.
 	 * @param nodeQualifier
+	 * @param result
 	 * @param key
 	 * @return
 	 */
-	public static boolean getBoolean(String nodeQualifier, String key, boolean defaultValue)	{
-		return getBoolean(nodeQualifier, null, key, defaultValue);
+	public static boolean getBoolean(String key, TXMResult result, String nodeQualifier)	{
+		return getBoolean(key, result, nodeQualifier, false);
 	}
-	
+
 	/**
-	 * 
+	 *
 	 * @param nodeQualifier
 	 * @param key
 	 * @return
 	 */
-	public static boolean getBoolean(String nodeQualifier, String key)	{
-		return getBoolean(nodeQualifier, null, key, false);
+	public static boolean getBoolean(String key, String nodeQualifier)	{
+		return getBoolean(key, null, nodeQualifier);
 	}
-	
+
 	/**
-	 * 
+	 *
 	 * @param result
 	 * @param key
 	 * @return
 	 */
-	public static boolean getBoolean(ITXMResult result, String key)	{
-		return getBoolean(null, result, key);
+	public static boolean getBoolean(String key, TXMResult result)	{
+		return getBoolean(key, result, null);
 	}
-	
+
+
+
+
 	/**
+	 * Try to cast and create a typed object from the String value of the key.
+	 * @param commandParameters
+	 * @param result
+	 * @param nodeQualifier
+	 * @param key
+	 * @return
+	 */
+	//FIXME: does not work, need to test furthermore
+//	public static Object get(TXMCommandParameters commandParameters, TXMResult result, String nodeQualifier, String key)	{
+//
+//
+//		if(commandParameters != null && commandParameters.get(key) != null)	{
+//			return commandParameters.get(key);
+//		}
+//
+//		nodeQualifier = findNodeQualifier(nodeQualifier, result, key);
+//
+//		String stringValue = getString(nodeQualifier, key);
+//
+//		try {
+//			// double
+//			try {
+//				return Double.parseDouble(stringValue);
+//			}
+//			catch(NumberFormatException e) {
+//			}
+//			// float
+//			try {
+//				return Float.parseFloat(stringValue);
+//			}
+//			catch(NumberFormatException e) {
+//			}
+//			// long
+//			try {
+//				return Long.parseLong(stringValue);
+//			}
+//			catch(NumberFormatException e) {
+//			}
+//			// integer
+//			try {
+//				return Integer.parseInt(stringValue);
+//			}
+//			catch(NumberFormatException e) {
+//			}
+//			// short
+//			try {
+//				return Short.parseShort(stringValue);
+//			}
+//			catch(NumberFormatException e) {
+//			}
+//			// boolean
+//			try {
+//				return Boolean.parseBoolean(stringValue);
+//			}
+//			catch(NumberFormatException e) {
+//			}
+//		}
+//		catch(Exception e) {
+//			// TODO Auto-generated catch block
+//			e.printStackTrace();
+//			System.err.println("TXMPreferences.get(): can't parse and primitive cast the specified string value: " + stringValue + "."); //$NON-NLS-1$
+//		}
+//		return stringValue;
+//	}
+
+	/**
 	 * Stores a pairs of key / value in a local node dedicated to the specified result. The node qualifier is generated by the <code>Object.toString()</code> method.
 	 * @param result
 	 * @param key
 	 * @param value
 	 */
-	public static void putLocalString(ITXMResult result, String key, String value)	{
-		scope.getNode(getId(result)).put(key, value);
+	public static void putLocalString(TXMResult result, String key, String value)	{
+		scope.getNode(result.getUUID()).put(key, value);
 	}
-	
 
+
+
 	/**
-	 * Looks for the value of the specified <code>key</code> in preference nodes.
-	 * Returns the value of the local result node if exists.
+	 * Looks for the value of the specified <code>key</code> in the specified parameters and preference nodes.
+	 * Returns the value of a key in the specified parameters if exists.
+	 * Otherwise try to get it from the local result node if exists.
 	 * Otherwise try to get it from the specified node qualifier if exists.
 	 * Otherwise try to get it from the specified alternative node qualifiers defined in the list <code>TXMPreferences.alternativeNodesQualifiers</code>.
 	 * Returns an empty <code>String</code> if no value has been found for the specified key.
+	 * @param commandParameters
 	 * @param nodeQualifier
 	 * @param result
 	 * @param key
 	 * @return
 	 */
-	public static String getString(String nodeQualifier, ITXMResult result, String key)	{
-		String defaultValue = DefaultScope.INSTANCE.getNode(nodeQualifier).get(key, "");
-		return  getString(nodeQualifier, result, key, defaultValue);
+	public static String getString(String key, TXMParameters commandParameters, TXMResult result, String nodeQualifier)	{
+		if(commandParameters != null && commandParameters.get(key) != null)	{
+			return (String) commandParameters.get(key);
+		}
+		return getString(key, result, nodeQualifier);
 	}
+
+	public static String getString(String key, TXMParameters commandParameters, TXMResult result)	{
+		return getString(key, commandParameters, result, result.getPreferencesNodeQualifier());
+	}
 	
-	public static String getString(String nodeQualifier, String key, String defaultValue) {
-		return  getString(nodeQualifier, null, key, defaultValue);
-	}
 
-	public static String getString(String nodeQualifier, ITXMResult result, String key, String defaultValue) {
+	/**
+	 * Looks for the value of the specified <code>key</code> in preference nodes.
+	 * Returns the value of the local result node if exists.
+	 * Otherwise try to get it from the specified node qualifier if exists.
+	 * Otherwise try to get it from the specified alternative node qualifiers defined in the list <code>TXMPreferences.alternativeNodesQualifiers</code>.
+	 * Returns defaultValue if no value has been found for the specified key.
+	 * @param nodeQualifier
+	 * @param result
+	 * @param key
+	 * @return
+	 */
+	public static String getString(String key, TXMResult result, String nodeQualifier, String defaultValue) {
 		nodeQualifier = findNodeQualifier(nodeQualifier, result, key);
-		return  scope.getNode(nodeQualifier).get(key, defaultValue);
+
+		defaultValue = DefaultScope.INSTANCE.getNode(nodeQualifier).get(key, defaultValue);
+		return scope.getNode(nodeQualifier).get(key, defaultValue);
 	}
-	
+
+
 	/**
-	 * 
+	 * Looks for the value of the specified <code>key</code> in preference nodes.
+	 * Returns the value of the local result node if exists.
+	 * Otherwise try to get it from the specified node qualifier if exists.
+	 * Otherwise try to get it from the specified alternative node qualifiers defined in the list <code>TXMPreferences.alternativeNodesQualifiers</code>.
+	 * Returns an empty <code>String</code> if no value has been found for the specified key.
 	 * @param nodeQualifier
+	 * @param result
 	 * @param key
 	 * @return
 	 */
-	public static String getString(String nodeQualifier, String key)	{
-		String defaultValue = DefaultScope.INSTANCE.getNode(nodeQualifier).get(key, "");
-		return getString(nodeQualifier, null, key, defaultValue);
+	public static String getString(String key, TXMResult result, String nodeQualifier)	{
+		return getString(key, result, nodeQualifier, "");
 	}
-	
-	
+
+
 	/**
-	 * 
+	 *
+	 * @param nodeQualifier
+	 * @param key
+	 * @return
+	 */
+	public static String getString(String key, String nodeQualifier)	{
+		return getString(key, null, nodeQualifier);
+	}
+
+
+	/**
+	 *
 	 * @param result
 	 * @param key
 	 * @return
 	 */
-	public static String getString(ITXMResult result, String key)	{
-		return getString(null, result, key);
+	public static String getString(String key, TXMResult result)	{
+		return getString(key, result, null);
 	}
 
+
+
 	/**
 	 * Stores a pairs of key / value in a local node dedicated to the specified result. The node qualifier is generated by the <code>Object.toString()</code> method.
 	 * @param result
 	 * @param key
 	 * @param value
 	 */
-	public static void putLocalInt(ITXMResult result, String key, int value)	{
-		scope.getNode(getId(result)).putInt(key, value);
+	public static void putLocalInt(TXMResult result, String key, int value)	{
+		scope.getNode(result.getUUID()).putInt(key, value);
 	}
+
+
+	/**
+	 * Looks for the value of the specified <code>key</code> in the specified parameters and preference nodes.
+	 * Returns the value of a key in the specified parameters if exists.
+	 * Otherwise try to get it from the local result node if exists.
+	 * Otherwise try to get it from the specified node qualifier if exists.
+	 * Otherwise try to get it from the specified alternative node qualifiers defined in the list <code>TXMPreferences.alternativeNodesQualifiers</code>.
+	 * Returns 0 if no value has been found for the specified key.
+	 * @param commandParameters
+	 * @param nodeQualifier
+	 * @param result
+	 * @param key
+	 * @return
+	 */
+	public static int getInt(String key, TXMParameters commandParameters, TXMResult result, String nodeQualifier)	{
+		if(commandParameters != null && commandParameters.get(key) != null)	{
+			return (Integer) commandParameters.get(key);
+		}
+		return getInt(key, result, nodeQualifier);
+	}
+
+
+	public static int getInt(String key, TXMParameters commandParameters, TXMResult result)	{
+		return getInt(key, commandParameters, result, result.getPreferencesNodeQualifier());
+	}
 	
+
+
 	/**
 	 * Looks for the value of the specified <code>key</code> in preference nodes.
 	 * Returns the value of the local result node if exists.
 	 * Otherwise try to get it from the specified node qualifier if exists.
 	 * Otherwise try to get it from the specified alternative node qualifiers defined in the list <code>TXMPreferences.alternativeNodesQualifiers</code>.
-	 * Returns -1 if no value has been found for the specified key.
+	 * Returns defaultValue if no value has been found for the specified key.
 	 * @param nodeQualifier
 	 * @param result
 	 * @param key
 	 * @param defaultValue
 	 * @return
 	 */
-	public static int getInt(String nodeQualifier, ITXMResult result, String key, int defaultValue)	{
+	public static int getInt(String key, TXMResult result, String nodeQualifier, int defaultValue)	{
+		nodeQualifier = findNodeQualifier(nodeQualifier, result, key);
 
-		nodeQualifier = findNodeQualifier(nodeQualifier, result, key);
+		defaultValue = DefaultScope.INSTANCE.getNode(nodeQualifier).getInt(key, defaultValue);
 		return scope.getNode(nodeQualifier).getInt(key, defaultValue);
-		
+
 	}
-	
+
 	/**
 	 * Looks for the value of the specified <code>key</code> in preference nodes.
 	 * Returns the value of the local result node if exists.
 	 * Otherwise try to get it from the specified node qualifier if exists.
 	 * Otherwise try to get it from the specified alternative node qualifiers defined in the list <code>TXMPreferences.alternativeNodesQualifiers</code>.
-	 * Returns -1 if no value has been found for the specified key.
+	 * Returns 0 if no value has been found for the specified key.
 	 * @param nodeQualifier
 	 * @param result
 	 * @param key
+	 * @param defaultValue
 	 * @return
 	 */
-	public static int getInt(String nodeQualifier, ITXMResult result, String key)	{
-		int defaultValue = DefaultScope.INSTANCE.getNode(nodeQualifier).getInt(key, 0);
-		return getInt(nodeQualifier, result, key, defaultValue);
+	public static int getInt(String key, TXMResult result, String nodeQualifier)	{
+		return getInt(key, result, nodeQualifier, 0);
 	}
-	
+
 	/**
-	 * 
+	 *
 	 * @param nodeQualifier
 	 * @param key
+	 * @return
+	 */
+	public static int getInt(String key, String nodeQualifier)	{
+		return getInt(key, null, nodeQualifier);
+	}
+
+	/**
+	 *
+	 * @param result
+	 * @param key
+	 * @return
+	 */
+	public static int getInt(String key, TXMResult result)	{
+		return getInt(key, result, null);
+	}
+
+
+	/**
+	 * Stores a pairs of key / value in a local node dedicated to the specified result. The node qualifier is generated by the <code>Object.toString()</code> method.
+	 * @param result
+	 * @param key
+	 * @param value
+	 */
+	public static void putLocalLong(TXMResult result, String key, long value)	{
+		scope.getNode(result.getUUID()).putLong(key, value);
+	}
+
+
+	/**
+	 * Looks for the value of the specified <code>key</code> in the specified parameters and preference nodes.
+	 * Returns the value of a key in the specified parameters if exists.
+	 * Otherwise try to get it from the local result node if exists.
+	 * Otherwise try to get it from the specified node qualifier if exists.
+	 * Otherwise try to get it from the specified alternative node qualifiers defined in the list <code>TXMPreferences.alternativeNodesQualifiers</code>.
+	 * Returns 0L if no value has been found for the specified key.
+	 * @param commandParameters
+	 * @param nodeQualifier
+	 * @param result
+	 * @param key
+	 * @return
+	 */
+	public static long getLong(String key, TXMParameters commandParameters, TXMResult result, String nodeQualifier)	{
+		if(commandParameters != null && commandParameters.get(key) != null)	{
+			return (Long) commandParameters.get(key);
+		}
+		return getLong(key, result, nodeQualifier);
+	}
+
+	public static long getLong(String key, TXMParameters commandParameters, TXMResult result)	{
+		return getLong(key, commandParameters, result, result.getPreferencesNodeQualifier());
+	}
+
+
+
+	/**
+	 * Looks for the value of the specified <code>key</code> in preference nodes.
+	 * Returns the value of the local result node if exists.
+	 * Otherwise try to get it from the specified node qualifier if exists.
+	 * Otherwise try to get it from the specified alternative node qualifiers defined in the list <code>TXMPreferences.alternativeNodesQualifiers</code>.
+	 * Returns defaultValue if no value has been found for the specified key.
+	 * @param nodeQualifier
+	 * @param result
+	 * @param key
 	 * @param defaultValue
 	 * @return
 	 */
-	public static int getInt(String nodeQualifier, String key, int defaultValue)	{
-		return getInt(nodeQualifier, null, key, defaultValue);
+	public static long getLong(String key, TXMResult result, String nodeQualifier, long defaultValue)	{
+		nodeQualifier = findNodeQualifier(nodeQualifier, result, key);
+
+		defaultValue = DefaultScope.INSTANCE.getNode(nodeQualifier).getLong(key, defaultValue);
+		return scope.getNode(nodeQualifier).getLong(key, defaultValue);
+
 	}
-	
+
 	/**
-	 * 
+	 * Looks for the value of the specified <code>key</code> in preference nodes.
+	 * Returns the value of the local result node if exists.
+	 * Otherwise try to get it from the specified node qualifier if exists.
+	 * Otherwise try to get it from the specified alternative node qualifiers defined in the list <code>TXMPreferences.alternativeNodesQualifiers</code>.
+	 * Returns 0L if no value has been found for the specified key.
 	 * @param nodeQualifier
+	 * @param result
 	 * @param key
+	 * @param defaultValue
 	 * @return
 	 */
-	public static int getInt(String nodeQualifier, String key)	{
-		return getInt(nodeQualifier, null, key);
+	public static long getLong(String key, TXMResult result, String nodeQualifier)	{
+		return getLong(key, result, nodeQualifier, 0L);
 	}
 
-	
 	/**
-	 * 
+	 *
+	 * @param nodeQualifier
+	 * @param key
+	 * @return
+	 */
+	public static long getLong(String key, String nodeQualifier)	{
+		return getLong(key, null, nodeQualifier);
+	}
+
+	/**
+	 *
 	 * @param result
 	 * @param key
 	 * @return
 	 */
-	public static int getInt(ITXMResult result, String key)	{
-		return getInt(null, result, key);
+	public static long getLong(String key, TXMResult result)	{
+		return getLong(key, result, null);
 	}
 
-	
+
 	/**
 	 * Stores a pairs of key / value in a local node dedicated to the specified result. The node qualifier is generated by the <code>Object.toString()</code> method.
 	 * @param result
 	 * @param key
 	 * @param value
 	 */
-	public static void putLocalDouble(ITXMResult result, String key, double value)	{
-		scope.getNode(getId(result)).putDouble(key, value);
+	public static void putLocalDouble(TXMResult result, String key, double value)	{
+		scope.getNode(result.getUUID()).putDouble(key, value);
 	}
+
+
+
+	/**
+	 * Looks for the value of the specified <code>key</code> in the specified parameters and preference nodes.
+	 * Returns the value of a key in the specified parameters if exists.
+	 * Otherwise try to get it from the local result node if exists.
+	 * Otherwise try to get it from the specified node qualifier if exists.
+	 * Otherwise try to get it from the specified alternative node qualifiers defined in the list <code>TXMPreferences.alternativeNodesQualifiers</code>.
+	 * Returns 0.0d if no value has been found for the specified key.
+	 * @param commandParameters
+	 * @param nodeQualifier
+	 * @param result
+	 * @param key
+	 * @return
+	 */
+	public static double getDouble(String key, TXMParameters commandParameters, TXMResult result, String nodeQualifier)	{
+		if(commandParameters != null && commandParameters.get(key) != null)	{
+			return (Double) commandParameters.get(key);
+		}
+		return getDouble(key, result, nodeQualifier);
+	}
+
+	public static double getDouble(String key, TXMParameters commandParameters, TXMResult result)	{
+		return getDouble(key, commandParameters, result, result.getPreferencesNodeQualifier());
+	}
+
 	
 	/**
 	 * Looks for the value of the specified <code>key</code> in preference nodes.
 	 * Returns the value of the local result node if exists.
 	 * Otherwise try to get it from the specified node qualifier if exists.
 	 * Otherwise try to get it from the specified alternative node qualifiers defined in the list <code>TXMPreferences.alternativeNodesQualifiers</code>.
-	 * Returns -1 if no value has been found for the specified key.
+	 * Returns defaultValue if no value has been found for the specified key.
 	 * @param nodeQualifier
 	 * @param result
 	 * @param key
 	 * @return
 	 */
-	public static double getDouble(String nodeQualifier, ITXMResult result, String key, double defaultValue)	{
+	public static double getDouble(String key, String nodeQualifier, TXMResult result, double defaultValue)	{
 		nodeQualifier = findNodeQualifier(nodeQualifier, result, key);
+
+		defaultValue = DefaultScope.INSTANCE.getNode(nodeQualifier).getDouble(key, defaultValue);
 		return scope.getNode(nodeQualifier).getDouble(key, defaultValue);
 	}
-	
+
 	/**
-	 * 
+	 * Looks for the value of the specified <code>key</code> in preference nodes.
+	 * Returns the value of the local result node if exists.
+	 * Otherwise try to get it from the specified node qualifier if exists.
+	 * Otherwise try to get it from the specified alternative node qualifiers defined in the list <code>TXMPreferences.alternativeNodesQualifiers</code>.
+	 * Returns 0.0d if no value has been found for the specified key.
 	 * @param nodeQualifier
+	 * @param result
 	 * @param key
 	 * @return
 	 */
-	public static double getDouble(String nodeQualifier, String key, double defaultValue)	{
-		return getDouble(nodeQualifier, null, key, defaultValue);
+	public static double getDouble(String key, TXMResult result, String nodeQualifier)	{
+		return getDouble(key, nodeQualifier, result, 0.0d);
 	}
-	
+
+
 	/**
-	 * 
+	 *
 	 * @param nodeQualifier
 	 * @param key
 	 * @return
 	 */
-	public static double getDouble(String nodeQualifier, String key)	{
-		double defaultValue = DefaultScope.INSTANCE.getNode(nodeQualifier).getDouble(key, 0.0d);
-		return getDouble(nodeQualifier, null, key, defaultValue);
+	public static double getDouble(String key, String nodeQualifier)	{
+		return getDouble(key, null, nodeQualifier);
 	}
 
+
 	/**
-	 * 
+	 *
 	 * @param result
 	 * @param key
 	 * @return
 	 */
-	public static double getDouble(ITXMResult result, String key, double defaultValue)	{
-		return getDouble(null, result, key, defaultValue);
+	public static double getDouble(String key, TXMResult result)	{
+		return getDouble(key, result, null);
 	}
-		
+
+
 	/**
 	 * Stores a pairs of key / value in a local node dedicated to the specified result. The node qualifier is generated by the <code>Object.toString()</code> method.
 	 * @param result
 	 * @param key
 	 * @param value
 	 */
-	public static void putLocalFloat(ITXMResult result, String key, float value)	{
-		scope.getNode(getId(result)).putFloat(key, value);
+	public static void putLocalFloat(TXMResult result, String key, float value)	{
+		scope.getNode(result.getUUID()).putFloat(key, value);
 	}
+
+
+	/**
+	 * Looks for the value of the specified <code>key</code> in the specified parameters and preference nodes.
+	 * Returns the value of a key in the specified parameters if exists.
+	 * Otherwise try to get it from the local result node if exists.
+	 * Otherwise try to get it from the specified node qualifier if exists.
+	 * Otherwise try to get it from the specified alternative node qualifiers defined in the list <code>TXMPreferences.alternativeNodesQualifiers</code>.
+	 * Returns 0f if no value has been found for the specified key.
+	 * @param commandParameters
+	 * @param nodeQualifier
+	 * @param result
+	 * @param key
+	 * @return
+	 */
+	public static float getFloat(String key, TXMParameters commandParameters, TXMResult result, String nodeQualifier)	{
+		if(commandParameters != null && commandParameters.get(key) != null)	{
+			return (Float) commandParameters.get(key);
+		}
+		return getFloat(key, result, nodeQualifier);
+	}
+
+	public static float getFloat(String key, TXMParameters commandParameters, TXMResult result)	{
+		return getFloat(key, commandParameters, result, result.getPreferencesNodeQualifier());
+	}
 	
 	/**
 	 * Looks for the value of the specified <code>key</code> in preference nodes.
 	 * Returns the value of the local result node if exists.
 	 * Otherwise try to get it from the specified node qualifier if exists.
 	 * Otherwise try to get it from the specified alternative node qualifiers defined in the list <code>TXMPreferences.alternativeNodesQualifiers</code>.
-	 * Returns -1 if no value has been found for the specified key.
+	 * Returns defaultValue if no value has been found for the specified key.
 	 * @param nodeQualifier
 	 * @param result
 	 * @param key
 	 * @return
 	 */
-	public static float getFloat(String nodeQualifier, ITXMResult result, String key, float defaultValue)	{
+	public static float getFloat(String key, String nodeQualifier, TXMResult result, float defaultValue)	{
+		nodeQualifier = findNodeQualifier(nodeQualifier, result, key);
 
-		nodeQualifier = findNodeQualifier(nodeQualifier, result, key);
-		return  scope.getNode(nodeQualifier).getFloat(key, defaultValue);
+		defaultValue = DefaultScope.INSTANCE.getNode(nodeQualifier).getFloat(key, defaultValue);
+		return scope.getNode(nodeQualifier).getFloat(key, defaultValue);
 	}
 
-	
+
 	/**
 	 * Looks for the value of the specified <code>key</code> in preference nodes.
 	 * Returns the value of the local result node if exists.
 	 * Otherwise try to get it from the specified node qualifier if exists.
 	 * Otherwise try to get it from the specified alternative node qualifiers defined in the list <code>TXMPreferences.alternativeNodesQualifiers</code>.
-	 * Returns -1 if no value has been found for the specified key.
+	 * Returns 0f if no value has been found for the specified key.
 	 * @param nodeQualifier
 	 * @param result
 	 * @param key
 	 * @return
 	 */
-	public static float getFloat(String nodeQualifier, ITXMResult result, String key)	{
+	public static float getFloat(String key, TXMResult result, String nodeQualifier)	{
+		return getFloat(key, nodeQualifier, result, 0f);
+	}
 
-		nodeQualifier = findNodeQualifier(nodeQualifier, result, key);
-		float defaultValue = DefaultScope.INSTANCE.getNode(nodeQualifier).getFloat(key, 0f);
-		return  scope.getNode(nodeQualifier).getFloat(key, defaultValue);
-	}
-	
-	
+
 	/**
-	 * 
+	 *
 	 * @param nodeQualifier
 	 * @param key
 	 * @return
 	 */
-	public static float getFloat(String nodeQualifier, String key)	{
-		return getFloat(nodeQualifier, null, key, 0f);
+	public static float getFloat(String key, String nodeQualifier)	{
+		return getFloat(key, null, nodeQualifier);
 	}
-	
-	
+
 	/**
-	 * 
+	 *
 	 * @param result
 	 * @param key
 	 * @return
 	 */
-	public static float getFloat(ITXMResult result, String key)	{
-		return getFloat(null, result, key, 0f);
+	public static float getFloat(String key, TXMResult result)	{
+		return getFloat(key, result, null);
 	}
 
-	
+
 	/**
 	 * Checks if a local node exists for the specified TXM result.
 	 * @param result
 	 * @return <code>true</code> if the node exists, otherwise <code>false</code>
 	 */
-	public static boolean resultScopeNodeExists(ITXMResult result)	{
+	public static boolean resultScopeNodeExists(TXMResult result)	{
 		if(result == null)	{
 			return false;
 		}
-		return scope.getNode(getId(result)) != null;
+		return scope.getNode(result.getUUID()) != null;
 	}
-	
+
 	/**
 	 * Checks if a key exists in the local node for the specified TXM result.
 	 * @param result
 	 * @param key
 	 * @return <code>true</code> if the node and the key exist, otherwise <code>false</code>
 	 */
-	public static boolean resultScopeKeyExists(ITXMResult result, String key)	{
-		return keyExists(getId(result), key);
+	public static boolean resultScopeKeyExists(TXMResult result, String key)	{
+		return keyExists(result.getUUID(), key);
 	}
 
 	/**
@@ -414,7 +716,7 @@
 		return false;
 	}
 
-	
+
 	/**
 	 * Checks if a preference is defined as empty.
 	 * Can be used to determine whatever a functionality is available or not by overriding the preference as empty.
@@ -424,10 +726,10 @@
 	 * @return
 	 */
 	public static boolean isEmpty(String nodeQualifier, String key)	{
-		return getString(nodeQualifier, key).equals("");
+		return getString(key, nodeQualifier).equals("");
 	}
 
-	
+
 	/**
 	 * Sets a preference as empty.
 	 * Can be used to determine whatever a functionality is available or not by overriding the preference as empty.
@@ -438,8 +740,8 @@
 	public static void setEmpty(String nodeQualifier, String key)	{
 		scope.getNode(nodeQualifier).put(key, "");
 	}
-	
-	
+
+
 	/**
 	 * Dumps the keys and values of the specified node.
 	 * @param nodeQualifier
@@ -458,23 +760,23 @@
 			e.printStackTrace();
 		}
 	}
-	
 
+
 	/**
 	 * Dumps the keys and values of the specified node, of the specified result node and also of the alternative nodes.
 	 * @param nodeQualifier
 	 * @param result
 	 */
-	public static void dump(String nodeQualifier, ITXMResult result)	{
-		
+	public static void dump(String nodeQualifier, TXMResult result)	{
+
 		// result scope node
 		if(result != null)	{
 			if(resultScopeNodeExists(result))	{
-				System.out.println("TXMPreferences.dump(): Result scope preferences for node " + getId(result) + ":");
-				dump(getId(result));
+				System.out.println("TXMPreferences.dump(): Result scope preferences for node " + result.getUUID() + ":");
+				dump(result.getUUID());
 			}
 			else	{
-				System.out.println("TXMPreferences.dump(): No result scope preferences was found for node" + getId(result) + ".");
+				System.out.println("TXMPreferences.dump(): No result scope preferences was found for node" + result.getUUID() + ".");
 			}
 		}
 		// command scope node
@@ -485,52 +787,61 @@
 		else	{
 			System.out.println("TXMPreferences.dump(): No Command scope was asked to dump.");
 		}
-		
+
 		// alternative global scope nodes
 		for(int i = 0; i < alternativeNodesQualifiers.size(); i++) {
 			System.out.println("TXMPreferences.dump(): Alternative global scope preferences for node " + alternativeNodesQualifiers.get(i) + ":");
 			dump(alternativeNodesQualifiers.get(i));
 		}
 	}
-	
-	
+
+
 	/**
-	 * Save the local preferences to file.
+	 * Saves the local preferences to file.
 	 * @param result
 	 */
-	public static void flush(ITXMResult result)	{
+	public static void flush(TXMResult result)	{
 		try {
-			System.err.println("TXMPreferences.flush(): Local preferences for object " + getId(result) + " saved to file.");
+			System.err.println("TXMPreferences.flush(): Local preferences for object " + result.getUUID() + " saved to file.");
 			// FIXME: useless?
 			//scope.getNode(getId(result)).sync();
-			scope.getNode(getId(result)).flush();
+			scope.getNode(result.getUUID()).flush();
 		}
 		catch(BackingStoreException e) {
 			// TODO Auto-generated catch block
 			e.printStackTrace();
 		}
 	}
-	
+
 	/**
-	 * Gets a unique Id for the object.
-	 * @param object
+	 * Deletes the local node if exists.
+	 * @param result
 	 */
-	public static String getId(ITXMResult object)	{
-		return object.getClass().getName() + '@' + Integer.toHexString(object.hashCode());
+	public static void delete(TXMResult result)	{
+		try {
+			System.err.println("TXMPreferences.delete() Local preferences for object " + result.getUUID() + " deleted.");
+			scope.getNode(result.getUUID()).removeNode();
+		}
+		catch(BackingStoreException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
 	}
 
+
+
 	/**
 	 * Internal method to find the node qualifier of a result otherwise look in instance, default scopes and in alternatives nodes qualifiers.
 	 * @param result
 	 * @param key
 	 */
-	public static String findNodeQualifier(String nodeQualifier, ITXMResult result, String key)	{
-		
+	public static String findNodeQualifier(String nodeQualifier, TXMResult result, String key)	{
+
 		boolean keyExists = (result != null && resultScopeKeyExists(result, key));
 
 		// get the result scope preference
 		if(keyExists)	{
-			nodeQualifier = getId(result);
+			nodeQualifier = result.getUUID();
 		}
 		// look in the global alternative preferences nodes
 		else if(!keyExists(nodeQualifier, key))	{
@@ -541,12 +852,20 @@
 				}
 			}
 		}
-		
+
+		if(nodeQualifier == null)	{
+			try {
+				System.err.println("TXMPreferences.findNodeQualifier(): no node qualifier has been founded (key = " + key + ", TXMResult = " + result + ").");
+			}
+			catch(Exception e) {
+			}
+		}
+
 		return nodeQualifier;
 	}
-	
+
 	/**
-	 * 
+	 *
 	 * @param nodeQualifier
 	 * @param key
 	 * @param value
@@ -554,13 +873,13 @@
 	public static void put(String nodeQualifier, String key, String value) {
 		scope.getNode(nodeQualifier).put(key, value);
 	}
-	
+
 	public static void putString(String nodeQualifier, String key, String value) {
 		scope.getNode(nodeQualifier).put(key, value);
 	}
 
 	/**
-	 * 
+	 *
 	 * @param nodeQualifier
 	 * @param key
 	 * @param value
@@ -570,7 +889,7 @@
 	}
 
 	/**
-	 * 
+	 *
 	 * @param nodeQualifier
 	 * @param key
 	 * @param value
@@ -580,7 +899,7 @@
 	}
 
 	/**
-	 * 
+	 *
 	 * @param nodeQualifier
 	 * @param key
 	 * @param value
@@ -590,7 +909,7 @@
 	}
 
 	/**
-	 * 
+	 *
 	 * @param nodeQualifier
 	 * @param key
 	 * @param value
@@ -600,7 +919,7 @@
 	}
 
 	/**
-	 * 
+	 *
 	 * @param nodeQualifier
 	 * @param key
 	 * @param value
@@ -610,7 +929,7 @@
 	}
 
 	/**
-	 * 
+	 *
 	 * @param nodeQualifier
 	 * @param key
 	 * @param value
@@ -620,20 +939,59 @@
 	}
 
 
-
-	public static String getNode(String preferenceName) {
-		// TODO Auto-generated method stub
-		return null;
+	/**
+	 * Stores the specified parameters pairs of key / value in a local node dedicated to the specified result. The node qualifier is generated by the <code>Object.toString()</code> method.
+	 * @param result
+	 * @param parameters
+	 */
+	public static void putLocalParameters(TXMResult result, TXMParameters parameters)	{
+		Set keys = parameters.keySet();
+		Iterator it = keys.iterator();
+		while (it.hasNext()){
+		Object key = it.next();
+		Object value = parameters.get(key);
+		if(value != null)	{
+			putLocal(result, (String) key, value);
+		}
+		}
 	}
 
+	/**
+	 * Stores the specified parameters pairs of key / value in a local node dedicated to the specified result. The node qualifier is generated by the <code>Object.toString()</code> method.
+	 * @param result
+	 * @param key
+	 * @param value
+	 */
+	public static void putLocal(TXMResult result, String key, Object value)	{
 
+		if(Integer.class.isInstance(value))	{
+			putLocalInt(result, key, (Integer) value);
+		}
+		else if(Double.class.isInstance(value))	{
+			putLocalDouble(result, key, (Double) value);
+		}
+		else if(Float.class.isInstance(value))	{
+			putLocalFloat(result, key, (Float) value);
+		}
+		else if(Long.class.isInstance(value))	{
+			putLocalLong(result, key, (Long) value);
+		}
+		else if(String.class.isInstance(value))	{
+			putLocalString(result, key, (String) value);
+		}
+		else if(Boolean.class.isInstance(value))	{
+			putLocalBoolean(result, key, (Boolean) value);
+		}
 
-	
+		//FIXME: Debug
+		System.err.println("TXMPreferences.putLocal(): error, can't find a put method that matches the value type: " + value.getClass() + " .");
+	}
+
 	//FIXME: this code is dedicated to dynamically retrieve the static field PREFERENCES_NODE of the runtime subclass and use it super class to avoid to pass it to all methods.
 	// eg. to use ProgressionPreferences.getBoolean("test") instead of TXMPreferences.getBoolean(ProgressionPreferences.PREFERENCES_NODE, "test")
 	// but it doesn"t work, need to continue the tests...
 //	/**
-//	 * 
+//	 *
 //	 * @author sjacquot
 //	 *
 //	 */
@@ -646,21 +1004,21 @@
 //		    return getClassContext()[2];
 //		  }
 //		}
-//	
 //
+//
 //	/**
 //	 * Gets the static field PREFERENCES_NODE of the runtime subclass.
-//	 * Convenience method to avoid to pass it to all methods. 
+//	 * Convenience method to avoid to pass it to all methods.
 //	 * @return
 //	 */
 //	public static String getNodeQualifier()	{
 //        String runtimeSubClassNodeQualifier  = null;
 //        try {
-//        	
+//
 //        	//System.err.println("TXMPreferences.getNodeQualifier() class name using thread stack = " + Thread.currentThread().getStackTrace()[1].getClassName());
 //        	System.err.println("TXMPreferences.getNodeQualifier() class name using encolsing class = " + new Object() { }.getClass().getEnclosingClass());
-//        	
-//        	
+//
+//
 //        	Class c = new CurrentClassGetter().getCurrentClass();
 //        	System.out.println("TXMPreferences.getNodeQualifier(): class = " + c);
 //            Field f = c.getDeclaredField("PREFERENCES_NODE");
@@ -685,33 +1043,33 @@
 //            // TODO Auto-generated catch block
 //            e.printStackTrace();
 //        }
-//        
+//
 //		//System.out.println("TXMPreferences.getNodeQualifier() runtime class: " + );
-////    	// FIXME: new tests with bundles context class loading		
+////    	// FIXME: new tests with bundles context class loading
 ////		HashSet<ClassLoader> loaders = new HashSet<ClassLoader>();
 ////		BundleContext bundleContext = InternalPlatform.getDefault().getBundleContext();
-////		
+////
 ////		for (Bundle b : bundleContext.getBundles()) {
 ////			BundleWiring bundleWiring = b.adapt(BundleWiring.class);
 ////			loaders.add(bundleWiring.getClassLoader());
-////			
+////
 ////			//FIXME: debug
 ////			System.out.println("GSERunner.createGSERunner(): class loader added: " + bundleWiring.getClassLoader());
 ////		}
-////        
-//        
+////
+//
 //        return runtimeSubClassNodeQualifier;
 //	}
-//	
-//	
+//
+//
 //	public static String getString(String key)	{
 ////		Class c = new CurrentClassGetter().getCurrentClass();
 ////		System.out.println("TXMPreferences.getString(): class = " + c);
 //		return getString(getNodeQualifier(), key);
 //	}
-//	
+//
 ////	/**
-////	 * 
+////	 *
 ////	 * @param key
 ////	 * @return
 ////	 */
@@ -720,5 +1078,5 @@
 ////	}
 ////
 	//end of fixme
-	
-}
\ No newline at end of file
+
+}
Index: tmp/org.txm.core/src/java/org/txm/core/preferences/TBXPreferences.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/core/preferences/TBXPreferences.java	(revision 446)
+++ tmp/org.txm.core/src/java/org/txm/core/preferences/TBXPreferences.java	(revision 447)
@@ -142,7 +142,7 @@
 		preferences.put(TBXPreferences.CQP_EMPTY_VALUE_CODE, ""); //$NON-NLS-1$
 		preferences.put(TBXPreferences.UI_LOCALE, "fr"); //$NON-NLS-1$
 		preferences.put(TBXPreferences.TREETAGGER_INSTALL_PATH, System.getProperty("osgi.user.area") + "/TXM/treetagger"); //$NON-NLS-1$ //$NON-NLS-2$
-		preferences.put(TBXPreferences.TREETAGGER_MODELS_PATH, TXMPreferences.getString(TBXPreferences.class.getCanonicalName(),TBXPreferences.TREETAGGER_INSTALL_PATH) + "/models"); //$NON-NLS-1$
+		preferences.put(TBXPreferences.TREETAGGER_MODELS_PATH, TXMPreferences.getString(TBXPreferences.TREETAGGER_INSTALL_PATH, TBXPreferences.PREFERENCES_NODE) + "/models"); //$NON-NLS-1$
 		preferences.put(TBXPreferences.TREETAGGER_APOSTROPHE, "false"); //$NON-NLS-1$
 		preferences.put(TBXPreferences.METADATA_ENCODING, "UTF-8"); //$NON-NLS-1$
 		preferences.put(TBXPreferences.METADATA_TXTSEPARATOR, "\""); //$NON-NLS-1$
