April 2009
Intermediate to advanced
646 pages
15h 30m
English
SWRL is an acronym for the Semantic Web Rule Language. This appendix presents several examples of SWRL and covers the namespaces, built-ins, and keywords in alphabetical order, which are part of the SWRL submission. In the case of keywords, a short description is given. A page number is listed if a keyword or example is described in finer detail in the book, and a reference URL is provided to obtain additional information from the W3C Submission.
Figure C-1 shows an example of deconstructed SWRL code in RDF concrete syntax. It is followed by another example in RDF concrete syntax as well as in Turtle.

Figure C.1. A deconstructed SWRL sample in RDF concrete syntax
<swrl:Imp rdf:about="http://www.semwebprogramming.com/dislikeRoseGrowingNeighborsRule">
<swrl:body>
<swrl:AtomList>
<rdf:first>
<rdf:Description>
<rdf:type rdf:resource="&swrl;ClassAtom"/>
<swrl:argument1>
<rdf:Description rdf:about="#n"/>
</swrl:argument1>
<swrl:classPredicate
rdf:resource="#Neighbor"/>
</rdf:Description>
</rdf:first>
<rdf:rest>
<swrl:AtomList>
<rdf:first><rdf:Description> <rdf:type rdf:resource="&swrl;ClassAtom"/> <swrl:argument1> <rdf:Description rdf:about="#r"/> </swrl:argument1> <swrl:classPredicate rdf:resource="#Rose"/> </rdf:Description> </rdf:first> <rdf:rest> <swrl:AtomList> <rdf:first> <rdf:Description> <rdf:type rdf:resource= "&swrl;IndividualPropertyAtom"/> ...
Read now
Unlock full access