- Timestamp:
- 2009-04-27T15:06:59+12:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/cdm/DepositorMetadataManager.java
r18414 r19270 67 67 static private Dimension LABEL_SIZE = new Dimension(150, 15); 68 68 static private Dimension ROW_SIZE = new Dimension(400, 20); 69 static private Dimension MAX_ROW_SIZE = new Dimension(1000, 30); 69 70 70 71 /** Available types, corresponds to the HTML input types */ … … 202 203 ArrayList metadata_sets = MetadataSetManager.listMetadataSets(new File(file_name)); 203 204 204 // if the collection doesn't have a metadata directory, load all the MDSets in the global GLI/metadata directory 205 if (metadata_sets == null) { 206 file_name = org.greenstone.gatherer.gems.MetadataSetManager.getGLIMetadataDirectoryPath(); 207 metadata_sets = MetadataSetManager.listMetadataSets(new File(file_name)); 208 } 209 210 // always load the dc mds 211 boolean found = false; 212 for (int i = 0, j = metadata_sets.size(); i < j; i++) { 213 if (((MetadataSet) metadata_sets.get(i)).getNamespace().equals("dc")) { 214 found = true; 215 break; 216 } 217 } 218 if (found == false) { 205 if (metadata_sets != null) { 206 // unload the ex mds 207 for (int i = 0, j = metadata_sets.size(); i < j; i++) { 208 if (((MetadataSet) metadata_sets.get(i)).getNamespace().equals("ex")) { 209 metadata_sets.remove(i); 210 break; 211 } 212 } 213 } 214 215 if (metadata_sets == null || metadata_sets.size() == 0) { 216 // load dublin core 219 217 file_name = org.greenstone.gatherer.gems.MetadataSetManager.getGLIMetadataDirectoryPath(); 220 218 file_name += "dublin.mds"; … … 224 222 metadata_sets = MetadataSetManager.getMetadataSets(); 225 223 } 226 } 227 228 // unload the ex mds 229 for (int i = 0, j = metadata_sets.size(); i < j; i++) { 230 if (((MetadataSet) metadata_sets.get(i)).getNamespace().equals("ex")) { 231 metadata_sets.remove(i); 232 break; 233 } 234 } 235 224 } 225 // if we are still null :-( 236 226 if (metadata_sets == null) { 237 227 System.err.println("Error: DepositorMetadataMananger can't find any valid metadata set files."); … … 339 329 setLayout(new BorderLayout()); 340 330 setPreferredSize(ROW_SIZE); 331 setMaximumSize(MAX_ROW_SIZE); 341 332 342 333 // the checkbox component
Note:
See TracChangeset
for help on using the changeset viewer.