[1113] | 1 | // Copyright 2012 Georg-August-Universität Göttingen, Germany |
---|
| 2 | // |
---|
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
---|
| 4 | // you may not use this file except in compliance with the License. |
---|
| 5 | // You may obtain a copy of the License at |
---|
| 6 | // |
---|
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
---|
| 8 | // |
---|
| 9 | // Unless required by applicable law or agreed to in writing, software |
---|
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
---|
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
| 12 | // See the License for the specific language governing permissions and |
---|
| 13 | // limitations under the License. |
---|
| 14 | |
---|
[922] | 15 | package de.ugoe.cs.autoquest.tasktrees.temporalrelation; |
---|
[439] | 16 | |
---|
[922] | 17 | import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; |
---|
[439] | 18 | |
---|
| 19 | /** |
---|
[809] | 20 | * <p> |
---|
[1107] | 21 | * a temporal relationship rule is able to detected temporal relationships between the child nodes |
---|
| 22 | * of the parent node provided to the {@link #apply(ITaskTreeNode, boolean)} method. A rule |
---|
| 23 | * creates temporal relationships between the child nodes, i.e. substructures in the task tree, if |
---|
[809] | 24 | * it detects a temporal relationship and it can be sure that it is complete. Incomplete but |
---|
| 25 | * detected temporal relationships may occur, if there can be more children expected to be added |
---|
| 26 | * to the provided parent node. This could be the case during parsing a interaction log file of |
---|
| 27 | * a GUI. |
---|
| 28 | * </p> |
---|
[439] | 29 | * |
---|
[809] | 30 | * @author Patrick Harms |
---|
[439] | 31 | */ |
---|
[809] | 32 | interface TemporalRelationshipRule { |
---|
[439] | 33 | |
---|
| 34 | /** |
---|
[809] | 35 | * <p> |
---|
[1107] | 36 | * applies the rule to the given parent node. The finalize parameter is used to command the rule |
---|
| 37 | * to finish rule applications, in the case it is known that no further data will be available. |
---|
[809] | 38 | * </p> |
---|
| 39 | * <p> |
---|
| 40 | * The returned rule application result is null, if the rule can not be applied, i.e. it does not |
---|
| 41 | * detect a temporal relationship. It returns a rule application result with a status |
---|
| 42 | * {@link RuleApplicationStatus#RULE_APPLICATION_FINISHED} if the rule was applied. The result |
---|
| 43 | * contains all newly created parent nodes. It returns a rule application result with status |
---|
| 44 | * {@link RuleApplicationStatus#RULE_APPLICATION_FEASIBLE} if the rule would be applicable if |
---|
| 45 | * further children would be available in the parent node. This status MUST not be returned if |
---|
| 46 | * the finalize parameter is true. In this case the rule must be applied or not. |
---|
| 47 | * </p> |
---|
| 48 | * |
---|
[1107] | 49 | * @param parent the parent node with the children to apply the rule on |
---|
| 50 | * @param finalize true, if the rule shall not expect further children to come and that it |
---|
| 51 | * should therefore be applied in any case |
---|
[809] | 52 | * |
---|
| 53 | * @return the rule application result as described. |
---|
[439] | 54 | */ |
---|
[1107] | 55 | RuleApplicationResult apply(ITaskTreeNode parent, |
---|
| 56 | boolean finalize); |
---|
[439] | 57 | |
---|
| 58 | } |
---|