owl – part ii. owl:equivalentproperty already we have learned about asserting that two properties...

49
OWL – Part II

Upload: spencer-welch

Post on 29-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

OWL – Part II

Page 2: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

owl:equivalentProperty

Already we have learned about asserting that two properties behave in the same way

To make two properties equivalent, we do similarly as we did to make two classes equivalent (used rdfs:subclassOf). Here, we use rdfs:subPropertyOf both ways or use owl:equivalentProperty

For example, make the folds and buckles properties equivalent:

 struc : folds rdfs : subPropertyOf :buckles.struc : buckles rdfs : subPropertyOf struc:folds.

or, use owl:equivalentProperty: struc:folds owl:equivalentProperty struc : buckles.

folds

buckles

owl:equivalentProperty

Page 3: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

Example The process of Shortening folds the Bedding structure The above diagram infers that any triple using the

‘folds’ property, can use its equivalent ‘buckles’ property!

struc:Shortening struc:folds struc:Bedding.struc:Shortening struc:buckles struc:Bedding.   Note that the equivalent property is a symmetric

property

owl:equivalentProperty rdf:type owl:symmetricProperty 

Shortening

buckles

foldsBedding

equivalentProperty

Page 4: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

Combining Properties  When we write procedures for example for a laboratory

experiment or workflow management, or model a geological process, we commonly combine several types of properties, e.g., inverseOf, transitiveProperty, subPropertyOf

In such cases, some activities may depend on the completion of others

For example, making thin section may require several steps (the workflow of which is listed below), each of which may depend on the completion of others.

Thin section preparation workflow:

Slice the rock specimen; square the slice into chip; polish the chip to fine grit; mount the chip to slide; cut and polish the section; and finally, mount the slide with cover slide

Page 5: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

Thin section preparation WorkflowSince these steps (see previous slide) are in

order, each step enables the next step, and each next step depends on, or requires, the previous step:

makeChip mountChippolishChip polishSection

putCoverSlidesliceSpecimen

dependsOn or requires

Start: follow Finish

enables or requiredFor

Page 6: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

:dependsOn owl:inverseOf :enables

:sliceSpecimen :enables :makeChip.

:makeChip :enables :polishChip.

:polishChip :enables :mountChip.

:mountChip :enables :polishSection.

:polishSection :enables :putCoverslide.

:dependsOn rdfs:subPropertyOf :requires.

:requires rdf:type owl:TransitiveProperty.

:enables rdfs:subPropertyOf :requiredFor.

:requiredFor rdf:type owl:TransitiveProperty From the above, we infer the following requirements for ‘mountChip’::mountChip :requires :polishChip;

:requires :makechip;

:requires :sliceSpecimen.

makeChip mountChippolishChip polishSection

putCoverSlidesliceSpecimen

dependsOn or requires enables or requiredFor

Page 7: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

OWL ClassOWL allows constructing complex classes using

restrictions of the properties of existing classes

OWL also includes:owl:disjointWith

owl:Thing

owl:Nothing

owl:equivalentClass

owl:oneOf

owl:intersectionOf

owl:union

owl:complementOf

Page 8: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

Declaring classes in OWLAn owl class is defined in two different long and short ways:

<rdf:Description rdf:about=":Fault"> <rdf:type><rdf:Description rdf:about="http://www.w3.org/2002/07/owl#Class"/></rdf:type>

</rdf:Description>

<rdf:Description rdf:about=":Liquid"> <rdf:type><rdf:Description rdf:about="http://www.w3.org/2002/07/owl#Class"/></rdf:type> <rdfs:subClassOf>

<rdf:Description rdf:about="http://www.w3.org/2002/07/owl#Thing"/> </rdfs:subClassOf>

</rdf:Description>

Or in short hand, using the owl:Class constructor

<owl:Class rdf:about=“ClassName”/>

or

<owl:Class rdf:ID=“ClassName”/>

Page 9: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

