Ignore:
Timestamp:
2009-04-22T15:52:31+12:00 (15 years ago)
Author:
ak19
Message:

Tentative changes for getting the collectiongroup construct to work with the RemoteGreenstoneServer

File:
1 edited

Legend:

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

    r19041 r19197  
    177177    }
    178178
    179     /** Retrieve the short name for this collection.
     179    /** Retrieve the short name for this collection. Always qualified by the collectionGroup, if any.
    180180     * @return The name as a <strong>String</strong>.
    181181     */
    182182    public String getName() {
     183    return getGroupQualifiedName(true);
     184    }
     185
     186    /** @return just the sub-name of the collection: without any collection group prefix */
     187    public String getCollectionSubName() {
    183188    return file.getParentFile().getName();
    184189    }
     
    186191    /** @return just the name of the collection group if any, else returns "" */
    187192    public String getCollectionGroupName() {
    188     String groupAndColName = getGroupWithName(true);
     193    String groupAndColName = getGroupQualifiedName(true);
    189194
    190195    int slash = groupAndColName.indexOf('/');
     
    204209     * @return collection-group-name/collection-name
    205210     */
    206     public String getGroupWithName(boolean url) {
     211    public String getGroupQualifiedName(boolean url) {
    207212    // Subtracting collect dir's path from the current collection's path
    208213
     
    216221        // shouldn't happen, but in case it does, just return the collection name.
    217222        System.err.println("Current collection " + currentCollDir + " is not located inside collectdir " + "collectDir");
    218         groupAndCol = getName();
     223        groupAndCol = getCollectionSubName();
    219224    }
    220225
Note: See TracChangeset for help on using the changeset viewer.