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
Line 
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;
18import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional;
19import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
20import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternVisitor;
21import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTargetFilter;
22import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter;
23import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter;
24import de.ugoe.cs.autoquest.usability.util.PatternsVisitorUtil;
25
26/**
27 * <p>
28 * TODO comment
29 * </p>
30 *
31 * @author Alexander Deicke
32 */
33public class StartsWithEventVisitor extends InteractionPatternVisitor {
34
35    /**
36     * <p>
37     * TODO: comment
38     * </p>
39     *
40     * @param eventType
41     */
42    public StartsWithEventVisitor(EventTypeFilter eventType, TaskTypeFilter taskType) {
43        this.eventType = eventType;
44        this.taskType = taskType;
45    }
46
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        /*
56     * (non-Javadoc)
57     *
58     * @see
59     * de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
60     * .IIteration)
61     */
62    public void visit(IIteration iteration) {
63        iteration.getMarkedTask().accept(this);
64    }
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)
72     */
73    public void visit(IOptional optional) {
74        optional.getMarkedTask().accept(this);
75    }
76
77    /*
78     * (non-Javadoc)
79     *
80     * @see
81     * de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
82     * .ISequence)
83     */
84    public void visit(ISequence sequence) {
85        PatternsVisitorUtil.firstSubtaskOf(sequence.getChildren()).accept(this);
86    }
87
88}
Note: See TracBrowser for help on using the repository browser.