The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03 RDF 101 The Semantic Web...

37
Terena EuroCAMP, 2006-04-03 <[email protected] > RDF 101 The Semantic Web meets Resource Management 1

Transcript of The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03 RDF 101 The Semantic Web...

Page 1: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

Terena EuroCAMP, 2006-04-03<[email protected]>

RDF 101The Semantic Web meets Resource Management

1

Page 2: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

The Resource Description Framework

The Resource Description Framework (RDF) is a language for representing information about things (metadata) that can be identified on the Web, even when they cannot be directly retrieved on the Web.

A W3C standard2

Page 3: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

Metadata

A metadata record consists of a set of attributes, or elements, necessary to describe the resource in question.

3

Page 4: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

RDF basics

Information is a collection of statements, each with a subject,verb and object - and nothing else.

Everything, be it subject,verb or object, is identified with a Uniform Resource Identifier. One exception; a object can be a literal (string, integer,..)

4

Page 5: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

subject,verb and object

S: <http://www.terena.nl/friend#roland>V: <http://www.openmetadir.org/om/0.1/element#knows> O: <http://www.terena.nl/friend#diego> .

Everything is identified by a URI The verb is also known as a predicate and what you use as a predicate is a propertyDon’t forget the ‘.’

5

Page 6: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

Directed graph

<http://www.terena.nl/friend#roland>

<http://www.openmetadir.org/om/0.1/element#knows>

<http://www.terena.nl/friend#diego>

6

Page 7: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

RDF serializationsRDF101 has an author who is Roland HedbergN-Triples

<http://www.terena.nl/events/eurocamp2006#rdf101> <http://purl.org/dc/elements/1.1#author> “Roland Hedberg” .

N3@prefix dc: <http://purl.org/dc/elements/1.1#> .@prefix ec06: <http://www.terena.nl/events/eurocamp2006#> . ec06:rdf101 dc:author “Roland Hedberg” .

RDF/XML<rdf:RDF xmlns="http://purl.org/dc/elements/1,1#" xmlns:dc="http://purl.org/dc/elements/1,1#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="http://www.terena.nl/events/eurocamp2006#rdf101"> <author>Roland Hedberg</author> </rdf:Description></rdf:RDF>

7

Page 8: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

Sharing conceptsProperties are defined in contexts

Are these the same ?title = title

Are these ?http://purl.org/dc/elements/1.1/title =http://openmetadir.org/om/0.1/title

8

Page 9: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

From here on we’ll use this:

@prefix foaf: <http://xmlns.com/foaf/0.1/>@prefix dc: <http://purl.org/dc/elements/1.1/>@prefix om: <http://www.openmetadir.org/om/0.1/>@prefix friend: <http://www.terena.nl/friend#>

9

Page 10: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

friend:roland om:knows friend:diego; foaf:topic_interest “Skiing”@en .

friend:roland

friend:DIEGO"Skiing"

om:knowsfoaf:topic_interest

10

Page 11: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

friend:roland om:knows friend:diego; foaf:topic_interest “Skiing”@en ; foaf:currentproject “Spocp”,”OpenMetaDir”,”HLS”,”Swami/MD” .

friend:roland

"Skiing"

om:knowsfoaf:topic_interest

foaf:currentProject

"Openmetadir"

"HLS"

"SWAMI/MD"

"Spocp"

friend:DIEGO

11

Page 12: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

friend:roland

"Ton"

"Skiing"@en

om:knowsfoaf:topic_interest

"Openmetadir"

"HLS"

"SWAMI/MD"

"Spocp"

"Verschuren"

FOAF:FirstnameFOAF:FamilyName

"Holländare"@se

om:citizenship

foaf:currentProject

friend:roland om:knows [ foaf:firstname “Ton”; foaf:familyname “Verschuren”; om:citizenship “Holländare”@se ];

foaf:topic_interest “Skiing”@en ; foaf:currentproject “Spocp”,”OpenMetaDir”,”HLS”,”Swami/MD” .

12

Page 13: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

OWL

The OWL Web Ontology Language is intended to provide a language that can be used to describe the classes and relations between them that are inherent in Web documents and applications.

13

Page 14: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

The Web Ontology Language (OWL)

supports

Sharing information and knowledge (for interoperability)Defining the relationships between different resourcesUnderstanding of the domainRepresentation of conceptualization

