Ignore:
Timestamp:
02/21/13 18:39:13 (11 years ago)
Author:
pharms
Message:
  • changed rules to be testable on their own
  • added first version for a task detection rule
  • refactored rules to have a simpler interface
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TemporalRelationshipRule.java

    r922 r1107  
    11package de.ugoe.cs.autoquest.tasktrees.temporalrelation; 
    22 
    3 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeBuilder; 
    43import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 
    5 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNodeFactory; 
    64 
    75/** 
    86 * <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 
     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 
    1310 * it detects a temporal relationship and it can be sure that it is complete. Incomplete but 
    1411 * detected temporal relationships may occur, if there can be more children expected to be added 
     
    2320  /** 
    2421   * <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.  
     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.  
    2924   * </p> 
    3025   * <p> 
     
    3833   * </p> 
    3934   *  
    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 
     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 
    4738   *                     
    4839   * @return the rule application result as described. 
    4940   */ 
    50   RuleApplicationResult apply(ITaskTreeNode        parent, 
    51                               ITaskTreeBuilder     builder, 
    52                               ITaskTreeNodeFactory nodeFactory, 
    53                               boolean              finalize); 
     41  RuleApplicationResult apply(ITaskTreeNode parent, 
     42                              boolean       finalize); 
    5443   
    5544} 
Note: See TracChangeset for help on using the changeset viewer.