Пример #1
0
 public String getNonHumanResourceNames() {
   XNode node = new XNode("nonHumanResourceNames");
   for (NonHumanResource r : nonHumanMap.values()) {
     node.addChild("name", r.getName());
   }
   return node.toString();
 }
Пример #2
0
 public Set<NonHumanSubCategory> getNonHumanSubCategories() {
   Set<NonHumanSubCategory> set = new HashSet<NonHumanSubCategory>();
   for (NonHumanCategory c : nonHumanCategoryMap.values()) {
     set.addAll(c.getSubCategories());
   }
   return set;
 }
Пример #3
0
 public Set<Participant> getOrgGroupMembers(OrgGroup o) {
   Set<Participant> result = new HashSet<Participant>();
   for (Participant p : participantMap.values()) {
     if (p.isOrgGroupMember(o)) result.add(p);
   }
   return result;
 }
Пример #4
0
 public String getNonHumanCategoryNames() {
   XNode node = new XNode("nonHumanCategoryNames");
   for (NonHumanCategory r : nonHumanCategoryMap.values()) {
     node.addChild("name", r.getName());
   }
   return node.toString();
 }
Пример #5
0
 public long getLastChangeStamp() {
   long lastChange = 0;
   for (Long stamp : _changeStamp.values()) {
     if (stamp > lastChange) lastChange = stamp;
   }
   return lastChange;
 }
Пример #6
0
 public Capability getCapabilityByLabel(String label) {
   for (Capability c : capabilityMap.values()) {
     if (c.getCapability().equals(label)) {
       return c;
     }
   }
   return null;
 }
Пример #7
0
 // @return a csv listing of the full name of each role
 public String getRoleNames() {
   StringBuilder csvList = new StringBuilder();
   for (Role r : roleMap.values()) {
     if (csvList.length() > 0) csvList.append(",");
     csvList.append(r.getName());
   }
   return csvList.toString();
 }
Пример #8
0
 public Position getPositionByLabel(String label) {
   for (Position p : positionMap.values()) {
     if (p.getTitle().equals(label)) {
       return p;
     }
   }
   return null;
 }
Пример #9
0
  public String getNonHumanCategoriesAsXML() {
    Set<NonHumanCategory> rList = new TreeSet<NonHumanCategory>(nonHumanCategoryMap.values());

    StringBuilder xml = new StringBuilder("<nonhumancategories>");
    for (NonHumanCategory r : rList) xml.append(r.toXML());
    xml.append("</nonhumancategories>");
    return xml.toString();
  }
Пример #10
0
  public String getNonHumanResourcesAsXML() {
    Set<NonHumanResource> rList = new TreeSet<NonHumanResource>(nonHumanMap.values());

    StringBuilder xml = new StringBuilder("<nonhumanresources>");
    for (NonHumanResource r : rList) xml.append(r.toXML());
    xml.append("</nonhumanresources>");
    return xml.toString();
  }
Пример #11
0
 public OrgGroup getOrgGroupByLabel(String label) {
   for (OrgGroup o : orgGroupMap.values()) {
     if (o.getGroupName().equals(label)) {
       return o;
     }
   }
   return null;
 }
Пример #12
0
  public String getOrgGroupsAsXML() {
    ArrayList<OrgGroup> oList = new ArrayList<OrgGroup>(orgGroupMap.values());
    Collections.sort(oList);

    StringBuilder xml = new StringBuilder("<orggroups>");
    for (OrgGroup o : oList) xml.append(o.toXML());
    xml.append("</orggroups>");
    return xml.toString();
  }
Пример #13
0
  public String getRolesAsXML() {
    ArrayList<Role> rList = new ArrayList<Role>(roleMap.values());
    Collections.sort(rList);

    StringBuilder xml = new StringBuilder("<roles>");
    for (Role r : rList) xml.append(r.toXML());
    xml.append("</roles>");
    return xml.toString();
  }
Пример #14
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();
  }
Пример #15
0
  public String getPositionsAsXML() {
    ArrayList<Position> pList = new ArrayList<Position>(positionMap.values());
    Collections.sort(pList);

    StringBuilder xml = new StringBuilder("<positions>");
    for (Position p : pList) xml.append(p.toXML());
    xml.append("</positions>");
    return xml.toString();
  }
Пример #16
0
 public String getNonHumanCategorySet() {
   XNode node = new XNode("nonHumanCategorySet");
   for (NonHumanCategory category : nonHumanCategoryMap.values()) {
     XNode categoryNode = node.addChild("category");
     categoryNode.addAttribute("name", category.getName());
     for (String subcategory : category.getSubCategoryNames()) {
       categoryNode.addChild("subcategory", subcategory);
     }
   }
   return node.toString();
 }
Пример #17
0
 public Role getRoleByName(String roleName) {
   for (Role r : roleMap.values()) {
     if (r.getName().equalsIgnoreCase(roleName)) return r;
   }
   return null; // no match
 }
Пример #18
0
 private List<Participant> sortFullParticipantListByName() {
   ArrayList<Participant> pList = new ArrayList<Participant>(participantMap.values());
   Collections.sort(pList, new ParticipantNameComparator());
   return pList;
 }
Пример #19
0
 public Set<NonHumanCategory> getNonHumanCategories() {
   return new HashSet<NonHumanCategory>(nonHumanCategoryMap.values());
 }
Пример #20
0
 public Set<NonHumanResource> getNonHumanResources() {
   return new HashSet<NonHumanResource>(nonHumanMap.values());
 }
Пример #21
0
 public Set<Capability> getCapabilities() {
   return new HashSet<Capability>(capabilityMap.values());
 }
Пример #22
0
 public Set<Position> getPositions() {
   return new HashSet<Position>(positionMap.values());
 }
Пример #23
0
 public NonHumanResource getNonHumanResourceByName(String name) {
   for (NonHumanResource r : nonHumanMap.values()) {
     if (r.getName().equalsIgnoreCase(name)) return r;
   }
   return null; // no match
 }
Пример #24
0
 public Set<Participant> getParticipants() {
   return new HashSet<Participant>(participantMap.values());
 }
Пример #25
0
 public Set<OrgGroup> getOrgGroups() {
   return new HashSet<OrgGroup>(orgGroupMap.values());
 }
Пример #26
0
 public NonHumanCategory getNonHumanCategoryByName(String name) {
   for (NonHumanCategory r : nonHumanCategoryMap.values()) {
     if (r.getName().equalsIgnoreCase(name)) return r;
   }
   return null; // no match
 }
Пример #27
0
 public Set<Role> getRoles() {
   return new HashSet<Role>(roleMap.values());
 }