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

Last change on this file since 1113 was 1113, checked in by pharms, 11 years ago
  • added license statement
  • Property svn:executable set to *
File size: 2.7 KB
Line 
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
15package de.ugoe.cs.autoquest.tasktrees.temporalrelation;
16
17import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode;
18
19/**
20 * <p>
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
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>
29 *
30 * @author Patrick Harms
31 */
32interface TemporalRelationshipRule {
33
34  /**
35   * <p>
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.
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   *
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
52   *                   
53   * @return the rule application result as described.
54   */
55  RuleApplicationResult apply(ITaskTreeNode parent,
56                              boolean       finalize);
57 
58}
Note: See TracBrowser for help on using the repository browser.