The RDF built-in library is one of the SWRLTabBuiltInLibraries. It contains a small initial set of built-ins for dealing with RDF. This library will soon be expanded. (B1U)
The built-ins in this library are defined by the RDFB Ontology. The default prefix is rdfb. A copy of this file can also be found the standard Protege-OWL repositories, and can be imported through the 'Import Ontology' option in the Metadata tab. (B1V)
The following are the methods defined by this library: (B1W)
- hasLabel Returns true if the OWL class, property, or individual named by the first argument has a label identified by the second argument. If the second argument is unbound, bind it to label(s) of the resource. E.g., hasLabel(?c, ?label). (B1P)
- hasLabelLanguage Returns true if the OWL class, property, or individual named by the first argument has a label language identified by the second argument. If the second argument is unbound, bind it to label language(s) of the resource. E.g., hasLabelLanguage(?c, ?language). (B1Q)
Examples (B1X)
The following examples show how these built-ins can be used in SQWRL queries. These queries can be executed using either the SQWRLQueryTab or the SQWRLQueryAPI. (B1R)
List the label(s) (if any) for every individual of class Person in an ontology: (B1S)
- Person(?p) ^ rdfb:hasLabel(?p, ?l) -> sqwrl:select(?p, ?l) (B1T)