/** @param order The order to set. */
 public void setOrder(String order) {
   if (order == null) {
     this.order = null;
   } else if (SortOption.ASCENDING.equalsIgnoreCase(order)) {
     this.order = SortOption.ASCENDING;
   } else if (SortOption.DESCENDING.equalsIgnoreCase(order)) {
     this.order = SortOption.DESCENDING;
   }
 }
  /** @return true if ascending, false if not - or not set */
  public boolean isAscending() {
    if (SortOption.ASCENDING.equalsIgnoreCase(order)) {
      return true;
    }

    if (SortOption.DESCENDING.equalsIgnoreCase(order)) {
      return false;
    }

    try {
      SortOption so = getSortOption();

      if (so != null && SortOption.DESCENDING.equalsIgnoreCase(so.getDefaultOrder())) return false;
    } catch (BrowseException be) {
      // recoverable problem, just log the error and continue
      log.debug("Unable to retrieve a sort option for this browse", be);
    }

    return true;
  }