Changeset 1216


Ignore:
Timestamp:
05/27/13 15:52:39 (11 years ago)
Author:
pharms
Message:
  • improved java doc
Location:
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl
Files:
6 edited

Legend:

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

    r1146 r1216  
    2929 
    3030/** 
    31  * TODO comment 
     31 * <p> 
     32 * this is the default implementation of the interface {@link ITaskBuilder}. It 
     33 * does not do anything fancy except implementing the interface. In some situations, it performs 
     34 * a check if the model or instances to be created a valid. However, this can not be done 
     35 * in any situation of the creation process. 
     36 * </p> 
    3237 *  
    33  * @version $Revision: $ $Date: 21.02.2012$ 
    34  * @author 2012, last modified by $Author: patrick$ 
     38 * @author Patrick Harms 
    3539 */ 
    3640public class TaskBuilder implements ITaskBuilder { 
    3741 
    3842    /* (non-Javadoc) 
    39      * @see ITaskBuilder#addChild(ITaskInstance, ITaskInstance) 
     43     * @see ITaskBuilder#addChild(ITaskInstance,ITaskInstance) 
    4044     */ 
    4145    @Override 
     
    7175            } 
    7276        } 
    73 /*        else if (task instanceof IIteration) { 
     77        /*else if (task instanceof IIteration) { 
    7478            for (ITaskInstance childInstance : parent.getChildren()) { 
    7579                if (!childInstance.getTask().equals(child.getTask())) { 
     
    130134 
    131135    /* (non-Javadoc) 
    132      * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder#addTaskInstance(de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceList, de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance) 
     136     * @see ITaskBuilder#addTaskInstance(ITaskInstanceList, ITaskInstance) 
    133137     */ 
    134138    @Override 
     
    147151 
    148152    /* (non-Javadoc) 
    149      * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder#addTaskInstance(de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceList, int, de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance) 
     153     * @see ITaskBuilder#addTaskInstance(ITaskInstanceList, int, ITaskInstance) 
    150154     */ 
    151155    @Override 
     
    167171 
    168172    /* (non-Javadoc) 
    169      * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder#setTaskInstance(de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceList, int, de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance) 
     173     * @see ITaskBuilder#setTaskInstance(ITaskInstanceList, int, ITaskInstance) 
    170174     */ 
    171175    @Override 
     
    189193 
    190194    /* (non-Javadoc) 
    191      * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder#setTask(de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance, de.ugoe.cs.autoquest.tasktrees.treeifc.ITask) 
     195     * @see ITaskBuilder#setTask(ITaskInstance, ITask) 
    192196     */ 
    193197    @Override 
     
    201205    } 
    202206 
    203     /* 
    204      * (non-Javadoc) 
    205      *  
    206      * @see de.ugoe.cs.tasktree.treeifc.TaskTreeBuilder#addChild(Sequence, TaskTreeNode) 
     207    /* (non-Javadoc) 
     208     * @see ITaskBuilder#addChild(ISequence, ITask) 
    207209     */ 
    208210    @Override 
     
    216218    } 
    217219 
    218     /* 
    219      * (non-Javadoc) 
    220      *  
    221      * @see de.ugoe.cs.tasktree.treeifc.TaskTreeBuilder#addChild(Sequence, int, TaskTreeNode) 
     220    /* (non-Javadoc) 
     221     * @see ITaskBuilder#addChild(ISequence, int, ITask) 
    222222     */ 
    223223    @Override 
     
    232232 
    233233    /* (non-Javadoc) 
    234      * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeBuilder#setChild(de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence, int, de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode) 
     234     * @see ITaskBuilder#setChild(ISequence, int, ITask) 
    235235     */ 
    236236    @Override 
     
    245245    } 
    246246 
    247     /* 
    248      * (non-Javadoc) 
    249      *  
    250      * @see de.ugoe.cs.tasktree.treeifc.TaskTreeBuilder#addChild(Selection, TaskTreeNode) 
     247    /* (non-Javadoc) 
     248     * @see ITaskBuilder#addChild(ISelection, ITask) 
    251249     */ 
    252250    @Override 
     
    260258    } 
    261259 
    262     /* 
    263      * (non-Javadoc) 
    264      *  
    265      * @see de.ugoe.cs.tasktree.treeifc.TaskTreeBuilder#setChild(Iteration, TaskTreeNode) 
     260    /* (non-Javadoc) 
     261     * @see ITaskBuilder#setMarkedTask(IIteration, ITask) 
    266262     */ 
    267263    @Override 
     
    281277 
    282278    /* (non-Javadoc) 
    283      * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeBuilder#setChild(de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional, de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode) 
     279     * @see ITaskTreeBuilder#setChild(IOptional, ITaskTreeNode) 
    284280     */ 
    285281    @Override 
     
    298294    } 
    299295 
    300     /* 
    301      * (non-Javadoc) 
    302      *  
    303      * @see de.ugoe.cs.tasktree.treeifc.TaskTreeBuilder#removeChild(Sequence, int) 
     296    /* (non-Javadoc) 
     297     * @see ITaskBuilder#removeChild(ISequence, int) 
    304298     */ 
    305299    @Override 
     
    313307    } 
    314308 
    315     /* 
    316      * (non-Javadoc) 
    317      *  
    318      * @see de.ugoe.cs.tasktree.treeifc.TaskTreeBuilder#removeChild(Selection, TaskTreeNode) 
     309    /* (non-Javadoc) 
     310     * @see ITaskBuilder#removeChild(ISelection, ITask) 
    319311     */ 
    320312    @Override 
     
    338330 
    339331    /* (non-Javadoc) 
    340      * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder#removeTaskInstance(de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceList, int) 
     332     * @see ITaskBuilder#removeTaskInstance(ITaskInstanceList, int) 
    341333     */ 
    342334    @Override 
     
    355347 
    356348    /* (non-Javadoc) 
    357      * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeBuilder#replaceChild(de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection, de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode, de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode) 
     349     * @see ITaskTreeBuilder#replaceChild(ISelection, ITaskTreeNode, ITaskTreeNode) 
    358350     */ 
    359351    @Override 
     
    377369    } 
    378370 
    379     /* 
    380      * (non-Javadoc) 
    381      *  
    382      * @see de.ugoe.cs.tasktree.treeifc.TaskTreeBuilder#setDescription(TaskTreeNode, String) 
     371    /* (non-Javadoc) 
     372     * @see ITaskBuilder#setDescription(ITask, java.lang.String) 
    383373     */ 
    384374    @Override 
     
    393383 
    394384    /** 
    395      *  
     385     * <p> 
     386     * internal convenience method for adding children to a structuring temporal relationship 
     387     * including a check for the child type. 
     388     * </p> 
    396389     */ 
    397390    private void addChildInternal(StructuringTemporalRelationship parent, int index, ITask child) { 
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskFactory.java

    r1146 r1216  
    3232 
    3333/** 
    34  * TODO comment 
     34 * <p> 
     35 * this is the default implementation of the interface {@link ITaskFactory}. It 
     36 * does not do anything fancy except implementing the interface. It instantiates the other 
     37 * implementations of the tree ifc in this package. 
     38 * </p> 
    3539 *  
    36  * @version $Revision: $ $Date: 21.02.2012$ 
    37  * @author 2012, last modified by $Author: patrick$ 
     40 * @author Patrick Harms 
    3841 */ 
    3942public class TaskFactory implements ITaskFactory { 
    4043 
    41     /* 
    42      * (non-Javadoc) 
    43      *  
    44      * @see TaskTreeNodeFactory#createNewEventTask(IEventType, IEventTarget) 
     44    /* (non-Javadoc) 
     45     * @see ITaskFactory#createNewEventTask(IEventType, IEventTarget) 
    4546     */ 
    4647    @Override 
     
    4950    } 
    5051 
    51     /* 
    52      * (non-Javadoc) 
    53      *  
    54      * @see de.ugoe.cs.tasktree.treeifc.TaskTreeNodeFactory#createNewSequence() 
     52    /* (non-Javadoc) 
     53     * @see ITaskFactory#createNewSequence() 
    5554     */ 
    5655    @Override 
     
    5958    } 
    6059 
    61     /* 
    62      * (non-Javadoc) 
    63      *  
    64      * @see de.ugoe.cs.tasktree.treeifc.TaskTreeNodeFactory#createNewIteration() 
     60    /* (non-Javadoc) 
     61     * @see ITaskFactory#createNewIteration() 
    6562     */ 
    6663    @Override 
     
    7067 
    7168    /* (non-Javadoc) 
    72      * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNodeFactory#createNewOptional() 
     69     * @see ITaskFactory#createNewOptional() 
    7370     */ 
    7471    @Override 
     
    7774    } 
    7875 
    79     /* 
    80      * (non-Javadoc) 
    81      *  
    82      * @see de.ugoe.cs.tasktree.treeifc.TaskTreeNodeFactory#createNewSelection() 
     76    /* (non-Javadoc) 
     77     * @see ITaskFactory#createNewSelection() 
    8378     */ 
    8479    @Override 
     
    8883 
    8984    /* (non-Javadoc) 
    90      * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory#createNewTaskInstance(ITask) 
     85     * @see ITaskFactory#createNewTaskInstance(ITask) 
    9186     */ 
    9287    @Override 
     
    9691 
    9792    /* (non-Javadoc) 
    98      * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory#createNewTaskInstanceList() 
     93     * @see ITaskFactory#createNewTaskInstanceList() 
    9994     */ 
    10095    @Override 
     
    10499 
    105100    /* (non-Javadoc) 
    106      * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory#createUserSession() 
     101     * @see ITaskFactory#createUserSession() 
    107102     */ 
    108103    @Override 
     
    112107 
    113108    /* (non-Javadoc) 
    114      * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory#createTaskModel(IUserSession) 
     109     * @see ITaskFactory#createTaskModel(List<IUserSession>) 
    115110     */ 
    116111    @Override 
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskInfo.java

    r1146 r1216  
    1919 
    2020/** 
    21  * TODO comment 
     21 * <p> 
     22 * this is the default implementation of the interface {@link ITaskInfo}. It 
     23 * does not do anything fancy except implementing the interface. 
     24 * </p> 
    2225 *  
    23  * @version $Revision: $ $Date: $ 
    24  * @author 2011, last modified by $Author: $ 
     26 * @author Patrick Harms 
    2527 */ 
    2628public class TaskInfo implements ITaskInfo { 
    2729     
    28     /**  */ 
     30    /** 
     31     * <p> 
     32     * default serial version UID 
     33     * </p> 
     34     */ 
    2935    private static final long serialVersionUID = 1L; 
    3036     
    31     /** */ 
     37    /** 
     38     * <p> 
     39     * the task to which the infos belong 
     40     * </p> 
     41     */ 
    3242    private ITask task; 
    3343 
    3444    /** 
     45     * <p> 
     46     * initialized the task infos with the task to which they belong. 
     47     * </p> 
     48     *  
    3549     * @param task 
    3650     */ 
     
    3953    } 
    4054 
    41     /* 
    42      * (non-Javadoc) 
    43      *  
    44      * @see de.ugoe.cs.tasktree.treeifc.NodeInfo#getTask() 
     55    /* (non-Javadoc) 
     56     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInfo#getTask() 
    4557     */ 
    4658    @Override 
     
    4961    } 
    5062 
    51     /* 
    52      * (non-Javadoc) 
    53      *  
     63    /* (non-Javadoc) 
    5464     * @see java.lang.Object#toString() 
    5565     */ 
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskInstance.java

    r1146 r1216  
    2424 
    2525/** 
    26  * TODO comment 
     26 * <p> 
     27 * this is the default implementation of the interface {@link ITaskInstance}. It 
     28 * does not do anything fancy except implementing the interface. 
     29 * </p> 
    2730 *  
    28  * @version $Revision: $ $Date: $ 
    29  * @author 2011, last modified by $Author: $ 
     31 * @author Patrick Harms 
    3032 */ 
    3133class TaskInstance implements ITaskInstance { 
    3234     
    33     /**  */ 
     35    /** 
     36     * <p> 
     37     * default serial version UID 
     38     * </p> 
     39     */ 
    3440    private static final long serialVersionUID = 1L; 
    3541 
    36     /** */ 
     42    /** 
     43     * <p> 
     44     * used as a counter to generate new ids for each newly created task instance. May overflow. 
     45     * </p> 
     46     */ 
    3747    private static int temporalId = 0; 
    3848 
    39     /** */ 
     49    /** 
     50     * <p> 
     51     * the task instantiated by this task instance 
     52     * </p> 
     53     */ 
    4054    private ITask task; 
    4155     
    42     /** */ 
     56    /** 
     57     * <p> 
     58     * the id of the task instance (unique throughout the system as long as {@link #temporalId} 
     59     * does not overflow. 
     60     * </p> 
     61     */ 
    4362    private int id; 
    4463 
    45     /** children */ 
     64    /** 
     65     * <p> 
     66     * the children of this task instance which are task instances, as well 
     67     * </p> 
     68     */ 
    4669    private List<ITaskInstance> children; 
    4770 
    4871    /** 
    49      *  
     72     * <p> 
     73     * instantiated the task instance with the task that is instantiated by the instance. It also 
     74     * assigns a unique id to the instance using {@link #getNewId()}. 
     75     * </p> 
    5076     */ 
    5177    TaskInstance(ITask task) { 
     
    5581 
    5682    /** 
    57      * TODO: comment 
    58      *  
    59      * @return 
     83     * <p> 
     84     * creates a new id for a task instance using {@link #temporalId} by incrementing it an 
     85     * returning its current value. Resets the counter if {@link Integer.MAX_VALUE} is reached. 
     86     * </p> 
     87     *  
     88     * @return a new unique id for a task instance as long as {@link #temporalId} does not overflow 
    6089     */ 
    6190    private static synchronized int getNewId() { 
     
    132161    } 
    133162 
    134     /* 
    135      * (non-Javadoc) 
    136      *  
     163    /* (non-Javadoc) 
    137164     * @see java.lang.Object#hashCode() 
    138165     */ 
     
    142169    } 
    143170 
    144     /* 
    145      * (non-Javadoc) 
    146      *  
     171    /* (non-Javadoc) 
    147172     * @see java.lang.Object#toString() 
    148173     */ 
     
    170195    } 
    171196 
    172     /* 
    173      * (non-Javadoc) 
    174      *  
     197    /* (non-Javadoc) 
    175198     * @see java.lang.Object#clone() 
    176199     */ 
     
    199222 
    200223    /** 
    201      *  
     224     * <p> 
     225     * used to add a child to this task instance 
     226     * </p> 
     227     *  
     228     * @param child the new child of this instance 
    202229     */ 
    203230    synchronized void addChild(ITaskInstance child) { 
     
    210237 
    211238    /** 
    212      *  
     239     * <p> 
     240     * used to add a child to this task instance at a specific position 
     241     * </p> 
     242     *  
     243     * @param index the position of the new child in the list of children 
     244     * @param child the new child of this instance 
    213245     */ 
    214246    synchronized void addChild(int index, ITaskInstance child) { 
     
    221253 
    222254    /** 
    223      * TODO: comment 
    224      *  
    225      * @param i 
    226      * @return 
     255     * <p> 
     256     * removes a child from this task instance at a specific position 
     257     * </p> 
     258     *  
     259     * @param index the position of the child to be removed 
     260     *  
     261     * @return the child remove from the children of this instance 
    227262     */ 
    228263    synchronized ITaskInstance removeChild(int index) { 
     
    237272 
    238273    /** 
     274     * <p> 
     275     * used to update the task represented through this instance 
     276     * </p> 
     277     *  
    239278     * @param task the task to set 
    240279     */ 
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskModel.java

    r1146 r1216  
    3030 
    3131/** 
    32  * TODO comment 
     32 * <p> 
     33 * this is the default implementation of the interface {@link ITaskModel}. It 
     34 * does not do anything fancy except implementing the interface. 
     35 * </p> 
    3336 *  
    34  * @version $Revision: $ $Date: 21.02.2012$ 
    35  * @author 2012, last modified by $Author: patrick$ 
     37 * @author Patrick Harms 
    3638 */ 
    3739class TaskModel implements ITaskModel { 
    3840     
    39     /**  */ 
     41    /** 
     42     * <p> 
     43     * default serial version UID 
     44     * </p> 
     45     */ 
    4046    private static final long serialVersionUID = 1L; 
    4147 
    42     /** the map of tasks */ 
     48    /** 
     49     * <p> 
     50     * the user sessions belonging to the model 
     51     * </p> 
     52     */ 
    4353    private List<IUserSession> userSessions; 
    4454 
    45     /** the map of tasks */ 
     55    /** 
     56     * <p> 
     57     * the tasks contained in the user session belonging to the model as well as statistical infos 
     58     * about them 
     59     * </p> 
     60     */ 
    4661    private Map<ITask, TaskInfo> taskMap = new HashMap<ITask, TaskInfo>(); 
    4762 
    4863    /** 
    49      * 
     64     * <p> 
     65     * initializes the task model with the user sessions out of which the tasks are extracted 
     66     * </p> 
     67     *  
     68     * @param userSessions as described 
    5069     */ 
    5170    TaskModel(List<IUserSession> userSessions) { 
     
    83102 
    84103    /* (non-Javadoc) 
    85      * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel#getTaskInfo(de.ugoe.cs.autoquest.tasktrees.treeifc.ITask) 
     104     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel#getTaskInfo(ITask) 
    86105     */ 
    87106    @Override 
     
    90109    } 
    91110 
     111    /* (non-Javadoc) 
     112     * @see java.lang.Object#clone() 
     113     */ 
     114    @Override 
     115    public TaskModel clone() { 
     116        return new TaskModel(userSessions); 
     117    } 
     118 
    92119    /** 
    93      * 
     120     * <p> 
     121     * internal convenience method to build the task model during initialization 
     122     * </p> 
    94123     */ 
    95124    private void addTaskToMap(ITask task) { 
     
    111140    } 
    112141 
    113     /* 
    114      * (non-Javadoc) 
    115      *  
    116      * @see java.lang.Object#clone() 
    117      */ 
    118     @Override 
    119     public TaskModel clone() { 
    120         return new TaskModel(userSessions); 
    121     } 
    122  
    123142} 
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/UserSession.java

    r1146 r1216  
    2525/** 
    2626 * <p> 
    27  * TODO comment 
     27 * this is the default implementation of the interface {@link IUserSession}. It 
     28 * does not do anything fancy except implementing the interface. 
    2829 * </p> 
    2930 *  
     
    3233class UserSession implements IUserSession { 
    3334     
    34     /**  */ 
     35    /** 
     36     * <p> 
     37     * default serial version UID 
     38     * </p> 
     39     */ 
    3540    private static final long serialVersionUID = 1L; 
     41     
    3642    /** 
    37      *  
     43     * <p> 
     44     * the task instances belonging to the user session 
     45     * </p> 
    3846     */ 
    3947    private List<ITaskInstance> executedTasks = new LinkedList<ITaskInstance>(); 
     
    7179    } 
    7280 
    73     /* 
    74      * (non-Javadoc) 
    75      *  
    76      * @see de.ugoe.cs.autoquest.tasktrees.treeifc.TaskTreeNode#equals(TaskTreeNode) 
     81    /* (non-Javadoc) 
     82     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.IUserSession#equals(IUserSession) 
    7783     */ 
    7884    @Override 
     
    8389    } 
    8490 
    85     /* 
    86      * (non-Javadoc) 
    87      *  
     91    /* (non-Javadoc) 
    8892     * @see java.lang.Object#hashCode() 
    8993     */ 
     
    9397    } 
    9498 
    95     /* 
    96      * (non-Javadoc) 
    97      *  
     99    /* (non-Javadoc) 
    98100     * @see java.lang.Object#toString() 
    99101     */ 
     
    103105    } 
    104106 
    105     /* 
    106      * (non-Javadoc) 
    107      *  
     107    /* (non-Javadoc) 
    108108     * @see java.lang.Object#clone() 
    109109     */ 
     
    130130 
    131131    /** 
    132      * 
     132     * <p> 
     133     * used internally to add a task instance to the user session 
     134     * </p> 
     135     *  
     136     * @param taskInstance the task instance to be added 
    133137     */ 
    134138    void addExecutedTask(ITaskInstance taskInstance) { 
     
    137141 
    138142    /** 
    139      * 
     143     * <p> 
     144     * used internally to add a task instance to the user session at a specific position 
     145     * </p> 
     146     *  
     147     * @param index        the index the task instance shall be added to 
     148     * @param taskInstance the task instance to be added 
    140149     */ 
    141150    void addExecutedTask(int index, ITaskInstance taskInstance) { 
     
    144153 
    145154    /** 
    146      * 
     155     * <p> 
     156     * used internally to remove a task instance from the user session 
     157     * </p> 
     158     *  
     159     * @param index the index of the task instance to be removed 
    147160     */ 
    148161    void removeExecutedTask(int index) { 
Note: See TracChangeset for help on using the changeset viewer.