Syntax for multiple schema graphs?

0 views
Skip to first unread message

Ron Michael Zettlemoyer

unread,
Jul 2, 2014, 9:56:11 AM7/2/14
to sta...@clarkparsia.com
What is the syntax for assigning multiple schema graphs in the reasoning.schema.graphs setting? I know about * thanks to the forum but the documentation doesn't go into much detail on how to format this.




Kendall Clark

unread,
Jul 2, 2014, 11:29:10 AM7/2/14
to stardog
A comma-separated list of Named Graph IDs.

Cheers,
Kendall


On Wed, Jul 2, 2014 at 9:56 AM, Ron Michael Zettlemoyer <r...@zettlemoyer.com> wrote:
What is the syntax for assigning multiple schema graphs in the reasoning.schema.graphs setting? I know about * thanks to the forum but the documentation doesn't go into much detail on how to format this.




--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

Ron Michael Zettlemoyer

unread,
Jul 2, 2014, 2:29:59 PM7/2/14
to Stardog
Thanks. :) I did try that, and it didn't seem to work as I expected, so I thought I'd just confirm the syntax before I fiddled with it any more.

Kendall Clark

unread,
Jul 2, 2014, 2:33:52 PM7/2/14
to stardog
What did you try and what happened?

Cheers,
Kendall

Ron Michael Zettlemoyer

unread,
Jul 2, 2014, 3:21:50 PM7/2/14
to Stardog
It still doesn't seem to work... Maybe I misunderstand how named graph IDs work.

I basically started off with a single named graph like this: 

    reasoning.schema.graphs=http://adomain.com/something

and reasoning worked as expected. Then I added another graph:


and all reasoning stopped. I tried some variations like spaces; commas & spaces; wrapping them in angled brackets; but nothing seemed to help.

Then I then tried:

   reasoning.schema.graphs=*

and my queries never return. :)  Although that may just be something to do with the Stardog web console query screen. I have noticed in the past that sometimes queries that seem to work elsewhere in my app run forever in the web console. But I never had time to follow up on what was going on.





Evren Sirin

unread,
Jul 2, 2014, 3:57:28 PM7/2/14
to Stardog
Comma is a valid character in URIs so when you type
"http://adomain.com/something,http://adomain.com/more" it is
interpreted as a single URI where the path component is
"/something,http://adomain.com/more". To workaround this ambiguity,
the CLI requires a space before and after the comma to separate
multiple URIs. So your command should look like this (the quotation
marks are required):

$ bin/stardog-admin metadata set -o reasoning.schema.graphs="urn:g1 ,
urn:g2" myDB

FWIW, we also support the ASCII STX control character (ASCII code 2)
for separating elements in a list which avoids the ambiguity. On my
Mac (and *nix systems in general) the following command has the same
effect (note no quotation marks this time):

$ bin/stardog-admin metadata set -o
reasoning.schema.graphs=urn:g1$'\002'urn:g2 myDB

Best,
Evren

On Wed, Jul 2, 2014 at 3:21 PM, Ron Michael Zettlemoyer

Ron Michael Zettlemoyer

unread,
Jul 2, 2014, 5:05:32 PM7/2/14
to Stardog
Aha, that did it. Thanks Evren!

Amin Tajgardoon

unread,
Aug 18, 2014, 3:55:38 PM8/18/14
to sta...@clarkparsia.com
I tried both ways in CLI of stardog-2.1.3. The reasoning is not working. When I try comma with spaces or the ASCII character, it concatenates both URIs!

$ bin/stardog-admin metadata set -o reasoning.schema.graphs="http://example.com/G1http://example.com/G2" myDB
OR
$ bin/stardog-admin metadata set -o reasoning.schema.graphs=http://example.com/G1$'\002http://example.com/G2 myDB

Result: reasoning schema graphs = http://example.com/G1http://example.com/G2

Please tell me what to do.

Kendall Clark

unread,
Aug 18, 2014, 3:57:49 PM8/18/14
to stardog
It may not be working for some other reason. Is there anything in the logs?

Cheers,
Kendall

Amin Tajgardoon

unread,
Aug 18, 2014, 5:14:22 PM8/18/14
to sta...@clarkparsia.com
I am confused. Even with one reasoning schema graph the reasoning doesn't work. Here is how I test the reasoning:

I have have two databases. In DB1 everything loads into the default context, in DB2, I have two contexts for schema and individuals respectively, and the reasoning.schema.graphs=schema context URI.
The following query returns all the types in the class hierarchy for a subject having RDFS reasoning selected in DB1 UI:

SELECT ?type
WHERE { <URI> rdf:type ?type .}

However, the follwing query for returns nothing in DB2 UI with the same level of reasoning:

SELECT ?type
FROM <schema context URI>
FROM <individuals context URI>
WHERE { <URI> rdf:type ?type .}

BTW, where should I look for the logs?

Thanks,

Amin Tajgardoon

unread,
Aug 18, 2014, 5:59:47 PM8/18/14
to sta...@clarkparsia.com
The query with RDFS reasoning also works when I insert the classes into the default context and do not change the reasoning.schema.graphs option. In this case I don't have to specify the default context in the FROM clause:

SELECT ?type
FROM <individuals context URI>
WHERE { <URI> rdf:type ?type .}

I do not understand how reasoning.schema.graphs option should work.


To unsubscribe from this group and stop receiving emails from it, send an email to stardog+u...@clarkparsia.com.



--
Amin

Amin Tajgardoon

unread,
Aug 18, 2014, 6:38:54 PM8/18/14
to sta...@clarkparsia.com
My bad. The problem was a typo in reasoning.schema.graphs option. I wasted several hours!
--
Amin

Amin Tajgardoon

unread,
Aug 19, 2014, 9:17:48 AM8/19/14
to sta...@clarkparsia.com
In case reasoning is not working, where should I look for the logs? stardog.log?


On Monday, August 18, 2014 3:57:49 PM UTC-4, Kendall wrote:

Kendall Clark

unread,
Aug 19, 2014, 9:37:20 AM8/19/14
to stardog
Yes
Reply all
Reply to author
Forward
0 new messages