Stardog Rule If-Then construct

9 views
Skip to first unread message

harshal patni

unread,
Nov 14, 2014, 7:24:55 AM11/14/14
to sta...@clarkparsia.com
Hello Everyone,
            I am fairly new to Stardog. I have written If-Then query in Stardog format, however i am unable to execute that query on the Query editor at http://localhost:5820/dbName/query

Everytime I click "Execute" it gives me a format error. Can someone please tell me how can I execute this rule using JAVA?

Here is the query - 
@prefix rule: <tag:stardog:api:rule:> .

[] a rule:SPARQLRule ;
rule:content """
IF {
    ?x rdf:type :Evidence
}
THEN 
{
  ?x rdf:type :EVDConcept .
} """.


And here is the error - 

Error!

Parse error on line 1:
@prefix rule: <tag:s
^
Expecting 'BASE', 'PREFIX', 'SELECT', 'CONSTRUCT', 'DESCRIBE', 'ASK', 'LOAD', 'CREATE', 'INSERTDATA', 'DELETEDATA', 'DELETEWHERE', 'DELETE', 'INSERT', 'WITH', 'CLEAR', 'DROP', 'ADD', '

Mike Grove

unread,
Nov 14, 2014, 8:34:54 AM11/14/14
to stardog
You don't execute rules.  You include them in your TBox and then issue normal SPARQL queries such as "select * where { ?x rdf:type :EVDConcept . }".

Cheers,

Mike 

--
-- --
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

Reply all
Reply to author
Forward
0 new messages