Vous êtes sur la page 1sur 20

OWL 2 in use

OWL 2

OWL 2 is a knowledge representation language, designed to


formulate, exchange and reason with knowledge about a
domain of interest.
The basic notions of OWL 2 are:
Axioms: the basic statements that an OWL ontology
expresses
Entities: elements used to refer to real-world objects
Expressions: combinations of entities to form complex
descriptions from basic ones
We can also draw consequences from knowledge
Reasoners tools that can automatically compute
consequences.

PathoNGenTrace REST API workshop,


January 2013

Classes and Instances

In general classes are used to group individuals that have


something in common in order to refer to them.
classes essentially represent sets of individuals.
classes
Isolate

rdf:type
0021/84

PathoNGenTrace REST API workshop,


January 2013

Species
Ontology
Level
Data Level

instance
s
rdf:type
Neisseria_m
eningitidis

Classes and Instances

In general classes are used to group individuals that have


something in common in order to refer to them.
classes essentially represent sets of individuals.

Class Isolate
< ow l:Class rdf:about= "http://rest.phyloviz.net/ontology# Isolate">

Individual Neisseria_meningitidis
< ow l:N am edIndividual
rdf:about= "http://rest.phyloviz.net/ontology# N eisseria_m eningitidis">
< rdf:type rdf:resource= "http://rest.phyloviz.net/ontology# Species"/>
< /ow l:N am edIndividual>

PathoNGenTrace REST API workshop,


January 2013

Class Hierarchies

In OWL 2, this is done by a so-called subclass axiom:

< ow l:Class rdf:about= "http://rest.phyloviz.net/ontology# M LST">


< rdfs:subClassO f rdf:resource= "http://rest.phyloviz.net/ontology# M ultiLocus"/>
< /ow l:Class>

MultiLocus
subClassOf

What can be inferred with respect to


Individuals?

MLST

Subclass relationship between classes is transitive e reflexive


Do we have examples of transitivity in typon?

PathoNGenTrace REST API workshop,


January 2013

Equivalence and Disjoint Classes

Equivalence: classes may effectively refer to the same sets


of individuals.
Disjointness: defines an incompatibility relationship
between classes.

< ow l:Class rdf:about= M ultiLocus">


< ow l:equivalentClass rdf:resource= m ulti_locus"/>
< /ow l:Class>

Are these classes


disjoint?

SingleLocus

MultiLocus

MLST

ccrBTypin
g

emmTypin
g
spaTyping

PathoNGenTrace REST API workshop,


January 2013

Object Properties

Specify how the individuals relate to other individuals.


Order in which the individuals are written is important.

< ow l:O bjectProperty


rdf:about= http://rest.phyloviz.net/ontology# belongsToSpecies>
< /ow l:O bjectProperty>

And what is the order?


< rdf:D escription rdf:about= "0021/84">
< belongsToSpecies rdf:resource= N eisseria_m eningitidis"/>
< /rdf:D escription>
< rdf:D escription rdf:about= "N eisseria_m eningitidis">
< belongsToSpecies rdf:resource= 0021/84"/>
< /rdf:D escription>
PathoNGenTrace REST API workshop,
January 2013

Domain and Range Restrictions


Two axioms for defining the domain and range of properties (object or
data)
< ow l:O bjectProperty
rdf:about= "http://rest.phyloviz.net/ontology# belongsToSpecies">
< rdfs:range rdf:resource= "http://rest.phyloviz.net/ontology# Species"/>
< rdfs:dom ain rdf:resource= "http://rest.phyloviz.net/ontology# Isolate"/>
< /ow l:O bjectProperty>

Having these two axioms and also


< rdf:D escription rdf:about= "0021/84">
< belongsToSpecies rdf:resource= N eisseria_m eningitidis"/>
< /rdf:D escription>

What the reasoner can infer?


PathoNGenTrace REST API workshop,
January 2013

Equality and Inequality of Individuals

OWL does not make the assumption that different names


are names for different individuals.

< rdf:D escription rdf:about= N eisseria_m eningitidis">


< ow l:diff
erentFrom rdf:resource= H om o_sapiens"/>
< /rdf:D escription>
< rdf:D escription rdf:about= H om oSapiens">
< ow l:sam eAs rdf:resource= H om o_sapiens"/>
< /rdf:D escription>

PathoNGenTrace REST API workshop,


January 2013

Datatype properties

These properties relate individuals to data values (instead


of to other individuals), and many of the XML Schema
datatypes can be used.
Domain and range can also be stated for datatype
properties as it is done for object properties

< ow l:D atatypeProperty rdf:about= "http://rest.phyloviz.net/ontology# ST">


< rdfs:dom ain rdf:resource= "http://rest.phyloviz.net/ontology# M LST"/>
< rdfs:range rdf:resource= "& xsd;string"/>
< /ow l:D atatypeProperty>

PathoNGenTrace REST API workshop,


January 2013

10

Advanced Class Relationships


-- Complex Classes

Named classes, properties, and individuals can be used as building


blocks to define new classes
Intersection of two classes consists of exactly those individuals
which are instances of both classes
Union of two classes contains every individual which is
contained in at least one of these classes.
Complement of a class corresponds to logical negation.

Does Typon has examples using this constructors?

