Package org.openxri.util

Examples of org.openxri.util.PrioritizedList$Item


  public void addRef(Ref ref) {
    Integer priority = ref.getPriority();
   
    if (refs == null || prioritizedRefs == null) {
      refs = new Vector();
      prioritizedRefs = new PrioritizedList();
    }
   
    refs.add(ref);
    prioritizedRefs.addObject((priority == null)? "null" : priority.toString(), ref);
  }
View Full Code Here


  public void addService(Service service)
  {
    if (services == null || prioritizedServices == null)
    {
      services = new Vector();
      prioritizedServices = new PrioritizedList();
    }
   
    services.add(service);
    Integer priority = service.getPriority();
    prioritizedServices.addObject((priority == null)? "null" : priority.toString(), service);
View Full Code Here

    }
  }
 
 
  public void setSelectedServices (Collection svcs) {
    selectedServices = new PrioritizedList();
    Iterator i = svcs.iterator();
    while (i.hasNext()) {
      Service s = (Service)i.next();
      Integer priority = s.getPriority();
      String priStr = (priority == null)? "null" : priority.toString();
View Full Code Here

 
  /**
   * @return Returns the selectedServices.
   */
  public PrioritizedList getSelectedServices() {
    return (selectedServices == null)? new PrioritizedList() : selectedServices;
  }
View Full Code Here

   */
  public void addURI(SEPUri uri)
  {
    if (prioritizedURIs == null)
    {
      prioritizedURIs = new PrioritizedList();
    }

    uris.add(uri);
    Integer priority = uri.getPriority();
    prioritizedURIs.addObject((priority == null)? PrioritizedList.PRIORITY_NULL : priority.toString(), uri);
View Full Code Here

    ArrayList selectedServices = selector.getSelectedSEPs(type, mediaType, path);
    if (selectedServices == null || selectedServices.size() == 0)
      return new ArrayList();
   
    // prioritization
    PrioritizedList list = new PrioritizedList();
    for (int i = 0; i < selectedServices.size(); i++) {
      Service s = (Service)selectedServices.get(i);
      String priority = (s.getPriority() == null) ? PrioritizedList.PRIORITY_NULL : s.getPriority().toString();
      list.addObject(priority, s);
    }
   
    return list.getList();
  }
View Full Code Here

   */
  public void addURI(SEPUri uri)
  {
    if (prioritizedURIs == null)
    {
      prioritizedURIs = new PrioritizedList();
    }

    uris.add(uri);
    Integer priority = uri.getPriority();
    prioritizedURIs.addObject((priority == null)? PrioritizedList.PRIORITY_NULL : priority.toString(), uri);
View Full Code Here

  }
 
 
  public void addRef(Ref ref) {
    if (prioritizedRefs == null)
      prioritizedRefs = new PrioritizedList();
   
    Integer priority = ref.getPriority();   
    refs.add(ref);
    prioritizedRefs.addObject((priority == null)? "null" : priority.toString(), ref);
  }
View Full Code Here

  }
 
 
  public void addRedirect(Redirect redirect) {
    if (prioritizedRedirects == null)
      prioritizedRedirects = new PrioritizedList();
   
    Integer priority = redirect.getPriority();   
    redirects.add(redirect);
    prioritizedRedirects.addObject((priority == null)? "null" : priority.toString(), redirect);
  }
View Full Code Here

    List selectedServices = SEPSelector.select(services, type, mediaType,
        path, flags);
    if (selectedServices == null || selectedServices.size() == 0)
      return new ArrayList();

    PrioritizedList list = new PrioritizedList();
    for (int i = 0; i < selectedServices.size(); i++) {
      Service s = (Service) selectedServices.get(i);
      String priority = (s.getPriority() == null) ? PrioritizedList.PRIORITY_NULL
          : s.getPriority().toString();
      list.addObject(priority, s);
    }

    return list.getList();
  }
View Full Code Here

TOP

Related Classes of org.openxri.util.PrioritizedList$Item

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.