Ignore:
Timestamp:
08/14/13 17:04:42 (11 years ago)
Author:
pharms
Message:
  • rework of task model to move event instance stuff to task instances
  • introduction of sequence, selection, iteration and optional instances
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TemporalRelationshipRuleManager.java

    r1189 r1294  
    2626import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory; 
    2727import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance; 
    28 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceList; 
    2928import de.ugoe.cs.autoquest.tasktrees.treeifc.IUserSession; 
    3029import de.ugoe.cs.util.console.Console; 
     
    3837 * between tasks which are not only a major sequence. I.e. through the application of the 
    3938 * rules iterations and selections of tasks are detected. Which kind of temporal relations 
    40  * between tasks are detected depends on the {@link ITaskInstanceListScopeRule}s known to 
     39 * between tasks are detected depends on the {@link ITaskInstanceScopeRule}s known to 
    4140 * this class. 
    4241 * </p> 
    43  * <p>The class holds references to the appropriate {@link ITaskInstanceListScopeRule}s and calls 
    44  * their {@link ITaskInstanceListScopeRule#apply(ITask, ITaskBuilder, ITaskFactory, boolean)} 
     42 * <p>The class holds references to the appropriate {@link ITaskInstanceScopeRule}s and calls 
     43 * their {@link ITaskInstanceScopeRule#apply(ITask, ITaskBuilder, ITaskFactory, boolean)} 
    4544 * method for each task in the task tree it is needed for. The general behavior of this class is 
    4645 * the following: 
     
    5655 *   <li> 
    5756 *     the class iterates its internal list of rules and calls their 
    58  *     {@link ITaskInstanceListScopeRule#apply(ITask, ITaskBuilder, ITaskFactory, boolean)} 
     57 *     {@link ITaskInstanceScopeRule#apply(ITask, ITaskBuilder, ITaskFactory, boolean)} 
    5958 *     method. 
    6059 *   </li> 
     
    115114     * </p> 
    116115     */ 
    117     private ITaskInstanceListScopeRule[] taskScopeRules; 
     116    private ITaskInstanceScopeRule[] taskScopeRules; 
    118117 
    119118    /** 
     
    166165        //treeScopeRules.add(new DefaultGuiElementSequenceDetectionRule(frameFilter)); 
    167166 
    168         taskScopeRules = new ITaskInstanceListScopeRule[] { 
     167        taskScopeRules = new ITaskInstanceScopeRule[] { 
    169168            //new SequenceOnGuiElementDetectionRule(taskFactory, taskTreeBuilder), 
    170169            //new EventSequenceOnSameTargetDetectionRule(taskFactory, taskTreeBuilder), 
     
    262261     *                     on the recursion depth of calling this method. 
    263262     */ 
    264     private int applyRules(ITaskInstanceListScopeRule[] rules, 
    265                            ITaskInstanceList            taskInstances, 
     263    private int applyRules(ITaskInstanceScopeRule[] rules, 
     264                           ITaskInstance                taskInstance, 
    266265                           String                       logIndent) 
    267266    { 
    268         Console.traceln(Level.FINER, logIndent + "applying rules for " + taskInstances.size() + 
    269                         " task instances"); 
     267        Console.traceln(Level.FINER, logIndent + "applying rules on " + taskInstance); 
    270268 
    271269        int noOfRuleApplications = 0; 
    272270 
    273         for (ITaskInstanceListScopeRule rule : rules) { 
     271        for (ITaskInstanceScopeRule rule : rules) { 
    274272            RuleApplicationResult result; 
    275273            do { 
    276274                Console.traceln 
    277                     (Level.FINER, logIndent + "trying rule " + rule + " on " + taskInstances); 
    278                 result = rule.apply(taskInstances); 
     275                    (Level.FINER, logIndent + "trying rule " + rule + " on " + taskInstance); 
     276                result = rule.apply(taskInstance); 
    279277 
    280278                if ((result != null) && 
     
    282280                { 
    283281                    Console.traceln 
    284                         (Level.FINE, logIndent + "applied rule " + rule + " on " + taskInstances); 
     282                        (Level.FINE, logIndent + "applied rule " + rule + " on " + taskInstance); 
    285283                    noOfRuleApplications++; 
    286284                     
Note: See TracChangeset for help on using the changeset viewer.