Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/BFSTaskModelIterator.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/BFSTaskModelIterator.java	(revision 1290)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/BFSTaskModelIterator.java	(revision 1290)
@@ -0,0 +1,65 @@
+package de.ugoe.cs.autoquest.usability.taskmodel.filter;
+
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.Queue;
+
+import org.apache.commons.collections15.Closure;
+import org.apache.commons.collections15.CollectionUtils;
+
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IMarkingTemporalRelationship;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IStructuringTemporalRelationship;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
+
+public class BFSTaskModelIterator implements Iterator<ITask> {
+
+	private final Queue<ITask> unvisitedTasks = new LinkedList<ITask>();
+
+	private BFSTaskModelIterator(ITaskModel taskModel) {
+		unvisitedTasks.addAll(taskModel.getTasks());
+	}
+
+	public static BFSTaskModelIterator iterator(ITaskModel taskModel) {
+		return new BFSTaskModelIterator(taskModel);
+	}
+
+	@Override
+	public boolean hasNext() {
+		return !this.unvisitedTasks.isEmpty();
+	}
+
+	@Override
+	public ITask next() {
+		ITask task = unvisitedTasks.poll();
+		processChildrenOfCurrentTask(task);
+		return task;
+	}
+
+	private void processChildrenOfCurrentTask(ITask task) {
+		if (task instanceof IStructuringTemporalRelationship) {
+			CollectionUtils.forAllDo(
+					((IStructuringTemporalRelationship) task).getChildren(),
+					addToUnvisitedTasks());
+		} else if (task instanceof IMarkingTemporalRelationship) {
+			addToUnvisitedTasks().execute(
+					((IMarkingTemporalRelationship) task).getMarkedTask());
+		}
+	}
+
+	private Closure<ITask> addToUnvisitedTasks() {
+		return new Closure<ITask>() {
+
+			@Override
+			public void execute(ITask childTask) {
+				unvisitedTasks.add(childTask);
+			}
+		};
+	}
+
+	@Override
+	public void remove() {
+		// do nothing
+	}
+
+}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/ITaskModelFilter.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/ITaskModelFilter.java	(revision 1290)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/ITaskModelFilter.java	(revision 1290)
@@ -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.taskmodel.filter;
+
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTargetFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public interface ITaskModelFilter {
+
+    public FilterResult filter(ITaskModel taskModel, EventTargetFilter eventTarget);
+
+    public FilterResult filter(ITaskModel taskModel, EventTypeFilter eventType);
+
+    public FilterResult filter(ITaskModel taskModel, TaskTypeFilter nodeType);
+
+}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/IterativeDFSFilterStrategy.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/IterativeDFSFilterStrategy.java	(revision 1217)
+++ 	(revision )
@@ -1,99 +1,0 @@
-//   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.taskmodel.filter;
-
-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.IMarkingTemporalRelationship;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.IStructuringTemporalRelationship;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
-import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTargetFilter;
-import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter;
-import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter;
-
-/**
- * <p>
- * TODO comment
- * </p>
- * 
- * @author Alexander Deicke
- */
-public class IterativeDFSFilterStrategy implements TaskModelFilterStrategy {
-
-    private FilterResult filterStatistic;
-
-    @SuppressWarnings("unchecked")
-    @Override
-    public FilterResult filter(ITaskModel taskModel, EventTargetFilter eventTarget) {
-        Predicate<IEventTarget> filterPredicate = eventTarget.filterPredicate();
-        this.filterStatistic = new FilterResult(filterPredicate);
-        traverse(taskModel);
-        return this.filterStatistic;
-    }
-
-    @SuppressWarnings("unchecked")
-    @Override
-    public FilterResult filter(ITaskModel taskModel, EventTypeFilter eventType) {
-        Predicate<IEventType> filterPredicate = eventType.filterPredicate();
-        this.filterStatistic = new FilterResult(filterPredicate);
-        traverse(taskModel);
-        return this.filterStatistic;
-    }
-
-    @SuppressWarnings("unchecked")
-    @Override
-    public FilterResult filter(ITaskModel taskModel, TaskTypeFilter nodeType) {
-        Predicate<ITask> filterPredicate = nodeType.filterPredicate();
-        this.filterStatistic = new FilterResult(filterPredicate);
-        traverse(taskModel);
-        return this.filterStatistic;
-    }
-
-    private void traverse(ITaskModel taskModel) {
-        Queue<ITask> unvisitedTasks = new LinkedList<ITask>();
-        unvisitedTasks.addAll(taskModel.getTasks());
-        while (stillUnvisitedTasks(unvisitedTasks)) {
-            ITask task = unvisitedTasks.poll();
-            processCurrentTask(task);
-            processChildrenOfCurrentTask(unvisitedTasks, task);
-        }
-    }
-
-    private boolean stillUnvisitedTasks(Queue<ITask> unvisitedTasks) {
-        return !unvisitedTasks.isEmpty();
-    }
-
-    private void processCurrentTask(ITask task) {
-        this.filterStatistic.addTask(task);
-    }
-
-    private void processChildrenOfCurrentTask(Queue<ITask> unvisitedTasks, ITask task) {
-        if (task instanceof IStructuringTemporalRelationship) {
-            for (ITask child : ((IStructuringTemporalRelationship) task).getChildren()) {
-                unvisitedTasks.add(child);
-            }
-        }
-        else if (task instanceof IMarkingTemporalRelationship) {
-            unvisitedTasks.add(((IMarkingTemporalRelationship) task).getMarkedTask());
-        }
-    }
-
-}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/TaskModelFilter.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/TaskModelFilter.java	(revision 1290)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/TaskModelFilter.java	(revision 1290)
@@ -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.taskmodel.filter;
+
+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.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTargetFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public class TaskModelFilter implements ITaskModelFilter {
+
+	private BFSTaskModelIterator taskModelIterator;
+
+	private FilterResult filterStatistic;
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public FilterResult filter(ITaskModel taskModel,
+			EventTargetFilter eventTarget) {
+		Predicate<IEventTarget> filterPredicate = eventTarget.filterPredicate();
+		return setup(taskModel, filterPredicate);
+	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public FilterResult filter(ITaskModel taskModel, EventTypeFilter eventType) {
+		Predicate<IEventType> filterPredicate = eventType.filterPredicate();
+		return setup(taskModel, filterPredicate);
+	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public FilterResult filter(ITaskModel taskModel, TaskTypeFilter nodeType) {
+		Predicate<ITask> filterPredicate = nodeType.filterPredicate();
+		return setup(taskModel, filterPredicate);
+	}
+
+	private FilterResult setup(ITaskModel taskModel,
+			Predicate<?> filterPredicate) {
+		this.filterStatistic = new FilterResult(filterPredicate);
+		this.taskModelIterator = BFSTaskModelIterator.iterator(taskModel);
+		traverse(taskModel);
+		return this.filterStatistic;
+	}
+
+	private void traverse(ITaskModel taskModel) {
+		while (this.taskModelIterator.hasNext()) {
+			ITask task = this.taskModelIterator.next();
+			this.filterStatistic.addTask(task);
+		}
+	}
+}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/TaskModelFilterStrategy.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/TaskModelFilterStrategy.java	(revision 1217)
+++ 	(revision )
@@ -1,37 +1,0 @@
-//   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.taskmodel.filter;
-
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
-import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTargetFilter;
-import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter;
-import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter;
-
-/**
- * <p>
- * TODO comment
- * </p>
- * 
- * @author Alexander Deicke
- */
-public interface TaskModelFilterStrategy {
-
-    public FilterResult filter(ITaskModel taskModel, EventTargetFilter eventTarget);
-
-    public FilterResult filter(ITaskModel taskModel, EventTypeFilter eventType);
-
-    public FilterResult filter(ITaskModel taskModel, TaskTypeFilter nodeType);
-
-}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/types/TaskModelFilter.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/types/TaskModelFilter.java	(revision 1217)
+++ 	(revision )
@@ -1,92 +1,0 @@
-//   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.taskmodel.filter.types;
-
-import com.google.common.base.Preconditions;
-
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
-import de.ugoe.cs.autoquest.usability.taskmodel.filter.FilterResult;
-import de.ugoe.cs.autoquest.usability.taskmodel.filter.TaskModelFilterStrategy;
-
-/**
- * <p>
- * TODO comment
- * </p>
- * 
- * @author Alexander Deicke
- */
-public class TaskModelFilter {
-
-    private final TaskModelFilterStrategy taskModelFilterStrategy;
-
-    public TaskModelFilter(TaskModelFilterStrategy treeTraversalStrategy) {
-        Preconditions.checkNotNull(treeTraversalStrategy);
-        this.taskModelFilterStrategy = treeTraversalStrategy;
-    }
-
-    public FilterEventTargetStep filterByEventTarget(EventTargetFilter eventTarget) {
-        return new FilterEventTargetStep(eventTarget);
-    }
-
-    public FilterEventTypeStep filterByEventType(EventTypeFilter eventType) {
-        return new FilterEventTypeStep(eventType);
-    }
-
-    public FilterNodeTypeStep filterByNodeType(TaskTypeFilter nodeType) {
-        return new FilterNodeTypeStep(nodeType);
-    }
-
-    public class FilterEventTargetStep {
-
-        private final EventTargetFilter eventTarget;
-
-        public FilterEventTargetStep(EventTargetFilter eventTarget) {
-            this.eventTarget = eventTarget;
-        }
-
-        public FilterResult from(ITaskModel taskModel) {
-            return taskModelFilterStrategy.filter(taskModel, eventTarget);
-        }
-
-    }
-
-    public class FilterEventTypeStep {
-
-        private final EventTypeFilter eventType;
-
-        public FilterEventTypeStep(EventTypeFilter eventType) {
-            this.eventType = eventType;
-        }
-
-        public FilterResult from(ITaskModel taskModel) {
-            return taskModelFilterStrategy.filter(taskModel, eventType);
-        }
-
-    }
-
-    public class FilterNodeTypeStep {
-
-        private final TaskTypeFilter nodeType;
-
-        public FilterNodeTypeStep(TaskTypeFilter nodeType) {
-            this.nodeType = nodeType;
-        }
-
-        public FilterResult from(ITaskModel taskModel) {
-            return taskModelFilterStrategy.filter(taskModel, nodeType);
-        }
-
-    }
-}
