The SWRLTab provides a collection of Java APIs. These APIs can be used by developers who wish to work with SWRL rules in their applications. (AX4)
They include: (AWD)
- SWRL Rule Engine API A SWRL rule engine may be accessed using the SWRLRuleEngineAPI. It provides mechanisms to create programatically SWRL rule engines and to interact with them. (AWE)
- SQWRL Query API This API provides a JDBC-like Java interface to retrieve the result of SQWRL queries. It is documented here. (AB7)
- SWRL Factory The factory provides a Java API that support the creation and modification of SWRL rules in an OWL ontology. See the SWRL Factory FAQ for more details. (AB8)
- SWRL Built-in Bridge SWRL built-ins are user-defined predicates that can be used in SWRL rules. The built-in bridge API provides a mechanism to define Java implementations of SWRL built-ins. These implementations can then be dynamically loaded by the bridge and invoked from a rule engine. (AB4)
- SWRL Bridge The bridge provides the infrastructure necessary to incorporate rule engines into Protege-OWL to execute SWRL rules. See the SWRL Rule Engine Bridge FAQ for more details. The hope is that bridges for other rule engines will be developed by the Protege-OWL community and than an array of inference mechanism will become available for executing SWRL rules. (AB2)
Downloading and Building the APIs (CFF)
In Protege 3.4.8 and earlier, SWRLTab APIs are part of Protege-OWL SWRLTab and their source code is bundled with the Protege-OWL source code. Information on downloading and building these APIs can be found here. Instructions for building these APIs in 3.5 or later can be found here. (CHE)
Accessing Protege's Repository Mechanism (CB2)
Protege provides a repository mechanism to store local copies of commonly-used ontologies. Many core ontologies used by the SWRLTab APIs are stored in this repository (e.g., temporal.owl, sqwrl.owl). A default repository that contains these ontologies is contained in the Protege installation directory. Application that use SWRLTab APIs and wish to use this default repository must indicate its location to their Java VM. To point a Java application to this default repository the protege.dir VM argument must be set (e.g., -Dprotege.dir="/C:/Program Files/Protege_3.4.8"). If this argument is not supplied, Protege will attempt load any non-local referenced ontologies from the Internet, which will obviously be problematic if the application is executed on a machine without Internet access. (CB4)