Semantic Web, Part 3: From Model to Database
...
Protégé is a highly mature and one of the most frequently used free tools for modeling ontologies. Maintained by Stanford University, it is freely available on their website [3]. The software has established itself as a modeling tool whose generated models in various formats are supported by all W3C-compliant semantic databases.
...
Protégé clearly positions itself as a technical, UI-oriented modeling tool, leaving both operational use and programmatic data management to database and app vendors.
...
It's important to know that both Range and Domain axioms (see [2]) have a global effect when defined directly for properties, with corresponding implications for the ontology.
...
Specifying Classes and Properties
...
For object properties, the same principles apply. The important difference is that the Restriction Filler in the right area offers a class in the taxonomy (the class hierarchy) for selection instead of data types. The specification of cardinality affects object properties in the same way as data properties.
...
With classes and their restrictions set up, it's time to create individuals, the actual data records in the ontology. In Protégé, switch to the "Individuals by class" tab and the "Direct Instances" area at the bottom left. It shows all existing individuals of the selected class, as shown in Image 4 for the Product class.
...
Note that in the dotnetpro example ontology for this article [5], all products are labeled, and the Protégé renderer displays these labels in the screenshot. Hovering the mouse over an item shows its full IRI in the tooltip.
...
A good practice for assigning IRIs to individuals is to combine the class name with a UUID, a kind of primary key for the corresponding resource. Fortunately, Protégé supports generating IRIs with UUIDs quite conveniently.
...
...
To create a new individual, click the Add button above the list and then on "New Entity Options". Protégé offers a wizard to configure the IRI assignment. Choose "Auto-generated ID" and enter the desired prefix for the IRI, such as "Product_". As you enter a name for the new individual, Protégé creates a new UUID with each typed letter and appends it to the chosen prefix.
...
treated as data and can be queried and manipulated via SPARQL. Reasoners do not consider annotations.
...
To create an annotation for an entity, select it in the left area of the Protégé UI. Its annotations then appear in the "Annotations" tab on the right. Image 7 shows an example for the data property "purchasePrice", which already has two label and two comment annotations in German and English.
...
A particularly useful feature of Protégé for collaborating on ontologies in international teams is the configurable rendering of identifiers for all entities. You can determine whether to display the complete IRI, the named prefix notation, or an annotation in the UI - in the case of annotations, even in which language.
...
A good practice for documentation and international usability of ontologies is to provide at least one comment and one label annotation in English for each class, property, and individual, ideally also in other languages depending on the team's distribution or the target audience's scope.
...
Data Properties versus Annotations
...
Protégé is a mature tool for modeling ontologies and an indispensable assistant in creating and maintaining W3C-compliant semantic data models and ontologies. It offers useful functions for managing classes, taxonomies, properties, and constraints in a developer-friendly and configurable UI, without having to worry about the underlying RDF, RDFS, and OWL triples and their diverse representations in various file formats.
The next article in this series will show how to set up and operate a semantic graph database, as well as how to comfortably manage data and knowledge in it and make it available for applications. Stay tuned!
References
[1] Alexander Schulze, Working with Knowledge Instead of Data, Semantic Web Part 1, dotnetpro 4/2020, page 78 ff., http://www.dotnetpro.de/A2004Semantik
[2] Alexander Schulze, The Model Comes First, Semantic Web Part 2, dotnetpro 5/2020, page 96 ff., http://www.dotnetpro.de/A2005Semantik
[3] Protégé, https://protege.stanford.edu
[4] Wikipedia, SHACL, http://www.dotnetpro.de/SL2006Semantik1
[5] GitHub Enapso dotnetpro Repository, http://www.dotnetpro.de/SL2006Semantik2Alexander Schulze, CEO of Innotrade GmbH, is an expert in semantic data management and business analytics. As an IT consultant, speaker, and author, he regularly reports on AI and knowledge management and their benefits. aschulze@innotrade.de