top of page

Creating a Custom Rules View Tab

  • Writer: Michael DeBellis
    Michael DeBellis
  • Aug 28, 2023
  • 2 min read

Updated: Sep 28, 2023

Note: There was a problem with the link to the PDF for the tutorial below. It worked for me because I owned the file but for others since somehow it ended up in the trash, they couldn't see it. So if you tried and couldn't get it, check now and it should work.


One of my regrets about the Revised Protégé Pizza tutorial is that in the section on SWRL I only discussed the SWRLTab. The SWRLTab is excellent but for some use cases the Rules view is superior. E.g., if your ontology uses codes for IRIs the way the ontologies of the OBO foundry do, you definitely should use the Rules view rather than the SWRLTab. However, since it is a view not a tab and it isn't part of any of the standard Protégé tabs it is easy to miss the Rules view. This mini-tutorial will show you how to create your own custom Rules View tab. This will be useful for use cases where you need the Rules view and also will enable you to create your own custom tabs to take advantage of the many Views that are part of Protégé but that aren't included in any of the default tabs.


The problem I chose was to extend the Basic Formal Ontology (BFO) with the interval relations from the Allen Temporal model. BFO provides the foundation for all the Allen relations but doesn't include most of them. My original idea was just to use BFO as an example of the kind of ontology where one could use this SWRL Rules view tab. However, once I started, I realized it wouldn't take much work to add rules for the complete Allen model.


The PDF for the tutorial is at: https://tinyurl.com/SWRL-View-Tab


The ontology to start the tutorial is the The Basic Formal Ontology with properties added to define the Allen operators but not the rules is at: https://tinyurl.com/BFO-Allen-No-Rules


The GitHub site for the complete extension of BFO with the Allen properties and rules is: https://github.com/mdebellis/BFO-Allen-Model


At the suggestion of Robert Rovetto, I also implemented the rules for the W3C Time Ontology. That has a bit of an issue, because the Time ontology only supports xsd:dateTimeStamp and for some reason SWRL only supports xsd:dateTime I don't understand why they both don't just support them both, I can't see any good reason not to. The odd thing is that for the examples I created SWRL seems to work with the xsd:dateTimeStamps (at least with Pellet) but it doesn't work for the W3C Time ontology test data. So still some bugs but for those interested in the W3C Time ontology here is my github repository for that ontology with SWRL rules to implement the Allen relations: Time Ontology with SWRL rules.


4 Comments


ZVirginiaZaider
Jun 03

The HODINKEE Shop link is an authorized retailer of Vacheron Constantin link and link Tissot, and sells the latter's PRX with integrated bracelet. It also sells vintage and pre-owned Patek Philippe and Audemars Piguet watches. To view our selections, visit the Shop.

Like

ZVirginiaZaider
May 30

In the most-read piece link of 2017, Jack breaks down the reason why link Audemars Piguet, Patek Philippe, link and Vacheron Constantin are considered in a league of their own. Perhaps our columnist's next assignment will be a visit to the Patek Philippe boutique.

Like

IYolandapYannip
May 13

Quesada's watches are diverse, filled mostly with vintage pieces with one modern one thrown in for good measure. But of course, his Four + One link wouldn't be complete without link a certain instrument that's become deeply special to him. Please enjoy the link collection of Adrian Quesada.

Like

Guest
Sep 06, 2023

FYI, the PDF for the tutorial says that it is in your Google Drive trash so it can't be shown. Thanks for the great information!

Like
  • facebook
  • linkedin

©2019 by Michael DeBellis. Proudly created with Wix.com

bottom of page