On 27/07/16 09:01, javed khan wrote:
I have rule body:I want instance x which are in both classes to assign to
another class "StudentExpert" which have no other instances. But does not
work.
(My Owl inverse property and transitive property rule works but this
generic rule does not work)
String rule = "*[rule1:(?x
http://www.w3.org/1999/02/22-rdf-syntax-ns#rdf:type
<http://www.w3.org/1999/02/22-rdf-syntax-ns#rdf:type>
http://www.semanticweb.org/141#Student
<http://www.semanticweb.org/141#Student>) " +*
* "(?x
http://www.w3.org/1999/02/22-rdf-syntax-ns#rdf:type
<http://www.w3.org/1999/02/22-rdf-syntax-ns#rdf:type>
http://www.semanticweb.org/141#Expert
<http://www.semanticweb.org/141#Expert> )" + *
"->(?x http://www.w3.org/1999/02/22-rdf-syntax-ns#rdf:type
http://www.semanticweb.org/141#StudentExpert )]";
As Lorenz says, your postings come through with all URLs duplicated so
it's hard to be sure what's actually in your data. However, things like:
<http://www.w3.org/1999/02/22-rdf-syntax-ns#rdf:type>
are wrong. Either use the correct URI:
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
or use the prefix form:
rdf:type
Dave