Professional Documents
Culture Documents
BY AMNA BASHARAT
7th October , 2008
FAST‐NU , Islamabad
Self Reading
Value Partitions ‐You Must Conver!
Covering Axioms
C i i
Using the Property Matrix Wizard
Cardinality Restrictions
Datatype Properties
Creating Individuals
Namespaces and Ontology Imports
Enumerated Classes
Annotation Properties
p
Open World Reasoning
FAST – NU, Islamabad, Fall 2008
QUIZ!
Electronic Quizzes
Generally MCQs or True/False
If it is an open ended question then you are expected to answer it
on your own.
Go to www.Quizstar.4teachers.org
Login using your username and password
L i i d d
à You username and password have been created
à They can be obtained from me or viewed in the course folder
à Your Class is SWT
Enter your Details
Change your password!
Take the Quiz …when assigned!
à Fixed Time
You can also view answers once the Quiz Expires!
You may as well be given some assignments
FAST – NU, Islamabad, Fall 2008
Trial Quiz!
You must take the Trial Quiz today.
The actual Quiz to be released very soon.
Would give you essential practice before the
upcoming Sessional II
à Would require sound logical understanding of
Ontologies.
O l i
à May Also require you to do things practically.
Application/ Architecture
Ontology
Reasoning Support
Due Date : 9
9th October, 2008
,
à Examples of individual instances must be defined as
well.
Refer to the Guidelines Document for
Coverage of OWL Constructs
RDF is quite committed to Semantic Web.
à Data model
d l
à Serialization by means of XML
à Formal semantics
F l i
Still something is missing!
à A standard query language.
à A way for the queries and their respective results
to be transported between applications /
services.
SPARQL
<soapenv:Body>
<query-request
<query request xmlns
xmlns="http://www.w3.org/2005/09/sparql-
http://www.w3.org/2005/09/sparql
protocol-types/#">
summary of SPARQL
SPARQL is...
... a query language ...
... a result format ...
lt f t
... an access protocol ...
p
SPARQL =
Query Language + Protocol + XML Results
Format
SELECT ?title2
WHERE
{
?doc dc:title "SPARQL at speed" .
?doc dc:creator ?c .
?docOther dc:creator ?c .
?docOther dc:title ?title2
• On an abstracts/papers database:
p p y g p p
“Find other papers by the authors of a given paper.”
SELECT ?title2
WHERE
{ ?doc dc:title ?title .
FILTER regex(?title, "SPARQL") .
?doc dc:creator ?c .
?c foaf:name ?name .
OPTIONAL
{ ?doc shop:price ?price }
}
• “Find books with ‘SPARQL’ in the title. Get the authors’ name and the
price (if available).”
price (if available).
• Multiple vocabularies
FAST – NU, Islamabad, Fall 2008
Inference
• An RDF graph may be backed by inference
− OWL, RDFS, application, rules
OWL RDFS application rules
:x rdf:type :C .
:C rdfs:subClassOf :D .
--------
| type |
========
| :C |
| :D |
--------
SPARQL as integrator
à Data remains where it is
i h i i
à Existing applications untouched
à data appears as RDF, remap query to native form
d RDF i f
SPARQL to SQL
Direct mapping of tables
i i f bl
Semi‐automatic generation of mapping
SquirrelRDF (also does LDAP)
Modelled: D2RQ
High‐quality mapping, manually developed
SPARQL
Que
• Inputs:
Inp ts
ery
– Service Description
– Information
Query Broker
Directory
SPARQL => SPARQL
– Request
SPA
SPA
SP
• Outputs:
Query
Query
Query
Q
PARQL
ARQL
ARQL
– Unified results
Corp Doc
RDF
LDAP DB
• “Find the name and email addresses of authors of a paper”
• Query tech reports first, then go to LDAP for more information.
• SQL database; LDAP server
FAST – NU, Islamabad, Fall 2008
Access Multiple Sources
• “Find the reports written by the person with
“Fi d th t itt b th ith
email address andy.seaborne@hp.com
• Go to LDAP first then the reports database
Go to LDAP first, then the reports database
SPARQL =
Query Language + Protocol + XML Results Format
• One request type expressed in WSDL
• HTTP and SOAP
• Results: fixed XML form for further transformation
Jena: Java and .Net Semantic Web Framework
à http://jena.sourceforge.net/
à RDF, SPARQL, OWL, Rules
à Open source: BSD‐license
O BSD li
Commercial and non‐commercial use
SPARQL Query
à http://jena.sourceforge.net/ARQ
SPARQL Protocol
à http://www.joseki.org
SquirrelRDF: Access legacy SQL:
à http://jena.sourceforge.net/SquirrelRDF
FAST – NU, Islamabad, Fall 2008
SPARQL Update
INSERT
{ book:newBook dc:title Q
“More about SPARQL” .
book:newBook dc:creator
[ foaf:mbox <mailto:alex@example> ;
foaf:name “Alex Author” ]
}
DELETE
{ ?book dc:title ?title ;
dc:creator ?c }
WHERE
{ ?book dc:title ?title ;
dc:creator ?c
FILTER regex(?title,
regex(?title “first
first edition”)
edition )
}
• Future HP proposal to W3C
F t HP l t W C
FAST – NU, Islamabad, Fall 2008
DUA ONTOLOGY
Taxonomy
Dua
Duas To Seek
DuasToSeekParadise ….
K
Knowledge
l d
isRelatedTo
Prophet
Dua hasRelatedDua
hasTheme
containsDua isContainedIn
Surah Theme
PREFIX dua:
<http://www.semanticweb.org/ontologies/2
htt // ti b / t l i /
008/9/DuaOntology.owl#>
SELECT ?D ?theme
WHERE { ?D dua:hasTheme ?theme.}