[1138] | 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 |
|
---|
| 15 | package de.ugoe.cs.autoquest.usability.rules;
|
---|
| 16 |
|
---|
| 17 | import java.util.List;
|
---|
| 18 |
|
---|
| 19 | import com.google.common.collect.Lists;
|
---|
| 20 |
|
---|
[1152] | 21 | import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
|
---|
[1138] | 22 | import de.ugoe.cs.autoquest.usability.rules.metrics.NoLetterOrDigitRatioMetric;
|
---|
| 23 | import de.ugoe.cs.autoquest.usability.rules.metrics.TextInputEntryRepetitionsMetric;
|
---|
| 24 | import de.ugoe.cs.autoquest.usability.rules.metrics.TextInputRatioMetric;
|
---|
| 25 |
|
---|
| 26 | /**
|
---|
| 27 | * <p>
|
---|
[1217] | 28 | * A ruleset containing usability metrics, which might be indicators for potential usability
|
---|
| 29 | * problems.
|
---|
[1138] | 30 | * </p>
|
---|
| 31 | *
|
---|
| 32 | * @author Alexander Deicke
|
---|
| 33 | */
|
---|
| 34 | public class UsabilityMetricsRuleset implements UsabilityRuleset {
|
---|
| 35 |
|
---|
| 36 | private List<UsabilityRule> metrics;
|
---|
[1217] | 37 |
|
---|
[1138] | 38 | /**
|
---|
| 39 | * <p>
|
---|
[1217] | 40 | * Constructor. Creates new {@code UsabilityMetricsRuleset} for a given task model.
|
---|
[1138] | 41 | * </p>
|
---|
[1217] | 42 | *
|
---|
[1138] | 43 | */
|
---|
[1319] | 44 | public UsabilityMetricsRuleset(ITaskModel taskModel) {
|
---|
[1138] | 45 | this.metrics = Lists.newArrayList();
|
---|
[1152] | 46 | metrics.add(new NoLetterOrDigitRatioMetric(taskModel));
|
---|
| 47 | metrics.add(new TextInputEntryRepetitionsMetric(taskModel));
|
---|
| 48 | metrics.add(new TextInputRatioMetric(taskModel));
|
---|
[1138] | 49 | }
|
---|
| 50 |
|
---|
[1217] | 51 | /*
|
---|
| 52 | * (non-Javadoc)
|
---|
| 53 | *
|
---|
[1138] | 54 | * @see de.ugoe.cs.autoquest.usability.UsabilityRuleset#evaluationRules()
|
---|
| 55 | */
|
---|
| 56 | @Override
|
---|
| 57 | public List<UsabilityRule> evaluationRules() {
|
---|
| 58 | return this.metrics;
|
---|
| 59 | }
|
---|
| 60 |
|
---|
| 61 | }
|
---|