Changeset 240 for trunk/EventBenchConsole/src/de
- Timestamp:
- 10/05/11 17:29:56 (13 years ago)
- Location:
- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench
- Files:
-
- 1 added
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/AbstractTrainCommand.java
r209 r240 5 5 import java.util.List; 6 6 7 import de.ugoe.cs.eventbench.CommandHelpers; 7 8 import de.ugoe.cs.eventbench.SequenceInstanceOf; 8 9 import de.ugoe.cs.eventbench.data.Event; … … 73 74 sequencesName); 74 75 if (dataObject == null) { 75 Console.println("Object " + sequencesName 76 + " not found in storage."); 76 CommandHelpers.objectNotFoundMessage(sequencesName); 77 77 return; 78 78 } 79 79 if (!SequenceInstanceOf.isCollectionOfSequences(dataObject)) { 80 Co nsole.println("Object " + sequencesName81 + "not of type Collection<List<Event<?>>>.");80 CommandHelpers.objectNotType(sequencesName, 81 "Collection<List<Event<?>>>"); 82 82 return; 83 83 } -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDcalcCoverage.java
r234 r240 5 5 import java.util.List; 6 6 7 import de.ugoe.cs.eventbench.CommandHelpers; 7 8 import de.ugoe.cs.eventbench.SequenceInstanceOf; 8 9 import de.ugoe.cs.eventbench.coverage.CoverageCalculatorObserved; … … 57 58 observedName); 58 59 if (dataObjectProcess == null) { 59 Co nsole.printerrln("Model " + modelname + " not found in storage.");60 CommandHelpers.objectNotFoundMessage(modelname); 60 61 return; 61 62 } 62 63 if (!(dataObjectProcess instanceof IStochasticProcess)) { 63 Console.printerrln("Object " + modelname 64 + " not of type IStochasticProcess!"); 64 CommandHelpers.objectNotType(modelname, "IStochasticProcess"); 65 65 return; 66 66 } 67 67 if (dataObjectObserved == null) { 68 Co nsole.printerrln("Observed sequences not found in storage.");68 CommandHelpers.objectNotFoundMessage(observedName); 69 69 return; 70 70 } 71 71 if (!SequenceInstanceOf.isCollectionOfSequences(dataObjectObserved)) { 72 Co nsole.printerrln("Object " + observedName73 + " of type Collection<List<Event<?>>>!");72 CommandHelpers.objectNotType(observedName, 73 "Collection<List<Event<?>>>"); 74 74 return; 75 75 } … … 97 97 .getData(sequenceName); 98 98 if (dataObjectSequences == null) { 99 Console.println("Sequences " + sequenceName 100 + " not found in storage."); 99 CommandHelpers.objectNotFoundMessage(sequenceName); 101 100 return; 102 101 } else if (!SequenceInstanceOf 103 102 .isCollectionOfSequences(dataObjectSequences)) { 104 Co nsole.printerrln("Object " + sequenceName105 + "not of type Collection<List<Event<?>!");103 CommandHelpers.objectNotType(sequenceName, 104 "Collection<List<Event<?>>>"); 106 105 return; 107 106 } -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDcalcEntropy.java
r209 r240 4 4 import java.util.List; 5 5 6 import de.ugoe.cs.eventbench.CommandHelpers; 6 7 import de.ugoe.cs.eventbench.data.GlobalDataContainer; 7 8 import de.ugoe.cs.eventbench.models.FirstOrderMarkovModel; … … 47 48 .getData(modelname); 48 49 if (dataObject == null) { 49 Co nsole.println("Model " + modelname + "not found in storage.");50 CommandHelpers.objectNotFoundMessage(modelname); 50 51 return; 51 52 } 52 53 if (!(dataObject instanceof FirstOrderMarkovModel)) { 53 Console.println("Object " + modelname 54 + " is not a first-order Markov model!"); 54 CommandHelpers.objectNotType(modelname, "FirstOrderMarkovModel"); 55 55 return; 56 56 } -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDdeleteObject.java
r190 r240 4 4 import java.util.List; 5 5 6 import de.ugoe.cs.eventbench.CommandHelpers; 6 7 import de.ugoe.cs.eventbench.data.GlobalDataContainer; 7 8 import de.ugoe.cs.util.console.Command; … … 44 45 objectName); 45 46 if (!deleted) { 46 Co nsole.println("Object not found in storage!");47 CommandHelpers.objectNotFoundMessage(objectName); 47 48 } 48 49 } -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDgenerateFixedLengthSequences.java
r234 r240 11 11 import java.util.Set; 12 12 13 import de.ugoe.cs.eventbench.CommandHelpers; 13 14 import de.ugoe.cs.eventbench.data.Event; 14 15 import de.ugoe.cs.eventbench.data.GlobalDataContainer; … … 59 60 .getData(modelname); 60 61 if (dataObject == null) { 61 Co nsole.println("Model " + modelname + " not found in storage.");62 CommandHelpers.objectNotFoundMessage(modelname); 62 63 return; 63 64 } else if (!(dataObject instanceof IStochasticProcess)) { 64 Co nsole.println("Object " + modelname + " not of type MarkovModel!");65 CommandHelpers.objectNotType(modelname, "IStochasticProcess"); 65 66 return; 66 67 } … … 107 108 } 108 109 if (GlobalDataContainer.getInstance().addData(sequencesName, sequences)) { 109 Co nsole.traceln("Old data \"" + sequencesName + "\" overwritten");110 CommandHelpers.dataOverwritten(sequencesName); 110 111 } 111 112 Console.println("" + sequences.size() + " sequences generated"); -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDgenerateRandomReplay.java
r209 r240 6 6 import java.util.List; 7 7 8 import de.ugoe.cs.eventbench.CommandHelpers; 8 9 import de.ugoe.cs.eventbench.ReplayGenerator; 9 10 import de.ugoe.cs.eventbench.data.GlobalDataContainer; … … 58 59 .getData(modelname); 59 60 if (dataObject == null) { 60 Co nsole.println("Model " + modelname + " not found in storage.");61 CommandHelpers.objectNotFoundMessage(modelname); 61 62 return; 62 63 } 63 64 if (!(dataObject instanceof IStochasticProcess)) { 64 Co nsole.println("Object " + modelname + " not of type MarkovModel!");65 CommandHelpers.objectNotType(modelname, "IStochasticProcess"); 65 66 return; 66 67 } -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDgenerateRandomSequences.java
r209 r240 6 6 import java.util.Set; 7 7 8 import de.ugoe.cs.eventbench.CommandHelpers; 8 9 import de.ugoe.cs.eventbench.data.GlobalDataContainer; 9 10 import de.ugoe.cs.eventbench.data.Event; … … 57 58 .getData(modelname); 58 59 if (dataObject == null) { 59 Co nsole.println("Model " + modelname + " not found in storage.");60 CommandHelpers.objectNotFoundMessage(modelname); 60 61 return; 61 62 } 62 63 if (!(dataObject instanceof IStochasticProcess)) { 63 Co nsole.println("Object " + modelname + " not of type MarkovModel!");64 CommandHelpers.objectNotType(modelname, "IStochasticProcess"); 64 65 return; 65 66 } … … 82 83 } 83 84 if (GlobalDataContainer.getInstance().addData(sequencesName, sequences)) { 84 Co nsole.traceln("Old data \"" + sequencesName + "\" overwritten");85 CommandHelpers.dataOverwritten(sequencesName); 85 86 } 86 87 } -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDgenerateReplayfile.java
r209 r240 5 5 import java.util.List; 6 6 7 import de.ugoe.cs.eventbench.CommandHelpers; 7 8 import de.ugoe.cs.eventbench.ReplayGenerator; 8 9 import de.ugoe.cs.eventbench.SequenceInstanceOf; … … 53 54 sequencesName); 54 55 if (dataObject == null) { 55 Console.println("Object " + sequencesName 56 + " not found in storage."); 56 CommandHelpers.objectNotFoundMessage(sequencesName); 57 57 return; 58 58 } 59 59 if (!SequenceInstanceOf.isCollectionOfSequences(dataObject)) { 60 Co nsole.println("Object " + sequencesName61 + "not of type Collection<List<Event<?>>>.");60 CommandHelpers.objectNotType(sequencesName, 61 "Collection<List<Event<?>>>"); 62 62 return; 63 63 } -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDlistSymbols.java
r209 r240 5 5 import java.util.List; 6 6 7 import de.ugoe.cs.eventbench.CommandHelpers; 7 8 import de.ugoe.cs.eventbench.data.GlobalDataContainer; 8 9 import de.ugoe.cs.eventbench.models.IStochasticProcess; … … 43 44 .getData(modelname); 44 45 if (dataObject == null) { 45 Co nsole.println("Model " + modelname + "not found in storage.");46 CommandHelpers.objectNotFoundMessage(modelname); 46 47 return; 47 48 } 48 49 if (!(dataObject instanceof IStochasticProcess)) { 49 Console.println("Object " + modelname 50 + " is not a stochastic process!"); 50 CommandHelpers.objectNotType(modelname, "IStochasticProcess"); 51 51 return; 52 52 } -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDloadObject.java
r211 r240 7 7 import java.util.List; 8 8 9 import de.ugoe.cs.eventbench.CommandHelpers; 9 10 import de.ugoe.cs.eventbench.data.GlobalDataContainer; 10 11 import de.ugoe.cs.util.console.Command; … … 52 53 } 53 54 if (GlobalDataContainer.getInstance().addData(objectName, data)) { 54 Co nsole.traceln("Old data \"" + objectName + "\" overwritten");55 CommandHelpers.dataOverwritten(objectName); 55 56 } 56 57 } -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDmodelSize.java
r171 r240 4 4 import java.util.List; 5 5 6 import de.ugoe.cs.eventbench.CommandHelpers; 6 7 import de.ugoe.cs.eventbench.data.GlobalDataContainer; 7 8 import de.ugoe.cs.eventbench.models.IStochasticProcess; … … 36 37 .getData(modelname); 37 38 if (dataObject == null) { 38 Co nsole.printerrln("No model with name " + modelname + "found");39 CommandHelpers.objectNotFoundMessage(modelname); 39 40 return; 40 41 } 41 42 if (!(dataObject instanceof IStochasticProcess)) { 42 Console.printerrln("Object " + modelname 43 + " not of type IStochasticProcess!"); 43 CommandHelpers.objectNotType(modelname, "IStochasticProcess"); 44 44 return; 45 45 } -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDprintDot.java
r209 r240 4 4 import java.util.List; 5 5 6 import de.ugoe.cs.eventbench.CommandHelpers; 6 7 import de.ugoe.cs.eventbench.data.GlobalDataContainer; 7 8 import de.ugoe.cs.eventbench.models.IDotCompatible; … … 48 49 .getData(modelname); 49 50 if (dataObject == null) { 50 Co nsole.println("Model " + modelname + "not found in storage.");51 CommandHelpers.objectNotFoundMessage(modelname); 51 52 return; 52 53 } 53 54 if (!(dataObject instanceof IDotCompatible)) { 54 Console.println("Object " + modelname 55 + " does not implement IDotCompatible!"); 55 CommandHelpers.objectNotType(modelname, "IDotCompatible"); 56 56 return; 57 57 } -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDprintRandomSession.java
r209 r240 4 4 import java.util.List; 5 5 6 import de.ugoe.cs.eventbench.CommandHelpers; 6 7 import de.ugoe.cs.eventbench.data.Event; 7 8 import de.ugoe.cs.eventbench.data.GlobalDataContainer; … … 48 49 .getData(modelname); 49 50 if (dataObject == null) { 50 Co nsole.println("Model " + modelname + " not found in storage.");51 CommandHelpers.objectNotFoundMessage(modelname); 51 52 return; 52 53 } 53 54 if (!(dataObject instanceof IStochasticProcess)) { 54 Co nsole.println("Object " + modelname + " not of type MarkovModel!");55 CommandHelpers.objectNotType(modelname, "IStochasticProcess"); 55 56 return; 56 57 } -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDprintTrieDot.java
r223 r240 4 4 import java.util.List; 5 5 6 import de.ugoe.cs.eventbench.CommandHelpers; 6 7 import de.ugoe.cs.eventbench.data.GlobalDataContainer; 7 8 import de.ugoe.cs.eventbench.models.Trie; … … 49 50 .getData(modelname); 50 51 if (dataObject == null) { 51 Co nsole.println("Model " + modelname + "not found in storage.");52 CommandHelpers.objectNotFoundMessage(modelname); 52 53 return; 53 54 } 54 55 if (!(dataObject instanceof TrieBasedModel)) { 55 Co nsole.println("Object " + modelname + " is not a TrieBasedModel!");56 CommandHelpers.objectNotType(modelname, "TrieBasedModel"); 56 57 return; 57 58 } -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDsaveObject.java
r223 r240 7 7 import java.util.List; 8 8 9 import de.ugoe.cs.eventbench.CommandHelpers; 9 10 import de.ugoe.cs.eventbench.data.GlobalDataContainer; 10 11 import de.ugoe.cs.util.console.Command; … … 41 42 objectName); 42 43 if (dataObject == null) { 43 Console.println("Object " + objectName + " not found in storage."); 44 CommandHelpers.objectNotFoundMessage(objectName); 45 return; 44 46 } 45 47 -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDsequenceStatistics.java
r209 r240 7 7 import java.util.TreeMap; 8 8 9 import de.ugoe.cs.eventbench.CommandHelpers; 9 10 import de.ugoe.cs.eventbench.SequenceInstanceOf; 10 11 import de.ugoe.cs.eventbench.data.Event; … … 41 42 sequencesName); 42 43 if (dataObject == null) { 43 Console.println("Object " + sequencesName 44 + " not found in storage."); 44 CommandHelpers.objectNotFoundMessage(sequencesName); 45 45 return; 46 46 } 47 47 if (!SequenceInstanceOf.isCollectionOfSequences(dataObject)) { 48 Co nsole.println("Object " + sequencesName49 + "not of type Collection<List<Event<?>>>.");48 CommandHelpers.objectNotType(sequencesName, 49 "Collection<List<Event<?>>>"); 50 50 return; 51 51 } -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDshowMarkovModel.java
r209 r240 11 11 import org.apache.commons.collections15.Transformer; 12 12 13 import de.ugoe.cs.eventbench.CommandHelpers; 13 14 import de.ugoe.cs.eventbench.data.GlobalDataContainer; 14 15 import de.ugoe.cs.eventbench.models.FirstOrderMarkovModel; … … 65 66 .getData(modelname); 66 67 if (dataObject == null) { 67 Co nsole.println("Object " + modelname + " not found in storage.");68 CommandHelpers.objectNotFoundMessage(modelname); 68 69 return; 69 70 } 70 71 if (!(dataObject instanceof FirstOrderMarkovModel)) { 71 Console.println("Object " + modelname 72 + "not of type FirstOrderMarkovModel."); 72 CommandHelpers.objectNotType(modelname, "FirstOrderMarkovModel"); 73 73 return; 74 74 } -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDshowSequences.java
r239 r240 7 7 import org.eclipse.swt.widgets.Shell; 8 8 9 import de.ugoe.cs.eventbench.CommandHelpers; 9 10 import de.ugoe.cs.eventbench.SequenceInstanceOf; 10 11 import de.ugoe.cs.eventbench.data.GlobalDataContainer; … … 49 50 sequencesName); 50 51 if (dataObject == null) { 51 Console.println("Object " + sequencesName 52 + " not found in storage."); 52 CommandHelpers.objectNotFoundMessage(sequencesName); 53 53 return; 54 54 } 55 55 if (!SequenceInstanceOf.isCollectionOfSequences(dataObject)) { 56 Co nsole.println("Object " + sequencesName57 + "not of type Collection<List<Event<?>>>.");56 CommandHelpers.objectNotType(sequencesName, 57 "Collection<List<Event<?>>>"); 58 58 return; 59 59 } -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDshowTimer.java
r235 r240 4 4 import java.util.List; 5 5 6 import de.ugoe.cs.eventbench.CommandHelpers; 6 7 import de.ugoe.cs.eventbench.data.GlobalDataContainer; 7 8 import de.ugoe.cs.util.console.Command; … … 35 36 timerName); 36 37 if (dataObject == null) { 37 Co nsole.printerrln("No object with name " + timerName + " found");38 CommandHelpers.objectNotFoundMessage(timerName); 38 39 return; 39 40 } 40 41 if (!(dataObject instanceof Long)) { 41 Co nsole.printerrln("Object " + timerName + " not of type Long!");42 CommandHelpers.objectNotType(timerName, "Long"); 42 43 return; 43 44 } -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDshowTrie.java
r209 r240 11 11 import org.apache.commons.collections15.Transformer; 12 12 13 import de.ugoe.cs.eventbench.CommandHelpers; 13 14 import de.ugoe.cs.eventbench.data.GlobalDataContainer; 14 15 import de.ugoe.cs.eventbench.models.Trie; … … 62 63 .getData(modelname); 63 64 if (dataObject == null) { 64 Co nsole.printerrln("Object " + modelname + " not found in storage.");65 CommandHelpers.objectNotFoundMessage(modelname); 65 66 return; 66 67 } 67 68 if (!(dataObject instanceof TrieBasedModel)) { 68 Console.printerr("Object " + modelname 69 + " not of type TrieBasedModel."); 69 CommandHelpers.objectNotType(modelname, "TrieBasedModel"); 70 70 } 71 71 TrieBasedModel model = (TrieBasedModel) dataObject; -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDstartTimer.java
r235 r240 4 4 import java.util.List; 5 5 6 import de.ugoe.cs.eventbench.CommandHelpers; 6 7 import de.ugoe.cs.eventbench.data.GlobalDataContainer; 7 8 import de.ugoe.cs.util.console.Command; … … 33 34 Long time = System.currentTimeMillis(); 34 35 if (GlobalDataContainer.getInstance().addData(timerName, time)) { 35 Co nsole.traceln("Old data \"" + timerName + "\" overwritten");36 CommandHelpers.dataOverwritten(timerName); 36 37 } 37 38 } -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDupdateModel.java
r209 r240 5 5 import java.util.List; 6 6 7 import de.ugoe.cs.eventbench.CommandHelpers; 7 8 import de.ugoe.cs.eventbench.SequenceInstanceOf; 8 9 import de.ugoe.cs.eventbench.data.Event; … … 43 44 sequencesName); 44 45 if (dataObject == null) { 45 Console.println("Object " + sequencesName 46 + " not found in storage."); 46 CommandHelpers.objectNotFoundMessage(sequencesName); 47 47 return; 48 48 } 49 49 if (!SequenceInstanceOf.isCollectionOfSequences(dataObject)) { 50 Co nsole.println("Object " + sequencesName51 + "not of type Collection<List<Event<?>>>.");50 CommandHelpers.objectNotType(sequencesName, 51 "Collection<List<Event<?>>>"); 52 52 return; 53 53 } … … 56 56 dataObject = GlobalDataContainer.getInstance().getData(modelname); 57 57 if (dataObject == null) { 58 Co nsole.println("Object " + modelname + " not found in storage.");58 CommandHelpers.objectNotFoundMessage(modelname); 59 59 return; 60 60 } 61 61 if (!(dataObject instanceof TrieBasedModel)) { 62 Console.println("Object " + modelname 63 + " not of type TrieBasedModel"); 62 CommandHelpers.objectNotType(modelname, "TrieBasedModel"); 64 63 return; 65 64 } -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/web/commands/CMDloadSessionsFromClickstream.java
r236 r240 8 8 import java.util.List; 9 9 10 import de.ugoe.cs.eventbench.CommandHelpers; 10 11 import de.ugoe.cs.eventbench.data.GlobalDataContainer; 11 12 import de.ugoe.cs.eventbench.web.WeblogParser; … … 88 89 if (GlobalDataContainer.getInstance().addData(sequencesName, 89 90 parser.getSequences())) { 90 Co nsole.traceln("Old data \"" + sequencesName + "\" overwritten");91 CommandHelpers.dataOverwritten(sequencesName); 91 92 } 92 93 if (generateFrequentUsers) { … … 95 96 .getFrequentUserSequences(); 96 97 for (int i = 0; i < frequentUserIDs.size(); i++) { 97 if (GlobalDataContainer.getInstance().addData(98 sequencesName + "_" + frequentUserIDs.get(i),98 String seqName = sequencesName + "_" + frequentUserIDs.get(i); 99 if (GlobalDataContainer.getInstance().addData(seqName, 99 100 frequentUserSessions.get(i))) { 100 Console.traceln("Old data \"" + sequencesName 101 + "\" overwritten"); 101 CommandHelpers.dataOverwritten(seqName); 102 102 } 103 103 } -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/commands/CMDparseXML.java
r229 r240 6 6 import java.util.SortedSet; 7 7 8 import de.ugoe.cs.eventbench.CommandHelpers; 8 9 import de.ugoe.cs.eventbench.data.GlobalDataContainer; 9 10 import de.ugoe.cs.eventbench.windows.LogParser; … … 65 66 66 67 if (GlobalDataContainer.getInstance().addData(sequencesName, sequences)) { 67 Co nsole.traceln("Old data \"" + sequencesName + "\" overwritten");68 CommandHelpers.dataOverwritten(sequencesName); 68 69 } 69 if( GlobalDataContainer.getInstance().addData(sequencesName+"_targets", targets)) { 70 Console.traceln("Old data \"" + sequencesName+"_targets" + "\" overwritten"); 70 if (GlobalDataContainer.getInstance().addData( 71 sequencesName + "_targets", targets)) { 72 CommandHelpers.dataOverwritten(sequencesName + "_targets"); 71 73 } 72 74 }
Note: See TracChangeset
for help on using the changeset viewer.