How to get the id or the graph of a triple

15 views
Skip to first unread message

Flyon

unread,
May 6, 2012, 5:38:34 AM5/6/12
to arc-dev
Every triple has an ID. And every ID belongs to a graph.

Because I want to use non standard reification (because it would be to
heavy),
I would like to know the ID's of triples, to use them in URL's and
reuse the URL of a triple in another triple.

ARC2 either returns different types of information for SELECT vs
CONSTRUCT, but I don't think I can use either to get the ID of a
triple.

What would be the best way to use / extend ARC2 to get the ID or graph
of a triple?
Are there existing methods that I've missed? Or should I try to write
something myself?

Flyon

unread,
May 8, 2012, 6:06:47 AM5/8/12
to arc-dev
So ... I just noticed SPARQL can be used to select the graph... (don't
know why I didn't think of that / check that before )

$res = $this->store->query('SELECT ?g WHERE { GRAPH ?g { <your>
<triple> <here> } }');

that's what I was looking for!
Reply all
Reply to author
Forward
0 new messages