source: trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TemporalRelationshipRule.java @ 1107

Last change on this file since 1107 was 1107, checked in by pharms, 11 years ago
  • changed rules to be testable on their own
  • added first version for a task detection rule
  • refactored rules to have a simpler interface
  • Property svn:executable set to *
File size: 2.1 KB
Line 
1package de.ugoe.cs.autoquest.tasktrees.temporalrelation;
2
3import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode;
4
5/**
6 * <p>
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
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>
15 *
16 * @author Patrick Harms
17 */
18interface TemporalRelationshipRule {
19
20  /**
21   * <p>
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.
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   *
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
38   *                   
39   * @return the rule application result as described.
40   */
41  RuleApplicationResult apply(ITaskTreeNode parent,
42                              boolean       finalize);
43 
44}
Note: See TracBrowser for help on using the repository browser.