Changeset 19797 for gli


Ignore:
Timestamp:
06/10/09 16:05:04 (12 years ago)
Author:
kjdon
Message:

when a collection only had ex metadata set, we were removing it from our local list, then loading up dublin core and asking for the list of metadata sets again - which includes ex. doh. now just ask for the dublin core set

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/cdm/DepositorMetadataManager.java

    r19270 r19797  
    202202        String file_name = Gatherer.getCollectDirectoryPath() + File.separator + current_coll_name + File.separator + "metadata";
    203203        ArrayList metadata_sets = MetadataSetManager.listMetadataSets(new File(file_name));
    204        
    205204        if (metadata_sets != null) {
    206205          // unload the ex mds
     
    213212        }
    214213       
    215         if (metadata_sets == null || metadata_sets.size() == 0) {
     214        if (metadata_sets == null) {
     215          metadata_sets = new ArrayList();
     216        }
     217        if (metadata_sets.size() == 0) {
    216218          // load dublin core
    217219        file_name = org.greenstone.gatherer.gems.MetadataSetManager.getGLIMetadataDirectoryPath();
     
    219221        File dublin_mds_file = new File(file_name);
    220222        if (dublin_mds_file.exists()) {
    221             MetadataSetManager.loadMetadataSet(dublin_mds_file);                   
    222             metadata_sets = MetadataSetManager.getMetadataSets();
    223         }
    224         }
    225         // if we are still null :-(
    226         if (metadata_sets == null) {
     223          MetadataSetManager.loadMetadataSet(dublin_mds_file); 
     224          MetadataSet dc = MetadataSetManager.getMetadataSet("dc");
     225          metadata_sets.add(dc);
     226        }
     227        }
     228        // if we are still empty :-(
     229        if (metadata_sets.size() == 0) {
    227230        System.err.println("Error: DepositorMetadataMananger can't find any valid metadata set files.");
    228231        return;
Note: See TracChangeset for help on using the changeset viewer.