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

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