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 following changes have been made. New classes and properties were added: sd:GraphCollection, sd:Graph, sd:NamedGraph, sd:extensionAggregate, sd:propertyFeature, and sd:resultFormat. Two new feature instances URIs were added: sd:EmptyGraphs for indicating the support of empty graphs, and sd:RequiresDataset for indicating that an explicit dataset must be specified by either the query or the protocol. The sd:Language instance URIs was updated to include the SPARQL version number. A link was added to the W3C list of Unique URIs for File Formats to be used with the new sd:resultFormat property. The distinction between functions and aggregates was made clear by renaming properties and classes relating to aggregates. Many subclass, subproperty, domain, and range relations were added to: sd:supportedEntailment, sd:Dataset, sd:namedGraph, sd:name, and sd:graph. Finally, the sd:named property was renamed to sd:name.
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:defaultGraph
3.4.15 sd:namedGraph
3.4.16 sd:name
3.4.17 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 SHOULD be made available in an RDF serialization, and MAY be provided embedded in HTML by RDFa, or other RDF representations by using content negotiation.
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.
sd:Service is an instance of rdfs:Class.
An instance of sd:Language represents a subset of the SPARQL language that may be provided by an sd:Service. @@ Better word than "subset" to describe this?
sd:Language is an instance of rdfs:Class.
An instance of sd:Function represents a function that may be used in a SPARQL FILTER/HAVING clause or a project expression.
sd:Function is an instance of 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.
sd:AggregateFunction is an instance of rdfs:Class.
An instance of sd:EntailmentRegime represents an entailment regime used in basic graph pattern matching (as described in SPARQL 12.6 @@ old sparql spec reference). URIs for commonly used entailment regimes are defined by Unique URIs for Semantic Web Entailment Regimes @@ need to include this in the references section.
sd:EntailmentRegime is an instance of 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.
sd:EntailmentProfile is an instance of 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.
In addition to the instances listed here, the following documents list instances that may be used with the properties listed below:
@@ add these pages to the references section.
sd:SPARQL10Query is an instance of sd:Language representing the SPARQL 1.0 Query language.
sd:SPARQL11Query is an instance of sd:Language representing the SPARQL 1.1 Query language.
sd:SPARQLUpdate is an instance of sd:Language representing the SPARQL 1.1 Update 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.
The service URL of an sd:Service supporting the SparqlQuery interface. @@ this is language from the protocol document. Is it appropriate here?
sd:url is an instance of owl:InverseFunctionalProperty. The rdfs:domain of sd:url is sd:Service.
Releates an instance of sd:Service with a resource representing a supported feature.
The rdfs:domain of sd:feature is sd:Service.
Releates 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.
sd:defaultEntailmentRegime is an rdfs:subPropertyOf sd:feature. The rdfs:domain of sd:defaultEntailmentRegime is sd:Service. The rdfs:range of sd:defaultEntailmentRegime is sd:EntailmentRegime.
Releates an instance of sd:Service with a resource representing a supported profile of the default entailment regime (as declared by sd:defaultEntailmentRegime).
sd:supportedEntailmentProfile is an rdfs:subPropertyOf sd:feature. The rdfs:domain of sd:supportedEntailmentProfile is sd:Service. The rdfs:range of sd:supportedEntailmentProfile is sd:EntailmentProfile.
Releates a named graph with a resource representing an entailment regime used for basic graph pattern matching over that graph.
The rdfs:domain of sd:entailmentRegime is sd:NamedGraph. The rdfs:range of sd:entailmentRegime is 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.
sd:extensionFunction is an rdfs:subPropertyOf sd:feature. The rdfs:domain of sd:extensionFunction is sd:Service. The rdfs:range of sd:extensionFunction is sd:Function.
Relates an instance of sd:Service to an aggregate operation that may be used in a SPARQL HAVING clause or project expression.
sd:extensionAggregate is an rdfs:subPropertyOf sd:feature. The rdfs:domain of sd:extensionAggregate is sd:Service. The rdfs:range of sd:extensionAggregate is sd:Aggregate.
Releates an instance of sd:Service to a resource representing an implemented extension to the SPARQL Query or Update language.
sd:languageExtension is an rdfs:subPropertyOf sd:feature. The rdfs:domain of sd:languageExtension is sd:Service.
Releates an instance of sd:Service to a SPARQL language subset (e.g. Query and Update) that it implements.
sd:supportedLanguage is an rdfs:subPropertyOf sd:feature. The rdfs:domain of sd:supportedLanguage is sd:Service. The rdfs:range of sd:supportedLanguage is sd:Language.
Releates 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.
sd:propertyFeature is an rdfs:subPropertyOf sd:feature. The rdfs:domain of sd:propertyFeature is sd:Service.
Releates an instance of sd:Service to a description of the default dataset available when no explicit dataset is specified.
The rdfs:domain of sd:defaultDatasetDescription is sd:Service. The rdfs:range of sd:defaultDatasetDescription is sd:Dataset.
Releates 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.
The rdfs:domain of sd:availableGraphDescriptions is sd:Service. The rdfs:range of sd:availableGraphDescriptions is 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 @@ need to include this in the references section.
The rdfs:domain of sd:resultFormat is sd:Service.
Relates an instance of sd:Dataset to the description of its default graph.
The rdfs:domain of sd:defaultGraph is sd:Dataset.
Relates an instance of sd:Dataset 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.
The rdfs:domain of sd:namedGraph is sd:GraphCollection. The rdfs:range of sd:namedGraph is 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> <rdf:Description> <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> </rdf:Description> </sd:defaultGraph> <sd:namedGraph> <rdf:Description> <sd:name rdf:resource="http://www.example/named-graph"/> <sd:graph> <rdf:Description> <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> </rdf:Description> </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/06/01 17:12:48 lfeigenb fix link to css Revision 1.1 2010/06/01 15:41:02 lfeigenb initial checkin Revision 1.18 2010/05/25 18:07:47 lfeigenb for publication Revision 1.17 2010/05/25 17:11:39 lfeigenb for publication Revision 1.16 2010/05/25 17:06:40 lfeigenb for publication Revision 1.15 2010/05/25 17:05:20 lfeigenb for publication 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