Re: Java Framework for Content Negotiation

Hi,

On 20.05.2010 19:27, Richard Cyganiak wrote:
>
> On 20 May 2010, at 13:38, Angelo Veltens wrote:
>> I might have a non-information resource http://example.org/resource/foo
>>
>> I could place a REST-Webservice there and do content negotiation with 
>> @GET / @Produces Annotations. But this seems not correct to me, 
>> because it is a non-information resource and not a html or rdf/xml 
>> document. So it should never return html or rdf/xml but do a 303 
>> redirect to an information resource instead, doesn't it?
>
> I second Michael's recommendation to have a look at the Cool URIs for 
> SemWeb document, in particular this section:
> http://www.w3.org/TR/cooluris/#r303gendocument

Thanks to all for your answers.

What I am going to implement is this: http://www.w3.org/TR/cooluris/#r303uri

I think, this is the way dbpedia works and it seems a good solution for 
me. My question is, if there is a java solution / framework for what is 
shown in the picture in this section.

I imagine something like this:

I can configure URI-patterns for (non-)information resources, e.g.

Non-Information-Resources: http:/example.com/id/{.*}
RDF-Representation: http:/example.com/data/{.*}
HTML-Representation: http:/example.com/page/{.*}

The conneg and 303-redirection stuff should be handled automatically so 
that i only have to implement what my application serves at these uris.

I have played arround with REST-Webservices as recommended. This is what 
i do at the moment:

I have a service at http:/example.com/id/person/0815 with methods that 
are annotated to produce html  respectively rdf/xml. But instead of 
serving the representations immediately I use Response.seeOther to do a 
303-redirect to http:/example.com/page/person/0815 respectivly 
http:/example.com/data/person/0815. This works fine, but perhaps there 
is a more automated solution, that does conneg as well as 303-redirect.

>
> But also:
> http://www.w3.org/TR/cooluris/#hashuri
> http://www.w3.org/TR/cooluris/#choosing
>
> If you can build your site with hash URIs rather than 303 redirects, I 
> highly recommend doing so.

Thanks, i have thought about it, but hash-uris don't fit my needs.

Kind Regards,
Angelo

Received on Thursday, 27 May 2010 09:48:34 UTC