14

Page 15: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

!!!

An ontology differs from an XML schema in that it is a knowledge representation, not a message format

15

Page 16: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

An oncology encompasses four concepts

ClassesRelationship between classesProperties of classesConstrains on relationship between the classes and properties of the classes

16

Page 17: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

OWL types

OWL Lite; Supports simple classifications, allowing only cardinalities of 0 and 1 and only minimal constrains.OWL DL; Supports more complex ontologies, but with some guarantees, such as processing finishing in finite time.OWL Full; maximum freedom of RDF, with no computational guarantees.

17

Page 18: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

So What Might a OWL ontology

look like !?

18

Page 19: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

Basic Elements

The most basic concepts in a domain should correspond to classes that are the roots of various taxonomic trees.Properties let us assert general facts about the members of classes and specific facts about individuals.An individual is minimally introduced by declaring it to be a member of a class

19

Page 20: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

Simple properties

A property is a binary relation. Two types of properties are distinguished:datatype properties, relations between instances of classes and RDF literals and XML Schema datatypes.object properties, relations between instances of two classes.

20

Page 21: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

Simple Property Restrictions

DomainRange

21

Page 22: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

Property Characteristics

TransitivePropertySymmetricPropertyFunctionalPropertyInverseOfInverseFunctionalProperty

22

Page 23: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

Property restrictions

In addition to designating property characteristics, it is possible to further constrain the range of a property in specific contexts in a variety of ways.

23

Page 24: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

restrictions

allValuesFrom, someValuesFromcardinality, minCardinality, maxCardinalityhasValue

24

Page 25: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

Ontology Mapping

equivalentClass, equivalentPropertysameAsdifferentFrom,AllDifferent

intersectionOf,unionOf,oneOfdisjointWith

25

Page 26: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

Property description (dc)

@prefix dcns: <http://purl.org/dc/elements/1.1/>@prefix dctermsns: <http://purl.org/dc/terms/>@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .@prefix : <http://www.w3.org/2000/01/rdf-schema#> .

dcns:title a rdf:Property; dcns:description "Typically, a Title will be a name by which the resource is formally

known."@en-US; dcns:type <http://dublincore.org/usage/documents/principles/#element>; dctermsns:hasVersion <http://dublincore.org/usage/terms/history/#title-004>; dctermsns:issued "1999-07-02"; dctermsns:modified "2002-10-04"; :comment "A name given to the resource."@en-US; :isDefinedBy <http://purl.org/dc/elements/1.1/>; :label "Title"@en-US .

26

Page 27: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

property definition (foaf)

@prefix : <http://www.w3.org/2000/01/rdf-schema#> .@prefix vs: <http://www.w3.org/2003/06/sw-vocab-status/ns#> .

<http://xmlns.com/foaf/0.1/family_name> a rdf:Property, owl:DatatypeProperty; :comment "The family_name of some person."; :domain <http://xmlns.com/foaf/0.1/Person>; :isDefinedBy <http://xmlns.com/foaf/0.1/>; :label "family_name"; :range :Literal; vs:term_status "testing" .

27

Page 28: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

Class description (foaf)

<http://xmlns.com/foaf/0.1/Person> a :Class, owl:Class; :comment "A person."; :isDefinedBy <http://xmlns.com/foaf/0.1/>; :label "Person"; :subClassOf con:Person, wgs:SpatialThing, <http://xmlns.com/foaf/0.1/Agent>, <http://xmlns.com/wordnet/1.6/Agent>, <http://xmlns.com/wordnet/1.6/Person>; owl:disjointWith <http://xmlns.com/foaf/0.1/Document>, <http://xmlns.com/foaf/0.1/Organization>, <http://xmlns.com/foaf/0.1/Project>; vs:term_status "stable" .

28

Page 29: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

super classes <http://www.w3.org/2000/10/swap/pim/contact#Person> a :Class;

:comment "A person in the normal sense of the word.";:subClassOf :SocialEntity .

<http://www.w3.org/2000/10/swap/pim/contact#SocialEntity> a rdfs:Class;:comment "The sort of thing which can have a phone number." .

<http://www.w3.org/2003/01/geo/wgs84_pos#SpatialThing> a :Class;:comment "Anything with spatial extent, i.e. size, shape, or position. e.g. people, places, bowling balls, as well as abstract areas like cubes.";:label "SpatialThing" .