PathoNGenTrace REST API workshop,


January 2013

11

Advanced Class Relationships


-- Complex Classes
Union
< ow l:O bjectProperty rdf:about= "http://rest.phyloviz.net/ontology# belongsToSpecies">
< rdfs:range rdf:resource= "http://rest.phyloviz.net/ontology# Species"/>
< rdfs:subPropertyO f rdf:resource= "& ow l;topO bjectProperty"/>
< rdfs:dom ain>
< ow l:Class>
< ow l:unionO f rdf:parseType= "C ollection">
< rdf:D escription rdf:about= "http://rest.phyloviz.net/ontology# G ene"/>
< rdf:D escription rdf:about= "http://rest.phyloviz.net/ontology# H ost"/>
< rdf:D escription rdf:about= "http://rest.phyloviz.net/ontology# Isolate"/>
< /ow l:unionO f>
< /ow l:Class>
< /rdfs:dom ain>
< /ow l:O bjectProperty>

PathoNGenTrace REST API workshop,


January 2013

12

Advanced Class Relationships


-- Property Restrictions

Existential quantification: defines a class as the set of all


individuals that are connected via a particular property to another
individual which is an instance of a certain class

Does Typon has examples of this restriction?


Lets think about the object property hasSpecies.
< ow l:Restriction>
< ow l:onProperty rdf:resource= "http://rest.phyloviz.net/ontology# hasSpecies"/>
< ow l:som eValuesFrom rdf:resource= "http://rest.phyloviz.net/ontology# Species"/>
< /ow l:Restriction>

PathoNGenTrace REST API workshop,


January 2013

13

Advanced Class Relationships


-- Property Restrictions

Universal quantification: describe class of individuals for which all


related individuals must be instances of a given class.
Typon does not have this kind of restriction.

PathoNGenTrace REST API workshop,


January 2013

14

Advanced Class Relationships


-- Property Restrictions

Cardinality restrictions: to specify the number of individuals


involved in the restriction.

Does Typon has examples of this restriction?


Lets think about the object property isOfGene.

< ow l:Class rdf:about= "http://rest.phyloviz.net/ontology# Locus">


//.. .
< rdfs:subClassO f>
< ow l:Restriction>
< ow l:onProperty rdf:resource= "http://rest.phyloviz.net/ontology# isO fG ene"/>
< ow l:onC lass rdf:resource= "http://rest.phyloviz.net/ontology# G ene"/>
< ow l:qualifi
edC ardinality rdf:datatype= "& xsd;nonN egativeInteger"> 1
< /ow l:qualifi
edCardinality>
< /ow l:Restriction>
< /rdfs:subClassO f>
< /ow l:C lass>
PathoNGenTrace REST API workshop,
January 2013

15

Advanced Use of Properties


-- Property Restrictions

Inverse property (inverseOf): one property is obtained by taking


another property and changing its direction.

Typon
has this kind of
Functional Does
property
(FunctionalProperty):
every individual can be
restriction?
linked by the
property to at most one other individual.

Does Typon
has this
kind of
Inverse Functional
property
(InverseFunctionalProperty):
the
inverse of restriction?
the property is also functional

Symmetric Does
property
(SymmetricProperty):
the property and its
Typon
has this kind of
inverse coincide
.
restriction?
Asymetric property (AsymetricProperty): if the property connects
entity A with entity B, then it can never connect B with A.
Does Typon has these kind of
restrictions?

And more
Disjoint
Reflexive
Irreflexive
Transitive

PathoNGenTrace REST API workshop,


January 2013

16

RDF Schema: Language

Primitives of RDF(S)
Resources:
rdfs:Class - denotes sets of resources
rdf:Property the class of resources that links
resources
Properties:
rdf:type
rdfs:subClassOf
rdfs:subPropertyOf
rdfs:domain
rdfs:range

PathoNGenTrace REST API workshop,


January 2013

17

OWL Syntax
OWL is an extension of RDF - S
OWL primitives are related with RDF-S primitives
Ex: owl:Class rdfs:Class

Equivalences, disjunctions and classes boolean


expressions:
Though specific properties in rdfs:Class ou rdf:Property
(como rdf:subclassOf)
Boolean expressions such as:owl:unionOf,
owl:complementOf, owl:intersectionOf
Element
Equivalence
Disjunction
class

owl:equivalentClass

property

owl:equivalentProperty

individual

owl:sameAs

PathoNGenTrace REST API workshop,


January 2013

owl:disjointWith
owl:differentFrom

18

Relating Ontologies

Gene

GeoRefere
nce

Importing
other ontologies
for reusing is a good
practice. Since
-> A shared
representation is
essential for success
in communication
and interoperability
PathoNGenTrace REST API workshop,
January 2013

Possibly equivalent
equivalence

Gene

partOf

equivalence

Geographic
Information

Gene

GeoRefere
nce

19

OWL 2 profile

OWL 2 profiles (commonly called a fragment or a


sublanguage in computational logic) is a trimmed down
version of OWL 2 that trades some expressive power for the
efficiency of reasoning.
OWL 2 EL
OWL 2 QL
OWL 2 RL
OWL 2 DL
OWL 2 Full

PathoNGenTrace REST API workshop,


January 2013

20

Vous aimerez peut-être aussi