On 21/08/16 12:37, lookman sanni wrote:
Hi all,
I am struggling with the definition of jena rules. I have an RDF file where
I am defining:
- a "folder" class with a property "createdBy"
- a "file" class with a property "processedIn" of type "folder"
My RDF file contains resources from the two classes. I am trying to define
a Jena rule for querying files appearing in more than a folder, having
different authors.
To that end, I added to my RDF the specification of a class
"fileRequiringConflictCheck" a subclass of the class "file" and then
specified the following jena rule:
[ruleX:
(?file1 aa:processedIn ?fld2)
(?file1 aa:processedIn ?fld1)
notEqual(?fld1, ?fld2)
(?fld1 aa:createdBy ?auth1)
(?fld2 aa:createdBy ?auth2)
notEqual(?auth1, ?auth2)
->
(?file1 rdf:type aa:fileRequiringConflictCheck)
]
Outcome is that the rule is likely never met whenever expected as per my
sample dataset. Any idea what I might be missing ?
Looks reasonable, check your namespaces are correct. If you can't get it
working then post a minimal example of the data and someone might be
able to spot the problem.
Dave