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