- Timestamp:
- 03/08/12 09:21:51 (13 years ago)
- Location:
- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/jfc/commands
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/jfc/commands/CMDparseDirJFC.java
r389 r392 64 64 Collection<List<JFCEvent>> sequences = parser.getSequences(); 65 65 Console.traceln("Pre-computing event target equalities."); 66 // compare all Events to a dummy event to make sure they are known by 67 // the JFCTargetComparator 68 JFCEvent dummyEvent = new JFCEvent("dummy"); 69 for (List<JFCEvent> sequence : sequences) { 70 for (JFCEvent event : sequence) { 71 event.equals(dummyEvent); 72 } 73 } 66 74 JFCTargetComparator.setMutable(false); 67 75 -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/jfc/commands/CMDparseJFC.java
r389 r392 44 44 JFCTargetComparator.setMutable(true); 45 45 JFCLogParser parser = new JFCLogParser(); 46 46 47 47 parser.parseFile(filename); 48 48 Collection<List<JFCEvent>> sequences = parser.getSequences(); 49 49 50 Console.traceln("Pre-computing event target equalities."); 51 // compare all Events to a dummy event to make sure they are known by 52 // the JFCTargetComparator 53 JFCEvent dummyEvent = new JFCEvent("dummy"); 54 for (List<JFCEvent> sequence : sequences) { 55 for (JFCEvent event : sequence) { 56 event.equals(dummyEvent); 57 } 58 } 50 59 JFCTargetComparator.setMutable(false); 51 52 Collection<List<JFCEvent>> sequences = parser.getSequences();53 60 54 61 if (GlobalDataContainer.getInstance().addData(sequencesName, sequences)) { -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/jfc/commands/CMDpreprocessDirJFC.java
r384 r392 17 17 /** 18 18 * <p> 19 * Command to pre-process files written by EventBench's JFCMonitor located in a directory. The only task20 * of the pre-processing is checking if the session was closed properly, i.e.,21 * if the XML file ends with a {@code </sessions>} tag. If this is not the case,22 * the tag will be appended to the file.19 * Command to pre-process files written by EventBench's JFCMonitor located in a 20 * directory. The only task of the pre-processing is checking if the session was 21 * closed properly, i.e., if the XML file ends with a {@code </sessions>} tag. 22 * If this is not the case, the tag will be appended to the file. 23 23 * </p> 24 24 * … … 50 50 String absolutPathSource = sourceFolder.getAbsolutePath(); 51 51 File targetFolder = new File(targetPath); 52 if (!targetFolder.isDirectory()) {52 if (!targetFolder.isDirectory()) { 53 53 Console.printerrln(targetPath + " is not a directory"); 54 54 } 55 55 String absolutPathTarget = targetFolder.getAbsolutePath(); 56 57 for (String filename : sourceFolder.list()) {56 57 for (String filename : sourceFolder.list()) { 58 58 String source = absolutPathSource + "/" + filename; 59 59 Console.traceln("Preprocessing file: " + source); … … 78 78 return; 79 79 } 80 80 81 81 String content = new String(buffer).trim(); 82 82 83 83 int index = filename.lastIndexOf('.'); 84 String target = absolutPathTarget + "/" + filename.substring(0, index) + ".xml"; 85 84 String target = absolutPathTarget + "/" 85 + filename.substring(0, index) + ".xml"; 86 86 87 Console.traceln(" Saving as: " + target); 87 88 88 89 OutputStreamWriter writer; 89 90 try { 90 91 FileOutputStream fos = new FileOutputStream(target); 91 writer = new OutputStreamWriter(fos, "UTF- 16");92 writer = new OutputStreamWriter(fos, "UTF-8"); 92 93 } catch (IOException e) { 93 94 Console.printerrln(e.getMessage()); -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/jfc/commands/CMDpreprocessJFC.java
r309 r392 17 17 /** 18 18 * <p> 19 * Command to pre-process files written by EventBench's JFCMonitor. The only task20 * of the pre-processing is checking if the session was closed properly, i.e.,21 * i f the XML file ends with a {@code </sessions>} tag. If this is not the case,22 * the tag will be appended to the file.19 * Command to pre-process files written by EventBench's JFCMonitor. The only 20 * task of the pre-processing is checking if the session was closed properly, 21 * i.e., if the XML file ends with a {@code </sessions>} tag. If this is not the 22 * case, the tag will be appended to the file. 23 23 * </p> 24 24 * … … 70 70 try { 71 71 FileOutputStream fos = new FileOutputStream(target); 72 writer = new OutputStreamWriter(fos, "UTF- 16");72 writer = new OutputStreamWriter(fos, "UTF-8"); 73 73 } catch (IOException e) { 74 74 Console.printerrln(e.getMessage());
Note: See TracChangeset
for help on using the changeset viewer.