} else {
} else if( child.getType() == ComponentData.NODE || child.getType() == ComponentData.HOST ) {
  public ComponentData addComponentData(ComponentData data) {    ComponentData[] children = data.getChildren();    for(int i=0; i < children.length; i++) {      ComponentData child = children[i];      if(child.getType() == ComponentData.AGENT) {        Iterator iter = ((Collection)getDescendentsOfClass(AgentComponent.class)).iterator();        while(iter.hasNext()) {          AgentComponent agent = (AgentComponent)iter.next();          if(child.getName().equals(agent.getShortName().toString())) {	    // This is the same agent: replace the old with the new	    // to ensure get all new values	    ComponentData nchild = new AgentComponentData();	    nchild.setName(child.getName());            nchild.setClassName((String)propClassName.getValue());            nchild.setOwner(this);                        nchild.addParameter(agent.getShortName().toString());	    nchild.setAlibID(child.getAlibID());	    // Shouldn't the parent equivalently be the data object?	    nchild.setParent(child.getParent());	    // FIXME: what about the alib ids for the plugins?	    // Is it OK to try to over-write?            nchild = addAssetData(nchild);            nchild = agent.addComponentData(nchild);	    // Replace the existing AgentComponentData	    // with a new one, to ensure we replace all values	    data.setChild(i, nchild);	    break; // we found the agent. Break out of the loop!          }        }      } else {	// Recurse in case of hosts / nodes        data = addComponentData(child);      }    }    return data;  }