Owl uses the rdfs:subClassOfThis is used to create a class hierarchyNote: rdfs:subClassOf is transitive

<owl:Class rdf:about=“StrikeSlipFault”>

<rdfs:subClassOf rdf:resource=“Fault”/>

</owl:Class>

Every owl class is a subclass of the owl:Thing

Page 10: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

owl:disjointWithTwo classes can be declared to be disjoint if

they cannot have a common instanceThat is, if their intersection is empty

For example:

Solid and Liquid; Solid and GasInorganic and OrganicCrystalline and AmorphMineral and Gas, Mineral and Organic

Page 11: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

Definition: Mineral is a naturally occurring, inorganic, solid, crystalline substance with definite chemical composition.

We must allow inferring that Mineral be disjoint with amorph, artificial, gas, and organic substances!

Page 12: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

<rdf:Description rdf:about=":Mineral"> <rdf:type><rdf:Description rdf:about="http://www.w3.org/2002/07/owl#Class"/></rdf:type> <owl:disjointWith><rdf:Description rdf:about=":Amorph"/></owl:disjointWith> <owl:disjointWith><rdf:Description rdf:about=":Artificial"/></owl:disjointWith> <owl:disjointWith><rdf:Description rdf:about=":Gas"/></owl:disjointWith> <owl:disjointWith><rdf:Description rdf:about=":Organic"/></owl:disjointWith></rdf:Description>

<rdf:Description rdf:about=":Amorph"> <rdf:type><rdf:Description rdf:about="http://www.w3.org/2002/07/owl#Class"/></rdf:type></rdf:Description>

<rdfs:comment>Put the Artificial, Gas, and Organic classes here</rdfs:comment>

<rdf:Description rdf:about=":hasComposition"> <rdf:type><rdf:Description rdf:about="http://www.w3.org/2002/07/owl#DatatypeProperty"/></rdf:type> <rdfs:domain><rdf:Description rdf:about=":Mineral"/></rdfs:domain> <rdfs:range><rdf:Description rdf:about="http://www.w3.org/2001/XMLSchema#string"/></rdfs:range></rdf:Description>

Mineral class

Page 13: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

owl:Thing (Τ) and owl:Nothing ()OWL has two predefined classes:

owl:Thing and owl:Nothing

All individuals are members of the owl:ThingOwl:Thing is the top, most general class, and

represents the universe, which means all individuals are its instances

Owl:Nothing has no instance

Because the intersection of two disjoint sets is empty, it is represented by the owl:Nothing

Page 14: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

Intersection (п) of two disjoint classes, that subclass owl:Thing, is owl:Nothing

Page 15: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

<rdf:Description rdf:about=":Liquid"> <rdf:type><rdf:Description rdf:about="http://www.w3.org/2002/07/owl#Class"/></rdf:type> <rdfs:subClassOf><rdf:Description rdf:about="http://www.w3.org/2002/07/owl#Thing"/></rdfs:subClassOf> <owl:disjointWith><rdf:Description rdf:about=":Solid"/></owl:disjointWith></rdf:Description>

<rdf:Description rdf:about=":Solid"> <rdf:type><rdf:Description rdf:about="http://www.w3.org/2002/07/owl#Class"/></rdf:type> <rdfs:subClassOf>

<rdf:Description rdf:about="http://www.w3.org/2002/07/owl#Thing"/></rdfs:subClassOf> </rdf:Description>

<rdf:Description rdf:about=":MyNothing"> <rdf:type><rdf:Description rdf:about="http://www.w3.org/2002/07/owl#Class"/></rdf:type> <owl:intersectionOf rdf:parseType="Collection"> <rdf:Description rdf:about=":Solid"/> <rdf:Description rdf:about=":Liquid"/> </owl:intersectionOf> </rdf:Description>

Page 16: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

Set Equivalence () by owl:equivalentClass

 When we want to assert that two URIs refer to the same thing, we use owl:equivalentClass

