Ignore:
Timestamp:
04/19/13 17:02:50 (11 years ago)
Author:
pharms
Message:
  • improved java doc
Location:
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees
Files:
10 edited

Legend:

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

    r1146 r1154  
    2323 
    2424/** 
    25  * TODO comment 
     25 * <p> 
     26 * The component manager is the central reference for the distinct submodules required for 
     27 * task tree generation. Such include the temporal relationship rule manager, the task equality 
     28 * rule manager, the default task builder, as well as the default task factory. 
     29 * </p> 
    2630 *  
    27  * @version $Revision: $ $Date: 12.02.2012$ 
    28  * @author 2012, last modified by $Author: patrick$ 
     31 * @version 1.0 
     32 * @author pharms 
    2933 */ 
    3034public class ComponentManager { 
    3135     
    32     /** */ 
     36    /** 
     37     * <p> 
     38     * singleton instance of this class 
     39     * </p> 
     40     */ 
    3341    private static ComponentManager instance; 
    3442 
    35     /** */ 
     43    /** 
     44     * <p> 
     45     * the default temporal relationship rule manager 
     46     * </p> 
     47     */ 
    3648    private TemporalRelationshipRuleManager temporalRelationshipRuleManager; 
    3749 
    38     /** */ 
     50    /** 
     51     * <p> 
     52     * the default task equality rule manager 
     53     * </p> 
     54     */ 
    3955    private TaskEqualityRuleManager taskEqualityRuleManager; 
    4056 
    41     /** */ 
     57    /** 
     58     * <p> 
     59     * the default task builder 
     60     * </p> 
     61     */ 
    4262    private ITaskBuilder taskBuilder; 
    4363 
    44     /** */ 
     64    /** 
     65     * <p> 
     66     * the default task factory 
     67     * </p> 
     68     */ 
    4569    private ITaskFactory taskFactory; 
    4670 
    4771    /** 
    48      * 
     72     * <p> 
     73     * returns the default temporal relationship rule manager 
     74     * </p> 
     75     *  
     76     * @return as described 
    4977     */ 
    5078    public static TemporalRelationshipRuleManager getTemporalRelationshipRuleManager() { 
     
    5381 
    5482    /** 
    55      * 
     83     * <p> 
     84     * returns the default task equality rule manager 
     85     * </p> 
     86     *  
     87     * @return as described 
    5688     */ 
    5789    public static TaskEqualityRuleManager getTaskEqualityRuleManager() { 
     
    6092 
    6193    /** 
    62      * 
     94     * <p> 
     95     * returns the default task builder 
     96     * </p> 
     97     *  
     98     * @return as described 
    6399     */ 
    64100    public static ITaskBuilder getDefaultTaskBuilder() { 
     
    67103 
    68104    /** 
    69      * 
     105     * <p> 
     106     * returns the default task factory 
     107     * </p> 
     108     *  
     109     * @return as described 
    70110     */ 
    71111    public static ITaskFactory getDefaultTaskFactory() { 
     
    74114 
    75115    /** 
    76      *  
     116     * <p> 
     117     * clears the singleton instance. Needed for test purposes to ensure statelessness between 
     118     * tests. 
     119     * </p> 
    77120     */ 
    78121    public static synchronized void clearInstance() { 
     
    81124 
    82125    /** 
    83      * 
     126     * <p> 
     127     * returns the singleton instance of this class 
     128     * </p> 
     129     *  
     130     * @return as described 
    84131     */ 
    85132    private static synchronized ComponentManager getInstance() { 
     
    92139 
    93140    /** 
    94      *  
     141     * <p> 
     142     * initialized the component manager with all it default components which are the temporal 
     143     * relationship rule manager, the task equality rule manager, the default task builder, as 
     144     * well as the default task factory.  
     145     * </p> 
    95146     */ 
    96147    private void init() { 
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/manager/TaskTreeManager.java

    r1146 r1154  
    2929 
    3030/** 
    31  * TODO comment 
     31 * <p> 
     32 * The task tree manager is responsible for transforming one or more user sessions into a task 
     33 * model. It can be called by providing a collection of user sessions where the result 
     34 * will be a task model. Furthermore, it can be used by providing single events in their respective 
     35 * order including notifications about where a user session ends. The result is a task model, 
     36 * as well.  
     37 * </p> 
    3238 *  
    33  * @version $Revision: $ $Date: $ 
    34  * @author 2011, last modified by $Author: $ 
     39 * @version 1.0 
     40 * @author pharms 
    3541 */ 
    3642public class TaskTreeManager { 
    3743     
    38     /** */ 
     44    /** 
     45     * <p> 
     46     * the internally used task builder 
     47     * </p> 
     48     */ 
    3949    private ITaskBuilder taskBuilder = ComponentManager.getDefaultTaskBuilder(); 
    4050 
    41     /** */ 
     51    /** 
     52     * <p> 
     53     * the internally used task factory 
     54     * </p> 
     55     */ 
    4256    private ITaskFactory taskFactory = ComponentManager.getDefaultTaskFactory(); 
    4357 
    44     /** */ 
     58    /** 
     59     * <p> 
     60     * if single events are provided, the user sessions collected so far 
     61     * </p> 
     62     */ 
    4563    private List<IUserSession> sessions = null; 
    4664 
    47     /** */ 
     65    /** 
     66     * <p> 
     67     * if single events are provided, the currently collected user session 
     68     * </p> 
     69     */ 
    4870    private IUserSession currentSession = null; 
    4971 
    5072    /** 
    51      * 
     73     * <p> 
     74     * initializes the task tree manager 
     75     * </p> 
    5276     */ 
    5377    public TaskTreeManager() { 
     
    5680 
    5781    /** 
    58      * 
     82     * <p> 
     83     * creates a task model based on the provided user sessions. Yet, the user sessions are 
     84     * list of events. Such will be transformed in into task instances of event tasks assigned 
     85     * to {@link IUserSession}s. The {@link IUserSession}s will then be restructured using 
     86     * the temporal relationship rule manager to detect tasks and respective instances. The 
     87     * results of this transformation is stored in a task model which is the return value of 
     88     * this method. 
     89     * </p> 
     90     *  
     91     * @param newSessions the user sessions of which the task model shall be created 
     92     *  
     93     * @return the task model created from the user sessions 
     94     *  
     95     * @throws IllegalStateException if the task manager is already used by providing it with 
     96     *                               single events 
    5997     */ 
    6098    public synchronized ITaskModel createTaskModel(Collection<List<Event>> newSessions) { 
     
    78116 
    79117    /** 
    80      * 
     118     * <p> 
     119     * handles a single event that occurred in a user session. 
     120     * </p> 
     121     *  
     122     * @param event the event to handle 
    81123     */ 
    82124    public void handleNewEvent(Event event) { 
     
    87129 
    88130    /** 
    89      *  
     131     * <p> 
     132     * used to denote, that all previously added events using {@link #handleNewEvent(Event)} 
     133     * belong to the same session and that this session is now complete. All further events 
     134     * will be added to a new session which may be ended using this method, as well. 
     135     * </p> 
    90136     */ 
    91137    public void finishSession() { 
     
    97143 
    98144    /** 
    99      * 
     145     * <p> 
     146     * returns the task model, that belongs to the events in the user sessions collected so far. 
     147     * </p> 
     148     *  
     149     * @return the task model 
    100150     */ 
    101151    public synchronized ITaskModel getTaskModel() { 
     
    110160 
    111161    /** 
    112      * 
     162     * <p> 
     163     * internally asserts that there is a current session to add new events to 
     164     * </p> 
    113165     */ 
    114166    private void assertSessionSequence() { 
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/GUIEventTaskComparisonRule.java

    r1146 r1154  
    133133     * returns lexical equality. 
    134134     * </p> 
    135      * 
    136      * @param interaction1 the first interaction to compare 
    137      * @param interaction2 the second interaction to compare 
    138      * @param eventTarget  the event target on which the interactions happened (used within 
    139      *                     special comparisons like mouse clicks on buttons, where the coordinates 
    140      *                     can be ignored) 
     135     * <p> 
     136     * The provided equality level can be used to restrict the quality check to the given level. 
     137     * This is done for optimization purposes. The returned equality level can be at most as 
     138     * concrete as the provided one. If the provided one is null, it is expected to be lexical 
     139     * equality. 
     140     * </p> 
     141     * 
     142     * @param interaction1  the first interaction to compare 
     143     * @param interaction2  the second interaction to compare 
     144     * @param eventTarget   the event target on which the interactions happened (used within 
     145     *                      special comparisons like mouse clicks on buttons, where the coordinates 
     146     *                      can be ignored) 
     147     * @param equalityLevel the equality level to be checked for 
    141148     *  
    142149     * @return as described 
     
    192199    /** 
    193200     * <p> 
    194      * TODO: comment 
    195      * </p> 
    196      * 
    197      * @param interaction1 
    198      * @param interaction2 
    199      * @param eventTarget 
    200      * @param level 
    201      * @return 
     201     * compares two key interactions. If both are of the same type and if both have the 
     202     * same key, they are lexically equal. If both are only of the same type, they are 
     203     * semantically equal. Otherwise, they are unequal. 
     204     * </p> 
     205     * <p> 
     206     * The provided equality level can be used to restrict the quality check to the given level. 
     207     * This is done for optimization purposes. The returned equality level is as concrete as 
     208     * the provided one. It may be more concrete if there is no difference regarding the 
     209     * comparison on the levels. 
     210     * </p> 
     211     * 
     212     * @param interaction1  the first key interaction 
     213     * @param interaction2  the second key interaction 
     214     * @param equalityLevel the equality level to be checked for 
     215     *  
     216     * @return as described 
    202217     */ 
    203218    private TaskEquality compareKeyInteractions(KeyInteraction interaction1, 
     
    227242     * coordinates, they are lexically equal. Otherwise, they are semantically equal. 
    228243     * </p> 
    229      * 
    230      * @param interaction1 the first mouse drag and drop to compare 
    231      * @param interaction2 the second mouse drag and drop to compare 
     244     * <p> 
     245     * The provided equality level can be used to restrict the quality check to the given level. 
     246     * This is done for optimization purposes. The returned equality level is as concrete as 
     247     * the provided one. It may be more concrete if there is no difference regarding the 
     248     * comparison on the levels. 
     249     * </p> 
     250     * 
     251     * @param interaction1  the first mouse drag and drop to compare 
     252     * @param interaction2  the second mouse drag and drop to compare 
     253     * @param equalityLevel the equality level to be checked for 
    232254     *  
    233255     * @return as described 
     
    267289     * lexically equal. 
    268290     * </p> 
    269      * 
    270      * @param interaction1 the first mouse button interaction to compare 
    271      * @param interaction2 the second mouse button interaction to compare 
    272      * @param eventTarget  the event target on which the interactions happened (used within 
    273      *                     special comparisons like mouse clicks on buttons, where the coordinates 
    274      *                     can be ignored) 
     291     * <p> 
     292     * The provided equality level can be used to restrict the quality check to the given level. 
     293     * This is done for optimization purposes. The returned equality level is as concrete as 
     294     * the provided one. It may be more concrete if there is no difference regarding the 
     295     * comparison on the levels. 
     296     * </p> 
     297     * 
     298     * @param interaction1  the first mouse button interaction to compare 
     299     * @param interaction2  the second mouse button interaction to compare 
     300     * @param eventTarget   the event target on which the interactions happened (used within 
     301     *                      special comparisons like mouse clicks on buttons, where the coordinates 
     302     *                      can be ignored) 
     303     * @param equalityLevel the equality level to be checked for 
    275304     *  
    276305     * @return as described 
     
    334363     * lexically equal. 
    335364     * </p> 
    336      * 
    337      * @param interaction1 the first mouse button interaction to compare 
    338      * @param interaction2 the second mouse button interaction to compare 
    339      * @param eventTarget  the event target on which the interactions happened (used within 
    340      *                     special comparisons like mouse clicks on buttons, where the coordinates 
    341      *                     can be ignored) 
     365     * <p> 
     366     * The provided equality level can be used to restrict the quality check to the given level. 
     367     * This is done for optimization purposes. The returned equality level is as concrete as 
     368     * the provided one. It may be more concrete if there is no difference regarding the 
     369     * comparison on the levels. 
     370     * </p> 
     371     * 
     372     * @param interaction1  the first mouse button interaction to compare 
     373     * @param interaction2  the second mouse button interaction to compare 
     374     * @param eventTarget   the event target on which the interactions happened (used within 
     375     *                      special comparisons like mouse clicks on buttons, where the coordinates 
     376     *                      can be ignored) 
     377     * @param equalityLevel the equality level to be checked for 
    342378     *  
    343379     * @return as described 
     
    368404     * (the equality of the event targets is checked beforehand). 
    369405     * </p> 
    370      * 
    371      * @param interaction1 the first text input to compare 
    372      * @param interaction2 the second text input to compare 
     406     * <p> 
     407     * The provided equality level can be used to restrict the quality check to the given level. 
     408     * This is done for optimization purposes. The returned equality level is as concrete as 
     409     * the provided one. It may be more concrete if there is no difference regarding the 
     410     * comparison on the levels. 
     411     * </p> 
     412     * 
     413     * @param interaction1  the first text input to compare 
     414     * @param interaction2  the second text input to compare 
     415     * @param equalityLevel the equality level to be checked for 
    373416     *  
    374417     * @return as described 
     
    402445     * (the equality of the event targets is checked beforehand). 
    403446     * </p> 
    404      * 
    405      * @param interaction1 the first value selection to compare 
    406      * @param interaction2 the second value selection to compare 
     447     * <p> 
     448     * The provided equality level can be used to restrict the quality check to the given level. 
     449     * This is done for optimization purposes. The returned equality level is as concrete as 
     450     * the provided one. It may be more concrete if there is no difference regarding the 
     451     * comparison on the levels. 
     452     * </p> 
     453     * 
     454     * @param interaction1  the first value selection to compare 
     455     * @param interaction2  the second value selection to compare 
     456     * @param equalityLevel the equality level to be checked for 
    407457     *  
    408458     * @return as described 
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/IterationComparisonRule.java

    r1146 r1154  
    222222 
    223223    /** 
    224      * TODO update comment 
     224     * <p> 
     225     * compares two tasks with each other by calling the rule manager. If the rule manager returns 
     226     * identity, then the returned equality is set to lexically equal. The reason is, that 
     227     * the children of the iterations are compared and that therefore the distinct iterations 
     228     * can be at most lexically equal. 
     229     * </p> 
     230     *  
     231     * @param child1 the first task to be compared 
     232     * @param child2 the second task to be compared 
     233     *  
     234     * @return the determined equality being at most lexical equality. 
    225235     */ 
    226236    private TaskEquality getNodeEquality(ITask child1, ITask child2) { 
     
    243253    /** 
    244254     * <p> 
    245      * compares two tasks. One of them must be a selection, the other one can be any task 
    246      * tree task. The method returns a task equality that is not <code>NodeEquality.UNEQUAL</code> 
     255     * compares two tasks. One of them must be a selection, the other one can be any task. 
     256     * The method returns a task equality that is not <code>NodeEquality.UNEQUAL</code> 
    247257     * if the other task is at least semantically equal to the children of the selection. It 
    248258     * returns more concrete equalities, if the equality between the other task and the children 
     
    250260     * </p>  
    251261     *  
    252      * @param taskTreeNode the first task to compare 
    253      * @param taskTreeNode2 the second task to compare 
     262     * @param task1 the first task to compare 
     263     * @param task2 the second task to compare 
    254264     *  
    255265     * @return as described 
     
    292302    /** 
    293303     * <p> 
    294      * TODO: comment 
    295      * </p> 
    296      * 
    297      * @param child1 
    298      * @param child2 
    299      * @param requiredEqualityLevel 
    300      * @return 
     304     * used to to call the task equality rule manager for the comparison of the two provided 
     305     * children. If no required equality level is provided, than the most concrete equality is 
     306     * returned. Otherwise, the required equality is returned as long as the children are equal 
     307     * on that level. 
     308     * </p>  
     309     *  
     310     * @param child1                the first task to be compared 
     311     * @param child2                the second task to be compared 
     312     * @param requiredEqualityLevel the equality level to be checked for 
     313     *  
     314     * @return the determined equality 
    301315     */ 
    302316    private TaskEquality callRuleManager(ITask        child1, 
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SelectionComparisonRule.java

    r1146 r1154  
    2929 * equal, then the selections are syntactically equal. If all children are at least semantically 
    3030 * equal, then the selections are semantically equal. If only one of the selections has children, 
    31  * then the selections are unequal. 
     31 * then the selections are unequal. The comparison is broken up, if only a specific equality is 
     32 * checked for and this equality is ensured. 
    3233 * </p> 
    3334 *  
     
    9798 
    9899    /** 
    99      *  
     100     * <p> 
     101     * compares two selections with each other checking for the provided required level of 
     102     * equality. If this level is ensured, the method immediately returns. The more concrete 
     103     * the required equality level, the more checks this method performs. 
     104     * </p> 
     105     *  
     106     * @param task1                 the first task to be compared 
     107     * @param task2                 the second task to be compared 
     108     * @param requiredEqualityLevel the equality level to be checked for 
     109     *  
     110     * @return the determined equality. 
    100111     */ 
    101112    private TaskEquality getEquality(ITask task1, ITask task2, TaskEquality requiredEqualityLevel) { 
     
    141152    /** 
    142153     * <p> 
    143      * TODO: comment 
     154     * determines the common equality level for all tasks in the first list compared to all 
     155     * tasks in the second list. If for one task in the first list, there is no equal task in the 
     156     * second list, the method return unequality.  
    144157     * </p> 
    145158     * 
    146      * @param children1 
    147      * @param children2 
    148      * @param requiredEqualityLevel 
     159     * @param children1 the first list to be compared 
     160     * @param children2 the second list to be compared 
     161     *  
     162     * @return the common task equality identified for all tasks in the first list with respect to 
     163     *         the second list 
    149164     */ 
    150165    private TaskEquality getCommonEqualityLevel(List<ITask> children1, List<ITask> children2) { 
     
    188203    /** 
    189204     * <p> 
    190      * TODO: comment 
    191      * </p> 
    192      * 
    193      * @param children1 
    194      * @param children2 
    195      * @param requiredEqualityLevel 
     205     * ensures for the two given lists, that for each task in the first list there is a task 
     206     * in the second list being on the given level equal to the task in the first list. 
     207     * </p>  
     208     *  
     209     * @param children1             the first list to be compared 
     210     * @param children2             the second list to be compared 
     211     * @param requiredEqualityLevel the equality level to be checked for 
     212     *  
     213     * @return true if each task in the first list has an equal task in the second list when 
     214     *         considering the given equality level, false else. 
    196215     */ 
    197216    private boolean checkEqualityLevel(List<ITask>  children1, 
     
    227246    /** 
    228247     * <p> 
    229      * TODO: comment 
    230      * </p> 
    231      * 
    232      * @param child1 
    233      * @param child2 
    234      * @param requiredEqualityLevel 
    235      * @return 
     248     * used to to call the task equality rule manager for the comparison of the two provided 
     249     * children. If no required equality level is provided, than the most concrete equality is 
     250     * returned. Otherwise, the required equality is returned as long as the children are equal 
     251     * on that level. 
     252     * </p>  
     253     *  
     254     * @param child1                the first task to be compared 
     255     * @param child2                the second task to be compared 
     256     * @param requiredEqualityLevel the equality level to be checked for 
     257     *  
     258     * @return the determined equality 
    236259     */ 
    237260    private TaskEquality callRuleManager(ITask        child1, 
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SequenceComparisonRule.java

    r1146 r1154  
    9393 
    9494    /** 
     95     * <p> 
     96     * compares two sequences with each other checking for the provided required level of 
     97     * equality. If this level is ensured, the method immediately returns. The more concrete 
     98     * the required equality level, the more checks this method performs. 
     99     * </p> 
    95100     *  
     101     * @param task1                 the first task to be compared 
     102     * @param task2                 the second task to be compared 
     103     * @param requiredEqualityLevel the equality level to be checked for 
     104     *  
     105     * @return the determined equality. 
    96106     */ 
    97107    private TaskEquality getEquality(ITask task1, ITask task2, TaskEquality requiredEqualityLevel) { 
     
    127137    /** 
    128138     * <p> 
    129      * TODO: comment 
    130      * </p> 
    131      * 
    132      * @param child1 
    133      * @param child2 
    134      * @param requiredEqualityLevel 
    135      * @return 
     139     * used to to call the task equality rule manager for the comparison of the two provided 
     140     * children. If no required equality level is provided, than the most concrete equality is 
     141     * returned. Otherwise, the required equality is returned as long as the children are equal 
     142     * on that level. 
     143     * </p>  
     144     *  
     145     * @param child1                the first task to be compared 
     146     * @param child2                the second task to be compared 
     147     * @param requiredEqualityLevel the equality level to be checked for 
     148     *  
     149     * @return the determined equality 
    136150     */ 
    137151    private TaskEquality callRuleManager(ITask        child1, 
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndIterationComparisonRule.java

    r1146 r1154  
    9393 
    9494    /** 
     95     * <p> 
     96     * compares two tasks with each other checking for the provided required level of 
     97     * equality. One of the tasks must be an iteration, the other one not. If this is not the 
     98     * case, the method returns null. The returned equality level is at most lexical equality 
     99     * as the iteration can not be identical to something not being an iteration. 
     100     * </p> 
    95101     *  
     102     * @param task1                 the first task to be compared 
     103     * @param task2                 the second task to be compared 
     104     * @param requiredEqualityLevel the equality level to be checked for 
     105     *  
     106     * @return the determined equality. 
    96107     */ 
    97108    private TaskEquality getEquality(ITask task1, ITask task2, TaskEquality requiredEqualityLevel) { 
     
    144155    /** 
    145156     * <p> 
    146      * TODO: comment 
    147      * </p> 
    148      * 
    149      * @param child1 
    150      * @param child2 
    151      * @param requiredEqualityLevel 
    152      * @return 
     157     * used to to call the task equality rule manager for the comparison of the two provided 
     158     * children. If no required equality level is provided, than the most concrete equality is 
     159     * returned. Otherwise, the required equality is returned as long as the children are equal 
     160     * on that level. 
     161     * </p>  
     162     *  
     163     * @param child1                the first task to be compared 
     164     * @param child2                the second task to be compared 
     165     * @param requiredEqualityLevel the equality level to be checked for 
     166     *  
     167     * @return the determined equality 
    153168     */ 
    154169    private TaskEquality callRuleManager(ITask        child1, 
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndSelectionComparisonRule.java

    r1146 r1154  
    9494     
    9595    /** 
    96      *  
     96     * <p> 
     97     * compares two tasks with each other checking for the provided required level of 
     98     * equality. One of the tasks must be a selection, the other one not. If this is not the 
     99     * case, the method returns null. The returned equality level is at most lexical equality 
     100     * as the selection can not be identical to something not being a selection. 
     101     * </p> 
     102     *  
     103     * @param task1                 the first task to be compared 
     104     * @param task2                 the second task to be compared 
     105     * @param requiredEqualityLevel the equality level to be checked for 
     106     *  
     107     * @return the determined equality. 
    97108     */ 
    98109    private TaskEquality getEquality(ITask task1, ITask task2, TaskEquality requiredEqualityLevel) { 
     
    168179    /** 
    169180     * <p> 
    170      * TODO: comment 
    171      * </p> 
    172      * 
    173      * @param child1 
    174      * @param child2 
    175      * @param requiredEqualityLevel 
    176      * @return 
     181     * used to to call the task equality rule manager for the comparison of the two provided 
     182     * children. If no required equality level is provided, than the most concrete equality is 
     183     * returned. Otherwise, the required equality is returned as long as the children are equal 
     184     * on that level. 
     185     * </p>  
     186     *  
     187     * @param child1                the first task to be compared 
     188     * @param child2                the second task to be compared 
     189     * @param requiredEqualityLevel the equality level to be checked for 
     190     *  
     191     * @return the determined equality 
    177192     */ 
    178193    private TaskEquality callRuleManager(ITask        child1, 
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskComparator.java

    r1146 r1154  
    2424/** 
    2525 * <p> 
    26  * TODO comment 
     26 * this class is a very fast implementation for the {@link SymbolComparator} interface to be 
     27 * applied on task instances. To be efficient, it caches information about the equality of tasks. 
     28 * Only, if it does not know a specific equality yet, it call the task equality rule manager 
     29 * to compare two tasks. Otherwise, it returns the known equality. 
    2730 * </p> 
     31 *  
     32 * TODO improve documentation and remove stop watch stuff. 
    2833 *  
    2934 * @author Patrick Harms 
     
    4550    private TaskEquality minimalNodeEquality; 
    4651 
    47     /** */ 
     52    /** 
     53     * <p> 
     54     * the internally used comparer for tasks. 
     55     * </p>  
     56     */ 
    4857    private Comparer comparer; 
    4958 
    50     /** */ 
     59    /** 
     60     * <p> 
     61     * the internally used comparer for tasks considering only lexical equality. 
     62     * </p>  
     63     */ 
    5164    private Comparer lexicalComparer; 
    5265 
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskEqualityRuleManager.java

    r1146 r1154  
    2323 * <p> 
    2424 * The task equality rule manager is capable of comparing tasks based on its internal list 
    25  * of comparison rules. The current list of rules contains the {@link TaskIdentityRule}, the 
    26  * {@link IterationComparisonRule}, the {@link SequenceComparisonRule}, and 
    27  * {@link SelectionComparisonRule}. These rules are asked for comparing the two provided tasks 
    28  * in the mentioned order. If a rule returns a task equality other than null, this equality is 
    29  * returned. Otherwise the next rule is asked. 
     25 * of comparison rules. These rules are asked for comparing the two provided tasks. If a rule 
     26 * returns a task equality other than null, this equality is returned. Otherwise the next rule 
     27 * is asked. 
    3028 * </p> 
    3129 *  
     
    3533public class TaskEqualityRuleManager { 
    3634 
    37     /** */ 
     35    /** 
     36     * <p> 
     37     * the rules that can be used for comparing tasks 
     38     * </p> 
     39     */ 
    3840    private List<TaskComparisonRule> mRuleIndex = null; 
    3941 
     
    99101    /** 
    100102     * <p> 
    101      * TODO: comment 
    102      * </p> 
    103      * 
    104      * @param child1 
    105      * @param child2 
    106      * @param equalityLevel 
    107      * @return 
     103     * this method two tasks with respect to the fiven equality level and returns true, if this 
     104     * level is given. 
     105     * </p> 
     106     *  
     107     * @param task1         the first task to be compared 
     108     * @param task2         the second task to be compared 
     109     * @param equalityLevel the level of equality to be checked for 
     110     *  
     111     * @return as described 
     112     *  
     113     * @throws IllegalStateException in the case, the {@link #init()} method was not called on the 
     114     *                               manager before a call to this method. 
    108115     */ 
    109116    public boolean areAtLeastEqual(ITask task1, ITask task2, TaskEquality equalityLevel) { 
     
    130137    /** 
    131138     * <p> 
    132      * TODO: comment 
    133      * </p> 
    134      * 
    135      * @param child1 
    136      * @param child2 
    137      * @return 
     139     * this method checks if the two given tasks are identical. For this, it iterates its internal 
     140     * comparison rules. If the first rule returns true, than this method returns true as well. 
     141     * If no rule returns true, this method returns false. 
     142     * </p> 
     143     *  
     144     * @param task1 the first task to be compared 
     145     * @param task2 the second task to be compared 
     146     *  
     147     * @return as described 
     148     *  
     149     * @throws IllegalStateException in the case, the {@link #init()} method was not called on the 
     150     *                               manager before a call to this method. 
    138151     */ 
    139152    public boolean areIdentical(ITask task1, ITask task2) { 
     
    153166    /** 
    154167     * <p> 
    155      * TODO: comment 
    156      * </p> 
    157      * 
    158      * @param child1 
    159      * @param child2 
    160      * @return 
     168     * this method checks if the two given tasks are lexically equal. For this, it iterates its 
     169     * internal comparison rules. If the first rule returns true, than this method returns true 
     170     * as well. If no rule returns true, this method returns false. 
     171     * </p> 
     172     *  
     173     * @param task1 the first task to be compared 
     174     * @param task2 the second task to be compared 
     175     *  
     176     * @return as described 
     177     *  
     178     * @throws IllegalStateException in the case, the {@link #init()} method was not called on the 
     179     *                               manager before a call to this method. 
    161180     */ 
    162181    public boolean areLexicallyEqual(ITask task1, ITask task2) { 
     
    176195    /** 
    177196     * <p> 
    178      * TODO: comment 
    179      * </p> 
    180      * 
    181      * @param child1 
    182      * @param child2 
    183      * @return 
     197     * this method checks if the two given tasks are syntactically equal. For this, it iterates its 
     198     * internal comparison rules. If the first rule returns true, than this method returns true 
     199     * as well. If no rule returns true, this method returns false. 
     200     * </p> 
     201     *  
     202     * @param task1 the first task to be compared 
     203     * @param task2 the second task to be compared 
     204     *  
     205     * @return as described 
     206     *  
     207     * @throws IllegalStateException in the case, the {@link #init()} method was not called on the 
     208     *                               manager before a call to this method. 
    184209     */ 
    185210    public boolean areSyntacticallyEqual(ITask task1, ITask task2) { 
     
    199224    /** 
    200225     * <p> 
    201      * TODO: comment 
    202      * </p> 
    203      * 
    204      * @param child1 
    205      * @param child2 
    206      * @return 
     226     * this method checks if the two given tasks are semantically equal. For this, it iterates its 
     227     * internal comparison rules. If the first rule returns true, than this method returns true 
     228     * as well. If no rule returns true, this method returns false. 
     229     * </p> 
     230     *  
     231     * @param task1 the first task to be compared 
     232     * @param task2 the second task to be compared 
     233     *  
     234     * @return as described 
     235     *  
     236     * @throws IllegalStateException in the case, the {@link #init()} method was not called on the 
     237     *                               manager before a call to this method. 
    207238     */ 
    208239    public boolean areSemanticallyEqual(ITask task1, ITask task2) { 
Note: See TracChangeset for help on using the changeset viewer.