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/TaskEquality.java

    r1113 r1146  
    1313//   limitations under the License. 
    1414 
    15 package de.ugoe.cs.autoquest.tasktrees.nodeequality; 
     15package de.ugoe.cs.autoquest.tasktrees.taskequality; 
    1616 
    1717/** 
    1818 * <p> 
    19  * A node equality denotes, how equal two task tree nodes are. There are different equality levels 
     19 * A task equality denotes, how equal two tasks are. There are different equality levels 
    2020 * which are similar to the usual design levels of GUI design. These levels are 
    2121 * <ul> 
     
    2626 *       can be performed</li> 
    2727 * </ul> 
    28  * It is not possible to compare two task nodes conceptually. But the other design levels can be 
     28 * It is not possible to compare two tasks conceptually. But the other design levels can be 
    2929 * identified and compared. 
    3030 * </p> 
    3131 * <p> 
    32  * Nodes can be identical. This is the case if in the java virtual machine, their comparison 
     32 * Tasks can be identical. This is the case if in the java virtual machine, their comparison 
    3333 * using the <code>==</code> operator or the equals method return true. 
    3434 * </p> 
    3535 * <p> 
    36  * Nodes are lexically equal, if they represent the same events on a key stroke level to be 
    37  * carried out to execute the task. Identical nodes are also syntactically equal. 
     36 * Tasks are lexically equal, if they represent the same events on a key stroke level to be 
     37 * carried out to execute the task. Identical tasks are also syntactically equal. 
    3838 * </p> 
    3939 * <p> 
     
    4141 * syntactical result is the same. For example, entering the text "hello" into a text field can 
    4242 * be done by entering the letters in their correct order, but also by copying the text into the 
    43  * text field. The syntactical result is the same: The text hello was entered. But the tasks 
     43 * text field. The syntactical result is the same: The text "hello" was entered. But the tasks 
    4444 * lexically differ because the events on key stroke level are different. On the other hand, 
    45  * lexically equal nodes are also syntactically equal.   
     45 * lexically equal tasks are also syntactically equal.   
    4646 * </p> 
    4747 * <p> 
    48  * Task tree nodes are semantically equal, if they execute the same function for editing the 
    49  * concepts. An example are a click on a button and a short cut, both executing the same function. 
    50  * These task tree nodes are syntactically and, therefore, also lexically different, but 
    51  * semantically equal. Syntactically equal task tree nodes are always also semantically equal. 
     48 * Tasks are semantically equal, if they execute the same function for editing the concepts. An 
     49 * example are a click on a button and a short cut, both executing the same function. These tasks 
     50 * are syntactically and, therefore, also lexically different, but semantically equal. 
     51 * Syntactically equal tasks are always also semantically equal. 
    5252 * </p> 
    5353 *  
     
    5555 * @author 2012, last modified by $Author: patrick$ 
    5656 */ 
    57 public enum NodeEquality { 
     57public enum TaskEquality { 
    5858    IDENTICAL, 
    5959    LEXICALLY_EQUAL, 
     
    6464    /** 
    6565     * <p> 
    66      * Checks for the current node equality, if it is at least identical to the 
    67      * provided one or even more concrete. As an example, the node equality identical also 
    68      * indicates, that the nodes are e.g. lexically, syntactically and semantically equal. 
     66     * Checks for the current task equality, if it is at least identical to the 
     67     * provided one or even more concrete. As an example, the task equality identical also 
     68     * indicates, that the tasks are e.g. lexically, syntactically and semantically equal. 
    6969     * Therefore, the method called on <code>IDENTICAL</code> with <code>SEMANTICALLY_EQUAL</code> 
    7070     * as parameter will return true. If this method is called on <code>SYNTACTICALLY_EQUAL</code> 
     
    7272     * </p> 
    7373     * 
    74      * @param nodeEquality the node equality to compare with. 
     74     * @param taskEquality the task equality to compare with. 
    7575     *  
    7676     * @return as described 
    7777     */ 
    78     public boolean isAtLeast(NodeEquality nodeEquality) 
     78    public boolean isAtLeast(TaskEquality taskEquality) 
    7979    { 
    80         switch (nodeEquality) { 
     80        switch (taskEquality) { 
    8181            case IDENTICAL: 
    8282                return 
     
    107107    /** 
    108108     * <p> 
    109      * returns the common denominator of this node equality and the provided one. I.e. if one 
     109     * returns the common denominator of this task equality and the provided one. I.e. if one 
    110110     * equality is e.g. syntactical and the other one only semantical, then semantical is returned. 
    111111     * </p> 
    112112     * 
    113113     * @param equality the equality, to compare this with 
    114      * @return 
     114     *  
     115     * @return as described 
    115116     */ 
    116     public NodeEquality getCommonDenominator(NodeEquality otherEquality) { 
     117    public TaskEquality getCommonDenominator(TaskEquality otherEquality) { 
    117118        if (this.isAtLeast(otherEquality)) { 
    118119            return otherEquality; 
     
    122123        } 
    123124        else { 
    124             return NodeEquality.UNEQUAL; 
     125            return TaskEquality.UNEQUAL; 
    125126        } 
    126127    } 
Note: See TracChangeset for help on using the changeset viewer.