if (colon >= 0) {  int collID = Integer.parseInt(set.substring(colon + 1));  return Collection.find(context, collID); } else {  return Community.find(context, Integer.parseInt(set)); } }
DSpaceObject o = null;   if (set.startsWith("hdl_")) {  String handle = set.substring(4).replace('_','/'); o = HandleManager.resolveToObject(context, handle); }   if (o != null && o instanceof Collection) { return (Collection) o; }    throw new BadArgumentException(); }
    private DSpaceObject resolveSet(Context context, String set)        throws SQLException    {        if (set == null)        {            return null;        }                // We can be fairly simple because of our two-level hierarchy.        // Set spec is community-id[:collection-id]        int colon = set.indexOf(':');        if (colon >= 0)        {            // We have community & collection IDs            int collID = Integer.parseInt(set.substring(colon + 1));                        return Collection.find(context, collID);        }        else        {            // Just a community ID            return Community.find(context, Integer.parseInt(set));        }    }