Changeset 1889
- Timestamp:
- 03/05/15 11:40:19 (10 years ago)
- 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 154 154 finishSession(); 155 155 156 Console.traceln(Level.INFO, "applying temporal relationship generation rules"); 156 Console.traceln 157 (Level.INFO, "applying temporal relationship generation rules for detecting tasks"); 157 158 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); 159 180 160 181 return taskFactory.createTaskModel(sessions); -
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TemporalRelationshipRuleManager.java
r1767 r1889 183 183 * </p> 184 184 * 185 * @param taskFactory the task factory to be used for instantiating new tasks.185 * @param sessions the sessions to be processed 186 186 */ 187 187 public void applyRules(List<IUserSession> sessions) { 188 188 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, ""); 189 223 } 190 224
Note: See TracChangeset
for help on using the changeset viewer.