Changeset 1337 for trunk/autoquest-core-tasktrees/src/main
- Timestamp:
- 01/28/14 10:58:45 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRule.java
r1294 r1337 112 112 public RuleApplicationResult apply(List<IUserSession> sessions) { 113 113 RuleApplicationData appData = new RuleApplicationData(sessions); 114 114 115 115 // this is the real rule application. Loop while something is replaced. 116 116 harmonizeEventTaskInstancesModel(appData); … … 247 247 } 248 248 249 IIterationInstance iterationInstance = null;249 IIterationInstance iterationInstance; 250 250 251 251 for (IUserSession session : sessions) { 252 252 int index = 0; 253 iterationInstance = null; 254 253 255 while (index < session.size()) { 254 256 // we prepared the task instances to refer to unique tasks, if they are treated … … 1026 1028 1027 1029 } 1030 1031 // methods for internal testing 1032 // private void checkMatchingOfSessions(List<List<Event>> flattenedSessions, 1033 // List<IUserSession> sessions, 1034 // String when) 1035 // { 1036 // List<List<Event>> currentFlattenedSessions = flattenSessions(sessions); 1037 // if (flattenedSessions.size() != currentFlattenedSessions.size()) { 1038 // System.out.println("################## number of sessions changed after " + when); 1039 // } 1040 // else { 1041 // for (int i = 0; i < flattenedSessions.size(); i++) { 1042 // List<Event> expected = flattenedSessions.get(i); 1043 // List<Event> current = currentFlattenedSessions.get(i); 1044 // 1045 // if (expected.size() != current.size()) { 1046 // System.out.println 1047 // ("################## length of session " + i + " changed after " + when); 1048 // } 1049 // else { 1050 // for (int j = 0; j < expected.size(); j++) { 1051 // if (!expected.get(j).equals(current.get(j))) { 1052 // System.out.println("################## event " + j + " of session " + 1053 // i + " changed after " + when); 1054 // } 1055 // } 1056 // } 1057 // } 1058 // } 1059 // } 1060 // 1061 // private List<List<Event>> flattenSessions(List<IUserSession> sessions) { 1062 // List<List<Event>> flattenedSessions = new ArrayList<List<Event>>(); 1063 // for (IUserSession session : sessions) { 1064 // List<Event> flattenedUserSession = new ArrayList<Event>(); 1065 // flatten(session, flattenedUserSession); 1066 // flattenedSessions.add(flattenedUserSession); 1067 // } 1068 // 1069 // return flattenedSessions; 1070 // } 1071 // 1072 // private void flatten(IUserSession iUserSession, List<Event> flattenedUserSession) { 1073 // for (ITaskInstance instance : iUserSession) { 1074 // flatten(instance, flattenedUserSession); 1075 // } 1076 // } 1077 // 1078 // private void flatten(ITaskInstance instance, List<Event> flattenedUserSession) { 1079 // if (instance instanceof ITaskInstanceList) { 1080 // for (ITaskInstance child : (ITaskInstanceList) instance) { 1081 // flatten(child, flattenedUserSession); 1082 // } 1083 // } 1084 // else if (instance instanceof ISelectionInstance) { 1085 // flatten(((ISelectionInstance) instance).getChild(), flattenedUserSession); 1086 // } 1087 // else if (instance instanceof IOptionalInstance) { 1088 // flatten(((IOptionalInstance) instance).getChild(), flattenedUserSession); 1089 // } 1090 // else if (instance instanceof IEventTaskInstance) { 1091 // flattenedUserSession.add(((IEventTaskInstance) instance).getEvent()); 1092 // } 1093 // } 1094 1028 1095 }
Note: See TracChangeset
for help on using the changeset viewer.