struggling with the -m, -M options on the command line

1 view
Skip to first unread message

PaulZH

unread,
Aug 28, 2009, 10:39:31 AM8/28/09
to OpenAnzo
Dear,

I have now following query that returns the expected results.

anzo query "SELECT ?g ?a ?b ?c FROM NAMED <http://openanzo.org/
metadataGraphs(http%3A%2F%2Fwww.test.org%2Fgraph1)> WHERE {GRAPH ?l
{<http://www.test.org/graph1> anzo:hasMetadataGraph ?g}. GRAPH ?g {?a ?
b ?c}}"

The query is weird, since I use already in the FROM NAMED part the IRI
that I'm trying to detect by the first part in the WHERE clause.

In fact I want FROM NAMED *.

I did understand that I could do this by using the -M as parameter on
the command line, but this doesn't return anything.

I must be missing something obvious.

PaulZH

unread,
Sep 9, 2009, 1:10:19 PM9/9/09
to OpenAnzo
No One?

Matthew Roy

unread,
Sep 9, 2009, 1:46:26 PM9/9/09
to open...@googlegroups.com
I'm not sure what results you are trying to get.
The query
SELECT ?g ?a ?b ?c WHERE {GRAPH ?g {?ng anzo:hasMetadataGraph ?g . ?a ?b ?c}}

executed with the -M optional will return all the metadata about all the graphs in the system the user has permission to see.
If you want to search across all metadata graphs you use the -M option, but if you include an an explicit "FROM NAMED" clause, the -M will be ignored.

Matt

PaulZH

unread,
Sep 10, 2009, 8:29:41 AM9/10/09
to OpenAnzo
Matt,

Thanks for the reply.

To make things more clear.

a)
query:
anzo query -M "select DISTINCT ?g ?a ?b ?c WHERE {GRAPH ?g {?a ?b ?
c}}"
part of result:

...tadataGraphs(http%3A%2F%2Fwww.example.com%2FG1) http://www.example.com/G1
anzo:canBeAddedToBy http://openanzo.org/system/internal/sysadmin
...tadataGraphs(http%3A%2F%2Fwww.example.com%2FG1) http://www.example.com/G1
anzo:canBeReadBy http://openanzo.org/system/internal/sysadmin
...tadataGraphs(http%3A%2F%2Fwww.example.com%2FG1) http://www.example.com/G1
anzo:canBeRemovedFromBy http://openanzo.org/system/internal/sysadmin
...tadataGraphs(http%3A%2F%2Fwww.example.com%2FG1) http://www.example.com/G1
anzo:createdBy http://openanzo.org/system/internal/sysadmin
...tadataGraphs(http%3A%2F%2Fwww.example.com%2FG1) http://www.example.com/G1
anzo:datasource
http://openanzo.org/datasource/systemDatasource
...tadataGraphs(http%3A%2F%2Fwww.example.com%2FG1) http://www.example.com/G1
anzo:hasMetadataGraph ...tadataGraphs(http
%3A%2F%2Fwww.example.com%2FG1)
...tadataGraphs(http%3A%2F%2Fwww.example.com%2FG1) http://www.example.com/G1
anzo:lastModifiedByUser http://openanzo.org/system/internal/sysadmin
...tadataGraphs(http%3A%2F%2Fwww.example.com%2FG1) http://www.example.com/G1
anzo:modified
"""2009-09-10T11:38:19.428Z"""^^xsd:dateTime
...tadataGraphs(http%3A%2F%2Fwww.example.com%2FG1) http://www.example.com/G1
anzo:persisted
"""true"""^^xsd:boolean
...tadataGraphs(http%3A%2F%2Fwww.example.com%2FG1) http://www.example.com/G1
anzo:revision
"""0"""^^xsd:long
...tadataGraphs(http%3A%2F%2Fwww.example.com%2FG1) http://www.example.com/G1
anzo:revisioned
"""true"""^^xsd:boolean
...tadataGraphs(http%3A%2F%2Fwww.example.com%2FG1) http://www.example.com/G1
anzo:uuid ...revisioned/
fccff91d-6e22-46e7-9ee3-58e764c9ccf4
...tadataGraphs(http%3A%2F%2Fwww.example.com%2FG1) http://www.example.com/G1
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
anzo:NamedGraph



b)
query:
anzo query -M "select DISTINCT ?a ?b ?c WHERE {GRAPH <http://
openanzo.org/metadataGraphs(http%3A%2F%2Fwww.example.com%2FG1)> {?a ?
b ?c}}"
result: EMPTY
while I expected
http://www.example.com/G1
anzo:canBeAddedToBy http://openanzo.org/system/internal/sysadmin
http://www.example.com/G1
anzo:canBeReadBy http://openanzo.org/system/internal/sysadmin
http://www.example.com/G1
anzo:canBeRemovedFromBy http://openanzo.org/system/internal/sysadmin
http://www.example.com/G1
anzo:createdBy http://openanzo.org/system/internal/sysadmin
http://www.example.com/G1
anzo:datasource
http://openanzo.org/datasource/systemDatasource
http://www.example.com/G1
anzo:lastModifiedByUser http://openanzo.org/system/internal/sysadmin
http://www.example.com/G1
anzo:modified
"""2009-09-10T11:38:19.428Z"""^^xsd:dateTime
http://www.example.com/G1
anzo:persisted
"""true"""^^xsd:boolean
http://www.example.com/G1
anzo:revision
"""0"""^^xsd:long
http://www.example.com/G1
anzo:revisioned
"""true"""^^xsd:boolean
http://www.example.com/G1
anzo:uuid ...revisioned/
fccff91d-6e22-46e7-9ee3-58e764c9ccf4
http://www.example.com/G1
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
anzo:NamedGraph


Hope this clarifies my question.
And I suppose I'm overlooking something trivial.

Paul

Matthew Roy

unread,
Sep 10, 2009, 10:14:07 AM9/10/09
to open...@googlegroups.com
Looks like we have a bug, which should be fixed in tonight's build.
Thanks
Matt
Reply all
Reply to author
Forward
0 new messages