public static IRI getProfile ( final List < MediaType > acceptableTypes , final RDFSyntax syntax ) { for ( final MediaType type : acceptableTypes ) { if ( RDFSyntax . byMediaType ( type . toString ( ) ) . filter ( syntax :: equals ) . isPresent ( ) && type . getParameters ( ) . containsKey ( "profile" ) ) { return rdf . createIRI ( type . getParameters ( ) . get ( "profile" ) . split ( " " ) [ 0 ] . trim ( ) ) ; } } return null ; }
Given a list of acceptable media types and an RDF syntax get the relevant profile data if relevant