rightsstatements / rights-app

Web application to serve the rightsstatements.org vocabulary
http://rightsstatements.org/vocab/1.0/
European Union Public License 1.1
1 stars 3 forks source link

Dereference statement / vocab versions as JSON, Turtle and HTML #30

Closed literarymachine closed 8 years ago

literarymachine commented 8 years ago

See e.g. vocab/1.0/ or vocab/InC/0.0/.

anarchivist commented 8 years ago

I found a minor issue with the template when using the sample Turtle file for testing versions and translations (understanding that these templates will ultimately be replaced). It appears that the skos:prefLabel, skos:definition, and skos:scopeNote do not appear if there is more than one statement with this predicate, despite the object of those statements being language-tagged literals. See the screenshot below:

screen shot 2015-11-30 at 9 16 43 am
anarchivist commented 8 years ago

Other than my previous comment I think this is generally looking very good. Thanks - I'll take a closer look later today or tomorrow.

anarchivist commented 8 years ago

Another minor comment - can the README specify that we need a Java 8 JDK in text (other than just in the link)?

anarchivist commented 8 years ago

The Link header with the derivedfrom relation does not appear right:

$ curl -v -L -H "Accept: text/turtle"  http://localhost:9000/vocab/InC/1.0/
*   Trying ::1...
* Connected to localhost (::1) port 9000 (#0)
> GET /vocab/InC/1.0/ HTTP/1.1
> Host: localhost:9000
> User-Agent: curl/7.43.0
> Accept: text/turtle
>
< HTTP/1.1 303 See Other
< Location: http://localhost:9000/data/InC/1.0/
< Date: Thu, 03 Dec 2015 04:34:49 GMT
< Content-Length: 0
<
* Connection #0 to host localhost left intact
* Issue another request to this URL: 'http://localhost:9000/data/InC/1.0/'
* Found bundle for host localhost: 0x7f7fca414d70
* Re-using existing connection! (#0) with host localhost
* Connected to localhost (::1) port 9000 (#0)
> GET /data/InC/1.0/ HTTP/1.1
> Host: localhost:9000
> User-Agent: curl/7.43.0
> Accept: text/turtle
>
< HTTP/1.1 200 OK
< Link: <http://localhost:9000/data/InC/1.0/>; rel=derivedfrom
< Content-Type: text/turtle
< Content-Location: http://localhost:9000/data/InC/1.0.ttl
< Date: Thu, 03 Dec 2015 04:34:49 GMT
< Content-Length: 2606
<

Dereferencing the returned URI (http://localhost:9000/data/InC/1.0/) leads to an error:

$ curl -v -L http://localhost:9000/data/InC/1.0/
*   Trying ::1...
* Connected to localhost (::1) port 9000 (#0)
> GET /data/InC/1.0/ HTTP/1.1
> Host: localhost:9000
> User-Agent: curl/7.43.0
> Accept: */*
>
< HTTP/1.1 406 Not Acceptable
< Link: <http://localhost:9000/data/InC/1.0/>; rel=derivedfrom
< Content-Location: http://localhost:9000/data/InC/1.0/
< Date: Thu, 03 Dec 2015 04:36:30 GMT
< Content-Length: 0
<
anarchivist commented 8 years ago

That said, dereferencing the returned URI and specifying an Accept: header works:

curl -v -L -H "Accept: text/turtle"  http://localhost:9000/data/InC/1.0/
*   Trying ::1...
* Connected to localhost (::1) port 9000 (#0)
> GET /data/InC/1.0/ HTTP/1.1
> Host: localhost:9000
> User-Agent: curl/7.43.0
> Accept: text/turtle
>
< HTTP/1.1 200 OK
< Link: <http://localhost:9000/data/InC/1.0/>; rel=derivedfrom
< Content-Type: text/turtle
< Content-Location: http://localhost:9000/data/InC/1.0.ttl
< Date: Thu, 03 Dec 2015 04:40:49 GMT
< Content-Length: 2606
<
literarymachine commented 8 years ago

Dereferencing the returned URI (http://localhost:9000/data/InC/1.0/) leads to an error

With https://github.com/rightsstatements/rights-app/commit/3b3419a910fe989622d5dedf0573dbd3172b512d */* and empty Accept headers are supported, defaulting to application/json and json extension.

anarchivist commented 8 years ago

OK, this all looks good to me (in addition to adding the localized HTML.) Thanks! :+1: