Package org.openjena.atlas.web

Examples of org.openjena.atlas.web.AcceptList


        } catch (RuntimeException ex) { return null ; }
    }
   
    static public MediaType match(String headerString, AcceptList offerList)
    {
        AcceptList l = new AcceptList(headerString) ;
        return AcceptList.match(l, offerList) ;
    }
View Full Code Here


    }

    /** Match a single media type against a header string */
    public static String match(String headerString, String mediaRangeStr)
    {
        AcceptList l = new AcceptList(headerString) ;
        MediaRange aItem = new MediaRange(mediaRangeStr) // MediaType
        MediaType m = l.match(aItem) ;
        if ( m == null )
            return null ;
        return m.toHeaderString() ;
    }
View Full Code Here

                                    MediaType defaultMediaType)
    {
        if ( headerString == null )
            return defaultMediaType ;
       
        AcceptList headerList = new AcceptList(headerString) ;
       
        if ( myPrefs == null )
            return headerList.first() ;
   
        MediaType i = AcceptList.match(headerList, myPrefs) ;
        if ( i == null )
            return defaultMediaType ;
        return i ;
View Full Code Here

TOP

Related Classes of org.openjena.atlas.web.AcceptList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.