Changeset 1040 for trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/evaluation/rule/evaluator/RuleEvaluator.java
- Timestamp:
- 01/16/13 17:51:51 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/evaluation/rule/evaluator/RuleEvaluator.java
r1035 r1040 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. 1 14 2 15 package de.ugoe.cs.autoquest.usability.evaluation.rule.evaluator; … … 17 30 import de.ugoe.cs.autoquest.usability.tasktree.filter.TaskTreeNodeFilter; 18 31 32 /** 33 * <p> 34 * TODO comment 35 * </p> 36 * 37 * @author Alexander Deicke 38 */ 19 39 public abstract class RuleEvaluator { 20 40 … … 38 58 39 59 @SuppressWarnings("rawtypes") 40 protected FilterStatistic cacheAndReturnNodes(ITaskTree taskTree, TaskTreeNodeFilter nodeFilter) { 60 protected FilterStatistic cacheAndReturnNodes(ITaskTree taskTree, TaskTreeNodeFilter nodeFilter) 61 { 41 62 FilterStatistic textInputEvents = extractNodesFromTaskTree(taskTree); 42 63 FilterStatisticCache.instance().addFilterStatistic(nodeFilter, textInputEvents); … … 52 73 determineSeverityLevel(evaluationMetric); 53 74 if (severityLevel.isPresent()) { 54 ruleEvaluationResult = 55 Optional.of(createRuleEvaluationResult(severityLevel.get())); 75 ruleEvaluationResult = Optional.of(createRuleEvaluationResult(severityLevel.get())); 56 76 } 57 77 return ruleEvaluationResult; … … 59 79 60 80 protected abstract float calculateEvaluationMetric(); 61 81 62 82 protected void storeEvaluationMetricForDefectDescription(String key, String value) { 63 83 defectDescriptionMessageParameterValues.put(key, value); … … 66 86 protected abstract Optional<UsabilityDefectSeverityLevel> determineSeverityLevel(float evaluationMetric); 67 87 68 public UsabilityDefect createRuleEvaluationResult(UsabilityDefectSeverityLevel severityLevelOfDefect) { 88 public UsabilityDefect createRuleEvaluationResult(UsabilityDefectSeverityLevel severityLevelOfDefect) 89 { 69 90 return new UsabilityDefectFactory(UsabilityDefectXmlDescriptionResolver.instance()) 70 .createUsabilityGuidlineRecommendation(severityLevelOfDefect, 71 evaluatedUsabilityRule, 91 .createUsabilityGuidlineRecommendation(severityLevelOfDefect, evaluatedUsabilityRule, 72 92 defectDescriptionMessageParameterValues); 73 93 }
Note: See TracChangeset
for help on using the changeset viewer.