- Timestamp:
- 2020-09-15T20:26:19+12:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/metadata/DocXMLFileManager.java
r17101 r34394 31 31 import java.util.*; 32 32 import org.greenstone.gatherer.DebugStream; 33 33 import org.greenstone.gatherer.util.Utility; 34 34 35 35 /** This class is a static class that manages the doc.xml files */ … … 37 37 { 38 38 static private ArrayList doc_xml_files = new ArrayList(); 39 40 39 41 40 static public void clearDocXMLFiles() … … 47 46 static public ArrayList getMetadataExtractedFromFile(File file) 48 47 { 48 // Work out relative file path and its hex encoded value here, 49 // avoids making DocXMLFile.java recalculate these each time 50 String file_relative_path = file.getAbsolutePath(); 51 int import_index = file_relative_path.indexOf("import"); 52 if (import_index != -1) { 53 file_relative_path = file_relative_path.substring(import_index + "import".length() + 1); 54 } 55 String searchFileName = DocXMLFile.isWin ? Utility.stringToHex(file_relative_path) : file_relative_path; 56 49 57 // Build up a list of metadata values extracted from this file 50 58 ArrayList metadata_values = new ArrayList(); … … 53 61 for (int i = 0; i < doc_xml_files.size(); i++) { 54 62 DocXMLFile doc_xml_file = (DocXMLFile) doc_xml_files.get(i); 55 metadata_values.addAll(doc_xml_file.getMetadataExtractedFromFile(file)); 63 ///System.err.println("@@@@ Looking at doc.xml file: " + doc_xml_files.get(i)); 64 metadata_values.addAll(doc_xml_file.getMetadataExtractedFromFile(file, searchFileName)); 56 65 } 57 66
Note:
See TracChangeset
for help on using the changeset viewer.