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

Last change on this file since 809 was 809, checked in by pharms, 12 years ago
  • added some java doc for the classes, which are expected to be quite final
  • Property svn:executable set to *
File size: 2.8 KB
Line 
1package de.ugoe.cs.quest.tasktrees.temporalrelation;
2
3import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTreeBuilder;
4import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTreeNode;
5import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTreeNodeFactory;
6
7/**
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>
18 *
19 * @author Patrick Harms
20 */
21interface TemporalRelationshipRule {
22
23  /**
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.
49   */
50  RuleApplicationResult apply(ITaskTreeNode        parent,
51                              ITaskTreeBuilder     builder,
52                              ITaskTreeNodeFactory nodeFactory,
53                              boolean              finalize);
54 
55}
Note: See TracBrowser for help on using the repository browser.