Changeset 8393


Ignore:
Timestamp:
2004-10-20T16:51:43+13:00 (20 years ago)
Author:
kjdon
Message:

set the proper file path in the constructor for metadata sets based on a template. collection metadata sets are added into teh hash table with key collname:namespace. no code actually uses this to get them out, so hope it all works.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/gems/MetadataSetManager.java

    r8388 r8393  
    9393    //mds.setAttribute("name", name);
    9494    mds.setAttribute("namespace", namespace);
    95     mds_hashtable.put(namespace, mds);
    9695    // Add the name element.
    9796    mds.setName(name);
     97    // this is the location for a global metadata set
     98    File mds_file = new File(Utility.METADATA_DIR, namespace + ".mds");
     99    mds.setFile(mds_file);
     100    mds_hashtable.put(namespace, mds);
    98101    // fireSetChanged(mds);
    99102    return mds;
     
    193196    }
    194197    ElementWrapper result = null;
    195     MetadataSet set = null;
     198    MetadataSet set = null;
    196199    String element = null;
    197200    // First we seperate off what set it is in, where we have '<set><namespace_separator><element>'.
     
    354357
    355358        //Actual set loading code(if it gets this far-Attila
    356     mds_hashtable.put(metadata_set.getNamespace(), metadata_set);
     359    //**************
     360    //mds_hashtable.put(metadata_set.getNamespace(), metadata_set);
     361    if (colName.equals("")) {
     362        mds_hashtable.put(colName+":"+metadata_set.getNamespace(), metadata_set);
     363    } else {
     364        metadata_set.setCollection(colName);
     365        mds_hashtable.put(metadata_set.getNamespace(), metadata_set);
     366    }
    357367    return metadata_set;
    358368    }
Note: See TracChangeset for help on using the changeset viewer.