public List < Variant > getVariants ( ) { List < Variant > vs = new ArrayList < Variant > ( ) ; for ( Map . Entry < String , ProvFormat > entry : mimeTypeRevMap . entrySet ( ) ) { if ( isOutputFormat ( entry . getValue ( ) ) ) { String [ ] parts = entry . getKey ( ) . split ( "/" ) ; MediaType m = new MediaType ( parts [ 0 ] , parts [ 1 ] ) ; vs . add ( new Variant ( m , ( java . util . Locale ) null , ( String ) null ) ) ; } } return vs ; }
Support for content negotiation jax - rs style . Create a list of media type supported by the framework .