semantic web exam 1 review. agenda uri xml rdf rdf/xml rdfs sparql reification design patterns

14
Semantic Web Exam 1 Review

Upload: alan-stewart

Post on 04-Jan-2016

218 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Semantic Web Exam 1 Review. Agenda URI XML RDF RDF/XML RDFS SPARQL Reification Design Patterns

Semantic WebExam 1 Review

Page 2: Semantic Web Exam 1 Review. Agenda URI XML RDF RDF/XML RDFS SPARQL Reification Design Patterns

Agenda

•URI•XML•RDF•RDF/XML•RDFS•SPARQL•Reification•Design Patterns

Page 3: Semantic Web Exam 1 Review. Agenda URI XML RDF RDF/XML RDFS SPARQL Reification Design Patterns

URI Jargon Summary

soap://www.visa.com/CreditCardService#

URI ContextURISchemeName:schemeSpecificPart

SchemeName Scheme Specifics Part

XMLNS ContextQualified Name (QName) – as text macro for entity and attribute names!ENTITY ContextText macro for attribute values (dereference with &;)

QName

Page 4: Semantic Web Exam 1 Review. Agenda URI XML RDF RDF/XML RDFS SPARQL Reification Design Patterns

URI Jargon SummaryValid URI ExamplesURISchemeName:schemeSpecificPart

urn:monterey#1sc:johnnyhttp://utdallas/semclass#

Page 5: Semantic Web Exam 1 Review. Agenda URI XML RDF RDF/XML RDFS SPARQL Reification Design Patterns

XML structure

•XMLNS scope and effect•!ENTITY usage•Entity, attribute, content•Reading RDF/XML

Page 6: Semantic Web Exam 1 Review. Agenda URI XML RDF RDF/XML RDFS SPARQL Reification Design Patterns

RDF & RDF/XML• Verbs (properties) defined in RDF

▫ Usage and meaning• Reading RDF/XML

▫ How many triples?▫ What graph structure?▫ Classes, properties, and short-cuts

• Limitations of RDF and RDF/XML for semantic web needs

• Writing RDF/XML statements▫ Point to a literal▫ Point to an existing resource (i.e. rdf:resource)

Page 7: Semantic Web Exam 1 Review. Agenda URI XML RDF RDF/XML RDFS SPARQL Reification Design Patterns

RDF & RDF/XML

•Draw graph from RDF/XML and N3 data▫Resources as circles/ellipses and literals as

boxes.▫Short labels in each shape and on lines▫Bring a pencil if you have trouble making

figures with pen•Note that containers include a rdf:type

node and use _1, _2, etc▫Collections do not use a type node and use

‘first’, ‘rest’, and nil

Page 8: Semantic Web Exam 1 Review. Agenda URI XML RDF RDF/XML RDFS SPARQL Reification Design Patterns

RDFS

•Verbs (properties) defined in RDFS▫Emphasis on:

subClassOf and subPropertyOf domain and range

•Transitive relationships

Page 9: Semantic Web Exam 1 Review. Agenda URI XML RDF RDF/XML RDFS SPARQL Reification Design Patterns

RDF/RDFS Example<?xml version="1.0"?><!DOCTYPE rdf:RDF [<!ENTITY exterms "

http://www.example.org/terms/">]> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:exterms="http://www.example.org/terms/" xmlns:other="uri:"> <rdfs:Property rdf:about="&exterms;creation-date">

<rdf:Description rdf:about="http://www.example.org/index.html"> <exterms:creation-date>August 16, 1999</exterms:creation-date> <dc:language>en</dc:language> <dc:creator rdf:resource="http://www.example.org/staffid/85740"/> </rdf:Description>

<rdf:Statement> <rdf:subject rdf:resource=" http://www.example.org/index.html"/> <rdf:predicate rdf:resource=“&exterms;creation-date"/> <rdf:object>August 16, 1999</rdf:object> <dc:creator>"Stewart"</dc:creator>

<other:creatorConfidenceInFact>"95%"</other:creatorConfidenceInFact> </rdf:Statement>

</rdf:RDF>

Creation-date is a property. (Makes a triple)

Stewart claims he knew the creation date and his confidence in it.

This “Statement” (i.e. reification) is a blank node

Page 10: Semantic Web Exam 1 Review. Agenda URI XML RDF RDF/XML RDFS SPARQL Reification Design Patterns

SPARQL• Writing SPARQL SELECT queries

▫ Query for all triples• Blank node handling and meaning

▫ Handling containers - Query for one or more specific elements off the container (hint: use UNION)

• Text macros▫ BASE, PREFIX

• Handling containers and collections• Named Graphs and default graph• Use of UNIONEspecially consider Sparql_PopQuizAndInClassLab.ppt

Page 11: Semantic Web Exam 1 Review. Agenda URI XML RDF RDF/XML RDFS SPARQL Reification Design Patterns

Reification

•Meaning of reification ▫Reification class type and required

properties▫Meaning of metadata from reification node▫Meaning of multiple reification nodes

Page 12: Semantic Web Exam 1 Review. Agenda URI XML RDF RDF/XML RDFS SPARQL Reification Design Patterns

Design Patterns• Pattern Categories

▫ Architectural vs Design vs Idioms

• For patterns presented▫ The need for the

pattern▫ The foundational idea

of the pattern▫ Specifically info in Lecture

4 – SubsetOfHeadsUpPatterns.ppt

Architectural pattern

Design Pattern

Idiom

Factory Method Singleton Object Pool

Composite Decorator Observer

Strategy Template Method

Page 13: Semantic Web Exam 1 Review. Agenda URI XML RDF RDF/XML RDFS SPARQL Reification Design Patterns

Ontologies

•VCARD▫For personal business cards (pretty much

contact info)•Dublin Core

▫For basic metadata – creators, dates, scope of creations/entities

•FOAF▫For friendships, working relationships to

others, organizations, and groups

Page 14: Semantic Web Exam 1 Review. Agenda URI XML RDF RDF/XML RDFS SPARQL Reification Design Patterns

Not covering

•New material presented from Ch 10 and 11 (i.e. OWL)

•New material presented in Ontology Design 101

•Jena specifics•UML and Lecture 6 design patterns