source: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/EndsWithEventVisitor.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 EndsWithEventVisitor extends InteractionPatternVisitor {
34
35    /**
36     * <p>
37     * TODO: comment
38     * </p>
39     *
40     * @param eventType
41     */
42    public EndsWithEventVisitor(EventTypeFilter eventType, TaskTypeFilter taskType) {
43        this.eventType = eventType;
44        this.taskType = taskType;
45    }
46
47        public EndsWithEventVisitor(EventTypeFilter eventType,
48                        EventTargetFilter eventTarget, TaskTypeFilter taskType) {
49                this.eventType = eventType;
50                this.eventTarget = eventTarget;
51                this.taskType = taskType;
52        }
53
54        /*
55     * (non-Javadoc)
56     *
57     * @see
58     * de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
59     * .IIteration)
60     */
61    public void visit(IIteration iteration) {
62        iteration.getMarkedTask().accept(this);
63    }
64
65    /*
66     * (non-Javadoc)
67     *
68     * @see
69     * de.ugoe.cs.autoquest.tasktrees.treeifc.TaskVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
70     * .IOptional)
71     */
72    public void visit(IOptional optional) {
73        optional.getMarkedTask().accept(this);
74    }
75
76    /*
77     * (non-Javadoc)
78     *
79     * @see
80     * de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
81     * .ISequence)
82     */
83    public void visit(ISequence sequence) {
84        PatternsVisitorUtil.lastSubTaskOf(sequence.getChildren()).accept(this);
85    }
86
87}
Note: See TracBrowser for help on using the repository browser.