Changeset 1216
- Timestamp:
- 05/27/13 15:52:39 (11 years ago)
- Location:
- trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskBuilder.java
r1146 r1216 29 29 30 30 /** 31 * TODO comment 31 * <p> 32 * this is the default implementation of the interface {@link ITaskBuilder}. It 33 * does not do anything fancy except implementing the interface. In some situations, it performs 34 * a check if the model or instances to be created a valid. However, this can not be done 35 * in any situation of the creation process. 36 * </p> 32 37 * 33 * @version $Revision: $ $Date: 21.02.2012$ 34 * @author 2012, last modified by $Author: patrick$ 38 * @author Patrick Harms 35 39 */ 36 40 public class TaskBuilder implements ITaskBuilder { 37 41 38 42 /* (non-Javadoc) 39 * @see ITaskBuilder#addChild(ITaskInstance, 43 * @see ITaskBuilder#addChild(ITaskInstance,ITaskInstance) 40 44 */ 41 45 @Override … … 71 75 } 72 76 } 73 /*else if (task instanceof IIteration) {77 /*else if (task instanceof IIteration) { 74 78 for (ITaskInstance childInstance : parent.getChildren()) { 75 79 if (!childInstance.getTask().equals(child.getTask())) { … … 130 134 131 135 /* (non-Javadoc) 132 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder#addTaskInstance(de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceList, de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance)136 * @see ITaskBuilder#addTaskInstance(ITaskInstanceList, ITaskInstance) 133 137 */ 134 138 @Override … … 147 151 148 152 /* (non-Javadoc) 149 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder#addTaskInstance(de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceList, int, de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance)153 * @see ITaskBuilder#addTaskInstance(ITaskInstanceList, int, ITaskInstance) 150 154 */ 151 155 @Override … … 167 171 168 172 /* (non-Javadoc) 169 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder#setTaskInstance(de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceList, int, de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance)173 * @see ITaskBuilder#setTaskInstance(ITaskInstanceList, int, ITaskInstance) 170 174 */ 171 175 @Override … … 189 193 190 194 /* (non-Javadoc) 191 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder#setTask(de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance, de.ugoe.cs.autoquest.tasktrees.treeifc.ITask)195 * @see ITaskBuilder#setTask(ITaskInstance, ITask) 192 196 */ 193 197 @Override … … 201 205 } 202 206 203 /* 204 * (non-Javadoc) 205 * 206 * @see de.ugoe.cs.tasktree.treeifc.TaskTreeBuilder#addChild(Sequence, TaskTreeNode) 207 /* (non-Javadoc) 208 * @see ITaskBuilder#addChild(ISequence, ITask) 207 209 */ 208 210 @Override … … 216 218 } 217 219 218 /* 219 * (non-Javadoc) 220 * 221 * @see de.ugoe.cs.tasktree.treeifc.TaskTreeBuilder#addChild(Sequence, int, TaskTreeNode) 220 /* (non-Javadoc) 221 * @see ITaskBuilder#addChild(ISequence, int, ITask) 222 222 */ 223 223 @Override … … 232 232 233 233 /* (non-Javadoc) 234 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeBuilder#setChild(de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence, int, de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode)234 * @see ITaskBuilder#setChild(ISequence, int, ITask) 235 235 */ 236 236 @Override … … 245 245 } 246 246 247 /* 248 * (non-Javadoc) 249 * 250 * @see de.ugoe.cs.tasktree.treeifc.TaskTreeBuilder#addChild(Selection, TaskTreeNode) 247 /* (non-Javadoc) 248 * @see ITaskBuilder#addChild(ISelection, ITask) 251 249 */ 252 250 @Override … … 260 258 } 261 259 262 /* 263 * (non-Javadoc) 264 * 265 * @see de.ugoe.cs.tasktree.treeifc.TaskTreeBuilder#setChild(Iteration, TaskTreeNode) 260 /* (non-Javadoc) 261 * @see ITaskBuilder#setMarkedTask(IIteration, ITask) 266 262 */ 267 263 @Override … … 281 277 282 278 /* (non-Javadoc) 283 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeBuilder#setChild(de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional, de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode)279 * @see ITaskTreeBuilder#setChild(IOptional, ITaskTreeNode) 284 280 */ 285 281 @Override … … 298 294 } 299 295 300 /* 301 * (non-Javadoc) 302 * 303 * @see de.ugoe.cs.tasktree.treeifc.TaskTreeBuilder#removeChild(Sequence, int) 296 /* (non-Javadoc) 297 * @see ITaskBuilder#removeChild(ISequence, int) 304 298 */ 305 299 @Override … … 313 307 } 314 308 315 /* 316 * (non-Javadoc) 317 * 318 * @see de.ugoe.cs.tasktree.treeifc.TaskTreeBuilder#removeChild(Selection, TaskTreeNode) 309 /* (non-Javadoc) 310 * @see ITaskBuilder#removeChild(ISelection, ITask) 319 311 */ 320 312 @Override … … 338 330 339 331 /* (non-Javadoc) 340 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder#removeTaskInstance(de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceList, int)332 * @see ITaskBuilder#removeTaskInstance(ITaskInstanceList, int) 341 333 */ 342 334 @Override … … 355 347 356 348 /* (non-Javadoc) 357 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeBuilder#replaceChild(de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection, de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode, de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode)349 * @see ITaskTreeBuilder#replaceChild(ISelection, ITaskTreeNode, ITaskTreeNode) 358 350 */ 359 351 @Override … … 377 369 } 378 370 379 /* 380 * (non-Javadoc) 381 * 382 * @see de.ugoe.cs.tasktree.treeifc.TaskTreeBuilder#setDescription(TaskTreeNode, String) 371 /* (non-Javadoc) 372 * @see ITaskBuilder#setDescription(ITask, java.lang.String) 383 373 */ 384 374 @Override … … 393 383 394 384 /** 395 * 385 * <p> 386 * internal convenience method for adding children to a structuring temporal relationship 387 * including a check for the child type. 388 * </p> 396 389 */ 397 390 private void addChildInternal(StructuringTemporalRelationship parent, int index, ITask child) { -
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskFactory.java
r1146 r1216 32 32 33 33 /** 34 * TODO comment 34 * <p> 35 * this is the default implementation of the interface {@link ITaskFactory}. It 36 * does not do anything fancy except implementing the interface. It instantiates the other 37 * implementations of the tree ifc in this package. 38 * </p> 35 39 * 36 * @version $Revision: $ $Date: 21.02.2012$ 37 * @author 2012, last modified by $Author: patrick$ 40 * @author Patrick Harms 38 41 */ 39 42 public class TaskFactory implements ITaskFactory { 40 43 41 /* 42 * (non-Javadoc) 43 * 44 * @see TaskTreeNodeFactory#createNewEventTask(IEventType, IEventTarget) 44 /* (non-Javadoc) 45 * @see ITaskFactory#createNewEventTask(IEventType, IEventTarget) 45 46 */ 46 47 @Override … … 49 50 } 50 51 51 /* 52 * (non-Javadoc) 53 * 54 * @see de.ugoe.cs.tasktree.treeifc.TaskTreeNodeFactory#createNewSequence() 52 /* (non-Javadoc) 53 * @see ITaskFactory#createNewSequence() 55 54 */ 56 55 @Override … … 59 58 } 60 59 61 /* 62 * (non-Javadoc) 63 * 64 * @see de.ugoe.cs.tasktree.treeifc.TaskTreeNodeFactory#createNewIteration() 60 /* (non-Javadoc) 61 * @see ITaskFactory#createNewIteration() 65 62 */ 66 63 @Override … … 70 67 71 68 /* (non-Javadoc) 72 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNodeFactory#createNewOptional()69 * @see ITaskFactory#createNewOptional() 73 70 */ 74 71 @Override … … 77 74 } 78 75 79 /* 80 * (non-Javadoc) 81 * 82 * @see de.ugoe.cs.tasktree.treeifc.TaskTreeNodeFactory#createNewSelection() 76 /* (non-Javadoc) 77 * @see ITaskFactory#createNewSelection() 83 78 */ 84 79 @Override … … 88 83 89 84 /* (non-Javadoc) 90 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory#createNewTaskInstance(ITask)85 * @see ITaskFactory#createNewTaskInstance(ITask) 91 86 */ 92 87 @Override … … 96 91 97 92 /* (non-Javadoc) 98 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory#createNewTaskInstanceList()93 * @see ITaskFactory#createNewTaskInstanceList() 99 94 */ 100 95 @Override … … 104 99 105 100 /* (non-Javadoc) 106 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory#createUserSession()101 * @see ITaskFactory#createUserSession() 107 102 */ 108 103 @Override … … 112 107 113 108 /* (non-Javadoc) 114 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory#createTaskModel(IUserSession)109 * @see ITaskFactory#createTaskModel(List<IUserSession>) 115 110 */ 116 111 @Override -
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskInfo.java
r1146 r1216 19 19 20 20 /** 21 * TODO comment 21 * <p> 22 * this is the default implementation of the interface {@link ITaskInfo}. It 23 * does not do anything fancy except implementing the interface. 24 * </p> 22 25 * 23 * @version $Revision: $ $Date: $ 24 * @author 2011, last modified by $Author: $ 26 * @author Patrick Harms 25 27 */ 26 28 public class TaskInfo implements ITaskInfo { 27 29 28 /** */ 30 /** 31 * <p> 32 * default serial version UID 33 * </p> 34 */ 29 35 private static final long serialVersionUID = 1L; 30 36 31 /** */ 37 /** 38 * <p> 39 * the task to which the infos belong 40 * </p> 41 */ 32 42 private ITask task; 33 43 34 44 /** 45 * <p> 46 * initialized the task infos with the task to which they belong. 47 * </p> 48 * 35 49 * @param task 36 50 */ … … 39 53 } 40 54 41 /* 42 * (non-Javadoc) 43 * 44 * @see de.ugoe.cs.tasktree.treeifc.NodeInfo#getTask() 55 /* (non-Javadoc) 56 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInfo#getTask() 45 57 */ 46 58 @Override … … 49 61 } 50 62 51 /* 52 * (non-Javadoc) 53 * 63 /* (non-Javadoc) 54 64 * @see java.lang.Object#toString() 55 65 */ -
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskInstance.java
r1146 r1216 24 24 25 25 /** 26 * TODO comment 26 * <p> 27 * this is the default implementation of the interface {@link ITaskInstance}. It 28 * does not do anything fancy except implementing the interface. 29 * </p> 27 30 * 28 * @version $Revision: $ $Date: $ 29 * @author 2011, last modified by $Author: $ 31 * @author Patrick Harms 30 32 */ 31 33 class TaskInstance implements ITaskInstance { 32 34 33 /** */ 35 /** 36 * <p> 37 * default serial version UID 38 * </p> 39 */ 34 40 private static final long serialVersionUID = 1L; 35 41 36 /** */ 42 /** 43 * <p> 44 * used as a counter to generate new ids for each newly created task instance. May overflow. 45 * </p> 46 */ 37 47 private static int temporalId = 0; 38 48 39 /** */ 49 /** 50 * <p> 51 * the task instantiated by this task instance 52 * </p> 53 */ 40 54 private ITask task; 41 55 42 /** */ 56 /** 57 * <p> 58 * the id of the task instance (unique throughout the system as long as {@link #temporalId} 59 * does not overflow. 60 * </p> 61 */ 43 62 private int id; 44 63 45 /** children */ 64 /** 65 * <p> 66 * the children of this task instance which are task instances, as well 67 * </p> 68 */ 46 69 private List<ITaskInstance> children; 47 70 48 71 /** 49 * 72 * <p> 73 * instantiated the task instance with the task that is instantiated by the instance. It also 74 * assigns a unique id to the instance using {@link #getNewId()}. 75 * </p> 50 76 */ 51 77 TaskInstance(ITask task) { … … 55 81 56 82 /** 57 * TODO: comment 58 * 59 * @return 83 * <p> 84 * creates a new id for a task instance using {@link #temporalId} by incrementing it an 85 * returning its current value. Resets the counter if {@link Integer.MAX_VALUE} is reached. 86 * </p> 87 * 88 * @return a new unique id for a task instance as long as {@link #temporalId} does not overflow 60 89 */ 61 90 private static synchronized int getNewId() { … … 132 161 } 133 162 134 /* 135 * (non-Javadoc) 136 * 163 /* (non-Javadoc) 137 164 * @see java.lang.Object#hashCode() 138 165 */ … … 142 169 } 143 170 144 /* 145 * (non-Javadoc) 146 * 171 /* (non-Javadoc) 147 172 * @see java.lang.Object#toString() 148 173 */ … … 170 195 } 171 196 172 /* 173 * (non-Javadoc) 174 * 197 /* (non-Javadoc) 175 198 * @see java.lang.Object#clone() 176 199 */ … … 199 222 200 223 /** 201 * 224 * <p> 225 * used to add a child to this task instance 226 * </p> 227 * 228 * @param child the new child of this instance 202 229 */ 203 230 synchronized void addChild(ITaskInstance child) { … … 210 237 211 238 /** 212 * 239 * <p> 240 * used to add a child to this task instance at a specific position 241 * </p> 242 * 243 * @param index the position of the new child in the list of children 244 * @param child the new child of this instance 213 245 */ 214 246 synchronized void addChild(int index, ITaskInstance child) { … … 221 253 222 254 /** 223 * TODO: comment 224 * 225 * @param i 226 * @return 255 * <p> 256 * removes a child from this task instance at a specific position 257 * </p> 258 * 259 * @param index the position of the child to be removed 260 * 261 * @return the child remove from the children of this instance 227 262 */ 228 263 synchronized ITaskInstance removeChild(int index) { … … 237 272 238 273 /** 274 * <p> 275 * used to update the task represented through this instance 276 * </p> 277 * 239 278 * @param task the task to set 240 279 */ -
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskModel.java
r1146 r1216 30 30 31 31 /** 32 * TODO comment 32 * <p> 33 * this is the default implementation of the interface {@link ITaskModel}. It 34 * does not do anything fancy except implementing the interface. 35 * </p> 33 36 * 34 * @version $Revision: $ $Date: 21.02.2012$ 35 * @author 2012, last modified by $Author: patrick$ 37 * @author Patrick Harms 36 38 */ 37 39 class TaskModel implements ITaskModel { 38 40 39 /** */ 41 /** 42 * <p> 43 * default serial version UID 44 * </p> 45 */ 40 46 private static final long serialVersionUID = 1L; 41 47 42 /** the map of tasks */ 48 /** 49 * <p> 50 * the user sessions belonging to the model 51 * </p> 52 */ 43 53 private List<IUserSession> userSessions; 44 54 45 /** the map of tasks */ 55 /** 56 * <p> 57 * the tasks contained in the user session belonging to the model as well as statistical infos 58 * about them 59 * </p> 60 */ 46 61 private Map<ITask, TaskInfo> taskMap = new HashMap<ITask, TaskInfo>(); 47 62 48 63 /** 49 * 64 * <p> 65 * initializes the task model with the user sessions out of which the tasks are extracted 66 * </p> 67 * 68 * @param userSessions as described 50 69 */ 51 70 TaskModel(List<IUserSession> userSessions) { … … 83 102 84 103 /* (non-Javadoc) 85 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel#getTaskInfo( de.ugoe.cs.autoquest.tasktrees.treeifc.ITask)104 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel#getTaskInfo(ITask) 86 105 */ 87 106 @Override … … 90 109 } 91 110 111 /* (non-Javadoc) 112 * @see java.lang.Object#clone() 113 */ 114 @Override 115 public TaskModel clone() { 116 return new TaskModel(userSessions); 117 } 118 92 119 /** 93 * 120 * <p> 121 * internal convenience method to build the task model during initialization 122 * </p> 94 123 */ 95 124 private void addTaskToMap(ITask task) { … … 111 140 } 112 141 113 /*114 * (non-Javadoc)115 *116 * @see java.lang.Object#clone()117 */118 @Override119 public TaskModel clone() {120 return new TaskModel(userSessions);121 }122 123 142 } -
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/UserSession.java
r1146 r1216 25 25 /** 26 26 * <p> 27 * TODO comment 27 * this is the default implementation of the interface {@link IUserSession}. It 28 * does not do anything fancy except implementing the interface. 28 29 * </p> 29 30 * … … 32 33 class UserSession implements IUserSession { 33 34 34 /** */ 35 /** 36 * <p> 37 * default serial version UID 38 * </p> 39 */ 35 40 private static final long serialVersionUID = 1L; 41 36 42 /** 37 * 43 * <p> 44 * the task instances belonging to the user session 45 * </p> 38 46 */ 39 47 private List<ITaskInstance> executedTasks = new LinkedList<ITaskInstance>(); … … 71 79 } 72 80 73 /* 74 * (non-Javadoc) 75 * 76 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.TaskTreeNode#equals(TaskTreeNode) 81 /* (non-Javadoc) 82 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.IUserSession#equals(IUserSession) 77 83 */ 78 84 @Override … … 83 89 } 84 90 85 /* 86 * (non-Javadoc) 87 * 91 /* (non-Javadoc) 88 92 * @see java.lang.Object#hashCode() 89 93 */ … … 93 97 } 94 98 95 /* 96 * (non-Javadoc) 97 * 99 /* (non-Javadoc) 98 100 * @see java.lang.Object#toString() 99 101 */ … … 103 105 } 104 106 105 /* 106 * (non-Javadoc) 107 * 107 /* (non-Javadoc) 108 108 * @see java.lang.Object#clone() 109 109 */ … … 130 130 131 131 /** 132 * 132 * <p> 133 * used internally to add a task instance to the user session 134 * </p> 135 * 136 * @param taskInstance the task instance to be added 133 137 */ 134 138 void addExecutedTask(ITaskInstance taskInstance) { … … 137 141 138 142 /** 139 * 143 * <p> 144 * used internally to add a task instance to the user session at a specific position 145 * </p> 146 * 147 * @param index the index the task instance shall be added to 148 * @param taskInstance the task instance to be added 140 149 */ 141 150 void addExecutedTask(int index, ITaskInstance taskInstance) { … … 144 153 145 154 /** 146 * 155 * <p> 156 * used internally to remove a task instance from the user session 157 * </p> 158 * 159 * @param index the index of the task instance to be removed 147 160 */ 148 161 void removeExecutedTask(int index) {
Note: See TracChangeset
for help on using the changeset viewer.