- Timestamp:
- 08/27/14 00:22:17 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/RuleUtils.java
r1693 r1694 168 168 } 169 169 } else if (tempTask.getType() == "selection") { 170 171 170 ISelectionInstance selection = taskFactory.createNewTaskInstance((ISelection) tempTask); 172 171 ISelection tmpSel = (ISelection)tempTask; … … 174 173 System.out.println("Adding SequenceInstance " + parent.get(startIndex) + " to " + tempTask); 175 174 ISequenceInstance selseq = null; 176 System.out.println("IDS: " + parent.get(startIndex).getTask().getId() + " " +((ISequence)tmpSel.getChildren().get(0)).getChildren().get(0).getId());177 System.out.println("IDS: " + parent.get(startIndex).getTask().getId() + " " +((ISequence)tmpSel.getChildren().get(1)).getChildren().get(0).getId());175 //System.out.println("IDS: " + parent.get(startIndex).getTask().getId() + " " +((ISequence)tmpSel.getChildren().get(0)).getChildren().get(0).getId()); 176 //System.out.println("IDS: " + parent.get(startIndex).getTask().getId() + " " +((ISequence)tmpSel.getChildren().get(1)).getChildren().get(0).getId()); 178 177 if(parent.get(startIndex).getTask().getId() == ((ISequence)tmpSel.getChildren().get(0)).getChildren().get(0).getId()) { 179 178 selseq = taskFactory.createNewTaskInstance((ISequence) tmpSel.getChildren().get(0)); … … 182 181 selseq = taskFactory.createNewTaskInstance((ISequence) tmpSel.getChildren().get(1)); 183 182 } 184 else { 185 //throw new Exception("Error while creating subsequence of a selection"); 183 else if(parent.get(startIndex).getTask().getId() == tmpSel.getChildren().get(0).getId() || parent.get(startIndex).getTask().getId() == tmpSel.getChildren().get(1).getId() ) { 184 selseq = (ISequenceInstance) parent.get(startIndex); 185 taskBuilder.setChild(selection, selseq); 186 continue; 187 } 186 188 187 System.out.println("Error while creating subsequence of a selection");188 }189 190 189 for (int k=0;k<selseq.getSequence().getChildren().size();k++) { 191 190 taskBuilder.addChild(selseq,parent.get(startIndex)); … … 204 203 } else if (tempTask.getType() == "sequence") { 205 204 System.out.println("Adding SequenceInstance " + parent.get(startIndex) + " to " + tempTask); 206 ISequenceInstance sequence = taskFactory.createNewTaskInstance((ISequence) tempTask);207 taskBuilder.addChild(sequence, parent.get(i));208 taskBuilder.addChild(subsequence,sequence);209 //taskBuilder.addChild(subsequence, parent.get(startIndex));205 //ISequenceInstance sequence = taskFactory.createNewTaskInstance((ISequence) tempTask); 206 //taskBuilder.addChild(sequence, parent.get(i)); 207 //taskBuilder.addChild(subsequence,sequence); 208 taskBuilder.addChild(subsequence, parent.get(startIndex)); 210 209 } else if (tempTask.getType() == "iteration") { 211 210 System.out.println("Adding IterationInstance " + parent.get(startIndex) + " to " + tempTask);
Note: See TracChangeset
for help on using the changeset viewer.