Resource[] resources = specs.capableResources (tasks[i], data); for (int j = 0; j < resources.length; j++) text.append ("<CAPABILITY task=\"" + tasks[i].getKey() + "\" resource=\"" + resources[j].getKey() + "\" />\n");
if (!data.isFrozen (tasks[i])) { Resource[] resources = specs.capableResources (tasks[i], data); for (int j = 0; j < resources.length; j++) text.append ("<CAPABILITY task=\"" + tasks[i].getKey() + "\" resource=\"" + resources[j].getKey() + "\" />\n"); }
  private void writeCapabilities() {    Task[] tasks = data.getTasks();    StringBuffer text =      new StringBuffer (tasks.length * data.getResources().length * 20);    text.append ("<?xml version='1.0'?>\n<CAPABILITIES>\n");    for (int i = 0; i < tasks.length; i++) {      Resource[] resources = specs.capableResources (tasks[i], data);      for (int j = 0; j < resources.length; j++)        text.append ("<CAPABILITY task=\"" + tasks[i].getKey() +                     "\" resource=\"" + resources[j].getKey() + "\" />\n");    }    text.append ("</CAPABILITIES>\n");    if (showAssignments)      System.out.println ("Scheduler.writeCapabilities - " + text);    Map args = getArgs();    args.put ("data", text.toString());    ClientComms.postToURL (args, "postcapabilities.php");  }