source: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/StartsWithEventVisitor.java @ 1293

Last change on this file since 1293 was 1293, checked in by adeicke, 11 years ago

Added possibility to consider event target in interaction patterns.

  • Property svn:mime-type set to text/plain
File size: 2.8 KB
RevLine 
[1150]1//   Copyright 2012 Georg-August-Universität Göttingen, Germany
2//
3//   Licensed under the Apache License, Version 2.0 (the "License");
4//   you may not use this file except in compliance with the License.
5//   You may obtain a copy of the License at
6//
7//       http://www.apache.org/licenses/LICENSE-2.0
8//
9//   Unless required by applicable law or agreed to in writing, software
10//   distributed under the License is distributed on an "AS IS" BASIS,
11//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12//   See the License for the specific language governing permissions and
13//   limitations under the License.
14
15package de.ugoe.cs.autoquest.usability.rules.patterns.visitors;
16
17import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
[1213]18import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional;
[1150]19import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
[1204]20import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternVisitor;
[1293]21import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTargetFilter;
[1217]22import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter;
23import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter;
[1150]24import de.ugoe.cs.autoquest.usability.util.PatternsVisitorUtil;
25
26/**
27 * <p>
28 * TODO comment
29 * </p>
30 *
31 * @author Alexander Deicke
32 */
[1204]33public class StartsWithEventVisitor extends InteractionPatternVisitor {
[1150]34
35    /**
36     * <p>
37     * TODO: comment
38     * </p>
[1217]39     *
[1150]40     * @param eventType
41     */
[1204]42    public StartsWithEventVisitor(EventTypeFilter eventType, TaskTypeFilter taskType) {
[1150]43        this.eventType = eventType;
[1204]44        this.taskType = taskType;
[1150]45    }
46
[1293]47    public StartsWithEventVisitor(EventTypeFilter eventType,
48                        EventTargetFilter eventTarget,
49                        TaskTypeFilter taskType) {
50        this.eventType = eventType;
51        this.eventTarget = eventTarget;
52        this.taskType = taskType;
53        }
54
55        /*
[1217]56     * (non-Javadoc)
57     *
58     * @see
59     * de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
60     * .IIteration)
[1150]61     */
62    public void visit(IIteration iteration) {
[1152]63        iteration.getMarkedTask().accept(this);
[1150]64    }
[1217]65
66    /*
67     * (non-Javadoc)
68     *
69     * @see
70     * de.ugoe.cs.autoquest.tasktrees.treeifc.TaskVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
71     * .IOptional)
[1213]72     */
73    public void visit(IOptional optional) {
74        optional.getMarkedTask().accept(this);
75    }
76
[1217]77    /*
78     * (non-Javadoc)
79     *
80     * @see
81     * de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
82     * .ISequence)
[1150]83     */
84    public void visit(ISequence sequence) {
[1217]85        PatternsVisitorUtil.firstSubtaskOf(sequence.getChildren()).accept(this);
[1150]86    }
[1217]87
[1150]88}
Note: See TracBrowser for help on using the repository browser.