log.error(this + " got null relationship type for " + data.getName() + " in rel #" + i);
log.error(this + " using CSMART " + CSMART.writeDebug() + " got null relationship type for " + data.getName() + " in rel #" + i + " with role=" + rel.getProperty(RelationshipBase.PROP_ROLE) + ", ItemId=" + rel.getProperty(RelationshipBase.PROP_ITEM) + ", please report this on bug# 1304");
  public ComponentData addComponentData(ComponentData data) {    AgentAssetData assetData = new AgentAssetData((AgentComponentData)data);    //    assetData.setType(((Integer)propAssetType.getValue()).intValue());    assetData.setAssetClass((String)propAssetClass.getValue());    assetData.setUniqueID((String)propUniqueID.getValue());    assetData.setUnitName((String)propUnitName.getValue());    assetData.setUIC((String)propUIC.getValue());    // Add Relationships.    Iterator iter =       ((Collection)getDescendentsOfClass(ContainerBase.class)).iterator();    while(iter.hasNext()) {      ContainerBase container = (ContainerBase)iter.next();      if(container.getShortName().equals("Relationships")) {        for(int i=0; i < container.getChildCount(); i++) {          RelationshipBase rel = (RelationshipBase) container.getChild(i);          RelationshipData rData = new RelationshipData();	  if (rel != null) {	    if (rel.getProperty(RelationshipBase.PROP_TYPE) == null) {	      if (log.isErrorEnabled()) {		log.error(this + " got null relationship type for " + data.getName() + " in rel #" + i);	      }	    } else {	      rData.setType((String)rel.getProperty(RelationshipBase.PROP_TYPE).getValue());	    }	    rData.setRole((String)rel.getProperty(RelationshipBase.PROP_ROLE).getValue());	    rData.setItemId((String)rel.getProperty(RelationshipBase.PROP_ITEM).getValue());            rData.setTypeId((String)rel.getProperty(RelationshipBase.PROP_TYPEID).getValue());	    rData.setSupported((String)rel.getProperty(RelationshipBase.PROP_SUPPORTED).getValue());            DateFormat df = DateFormat.getInstance();            try {              Date start = df.parse((String)rel.getProperty(RelationshipBase.PROP_STARTTIME).getValue());              Date end = df.parse((String)rel.getProperty(RelationshipBase.PROP_STOPTIME).getValue());              rData.setStartTime(start.getTime());              rData.setEndTime(end.getTime());            } catch(ParseException pe) {              if(log.isErrorEnabled()) {                log.error("Caught Exception parsing Date, using default dates.", pe);              }              rData.setStartTime(TimeSpan.MIN_VALUE);              rData.setEndTime(TimeSpan.MAX_VALUE);            }	    assetData.addRelationship(rData);	  } else {	    // null relationship?	    if (log.isErrorEnabled()) {	      log.error(this + " Got null relationship #" + i);	    }	  }        }      }    }    // Add Property Groups.    iter =       ((Collection)getDescendentsOfClass(ContainerBase.class)).iterator();    while(iter.hasNext()) {      ContainerBase container = (ContainerBase)iter.next();      if(container.getShortName().equals("Property Groups")) {        for(int i=0; i < container.getChildCount(); i++) {          PropGroupBase pg = (PropGroupBase)container.getChild(i);          assetData.addPropertyGroup(pg.getPropGroupData());        }      }    }    data.addAgentAssetData(assetData);    return data;  }