Changeset 10480 for trunk/gli/src/org
- Timestamp:
- 2005-08-11T11:29:25+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/metadata/MetadataXMLFileManager.java
r10479 r10480 76 76 boolean applicable_metadata_xml_file_found = false; 77 77 File current_file_directory = (current_file.isDirectory() ? current_file : current_file.getParentFile()); 78 String current_file_directory_path = current_file_directory.getAbsolutePath(); 78 79 for (int j = 0; j < metadata_xml_files.size(); j++) { 79 80 MetadataXMLFile metadata_xml_file = (MetadataXMLFile) metadata_xml_files.get(j); 80 81 81 82 // This metadata.xml file is only applicable if it is at the same level as the file 82 if (current_file_directory .getAbsolutePath().equals(metadata_xml_file.getParentFile().getAbsolutePath())) {83 if (current_file_directory_path.equals(metadata_xml_file.getParentFile().getAbsolutePath())) { 83 84 applicable_metadata_xml_file_found = true; 84 85 metadata_xml_file.addMetadata(current_file, metadata_values); … … 299 300 // Find which metadata.xml file needs editing 300 301 File current_file_directory = (current_file.isDirectory() ? current_file : current_file.getParentFile()); 302 String current_file_directory_path = current_file_directory.getAbsolutePath(); 301 303 for (int j = 0; j < metadata_xml_files.size(); j++) { 302 304 MetadataXMLFile metadata_xml_file = (MetadataXMLFile) metadata_xml_files.get(j); 303 305 304 306 // This metadata.xml file is only potentially applicable if it is above or at the same level as the file 305 if (current_file_directory .getAbsolutePath().startsWith(metadata_xml_file.getParentFile().getAbsolutePath())) {307 if (current_file_directory_path.startsWith(metadata_xml_file.getParentFile().getAbsolutePath())) { 306 308 metadata_xml_file.removeMetadata(current_file, metadata_values); 307 309 if (!modified_metadata_xml_files.contains(metadata_xml_file)) { … … 335 337 // Find which metadata.xml file needs editing 336 338 File current_file_directory = (current_file.isDirectory() ? current_file : current_file.getParentFile()); 339 String current_file_directory_path = current_file_directory.getAbsolutePath(); 337 340 for (int j = 0; j < metadata_xml_files.size(); j++) { 338 341 MetadataXMLFile metadata_xml_file = (MetadataXMLFile) metadata_xml_files.get(j); 339 342 340 343 // This metadata.xml file is only applicable if it is at the same level as the file 341 if (current_file_directory .getAbsolutePath().equals(metadata_xml_file.getParentFile().getAbsolutePath())) {344 if (current_file_directory_path.equals(metadata_xml_file.getParentFile().getAbsolutePath())) { 342 345 metadata_xml_file.replaceMetadata(current_file, old_metadata_value, new_metadata_value); 343 346 if (!modified_metadata_xml_files.contains(metadata_xml_file)) {
Note:
See TracChangeset
for help on using the changeset viewer.