writeNodeFile(configDir, nodes[i].getChildren()[j]);
if(nodes[i].getChildren()[j] instanceof AgentComponentData) { writeAgentFile(configDir, (AgentComponentData)nodes[i].getChildren()[j]); } else { writeNodeFile(configDir, nodes[i].getChildren()[j]); }
  public void writeConfigFiles(File configDir) throws IOException {    // Call writeNodeFile for each of the nodes in theSoc.    ComponentData[] nodes = theSoc.getChildren();    writeSocietyFile(configDir, theSoc);    for (int i = 0; i < theSoc.childCount(); i++) {      if (nodes[i].getType().equals(ComponentData.HOST)) {	writeHostFile(configDir, nodes[i]);	for (int j = 0; j < nodes[i].childCount(); j++) {	  writeNodeFile(configDir, nodes[i].getChildren()[j]);	}      } else {	writeNodeFile(configDir, nodes[i]);      }    }  }