next up previous contents
Next: Rule for rdf:type Up: Corese RDF Query and Previous: Features   Contents

Examples

The following rule states that a person member of an organization and interested in a given subject implies the organization is interested in this subject too.

<cos:rule>
 <cos:if>
   ?x rdf:type c:Person
   ?x c:isMemberOf ?org
   ?x c:isInterestedBy ?topic
 </cos:if>
 <cos:then>
   ?org c:isInterestedBy ?topic
 </cos:then>
</cos:rule>

The following rule states that a person author of a thesis on a given subject is an expert of this subject.

<cos:rule>
 <cos:if>
    ?p rdf:type s:Person
    ?p s:hasCreated ?doc
    ?doc rdf:type s:Thesis
    ?doc s:concern ?s
 </cos:if>
 <cos:then>
    ?p s:isExpertIn ?s
 </cos:then>
</cos:rule>



Subsections

Olivier Corby 2005-07-01