<owl:Class rdf:about=“SaturatedZone”> <owl:equivalentClass rdf:resource=“ZoneOfSaturation”/></owl:Class>

:XRD owl:equivalentClass :XRayDiffraction.struc:Joint owl:equivalentClass struc:TensileFracture.

We can also make two classes to be equal if we make each a subclass of the other, for example, if we want to say that a joint is the same thing as a tensile fracture, we assert:

struc:Joint rdfs:subClassOf struc:TensileFracture.struc:TensileFracture rdfs:subClassOf struc:Joint.

Page 17: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

Inference for owl:equivalentClassA owl:equivalentClass B.x rdf:type Athenx rdf:type B

Moreover, from the rdfs:subClassOf property we additionally infer that the two classes have the same members:

 A rdfs:subClassOf B.x rdf:type B.thenx rdf:type A.   Notice that:owl:equivalentClass rdfs:type owl:SymmetricProperty.

A Bx x=y

Page 18: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

owl:oneOf x1,…, xn

The owl:oneOf construct allows defining a class by enumerating its member

Enumeration is a list of options that a user can select from

The list is usually exhaustive, like the list of planets, types of rock or minerals, or names of oceans

Page 19: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

Sun hasPlanet SolarPlanet and SolarPlanet is the enumeration:

{Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune}

Example (code on next slide)

Page 20: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

<rdf:Description rdf:about=":SolarPlanet"> <rdf:type><rdf:Description rdf:about="http://www.w3.org/2002/07/owl#Class"/></rdf:type> <owl:oneOf rdf:parseType="Collection"> <rdf:Description rdf:about=":Mercury"/> <rdf:Description rdf:about=":Venus"/> <rdf:Description rdf:about=":Earth"/> <rdf:Description rdf:about=":Mars"/> <rdf:Description rdf:about=":Jupiter"/> <rdf:Description rdf:about=":Saturn"/> <rdf:Description rdf:about=":Uranus"/> <rdf:Description rdf:about=":Neptune"/> </owl:oneOf></rdf:Description>

<rdfs:comment>Declare each planet as an instance of the SolarPlanet</rdfs:comment><rdf:Description rdf:about=":Mercury"> <rdf:type><rdf:Description rdf:about=":SolarPlanet"/></rdf:type></rdf:Description>

<rdfs:comment>Repeat this for all planets …</rdfs:comment>

<rdf:Description rdf:about=":Sun"> <rdf:type><rdf:Description rdf:about="http://www.w3.org/2002/07/owl#Class"/></rdf:type></rdf:Description>

<rdf:Description rdf:about=":hasPlanet"> <rdf:type><rdf:Description rdf:about="http://www.w3.org/2002/07/owl#ObjectProperty"/></rdf:type> <rdf:type><rdf:Description rdf:about="http://www.w3.org/2002/07/owl#FunctionalProperty"/></rdf:type> <rdfs:domain><rdf:Description rdf:about=":Sun"/></rdfs:domain> <rdfs:range><rdf:Description rdf:about=":SolarPlanet"/></rdfs:range></rdf:Description>

Page 21: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

Individuals (instances, objects) These are instances of physical or virtual types, i.e., same

type individuals are members of the same class

Any individual belongs to the owl:Thing class

An individual can belong to one or more classes

Individuals may be assigned to a class as follows:

<rdf:Description rdf:about=“InstanceName”><rdf:type rdf:resource=“ClassName”>

<rdf:Description>

Example:

<rdf:Description rdf:about=":Earth"><rdf:type rdf:resource=":SolarPlanet"></rdf:Description>

Page 22: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

Short form of class assignment Alternatively, we can instantiate a class as:

<ClassName rdf:about=“InstanceName”/>Example:

<Fault rdf:about=“SanAndreasFault”/>

Or, use the rdf:ID

<owl : Thing rdf:ID = “ZagrosFault”/><FOAF : Person rdf:ID = “Babaie”/>

