Copyright © 2010 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply.
This document describes SPARQL Service Description, a method for discovering and vocabulary for describing SPARQL services made available via the SPARQL Protocol for RDF [SPROT]. Such a description is intended to provide a mechanism by which a client or end user can discover information about the SPARQL implementation/service such as supported extension functions and details about the available dataset.
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.
This is a Working Draft.
Comments on this document should be sent to public-rdf-dawg-comments@w3.org, a mailing list with a public archive. Questions and comments about SPARQL that are not related to this specification, including extensions and features, can be discussed on the mailing list public-sparql-dev@w3.org, (public archive).
This document was produced by the SPARQL Working Group, which is part of the W3C Semantic Web Activity.
This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.
Since the publication of the previous working draft of this document, the primary change has been the addition of the sd:inputFormat property. Based on feedback improvements have been made to the text, formatting and interlinking within this document.
Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.
1 Introduction
2 Accessing a Service Description
3 Service Description Vocabulary
3.1 SPARQL Service Description Namespace
3.2 Classes
3.2.1 sd:Service
3.2.2 sd:Language
3.2.3 sd:Function
3.2.4 sd:Aggregate
3.2.5 sd:EntailmentRegime
3.2.6 sd:EntailmentProfile
3.2.7 sd:GraphCollection
3.2.8 sd:Dataset
3.2.9 sd:Graph
3.2.10 sd:NamedGraph
3.3 Instances
3.3.1 sd:SPARQL10Query
3.3.2 sd:SPARQL11Query
3.3.3 sd:SPARQL11Update
3.3.4 sd:DereferencesURIs
3.3.5 sd:UnionDefaultGraph
3.3.6 sd:RequiresDataset
3.3.7 sd:EmptyGraphs
3.4 Properties
3.4.1 sd:url
3.4.2 sd:feature
3.4.3 sd:defaultEntailmentRegime
3.4.4 sd:supportedEntailmentProfile
3.4.5 sd:entailmentRegime
3.4.6 sd:extensionFunction
3.4.7 sd:extensionAggregate
3.4.8 sd:languageExtension
3.4.9 sd:supportedLanguage
3.4.10 sd:propertyFeature
3.4.11 sd:defaultDatasetDescription
3.4.12 sd:availableGraphDescriptions
3.4.13 sd:resultFormat
3.4.14 sd:inputFormat
3.4.15 sd:defaultGraph
3.4.16 sd:namedGraph
3.4.17 sd:name
3.4.18 sd:graph
4 Example
A References
A.1 Normative References
A.2 Other References
B CVS History
A SPARQL Service Description is a way of describing the features of a SPARQL service made available via the SPARQL Protocol. This document describes both a method for discovering a service description from a specific SPARQL service, and an RDF schema for encoding such descriptions in RDF.
SPARQL services made available via the SPARQL Protocol SHOULD return a service description document at the service URL. This service description MUST be made available in an RDF serialization, MAY be provided embedded in (X)HTML by RDFa, and SHOULD use content-negotiation if available in other RDF representations.
The SPARQL Service Description namespace IRI is:
http://www.w3.org/ns/sparql-service-description#
The prefix used in this document for this namespace is sd.
An instance of sd:Service represents a SPARQL service made available via the SPARQL Protocol.
type: | rdfs:Class |
---|
An instance of sd:Language represents one of the SPARQL language, including specific configuration providing particular features or extensions. sd:SPARQL10Query, sd:SPARQL11Query, and sd:SPARQL11Update are pre-defined SPARQL language instances.
type: | rdfs:Class |
---|
An instance of sd:Function represents a function that may be used in a SPARQL FILTER/HAVING clause or a project expression.
type: | rdfs:Class |
---|
An instance of sd:Aggregate represents an aggregate operation that may be used in a SPARQL aggregate query HAVING clause or project expression.
type: | rdfs:Class |
---|
An instance of sd:EntailmentRegime represents an entailment regime used in basic graph pattern matching (as described in SPARQL 12.6 @@ updated section and add link when Query1.1 doc stabilizes). URIs for commonly used entailment regimes are defined by Unique URIs for Semantic Web Entailment Regimes
type: | rdfs:Class |
---|
An instance of sd:EntailmentProfile represents a profile of an entailment regime. An entailment profile MAY imply restrictions on what constitutes valid RDF with respect to entailment. URIs for commonly used entailment profiles are defined by Unique URIs for OWL 2 Profiles.
type: | rdfs:Class |
---|
An instance of sd:GraphCollection represents a collection of zero or more named graph descriptions. Each named graph belonging to an sd:GraphCollection SHOULD be linked with the sd:namedGraph predicate.
type: | rdfs:Class |
---|
An instance of sd:Dataset represents a SPARQL Dataset comprised of a default graph and zero or more named graphs.
The default graph of an sd:Dataset SHOULD be linked with the sd:defaultGraph predicate.
type: | rdfs:Class |
---|---|
subClassOf: | sd:GraphCollection |
In addition to the instances listed here, the following documents list instances that may be used with the properties listed below:
sd:SPARQL10Query is an sd:Language representing the SPARQL 1.0 Query language.
type: | sd:Language |
---|
sd:SPARQL11Query is an sd:Language representing the SPARQL 1.1 Query language.
type: | sd:Language |
---|
sd:SPARQLUpdate is an sd:Language representing the SPARQL 1.1 Update language.
type: | sd:Language |
---|
sd:DereferencesURIs, when used as the object of the sd:feature property, indicates that a SPARQL service will dereference URIs used in a FROM or FROM NAMED clause and use the resulting RDF in the dataset during query evaluation.
sd:UnionDefaultGraph, when used as the object of the sd:feature property, indicates that the default graph of the dataset used during query evaluation is comprised of the union of all the named graphs in the dataset.
sd:RequiresDataset, when used as the object of the sd:feature property, indicates that the query processor requires an explicit dataset declaration (based on either FROM/FROM NAMED clauses in the query or the appropriate SPARQL Protocol parameters).
sd:EmptyGraphs, when used as the object of the sd:feature property, indicates that the underlying graph store supports empty graphs. Such support impacts operations that might otherwise trigger the removal of a graph from the graph store.
The service URL of an sd:Service supporting the SparqlQuery interface. @@ add links to the Protocol 1.1 document when it reaches FPWD
type: | owl:InverseFunctionalProperty |
---|---|
domain: | sd:Service |
Relates an instance of sd:Service with a resource representing a supported feature. sd:DereferencesURIs, sd:UnionDefaultGraph, sd:RequiresDataset, and sd:EmptyGraphs are pre-defined features.
domain: | sd:Service |
---|
Relates an instance of sd:Service with a resource representing an entailment regime used for basic graph pattern matching. This property is intended for use when a single entailment regime by default applies to all graphs in the dataset. In situations where a different entailment regime applies to a specific graph in the dataset, the sd:entailmentRegime should be used to indicate this fact in the description of that graph.
subPropertyOf: | sd:feature |
---|---|
domain: | sd:Service |
range: | sd:EntailmentRegime |
Relates an instance of sd:Service with a resource representing a supported profile of the default entailment regime (as declared by sd:defaultEntailmentRegime).
subPropertyOf: | sd:feature |
---|---|
domain: | sd:Service |
range: | sd:EntailmentProfile |
Relates a named graph with a resource representing an entailment regime used for basic graph pattern matching over that graph.
domain: | sd:NamedGraph |
---|---|
range: | sd:EntailmentRegime |
Relates an instance of sd:Service to a function that may be used in a SPARQL FILTER/HAVING clause or a project expression.
subPropertyOf: | sd:feature |
---|---|
domain: | sd:Service |
range: | sd:Function |
Relates an instance of sd:Service to an aggregate operation that may be used in a SPARQL HAVING clause or project expression.
subPropertyOf: | sd:feature |
---|---|
domain: | sd:Service |
range: | sd:Aggregate |
Relates an instance of sd:Service to a resource representing an implemented extension to the SPARQL Query or Update language.
subPropertyOf: | sd:feature |
---|---|
domain: | sd:Service |
sd:languageExtension is an rdfs:subPropertyOf sd:feature. The rdfs:domain of sd:languageExtension is sd:Service.
Relates an instance of sd:Service to a SPARQL language subset (e.g. Query and Update) that it implements.
subPropertyOf: | sd:feature |
---|---|
domain: | sd:Service |
range: | sd:Language |
Relates an instance of sd:Service to a resource representing an implemented feature to the SPARQL Query or Update language that is accessed by using the named property.
subPropertyOf: | sd:feature |
---|---|
domain: | sd:Service |
Relates an instance of sd:Service to a description of the default dataset available when no explicit dataset is specified.
domain: | sd:Service |
---|---|
range: | sd:Dataset |
Relates an instance of sd:Service to a description of the graphs that may be used in the construction of a dataset either via the SPARQL Protocol or with FROM/FROM NAMED clauses in the query.
domain: | sd:Service |
---|---|
range: | sd:GraphCollection |
Relates an instance of sd:Service to a format that is supported for serializing query results. URIs for commonly used serialization formats are defined by Unique URIs for File Formats.
domain: | sd:Service |
---|
Relates an instance of sd:Service to a format that is supported for parsing RDF input (for example, via a SPARQL 1.1 Update LOAD statement or an HTTP PUT as described by SPARQL 1.1 Uniform HTTP Protocol for Managing RDF Graphs). URIs for commonly used serialization formats are defined by Unique URIs for File Formats.
domain: | sd:Service |
---|
Relates an instance of sd:Dataset to the description of its default graph.
domain: | sd:Service |
---|---|
range: | sd:Graph |
Relates an instance of sd:GraphCollection to the description of one of its named graphs. The description of such a named graph MUST include the sd:name and sd:graph properties.
domain: | sd:GraphCollection |
---|---|
range: | sd:NamedGraph |
The following HTTP trace illustrates the retrieval of a service description from the SPARQL service http://www.example/sparql/.
@@ Add use of sd:availableGraphDescriptions to example.
GET /sparql/ HTTP/1.1 Host: www.example
The SPARQL service responds with an RDF/XML encoded service description (no content negotiation or RDFa encoding is used):
HTTP/1.1 200 OK Date: Fri, 09 Oct 2009 17:31:12 GMT Server: Apache/1.3.29 (Unix) PHP/4.3.4 DAV/1.0.3 Connection: close Content-Type: application/rdf+xml <?xml version="1.0" encoding="utf-8"?> <rdf:RDF xmlns:ex="http://example/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:scovo="http://purl.org/NET/scovo#" xmlns:sd="http://www.w3.org/ns/sparql-service-description#" xmlns:void="http://rdfs.org/ns/void#"> <sd:Service> <sd:url rdf:resource="http://www.example/sparql/"/> <sd:feature rdf:resource="http://www.w3.org/ns/sparql-service-description#DereferencesURIs"/> <sd:extensionFunction> <sd:ScalarFunction rdf:about="java:com.ldodds.sparql.Distance"/> </sd:extensionFunction> <sd:defaultDatasetDescription> <sd:Dataset> <sd:defaultGraph> <sd:Graph> <void:statItem> <rdf:Description> <scovo:dimension rdf:resource="http://rdfs.org/ns/void#numberOfTriples"/> <rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">100</rdf:value> </rdf:Description> </void:statItem> </sd:Graph> </sd:defaultGraph> <sd:namedGraph> <rdf:Description> <sd:name rdf:resource="http://www.example/named-graph"/> <sd:graph> <sd:Graph> <void:statItem> <rdf:Description> <scovo:dimension rdf:resource="http://rdfs.org/ns/void#numberOfTriples"/> <rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">2000</rdf:value> </rdf:Description> </void:statItem> </sd:Graph> </sd:graph> </rdf:Description> </sd:namedGraph> </sd:Dataset> </sd:defaultDatasetDescription> </sd:Service> </rdf:RDF>
This RDF describes a SPARQL service available at the URL http://www.example/sparql/ that will dereference URLs used in FROM/FROM NAMED clauses, supports the java:com.ldodds.sparql.Distance extension function, and has a dataset with a default graph and one named graph, both described using the voiD vocabulary. The default graph contains 100 triples while the graph named http://www.example/named-graph contains 2000 triples.
$Log: Overview.html,v $ Revision 1.2 2010/10/13 17:23:18 apollere2 Added:This is a Working Draft.
Revision 1.1 2010/10/08 05:53:23 apollere2 Moved gen.html to Overview.html Revision 1.3 2010/10/07 15:51:10 gwilliam Lowercased html lang="en" attribute. Revision 1.2 2010/10/06 17:31:21 gwilliam pubrules fixes Revision 1.40 2010/10/05 15:28:02 gwilliam Updated document to use styling from local.css. Revision 1.39 2010/10/05 15:05:36 gwilliam Punctuation fixes. Revision 1.38 2010/10/05 14:51:25 gwilliam Reformatted schema information for classes/instances with html tables. Revision 1.37 2010/10/05 14:01:52 gwilliam Reformatted schema information for properties with html tables. Revision 1.36 2010/10/05 02:21:08 gwilliam Reworded description of sd:Language. Updated the description of changes made since last the previous working draft. Revision 1.35 2010/09/24 20:04:20 gwilliam Updated editor's comments. Revision 1.34 2010/09/24 19:51:00 gwilliam Formatting changes based on WG reviews. Revision 1.33 2010/08/30 16:41:08 gwilliam Added anchors for all div3 sections. Revision 1.32 2010/08/30 01:17:02 gwilliam Added cross-section links. Typo fixes and rewording based on draft feedback. Added sd:inputFormat. Revision 1.31 2010/05/25 15:09:37 gwilliam Updated the description of changes made since last the previous working draft. Revision 1.30 2010/05/10 02:50:30 gwilliam Added link for formats URIs. Added rdfs:domain for sd:graph. Fixed typos. Revision 1.29 2010/05/04 15:21:49 gwilliam Fixed formatting of sd:resultFormat definition. Revision 1.28 2010/05/04 15:19:00 gwilliam Added link to W3C list of Unique URIs for File Formats. Revision 1.27 2010/04/27 02:05:08 gwilliam Added sd:EmptyGraphs, fixed typo in sd:entailmentRegime. Revision 1.26 2010/04/18 19:18:08 gwilliam Renamed sd:named to sd:name. Split Functions and Aggregates, and added sd:extensionAggregate. Revision 1.25 2010/03/30 17:34:52 gwilliam Updated based on F2F3 decisions including: Added note about Unique URIs for serialization formats. Added named graph rdfs:domain for sd:supportedEntailment. Updated references section and added SPARQL Protocol reference. Revision 1.24 2010/03/20 18:45:10 gwilliam Added classes sd:GraphCollection, sd:Graph, and sd:NamedGraph. Made sd:Dataset a subclass of sd:GraphCollection. Updated list of sd:Language instances. Added sd:RequiresDataset feature. Added properties sd:propertyFeature, sd:resultFormat. Made sd:namedGraph have domain of sd:GraphCollection and range of sd:NamedGraph. Made sd:named have domain of sd:NamedGraph. Revision 1.23 2010/01/22 00:57:56 apollere2 Changed anticipated pub date to 26 Revision 1.22 2010/01/21 22:06:15 apollere2 Added previous location. Revision 1.21 2010/01/21 22:01:29 apollere2 changed date. Revision 1.20 2010/01/06 02:42:35 gwilliam Added missing entailment profiles link text. Revision 1.19 2010/01/06 02:40:59 gwilliam Added link to W3C defined entailment profiles. Revision 1.18 2010/01/05 03:22:41 gwilliam Updated class/property descriptions. Updated summary of changes. Added @@ comments for needed changes. Revision 1.17 2010/01/02 01:15:12 gwilliam Capitalized feature IRIs. Added description of sd:Function. Revision 1.16 2009/12/23 23:03:09 gwilliam pluralization fix. removed trailing slash on graph name IRI. removed extra section markup in CVS History. Revision 1.15 2009/12/18 21:01:34 gwilliam Added entialment regimes link. Added entailment profile class and properties. Added sd:entailmentRegime. Renamed supportedEntailment to defaultEntailmentRegime. Revision 1.14 2009/12/18 19:57:08 gwilliam Added sd:named and sd:graph properties. Updated example RDF. Revision 1.13 2009/12/15 05:44:13 gwilliam summary of changes since fpwd. replaced more uses of sd:defaultDataset. Revision 1.12 2009/12/15 05:03:07 gwilliam Renamed defaultDataset to defaultDatasetDescription. Revision 1.11 2009/12/01 04:58:49 gwilliam Added feature IRIs and updated datase description terms per 2009-11-24 telecon. Revision 1.10 2009/12/01 04:07:02 gwilliam Added sd:Dataset class, description of sd:SPARQLQuery and sd:SPARQLUpdate, and fixed whitespace formatting in CVS Log. Revision 1.9 2009/10/21 03:29:49 lfeigenb pubrules fixes Revision 1.8 2009/10/21 03:19:15 lfeigenb publication prep Revision 1.7 2009/10/20 20:47:23 lfeigenb validation errors Revision 1.6 2009/10/20 19:45:51 lfeigenb small fixes for naming and cleanup Revision 1.5 2009/10/20 18:03:06 lfeigenb move to using the shared XML spec materials Revision 1.4 2009/10/20 15:53:20 lfeigenb updated NS URI as per Oct-20 meeting Revision 1.3 2009/10/20 14:25:47 gwilliam Fixed base.uri. Commented out TURTLE reference. Revision 1.2 2009/10/20 13:59:34 gwilliam Removed duplicate namespace section. Revision 1.1 2009/10/20 04:21:12 gwilliam CREATED