Changeset 8392


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

added a collection variable - this should be set if the metadata set belongs to a collection. If it is set, it is used in the toString() method

File:
1 edited

Legend:

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

    r8388 r8392  
    6464    private NodeList elements = null;
    6565   
     66    // the nmae of the collection if this set is collection-specific
     67    private String collection = null;
    6668    //I realize I should be using getters and setters, but for a quick fix
    6769    public boolean set_changed = false;
     
    152154    }
    153155
     156    public void setCollection(String coll) {
     157    collection = coll;
     158
     159    }
    154160    /** Add a mds level attribute.
    155161     * @param name The name of the attribute to add as a <Strong>String</strong>.
     
    517523     */
    518524    public String toString() {
     525       
    519526    String name = getName();
    520527    // If there is no given name, then use the namespace as there is garaunteed to be one of them.
     
    528535    }
    529536    name = name + " (" + namespace + ")";
    530     return name;
     537    if (collection == null)
     538        return name;
     539    return "["+collection+"] "+name;
    531540    }
    532541
Note: See TracChangeset for help on using the changeset viewer.