Changeset 4319
- Timestamp:
- 2003-05-23T16:40:57+12:00 (21 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/NewCollectionDetailsPrompt.java
r4293 r4319 183 183 base_collection_pane.add(base_collection_label, BorderLayout.NORTH); 184 184 base_collection_pane.add(base_collection, BorderLayout.CENTER); 185 base_collection_pane.add(base_collection_browse, BorderLayout.EAST);185 //base_collection_pane.add(base_collection_browse, BorderLayout.EAST); 186 186 187 187 center_pane.setBorder(BorderFactory.createEmptyBorder(5,0,5,0)); -
trunk/gli/src/org/greenstone/gatherer/msm/GreenstoneArchiveParser.java
r4293 r4319 61 61 62 62 public GreenstoneArchiveParser(GShellProgressMonitor progress, GShell shell) { 63 this.shell = shell; 64 // Determine the collection archive directory. 65 File archive_directory = new File(Gatherer.c_man.getCollectionArchive()); 66 // For each of the hash coded directories within. 67 File document_directories[] = archive_directory.listFiles(); 68 for(int i = 0; i < document_directories.length; i++) { 69 // Find the doc.xml file within 70 if(document_directories[i].isDirectory()) { 71 File document_file = new File(document_directories[i], "doc.xml"); 72 // Then extract the metadata from it. 73 if(document_file.exists()) { 74 extractMetadata(document_file); 75 // Display a pretty progress message. 76 shell.fireMessage(GShell.IMPORT, shell.typeAsString(GShell.IMPORT) + "> " + Gatherer.dictionary.get("GShell.Extracted", document_directories[i].getName()), GShell.OK); 77 progress.increment(); 63 // We can only extract metadata if an extracted metadata set exists in our collection. 64 if(Gatherer.c_man.msm.getSet("") != null) { 65 this.shell = shell; 66 // Determine the collection archive directory. 67 File archive_directory = new File(Gatherer.c_man.getCollectionArchive()); 68 // For each of the hash coded directories within. 69 File document_directories[] = archive_directory.listFiles(); 70 for(int i = 0; i < document_directories.length; i++) { 71 // Find the doc.xml file within 72 if(document_directories[i].isDirectory()) { 73 File document_file = new File(document_directories[i], "doc.xml"); 74 // Then extract the metadata from it. 75 if(document_file.exists()) { 76 extractMetadata(document_file); 77 // Display a pretty progress message. 78 shell.fireMessage(GShell.IMPORT, shell.typeAsString(GShell.IMPORT) + "> " + Gatherer.dictionary.get("GShell.Extracted", document_directories[i].getName()), GShell.OK); 79 progress.increment(); 80 } 78 81 } 79 82 } … … 112 115 ElementWrapper element = Gatherer.c_man.msm.getElement(name); 113 116 if(element == null) { 114 MetadataSet greenstone_mds = Gatherer.c_man.msm.getSet("");115 element = greenstone_mds.addElement(name);117 MetadataSet extracted_mds = Gatherer.c_man.msm.getSet("ex"); 118 element = extracted_mds.addElement(name); 116 119 } 117 120 // If we successfully retrieved an element (and we should have) we can continue. -
trunk/gli/src/org/greenstone/gatherer/valuetree/GValueModel.java
r4293 r4319 195 195 public boolean isHierarchy() { 196 196 boolean result = false; 197 // We are a hierarchy if our element says so.... 198 if(element.isHierarchy()) { 199 return true; 200 } 201 // Or if our children are actually a hierarchy. 197 202 for(int i = 0; i < root.getChildCount() && !result; i++) { 198 203 GValueNode node = (GValueNode) root.getChildAt(i);
Note:
See TracChangeset
for help on using the changeset viewer.