Package org.dspace.rdf.negotiation
Class Negotiator
java.lang.Object
org.dspace.rdf.negotiation.Negotiator
- Author:
- Pascal-Nicolas Becker (dspace -at- pascal -hyphen- becker -dot- de)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionstatic Comparator<MediaRange>Method to get a comparator to compare media ranges regarding their content negotiation precedence.static intstatic booleansendRedirect(jakarta.servlet.http.HttpServletResponse response, String handle, String extraPathInfo, int serialization, boolean redirectHTML)
-
Field Details
-
UNSPECIFIED
public static final int UNSPECIFIED- See Also:
-
WILDCARD
public static final int WILDCARD- See Also:
-
HTML
public static final int HTML- See Also:
-
RDFXML
public static final int RDFXML- See Also:
-
TURTLE
public static final int TURTLE- See Also:
-
N3
public static final int N3- See Also:
-
DEFAULT_LANG
- See Also:
-
-
Method Details
-
negotiate
-
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
-