RULESET "examples of Jena3 rules" PREFIX eg: { RULE "if it has a number plate, it's a vehicle" { ?x eg:hasNumberPlate ?p } => { ?x a eg:Vehicle } RULE "collaborations have multiple (distinct) authors" { ?work eg:hasAuthor ?a, ?b FILTER (?a != ?b) } => { ?work a eg:Collaboration } RULE "count ancient collaborations as classics" { ?work a eg:Collaboration; eg:publicationDate ?d FILTER (years(?d) < years(today()) - 50) } => { ?work a eg:Classic } RULE "spot a problem: collaborations can't be vehicles" { ?x a eg:Collaboration, eg:Vehicle } => { ?x eg:hasProblem "oops: both Collaboration and Vehicle" } RULE "count the number of problematic items" { ALL ?item. {?item eg:hasProblem ?p} } => { LET ?n = count(?item) [eg:problemCount ?n] } }