_chapter3_rdf
TRANSCRIPT
-
8/6/2019 _Chapter3_RDF
1/35
RDF: Resource Description
Framework
-
8/6/2019 _Chapter3_RDF
2/35
RDF is...
? A standard syntax to represent (edgelabeled) directed graphs in XML
?
It is a standard by World Wide WebConsortium
-
8/6/2019 _Chapter3_RDF
3/35
An Example
http://www.srdc.metu.edu.tr/~asuman Asuman DogacCreator
* Asuman Dogac is the value of property Creator for resource http://
www.srdc.metu.edu.tr/~asuman
* Resource http:// www.srdc.metu.edu.tr/~asuman has a property Creatorwith a value Asuman Dogac
*Creator ofhttp:// www.srdc.metu.edu.tr/~asuman isAsuman Dogac
-
8/6/2019 _Chapter3_RDF
4/35
4
RDF Schemas
? Describe rules for using RDF properties
? Are expressed in RDF
? Are not to be confused with XML Schemas
-
8/6/2019 _Chapter3_RDF
5/35
5
Schema URIs
? Ordinary XML namespace URIs are just toguarantee uniqueness: there is no assumption thatthe URI refers to anything useful (or even refers at
all)? URIs for namespaces used in RDF, though, should
refer to an RDF schema document
? RDF namespace uses rdf prefix by convention
? RDF Schema namespace uses rdfs prefix by
convention? Properties are declared in other namespaces, so
they are Web-unique
-
8/6/2019 _Chapter3_RDF
6/35
Resources, Properties, Statements
? All things being described by RDF expressions are called resources
? Resources are always specified by URIs
? A property is a specific aspect, characteristic, attribute, or relationused to describe a resource
? A specific resource together with a named property plus the value ofthat property for that resource is an RDF statement
? Statement: subject (resource), predicate (named property), object(property value)
? Object can be another resource or it can be literal
-
8/6/2019 _Chapter3_RDF
7/35
-
8/6/2019 _Chapter3_RDF
8/35
Basic RDF Serialization Syntax
? The Description element names, in an about attribute,the resource to which each of the statements apply
? If the resource does not yet exist (i.e. does not have aresource identifier) than a Description element can create
the identifier for the resource using an ID attribute? Property names must always be associated with a schema
? This can be done by qualifying the element names with anamespace prefix to connect the property definition withthe corresponding RDF schema
-
8/6/2019 _Chapter3_RDF
9/35
Core Classes
? rdfs:Resource - All things being described by RDFexpressions are resources and are considered to beinstances of the class rdfs:Resource
? rdfs:Class - represents the generic concept of a type orcategory and can be defined to represent almosteverything, e.g. Web pages, people, document types
? rdf:Property - represents the subset of RDF resourcesthat are properties
-
8/6/2019 _Chapter3_RDF
10/35
Example Classes and Subclass property
BusinessDocs
PurchaseOrder
-
8/6/2019 _Chapter3_RDF
11/35
-
8/6/2019 _Chapter3_RDF
12/35
12
What is the rdf:type property?
? It specifies a class (there may be more than one) towhich the resource belongs
? Its value is always a Web resource representing the
class? It can be expressed as a type attribute on a
Description element
? It can also be implied by using a special element
instead of a Description element
-
8/6/2019 _Chapter3_RDF
13/35
Example Classes and Subclass property
The same definition with different syntax
BusinessDocs
PurchaseOrder
-
8/6/2019 _Chapter3_RDF
14/35
Example Property Definition
? An Example Property Definition:
-
8/6/2019 _Chapter3_RDF
15/35
An Example Class Instance
-
8/6/2019 _Chapter3_RDF
16/35
Core Properties
? rdfs:subClassOf - This property specifies asubset/superset relation between classes
? The rdfs:subClassOf property is transitive
? If class A is a subclass of some broader class B,and B is a subclass of C, then A is also implicitly asubclass of C
? Consequently, resources that are instances of classA will also be instances of C, since A is a sub-set ofboth B and C
? rdfs:subPropertyOf - is an instance of rdf:Propertythat is used to specify that one property is aspecialization of another
-
8/6/2019 _Chapter3_RDF
17/35
Core Properties
? rdfs: range - is used to define that the valuesof a property are instances of one or morestated classes
? rdfs: domain - is used to state that anyresource that has a given property is aninstance of one or more classes
-
8/6/2019 _Chapter3_RDF
18/35
18
Property-centric classes
? In typical OO classes, each class specifiescompletely what properties it has and whattheir types are
? In RDF classes, each property specifies whatclasses of subjects and objects it relates
? Therefore, new properties can be added to a
class without modifying the class
-
8/6/2019 _Chapter3_RDF
19/35
19
Summary of useful properties
? rdf:type relates any resource to its class
? rdfs:subClassOf relates a subclass to its
superclass (multiple inheritance is OK)? rdfs:subPropertyOf relates a subproperty to
its superproperty
-
8/6/2019 _Chapter3_RDF
20/35
20
Summary of useful properties
? rdfs:domain specifies the domain of aproperty (the classes of its subjects); ifunknown, anything can be a subject
? rdfs:range specifies the range of a property(the single class of its objects); if unknown,anything can be an object
-
8/6/2019 _Chapter3_RDF
21/35
Containers
? Frequently it is necessary to refer to a collection of resources;RDF containers are used to hold such list of resources or literals
? Container model
? Bag
? Sequence
? Alternative
-
8/6/2019 _Chapter3_RDF
22/35
22
Containers
? Bag: a simple collection with no ordering
? Seq: a collection with implicit ordering
? Alt: a set of alternatives (first one preferred)
? Elements are properties named _1, _2, _3, etc.
-
8/6/2019 _Chapter3_RDF
23/35
The Bag
Ceng 720Rdf:Bag
/Sudents/Ali
/Students/Ayse
students
Rdf:type
Rdf._1
Rdf._2
-
8/6/2019 _Chapter3_RDF
24/35
RDF Description of the Example
-
8/6/2019 _Chapter3_RDF
25/35
An Example on the use of Collections
Yayinlar
Papers
-
8/6/2019 _Chapter3_RDF
26/35
Example
-
8/6/2019 _Chapter3_RDF
27/35
An Example to Container object Alternative
-
8/6/2019 _Chapter3_RDF
28/35
28
Reified statements
? We reify statements so that we can talk about them rather thanasserting them
? Ali believes that creator of http://srdc.metu.edu.tr is AsumanDogac
? In order to model statements about statements RDF models the
original statement with 4 properties? subject: The resource about which the original statement is
made? predicate: Identifies the original property in the modeled
statement? object: Identifies the property value in the modelled
statement? type: describes the type of the new resource. All reified
statements are instances of RDF:Statement; that is, theyhave a typeproperty whose object is RDF:Statement
-
8/6/2019 _Chapter3_RDF
29/35
An Example
-
8/6/2019 _Chapter3_RDF
30/35
30
Dublin Core
? A set of fifteen basic properties for describinggeneralized Web resources
? The obvious mapping of Dublin Coreproperties into RDF properties has not yetbeen approved by the Dublin Core initiative,but is generally a good example
-
8/6/2019 _Chapter3_RDF
31/35
31
Dublin Core
? Title: the name given to the resource
? Creator: the person or organization primarilyresponsible for the resource
? Subject: what the resource is about
? Description: a description of the content
-
8/6/2019 _Chapter3_RDF
32/35
32
Dublin Core
? Publisher: the person or organizationresponsible for making the resource available
? Contributor: someone who has providedcontent to the resource other than the creator
? Date: date of creation or publication
-
8/6/2019 _Chapter3_RDF
33/35
33
Dublin Core
? Type: type of resource, such as home page,technical report, novel, photograph
? Format: data format of the resource
? Identifier: URL, ISBN number,
? Source: another resource that this resourceis derived from
-
8/6/2019 _Chapter3_RDF
34/35
34
Dublin Core
? Language: the language of the content
? Relation: another resource and itsrelationship to this one
? Coverage: the portion of time or spacedescribed by this resource (atlases, histories,etc.)
-
8/6/2019 _Chapter3_RDF
35/35
35
Dublin Core
? Rights: the intellectual property rightsadhering to this resource, or a pointer to them