public class ConnegUtil extends Object
| Constructor and Description |
|---|
ConnegUtil(String acceptStr) |
| Modifier and Type | Method and Description |
|---|---|
org.openrdf.query.resultio.BooleanQueryResultFormat |
getBooleanQueryResultFormat()
Return the best
BooleanQueryResultFormat from the
Accept header, where "best" is measured by the
q parameter. |
org.openrdf.query.resultio.BooleanQueryResultFormat |
getBooleanQueryResultFormat(org.openrdf.query.resultio.BooleanQueryResultFormat fallback)
Return the best
BooleanQueryResultFormat from the
Accept header, where "best" is measured by the
q parameter. |
CounterSetFormat |
getCounterSetFormat()
Return the best
CounterSetFormat from the Accept
header, where "best" is measured by the q parameter. |
CounterSetFormat |
getCounterSetFormat(CounterSetFormat fallback)
Return the best
RDCountersFormatFFormat from the
Accept header, where "best" is measured by the
q parameter. |
static String |
getMimeTypeForQueryParameterQueryRequest(String outputFormat,
String... acceptHeaders)
A utility method to check for a format string query parameter and update
the mimetype for sending back results.
|
static String |
getMimeTypeForQueryParameterServiceRequest(String outputFormat,
String acceptHeader)
A utility method to check for a format string query parameter and update
the mimetype for sending back results.
|
PropertiesFormat |
getPropertiesFormat()
Return the best
PropertiesFormat from the Accept
header, where "best" is measured by the q parameter. |
PropertiesFormat |
getPropertiesFormat(PropertiesFormat fallback)
Return the best
PropertiesFormat from the Accept
header, where "best" is measured by the q parameter. |
org.openrdf.rio.RDFFormat |
getRDFFormat()
Return the best
RDFFormat from the Accept header,
where "best" is measured by the q parameter. |
org.openrdf.rio.RDFFormat |
getRDFFormat(org.openrdf.rio.RDFFormat fallback)
Return the best
RDFFormat from the Accept header,
where "best" is measured by the q parameter. |
<E> ConnegScore<E>[] |
getScores(Class<E> cls)
Return an ordered list of the
ConnegScores for MIME Types which
are consistent with the desired format type. |
org.openrdf.query.resultio.TupleQueryResultFormat |
getTupleQueryResultFormat()
Return the best
TupleQueryResultFormat from the
Accept header, where "best" is measured by the
q parameter. |
org.openrdf.query.resultio.TupleQueryResultFormat |
getTupleQueryResultFormat(org.openrdf.query.resultio.TupleQueryResultFormat fallback)
Return the best
TupleQueryResultFormat from the
Accept header, where "best" is measured by the
q parameter. |
String |
toString() |
public ConnegUtil(String acceptStr)
acceptStr - The Accept header.public static String getMimeTypeForQueryParameterQueryRequest(String outputFormat, String... acceptHeaders)
req - http://trac.blazegraph.com/ticket/984public static String getMimeTypeForQueryParameterServiceRequest(String outputFormat, String acceptHeader)
req - http://trac.blazegraph.com/ticket/984public org.openrdf.rio.RDFFormat getRDFFormat()
RDFFormat from the Accept header,
where "best" is measured by the q parameter.RDFFormat -or- null if no
RDFFormat was requested.public org.openrdf.rio.RDFFormat getRDFFormat(org.openrdf.rio.RDFFormat fallback)
RDFFormat from the Accept header,
where "best" is measured by the q parameter.fallback - The caller's default, which is returned if no match was
specified.RDFFormat -or- fallback if no
RDFFormat was requested.public org.openrdf.query.resultio.TupleQueryResultFormat getTupleQueryResultFormat()
TupleQueryResultFormat from the
Accept header, where "best" is measured by the
q parameter.TupleQueryResultFormat -or- null if
no TupleQueryResultFormat was requested.public org.openrdf.query.resultio.TupleQueryResultFormat getTupleQueryResultFormat(org.openrdf.query.resultio.TupleQueryResultFormat fallback)
TupleQueryResultFormat from the
Accept header, where "best" is measured by the
q parameter.fallback - The caller's default, which is returned if no match was
specified.TupleQueryResultFormat -or- fallback if
no TupleQueryResultFormat was requested.public org.openrdf.query.resultio.BooleanQueryResultFormat getBooleanQueryResultFormat()
BooleanQueryResultFormat from the
Accept header, where "best" is measured by the
q parameter.BooleanQueryResultFormat -or- null
if no BooleanQueryResultFormat was requested.public org.openrdf.query.resultio.BooleanQueryResultFormat getBooleanQueryResultFormat(org.openrdf.query.resultio.BooleanQueryResultFormat fallback)
BooleanQueryResultFormat from the
Accept header, where "best" is measured by the
q parameter.fallback - The caller's default, which is returned if no match was
specified.BooleanQueryResultFormat -or- fallback if
no BooleanQueryResultFormat was requested.public PropertiesFormat getPropertiesFormat()
PropertiesFormat from the Accept
header, where "best" is measured by the q parameter.PropertiesFormat -or- null if no
PropertiesFormat was requested.public PropertiesFormat getPropertiesFormat(PropertiesFormat fallback)
PropertiesFormat from the Accept
header, where "best" is measured by the q parameter.fallback - The caller's default, which is returned if no match was
specified.PropertiesFormat -or- fallback if no
PropertiesFormat was requested.public CounterSetFormat getCounterSetFormat()
CounterSetFormat from the Accept
header, where "best" is measured by the q parameter.CounterSetFormat -or- null if no
CounterSetFormat was requested.public CounterSetFormat getCounterSetFormat(CounterSetFormat fallback)
RDCountersFormatFFormat from the
Accept header, where "best" is measured by the
q parameter.fallback - The caller's default, which is returned if no match was
specified.CounterSetFormat -or- fallback if no
CounterSetFormat was requested.public <E> ConnegScore<E>[] getScores(Class<E> cls)
ConnegScores for MIME Types which
are consistent with the desired format type.cls - The format type.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.