@prefix rule: <tag:stardom:api:rule:>
@prefix ex: <http://example.org/stuff#>
[] a rule:SPARQLRule ;
rule:content """
PREFIX ex: <http://example.org/stuff#>
IF {
?n2 ex:has_parent :?n1 .
?g ex:can_view ?n1 ;
a ex:Group
}
THEN {
?g ex:can_view ?n2
}
""" .
ex:node2 ex:has_parent ex:node1 .
ex:group1 a ex:Group ;
ex:can_view ex:node1 .
ex:group1 ex:can_view ex:node1
ex:group1 ex:can_view ex:node2
[] a rule:SPARQLRule ;
rule:content """
PREFIX ex: <http://example.org/stuff#>
IF {
?n2 ex:has_parent :?n1 .
?g ex:can_view ?n1
}
THEN {
?g ex:can_view ?n2
}
""" .
ex:group1 ex:can_view ex:node1
select * where { ?s ex:can_view ?o ; a ex:Group }
is correct. I'm specifically wondering about the colon in ":?n1".
... which it does, if I remove "a ex:Group" from SPARQLRule above, so that I get:[] a rule:SPARQLRule ;
rule:content """
PREFIX ex: <http://example.org/stuff#>
IF {
?n2 ex:has_parent :?n1 .
?g ex:can_view ?n1
}
THEN {
?g ex:can_view ?n2
}
""" .Instead, I'm getting only the statement which is explicitly specified:
ex:group1 ex:can_view ex:node1(I have SL reasoning switched on).I tried using just "a ?c" to say that I don't really care about the type of "?g", but it won't fix the issue -- only complete removal of that extra type constraint works.(I also tried using "rdf:type" instead of "a", providing explicit "rdf" prefix declaration; then using triples instead of a shortcut via ";"... but to no avail).A SPARQL query likeworks fine.
select * where { ?s ex:can_view ?o ; a ex:Group }
--
-- --
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
---
You received this message because you are subscribed to the Google Groups "Stardog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stardog+u...@clarkparsia.com.
@prefix rule: <tag:stardom:api:rule:> should be <tag:stardog:api:rule:>
select * where { ?s ex:can_view ?o }"
@prefix rule: <tag:stardog:api:rule:> .@prefix ex: <http://example.org/stuff#> .
[] a rule:SPARQLRule ;
rule:content """ PREFIX ex: <http://example.org/stuff#>
IF { ?n2 ex:has_parent ?n1 . ?g ex:can_view ?n1 } THEN { ?g ex:can_view ?n2 } """ .
ex:node2 ex:has_parent ex:node1 .ex:group1 a ex:Group ; ex:can_view ex:node1 .
@prefix rule: <tag:stardog:api:rule:> .@prefix ex: <http://example.org/stuff#> .
[] a rule:SPARQLRule ; rule:content """ PREFIX ex: <http://example.org/stuff#>
IF { ?n2 ex:has_parent ?n1 . ?g ex:can_view ?n1 ;
a ex:Group .
} THEN { ?g ex:can_view ?n2 } """ .
ex:node2 ex:has_parent ex:node1 .ex:group1 a ex:Group ; ex:can_view ex:node1 .
WARN 2016-02-12 11:04:17,552 [SPEC-Server-1-1] com.complexible.stardog.reasoning.blackout.ViewAtomToPlanNode:transformView(100): Unsupported cycle or rule for property http://example.org/stuff#can_view WARN 2016-02-12 11:04:17,552 [SPEC-Server-1-1] com.complexible.stardog.reasoning.blackout.ViewAtomToPlanNode:transformView(101): Rewriting:
--
-- --
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
--