<http://xmlns.com/wordnet/1.6/Agent> a :Class;:comment "an active and efficient cause; capable of producing a certain effect; \"their research uncovered new disease agents\"";:label "Agent [ 1 ]";:subClassOf <http://xmlns.com/wordnet/1.6/Causal_agent> .

<http://xmlns.com/wordnet/1.6/Person> a :Class;:comment "a human being; \"there was too much for one person to do\"";:label "Person [ 1 ]";:subClassOf <http://xmlns.com/wordnet/1.6/Organism> .

<http://xmlns.com/wordnet/1.6/Organism> a :Class;:comment "a living thing that has (or can develop) the ability to act or function independently";:label "Organism [ 1 ]";:subClassOf <http://xmlns.com/wordnet/1.6/Living_thing> .

29

Page 30: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

There is a more to OWL but we’ll take that another time

30

Page 31: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

RDF and Identity/Resource

ManagementMiddleware is a lot about managing objects/resources more specifically metadata about those.Identity management just one partIf you want to future-proof your investment don’t chose a limiting frameworkAnd for godness sake describe your knowledge representation !

31

Page 32: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

Resource Management

Lots of sources and sinks with their view of the worldHarmonised view is essentialRelationship between metadata from different places should be possible to expressVersion handling

32

Page 33: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

We are writing ontologies for:

PersonOrganisation

RoleGroup

CourseCourseInstance

...

33

Page 34: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

Not just ontologies

Ontologies for sources and sinks as well as for the metadirectory/registryThe ontology relationsship between sources/sinks and the metadirectory/registry

34

Page 35: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

The picture of an ontology

cd Omnia

{xor}

Employee

