- Timestamp:
- 2004-11-03T12:08:31+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/metadata/MetadataXMLFile.java
r8371 r8433 68 68 } 69 69 70 // Convert the file path into a regular expression that will match it71 String file_path_regexp = file_relative_path .replaceAll("\\.", "\\\\.");72 if (file_ relative_path.equals("")) {70 // Form a regular expression that specifies the scope of the metadata 71 String file_path_regexp = file_relative_path; 72 if (file_path_regexp.equals("")) { 73 73 file_path_regexp = DIRECTORY_FILENAME; 74 } 75 else { 76 // Convert the file path into a regular expression that will match it 77 file_path_regexp = file_path_regexp.replaceAll("\\.", "\\\\."); 78 file_path_regexp = file_path_regexp.replaceAll("\\(", "\\\\("); 79 file_path_regexp = file_path_regexp.replaceAll("\\)", "\\\\)"); 80 file_path_regexp = file_path_regexp.replaceAll("\\[", "\\\\["); 81 file_path_regexp = file_path_regexp.replaceAll("\\]", "\\\\]"); 82 file_path_regexp = file_path_regexp.replaceAll("\\{", "\\\\{"); 83 file_path_regexp = file_path_regexp.replaceAll("\\}", "\\\\}"); 74 84 } 75 85 … … 273 283 } 274 284 275 // Convert the file path into a regular expression that will match it276 String file_path_regexp = file_relative_path .replaceAll("\\.", "\\\\.");277 if (file_ relative_path.equals("")) {285 // Form a regular expression that specifies the scope of the metadata 286 String file_path_regexp = file_relative_path; 287 if (file_path_regexp.equals("")) { 278 288 file_path_regexp = DIRECTORY_FILENAME; 289 } 290 else { 291 // Convert the file path into a regular expression that will match it 292 file_path_regexp = file_path_regexp.replaceAll("\\.", "\\\\."); 293 file_path_regexp = file_path_regexp.replaceAll("\\(", "\\\\("); 294 file_path_regexp = file_path_regexp.replaceAll("\\)", "\\\\)"); 295 file_path_regexp = file_path_regexp.replaceAll("\\[", "\\\\["); 296 file_path_regexp = file_path_regexp.replaceAll("\\]", "\\\\]"); 297 file_path_regexp = file_path_regexp.replaceAll("\\{", "\\\\{"); 298 file_path_regexp = file_path_regexp.replaceAll("\\}", "\\\\}"); 279 299 } 280 300
Note:
See TracChangeset
for help on using the changeset viewer.