Index: /trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/FilterResult.java
===================================================================
--- /trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/FilterResult.java	(revision 1135)
+++ /trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/FilterResult.java	(revision 1135)
@@ -0,0 +1,71 @@
+//   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.usability.tasktree;
+
+import java.util.List;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.Lists;
+
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public class FilterResult {
+
+    @SuppressWarnings("rawtypes")
+    private final Predicate filterPredicate;
+
+    private List<ITaskTreeNode> filteredNodes = Lists.newArrayList();
+
+    private List<ITaskTreeNode> nodesNotMatchedFilter = Lists.newArrayList();
+
+    @SuppressWarnings("rawtypes")
+    public FilterResult(Predicate filterPredicate) {
+        this.filterPredicate = filterPredicate;
+    }
+
+    @SuppressWarnings("unchecked")
+    public void addNode(ITaskTreeNode node) {
+        if (filterPredicate.apply(node)) {
+            filteredNodes.add(node);
+        }
+        else {
+            nodesNotMatchedFilter.add(node);
+        }
+    }
+
+    public List<ITaskTreeNode> nodesMatchedFilter() {
+        return this.filteredNodes;
+    }
+
+    public int nrOfNodesMatchedFilter() {
+        return this.filteredNodes.size();
+    }
+
+    public List<ITaskTreeNode> nodesNotMatchedFilter() {
+        return this.nodesNotMatchedFilter;
+    }
+
+    public int nrOfNodesNotMatchedFilter() {
+        return this.nodesNotMatchedFilter.size();
+    }
+
+}
Index: /trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/IterativeDFSFilterStrategy.java
===================================================================
--- /trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/IterativeDFSFilterStrategy.java	(revision 1135)
+++ /trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/IterativeDFSFilterStrategy.java	(revision 1135)
@@ -0,0 +1,94 @@
+//   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.usability.tasktree;
+
+import java.util.LinkedList;
+import java.util.Queue;
+
+import com.google.common.base.Predicate;
+
+import de.ugoe.cs.autoquest.eventcore.IEventTarget;
+import de.ugoe.cs.autoquest.eventcore.IEventType;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode;
+import de.ugoe.cs.autoquest.usability.tasktree.filters.EventTargetFilter;
+import de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter;
+import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTreeNodeTypeFilter;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public class IterativeDFSFilterStrategy implements TaskTreeFilterStrategy {
+
+    private FilterResult filterStatistic;
+
+    @SuppressWarnings("unchecked")
+    @Override
+    public FilterResult filter(ITaskTree taskTree, EventTargetFilter eventTarget) {
+        Predicate<IEventTarget> filterPredicate = eventTarget.filterPredicate();
+        this.filterStatistic = new FilterResult(filterPredicate);
+        traverse(taskTree);
+        return this.filterStatistic;
+    }
+
+    @SuppressWarnings("unchecked")
+    @Override
+    public FilterResult filter(ITaskTree taskTree, EventTypeFilter eventType) {
+        Predicate<IEventType> filterPredicate = eventType.filterPredicate();
+        this.filterStatistic = new FilterResult(filterPredicate);
+        traverse(taskTree);
+        return this.filterStatistic;
+    }
+
+    @SuppressWarnings("unchecked")
+    @Override
+    public FilterResult filter(ITaskTree taskTree, TaskTreeNodeTypeFilter nodeType) {
+        Predicate<ITaskTreeNode> filterPredicate = nodeType.filterPredicate();
+        this.filterStatistic = new FilterResult(filterPredicate);
+        traverse(taskTree);
+        return this.filterStatistic;
+    }
+
+    private void traverse(ITaskTree taskTree) {
+        Queue<ITaskTreeNode> unvisitedNodes = new LinkedList<ITaskTreeNode>();
+        unvisitedNodes.add(taskTree.getRoot());
+        while (stillUnvisitedNodes(unvisitedNodes)) {
+            ITaskTreeNode node = unvisitedNodes.poll();
+            processCurrentNode(node);
+            processChildrenOfCurrentNode(unvisitedNodes, node);
+        }
+    }
+
+    private boolean stillUnvisitedNodes(Queue<ITaskTreeNode> unvisitedNodes) {
+        return !unvisitedNodes.isEmpty();
+    }
+
+    private void processCurrentNode(ITaskTreeNode node) {
+        this.filterStatistic.addNode(node);
+    }
+
+    private void processChildrenOfCurrentNode(Queue<ITaskTreeNode> unvisitedNodes,
+                                              ITaskTreeNode node)
+    {
+        for (ITaskTreeNode child : node.getChildren()) {
+            unvisitedNodes.add(child);
+        }
+    }
+
+}
Index: /trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/TaskTreeFilterStrategy.java
===================================================================
--- /trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/TaskTreeFilterStrategy.java	(revision 1135)
+++ /trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/TaskTreeFilterStrategy.java	(revision 1135)
@@ -0,0 +1,37 @@
+//   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.usability.tasktree;
+
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree;
+import de.ugoe.cs.autoquest.usability.tasktree.filters.EventTargetFilter;
+import de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter;
+import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTreeNodeTypeFilter;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public interface TaskTreeFilterStrategy {
+
+    public FilterResult filter(ITaskTree taskTree, EventTargetFilter eventTarget);
+
+    public FilterResult filter(ITaskTree taskTree, EventTypeFilter eventType);
+
+    public FilterResult filter(ITaskTree taskTree, TaskTreeNodeTypeFilter nodeType);
+
+}
Index: /trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/EventTargetFilter.java
===================================================================
--- /trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/EventTargetFilter.java	(revision 1135)
+++ /trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/EventTargetFilter.java	(revision 1135)
@@ -0,0 +1,71 @@
+//   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.usability.tasktree.filters;
+
+import com.google.common.base.Function;
+import com.google.common.base.Predicate;
+import com.google.common.base.Predicates;
+
+import de.ugoe.cs.autoquest.eventcore.IEventTarget;
+import de.ugoe.cs.autoquest.eventcore.guimodel.ITextArea;
+import de.ugoe.cs.autoquest.eventcore.guimodel.ITextField;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public enum EventTargetFilter implements TaskTreeNodeFilter<IEventTarget> {
+
+    TEXT_FIELD(ITextField.class),
+
+    TEXT_AREA(ITextArea.class);
+
+    private Class<? extends IEventTarget> eventTargetClazz;
+
+    private EventTargetFilter(Class<? extends IEventTarget> eventTargetClazz) {
+        this.eventTargetClazz = eventTargetClazz;
+    }
+
+    @SuppressWarnings("unchecked")
+    @Override
+    public Class<IEventTarget> clazz() {
+        return (Class<IEventTarget>) eventTargetClazz;
+    }
+
+    @SuppressWarnings("rawtypes")
+    @Override
+    public Predicate filterPredicate() {
+        Predicate<Object> instanceOfIEventTaskPredicate = Predicates.instanceOf(IEventTask.class);
+        Predicate<ITaskTreeNode> nodeHoldsInstanceOfFilterArgument =
+            Predicates.compose(Predicates.instanceOf(eventTargetClazz), nodeExtractionFunction());
+        return Predicates.and(instanceOfIEventTaskPredicate, nodeHoldsInstanceOfFilterArgument);
+    }
+
+    private Function<ITaskTreeNode, IEventTarget> nodeExtractionFunction() {
+        return new Function<ITaskTreeNode, IEventTarget>() {
+
+            @Override
+            public IEventTarget apply(ITaskTreeNode treeNode) {
+                return ((IEventTask) treeNode).getEventTarget();
+            }
+        };
+    }
+
+}
Index: /trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/EventTypeFilter.java
===================================================================
--- /trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/EventTypeFilter.java	(revision 1135)
+++ /trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/EventTypeFilter.java	(revision 1135)
@@ -0,0 +1,76 @@
+//   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.usability.tasktree.filters;
+
+import com.google.common.base.Function;
+import com.google.common.base.Predicate;
+import com.google.common.base.Predicates;
+
+import de.ugoe.cs.autoquest.eventcore.IEventType;
+import de.ugoe.cs.autoquest.eventcore.gui.IInteraction;
+import de.ugoe.cs.autoquest.eventcore.gui.MouseButtonInteraction;
+import de.ugoe.cs.autoquest.eventcore.gui.MouseInteraction;
+import de.ugoe.cs.autoquest.eventcore.gui.TextInput;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public enum EventTypeFilter implements TaskTreeNodeFilter<IEventType> {
+
+    MOUSE_BUTTON_INTERACTION(MouseButtonInteraction.class),
+    
+    MOUSE_INTERACTION(MouseInteraction.class),
+    
+    TEXT_INPUT(TextInput.class),
+    
+    USER_INTERACTION(IInteraction.class);
+
+    private Class<? extends IEventType> eventTypeClazz;
+
+    private EventTypeFilter(Class<? extends IEventType> eventTypeClazz) {
+        this.eventTypeClazz = eventTypeClazz;
+    }
+
+    @SuppressWarnings("unchecked")
+    @Override
+    public Class<IEventType> clazz() {
+        return (Class<IEventType>) eventTypeClazz;
+    }
+
+    @SuppressWarnings("rawtypes")
+    @Override
+    public Predicate filterPredicate() {
+        Predicate<Object> instanceOfIEventTaskPredicate = Predicates.instanceOf(IEventTask.class);
+        Predicate<ITaskTreeNode> nodeHoldsInstanceOfFilterArgument =
+            Predicates.compose(Predicates.instanceOf(eventTypeClazz), nodeExtractionFunction());
+        return Predicates.and(instanceOfIEventTaskPredicate, nodeHoldsInstanceOfFilterArgument);
+    }
+
+    private Function<ITaskTreeNode, IEventType> nodeExtractionFunction() {
+        return new Function<ITaskTreeNode, IEventType>() {
+
+            @Override
+            public IEventType apply(ITaskTreeNode treeNode) {
+                return ((IEventTask) treeNode).getEventType();
+            }
+        };
+    }
+}
Index: /trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/TaskTreeFilter.java
===================================================================
--- /trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/TaskTreeFilter.java	(revision 1135)
+++ /trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/TaskTreeFilter.java	(revision 1135)
@@ -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.usability.tasktree.filters;
+
+import com.google.common.base.Preconditions;
+
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree;
+import de.ugoe.cs.autoquest.usability.tasktree.FilterResult;
+import de.ugoe.cs.autoquest.usability.tasktree.TaskTreeFilterStrategy;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public class TaskTreeFilter {
+
+    private final TaskTreeFilterStrategy taskTreeFilterStrategy;
+
+    public TaskTreeFilter(TaskTreeFilterStrategy treeTraversalStrategy) {
+        Preconditions.checkNotNull(treeTraversalStrategy);
+        this.taskTreeFilterStrategy = treeTraversalStrategy;
+    }
+
+    public FilterEventTargetStep filterByEventTarget(EventTargetFilter eventTarget) {
+        return new FilterEventTargetStep(eventTarget);
+    }
+
+    public FilterEventTypeStep filterByEventType(EventTypeFilter eventType) {
+        return new FilterEventTypeStep(eventType);
+    }
+
+    public FilterNodeTypeStep filterByNodeType(TaskTreeNodeTypeFilter nodeType) {
+        return new FilterNodeTypeStep(nodeType);
+    }
+
+    public class FilterEventTargetStep {
+
+        private final EventTargetFilter eventTarget;
+
+        public FilterEventTargetStep(EventTargetFilter eventTarget) {
+            this.eventTarget = eventTarget;
+        }
+
+        public FilterResult from(ITaskTree taskTree) {
+            return taskTreeFilterStrategy.filter(taskTree, eventTarget);
+        }
+
+    }
+
+    public class FilterEventTypeStep {
+
+        private final EventTypeFilter eventType;
+
+        public FilterEventTypeStep(EventTypeFilter eventType) {
+            this.eventType = eventType;
+        }
+
+        public FilterResult from(ITaskTree taskTree) {
+            return taskTreeFilterStrategy.filter(taskTree, eventType);
+        }
+
+    }
+
+    public class FilterNodeTypeStep {
+
+        private final TaskTreeNodeTypeFilter nodeType;
+
+        public FilterNodeTypeStep(TaskTreeNodeTypeFilter nodeType) {
+            this.nodeType = nodeType;
+        }
+
+        public FilterResult from(ITaskTree taskTree) {
+            return taskTreeFilterStrategy.filter(taskTree, nodeType);
+        }
+
+    }
+}
Index: /trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/TaskTreeNodeFilter.java
===================================================================
--- /trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/TaskTreeNodeFilter.java	(revision 1135)
+++ /trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/TaskTreeNodeFilter.java	(revision 1135)
@@ -0,0 +1,33 @@
+//   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.usability.tasktree.filters;
+
+import com.google.common.base.Predicate;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public interface TaskTreeNodeFilter<T> {
+
+    public Class<T> clazz();
+
+    @SuppressWarnings("rawtypes")
+    public Predicate filterPredicate();
+
+}
