4. Making ontologies: theoretical basics and instructions
5. Ontologies’ functionality and software
Let us consider how we can apply our “Pets” ontology. There many options and possibilities:
Querying: This ontology enables querying for information based on the structured model it defines. For example, one could query for all instances of Dog, pets owned by John, or pets that are older than a certain age.
Reasoning: Using a reasoner, the ontology can infer new information that isn't explicitly stated but is implied by the ontology's structure and instances. For example, if Bella is stated to be a Dog and Dog is a subclass of Pet, the reasoner can infer that Bella is also a Pet.
Integration and Interoperability: This ontology can serve as a common model for representing pets and ownership information in various systems, facilitating data sharing and integration across different platforms that understand OWL.
In summary, the ontology functions as a formal, explicit specification of a shared conceptualization of the ‘Pets’ domain. It enables automated reasoning about pets, their characteristics, and their relationships with owners, supporting tasks like information retrieval, data integration, and semantic web services.
In software or formal representation (like OWL or RDF), this ontology would involve defining classes for each concept, properties for the attributes of these classes, and relationships as predicates connecting instances of the classes. Here's a simplified example in a generic syntax:
This ontology, when implemented in an OWL-compatible software tool like Protégé, functions as a structured representation of knowledge about pets, their owners, and the relationships between them. It defines a model for understanding how pets are categorized, their properties, and their associations with human owners within a given domain.
Ontologies can be visualised, as we see in the example below:
Codes can be used to create a diagram based on ontology. For example, to create a class diagram in Draw.io format based on our ‘Pets’ specification, we can translate the given class diagram syntax into XML code that Draw.io can interpret. This code will include the classes Pet, Dog, Cat, Bird, Owner, and instances such as Bella, Whiskers, Tweety, John, and Jane, along with their relationships:
This XML represents a basic structure for our class diagram including classes and their relationships. To visualize the provided Draw.io XML code, follow these steps:
1) Open Draw.io: Go to the Draw.io website or open the Draw.io application if you have it installed.
2) Start a New Diagram: If prompted, choose to create a new diagram or open an existing one. For this purpose, starting with a blank diagram is recommended.
3) Access Edit Diagram: Navigate to the Extras menu on the top menu bar and select Edit Diagram from the dropdown menu.
4) Paste the XML Code: In the text field that appears, delete any existing code and paste the XML code provided earlier.
5) Apply Changes: Click "OK" or the corresponding button to apply the changes. The diagram should now render on the screen according to the XML code's specifications.
6) Adjust as Needed: You can manually adjust the diagram's elements (e.g., moving shapes, changing text) directly in Draw.io for finer control over the appearance and layout.
This process converts the XML code into a visual diagram, allowing you to see the class structure, relationships, and other details as specified in the XML.
To create an ontology for a "Wedding" in Draw.io XML format, we'll define several key concepts and their relationships within the context of a wedding. This ontology will include elements like Couple, Guest, Venue, Event, and Vendor, among others, to represent a simplified structure of the relationships and entities involved in a wedding.
Here's an example of how this might be represented in Draw.io XML code:
Here is a diagram based on the code