source: trunk/quest-core-tasktrees/src/main/java/de/ugoe/cs/quest/tasktrees/temporalrelation/RuleApplicationResult.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: 1.7 KB
Line 
1package de.ugoe.cs.quest.tasktrees.temporalrelation;
2
3import java.util.ArrayList;
4import java.util.List;
5
6import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTreeNode;
7
8/**
9 * <p>
10 * The rule application result describes the result of applying a {@link TemporalRelationshipRule}
11 * on a task tree node. It contains a {@link RuleApplicationStatus} and a list of all parent
12 * task tree nodes that were created during a rule application. See the description of
13 * {@link TemporalRelationshipRule} for more details.
14 * </p>
15 *
16 * @author Patrick Harms
17 */
18class RuleApplicationResult {
19
20    /** */
21    private RuleApplicationStatus status = RuleApplicationStatus.RULE_NOT_APPLIED;
22
23    /** */
24    private List<ITaskTreeNode> newParents = new ArrayList<ITaskTreeNode>();
25
26    /**
27     * <p>
28     * create a rule application result with a status {@link RuleApplicationStatus#RULE_NOT_APPLIED}
29     * </p>
30     */
31    RuleApplicationResult() {
32        // this is the default indicating nothing so far
33    }
34
35    /**
36     * <p>
37     * set the rule application status
38     * </p>
39     */
40    void setRuleApplicationStatus(RuleApplicationStatus status) {
41        this.status = status;
42    }
43
44    /**
45     * <p>
46     * return the rule application status
47     * </p>
48     */
49    RuleApplicationStatus getRuleApplicationStatus() {
50        return status;
51    }
52
53    /**
54     * <p>
55     * add a further parent node created during the rule application
56     * </p>
57     */
58    void addNewlyCreatedParentNode(ITaskTreeNode newParent) {
59        newParents.add(newParent);
60    }
61
62    /**
63     * <p>
64     * return all parent nodes created during the rule application
65     * </p>
66     */
67    List<ITaskTreeNode> getNewlyCreatedParentNodes() {
68        return newParents;
69    }
70
71}
Note: See TracBrowser for help on using the repository browser.