Changeset 1889


Ignore:
Timestamp:
03/05/15 11:40:19 (10 years ago)
Author:
pharms
Message:
  • added support for separating task tree generation and merging
Location:
trunk
Files:
2 added
2 edited

Legend:

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

    r1397 r1889  
    154154        finishSession(); 
    155155         
    156         Console.traceln(Level.INFO, "applying temporal relationship generation rules"); 
     156        Console.traceln 
     157            (Level.INFO, "applying temporal relationship generation rules for detecting tasks"); 
    157158         
    158         ComponentManager.getTemporalRelationshipRuleManager().applyRules(sessions); 
     159        ComponentManager.getTemporalRelationshipRuleManager().applyTaskDetectionRule(sessions); 
     160 
     161        return taskFactory.createTaskModel(sessions); 
     162    } 
     163 
     164    /** 
     165     * <p> 
     166     * merges similar tasks in the given task model and returns a condensed task model 
     167     * </p> 
     168     *  
     169     * @param inputModel the model with the tasks to be merged 
     170     *  
     171     * @return as described 
     172     */ 
     173    public synchronized ITaskModel mergeSimilarTasks(ITaskModel inputModel) { 
     174        Console.traceln 
     175            (Level.INFO, "applying temporal relationship generation rules for merging tasks"); 
     176         
     177        sessions = inputModel.getUserSessions(); 
     178         
     179        ComponentManager.getTemporalRelationshipRuleManager().applyTaskMergingRule(sessions); 
    159180 
    160181        return taskFactory.createTaskModel(sessions); 
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TemporalRelationshipRuleManager.java

    r1767 r1889  
    183183     * </p> 
    184184     *  
    185      * @param taskFactory  the task factory to be used for instantiating new tasks. 
     185     * @param sessions  the sessions to be processed 
    186186     */ 
    187187    public void applyRules(List<IUserSession> sessions) { 
    188188        applyRules(sessionScopeRules, sessions, ""); 
     189    } 
     190 
     191    /** 
     192     * <p> 
     193     * applies only the known rules for task detection, i.e., currently only the sequence for task 
     194     * detection rule 
     195     * </p> 
     196     *  
     197     * @param sessions  the sessions to be processed 
     198     */ 
     199    public void applyTaskDetectionRule(List<IUserSession> sessions) { 
     200        ISessionScopeRule[] rules = new ISessionScopeRule[] { 
     201            new SequenceForTaskDetectionRule 
     202                (TaskEquality.SEMANTICALLY_EQUAL, taskFactory, taskBuilder) 
     203        }; 
     204         
     205        applyRules(rules, sessions, ""); 
     206    } 
     207 
     208    /** 
     209     * <p> 
     210     * applies only the known rules for task merging, i.e., currently only the condense similar task 
     211     * rule 
     212     * </p> 
     213     *  
     214     * @param sessions  the sessions to be processed 
     215     */ 
     216    public void applyTaskMergingRule(List<IUserSession> sessions) { 
     217        ISessionScopeRule[] rules = new ISessionScopeRule[] { 
     218            new CondenseSimilarTasksRule 
     219                (TaskEquality.SEMANTICALLY_EQUAL, taskFactory, taskBuilder) 
     220        }; 
     221         
     222        applyRules(rules, sessions, ""); 
    189223    } 
    190224 
Note: See TracChangeset for help on using the changeset viewer.