Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/InteractionPattern.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/InteractionPattern.java	(revision 1204)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/InteractionPattern.java	(revision 1204)
@@ -0,0 +1,146 @@
+//   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.rules.patterns;
+
+import java.util.Arrays;
+import java.util.List;
+
+import com.google.common.base.Optional;
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterables;
+
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
+import de.ugoe.cs.autoquest.usability.tasktree.IterativeDFSFilterStrategy;
+import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskModelFilter;
+import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public class InteractionPattern {
+    
+    private TaskModelFilter taskTreeFilter = new TaskModelFilter(new IterativeDFSFilterStrategy());
+    
+    private TaskTypeFilter concernedTask;
+
+    private List<InteractionPatternVisitor> patternVisitors;
+    
+    private boolean present = false;
+    
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     *
+     * @param concernedNode
+     * @param eventType
+     */
+    public InteractionPattern(TaskTypeFilter concernedNode,
+                        InteractionPatternVisitor... patternVisitor)
+    {
+        this.patternVisitors = Arrays.asList(patternVisitor);
+        this.concernedTask = concernedNode;
+    }
+
+    public boolean containedIn(ITaskModel taskModel) {
+        List<ITask> allConcernedTasks = filterAllConcernedTasksFrom(taskModel);
+        for(ITask concernedTask : allConcernedTasks) {
+            checkTask(concernedTask);  
+            if(this.present) break;
+        }
+        return this.present;
+    }
+
+    private void checkTask(ITask concernedTask) {
+        applyAllVisitors(concernedTask);
+        if(allVisitorsArePresent()) {
+            this.present = true;
+        } else {
+            resetAllVisitors();
+        }
+    }
+    
+    public boolean containedIn(ITask task) {
+        checkTask(task);
+        return this.present;      
+    }
+
+    private void applyAllVisitors(ITask concernedTask) {
+        Optional<InteractionPatternVisitor> previousVisitor = Optional.absent();
+        for(InteractionPatternVisitor visitor : patternVisitors) {
+			if (appliedOnSelectionNode(previousVisitor)) {
+				for (ITask selection : previousVisitor.get().getRetainedSelectionNodes()) {
+					selection.accept(visitor);
+				}
+			} else {
+				previousVisitor = Optional.of(visitor);
+				concernedTask.accept(visitor);
+			}
+        }
+    }
+
+    private boolean appliedOnSelectionNode(Optional<InteractionPatternVisitor> previousVisitor) {
+        return previousVisitor.isPresent() && previousVisitor.get().hasExcludedSelectionNodes();
+    }
+
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     *
+     * @param taskTree
+     * @return
+     */
+    private List<ITask> filterAllConcernedTasksFrom(ITaskModel taskModel) {
+        return this.taskTreeFilter.filterByNodeType(this.concernedTask).from(taskModel).tasksMatchedFilter();
+    }
+    
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     *
+     * @return
+     */
+    private boolean allVisitorsArePresent() {
+        Iterable<InteractionPatternVisitor> allPresent = Iterables.filter(this.patternVisitors, new Predicate<InteractionPatternVisitor>() {
+            
+            public boolean apply(InteractionPatternVisitor visitor) {
+                return visitor.isPresent();
+            }
+            
+        });
+        return Iterables.size(allPresent) == this.patternVisitors.size();
+    }
+    
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     *
+     */
+    private void resetAllVisitors() {
+        for(InteractionPatternVisitor visitor : this.patternVisitors) {
+            visitor.reset();
+        }
+        
+    }
+
+}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/InteractionPatternBuilder.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/InteractionPatternBuilder.java	(revision 1204)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/InteractionPatternBuilder.java	(revision 1204)
@@ -0,0 +1,710 @@
+//   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.rules.patterns;
+
+import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.ContainsEventVisitor;
+import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.ContainsInteractionPatternVisitor;
+import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.EndsWithEventVisitor;
+import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.EndsWithInteractionPatternVisitor;
+import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.StartsWithEventVisitor;
+import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.StartsWithInteractionPatternVisitor;
+import de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter;
+import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public class InteractionPatternBuilder {
+
+    protected TaskTypeFilter concernedNode;
+    
+    protected EventTypeFilter startsWithEvent;
+    
+    protected InteractionPattern startsWithPattern;
+    
+    protected EventTypeFilter endsWithEvent;
+    
+    protected InteractionPattern endsWithPattern;
+    
+    protected EventTypeFilter containsEvent;
+    
+    protected InteractionPattern containsPattern;
+    
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     *
+     * @param sequence
+     * @return
+     */
+    public SpecifyPatternStep concernedNode(TaskTypeFilter concernedNode) {
+        this.concernedNode = concernedNode;
+        return new SpecifyPatternStep();
+    }
+    
+    public class SpecifyPatternStep {
+
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @param textInput
+         * @return
+         */
+        public BuildStartsWithEventStep startsWith(EventTypeFilter startsWithType) {
+            InteractionPatternBuilder.this.startsWithEvent = startsWithType;
+            return new BuildStartsWithEventStep();
+        }
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @param startsWithPattern
+         * @return
+         */
+        public BuildStartsWithPatternStep startsWith(InteractionPattern startsWithPattern) {
+            InteractionPatternBuilder.this.startsWithPattern = startsWithPattern;
+            return new BuildStartsWithPatternStep();
+        }
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @param textInput
+         * @return
+         */
+        public BuildEndsWithEventStep endsWith(EventTypeFilter endsWithType) {
+            InteractionPatternBuilder.this.endsWithEvent = endsWithType;
+            return new BuildEndsWithEventStep();
+        }
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @param endsWithPattern
+         * @return
+         */
+        public BuildEndsWithPatternStep endsWith(InteractionPattern endsWithPattern) {
+            InteractionPatternBuilder.this.endsWithPattern = endsWithPattern;
+            return new BuildEndsWithPatternStep();
+        }
+
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @param textInput
+         * @return
+         */
+        public BuildContainsEventStep contains(EventTypeFilter containsType) {
+            InteractionPatternBuilder.this.containsEvent = containsType;
+            return new BuildContainsEventStep();
+        }
+
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @param containsPattern
+         * @return
+         */
+        public BuildContainsPatternStep contains(InteractionPattern containsPattern) {
+            InteractionPatternBuilder.this.containsPattern = containsPattern;
+            return new BuildContainsPatternStep();
+        }
+        
+    }
+    
+    public class BuildStartsWithEventStep {
+
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @param endsWithType
+         * @return
+         */
+        public BuildStartsAndEndsWithEventStep endsWith(EventTypeFilter endsWithType) {
+            InteractionPatternBuilder.this.endsWithEvent = endsWithType;
+            return new BuildStartsAndEndsWithEventStep();
+        }
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @param endsWithPattern
+         * @return
+         */
+        public BuildStartsWithEventAndEndsWithPattern endsWith(InteractionPattern endsWithPattern) {
+            InteractionPatternBuilder.this.endsWithPattern = endsWithPattern;
+            return new BuildStartsWithEventAndEndsWithPattern();
+        }
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @param textInput
+         * @return
+         */
+        public BuildStartsWithEventAndContainsEventStep contains(EventTypeFilter containsType) {
+            InteractionPatternBuilder.this.containsEvent = containsType;
+            return new BuildStartsWithEventAndContainsEventStep();
+        }
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @param containedPattern
+         * @return
+         */
+        public BuildStartsWithEventAndContainsPatternStep contains(InteractionPattern containsPattern) {
+            InteractionPatternBuilder.this.containsPattern = containsPattern;
+            return new BuildStartsWithEventAndContainsPatternStep();
+        }
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @return
+         */
+        public InteractionPattern build() {
+            return new InteractionPattern(concernedNode, new StartsWithEventVisitor(startsWithEvent, concernedNode));
+        }
+        
+    }
+    
+    public class BuildStartsWithPatternStep {
+
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @param containsEvent
+         * @return
+         */
+        public BuildStartsWithPatternAndContainsEventStep contains(EventTypeFilter containsEvent) {
+            InteractionPatternBuilder.this.containsEvent = containsEvent;
+            return new BuildStartsWithPatternAndContainsEventStep();
+        }
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @param containedPattern
+         * @return
+         */
+        public BuildStartsWithPatternAndContainsPatternStep contains(InteractionPattern containsPattern) {
+            InteractionPatternBuilder.this.containsPattern = containsPattern;
+            return new BuildStartsWithPatternAndContainsPatternStep();
+        }
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @param textInput
+         * @return
+         */
+        public BuildStartsWithPatternAndEndsWithEventStep endsWith(EventTypeFilter endsWithEvent) {
+            InteractionPatternBuilder.this.endsWithEvent = endsWithEvent;
+            return new BuildStartsWithPatternAndEndsWithEventStep();
+        }
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @param endsWithPattern
+         * @return
+         */
+        public BuildStartsAndEndsWithPatternStep endsWith(InteractionPattern endsWithPattern) {
+            InteractionPatternBuilder.this.endsWithPattern = endsWithPattern;
+            return new BuildStartsAndEndsWithPatternStep();
+        }
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @return
+         */
+        public InteractionPattern build() {
+            return new InteractionPattern(concernedNode, new StartsWithInteractionPatternVisitor(startsWithPattern, concernedNode));
+        }
+        
+    }
+    
+    public class BuildEndsWithEventStep {
+
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @return
+         */
+        public InteractionPattern build() {
+            return new InteractionPattern(concernedNode, new EndsWithEventVisitor(endsWithEvent, concernedNode));
+        }
+        
+    }
+    
+    public class BuildEndsWithPatternStep {
+
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @return
+         */
+        public InteractionPattern build() {
+            return new InteractionPattern(concernedNode, new EndsWithInteractionPatternVisitor(endsWithPattern, concernedNode));
+        }
+        
+    }
+    
+    public class BuildContainsEventStep {
+
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @param textInput
+         * @return
+         */
+        public BuildContainsAndEndsWithEventStep endsWith(EventTypeFilter endsWithType) {
+            InteractionPatternBuilder.this.endsWithEvent = endsWithType;
+            return new BuildContainsAndEndsWithEventStep();
+        }
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @return
+         */
+        public InteractionPattern build() {
+            return new InteractionPattern(concernedNode, new ContainsEventVisitor(containsEvent, concernedNode));
+        }
+        
+    }
+    
+    public class BuildContainsPatternStep {
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @return
+         */
+        public InteractionPattern build() {
+            return new InteractionPattern(concernedNode, new ContainsInteractionPatternVisitor(containsPattern, concernedNode));
+        }
+        
+    }
+    
+    public class BuildStartsAndEndsWithEventStep {
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @return
+         */
+        public InteractionPattern build() {
+            return new InteractionPattern(concernedNode, new StartsWithEventVisitor(startsWithEvent, concernedNode), new EndsWithEventVisitor(endsWithEvent, concernedNode));
+        }
+        
+    }
+    
+    public class BuildStartsWithEventAndEndsWithPattern {
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @return
+         */
+        public InteractionPattern build() {
+            return new InteractionPattern(concernedNode, new StartsWithEventVisitor(startsWithEvent, concernedNode), new EndsWithInteractionPatternVisitor(endsWithPattern, concernedNode));
+        }
+        
+    }
+    
+    public class BuildStartsWithPatternAndEndsWithEventStep {
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @return
+         */
+        public InteractionPattern build() {
+            return new InteractionPattern(concernedNode, new StartsWithInteractionPatternVisitor(startsWithPattern, concernedNode), new EndsWithEventVisitor(endsWithEvent, concernedNode));
+        }
+        
+    }
+    
+    public class BuildStartsAndEndsWithPatternStep {
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @return
+         */
+        public InteractionPattern build() {
+            return new InteractionPattern(concernedNode, new StartsWithInteractionPatternVisitor(startsWithPattern, concernedNode), new EndsWithInteractionPatternVisitor(endsWithPattern, concernedNode));
+        }
+        
+    }
+    
+    public class BuildStartsWithEventAndContainsEventStep {
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @param textInput
+         * @return
+         */
+        public BuildStartsAndEndsWithEventAndContainsEventStep endsWith(EventTypeFilter endsWithEvent) {
+            InteractionPatternBuilder.this.endsWithEvent = endsWithEvent;
+            return new BuildStartsAndEndsWithEventAndContainsEventStep();
+        }
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @param endsWithPattern
+         * @return
+         */
+        public BuildStartsWithEventContainsEventAndEndsWithPatternStep endsWith(InteractionPattern endsWithPattern) {
+            InteractionPatternBuilder.this.endsWithPattern = endsWithPattern;
+            return new BuildStartsWithEventContainsEventAndEndsWithPatternStep();
+        }
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @return
+         */
+        public InteractionPattern build() {
+            return new InteractionPattern(concernedNode, new StartsWithEventVisitor(startsWithEvent, concernedNode), new ContainsEventVisitor(containsEvent, concernedNode));
+        }
+        
+    }
+    
+    public class BuildStartsWithPatternAndContainsPatternStep {
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @param textInput
+         * @return
+         */
+        public BuildStartsContainsPatternAndEndsWithEventStep endsWith(EventTypeFilter endsWithEvent) {
+            InteractionPatternBuilder.this.endsWithEvent = endsWithEvent;
+            return new BuildStartsContainsPatternAndEndsWithEventStep();
+        }
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @param endsWithPattern
+         * @return
+         */
+        public BuildStartsAndEndsWithPatternAndContainsPatternStep endsWith(InteractionPattern endsWithPattern) {
+            InteractionPatternBuilder.this.endsWithPattern = endsWithPattern;
+            return new BuildStartsAndEndsWithPatternAndContainsPatternStep();
+        }
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @return
+         */
+        public InteractionPattern build() {
+            return new InteractionPattern(concernedNode, new StartsWithInteractionPatternVisitor(startsWithPattern, concernedNode), new ContainsInteractionPatternVisitor(containsPattern, concernedNode));
+        }
+        
+    }
+    
+    public class BuildStartsWithEventAndContainsPatternStep {
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @param textInput
+         * @return
+         */
+        public BuildStartsWithEventContainsPatternAndEndsWithEventStep endsWith(EventTypeFilter endsWithEvent) {
+            InteractionPatternBuilder.this.endsWithEvent = endsWithEvent;
+            return new BuildStartsWithEventContainsPatternAndEndsWithEventStep();
+        }
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @param endsWithPattern
+         * @return
+         */
+        public BuildStartsWithEventContainsPatternAndEndsWithPatternStep endsWith(InteractionPattern endsWithPattern) {
+            InteractionPatternBuilder.this.endsWithPattern = endsWithPattern;
+            return new BuildStartsWithEventContainsPatternAndEndsWithPatternStep();
+        }
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @return
+         */
+        public InteractionPattern build() {
+            return new InteractionPattern(concernedNode, new StartsWithEventVisitor(startsWithEvent, concernedNode), new ContainsInteractionPatternVisitor(containsPattern, concernedNode));
+        }
+        
+    }
+    
+    public class BuildStartsWithPatternAndContainsEventStep {
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @param textInput
+         * @return
+         */
+        public BuildStartsWithPatternContainsEventAndEndsWithEventStep endsWith(EventTypeFilter endsWithEvent) {
+            InteractionPatternBuilder.this.endsWithEvent = endsWithEvent;
+            return new BuildStartsWithPatternContainsEventAndEndsWithEventStep();
+        }
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @param endsWithPattern
+         * @return
+         */
+        public BuildStartsWithPatternContainsEventAndEndsWithPatternStep endsWith(InteractionPattern endsWithPattern) {
+            InteractionPatternBuilder.this.endsWithPattern = endsWithPattern;
+            return new BuildStartsWithPatternContainsEventAndEndsWithPatternStep();
+        }
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @return
+         */
+        public InteractionPattern build() {
+            return new InteractionPattern(concernedNode, new StartsWithInteractionPatternVisitor(startsWithPattern, concernedNode), new ContainsEventVisitor(containsEvent, concernedNode));
+        }
+        
+    }
+    
+    public class BuildStartsAndEndsWithEventAndContainsEventStep {
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @return
+         */
+        public InteractionPattern build() {
+            return new InteractionPattern(concernedNode, new StartsWithEventVisitor(startsWithEvent, concernedNode), new EndsWithEventVisitor(endsWithEvent, concernedNode), new ContainsEventVisitor(containsEvent, concernedNode));
+        }
+        
+    }
+    
+    public class BuildStartsContainsPatternAndEndsWithEventStep {
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @return
+         */
+        public InteractionPattern build() {
+            return new InteractionPattern(concernedNode, new StartsWithInteractionPatternVisitor(startsWithPattern, concernedNode), new ContainsInteractionPatternVisitor(containsPattern, concernedNode), new EndsWithEventVisitor(endsWithEvent, concernedNode));
+        }
+        
+    }
+    
+    public class BuildStartsAndEndsWithPatternAndContainsPatternStep {
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @return
+         */
+        public InteractionPattern build() {
+            return new InteractionPattern(concernedNode, new StartsWithInteractionPatternVisitor(startsWithPattern, concernedNode), new EndsWithInteractionPatternVisitor(endsWithPattern, concernedNode), new ContainsInteractionPatternVisitor(containsPattern, concernedNode));
+        }
+        
+    }
+    
+    public class BuildStartsWithEventContainsEventAndEndsWithPatternStep {
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @return
+         */
+        public InteractionPattern build() {
+            return new InteractionPattern(concernedNode, new StartsWithEventVisitor(startsWithEvent, concernedNode), new ContainsEventVisitor(containsEvent, concernedNode), new EndsWithInteractionPatternVisitor(endsWithPattern, concernedNode));
+        }
+        
+    }
+    
+    public class BuildStartsWithEventContainsPatternAndEndsWithEventStep {
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @return
+         */
+        public InteractionPattern build() {
+            return new InteractionPattern(concernedNode, new StartsWithEventVisitor(startsWithEvent, concernedNode), new ContainsInteractionPatternVisitor(containsPattern, concernedNode), new EndsWithEventVisitor(endsWithEvent, concernedNode));
+        }
+        
+    }
+    
+    public class BuildStartsWithEventContainsPatternAndEndsWithPatternStep {
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @return
+         */
+        public InteractionPattern build() {
+            return new InteractionPattern(concernedNode, new StartsWithEventVisitor(startsWithEvent, concernedNode), new ContainsInteractionPatternVisitor(containsPattern, concernedNode), new EndsWithInteractionPatternVisitor(endsWithPattern, concernedNode));
+        }
+        
+    }
+    
+    public class BuildStartsWithPatternContainsEventAndEndsWithEventStep {
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @return
+         */
+        public InteractionPattern build() {
+            return new InteractionPattern(concernedNode, new StartsWithInteractionPatternVisitor(startsWithPattern, concernedNode), new ContainsEventVisitor(containsEvent, concernedNode), new EndsWithEventVisitor(endsWithEvent, concernedNode));
+        }
+        
+    }
+    
+    public class BuildStartsWithPatternContainsEventAndEndsWithPatternStep {
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @return
+         */
+        public InteractionPattern build() {
+            return new InteractionPattern(concernedNode, new StartsWithInteractionPatternVisitor(startsWithPattern, concernedNode), new ContainsEventVisitor(containsEvent, concernedNode), new EndsWithInteractionPatternVisitor(endsWithPattern, concernedNode));
+        }
+        
+    }
+    
+    public class BuildContainsAndEndsWithEventStep {
+        
+        /**
+         * <p>
+         * TODO: comment
+         * </p>
+         *
+         * @return
+         */
+        public InteractionPattern build() {
+            return new InteractionPattern(concernedNode, new ContainsEventVisitor(containsEvent, concernedNode), new EndsWithEventVisitor(endsWithEvent, concernedNode));
+        }
+        
+    }
+
+}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/InteractionPatternVisitor.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/InteractionPatternVisitor.java	(revision 1204)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/InteractionPatternVisitor.java	(revision 1204)
@@ -0,0 +1,163 @@
+//   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.rules.patterns;
+
+import java.util.List;
+
+import org.apache.commons.lang.StringUtils;
+
+import com.google.common.base.Splitter;
+import com.google.common.collect.Lists;
+
+import de.ugoe.cs.autoquest.eventcore.IEventType;
+import de.ugoe.cs.autoquest.eventcore.StringEventType;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskVisitor;
+import de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter;
+import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public abstract class InteractionPatternVisitor implements ITaskVisitor {
+    
+	protected TaskTypeFilter taskType;
+	
+    protected EventTypeFilter eventType;
+    
+    protected InteractionPattern containedPattern;
+    
+    protected boolean present = false;
+    
+    protected List<ITask> retainedSelectionTasks = Lists.newArrayList();
+    
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask)
+     */
+    public void visit(IEventTask event) {
+        if(!this.present && isEventVisitor()) {
+            IEventType eventType = event.getEventType();
+            if(eventType instanceof StringEventType) {
+                this.present = eventType.toString().equals(nameOfEventType());
+            } else {
+                this.present = eventType.getClass().equals(this.eventType.clazz());
+            }
+        }
+    }
+    
+    public boolean isEventVisitor() {
+        return this.eventType != null && this.containedPattern == null;
+    }
+    
+    protected String nameOfEventType() {
+        String ret = StringUtils.EMPTY;
+        Iterable<String> splitted = Splitter.on("_").split(this.eventType.name());
+        for(String str : splitted) {
+            str = str.toLowerCase();
+            ret += Character.toString(str.charAt(0)).toUpperCase() + str.substring(1);
+        }
+        return ret;
+    }
+    
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.TaskVisitor#accept(de.ugoe.cs.autoquest.tasktrees.treeifc.ITask)
+     */
+    @Override
+    public void visit(ITask task) {
+        task.accept(this);
+        
+    }
+    
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection)
+     */
+    public void visit(ISelection selection) {
+        if(isEventVisitor()) {
+            retainNodesWherePatternIsPresent(selection);
+            this.present = patternIsPresent();
+        } else {
+            this.present = containedPattern.containedIn(selection);  
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+	protected void retainNodesWherePatternIsPresent(ISelection selection) {
+        for(ITask task : selection.getChildren()) {
+            this.present = false;
+            task.accept(this);
+            if(this.present && this.taskType.filterPredicate().apply(selection)) {
+                this.retainedSelectionTasks.add(selection);
+            }
+            if(this.present) {
+            	break;
+            }
+        }
+    }
+    
+    private boolean patternIsPresent() {
+        return !this.retainedSelectionTasks.isEmpty();
+    }
+    
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     *
+     * @return
+     */
+    public boolean isPresent() {
+        return this.present;
+    }
+
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     *
+     */
+    public void reset() {
+        this.retainedSelectionTasks.clear();
+        this.present = false;
+    }
+
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     *
+     * @return
+     */
+    public boolean hasExcludedSelectionNodes() {
+        return patternIsPresent();
+    }
+
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     *
+     * @return
+     */
+    public List<ITask> getRetainedSelectionNodes() {
+        return this.retainedSelectionTasks;
+    }
+    
+}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/LongFormUsageDefect.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/LongFormUsageDefect.java	(revision 1199)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/LongFormUsageDefect.java	(revision 1204)
@@ -39,5 +39,5 @@
 public class LongFormUsageDefect extends UsabilityRule implements UsabilityUsageDefect {
 
-    private UsagePattern longFormUsagePattern;
+    private InteractionPattern longFormUsagePattern;
     
     /**
@@ -62,6 +62,6 @@
      */
     private void initUsagePattern() {
-        UsagePatternBuilder builder = new UsagePatternBuilder();
-        UsagePattern fillFormPattern = builder.concernedNode(ITERATION).startsWith(TEXT_INPUT).endsWith(SCROLL).build();
+        InteractionPatternBuilder builder = new InteractionPatternBuilder();
+        InteractionPattern fillFormPattern = builder.concernedNode(ITERATION).startsWith(TEXT_INPUT).endsWith(SCROLL).build();
         this.longFormUsagePattern = builder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).contains(fillFormPattern).endsWith(MOUSE_CLICK).build();
     }
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/UsagePattern.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/UsagePattern.java	(revision 1199)
+++ 	(revision )
@@ -1,146 +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.rules.patterns;
-
-import java.util.Arrays;
-import java.util.List;
-
-import com.google.common.base.Optional;
-import com.google.common.base.Predicate;
-import com.google.common.collect.Iterables;
-
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
-import de.ugoe.cs.autoquest.usability.tasktree.IterativeDFSFilterStrategy;
-import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskModelFilter;
-import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter;
-
-/**
- * <p>
- * TODO comment
- * </p>
- * 
- * @author Alexander Deicke
- */
-public class UsagePattern {
-    
-    private TaskModelFilter taskTreeFilter = new TaskModelFilter(new IterativeDFSFilterStrategy());
-    
-    private TaskTypeFilter concernedTask;
-
-    private List<UsagePatternVisitor> patternVisitors;
-    
-    private boolean present = false;
-    
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @param concernedNode
-     * @param eventType
-     */
-    public UsagePattern(TaskTypeFilter concernedNode,
-                        UsagePatternVisitor... patternVisitor)
-    {
-        this.patternVisitors = Arrays.asList(patternVisitor);
-        this.concernedTask = concernedNode;
-    }
-
-    public boolean containedIn(ITaskModel taskModel) {
-        List<ITask> allConcernedTasks = filterAllConcernedTasksFrom(taskModel);
-        for(ITask concernedTask : allConcernedTasks) {
-            checkTask(concernedTask);  
-            if(this.present) break;
-        }
-        return this.present;
-    }
-
-    private void checkTask(ITask concernedTask) {
-        applyAllVisitors(concernedTask);
-        if(allVisitorsArePresent()) {
-            this.present = true;
-        } else {
-            resetAllVisitors();
-        }
-    }
-    
-    public boolean containedIn(ITask task) {
-        checkTask(task);
-        return this.present;      
-    }
-
-    private void applyAllVisitors(ITask concernedTask) {
-        Optional<UsagePatternVisitor> previousVisitor = Optional.absent();
-        for(UsagePatternVisitor visitor : patternVisitors) {
-            if(appliedOnSelectionNode(previousVisitor)) {
-                for(ITask selection : previousVisitor.get().getRetainedSelectionNodes()) {
-                    selection.accept(visitor);
-                }
-            } else {
-                previousVisitor = Optional.of(visitor);
-                concernedTask.accept(visitor);
-            }
-        }
-    }
-
-    private boolean appliedOnSelectionNode(Optional<UsagePatternVisitor> previousVisitor) {
-        return previousVisitor.isPresent() && previousVisitor.get().hasExcludedSelectionNodes();
-    }
-
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @param taskTree
-     * @return
-     */
-    private List<ITask> filterAllConcernedTasksFrom(ITaskModel taskModel) {
-        return this.taskTreeFilter.filterByNodeType(this.concernedTask).from(taskModel).tasksMatchedFilter();
-    }
-    
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @return
-     */
-    private boolean allVisitorsArePresent() {
-        Iterable<UsagePatternVisitor> allPresent = Iterables.filter(this.patternVisitors, new Predicate<UsagePatternVisitor>() {
-            
-            public boolean apply(UsagePatternVisitor visitor) {
-                return visitor.isPresent();
-            }
-            
-        });
-        return Iterables.size(allPresent) == this.patternVisitors.size();
-    }
-    
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     */
-    private void resetAllVisitors() {
-        for(UsagePatternVisitor visitor : this.patternVisitors) {
-            visitor.reset();
-        }
-        
-    }
-
-}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/UsagePatternBuilder.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/UsagePatternBuilder.java	(revision 1199)
+++ 	(revision )
@@ -1,710 +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.rules.patterns;
-
-import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.ContainsEventVisitor;
-import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.ContainsPatternVisitor;
-import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.EndsWithEventVisitor;
-import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.EndsWithPatternVisitor;
-import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.StartsWithEventVisitor;
-import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.StartsWithPatternVisitor;
-import de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter;
-import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter;
-
-/**
- * <p>
- * TODO comment
- * </p>
- * 
- * @author Alexander Deicke
- */
-public class UsagePatternBuilder {
-
-    protected TaskTypeFilter concernedNode;
-    
-    protected EventTypeFilter startsWithEvent;
-    
-    protected UsagePattern startsWithPattern;
-    
-    protected EventTypeFilter endsWithEvent;
-    
-    protected UsagePattern endsWithPattern;
-    
-    protected EventTypeFilter containsEvent;
-    
-    protected UsagePattern containsPattern;
-    
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @param sequence
-     * @return
-     */
-    public SpecifyPatternStep concernedNode(TaskTypeFilter concernedNode) {
-        this.concernedNode = concernedNode;
-        return new SpecifyPatternStep();
-    }
-    
-    public class SpecifyPatternStep {
-
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param textInput
-         * @return
-         */
-        public BuildStartsWithEventStep startsWith(EventTypeFilter startsWithType) {
-            UsagePatternBuilder.this.startsWithEvent = startsWithType;
-            return new BuildStartsWithEventStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param startsWithPattern
-         * @return
-         */
-        public BuildStartsWithPatternStep startsWith(UsagePattern startsWithPattern) {
-            UsagePatternBuilder.this.startsWithPattern = startsWithPattern;
-            return new BuildStartsWithPatternStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param textInput
-         * @return
-         */
-        public BuildEndsWithEventStep endsWith(EventTypeFilter endsWithType) {
-            UsagePatternBuilder.this.endsWithEvent = endsWithType;
-            return new BuildEndsWithEventStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param endsWithPattern
-         * @return
-         */
-        public BuildEndsWithPatternStep endsWith(UsagePattern endsWithPattern) {
-            UsagePatternBuilder.this.endsWithPattern = endsWithPattern;
-            return new BuildEndsWithPatternStep();
-        }
-
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param textInput
-         * @return
-         */
-        public BuildContainsEventStep contains(EventTypeFilter containsType) {
-            UsagePatternBuilder.this.containsEvent = containsType;
-            return new BuildContainsEventStep();
-        }
-
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param containsPattern
-         * @return
-         */
-        public BuildContainsPatternStep contains(UsagePattern containsPattern) {
-            UsagePatternBuilder.this.containsPattern = containsPattern;
-            return new BuildContainsPatternStep();
-        }
-        
-    }
-    
-    public class BuildStartsWithEventStep {
-
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param endsWithType
-         * @return
-         */
-        public BuildStartsAndEndsWithEventStep endsWith(EventTypeFilter endsWithType) {
-            UsagePatternBuilder.this.endsWithEvent = endsWithType;
-            return new BuildStartsAndEndsWithEventStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param endsWithPattern
-         * @return
-         */
-        public BuildStartsWithEventAndEndsWithPattern endsWith(UsagePattern endsWithPattern) {
-            UsagePatternBuilder.this.endsWithPattern = endsWithPattern;
-            return new BuildStartsWithEventAndEndsWithPattern();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param textInput
-         * @return
-         */
-        public BuildStartsWithEventAndContainsEventStep contains(EventTypeFilter containsType) {
-            UsagePatternBuilder.this.containsEvent = containsType;
-            return new BuildStartsWithEventAndContainsEventStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param containedPattern
-         * @return
-         */
-        public BuildStartsWithEventAndContainsPatternStep contains(UsagePattern containsPattern) {
-            UsagePatternBuilder.this.containsPattern = containsPattern;
-            return new BuildStartsWithEventAndContainsPatternStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public UsagePattern build() {
-            return new UsagePattern(concernedNode, new StartsWithEventVisitor(startsWithEvent));
-        }
-        
-    }
-    
-    public class BuildStartsWithPatternStep {
-
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param containsEvent
-         * @return
-         */
-        public BuildStartsWithPatternAndContainsEventStep contains(EventTypeFilter containsEvent) {
-            UsagePatternBuilder.this.containsEvent = containsEvent;
-            return new BuildStartsWithPatternAndContainsEventStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param containedPattern
-         * @return
-         */
-        public BuildStartsWithPatternAndContainsPatternStep contains(UsagePattern containsPattern) {
-            UsagePatternBuilder.this.containsPattern = containsPattern;
-            return new BuildStartsWithPatternAndContainsPatternStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param textInput
-         * @return
-         */
-        public BuildStartsWithPatternAndEndsWithEventStep endsWith(EventTypeFilter endsWithEvent) {
-            UsagePatternBuilder.this.endsWithEvent = endsWithEvent;
-            return new BuildStartsWithPatternAndEndsWithEventStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param endsWithPattern
-         * @return
-         */
-        public BuildStartsAndEndsWithPatternStep endsWith(UsagePattern endsWithPattern) {
-            UsagePatternBuilder.this.endsWithPattern = endsWithPattern;
-            return new BuildStartsAndEndsWithPatternStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public UsagePattern build() {
-            return new UsagePattern(concernedNode, new StartsWithPatternVisitor(startsWithPattern));
-        }
-        
-    }
-    
-    public class BuildEndsWithEventStep {
-
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public UsagePattern build() {
-            return new UsagePattern(concernedNode, new EndsWithEventVisitor(endsWithEvent));
-        }
-        
-    }
-    
-    public class BuildEndsWithPatternStep {
-
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public UsagePattern build() {
-            return new UsagePattern(concernedNode, new EndsWithPatternVisitor(endsWithPattern));
-        }
-        
-    }
-    
-    public class BuildContainsEventStep {
-
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param textInput
-         * @return
-         */
-        public BuildContainsAndEndsWithEventStep endsWith(EventTypeFilter endsWithType) {
-            UsagePatternBuilder.this.endsWithEvent = endsWithType;
-            return new BuildContainsAndEndsWithEventStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public UsagePattern build() {
-            return new UsagePattern(concernedNode, new ContainsEventVisitor(containsEvent));
-        }
-        
-    }
-    
-    public class BuildContainsPatternStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public UsagePattern build() {
-            return new UsagePattern(concernedNode, new ContainsPatternVisitor(containsPattern));
-        }
-        
-    }
-    
-    public class BuildStartsAndEndsWithEventStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public UsagePattern build() {
-            return new UsagePattern(concernedNode, new StartsWithEventVisitor(startsWithEvent), new EndsWithEventVisitor(endsWithEvent));
-        }
-        
-    }
-    
-    public class BuildStartsWithEventAndEndsWithPattern {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public UsagePattern build() {
-            return new UsagePattern(concernedNode, new StartsWithEventVisitor(startsWithEvent), new EndsWithPatternVisitor(endsWithPattern));
-        }
-        
-    }
-    
-    public class BuildStartsWithPatternAndEndsWithEventStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public UsagePattern build() {
-            return new UsagePattern(concernedNode, new StartsWithPatternVisitor(startsWithPattern), new EndsWithEventVisitor(endsWithEvent));
-        }
-        
-    }
-    
-    public class BuildStartsAndEndsWithPatternStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public UsagePattern build() {
-            return new UsagePattern(concernedNode, new StartsWithPatternVisitor(startsWithPattern), new EndsWithPatternVisitor(endsWithPattern));
-        }
-        
-    }
-    
-    public class BuildStartsWithEventAndContainsEventStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param textInput
-         * @return
-         */
-        public BuildStartsAndEndsWithEventAndContainsEventStep endsWith(EventTypeFilter endsWithEvent) {
-            UsagePatternBuilder.this.endsWithEvent = endsWithEvent;
-            return new BuildStartsAndEndsWithEventAndContainsEventStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param endsWithPattern
-         * @return
-         */
-        public BuildStartsWithEventContainsEventAndEndsWithPatternStep endsWith(UsagePattern endsWithPattern) {
-            UsagePatternBuilder.this.endsWithPattern = endsWithPattern;
-            return new BuildStartsWithEventContainsEventAndEndsWithPatternStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public UsagePattern build() {
-            return new UsagePattern(concernedNode, new StartsWithEventVisitor(startsWithEvent), new ContainsEventVisitor(containsEvent));
-        }
-        
-    }
-    
-    public class BuildStartsWithPatternAndContainsPatternStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param textInput
-         * @return
-         */
-        public BuildStartsContainsPatternAndEndsWithEventStep endsWith(EventTypeFilter endsWithEvent) {
-            UsagePatternBuilder.this.endsWithEvent = endsWithEvent;
-            return new BuildStartsContainsPatternAndEndsWithEventStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param endsWithPattern
-         * @return
-         */
-        public BuildStartsAndEndsWithPatternAndContainsPatternStep endsWith(UsagePattern endsWithPattern) {
-            UsagePatternBuilder.this.endsWithPattern = endsWithPattern;
-            return new BuildStartsAndEndsWithPatternAndContainsPatternStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public UsagePattern build() {
-            return new UsagePattern(concernedNode, new StartsWithPatternVisitor(startsWithPattern), new ContainsPatternVisitor(containsPattern));
-        }
-        
-    }
-    
-    public class BuildStartsWithEventAndContainsPatternStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param textInput
-         * @return
-         */
-        public BuildStartsWithEventContainsPatternAndEndsWithEventStep endsWith(EventTypeFilter endsWithEvent) {
-            UsagePatternBuilder.this.endsWithEvent = endsWithEvent;
-            return new BuildStartsWithEventContainsPatternAndEndsWithEventStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param endsWithPattern
-         * @return
-         */
-        public BuildStartsWithEventContainsPatternAndEndsWithPatternStep endsWith(UsagePattern endsWithPattern) {
-            UsagePatternBuilder.this.endsWithPattern = endsWithPattern;
-            return new BuildStartsWithEventContainsPatternAndEndsWithPatternStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public UsagePattern build() {
-            return new UsagePattern(concernedNode, new StartsWithEventVisitor(startsWithEvent), new ContainsPatternVisitor(containsPattern));
-        }
-        
-    }
-    
-    public class BuildStartsWithPatternAndContainsEventStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param textInput
-         * @return
-         */
-        public BuildStartsWithPatternContainsEventAndEndsWithEventStep endsWith(EventTypeFilter endsWithEvent) {
-            UsagePatternBuilder.this.endsWithEvent = endsWithEvent;
-            return new BuildStartsWithPatternContainsEventAndEndsWithEventStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param endsWithPattern
-         * @return
-         */
-        public BuildStartsWithPatternContainsEventAndEndsWithPatternStep endsWith(UsagePattern endsWithPattern) {
-            UsagePatternBuilder.this.endsWithPattern = endsWithPattern;
-            return new BuildStartsWithPatternContainsEventAndEndsWithPatternStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public UsagePattern build() {
-            return new UsagePattern(concernedNode, new StartsWithPatternVisitor(startsWithPattern), new ContainsEventVisitor(containsEvent));
-        }
-        
-    }
-    
-    public class BuildStartsAndEndsWithEventAndContainsEventStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public UsagePattern build() {
-            return new UsagePattern(concernedNode, new StartsWithEventVisitor(startsWithEvent), new EndsWithEventVisitor(endsWithEvent), new ContainsEventVisitor(containsEvent));
-        }
-        
-    }
-    
-    public class BuildStartsContainsPatternAndEndsWithEventStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public UsagePattern build() {
-            return new UsagePattern(concernedNode, new StartsWithPatternVisitor(startsWithPattern), new ContainsPatternVisitor(containsPattern), new EndsWithEventVisitor(endsWithEvent));
-        }
-        
-    }
-    
-    public class BuildStartsAndEndsWithPatternAndContainsPatternStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public UsagePattern build() {
-            return new UsagePattern(concernedNode, new StartsWithPatternVisitor(startsWithPattern), new EndsWithPatternVisitor(endsWithPattern), new ContainsPatternVisitor(containsPattern));
-        }
-        
-    }
-    
-    public class BuildStartsWithEventContainsEventAndEndsWithPatternStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public UsagePattern build() {
-            return new UsagePattern(concernedNode, new StartsWithEventVisitor(startsWithEvent), new ContainsEventVisitor(containsEvent), new EndsWithPatternVisitor(endsWithPattern));
-        }
-        
-    }
-    
-    public class BuildStartsWithEventContainsPatternAndEndsWithEventStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public UsagePattern build() {
-            return new UsagePattern(concernedNode, new StartsWithEventVisitor(startsWithEvent), new ContainsPatternVisitor(containsPattern), new EndsWithEventVisitor(endsWithEvent));
-        }
-        
-    }
-    
-    public class BuildStartsWithEventContainsPatternAndEndsWithPatternStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public UsagePattern build() {
-            return new UsagePattern(concernedNode, new StartsWithEventVisitor(startsWithEvent), new ContainsPatternVisitor(containsPattern), new EndsWithPatternVisitor(endsWithPattern));
-        }
-        
-    }
-    
-    public class BuildStartsWithPatternContainsEventAndEndsWithEventStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public UsagePattern build() {
-            return new UsagePattern(concernedNode, new StartsWithPatternVisitor(startsWithPattern), new ContainsEventVisitor(containsEvent), new EndsWithEventVisitor(endsWithEvent));
-        }
-        
-    }
-    
-    public class BuildStartsWithPatternContainsEventAndEndsWithPatternStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public UsagePattern build() {
-            return new UsagePattern(concernedNode, new StartsWithPatternVisitor(startsWithPattern), new ContainsEventVisitor(containsEvent), new EndsWithPatternVisitor(endsWithPattern));
-        }
-        
-    }
-    
-    public class BuildContainsAndEndsWithEventStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public UsagePattern build() {
-            return new UsagePattern(concernedNode, new ContainsEventVisitor(containsEvent), new EndsWithEventVisitor(endsWithEvent));
-        }
-        
-    }
-
-}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/UsagePatternVisitor.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/UsagePatternVisitor.java	(revision 1199)
+++ 	(revision )
@@ -1,156 +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.rules.patterns;
-
-import java.util.List;
-
-import org.apache.commons.lang.StringUtils;
-
-import com.google.common.base.Splitter;
-import com.google.common.collect.Lists;
-
-import de.ugoe.cs.autoquest.eventcore.IEventType;
-import de.ugoe.cs.autoquest.eventcore.StringEventType;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskVisitor;
-import de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter;
-
-/**
- * <p>
- * TODO comment
- * </p>
- * 
- * @author Alexander Deicke
- */
-public abstract class UsagePatternVisitor implements ITaskVisitor {
-    
-    protected EventTypeFilter eventType;
-    
-    protected UsagePattern containedPattern;
-    
-    protected boolean present = false;
-    
-    protected List<ITask> retainedChildrenTasksFromSelections = Lists.newArrayList();
-    
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask)
-     */
-    public void visit(IEventTask event) {
-        if(!this.present && isEventVisitor()) {
-            IEventType eventType = event.getEventType();
-            if(eventType instanceof StringEventType) {
-                this.present = eventType.toString().equals(nameOfEventType());
-            } else {
-                this.present = eventType.getClass().equals(this.eventType.clazz());
-            }
-        }
-    }
-    
-    public boolean isEventVisitor() {
-        return this.eventType != null && this.containedPattern == null;
-    }
-    
-    protected String nameOfEventType() {
-        String ret = StringUtils.EMPTY;
-        Iterable<String> splitted = Splitter.on("_").split(this.eventType.name());
-        for(String str : splitted) {
-            str = str.toLowerCase();
-            ret += Character.toString(str.charAt(0)).toUpperCase() + str.substring(1);
-        }
-        return ret;
-    }
-    
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.TaskVisitor#accept(de.ugoe.cs.autoquest.tasktrees.treeifc.ITask)
-     */
-    @Override
-    public void visit(ITask task) {
-        task.accept(this);
-        
-    }
-    
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection)
-     */
-    public void visit(ISelection selection) {
-        if(isEventVisitor()) {
-            retainNodesWherePatternIsPresent(selection.getChildren());
-            this.present = patternIsPresent();
-        } else {
-            this.present = containedPattern.containedIn(selection);  
-        }
-    }
-
-    protected void retainNodesWherePatternIsPresent(List<ITask> children) {
-        for(ITask task : children) {
-            this.present = false;
-            task.accept(this);
-            if(this.present) {
-                this.retainedChildrenTasksFromSelections.add(task);
-            }
-        }
-    }
-    
-    private boolean patternIsPresent() {
-        return !this.retainedChildrenTasksFromSelections.isEmpty();
-    }
-    
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @return
-     */
-    public boolean isPresent() {
-        return this.present;
-    }
-
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     */
-    public void reset() {
-        this.retainedChildrenTasksFromSelections.clear();
-        this.present = false;
-    }
-
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @return
-     */
-    public boolean hasExcludedSelectionNodes() {
-        return patternIsPresent();
-    }
-
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @return
-     */
-    public List<ITask> getRetainedSelectionNodes() {
-        return this.retainedChildrenTasksFromSelections;
-    }
-    
-}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/ContainsEventVisitor.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/ContainsEventVisitor.java	(revision 1199)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/ContainsEventVisitor.java	(revision 1204)
@@ -20,6 +20,7 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternVisitor;
+import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternVisitor;
 import de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter;
+import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter;
 
 /**
@@ -30,5 +31,5 @@
  * @author Alexander Deicke
  */
-public class ContainsEventVisitor extends UsagePatternVisitor {
+public class ContainsEventVisitor extends InteractionPatternVisitor {
 
     /**
@@ -39,6 +40,7 @@
      * @param containsType
      */
-    public ContainsEventVisitor(EventTypeFilter containsType) {
+    public ContainsEventVisitor(EventTypeFilter containsType, TaskTypeFilter taskType) {
         this.eventType = containsType;
+        this.taskType = taskType;
     }
 
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/ContainsInteractionPatternVisitor.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/ContainsInteractionPatternVisitor.java	(revision 1204)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/ContainsInteractionPatternVisitor.java	(revision 1204)
@@ -0,0 +1,78 @@
+//   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.rules.patterns.visitors;
+
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern;
+import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternVisitor;
+import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public class ContainsInteractionPatternVisitor extends InteractionPatternVisitor {
+
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     *
+     * @param containsPattern
+     */
+    public ContainsInteractionPatternVisitor(InteractionPattern containsPattern, TaskTypeFilter taskType) {
+        this.containedPattern = containsPattern;
+        this.taskType = taskType;
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration)
+     */
+    public void visit(IIteration iteration) {
+        checkTaskAndReturnIfPatternIsPresent(iteration.getMarkedTask());
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence)
+     */
+    public void visit(ISequence sequence) {
+        checkAllChildrenAndReturnIfPatternIsPresent(sequence);
+    }
+    
+    private void checkAllChildrenAndReturnIfPatternIsPresent(ISequence sequence) {
+        for (ITask child : sequence.getChildren()) {
+            if(checkTaskAndReturnIfPatternIsPresent(child)) {
+                this.present = true;
+                break;
+            }
+        }
+    }
+    
+    private boolean checkTaskAndReturnIfPatternIsPresent(ITask task) {
+        if(isEvent(task)) return false;
+        return this.containedPattern.containedIn(task);
+    }
+    
+    private boolean isEvent(ITask task) {
+        return task instanceof IEventTask;
+    }
+
+}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/ContainsPatternVisitor.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/ContainsPatternVisitor.java	(revision 1199)
+++ 	(revision )
@@ -1,76 +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.rules.patterns.visitors;
-
-import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern;
-import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternVisitor;
-
-/**
- * <p>
- * TODO comment
- * </p>
- * 
- * @author Alexander Deicke
- */
-public class ContainsPatternVisitor extends UsagePatternVisitor {
-
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @param containsPattern
-     */
-    public ContainsPatternVisitor(UsagePattern containsPattern) {
-        this.containedPattern = containsPattern;
-    }
-
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration)
-     */
-    public void visit(IIteration iteration) {
-        checkTaskAndReturnIfPatternIsPresent(iteration.getMarkedTask());
-    }
-
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence)
-     */
-    public void visit(ISequence sequence) {
-        checkAllChildrenAndReturnIfPatternIsPresent(sequence);
-    }
-    
-    private void checkAllChildrenAndReturnIfPatternIsPresent(ISequence sequence) {
-        for (ITask child : sequence.getChildren()) {
-            if(checkTaskAndReturnIfPatternIsPresent(child)) {
-                this.present = true;
-                break;
-            }
-        }
-    }
-    
-    private boolean checkTaskAndReturnIfPatternIsPresent(ITask task) {
-        if(isEvent(task)) return false;
-        return this.containedPattern.containedIn(task);
-    }
-    
-    private boolean isEvent(ITask task) {
-        return task instanceof IEventTask;
-    }
-
-}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/EndsWithEventVisitor.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/EndsWithEventVisitor.java	(revision 1199)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/EndsWithEventVisitor.java	(revision 1204)
@@ -17,6 +17,7 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
-import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternVisitor;
+import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternVisitor;
 import de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter;
+import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter;
 import de.ugoe.cs.autoquest.usability.util.PatternsVisitorUtil;
 
@@ -28,5 +29,5 @@
  * @author Alexander Deicke
  */
-public class EndsWithEventVisitor extends UsagePatternVisitor {
+public class EndsWithEventVisitor extends InteractionPatternVisitor {
 
     /**
@@ -37,6 +38,7 @@
      * @param eventType
      */
-    public EndsWithEventVisitor(EventTypeFilter eventType) {
+    public EndsWithEventVisitor(EventTypeFilter eventType, TaskTypeFilter taskType) {
         this.eventType = eventType;
+        this.taskType = taskType;
     }
 
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/EndsWithInteractionPatternVisitor.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/EndsWithInteractionPatternVisitor.java	(revision 1204)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/EndsWithInteractionPatternVisitor.java	(revision 1204)
@@ -0,0 +1,70 @@
+//   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.rules.patterns.visitors;
+
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern;
+import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternVisitor;
+import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter;
+import de.ugoe.cs.autoquest.usability.util.PatternsVisitorUtil;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public class EndsWithInteractionPatternVisitor extends InteractionPatternVisitor {
+
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     *
+     * @param endsWithPattern
+     */
+    public EndsWithInteractionPatternVisitor(InteractionPattern endsWithPattern, TaskTypeFilter taskType) {
+        this.containedPattern = endsWithPattern;
+        this.taskType = taskType;
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration)
+     */
+    public void visit(IIteration iteration) {
+        this.present = containedPattern.containedIn(iteration); 
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence)
+     */
+    public void visit(ISequence sequence) {
+        ITask lastTask = PatternsVisitorUtil.lastNodeOf(sequence.getChildren());
+        if(isEvent(lastTask)) {
+            this.present = containedPattern.containedIn(sequence);
+        } else {
+            this.present = containedPattern.containedIn(lastTask);
+        }    
+    }
+
+    private boolean isEvent(ITask lastTask) {
+        return lastTask instanceof IEventTask;
+    }
+
+}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/EndsWithPatternVisitor.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/EndsWithPatternVisitor.java	(revision 1199)
+++ 	(revision )
@@ -1,68 +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.rules.patterns.visitors;
-
-import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern;
-import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternVisitor;
-import de.ugoe.cs.autoquest.usability.util.PatternsVisitorUtil;
-
-/**
- * <p>
- * TODO comment
- * </p>
- * 
- * @author Alexander Deicke
- */
-public class EndsWithPatternVisitor extends UsagePatternVisitor {
-
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @param endsWithPattern
-     */
-    public EndsWithPatternVisitor(UsagePattern endsWithPattern) {
-        this.containedPattern = endsWithPattern;
-    }
-
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration)
-     */
-    public void visit(IIteration iteration) {
-        this.present = containedPattern.containedIn(iteration); 
-    }
-
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence)
-     */
-    public void visit(ISequence sequence) {
-        ITask lastTask = PatternsVisitorUtil.lastNodeOf(sequence.getChildren());
-        if(isEvent(lastTask)) {
-            this.present = containedPattern.containedIn(sequence);
-        } else {
-            this.present = containedPattern.containedIn(lastTask);
-        }    
-    }
-
-    private boolean isEvent(ITask lastTask) {
-        return lastTask instanceof IEventTask;
-    }
-
-}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/StartsWithEventVisitor.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/StartsWithEventVisitor.java	(revision 1199)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/StartsWithEventVisitor.java	(revision 1204)
@@ -17,6 +17,7 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
-import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternVisitor;
+import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternVisitor;
 import de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter;
+import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter;
 import de.ugoe.cs.autoquest.usability.util.PatternsVisitorUtil;
 
@@ -28,5 +29,5 @@
  * @author Alexander Deicke
  */
-public class StartsWithEventVisitor extends UsagePatternVisitor {
+public class StartsWithEventVisitor extends InteractionPatternVisitor {
 
     /**
@@ -37,6 +38,7 @@
      * @param eventType
      */
-    public StartsWithEventVisitor(EventTypeFilter eventType) {
+    public StartsWithEventVisitor(EventTypeFilter eventType, TaskTypeFilter taskType) {
         this.eventType = eventType;
+        this.taskType = taskType;
     }
 
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/StartsWithInteractionPatternVisitor.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/StartsWithInteractionPatternVisitor.java	(revision 1204)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/StartsWithInteractionPatternVisitor.java	(revision 1204)
@@ -0,0 +1,70 @@
+//   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.rules.patterns.visitors;
+
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern;
+import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternVisitor;
+import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter;
+import de.ugoe.cs.autoquest.usability.util.PatternsVisitorUtil;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public class StartsWithInteractionPatternVisitor extends InteractionPatternVisitor {
+
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     *
+     * @param startsWithPattern
+     */
+    public StartsWithInteractionPatternVisitor(InteractionPattern startsWithPattern, TaskTypeFilter taskType) {
+        this.containedPattern = startsWithPattern;
+        this.taskType = taskType;
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration)
+     */
+    public void visit(IIteration iteration) {
+        this.present = containedPattern.containedIn(iteration);  
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence)
+     */
+    public void visit(ISequence sequence) {
+        ITask firstTask = PatternsVisitorUtil.firstNodeOf(sequence.getChildren());
+        if(isEvent(firstTask)) {
+            this.present = containedPattern.containedIn(sequence);
+        } else {
+            this.present = containedPattern.containedIn(firstTask);
+        }    
+    }
+
+    private boolean isEvent(ITask firstTask) {
+        return firstTask instanceof IEventTask;
+    }
+
+}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/StartsWithPatternVisitor.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/StartsWithPatternVisitor.java	(revision 1199)
+++ 	(revision )
@@ -1,68 +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.rules.patterns.visitors;
-
-import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern;
-import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternVisitor;
-import de.ugoe.cs.autoquest.usability.util.PatternsVisitorUtil;
-
-/**
- * <p>
- * TODO comment
- * </p>
- * 
- * @author Alexander Deicke
- */
-public class StartsWithPatternVisitor extends UsagePatternVisitor {
-
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @param startsWithPattern
-     */
-    public StartsWithPatternVisitor(UsagePattern startsWithPattern) {
-        this.containedPattern = startsWithPattern;
-    }
-
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration)
-     */
-    public void visit(IIteration iteration) {
-        this.present = containedPattern.containedIn(iteration);  
-    }
-
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence)
-     */
-    public void visit(ISequence sequence) {
-        ITask firstTask = PatternsVisitorUtil.firstNodeOf(sequence.getChildren());
-        if(isEvent(firstTask)) {
-            this.present = containedPattern.containedIn(sequence);
-        } else {
-            this.present = containedPattern.containedIn(firstTask);
-        }    
-    }
-
-    private boolean isEvent(ITask firstTask) {
-        return firstTask instanceof IEventTask;
-    }
-
-}
