Ignore:
Timestamp:
08/28/12 13:33:23 (12 years ago)
Author:
sherbold
Message:
  • modified Command.help(): the help now returns a string with its usage instead of writing directly to the console
  • modified listCommands: now writes the help string of each command instead of just the name; this way, the parameters are displayed directly
  • moved listCommands from quest-ui-core to java-utils
Location:
trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands
Files:
29 edited

Legend:

Unmodified
Added
Removed
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDcalcCoverage.java

    r547 r664  
    135135         */ 
    136136        @Override 
    137         public void help() { 
    138                 Console.println("Usage: calcCoverage <modelname> <observedSequences> [sequenceNames] <minCovLength> <maxCovLength>"); 
     137        public String help() { 
     138                return "calcCoverage <modelname> <observedSequences> [sequenceNames] <minCovLength> <maxCovLength>"; 
    139139        } 
    140140 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDcalcEntropy.java

    r434 r664  
    2626         */ 
    2727        @Override 
    28         public void help() { 
    29                 Console.println("Usage: calcEntropy <modelname>"); 
     28        public String help() { 
     29                return "calcEntropy <modelname>"; 
    3030        } 
    3131 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDdeleteObject.java

    r434 r664  
    77import de.ugoe.cs.quest.ui.GlobalDataContainer; 
    88import de.ugoe.cs.util.console.Command; 
    9 import de.ugoe.cs.util.console.Console; 
    109 
    1110/** 
     
    2524         */ 
    2625        @Override 
    27         public void help() { 
    28                 Console.println("Usage: deleteObject <objectname>"); 
     26        public String help() { 
     27                return "deleteObject <objectname>"; 
    2928        } 
    3029 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDflattenModel.java

    r434 r664  
    1010import de.ugoe.cs.quest.usageprofiles.ModelFlattener; 
    1111import de.ugoe.cs.util.console.Command; 
    12 import de.ugoe.cs.util.console.Console; 
    1312 
    1413/** 
     
    6766         */ 
    6867        @Override 
    69         public void help() { 
    70                 Console.println("Usage: flattenModel <modelname> <modelname_flattened>"); 
     68        public String help() { 
     69                return "flattenModel <modelname> <modelname_flattened>"; 
    7170        } 
    7271} 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDgenerateFixedLengthSequences.java

    r547 r664  
    8383         */ 
    8484        @Override 
    85         public void help() { 
    86                 Console.println("Usage: generateFixedLengthSequences <modelname> <sequencesName> <minlenght> <maxlength> {<all>} {<numSequences>} {<validEnd>}"); 
     85        public String help() { 
     86                return "generateFixedLengthSequences <modelname> <sequencesName> <minlenght> <maxlength> {<all>} {<numSequences>} {<validEnd>}"; 
    8787        } 
    8888 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDgenerateGreedy.java

    r639 r664  
    174174         */ 
    175175        @Override 
    176         public void help() { 
    177                 Console.println("generateGreedy <modelname> <sequencesName> <minLength> <maxLength> <coverageDepth> <desiredCoverage> {<validEnd>}"); 
     176        public String help() { 
     177                return "generateGreedy <modelname> <sequencesName> <minLength> <maxLength> <coverageDepth> <desiredCoverage> {<validEnd>}"; 
    178178        } 
    179179 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDgenerateHybrid.java

    r547 r664  
    9292         */ 
    9393        @Override 
    94         public void help() { 
    95                 Console.println("Usage: generateHybrid <modelname> <sequencesName> <lenght> <maxlengthAll> <numSequences> {<validEnd>}"); 
     94        public String help() { 
     95                return "generateHybrid <modelname> <sequencesName> <lenght> <maxlengthAll> <numSequences> {<validEnd>}"; 
    9696        } 
    9797 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDgenerateRandomReplay.java

    r641 r664  
    3030         */ 
    3131        @Override 
    32         public void help() { 
    33                 Console.println("Usage: generateRandomReplay <modelName> <filename> {<numSessions>}"); 
     32        public String help() { 
     33                return "generateRandomReplay <modelName> <filename> {<numSessions>}"; 
    3434        } 
    3535 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDgenerateRandomSequences.java

    r547 r664  
    8989         */ 
    9090        @Override 
    91         public void help() { 
    92                 Console.println("Usage: generateRandomSequenecs <modelName> <sequencesName> <numSessions> <minLength> <maxLength> {<maxIter>} {<validEnd>}"); 
     91        public String help() { 
     92                return "generateRandomSequenecs <modelName> <sequencesName> <numSessions> <minLength> <maxLength> {<maxIter>} {<validEnd>}"; 
    9393        } 
    9494 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDgenerateReplayfile.java

    r547 r664  
    1111import de.ugoe.cs.quest.ui.GlobalDataContainer; 
    1212import de.ugoe.cs.util.console.Command; 
    13 import de.ugoe.cs.util.console.Console; 
    1413 
    1514/** 
     
    2928         */ 
    3029        @Override 
    31         public void help() { 
    32                 Console.println("Usage: generateReplayfile <filename> <sequences>"); 
     30        public String help() { 
     31                return "generateReplayfile <filename> <sequences>"; 
    3332        } 
    3433 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDlistSymbols.java

    r434 r664  
    6767         */ 
    6868        @Override 
    69         public void help() { 
    70                 Console.println("Usage: listStates <modelName> {<sort>}"); 
     69        public String help() { 
     70                return "listStates <modelName> {<sort>}"; 
    7171        } 
    7272 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDload.java

    r434 r664  
    5555         */ 
    5656        @Override 
    57         public void help() { 
    58                 Console.println("Usage: load <filename>"); 
     57        public String help() { 
     58                return "load <filename>"; 
    5959        } 
    6060 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDloadObject.java

    r434 r664  
    6363         */ 
    6464        @Override 
    65         public void help() { 
    66                 Console.println("Usage: loadObject <filename> <objectName>"); 
     65        public String help() { 
     66                return "loadObject <filename> <objectName>"; 
    6767        } 
    6868 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDmodelSize.java

    r434 r664  
    5757         */ 
    5858        @Override 
    59         public void help() { 
    60                 Console.println("Usage: modelSize <modelName>"); 
     59        public String help() { 
     60                return "modelSize <modelName>"; 
    6161        } 
    6262 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDprintDot.java

    r434 r664  
    2727         */ 
    2828        @Override 
    29         public void help() { 
    30                 Console.println("Usage: printDot <modelname>"); 
     29        public String help() { 
     30                return "printDot <modelname>"; 
    3131        } 
    3232 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDprintTrieDot.java

    r434 r664  
    2828         */ 
    2929        @Override 
    30         public void help() { 
    31                 Console.println("Usage: printTreeDot <modelname>"); 
     30        public String help() { 
     31                return "printTreeDot <modelname>"; 
    3232        } 
    3333 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDsave.java

    r434 r664  
    5353         */ 
    5454        @Override 
    55         public void help() { 
    56                 Console.println("Usage: save <filename>"); 
     55        public String help() { 
     56                return "save <filename>"; 
    5757        } 
    5858 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDsaveObject.java

    r434 r664  
    6464         */ 
    6565        @Override 
    66         public void help() { 
    67                 Console.println("Usage: saveObject <filename> <objectName>"); 
     66        public String help() { 
     67                return "saveObject <filename> <objectName>"; 
    6868        } 
    6969 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDsequenceStatistics.java

    r547 r664  
    7777         */ 
    7878        @Override 
    79         public void help() { 
    80                 Console.println("Usage: sequenceStatistics <sequencesName>"); 
     79        public String help() { 
     80                return "sequenceStatistics <sequencesName>"; 
    8181        } 
    8282 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDshowMarkovModel.java

    r434 r664  
    1616import de.ugoe.cs.quest.usageprofiles.FirstOrderMarkovModel.MarkovEdge; 
    1717import de.ugoe.cs.util.console.Command; 
    18 import de.ugoe.cs.util.console.Console; 
     18import edu.uci.ics.jung.algorithms.layout.ISOMLayout; 
    1919import edu.uci.ics.jung.algorithms.layout.Layout; 
    20 import edu.uci.ics.jung.algorithms.layout.ISOMLayout; 
    2120import edu.uci.ics.jung.graph.Graph; 
    2221import edu.uci.ics.jung.visualization.BasicVisualizationServer; 
     
    4039         */ 
    4140        @Override 
    42         public void help() { 
    43                 Console.println("Usage: showMarkovModel <modelName> {<showNodeNames>}"); 
     41        public String help() { 
     42                return "showMarkovModel <modelName> {<showNodeNames>}"; 
    4443        } 
    4544 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDshowTimer.java

    r639 r664  
    5555         */ 
    5656        @Override 
    57         public void help() { 
    58                 Console.println("Usage: showTimer <timerName>"); 
     57        public String help() { 
     58                return "showTimer <timerName>"; 
    5959        } 
    6060 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDshowTrie.java

    r434 r664  
    1414import de.ugoe.cs.quest.ui.GlobalDataContainer; 
    1515import de.ugoe.cs.quest.usageprofiles.Trie; 
    16 import de.ugoe.cs.quest.usageprofiles.TrieBasedModel; 
    1716import de.ugoe.cs.quest.usageprofiles.Trie.Edge; 
    1817import de.ugoe.cs.quest.usageprofiles.Trie.TrieVertex; 
     18import de.ugoe.cs.quest.usageprofiles.TrieBasedModel; 
    1919import de.ugoe.cs.util.console.Command; 
    20 import de.ugoe.cs.util.console.Console; 
    2120import edu.uci.ics.jung.algorithms.layout.Layout; 
    2221import edu.uci.ics.jung.algorithms.layout.TreeLayout; 
     
    4241         */ 
    4342        @Override 
    44         public void help() { 
    45                 Console.println("Usage: showTrie <modelName>"); 
     43        public String help() { 
     44                return "showTrie <modelName>"; 
    4645        } 
    4746 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDstartFileListener.java

    r434 r664  
    77import de.ugoe.cs.quest.ui.GlobalDataContainer; 
    88import de.ugoe.cs.util.console.Command; 
    9 import de.ugoe.cs.util.console.Console; 
    109import de.ugoe.cs.util.console.FileOutputListener; 
    1110 
     
    4746         */ 
    4847        @Override 
    49         public void help() { 
    50                 Console.println("Usage: startFileListener <filename>"); 
     48        public String help() { 
     49                return "startFileListener <filename>"; 
    5150        } 
    5251 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDstartTimer.java

    r434 r664  
    77import de.ugoe.cs.quest.ui.GlobalDataContainer; 
    88import de.ugoe.cs.util.console.Command; 
    9 import de.ugoe.cs.util.console.Console; 
    109 
    1110/** 
     
    4443         */ 
    4544        @Override 
    46         public void help() { 
    47                 Console.println("Usage: startTimer <timerName>"); 
     45        public String help() { 
     46                return "startTimer <timerName>"; 
    4847        } 
    4948 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDstopFileListener.java

    r434 r664  
    77import de.ugoe.cs.quest.ui.GlobalDataContainer; 
    88import de.ugoe.cs.util.console.Command; 
    9 import de.ugoe.cs.util.console.Console; 
    109import de.ugoe.cs.util.console.FileOutputListener; 
    1110 
     
    4443 
    4544        @Override 
    46         public void help() { 
    47                 Console.println("Command: stopFileListener <filename>"); 
     45        public String help() { 
     46                return "stopFileListener <filename>"; 
    4847 
    4948        } 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDtrainDFA.java

    r434 r664  
    66import de.ugoe.cs.quest.usageprofiles.DeterministicFiniteAutomaton; 
    77import de.ugoe.cs.quest.usageprofiles.TrieBasedModel; 
    8 import de.ugoe.cs.util.console.Console; 
    98 
    109/** 
     
    2423         */ 
    2524        @Override 
    26         public void help() { 
    27                 Console.println("Usage: trainDFA <modelName> <sequencesName>"); 
     25        public String help() { 
     26                return "trainDFA <modelName> <sequencesName>"; 
    2827        } 
    2928 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDtrainMarkovModel.java

    r434 r664  
    77import de.ugoe.cs.quest.usageprofiles.HighOrderMarkovModel; 
    88import de.ugoe.cs.quest.usageprofiles.TrieBasedModel; 
    9 import de.ugoe.cs.util.console.Console; 
    109 
    1110/** 
     
    3231         */ 
    3332        @Override 
    34         public void help() { 
    35                 Console.println("Usage: trainMarkovModel <modelName> <sequencesName> {<order>}"); 
     33        public String help() { 
     34                return "trainMarkovModel <modelName> <sequencesName> {<order>}"; 
    3635        } 
    3736 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDtrainPPM.java

    r434 r664  
    66import de.ugoe.cs.quest.usageprofiles.PredictionByPartialMatch; 
    77import de.ugoe.cs.quest.usageprofiles.TrieBasedModel; 
    8 import de.ugoe.cs.util.console.Console; 
    98 
    109/** 
     
    4544         */ 
    4645        @Override 
    47         public void help() { 
    48                 Console.println("Usage: trainPPM <modelName> <sequencesName> <probEscape> <maxOrder> {<minOrder>}"); 
     46        public String help() { 
     47                return "trainPPM <modelName> <sequencesName> <probEscape> <maxOrder> {<minOrder>}"; 
    4948        } 
    5049 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDupdateModel.java

    r547 r664  
    1111import de.ugoe.cs.quest.usageprofiles.TrieBasedModel; 
    1212import de.ugoe.cs.util.console.Command; 
    13 import de.ugoe.cs.util.console.Console; 
    1413 
    1514/** 
     
    7473         */ 
    7574        @Override 
    76         public void help() { 
    77                 Console.println("Usage: updateModel <modelname> <sequencesName>"); 
     75        public String help() { 
     76                return "updateModel <modelname> <sequencesName>"; 
    7877        } 
    7978 
Note: See TracChangeset for help on using the changeset viewer.