Index: trunk/autoquest-ui-core/.classpath
===================================================================
--- trunk/autoquest-ui-core/.classpath	(revision 914)
+++ trunk/autoquest-ui-core/.classpath	(revision 914)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target/classes" path="src/main/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" output="target/test-classes" path="src/test/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry including="**/*.java" kind="src" path="src/main/resources"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>
Index: trunk/autoquest-ui-core/.project
===================================================================
--- trunk/autoquest-ui-core/.project	(revision 914)
+++ trunk/autoquest-ui-core/.project	(revision 914)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>quest-ui-core</name>
+	<comment></comment>
+	<projects>
+		<project>Build</project>
+		<project>EventBenchCore</project>
+		<project>JavaHelperLib</project>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>net.sourceforge.metrics.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.m2e.core.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>net.sourceforge.metrics.nature</nature>
+	</natures>
+</projectDescription>
Index: trunk/autoquest-ui-core/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/autoquest-ui-core/.settings/org.eclipse.jdt.core.prefs	(revision 914)
+++ trunk/autoquest-ui-core/.settings/org.eclipse.jdt.core.prefs	(revision 914)
@@ -0,0 +1,12 @@
+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.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.6
Index: trunk/autoquest-ui-core/.settings/org.eclipse.m2e.core.prefs
===================================================================
--- trunk/autoquest-ui-core/.settings/org.eclipse.m2e.core.prefs	(revision 914)
+++ trunk/autoquest-ui-core/.settings/org.eclipse.m2e.core.prefs	(revision 914)
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
Index: trunk/autoquest-ui-core/pom.xml
===================================================================
--- trunk/autoquest-ui-core/pom.xml	(revision 914)
+++ trunk/autoquest-ui-core/pom.xml	(revision 914)
@@ -0,0 +1,74 @@
+<project
+  xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+>
+  <parent>
+    <groupId>de.ugoe.cs.quest</groupId>
+    <artifactId>quest</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>quest-ui-core</artifactId>
+  <name>quest-ui-core</name>
+  <scm>
+    <url>${quest-scm-trunk-dir}/quest-ui-core</url>
+  </scm>
+  <dependencies>
+    <dependency>
+      <groupId>de.ugoe.cs</groupId>
+      <artifactId>java-utils</artifactId>
+      <version>0.0.1-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>de.ugoe.cs.quest</groupId>
+      <artifactId>quest-misc</artifactId>
+      <version>${project.parent.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>de.ugoe.cs.quest</groupId>
+      <artifactId>quest-core-events</artifactId>
+      <version>${project.parent.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>de.ugoe.cs.quest</groupId>
+      <artifactId>quest-core-usageprofiles</artifactId>
+      <version>${project.parent.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>de.ugoe.cs.quest</groupId>
+      <artifactId>quest-core-coverage</artifactId>
+      <version>${project.parent.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>de.ugoe.cs.quest</groupId>
+      <artifactId>quest-core-assertions</artifactId>
+      <version>${project.parent.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>de.ugoe.cs.quest</groupId>
+      <artifactId>quest-core-testgeneration</artifactId>
+      <version>0.0.1-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>de.ugoe.cs.quest</groupId>
+      <artifactId>quest-core-tasktrees</artifactId>
+      <version>${project.parent.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>de.ugoe.cs.quest</groupId>
+      <artifactId>quest-core-usability</artifactId>
+      <version>${project.parent.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>net.sf.jung</groupId>
+      <artifactId>jung-visualization</artifactId>
+      <version>2.0.1</version>
+    </dependency>
+    <dependency>
+      <groupId>net.sf.jung</groupId>
+      <artifactId>jung-graph-impl</artifactId>
+      <version>2.0.1</version>
+    </dependency>
+  </dependencies>
+</project>
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDdeleteObject.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDdeleteObject.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDdeleteObject.java	(revision 914)
@@ -0,0 +1,48 @@
+package de.ugoe.cs.quest.commands.misc;
+
+import java.util.List;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command to delete object from {@link GlobalDataContainer}.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDdeleteObject implements Command {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "deleteObject <objectname>";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@Override
+	public void run(List<Object> parameters) {
+		String objectName;
+		try {
+			objectName = (String) parameters.get(0);
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+		boolean deleted = GlobalDataContainer.getInstance().removeData(
+				objectName);
+		if (!deleted) {
+			CommandHelpers.objectNotFoundMessage(objectName);
+		}
+	}
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDload.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDload.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDload.java	(revision 914)
@@ -0,0 +1,60 @@
+package de.ugoe.cs.quest.commands.misc;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.util.List;
+
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.Console;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command that loads a previously serialized {@link GlobalDataContainer}.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDload implements Command {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@Override
+	public void run(List<Object> parameters) {
+		String filename;
+		try {
+			filename = (String) parameters.get(0);
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+
+		FileInputStream fis = null;
+		ObjectInputStream in = null;
+		try {
+			fis = new FileInputStream(filename);
+			in = new ObjectInputStream(fis);
+			in.readObject();
+			in.close();
+		} catch (IOException ex) {
+			Console.logException(ex);
+		} catch (ClassNotFoundException ex) {
+			Console.logException(ex);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "load <filename>";
+	}
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDloadObject.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDloadObject.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDloadObject.java	(revision 914)
@@ -0,0 +1,68 @@
+package de.ugoe.cs.quest.commands.misc;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.util.List;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.Console;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command to load a previously serialized object and store it in the
+ * {@link GlobalDataContainer}.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDloadObject implements Command {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@Override
+	public void run(List<Object> parameters) {
+		String filename;
+		String objectName;
+		try {
+			filename = (String) parameters.get(0);
+			objectName = (String) parameters.get(1);
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+
+		Object data = null;
+		FileInputStream fis = null;
+		ObjectInputStream in = null;
+		try {
+			fis = new FileInputStream(filename);
+			in = new ObjectInputStream(fis);
+			data = in.readObject();
+			in.close();
+		} catch (IOException ex) {
+			Console.logException(ex);
+		} catch (ClassNotFoundException ex) {
+			Console.logException(ex);
+		}
+		if (GlobalDataContainer.getInstance().addData(objectName, data)) {
+			CommandHelpers.dataOverwritten(objectName);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "loadObject <filename> <objectName>";
+	}
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDsave.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDsave.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDsave.java	(revision 914)
@@ -0,0 +1,58 @@
+package de.ugoe.cs.quest.commands.misc;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.ObjectOutputStream;
+import java.util.List;
+
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.Console;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command to save the {@link GlobalDataContainer} through serialization.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDsave implements Command {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@Override
+	public void run(List<Object> parameters) {
+		String filename;
+		try {
+			filename = (String) parameters.get(0);
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+
+		FileOutputStream fos = null;
+		ObjectOutputStream out = null;
+		try {
+			fos = new FileOutputStream(filename);
+			out = new ObjectOutputStream(fos);
+			out.writeObject(GlobalDataContainer.getInstance());
+			out.close();
+		} catch (IOException ex) {
+			Console.logException(ex);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "save <filename>";
+	}
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDsaveObject.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDsaveObject.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDsaveObject.java	(revision 914)
@@ -0,0 +1,69 @@
+package de.ugoe.cs.quest.commands.misc;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.ObjectOutputStream;
+import java.util.List;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.Console;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command that saves an object contained in the {@link GlobalDataContainer}
+ * through serialization.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDsaveObject implements Command {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@Override
+	public void run(List<Object> parameters) {
+		String filename;
+		String objectName;
+		try {
+			filename = (String) parameters.get(0);
+			objectName = (String) parameters.get(1);
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+
+		Object dataObject = GlobalDataContainer.getInstance().getData(
+				objectName);
+		if (dataObject == null) {
+			CommandHelpers.objectNotFoundMessage(objectName);
+			return;
+		}
+
+		FileOutputStream fos = null;
+		ObjectOutputStream out = null;
+		try {
+			fos = new FileOutputStream(filename);
+			out = new ObjectOutputStream(fos);
+			out.writeObject(dataObject);
+			out.close();
+		} catch (IOException ex) {
+			Console.logException(ex);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "saveObject <filename> <objectName>";
+	}
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDshowTimer.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDshowTimer.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDshowTimer.java	(revision 914)
@@ -0,0 +1,60 @@
+package de.ugoe.cs.quest.commands.misc;
+
+import java.util.List;
+import java.util.logging.Level;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.Console;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command to show the time elapsed since a timer has been started.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDshowTimer implements Command {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@Override
+	public void run(List<Object> parameters) {
+		String timerName;
+		try {
+			timerName = (String) parameters.get(0);
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+
+		Object dataObject = GlobalDataContainer.getInstance().getData(timerName);
+		if (dataObject == null) {
+			CommandHelpers.objectNotFoundMessage(timerName);
+			return;
+		}
+		if (!(dataObject instanceof Long)) {
+			CommandHelpers.objectNotType(timerName, "Long");
+			return;
+		}
+
+		long startTime = (Long) dataObject;
+		long currentTime = System.currentTimeMillis();
+		Console.traceln(Level.INFO, "" + (currentTime - startTime) + " milliseconds");
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "showTimer <timerName>";
+	}
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDstartFileListener.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDstartFileListener.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDstartFileListener.java	(revision 914)
@@ -0,0 +1,51 @@
+package de.ugoe.cs.quest.commands.misc;
+
+import java.util.List;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.FileOutputListener;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command to start a {@link FileOutputListener}.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDstartFileListener implements Command {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@Override
+	public void run(List<Object> parameters) {
+		String filename;
+		try {
+			filename = (String) parameters.get(0);
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+
+		FileOutputListener listener = new FileOutputListener(filename);
+		listener.start();
+		if (GlobalDataContainer.getInstance().addData(filename, listener)) {
+			CommandHelpers.dataOverwritten(filename);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "startFileListener <filename>";
+	}
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDstartTimer.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDstartTimer.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDstartTimer.java	(revision 914)
@@ -0,0 +1,48 @@
+package de.ugoe.cs.quest.commands.misc;
+
+import java.util.List;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command to start a time.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDstartTimer implements Command {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@Override
+	public void run(List<Object> parameters) {
+		String timerName;
+		try {
+			timerName = (String) parameters.get(0);
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+		Long time = System.currentTimeMillis();
+		if (GlobalDataContainer.getInstance().addData(timerName, time)) {
+			CommandHelpers.dataOverwritten(timerName);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "startTimer <timerName>";
+	}
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDstopFileListener.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDstopFileListener.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/misc/CMDstopFileListener.java	(revision 914)
@@ -0,0 +1,49 @@
+package de.ugoe.cs.quest.commands.misc;
+
+import java.util.List;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.FileOutputListener;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command to stop a {@link FileOutputListener}.
+ * </p>
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDstopFileListener implements Command {
+
+	@Override
+	public void run(List<Object> parameters) {
+		String filename;
+		try {
+			filename = (String) parameters.get(0);
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+
+		Object dataObject = GlobalDataContainer.getInstance().getData(filename);
+		if( dataObject==null ) {
+			CommandHelpers.objectNotFoundMessage(filename);
+			return;
+		}
+		if( !(dataObject instanceof FileOutputListener) ) {
+			CommandHelpers.objectNotType(filename, "FileOutputListener");
+			return;
+		}
+		
+		FileOutputListener listener = (FileOutputListener) dataObject;
+		listener.stop();
+		GlobalDataContainer.getInstance().removeData(filename);
+	}
+
+	@Override
+	public String help() {
+		return "stopFileListener <filename>";
+
+	}
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDcondenseGuiModel.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDcondenseGuiModel.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDcondenseGuiModel.java	(revision 914)
@@ -0,0 +1,59 @@
+
+package de.ugoe.cs.quest.commands.sequences;
+
+import java.util.List;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.quest.eventcore.guimodel.GUIModel;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command to condense the GUI model of a sequence, i.e., merge duplicate nodes.
+ * </p>
+ * 
+ * @version 1.0
+ * @author Steffen Herbold
+ */
+public class CMDcondenseGuiModel implements Command {
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+     */
+    @Override
+    public void run(List<Object> parameters) {
+        String sequencesName = "sequences";
+
+        if (parameters.size() > 0) {
+            sequencesName = (String) parameters.get(0);
+        }
+
+        Object dataObject = GlobalDataContainer.getInstance().getData(sequencesName + "_targets");
+        if (dataObject == null) {
+            CommandHelpers.objectNotFoundMessage(sequencesName + "_targets");
+            return;
+        }
+        if (!(dataObject instanceof GUIModel)) {
+            CommandHelpers.objectNotType(sequencesName, "GUIModel");
+            return;
+        }
+
+        GUIModel model = (GUIModel) dataObject;
+
+        model.condenseModel();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#help()
+     */
+    @Override
+    public String help() {
+        return "condenseGuiModel {<sequencesName>}";
+    }
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDcondenseMouseClicks.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDcondenseMouseClicks.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDcondenseMouseClicks.java	(revision 914)
@@ -0,0 +1,86 @@
+
+package de.ugoe.cs.quest.commands.sequences;
+
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.quest.SequenceInstanceOf;
+import de.ugoe.cs.quest.eventcore.Event;
+import de.ugoe.cs.quest.eventcore.gui.MouseClickCondenser;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * This command condenses mouse clicks, i.e. it reduces a sequence of mouse button down,
+ * mouse button up and mouse click with the same button on the same event target to a single
+ * mouse click with that button on that target. The mouse button down and mouse button up events
+ * are discarded.
+ * </p>
+ * 
+ * @author Patrick Harms
+ * @version 1.0
+ */
+public class CMDcondenseMouseClicks implements Command {
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#help()
+     */
+    @Override
+    public String help() {
+        return "condenseMouseClicks <sequences> {<new sequences>}";
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+     */
+    @SuppressWarnings("unchecked")
+    @Override
+    public void run(List<Object> parameters) {
+        String sequencesName;
+        String newSequencesName;
+        try {
+            sequencesName = (String) parameters.get(0);
+            if (parameters.size() > 1) {
+                newSequencesName = (String) parameters.get(1);
+            }
+            else {
+                newSequencesName = sequencesName;
+            }
+        }
+        catch (Exception e) {
+            throw new IllegalArgumentException("must provide a sequences name");
+        }
+
+        Collection<List<Event>> sequences = null;
+        Object dataObject = GlobalDataContainer.getInstance().getData(sequencesName);
+        if (dataObject == null) {
+            CommandHelpers.objectNotFoundMessage(sequencesName);
+            return;
+        }
+        if (!SequenceInstanceOf.isCollectionOfSequences(dataObject)) {
+            CommandHelpers.objectNotType(sequencesName, "Collection<List<Event<?>>>");
+            return;
+        }
+
+        sequences = (Collection<List<Event>>) dataObject;
+
+        Collection<List<Event>> newSequences = new LinkedList<List<Event>>();
+        
+        for (List<Event> sequence : sequences) {
+            newSequences.add(new MouseClickCondenser().condenseMouseClicks(sequence));
+        }
+
+        if (GlobalDataContainer.getInstance().addData(newSequencesName, newSequences)) {
+            CommandHelpers.dataOverwritten(newSequencesName);
+        }
+        
+    }
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDcorrectKeyInteractionTargets.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDcorrectKeyInteractionTargets.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDcorrectKeyInteractionTargets.java	(revision 914)
@@ -0,0 +1,87 @@
+
+package de.ugoe.cs.quest.commands.sequences;
+
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.quest.SequenceInstanceOf;
+import de.ugoe.cs.quest.eventcore.Event;
+import de.ugoe.cs.quest.eventcore.gui.KeyInteractionTargetCorrector;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * This command iterates the provided sequences and sets the target of all key interaction events
+ * to the GUI element having the current keyboard focus. The current keyboard focus is determined
+ * either by keyboard focus events or by using the target of the first key interaction in a
+ * sequence. Events changing the keyboard focus are discarded herewith.
+ * </p>
+ * 
+ * @author Patrick Harms
+ * @version 1.0
+ */
+public class CMDcorrectKeyInteractionTargets implements Command {
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#help()
+     */
+    @Override
+    public String help() {
+        return "correctKeyInteractionTargets <sequences> {<new sequences>}";
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+     */
+    @SuppressWarnings("unchecked")
+    @Override
+    public void run(List<Object> parameters) {
+        String sequencesName;
+        String newSequencesName;
+        try {
+            sequencesName = (String) parameters.get(0);
+            if (parameters.size() > 1) {
+                newSequencesName = (String) parameters.get(1);
+            }
+            else {
+                newSequencesName = sequencesName;
+            }
+        }
+        catch (Exception e) {
+            throw new IllegalArgumentException("must provide a sequences name");
+        }
+
+        Collection<List<Event>> sequences = null;
+        Object dataObject = GlobalDataContainer.getInstance().getData(sequencesName);
+        if (dataObject == null) {
+            CommandHelpers.objectNotFoundMessage(sequencesName);
+            return;
+        }
+        if (!SequenceInstanceOf.isCollectionOfSequences(dataObject)) {
+            CommandHelpers.objectNotType(sequencesName, "Collection<List<Event<?>>>");
+            return;
+        }
+
+        sequences = (Collection<List<Event>>) dataObject;
+
+        Collection<List<Event>> newSequences = new LinkedList<List<Event>>();
+        
+        for (List<Event> sequence : sequences) {
+            newSequences.add
+                (new KeyInteractionTargetCorrector().correctKeyInteractionTargets(sequence));
+        }
+
+        if (GlobalDataContainer.getInstance().addData(newSequencesName, newSequences)) {
+            CommandHelpers.dataOverwritten(newSequencesName);
+        }
+        
+    }
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDdetectTextInputEvents.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDdetectTextInputEvents.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDdetectTextInputEvents.java	(revision 914)
@@ -0,0 +1,104 @@
+
+package de.ugoe.cs.quest.commands.sequences;
+
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.quest.SequenceInstanceOf;
+import de.ugoe.cs.quest.eventcore.Event;
+import de.ugoe.cs.quest.eventcore.gui.KeyPressed;
+import de.ugoe.cs.quest.eventcore.gui.KeyReleased;
+import de.ugoe.cs.quest.eventcore.gui.KeyTyped;
+import de.ugoe.cs.quest.eventcore.gui.TextInput;
+import de.ugoe.cs.quest.eventcore.gui.TextInput.TextEquality;
+import de.ugoe.cs.quest.eventcore.gui.TextInputDetector;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.Console;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command that converts {@link KeyPressed}, {@link KeyReleased}, and {@link KeyTyped} sequences
+ * into {@link TextInput} events if possible.
+ * </p>
+ * 
+ * @author Patrick Harms
+ * @version 1.0
+ */
+public class CMDdetectTextInputEvents implements Command {
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#help()
+     */
+    @Override
+    public String help() {
+        return "detectTextInputEvents <sequences> {<new sequences>} {<textEqualityType>}";
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+     */
+    @SuppressWarnings("unchecked")
+    @Override
+    public void run(List<Object> parameters) {
+        String sequencesName;
+        String newSequencesName;
+        String textEqualityTypeString = "LEXICAL";
+        try {
+            sequencesName = (String) parameters.get(0);
+            if (parameters.size() > 1) {
+                newSequencesName = (String) parameters.get(1);
+            }
+            else {
+                newSequencesName = sequencesName;
+            }
+            if (parameters.size() > 2) {
+                textEqualityTypeString = (String) parameters.get(2);
+            }
+        }
+        catch (Exception e) {
+            throw new IllegalArgumentException("must provide a sequences name");
+        }
+
+        Collection<List<Event>> sequences = null;
+        Object dataObject = GlobalDataContainer.getInstance().getData(sequencesName);
+        if (dataObject == null) {
+            CommandHelpers.objectNotFoundMessage(sequencesName);
+            return;
+        }
+        if (!SequenceInstanceOf.isCollectionOfSequences(dataObject)) {
+            CommandHelpers.objectNotType(sequencesName, "Collection<List<Event<?>>>");
+            return;
+        }
+
+        TextEquality textEqualityType = null;
+        try {
+            textEqualityType = TextEquality.valueOf(textEqualityTypeString);
+        }
+        catch (IllegalArgumentException e) {
+            Console
+                .printerrln("Invalid mode. Only LEXICAL, SYNTACTICAL, and SEMANTICAL are allowed values!");
+            return;
+        }
+
+        sequences = (Collection<List<Event>>) dataObject;
+
+        Collection<List<Event>> newSequences = new LinkedList<List<Event>>();
+
+        for (List<Event> sequence : sequences) {
+            newSequences.add(new TextInputDetector(textEqualityType).detectTextInputs(sequence));
+        }
+
+        if (GlobalDataContainer.getInstance().addData(newSequencesName, newSequences)) {
+            CommandHelpers.dataOverwritten(newSequencesName);
+        }
+
+    }
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDgenerateReplayfile.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDgenerateReplayfile.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDgenerateReplayfile.java	(revision 914)
@@ -0,0 +1,198 @@
+package de.ugoe.cs.quest.commands.sequences;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.util.Collection;
+import java.util.List;
+import java.util.logging.Level;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.quest.IReplayDecorator;
+import de.ugoe.cs.quest.SequenceInstanceOf;
+import de.ugoe.cs.quest.eventcore.Event;
+import de.ugoe.cs.quest.eventcore.IReplayable;
+import de.ugoe.cs.util.StringTools;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.Console;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command to create a replay file from stored sessions.
+ * </p>
+ * 
+ * TODO: Add appropriate checks if Events are replayable
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDgenerateReplayfile implements Command {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "generateReplayfile <filename> <sequences>";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void run(List<Object> parameters) {
+		String filename;
+		String sequencesName;
+		try {
+			filename = (String) parameters.get(0);
+			sequencesName = (String) parameters.get(1);
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+
+		Collection<List<Event>> sequences = null;
+		Object dataObject = GlobalDataContainer.getInstance().getData(
+				sequencesName);
+		if (dataObject == null) {
+			CommandHelpers.objectNotFoundMessage(sequencesName);
+			return;
+		}
+		if (!SequenceInstanceOf.isCollectionOfSequences(dataObject)) {
+			CommandHelpers.objectNotType(sequencesName,
+					"Collection<List<Event<?>>>");
+			return;
+		}
+
+		sequences = (Collection<List<Event>>) dataObject;
+		createLogfileMultipleSessions(sequences, filename);
+	}
+	
+	    /**
+	     * <p>
+	     * {@link IReplayDecorator} to be used. If this field is {@code null}, no decorator is used.
+	     * Default: {@code null}
+	     * </p>
+	     */
+	    private IReplayDecorator decorator = null;
+
+	    /**
+	     * <p>
+	     * Id of the current session. The starting id is 1.
+	     * </p>
+	     */
+	    int sessionId = 1;
+
+	    /**
+	     * <p>
+	     * Creates a replay file that contains multiple event sequences.
+	     * </p>
+	     * 
+	     * @param sequences
+	     *            collection of event sequences from which the sessions are generated
+	     * @param filename
+	     *            name and path of the replay file
+	     */
+	    private void createLogfileMultipleSessions(Collection<List<Event>> sequences, String filename) {
+	        OutputStreamWriter writer = openReplayFile(filename);
+	        if (writer != null) {
+	            try {
+	                try {
+	                    decorator =
+	                        sequences.iterator().next().get(0).getReplayables().get(0).getDecorator();
+	                }
+	                catch (Exception e) {
+	                    // in the above line, many things can go wrong: emtpy sequences, null
+	                    // references, etc. However, all failures just indicate that no replay decorator
+	                    // should be used, hence, we ignore the exception
+	                }
+	                if (decorator != null) {
+	                    writer.write(decorator.getHeader());
+	                }
+	                for (List<Event> actions : sequences) {
+	                    writeSession(actions, writer);
+	                }
+	                if (decorator != null) {
+	                    writer.write(decorator.getFooter());
+	                }
+	                decorator = null;
+	                writer.close();
+	            }
+	            catch (IOException e) {
+	                Console.printerrln("Unable to write replay file " + filename);
+	            }
+	        }
+	    }
+
+	    /**
+	     * <p>
+	     * Helper function that opens the replay file for writing.
+	     * </p>
+	     * 
+	     * @param filename
+	     *            name and path of the replay file
+	     * @return {@link OutputStreamWriter} that writes to the replay file
+	     */
+	    private OutputStreamWriter openReplayFile(String filename) {
+	        File file = new File(filename);
+	        boolean fileCreated;
+	        try {
+	            fileCreated = file.createNewFile();
+	            if (!fileCreated) {
+	                Console.traceln(Level.INFO, "Created logfile " + filename);
+	            }
+	            else {
+	                Console.traceln(Level.INFO, "Overwrote existing logfile " + filename);
+	            }
+	        }
+	        catch (IOException e) {
+	            Console.printerrln("Unable to create file " + filename);
+	            Console.logException(e);
+	        }
+	        OutputStreamWriter writer = null;
+	        try {
+	            writer = new OutputStreamWriter(new FileOutputStream(file), "UTF-16");
+	        }
+	        catch (IOException e) {
+	            Console.printerrln("Unable to open file for writing (read-only file):" + filename);
+	            Console.logException(e);
+	        }
+	        return writer;
+	    }
+
+	    /**
+	     * <p>
+	     * Helper function that adds an event sequence to the replay.
+	     * </p>
+	     * 
+	     * @param actions
+	     *            event sequences to be added
+	     * @param writer
+	     *            {@link OutputStreamWriter} to which the replay is added
+	     * @throws IOException
+	     *             thrown if there is a problem writing to writer
+	     */
+	    private void writeSession(List<Event> actions, OutputStreamWriter writer) throws IOException {
+	        if (decorator != null) {
+	            writer.write(decorator.getSessionHeader(sessionId));
+	        }
+	        for (Event currentAction : actions) {
+
+	            List<? extends IReplayable> replayables = currentAction.getReplayables();
+	            for (IReplayable replayble : replayables) {
+	                writer.write(replayble.getReplay() + StringTools.ENDLINE);
+	                writer.flush();
+	            }
+	        }
+	        if (decorator != null) {
+	            writer.write(decorator.getSessionFooter(sessionId));
+	        }
+	        sessionId++;
+	    }
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDremoveStartEndSymbols.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDremoveStartEndSymbols.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDremoveStartEndSymbols.java	(revision 914)
@@ -0,0 +1,75 @@
+
+package de.ugoe.cs.quest.commands.sequences;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.quest.SequenceInstanceOf;
+import de.ugoe.cs.quest.eventcore.Event;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command to remove the {@link Event#STARTEVENT} and {@link Event#ENDEVENT} from a sequence.
+ * </p>
+ * 
+ * @version 1.0
+ * @author Steffen Herbold
+ */
+public class CMDremoveStartEndSymbols implements Command {
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+     */
+    @SuppressWarnings("unchecked")
+    @Override
+    public void run(List<Object> parameters) {
+        String sequencesName;
+        try {
+            sequencesName = (String) parameters.get(0);
+        }
+        catch (Exception e) {
+            throw new IllegalArgumentException();
+        }
+
+        Collection<List<Event>> sequences = null;
+        Object dataObject = GlobalDataContainer.getInstance().getData(sequencesName);
+        if (dataObject == null) {
+            CommandHelpers.objectNotFoundMessage(sequencesName);
+            return;
+        }
+        if (!SequenceInstanceOf.isCollectionOfSequences(dataObject)) {
+            CommandHelpers.objectNotType(sequencesName, "Collection<List<Event<?>>>");
+            return;
+        }
+
+        sequences = (Collection<List<Event>>) dataObject;
+
+        for (List<Event> sequence : sequences) {
+            Iterator<Event> iter = sequence.iterator();
+            while (iter.hasNext()) {
+                Event event = iter.next();
+                if (Event.ENDEVENT.equals(event) || Event.STARTEVENT.equals(event)) {
+                    iter.remove();
+                }
+            }
+        }
+
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#help()
+     */
+    @Override
+    public String help() {
+        return "removeStartEndSymbols <sequences>";
+    }
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDsequenceStatistics.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDsequenceStatistics.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDsequenceStatistics.java	(revision 914)
@@ -0,0 +1,82 @@
+package de.ugoe.cs.quest.commands.sequences;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map.Entry;
+import java.util.SortedMap;
+import java.util.TreeMap;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.quest.SequenceInstanceOf;
+import de.ugoe.cs.quest.eventcore.Event;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.Console;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command to print basic statistical information about stored sequences, e.g.,
+ * how many there are of which length.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDsequenceStatistics implements Command {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void run(List<Object> parameters) {
+		String sequencesName;
+		try {
+			sequencesName = (String) parameters.get(0);
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+
+		Collection<List<Event>> sequences = null;
+		Object dataObject = GlobalDataContainer.getInstance().getData(
+				sequencesName);
+		if (dataObject == null) {
+			CommandHelpers.objectNotFoundMessage(sequencesName);
+			return;
+		}
+		if (!SequenceInstanceOf.isCollectionOfSequences(dataObject)) {
+			CommandHelpers.objectNotType(sequencesName,
+					"Collection<List<Event<?>>>");
+			return;
+		}
+
+		sequences = (Collection<List<Event>>) dataObject;
+		Console.println("Number of Sequences: " + sequences.size());
+		SortedMap<Integer, Integer> lengthMap = new TreeMap<Integer, Integer>();
+		for (List<Event> sequence : sequences) {
+			Integer currentSize = sequence.size();
+			if (lengthMap.containsKey(currentSize)) {
+				lengthMap.put(currentSize, lengthMap.get(currentSize) + 1);
+			} else {
+				lengthMap.put(currentSize, 1);
+			}
+		}
+		for (Entry<Integer, Integer> entry : lengthMap.entrySet()) {
+			Console.println("Of length " + entry.getKey() + ": "
+					+ entry.getValue());
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "sequenceStatistics <sequencesName>";
+	}
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDsortKeyInteractions.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDsortKeyInteractions.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDsortKeyInteractions.java	(revision 914)
@@ -0,0 +1,121 @@
+
+package de.ugoe.cs.quest.commands.sequences;
+
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.logging.Level;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.quest.SequenceInstanceOf;
+import de.ugoe.cs.quest.eventcore.Event;
+import de.ugoe.cs.quest.eventcore.gui.KeyInteractionCorrector;
+import de.ugoe.cs.quest.eventcore.gui.KeyInteractionCorrector.CleanupMode;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.Console;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command to sort the key interactions in a sequence of events. An example, the sequence to write
+ * the upper case D
+ * <ul>
+ * <li>press shift key</li>
+ * <li>press D key</li>
+ * <li>release shift key</li>
+ * <li>release D key</li>
+ * </ul>
+ * 
+ * is transformed to the sequence
+ * 
+ * <ul>
+ * <li>press shift key</li>
+ * <li>press D key</li>
+ * <li>release D key</li>
+ * <li>release shift key</li>
+ * </ul>
+ * 
+ * in which the first pressed key (shift in this case) is always released last. The same is done for
+ * the alt and the ctrl keys.
+ * 
+ * </p>
+ * 
+ * @author Patrick Harms
+ * @version 1.0
+ */
+public class CMDsortKeyInteractions implements Command {
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#help()
+     */
+    @Override
+    public String help() {
+        return "sortKeyInteractions <sequences> {<new sequences>}";
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+     */
+    @SuppressWarnings("unchecked")
+    @Override
+    public void run(List<Object> parameters) {
+        String sequencesName;
+        String newSequencesName;
+        String modeString = "ADDITION";
+        try {
+            sequencesName = (String) parameters.get(0);
+            if (parameters.size() > 1) {
+                newSequencesName = (String) parameters.get(1);
+            }
+            else {
+                newSequencesName = sequencesName;
+            }
+            if (parameters.size() > 2) {
+                modeString = (String) parameters.get(2);
+            }
+        }
+        catch (Exception e) {
+            throw new IllegalArgumentException("must provide a sequences name");
+        }
+
+        Collection<List<Event>> sequences = null;
+        Object dataObject = GlobalDataContainer.getInstance().getData(sequencesName);
+        if (dataObject == null) {
+            CommandHelpers.objectNotFoundMessage(sequencesName);
+            return;
+        }
+        if (!SequenceInstanceOf.isCollectionOfSequences(dataObject)) {
+            CommandHelpers.objectNotType(sequencesName, "Collection<List<Event<?>>>");
+            return;
+        }
+
+        CleanupMode mode = null;
+        try {
+            mode = CleanupMode.valueOf(modeString);
+        }
+        catch (IllegalArgumentException e) {
+            Console.printerrln("Invalid mode. Only REMOVAL and ADDITION are allowed values!");
+            return;
+        }
+
+        sequences = (Collection<List<Event>>) dataObject;
+
+        Collection<List<Event>> newSequences = new LinkedList<List<Event>>();
+
+        int i = 1;
+        for (List<Event> sequence : sequences) {
+            Console.traceln(Level.INFO, "Processing sequence " + i++);
+            newSequences.add(new KeyInteractionCorrector(mode).sortKeyInteractions(sequence));
+        }
+
+        if (GlobalDataContainer.getInstance().addData(newSequencesName, newSequences)) {
+            CommandHelpers.dataOverwritten(newSequencesName);
+        }
+
+    }
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usability/CMDevaluateUsability.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usability/CMDevaluateUsability.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usability/CMDevaluateUsability.java	(revision 914)
@@ -0,0 +1,78 @@
+
+package de.ugoe.cs.quest.commands.usability;
+
+import java.util.List;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTree;
+import de.ugoe.cs.quest.usability.UsabilityEvaluationManager;
+import de.ugoe.cs.quest.usability.UsabilityEvaluationResult;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * This command performs a usability evaluation based on a task tree. It uses the
+ * {@link UsabilityEvaluationManager} for this purpose. Please consult the documentation of the
+ * usability evaluation manager for more details.
+ * </p>
+ * 
+ * @author Patrick Harms
+ * @version 1.0
+ */
+public class CMDevaluateUsability implements Command {
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#help()
+     */
+    @Override
+    public String help() {
+        return "evaluateUsability <tasktree> {<evaluationResult>}";
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+     */
+    @Override
+    public void run(List<Object> parameters) {
+        String tasktreeName;
+        String evaluationResult;
+        try {
+            tasktreeName = (String) parameters.get(0);
+            if (parameters.size() > 1) {
+                evaluationResult = (String) parameters.get(1);
+            }
+            else {
+                evaluationResult = "usabilityEvaluationResult";
+            }
+        }
+        catch (Exception e) {
+            throw new IllegalArgumentException("must provide a task tree name");
+        }
+
+        Object dataObject = GlobalDataContainer.getInstance().getData(tasktreeName);
+        if (dataObject == null) {
+            CommandHelpers.objectNotFoundMessage(tasktreeName);
+            return;
+        }
+        if (!(dataObject instanceof ITaskTree)) {
+            CommandHelpers.objectNotType(tasktreeName, "ITaskTree");
+            return;
+        }
+
+        ITaskTree taskTree = (ITaskTree) dataObject;
+        
+        UsabilityEvaluationResult result =
+            new UsabilityEvaluationManager().evaluateUsability(taskTree);
+        
+        if (GlobalDataContainer.getInstance().addData(evaluationResult, result)) {
+            CommandHelpers.dataOverwritten(evaluationResult);
+        }
+        
+    }
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usability/CMDgenerateTaskTree.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usability/CMDgenerateTaskTree.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usability/CMDgenerateTaskTree.java	(revision 914)
@@ -0,0 +1,81 @@
+
+package de.ugoe.cs.quest.commands.usability;
+
+import java.util.Collection;
+import java.util.List;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.quest.SequenceInstanceOf;
+import de.ugoe.cs.quest.eventcore.Event;
+import de.ugoe.cs.quest.tasktrees.manager.TaskTreeManager;
+import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTree;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * This command generates a task tree based on the provided sequences. It uses the
+ * {@link TaskTreeManager} for this purpose. Please consult the documentation of the task tree
+ * manager for more details.
+ * </p>
+ * 
+ * @author Patrick Harms
+ * @version 1.0
+ */
+public class CMDgenerateTaskTree implements Command {
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#help()
+     */
+    @Override
+    public String help() {
+        return "generateTaskTree <sequences> {<tasktree>}";
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+     */
+    @SuppressWarnings("unchecked")
+    @Override
+    public void run(List<Object> parameters) {
+        String sequencesName;
+        String tasktreeName;
+        try {
+            sequencesName = (String) parameters.get(0);
+            if (parameters.size() > 1) {
+                tasktreeName = (String) parameters.get(1);
+            }
+            else {
+                tasktreeName = "tasktree";
+            }
+        }
+        catch (Exception e) {
+            throw new IllegalArgumentException("must provide a sequences name");
+        }
+
+        Collection<List<Event>> sequences = null;
+        Object dataObject = GlobalDataContainer.getInstance().getData(sequencesName);
+        if (dataObject == null) {
+            CommandHelpers.objectNotFoundMessage(sequencesName);
+            return;
+        }
+        if (!SequenceInstanceOf.isCollectionOfSequences(dataObject)) {
+            CommandHelpers.objectNotType(sequencesName, "Collection<List<Event<?>>>");
+            return;
+        }
+
+        sequences = (Collection<List<Event>>) dataObject;
+        
+        ITaskTree taskTree = new TaskTreeManager().createTaskTree(sequences);
+        
+        if (GlobalDataContainer.getInstance().addData(tasktreeName, taskTree)) {
+            CommandHelpers.dataOverwritten(sequencesName);
+        }
+        
+    }
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/AbstractTrainCommand.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/AbstractTrainCommand.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/AbstractTrainCommand.java	(revision 914)
@@ -0,0 +1,92 @@
+package de.ugoe.cs.quest.commands.usage;
+
+import java.util.Collection;
+import java.util.List;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.quest.SequenceInstanceOf;
+import de.ugoe.cs.quest.eventcore.Event;
+import de.ugoe.cs.quest.usageprofiles.TrieBasedModel;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Abstract class for commands to train {@link TrieBasedModel}s.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public abstract class AbstractTrainCommand implements Command {
+
+	/**
+	 * <p>
+	 * Handling of additional parameters.
+	 * </p>
+	 * 
+	 * @param parameters
+	 *            same as the parameters passed to {@link #run(List)}.
+	 * @throws Exception
+	 *             thrown, if there is an error parsing the parameters
+	 */
+	abstract void handleAdditionalParameters(List<Object> parameters)
+			throws Exception;
+
+	/**
+	 * <p>
+	 * Returns a concrete instance of {@link TrieBasedModel} to be trained. This
+	 * is a factory method.
+	 * </p>
+	 * 
+	 * @return instance of {@link TrieBasedModel}
+	 */
+	abstract TrieBasedModel createModel();
+
+	/**
+	 * <p>
+	 * The command is implemented as a template method. The general structure of
+	 * the command is always the same, only the parameters of the command and
+	 * the creation of the {@link TrieBasedModel} instance. The former is
+	 * handled by {@link #handleAdditionalParameters(List)}, the latter by
+	 * {@link #createModel()}.
+	 * </p>
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void run(List<Object> parameters) {
+		String modelname;
+		String sequencesName;
+
+		try {
+			modelname = (String) parameters.get(0);
+			sequencesName = (String) parameters.get(1);
+			handleAdditionalParameters(parameters);
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+
+		Object dataObject = GlobalDataContainer.getInstance().getData(
+				sequencesName);
+		if (dataObject == null) {
+			CommandHelpers.objectNotFoundMessage(sequencesName);
+			return;
+		}
+		if (!SequenceInstanceOf.isCollectionOfSequences(dataObject)) {
+			CommandHelpers.objectNotType(sequencesName,
+					"Collection<List<Event<?>>>");
+			return;
+		}
+		Collection<List<Event>> sequences = (Collection<List<Event>>) dataObject;
+
+		TrieBasedModel model = createModel();
+		model.train(sequences);
+		if (GlobalDataContainer.getInstance().addData(modelname, model)) {
+			CommandHelpers.dataOverwritten(modelname);
+		}
+
+	}
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDcalcCoverage.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDcalcCoverage.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDcalcCoverage.java	(revision 914)
@@ -0,0 +1,140 @@
+package de.ugoe.cs.quest.commands.usage;
+
+import java.util.Collection;
+import java.util.List;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.quest.SequenceInstanceOf;
+import de.ugoe.cs.quest.coverage.CoverageCalculatorObserved;
+import de.ugoe.cs.quest.coverage.CoverageCalculatorProcess;
+import de.ugoe.cs.quest.eventcore.Event;
+import de.ugoe.cs.quest.usageprofiles.IStochasticProcess;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.Console;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command to calculate the coverage of a test suite.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDcalcCoverage implements Command {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void run(List<Object> parameters) {
+		String modelname;
+		String observedName;
+		String[] sequenceNames;
+		int minLength;
+		int maxLength;
+		try {
+			modelname = (String) parameters.get(0);
+			observedName = (String) parameters.get(1);
+			sequenceNames = (String[]) parameters.get(2);
+			minLength = Integer.parseInt((String) parameters.get(3));
+			maxLength = Integer.parseInt((String) parameters.get(4));
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+
+		IStochasticProcess process = null;
+		Collection<List<Event>> observedSequences = null;
+		Collection<List<Event>> sequences = null;
+		Object dataObjectProcess = GlobalDataContainer.getInstance().getData(
+				modelname);
+		Object dataObjectObserved = GlobalDataContainer.getInstance().getData(
+				observedName);
+		if (dataObjectProcess == null) {
+			CommandHelpers.objectNotFoundMessage(modelname);
+			return;
+		}
+		if (!(dataObjectProcess instanceof IStochasticProcess)) {
+			CommandHelpers.objectNotType(modelname, "IStochasticProcess");
+			return;
+		}
+		if (dataObjectObserved == null) {
+			CommandHelpers.objectNotFoundMessage(observedName);
+			return;
+		}
+		if (!SequenceInstanceOf.isCollectionOfSequences(dataObjectObserved)) {
+			CommandHelpers.objectNotType(observedName,
+					"Collection<List<Event<?>>>");
+			return;
+		}
+		process = (IStochasticProcess) dataObjectProcess;
+		observedSequences = (Collection<List<Event>>) dataObjectObserved;
+
+		Console.print("seqName");
+		for (int length = minLength; length <= maxLength; length++) {
+			Console.print(";numObs_" + length);
+			Console.print(";numCov_" + length);
+			Console.print(";numNew_" + length);
+			Console.print(";numPos_" + length);
+			Console.print(";all_" + length);
+			Console.print(";pos_" + length);
+			Console.print(";poswei_" + length);
+			Console.print(";obs_" + length);
+			Console.print(";obswei_" + length);
+			Console.print(";new_" + length);
+			Console.print(";newpos_" + length);
+			Console.print(";newposwei_" + length);
+		}
+		Console.println("");
+		for (String sequenceName : sequenceNames) {
+			Object dataObjectSequences = GlobalDataContainer.getInstance()
+					.getData(sequenceName);
+			if (dataObjectSequences == null) {
+				CommandHelpers.objectNotFoundMessage(sequenceName);
+				return;
+			} else if (!SequenceInstanceOf
+					.isCollectionOfSequences(dataObjectSequences)) {
+				CommandHelpers.objectNotType(sequenceName,
+						"Collection<List<Event<?>>>");
+				return;
+			}
+			sequences = (Collection<List<Event>>) dataObjectSequences;
+			Console.print(sequenceName);
+			for (int length = minLength; length <= maxLength; length++) {
+				CoverageCalculatorProcess covCalcProc = new CoverageCalculatorProcess(
+						process, sequences, length);
+				CoverageCalculatorObserved covCalcObs = new CoverageCalculatorObserved(
+						observedSequences, sequences, length);
+				Console.print(";" + covCalcObs.getNumObserved());
+				Console.print(";" + covCalcObs.getNumCovered());
+				Console.print(";" + covCalcObs.getNumNew());
+				Console.print(";" + covCalcProc.getNumPossible());
+				Console.print(";" + covCalcProc.getCoverageAllNoWeight());
+				Console.print(";" + covCalcProc.getCoveragePossibleNoWeight());
+				Console.print(";" + covCalcProc.getCoveragePossibleWeight());
+				Console.print(";" + covCalcObs.getCoverageObserved());
+				Console.print(";"
+						+ covCalcObs.getCoverageObservedWeigth(process));
+				Console.print(";" + covCalcObs.getNewPercentage());
+				Console.print(";" + covCalcObs.getCoveragePossibleNew(process));
+				Console.print(";"
+						+ covCalcObs.getCoveragePossibleNewWeight(process));
+			}
+			Console.println("");
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "calcCoverage <modelname> <observedSequences> [<sequenceNames>] <minCovLength> <maxCovLength>";
+	}
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDcalcEntropy.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDcalcEntropy.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDcalcEntropy.java	(revision 914)
@@ -0,0 +1,63 @@
+package de.ugoe.cs.quest.commands.usage;
+
+import java.util.List;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.quest.usageprofiles.FirstOrderMarkovModel;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.Console;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command to calculate the entropy of first-order Markov models.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDcalcEntropy implements Command {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "calcEntropy <modelname>";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@Override
+	public void run(List<Object> parameters) {
+		String modelname = "";
+		try {
+			modelname = (String) parameters.get(0);
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+
+		FirstOrderMarkovModel model = null;
+		Object dataObject = GlobalDataContainer.getInstance()
+				.getData(modelname);
+		if (dataObject == null) {
+			CommandHelpers.objectNotFoundMessage(modelname);
+			return;
+		}
+		if (!(dataObject instanceof FirstOrderMarkovModel)) {
+			CommandHelpers.objectNotType(modelname, "FirstOrderMarkovModel");
+			return;
+		}
+		model = (FirstOrderMarkovModel) dataObject;
+		double entropy = model.calcEntropy();
+		if (!Double.isNaN(entropy)) {
+			Console.println("entropy: " + entropy);
+		}
+	}
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDflattenModel.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDflattenModel.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDflattenModel.java	(revision 914)
@@ -0,0 +1,70 @@
+package de.ugoe.cs.quest.commands.usage;
+
+import java.util.List;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.quest.usageprofiles.FirstOrderMarkovModel;
+import de.ugoe.cs.quest.usageprofiles.HighOrderMarkovModel;
+import de.ugoe.cs.quest.usageprofiles.ModelFlattener;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command to flatten high-order models and create first-order markov models
+ * with the same stochastic properties.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDflattenModel implements Command {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@Override
+	public void run(List<Object> parameters) {
+		String modelname;
+		String modelnameFOM;
+
+		try {
+			modelname = (String) parameters.get(0);
+			modelnameFOM = (String) parameters.get(1);
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+
+		Object dataObject = GlobalDataContainer.getInstance()
+				.getData(modelname);
+		if (dataObject == null) {
+			CommandHelpers.objectNotFoundMessage(modelname);
+			return;
+		}
+		if (!(dataObject instanceof HighOrderMarkovModel)) {
+			CommandHelpers.objectNotType(modelname, "HighOrderMarkovModel");
+			return;
+		}
+
+		HighOrderMarkovModel model = (HighOrderMarkovModel) dataObject;
+		ModelFlattener flattener = new ModelFlattener();
+		FirstOrderMarkovModel modelFOM = flattener
+				.flattenHighOrderMarkovModel(model);
+
+		if (GlobalDataContainer.getInstance().addData(modelnameFOM, modelFOM)) {
+			CommandHelpers.dataOverwritten(modelnameFOM);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "flattenModel <modelname> <modelname_flattened>";
+	}
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDgenerateFixedLengthSequences.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDgenerateFixedLengthSequences.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDgenerateFixedLengthSequences.java	(revision 914)
@@ -0,0 +1,88 @@
+package de.ugoe.cs.quest.commands.usage;
+
+import java.util.Collection;
+import java.util.List;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.quest.eventcore.Event;
+import de.ugoe.cs.quest.testgeneration.DrawFromAllSequencesGenerator;
+import de.ugoe.cs.quest.usageprofiles.IStochasticProcess;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.Console;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command to generate all sequences of a given length.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDgenerateFixedLengthSequences implements Command {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@Override
+	public void run(List<Object> parameters) {
+		String modelname;
+		String sequencesName;
+		int minLength;
+		int maxLength;
+		boolean all = true;
+		int numSequences = -1;
+		boolean validEnd = true;
+		try {
+			modelname = (String) parameters.get(0);
+			sequencesName = (String) parameters.get(1);
+			minLength = Integer.parseInt((String) parameters.get(2));
+			maxLength = Integer.parseInt((String) parameters.get(3));
+			if (parameters.size() >= 5) {
+				all = Boolean.parseBoolean((String) parameters.get(4));
+			}
+			if (parameters.size() >= 6) {
+				numSequences = Integer.parseInt((String) parameters.get(5));
+			}
+			if (parameters.size() >= 7) {
+				validEnd = Boolean.parseBoolean((String) parameters.get(6));
+			}
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+
+		IStochasticProcess model = null;
+		Object dataObject = GlobalDataContainer.getInstance()
+				.getData(modelname);
+		if (dataObject == null) {
+			CommandHelpers.objectNotFoundMessage(modelname);
+			return;
+		} else if (!(dataObject instanceof IStochasticProcess)) {
+			CommandHelpers.objectNotType(modelname, "IStochasticProcess");
+			return;
+		}
+		model = (IStochasticProcess) dataObject;
+		DrawFromAllSequencesGenerator generator = new DrawFromAllSequencesGenerator(
+				numSequences, minLength, maxLength, validEnd, all);
+		Collection<List<Event>> sequences = generator
+				.generateTestSuite(model);
+
+		if (GlobalDataContainer.getInstance().addData(sequencesName, sequences)) {
+			CommandHelpers.dataOverwritten(sequencesName);
+		}
+		Console.println("" + sequences.size() + " sequences generated");
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "generateFixedLengthSequences <modelname> <sequencesName> <minlenght> <maxlength> {<all>} {<numSequences>} {<validEnd>}";
+	}
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDgenerateGreedy.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDgenerateGreedy.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDgenerateGreedy.java	(revision 914)
@@ -0,0 +1,179 @@
+package de.ugoe.cs.quest.commands.usage;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.logging.Level;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.quest.coverage.SequenceTools;
+import de.ugoe.cs.quest.eventcore.Event;
+import de.ugoe.cs.quest.usageprofiles.IStochasticProcess;
+import de.ugoe.cs.util.ArrayTools;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.Console;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command to generate test suite with a greedy strategy to achieve a desired
+ * coverage.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDgenerateGreedy implements Command {
+
+	/**
+	 * <p>
+	 * Tolerance for double comparisons
+	 * </p>
+	 */
+	final static double eps = 0.000000000001;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@Override
+	public void run(List<Object> parameters) {
+		String modelname;
+		String sequencesName;
+		int minLength;
+		int maxLength;
+		int coverageDepth;
+		float desiredCoverage;
+		boolean validEnd = true;
+		try {
+			modelname = (String) parameters.get(0);
+			sequencesName = (String) parameters.get(1);
+			minLength = Integer.parseInt((String) parameters.get(2));
+			maxLength = Integer.parseInt((String) parameters.get(3));
+			coverageDepth = Integer.parseInt((String) parameters.get(4));
+			desiredCoverage = Float.parseFloat((String) parameters.get(5));
+			if (parameters.size() >= 7) {
+				validEnd = Boolean.parseBoolean((String) parameters.get(6));
+			}
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+
+		IStochasticProcess model = null;
+		Object dataObject = GlobalDataContainer.getInstance()
+				.getData(modelname);
+		if (dataObject == null) {
+			CommandHelpers.objectNotFoundMessage(modelname);
+			return;
+		} else if (!(dataObject instanceof IStochasticProcess)) {
+			CommandHelpers.objectNotType(modelname, "IStochasticProcess");
+			return;
+		}
+		model = (IStochasticProcess) dataObject;
+
+		// set up everything
+		List<List<Event>> allSequences = new LinkedList<List<Event>>();
+		for (int length = minLength; length <= maxLength; length++) {
+			if (validEnd) {
+				allSequences.addAll(model.generateValidSequences(length + 2));
+			} else {
+				allSequences.addAll(model.generateSequences(length + 1, true));
+			}
+		}
+		Console.traceln(Level.INFO, "" + allSequences.size() + " possible");
+
+		Collection<List<Event>> allSubSeqs = model
+				.generateSequences(coverageDepth);
+		Map<List<Event>, Double> weightMap = SequenceTools
+				.generateWeights(model, allSubSeqs);
+		Set<List<Event>> coveredSubSeqs = new LinkedHashSet<List<Event>>();
+
+		List<Set<List<Event>>> containedSubSeqs = new LinkedList<Set<List<Event>>>();
+		for (List<Event> sequence : allSequences) {
+			List<List<Event>> wrapper = new LinkedList<List<Event>>();
+			wrapper.add(sequence);
+			Set<List<Event>> currentSubSeqs = SequenceTools
+					.containedSubSequences(wrapper, coverageDepth);
+			containedSubSeqs.add(currentSubSeqs);
+		}
+
+		List<List<Event>> testSuite = new LinkedList<List<Event>>();
+		double currentCoverage = 0.0d;
+
+		// Build test suite
+		double prevGain = 1.0d;
+		boolean gainEqual = false;
+		while (currentCoverage < desiredCoverage) {
+			Double[] sequenceGain = new Double[allSequences.size()];
+			int i = 0;
+			for (Set<List<Event>> containedSubSeq : containedSubSeqs) {
+				double gain = 0.0d;
+				Iterator<List<Event>> subSeqIter = containedSubSeq
+						.iterator();
+				while (subSeqIter.hasNext()) {
+					List<Event> subSeq = subSeqIter.next();
+					if (!coveredSubSeqs.contains(subSeq)) {
+						gain += weightMap.get(subSeq);
+					} else {
+						subSeqIter.remove();
+					}
+				}
+				sequenceGain[i] = gain;
+				// optimization using that the gain is monotonically decreasing
+				if (Math.abs(gain - prevGain) <= eps) {
+					gainEqual = true;
+					break;
+				}
+				i++;
+			}
+			int maxIndex;
+			if (gainEqual) {
+				maxIndex = i;
+			} else {
+				maxIndex = ArrayTools.findMax(sequenceGain);
+			}
+			if (maxIndex < 0 || sequenceGain[maxIndex] <= 0.0 + eps) {
+				Console.traceln(Level.WARNING, "No gain anymore! Desired coverage cannot be satisfied!");
+				break;
+			}
+			prevGain = sequenceGain[maxIndex];
+			testSuite.add(allSequences.get(maxIndex));
+			coveredSubSeqs.addAll(containedSubSeqs.get(maxIndex));
+			currentCoverage += sequenceGain[maxIndex];
+			if (gainEqual) {
+				allSequences.remove(maxIndex);
+				containedSubSeqs.remove(maxIndex);
+				gainEqual = false;
+			} else {
+				for (int j = sequenceGain.length - 1; j >= 0; j--) {
+					if (j == maxIndex || sequenceGain[j] <= 0.0 + eps) {
+						allSequences.remove(j);
+						containedSubSeqs.remove(j);
+					}
+				}
+			}
+		}
+
+		if (GlobalDataContainer.getInstance().addData(sequencesName, testSuite)) {
+			CommandHelpers.dataOverwritten(sequencesName);
+		}
+		Console.println("" + testSuite.size() + " sequences generated");
+		Console.println("" + currentCoverage + " coverage achieved");
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "generateGreedy <modelname> <sequencesName> <minLength> <maxLength> <coverageDepth> <desiredCoverage> {<validEnd>}";
+	}
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDgenerateHybrid.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDgenerateHybrid.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDgenerateHybrid.java	(revision 914)
@@ -0,0 +1,97 @@
+package de.ugoe.cs.quest.commands.usage;
+
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.quest.eventcore.Event;
+import de.ugoe.cs.quest.testgeneration.HybridGenerator;
+import de.ugoe.cs.quest.usageprofiles.IStochasticProcess;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.Console;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command to generate sequences of a given length.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDgenerateHybrid implements Command {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@Override
+	public void run(List<Object> parameters) {
+		String modelname;
+		String sequencesName;
+		int length;
+		int maxLengthAll;
+		int numSequences;
+		boolean validEnd = true;
+		try {
+			modelname = (String) parameters.get(0);
+			sequencesName = (String) parameters.get(1);
+			length = Integer.parseInt((String) parameters.get(2));
+			maxLengthAll = Integer.parseInt((String) parameters.get(3));
+			numSequences = Integer.parseInt((String) parameters.get(4));
+			if (parameters.size() >= 6) {
+				validEnd = Boolean.parseBoolean((String) parameters.get(5));
+			}
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+
+		if (length <= maxLengthAll) {
+			// indirectly call command generateFixedLengthSequences
+			List<Object> parameters2 = new LinkedList<Object>();
+			parameters2.add(modelname);
+			parameters2.add(sequencesName);
+			parameters2.add(Integer.toString(length));
+			parameters2.add(Integer.toString(length));
+			parameters2.add(Boolean.toString(false));
+			parameters2.add(Integer.toString(numSequences));
+			parameters2.add(Boolean.toString(validEnd));
+			CMDgenerateFixedLengthSequences cmd = new CMDgenerateFixedLengthSequences();
+			cmd.run(parameters2);
+			return;
+		}
+
+		IStochasticProcess model = null;
+		Object dataObject = GlobalDataContainer.getInstance()
+				.getData(modelname);
+		if (dataObject == null) {
+			CommandHelpers.objectNotFoundMessage(modelname);
+			return;
+		} else if (!(dataObject instanceof IStochasticProcess)) {
+			CommandHelpers.objectNotType(modelname, "IStochasticProcess");
+			return;
+		}
+		model = (IStochasticProcess) dataObject;
+		
+		HybridGenerator generator = new HybridGenerator(numSequences, length, maxLengthAll, validEnd);
+		Collection<List<Event>> sequences = generator.generateTestSuite(model);
+		
+		if (GlobalDataContainer.getInstance().addData(sequencesName, sequences)) {
+			CommandHelpers.dataOverwritten(sequencesName);
+		}
+		Console.println("" + sequences.size() + " sequences generated");
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "generateHybrid <modelname> <sequencesName> <lenght> <maxlengthAll> <numSequences> {<validEnd>}";
+	}
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDgenerateRandomSequences.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDgenerateRandomSequences.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDgenerateRandomSequences.java	(revision 914)
@@ -0,0 +1,94 @@
+package de.ugoe.cs.quest.commands.usage;
+
+import java.util.Collection;
+import java.util.List;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.quest.eventcore.Event;
+import de.ugoe.cs.quest.testgeneration.RandomWalkGenerator;
+import de.ugoe.cs.quest.usageprofiles.IStochasticProcess;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.Console;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command to generate random sessions.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDgenerateRandomSequences implements Command {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@Override
+	public void run(List<Object> parameters) {
+		String modelname;
+		String sequencesName;
+		int numSessions;
+		int minLength = 0;
+		int maxLength = Integer.MAX_VALUE;
+		long maxIter;
+		boolean validEnd = true;
+		try {
+			modelname = (String) parameters.get(0);
+			sequencesName = (String) parameters.get(1);
+			numSessions = Integer.parseInt((String) parameters.get(2));
+			minLength = Integer.parseInt((String) parameters.get(3));
+			maxLength = Integer.parseInt((String) parameters.get(4));
+			maxIter = numSessions * 10;
+			if (parameters.size() >= 5) {
+				maxIter = Long.parseLong((String) parameters.get(5));
+			}
+			if (parameters.size() >= 6) {
+				validEnd = Boolean.parseBoolean((String) parameters.get(6));
+			}
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+
+		IStochasticProcess model = null;
+		Object dataObject = GlobalDataContainer.getInstance()
+				.getData(modelname);
+		if (dataObject == null) {
+			CommandHelpers.objectNotFoundMessage(modelname);
+			return;
+		}
+		if (!(dataObject instanceof IStochasticProcess)) {
+			CommandHelpers.objectNotType(modelname, "IStochasticProcess");
+			return;
+		}
+		model = (IStochasticProcess) dataObject;
+
+		RandomWalkGenerator generator = new RandomWalkGenerator(numSessions,
+				minLength, maxLength, validEnd, maxIter);
+		Collection<List<Event>> sequences = generator
+				.generateTestSuite(model);
+
+		if (sequences.size() < numSessions) {
+			Console.println("Only " + sequences.size()
+					+ " unique sessions generated after " + maxIter
+					+ " iterations");
+		}
+
+		if (GlobalDataContainer.getInstance().addData(sequencesName, sequences)) {
+			CommandHelpers.dataOverwritten(sequencesName);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "generateRandomSequenecs <modelname> <sequencesName> <numSequences> <minlength> <maxlength> {<maxIter>} {<validEnd>}";
+	}
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDlistSymbols.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDlistSymbols.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDlistSymbols.java	(revision 914)
@@ -0,0 +1,72 @@
+package de.ugoe.cs.quest.commands.usage;
+
+import java.util.Arrays;
+import java.util.List;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.quest.usageprofiles.IStochasticProcess;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.Console;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command to list all events (symbols) known to a usage profile (stochastic
+ * process).
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDlistSymbols implements Command {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@Override
+	public void run(List<Object> parameters) {
+		String modelname = "";
+		boolean sort = false;
+		try {
+			modelname = (String) parameters.get(0);
+			if (parameters.size() == 2) {
+				sort = Boolean.parseBoolean((String) parameters.get(1));
+			}
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+
+		IStochasticProcess model = null;
+		Object dataObject = GlobalDataContainer.getInstance()
+				.getData(modelname);
+		if (dataObject == null) {
+			CommandHelpers.objectNotFoundMessage(modelname);
+			return;
+		}
+		if (!(dataObject instanceof IStochasticProcess)) {
+			CommandHelpers.objectNotType(modelname, "IStochasticProcess");
+			return;
+		}
+		model = (IStochasticProcess) dataObject;
+		String[] stateStrings = model.getSymbolStrings();
+		if (sort) {
+			Arrays.sort(stateStrings);
+		}
+		for (String stateString : stateStrings) {
+			Console.println(stateString);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "listSymbols <modelname> {<sort>}";
+	}
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDmodelSize.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDmodelSize.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDmodelSize.java	(revision 914)
@@ -0,0 +1,62 @@
+package de.ugoe.cs.quest.commands.usage;
+
+import java.util.List;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.quest.usageprofiles.IStochasticProcess;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.Console;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command that prints the size of a stochastic process to the console.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDmodelSize implements Command {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@Override
+	public void run(List<Object> parameters) {
+		String modelname;
+		try {
+			modelname = (String) parameters.get(0);
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+
+		Object dataObject = GlobalDataContainer.getInstance()
+				.getData(modelname);
+		if (dataObject == null) {
+			CommandHelpers.objectNotFoundMessage(modelname);
+			return;
+		}
+		if (!(dataObject instanceof IStochasticProcess)) {
+			CommandHelpers.objectNotType(modelname, "IStochasticProcess");
+			return;
+		}
+
+		IStochasticProcess process = (IStochasticProcess) dataObject;
+		Console.println("#symbols: " + process.getNumSymbols()
+				+ " ; #FOMstates " + process.getNumFOMStates()
+				+ " ; #transitions: " + process.getNumTransitions());
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "modelSize <modelname>";
+	}
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDprintDot.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDprintDot.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDprintDot.java	(revision 914)
@@ -0,0 +1,62 @@
+package de.ugoe.cs.quest.commands.usage;
+
+import java.util.List;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.quest.usageprofiles.IDotCompatible;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.Console;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command that prints a dot representation of a model (if supported) to the
+ * console.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDprintDot implements Command {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "printDot <modelname>";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@Override
+	public void run(List<Object> parameters) {
+		String modelname = "";
+		try {
+			modelname = (String) parameters.get(0);
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+
+		IDotCompatible model = null;
+		Object dataObject = GlobalDataContainer.getInstance()
+				.getData(modelname);
+		if (dataObject == null) {
+			CommandHelpers.objectNotFoundMessage(modelname);
+			return;
+		}
+		if (!(dataObject instanceof IDotCompatible)) {
+			CommandHelpers.objectNotType(modelname, "IDotCompatible");
+			return;
+		}
+
+		model = (IDotCompatible) dataObject;
+		Console.println(model.getDotRepresentation());
+	}
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDprintTrieDot.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDprintTrieDot.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDprintTrieDot.java	(revision 914)
@@ -0,0 +1,63 @@
+package de.ugoe.cs.quest.commands.usage;
+
+import java.util.List;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.quest.usageprofiles.Trie;
+import de.ugoe.cs.quest.usageprofiles.TrieBasedModel;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.Console;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command that prints the {@link Trie} of a {@link TrieBasedModel} as dot to
+ * the console.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDprintTrieDot implements Command {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "printTreeDot <modelname>";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@Override
+	public void run(List<Object> parameters) {
+		String modelname = "";
+		try {
+			modelname = (String) parameters.get(0);
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+
+		TrieBasedModel model = null;
+		Object dataObject = GlobalDataContainer.getInstance()
+				.getData(modelname);
+		if (dataObject == null) {
+			CommandHelpers.objectNotFoundMessage(modelname);
+			return;
+		}
+		if (!(dataObject instanceof TrieBasedModel)) {
+			CommandHelpers.objectNotType(modelname, "TrieBasedModel");
+			return;
+		}
+
+		model = (TrieBasedModel) dataObject;
+		Console.println(model.getTrieDotRepresentation());
+	}
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDshowMarkovModel.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDshowMarkovModel.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDshowMarkovModel.java	(revision 914)
@@ -0,0 +1,112 @@
+package de.ugoe.cs.quest.commands.usage;
+
+import java.awt.Dimension;
+import java.awt.Rectangle;
+import java.awt.Shape;
+import java.util.List;
+
+import javax.swing.JFrame;
+
+import org.apache.commons.collections15.Transformer;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.quest.usageprofiles.FirstOrderMarkovModel;
+import de.ugoe.cs.quest.usageprofiles.FirstOrderMarkovModel.MarkovEdge;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+import edu.uci.ics.jung.algorithms.layout.ISOMLayout;
+import edu.uci.ics.jung.algorithms.layout.Layout;
+import edu.uci.ics.jung.graph.Graph;
+import edu.uci.ics.jung.visualization.BasicVisualizationServer;
+import edu.uci.ics.jung.visualization.decorators.ToStringLabeller;
+import edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Position;
+
+/**
+ * <p>
+ * Command that visualizes first-order Markov models.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDshowMarkovModel implements Command {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "showMarkovModel <modelname> {<showNodeNames>}";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@Override
+	public void run(List<Object> parameters) {
+		String modelname;
+		boolean showNodeNames = false;
+		try {
+			modelname = (String) parameters.get(0);
+			if (parameters.size() == 2) {
+				showNodeNames = Boolean
+						.parseBoolean((String) parameters.get(1));
+			}
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+
+		Object dataObject = GlobalDataContainer.getInstance()
+				.getData(modelname);
+		if (dataObject == null) {
+			CommandHelpers.objectNotFoundMessage(modelname);
+			return;
+		}
+		if (!(dataObject instanceof FirstOrderMarkovModel)) {
+			CommandHelpers.objectNotType(modelname, "FirstOrderMarkovModel");
+			return;
+		}
+		FirstOrderMarkovModel mm = (FirstOrderMarkovModel) dataObject;
+
+		Graph<String, MarkovEdge> graph = mm.getGraph();
+		Layout<String, MarkovEdge> layout = new ISOMLayout<String, MarkovEdge>(
+				graph);
+		layout.setSize(new Dimension(1000, 800)); // sets the initial size
+													// of the space
+		// The BasicVisualizationServer<V,E> is parameterized by the edge
+		// types
+		BasicVisualizationServer<String, MarkovEdge> vv = new BasicVisualizationServer<String, MarkovEdge>(
+				layout);
+		vv.setPreferredSize(new Dimension(1100, 850)); // Sets the viewing
+														// area size
+
+		if (showNodeNames) {
+			final Rectangle rect = new Rectangle(240, 20);
+
+			Transformer<String, Shape> vertexShapeTransformer = new Transformer<String, Shape>() {
+				public Shape transform(String s) {
+					return rect;
+				}
+			};
+			vv.getRenderer().getVertexLabelRenderer()
+					.setPosition(Position.CNTR);
+			vv.getRenderContext().setVertexShapeTransformer(
+					vertexShapeTransformer);
+			vv.getRenderContext().setVertexLabelTransformer(
+					new ToStringLabeller<String>());
+		}
+
+		vv.getRenderContext().setEdgeLabelTransformer(
+				new ToStringLabeller<MarkovEdge>());
+
+		JFrame frame = new JFrame("Markov Model");
+		frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
+		frame.getContentPane().add(vv);
+		frame.pack();
+		frame.setVisible(true);
+	}
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDshowTrie.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDshowTrie.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDshowTrie.java	(revision 914)
@@ -0,0 +1,99 @@
+package de.ugoe.cs.quest.commands.usage;
+
+import java.awt.Dimension;
+import java.awt.Rectangle;
+import java.awt.Shape;
+import java.util.List;
+
+import javax.swing.JFrame;
+
+import org.apache.commons.collections15.Transformer;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.quest.usageprofiles.Trie;
+import de.ugoe.cs.quest.usageprofiles.Trie.Edge;
+import de.ugoe.cs.quest.usageprofiles.Trie.TrieVertex;
+import de.ugoe.cs.quest.usageprofiles.TrieBasedModel;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+import edu.uci.ics.jung.algorithms.layout.Layout;
+import edu.uci.ics.jung.algorithms.layout.TreeLayout;
+import edu.uci.ics.jung.graph.Tree;
+import edu.uci.ics.jung.visualization.BasicVisualizationServer;
+import edu.uci.ics.jung.visualization.decorators.ToStringLabeller;
+import edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Position;
+
+/**
+ * <p>
+ * Command that visualizes the {@link Trie} of a {@link TrieBasedModel}.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDshowTrie implements Command {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "showTrie <modelname>";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@Override
+	public void run(List<Object> parameters) {
+		String modelname;
+		try {
+			modelname = (String) parameters.get(0);
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+
+		Object dataObject = GlobalDataContainer.getInstance()
+				.getData(modelname);
+		if (dataObject == null) {
+			CommandHelpers.objectNotFoundMessage(modelname);
+			return;
+		}
+		if (!(dataObject instanceof TrieBasedModel)) {
+			CommandHelpers.objectNotType(modelname, "TrieBasedModel");
+		}
+		TrieBasedModel model = (TrieBasedModel) dataObject;
+		Tree<TrieVertex, Edge> graph = model.getTrieGraph();
+		Layout<TrieVertex, Edge> layout = new TreeLayout<TrieVertex, Edge>(
+				graph, 60);
+		// The BasicVisualizationServer<V,E> is parameterized by the edge
+		// types
+		BasicVisualizationServer<TrieVertex, Edge> vv = new BasicVisualizationServer<TrieVertex, Edge>(
+				layout);
+		vv.setPreferredSize(new Dimension(1100, 850)); // Sets the viewing
+														// area size
+
+		final Rectangle rect = new Rectangle(40, 20);
+
+		Transformer<TrieVertex, Shape> vertexShapeTransformer = new Transformer<TrieVertex, Shape>() {
+			public Shape transform(TrieVertex s) {
+				return rect;
+			}
+		};
+		vv.getRenderer().getVertexLabelRenderer().setPosition(Position.CNTR);
+		vv.getRenderContext().setVertexShapeTransformer(vertexShapeTransformer);
+		vv.getRenderContext().setVertexLabelTransformer(
+				new ToStringLabeller<TrieVertex>());
+
+		JFrame frame = new JFrame("Trie");
+		frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
+		frame.getContentPane().add(vv);
+		frame.pack();
+		frame.setVisible(true);
+	}
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDtrainDFA.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDtrainDFA.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDtrainDFA.java	(revision 914)
@@ -0,0 +1,51 @@
+package de.ugoe.cs.quest.commands.usage;
+
+import java.util.List;
+import java.util.Random;
+
+import de.ugoe.cs.quest.usageprofiles.DeterministicFiniteAutomaton;
+import de.ugoe.cs.quest.usageprofiles.TrieBasedModel;
+
+/**
+ * <p>
+ * Command to train a Deterministic Finite Automaton (DFA).
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 2.0
+ */
+public class CMDtrainDFA extends AbstractTrainCommand {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "trainDFA <modelname> <sequencesName>";
+	}
+
+	/**
+	 * <p>
+	 * No additional parameters.
+	 * </p>
+	 * 
+	 * @see de.ugoe.cs.quest.commands.usage.AbstractTrainCommand#handleAdditionalParameters(java.util.List)
+	 */
+	@Override
+	void handleAdditionalParameters(List<Object> parameters) throws Exception {
+		// no additional parameters.
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.quest.ui.commands.AbstractTrainCommand#createModel()
+	 */
+	@Override
+	TrieBasedModel createModel() {
+		return new DeterministicFiniteAutomaton(new Random());
+	}
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDtrainMarkovModel.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDtrainMarkovModel.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDtrainMarkovModel.java	(revision 914)
@@ -0,0 +1,67 @@
+package de.ugoe.cs.quest.commands.usage;
+
+import java.util.List;
+import java.util.Random;
+
+import de.ugoe.cs.quest.usageprofiles.FirstOrderMarkovModel;
+import de.ugoe.cs.quest.usageprofiles.HighOrderMarkovModel;
+import de.ugoe.cs.quest.usageprofiles.TrieBasedModel;
+
+/**
+ * <p>
+ * Command to train first-order and high-order Markov models.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 2.0
+ */
+public class CMDtrainMarkovModel extends AbstractTrainCommand {
+
+	/**
+	 * <p>
+	 * Order of the Markov model.
+	 * </p>
+	 */
+	int order;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "trainMarkovModel <modelname> <sequencesName> {<order>}";
+	}
+
+	/**
+	 * <p>
+	 * Handles the parameter order.
+	 * </p>
+	 * 
+	 * @see de.ugoe.cs.quest.commands.usage.AbstractTrainCommand#handleOptionalParameters(java.util.List)
+	 */
+	@Override
+	void handleAdditionalParameters(List<Object> parameters) throws Exception {
+		if (parameters.size() >= 3) {
+			order = Integer.parseInt((String) parameters.get(2));
+		} else {
+			order = 1;
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.quest.ui.commands.AbstractTrainCommand#createModel()
+	 */
+	@Override
+	TrieBasedModel createModel() {
+		if (order == 1) {
+			return new FirstOrderMarkovModel(new Random());
+		} else {
+			return new HighOrderMarkovModel(order, new Random());
+		}
+	}
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDtrainPPM.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDtrainPPM.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDtrainPPM.java	(revision 914)
@@ -0,0 +1,77 @@
+package de.ugoe.cs.quest.commands.usage;
+
+import java.util.List;
+import java.util.Random;
+
+import de.ugoe.cs.quest.usageprofiles.PredictionByPartialMatch;
+import de.ugoe.cs.quest.usageprofiles.TrieBasedModel;
+
+/**
+ * <p>
+ * Command that trains Prediction by Partial Match (PPM) models.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 2.0
+ */
+public class CMDtrainPPM extends AbstractTrainCommand {
+
+	/**
+	 * <p>
+	 * Escape probability of the PPM model.
+	 * </p>
+	 */
+	double probEscape;
+
+	/**
+	 * <p>
+	 * Maximal Markov order of the PPM model.
+	 * </p>
+	 */
+	int maxOrder;
+
+	/**
+	 * <p>
+	 * Minimal Markov order of the PPM model. Default: 0
+	 * </p>
+	 */
+	int minOrder = 0;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "trainPPM <modelname> <sequencesName> <probEscape> <maxOrder> {<minOrder>}";
+	}
+
+	/**
+	 * <p>
+	 * Handles the parameters probEscape, maxOrder, and minOrder.
+	 * </p>
+	 * 
+	 * @see de.ugoe.cs.quest.commands.usage.AbstractTrainCommand#handleOptionalParameters(java.util.List)
+	 */
+	@Override
+	void handleAdditionalParameters(List<Object> parameters) throws Exception {
+		probEscape = Double.parseDouble((String) parameters.get(2));
+		maxOrder = Integer.parseInt((String) parameters.get(3));
+		if (parameters.size() == 5) {
+			minOrder = Integer.parseInt((String) parameters.get(4));
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.quest.ui.commands.AbstractTrainCommand#createModel()
+	 */
+	@Override
+	TrieBasedModel createModel() {
+		return new PredictionByPartialMatch(maxOrder, minOrder, new Random(),
+				probEscape);
+	}
+
+}
Index: trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDupdateModel.java
===================================================================
--- trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDupdateModel.java	(revision 914)
+++ trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/quest/commands/usage/CMDupdateModel.java	(revision 914)
@@ -0,0 +1,78 @@
+package de.ugoe.cs.quest.commands.usage;
+
+import java.util.Collection;
+import java.util.List;
+
+import de.ugoe.cs.quest.CommandHelpers;
+import de.ugoe.cs.quest.SequenceInstanceOf;
+import de.ugoe.cs.quest.eventcore.Event;
+import de.ugoe.cs.quest.usageprofiles.TrieBasedModel;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command to update a {@link TrieBasedModel}.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDupdateModel implements Command {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void run(List<Object> parameters) {
+		String modelname;
+		String sequencesName;
+
+		try {
+			modelname = (String) parameters.get(0);
+			sequencesName = (String) parameters.get(1);
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+
+		Object dataObject = GlobalDataContainer.getInstance().getData(
+				sequencesName);
+		if (dataObject == null) {
+			CommandHelpers.objectNotFoundMessage(sequencesName);
+			return;
+		}
+		if (!SequenceInstanceOf.isCollectionOfSequences(dataObject)) {
+			CommandHelpers.objectNotType(sequencesName,
+					"Collection<List<Event<?>>>");
+			return;
+		}
+		Collection<List<Event>> sequences = (Collection<List<Event>>) dataObject;
+
+		dataObject = GlobalDataContainer.getInstance().getData(modelname);
+		if (dataObject == null) {
+			CommandHelpers.objectNotFoundMessage(modelname);
+			return;
+		}
+		if (!(dataObject instanceof TrieBasedModel)) {
+			CommandHelpers.objectNotType(modelname, "TrieBasedModel");
+			return;
+		}
+
+		TrieBasedModel model = (TrieBasedModel) dataObject;
+		model.update(sequences);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "updateModel <modelname> <sequencesName>";
+	}
+
+}
Index: trunk/autoquest-ui-core/src/main/resources/manuals/calcCoverage
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/calcCoverage	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/calcCoverage	(revision 914)
@@ -0,0 +1,26 @@
+Calculates various event coverage values for a test suite and prints them as a tables of the following form to the console. The coverage values are calculate in relation to both a collection of sequences and a usage profile. 
+
+The coverages for a given depth d are:
+ * numObs: number of d-tuples that are observed in the related sequences
+ * numCov: number of covered d-tuples by the test suite
+ * numNew: number of d-tuples that are part of the test suite but not observed in the related sequences
+ * numPos: number of possible d-tuples
+ * all: coverage in relation to a all d-tuples, regardless whether they are possible according to the usage profile or not
+ * pos: coverage in relation to the d-tuples possible according to the usage profile
+ * poswei: coverage in relation to the d-tuples possible according to the usage profile, weighted by the probability of the d-tuples ("usage-based coverage")
+ * obs: coverage in relation to the d-tuples that are observed in the related sequences
+ * obswei: coverage in relation to the d-tuples that are observed in the related sequences, weighted by the probability according to the usage profile
+ * new: coverage in relation to the number of possible new sequences, i.e., sequences that are possible according to the usage profile or not but not part of the related sequences
+ * newpos: coverage in relation to the number of possible new sequences, i.e., sequences that are possible according to the usage profile but not part of the related sequences
+ * newposwei: same as above, but weighted by the probability according to the usage profile
+
+$USAGE$
+<modelName> name of the usage profile in relation to which the coverages will be calculated
+<observedSequences> name of the related sequences
+[<sequenceNames>] array of sequences for which the coverage will be calculated
+<minCovLength> minimal coverage depth to be used
+<maxCovLength> maximal coverage depth to be used
+
+Example(s):
+calcCoverage markovModel trainingSequences [generatedSequences] 2 2
+calcCoverage markovModel trainingSequences [generatedSequences1 generatedSequences2] 2 4
Index: trunk/autoquest-ui-core/src/main/resources/manuals/calcEntropy
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/calcEntropy	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/calcEntropy	(revision 914)
@@ -0,0 +1,7 @@
+Calculates the Shannon entropy of a usage profile. The command only supports first-order Markov models and fails for all other usage profile types.
+
+$USAGE$
+<modelname> name of the first-order Markov model
+
+Example(s):
+calcEntropy firstOrderMarkovModel
Index: trunk/autoquest-ui-core/src/main/resources/manuals/condenseGuiModel
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/condenseGuiModel	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/condenseGuiModel	(revision 914)
@@ -0,0 +1,8 @@
+Merges equal nodes in a GUI model. It is highly recommended to call this command after sequences have been parsed.
+
+$USAGE$
+<sequencesName> optional; the name of the sequences, of which the related GUI model is condensed; default: sequences
+
+Example(s):
+condenseGuiModel
+condenseGuiModel someSequences
Index: trunk/autoquest-ui-core/src/main/resources/manuals/deleteObject
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/deleteObject	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/deleteObject	(revision 914)
@@ -0,0 +1,8 @@
+Deletes an object, e.g., a selection of sequences, from the global data storage.
+
+$USAGE$
+<objectname> name of the object to be deleted
+
+Example(s):
+deleteObject sequences
+deleteObject markovModel
Index: trunk/autoquest-ui-core/src/main/resources/manuals/flattenModel
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/flattenModel	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/flattenModel	(revision 914)
@@ -0,0 +1,10 @@
+Takes a high-order Markov model as input and creates an equivalent first-order Markov model through state splitting.
+
+Note: command probably broken because of the refactoring of the event core!
+
+$USAGE$
+<modelname> name of the high-order Markov model
+<modelname_flattened> name of the equivalent first-order Markov model that is created
+
+Example(s):
+flattenModel 5thOrderMarkovModel 5thOrderMarkovModel_flattend
Index: trunk/autoquest-ui-core/src/main/resources/manuals/generateFixedLengthSequences
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/generateFixedLengthSequences	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/generateFixedLengthSequences	(revision 914)
@@ -0,0 +1,17 @@
+Generates sequences of a fixed length from a usage profile. This command first generates all sequences of the desired lengths and then draws from them according to the probability each sequence has in the usage profile.
+
+Generating all possible sequences is exponential in the length of the sequences, therefore, this command does not scale well in the parameter <maxlength>!
+
+$USAGE$
+<modelname> name of the usage profile from which the sequences are generated
+<sequencesName> name of the sequences that are generated
+<minlenght> minimal length of a sequence
+<maxlength> maximal length of a sequence
+<all> optional; if true, all possible sequences are generated and the <numSequences> parameter is ignored; default: true
+<numSequences> optional; number of sequences to be generated; no default, has to be defined if <all> is false
+<validEnd> optional; if true, only sequences that finish in the global END state are allowed; default: true
+
+Example(s):
+generateFixedLengthSequences markovModel generated_sequences 5 7
+generateFixedLengthSequences markovModel generated_sequences 5 7 false 500
+generateFixedLengthSequences markovModel generated_sequences 5 7 false 500 false
Index: trunk/autoquest-ui-core/src/main/resources/manuals/generateGreedy
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/generateGreedy	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/generateGreedy	(revision 914)
@@ -0,0 +1,14 @@
+Generates sequences from a usage profile with a greedy strategy to fulfill a desired usage-based coverage value.
+
+$USAGE$
+<modelname> name of the usage profile from which the sequences are generated
+<sequencesName> name of the sequences that are generated
+<minlenght> minimal length of a sequence
+<maxlength> maximal length of a sequence
+<coverageDepth> depth of the desired coverage
+<desiredCoverage> desired coverage percentage
+<validEnd> optional; if true, only sequences that finish in the global END state are allowed; default: true
+
+Example(s)
+generateHybrid markovModel generated_sequences 5 7 3 0.9
+generateHybrid markovModel generated_sequences 5 7 3 0.9 false
Index: trunk/autoquest-ui-core/src/main/resources/manuals/generateHybrid
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/generateHybrid	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/generateHybrid	(revision 914)
@@ -0,0 +1,13 @@
+Generates sequences with a hybrid strategy that is a mixture of random walks and drawing from all possible sequences. Up to <maxLengthAll>, the command draws from all possible sequences. Then, the sequences are finished through random walks. 
+
+$USAGE$
+<modelname> name of the usage profile from which the sequences are generated
+<sequencesName> name of the sequences that are generated
+<lenght> length of a sequence
+<maxlengthAll> maximal length where the command draws from all possible sequences
+<numSequences> number of sequences to be generated
+<validEnd> optional; if true, only sequences that finish in the global END state are allowed; default: true
+
+Example(s):
+generateHybrid markovModel generated_sequences 6 4 500
+generateHybrid markovModel generated_sequences 6 4 500 false
Index: trunk/autoquest-ui-core/src/main/resources/manuals/generateRandomSequences
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/generateRandomSequences	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/generateRandomSequences	(revision 914)
@@ -0,0 +1,15 @@
+Generates sequences by randomly walking a usage profile. 
+
+$USAGE$
+<modelname> name of the usage profile from which the sequences are generated
+<sequencesName> name of the sequences that are generated
+<numSequences> number of sequences to be generated
+<minlenght> minimal length of a sequence
+<maxlength> maximal length of a sequence
+<maxIter> optional; defines the maximal number of random walks performed before aborting and returning with less than <numSequences> generated sequences; default: <numSequences>*10
+<validEnd> optional; if true, only sequences that finish in the global END state are allowed; default: true
+
+Example(s):
+generateRandomSequences markovModel generated_sequences 500 4 6
+generateRandomSequences markovModel generated_sequences 500 4 6 100000
+generateRandomSequences markovModel generated_sequences 500 4 6 100000 false
Index: trunk/autoquest-ui-core/src/main/resources/manuals/generateReplayfile
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/generateReplayfile	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/generateReplayfile	(revision 914)
@@ -0,0 +1,8 @@
+Generates a replay file from a  collection of sequences.
+
+$USAGE$
+<filename> name of the replay file
+<sequences> name of the sequences
+
+Example(s):
+generateReplayfile replay.xml replaySequences
Index: trunk/autoquest-ui-core/src/main/resources/manuals/listSymbols
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/listSymbols	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/listSymbols	(revision 914)
@@ -0,0 +1,9 @@
+Lists all symbols that are contained in a usage profile.
+
+$USAGE$
+<modelname> name of the usage profile
+<sort> optional; if true, the symbols are sorted alphabetically; default: false
+
+Example(s):
+listSymbols markovModel
+listSymbols markovModel true
Index: trunk/autoquest-ui-core/src/main/resources/manuals/load
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/load	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/load	(revision 914)
@@ -0,0 +1,9 @@
+Loads a new global data container from a file. All data currently present is discarded. 
+
+This command is the counterpart of the save command.
+
+$USAGE$
+<filename> name of the data container file
+
+Example(s):
+load container.dat
Index: trunk/autoquest-ui-core/src/main/resources/manuals/loadObject
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/loadObject	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/loadObject	(revision 914)
@@ -0,0 +1,11 @@
+Loads a single object (e.g., a collection of sequences or a usage profile) from a file.
+
+This command is the counterpart of the saveObject command.
+
+$USAGE$
+<filename> name of the file in which the object is stored
+<objectName> name under which the object is added to the storage
+
+Example(s)
+loadObject object.dat objectName
+loadObject sequences.dat sequences
Index: trunk/autoquest-ui-core/src/main/resources/manuals/modelSize
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/modelSize	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/modelSize	(revision 914)
@@ -0,0 +1,7 @@
+Prints the size of of a usage profile to the console.
+
+$USAGE$
+<modelname> name of the usage profile
+
+Example(s):
+modelSize markovModel
Index: trunk/autoquest-ui-core/src/main/resources/manuals/printDot
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/printDot	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/printDot	(revision 914)
@@ -0,0 +1,7 @@
+Outputs the DOT (see: http://en.wikipedia.org/wiki/DOT_language) representation of a usage profile to the console. Note, that not all usage profile types have a DOT representation.
+
+$USAGE$
+<modelname> name of the usage profile
+
+Example(s):
+printDot markovModel
Index: trunk/autoquest-ui-core/src/main/resources/manuals/printTrieDot
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/printTrieDot	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/printTrieDot	(revision 914)
@@ -0,0 +1,7 @@
+Outputs the DOT (see: http://en.wikipedia.org/wiki/DOT_language) representation of the trie on which a usage profile is build to the console. Note, that not all usage profiles have to be built upon tries.
+
+$USAGE$
+<modelname> name of the usage profile
+
+Example(s):
+printTrieDot markovModel
Index: trunk/autoquest-ui-core/src/main/resources/manuals/save
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/save	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/save	(revision 914)
@@ -0,0 +1,9 @@
+Saves the global data container to a file. 
+
+This command is the counterpart of the load command.
+
+$USAGE$
+<filename> name of the data container file
+
+Example(s):
+save container.dat
Index: trunk/autoquest-ui-core/src/main/resources/manuals/saveObject
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/saveObject	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/saveObject	(revision 914)
@@ -0,0 +1,11 @@
+Saves a single object (e.g., a collection of sequences or a usage profile) to a file.
+
+This command is the counterpart of the loadObject command.
+
+$USAGE$
+<filename> name of the file in which the object will be stored
+<objectName> name of the object to be saved
+
+Example(s)
+saveObject object.dat objectName
+saveObject sequences.dat sequences
Index: trunk/autoquest-ui-core/src/main/resources/manuals/sequenceStatistics
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/sequenceStatistics	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/sequenceStatistics	(revision 914)
@@ -0,0 +1,7 @@
+Prints basic statistical information about stored sequences, e.g., how many there are of which length.
+
+$USAGE$
+<sequencesName> name of the sequences
+
+Example(s):
+sequenceStatistics sequences
Index: trunk/autoquest-ui-core/src/main/resources/manuals/showMarkovModel
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/showMarkovModel	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/showMarkovModel	(revision 914)
@@ -0,0 +1,9 @@
+Visualizes usage profiles based on first-order Markov models.
+
+$USAGE$
+<modelname> name of the usage profile
+<showNodeNames> optional; if true, the names of the states of the Markov model are part of the visualization; otherwise only the structure and the probabilities are shown ;default: false
+
+Example(s):
+showMarkovModel firstOrderMarkovModel
+showMarkovModel firstOrderMarkovModel true
Index: trunk/autoquest-ui-core/src/main/resources/manuals/showTimer
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/showTimer	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/showTimer	(revision 914)
@@ -0,0 +1,7 @@
+Traces the current value of a timer. 
+
+$USAGE$
+<timerName> name of the timer
+
+Example(s):
+showTimer timer
Index: trunk/autoquest-ui-core/src/main/resources/manuals/showTrie
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/showTrie	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/showTrie	(revision 914)
@@ -0,0 +1,7 @@
+Visualizes the trie underlying a usage profile. Note, that not all usage profiles have to be built upon tries.
+
+$USAGE$
+<modelname> name of the usage profile
+
+Example(s):
+showTrie markovModel
Index: trunk/autoquest-ui-core/src/main/resources/manuals/startFileListener
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/startFileListener	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/startFileListener	(revision 914)
@@ -0,0 +1,7 @@
+Starts a file listener, i.e., a listener that writes all outputs to the console to a file.
+
+$USAGE$
+<filename> name of the file
+
+Example(s)
+startFileListener output.log
Index: trunk/autoquest-ui-core/src/main/resources/manuals/startTimer
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/startTimer	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/startTimer	(revision 914)
@@ -0,0 +1,7 @@
+Starts a new timer that measures the time elapsed since the call of startTimer in milliseconds. 
+
+$USAGE$
+<timerName> name of the timer
+
+Example(s):
+startTimer timer
Index: trunk/autoquest-ui-core/src/main/resources/manuals/stopFileListener
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/stopFileListener	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/stopFileListener	(revision 914)
@@ -0,0 +1,7 @@
+Stops a file listener from writing output to a log. 
+
+$USAGE$
+<filename> name of the file
+
+Example(s):
+stopFileListener output.log
Index: trunk/autoquest-ui-core/src/main/resources/manuals/trainDFA
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/trainDFA	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/trainDFA	(revision 914)
@@ -0,0 +1,8 @@
+Trains a Deterministic Finite Automaton (DFA) from a collection of sequences.
+
+$USAGE$
+<modelname> the name of the DFA
+<sequences> the name of the sequences from which the model is trained 
+
+Example(s):
+trainDFA dfa sequences
Index: trunk/autoquest-ui-core/src/main/resources/manuals/trainMarkovModel
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/trainMarkovModel	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/trainMarkovModel	(revision 914)
@@ -0,0 +1,10 @@
+Trains a Markov model from a collection of sequences. 
+
+$USAGE$
+<modelname> the name of the Markov model
+<sequences> the name of the sequences from which the model is trained
+<markovOrder> optional; defines the memory length of the trained Markov model; default: 1
+
+Examples:
+trainMarkovModel mm sequences
+trainMarkovModel mm sequences 3
Index: trunk/autoquest-ui-core/src/main/resources/manuals/trainPPM
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/trainPPM	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/trainPPM	(revision 914)
@@ -0,0 +1,12 @@
+Trains a Prediction by Partial Match (PPM) model from a collection of sequences. 
+
+$USAGE$
+<modelname> the name of the PPM model
+<sequences> the name of the sequences from which the model is trained
+<probEscape> defines the probability to use a lower order Markov model
+<maxOrder> defines the Markov order of the PPM model
+<minOrder> optional; defines the minimal Markov order of the PPM model; default: 0
+
+Examples:
+trainPPM ppm sequences 0.1 3
+trainPPM ppm sequences 0.1 3 1
Index: trunk/autoquest-ui-core/src/main/resources/manuals/updateModel
===================================================================
--- trunk/autoquest-ui-core/src/main/resources/manuals/updateModel	(revision 914)
+++ trunk/autoquest-ui-core/src/main/resources/manuals/updateModel	(revision 914)
@@ -0,0 +1,8 @@
+Updates the training a usage profile with an additional collection of sequences. The original training is not lost, but reinforced by the new sequences.
+
+$USAGE$
+<modelname> name of the usage profile 
+<sequencesName> name of the sequences
+
+Example(s):
+updateModel markovModel newSequences
