source: trunk/autoquest-core-usability/src/main/java/de/ugoe/cs/autoquest/usability/UsabilityEvaluationResult.java @ 2162

Last change on this file since 2162 was 2162, checked in by pharms, 7 years ago
  • changes for first VR oriented usability evaluation
File size: 3.0 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;
16
17import java.io.Serializable;
18import java.util.ArrayList;
19import java.util.Collection;
20import java.util.List;
21import java.util.Map;
22
23import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
24import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
25
26/**
27 * TODO comment
28 *
29 * @version $Revision: $ $Date: 16.07.2012$
30 * @author 2012, last modified by $Author: pharms$
31 */
32public class UsabilityEvaluationResult implements Serializable {
33   
34    /**  */
35    private static final long serialVersionUID = 1L;
36
37    /** */
38    private ITaskModel taskModel;
39   
40    /** */
41    private List<UsabilitySmell> smells = new ArrayList<UsabilitySmell>();
42
43    /**
44     *
45     */
46    public UsabilityEvaluationResult(ITaskModel taskModel) {
47        this.taskModel = taskModel;
48    }
49
50    /**
51     *
52     */
53    public UsabilityEvaluationResult(ITaskModel                 taskModel,
54                                     Collection<UsabilitySmell> smells)
55    {
56        this.taskModel = taskModel;
57        for (UsabilitySmell smell : smells) {
58            this.smells.add(smell);
59        }
60    }
61
62    /**
63     *
64     */
65    public UsabilityEvaluationResult(ITaskModel                      taskModel,
66                                     List<UsabilityEvaluationResult> results)
67    {
68        this.taskModel = taskModel;
69        for (UsabilityEvaluationResult result : results) {
70            for (UsabilitySmell smell : result.getAllSmells()) {
71                smells.add(smell);
72            }
73        }
74    }
75
76    /**
77     *
78     */
79    public void addSmell(UsabilitySmellIntensity   intensity,
80                         UsabilitySmellDescription description,
81                         Map<String, Object>       parameters)
82    {
83        addSmell(null, intensity, description, parameters);
84    }
85
86    /**
87     *
88     */
89    public void addSmell(ITask                     smellingTask,
90                         UsabilitySmellIntensity   intensity,
91                         UsabilitySmellDescription description,
92                         Map<String, Object>       parameters)
93    {
94        smells.add(new UsabilitySmell(smellingTask, intensity, description, parameters));
95    }
96
97    /**
98     *
99     */
100    public List<UsabilitySmell> getAllSmells() {
101        return smells;
102    }
103
104    /**
105     * @return the taskModel
106     */
107    public ITaskModel getTaskModel() {
108        return taskModel;
109    }
110
111}
Note: See TracBrowser for help on using the repository browser.