Re: Java library for content negotiation

Hi Peter,

On Sun, Apr 26, 2009 at 9:12 PM, Peter Ansell <ansell.peter@gmail.com>wrote:

> How do other projects do content negotiation in Java?


I don't have a generic library for content negotiation to offer but wanted
to briefly mention our current approach in the Marine Metadata
Interoperability project [1].  Hope this is useful information.

As a standard servlet, the URI resolver component of our MMI Ontology
Registry and Repository [2] uses the getHeaders method in HttpServelRequest,
and then a helper class [3], as a basis to resolve an ontology or term URI
in the appropriate format depending on the "accept" header sent by the
client, and according to [4], which pretty much is in compliance with [5].

Good luck,
Carlos

[1] http://marinemetadata.org
[2] http://mmisw.org/or
[3]
http://code.google.com/p/mmisw/source/browse/trunk/org.mmisw.ont/src/org/mmisw/ont/util/Accept.java
[4] http://marinemetadata.org/apguides/ontprovidersguide/urlresolution
[5] http://www.w3.org/TR/swbp-vocab-pub/



-- 
Carlos Rueda, PhD
MMI Technical Lead - marinemetadata.org
carueda@mbari.org - 831-775-1929
Monterey Bay Aquarium Research Institute - mbari.org

Received on Tuesday, 28 April 2009 07:31:41 UTC