Changeset 1733 for branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc
- Timestamp:
- 09/05/14 19:33:12 (10 years ago)
- Location:
- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/DefaultTaskInstanceTraversingVisitor.java
r1406 r1733 17 17 /** 18 18 * <p> 19 * Default implementation for a task instance visitor performing a traversal of the instances 19 * Default implementation for a task instance visitor performing a traversal of 20 * the instances 20 21 * </p> 21 22 * 22 23 * @author Patrick Harms 23 24 */ 24 public class DefaultTaskInstanceTraversingVisitor implements ITaskInstanceVisitor { 25 public class DefaultTaskInstanceTraversingVisitor implements 26 ITaskInstanceVisitor { 25 27 26 /* (non-Javadoc) 27 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceVisitor#visit(IEventTaskInstance) 28 */ 29 @Override 30 public void visit(IEventTaskInstance eventTaskInstance) { 31 // do nothing 32 } 28 /* 29 * (non-Javadoc) 30 * 31 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceVisitor#visit( 32 * IEventTaskInstance) 33 */ 34 @Override 35 public void visit(IEventTaskInstance eventTaskInstance) { 36 // do nothing 37 } 33 38 34 /* (non-Javadoc) 35 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceVisitor#visit(IIterationInstance) 36 */ 37 @Override 38 public void visit(IIterationInstance iterationInstance) { 39 visit((ITaskInstanceList) iterationInstance); 40 } 39 /* 40 * (non-Javadoc) 41 * 42 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceVisitor#visit( 43 * IIterationInstance) 44 */ 45 @Override 46 public void visit(IIterationInstance iterationInstance) { 47 visit((ITaskInstanceList) iterationInstance); 48 } 41 49 42 /* (non-Javadoc) 43 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceVisitor#visit(IOptionalInstance) 44 */ 45 @Override 46 public void visit(IOptionalInstance optionalInstance) { 47 if (optionalInstance.getChild() != null) { 48 optionalInstance.getChild().accept(this); 49 } 50 } 50 /* 51 * (non-Javadoc) 52 * 53 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceVisitor#visit( 54 * IOptionalInstance) 55 */ 56 @Override 57 public void visit(IOptionalInstance optionalInstance) { 58 if (optionalInstance.getChild() != null) { 59 optionalInstance.getChild().accept(this); 60 } 61 } 51 62 52 /* (non-Javadoc) 53 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceVisitor#visit(ISelectionInstance) 54 */ 55 @Override 56 public void visit(ISelectionInstance selectionInstance) { 57 selectionInstance.getChild().accept(this); 58 } 63 /* 64 * (non-Javadoc) 65 * 66 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceVisitor#visit( 67 * ISelectionInstance) 68 */ 69 @Override 70 public void visit(ISelectionInstance selectionInstance) { 71 selectionInstance.getChild().accept(this); 72 } 59 73 60 /* (non-Javadoc) 61 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceVisitor#visit(ISequenceInstance) 62 */ 63 @Override 64 public void visit(ISequenceInstance sequenceInstance) { 65 visit((ITaskInstanceList) sequenceInstance); 66 } 74 /* 75 * (non-Javadoc) 76 * 77 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceVisitor#visit( 78 * ISequenceInstance) 79 */ 80 @Override 81 public void visit(ISequenceInstance sequenceInstance) { 82 visit((ITaskInstanceList) sequenceInstance); 83 } 67 84 68 /* (non-Javadoc) 69 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceVisitor#visit(ITaskInstance) 70 */ 71 @Override 72 public void visit(ITaskInstance taskInstance) { 73 if (taskInstance instanceof IEventTaskInstance) { 74 visit((IEventTaskInstance) taskInstance); 75 } 76 else if (taskInstance instanceof IIterationInstance) { 77 visit((IIterationInstance) taskInstance); 78 } 79 else if (taskInstance instanceof IOptionalInstance) { 80 visit((IOptionalInstance) taskInstance); 81 } 82 else if (taskInstance instanceof ISelectionInstance) { 83 visit((ISelectionInstance) taskInstance); 84 } 85 else if (taskInstance instanceof ISequenceInstance) { 86 visit((ISequenceInstance) taskInstance); 87 } 88 } 85 /* 86 * (non-Javadoc) 87 * 88 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceVisitor#visit( 89 * ITaskInstance) 90 */ 91 @Override 92 public void visit(ITaskInstance taskInstance) { 93 if (taskInstance instanceof IEventTaskInstance) { 94 visit((IEventTaskInstance) taskInstance); 95 } else if (taskInstance instanceof IIterationInstance) { 96 visit((IIterationInstance) taskInstance); 97 } else if (taskInstance instanceof IOptionalInstance) { 98 visit((IOptionalInstance) taskInstance); 99 } else if (taskInstance instanceof ISelectionInstance) { 100 visit((ISelectionInstance) taskInstance); 101 } else if (taskInstance instanceof ISequenceInstance) { 102 visit((ISequenceInstance) taskInstance); 103 } 104 } 89 105 90 91 /** 92 * <p> 93 * common implementation for traversing task instance lists. 94 * </p> 95 * 96 * @param taskInstanceListthe task instance list to be traversed97 98 99 for (ITaskInstance child : taskInstanceList) {100 101 102 106 /** 107 * <p> 108 * common implementation for traversing task instance lists. 109 * </p> 110 * 111 * @param taskInstanceList 112 * the task instance list to be traversed 113 */ 114 public void visit(ITaskInstanceList taskInstanceList) { 115 for (final ITaskInstance child : taskInstanceList) { 116 child.accept(this); 117 } 118 } 103 119 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/DefaultTaskTraversingVisitor.java
r1409 r1733 24 24 public class DefaultTaskTraversingVisitor implements ITaskVisitor { 25 25 26 /* (non-Javadoc) 27 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskVisitor#visit(IEventTask) 28 */ 29 @Override 30 public void visit(IEventTask eventTask) { 31 // do nothing 32 } 26 /* 27 * (non-Javadoc) 28 * 29 * @see 30 * de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskVisitor#visit(IEventTask) 31 */ 32 @Override 33 public void visit(IEventTask eventTask) { 34 // do nothing 35 } 33 36 34 /* (non-Javadoc) 35 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskVisitor#visit(IIteration) 36 */ 37 @Override 38 public void visit(IIteration iteration) { 39 visit((IMarkingTemporalRelationship) iteration); 40 } 37 /* 38 * (non-Javadoc) 39 * 40 * @see 41 * de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskVisitor#visit(IIteration) 42 */ 43 @Override 44 public void visit(IIteration iteration) { 45 visit((IMarkingTemporalRelationship) iteration); 46 } 41 47 42 /* (non-Javadoc) 43 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskVisitor#visit(IOptional) 44 */ 45 @Override 46 public void visit(IOptional optional) { 47 visit((IMarkingTemporalRelationship) optional); 48 } 48 /** 49 * <p> 50 * common implementation for traversing a marking temporal relationship 51 * </p> 52 * 53 * @param relationship 54 * the marking temporal relationship to be traversed 55 */ 56 public void visit(IMarkingTemporalRelationship relationship) { 57 if (relationship.getMarkedTask() != null) { 58 relationship.getMarkedTask().accept(this); 59 } 60 } 49 61 50 /* (non-Javadoc) 51 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskVisitor#visit(ISelection) 52 */ 53 @Override 54 public void visit(ISelection selection) { 55 visit((IStructuringTemporalRelationship) selection); 56 } 62 /* 63 * (non-Javadoc) 64 * 65 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskVisitor#visit(IOptional) 66 */ 67 @Override 68 public void visit(IOptional optional) { 69 visit((IMarkingTemporalRelationship) optional); 70 } 57 71 58 /* (non-Javadoc) 59 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskVisitor#visit(ISequence) 60 */ 61 @Override 62 public void visit(ISequence sequence) { 63 visit((IStructuringTemporalRelationship) sequence); 64 } 72 /* 73 * (non-Javadoc) 74 * 75 * @see 76 * de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskVisitor#visit(ISelection) 77 */ 78 @Override 79 public void visit(ISelection selection) { 80 visit((IStructuringTemporalRelationship) selection); 81 } 65 82 66 /* (non-Javadoc) 67 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskVisitor#visit(ITask) 68 */ 69 @Override 70 public void visit(ITask task) { 71 if (task instanceof IEventTask) { 72 visit((IEventTask) task); 73 } 74 else if (task instanceof IIteration) { 75 visit((IIteration) task); 76 } 77 else if (task instanceof IOptional) { 78 visit((IOptional) task); 79 } 80 else if (task instanceof ISelection) { 81 visit((ISelection) task); 82 } 83 else if (task instanceof ISequence) { 84 visit((ISequence) task); 85 } 86 } 83 /* 84 * (non-Javadoc) 85 * 86 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskVisitor#visit(ISequence) 87 */ 88 @Override 89 public void visit(ISequence sequence) { 90 visit((IStructuringTemporalRelationship) sequence); 91 } 87 92 88 /** 89 * <p> 90 * common implementation for traversing a structuring temporal relationship 91 * </p> 92 * 93 * @param relationship the structuring temporal relationship to be traversed 94 */ 95 public void visit(IStructuringTemporalRelationship relationship) { 96 for (ITask child : relationship.getChildren()) { 97 child.accept(this); 98 } 99 } 93 /** 94 * <p> 95 * common implementation for traversing a structuring temporal relationship 96 * </p> 97 * 98 * @param relationship 99 * the structuring temporal relationship to be traversed 100 */ 101 public void visit(IStructuringTemporalRelationship relationship) { 102 for (final ITask child : relationship.getChildren()) { 103 child.accept(this); 104 } 105 } 100 106 101 /** 102 * <p> 103 * common implementation for traversing a marking temporal relationship 104 * </p> 105 * 106 * @param relationship the marking temporal relationship to be traversed 107 */ 108 public void visit(IMarkingTemporalRelationship relationship) { 109 if (relationship.getMarkedTask() != null) { 110 relationship.getMarkedTask().accept(this); 111 } 112 } 107 /* 108 * (non-Javadoc) 109 * 110 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskVisitor#visit(ITask) 111 */ 112 @Override 113 public void visit(ITask task) { 114 if (task instanceof IEventTask) { 115 visit((IEventTask) task); 116 } else if (task instanceof IIteration) { 117 visit((IIteration) task); 118 } else if (task instanceof IOptional) { 119 visit((IOptional) task); 120 } else if (task instanceof ISelection) { 121 visit((ISelection) task); 122 } else if (task instanceof ISequence) { 123 visit((ISequence) task); 124 } 125 } 113 126 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IEventTask.java
r1294 r1733 17 17 /** 18 18 * <p> 19 * Event tasks represent single events. They have no children and are therefore the leaf nodes of 20 * a task model. They provide information about the event they represent as a String description. 21 * They do not refer to events, as they may represented several semantically equal but lexically 22 * different events. Their description carries as much information as required to show the 23 * level of distinction. 19 * Event tasks represent single events. They have no children and are therefore 20 * the leaf nodes of a task model. They provide information about the event they 21 * represent as a String description. They do not refer to events, as they may 22 * represented several semantically equal but lexically different events. Their 23 * description carries as much information as required to show the level of 24 * distinction. 24 25 * </p> 25 26 * … … 27 28 */ 28 29 public interface IEventTask extends ITask { 29 30 /** 31 * <p> 32 * returns a clone of this task, i.e. another event task being identical to this. The event 33 * type and target are not cloned but reused. 34 * </p> 35 * 36 * @return as described 37 */ 38 public IEventTask clone(); 30 31 /** 32 * <p> 33 * returns a clone of this task, i.e. another event task being identical to 34 * this. The event type and target are not cloned but reused. 35 * </p> 36 * 37 * @return as described 38 */ 39 @Override 40 public IEventTask clone(); 39 41 40 42 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IEventTaskInstance.java
r1398 r1733 19 19 /** 20 20 * <p> 21 * the instance of an {@link IEventTask}. The instance refers to the concrete event it represents. 21 * the instance of an {@link IEventTask}. The instance refers to the concrete 22 * event it represents. 22 23 * </p> 23 24 * … … 26 27 public interface IEventTaskInstance extends ITaskInstance { 27 28 28 /** 29 * <p> 30 * returns the event represented by this event task instance 31 * </p> 32 * 33 * @return as described 34 */ 35 public Event getEvent(); 29 /** 30 * <p> 31 * clones this task instance by creating exact clones of itself. The 32 * referred task and event stay untouched 33 * </p> 34 * 35 * @return a clone of the task instance 36 */ 37 @Override 38 public IEventTaskInstance clone(); 36 39 37 38 39 * returns the task related to the instance, i.e. the event task. 40 41 42 43 44 public IEventTask getEventTask();40 /** 41 * <p> 42 * returns the event represented by this event task instance 43 * </p> 44 * 45 * @return as described 46 */ 47 public Event getEvent(); 45 48 46 /** 47 * <p> 48 * clones this task instance by creating exact clones of itself. The referred task and event 49 * stay untouched 50 * </p> 51 * 52 * @return a clone of the task instance 53 */ 54 public IEventTaskInstance clone(); 55 49 /** 50 * <p> 51 * returns the task related to the instance, i.e. the event task. 52 * </p> 53 * 54 * @return as described 55 */ 56 public IEventTask getEventTask(); 57 56 58 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IIteration.java
r1180 r1733 17 17 /** 18 18 * <p> 19 * This temporal relationship defines that its single child may be executed zero or more times for 20 * fulfilling the task. This is most important for the parent node in the task model as this 21 * node may require that a specific subtask is executed several times. 19 * This temporal relationship defines that its single child may be executed zero 20 * or more times for fulfilling the task. This is most important for the parent 21 * node in the task model as this node may require that a specific subtask is 22 * executed several times. 22 23 * </p> 23 24 * … … 26 27 public interface IIteration extends IMarkingTemporalRelationship { 27 28 28 /** 29 * <p> 30 * returns an exact copy of this temporal relationship. The clone has the same id. Its child 31 * is a clone of the child of the cloned task. A call on the method {@link #equals(ITask)} 32 * with the result of this method must return true. 33 * </p> 34 * 35 * @return as described 36 */ 37 public IIteration clone(); 29 /** 30 * <p> 31 * returns an exact copy of this temporal relationship. The clone has the 32 * same id. Its child is a clone of the child of the cloned task. A call on 33 * the method {@link #equals(ITask)} with the result of this method must 34 * return true. 35 * </p> 36 * 37 * @return as described 38 */ 39 @Override 40 public IIteration clone(); 38 41 39 42 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IIterationInstance.java
r1398 r1733 17 17 /** 18 18 * <p> 19 * the instance of an {@link IIteration}. The instance may have several children each being an 20 * instance of the task marked by the iteration of which this is an instance. 19 * the instance of an {@link IIteration}. The instance may have several children 20 * each being an instance of the task marked by the iteration of which this is 21 * an instance. 21 22 * </p> 22 23 * … … 25 26 public interface IIterationInstance extends ITaskInstance, ITaskInstanceList { 26 27 27 /** 28 * <p> 29 * returns the task related to the instance, i.e. the iteration. 30 * </p> 31 * 32 * @return as described 33 */ 34 public IIteration getIteration(); 28 /** 29 * <p> 30 * clones this task instance by creating exact clones of each contained 31 * instance in their order 32 * </p> 33 * 34 * @return a clone of the task instance list 35 */ 36 @Override 37 public IIterationInstance clone(); 35 38 36 /** 37 * <p> 38 * clones this task instance by creating exact clones of each contained instance in their 39 * order 40 * </p> 41 * 42 * @return a clone of the task instance list 43 */ 44 public IIterationInstance clone(); 39 /** 40 * <p> 41 * returns the task related to the instance, i.e. the iteration. 42 * </p> 43 * 44 * @return as described 45 */ 46 public IIteration getIteration(); 45 47 46 48 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IMarkingTemporalRelationship.java
r1180 r1733 17 17 /** 18 18 * <p> 19 * A marking temporal relationship defines a temporal information for exactly one node in the task 20 * model. I.e., it has only one child for which it defines a special execution characteristic. 19 * A marking temporal relationship defines a temporal information for exactly 20 * one node in the task model. I.e., it has only one child for which it defines 21 * a special execution characteristic. 21 22 * </p> 22 23 * … … 25 26 public interface IMarkingTemporalRelationship extends ITemporalRelationship { 26 27 27 /** 28 * <p> 29 * returns the task for which this relationship defines the execution characteristic. The 30 * task can be seen as the child node of this node. 31 * </p> 32 * 33 * @return as described 34 */ 35 public ITask getMarkedTask(); 28 /** 29 * <p> 30 * returns an exact copy of this temporal relationship. The clone has the 31 * same id. Its child is a clone of the child of the cloned task. A call on 32 * the method {@link #equals(ITask)} with the result of this method must 33 * return true. 34 * </p> 35 * 36 * @return as described 37 */ 38 @Override 39 public IMarkingTemporalRelationship clone(); 36 40 37 /** 38 * <p> 39 * returns an exact copy of this temporal relationship. The clone has the same id. Its child 40 * is a clone of the child of the cloned task. A call on the method {@link #equals(ITask)} 41 * with the result of this method must return true. 42 * </p> 43 * 44 * @return as described 45 */ 46 public IMarkingTemporalRelationship clone(); 41 /** 42 * <p> 43 * returns the task for which this relationship defines the execution 44 * characteristic. The task can be seen as the child node of this node. 45 * </p> 46 * 47 * @return as described 48 */ 49 public ITask getMarkedTask(); 47 50 48 51 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IOptional.java
r1180 r1733 17 17 /** 18 18 * <p> 19 * This temporal relationship defines that its single child may or may not be executed for 20 * fulfilling the task. This is most important for the parent node in the task model as this 21 * node may require that a specific subtask is optional. 19 * This temporal relationship defines that its single child may or may not be 20 * executed for fulfilling the task. This is most important for the parent node 21 * in the task model as this node may require that a specific subtask is 22 * optional. 22 23 * </p> 23 24 * … … 26 27 public interface IOptional extends IMarkingTemporalRelationship { 27 28 28 /** 29 * <p> 30 * returns an exact copy of this temporal relationship. The clone has the same id. Its child 31 * is a clone of the child of the cloned task. A call on the method {@link #equals(ITask)} 32 * with the result of this method must return true. 33 * </p> 34 * 35 * @return as described 36 */ 37 public IOptional clone(); 29 /** 30 * <p> 31 * returns an exact copy of this temporal relationship. The clone has the 32 * same id. Its child is a clone of the child of the cloned task. A call on 33 * the method {@link #equals(ITask)} with the result of this method must 34 * return true. 35 * </p> 36 * 37 * @return as described 38 */ 39 @Override 40 public IOptional clone(); 38 41 39 42 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IOptionalInstance.java
r1413 r1733 18 18 * <p> 19 19 * the instance of an {@link IOptional}. The instance may have a child being an 20 * instance of the task marked by the optional of which this is an instance. If this instance 21 * does not have a child, the optional child task was not executed. 20 * instance of the task marked by the optional of which this is an instance. If 21 * this instance does not have a child, the optional child task was not 22 * executed. 22 23 * </p> 23 24 * … … 26 27 public interface IOptionalInstance extends ITaskInstance { 27 28 28 /** 29 * <p> 30 * returns the child of the optional of null if the optional was not executed 31 * </p> 32 * 33 * @return as described 34 */ 35 public ITaskInstance getChild(); 29 /** 30 * <p> 31 * clones this task instance by creating exact clones of each contained 32 * instance 33 * </p> 34 * 35 * @return a clone of the task instance 36 */ 37 @Override 38 public IOptionalInstance clone(); 36 39 37 /** 38 * <p> 39 * returns the task related to the instance, i.e. the optional. 40 * </p> 41 * 42 * @return as described 43 */ 44 public IOptional getOptional(); 40 /** 41 * <p> 42 * returns the child of the optional of null if the optional was not 43 * executed 44 * </p> 45 * 46 * @return as described 47 */ 48 public ITaskInstance getChild(); 45 49 46 47 48 * clones this task instance by creating exact clones of each contained instance 49 50 51 * @return a clone of the task instance 52 53 public IOptionalInstance clone();50 /** 51 * <p> 52 * returns the task related to the instance, i.e. the optional. 53 * </p> 54 * 55 * @return as described 56 */ 57 public IOptional getOptional(); 54 58 55 59 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ISelection.java
r1180 r1733 17 17 /** 18 18 * <p> 19 * This temporal relationship defines that only one of its children must be executed for20 * fulfilling the represented task.19 * This temporal relationship defines that only one of its children must be 20 * executed for fulfilling the represented task. 21 21 * </p> 22 22 * … … 25 25 public interface ISelection extends IStructuringTemporalRelationship { 26 26 27 /** 28 * <p> 29 * returns an exact copy of this temporal relationship. The clone has the same id. Its children 30 * are clones of the children of the cloned task. A call on the method {@link #equals(ITask)} 31 * with the result of this method must return true. 32 * </p> 33 * 34 * @return as described 35 */ 36 public ISelection clone(); 27 /** 28 * <p> 29 * returns an exact copy of this temporal relationship. The clone has the 30 * same id. Its children are clones of the children of the cloned task. A 31 * call on the method {@link #equals(ITask)} with the result of this method 32 * must return true. 33 * </p> 34 * 35 * @return as described 36 */ 37 @Override 38 public ISelection clone(); 37 39 38 40 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ISelectionInstance.java
r1413 r1733 17 17 /** 18 18 * <p> 19 * the instance of an {@link ISelection}. The instance has a child being an instance of the child20 * task of the selection that was selected for execution.19 * the instance of an {@link ISelection}. The instance has a child being an 20 * instance of the child task of the selection that was selected for execution. 21 21 * </p> 22 22 * … … 25 25 public interface ISelectionInstance extends ITaskInstance { 26 26 27 /** 28 * <p> 29 * returns the selected child of the selection 30 * </p> 31 * 32 * @return as described 33 */ 34 public ITaskInstance getChild(); 27 /** 28 * <p> 29 * clones this task instance by creating exact clones of the contained 30 * instance 31 * </p> 32 * 33 * @return a clone of the task instance 34 */ 35 @Override 36 public ISelectionInstance clone(); 35 37 36 37 38 * returns the task related to the instance, i.e. the selection. 39 40 41 42 43 public ISelection getSelection();38 /** 39 * <p> 40 * returns the selected child of the selection 41 * </p> 42 * 43 * @return as described 44 */ 45 public ITaskInstance getChild(); 44 46 45 46 47 * clones this task instance by creating exact clones of the contained instance 48 49 50 * @return a clone of the task instance 51 52 public ISelectionInstance clone();47 /** 48 * <p> 49 * returns the task related to the instance, i.e. the selection. 50 * </p> 51 * 52 * @return as described 53 */ 54 public ISelection getSelection(); 53 55 54 56 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ISequence.java
r1180 r1733 17 17 /** 18 18 * <p> 19 * This temporal relationship defines that its children must be executed in the order they are20 * listed for fulfilling the represented task.19 * This temporal relationship defines that its children must be executed in the 20 * order they are listed for fulfilling the represented task. 21 21 * </p> 22 22 * … … 25 25 public interface ISequence extends IStructuringTemporalRelationship { 26 26 27 /** 28 * <p> 29 * returns an exact copy of this temporal relationship. The clone has the same id. Its children 30 * are clones of the children of the cloned task. A call on the method {@link #equals(ITask)} 31 * with the result of this method must return true. 32 * </p> 33 * 34 * @return as described 35 */ 36 public ISequence clone(); 27 /** 28 * <p> 29 * returns an exact copy of this temporal relationship. The clone has the 30 * same id. Its children are clones of the children of the cloned task. A 31 * call on the method {@link #equals(ITask)} with the result of this method 32 * must return true. 33 * </p> 34 * 35 * @return as described 36 */ 37 @Override 38 public ISequence clone(); 37 39 38 40 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ISequenceInstance.java
r1413 r1733 17 17 /** 18 18 * <p> 19 * the instance of an {@link ISequence}. The instance has the same number of children as the20 * sequence it represents.19 * the instance of an {@link ISequence}. The instance has the same number of 20 * children as the sequence it represents. 21 21 * </p> 22 22 * … … 25 25 public interface ISequenceInstance extends ITaskInstance, ITaskInstanceList { 26 26 27 /** 28 * <p> 29 * returns the task related to the instance, i.e. the sequence. 30 * </p> 31 * 32 * @return as described 33 */ 34 public ISequence getSequence(); 27 /** 28 * <p> 29 * clones this task instance by creating exact clones of each contained 30 * instance in their order 31 * </p> 32 * 33 * @return a clone of the task instance 34 */ 35 @Override 36 public ISequenceInstance clone(); 35 37 36 /** 37 * <p> 38 * clones this task instance by creating exact clones of each contained instance in their 39 * order 40 * </p> 41 * 42 * @return a clone of the task instance 43 */ 44 public ISequenceInstance clone(); 45 38 /** 39 * <p> 40 * returns the task related to the instance, i.e. the sequence. 41 * </p> 42 * 43 * @return as described 44 */ 45 public ISequence getSequence(); 46 46 47 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IStructuringTemporalRelationship.java
r1180 r1733 19 19 /** 20 20 * <p> 21 * A structuring temporal relationship defines a temporal information for several nodes in the task 22 * model. I.e., it has several children and defines an execution order for them. 21 * A structuring temporal relationship defines a temporal information for 22 * several nodes in the task model. I.e., it has several children and defines an 23 * execution order for them. 23 24 * </p> 24 25 * … … 27 28 public interface IStructuringTemporalRelationship extends ITemporalRelationship { 28 29 29 /** 30 * <p> 31 * returns the children of this temporal relationship. 32 * </p> 33 * 34 * @return as described 35 */ 36 public List<ITask> getChildren(); 30 /** 31 * <p> 32 * returns an exact copy of this temporal relationship. The clone has the 33 * same id. Its children are clones of the children of the cloned task. A 34 * call on the method {@link #equals(ITask)} with the result of this method 35 * must return true. 36 * </p> 37 * 38 * @return as described 39 */ 40 @Override 41 public IStructuringTemporalRelationship clone(); 37 42 38 /** 39 * <p> 40 * returns an exact copy of this temporal relationship. The clone has the same id. Its children 41 * are clones of the children of the cloned task. A call on the method {@link #equals(ITask)} 42 * with the result of this method must return true. 43 * </p> 44 * 45 * @return as described 46 */ 47 public IStructuringTemporalRelationship clone(); 43 /** 44 * <p> 45 * returns the children of this temporal relationship. 46 * </p> 47 * 48 * @return as described 49 */ 50 public List<ITask> getChildren(); 48 51 49 52 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITask.java
r1400 r1733 20 20 /** 21 21 * <p> 22 * A task represents a model for events that occur if the user interacts with a software for 23 * achieving a specific goal. A task can be a single event or a complex structure of events 24 * and temporal relationships defining the event order. Tasks may especially refer to other tasks 25 * to create task structures similar to trees. These structures fully define in which ways the 26 * events that form the task can occur. However, the structure of a task is not necessarily a 27 * tree as task structures may be reused several times in larger scale task structures. 22 * A task represents a model for events that occur if the user interacts with a 23 * software for achieving a specific goal. A task can be a single event or a 24 * complex structure of events and temporal relationships defining the event 25 * order. Tasks may especially refer to other tasks to create task structures 26 * similar to trees. These structures fully define in which ways the events that 27 * form the task can occur. However, the structure of a task is not necessarily 28 * a tree as task structures may be reused several times in larger scale task 29 * structures. 28 30 * </p> 29 31 * … … 32 34 public interface ITask extends Cloneable, Serializable { 33 35 34 /** 35 * <p> 36 * every task is assigned a unique id which is returned by this method. The id is unique for 37 * the current runtime. 38 * </p> 39 * 40 * @return as described 41 */ 42 public int getId(); 36 /** 37 * <p> 38 * implements the visitor pattern to be able to process tasks and their 39 * children. 40 * </p> 41 * 42 * @param visitor 43 * the visitor used to process the task 44 */ 45 public void accept(ITaskVisitor visitor); 43 46 44 /** 45 * <p> 46 * returns a human readable type for the task. 47 * </p> 48 * 49 * @return as described 50 */ 51 public String getType(); 47 /** 48 * <p> 49 * returns an exact copy of this task. The clone has the same id. If the 50 * task has children, they are cloned as well. A call on the method 51 * {@link #equals(ITask)} with the result of this method must return true. 52 * </p> 53 * 54 * @return as described 55 */ 56 public ITask clone(); 52 57 53 /** 54 * <p> 55 * returns a human readable description for the task. 56 * </p> 57 * 58 * @return as described 59 */ 60 public String getDescription(); 58 /** 59 * <p> 60 * checks whether this task is equal to another one. Task equality is only 61 * given, if two tasks have the same id. This means, that this method must 62 * only return true if the other task is either the same object or a clone 63 * of it. 64 * </p> 65 * 66 * @return as described 67 */ 68 public boolean equals(ITask task); 61 69 62 63 64 * returns a collection of all observed instances of this task 65 66 67 68 69 public Collection<ITaskInstance> getInstances();70 /** 71 * <p> 72 * returns a human readable description for the task. 73 * </p> 74 * 75 * @return as described 76 */ 77 public String getDescription(); 70 78 71 /** 72 * <p> 73 * returns a collection of collections of all different execution variants of this task. This 74 * is a grouping of all instances where each group contains structurally identical instances. 75 * </p> 76 * 77 * @return as described 78 */ 79 public Collection<Collection<ITaskInstance>> getExecutionVariants(); 79 /** 80 * <p> 81 * returns a collection of collections of all different execution variants 82 * of this task. This is a grouping of all instances where each group 83 * contains structurally identical instances. 84 * </p> 85 * 86 * @return as described 87 */ 88 public Collection<Collection<ITaskInstance>> getExecutionVariants(); 80 89 81 /** 82 * <p> 83 * checks whether this task is equal to another one. Task equality is only given, if two 84 * tasks have the same id. This means, that this method must only return true if the other 85 * task is either the same object or a clone of it. 86 * </p> 87 * 88 * @return as described 89 */ 90 public boolean equals(ITask task); 90 /** 91 * <p> 92 * every task is assigned a unique id which is returned by this method. The 93 * id is unique for the current runtime. 94 * </p> 95 * 96 * @return as described 97 */ 98 public int getId(); 91 99 92 93 94 * returns a hash code for the task, which is usually the id returned by {@link #getId()}. 95 96 97 98 99 public int hashCode();100 /** 101 * <p> 102 * returns a collection of all observed instances of this task 103 * </p> 104 * 105 * @return as described 106 */ 107 public Collection<ITaskInstance> getInstances(); 100 108 101 102 103 * returns an exact copy of this task. The clone has the same id. If the task has 104 * children, they are cloned as well. A call on the method {@link #equals(ITask)} with the 105 * result of this method must return true. 106 * </p> 107 * 108 * @return as described 109 */ 110 public ITask clone(); 111 112 /** 113 * <p> 114 * implements the visitor pattern to be able to process tasks and their children. 115 * </p> 116 * 117 * @param visitor the visitor used to process the task 118 */ 119 public void accept(ITaskVisitor visitor);120 109 /** 110 * <p> 111 * returns a human readable type for the task. 112 * </p> 113 * 114 * @return as described 115 */ 116 public String getType(); 117 118 /** 119 * <p> 120 * returns a hash code for the task, which is usually the id returned by 121 * {@link #getId()}. 122 * </p> 123 * 124 * @return as described 125 */ 126 @Override 127 public int hashCode(); 128 121 129 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskBuilder.java
r1294 r1733 17 17 /** 18 18 * <p> 19 * Builder for task models. Can be used to create and edit task models. May perform integrity20 * checks, though they may be incomplete as the integrity of a task model can not be ensured during21 * creation.19 * Builder for task models. Can be used to create and edit task models. May 20 * perform integrity checks, though they may be incomplete as the integrity of a 21 * task model can not be ensured during creation. 22 22 * </p> 23 23 */ 24 24 public interface ITaskBuilder { 25 25 26 /** 27 * <p> 28 * adds a child to a sequence instance. May ensure, that the child is a valid child considering 29 * the task model of the parent. In that case, an IllegalArgumentException is thrown. 30 * </p> 31 * 32 * @param instance the instance of add the child to 33 * @param child the child to be added 34 * 35 * @throws IllegalArgumentException as described 36 */ 37 void addChild(ISequenceInstance instance, ITaskInstance child) throws IllegalArgumentException; 38 39 /** 40 * <p> 41 * adds a child to an iteration instance. May ensure, that the child is a valid child 42 * considering the task model of the parent. In that case, an IllegalArgumentException is 43 * thrown. 44 * </p> 45 * 46 * @param instance the instance of add the child to 47 * @param child the child to be added 48 * 49 * @throws IllegalArgumentException as described 50 */ 51 void addChild(IIterationInstance instance, ITaskInstance child) throws IllegalArgumentException; 52 53 /** 54 * <p> 55 * sets the child of a selection instance. May ensure, that the child is a valid child 56 * considering the task model of the parent. In that case, an IllegalArgumentException is 57 * thrown. 58 * </p> 59 * 60 * @param instance the instance of add the child to 61 * @param child the child to be added 62 * 63 * @throws IllegalArgumentException as described 64 */ 65 void setChild(ISelectionInstance instance, ITaskInstance child) throws IllegalArgumentException; 66 67 /** 68 * <p> 69 * sets the child of an optional instance. May ensure, that the child is a valid child 70 * considering the task model of the parent. In that case, an IllegalArgumentException is 71 * thrown. 72 * </p> 73 * 74 * @param instance the instance of add the child to 75 * @param child the child to be added 76 * 77 * @throws IllegalArgumentException as described 78 */ 79 void setChild(IOptionalInstance instance, ITaskInstance child) throws IllegalArgumentException; 80 81 /** 82 * <p> 83 * adds a task instance to a user session 84 * </p> 85 * 86 * @param session the session to add the task instance to 87 * @param taskInstance the task instance to add 88 */ 89 void addExecutedTask(IUserSession session, ITaskInstance taskInstance); 90 91 /** 92 * <p> 93 * adds a task instance to a task instance list 94 * </p> 95 * 96 * @param taskInstanceList the list to add the task instance to 97 * @param taskInstance the task instance to add 98 */ 99 void addTaskInstance(ITaskInstanceList taskInstanceList, ITaskInstance taskInstance); 100 101 /** 102 * <p> 103 * adds a task instance to a task instance list at a specific position. Subsequent task 104 * instances will be moved one index forward 105 * </p> 106 * 107 * @param taskInstanceList the list to add the task instance to 108 * @param index the index of the task instance to add 109 * @param taskInstance the task instance to add 110 * 111 * @throws IndexOutOfBoundsException if the index is invalid 112 */ 113 void addTaskInstance(ITaskInstanceList taskInstanceList, int index, ITaskInstance taskInstance) 114 throws IndexOutOfBoundsException; 115 116 /** 117 * <p> 118 * sets a task instance in a task instance list at a specific position 119 * </p> 120 * 121 * @param taskInstanceList the list to set the task instance in 122 * @param index the index of the task instance to replace 123 * @param taskInstance the replacement for the task instance at the index 124 * 125 * @throws IndexOutOfBoundsException if the index is invalid 126 */ 127 void setTaskInstance(ITaskInstanceList taskInstanceList, int index, ITaskInstance taskInstance) 128 throws IndexOutOfBoundsException; 129 130 /** 131 * <p> 132 * sets the task model of a task instance 133 * </p> 134 * 135 * @param taskInstance the task instance to set the task model for 136 * @param task the task model of the instance 137 */ 138 void setTask(ITaskInstance taskInstance, ITask task); 139 140 /** 141 * <p> 142 * adds a child task to the end of a sequence 143 * </p> 144 * 145 * @param parent the sequence to add the child to 146 * @param child the child to be added 147 */ 148 void addChild(ISequence parent, ITask child); 149 150 /** 151 * <p> 152 * adds a child task to a specific index of a sequence 153 * </p> 154 * 155 * @param parent the sequence to add the child to 156 * @param index the index to set the child at 157 * @param child the child to be added 158 * 159 * @throws IndexOutOfBoundsException if the index is invalid 160 */ 161 void addChild(ISequence parent, int index, ITask child) 162 throws IndexOutOfBoundsException; 163 164 /** 165 * <p> 166 * replaces the child task of a sequence at a specific position 167 * </p> 168 * 169 * @param parent the sequence to replace the child in 170 * @param index the index to replace the child at 171 * @param child the child to be added 172 * 173 * @throws IndexOutOfBoundsException if the index is invalid 174 */ 175 void setChild(ISequence parent, int index, ITask child) 176 throws IndexOutOfBoundsException; 177 178 /** 179 * <p> 180 * adds a child task to a selection 181 * </p> 182 * 183 * @param parent the selection to add the child to 184 * @param child the child to be added 185 */ 186 void addChild(ISelection parent, ITask child); 187 188 /** 189 * <p> 190 * sets the child task of an iteration 191 * </p> 192 * 193 * @param iteration the iteration to set the child of 194 * @param child the child to be set 195 */ 196 void setMarkedTask(IIteration iteration, ITask child); 197 198 /** 199 * <p> 200 * sets the child task of an optional 201 * </p> 202 * 203 * @param optional the optional to set the child of 204 * @param child the child to be set 205 */ 206 void setMarkedTask(IOptional optional, ITask child); 207 208 /** 209 * <p> 210 * removes the child of a sequence at a specific position 211 * </p> 212 * 213 * @param parent the sequence of which the child must be removed 214 * @param index the index of the child to be removed 215 * 216 * @throws IndexOutOfBoundsException if the index is invalid 217 */ 218 void removeChild(ISequence parent, int index) 219 throws IndexOutOfBoundsException; 220 221 /** 222 * <p> 223 * removes a child of a selection. Ignores the call, if the child is not found 224 * (comparison using equals). 225 * </p> 226 * 227 * @param parent the selection of which the child must be removed 228 * @param child the child to be removes 229 */ 230 void removeChild(ISelection parent, ITask child); 231 232 /** 233 * <p> 234 * removes the entry of a task instance list at a specific position 235 * </p> 236 * 237 * @param taskInstanceList the task instance list of which the entry must be removed 238 * @param index the index of the entry to be removed 239 * 240 * @throws IndexOutOfBoundsException if the index is invalid 241 */ 242 void removeTaskInstance(ITaskInstanceList taskInstanceList, int index) 243 throws IndexOutOfBoundsException; 244 245 /** 246 * <p> 247 * replaces a child of a selection. Throws an IllegalArgumentException if the child is not 248 * found (comparison using equals). 249 * </p> 250 * 251 * @param parent the selection of which the child must be replace 252 * @param oldChild the child to replace 253 * @param newChild the replacement for the child 254 * 255 * @throws as described 256 */ 257 void replaceChild(ISelection parent, ITask oldChild, ITask newChild); 26 /** 27 * <p> 28 * adds a child to an iteration instance. May ensure, that the child is a 29 * valid child considering the task model of the parent. In that case, an 30 * IllegalArgumentException is thrown. 31 * </p> 32 * 33 * @param instance 34 * the instance of add the child to 35 * @param child 36 * the child to be added 37 * 38 * @throws IllegalArgumentException 39 * as described 40 */ 41 void addChild(IIterationInstance instance, ITaskInstance child) 42 throws IllegalArgumentException; 43 44 /** 45 * <p> 46 * adds a child task to a selection 47 * </p> 48 * 49 * @param parent 50 * the selection to add the child to 51 * @param child 52 * the child to be added 53 */ 54 void addChild(ISelection parent, ITask child); 55 56 /** 57 * <p> 58 * adds a child task to a specific index of a sequence 59 * </p> 60 * 61 * @param parent 62 * the sequence to add the child to 63 * @param index 64 * the index to set the child at 65 * @param child 66 * the child to be added 67 * 68 * @throws IndexOutOfBoundsException 69 * if the index is invalid 70 */ 71 void addChild(ISequence parent, int index, ITask child) 72 throws IndexOutOfBoundsException; 73 74 /** 75 * <p> 76 * adds a child task to the end of a sequence 77 * </p> 78 * 79 * @param parent 80 * the sequence to add the child to 81 * @param child 82 * the child to be added 83 */ 84 void addChild(ISequence parent, ITask child); 85 86 /** 87 * <p> 88 * adds a child to a sequence instance. May ensure, that the child is a 89 * valid child considering the task model of the parent. In that case, an 90 * IllegalArgumentException is thrown. 91 * </p> 92 * 93 * @param instance 94 * the instance of add the child to 95 * @param child 96 * the child to be added 97 * 98 * @throws IllegalArgumentException 99 * as described 100 */ 101 void addChild(ISequenceInstance instance, ITaskInstance child) 102 throws IllegalArgumentException; 103 104 /** 105 * <p> 106 * adds a task instance to a user session 107 * </p> 108 * 109 * @param session 110 * the session to add the task instance to 111 * @param taskInstance 112 * the task instance to add 113 */ 114 void addExecutedTask(IUserSession session, ITaskInstance taskInstance); 115 116 /** 117 * <p> 118 * adds a task instance to a task instance list at a specific position. 119 * Subsequent task instances will be moved one index forward 120 * </p> 121 * 122 * @param taskInstanceList 123 * the list to add the task instance to 124 * @param index 125 * the index of the task instance to add 126 * @param taskInstance 127 * the task instance to add 128 * 129 * @throws IndexOutOfBoundsException 130 * if the index is invalid 131 */ 132 void addTaskInstance(ITaskInstanceList taskInstanceList, int index, 133 ITaskInstance taskInstance) throws IndexOutOfBoundsException; 134 135 /** 136 * <p> 137 * adds a task instance to a task instance list 138 * </p> 139 * 140 * @param taskInstanceList 141 * the list to add the task instance to 142 * @param taskInstance 143 * the task instance to add 144 */ 145 void addTaskInstance(ITaskInstanceList taskInstanceList, 146 ITaskInstance taskInstance); 147 148 /** 149 * <p> 150 * removes a child of a selection. Ignores the call, if the child is not 151 * found (comparison using equals). 152 * </p> 153 * 154 * @param parent 155 * the selection of which the child must be removed 156 * @param child 157 * the child to be removes 158 */ 159 void removeChild(ISelection parent, ITask child); 160 161 /** 162 * <p> 163 * removes the child of a sequence at a specific position 164 * </p> 165 * 166 * @param parent 167 * the sequence of which the child must be removed 168 * @param index 169 * the index of the child to be removed 170 * 171 * @throws IndexOutOfBoundsException 172 * if the index is invalid 173 */ 174 void removeChild(ISequence parent, int index) 175 throws IndexOutOfBoundsException; 176 177 /** 178 * <p> 179 * removes the entry of a task instance list at a specific position 180 * </p> 181 * 182 * @param taskInstanceList 183 * the task instance list of which the entry must be removed 184 * @param index 185 * the index of the entry to be removed 186 * 187 * @throws IndexOutOfBoundsException 188 * if the index is invalid 189 */ 190 void removeTaskInstance(ITaskInstanceList taskInstanceList, int index) 191 throws IndexOutOfBoundsException; 192 193 /** 194 * <p> 195 * replaces a child of a selection. Throws an IllegalArgumentException if 196 * the child is not found (comparison using equals). 197 * </p> 198 * 199 * @param parent 200 * the selection of which the child must be replace 201 * @param oldChild 202 * the child to replace 203 * @param newChild 204 * the replacement for the child 205 * 206 * @throws as 207 * described 208 */ 209 void replaceChild(ISelection parent, ITask oldChild, ITask newChild); 210 211 /** 212 * <p> 213 * sets the child of an optional instance. May ensure, that the child is a 214 * valid child considering the task model of the parent. In that case, an 215 * IllegalArgumentException is thrown. 216 * </p> 217 * 218 * @param instance 219 * the instance of add the child to 220 * @param child 221 * the child to be added 222 * 223 * @throws IllegalArgumentException 224 * as described 225 */ 226 void setChild(IOptionalInstance instance, ITaskInstance child) 227 throws IllegalArgumentException; 228 229 /** 230 * <p> 231 * sets the child of a selection instance. May ensure, that the child is a 232 * valid child considering the task model of the parent. In that case, an 233 * IllegalArgumentException is thrown. 234 * </p> 235 * 236 * @param instance 237 * the instance of add the child to 238 * @param child 239 * the child to be added 240 * 241 * @throws IllegalArgumentException 242 * as described 243 */ 244 void setChild(ISelectionInstance instance, ITaskInstance child) 245 throws IllegalArgumentException; 246 247 /** 248 * <p> 249 * replaces the child task of a sequence at a specific position 250 * </p> 251 * 252 * @param parent 253 * the sequence to replace the child in 254 * @param index 255 * the index to replace the child at 256 * @param child 257 * the child to be added 258 * 259 * @throws IndexOutOfBoundsException 260 * if the index is invalid 261 */ 262 void setChild(ISequence parent, int index, ITask child) 263 throws IndexOutOfBoundsException; 264 265 /** 266 * <p> 267 * sets the child task of an iteration 268 * </p> 269 * 270 * @param iteration 271 * the iteration to set the child of 272 * @param child 273 * the child to be set 274 */ 275 void setMarkedTask(IIteration iteration, ITask child); 276 277 /** 278 * <p> 279 * sets the child task of an optional 280 * </p> 281 * 282 * @param optional 283 * the optional to set the child of 284 * @param child 285 * the child to be set 286 */ 287 void setMarkedTask(IOptional optional, ITask child); 288 289 /** 290 * <p> 291 * sets the task model of a task instance 292 * </p> 293 * 294 * @param taskInstance 295 * the task instance to set the task model for 296 * @param task 297 * the task model of the instance 298 */ 299 void setTask(ITaskInstance taskInstance, ITask task); 300 301 /** 302 * <p> 303 * sets a task instance in a task instance list at a specific position 304 * </p> 305 * 306 * @param taskInstanceList 307 * the list to set the task instance in 308 * @param index 309 * the index of the task instance to replace 310 * @param taskInstance 311 * the replacement for the task instance at the index 312 * 313 * @throws IndexOutOfBoundsException 314 * if the index is invalid 315 */ 316 void setTaskInstance(ITaskInstanceList taskInstanceList, int index, 317 ITaskInstance taskInstance) throws IndexOutOfBoundsException; 258 318 259 319 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskFactory.java
r1294 r1733 28 28 public interface ITaskFactory { 29 29 30 /** 31 * <p> 32 * creates a new event task with the given description 33 * </p> 34 * 35 * @param description the description for the represented events 36 * 37 * @return the event task 38 */ 39 IEventTask createNewEventTask(String description); 30 /** 31 * <p> 32 * creates a new event task with the given description 33 * </p> 34 * 35 * @param description 36 * the description for the represented events 37 * 38 * @return the event task 39 */ 40 IEventTask createNewEventTask(String description); 40 41 41 42 43 * creates a new empty sequence 44 45 46 * @return the sequence 47 48 ISequence createNewSequence();42 /** 43 * <p> 44 * creates a new empty iteration 45 * </p> 46 * 47 * @return the iteration 48 */ 49 IIteration createNewIteration(); 49 50 50 51 52 * creates a new empty iteration 53 54 55 * @return the iteration 56 57 IIteration createNewIteration();51 /** 52 * <p> 53 * creates a new empty optional 54 * </p> 55 * 56 * @return the optional 57 */ 58 IOptional createNewOptional(); 58 59 59 60 61 * creates a new empty optional 62 63 64 * @return the optional 65 66 IOptional createNewOptional();60 /** 61 * <p> 62 * creates a new empty selection 63 * </p> 64 * 65 * @return the selection 66 */ 67 ISelection createNewSelection(); 67 68 68 69 70 * creates a new empty selection 71 72 73 * @return the selection 74 75 ISelection createNewSelection();69 /** 70 * <p> 71 * creates a new empty sequence 72 * </p> 73 * 74 * @return the sequence 75 */ 76 ISequence createNewSequence(); 76 77 77 /** 78 * <p> 79 * creates a new task instance with the given task as its model representing the provided event 80 * </p> 81 * 82 * @param task the model of the task instance to be created 83 * @param event the event represented by the task instance 84 * 85 * @return the task instance 86 */ 87 IEventTaskInstance createNewTaskInstance(IEventTask task, Event event); 78 /** 79 * <p> 80 * creates a new task instance with the given task as its model representing 81 * the provided event 82 * </p> 83 * 84 * @param task 85 * the model of the task instance to be created 86 * @param event 87 * the event represented by the task instance 88 * 89 * @return the task instance 90 */ 91 IEventTaskInstance createNewTaskInstance(IEventTask task, Event event); 88 92 89 /** 90 * <p> 91 * creates a new task instance with the given sequence as its model 92 * </p> 93 * 94 * @param sequence the model of the task instance to be created 95 * 96 * @return the task instance 97 */ 98 ISequenceInstance createNewTaskInstance(ISequence sequence); 93 /** 94 * <p> 95 * creates a new task instance with the given iteration as its model 96 * </p> 97 * 98 * @param iteration 99 * the model of the task instance to be created 100 * 101 * @return the task instance 102 */ 103 IIterationInstance createNewTaskInstance(IIteration iteration); 99 104 100 /** 101 * <p> 102 * creates a new task instance with the given iteration as its model 103 * </p> 104 * 105 * @param iteration the model of the task instance to be created 106 * 107 * @return the task instance 108 */ 109 IIterationInstance createNewTaskInstance(IIteration iteration); 105 /** 106 * <p> 107 * creates a new task instance with the given optional as its model 108 * </p> 109 * 110 * @param optional 111 * the model of the task instance to be created 112 * 113 * @return the task instance 114 */ 115 IOptionalInstance createNewTaskInstance(IOptional optional); 110 116 111 /** 112 * <p> 113 * creates a new task instance with the given optional as its model 114 * </p> 115 * 116 * @param optional the model of the task instance to be created 117 * 118 * @return the task instance 119 */ 120 IOptionalInstance createNewTaskInstance(IOptional optional); 117 /** 118 * <p> 119 * creates a new task instance with the given selection as its model 120 * </p> 121 * 122 * @param selection 123 * the model of the task instance to be created 124 * 125 * @return the task instance 126 */ 127 ISelectionInstance createNewTaskInstance(ISelection selection); 121 128 122 /** 123 * <p> 124 * creates a new task instance with the given selection as its model 125 * </p> 126 * 127 * @param selection the model of the task instance to be created 128 * 129 * @return the task instance 130 */ 131 ISelectionInstance createNewTaskInstance(ISelection selection); 129 /** 130 * <p> 131 * creates a new task instance with the given sequence as its model 132 * </p> 133 * 134 * @param sequence 135 * the model of the task instance to be created 136 * 137 * @return the task instance 138 */ 139 ISequenceInstance createNewTaskInstance(ISequence sequence); 132 140 133 /** 134 * <p> 135 * creates a new empty user session 136 * </p> 137 * 138 * @return the user session 139 */ 140 IUserSession createUserSession(); 141 /** 142 * <p> 143 * creates a task model based on the provided user sessions 144 * </p> 145 * 146 * @param userSessions 147 * the session based on which the task model shall be created 148 * 149 * @return the task model 150 */ 151 ITaskModel createTaskModel(List<IUserSession> userSessions); 141 152 142 /** 143 * <p> 144 * creates a task model based on the provided user sessions 145 * </p> 146 * 147 * @param userSessions the session based on which the task model shall be created 148 * 149 * @return the task model 150 */ 151 ITaskModel createTaskModel(List<IUserSession> userSessions); 153 /** 154 * <p> 155 * creates a new empty user session 156 * </p> 157 * 158 * @return the user session 159 */ 160 IUserSession createUserSession(); 152 161 153 162 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInfo.java
r1428 r1733 17 17 /** 18 18 * <p> 19 * Provides extended information about a specific task, such as statistics about task occurrences, 20 * etc. It contains measures for different metrics determined for a task. 19 * Provides extended information about a specific task, such as statistics about 20 * task occurrences, etc. It contains measures for different metrics determined 21 * for a task. 21 22 * </p> 22 23 * … … 25 26 public interface ITaskInfo { 26 27 27 28 29 * returns the task to which these infos belong 30 31 32 * @return as described 33 34 public ITask getTask(); 28 /** 29 * <p> 30 * represents a measure for a specific metric 31 * </p> 32 * 33 * @author Patrick Harms 34 */ 35 public interface IMeasure { 35 36 36 37 38 * returns all available measures 39 40 41 42 43 public IMeasure[] getMeasures();37 /** 38 * <p> 39 * returns the metric of the measure 40 * </p> 41 * 42 * @return as described 43 */ 44 public TaskMetric getMetric(); 44 45 45 /** 46 * <p> 47 * returns the value of the measure identified through the given metric 48 * </p> 49 * 50 * @param metric the metric for which the value is to be returned 51 * 52 * @return as described 53 */ 54 public int getMeasureValue(TaskMetric metric); 46 /** 47 * <p> 48 * returns the value of the measure 49 * </p> 50 * 51 * @return as described 52 */ 53 public int getValue(); 55 54 56 /** 57 * <p> 58 * returns the value of the measure identified through the given metric if the task is 59 * observed in the given context, i.e. parent task. The result is Integer.MIN_VALUE if there 60 * is no value for this measure in a context. 61 * </p> 62 * 63 * @param metric the metric for which the value is to be returned 64 * @param context the context for which the measure value is to be returned 65 * 66 * @return as described 67 */ 68 public int getMeasureValue(TaskMetric metric, ITask context); 55 /** 56 * <p> 57 * returns the value of the measure if the task was observed in a 58 * specific context, i.e. parent task 59 * </p> 60 * 61 * @return as described 62 */ 63 public int getValue(ITask context); 69 64 70 /** 71 * <p> 72 * represents a measure for a specific metric 73 * </p> 74 * 75 * @author Patrick Harms 76 */ 77 public interface IMeasure { 78 79 /** 80 * <p> 81 * returns the metric of the measure 82 * </p> 83 * 84 * @return as described 85 */ 86 public TaskMetric getMetric(); 87 88 /** 89 * <p> 90 * returns the value of the measure 91 * </p> 92 * 93 * @return as described 94 */ 95 public int getValue(); 96 97 /** 98 * <p> 99 * returns the value of the measure if the task was observed in a specific context, i.e. 100 * parent task 101 * </p> 102 * 103 * @return as described 104 */ 105 public int getValue(ITask context); 106 107 } 65 } 66 67 /** 68 * <p> 69 * returns all available measures 70 * </p> 71 * 72 * @return as described 73 */ 74 public IMeasure[] getMeasures(); 75 76 /** 77 * <p> 78 * returns the value of the measure identified through the given metric 79 * </p> 80 * 81 * @param metric 82 * the metric for which the value is to be returned 83 * 84 * @return as described 85 */ 86 public int getMeasureValue(TaskMetric metric); 87 88 /** 89 * <p> 90 * returns the value of the measure identified through the given metric if 91 * the task is observed in the given context, i.e. parent task. The result 92 * is Integer.MIN_VALUE if there is no value for this measure in a context. 93 * </p> 94 * 95 * @param metric 96 * the metric for which the value is to be returned 97 * @param context 98 * the context for which the measure value is to be returned 99 * 100 * @return as described 101 */ 102 public int getMeasureValue(TaskMetric metric, ITask context); 103 104 /** 105 * <p> 106 * returns the task to which these infos belong 107 * </p> 108 * 109 * @return as described 110 */ 111 public ITask getTask(); 108 112 109 113 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInstance.java
r1405 r1733 19 19 /** 20 20 * <p> 21 * a task instance represents the execution of a specific task within a user session. A task22 * instance is always related to the task that was executed.21 * a task instance represents the execution of a specific task within a user 22 * session. A task instance is always related to the task that was executed. 23 23 * </p> 24 24 * … … 27 27 public interface ITaskInstance extends Serializable, Cloneable { 28 28 29 /** 30 * <p> 31 * returns the task related to the instance. 32 * </p> 33 * 34 * @return as described 35 */ 36 public ITask getTask(); 29 /** 30 * <p> 31 * implements the visitor pattern to be able to process task instances and 32 * their children. 33 * </p> 34 * 35 * @param visitor 36 * the visitor used to process the task 37 */ 38 public void accept(ITaskInstanceVisitor visitor); 37 39 38 /** 39 * <p> 40 * compares an instance to another one. Returns true if both instances are the same, i.e. not 41 * only the related task is equal but also all children and further characteristics of the 42 * task instance 43 * </p> 44 * 45 * @param taskInstance the instance to compare to 46 * 47 * @return as described 48 */ 49 public boolean equals(ITaskInstance taskInstance); 40 /** 41 * <p> 42 * clones a task instance by creating exact clones of each contained child 43 * instance as well as the related task. Furthermore, all other non 44 * transient information of the task instance must be cloned. 45 * </p> 46 * 47 * @return a clone of the task instance 48 */ 49 public ITaskInstance clone(); 50 50 51 /** 52 * <p> 53 * returns a hash code for the task instance to be able to put it into hash maps 54 * </p> 55 * 56 * @return as described 57 */ 58 public int hashCode(); 51 /** 52 * <p> 53 * compares an instance to another one. Returns true if both instances are 54 * the same, i.e. not only the related task is equal but also all children 55 * and further characteristics of the task instance 56 * </p> 57 * 58 * @param taskInstance 59 * the instance to compare to 60 * 61 * @return as described 62 */ 63 public boolean equals(ITaskInstance taskInstance); 59 64 60 /** 61 * <p> 62 * clones a task instance by creating exact clones of each contained child instance as well 63 * as the related task. Furthermore, all other non transient information of the task 64 * instance must be cloned. 65 * </p> 66 * 67 * @return a clone of the task instance 68 */ 69 public ITaskInstance clone(); 65 /** 66 * <p> 67 * returns the task related to the instance. 68 * </p> 69 * 70 * @return as described 71 */ 72 public ITask getTask(); 70 73 71 /** 72 * <p> 73 * implements the visitor pattern to be able to process task instances and their children. 74 * </p> 75 * 76 * @param visitor the visitor used to process the task 77 */ 78 public void accept(ITaskInstanceVisitor visitor); 79 74 /** 75 * <p> 76 * returns a hash code for the task instance to be able to put it into hash 77 * maps 78 * </p> 79 * 80 * @return as described 81 */ 82 @Override 83 public int hashCode(); 84 80 85 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInstanceList.java
r1350 r1733 19 19 /** 20 20 * <p> 21 * represents a serializable and iterable representation of a read only list of task 22 * instances. The list is ordered. It does not provide methods for changing it. 21 * represents a serializable and iterable representation of a read only list of 22 * task instances. The list is ordered. It does not provide methods for changing 23 * it. 23 24 * </p> 24 25 * 25 26 * @author Patrick Harms 26 27 */ 27 public interface ITaskInstanceList extends Cloneable, Serializable, Iterable<ITaskInstance> { 28 public interface ITaskInstanceList extends Cloneable, Serializable, 29 Iterable<ITaskInstance> { 28 30 29 /** 30 * <p> 31 * returns the task instance at the position with the given index. May throw an exception 32 * if the index is invalid. 33 * </p> 34 * 35 * @param index the index of the task instance to be returned 36 * 37 * @return the task instance at the given index 38 */ 39 public ITaskInstance get(int index); 31 /** 32 * <p> 33 * returns the task instance at the position with the given index. May throw 34 * an exception if the index is invalid. 35 * </p> 36 * 37 * @param index 38 * the index of the task instance to be returned 39 * 40 * @return the task instance at the given index 41 */ 42 public ITaskInstance get(int index); 40 43 41 /** 42 * <p> 43 * returns the size of the list, i.e. the number of task instances in the list 44 * </p> 45 * 46 * @return as described 47 */ 48 public int size(); 44 /** 45 * <p> 46 * returns the size of the list, i.e. the number of task instances in the 47 * list 48 * </p> 49 * 50 * @return as described 51 */ 52 public int size(); 49 53 50 54 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInstanceVisitor.java
r1405 r1733 15 15 package de.ugoe.cs.autoquest.tasktrees.treeifc; 16 16 17 18 17 /** 19 18 * <p> 20 * This is an implementation of the visitor pattern. Through this, it is possible to effectively21 * p rocess a task instance tree.19 * This is an implementation of the visitor pattern. Through this, it is 20 * possible to effectively process a task instance tree. 22 21 * </p> 23 22 * … … 26 25 public interface ITaskInstanceVisitor { 27 26 28 /** 29 * <p> 30 * method called for each visited event task instance. 31 * </p> 32 * 33 * @param eventTaskInstance the event task instance to be processed 34 */ 35 public void visit(IEventTaskInstance eventTaskInstance); 36 37 /** 38 * <p> 39 * method called for each visited iteration instance. 40 * </p> 41 * 42 * @param iterationInstance the iteration instance to be processed 43 */ 44 public void visit(IIterationInstance iterationInstance); 45 46 /** 47 * <p> 48 * method called for each visited optional instance. 49 * </p> 50 * 51 * @param optionalInstance the optional instance to be processed 52 */ 53 public void visit(IOptionalInstance optionalInstance); 54 55 /** 56 * <p> 57 * method called for each visited selection instance. 58 * </p> 59 * 60 * @param selectionInstance the selection instance to be processed 61 */ 62 public void visit(ISelectionInstance selectionInstance); 63 64 /** 65 * <p> 66 * method called for each visited sequence instance. 67 * </p> 68 * 69 * @param sequenceInstance the sequence instance to be processed 70 */ 71 public void visit(ISequenceInstance sequenceInstance); 27 /** 28 * <p> 29 * method called for each visited event task instance. 30 * </p> 31 * 32 * @param eventTaskInstance 33 * the event task instance to be processed 34 */ 35 public void visit(IEventTaskInstance eventTaskInstance); 72 36 73 /** 74 * <p> 75 * method called for each other kind of visited task instance (implemented to support future 76 * versions). 77 * </p> 78 * 79 * @param taskInstance the task instance to be processed 80 */ 81 public void visit(ITaskInstance taskInstance); 82 37 /** 38 * <p> 39 * method called for each visited iteration instance. 40 * </p> 41 * 42 * @param iterationInstance 43 * the iteration instance to be processed 44 */ 45 public void visit(IIterationInstance iterationInstance); 46 47 /** 48 * <p> 49 * method called for each visited optional instance. 50 * </p> 51 * 52 * @param optionalInstance 53 * the optional instance to be processed 54 */ 55 public void visit(IOptionalInstance optionalInstance); 56 57 /** 58 * <p> 59 * method called for each visited selection instance. 60 * </p> 61 * 62 * @param selectionInstance 63 * the selection instance to be processed 64 */ 65 public void visit(ISelectionInstance selectionInstance); 66 67 /** 68 * <p> 69 * method called for each visited sequence instance. 70 * </p> 71 * 72 * @param sequenceInstance 73 * the sequence instance to be processed 74 */ 75 public void visit(ISequenceInstance sequenceInstance); 76 77 /** 78 * <p> 79 * method called for each other kind of visited task instance (implemented 80 * to support future versions). 81 * </p> 82 * 83 * @param taskInstance 84 * the task instance to be processed 85 */ 86 public void visit(ITaskInstance taskInstance); 87 83 88 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskModel.java
r1423 r1733 21 21 /** 22 22 * <p> 23 * This class represents a complete task model. A task model within AutoQUEST is usually generated 24 * based on user sessions. Therefore, the task model consists of the user sessions, the models 25 * of the identified tasks, as well as further information about the tasks (e.g. their 26 * occurrence count) for statistical processing. 23 * This class represents a complete task model. A task model within AutoQUEST is 24 * usually generated based on user sessions. Therefore, the task model consists 25 * of the user sessions, the models of the identified tasks, as well as further 26 * information about the tasks (e.g. their occurrence count) for statistical 27 * processing. 27 28 * </p> 28 29 * … … 31 32 public interface ITaskModel extends Cloneable, Serializable { 32 33 33 /** 34 * <p> 35 * returns the user sessions belonging to the model. The return value may be null in the case 36 * no user sessions are associated the the tasks in the model. 37 * </p> 38 * 39 * @return as described 40 */ 41 public List<IUserSession> getUserSessions(); 34 /** 35 * <p> 36 * creates a deep clone of the model including all tasks and user sessions. 37 * </p> 38 * 39 * @return as described 40 */ 41 public ITaskModel clone(); 42 42 43 44 45 * returns the tasks belonging to the model. The return value must not be null. However, 46 * it may be an empty list, if the model is an empty model. 47 48 * 49 50 51 public Collection<ITask> getTasks();43 /** 44 * <p> 45 * returns a list of all metrics calculated by this model for the tasks and 46 * stored in the respective task infos 47 * </p> 48 * 49 * @return as described 50 */ 51 public TaskMetric[] getAllMetrics(); 52 52 53 54 55 * returns additional info for the provided task. The method returns null, if the provided 56 *task does not belong to the model.57 58 59 60 61 53 /** 54 * <p> 55 * returns additional info for the provided task. The method returns null, 56 * if the provided task does not belong to the model. 57 * </p> 58 * 59 * @return as described 60 */ 61 public ITaskInfo getTaskInfo(ITask task); 62 62 63 64 65 * returns a list of all metrics calculated by this model for the tasks and stored in the66 * respective task infos 67 68 * 69 70 71 public TaskMetric[] getAllMetrics();63 /** 64 * <p> 65 * returns the tasks belonging to the model. The return value must not be 66 * null. However, it may be an empty list, if the model is an empty model. 67 * </p> 68 * 69 * @return as described 70 */ 71 public Collection<ITask> getTasks(); 72 72 73 /** 74 * <p> 75 * creates a deep clone of the model including all tasks and user sessions. 76 * </p> 77 * 78 * @return as described 79 */ 80 public ITaskModel clone(); 73 /** 74 * <p> 75 * returns the user sessions belonging to the model. The return value may be 76 * null in the case no user sessions are associated the the tasks in the 77 * model. 78 * </p> 79 * 80 * @return as described 81 */ 82 public List<IUserSession> getUserSessions(); 81 83 82 84 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskVisitor.java
r1213 r1733 15 15 package de.ugoe.cs.autoquest.tasktrees.treeifc; 16 16 17 18 17 /** 19 18 * <p> 20 * This is an implementation of the visitor pattern. Through this, it is possible to effectively21 * p rocess a task model.19 * This is an implementation of the visitor pattern. Through this, it is 20 * possible to effectively process a task model. 22 21 * </p> 23 22 * … … 26 25 public interface ITaskVisitor { 27 26 28 /** 29 * <p> 30 * method called for each visited event task. 31 * </p> 32 * 33 * @param eventTask the event task to be processed 34 */ 35 public void visit(IEventTask eventTask); 36 37 /** 38 * <p> 39 * method called for each visited iteration. 40 * </p> 41 * 42 * @param iteration the iteration to be processed 43 */ 44 public void visit(IIteration iteration); 45 46 /** 47 * <p> 48 * method called for each visited optional. 49 * </p> 50 * 51 * @param optional the optional to be processed 52 */ 53 public void visit(IOptional optional); 54 55 /** 56 * <p> 57 * method called for each visited selection. 58 * </p> 59 * 60 * @param selection the selection to be processed 61 */ 62 public void visit(ISelection selection); 63 64 /** 65 * <p> 66 * method called for each visited sequence. 67 * </p> 68 * 69 * @param sequence the sequence to be processed 70 */ 71 public void visit(ISequence sequence); 27 /** 28 * <p> 29 * method called for each visited event task. 30 * </p> 31 * 32 * @param eventTask 33 * the event task to be processed 34 */ 35 public void visit(IEventTask eventTask); 72 36 73 /** 74 * <p> 75 * method called for each other kind of visited task (implemented to support future versions). 76 * </p> 77 * 78 * @param task the task to be processed 79 */ 80 public void visit(ITask task); 81 37 /** 38 * <p> 39 * method called for each visited iteration. 40 * </p> 41 * 42 * @param iteration 43 * the iteration to be processed 44 */ 45 public void visit(IIteration iteration); 46 47 /** 48 * <p> 49 * method called for each visited optional. 50 * </p> 51 * 52 * @param optional 53 * the optional to be processed 54 */ 55 public void visit(IOptional optional); 56 57 /** 58 * <p> 59 * method called for each visited selection. 60 * </p> 61 * 62 * @param selection 63 * the selection to be processed 64 */ 65 public void visit(ISelection selection); 66 67 /** 68 * <p> 69 * method called for each visited sequence. 70 * </p> 71 * 72 * @param sequence 73 * the sequence to be processed 74 */ 75 public void visit(ISequence sequence); 76 77 /** 78 * <p> 79 * method called for each other kind of visited task (implemented to support 80 * future versions). 81 * </p> 82 * 83 * @param task 84 * the task to be processed 85 */ 86 public void visit(ITask task); 87 82 88 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITemporalRelationship.java
r1180 r1733 17 17 /** 18 18 * <p> 19 * A temporal relationship is a node in a task model which is no leaf node. They are used to 20 * structure the tasks in a task model into useful orders. A temporal relationship defines through 21 * its type how its children can be executed to fulfill the task they represent themselves. E.g., 22 * the task of filling out a form can be subdivided into several subtasks for filling out the 23 * different elements of the. The task itself will define the order, in which the fill out process 24 * can and must be done. 19 * A temporal relationship is a node in a task model which is no leaf node. They 20 * are used to structure the tasks in a task model into useful orders. A 21 * temporal relationship defines through its type how its children can be 22 * executed to fulfill the task they represent themselves. E.g., the task of 23 * filling out a form can be subdivided into several subtasks for filling out 24 * the different elements of the. The task itself will define the order, in 25 * which the fill out process can and must be done. 25 26 * </p> 26 27 * … … 29 30 public interface ITemporalRelationship extends ITask { 30 31 31 /** 32 * <p> 33 * returns an exact copy of this temporal relationship. The clone has the same id. Its children 34 * are clones of the children of the cloned task. A call on the method {@link #equals(ITask)} 35 * with the result of this method must return true. 36 * </p> 37 * 38 * @return as described 39 */ 40 public ITemporalRelationship clone(); 32 /** 33 * <p> 34 * returns an exact copy of this temporal relationship. The clone has the 35 * same id. Its children are clones of the children of the cloned task. A 36 * call on the method {@link #equals(ITask)} with the result of this method 37 * must return true. 38 * </p> 39 * 40 * @return as described 41 */ 42 @Override 43 public ITemporalRelationship clone(); 41 44 42 45 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IUserSession.java
r1177 r1733 19 19 /** 20 20 * <p> 21 * A user session represents task executions, i.e. a task instances of a specific user that were 22 * executed in a coherent manner. Therefore, they are an ordered list of task instances where 23 * the order denotes the order of the task executions. 21 * A user session represents task executions, i.e. a task instances of a 22 * specific user that were executed in a coherent manner. Therefore, they are an 23 * ordered list of task instances where the order denotes the order of the task 24 * executions. 24 25 * </p> 25 26 * … … 28 29 public interface IUserSession extends ITaskInstanceList { 29 30 30 /** 31 * <p> 32 * returns the list of task instances executed in the represented session. 33 * </p> 34 * 35 * @return as described 36 */ 37 public List<ITaskInstance> getExecutedTasks(); 38 39 /** 40 * <p> 41 * compares the user session with another one. Two user sessions are only equal, if they 42 * contain the same number of task instances and if each task instance at each position is 43 * equal to the respective other session. 44 * </p> 45 * 46 * @param userSession the session to compare the session to 47 * 48 * @return true if both sessions are equal, false else 49 */ 50 public boolean equals(IUserSession userSession); 31 /** 32 * <p> 33 * clones a user session by creating exact clones of each contained instance 34 * in their order 35 * </p> 36 * 37 * @return a clone of the session 38 */ 39 public IUserSession clone(); 51 40 52 /** 53 * <p> 54 * returns a hash code for the session to be able to store the session in a hash map. 55 * </p> 56 * 57 * @return as described 58 */ 59 public int hashCode(); 41 /** 42 * <p> 43 * compares the user session with another one. Two user sessions are only 44 * equal, if they contain the same number of task instances and if each task 45 * instance at each position is equal to the respective other session. 46 * </p> 47 * 48 * @param userSession 49 * the session to compare the session to 50 * 51 * @return true if both sessions are equal, false else 52 */ 53 public boolean equals(IUserSession userSession); 60 54 61 /** 62 * <p> 63 * clones a user session by creating exact clones of each contained instance in their order 64 * </p> 65 * 66 * @return a clone of the session 67 */ 68 public IUserSession clone(); 55 /** 56 * <p> 57 * returns the list of task instances executed in the represented session. 58 * </p> 59 * 60 * @return as described 61 */ 62 public List<ITaskInstance> getExecutedTasks(); 63 64 /** 65 * <p> 66 * returns a hash code for the session to be able to store the session in a 67 * hash map. 68 * </p> 69 * 70 * @return as described 71 */ 72 @Override 73 public int hashCode(); 69 74 70 75 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/TaskMetric.java
r1494 r1733 19 19 /** 20 20 * <p> 21 * represents different metrics available or calculatable for tasks. Measure for the metrics 22 * are calculated by a task model and added to the task infos of a specific task. 21 * represents different metrics available or calculatable for tasks. Measure for 22 * the metrics are calculated by a task model and added to the task infos of a 23 * specific task. 23 24 * </p> 24 25 * … … 27 28 public enum TaskMetric { 28 29 29 COUNT("count", "number of all occurrences of the task in the model"), 30 DEPTH("depth", 31 "the maximum depth of the task, i.e., the number of children levels including the " + 32 "level of the task itself"), 33 EVENT_COVERAGE("covered events", "number of all event task instances covered by the task"), 34 EVENT_COVERAGE_RATIO("event coverage ratio", 35 "the ratio of events covered by this task in relation to all events " + 36 "covered by all tasks in their instances in per mille", 0.1, "%"), 37 EVENT_COVERAGE_QUANTILE("event coverage ratio quantile", 38 "the quantile of with respect to all event coverages begining with " + 39 "the lowest", 0.1, "%"); 40 41 /** 42 * <p> 43 * the name of the metric 44 * </p> 45 */ 46 private String name; 47 48 /** 49 * <p> 50 * a human readable description of the metric 51 * </p> 52 */ 53 private String description; 30 COUNT("count", "number of all occurrences of the task in the model"), DEPTH( 31 "depth", 32 "the maximum depth of the task, i.e., the number of children levels including the " 33 + "level of the task itself"), EVENT_COVERAGE( 34 "covered events", 35 "number of all event task instances covered by the task"), EVENT_COVERAGE_RATIO( 36 "event coverage ratio", 37 "the ratio of events covered by this task in relation to all events " 38 + "covered by all tasks in their instances in per mille", 39 0.1, "%"), EVENT_COVERAGE_QUANTILE("event coverage ratio quantile", 40 "the quantile of with respect to all event coverages begining with " 41 + "the lowest", 0.1, "%"); 54 42 55 /** 56 * <p> 57 * a scale applied for the metric when formatting the value 58 * </p> 59 */ 60 private double formatScale; 61 62 /** 63 * <p> 64 * the unit of the metric used when formatting the value 65 * </p> 66 */ 67 private String formatUnit; 68 69 /** 70 * <p> 71 * initializes the metric with a name and a description 72 * </p> 73 */ 74 private TaskMetric(String name, String description) { 75 this.name = name; 76 this.description = description; 77 this.formatScale = 1.0; 78 this.formatUnit = null; 79 } 43 /** 44 * <p> 45 * the name of the metric 46 * </p> 47 */ 48 private String name; 80 49 81 /** 82 * <p> 83 * initializes the metric with a name and a description, as well as with a scale and a unit for 84 * formatting it. 85 * </p> 86 */ 87 private TaskMetric(String name, String description, double formatScale, String formatUnit) { 88 this.name = name; 89 this.description = description; 90 this.formatScale = formatScale; 91 this.formatUnit = formatUnit; 92 } 50 /** 51 * <p> 52 * a human readable description of the metric 53 * </p> 54 */ 55 private String description; 93 56 94 /** 95 * <p> 96 * returns the name of the metric 97 * </p> 98 * 99 * @return the name of the metric 100 */ 101 public String getName() { 102 return name; 103 } 57 /** 58 * <p> 59 * a scale applied for the metric when formatting the value 60 * </p> 61 */ 62 private double formatScale; 104 63 105 /** 106 * <p> 107 * returns the human readable description of the metric 108 * </p> 109 * 110 * @return the human readable description of the metric 111 */ 112 public String getDescription() { 113 return description; 114 } 115 116 /** 117 * <p> 118 * formats the provided value of a measure of the metric using the internal format scale and 119 * unit. 120 * </p> 121 * 122 * @return the formatted value depending on the scale and unit of the metric 123 */ 124 public String formatValue(int value) { 125 String formattedValue; 126 127 if (formatScale != 1.0) { 128 double effectiveValue = formatScale * value; 129 formattedValue = new DecimalFormat( "#,##0.0;(#)").format(effectiveValue); 130 } 131 else { 132 formattedValue = Integer.toString(value); 133 } 134 135 if (formatUnit != null) { 136 formattedValue += formatUnit; 137 } 138 139 return formattedValue; 140 } 64 /** 65 * <p> 66 * the unit of the metric used when formatting the value 67 * </p> 68 */ 69 private String formatUnit; 70 71 /** 72 * <p> 73 * initializes the metric with a name and a description 74 * </p> 75 */ 76 private TaskMetric(String name, String description) { 77 this.name = name; 78 this.description = description; 79 this.formatScale = 1.0; 80 this.formatUnit = null; 81 } 82 83 /** 84 * <p> 85 * initializes the metric with a name and a description, as well as with a 86 * scale and a unit for formatting it. 87 * </p> 88 */ 89 private TaskMetric(String name, String description, double formatScale, 90 String formatUnit) { 91 this.name = name; 92 this.description = description; 93 this.formatScale = formatScale; 94 this.formatUnit = formatUnit; 95 } 96 97 /** 98 * <p> 99 * formats the provided value of a measure of the metric using the internal 100 * format scale and unit. 101 * </p> 102 * 103 * @return the formatted value depending on the scale and unit of the metric 104 */ 105 public String formatValue(int value) { 106 String formattedValue; 107 108 if (formatScale != 1.0) { 109 final double effectiveValue = formatScale * value; 110 formattedValue = new DecimalFormat("#,##0.0;(#)") 111 .format(effectiveValue); 112 } else { 113 formattedValue = Integer.toString(value); 114 } 115 116 if (formatUnit != null) { 117 formattedValue += formatUnit; 118 } 119 120 return formattedValue; 121 } 122 123 /** 124 * <p> 125 * returns the human readable description of the metric 126 * </p> 127 * 128 * @return the human readable description of the metric 129 */ 130 public String getDescription() { 131 return description; 132 } 133 134 /** 135 * <p> 136 * returns the name of the metric 137 * </p> 138 * 139 * @return the name of the metric 140 */ 141 public String getName() { 142 return name; 143 } 141 144 }
Note: See TracChangeset
for help on using the changeset viewer.