Or, do it using rdf:type as shown on next slide! These statements assert that the ZagrosFault is

a Thing, and Babaie is a (has type) Person

Page 23: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

<rdf:Description rdf:about=":Mineral"> <rdf:type> <rdf:Descriptionrdf:about="http://www.w3.org/2002/07/owl#Class"/> </rdf:type></rdf:Description>

<rdf:Description rdf:about=":Mineral1"><rdf:type>

<rdf:Description rdf:about=":Mineral"/></rdf:type>

</rdf:Description>

Instantiating an individual

Page 24: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

Same Individuals (owl:sameAs) In many cases we want to assert that two individual things

are actually the same

For example, two samples with different numbers may be the same, or two faults with different assigned names may be the same fault

<Fault rdf:about=“SanAndreasFault”/>

<Fault rdf:about=“SanAndreasShearZone”/>

<rdf:Description rdf:about “SanAndreasFault”>

<owl:sameAs rdf:resource=“SanAndreasShearZone”/>

</rdf:Description> e.g., Zagros Fault, Zagros shear zone, Zagros Crush zone, Zagros Thrust

are the samegeochem:sample1 owl:sameAs struc:sample22.

tect:ZagrosFault owl:sameAs struc:ZagrosShearZone.

Page 25: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

Inference Notice that owl:sameAs is a symmetric property: owl:sameAs rdf:type owl:SymmetricProperty.

Therefore, we can infer that:

struc:sample22 owl:sameAs geochem:sample1.

struc:ZagrosShearZone owl:sameAs tect:ZagrosFault.

Page 26: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

owl:differentFromIs used to declare that individuals are mutually

different

It uses owl:distinctMembers and rdf:parseType=“Collection” to represent an exhaustive list

<owl:differentFrom>

<owl:distinctMembers rdf:parseType=“Collection”>

<Fault rdf:about=“BrevardFault”/>

<Fault rdf:about=“TowaligaFault”/>

</owl:distinctMembers>

</owl:differentFrom>

Page 27: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

Merging Different Databases with owl:sameAs The owl:sameAs is very useful when merging data from

different databases

For example, let’s assume that the following ‘Sample’ and ‘Sampling’ tables (next slide) are from two autonomous relational databases distributed on the Web

As we can see, some concepts are named differently in the two databases. We want to merge related data from the two tables

Recall that in a relational database, every row is a record of an individual

The Sample table has 6 rows and 6 columns, which means that we can extract 36 RDF triples from this table

The Sampling table has 6 rows and 8 columns, yielding 48 triples

Page 28: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

ID SampleNumber PaleontAge Rock AbsoluteAge Researcher

1 N100 Basalt 75 Ma Babaie

2 N110 Miocene Limestone Babaie

3 N120 Miocene Limestone Babaie

4 N130 Basalt 73 Ma Babaie

5 N140 Oligocene Shale Babaie

6 N150 Gabbro 70 Ma Babaie

petr: Sample Table, Petrology DB

petr: SampleID1

petr: S

amp

le_Sam

pleN

um

ber

petr: S

amp

le_Paleo

nA

ge

petr: SampleID2

petr: S

amp

le_Ab

solu

teAg

e

petr: SampleID4

Page 29: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

Make the RDF Triples from the RDB data To make the triples, we use the namespace for each

group (e.g., ‘petr’ for the petrology, and ‘tect’ for the tectonics domains)

Every cell of each table is a triple, with subject (individual corresponding to the row) designated with the namespace and table name attached to the id of the row, e.g.,petr:SampleID1

The predicate for each triple is designated with the namespace and table name attached to field name for the corresponding cellpetr:Sample_SampleNumber

The object is the content of the corresponding cell N100

RDF Triple:petr:SampleID1 petr:Sample_SampleNumber N100

Page 30: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

Data from the Sample table:Triples for the top two rows are shown below

