java.lang.Object
org.apache.jena.atlas.web.AcceptList
-
Constructor Summary
ConstructorsConstructorDescriptionAcceptList(String headerString) Parse an HTTP Accept (or etc) header string.AcceptList(List<MediaRange> mediaRanges) Create a list of accept items from the give strings.AcceptList(MediaRange... acceptItems) Create a list of accept items from the give MediaTypes. -
Method Summary
Modifier and TypeMethodDescriptionstatic AcceptListCreate a list of accept items from strings.static AcceptListCreate a list of accept items from the give MediaTypes.entries()first()static MediaTypematch(AcceptList proposalList, AcceptList offerList) Find the best thing in offer list 8sever side) matching the proposal (client, Accept header).Find and return a match for a specific MediaType.toString()
-
Constructor Details
-
AcceptList
Create a list of accept items from the give strings.- Parameters:
mediaRanges-
-
AcceptList
Create a list of accept items from the give MediaTypes.- Parameters:
acceptItems-
-
AcceptList
Parse an HTTP Accept (or etc) header string.- Parameters:
headerString-
-
-
Method Details
-
create
Create a list of accept items from the give MediaTypes.- Parameters:
acceptItems-
-
create
Create a list of accept items from strings.- Parameters:
acceptStrings-
-
entries
-
match
Find and return a match for a specific MediaType. Returns the Accept header entry best matched or null. -
match
Find the best thing in offer list 8sever side) matching the proposal (client, Accept header). "best" means highest q value, with left most being better for same q.- Parameters:
proposalList- Client list of possibilitiesofferList- Server list of possibilities- Returns:
- MediaType
-
first
-
toString
-