RDF(S) & OWL TOOLS TopBraid Prepared by: Abdelrahman Abbas and Afaf Medani
TopBraid Composer
• TopBraid Composer is an enterprise-class modeling environment for developing Semantic Web ontologies and building semantic applications
• Fully compliant with W3C standards.
• offers comprehensive support for developing, managing and testing configurations of knowledge models and their instance knowledge bases
TopBraid Composer
• is the leading industrial-strength RDF editor and OWL ontology editor, as well as the best SPARQL tool on the market.
• Composer comes in 3 editions:
– Free (limited free version),
– Standard and
– Maestro.
Becoming familiar with TBC
• The TBC user interface is a collection of “views” or application windows.
• Each view has a tab showing its name and a set of view-specific icons
• It has 9 menus containing all TBC commands
The Navigator
• shows the projects and files in the Eclipse
workspace.
• You will see at least 5 projects that are automatically installed with TBC-ME.
Classes View
• Classes, Properties and Associations views display the hierarchies of the current model
Properties View
• Shows Properties of Current Model (RDF/Ontology Model)
Delete Property
Create Property
Show Menu
Max/Mini
Resource Editor
• is the main work area.
• When you open an RDF/OWL graph and navigate around, it will show the currently selected resource: – It includes tabs for a Form, Graph and Source
Code
– When selected resource is a class, there is also a Diagram tab
– When selected resource is an ontology, there are tabs for Statistics and Overview
Imports
• shows the imports of the ontology (hierarchically)
Import Local files
Import from URL
Remove selected import
Download
Instances
• Instances shows members of the class selected in the Classes view
Instances Create Instance Delete Instance
Domain
• Domain shows all properties in a domain of the currently selected class (or the most recently selected class, if the current resource is not a class)
Relevant Properties
• Relevant Properties shows a list of properties that are likely to be used for the selected Resource
SPARQL
• SPARQL provides an interface to create, execute and manage SPARQL queries
Query Statement
Results
Run Query
Start with Example (Ahmed Family)
Mona Ahmed
Ibrahim Maha
1
3 4 2
5 6
1
2
3
4
5
6
Wife Of
Husband Of
Father Of
Mother Of
Daughter Of
Son Of
Mona Ahmed
Wife Of
Husband Of
Mona Ahmed
Wife Of
Mona
Husband Of
2 DRF statements:(Subject-Predicate-Object) 1. Mona – wifeOf – Ahmed 2. Ahmed – HusbandOf - Mona
Extracting RDF Statements (Triples)
Other RDF Statements (Triples)
Object Predicate Subject
Ibrahim FatherOf Ahmed
Maha FatherOf Ahmed
Ibrahim MotherOf Mona
Maha MotherOf Mona
Ahmed SonOf Ibrahim
Mona SonOf Ibrahim
Ahmed DaughterOf Maha
Mona DaughterOf Maha
Classes
• Classes provide an abstraction mechanism for grouping resources with similar characteristics.
Classifying Objects
• Ahmed+ Ibrahim Belongs to Male Class
• Mona +Maha Belongs to Female Class
• Male + Female Classes Belong to Person Class
Female Male
Person
Creating Classes
• Before Creating Class we must create a NEW project (SimpleFamily) and RDF/OWL file.
• We will create three classes:
– Person
• Male
• Female
Creating Classes
• Before creating we will change class view to start hierarchy with owl : thing
• To create class : – Go to class view.
– Select owl : thing • Either right click and “create subclass”
• Or click create subclass Icon.
– Change class name in the dialog box
– Press Ok
Properties:
• Properties represent connections between an RDF resource and either another resource or a literal.
• There are two main types of properties in OWL:
– Object properties and
– Datatype properties
Properties:
Person XSD:String ❷ HasName
Mona Ahmed
❶ Wife Of
❶Object properties link a resource to a resource. ❷Datatype properties link a resource to a literal.
•Literals are XML Schema Datatype values such as strings and integers.
Classifying Properties
Type Property
Data Type HasName
Object Property FatherOf
Object Property MotherOf
Object Property SonOf
Object Property DaughterOf
Object Property WifeOf
Object Property HusbandOf
Determine Domain & Range
Range Domain Property
String Person HasName
Integer Person Age
Male and Female Male FatherOf
Male and Female Female MotherOf
Male and Female Male SonOf
Male and Female Female DaughterOf
Male Female WifeOf
Female Male HusbandOf
Instances (individuals)
• Instances are members of classes
• We have Four instances in our Example:
– Mona
– Maha
– Ahmed
– Ibrahim
Mona Ahmed
Ibrahim Maha
1
3 4 2
5 6
Creating Instances
• To create instance of specific class :
– Select the class from class View(2click)
– Select instance tab(Bottom tabs)
– Use to create and delete instances
Repeat for Others
Assign Properties value to Instance
• To assign values:
– Select instance from instance tab(2click)
– In resource form change properties values
Querying Data
• Now we will try to query this simple Ontology
– Use Default query
– Query for :
• Information of each member individually
• Who is father of Ibrahim and Maha
• Who is Mother of Ibrahim and Maha
• Full Name for every Body
• …….