petr : SampleID1petr : Sample_SampleNumber N100.petr : SampleID1petr : Sample_PaleontAge “”.petr : SampleID1petr : Sample_Rock Basalt.petr : SampleID1petr : Sample_AbsoluteAge 75 Ma.petr : SampleID1petr : Sample_Researcher Babaie. petr : SampleID2petr : Sample_SampleNumber N110.petr : SampleID2petr : Sample_PaleontAge “Miocene”.petr : SampleID2petr : Sample_Rock Limestone.petr : SampleID2petr : Sample_AbsoluteAge “”.petr : SampleID2petr : Sample_Researcher Babaie.…

S P O

Page 31: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

IDSampleNumber Region SamplingDate Project

Investigator MapName

IsotopicAge

1

N130 Neyriz 11/2/2007Neyriz

Ophiolite BabaieNeyriz

1:24000

73 Ma

2

N150 Neyriz 11/6/2007Neyriz

Ophiolite BabaieNeyriz

1:24000

70 Ma

3

N100 Neyriz 11/6/2007Neyriz

Ophiolite BabaieNeyriz

1:24000

75 Ma

4

N120 Neyriz 11/3/2007Neyriz

Ophiolite BabaieNeyriz

1:240005

N140 Neyriz 11/3/2007Neyriz

Ophiolite BabaieNeyriz

1:240006

N110 Neyriz 11/5/2007Neyriz

Ophiolite BabaieNeyriz

1:24000

tect: Sampling Table, Tectonics DB

tect: SamplingID3

Tect:S

amp

ling

_Sam

pleN

um

ber

Page 32: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

tect : SamplingID1 tect : Sampling_SampleNumber N130.tect : SamplingID1 tect : Sampling_Region Neyriz.tect : SamplingID1 tect : Sampling_SamplingDate 11/2/2007.tect : SamplingID1 tect : Sampling_Project Neyriz Ophiolite.tect : SamplingID1 tect : Sampling_Investigator Babaie.tect : SamplingID1 tect : Sampling_MapName Neyriz 1:24000.tect : SamplingID1 tect : Sampling_IsotopicAge 73 Ma. tect : SamplingID2 tect : Sampling_SampleNumber N150.tect : SamplingID2 tect : Sampling_Region Neyriz.tect : SamplingID2 tect : Sampling_SamplingDate 11/6/2007.tect : SamplingID2 tect : Sampling_Project Neyriz Ophiolite.tect : SamplingID2 tect : Sampling_Investigator Babaie.tect : SamplingID2 tect : Sampling_MapName Neyriz 1:24000.tect : SamplingID2 tect : Sampling_IsotopicAge 70 Ma.

Data from the Sampling table:Triples for the top two rows are shown below

S P O

Page 33: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

Mapping the Databases We need to map the two tables to each other using

some of the rdfs and owl constructs if we want to run a federated query on the two tables

Because the records (rows) in each table are actually individual data, we use the owl:sameAs to assert that some individuals are the same

  

Notice that sample number 130 is in the 4th row for the Sample table, but is in the 1st row of the Sampling table (same situation for other samples) Assume that sample 130 in both tables are the same

sample

Page 34: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

The merging assertions:petr : SampleID1 owl : sameAs tect : SamplingID3.petr : SampleID2 owl : sameAs tect : SamplingID6.petr : SampleID3 owl : sameAs tect : SamplingID4.petr : SampleID4 owl : sameAs tect : SamplingID1.petr : SampleID5 owl : sameAs tect : SamplingID5.petr : SampleID6 owl : sameAs tect : SamplingID2.

Page 35: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

Boolean class constructorsOWL provides Boolean constructors such as

owl:intersectionOf, owl:unionOf, and owl:complementOf to allow modeling complex knowledge

These constructors, respectively, represent logicaland (, conjunction)or (, disjunction)not (, negation)

The purpose of these constructors is to combine simple classes into more complex classes with increased expressivity

