Ignore:
Timestamp:
02/07/14 18:08:10 (11 years ago)
Author:
pharms
Message:
  • improved logging
Location:
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees
Files:
5 edited

Legend:

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

    r1294 r1357  
    4444    /** 
    4545     * <p> 
    46      * returns a human readable description for task.  
     46     * returns a human readable type for the task.  
     47     * </p> 
     48     *  
     49     * @return as described 
     50     */ 
     51    public String getType(); 
     52 
     53    /** 
     54     * <p> 
     55     * returns a human readable description for the task.  
    4756     * </p> 
    4857     *  
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/EventTask.java

    r1294 r1357  
    4343     */ 
    4444    EventTask(String description) { 
    45         super.setDescription(description); 
     45        super(description); 
    4646    } 
    4747 
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/MarkingTemporalRelationship.java

    r1215 r1357  
    4646    /** 
    4747     * <p> 
    48      * a human readable name for this temporal relationship 
    49      * </p> 
    50      */ 
    51     private String relationshipType; 
    52      
    53     /** 
    54      * <p> 
    5548     * initializes this temporal relationship with a human readable name 
    5649     * </p> 
     
    5952     */ 
    6053    MarkingTemporalRelationship(String relationshipType) { 
     54        super(relationshipType); 
     55         
    6156        if ((relationshipType == null) || ("".equals(relationshipType))) { 
    6257            throw new IllegalArgumentException 
    6358                ("the relationship type must be something meaningful"); 
    6459        } 
    65          
    66         this.relationshipType = relationshipType; 
    67         super.setDescription(this.relationshipType); 
    6860    } 
    6961 
     
    10193        this.markedTask = markedTask; 
    10294         
    103         super.setDescription(relationshipType + " of " + markedTask); 
     95        super.setDescription(markedTask.toString()); 
    10496    } 
    10597 
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/StructuringTemporalRelationship.java

    r1215 r1357  
    5555     */ 
    5656    StructuringTemporalRelationship(String relationshipType) { 
     57        super(relationshipType); 
     58         
    5759        if ((relationshipType == null) || ("".equals(relationshipType))) { 
    5860            throw new IllegalArgumentException 
    5961                ("the relationship type must be something meaningful"); 
    6062        } 
    61          
    62         super.setDescription(relationshipType); 
    6363    } 
    6464 
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/Task.java

    r1294 r1357  
    5454     */ 
    5555    private int id; 
     56     
     57    /** 
     58     * <p> 
     59     * a human readable type of the task (used for visualization purposes) 
     60     * </p> 
     61     */ 
     62    private String type; 
    5663 
    5764    /** 
     
    7279     * <p> 
    7380     * constructs a new task with a new id. The id is generated using the {@link #getNewId()} 
    74      * methdod 
    75      * </p> 
    76      */ 
    77     Task() { 
    78         id = getNewId(); 
     81     * method 
     82     * </p> 
     83     *  
     84     * @param type the human readable type of the task 
     85     *  
     86     * @throws IllegalArgumentException in the case the provided type is null 
     87     */ 
     88    Task(String type) { 
     89        this.id = getNewId(); 
     90        this.type = type; 
     91         
     92        if (type == null) { 
     93            throw new IllegalArgumentException("type must not be null"); 
     94        } 
    7995    } 
    8096 
     
    101117    public int getId() { 
    102118        return id; 
     119    } 
     120 
     121    /* (non-Javadoc) 
     122     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITask#getType() 
     123     */ 
     124    @Override 
     125    public String getType() { 
     126        return type; 
    103127    } 
    104128 
     
    143167    public synchronized String toString() { 
    144168        StringBuffer result = new StringBuffer(); 
    145         result.append("task "); 
     169        result.append(type); 
     170        result.append(" #"); 
    146171        result.append(id); 
    147172         
     
    185210    /** 
    186211     * <p> 
     212     * internally used to remove an instance from this task 
     213     * </p> 
     214     *  
     215     * @param instance the instance to be removed from this task 
     216     */ 
     217    void removeInstance(ITaskInstance instance) { 
     218        this.instances.remove(instance); 
     219    } 
     220 
     221    /** 
     222     * <p> 
    187223     * internally used to add an instance to this task 
    188224     * </p> 
Note: See TracChangeset for help on using the changeset viewer.