Sparql service-description
-
Upload
sti-innsbruck -
Category
Technology
-
view
322 -
download
0
description
Transcript of Sparql service-description
www.sti-innsbruck.at © Copyright 2008 STI INNSBRUCK www.sti-innsbruck.at
SPARQL Service Description
An Introduction
www.sti-innsbruck.at
What is SPARQL?
• RDF Query language based on RDQL • Used to retrieve and manipulate data stored in RDF format • Uses SQL-like syntax
2
SPARQL Protocol and RDF Query Language
www.sti-innsbruck.at
Example SPARQL Query
“Return the full names of all people in the graph” PREFIX vCard: <http://www.w3.org/2001/vcard-rdf/3.0#> SELECT ?fullName WHERE {?x vCard:FN ?fullName} result: fullName ================= "John Smith" "Mary Smith"
@prefix ex: <http://example.org/#> . @prefix vcard: <http://www.w3.org/2001/vcard-rdf/3.0#> . ex:john vcard:FN "John Smith" ; vcard:N [ vcard:Given "John" ; vcard:Family "Smith" ] ; ex:hasAge 32 ; ex:marriedTo :mary . ex:mary vcard:FN "Mary Smith" ; vcard:N [ vcard:Given "Mary" ; vcard:Family "Smith" ] ; ex:hasAge 29 .
www.sti-innsbruck.at
What is a SPARQL Service Description?
4
• Method for discovering and • Vocabulary for describing SPARQL Services • Commonly referred to as a „SPARQL endpoint“ • Provides mechanism by which informations can be discovered such as
– Supported extension functions – Details about the available dataset
• Returns a service description when dereferenced using HTTP GET
SPARQL Service Description is ...
www.sti-innsbruck.at
SPARQL Service Description Properties
• sd:endpoint – a SPARQL endpoint
• sd:feature – a supported feature
• sd:defaultEntailmentRegime – entailment regime used for basic graph pattern matching
• sd:extensionFunction – a function that may be used in a SPARQL SELECT expression, or clauses like
FILTER, HAVING, GROUP BY, ...
• sd:defaultDataset – a description of the default dataset available when no explicit dataset is specified
5
www.sti-innsbruck.at
SPARQL Service Description Properties
• sd:resultFormat – a format for serializing query results
• sd:defaultGraph – relates an instance of sd:Dataset to the description of its default graph
• sd:supportedLanguage – relates an instance of sd:Service to a SPARQL language that it implements
6
www.sti-innsbruck.at
SPARQL Service Description Classes
• sd:Service – an instance of sd:Service represents a SPARQL service
• sd:Feature • sd:Language • sd:EntailmentRegime • sd:EntailmentProfile • sd:GraphCollection • sd:Dataset
– represents an RDF dataset comprised of a default graph and zero or more named graphs
• sd:Graph – represents the desription of an RDF graph
7
www.sti-innsbruck.at
SPARQL Service Description Instances
• sd:SPARQL10Query • sd:SPARQL11Query • sd:SPARQL11Update • sd:DereferencedURIs • sd:UnionDefaultGraph • sd:RequiresDataset • sd:EmptyGraphs • sd:BasicFederatedQuery
8
www.sti-innsbruck.at
Example (Informative)
9
!"#$%&"'("&"!"&")*"+',-.+'#)('%+"+'$/"'&"+%01)2'-34'5)'$/"'(#$#+"$'(%&5)2'6%"&7'"8#0%#19)'!%)*19)''%+"('5)':;<;=>'
"?@&"++59)'9&'"A2A'4.<>;-'*0#%+"''("!#%0$'2&#@/'B5$/'CDD'
$&5@0"+'
EF<G-34'")$#50H")$'&"25H"'
%+"('5)'I#+5*'2&#@/'@#J"&)'H#$*/5)2'
+%@@9&$"('@&9K0"'9!'$/"'")$#50H")$'&"25H"'
+"&85*"'")(@95)$'
'5H@0"H")$"(':LM-N<''
0#)2%#2"'
&"+%0$'+"&5#05O#19)'!9&H#$+'
www.sti-innsbruck.at 10
Thank you for your attention!