Ignore:
Timestamp:
04/04/13 16:06:07 (11 years ago)
Author:
pharms
Message:
  • complete refactoring of task tree model with a separation of task models and task instances
  • appropriate adaptation of task tree generation process
  • appropriate adaptation of commands and task tree visualization
Location:
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality
Files:
2 copied

Legend:

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

    r1125 r1146  
    1313//   limitations under the License. 
    1414 
    15 package de.ugoe.cs.autoquest.tasktrees.nodeequality; 
     15package de.ugoe.cs.autoquest.tasktrees.taskequality; 
    1616 
    17 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 
     17import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
    1818 
    1919/** 
    2020 * <p> 
    21  * This comparison rule returns <code>NodeEquality.IDENTICAL</code> if the comparison of the two 
    22  * task tree nodes using the <code>==</code> operator or the <code>equals</code> method return true. 
    23  * Else it returns null to denote, that it can not compare the nodes. 
     21 * This comparison rule returns <code>TaskEquality.IDENTICAL</code> if the comparison of the two 
     22 * tasks using the <code>==</code> operator or the <code>equals</code> method return true. 
     23 * Else it returns null to denote, that it can not compare the tasks. 
    2424 * </p> 
    2525 *  
     
    2727 * @author 2012, last modified by $Author: patrick$ 
    2828 */ 
    29 public class NodeIdentityRule implements NodeComparisonRule { 
     29public class TaskIdentityRule implements TaskComparisonRule { 
    3030 
    3131    /* (non-Javadoc) 
    32      * @see NodeComparisonRule#isApplicable(ITaskTreeNode, ITaskTreeNode) 
     32     * @see NodeComparisonRule#isApplicable(ITask, ITask) 
    3333     */ 
    3434    @Override 
    35     public boolean isApplicable(ITaskTreeNode node1, ITaskTreeNode node2) { 
    36         return (node1 == node2); 
     35    public boolean isApplicable(ITask task1, ITask task2) { 
     36        return (task1 == task2); 
    3737    } 
    3838 
    3939    /* (non-Javadoc) 
    40      * @see NodeComparisonRule#areLexicallyEqual(ITaskTreeNode, ITaskTreeNode) 
     40     * @see NodeComparisonRule#areLexicallyEqual(ITask, ITask) 
    4141     */ 
    4242    @Override 
    43     public boolean areLexicallyEqual(ITaskTreeNode node1, ITaskTreeNode node2) { 
    44         return (node1 == node2); 
     43    public boolean areLexicallyEqual(ITask task1, ITask task2) { 
     44        return (task1 == task2); 
    4545    } 
    4646 
    4747    /* (non-Javadoc) 
    48      * @see NodeComparisonRule#areSyntacticallyEqual(ITaskTreeNode, ITaskTreeNode) 
     48     * @see NodeComparisonRule#areSyntacticallyEqual(ITask, ITask) 
    4949     */ 
    5050    @Override 
    51     public boolean areSyntacticallyEqual(ITaskTreeNode node1, ITaskTreeNode node2) { 
    52         return (node1 == node2); 
     51    public boolean areSyntacticallyEqual(ITask task1, ITask task2) { 
     52        return (task1 == task2); 
    5353    } 
    5454 
    5555    /* (non-Javadoc) 
    56      * @see NodeComparisonRule#areSemanticallyEqual(ITaskTreeNode, ITaskTreeNode) 
     56     * @see NodeComparisonRule#areSemanticallyEqual(ITask, ITask) 
    5757     */ 
    5858    @Override 
    59     public boolean areSemanticallyEqual(ITaskTreeNode node1, ITaskTreeNode node2) { 
    60         return (node1 == node2); 
     59    public boolean areSemanticallyEqual(ITask task1, ITask task2) { 
     60        return (task1 == task2); 
    6161    } 
    6262 
    6363    /* (non-Javadoc) 
    64      * @see NodeComparisonRule#compare(ITaskTreeNode, ITaskTreeNode) 
     64     * @see NodeComparisonRule#compare(ITask, ITask) 
    6565     */ 
    6666    @Override 
    67     public NodeEquality compare(ITaskTreeNode node1, ITaskTreeNode node2) { 
    68         if (isApplicable(node1, node2)) { 
    69             return NodeEquality.IDENTICAL; 
     67    public TaskEquality compare(ITask task1, ITask task2) { 
     68        if (isApplicable(task1, task2)) { 
     69            return TaskEquality.IDENTICAL; 
    7070        } 
    7171        else { 
Note: See TracChangeset for help on using the changeset viewer.