Querying ULAN with curl

32 views
Skip to first unread message

Charles Blair

unread,
Sep 8, 2020, 12:02:56 PM9/8/20
to Getty Vocabularies as Linked Open Data
The following query works fine in the online SPARQL interface. (I notice it also works without declaring the prefix.)

prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>

select ?s ?p ?o

where { <http://vocab.getty.edu/ulan/500033408> rdfs:label ?o }

However, I've done a lot of searching and yet can't seem to make it work on the command line via curl. Could someone show the correct way to do this? Thanks.

Richard Light

unread,
Sep 8, 2020, 12:19:07 PM9/8/20
to gettyv...@googlegroups.com

Hi,

I took the URL which the SPARQL end-point generated for the XML response, and just added it (in quotes) after curl on the command line.  It worked OK:

Richard

--
You received this message because you are subscribed to the Google Groups "Getty Vocabularies as Linked Open Data" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gettyvocablo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gettyvocablod/778cac25-1fcd-4758-88ed-d074b443c48dn%40googlegroups.com.
--

Richard Light
richard...@gmail.com
@richardofsussex

Charles Blair

unread,
Sep 8, 2020, 12:55:24 PM9/8/20
to Getty Vocabularies as Linked Open Data
Ah, thank you. That "sparql.xml" does make for a more easy to parse format (as would "sparql.json", I see). Thanks again!

Richard Light

unread,
Sep 8, 2020, 5:31:47 PM9/8/20
to gettyv...@googlegroups.com
On 08/09/2020 17:55, Charles Blair wrote:
Ah, thank you. That "sparql.xml" does make for a more easy to parse format (as would "sparql.json", I see). Thanks again!

Left to my own devices, I would always use CONSTRUCT instead of SELECT, and request an RDF/XML response. That way I get a machine-processible graph fragment. (I realise there are other points of view on this issue ...)

Richard

Reply all
Reply to author
Forward
0 new messages