OM icon indicating copy to clipboard operation
OM copied to clipboard

Publish OM with content negotiation

Open dr-shorthair opened this issue 6 years ago • 3 comments

The OM URIs appear to resolve nicely each to a HTML page, e.g.

http://www.ontology-of-units-of-measure.org/page/om-2/squareMetre

However, it would be better still if they were available directly in RDF.

I tested using HTTP conneg and it doesn't appear to be supported at present. Any possibility of heading this direction?

dr-shorthair avatar Jul 10 '18 06:07 dr-shorthair

A request in the browser such as http://www.ontology-of-units-of-measure.org/resource/om-2/ApplicationArea gets you to the HTML ontology page. Note that the page was redirected to http://www.ontology-of-units-of-measure.org/page/om-2/ApplicationArea.

If you click on the download button on this page, you will get the content on this page as a turtle file in your download folder.

To directly download a turtle file, do a request to http://www.ontology-of-units-of-measure.org/data/om-2/ApplicationArea, with header accept=application/turtle. To directly download an rdf-xml, file do a request to http://www.ontology-of-units-of-measure.org/data/om-2/ApplicationArea, with header accept=application/rdf+xml.

Note that these last two calls cannot be made directly in the browser, as the browser will always set the header to accept=text/html.

It seems that the redirect from http://www.ontology-of-units-of-measure.org/resource/om-2/ApplicationArea to http://www.ontology-of-units-of-measure.org/data/om-2/ApplicationArea for requests with accept=application/rdf-xml or turtle is not working for some reason. We will have a look into this.

HajoRijgersberg avatar Jul 10 '18 21:07 HajoRijgersberg

It also does not work for Accept: text/turtle and the issue also applies for the whole ontology: http://www.ontology-of-units-of-measure.org/resource/om-2/

Even loading http://www.ontology-of-units-of-measure.org/data/om-2.ttl with Accept: text/turtle raises 500. (I did not test the other formats.)

jmkeil avatar Aug 11 '20 08:08 jmkeil

Thanks Jan-Martin, I'm looking into this. Can't seem to specify any header so far.. :/

HajoRijgersberg avatar Aug 12 '20 15:08 HajoRijgersberg