Changeset 7340


Ignore:
Timestamp:
2004-05-17T12:05:11+12:00 (20 years ago)
Author:
kjdon
Message:

added the capacity to add the site name into the display string - used in some dialogs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/collection/BasicCollectionConfiguration.java

    r6850 r7340  
    5959    private String maintainer;
    6060    private String name;
     61   
     62    private String site; // used for gs3 colls
    6163   
    6264    public BasicCollectionConfiguration(File file) {
     
    222224    }
    223225   
     226    /** set the site for this coll */
     227    public void setSite(String site) {
     228    this.site = site;
     229    }
     230   
     231   
    224232    /** Display the title for this collection. */
    225233    public String toString() {
    226     return getName() + StaticStrings.SPACE_CHARACTER + StaticStrings.OPEN_PARENTHESIS_CHARACTER + getShortName() + StaticStrings.CLOSE_PARENTHESIS_CHARACTER;
     234    if (this.site == null) {
     235        return getName() + StaticStrings.SPACE_CHARACTER + StaticStrings.OPEN_PARENTHESIS_CHARACTER + getShortName() + StaticStrings.CLOSE_PARENTHESIS_CHARACTER;
     236    } else {
     237        return getName() + StaticStrings.SPACE_CHARACTER + StaticStrings.OPEN_PARENTHESIS_CHARACTER + getShortName()+", "+this.site + StaticStrings.CLOSE_PARENTHESIS_CHARACTER;
     238    }
    227239    }
    228240}
Note: See TracChangeset for help on using the changeset viewer.