/** * Gets the association roles ordered aplhabetically */ public String[] getAssociationRoleTypesOrdered(String key) { if (key == null || !associations.containsKey(key)) return null; return ((InternalAssociation)associations.get(key)).getAssociationRoleTypesOrdered(); }
/** * Returns the players of of this association ordred by the role types. */ protected String[] getAssociationDetails(AssociationIF association) { String[] result = new String[association.getRoles().size()]; Iterator it = association.getRoles().iterator(); while (it.hasNext()) { AssociationRoleIF role = (AssociationRoleIF)it.next(); String name = getName(role.getType()); roles = getAssociationRoleTypesOrdered(); for (int i = 0; i < roles.length; i++) { // Inserts the correct player name and id in the correct alphabetical order. if (name.equals(roles[i]) && result[i] == null) { result[i] = getName(role.getPlayer()) + "$" + role.getPlayer().getObjectId(); } } } return result; }