int i; if ((i = type.indexOf("<")) > -1) { int j = type.lastIndexOf(">"); return getType(type.substring(0, i).trim()); } else if ((i = type.indexOf("/")) > -1) { return getType(type.substring(0, i).trim()); } else { return type; }
return type;
  public String getType(String type) {    int i;    if ((i = type.indexOf("<")) > -1) { // deal with collections       int j = type.lastIndexOf(">");      return getType(type.substring(0, i).trim()); // deal with measures    } else if ((i = type.indexOf("/")) > -1) {      return getType(type.substring(0, i).trim());    } else {      return type;    }  }