Package org.jayasoft.woj.common.model.content

Examples of org.jayasoft.woj.common.model.content.Organisation


      if(mds != null) {
        Map orgs = new HashMap();
        for (int i = 0; i < mds.length; i++) {
        ModuleDescriptor descriptor = mds[i];
        String organisationName = descriptor.getOrganisation();
        Organisation organisation = (Organisation) orgs.get(organisationName);
        if(organisation == null) {
          organisation = new Organisation(organisationName);
          orgs.put(organisationName, organisation);
        }
        organisation.addModuleRevision(descriptor.getModule(), descriptor.getRevision());
      }
        List values = new ArrayList(orgs.values());
        Collections.sort(values, new Comparator() {
        public int compare(Object o1, Object o2) {
          if (o1 instanceof Organisation && o2 instanceof Organisation ) {
            Organisation m1 = (Organisation) o1;
            Organisation m2 = (Organisation) o2;
            return m1.getName().compareTo(m2.getName());
          }
          return 0;
        }
      });
      return (Organisation[]) values.toArray(new Organisation[orgs.size()]);
View Full Code Here

TOP

Related Classes of org.jayasoft.woj.common.model.content.Organisation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.