- «type» type: MultiLanguageType = {RegularEmploym...

- «type» position: MultiLanguageType = {primulapositions}

Function

- «type» type: MultiLanguageType = {KIMKAT, Admini...

- «type» function: MultiLanguageType = {President, Vic...

- «Not Null» affi l iation: Member

- «Not Null» organization: Organization

- phone: Phone [0..*]

- address: Address [0..*]

- «Not Null» fromDate: date = current_date

- toDate: date

Person

- «Not Null» LIN: int

- uid: String

- password: String

- clientCertificates: X509Certificate[]

- KIMKATEmail: String

- email: String [0..*] {ordered}

- identifier: PersonalIdentifier [1..*]

- name: Name [1..*]

- title: Title [0..*]

- address: Address [0..*]

- phone: Phone [0..*]

- «type» sex: MultiLanguageType = {M,F,Unknown} d...

- birth: Date

- homepage: String

- contactInfo: ContactInfo [0..*]

- primaryAffi l iation: Affi l iation

- affi l iation: Affi liation [0..*]

- «Not Null» primaryLanguage: String = SV

- «Not Null» state: ProvisioningState = created

- «type» exportLevel: MultiLanguageType = {protected, wor...

- personHistory: PersonHistory [1..*]

- affi l iationHistory: Affil iationHistory [1..*]

Student

- «type» type: MultiLanguageType = {programmeStude...

- «type» position: MultiLanguageType = {ladokpositions}

Name

- firstName: String [1..*] {ordered}

- «Not Null» givenNameIndex: int = 0

- middleName: String

- surName: String

- «Not Null» displayName: String

Affiliation

- phone: Phone [0..*]

- address: Address [0..*]

- contract: Contract

- «Not Null» fromDate: date = current_date

- toDate: date

- «Not Null» organization: OfficialOrganization

- «Not Null» state: ProvisioningState

Address

- «type» type: MultiLanguageType = {visitingAddres...

- addressLines: String [0..*] {ordered}

- province: String

- postalCode: String

- city: String

- «Not Null» country: Country

- «Not Null» fromDate: date = current_date

- toDate: date

- «Not Null» isTemporary: boolean = false

Phone

- «type» type: MultiLanguageType = {regular phone,...

- «Not Null» countryCode: Country = SE

- «Not Null» number: String

Affiliate

- «type» type: MultiLanguageType = {Worker, Consul...

- employedBy: ExternalContact

- «Not Null» KIMKATValidTo: date

Affi l iation

Member

- function: Function [0..*]

- «Not Null» percentage: int = 0

Alumn

- «type» type: MultiLanguageType = {studAlumn, emp...

Organization

- name: OrgName [1..*]

- parent: Organization

- phone: Phone [0..*]

- address: Address [0..*]

- homePage: String

- contactInfo: String

- «Not Null» fromDate: date = current_date

- toDate: date

- relationship: OrganizationRelationship [0..*]

- function: Function [0..*]

SupportOrganization

- «type» type: MultiLanguageType = {Board, Committ...

PersonalIdentifier

- «type» type: MultiLanguageType = {SSNPersonalIde...

- «Not Null» value: String

Title

- «type» type: MultiLanguageType = {additional, ac...

- «type» title: MultiLanguageType = {Professor, Lec...

Other

- «type» type: MultiLanguageType

- «type» position: MultiLanguageType = {kaffpositions}

- employedBy: ExternalContact

- «Not Null» KIMKATValidTo: date

Prov isioningState

- «type» state: MultiLanguageType = {catalogueonly,...

- attributes: StateAttribute [0..*]

OrgName

- «Not Null» name: String

- shortName: String

- displayName: String

- «Not Null» language: String = SV

- description: String

StateAttribute

- «Not Null» attribute: String

- value: String

AffiliationHistory

- affi liation: Affi liation

- «type» state: MultiLanguageType = {catalogueonly,...

- «type» reason: Reason

- «Not Null» timestamp: date = current_timestamp

ExternalContact

- «Not Null» company: ExternalCompany

- contactPerson: String

- phone: String

- email: String

ExternalCompany

- orgnr: String

- «type» type: MultiLanguageType = {SSL, Company/O...

- «Not Null» name: String

- address: String

- homepage: String

CooperationOrganization

- «type» type: MultiLanguageType = {Centre of Rese...

OfficialOrganization

- «type» type: MultiLanguageType = {Institution, K...

Country

- «Not Null» countryCode: String

- «type» countryName: MultiLanguageType

- «Not Null» phoneCode: String = 46

ExtraOrganization

- orgnr: String

ContactInfo

- name: String

- «Not Null» phone: String

- relation: String

- «Not Null» prio: int = 0

OrganizationRelationship

- «type» type: MultiLanguageType

- «Not Null» fromDate: date = current_date

- toDate: date

- «Not Null» orgA: Organization

- «Not Null» orgB: Organization

Name: Omnia

Author: Helena Larsson

Version: 1.0

Created: 2001-07-01 00:00:00

Updated: 2006-01-18 00:00:00

PersonHistory

- person: Person

- «type» state: MultiLanguageType = {catalogueonly,...

- «type» reason: Reason

- «Not Null» timestamp: date = current_timestamp

MultiLanguageType

- id: int

- values: Map<String, String>

Contract

- «type» contractReason: MultiLanguageType [1..*]

CooperationOrganization::CollectionNode

- name: CollNodeName [1..*]

- parent: CollectionNode

- leaf: Organization [0..1]

CollNodeName

- «Not Null» name: String

- description: String

- language: String = sv

1

1..*

1

0..*

0..1

0..*

1

0..*

1

1..*0..*

1

1 1..*

1

1

1

0..*

1..*

1

0..*

1

1

1

1

0..*

0..1

0..*0..*

1

0..*

1

0..*

0..1

0..*

0..11

0..*

0..1

0..*

1

1..*

1

0..*

1

0..*

1+orgB

0..*

1+orgA

0..*

1

1..*

0..*

1

0..1

0..*

0..1 1

0..*0..1

1..*

1

Name:

Package:

Version:

Author:

Omnia

Omnia

1.0

Helena Larsson

35

Page 36: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

Done !

36

Page 37: The Semantic Web meets Resource Management · Terena EuroCAMP, 2006-04-03  RDF 101 The Semantic Web meets Resource Management 1

N3 @prefix : <http://www.openmetadir.org/om/1.0/attr#> . @prefix om: <http://www.openmetadir.org/om/1.0/om#> . om:add om:data [ :associatedDomain "umu.se"; :uid "umun0001"; :formalName "Umea University"@en, "Umeå universitet"; :lin "UMUID:1920187510089495044"; :name "umu", "umu"@en ]; om:eid "1"; om:objecttype "org"; om:oid "UMUID:1920187510089495044"; om:src "kdb" .

37