Ignore:
Timestamp:
04/08/13 16:50:21 (12 years ago)
Author:
pharms
Message:
  • complete refactoring of task tree model with a separation of task models and task instances
Location:
trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability
Files:
24 edited
4 moved

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/CMDperformUsabilityEvaluation.java

    r1138 r1152  
    2020 
    2121import de.ugoe.cs.autoquest.CommandHelpers; 
    22 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 
     22import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    2323import de.ugoe.cs.autoquest.usability.rules.EmptyRuleset; 
    2424import de.ugoe.cs.autoquest.usability.rules.UsabilityResult; 
     
    5050    public void run(List<Object> parameters) { 
    5151        String nameOfTaskTree = getTaskTreeParameter(parameters); 
    52         Optional<ITaskTree> taskTree = getTaskTreeFromDataContainer(nameOfTaskTree); 
    53         if(taskTree.isPresent()) { 
     52        Optional<ITaskModel> taskModel = getTaskModelFromDataContainer(nameOfTaskTree); 
     53        if (taskModel.isPresent()) { 
    5454            UsabilityRuleset ruleset = getUsabilityRuleset(); 
    55             UsabilityResult result = UsabilityEvaluator.evaluate(taskTree.get()).using(ruleset); 
     55            UsabilityResult result = UsabilityEvaluator.evaluate(taskModel.get()).using(ruleset); 
    5656            String evaluationResultParameterName = getEvaluationResultParameter(parameters); 
    5757            storeUsabilityResultInDataContainer(evaluationResultParameterName, result); 
     
    9999     * @return 
    100100     */ 
    101     private Optional<ITaskTree> getTaskTreeFromDataContainer(String nameOfTaskTree) { 
     101    private Optional<ITaskModel> getTaskModelFromDataContainer(String nameOfTaskTree) { 
    102102        Object dataObject = GlobalDataContainer.getInstance().getData(nameOfTaskTree); 
    103103        if(dataObject != null) { 
    104             if(dataObject instanceof ITaskTree) { 
    105                 ITaskTree taskTree = (ITaskTree) dataObject; 
     104            if(dataObject instanceof ITaskModel) { 
     105                ITaskModel taskTree = (ITaskModel) dataObject; 
    106106                return Optional.of(taskTree); 
    107107            } else { 
    108                 CommandHelpers.objectNotType(nameOfTaskTree, "ITaskTree"); 
     108                CommandHelpers.objectNotType(nameOfTaskTree, "ITaskModel"); 
    109109                return Optional.absent(); 
    110110            } 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/UsabilityEvaluator.java

    r1150 r1152  
    1919import com.google.common.base.Optional; 
    2020 
    21 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 
     21import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    2222import de.ugoe.cs.autoquest.usability.result.UsabilityDefect; 
    2323import de.ugoe.cs.autoquest.usability.rules.UsabilityResult; 
     
    3535public class UsabilityEvaluator { 
    3636     
    37     private ITaskTree taskTree; 
     37    private ITaskModel taskModel; 
    3838 
    39     private UsabilityEvaluator(ITaskTree taskTree) { 
    40         this.taskTree = taskTree; 
     39    private UsabilityEvaluator(ITaskModel taskTree) { 
     40        this.taskModel = taskTree; 
    4141    } 
    4242     
     
    4949     * @return 
    5050     */ 
    51     public static UsabilityEvaluator evaluate(ITaskTree taskTree) { 
     51    public static UsabilityEvaluator evaluate(ITaskModel taskTree) { 
    5252        return new UsabilityEvaluator(taskTree); 
    5353    } 
     
    6262     */ 
    6363    public UsabilityResult using(UsabilityRuleset ruleset) { 
    64         Console.traceln(Level.INFO, "evaluating usability of task tree " + this.taskTree); 
     64        Console.traceln(Level.INFO, "evaluating usability of task tree " + this.taskModel); 
    6565        EvaluationMethodCaller evaluationMethodCaller = new EvaluationMethodCaller(); 
    6666        UsabilityResult result = new UsabilityResult(); 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityMetricsRuleset.java

    r1138 r1152  
    1919import com.google.common.collect.Lists; 
    2020 
    21 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 
     21import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    2222import de.ugoe.cs.autoquest.usability.rules.metrics.NoLetterOrDigitRatioMetric; 
    2323import de.ugoe.cs.autoquest.usability.rules.metrics.TextInputEntryRepetitionsMetric; 
     
    4141     * 
    4242     */ 
    43     private UsabilityMetricsRuleset(ITaskTree taskTree) { 
     43    private UsabilityMetricsRuleset(ITaskModel taskModel) { 
    4444        this.metrics = Lists.newArrayList(); 
    45         metrics.add(new NoLetterOrDigitRatioMetric(taskTree)); 
    46         metrics.add(new TextInputEntryRepetitionsMetric(taskTree)); 
    47         metrics.add(new TextInputRatioMetric(taskTree)); 
     45        metrics.add(new NoLetterOrDigitRatioMetric(taskModel)); 
     46        metrics.add(new TextInputEntryRepetitionsMetric(taskModel)); 
     47        metrics.add(new TextInputRatioMetric(taskModel)); 
    4848    } 
    4949 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityRule.java

    r1150 r1152  
    1717import com.google.common.base.Optional; 
    1818 
    19 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 
     19import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    2020import de.ugoe.cs.autoquest.usability.EvaluationMethodCaller; 
    2121import de.ugoe.cs.autoquest.usability.result.UsabilityDefect; 
     
    3030public abstract class UsabilityRule { 
    3131     
    32     protected final ITaskTree taskTree; 
     32    protected final ITaskModel taskModel; 
    3333     
    3434    protected String name; 
     
    4242     * 
    4343     */ 
    44     public UsabilityRule(ITaskTree taskTree) { 
    45         this.taskTree = taskTree; 
     44    public UsabilityRule(ITaskModel taskModel) { 
     45        this.taskModel = taskModel; 
    4646    } 
    4747     
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/NoLetterOrDigitRatioMetric.java

    r1150 r1152  
    2525import com.google.common.collect.Multiset; 
    2626 
    27 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 
    28 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 
     27import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
     28import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    2929import de.ugoe.cs.autoquest.usability.EvaluationMethodCaller; 
    3030import de.ugoe.cs.autoquest.usability.result.DefectDescriptionResolver; 
     
    3434import de.ugoe.cs.autoquest.usability.tasktree.FilterResult; 
    3535import de.ugoe.cs.autoquest.usability.tasktree.IterativeDFSFilterStrategy; 
    36 import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTreeFilter; 
     36import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskModelFilter; 
    3737 
    3838/** 
     
    5252     * @param taskTree 
    5353     */ 
    54     public NoLetterOrDigitRatioMetric(ITaskTree taskTree) { 
    55         super(taskTree); 
     54    public NoLetterOrDigitRatioMetric(ITaskModel taskModel) { 
     55        super(taskModel); 
    5656        this.name = "NoLetterOrDigitRatio"; 
    5757        this.defect = new DefectDescriptionResolver().descriptionFor(this.getClass().getSimpleName()); 
     
    6464    public Optional<UsabilityDefect> calculate() { 
    6565        FilterResult textInputEvents = extractNodesFromTaskTree(); 
    66         float evaluationMetric = calculateEvaluationMetric(textInputEvents.nodesMatchedFilter()); 
     66        float evaluationMetric = calculateEvaluationMetric(textInputEvents.tasksMatchedFilter()); 
    6767        return this.defect.isPresent(evaluationMetric); 
    6868    } 
    6969     
    7070    private FilterResult extractNodesFromTaskTree() { 
    71         return new TaskTreeFilter(new IterativeDFSFilterStrategy()).filterByEventType(TEXT_INPUT) 
    72             .from(this.taskTree); 
     71        return new TaskModelFilter(new IterativeDFSFilterStrategy()).filterByEventType(TEXT_INPUT) 
     72            .from(this.taskModel); 
    7373    } 
    7474     
    75     private float calculateEvaluationMetric(List<ITaskTreeNode> textInputEvents) { 
     75    private float calculateEvaluationMetric(List<ITask> textInputEvents) { 
    7676        Multiset<String> enteredTextFragments = 
    7777            aggregateEnteredTextFromTextInputs(textInputEvents); 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/TextInputEntryRepetitionsMetric.java

    r1150 r1152  
    2525import com.google.common.collect.Multisets; 
    2626 
    27 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 
    28 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 
     27import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
     28import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    2929import de.ugoe.cs.autoquest.usability.EvaluationMethodCaller; 
    3030import de.ugoe.cs.autoquest.usability.result.DefectDescriptionResolver; 
     
    3434import de.ugoe.cs.autoquest.usability.tasktree.FilterResult; 
    3535import de.ugoe.cs.autoquest.usability.tasktree.IterativeDFSFilterStrategy; 
    36 import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTreeFilter; 
     36import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskModelFilter; 
    3737 
    3838/** 
     
    5252     * @param taskTree 
    5353     */ 
    54     public TextInputEntryRepetitionsMetric(ITaskTree taskTree) { 
    55         super(taskTree); 
     54    public TextInputEntryRepetitionsMetric(ITaskModel taskModel) { 
     55        super(taskModel); 
    5656        this.name = "TextInputEntryRepetitions"; 
    5757        this.defect = new DefectDescriptionResolver().descriptionFor(this.getClass().getSimpleName()); 
     
    6464    public Optional<UsabilityDefect> calculate() { 
    6565        FilterResult textInputEvents = extractNodesFromTaskTree(); 
    66         float evaluationMetric = calculateEvaluationMetric(textInputEvents.nodesMatchedFilter()); 
     66        float evaluationMetric = calculateEvaluationMetric(textInputEvents.tasksMatchedFilter()); 
    6767        return this.defect.isPresent(evaluationMetric); 
    6868    } 
    6969     
    7070    private FilterResult extractNodesFromTaskTree() { 
    71         return new TaskTreeFilter(new IterativeDFSFilterStrategy()).filterByEventType(TEXT_INPUT) 
    72             .from(this.taskTree); 
     71        return new TaskModelFilter(new IterativeDFSFilterStrategy()).filterByEventType(TEXT_INPUT) 
     72            .from(this.taskModel); 
    7373    } 
    7474     
    75     private float calculateEvaluationMetric(List<ITaskTreeNode> textInputEvents) { 
     75    private float calculateEvaluationMetric(List<ITask> textInputEvents) { 
    7676        Multiset<String> enteredTextFragments = 
    7777            aggregateEnteredTextFromTextInputs(textInputEvents); 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/TextInputRatioMetric.java

    r1150 r1152  
    2323import com.google.common.collect.Iterables; 
    2424 
    25 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 
    26 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 
     25import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask; 
     26import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
     27import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    2728import de.ugoe.cs.autoquest.usability.EvaluationMethodCaller; 
    2829import de.ugoe.cs.autoquest.usability.result.DefectDescriptionResolver; 
     
    3233import de.ugoe.cs.autoquest.usability.tasktree.FilterResult; 
    3334import de.ugoe.cs.autoquest.usability.tasktree.IterativeDFSFilterStrategy; 
    34 import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTreeFilter; 
     35import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskModelFilter; 
    3536 
    3637/** 
     
    5051     * @param taskTree 
    5152     */ 
    52     public TextInputRatioMetric(ITaskTree taskTree) { 
    53         super(taskTree); 
     53    public TextInputRatioMetric(ITaskModel taskModel) { 
     54        super(taskModel); 
    5455        this.name = "TextInputRatio"; 
    5556        this.defect = new DefectDescriptionResolver().descriptionFor(this.getClass().getSimpleName()); 
     
    6263    public Optional<UsabilityDefect> calculate() { 
    6364        FilterResult textInputEvents = extractNodesFromTaskTree(); 
    64         float evaluationMetric = calculateEvaluationMetric(textInputEvents.nodesMatchedFilter(), textInputEvents.nodesNotMatchedFilter()); 
     65        float evaluationMetric = calculateEvaluationMetric(textInputEvents.tasksMatchedFilter(), textInputEvents.tasksNotMatchedFilter()); 
    6566        return this.defect.isPresent(evaluationMetric); 
    6667    } 
    6768     
    6869    private FilterResult extractNodesFromTaskTree() { 
    69         return new TaskTreeFilter(new IterativeDFSFilterStrategy()).filterByEventType(TEXT_INPUT) 
    70             .from(this.taskTree); 
     70        return new TaskModelFilter(new IterativeDFSFilterStrategy()).filterByEventType(TEXT_INPUT) 
     71            .from(this.taskModel); 
    7172    } 
    7273     
    73     private float calculateEvaluationMetric(List<ITaskTreeNode> textInputEvents, List<ITaskTreeNode> nonTextInputEvents) { 
     74    private float calculateEvaluationMetric(List<ITask> textInputEvents, List<ITask> nonTextInputEvents) { 
    7475        float numberOfTextInputEvents = textInputEvents.size(); 
    75         float numberOfNonTextInputEvents = nrOfEventNodesNotMatchedFilter(nonTextInputEvents); 
     76        float numberOfNonTextInputEvents = nrOfEventTasksNotMatchedFilter(nonTextInputEvents); 
    7677        return numberOfTextInputEvents / (numberOfTextInputEvents + numberOfNonTextInputEvents); 
    7778    } 
    7879 
    79     private int nrOfEventNodesNotMatchedFilter(List<ITaskTreeNode> nonTextInputEvents) { 
     80    private int nrOfEventTasksNotMatchedFilter(List<ITask> nonTextInputEvents) { 
    8081        return Iterables.size(Iterables.filter(nonTextInputEvents, 
    81                                                new Predicate<ITaskTreeNode>() { 
     82                                               new Predicate<ITask>() { 
    8283 
    8384                                                   @Override 
    84                                                    public boolean apply(ITaskTreeNode node) { 
    85                                                        return (node.getChildren() == null) || 
    86                                                            (node.getChildren().size() == 0); 
     85                                                   public boolean apply(ITask task) { 
     86                                                       return task instanceof IEventTask; 
    8787                                                   } 
    8888                                               })); 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/LongFormUsageDefect.java

    r1150 r1152  
    1818import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.SCROLL; 
    1919import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT; 
    20 import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTreeNodeTypeFilter.ITERATION; 
    21 import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTreeNodeTypeFilter.SEQUENCE; 
     20import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.ITERATION; 
     21import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SEQUENCE; 
    2222 
    2323import com.google.common.base.Optional; 
    2424 
    25 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 
     25import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    2626import de.ugoe.cs.autoquest.usability.EvaluationMethodCaller; 
    2727import de.ugoe.cs.autoquest.usability.result.DefectDescriptionResolver; 
     
    4848     * @param taskTree 
    4949     */ 
    50     public LongFormUsageDefect(ITaskTree taskTree) { 
    51         super(taskTree); 
     50    public LongFormUsageDefect(ITaskModel taskModel) { 
     51        super(taskModel); 
    5252        this.name = "LongFormUsagePattern"; 
    5353        this.defect = new DefectDescriptionResolver().descriptionFor(this.getClass().getSimpleName()); 
     
    7373    public Optional<UsabilityDefect> check() { 
    7474        Optional<UsabilityDefect> present = Optional.absent(); 
    75         if(this.longFormUsagePattern.containedIn(taskTree)) { 
     75        if(this.longFormUsagePattern.containedIn(taskModel)) { 
    7676            present = Optional.of(this.defect); 
    7777        } 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/UsagePattern.java

    r1150 r1152  
    2222import com.google.common.collect.Iterables; 
    2323 
    24 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 
    25 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 
     24import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
     25import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    2626import de.ugoe.cs.autoquest.usability.tasktree.IterativeDFSFilterStrategy; 
    27 import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTreeFilter; 
    28 import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTreeNodeTypeFilter; 
     27import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskModelFilter; 
     28import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter; 
    2929 
    3030/** 
     
    3737public class UsagePattern { 
    3838     
    39     private TaskTreeFilter taskTreeFilter = new TaskTreeFilter(new IterativeDFSFilterStrategy()); 
     39    private TaskModelFilter taskTreeFilter = new TaskModelFilter(new IterativeDFSFilterStrategy()); 
    4040     
    41     private TaskTreeNodeTypeFilter concernedNode; 
     41    private TaskTypeFilter concernedTask; 
    4242 
    4343    private List<UsagePatternVisitor> patternVisitors; 
     
    5353     * @param eventType 
    5454     */ 
    55     public UsagePattern(TaskTreeNodeTypeFilter concernedNode, 
     55    public UsagePattern(TaskTypeFilter concernedNode, 
    5656                        UsagePatternVisitor... patternVisitor) 
    5757    { 
    5858        this.patternVisitors = Arrays.asList(patternVisitor); 
    59         this.concernedNode = concernedNode; 
     59        this.concernedTask = concernedNode; 
    6060    } 
    6161 
    62     public boolean containedIn(ITaskTree taskTree) { 
    63         List<ITaskTreeNode> allConcernedNodes = filterAllConcernedNodeFrom(taskTree); 
    64         for(ITaskTreeNode concernedNode : allConcernedNodes) { 
    65             applyAllVisitors(concernedNode); 
     62    public boolean containedIn(ITaskModel taskModel) { 
     63        List<ITask> allConcernedTasks = filterAllConcernedTasksFrom(taskModel); 
     64        for(ITask concernedTask : allConcernedTasks) { 
     65            applyAllVisitors(concernedTask); 
    6666            if(allVisitorsArePresent()) { 
    6767                this.present = true; 
     
    7575    } 
    7676 
    77     private void applyAllVisitors(ITaskTreeNode concernedNode) { 
     77    private void applyAllVisitors(ITask concernedTask) { 
    7878        Optional<UsagePatternVisitor> previousVisitor = Optional.absent(); 
    7979        for(UsagePatternVisitor visitor : patternVisitors) { 
    8080            if(appliedOnSelectionNode(previousVisitor)) { 
    81                 for(ITaskTreeNode selectionNode : previousVisitor.get().getRetainedSelectionNodes()) { 
    82                     selectionNode.accept(visitor); 
     81                for(ITask selection : previousVisitor.get().getRetainedSelectionNodes()) { 
     82                    selection.accept(visitor); 
    8383                } 
    8484            } else { 
    8585                previousVisitor = Optional.of(visitor); 
    86                 concernedNode.accept(visitor); 
     86                concernedTask.accept(visitor); 
    8787            } 
    8888        } 
     
    101101     * @return 
    102102     */ 
    103     private List<ITaskTreeNode> filterAllConcernedNodeFrom(ITaskTree taskTree) { 
    104         return this.taskTreeFilter.filterByNodeType(this.concernedNode).from(taskTree).nodesMatchedFilter(); 
     103    private List<ITask> filterAllConcernedTasksFrom(ITaskModel taskModel) { 
     104        return this.taskTreeFilter.filterByNodeType(this.concernedTask).from(taskModel).tasksMatchedFilter(); 
    105105    } 
    106106     
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/UsagePatternBuilder.java

    r1150 r1152  
    2222import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.StartsWithPatternVisitor; 
    2323import de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter; 
    24 import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTreeNodeTypeFilter; 
     24import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter; 
    2525 
    2626/** 
     
    3333public class UsagePatternBuilder { 
    3434 
    35     protected TaskTreeNodeTypeFilter concernedNode; 
     35    protected TaskTypeFilter concernedNode; 
    3636     
    3737    protected EventTypeFilter startsWithEvent; 
     
    5555     * @return 
    5656     */ 
    57     public SpecifyPatternStep concernedNode(TaskTreeNodeTypeFilter concernedNode) { 
     57    public SpecifyPatternStep concernedNode(TaskTypeFilter concernedNode) { 
    5858        this.concernedNode = concernedNode; 
    5959        return new SpecifyPatternStep(); 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/UsagePatternVisitor.java

    r1150 r1152  
    2626import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask; 
    2727import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection; 
    28 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 
    29 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 
    30 import de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor; 
     28import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
     29import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    3130import de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter; 
    3231import de.ugoe.cs.autoquest.usability.util.PatternsVisitorUtil; 
     
    4746    protected boolean present = false; 
    4847     
    49     protected List<ITaskTreeNode> retainedChildrenNodesFromSelectionNodes = Lists.newArrayList(); 
     48    protected List<ITask> retainedChildrenTasksFromSelections = Lists.newArrayList(); 
    5049     
    5150    /* (non-Javadoc) 
     
    8584            this.present = patternIsPresent(); 
    8685        } else { 
    87             ITaskTree taskTree = PatternsVisitorUtil.createTaskTreeFromNode(selection); 
    88             this.present = containedPattern.containedIn(taskTree);   
     86            ITaskModel taskModel = PatternsVisitorUtil.createTaskModelFromNode(selection); 
     87            this.present = containedPattern.containedIn(taskModel);   
    8988        } 
    9089    } 
    9190 
    92     protected void retainNodesWherePatternIsPresent(List<ITaskTreeNode> children) { 
    93         for(ITaskTreeNode node : children) { 
     91    protected void retainNodesWherePatternIsPresent(List<ITask> children) { 
     92        for(ITask task : children) { 
    9493            this.present = false; 
    95             node.accept(this); 
     94            task.accept(this); 
    9695            if(this.present) { 
    97                 this.retainedChildrenNodesFromSelectionNodes.add(node); 
     96                this.retainedChildrenTasksFromSelections.add(task); 
    9897            } 
    9998        } 
     
    101100     
    102101    private boolean patternIsPresent() { 
    103         return !this.retainedChildrenNodesFromSelectionNodes.isEmpty(); 
     102        return !this.retainedChildrenTasksFromSelections.isEmpty(); 
    104103    } 
    105104     
     
    122121     */ 
    123122    public void reset() { 
    124         this.retainedChildrenNodesFromSelectionNodes.clear(); 
     123        this.retainedChildrenTasksFromSelections.clear(); 
    125124        this.present = false; 
    126125    } 
     
    144143     * @return 
    145144     */ 
    146     public List<ITaskTreeNode> getRetainedSelectionNodes() { 
    147         return this.retainedChildrenNodesFromSelectionNodes; 
     145    public List<ITask> getRetainedSelectionNodes() { 
     146        return this.retainedChildrenTasksFromSelections; 
    148147    } 
    149148     
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/ContainsEventVisitor.java

    r1150 r1152  
    1919import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration; 
    2020import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence; 
    21 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 
     21import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
    2222import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternVisitor; 
    2323import de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter; 
     
    4747     */ 
    4848    public void visit(IIteration iteration) { 
    49         checkAllChildrenAndReturnIfPatternIsPresent(iteration.getChildren()); 
     49        checkTaskAndReturnIfPatternIsPresent(iteration.getMarkedTask()); 
    5050    } 
    5151 
     
    5757    } 
    5858     
    59     private void checkAllChildrenAndReturnIfPatternIsPresent(List<ITaskTreeNode> children) { 
    60         for(ITaskTreeNode node : children) { 
    61             node.accept(this); 
    62             if(this.present) { 
     59    private void checkAllChildrenAndReturnIfPatternIsPresent(List<ITask> children) { 
     60        for (ITask task : children) { 
     61            if (checkTaskAndReturnIfPatternIsPresent(task)) { 
    6362                break; 
    6463            } 
     
    6665    } 
    6766 
     67    /** 
     68     * 
     69     */ 
     70    private boolean checkTaskAndReturnIfPatternIsPresent(ITask task) { 
     71        task.accept(this); 
     72        return this.present; 
     73    } 
    6874} 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/ContainsPatternVisitor.java

    r1150 r1152  
    1515package de.ugoe.cs.autoquest.usability.rules.patterns.visitors; 
    1616 
     17import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask; 
    1718import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration; 
    1819import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence; 
    19 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 
    20 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 
     20import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
     21import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    2122import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    2223import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternVisitor; 
     
    4748     */ 
    4849    public void visit(IIteration iteration) { 
    49         checkAllChildrenAndReturnIfPatternIsPresent(iteration); 
     50        checkTaskAndReturnIfPatternIsPresent(iteration.getMarkedTask()); 
    5051 
    5152    } 
     
    5960    } 
    6061     
    61     private void checkAllChildrenAndReturnIfPatternIsPresent(ITaskTreeNode node) { 
    62         for(ITaskTreeNode child : node.getChildren()) { 
    63             ITaskTree taskTree; 
    64             if(isEvent(child)) { 
    65                 taskTree = PatternsVisitorUtil.createTaskTreeFromNode(node); 
    66             } else { 
    67                 taskTree = PatternsVisitorUtil.createTaskTreeFromNode(child); 
    68             } 
    69             this.present = containedPattern.containedIn(taskTree);  
    70             if(this.present) { 
     62    private void checkAllChildrenAndReturnIfPatternIsPresent(ISequence sequence) { 
     63        for (ITask child : sequence.getChildren()) { 
     64            if(checkTaskAndReturnIfPatternIsPresent(child)) { 
    7165                break; 
    7266            } 
     
    7468    } 
    7569     
    76     private boolean isEvent(ITaskTreeNode firstNode) { 
    77         return firstNode.getChildren().isEmpty(); 
     70    private boolean checkTaskAndReturnIfPatternIsPresent(ITask task) { 
     71        ITaskModel taskModel = PatternsVisitorUtil.createTaskModelFromNode(task); 
     72        this.present = containedPattern.containedIn(taskModel);  
     73    } 
     74     
     75    private boolean isEvent(ITask task) { 
     76        return task instanceof IEventTask; 
    7877    } 
    7978 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/EndsWithEventVisitor.java

    r1150 r1152  
    4545     */ 
    4646    public void visit(IIteration iteration) { 
    47         PatternsVisitorUtil.lastNodeOf(iteration.getChildren()).accept(this); 
     47        iteration.getMarkedTask().accept(this); 
    4848    } 
    4949 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/EndsWithPatternVisitor.java

    r1150 r1152  
    1515package de.ugoe.cs.autoquest.usability.rules.patterns.visitors; 
    1616 
     17import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask; 
    1718import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration; 
    1819import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence; 
    19 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 
    20 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 
     20import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
     21import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    2122import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    2223import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternVisitor; 
     
    4748     */ 
    4849    public void visit(IIteration iteration) { 
    49         ITaskTree taskTree = PatternsVisitorUtil.createTaskTreeFromNode(iteration); 
    50         this.present = containedPattern.containedIn(taskTree);  
     50        ITaskModel taskModel = PatternsVisitorUtil.createTaskModelFromNode(iteration); 
     51        this.present = containedPattern.containedIn(taskModel);  
    5152 
    5253    } 
     
    5657     */ 
    5758    public void visit(ISequence sequence) { 
    58         ITaskTreeNode lastNode = PatternsVisitorUtil.lastNodeOf(sequence.getChildren()); 
    59         ITaskTree taskTree; 
    60         if(isEvent(lastNode)) { 
    61             taskTree = PatternsVisitorUtil.createTaskTreeFromNode(sequence); 
     59        ITask lastTask = PatternsVisitorUtil.lastNodeOf(sequence.getChildren()); 
     60        ITaskModel taskModel; 
     61        if(isEvent(lastTask)) { 
     62            taskModel = PatternsVisitorUtil.createTaskModelFromNode(sequence); 
    6263        } else { 
    63             taskTree = PatternsVisitorUtil.createTaskTreeFromNode(lastNode); 
     64            taskModel = PatternsVisitorUtil.createTaskModelFromNode(lastTask); 
    6465        } 
    65         this.present = containedPattern.containedIn(taskTree);       
     66        this.present = containedPattern.containedIn(taskModel);       
    6667    } 
    6768 
    68     private boolean isEvent(ITaskTreeNode firstNode) { 
    69         return firstNode.getChildren().isEmpty(); 
     69    private boolean isEvent(ITask lastTask) { 
     70        return lastTask instanceof IEventTask; 
    7071    } 
    7172 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/StartsWithEventVisitor.java

    r1150 r1152  
    4545     */ 
    4646    public void visit(IIteration iteration) { 
    47         PatternsVisitorUtil.firstNodeOf(iteration.getChildren()).accept(this); 
     47        iteration.getMarkedTask().accept(this); 
    4848    } 
    4949     
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/StartsWithPatternVisitor.java

    r1150 r1152  
    1515package de.ugoe.cs.autoquest.usability.rules.patterns.visitors; 
    1616 
     17import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask; 
    1718import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration; 
    1819import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence; 
    19 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 
    20 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 
     20import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
     21import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    2122import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    2223import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternVisitor; 
     
    4748     */ 
    4849    public void visit(IIteration iteration) { 
    49         ITaskTree taskTree = PatternsVisitorUtil.createTaskTreeFromNode(iteration); 
    50         this.present = containedPattern.containedIn(taskTree);   
     50        ITaskModel taskModel = PatternsVisitorUtil.createTaskModelFromNode(iteration); 
     51        this.present = containedPattern.containedIn(taskModel);   
    5152    } 
    5253 
     
    5556     */ 
    5657    public void visit(ISequence sequence) { 
    57         ITaskTreeNode firstNode = PatternsVisitorUtil.firstNodeOf(sequence.getChildren()); 
    58         ITaskTree taskTree; 
    59         if(isEvent(firstNode)) { 
    60             taskTree = PatternsVisitorUtil.createTaskTreeFromNode(sequence); 
     58        ITask firstTask = PatternsVisitorUtil.firstNodeOf(sequence.getChildren()); 
     59        ITaskModel taskModel; 
     60        if(isEvent(firstTask)) { 
     61            taskModel = PatternsVisitorUtil.createTaskModelFromNode(sequence); 
    6162        } else { 
    62             taskTree = PatternsVisitorUtil.createTaskTreeFromNode(firstNode); 
     63            taskModel = PatternsVisitorUtil.createTaskModelFromNode(firstTask); 
    6364        } 
    64         this.present = containedPattern.containedIn(taskTree);       
     65        this.present = containedPattern.containedIn(taskModel);       
    6566    } 
    6667 
    67     private boolean isEvent(ITaskTreeNode firstNode) { 
    68         return firstNode.getChildren().isEmpty(); 
     68    private boolean isEvent(ITask firstTask) { 
     69        return firstTask instanceof IEventTask; 
    6970    } 
    7071 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/FilterResult.java

    r1135 r1152  
    2020import com.google.common.collect.Lists; 
    2121 
    22 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 
     22import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
    2323 
    2424/** 
     
    3434    private final Predicate filterPredicate; 
    3535 
    36     private List<ITaskTreeNode> filteredNodes = Lists.newArrayList(); 
     36    private List<ITask> filteredTasks = Lists.newArrayList(); 
    3737 
    38     private List<ITaskTreeNode> nodesNotMatchedFilter = Lists.newArrayList(); 
     38    private List<ITask> tasksNotMatchedFilter = Lists.newArrayList(); 
    3939 
    4040    @SuppressWarnings("rawtypes") 
     
    4444 
    4545    @SuppressWarnings("unchecked") 
    46     public void addNode(ITaskTreeNode node) { 
    47         if (filterPredicate.apply(node)) { 
    48             filteredNodes.add(node); 
     46    public void addTask(ITask task) { 
     47        if (filterPredicate.apply(task)) { 
     48            filteredTasks.add(task); 
    4949        } 
    5050        else { 
    51             nodesNotMatchedFilter.add(node); 
     51            tasksNotMatchedFilter.add(task); 
    5252        } 
    5353    } 
    5454 
    55     public List<ITaskTreeNode> nodesMatchedFilter() { 
    56         return this.filteredNodes; 
     55    public List<ITask> tasksMatchedFilter() { 
     56        return this.filteredTasks; 
    5757    } 
    5858 
    59     public int nrOfNodesMatchedFilter() { 
    60         return this.filteredNodes.size(); 
     59    public int nrOfTasksMatchedFilter() { 
     60        return this.filteredTasks.size(); 
    6161    } 
    6262 
    63     public List<ITaskTreeNode> nodesNotMatchedFilter() { 
    64         return this.nodesNotMatchedFilter; 
     63    public List<ITask> tasksNotMatchedFilter() { 
     64        return this.tasksNotMatchedFilter; 
    6565    } 
    6666 
    67     public int nrOfNodesNotMatchedFilter() { 
    68         return this.nodesNotMatchedFilter.size(); 
     67    public int nrOfTasksNotMatchedFilter() { 
     68        return this.tasksNotMatchedFilter.size(); 
    6969    } 
    7070 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/IterativeDFSFilterStrategy.java

    r1135 r1152  
    2222import de.ugoe.cs.autoquest.eventcore.IEventTarget; 
    2323import de.ugoe.cs.autoquest.eventcore.IEventType; 
    24 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 
    25 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 
     24import de.ugoe.cs.autoquest.tasktrees.treeifc.IMarkingTemporalRelationship; 
     25import de.ugoe.cs.autoquest.tasktrees.treeifc.IStructuringTemporalRelationship; 
     26import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
     27import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    2628import de.ugoe.cs.autoquest.usability.tasktree.filters.EventTargetFilter; 
    2729import de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter; 
    28 import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTreeNodeTypeFilter; 
     30import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter; 
    2931 
    3032/** 
     
    3537 * @author Alexander Deicke 
    3638 */ 
    37 public class IterativeDFSFilterStrategy implements TaskTreeFilterStrategy { 
     39public class IterativeDFSFilterStrategy implements TaskModelFilterStrategy { 
    3840 
    3941    private FilterResult filterStatistic; 
     
    4143    @SuppressWarnings("unchecked") 
    4244    @Override 
    43     public FilterResult filter(ITaskTree taskTree, EventTargetFilter eventTarget) { 
     45    public FilterResult filter(ITaskModel taskModel, EventTargetFilter eventTarget) { 
    4446        Predicate<IEventTarget> filterPredicate = eventTarget.filterPredicate(); 
    4547        this.filterStatistic = new FilterResult(filterPredicate); 
    46         traverse(taskTree); 
     48        traverse(taskModel); 
    4749        return this.filterStatistic; 
    4850    } 
     
    5052    @SuppressWarnings("unchecked") 
    5153    @Override 
    52     public FilterResult filter(ITaskTree taskTree, EventTypeFilter eventType) { 
     54    public FilterResult filter(ITaskModel taskModel, EventTypeFilter eventType) { 
    5355        Predicate<IEventType> filterPredicate = eventType.filterPredicate(); 
    5456        this.filterStatistic = new FilterResult(filterPredicate); 
    55         traverse(taskTree); 
     57        traverse(taskModel); 
    5658        return this.filterStatistic; 
    5759    } 
     
    5961    @SuppressWarnings("unchecked") 
    6062    @Override 
    61     public FilterResult filter(ITaskTree taskTree, TaskTreeNodeTypeFilter nodeType) { 
    62         Predicate<ITaskTreeNode> filterPredicate = nodeType.filterPredicate(); 
     63    public FilterResult filter(ITaskModel taskModel, TaskTypeFilter nodeType) { 
     64        Predicate<ITask> filterPredicate = nodeType.filterPredicate(); 
    6365        this.filterStatistic = new FilterResult(filterPredicate); 
    64         traverse(taskTree); 
     66        traverse(taskModel); 
    6567        return this.filterStatistic; 
    6668    } 
    6769 
    68     private void traverse(ITaskTree taskTree) { 
    69         Queue<ITaskTreeNode> unvisitedNodes = new LinkedList<ITaskTreeNode>(); 
    70         unvisitedNodes.add(taskTree.getRoot()); 
    71         while (stillUnvisitedNodes(unvisitedNodes)) { 
    72             ITaskTreeNode node = unvisitedNodes.poll(); 
    73             processCurrentNode(node); 
    74             processChildrenOfCurrentNode(unvisitedNodes, node); 
     70    private void traverse(ITaskModel taskModel) { 
     71        Queue<ITask> unvisitedTasks = new LinkedList<ITask>(); 
     72        unvisitedTasks.addAll(taskModel.getTasks()); 
     73        while (stillUnvisitedTasks(unvisitedTasks)) { 
     74            ITask task = unvisitedTasks.poll(); 
     75            processCurrentTask(task); 
     76            processChildrenOfCurrentTask(unvisitedTasks, task); 
    7577        } 
    7678    } 
    7779 
    78     private boolean stillUnvisitedNodes(Queue<ITaskTreeNode> unvisitedNodes) { 
    79         return !unvisitedNodes.isEmpty(); 
     80    private boolean stillUnvisitedTasks(Queue<ITask> unvisitedTasks) { 
     81        return !unvisitedTasks.isEmpty(); 
    8082    } 
    8183 
    82     private void processCurrentNode(ITaskTreeNode node) { 
    83         this.filterStatistic.addNode(node); 
     84    private void processCurrentTask(ITask task) { 
     85        this.filterStatistic.addTask(task); 
    8486    } 
    8587 
    86     private void processChildrenOfCurrentNode(Queue<ITaskTreeNode> unvisitedNodes, 
    87                                               ITaskTreeNode node) 
     88    private void processChildrenOfCurrentTask(Queue<ITask> unvisitedTasks, 
     89                                              ITask task) 
    8890    { 
    89         for (ITaskTreeNode child : node.getChildren()) { 
    90             unvisitedNodes.add(child); 
     91        if (task instanceof IStructuringTemporalRelationship) { 
     92            for (ITask child : ((IStructuringTemporalRelationship) task).getChildren()) { 
     93                unvisitedTasks.add(child); 
     94            } 
     95        } 
     96        else if (task instanceof IMarkingTemporalRelationship) { 
     97            unvisitedTasks.add(((IMarkingTemporalRelationship) task).getMarkedTask()); 
    9198        } 
    9299    } 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/TaskModelFilterStrategy.java

    r1150 r1152  
    1515package de.ugoe.cs.autoquest.usability.tasktree; 
    1616 
    17 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 
     17import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    1818import de.ugoe.cs.autoquest.usability.tasktree.filters.EventTargetFilter; 
    1919import de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter; 
    20 import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTreeNodeTypeFilter; 
     20import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter; 
    2121 
    2222/** 
     
    2727 * @author Alexander Deicke 
    2828 */ 
    29 public interface TaskTreeFilterStrategy { 
     29public interface TaskModelFilterStrategy { 
    3030 
    31     public FilterResult filter(ITaskTree taskTree, EventTargetFilter eventTarget); 
     31    public FilterResult filter(ITaskModel taskModel, EventTargetFilter eventTarget); 
    3232 
    33     public FilterResult filter(ITaskTree taskTree, EventTypeFilter eventType); 
     33    public FilterResult filter(ITaskModel taskModel, EventTypeFilter eventType); 
    3434 
    35     public FilterResult filter(ITaskTree taskTree, TaskTreeNodeTypeFilter nodeType); 
     35    public FilterResult filter(ITaskModel taskModel, TaskTypeFilter nodeType); 
    3636 
    3737} 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/EventTargetFilter.java

    r1135 r1152  
    2323import de.ugoe.cs.autoquest.eventcore.guimodel.ITextField; 
    2424import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask; 
    25 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 
     25import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
    2626 
    2727/** 
     
    3232 * @author Alexander Deicke 
    3333 */ 
    34 public enum EventTargetFilter implements TaskTreeNodeFilter<IEventTarget> { 
     34public enum EventTargetFilter implements TaskFilter<IEventTarget> { 
    3535 
    3636    TEXT_FIELD(ITextField.class), 
     
    5454    public Predicate filterPredicate() { 
    5555        Predicate<Object> instanceOfIEventTaskPredicate = Predicates.instanceOf(IEventTask.class); 
    56         Predicate<ITaskTreeNode> nodeHoldsInstanceOfFilterArgument = 
    57             Predicates.compose(Predicates.instanceOf(eventTargetClazz), nodeExtractionFunction()); 
    58         return Predicates.and(instanceOfIEventTaskPredicate, nodeHoldsInstanceOfFilterArgument); 
     56        Predicate<ITask> taskHoldsInstanceOfFilterArgument = 
     57            Predicates.compose(Predicates.instanceOf(eventTargetClazz), taskExtractionFunction()); 
     58        return Predicates.and(instanceOfIEventTaskPredicate, taskHoldsInstanceOfFilterArgument); 
    5959    } 
    6060 
    61     private Function<ITaskTreeNode, IEventTarget> nodeExtractionFunction() { 
    62         return new Function<ITaskTreeNode, IEventTarget>() { 
     61    private Function<ITask, IEventTarget> taskExtractionFunction() { 
     62        return new Function<ITask, IEventTarget>() { 
    6363 
    6464            @Override 
    65             public IEventTarget apply(ITaskTreeNode treeNode) { 
    66                 return ((IEventTask) treeNode).getEventTarget(); 
     65            public IEventTarget apply(ITask task) { 
     66                return ((IEventTask) task).getEventTarget(); 
    6767            } 
    6868        }; 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/EventTypeFilter.java

    r1150 r1152  
    2727import de.ugoe.cs.autoquest.eventcore.gui.TextInput; 
    2828import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask; 
    29 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 
     29import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
    3030 
    3131/** 
     
    3636 * @author Alexander Deicke 
    3737 */ 
    38 public enum EventTypeFilter implements TaskTreeNodeFilter<IEventType> { 
     38public enum EventTypeFilter implements TaskFilter<IEventType> { 
    3939 
    4040    MOUSE_BUTTON_INTERACTION(MouseButtonInteraction.class), 
     
    6666    public Predicate filterPredicate() { 
    6767        Predicate<Object> instanceOfIEventTaskPredicate = Predicates.instanceOf(IEventTask.class); 
    68         Predicate<ITaskTreeNode> nodeHoldsInstanceOfFilterArgument = 
    69             Predicates.compose(Predicates.instanceOf(eventTypeClazz), nodeExtractionFunction()); 
    70         return Predicates.and(instanceOfIEventTaskPredicate, nodeHoldsInstanceOfFilterArgument); 
     68        Predicate<ITask> taskHoldsInstanceOfFilterArgument = 
     69            Predicates.compose(Predicates.instanceOf(eventTypeClazz), taskExtractionFunction()); 
     70        return Predicates.and(instanceOfIEventTaskPredicate, taskHoldsInstanceOfFilterArgument); 
    7171    } 
    7272 
    73     private Function<ITaskTreeNode, IEventType> nodeExtractionFunction() { 
    74         return new Function<ITaskTreeNode, IEventType>() { 
     73    private Function<ITask, IEventType> taskExtractionFunction() { 
     74        return new Function<ITask, IEventType>() { 
    7575 
    7676            @Override 
    77             public IEventType apply(ITaskTreeNode treeNode) { 
    78                 return ((IEventTask) treeNode).getEventType(); 
     77            public IEventType apply(ITask task) { 
     78                return ((IEventTask) task).getEventType(); 
    7979            } 
    8080        }; 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/TaskFilter.java

    r1150 r1152  
    2424 * @author Alexander Deicke 
    2525 */ 
    26 public interface TaskTreeNodeFilter<T> { 
     26public interface TaskFilter<T> { 
    2727 
    2828    public Class<T> clazz(); 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/TaskModelFilter.java

    r1150 r1152  
    1717import com.google.common.base.Preconditions; 
    1818 
    19 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 
     19import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    2020import de.ugoe.cs.autoquest.usability.tasktree.FilterResult; 
    21 import de.ugoe.cs.autoquest.usability.tasktree.TaskTreeFilterStrategy; 
     21import de.ugoe.cs.autoquest.usability.tasktree.TaskModelFilterStrategy; 
    2222 
    2323/** 
     
    2828 * @author Alexander Deicke 
    2929 */ 
    30 public class TaskTreeFilter { 
     30public class TaskModelFilter { 
    3131 
    32     private final TaskTreeFilterStrategy taskTreeFilterStrategy; 
     32    private final TaskModelFilterStrategy taskModelFilterStrategy; 
    3333 
    34     public TaskTreeFilter(TaskTreeFilterStrategy treeTraversalStrategy) { 
     34    public TaskModelFilter(TaskModelFilterStrategy treeTraversalStrategy) { 
    3535        Preconditions.checkNotNull(treeTraversalStrategy); 
    36         this.taskTreeFilterStrategy = treeTraversalStrategy; 
     36        this.taskModelFilterStrategy = treeTraversalStrategy; 
    3737    } 
    3838 
     
    4545    } 
    4646 
    47     public FilterNodeTypeStep filterByNodeType(TaskTreeNodeTypeFilter nodeType) { 
     47    public FilterNodeTypeStep filterByNodeType(TaskTypeFilter nodeType) { 
    4848        return new FilterNodeTypeStep(nodeType); 
    4949    } 
     
    5757        } 
    5858 
    59         public FilterResult from(ITaskTree taskTree) { 
    60             return taskTreeFilterStrategy.filter(taskTree, eventTarget); 
     59        public FilterResult from(ITaskModel taskModel) { 
     60            return taskModelFilterStrategy.filter(taskModel, eventTarget); 
    6161        } 
    6262 
     
    7171        } 
    7272 
    73         public FilterResult from(ITaskTree taskTree) { 
    74             return taskTreeFilterStrategy.filter(taskTree, eventType); 
     73        public FilterResult from(ITaskModel taskModel) { 
     74            return taskModelFilterStrategy.filter(taskModel, eventType); 
    7575        } 
    7676 
     
    7979    public class FilterNodeTypeStep { 
    8080 
    81         private final TaskTreeNodeTypeFilter nodeType; 
     81        private final TaskTypeFilter nodeType; 
    8282 
    83         public FilterNodeTypeStep(TaskTreeNodeTypeFilter nodeType) { 
     83        public FilterNodeTypeStep(TaskTypeFilter nodeType) { 
    8484            this.nodeType = nodeType; 
    8585        } 
    8686 
    87         public FilterResult from(ITaskTree taskTree) { 
    88             return taskTreeFilterStrategy.filter(taskTree, nodeType); 
     87        public FilterResult from(ITaskModel taskModel) { 
     88            return taskModelFilterStrategy.filter(taskModel, nodeType); 
    8989        } 
    9090 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/TaskTypeFilter.java

    r1150 r1152  
    2222import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection; 
    2323import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence; 
    24 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 
     24import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
    2525 
    2626/** 
     
    3131 * @author Alexander Deicke 
    3232 */ 
    33 public enum TaskTreeNodeTypeFilter implements TaskTreeNodeFilter<ITaskTreeNode> { 
     33public enum TaskTypeFilter implements TaskFilter<ITask> { 
    3434 
    3535    EVENT_TASK_NODE(IEventTask.class), 
     
    4141    SELECTION(ISelection.class),; 
    4242 
    43     private Class<? extends ITaskTreeNode> nodeTypeClazz; 
     43    private Class<? extends ITask> taskTypeClazz; 
    4444 
    45     private TaskTreeNodeTypeFilter(Class<? extends ITaskTreeNode> nodeTypeClazz) { 
    46         this.nodeTypeClazz = nodeTypeClazz; 
     45    private TaskTypeFilter(Class<? extends ITask> taskTypeClazz) { 
     46        this.taskTypeClazz = taskTypeClazz; 
    4747    } 
    4848 
    4949    @SuppressWarnings("unchecked") 
    5050    @Override 
    51     public Class<ITaskTreeNode> clazz() { 
    52         return (Class<ITaskTreeNode>) this.nodeTypeClazz; 
     51    public Class<ITask> clazz() { 
     52        return (Class<ITask>) this.taskTypeClazz; 
    5353    } 
    5454 
     
    5656    @Override 
    5757    public Predicate filterPredicate() { 
    58         return Predicates.instanceOf(nodeTypeClazz); 
     58        return Predicates.instanceOf(taskTypeClazz); 
    5959    } 
    6060 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/util/NullNode.java

    r1150 r1152  
    2020import org.apache.commons.lang.StringUtils; 
    2121 
    22 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 
    23 import de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor; 
     22import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
    2423 
    2524/** 
     
    3029 * @author Alexander Deicke 
    3130 */ 
    32 public class NullNode implements ITaskTreeNode { 
     31public class NullNode implements ITask { 
    3332 
    3433    /* (non-Javadoc) 
     
    4746 
    4847    /* (non-Javadoc) 
    49      * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode#getChildren() 
    50      */ 
    51     public List<ITaskTreeNode> getChildren() { 
    52         return Collections.emptyList(); 
    53     } 
    54  
    55     /* (non-Javadoc) 
    5648     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode#equals(de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode) 
    5749     */ 
    58     public boolean equals(ITaskTreeNode taskTreeNode) { 
     50    public boolean equals(ITask task) { 
    5951        return false; 
    6052    } 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/util/PatternsVisitorUtil.java

    r1150 r1152  
    1919import com.google.common.collect.Iterables; 
    2020 
    21 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 
    22 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 
    23 import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskTreeNodeFactory; 
     21import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
     22import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
     23import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskFactory; 
    2424 
    2525/** 
     
    4444     * @return 
    4545     */ 
    46     public static ITaskTree createTaskTreeFromNode(ITaskTreeNode taskTreeNode) { 
    47         return new TaskTreeNodeFactory().createTaskTree(taskTreeNode); 
     46    public static ITaskModel createTaskModelFromNode(ITask task) { 
     47        return new TaskFactory().createTaskTree(task); 
    4848    } 
    4949     
     
    5656     * @return 
    5757     */ 
    58     public static ITaskTreeNode firstNodeOf(List<ITaskTreeNode> taskTreeNodes) { 
    59         return Iterables.getFirst(taskTreeNodes, new NullNode()); 
     58    public static ITask firstNodeOf(List<ITask> tasks) { 
     59        return Iterables.getFirst(tasks, new NullNode()); 
    6060    } 
    6161 
     
    6868     * @return 
    6969     */ 
    70     public static ITaskTreeNode lastNodeOf(List<ITaskTreeNode> taskTreeNodes) { 
    71         return Iterables.getLast(taskTreeNodes, new NullNode()); 
     70    public static ITask lastNodeOf(List<ITask> tasks) { 
     71        return Iterables.getLast(tasks, new NullNode()); 
    7272    } 
    7373     
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/util/TextInputUtil.java

    r1040 r1152  
    2727import de.ugoe.cs.autoquest.eventcore.gui.TextInput; 
    2828import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask; 
    29 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 
     29import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
    3030 
    3131/** 
     
    4242    } 
    4343 
    44     public static Multiset<String> aggregateEnteredTextFromTextInputs(List<ITaskTreeNode> nodesWithTextInputEvents) 
     44    public static Multiset<String> aggregateEnteredTextFromTextInputs(List<ITask> tasksWithTextInputEvents) 
    4545    { 
    4646        List<Iterable<String>> allTextInputs = Lists.newArrayList(); 
    47         for (ITaskTreeNode nodeWithTextInput : nodesWithTextInputEvents) { 
    48             TextInput textInput = (TextInput) ((IEventTask) nodeWithTextInput).getEventType(); 
     47        for (ITask taskWithTextInput : tasksWithTextInputEvents) { 
     48            TextInput textInput = (TextInput) ((IEventTask) taskWithTextInput).getEventType(); 
    4949            allTextInputs.add(splitTextIntoWordsAndSigns(textInput.getEnteredText())); 
    5050        } 
Note: See TracChangeset for help on using the changeset viewer.