Page 36: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

owl:intersectionOf (A∩B)The class defined by the intersection of two

classes contains instances of both classes

<owl:Class rdf:about=“Semibrittle”>

<owl:intersectionOf rdf:parseType=“Collection”>

<owl:Class rdf:about=“Brittle”/>

<owl:Class rdf:about=“Ductile”/>

</owl:intersectionOf>

</owl:Class>

Page 37: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

Owl:unionOf (A B)The class defined by the union of two classes

has instances of either or both classes

<owl:Class rdf:about=“Migmatite”><owl:unionOf rdf:parseType=“Collection”>

<owl:Class rdf:about=“MetamorphicRock”/><owl:Class rdf:about=“IgneousRock”/>

</owl:unionOf></owl:Class>

Page 38: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

owl:complementOf (~A)The complement of a class contains no instance of the classFor example, the complement of Fault contains instances of Cat, Fruit, hamburger,

and River, but no member of the Fault class

<owl:Class rdf:about=“Land”><owl:Class>

<owl:complementOf rdf:resource=“BodyOfWater”/></owl:Class>

</owl:Class>

Even though this looks correct, but it is not! Because the instances of the Land class can include parmesan cheese and apple (not to mention air and mustard)!

Page 39: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

Combination of Boolean constructors A better definition of the Land class may, for example, be

defined by first defining a class (e.g., SolidGround) that annotates all land features, such as continents, islands,

and then declare Land at the intersection of the SolidGround class and the complement of the BodyOfWater class i.e., it should not be body of water but be solid ground.

See next slide!

NOTE: In such cases we use the owl:intersectionOf and owl:unionOf constructors with the owl:subClassOf for the case of owl:complementOf

Page 40: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

<owl:Class rdf:about=":Land"> <owl:intersectionOf rdf:parseType="Collection"> <owl:Class>

<owl:complementOf rdf:resource=":BodyOfWater"/> </owl:Class> <owl:Class rdf:resource=":SolidGround"/> </owl:intersectionOf> </owl:Class>

<owl:Class rdf:about=":BodyOfWater"/>

<owl:Class rdf:about=“:SolidGround”> <rdfs:comment>

definition here … </rdfs:comment></owl:Class>

Page 41: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

owl.disjointUnionOf OWL 2 DL’s owl.disjointUnionOf defines a class

as the union of other classes, all of which are pairwise disjoint

It is a shorthand for separate axioms making the classes pairwise disjoint and one setting up the union class

For example, we can define Mesozoic as the owl:disjointUnionOf Triassic, Jurassic, and Cretaceous:

<owl.Class rdf:about=“Mesozoic”> <owl.disjointUnionOf rdf:parseType=“Collection”> <owl:Class rdf:about=“Cretaceous”/> <owl:Class rdf:about=“Jurassic”/> <owl:Class rdf:about=“Triassic”/> </owl:disjointUnionOf></owl.Class

Page 42: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

owl:AlldisjointClassesOWL 2 also defines the owl:AlldisjointClasses to

collectively define a set of classes as mutually disjoint

Use the owl:members and rdf:parseType=“Collection”

<owl:AllDisjointClasses>

<owl:members rdf:parseType=“Collection”>

<owl:Class rdf:about=“Cretaceous”/>

<owl:Class rdf:about=“Jurassic”/>

<owl:Class rdf:about=“Triassic”/>

</owl:members>

</owl:AllDisjointClasses>

Page 43: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

Other alternative ways We can also use OWL 1 and mutually define the

Triassic, Jurassic, and Cretaceous periods as disjoint, with the owl:disjointWith

<owl:Class rdf:about=“Cretaceous”/>

<rdfs:comment> for example </rdfs:comment><owl:Class rdf:about=“Jurassic”/> <owl:disjointWith rdf:resource=“Cretaceous”/></owl:Class>

