public static boolean supports(String mediaType, ResultType expectedType) {
    if (mediaType == null) return true; // Assume the server will choose a reasonable media type.

    ResponseFormat format = mimeFormats.get(stripParams(mediaType));
    return (format != null && (expectedType == null || format.resultTypes.contains(expectedType)));
  }
public static boolean supports ( String mediaType , ResultType expectedType ) { if ( mediaType == null ) return true ; ResponseFormat format = mimeFormats . get ( stripParams ( mediaType ) ) ; return ( format != null && ( expectedType == null || format . resultTypes . contains ( expectedType ) ) ) ; }
Determine whether the given media type supports the expected result type, i.e. don't request
RDF/XML if the user is expecting SELECT results.
@param mediaType The requested media type.
@param expectedType The expected result type.
@return <tt>false</tt> if the requested media type is unrecognized or does not support the
requested result type, <tt>true</tt> otherwise.