- Timestamp:
- 03/26/13 11:23:29 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/branches/coolemall/src/test/DEBBTranslator/src/PLMXMLTranslator.java
r1018 r1019 4 4 package test.DEBBTranslator.src; 5 5 6 import java.io.File; 6 7 import java.io.FileOutputStream; 7 8 import java.io.IOException; … … 20 21 private static final String DEFAULT_SCHEDULERS_AND_ESTIMATORS_FILE_NAME = "../../debb2dcworms/example/example1.xml"; 21 22 private static final String DEFAULT_TEMPLATE_START_LEVEL = "Node"; 23 24 private static final String PLMXML_PREFIX = "PLMXML"; 25 private static final String DCWORMS_PREFIX = "DCWORMS"; 22 26 23 27 private static HashMap<String, String> computingResourceClasses; … … 62 66 || (outputFileName != null && outputFileName.isEmpty() == true)) { 63 67 64 outputFileName = inputFileName.replace("PLMXML", "DCWORMS"); 68 if (inputFileName.contains(PLMXML_PREFIX)) { 69 // If file name contains PLMXML replace it by DCWORMS 70 outputFileName = inputFileName.replace(PLMXML_PREFIX, DCWORMS_PREFIX); 71 } else { 72 String pathSeparator = File.separator; 73 // System.out.println("pathSeparator=" + pathSeparator); 74 75 // Otherwise add DCWORMS_ prefix 76 String path = ""; 77 int position = inputFileName.lastIndexOf(pathSeparator) ; 78 if (position >= 0) { 79 path = inputFileName.substring(0, position); 80 } 81 // System.out.println("path=" + path); 82 83 String name = inputFileName.substring(position + 1); 84 // System.out.println("name=" + name); 85 outputFileName = path + "DCWORMS" + "_" + name; 86 } 87 65 88 } 66 89
Note: See TracChangeset
for help on using the changeset viewer.