Index: trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/AndroidLogParser.java
===================================================================
--- trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/AndroidLogParser.java	(revision 1782)
+++ trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/AndroidLogParser.java	(revision 1783)
@@ -1,5 +1,392 @@
+//   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.autoquest.plugin.android;
 
-public class AndroidLogParser {
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+import org.xml.sax.helpers.DefaultHandler;
+
+import de.ugoe.cs.autoquest.eventcore.Event;
+import de.ugoe.cs.autoquest.eventcore.gui.MouseButtonInteraction;
+import de.ugoe.cs.autoquest.eventcore.gui.MouseClick;
+import de.ugoe.cs.autoquest.eventcore.guimodel.GUIElementTree;
+import de.ugoe.cs.autoquest.eventcore.guimodel.GUIModel;
+import de.ugoe.cs.autoquest.eventcore.guimodel.GUIModelException;
+import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement;
+import de.ugoe.cs.autoquest.plugin.android.guimodel.AndroidGUIElementSpec;
+import de.ugoe.cs.util.console.Console;
+
+/**
+ * <p>
+ * This class provides functionality to parse XML log files generated by the
+ * AndroidMonitor of autoquest. The result of parsing a file is a collection of
+ * event sequences.
+ * </p>
+ * 
+ * @author Florian Unger
+ * @version 1.0
+ */
+public class AndroidLogParser extends DefaultHandler {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * int java.lang.Object.hashCode() is used in the Androidmonitor Long is
+	 * used to internally handle and compare the number. e.g.
+	 * currentGUIElementHash != null
+	 */
+	/**
+	 * <p>
+	 * Internal handle to the id of the event that is currently being parsed.
+	 * </p>
+	 */
+	private String currentEventId;
+
+	/**
+	 * <p>
+	 * Internal handle to the parameters of the event currently being parsed.
+	 * </p>
+	 */
+	private Map<String, String> currentEventParameters;
+
+	/**
+	 * <p>
+	 * Internal handle to the source of the event that is currently being
+	 * parsed.
+	 * </p>
+	 */
+	private Long currentEventSource;
+
+	/**
+	 * <p>
+	 * Internal handle to the timestamp of the event that is currently being
+	 * parsed.
+	 */
+	private Long currentEventTimestamp = -1l;
+
+	/**
+	 * 
+	 * <p>
+	 * Internal handle to the hashcode of the GUI element, that is currently
+	 * parsed.
+	 * </p>
+	 */
+	private Long currentGUIElementHash;
+
+	/**
+	 * <p>
+	 * internal handle to the parsed GUI structure, stored in a GUIElementTree
+	 * </p>
+	 */
+	private GUIElementTree<Long> currentGUIElementTree;
+
+	/**
+	 * <p>
+	 * internal handle to the specification currently parsed for a GUI element
+	 * </p>
+	 */
+	private AndroidGUIElementSpec currentGUIElementSpec;
+
+	/**
+	 * 
+	 * <p>
+	 * Internal handle to the hashcode of the parent of the GUI element, that is
+	 * currently parsed.
+	 * </p>
+	 */
+	private Long currentParentHash;
+
+	/**
+	 * <p>
+	 * Internal handle to the event sequence that is currently being parsed.
+	 * </p>
+	 */
+	private List<Event> currentSequence;
+
+	/**
+	 * <p>
+	 * Internal handle to the event sequence that is currently being parsed.
+	 * </p>
+	 */
+	// private List<Event> currentSequence;
+
+	/**
+	 * <p>
+	 * Map that holds events that had no registered target GUI element during
+	 * parsing. Keys are the IDs of the unregistered targets.
+	 * </p>
+	 */
+	private Map<Long, List<Event>> eventsWithoutTargets;
+
+	/**
+	 * <p>
+	 * Collection of event sequences that is contained in the log file, which is
+	 * parsed.
+	 * </p>
+	 */
+	private Collection<List<Event>> sequences;
+
+	/**
+	 * <p>
+	 * Constructor. Creates a new AndroidLogParser.
+	 * </p>
+	 */
+	public AndroidLogParser() {
+		sequences = new LinkedList<List<Event>>();
+		// currentSequence = null;
+	}
+
+	// TODO create a constructor which creates a new AndroidLogParser with a
+	// specific event filter.
+
+	/**
+	 * <p>
+	 * Parses a log file written by the JFCMonitor and creates a collection of
+	 * event sequences.
+	 * </p>
+	 * 
+	 * @param filename
+	 *            name and path of the log file
+	 */
+	public void parseFile(String filename) {
+		if (filename == null) {
+			throw new IllegalArgumentException("filename must not be null");
+		}
+
+		parseFile(new File(filename));
+	}
+
+	/**
+	 * <p>
+	 * Parses a log file written by the JFCMonitor and creates a collection of
+	 * event sequences.
+	 * </p>
+	 * 
+	 * @param file
+	 *            name and path of the log file
+	 */
+	public void parseFile(File file) {
+		if (file == null) {
+			throw new IllegalArgumentException("file must not be null");
+		}
+
+		SAXParserFactory spf = SAXParserFactory.newInstance();
+		// set true to validate that the file is well defined
+		spf.setValidating(true);
+
+		SAXParser saxParser = null;
+		InputSource inputSource = null;
+		try {
+			saxParser = spf.newSAXParser();
+			inputSource = new InputSource(new InputStreamReader(
+					new FileInputStream(file), "UTF-8"));
+		} catch (UnsupportedEncodingException e) {
+			Console.printerr("Error parsing file + " + file.getName());
+			Console.logException(e);
+			return;
+		} catch (ParserConfigurationException e) {
+			Console.printerr("Error parsing file + " + file.getName());
+			Console.logException(e);
+			return;
+		} catch (SAXException e) {
+			Console.printerr("Error parsing file + " + file.getName());
+			Console.logException(e);
+			return;
+		} catch (FileNotFoundException e) {
+			Console.printerr("Error parsing file + " + file.getName());
+			Console.logException(e);
+			return;
+		}
+		if (inputSource != null) {
+			inputSource.setSystemId("file://" + file.getAbsolutePath());
+			try {
+				// called a second time to be sure that no error happens
+				if (saxParser == null) {
+					throw new RuntimeException("SAXParser creation failed");
+				}
+				saxParser.parse(inputSource, this);
+			} catch (SAXParseException e) {
+				Console.printerrln("Failure parsing file in line "
+						+ e.getLineNumber() + ", column " + e.getColumnNumber()
+						+ ".");
+				Console.logException(e);
+				return;
+			} catch (SAXException e) {
+				Console.printerr("Error parsing file + " + file.getName());
+				Console.logException(e);
+				return;
+			} catch (IOException e) {
+				Console.printerr("Error parsing file + " + file.getName());
+				Console.logException(e);
+				return;
+			}
+		}
+		if (!eventsWithoutTargets.isEmpty()) {
+			Console.printerr("Some events reference GUI elements that are not part of logfile. "
+					+ "These events have been parsed without target.");
+		}
+	}
+
+	/**
+	 * <p>
+	 * Returns the collection of event sequences that is obtained from parsing
+	 * log files.
+	 * </p>
+	 * 
+	 * @return collection of event sequences
+	 */
+	public Collection<List<Event>> getSequences() {
+		return sequences;
+	}
+
+	/**
+	 * <p>
+	 * Returns the GUI model that is obtained from parsing log files.
+	 * </p>
+	 * 
+	 * @return GUIModel
+	 */
+	public GUIModel getGuiModel() {
+		return currentGUIElementTree.getGUIModel();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.xml.sax.helpers.DefaultHandler#startElement(java.lang.String,
+	 * java.lang.String, java.lang.String, org.xml.sax.Attributes)
+	 */
+	public void startElement(String uri, String localName, String qName,
+			Attributes atts) throws SAXException {
+		if (qName.equals("sessions")) {
+			// currentSequence = new LinkedList<Event>(); Up to know it is
+			// necessary to handle different sessions. All components are known
+			// before an event occurs.
+			if (currentGUIElementTree == null)
+				currentGUIElementTree = new GUIElementTree<Long>();
+		}
+
+		if (qName.equals("component")) {
+			currentGUIElementHash = Long.parseLong(atts.getValue("hash"));
+			currentGUIElementSpec = new AndroidGUIElementSpec();
+			currentGUIElementSpec.setHashCode((int) currentGUIElementHash
+					.longValue());
+		} else if (qName.equals("event")) {
+			currentEventId = atts.getValue("id");
+			currentEventParameters = new HashMap<String, String>();
+
+		} else if (qName.equals("param")) {
+			if (currentGUIElementHash != null) {
+				if ("class".equals(atts.getValue("name"))) {
+					currentGUIElementSpec.setType(atts.getValue("value"));
+				} else if ("path".equals(atts.getValue("name"))) {
+					currentGUIElementSpec.setPath(atts.getValue("value"));
+				} else if ("id".equals(atts.getValue("name"))) {
+					currentGUIElementSpec.setIndex(Integer.parseInt(atts
+							.getValue("value")));
+				} else if ("parent".equals(atts.getValue("name"))) {
+					currentParentHash = Long.parseLong(atts.getValue("value"));
+				}
+			} else if (currentEventId != null) {
+				if ("source".equals(atts.getValue("name"))) {
+					currentEventSource = Long.parseLong(atts.getValue("value"));
+				}
+				if ("timestamp".equals(atts.getValue("name"))) {
+					currentEventTimestamp = Long.parseLong(atts
+							.getValue("value"));
+				}
+				currentEventParameters.put(atts.getValue("name"),
+						atts.getValue("value"));
+			}
+		}
+
+		// TODO add hierarchy information if available -> Up to know gathering
+		// this information leads to an out of memory exception in the
+		// androidmonitor @see: AndroidmonitorLogFile#addComponent
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.xml.sax.helpers.DefaultHandler#endElement(java.lang.String,
+	 * java.lang.String, java.lang.String)
+	 */
+	@Override
+	public void endElement(String uri, String localName, String qName)
+			throws SAXException {
+		if (qName.equals("component") && currentGUIElementHash != null) {
+			try {
+				currentGUIElementTree.add(currentGUIElementHash,
+						currentParentHash, currentGUIElementSpec);
+			} catch (GUIModelException e) {
+				throw new SAXException(
+						"could not handle GUI element with hash "
+								+ currentGUIElementHash + ": " + e.getMessage(),
+						e);
+			}
+			currentGUIElementHash = null;
+			currentParentHash = null;
+		} else if (currentEventId != null) {
+			if (qName.equals("event")) {
+				IGUIElement currentGUIElement;
+				currentGUIElement = currentGUIElementTree
+						.find(currentEventSource);
+				Event event;
+
+				// up to now only onClick events are implemented and each
+				// onclick event is processed as a mouse click
+				int x = Integer.parseInt(currentEventParameters.get("X"));
+				int y = Integer.parseInt(currentEventParameters.get("Y"));
+				MouseButtonInteraction.Button button = null;
+				button = MouseButtonInteraction.Button.LEFT;
+
+				// maybe it would be necessary in the future to check weather
+				// the GUI element exits.
+				event = new Event(new MouseClick(button, x, y),
+						currentGUIElement);
+
+				event.setTimestamp(currentEventTimestamp);
+				currentSequence.add(event);
+
+				currentEventParameters = null;
+				currentEventId = null;
+				currentEventTimestamp = -1l;
+			}
+		} else if (qName.equals("sessions")) {
+			if (currentSequence != null) {
+				sequences.add(currentSequence);
+			}
+		}
+	}
 
 }
Index: trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/commands/CMDparseAndroid.java
===================================================================
--- trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/commands/CMDparseAndroid.java	(revision 1783)
+++ trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/commands/CMDparseAndroid.java	(revision 1783)
@@ -0,0 +1,92 @@
+//   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.autoquest.plugin.android.commands;
+
+import java.util.Collection;
+import java.util.List;
+
+import de.ugoe.cs.autoquest.CommandHelpers;
+import de.ugoe.cs.autoquest.eventcore.Event;
+import de.ugoe.cs.autoquest.eventcore.guimodel.GUIModel;
+import de.ugoe.cs.autoquest.plugin.android.AndroidLogParser;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.Console;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command to parse an XML file with sessions monitored by the Androidmonitor.
+ * </p>
+ * 
+ * @author Florian Unger
+ * @version 1.0
+ */
+public class CMDparseAndroid implements Command {
+
+	/*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+     */
+	@Override
+	public void run(List<Object> parameters) {
+		String filename;
+		String sequencesName = "sequences";
+
+		try {
+			filename = (String) parameters.get(0);
+			if (parameters.size() >= 2) {
+				sequencesName = (String) parameters.get(1);
+			}
+		} catch (Exception e) {
+			throw new IllegalArgumentException();
+		}
+
+		AndroidLogParser parser = new AndroidLogParser();
+
+		try {
+			parser.parseFile(filename);
+		} catch (Exception e) {
+			Console.printerrln("Could not parse " + filename + ": "
+					+ e.getMessage());
+			return;
+		}
+
+		Collection<List<Event>> sequences = parser.getSequences();
+
+		GUIModel targets = parser.getGuiModel();
+
+		if (GlobalDataContainer.getInstance().addData(sequencesName, sequences)) {
+			CommandHelpers.dataOverwritten(sequencesName);
+		}
+
+		if (GlobalDataContainer.getInstance().addData(
+				sequencesName + "_targets", targets)) {
+			CommandHelpers.dataOverwritten(sequencesName + "_targets");
+		}
+	}
+
+	/*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#help()
+     */
+	@Override
+	public String help() {
+		
+		return "parseAndroid <filename> {<sequencesName>}";
+	}
+
+}
Index: trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/commands/CMDparseDirAndroid.java
===================================================================
--- trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/commands/CMDparseDirAndroid.java	(revision 1783)
+++ trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/commands/CMDparseDirAndroid.java	(revision 1783)
@@ -0,0 +1,107 @@
+//   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.autoquest.plugin.android.commands;
+
+import java.io.File;
+import java.util.Collection;
+import java.util.List;
+import java.util.logging.Level;
+
+import de.ugoe.cs.autoquest.CommandHelpers;
+import de.ugoe.cs.autoquest.eventcore.Event;
+import de.ugoe.cs.autoquest.eventcore.guimodel.GUIModel;
+import de.ugoe.cs.autoquest.plugin.android.AndroidLogParser;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.Console;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command that tries to parse all files in a folder as if they were log files generated by the
+ * Androidmonitor. The result is one set of sequences for all files (not one set of sequences for each
+ * file!).
+ * </p>
+ * 
+ * @author Florian Unger
+ * @version 1.0
+ */
+public class CMDparseDirAndroid implements Command{
+
+	/*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+     */
+	@Override
+	public void run(List<Object> parameters) {
+		String path;
+        String sequencesName = "sequences";
+
+        try {
+            path = (String) parameters.get(0);
+            if (parameters.size() >= 2) {
+                sequencesName = (String) parameters.get(1);
+            }
+        }
+        catch (Exception e) {
+            throw new IllegalArgumentException();
+        }
+        
+        File folder = new File(path);
+        if (!folder.isDirectory()) {
+            Console.printerrln(path + " is not a directory");
+            return;
+        }
+        
+        AndroidLogParser parser = new AndroidLogParser();
+        
+        String absolutPath = folder.getAbsolutePath();
+        for (String filename : folder.list()) {
+            String source = absolutPath + File.separator + filename;
+            Console.traceln(Level.INFO, "Processing file: " + source);
+
+            try {
+                parser.parseFile(source);
+            }
+            catch (Exception e) {
+                Console.printerrln("Could not parse " + source + ": " + e.getMessage());
+            }
+        }
+        
+        Collection<List<Event>> sequences = parser.getSequences();
+        
+        GUIModel targets = parser.getGuiModel();
+
+        if (GlobalDataContainer.getInstance().addData(sequencesName, sequences)) {
+            CommandHelpers.dataOverwritten(sequencesName);
+        }
+        
+        if (GlobalDataContainer.getInstance().addData(sequencesName + "_targets", targets)) {
+            CommandHelpers.dataOverwritten(sequencesName + "_targets");
+        }
+		
+	}
+
+	/*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#help()
+     */
+	@Override
+	public String help() {
+		return "parseDirAndroid <directory> {<sequencesName>}";
+	}
+
+}
Index: trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/guimodel/AndroidButton.java
===================================================================
--- trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/guimodel/AndroidButton.java	(revision 1783)
+++ trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/guimodel/AndroidButton.java	(revision 1783)
@@ -0,0 +1,61 @@
+//   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.autoquest.plugin.android.guimodel;
+
+import de.ugoe.cs.autoquest.eventcore.guimodel.IButton;
+
+/**
+ * <p>
+ * Class that represents buttons in Android GUIs.
+ * </p>
+ * 
+ * @version 1.0
+ * @author Florian Unger
+ */
+public class AndroidButton extends AndroidGUIElement implements IButton{
+	/**
+     * <p>
+     * Id for object serialization.
+     * </p>
+     */
+    private static final long serialVersionUID = 1L;
+    
+    /**
+     * <p>
+     * Constructor. Creates a new AndroidButton.
+     * </p>
+     * 
+     * @param specification
+     *            specification of created GUI element
+     * @param parent
+     *            parent of the created GUI element; null means that the element is a top-level
+     *            window
+     */
+    public AndroidButton(AndroidGUIElementSpec specification,
+			AndroidGUIElement parent) {
+		super(specification, parent);
+		// TODO Auto-generated constructor stub
+	}
+    
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.autoquest.plugin.jfc.guimodel.JFCGUIElement#getElementDescriptor()
+     */
+    @Override
+    protected String getElementDescriptor() {
+        return "Button";
+    }
+
+}
Index: trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/guimodel/AndroidFrame.java
===================================================================
--- trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/guimodel/AndroidFrame.java	(revision 1783)
+++ trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/guimodel/AndroidFrame.java	(revision 1783)
@@ -0,0 +1,58 @@
+//   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.autoquest.plugin.android.guimodel;
+
+import de.ugoe.cs.autoquest.eventcore.guimodel.IFrame;
+/**
+ * <p>
+ * Class that represents frames in Android GUIs.
+ * </p>
+ * 
+ * @version 1.0
+ * @author Florian Unger
+ */
+public class AndroidFrame extends AndroidGUIElement implements IFrame{
+	/**
+     * <p>
+     * Id for object serialization.
+     * </p>
+     */
+    private static final long serialVersionUID = 1L;
+	
+    /**
+     * <p>
+     * Constructor. Creates a new AndroidFrame.
+     * </p>
+     * 
+     * @param specification
+     *            specification of created GUI element
+     * @param parent
+     *            parent of the created GUI element; null means that the element is a top-level
+     *            window
+     */
+	public AndroidFrame(AndroidGUIElementSpec specification,
+			AndroidGUIElement parent) {
+		super(specification, parent);
+	}
+
+	/*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.autoquest.plugin.jfc.guimodel.JFCGUIElement#getElementDescriptor()
+     */
+    @Override
+    protected String getElementDescriptor() {
+        return "Frame";
+    }
+}
Index: trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/guimodel/AndroidGUIElement.java
===================================================================
--- trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/guimodel/AndroidGUIElement.java	(revision 1783)
+++ trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/guimodel/AndroidGUIElement.java	(revision 1783)
@@ -0,0 +1,130 @@
+//   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.autoquest.plugin.android.guimodel;
+
+import de.ugoe.cs.autoquest.eventcore.guimodel.AbstractDefaultGUIElement;
+import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement;
+import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElementSpec;
+
+/**
+ * <p>
+ * Base class for all Android GUI elements.
+ * </p>
+ * 
+ * @version 1.0
+ * @author Florian Unger
+ */
+public class AndroidGUIElement extends AbstractDefaultGUIElement{
+
+	/**
+     * <p>
+     * Id for object serialization.
+     * </p>
+     */
+    private static final long serialVersionUID = 1L;
+    
+    /**
+     * <p>
+     * Specification of the GUI Element
+     * </p>
+     */
+    private AndroidGUIElementSpec specification;
+    
+    /**
+     * <p>
+     * Constructor. Creates a new JFCGUIElement.
+     * </p>
+     * 
+     * @param specification
+     *            specification of created GUI element
+     * @param parent
+     *            parent of the created GUI element; null means that the element is a top-level
+     *            window
+     */
+    public AndroidGUIElement(AndroidGUIElementSpec specification, AndroidGUIElement parent) {
+		super(specification, parent);
+		this.specification = specification;
+	}
+	
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement#updateSpecification(de.ugoe.cs.autoquest
+     * .eventcore .guimodel.IGUIElementSpec)
+     */
+    @Override
+	public void updateSpecification(IGUIElementSpec furtherSpec) {
+		//nothing do do here up to now.		
+	}
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement#getDistanceTo(IGUIElement)
+     */
+	@Override
+	public double getDistanceTo(IGUIElement otherElement) {
+		throw new UnsupportedOperationException("not implemented yet");
+	}
+	
+	/**
+     * <p>
+     * Returns the type of the GUI element, i.e., the name of its Java class.
+     * </p>
+     * 
+     * @return the Java class name
+     */
+    public String getSpecType() {
+        return specification.getType();
+    }
+    
+    
+
+	/*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.autoquest.eventcore.IEventTarget#getPlatform()
+     */
+	@Override
+	public String getPlatform() {
+		return "Android";
+	}
+
+	/*
+     * (non-Javadoc)
+     * 
+     * @see java.lang.Object#toString()
+     */
+	@Override
+	public String getStringIdentifier() {
+		String str = this.toString();
+        if (getParent() != null) {
+            return str + "<-" + getParent().getStringIdentifier();
+        }
+        return str;
+	}
+	
+	/**
+     * <p>
+     * A short string describing the GUI element, e.g., Button, Canvas, or ScrollBar.
+     * </p>
+     * 
+     * @return short element descriptor
+     */
+    protected String getElementDescriptor() {
+        return "Default";
+    }
+
+}
Index: trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/guimodel/AndroidGUIElementSpec.java
===================================================================
--- trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/guimodel/AndroidGUIElementSpec.java	(revision 1783)
+++ trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/guimodel/AndroidGUIElementSpec.java	(revision 1783)
@@ -0,0 +1,177 @@
+//   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.autoquest.plugin.android.guimodel;
+
+import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElementSpec;
+
+/**
+ * <p>
+ * Implements the specification of {@link IGUIElement} for
+ * {@link AndroidGUIElement}s.
+ * </p>
+ * 
+ * @version 1.0
+ * @author Florian Unger
+ */
+public class AndroidGUIElementSpec implements IGUIElementSpec {
+
+	// TODO Why is serialVersionUID = 1L initialized by 1L?
+	/**
+	 * <p>
+	 * default serial version UID
+	 * </p>
+	 */
+	private static final long serialVersionUID = 1L;
+
+	/*
+	 * (non-Javadoc) see
+	 * de.ugoe.cs.autoquest.androidmonitor.AndroidmonitorLogFile logComponent()
+	 */
+	/**
+	 * <p>
+	 * Hash code of the GUI element. Used as unique identifier during parsing a
+	 * log file. Note that it is possible that the hash code of an element
+	 * changes over several log files even if they come from the same target.
+	 * </p>
+	 */
+	private int hashCode;
+
+	/**
+	 * <p>
+	 * Path to an element in an activity. e.g. a path of a button could look
+	 * like MainActivity/DecorView/ActionBarOverlayLayout/FrameLayout/
+	 * RelativeLayout/Button
+	 * </p>
+	 */
+	private String path;
+	
+	/**
+	 * <p>
+	 * id of the object as it is returned by view.getId()
+	 * </p>
+	 */
+	private int index;
+
+	/**
+	 * <p>
+	 * the type of GUI element represented by this specification, which is
+	 * usually the java class of the android GUI element
+	 * </p>
+	 */
+	private String type;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElementSpec#getType()
+	 */
+	@Override
+	public String getType() {
+		return type;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElementSpec#getTypeHierarchy
+	 * ()
+	 */
+	@Override
+	public String[] getTypeHierarchy() {
+		return new String[] { (getType()) };
+		// TODO change this part after adding ancestors in
+		// de.ugoe.cs.autoquest.androidmonitor.AndroidmonitorLogFile#addComponent
+	}
+
+	@Override
+	public boolean getSimilarity(IGUIElementSpec other) {
+		if (this == other) {
+			return true;
+		}
+
+		if (!(other instanceof AndroidGUIElementSpec)) {
+			return false;
+		}
+
+		// Check wheter view.id() keeps the same even if something in the
+		// structure changes. The hash in the JFCMonitor seems to be unique at
+		// all. In the Androidmonitore the hash of an element changes even from
+		// one start of the activity to another.
+		/*
+		 * Maybe some other comparisons will be necessary in the future.
+		 */
+
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#hashCode()
+	 */
+	@Override
+	public int hashCode() {
+		return hashCode;
+	}
+
+	/**
+	 * <p>
+	 * Returns the path associated with the specified GUI element.
+	 * </p>
+	 * @return the path to an element
+	 */
+	public String getPath() {
+		return path;
+	}
+
+	public int getIndex() {
+		return index;
+	}
+
+	public void setIndex(int index) {
+		this.index = index;
+	}
+
+	/**
+	 * Set the hash code associated with the GUI element.
+	 * @param hash
+	 * 				the hash of an element object
+	 */
+	public void setHashCode(int hash){
+		this.hashCode = hash;
+	}
+	
+	/**
+	 * Set the path associated with the specified GUI element.
+	 * @param path
+	 * 				the path to an element
+	 */
+	public void setPath(String path) {
+		this.path = path;
+	}
+	
+	/**
+     * <p>
+     * Sets the type of the specified GUI element.
+     * </p>
+     * 
+     * @param type
+     *            the type
+     */
+    public void setType(String type) {
+        this.type = type;
+    }
+
+}
