Ejemplo n.º 1
0
  public String getCapabilitiesAsXML() {
    ArrayList<Capability> cList = new ArrayList<Capability>(capabilityMap.values());
    Collections.sort(cList);

    StringBuilder xml = new StringBuilder("<capabilities>");
    for (Capability c : cList) xml.append(c.toXML());
    xml.append("</capabilities>");
    return xml.toString();
  }
Ejemplo n.º 2
0
 public String getParticipantCapabilitiesAsXML(String pid) {
   Set<Capability> capSet = getParticipantCapabilities(pid);
   if (capSet != null) {
     String header = String.format("<capabilities participantid=\"%s\">", pid);
     StringBuilder xml = new StringBuilder(header);
     for (Capability c : capSet) xml.append(c.toXML());
     xml.append("</capabilities>");
     return xml.toString();
   } else return ("<capabilities/>");
 }