public Model loadModel(String filenameOrURI)
{
ClientConfig config = new DefaultClientConfig();
config.getClasses().add(ModelProvider.class);
return Client.create(config).
resource(filenameOrURI).
header("Accept", getAcceptHeader()).
get(Model.class);
}
One of the publishing patterns of the semantic web is the "303 See Also"
pattern used to distinguish information resources from non-information
resources. Personally, I view as too complicated to be practical - the
fact that many client-side silent toolkits follow redirects goes to show
that the pattern is not viable. But it exists so we have to live with it.
I'd like to see a whole API around this dereference of IR/NIR but for
now one small part is that the base URI for a redirect is URI after
redirection. It took me a while to realise why that's the right choice;
it's because the route you take to get to a resource should not affect
the what the resource looks like.
Is that possible with Jersey?
I'm not trying to pick on details just for the sake of it - I hope Jena
can capture all the standard ways to access data on the semantic web and
so relieve the application writer from having to deal with what are
sometimes seemingly bizarre decisions.
Andy