Hi,
I am new to Jersey and try to generically use it in combination with Hibernate and XStream. When I send an resource object over the wire I use XStream for serialization and when this resource object contains references to other resource objects, I replace them with the resource URI instead of serializing them. This works quite good with the help of the UriBuilder (e.g. UriBuilder.fromResource(type).path(type, "getById").build(id).toString()).
However - and that's my question - how can I get the resource class back from the URI (e.g. /cars/123). Jersey does it once for the containing resource when the REST call hits it, but then I am on my own while deserializing the content. I must take an URI that I have built with the help of the UriBuilder and get the original resource class back. Does anybody know how to do this lookup from URI to resource class?
Thanks in advance,
Vedran