if(log.isDebugEnabled()) { log.debug("# Agents for node: " + nc.getName() + " is: " + writtenAgents.size()); }
  private Collection generateNodeComponent(NodeComponent node, ComponentData parent) {    Set writtenAgents = new HashSet();    ComponentData nc = new GenericComponentData();    nc.setType(ComponentData.NODE);    nc.setName(node.getShortName());    nc.setClassName(Node.class.getName()); // leave this out?? FIXME    nc.setOwner(this); // the experiment? FIXME    nc.setParent(parent);    ComponentName name =       new ComponentName((ConfigurableComponent) node, "ConfigurationFileName");    nc.addParameter(node.getShortName());    Properties props = node.getArguments();    for (Iterator i = props.entrySet().iterator(); i.hasNext(); ) {      Map.Entry entry = (Map.Entry) i.next();      nc.addParameter("-D" + entry.getKey() + "=" + entry.getValue());    }    addPropertiesAsParameters(nc, node);    if(log.isDebugEnabled()) {      log.debug("Adding: " + nc.getName() + " to " + parent.getName());    }    parent.addChild(nc);    AgentComponent[] agents = node.getAgents();    if (agents != null && agents.length > 0) {      for (int j = 0; j < agents.length; j++) {        generateAgentComponent(agents[j], nc, parent.getOwner());        if(log.isDebugEnabled()) {          log.debug("Remember Agent: " + agents[j].getShortName());        }        writtenAgents.add(agents[j]);      }    }    if(log.isDebugEnabled()) {      log.debug("# Agents for node: " + nc.getName() + " is: " + writtenAgents.size());    }    return writtenAgents;  }