- Timestamp:
- 09/14/11 19:24:58 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/commands/CMDparseXML.java
r171 r183 21 21 public class CMDparseXML implements Command { 22 22 23 /* (non-Javadoc) 23 /* 24 * (non-Javadoc) 25 * 24 26 * @see de.ugoe.cs.util.console.Command#help() 25 27 */ 26 28 @Override 27 29 public void help() { 28 Console.println("Usage: parseXML <filename> {< countMessageOccurences}");30 Console.println("Usage: parseXML <filename> {<sequencesName>} {<countMessageOccurences>}"); 29 31 } 30 32 31 /* (non-Javadoc) 33 /* 34 * (non-Javadoc) 35 * 32 36 * @see de.ugoe.cs.util.console.Command#run(java.util.List) 33 37 */ … … 35 39 public void run(List<Object> parameters) { 36 40 String filename; 41 String sequencesName = "sequences"; 37 42 boolean countMessageOccurences = false; 38 43 39 44 try { 40 45 filename = (String) parameters.get(0); 41 if (parameters.size() == 2) { 46 if (parameters.size() >= 2) { 47 sequencesName = (String) parameters.get(1); 48 } 49 if (parameters.size() >= 3) { 42 50 countMessageOccurences = Boolean 43 .parseBoolean((String) parameters.get( 1));51 .parseBoolean((String) parameters.get(2)); 44 52 } 45 53 } catch (Exception e) { … … 52 60 List<List<WindowsEvent>> sequences = parser.getSequences(); 53 61 54 if (GlobalDataContainer.getInstance().addData( "sequences", sequences)) {55 Console.traceln("Old data \"" + "sequences"+ "\" overwritten");62 if (GlobalDataContainer.getInstance().addData(sequencesName, sequences)) { 63 Console.traceln("Old data \"" + sequencesName + "\" overwritten"); 56 64 } 57 65 }
Note: See TracChangeset
for help on using the changeset viewer.