Top Banner
RDF(S) & OWL TOOLS TopBraid Prepared by: Abdelrahman Abbas and Afaf Medani
41

RDFS and OWL with TopBraid

Jan 30, 2023

Download

Documents

Khalid Alsadig
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: RDFS and OWL with  TopBraid

RDF(S) & OWL TOOLS

TopBraid

Prepared by:

Abdelrahman Abbas and Afaf Medani

Page 2: RDFS and OWL with  TopBraid

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

Page 3: RDFS and OWL with  TopBraid

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.

Page 4: RDFS and OWL with  TopBraid

S P O

RDF

RDFS OWL SPARQL

Query

Page 5: RDFS and OWL with  TopBraid

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

Page 6: RDFS and OWL with  TopBraid
Page 7: RDFS and OWL with  TopBraid

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.

Page 8: RDFS and OWL with  TopBraid

Classes View

• Classes, Properties and Associations views display the hierarchies of the current model

Page 9: RDFS and OWL with  TopBraid

Classes View

Page 10: RDFS and OWL with  TopBraid

Properties View

• Shows Properties of Current Model (RDF/Ontology Model)

Delete Property

Create Property

Show Menu

Max/Mini

Page 11: RDFS and OWL with  TopBraid

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

Page 12: RDFS and OWL with  TopBraid
Page 13: RDFS and OWL with  TopBraid

Imports

• shows the imports of the ontology (hierarchically)

Import Local files

Import from URL

Remove selected import

Download

Page 14: RDFS and OWL with  TopBraid

Instances

• Instances shows members of the class selected in the Classes view

Instances Create Instance Delete Instance

Page 15: RDFS and OWL with  TopBraid

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)

Page 16: RDFS and OWL with  TopBraid

Relevant Properties

• Relevant Properties shows a list of properties that are likely to be used for the selected Resource

Page 17: RDFS and OWL with  TopBraid

SPARQL

• SPARQL provides an interface to create, execute and manage SPARQL queries

Query Statement

Results

Run Query

Page 18: RDFS and OWL with  TopBraid

Basket

• Basket can be used as a flexible drag-and-drop area for many purposes

Page 19: RDFS and OWL with  TopBraid

Simple Family Tree Tutorial

Tutorial One

Page 20: RDFS and OWL with  TopBraid

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

Page 21: RDFS and OWL with  TopBraid

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)

Page 22: RDFS and OWL with  TopBraid

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

Page 23: RDFS and OWL with  TopBraid

Classes

• Classes provide an abstraction mechanism for grouping resources with similar characteristics.

Page 24: RDFS and OWL with  TopBraid

Classifying Objects

• Ahmed+ Ibrahim Belongs to Male Class

• Mona +Maha Belongs to Female Class

• Male + Female Classes Belong to Person Class

Female Male

Person

Page 25: RDFS and OWL with  TopBraid

Creating Classes

• Before Creating Class we must create a NEW project (SimpleFamily) and RDF/OWL file.

• We will create three classes:

– Person

• Male

• Female

Page 26: RDFS and OWL with  TopBraid

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

Page 27: RDFS and OWL with  TopBraid

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

Page 28: RDFS and OWL with  TopBraid

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.

Page 29: RDFS and OWL with  TopBraid

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

Page 30: RDFS and OWL with  TopBraid

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

Page 31: RDFS and OWL with  TopBraid

Creating Properties

Page 32: RDFS and OWL with  TopBraid

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

Page 33: RDFS and OWL with  TopBraid

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

Page 34: RDFS and OWL with  TopBraid

Assign Properties value to Instance

• To assign values:

– Select instance from instance tab(2click)

– In resource form change properties values

Page 35: RDFS and OWL with  TopBraid

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

• …….

Page 36: RDFS and OWL with  TopBraid

Mona’s information

Information of each member individually

Ahmed’s information

Page 37: RDFS and OWL with  TopBraid

Information of each member individually

Maha’s information

Ibrahim’s information

Page 38: RDFS and OWL with  TopBraid

Who is Maha’s mother Who is Ibrahim’s mother

Who is Maha’s Father Who is Ibrahim’s Father

Who is?

Page 39: RDFS and OWL with  TopBraid

Full Name for every Body

Page 40: RDFS and OWL with  TopBraid

Find Specific Value

Oldest Person

Smallest Person

Page 41: RDFS and OWL with  TopBraid

Summation of ages

Age Grater Than 30

Find Specific Value