[922] | 1 | package de.ugoe.cs.autoquest.tasktrees.temporalrelation; |
---|
[439] | 2 | |
---|
[922] | 3 | import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeBuilder; |
---|
| 4 | import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; |
---|
| 5 | import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNodeFactory; |
---|
[439] | 6 | |
---|
| 7 | /** |
---|
[809] | 8 | * <p> |
---|
| 9 | * a temporal relation ship is able to detected temporal relationships between the child nodes |
---|
| 10 | * of the parent node provided to the |
---|
| 11 | * {@link #apply(ITaskTreeNode, ITaskTreeBuilder, ITaskTreeNodeFactory, boolean)} method. A rule |
---|
| 12 | * created temporal relationships between the child nodes, i.e. substructures in the task tree, if |
---|
| 13 | * it detects a temporal relationship and it can be sure that it is complete. Incomplete but |
---|
| 14 | * detected temporal relationships may occur, if there can be more children expected to be added |
---|
| 15 | * to the provided parent node. This could be the case during parsing a interaction log file of |
---|
| 16 | * a GUI. |
---|
| 17 | * </p> |
---|
[439] | 18 | * |
---|
[809] | 19 | * @author Patrick Harms |
---|
[439] | 20 | */ |
---|
[809] | 21 | interface TemporalRelationshipRule { |
---|
[439] | 22 | |
---|
| 23 | /** |
---|
[809] | 24 | * <p> |
---|
| 25 | * applies the rule to the given parent node. The provided builder and node factory are used |
---|
| 26 | * to create substructures in the task tree for the identified temporal relationships. The |
---|
| 27 | * finalize parameter is used to command the rule to finish rule applications, in the case it |
---|
| 28 | * is known that no further data will be available. |
---|
| 29 | * </p> |
---|
| 30 | * <p> |
---|
| 31 | * The returned rule application result is null, if the rule can not be applied, i.e. it does not |
---|
| 32 | * detect a temporal relationship. It returns a rule application result with a status |
---|
| 33 | * {@link RuleApplicationStatus#RULE_APPLICATION_FINISHED} if the rule was applied. The result |
---|
| 34 | * contains all newly created parent nodes. It returns a rule application result with status |
---|
| 35 | * {@link RuleApplicationStatus#RULE_APPLICATION_FEASIBLE} if the rule would be applicable if |
---|
| 36 | * further children would be available in the parent node. This status MUST not be returned if |
---|
| 37 | * the finalize parameter is true. In this case the rule must be applied or not. |
---|
| 38 | * </p> |
---|
| 39 | * |
---|
| 40 | * @param parent the parent node with the children to apply the rule on |
---|
| 41 | * @param builder the builder to be used for creating substructures for the identified |
---|
| 42 | * temporal relationships |
---|
| 43 | * @param nodeFactory the node factory to be used for creating substructures for the identified |
---|
| 44 | * temporal relationships |
---|
| 45 | * @param finalize true, if the rule shall not expect further children to come and that it |
---|
| 46 | * should therefore be applied in any case |
---|
| 47 | * |
---|
| 48 | * @return the rule application result as described. |
---|
[439] | 49 | */ |
---|
[809] | 50 | RuleApplicationResult apply(ITaskTreeNode parent, |
---|
| 51 | ITaskTreeBuilder builder, |
---|
| 52 | ITaskTreeNodeFactory nodeFactory, |
---|
| 53 | boolean finalize); |
---|
[439] | 54 | |
---|
| 55 | } |
---|