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/TaskSymbolBucketedMap.java

    r1285 r1294  
    2727 
    2828import de.ugoe.cs.autoquest.eventcore.IEventType; 
    29 import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask; 
    30 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration; 
    31 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection; 
    32 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence; 
    33 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
     29import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance; 
     30import de.ugoe.cs.autoquest.tasktrees.treeifc.IIterationInstance; 
     31import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelectionInstance; 
     32import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequenceInstance; 
    3433import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance; 
    3534import de.ugoe.cs.autoquest.usageprofiles.SymbolMap; 
     
    8180     * </p> 
    8281     */ 
    83     private TaskComparator comparator; 
     82    private TaskInstanceComparator comparator; 
    8483 
    8584    /** 
     
    117116     * @throws IllegalArgumentException if the provided comparator is null 
    118117     */ 
    119     public TaskSymbolBucketedMap(TaskComparator comparator) { 
     118    public TaskSymbolBucketedMap(TaskInstanceComparator comparator) { 
    120119        if (comparator == null) { 
    121120            throw new IllegalArgumentException("comparator must not be null"); 
     
    400399        // other = hashCode of name of event type 
    401400         
    402         ITask task = taskInstance.getTask(); 
    403          
    404         if (task instanceof IEventTask) { 
     401        if (taskInstance instanceof IEventTaskInstance) { 
    405402            // event tasks are most likely equal to those of the event type with the same name, 
    406403            // Afterwards, they may be equal to iterations, optionals, other event tasks, 
    407404            // selections, and finally the rest. 
    408             IEventType eventType = ((IEventTask) task).getEventType(); 
     405            IEventType eventType = ((IEventTaskInstance) taskInstance).getEvent().getType(); 
    409406            return new int[] { eventType.getName().hashCode(), 2, 3, 4, 1 };                        
    410407        } 
    411         else if (task instanceof ISequence) { 
     408        else if (taskInstance instanceof ISequenceInstance) { 
    412409            return new int[] { 0, 2, 3, 1 };                        
    413410        } 
    414         else if (task instanceof ISelection) { 
     411        else if (taskInstance instanceof ISelectionInstance) { 
    415412            return new int[] { 1, 4, 2, 3 };                        
    416413        } 
    417         else if (task instanceof IIteration) { 
     414        else if (taskInstance instanceof IIterationInstance) { 
    418415            return new int[] { 2, 1, 4 };                        
    419416        } 
Note: See TracChangeset for help on using the changeset viewer.