Changeset 3898


Ignore:
Timestamp:
2003-03-18T15:04:04+12:00 (21 years ago)
Author:
kjdon
Message:

getParent now returns the original oid if there is no parent

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/util/OID.java

    r3449 r3898  
    2727   
    2828    /** returns the parent of oid (everything up to last dot)
    29      returns "" if oid has no parent */
     29     returns oid if oid has no parent */
    3030    public static String getParent(String oid) {
    3131    int pos = oid.lastIndexOf('.');
    3232    if (pos == -1) {
    33         return "";
     33        return oid;
    3434    }
    3535    return oid.substring(0, pos);
Note: See TracChangeset for help on using the changeset viewer.