URI dereference / redirect

23 views
Skip to first unread message

Ian Harrison

unread,
Nov 7, 2016, 8:07:06 AM11/7/16
to linked-data-api-discuss
In my ELDA application, in the HTML viewer, running under tomcat,  I have URI's exposed which do not dereference when clicked on (i get a DNS error). This is understandable as the base domain does not exist. What I'd like to be able to do is everywhere I have a URI like this in the UI




I did see something in the API definition about a predicate elda:rewriteResultURIs -- is this what I need to use?

Thanks for any pointers

Ian

chris dollin

unread,
Nov 7, 2016, 11:59:43 AM11/7/16
to linked-data-api-discuss
On 7 November 2016 at 13:07, Ian Harrison <ian.w.h...@gmail.com> wrote:
> In my ELDA application, in the HTML viewer, running under tomcat, I have
> URI's exposed which do not dereference when clicked on (i get a DNS error).
> This is understandable as the base domain does not exist. What I'd like to
> be able to do is everywhere I have a URI like this in the UI
>
> http://www.example.com/id/ClassX/InstanceY
>
> then that is redirected to http://localhost:8080/myapp/ClassX/InstanceY

Where do these URIs come from? Are they present in the underlying
data being queried or are they part of the query-construction-and-view?
Am I right in believing that you have lots of X, Y possibilities?

Elda won't do a redirection for this; it has redirection
machinery but only for the item template redirection when there's
no matching URI template.

> I did see something in the API definition about a predicate
> elda:rewriteResultURIs -- is this what I need to use?

Not enough information to say yet. The (still experimental;
no-one has owned up to trying it) URI rewriting pass rewrites
all the URIs present /in the model resulting from the query/.
It doesn't rewrite URIs that are present in the result for some
other reason (eg being part of the metadata).

If you could show us an example it would help to work out
what needs doing.

Chris

--
Chris "allusive" Dollin

Ian Harrison

unread,
Nov 7, 2016, 12:16:23 PM11/7/16
to linked-data-api-discuss
Chris

Thanks for reply. Answers inline


On Monday, November 7, 2016 at 5:59:43 PM UTC+1, chris wrote:
On 7 November 2016 at 13:07, Ian Harrison <ian.w.h...@gmail.com> wrote:
> In my ELDA application, in the HTML viewer, running under tomcat,  I have
> URI's exposed which do not dereference when clicked on (i get a DNS error).
> This is understandable as the base domain does not exist. What I'd like to
> be able to do is everywhere I have a URI like this in the UI
>
> http://www.example.com/id/ClassX/InstanceY
>
> then that is redirected to http://localhost:8080/myapp/ClassX/InstanceY

Where do these URIs come from? Are they present in the underlying
data being queried or are they part of the query-construction-and-view?
Am I right in believing that you have lots of X, Y possibilities?

The URIs are in the underlying data (stored in a triplestore) Yes there are lots of X and Y possibilities

Elda won't do a redirection for this; it has redirection
machinery but only for the item template redirection when there's
no matching URI template.

> I did see something in the API definition about a predicate
> elda:rewriteResultURIs -- is this what I need to use?

Not enough information to say yet. The (still experimental;
no-one has owned up to trying it) URI rewriting pass rewrites
all the URIs present /in the model resulting from the query/.
It doesn't rewrite URIs that are present in the result for some
other reason (eg being part of the metadata).

If you could show us an example it would help to work out
what needs doing.

I'll send something anonymised -- data and config file
Reply all
Reply to author
Forward
0 new messages