Ignore:
Timestamp:
04/19/13 19:28:32 (12 years ago)
Author:
adeicke
Message:

Renaming from *Tree to *Model.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/CMDperformUsabilityEvaluation.java

    r1152 r1158  
    3636public class CMDperformUsabilityEvaluation implements Command { 
    3737 
    38     private final int taskTreeParamaterIndex = 0; 
     38    private final int taskModelParamaterIndex = 0; 
    3939     
    4040    private final int evaluationResultParameterIndex = 1; 
     
    4949    @Override 
    5050    public void run(List<Object> parameters) { 
    51         String nameOfTaskTree = getTaskTreeParameter(parameters); 
    52         Optional<ITaskModel> taskModel = getTaskModelFromDataContainer(nameOfTaskTree); 
     51        String nameOfTaskModel = getTaskModelParameter(parameters); 
     52        Optional<ITaskModel> taskModel = getTaskModelFromDataContainer(nameOfTaskModel); 
    5353        if (taskModel.isPresent()) { 
    5454            UsabilityRuleset ruleset = getUsabilityRuleset(); 
     
    6868     * @return 
    6969     */ 
    70     private String getTaskTreeParameter(List<Object> parameters) { 
     70    private String getTaskModelParameter(List<Object> parameters) { 
    7171        try { 
    72             return (String) parameters.get(taskTreeParamaterIndex); 
     72            return (String) parameters.get(taskModelParamaterIndex); 
    7373        } catch (Exception e) { 
    74             throw new IllegalArgumentException("must provide a task tree name"); 
     74            throw new IllegalArgumentException("must provide a task model name"); 
    7575        } 
    7676    } 
     
    9696     * </p> 
    9797     * 
    98      * @param nameOfTaskTree 
     98     * @param nameOfTaskModel 
    9999     * @return 
    100100     */ 
    101     private Optional<ITaskModel> getTaskModelFromDataContainer(String nameOfTaskTree) { 
    102         Object dataObject = GlobalDataContainer.getInstance().getData(nameOfTaskTree); 
     101    private Optional<ITaskModel> getTaskModelFromDataContainer(String nameOfTaskModel) { 
     102        Object dataObject = GlobalDataContainer.getInstance().getData(nameOfTaskModel); 
    103103        if(dataObject != null) { 
    104104            if(dataObject instanceof ITaskModel) { 
    105                 ITaskModel taskTree = (ITaskModel) dataObject; 
    106                 return Optional.of(taskTree); 
     105                ITaskModel taskModel = (ITaskModel) dataObject; 
     106                return Optional.of(taskModel); 
    107107            } else { 
    108                 CommandHelpers.objectNotType(nameOfTaskTree, "ITaskModel"); 
     108                CommandHelpers.objectNotType(nameOfTaskModel, "ITaskModel"); 
    109109                return Optional.absent(); 
    110110            } 
    111111        } 
    112         CommandHelpers.objectNotFoundMessage(nameOfTaskTree); 
     112        CommandHelpers.objectNotFoundMessage(nameOfTaskModel); 
    113113        return Optional.absent(); 
    114114    } 
     
    145145    @Override 
    146146    public String help() { 
    147         return "peformUsabilityEvaluation <taskTree> {evaluationResult}"; 
     147        return "peformUsabilityEvaluation <taskModel> {evaluationResult}"; 
    148148    } 
    149149 
Note: See TracChangeset for help on using the changeset viewer.