We can also define the Cretaceous, Jurassic, and Triassic classes as disjoint, and then find the union of these disjoint sets (see owl code below), which is equivalent to the owl 2.0 owl:disjointUnionOf shortcut

Page 44: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

Example: Laramide OrogenyThe Laramide orogeny in Montana and Wyoming

occurred during the Late Cretaceous and Eocene (i.e., some processes occurred in either Cretaceous or Eocene, which are disjoint)The two periods have no intersection!

Let’s define time:LateCretaceousEocene (may be defined in the Time ontology) using the owl.disjointUnion, that occurred either in Cretaceous or in Eocene, but not in their intersection (i.e., A xor B)

AxorB: Exclusive disjunction or exclusive or:

One or the other, but not both (red is true in the image, and is false if neither or both are true)

Page 45: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

N3 Code for Laramide Orogenyowl:disjointUnionOf (:LateCretaceousEocene :Cretaceous :Eocene). Assuming that we have the LateCretaceousEocene class:

tect:LaramideOrogeny rdf : type tect:Orogeny.

tect:LaramideOrogeny time:occurredIn time:LateCretaceousEocene.

time:intervalFor owl.inverseOf time :occurredIn.

We infer that:time : LateCretaceousEocene intervalFor tect : LaramideOrogeny

Query: Which orogeny occurred in Late Cretaceous-Eocene?

?orogeny time : occurredIn time : LateCretaceousEocene. The query will return: LaramideOrogeny

Page 46: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

LateCretaceousEocene

<owl.Class rdf:about=“LateCretaceousEocene”>

<owl.disjointUnionOf rdf:parseType=“Collection”>

<owl:Class rdf:about=“Eocene”/>

<owl:Class rdf:about=“Cretaceous”/>

</owl:disjointUnionOf>

</owl.Class

Page 47: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

<rdf:Description rdf:about=":Orogeny">

<rdf:type>

<rdf:Description rdf:about="http://www.w3.org/2002/07/owl#Class"/>

</rdf:type>

</rdf:Description>

<rdf:Description rdf:about=":LaramideOrogeny">

<rdf:type><rdf:Description rdf:about=":Orogeny"/></rdf:type>

</rdf:Description>

<rdf:Description rdf:about=":occurredIn">

<rdf:type>

<rdf:Description rdf:about="http://www.w3.org/2002/07/owl#ObjectProperty"/>

</rdf:type>

<rdfs:domain><rdf:Description rdf:about=":LaramideOrogeny"/></rdfs:domain>

<rdfs:range><rdf:Description rdf:about=":LateCretaceousEocene"/></rdfs:range>

</rdf:Description>

Page 48: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

<rdf:Description rdf:about=":intervalFor">

<rdf:type>

<rdf:Description rdf:about="http://www.w3.org/2002/07/owl#ObjectProperty"/>

</rdf:type>

<owl:inverseOf>

<rdf:Description rdf:about=":occurredIn"/>

</owl:inverseOf>

</rdf:Description>

<rdf:Description rdf:about=":LateCretaceousEocene">

<rdf:type>

<rdf:Description rdf:about="http://www.w3.org/2002/07/owl#Class"/>

</rdf:type>

<owl:unionOf rdf:parseType="Collection">

<rdf:Description rdf:about=":Cretaceous"/>

<rdf:Description rdf:about=":Eocene"/>

</owl:unionOf>

</rdf:Description>

Page 49: OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

<rdf:Description rdf:about=":Eocene">

<rdf:type>

<rdf:Description rdf:about="http://www.w3.org/2002/07/owl#Class"/>

</rdf:type>

</rdf:Description>

<rdf:Description rdf:about=":Cretaceous">

<rdf:type>

<rdf:Description rdf:about="http://www.w3.org/2002/07/owl#Class"/>

</rdf:type>

<owl:disjointWith>

<rdf:Description rdf:about=":Eocene"/>

</owl:disjointWith>

</rdf:Description>