Class Negotiator

java.lang.Object
org.dspace.rdf.negotiation.Negotiator

public class Negotiator extends Object
Author:
Pascal-Nicolas Becker (dspace -at- pascal -hyphen- becker -dot- de)
  • Field Details

  • Method Details

    • negotiate

      public static int negotiate(String acceptHeader)
    • getMediaRangeComparator

      public static Comparator<MediaRange> getMediaRangeComparator()
      Method to get a comparator to compare media ranges regarding their content negotiation precedence. Following RFC 2616 a media range is higher prioritized then another media range if the first one has a higher quality value then the second. If both quality values are equal, the media range that is more specific should be used.

      Note: this comparator imposes orderings that are inconsistent with equals! Caution should be exercised when using it to order a sorted set or a sorted map. Take a look at the java.util.Comparator for further information.

      Returns:
      A comparator that imposes orderings that are inconsistent with equals!
    • sendRedirect

      public static boolean sendRedirect(jakarta.servlet.http.HttpServletResponse response, String handle, String extraPathInfo, int serialization, boolean redirectHTML) throws IOException
      Throws:
      IOException