otherClusterId = tokens.sval.trim(); if(log.isDebugEnabled()) { log.debug("fillRelationships: otherClusterId = " + otherClusterId); }
supportedCluster = tokens.sval.trim();
  protected int fillRelationships(int newVal, StreamTokenizer tokens,                                  AgentAssetData aad) throws IOException {    if(log.isDebugEnabled()) {      log.debug("Entering fillRelationships");    }    RelationshipData rd = null;    newVal = tokens.nextToken();    while ((newVal != StreamTokenizer.TT_EOF) &&           (!tokens.sval.substring(0,1).equals("["))) {      String roleName = "";      String itemId = "";      String typeId = "";      String otherClusterId = "";      long start = getDefaultStartTime();      long end = getDefaultEndTime();                for (int i = 0; i < 3; i++) {        if ((tokens.sval.length()) > 0  &&            (tokens.sval.substring(0,1).equals("["))) {          throw new RuntimeException("Unexpected character: " +                                      tokens.sval);        }                    switch (i) {        case 0:          roleName = tokens.sval.trim();          if(log.isDebugEnabled()) {            log.debug("fillRelationships: roleName = " + roleName);          }          break;        case 1:          otherClusterId = tokens.sval.trim();          if(log.isDebugEnabled()) {            log.debug("fillRelationships: otherClusterId = " + otherClusterId);          }          break;        case 2:          typeId = tokens.sval.trim();          if(log.isDebugEnabled()) {            log.debug("fillRelationships: typeId = " + typeId);          }          break;                  case 3:          itemId = tokens.sval.trim();          if(log.isDebugEnabled()) {            log.debug("fillRelationships: itemId = " + itemId);          }          break;        case 4:          if (!tokens.sval.equals("")) {            try {              start = parseDate(tokens.sval);            } catch (java.text.ParseException pe) {              if(log.isErrorEnabled()) {                log.error("Unable to parse: " + tokens.sval +                                  ". Start time defaulting to " +                                  getDefaultStartTime(), pe);              }            }          }          break;        case 5:          if (!tokens.sval.equals("")) {            try {              end = parseDate(tokens.sval);            } catch (java.text.ParseException pe) {              if(log.isErrorEnabled()) {                log.error("Unable to parse: " + tokens.sval +                           ". End time defaulting to " +                           getDefaultEndTime(), pe);                              }            }          }          break;        }        newVal = tokens.nextToken();      }      //FIXME!!!!!        rd = new RelationshipData();      rd.setType(roleName);      rd.setTypeId(otherClusterId);      rd.setRole(typeId);      //      rd.setItem(itemId);      //      rd.setRole(roleName);      //      rd.setSupported(otherClusterId);      rd.setStartTime(start);      rd.setEndTime(end);      aad.addRelationship(rd);    } //while    return newVal;  }