[927] | 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 | |
---|
[922] | 15 | package de.ugoe.cs.autoquest.usability; |
---|
[442] | 16 | |
---|
| 17 | import java.util.ArrayList; |
---|
| 18 | import java.util.List; |
---|
[1335] | 19 | import java.util.Map; |
---|
[442] | 20 | |
---|
[1918] | 21 | import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; |
---|
[1493] | 22 | import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; |
---|
| 23 | |
---|
[442] | 24 | /** |
---|
| 25 | * TODO comment |
---|
| 26 | * |
---|
| 27 | * @version $Revision: $ $Date: 16.07.2012$ |
---|
| 28 | * @author 2012, last modified by $Author: pharms$ |
---|
| 29 | */ |
---|
[561] | 30 | public class UsabilityEvaluationResult { |
---|
| 31 | |
---|
| 32 | /** */ |
---|
[1493] | 33 | private ITaskModel taskModel; |
---|
| 34 | |
---|
| 35 | /** */ |
---|
[1918] | 36 | private List<UsabilitySmell> smells = new ArrayList<UsabilitySmell>(); |
---|
[442] | 37 | |
---|
[561] | 38 | /** |
---|
[1301] | 39 | * |
---|
[561] | 40 | */ |
---|
[1493] | 41 | public UsabilityEvaluationResult(ITaskModel taskModel) { |
---|
| 42 | this.taskModel = taskModel; |
---|
[561] | 43 | } |
---|
[442] | 44 | |
---|
[561] | 45 | /** |
---|
[1301] | 46 | * |
---|
[561] | 47 | */ |
---|
[1493] | 48 | public UsabilityEvaluationResult(ITaskModel taskModel, |
---|
| 49 | List<UsabilityEvaluationResult> results) |
---|
| 50 | { |
---|
| 51 | this.taskModel = taskModel; |
---|
[1335] | 52 | for (UsabilityEvaluationResult result : results) { |
---|
[1918] | 53 | for (UsabilitySmell smell : result.getAllSmells()) { |
---|
| 54 | smells.add(smell); |
---|
[1335] | 55 | } |
---|
| 56 | } |
---|
| 57 | } |
---|
| 58 | |
---|
| 59 | /** |
---|
| 60 | * |
---|
| 61 | */ |
---|
[1918] | 62 | public void addSmell(UsabilitySmellIntensity intensity, |
---|
| 63 | UsabilitySmellDescription description, |
---|
| 64 | Map<String, Object> parameters) |
---|
[1335] | 65 | { |
---|
[1918] | 66 | addSmell(null, intensity, description, parameters); |
---|
[1335] | 67 | } |
---|
| 68 | |
---|
| 69 | /** |
---|
| 70 | * |
---|
| 71 | */ |
---|
[1918] | 72 | public void addSmell(ITask smellingTask, |
---|
| 73 | UsabilitySmellIntensity intensity, |
---|
| 74 | UsabilitySmellDescription description, |
---|
| 75 | Map<String, Object> parameters) |
---|
| 76 | { |
---|
| 77 | smells.add(new UsabilitySmell(smellingTask, intensity, description, parameters)); |
---|
[561] | 78 | } |
---|
[442] | 79 | |
---|
[561] | 80 | /** |
---|
[1301] | 81 | * |
---|
[561] | 82 | */ |
---|
[1918] | 83 | public List<UsabilitySmell> getAllSmells() { |
---|
| 84 | return smells; |
---|
[442] | 85 | } |
---|
| 86 | |
---|
[1493] | 87 | /** |
---|
| 88 | * @return the taskModel |
---|
| 89 | */ |
---|
| 90 | public ITaskModel getTaskModel() { |
---|
| 91 | return taskModel; |
---|
| 92 | } |
---|
| 93 | |
---|
[442] | 94 | } |
---|