Changeset 18146
- Timestamp:
- 2008-12-08T17:07:26+13:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/trunk/greenstone3-extension/mat/src/org/greenstone/gsdl3_extension/mat/MetadataStats.java
r18093 r18146 69 69 70 70 private static boolean deleteDir(File dir) { 71 71 72 72 if (dir.isDirectory()) { 73 73 String[] children = dir.list(); … … 119 119 public void getAvailableMetadataSets(String SetName,HashMap UsedMap, String SetAbbr){ 120 120 121 122 123 124 if(System.getProperty("os.name").toLowerCase().contains("windows")){125 gsdl3Home = gsdl3Home.replace("\\", "/");126 127 121 String gsdl3Home = globalProperty.getGSDL3Home(); 122 String os = "linux"; 123 124 if(System.getProperty("os.name").toLowerCase().indexOf("windows")!=-1){ 125 gsdl3Home = gsdl3Home.replaceAll("\\", "/"); 126 os = "windows"; 127 } 128 128 String metadataSetHome = gspath.removeLastLink(gsdl3Home)+fileSeparator+"gli"+fileSeparator+"metadata"; 129 129 if(os.equals("windows")){ 130 metadataSetHome = metadataSetHome.replace("/", "\\");130 metadataSetHome = metadataSetHome.replaceAll("/", "\\"); 131 131 } 132 132 File metadata_directory = new File(metadataSetHome); 133 133 134 134 if (metadata_directory.exists()) { 135 135 … … 157 157 Node temp = e.item(y); 158 158 NamedNodeMap mmp = temp.getAttributes(); 159 159 160 160 if(!mmp.item(0).getNodeValue().equals("Description")){ 161 161 MetadataElement me = new MetadataElement(); … … 258 258 String part = st.nextToken(";"); 259 259 260 if(part. contains("<contains>")){261 part = part.replace ("<contains>", "");262 } 263 else if(part. contains("<thistype>")){260 if(part.indexOf("<contains>")!=-1){ 261 part = part.replaceAll("<contains>", ""); 262 } 263 else if(part.indexOf("<thistype>")!=-1){ 264 264 int location = part.indexOf("<thistype>"); 265 265 part = part.substring(0,location-1);
Note:
See TracChangeset
for help on using the changeset viewer.