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
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 EndsWithEventVisitor extends InteractionPatternVisitor {
[1150]34
35    /**
36     * <p>
37     * TODO: comment
38     * </p>
[1217]39     *
[1150]40     * @param eventType
41     */
[1204]42    public EndsWithEventVisitor(EventTypeFilter eventType, TaskTypeFilter taskType) {
[1150]43        this.eventType = eventType;
[1204]44        this.taskType = taskType;
[1150]45    }
46
[1293]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        /*
[1217]55     * (non-Javadoc)
56     *
57     * @see
58     * de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
59     * .IIteration)
[1150]60     */
61    public void visit(IIteration iteration) {
[1152]62        iteration.getMarkedTask().accept(this);
[1150]63    }
64
[1217]65    /*
66     * (non-Javadoc)
67     *
68     * @see
69     * de.ugoe.cs.autoquest.tasktrees.treeifc.TaskVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
70     * .IOptional)
[1213]71     */
72    public void visit(IOptional optional) {
73        optional.getMarkedTask().accept(this);
74    }
75
[1217]76    /*
77     * (non-Javadoc)
78     *
79     * @see
80     * de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
81     * .ISequence)
[1150]82     */
83    public void visit(ISequence sequence) {
[1217]84        PatternsVisitorUtil.lastSubTaskOf(sequence.getChildren()).accept(this);
[1150]85    }
[1217]86
[1150]87}
Note: See TracBrowser for help on using the repository browser.