Index: /tags/java-utils-0.1.0/.classpath
===================================================================
--- /tags/java-utils-0.1.0/.classpath	(revision 1470)
+++ /tags/java-utils-0.1.0/.classpath	(revision 1470)
@@ -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 including="**/*.java" kind="src" path="src/main/resources"/>
+	<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 kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
+		<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: /tags/java-utils-0.1.0/.project
===================================================================
--- /tags/java-utils-0.1.0/.project	(revision 1470)
+++ /tags/java-utils-0.1.0/.project	(revision 1470)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>java-utils</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</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>
+	</natures>
+</projectDescription>
Index: /tags/java-utils-0.1.0/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- /tags/java-utils-0.1.0/.settings/org.eclipse.jdt.core.prefs	(revision 1470)
+++ /tags/java-utils-0.1.0/.settings/org.eclipse.jdt.core.prefs	(revision 1470)
@@ -0,0 +1,12 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+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.7
Index: /tags/java-utils-0.1.0/.settings/org.eclipse.m2e.core.prefs
===================================================================
--- /tags/java-utils-0.1.0/.settings/org.eclipse.m2e.core.prefs	(revision 1470)
+++ /tags/java-utils-0.1.0/.settings/org.eclipse.m2e.core.prefs	(revision 1470)
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
Index: /tags/java-utils-0.1.0/pom.xml
===================================================================
--- /tags/java-utils-0.1.0/pom.xml	(revision 1470)
+++ /tags/java-utils-0.1.0/pom.xml	(revision 1470)
@@ -0,0 +1,51 @@
+<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">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>de.ugoe.cs</groupId>
+    <artifactId>java-utils</artifactId>
+    <version>0.1.0</version>
+    <name>java-utils</name>
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+        </license>
+    </licenses>
+    <scm>
+        <url>https://autoquest.informatik.uni-goettingen.de/svn/autoquest/tags/java-utils-0.1.0</url>
+        <connection>scm:svn:https://autoquest.informatik.uni-goettingen.de/svn/autoquest/tags/java-utils-0.1.0</connection>
+    </scm>
+    <distributionManagement>
+        <snapshotRepository>
+            <id>autoquest-snapshots</id>
+            <url>https://trex.informatik.uni-goettingen.de/nexus/content/repositories/autoquest-snapshots</url>
+        </snapshotRepository>
+        <repository>
+            <id>autoquest</id>
+            <url>https://trex.informatik.uni-goettingen.de/nexus/content/repositories/autoquest-releases</url>
+        </repository>
+    </distributionManagement>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>1.3.2</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <version>2.1</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>2.3.2</version>
+                <configuration>
+                    <source>1.7</source>
+                    <target>1.7</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>
Index: /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/ArrayTools.java
===================================================================
--- /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/ArrayTools.java	(revision 1470)
+++ /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/ArrayTools.java	(revision 1470)
@@ -0,0 +1,157 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.util;
+
+/**
+ * <p>
+ * Helper class that provides methods to simplify working with arrays.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+final public class ArrayTools {
+
+	/**
+	 * <p>
+	 * Private constructor to prevent initializing of the class.
+	 * </p>
+	 */
+	private ArrayTools() {
+
+	}
+
+	/**
+	 * <p>
+	 * Finds the first occurrence of an object inside an array.
+	 * </p>
+	 * <p>
+	 * In case {@code other==null}, the first occurrence of a {@code null} value
+	 * in the array is returned.
+	 * </p>
+	 * 
+	 * @param array
+	 *            the array
+	 * @param other
+	 *            the object
+	 * @return index of the object if found, -1 otherwise
+	 */
+	public static int findIndex(Object[] array, Object other) {
+		int retVal = -1;
+		for (int i = 0; i < array.length && retVal == -1; i++) {
+			if (other != null) {
+				if (array[i] != null && array[i].equals(other)) {
+					retVal = i;
+				}
+			} else {
+				if (array[i] == null) {
+					retVal = i;
+				}
+			}
+		}
+		return retVal;
+	}
+
+	/**
+	 * <p>
+	 * Finds the highest element in an array. If multiple elements have the
+	 * maximum value, the index of the first one is returned; null-values are
+	 * ignored. In case the parameter array is null, has length 0 or contains
+	 * only null-values, -1 is returned.
+	 * </p>
+	 * 
+	 * @param <T>
+	 * @param array
+	 *            the array
+	 * @return index of the element with the highest value, -1 in case of an
+	 *         invalid parameter
+	 */
+	@SuppressWarnings("unchecked")
+	public static <T> int findMax(Comparable<T>[] array) {
+		int maxIndex = -1;
+		T maxElement = null;
+		if (array != null) {
+			for (int i = 0; i < array.length; i++) {
+				if (array[i] != null) {
+					if (maxElement == null
+							|| array[i].compareTo(maxElement) > 0) {
+						maxElement = (T) array[i];
+						maxIndex = i;
+					}
+				}
+			}
+		}
+		return maxIndex;
+	}
+	
+	/**
+	 * <p>
+	 * Finds the highest element in an array. If multiple elements have the
+	 * maximum value, the index of the first one is returned; null-values are
+	 * ignored. In case the parameter array is null, has length 0 or contains
+	 * only null-values, -1 is returned.
+	 * </p>
+	 * 
+	 * @param array
+	 *            the array
+	 * @return index of the element with the highest value, -1 in case of an
+	 *         invalid parameter
+	 */
+	public static int findMax(double[] array) {
+		int maxIndex = -1;
+		double maxElement = -Double.MAX_VALUE;
+		if (array != null) {
+			for (int i = 0; i < array.length; i++) {
+				if (array[i] > maxElement) {
+					maxElement = array[i];
+					maxIndex = i;
+				}
+			}
+		}
+		return maxIndex;
+	}
+
+	/**
+	 * <p>
+	 * Finds the lowest element in an array. If multiple elements have the
+	 * minimal value, the index of the first one is returned; null-values are
+	 * ignored. In case the parameter array is null, has length 0 or contains
+	 * only null-values, -1 is returned.
+	 * </p>
+	 * 
+	 * @param <T>
+	 * @param array
+	 *            the array
+	 * @return index of the element with the lowest value, -1 in case of an
+	 *         invalid parameter
+	 */
+	@SuppressWarnings("unchecked")
+	public static <T> int findMin(Comparable<T>[] array) {
+		int maxIndex = -1;
+		T maxElement = null;
+		if (array != null) {
+			for (int i = 0; i < array.length; i++) {
+				if (array[i] != null) {
+					if (maxElement == null
+							|| array[i].compareTo(maxElement) < 0) {
+						maxElement = (T) array[i];
+						maxIndex = i;
+					}
+				}
+			}
+		}
+		return maxIndex;
+	}
+}
Index: /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/FileTools.java
===================================================================
--- /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/FileTools.java	(revision 1470)
+++ /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/FileTools.java	(revision 1470)
@@ -0,0 +1,187 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.util;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.nio.charset.Charset;
+
+/**
+ * <p>
+ * Helper class that provides methods that simplify working with files.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class FileTools {
+
+    /**
+     * <p>
+     * Private constructor to prevent initializing of the class.
+     * </p>
+     */
+    private FileTools() {
+
+    }
+
+    /**
+     * <p>
+     * Returns an array of the lines contained in a file. The line separator is
+     * {@link StringTools#ENDLINE}.
+     * </p>
+     * 
+     * @param filename
+     *            name of the file
+     * @return string array, where each line contains a file
+     * @throws IOException
+     *             see {@link FileReader#read(char[])}, {@link FileReader#close()}
+     * @throws FileNotFoundException
+     *             see {@link FileReader#FileReader(File)}
+     */
+    public static String[] getLinesFromFile(String filename) throws IOException,
+        FileNotFoundException
+    {
+        boolean carriageReturn = true;
+        if (StringTools.ENDLINE.equals("\n")) {
+            carriageReturn = false;
+        }
+        return getLinesFromFile(filename, carriageReturn);
+    }
+
+    /**
+     * <p>
+     * Returns an array of the lines contained in a file.
+     * </p>
+     * 
+     * @param filename
+     *            name of the file
+     * @param carriageReturn
+     *            if true, "\r\n", if false "\n" is used as line separator
+     * @return string array, where each line contains a file
+     * @throws IOException
+     *             see {@link FileReader#read(char[])}, {@link FileReader#close()}
+     * @throws FileNotFoundException
+     *             see {@link FileReader#FileReader(File)}
+     */
+    public static String[] getLinesFromFile(String filename, boolean carriageReturn)
+        throws IOException, FileNotFoundException
+    {
+        File f = new File(filename);
+        FileInputStream fis = new FileInputStream(f);
+        InputStreamReader reader = new InputStreamReader(fis, Charset.defaultCharset());
+        char[] buffer = new char[(int) f.length()];
+        reader.read(buffer);
+        reader.close();
+        String splitString;
+        if (carriageReturn) {
+            splitString = "\r\n";
+        }
+        else {
+            splitString = "\n";
+        }
+        return (new String(buffer)).split(splitString);
+    }
+
+    /**
+     * <p>
+     * Writes an array to a file using the toString function of its object.
+     * </p>
+     * 
+     * @param array
+     *            array that is written
+     * @param filename
+     *            name of the output file
+     * @param separator
+     *            separator string that is put between the array objects
+     * @param lineBreak
+     *            if true, a new line is added after each array element and its separator
+     * @throws IOException
+     *             see {@link BufferedWriter#write(String)}, {@link BufferedWriter#newLine()},
+     *             {@link BufferedWriter#flush()}, {@link BufferedWriter#close()},
+     *             {@link FileWriter#FileWriter(String)}
+     */
+    public static <T> void writeArrayToFile(T[] array,
+                                            String filename,
+                                            String separator,
+                                            boolean lineBreak) throws IOException
+    {
+        BufferedWriter outputWriter = null;
+        outputWriter = new BufferedWriter(new FileWriter(filename));
+        for (int i = 0; i < array.length; i++) {
+            outputWriter.write(array[i].toString());
+            if (i < array.length - 1) {
+                outputWriter.write(separator);
+                if (lineBreak) {
+                    outputWriter.newLine();
+                }
+            }
+        }
+        outputWriter.flush();
+        outputWriter.close();
+    }
+
+    /**
+     * <p>
+     * Autocompletes a given path. The path must be absolute. Otherwise, autocompletion is not
+     * possible.
+     * </p>
+     * 
+     * @param prefix
+     *            the prefix to be complete
+     * @return the auto completed path
+     */
+    public static String autoCompletePath(String prefix) {
+        File prefixFile = new File(prefix);
+        File parentDir = prefixFile.getParentFile();
+
+        if (parentDir == null) {
+            // the prefix does not denote a path or denotes one of the root directories.
+            // this can not be auto completed
+            return prefix;
+        }
+
+        String[] completions = null;
+
+        if (parentDir.exists()) {
+            completions = parentDir.list();
+        }
+
+        if (completions == null) {
+            completions = new String[0];
+        }
+
+        String completedPrefix;
+
+        completedPrefix = StringTools.autocomplete(prefixFile.getName(), completions);
+
+        File completedFile = new File(parentDir, completedPrefix);
+
+        if (completedFile.exists() && completedFile.isDirectory()) {
+            return completedFile.getAbsolutePath() + File.separator;
+        }
+        else {
+            return (parentDir.getAbsolutePath() + File.separator + completedPrefix)
+                .replaceAll("//", "/");
+        }
+    }
+
+}
Index: /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/StopWatch.java
===================================================================
--- /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/StopWatch.java	(revision 1470)
+++ /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/StopWatch.java	(revision 1470)
@@ -0,0 +1,315 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.util;
+
+import java.io.PrintStream;
+import java.text.DecimalFormat;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * This is a simple implementation for a stop watch that can be used for performance measures.
+ * A stop watch can be used to measure several splits. Each split is started and stopped using the
+ * same id provided to the {@link #start(String)} and {@link #stop(String)} methods. The measured
+ * durations can be retrieved afterwards using {@link #getDuration(String)}.
+ * {@link #dumpStatistics(PrintStream)} is a convenience method useful to effectively dump all
+ * information for the different splits.
+ * </p>
+ * 
+ * @author Patrick Harms
+ */
+public class StopWatch {
+    
+    /**
+     * the splits hold internally
+     */
+    private Map<String, Split> mSplits = new HashMap<String, Split>();
+
+    /**
+     * starts a split with the given id. If the split with the id is already started, an
+     * {@link IllegalStateException} is thrown.
+     *
+     * @param id the id of the split to be started
+     * 
+     * @throws IllegalStateException if the split is already started
+     */
+    public void start(String id) throws IllegalStateException {
+        Split split = mSplits.get(id);
+        
+        if (split == null) {
+            split = new Split(id);
+            mSplits.put(id, split);
+        }
+        
+        split.start();
+    }
+    
+    /**
+     * stops a split with the given id. If the split with the id is already stopped, an
+     * {@link IllegalStateException} is thrown. If no split with the given id exists, an
+     * {@link IllegalArgumentException} is thrown.
+     *
+     * @param id the id of the split to be stopped
+     * 
+     * @throws IllegalStateException    if the split is not running
+     * @throws IllegalArgumentException if the split with the given id does not exist
+     */
+    public void stop(String id) throws IllegalStateException, IllegalArgumentException {
+        Split split = mSplits.get(id);
+       
+        if (split == null) {
+            throw new IllegalArgumentException("split with id " + id + " does not exist");
+        }
+       
+        split.stop();
+    }
+    
+    /**
+     * returns the duration of a split with the given id. If the split with the id is currently
+     * running, it is stopped. If no split with the given id exists, an
+     * {@link IllegalArgumentException} is thrown.
+     *
+     * @param id the id of the split for which the duration shall be returned
+     * 
+     * @return the duration measured for the split
+     * 
+     * @throws IllegalArgumentException if the split with the given id does not exist
+     */
+    public long getDuration(String id) throws IllegalArgumentException {
+        Split split = mSplits.get(id);
+        
+        if (split == null) {
+            throw new IllegalArgumentException("split with id " + id + " does not exist");
+        }
+       
+        if (split.isRunning()) {
+            split.stop();
+        }
+        
+        return split.getDuration();
+    }
+
+    /**
+     * resets the stop watch and clears all splits 
+     */
+    public void reset() {
+        mSplits.clear();
+    }
+    
+    /**
+     * dumps the statistics about the splits. Splits still running are stopped. The method checks
+     * if the longest split also covers the other splits. If so, it considers this split as a
+     * kind of overall duration and dumps the proportion of all other splits to this split in
+     * percentage.
+     * 
+     * @param out the stream to dump the statistics to
+     */
+    public void dumpStatistics(PrintStream out) {
+        if (mSplits.size() <= 0) {
+            throw new IllegalStateException("no splits registered that could be dumped");
+        }
+        
+        Map<String, Long> durations = new HashMap<String, Long>();
+        
+        // get durations
+        for (String id : mSplits.keySet()) {
+            durations.put(id, getDuration(id));
+        }
+        
+        // sort by duration
+        List<String> sortedIds = new LinkedList<String>();
+        int maxIdLength = 0;
+        
+        for (Map.Entry<String, Long> entry : durations.entrySet()) {
+            boolean added = false;
+            for (int i = 0; i < sortedIds.size(); i++) {
+                if (durations.get(sortedIds.get(i)) >= entry.getValue()) {
+                    sortedIds.add(i, entry.getKey());
+                    added = true;
+                    break;
+                }
+            }
+           
+            if (!added) {
+                sortedIds.add(entry.getKey());
+            }
+            
+            maxIdLength = Math.max(maxIdLength, entry.getKey().length());
+        }
+        
+        // get longest duration and check whether it spans all other entries
+        String id = sortedIds.get(sortedIds.size() - 1);
+        Split longestWatch = mSplits.get(id);
+        boolean longestDurationCoversOthers = true;
+        
+        for (Map.Entry<String, Split> watch : mSplits.entrySet()) {
+            if ((watch.getValue().getFirstStart() < longestWatch.getFirstStart()) ||
+                (watch.getValue().getLastStop() > longestWatch.getLastStop()))
+            {
+                longestDurationCoversOthers = false;
+                break;
+            }
+        }
+        
+        // no finally start the dumping
+        out.println();
+        out.println("Watch Statistics");
+        out.println("================");
+
+        for (String sortedId : sortedIds) {
+            out.print(sortedId);
+            
+            for (int i = sortedId.length(); i <= maxIdLength; i++) {
+                out.print(' ');
+            }
+            
+            out.print(": ");
+            
+            out.print(durations.get(sortedId));
+            out.print(" ms");
+            
+            out.print(" (");
+            out.print(mSplits.get(sortedId).getNoOfStarts());
+            out.print(" starts");
+            
+            //out.print(", ");
+            //out.print(1000 * durations.get(sortedId) / mSplits.get(sortedId).getNoOfStarts());
+            //out.print(" ms per 1000 starts");
+
+            if (longestDurationCoversOthers) {
+                out.print(", ");
+                out.print(DecimalFormat.getPercentInstance().format
+                              ((double) durations.get(sortedId) / longestWatch.getDuration()));
+                out.print(" of overall duration");
+            }
+            
+            out.println(')');
+        }
+        
+        out.println();
+    }
+    
+    /**
+     * internally used to store splits
+     */
+    private static class Split {
+        
+        /**
+         * the id of the split
+         */
+        private String id;
+        
+        /**
+         * the system time of the first start of the split
+         */
+        private long firstStart = -1;
+        
+        /**
+         * the system time of the last start of the split
+         */
+        private long lastStart = -1;
+        
+        /**
+         * the system time of the last stop of the split
+         */
+        private long lastStop = -1;
+        
+        /**
+         * the duration so far for the split (excluding the time since the last start)
+         */
+        private long duration = 0;
+        
+        /**
+         * the number of starts or the splits
+         */
+        private long noOfStarts = 0;
+        
+        /**
+         * initializes the split with its id
+         */
+        private Split(String id) {
+            this.id = id;
+        }
+        
+        /**
+         * starts the split if it is not already started
+         */
+        private void start() throws IllegalStateException {
+            if (lastStart > -1) {
+                throw new IllegalStateException("split with id " + id + " already running");
+            }
+            
+            lastStart = System.currentTimeMillis();
+            
+            if (firstStart < 0) {
+                firstStart = lastStart;
+            }
+            
+            noOfStarts++;
+        }
+        
+        /**
+         * checks if the split is currently running
+         */
+        private boolean isRunning() {
+            return (lastStart > -1);
+        }
+        
+        /**
+         * stops the split if it is not already stopped
+         */
+        private void stop() throws IllegalStateException {
+            if (lastStart < 0) {
+                throw new IllegalStateException("split with id " + id + " not running");
+            }
+            
+            lastStop = System.currentTimeMillis();
+            duration += lastStop - lastStart;
+            lastStart = -1;
+        }
+        
+        /**
+         * returns the fist start of the split
+         */
+        private long getFirstStart() {
+            return firstStart;
+        }
+
+        /**
+         * returns the last stop of the split
+         */
+        private long getLastStop() {
+            return lastStop;
+        }
+
+        /**
+         * returns the duration of the split measured so far excluding the time since the last 
+         * start if the split is currently started
+         */
+        private long getDuration() {
+            return duration;
+        }
+
+        /**
+         * returns the number of starts for the split
+         */
+        private long getNoOfStarts() {
+            return noOfStarts;
+        }
+    }
+}
Index: /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/StringTools.java
===================================================================
--- /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/StringTools.java	(revision 1470)
+++ /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/StringTools.java	(revision 1470)
@@ -0,0 +1,123 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.util;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * <p>
+ * Helper class that provides methods to simplify working with {@link String}s.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+final public class StringTools {
+
+    /**
+     * <p>
+     * Private constructor to prevent initializing of the class.
+     * </p>
+     */
+    private StringTools() {
+
+    }
+
+    /**
+     * <p>
+     * Simplifies use of operation system specific line separators.
+     * </p>
+     */
+    public final static String ENDLINE = System.getProperty("line.separator");
+
+    /**
+     * <p>
+     * Replaces all occurrences of {@literal &, <, >, ', and "} with their respective XML entities
+     * {@literal &amp;, &lt;, &gt;, &apos;, and &quot;} without destroying already existing
+     * entities.
+     * </p>
+     * 
+     * @param str
+     *            String where the XML entities are to be replaced
+     * @return new String, where the XML entities are used instead of the literals
+     */
+    public static String xmlEntityReplacement(String str) {
+        String result = str;
+        if (result != null && !"".equals(result)) {
+            result = result.replaceAll("&(?!(?:lt|gt|apos|quot|amp);)", "&amp;");
+            result = result.replaceAll("<", "&lt;");
+            result = result.replaceAll(">", "&gt;");
+            result = result.replaceAll("'", "&apos;");
+            result = result.replaceAll("\"", "&quot;");
+        }
+        return result;
+    }
+    
+    /**
+     * <p>
+     * Performs an auto completion of the provided prefix using the given potential completions.
+     * The method searches for all completions that start with the given prefix and stores them in
+     * a subset. It then extends the prefix with characters of the subset of completions as long as
+     * the prefix still prefixes all completions in the subset. The result is then returned. If
+     * there is no matching completion or if there are several matching completions differing
+     * in the succeeding letter, the prefix is returned as is. If there is only one matching
+     * completion this completion is returned.
+     * </p>
+     * 
+     * @param prefix      the prefix to be further completed
+     * @param completions the potential completions of the prefix
+     * 
+     * @return as described
+     */
+    public static String autocomplete(String prefix, String[] completions) {
+        List<String> matchingCompletions = new ArrayList<String>();
+        for (String completion : completions) {
+            if (completion.startsWith(prefix)) {
+                matchingCompletions.add(completion);
+            }
+        }
+        
+        StringBuffer completedPrefix = new StringBuffer(prefix);
+        
+        boolean foundCompletion = false;
+        
+        while (!foundCompletion) {
+            char nextCompletionChar = 0;
+            for (String completion : matchingCompletions) {
+                if (completion.length() > completedPrefix.length()) {
+                    if (nextCompletionChar == 0) {
+                        nextCompletionChar = completion.charAt(completedPrefix.length());
+                    }
+                    else if (nextCompletionChar != completion.charAt(completedPrefix.length())) {
+                        foundCompletion = true;
+                    }
+                }
+                else {
+                    foundCompletion = true;
+                }
+            }
+            
+            if (!foundCompletion && (nextCompletionChar != 0)) {
+                completedPrefix.append(nextCompletionChar);
+            }
+            else {
+                foundCompletion = true;
+            }
+        }
+        
+        return completedPrefix.toString();
+    }
+}
Index: /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/Command.java
===================================================================
--- /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/Command.java	(revision 1470)
+++ /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/Command.java	(revision 1470)
@@ -0,0 +1,48 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.util.console;
+
+import java.util.List;
+
+/**
+ * <p>
+ * Defines the interface for a command. The class names of the commands must be
+ * of the form {@code CMD<commandname>}, otherwise they cannot be used by the
+ * {@link CommandExecuter}.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public interface Command {
+
+	/**
+	 * <p>
+	 * Executes a command.
+	 * </p>
+	 * 
+	 * @param parameters
+	 *            parameters for the command.
+	 */
+	public void run(List<Object> parameters);
+
+	/**
+	 * <p>
+	 * Returns a string the contains information about how to use the command.
+	 * </p>
+	 * @return help string
+	 */
+	public String help();
+}
Index: /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/CommandExecuter.java
===================================================================
--- /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/CommandExecuter.java	(revision 1470)
+++ /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/CommandExecuter.java	(revision 1470)
@@ -0,0 +1,375 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+
+package de.ugoe.cs.util.console;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import java.util.jar.JarEntry;
+import java.util.jar.JarInputStream;
+import java.util.logging.Level;
+
+import de.ugoe.cs.util.StringTools;
+
+/**
+ * <p>
+ * Executes commands. The commands have to implement the {@link Command} interface and be in
+ * packages registered using addCommandPackage(). Additionally, default commands are implemented in
+ * the de.ugoe.cs.util.console.defaultcommands package.
+ * </p>
+ * <p>
+ * This class is implemented as a <i>Singleton</i>.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CommandExecuter {
+
+    /**
+     * <p>
+     * Handle of the CommandExecuter instance.
+     * </p>
+     */
+    private final static CommandExecuter theInstance = new CommandExecuter();
+
+    /**
+     * <p>
+     * Prefix of all command classes.
+     * </p>
+     */
+    private static final String cmdPrefix = "CMD";
+
+    /**
+     * <p>
+     * Name of the package for default commands.
+     * </p>
+     */
+    private static final String defaultPackage = "de.ugoe.cs.util.console.defaultcommands";
+
+    /**
+     * <p>
+     * List of packages in which commands may be defined. The exec methods trys to load command from
+     * these packages in the order they have been added.
+     * </p>
+     * <p>
+     * The de.ugoe.cs.util.console.defaultcommands package has always lowest priority, unless it is
+     * specifically added.
+     * </p>
+     */
+    private List<String> commandPackageList;
+    
+    /**
+     * <p>
+     * the list of available commands (lazy instantiation in the method
+     * {@link #getAvailableCommands()})
+     * <p>
+     */
+    private Command[] availableCommands;
+
+    /**
+     * <p>
+     * Returns the instance of CommandExecuter. If no instances exists yet, a new one is created.
+     * </p>
+     * 
+     * @return the instance of CommandExecuter
+     */
+    public static synchronized CommandExecuter getInstance() {
+        return theInstance;
+    }
+
+    /**
+     * <p>
+     * Creates a new CommandExecuter. Private to prevent multiple instances (Singleton).
+     * </p>
+     */
+    private CommandExecuter() {
+        commandPackageList = new ArrayList<String>();
+    }
+
+    /**
+     * <p>
+     * Adds a package that will be used by {@link #exec(String)} to load command from.
+     * </p>
+     * 
+     * @param pkg
+     *            package where commands are located
+     * @throws IllegalArgumentException
+     *             thrown if the package name is null or empty string
+     */
+    public void addCommandPackage(String pkg) {
+        if ("".equals(pkg) || pkg == null) {
+            throw new IllegalArgumentException("package name must not be null or empty string");
+        }
+        commandPackageList.add(pkg);
+    }
+
+    /**
+     * <p>
+     * Executes the command defined by string. A command has the following form (mix of EBNF and
+     * natural language):
+     * </p>
+     * <code>
+     * &lt;command&gt; := &lt;commandname&gt;&lt;whitespace&gt;{&lt;parameter&gt;}<br>
+     * &lt;commandname&gt; := String without whitespaces. Has to be a valid Java class name<br>
+     * &lt;parameter&gt; := &lt;string&gt;|&lt;stringarray&gt;<br>
+     * &lt;string&gt; := &lt;stringwithoutwhitespaces&gt;|&lt;stringwithwhitespaces&gt;
+     * &lt;stringwithoutwhitespaces&gt; := a string without whitespaces<br>
+     * &lt;stringwithoutwhitespaces&gt; := a string, that can have whitespaces, but must be in double quotes<br>
+     * &lt;stringarray&gt; := "["&lt;string&gt;{&lt;whitespace&gt;&lt;string&gt;"]"
+     * </code>
+     * 
+     * @param command
+     *            the command as a string
+     */
+    public void exec(String command) {
+        Console.commandNotification(command);
+        Command cmd = null;
+        CommandParser parser = new CommandParser();
+        parser.parse(command);
+        for (int i = 0; cmd == null && i < commandPackageList.size(); i++) {
+            cmd = loadCMD(commandPackageList.get(i) + "." + cmdPrefix + parser.getCommandName());
+        }
+        if (cmd == null) { // check if command is available as default command
+            cmd = loadCMD(defaultPackage + "." + cmdPrefix + parser.getCommandName());
+        }
+        if (cmd == null) {
+            Console.println("Unknown command");
+        }
+        else {
+            try {
+                cmd.run(parser.getParameters());
+            }
+            catch (IllegalArgumentException e) {
+                Console.println("invalid parameter provided: " + e.getMessage());
+                Console.println("Usage: " + cmd.help());
+            }
+            catch (Exception e) {
+                Console.println("error executing command: " + e);
+                Console.logException(e);
+                Console.println("Usage: " + cmd.help());
+            }
+        }
+    }
+
+    /**
+     * <p>
+     * Helper method that loads a class and tries to cast it to {@link Command}.
+     * </p>
+     * 
+     * @param className
+     *            qualified name of the class (including package name)
+     * @return if class is available and implement {@link Command} and instance of the class, null
+     *         otherwise
+     */
+    public Command loadCMD(String className) {
+        Command cmd = null;
+        try {
+            Class<?> cmdClass = Class.forName(className);
+            cmd = (Command) cmdClass.newInstance();
+        }
+        catch (NoClassDefFoundError e) {
+            String[] splitResult = e.getMessage().split("CMD");
+            String correctName = splitResult[splitResult.length - 1].replace(")", "");
+            Console.println("Did you mean " + correctName + "?");
+        }
+        catch (ClassNotFoundException e) {}
+        catch (IllegalAccessException e) {}
+        catch (InstantiationException e) {}
+        catch (ClassCastException e) {
+            Console.traceln(Level.WARNING, className + "found, but does not implement Command");
+        }
+        return cmd;
+    }
+    
+    /**
+     * <p>
+     * Helper method that loads a class and tries to cast it to {@link Command}.
+     * </p>
+     * 
+     * @param className
+     *            qualified name of the class (including package name)
+     * @return if class is available and implement {@link Command} and instance of the class, null
+     *         otherwise
+     */
+    public Command getCMD(String commandName) {
+        Command cmd = null;
+        for (int i = 0; cmd == null && i < commandPackageList.size(); i++) {
+            cmd = loadCMD(commandPackageList.get(i) + "." + cmdPrefix + commandName);
+        }
+        if (cmd == null) { // check if command is available as default command
+            cmd = loadCMD(defaultPackage + "." + cmdPrefix + commandName);
+        }
+        return cmd;
+    }
+
+    /**
+     * <p>
+     * reads all available commands from the registered command packages and returns a list of their
+     * names
+     * </p>
+     * 
+     * @return an array containing the names of the available commands.
+     */
+    public Command[] getAvailableCommands() {
+        if (availableCommands == null) {
+            List<Command> commands = new ArrayList<Command>();
+            List<String> packages = new ArrayList<String>();
+            packages.addAll(commandPackageList);
+            packages.add(defaultPackage);
+
+            FilenameFilter filter = new FilenameFilter() {
+                @Override
+                public boolean accept(File dir, String name) {
+                    return
+                        (name != null) && (name.startsWith(cmdPrefix)) && (name.endsWith(".class"));
+                }
+            };
+
+            SortedSet<String> classNames = new TreeSet<String>(new Comparator<String>() {
+                @Override
+                public int compare(String arg1, String arg2) {
+                    String str1 = arg1.substring(arg1.lastIndexOf('.') + cmdPrefix.length() + 1);
+                    String str2 = arg2.substring(arg2.lastIndexOf('.') + cmdPrefix.length() + 1);
+                    return str1.compareTo(str2);
+                }
+
+            });
+
+            for (String packageName : packages) {
+                String path = packageName.replace('.', '/');
+                try {
+                    Enumeration<URL> resources = ClassLoader.getSystemResources(path);
+
+                    while (resources.hasMoreElements()) {
+                        URL resource = resources.nextElement();
+                        File packageDir = new File(resource.getFile());
+
+                        if (packageDir.isDirectory()) {
+                            for (File classFile : packageDir.listFiles(filter)) {
+                                String className = classFile.getName().substring
+                                    (0, classFile.getName().lastIndexOf('.'));
+                                classNames.add(packageName + "." + className);
+                            }
+                        }
+                        else {
+                            int index = resource.getFile().lastIndexOf('!');
+                            if ((index > 0) && (resource.getFile().startsWith("file:")) &&
+                                (resource.getFile().endsWith("!/" + path)))
+                            {
+                                String jarFile =
+                                    resource.getFile().substring("file:".length(), index);
+
+                                // we have to read the package content from a jar file
+                                JarInputStream jarInputStream = null;
+                                try {
+                                    jarInputStream =
+                                        new JarInputStream(new FileInputStream(jarFile));
+                                    JarEntry entry = null;
+                                    do {
+                                        entry = jarInputStream.getNextJarEntry();
+                                        if ((entry != null) && (!entry.isDirectory()) &&
+                                                (entry.getName().startsWith(path)))
+                                        {
+                                            String className = entry.getName().substring
+                                                (path.length() + 1, entry.getName().lastIndexOf('.'));
+                                            classNames.add(packageName + "." + className);
+                                        }
+                                    }
+                                    while (entry != null);
+                                }
+                                catch (Exception e) {
+                                    e.printStackTrace();
+                                    Console.traceln(Level.WARNING, "could not read contents of " +
+                                                    "jar " + jarFile);
+                                }
+                                finally {
+                                    if (jarInputStream != null) {
+                                        jarInputStream.close();
+                                    }
+                                }
+
+                            }
+                        }
+                    }
+                }
+                catch (IOException e) {
+                    Console.traceln
+                        (Level.WARNING, "could not read commands of package " + packageName);
+                }
+            }
+
+            for (String className : classNames) {
+                // class may still be inner classes. Therefore load the command, to
+                // see if it is really available and a command.
+                Command cmd = loadCMD(className);
+                if (cmd != null) {
+                    commands.add(cmd);
+                }
+            }
+
+            availableCommands = commands.toArray(new Command[commands.size()]);
+        }
+        
+        return Arrays.copyOf(availableCommands, availableCommands.length);
+    }
+    
+    /**
+     * <p>
+     * Get a copy of the currently registered command packages.
+     * </p>
+     *
+     * @return currently registered command packages
+     */
+    public List<String> getCommandPackages() {
+        List<String> commandPackageListCopy = new ArrayList<String>(commandPackageList);
+        commandPackageListCopy.add(0, defaultPackage);
+        return commandPackageListCopy;
+    }
+
+    /**
+     * <p>
+     * this method method performs an auto completion of the provided String as far as possible
+     * regarding the available commands. It auto completes to the full command name, if only
+     * one command matches the given prefix. It auto completes to the common denominator, if
+     * several commands match the prefix
+     * </p>
+     *
+     * @param commandPrefix the prefix to be auto completed
+     * 
+     * @return as described
+     */
+    public String autoCompleteCommand(String commandPrefix) {
+        Command[] commands = getAvailableCommands();
+        
+        String[] completions = new String[commands.length];
+        
+        for (int i = 0; i < commands.length; i++) {
+            completions[i] = commands[i].getClass().getSimpleName().substring(3);
+        }
+        
+        return StringTools.autocomplete(commandPrefix, completions);
+    }
+}
Index: /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/CommandParser.java
===================================================================
--- /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/CommandParser.java	(revision 1470)
+++ /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/CommandParser.java	(revision 1470)
@@ -0,0 +1,214 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.util.console;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * <p>
+ * Helper class to parse command strings and create parameters.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CommandParser {
+
+	/**
+	 * <p>
+	 * Name of the command.
+	 * </p>
+	 */
+	private String commandName;
+
+	/**
+	 * <p>
+	 * Parameters of the command as a {@link List}. The parameters can either be
+	 * {@link String} or {@link String} arrays.
+	 * </p>
+	 */
+	private List<Object> parameters;
+
+	/**
+	 * <p>
+	 * Creates a new CommandParser.
+	 * </p>
+	 */
+	public CommandParser() {
+		commandName = "";
+		parameters = new ArrayList<Object>();
+	}
+
+	/**
+	 * <p>
+	 * Returns the name of the command.
+	 * </p>
+	 * 
+	 * @return name of the command
+	 */
+	public String getCommandName() {
+		return commandName;
+	}
+
+	/**
+	 * <p>
+	 * Returns the {@link List} of parameters
+	 * </p>
+	 * 
+	 * @return {@link List} of parameters that were parsed.
+	 */
+	public List<Object> getParameters() {
+		return parameters;
+	}
+
+	/**
+	 * <p>
+	 * Parses a command after the following EBNF (mixed with natural language):
+	 * </p>
+	 * <code>
+	 * &lt;command&gt; :=
+	 * &lt;commandname&gt;&lt;whitespace&gt;{&lt;parameter&gt;}<br>
+	 * &lt;commandname&gt; := String without whitespaces. Has to be a valid Java
+	 * class name<br>
+	 * &lt;parameter&gt; := &lt;string&gt;|&lt;stringarray&gt;<br>
+	 * &lt;string&gt; :=
+	 * &lt;stringwithoutwhitespaces&gt;|&lt;stringwithwhitespaces&gt;
+	 * &lt;stringwithoutwhitespaces&gt; := a string without whitespaces<br>
+	 * &lt;stringwithoutwhitespaces&gt; := a string, that can have whitespaces,
+	 * but must be in double quotes<br>
+	 * &lt;stringarray&gt; :=
+	 * "["&lt;string&gt;{&lt;whitespace&gt;&lt;string&gt;"]"
+	 * </code>
+	 * 
+	 * @param command
+	 *            the command as a string
+	 */
+	public void parse(String command) {
+		if (command == null || command.equals("")) {
+			return;
+		}
+		String[] splitResult = command.split(" ");
+		commandName = splitResult[0];
+		char[] commandChars = command.substring(commandName.length())
+				.toCharArray();
+		boolean startParameter = true;
+		boolean isArray = false;
+		boolean startArrayparameter = false;
+		boolean isString = false;
+		int bufferPos = 0;
+		char[] buffer = new char[1024];
+		boolean quote = false;
+		List<String> arrayBuffer = null;
+		for (int i = 0; i < commandChars.length; i++) {
+			if (i < commandChars.length && startParameter
+					&& commandChars[i] == '[') {
+				isArray = true;
+				startArrayparameter = true;
+				arrayBuffer = new ArrayList<String>();
+				startParameter = false;
+				i++; // skip [
+			}
+			if (i < commandChars.length && startParameter
+					&& commandChars[i] == '\'') {
+				isString = true;
+				quote = true;
+				startParameter = false;
+				i++; // skip '
+			}
+			if (i < commandChars.length && startParameter
+					&& !Character.isWhitespace(commandChars[i])) {
+				isString = true;
+				startParameter = false;
+			}
+			if (isArray) {
+				if (i < commandChars.length && commandChars[i] == ']') {
+					if (bufferPos > 0) {
+						buffer[bufferPos] = '\0';
+						arrayBuffer.add((new String(buffer)).trim());
+					}
+					parameters.add(arrayBuffer.toArray(new String[0]));
+					isArray = false;
+					isString = false;
+					bufferPos = 0;
+					buffer = new char[128];
+					startArrayparameter = false;
+					startParameter = true;
+					i++; // skip ]
+				}
+				if (i < commandChars.length && startArrayparameter
+						&& !Character.isWhitespace(commandChars[i])) {
+					buffer = new char[128];
+					bufferPos = 0;
+					quote = commandChars[i] == '\'';
+					if (quote) {
+						i++; // skip '
+					}
+					startArrayparameter = false;
+				}
+				if (i < commandChars.length && quote && !startArrayparameter && commandChars[i] == '\'') {
+					// end of parameter with '
+					i++; // skip '
+					startArrayparameter = true;
+					buffer[bufferPos] = '\0';
+					arrayBuffer.add((new String(buffer)).trim());
+				}
+				if (i < commandChars.length && !quote && !startArrayparameter
+						&& Character.isWhitespace(commandChars[i])) {
+					startArrayparameter = true;
+					buffer[bufferPos] = '\0';
+					arrayBuffer.add((new String(buffer)).trim());
+				}
+				if (i < commandChars.length && !startArrayparameter
+						&& !startParameter) {
+					buffer[bufferPos] = commandChars[i];
+					bufferPos++;
+				}
+			}
+			if (isString) {
+				if ((quote && commandChars[i] == '\'')
+						|| (!quote && Character.isWhitespace(commandChars[i]))) {
+					// end of parameter with '
+					if (quote) {
+						i++; // skip '
+					}
+					if (bufferPos > 0) {
+						buffer[bufferPos] = '\0';
+					}
+					parameters.add((new String(buffer).trim()));
+					isArray = false;
+					isString = false;
+					bufferPos = 0;
+					buffer = new char[1024];
+					startArrayparameter = false;
+					startParameter = true;
+				}
+				if (!startParameter) {
+					buffer[bufferPos] = commandChars[i];
+					bufferPos++;
+				}
+			}
+		}
+		if (bufferPos > 0) {
+			if (isArray) {
+				//arrayBuffer.add((new String(buffer)).trim());
+				parameters.add(arrayBuffer.toArray(new String[0]));
+			}
+			if (isString) {
+				parameters.add((new String(buffer)).trim());
+			}
+		}
+	}
+}
Index: /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/Console.java
===================================================================
--- /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/Console.java	(revision 1470)
+++ /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/Console.java	(revision 1470)
@@ -0,0 +1,499 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.util.console;
+
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.logging.Level;
+
+import de.ugoe.cs.util.StringTools;
+import de.ugoe.cs.util.console.listener.ICommandListener;
+import de.ugoe.cs.util.console.listener.IErrorListener;
+import de.ugoe.cs.util.console.listener.IExceptionListener;
+import de.ugoe.cs.util.console.listener.IOutputListener;
+import de.ugoe.cs.util.console.listener.ITraceListener;
+
+/**
+ * <p>
+ * This class provides an interface for communication with the user without have
+ * to rely on a specific user interface. Thus, it can be used to decouple the
+ * programs logic from its user interface.
+ * </p>
+ * <p>
+ * {@link Command} objects can be used to execute behavior.
+ * </p>
+ * <p>
+ * To send output to the user interface, the Observer pattern is used. The
+ * Console is an observable, the concrete user interfaces are the observers. The
+ * interface for the observers is {@link ConsoleObserver}.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public final class Console {
+
+	/**
+	 * <p>
+	 * Listeners for the output stream.
+	 * </p>
+	 */
+	private Collection<IOutputListener> outputListener;
+
+	/**
+	 * <p>
+	 * Listeners for the error stream.
+	 * </p>
+	 */
+	private Collection<IErrorListener> errorListener;
+
+	/**
+	 * <p>
+	 * Listeners for the trace stream.
+	 * </p>
+	 */
+	private Collection<ITraceListener> traceListener;
+
+	/**
+	 * <p>
+	 * Listeners for the command stream.
+	 * </p>
+	 */
+	private Collection<ICommandListener> commandListener;
+
+	/**
+	 * <p>
+	 * Listeners for the exception stream.
+	 * </p>
+	 */
+	private Collection<IExceptionListener> exceptionListener;
+
+	/**
+	 * <p>
+	 * Handle of the Console instance.
+	 * </p>
+	 */
+	private static Console theInstance = new Console();
+
+	/**
+	 * <p>
+	 * Returns the instance of Console. If no instances exists yet, a new one is
+	 * created.
+	 * </p>
+	 * 
+	 * @return instance of this class
+	 */
+	public static Console getInstance() {
+		return theInstance;
+	}
+
+	/**
+	 * <p>
+	 * Resets the Console by creating a new instance that has no registered
+	 * observers.
+	 * </p>
+	 */
+	public static void reset() {
+		theInstance.init();
+	}
+
+	/**
+	 * <p>
+	 * Creates a new Console. Private to prevent multiple instances (Singleton).
+	 * </p>
+	 */
+	private Console() {
+		init();
+	}
+
+	/**
+	 * <p>
+	 * Initializes the console.
+	 * </p>
+	 */
+	private void init() {
+		outputListener = new LinkedHashSet<IOutputListener>();
+		errorListener = new LinkedHashSet<IErrorListener>();
+		traceListener = new LinkedHashSet<ITraceListener>();
+		commandListener = new LinkedHashSet<ICommandListener>();
+		exceptionListener = new LinkedHashSet<IExceptionListener>();
+	}
+
+	/**
+	 * <p>
+	 * Register a new observer.
+	 * </p>
+	 * 
+	 * @deprecated use registerXYZListener instead
+	 * @param observer
+	 *            observer to be added
+	 */
+	public void registerObserver(ConsoleObserver observer) {
+		registerOutputListener(observer);
+		registerErrorListener(observer);
+		registerTraceListener(observer);
+		registerCommandListener(observer);
+		registerExceptionListener(observer);
+	}
+
+	/**
+	 * <p>
+	 * Registers an output listener.
+	 * </p>
+	 * 
+	 * @param listener
+	 *            listener that is registered
+	 */
+	public void registerOutputListener(IOutputListener listener) {
+		outputListener.add(listener);
+	}
+
+	/**
+	 * <p>
+	 * Registers an error listener.
+	 * </p>
+	 * 
+	 * @param listener
+	 *            listener that is registered
+	 */
+	public void registerErrorListener(IErrorListener listener) {
+		errorListener.add(listener);
+	}
+
+	/**
+	 * <p>
+	 * Registers a trace listener.
+	 * </p>
+	 * 
+	 * @param listener
+	 *            listener that is registered
+	 */
+	public void registerTraceListener(ITraceListener listener) {
+		traceListener.add(listener);
+	}
+
+	/**
+	 * <p>
+	 * Registers a command listener.
+	 * </p>
+	 * 
+	 * @param listener
+	 *            listener that is registered
+	 */
+	public void registerCommandListener(ICommandListener listener) {
+		commandListener.add(listener);
+	}
+
+	/**
+	 * <p>
+	 * Registers an exception listener.
+	 * </p>
+	 * 
+	 * @param listener
+	 *            listener that is registered
+	 */
+	public void registerExceptionListener(IExceptionListener listener) {
+		exceptionListener.add(listener);
+	}
+
+	/**
+	 * <p>
+	 * Remove an observer. If the observer is not found, nothing is done.
+	 * </p>
+	 * 
+	 * @deprecated use removeXYZListener instead
+	 * @param observer
+	 *            observer to be removed
+	 */
+	public void deleteObserver(ConsoleObserver observer) {
+		removeOutputListener(observer);
+		removeErrorListener(observer);
+		removeTraceListener(observer);
+		removeCommandListener(observer);
+		removeExceptionListener(observer);
+	}
+
+	/**
+	 * <p>
+	 * Removes an output listener.
+	 * </p>
+	 * 
+	 * @param listener
+	 *            listener that is removed
+	 */
+	public void removeOutputListener(IOutputListener listener) {
+		outputListener.remove(listener);
+	}
+
+	/**
+	 * <p>
+	 * Removes an error listener.
+	 * </p>
+	 * 
+	 * @param listener
+	 *            listener that is removed
+	 */
+	public void removeErrorListener(IErrorListener listener) {
+		errorListener.remove(listener);
+	}
+
+	/**
+	 * <p>
+	 * Removes an trace listener.
+	 * </p>
+	 * 
+	 * @param listener
+	 *            listener that is removed
+	 */
+	public void removeTraceListener(ITraceListener listener) {
+		traceListener.remove(listener);
+	}
+
+	/**
+	 * <p>
+	 * Removes a command listener.
+	 * </p>
+	 * 
+	 * @param listener
+	 *            listener that is removed
+	 */
+	public void removeCommandListener(ICommandListener listener) {
+		commandListener.remove(listener);
+	}
+
+	/**
+	 * <p>
+	 * Removes an exception listener.
+	 * </p>
+	 * 
+	 * @param listener
+	 *            listener that is removed
+	 */
+	public void removeExceptionListener(IExceptionListener listener) {
+		exceptionListener.remove(listener);
+	}
+
+	/**
+	 * <p>
+	 * Checks if a listener is registered.
+	 * </p>
+	 * 
+	 * @param listener
+	 *            listener that is checked
+	 * @return true, is listener is registered; false, otherwise
+	 */
+	public boolean hasOutputListener(IOutputListener listener) {
+		return outputListener.contains(listener);
+	}
+
+	/**
+	 * <p>
+	 * Checks if a listener is registered.
+	 * </p>
+	 * 
+	 * @param listener
+	 *            listener that is checked
+	 * @return true, is listener is registered; false, otherwise
+	 */
+	public boolean hasErrorListener(IErrorListener listener) {
+		return errorListener.contains(listener);
+	}
+
+	/**
+	 * <p>
+	 * Checks if a listener is registered.
+	 * </p>
+	 * 
+	 * @param listener
+	 *            listener that is checked
+	 * @return true, is listener is registered; false, otherwise
+	 */
+	public boolean hasTraceListener(ITraceListener listener) {
+		return traceListener.contains(listener);
+	}
+
+	/**
+	 * <p>
+	 * Checks if a listener is registered.
+	 * </p>
+	 * 
+	 * @param listener
+	 *            listener that is checked
+	 * @return true, is listener is registered; false, otherwise
+	 */
+	public boolean hasCommandListener(ICommandListener listener) {
+		return commandListener.contains(listener);
+	}
+
+	/**
+	 * <p>
+	 * Checks if a listener is registered.
+	 * </p>
+	 * 
+	 * @param listener
+	 *            listener that is checked
+	 * @return true, is listener is registered; false, otherwise
+	 */
+	public boolean hasExceptionListener(IExceptionListener listener) {
+		return exceptionListener.contains(listener);
+	}
+
+	/**
+	 * <p>
+	 * Sends a message to all observers containing the message that was passed
+	 * to this function.
+	 * </p>
+	 * 
+	 * @param msg
+	 *            message that is send to the console
+	 */
+	public static void print(String msg) {
+		for (IOutputListener observer : theInstance.outputListener) {
+			observer.outputMsg(msg);
+		}
+	}
+
+	/**
+	 * <p>
+	 * Sends a message to all observers containing the message that was passed
+	 * to this function and adds an endline to the message.
+	 * </p>
+	 * 
+	 * @param msg
+	 *            message that is send to the observers
+	 */
+	public static void println(String msg) {
+		for (IOutputListener observer : theInstance.outputListener) {
+			observer.outputMsg(msg + StringTools.ENDLINE);
+		}
+	}
+
+	/**
+	 * <p>
+	 * Sends an error message to all observers containing the message that was
+	 * passed to this function.
+	 * </p>
+	 * 
+	 * @param errMsg
+	 *            message that is send to the observers
+	 */
+	public static void printerr(String errMsg) {
+		for (IErrorListener observer : theInstance.errorListener) {
+			observer.errorMsg(errMsg);
+		}
+	}
+
+	/**
+	 * <p>
+	 * Sends an error message to all observers containing the message that was
+	 * passed to this function and adds an endline to the message.
+	 * </p>
+	 * 
+	 * @param errMsg
+	 *            message that is send to the observers
+	 */
+	public static void printerrln(String errMsg) {
+		for (IErrorListener observer : theInstance.errorListener) {
+			observer.errorMsg(errMsg + StringTools.ENDLINE);
+		}
+	}
+
+	/**
+	 * <p>
+	 * Sends an exception to all observers to print its stack trace.
+	 * </p>
+	 * 
+	 * @param e
+	 *            exception whose stack trace is to be printed
+	 */
+	public static void logException(Exception e) {
+		for (IExceptionListener observer : theInstance.exceptionListener) {
+			observer.logException(e);
+		}
+	}
+
+	/**
+	 * <p>
+	 * Sends a debug message to all observers containing the message that was
+	 * passed to this function. The default log {@link Level} is {@link Level#INFO}.
+	 * </p>
+	 * 
+	 * @param traceMsg
+	 *            message that is send to the observers
+	 */
+	@Deprecated
+	public static void trace(String traceMsg) {
+		trace(Level.INFO, traceMsg);
+	}
+	
+	/**
+	 * 
+	 * <p>
+	 * Sends a debug message to all trace listeners containing the message that was passed to this function.
+	 * </p>
+	 *
+	 * @param logLevel log level of the message
+	 * @param traceMsg message that is send to the trace listener
+	 */
+	public static void trace(Level logLevel, String traceMsg) {
+	    for( ITraceListener observer : theInstance.traceListener) {
+	        observer.traceMsg(traceMsg, logLevel);
+	    }
+	}
+
+	/**
+	 * <p>
+	 * Sends a debug message to all observers containing the message that was
+	 * passed to this function and adds an {@link StringTools#ENDLINE} to the
+	 * message. The default log {@link Level} is {@link Level#INFO}.
+	 * </p>
+	 * 
+	 * @param traceMsg
+	 *            message that is send to the observers
+	 */
+	@Deprecated
+	public static void traceln(String traceMsg) {
+		trace(Level.INFO, traceMsg + StringTools.ENDLINE);
+	}
+	
+	/**
+         * <p>
+         * Sends a debug message to all observers containing the message that was
+         * passed to this function and adds an {@link StringTools#ENDLINE} to the
+         * message.
+         * </p>
+	 *
+	 * @param logLevel log level of the message
+	 * @param traceMsg message that is send to the observers
+	 */
+	public static void traceln(Level logLevel, String traceMsg) {
+        trace(logLevel, traceMsg + StringTools.ENDLINE);
+	}
+
+	/**
+	 * <p>
+	 * Called by {@link CommandExecuter#exec(String)}.
+	 * </p>
+	 * 
+	 * @param command
+	 *            command that is executed
+	 */
+	static void commandNotification(String command) {
+		for (ICommandListener observer : theInstance.commandListener) {
+			observer.commandNotification(command);
+		}
+	}
+
+}
Index: /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/ConsoleObserver.java
===================================================================
--- /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/ConsoleObserver.java	(revision 1470)
+++ /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/ConsoleObserver.java	(revision 1470)
@@ -0,0 +1,34 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.util.console;
+
+import de.ugoe.cs.util.console.listener.ICommandListener;
+import de.ugoe.cs.util.console.listener.IErrorListener;
+import de.ugoe.cs.util.console.listener.IExceptionListener;
+import de.ugoe.cs.util.console.listener.IOutputListener;
+import de.ugoe.cs.util.console.listener.ITraceListener;
+
+/**
+ * <p>
+ * Observer for Console.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 2.0
+ * @deprecated Use listeners defined in the package de.ugoe.cs.console.listeners instead.
+ */
+public interface ConsoleObserver extends ITraceListener, IOutputListener, IErrorListener, ICommandListener, IExceptionListener {
+
+}
Index: /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/FileOutputListener.java
===================================================================
--- /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/FileOutputListener.java	(revision 1470)
+++ /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/FileOutputListener.java	(revision 1470)
@@ -0,0 +1,140 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.util.console;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+
+import de.ugoe.cs.util.console.listener.IOutputListener;
+
+/**
+ * <p>
+ * Implements an {@link IOutputListener} for the {@link Console} that logs all
+ * outputs in a file. This can be used to "pipe" the output-stream of the
+ * console into a file. The advantage of using this mechanism for piping is that
+ * the file will only contain the output stream. No errors, no commands, etc.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class FileOutputListener implements IOutputListener {
+
+	/**
+	 * <p>
+	 * Flag that ensures that only one log message is produced if the listener
+	 * breaks, e.g., because of a full hard disk/quota.
+	 * </p>
+	 */
+	boolean failureLogged = false;
+
+	/**
+	 * <p>
+	 * Name of the output file.
+	 * </p>
+	 */
+	String filename;
+
+	/**
+	 * <p>
+	 * Writer for the output.
+	 * </p>
+	 */
+	OutputStreamWriter writer = null;
+
+	/**
+	 * <p>
+	 * Constructor. Creates a new FileOutputListener.
+	 * </p>
+	 * 
+	 * @param filename
+	 *            name and path of the file the listener writes to.
+	 */
+	public FileOutputListener(String filename) {
+		this.filename = filename;
+
+	}
+
+	/**
+	 * <p>
+	 * Starts the listener by opening the file and registering it with the
+	 * {@link Console}.
+	 * </p>
+	 */
+	public void start() {
+		try {
+			FileOutputStream fos = new FileOutputStream(filename);
+			writer = new OutputStreamWriter(fos, "UTF-8");
+			Console.getInstance().registerOutputListener(this);
+		} catch (IOException e) {
+			Console.printerrln("Failed to start FileOutputListener for file "
+					+ filename + ": " + e.getMessage());
+		}
+	}
+
+	/**
+	 * <p>
+	 * Stops the listener by closing the file and removing itself from the
+	 * {@link Console}.
+	 * </p>
+	 */
+	public void stop() {
+		Console.getInstance().removeOutputListener(this);
+		if( writer!=null ) {
+			try {
+				writer.close();
+				writer = null;
+			} catch (IOException e) {
+				Console.printerrln("Failed to close file " + filename + ": "
+						+ e.getMessage());
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * de.ugoe.cs.util.console.listener.IOutputListener#outputMsg(java.lang.
+	 * String)
+	 */
+	@Override
+	public void outputMsg(String newMessage) {
+		if( writer!=null ) {
+			try {
+				writer.write(newMessage);
+			} catch (IOException e) {
+				if (!failureLogged) {
+					Console.printerrln("FileOutpustListener for file " + filename
+							+ " broken: " + e.getMessage());
+					failureLogged = true;
+				}
+			}
+		}
+	}
+
+	/**
+	 * <p>
+	 * Returns the name of the log file used by this listener.
+	 * </p>
+	 * 
+	 * @return name of the log file
+	 */
+	public String getFilename() {
+		return filename;
+	}
+
+}
Index: /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/GlobalDataContainer.java
===================================================================
--- /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/GlobalDataContainer.java	(revision 1470)
+++ /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/GlobalDataContainer.java	(revision 1470)
@@ -0,0 +1,200 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.util.console;
+
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * <p>
+ * This data structure can be used by the commands to store any {@link Object}.
+ * The data is stored in a key-value map, with strings as keys.
+ * </p>
+ * <p>
+ * This class is implemented as a singleton, as more than one data container
+ * does not serves no purpose.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class GlobalDataContainer implements Serializable {
+
+	/**
+	 * <p>
+	 * Id for object serialization.
+	 * </p>
+	 */
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * <p>
+	 * Instance of the {@link GlobalDataContainer} (implemented as singleton).
+	 * </p>
+	 */
+	transient private static GlobalDataContainer theInstance = null;
+
+	/**
+	 * <p>
+	 * Internal storage of the data.
+	 * </p>
+	 */
+	private Map<String, Object> dataObjects;
+
+	/**
+	 * <p>
+	 * Returns the instance of the container. If it does not yet exist, the data
+	 * container is created.
+	 * </p>
+	 * 
+	 * @return instance of the container
+	 */
+	public static GlobalDataContainer getInstance() {
+		if (theInstance == null) {
+			theInstance = new GlobalDataContainer();
+		}
+		return theInstance;
+	}
+
+	/**
+	 * <p>
+	 * Manual serialization of the object. Necessary to guarantee the singleton
+	 * property.
+	 * </p>
+	 * 
+	 * @param s
+	 *            output stream for the serialization
+	 * @throws IOException
+	 *             thrown if there is problem writing to the output stream
+	 */
+	private void writeObject(ObjectOutputStream s) throws IOException {
+		s.defaultWriteObject();
+		s.writeObject(dataObjects);
+	}
+
+	/**
+	 * <p>
+	 * Manual de-serialization of the object. Necessary to guarantee the
+	 * singleton property.
+	 * 
+	 * @param s
+	 *            input stream for the de-serialization
+	 * @throws IOException
+	 *             thrown if there is problem reading from the input stream
+	 * @throws ClassNotFoundException
+	 *             thrown if there is a problem reading from the input stream
+	 */
+	@SuppressWarnings("unchecked")
+	private void readObject(ObjectInputStream s) throws IOException,
+			ClassNotFoundException {
+		s.defaultReadObject();
+		if (theInstance == null) {
+			theInstance = new GlobalDataContainer();
+		}
+		theInstance.dataObjects = (Map<String, Object>) s.readObject();
+	}
+
+	/**
+	 * <p>
+	 * Manual de-serialization to guarantee the singleton property.
+	 * </p>
+	 * 
+	 * @return instance of the container
+	 */
+	private Object readResolve() {
+		return theInstance;
+	}
+
+	/**
+	 * <p>
+	 * Constructor. Creates a new GlobalDataContainer. Private to guarantee the
+	 * singleton property.
+	 * </p>
+	 */
+	private GlobalDataContainer() {
+		dataObjects = new HashMap<String, Object>();
+	}
+
+	/**
+	 * <p>
+	 * Adds data to the container.
+	 * </p>
+	 * 
+	 * @param key
+	 *            key that identifies the data
+	 * @param data
+	 *            data that is stored
+	 * @return true, if an old entry was overwritten; false otherwise
+	 */
+	public boolean addData(String key, Object data) {
+		Object previousEntry = dataObjects.put(key, data);
+		return previousEntry != null;
+	}
+
+	/**
+	 * <p>
+	 * Removes data from the container.
+	 * </p>
+	 * 
+	 * @param key
+	 *            key of the data to be removed
+	 * @return true, if the object was removed; false if it was not present
+	 */
+	public boolean removeData(String key) {
+		Object previousEntry = dataObjects.remove(key);
+		return previousEntry != null;
+	}
+
+	/**
+	 * <p>
+	 * Returns the data associated with a key or {@code null} if no data is
+	 * stored for the key.
+	 * </p>
+	 * 
+	 * @param key
+	 *            key whose data is returned
+	 * @return data associated with the key; {@code null} if no data is
+	 *         available
+	 */
+	public Object getData(String key) {
+		return dataObjects.get(key);
+	}
+
+	/**
+	 * <p>
+	 * Resets the data container, i.e., deletes all its contents.
+	 * </p>
+	 */
+	public void reset() {
+		dataObjects = new HashMap<String, Object>();
+	}
+
+	/**
+	 * <p>
+	 * Returns the keys of all objects contained in the storage.
+	 * </p>
+	 * 
+	 * @return keys of all objects in the storage
+	 */
+	public Collection<String> getAllKeys() {
+		return dataObjects.keySet();
+	}
+
+}
Index: /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/TextConsole.java
===================================================================
--- /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/TextConsole.java	(revision 1470)
+++ /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/TextConsole.java	(revision 1470)
@@ -0,0 +1,180 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.util.console;
+
+import java.io.IOException;
+import java.nio.charset.Charset;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.logging.Level;
+
+import de.ugoe.cs.util.console.listener.IErrorListener;
+import de.ugoe.cs.util.console.listener.IExceptionListener;
+import de.ugoe.cs.util.console.listener.IOutputListener;
+import de.ugoe.cs.util.console.listener.ITraceListener;
+
+/**
+ * <p>
+ * Implements a simple console observer that prints normal text to {@code stdout}, errors to
+ * {@code stderr} and reads from {@code stdin}.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class TextConsole implements IOutputListener, IErrorListener, ITraceListener,
+    IExceptionListener
+{
+
+    /**
+     * <p>
+     * Defines the trace level used by this console.
+     * </p>
+     */
+    private Level traceLevel;
+
+    private final SimpleDateFormat ft = new SimpleDateFormat("HH:mm:ss");
+
+    /**
+     * <p>
+     * Creates a new text console and automatically registers it as observer. The trace level is
+     * {@link Level#WARNING}.
+     * </p>
+     */
+    public TextConsole() {
+        this(Level.WARNING);
+    }
+
+    /**
+     * <p>
+     * Creates a new text console and automatically registers it as observer.
+     * </p>
+     * 
+     * @param traceLevel
+     *            trace level used by this text console
+     */
+    public TextConsole(Level traceLevel) {
+        Console.getInstance().registerOutputListener(this);
+        Console.getInstance().registerErrorListener(this);
+        Console.getInstance().registerTraceListener(this);
+        Console.getInstance().registerExceptionListener(this);
+        this.traceLevel = traceLevel;
+    }
+
+    /**
+     * <p>
+     * Prints messages to {@code stdout}.
+     * </p>
+     * 
+     * @see ConsoleObserver#outputMsg(java.lang.String)
+     */
+    public void outputMsg(String newMessage) {
+        System.out.print(newMessage);
+    }
+
+    /**
+     * <p>
+     * Prints messages to {@code stderr}.
+     * </p>
+     * 
+     * @see ConsoleObserver#errorMsg(String)
+     */
+    @Override
+    public void errorMsg(String errMessage) {
+        System.err.print(errMessage);
+    }
+
+    /**
+     * <p>
+     * Prints the stacktrace of an exception to {@code stderr} if the log level is more or equally
+     * detailed to <code>Level.FINE</code>. Otherwise, it just prints a line naming the exception
+     * or only the message, if any. 
+     * </p>
+     * 
+     * @see ConsoleObserver#logException(Exception)
+     */
+    @Override
+    public void logException(Exception e) {
+        if (traceLevel.intValue() > Level.FINE.intValue()) {
+            if (e.getMessage() != null) {
+                System.err.println(e.getMessage());
+            }
+            else {
+                System.err.println(e);
+            }
+        }
+        else {
+            e.printStackTrace(System.err);
+        }
+    }
+
+    /**
+     * <p>
+     * Prints messages to {@code stdout}. These messages are only printed, if the console is run in
+     * debug mode.
+     * </p>
+     */
+    @Override
+    public void traceMsg(String traceMessage, Level level) {
+        if (level.intValue() >= traceLevel.intValue()) {
+            System.out.print("[" + level.toString() + "] [" + ft.format(new Date()) + "] " +
+                traceMessage);
+        }
+    }
+
+    /**
+     * <p>
+     * Starts a new TextConsole. If the text console is started, it can be used not only to print
+     * message, but also to execute commands by reading {@code stdin}.
+     * </p>
+     */
+    public void run() {
+        CommandExecuter exec = CommandExecuter.getInstance();
+        while (true) {
+            System.out.print("> ");
+            String command = getCommand().trim();
+            if (!command.equals("")) {
+                exec.exec(command);
+            }
+        }
+    }
+
+    /**
+     * <p>
+     * Reads a new command from {@code stdin}.
+     * </p>
+     * 
+     * @return a string with a command
+     */
+    protected String getCommand() {
+        byte[] buffer = new byte[1024];
+        int bytesRead = 0;
+        String command;
+        try {
+            bytesRead = System.in.read(buffer);
+        }
+        catch (IOException e) {
+
+        }
+        if (bytesRead == 0) {
+            command = "";
+        }
+        else {
+            command = new String(buffer, Charset.defaultCharset());
+        }
+        return command;
+    }
+
+}
Index: /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/defaultcommands/CMDexec.java
===================================================================
--- /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/defaultcommands/CMDexec.java	(revision 1470)
+++ /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/defaultcommands/CMDexec.java	(revision 1470)
@@ -0,0 +1,83 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.util.console.defaultcommands;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.List;
+import java.util.logging.Level;
+
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.CommandExecuter;
+import de.ugoe.cs.util.console.Console;
+
+/**
+ * <p>
+ * Command to execute a batch of {@link Command}s. The batch is defined as a
+ * text file, where each line defines one command.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDexec implements Command {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	public void run(List<Object> parameters) {
+		String script;
+		try {
+			script = (String) parameters.get(0);
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+		try {
+			String[] commands;
+			File f = new File(script);
+			FileInputStream fis = new FileInputStream(f);
+			InputStreamReader reader = new InputStreamReader(fis, "UTF-8");
+			char[] buffer = new char[(int) f.length()];
+			reader.read(buffer);
+			commands = (new String(buffer)).split("\n");
+			for (String command : commands) {
+			    if( !command.trim().startsWith("%")) {
+				Console.traceln(Level.INFO, "Executing \"" + command.trim() + "\"");
+				CommandExecuter.getInstance().exec(command);
+			    }
+			}
+			reader.close();
+		} catch (FileNotFoundException e) {
+			Console.printerrln(e.getMessage());
+		} catch (IOException e) {
+			Console.printerrln(e.getMessage());
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see databasebuilder.console.commands.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "exec <filename>";
+	}
+}
Index: /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/defaultcommands/CMDexit.java
===================================================================
--- /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/defaultcommands/CMDexit.java	(revision 1470)
+++ /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/defaultcommands/CMDexit.java	(revision 1470)
@@ -0,0 +1,51 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.util.console.defaultcommands;
+
+import java.util.List;
+
+import de.ugoe.cs.util.console.Command;
+
+/**
+ * <p>
+ * Command to terminate an application.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDexit implements Command {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see databasebuilder.console.commands.Command#help()
+	 */
+	@Override
+	public String help() {
+		return "exit";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
+	@Override
+	public void run(List<Object> parameters) {
+		System.exit(0);
+	}
+
+}
Index: /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/defaultcommands/CMDlistCommands.java
===================================================================
--- /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/defaultcommands/CMDlistCommands.java	(revision 1470)
+++ /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/defaultcommands/CMDlistCommands.java	(revision 1470)
@@ -0,0 +1,73 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.util.console.defaultcommands;
+
+import java.util.List;
+
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.CommandExecuter;
+import de.ugoe.cs.util.console.Console;
+
+/**
+ * <p>
+ * Command to list all events (symbols) known to a usage profile (stochastic process).
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class CMDlistCommands implements Command {
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+     */
+    @Override
+    public void run(List<Object> parameters) {
+        Command[] commands = CommandExecuter.getInstance().getAvailableCommands();
+
+        List<String> commandPackages = CommandExecuter.getInstance().getCommandPackages();
+
+        for (String commandPackage : commandPackages) {
+            String[] packageSplit = commandPackage.split("\\.");
+            if (packageSplit[packageSplit.length - 1].equals("commands")) {
+                Console.println(packageSplit[packageSplit.length - 2]);
+            }
+            else if (packageSplit[packageSplit.length - 1].equals("defaultcommands")) {
+                Console.println("general");
+            }
+            else {
+                Console.println(packageSplit[packageSplit.length - 1]);
+            }
+            for (Command command : commands) {
+                if (commandPackage.equals(command.getClass().getPackage().getName())) {
+                    Console.println("   " + command.help());
+                }
+            }
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#help()
+     */
+    @Override
+    public String help() {
+        return "listCommands";
+    }
+
+}
Index: /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/defaultcommands/CMDman.java
===================================================================
--- /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/defaultcommands/CMDman.java	(revision 1470)
+++ /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/defaultcommands/CMDman.java	(revision 1470)
@@ -0,0 +1,106 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.util.console.defaultcommands;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.List;
+
+import org.apache.commons.lang.WordUtils;
+
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.CommandExecuter;
+import de.ugoe.cs.util.console.Console;
+
+/**
+ * <p>
+ * Prints the manual of a command to the Console.
+ * </p>
+ * 
+ * @version $Revision: $ $Date: Aug 30, 2012$
+ * @author 2012, last modified by $Author: sherbold$
+ */
+public class CMDman implements Command {
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+     */
+    @Override
+    public void run(List<Object> parameters) {
+        String command;
+        if (parameters.size() > 0) {
+            command = (String) parameters.get(0);
+        }
+        else {
+            throw new IllegalArgumentException();
+        }
+
+        Command cmd = CommandExecuter.getInstance().getCMD(command);
+
+        if (cmd != null) {
+            InputStream manStream =
+                ClassLoader.getSystemResourceAsStream("manuals/" + command);
+            
+            if (manStream != null) {
+                BufferedReader reader = null;
+                try {
+                    reader = new BufferedReader(new InputStreamReader(manStream, "UTF-8"));
+                    String line = reader.readLine();
+                    
+                    while (line != null) {
+                        line = line.replace("$USAGE$", "Usage: " + cmd.help());
+                        Console.println(WordUtils.wrap(line, 100));
+                        line = reader.readLine();
+                    }
+                }
+                catch (IOException e) {
+                    Console.printerrln("Failure reading man page");
+                    Console.logException(e);
+                }
+                finally {
+                    try {
+                        if (reader != null) {
+                            reader.close();
+                        }
+                    }
+                    catch (IOException e) {
+                        // Ignore, as this is unimportant to the user
+                    }
+                }
+            }
+            else {
+                Console.println("No man page for command " + command + " available");
+            }
+        }
+        else {
+            Console.println("Command " + command + " not found.");
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#help()
+     */
+    @Override
+    public String help() {
+        return "man <commandName>";
+    }
+
+}
Index: /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/listener/ICommandListener.java
===================================================================
--- /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/listener/ICommandListener.java	(revision 1470)
+++ /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/listener/ICommandListener.java	(revision 1470)
@@ -0,0 +1,39 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.util.console.listener;
+
+import de.ugoe.cs.util.console.CommandExecuter;
+
+/**
+ * <p>
+ * Interface for listeners observing the commands executed by the
+ * {@link CommandExecuter}.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public interface ICommandListener {
+	/**
+	 * <p>
+	 * Receives the command strings of all executed by the
+	 * {@link CommandExecuter}.
+	 * </p>
+	 * 
+	 * @param command
+	 *            string of the command.
+	 */
+	public void commandNotification(String command);
+}
Index: /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/listener/IErrorListener.java
===================================================================
--- /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/listener/IErrorListener.java	(revision 1470)
+++ /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/listener/IErrorListener.java	(revision 1470)
@@ -0,0 +1,38 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.util.console.listener;
+
+import de.ugoe.cs.util.console.Console;
+
+/**
+ * <p>
+ * Interface for listeners observing the error stream of the {@link Console}.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public interface IErrorListener {
+
+	/**
+	 * <p>
+	 * Receives messages send to the error stream of the {@link Console}.
+	 * </p>
+	 * 
+	 * @param errMessage
+	 *            error message
+	 */
+	public void errorMsg(String errMessage);
+}
Index: /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/listener/IExceptionListener.java
===================================================================
--- /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/listener/IExceptionListener.java	(revision 1470)
+++ /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/listener/IExceptionListener.java	(revision 1470)
@@ -0,0 +1,38 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.util.console.listener;
+
+import de.ugoe.cs.util.console.Console;
+
+/**
+ * <p>
+ * Received all exceptions passed to the {@link Console} for logging.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public interface IExceptionListener {
+
+	/**
+	 * <p>
+	 * Logs an exception passed to the {@link Console}.
+	 * </p>
+	 * 
+	 * @param e
+	 *            Exception that is logged
+	 */
+	public void logException(Exception e);
+}
Index: /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/listener/IOutputListener.java
===================================================================
--- /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/listener/IOutputListener.java	(revision 1470)
+++ /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/listener/IOutputListener.java	(revision 1470)
@@ -0,0 +1,39 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.util.console.listener;
+
+import de.ugoe.cs.util.console.Console;
+
+/**
+ * <p>
+ * Interface for listeners observing the output stream of the {@link Console}.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public interface IOutputListener {
+
+	/**
+	 * <p>
+	 * Receives messages send to the output stream of the {@link Console}.
+	 * </p>
+	 * 
+	 * @param newMessage
+	 *            message that was send to the console.
+	 */
+	public void outputMsg(String newMessage);
+
+}
Index: /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/listener/ITraceListener.java
===================================================================
--- /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/listener/ITraceListener.java	(revision 1470)
+++ /tags/java-utils-0.1.0/src/main/java/de/ugoe/cs/util/console/listener/ITraceListener.java	(revision 1470)
@@ -0,0 +1,41 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.util.console.listener;
+
+import java.util.logging.Level;
+
+import de.ugoe.cs.util.console.Console;
+
+/**
+ * <p>
+ * Interface for listeners observing traces stream to the {@link Console}.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public interface ITraceListener {
+	/**
+	 * <p>
+	 * Receives messages send to the trace stream of the {@link Console}.
+	 * </p>
+	 * 
+	 * @param traceMessage
+	 *            trace message
+	 * @param level
+	 *            trace level
+	 */
+	public void traceMsg(String traceMessage, Level level);
+}
Index: /tags/java-utils-0.1.0/src/main/resources/manuals/exec
===================================================================
--- /tags/java-utils-0.1.0/src/main/resources/manuals/exec	(revision 1470)
+++ /tags/java-utils-0.1.0/src/main/resources/manuals/exec	(revision 1470)
@@ -0,0 +1,5 @@
+Executes a batch of commands. The batch is defined as a text file, where each line defines one command. Leading and trailing whitespaces are ignored.
+
+$USAGE$
+Example(s): 
+exec scripts/batchscript 
Index: /tags/java-utils-0.1.0/src/main/resources/manuals/exit
===================================================================
--- /tags/java-utils-0.1.0/src/main/resources/manuals/exit	(revision 1470)
+++ /tags/java-utils-0.1.0/src/main/resources/manuals/exit	(revision 1470)
@@ -0,0 +1,3 @@
+Terminates the application.
+
+$USAGE$
Index: /tags/java-utils-0.1.0/src/main/resources/manuals/listCommands
===================================================================
--- /tags/java-utils-0.1.0/src/main/resources/manuals/listCommands	(revision 1470)
+++ /tags/java-utils-0.1.0/src/main/resources/manuals/listCommands	(revision 1470)
@@ -0,0 +1,3 @@
+Writes a list of all commands, including their usage to the console.
+
+$USAGE$
Index: /tags/java-utils-0.1.0/src/main/resources/manuals/man
===================================================================
--- /tags/java-utils-0.1.0/src/main/resources/manuals/man	(revision 1470)
+++ /tags/java-utils-0.1.0/src/main/resources/manuals/man	(revision 1470)
@@ -0,0 +1,5 @@
+Prints the manual of a command. 
+
+$USAGE$
+Example(s): 
+man exec
