W3C

SPARQL 1.1 Service Description

W3C Working Draft 26 January 2010

This version:
http://www.w3.org/TR/2010/WD-sparql11-service-description-20100126/
Latest version:
http://www.w3.org/TR/sparql11-service-description/
Previous version:
http://www.w3.org/TR/2009/WD-sparql11-service-description-20091022/
Editor:
Gregory Todd Williams, Rensselaer Polytechnic Institute <greg@evilfunhouse.com>

Abstract

This document describes SPARQL Service Description, a method for discovering and vocabulary for describing SPARQL services made available via the SPARQL Protocol. 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.

Status of this Document

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.

Change Summary

Since the publication of the first public working draft of this document, the following changes have been made. IRIs for two commonly implemented features were added: the ability to dereference URIs used in FROM/FROM NAMED clauses (sd:DereferencesURIs) and the use of the default graph as the union of all named graphs in a dataset (sd:UnionDefaultGraph). The vocabulary used for describing datasets and graphs was updated. The vocabulary for describing supported entailment regimes was updated and a way to describe entailment profiles was added. Properties for linking an sd:Dataset to its default and named graphs were added. In addition to describing the default dataset, it is now possible to ennumerate the graphs that are available for use in constructing a dataset with FROM and FROM NAMED clauses (sd:availableGraphDescriptions). Furthermore, the extra "URL" property for describing the location of a dataset description file was dropping in preference of using dereferencable sd:Dataset URIs.

No Endorsement

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.

Patents

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.

Table of Contents

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:ScalarFunction
        3.2.5 sd:AggregateFunction
        3.2.6 sd:EntailmentRegime
        3.2.7 sd:EntailmentProfile
        3.2.8 sd:Dataset
    3.3 Instances
        3.3.1 sd:SPARQLQuery
        3.3.2 sd:SPARQLUpdate
        3.3.3 sd:DereferencesURIs
        3.3.4 sd:UnionDefaultGraph
    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:languageExtension
        3.4.8 sd:supportedLanguage
        3.4.9 sd:defaultDatasetDescription
        3.4.10 sd:availableGraphDescriptions
        3.4.11 sd:defaultGraph
        3.4.12 sd:namedGraph
        3.4.13 sd:named
        3.4.14 sd:graph
4 Example

Appendices

A References
    A.1 Normative References
B CVS History


1 Introduction

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.

2 Accessing a Service Description

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.

3 Service Description Vocabulary

3.1 SPARQL Service Description Namespace

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:.

3.2 Classes

3.2.1 sd:Service

An instance of sd:Service represents a SPARQL service made available via the SPARQL Protocol.

sd:Service is an instance of rdfs:Class.

3.2.2 sd:Language

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.

3.2.3 sd:Function

An instance of sd:Function represents a function that may be called as part of a FILTER/HAVING clause or aggregate or project expression.

sd:Function is an instance of rdfs:Class.

3.2.4 sd:ScalarFunction

An instance of sd:ScalarFunction represents an extension function that may be used in a SPARQL FILTER/HAVING clause or a project expression.

sd:ScalarFunction is a subclass of sd:Function.

3.2.5 sd:AggregateFunction

An instance of sd:AggregateFunction represents an extension function that may be used in a SPARQL aggregate query HAVING clause or project expression.

sd:AggregateFunction is a subclass of sd:Function

3.2.6 sd:EntailmentRegime

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). IRIs for commonly used entailment regimes are defined by Unique URIs for Semantic Web Entailment Regimes. @@ proper way to cite this?

sd:EntailmentRegime is an instance of rdfs:Class.

3.2.7 sd:EntailmentProfile

An instance of sd:EntailmentProfile represents a profile of an entailment regime. An entialment profile MAY imply restrictions on what constitutes valid RDF with respect to entailment. IRIs for commonly used entailment profiles are defined by Unique URIs for OWL 2 Profiles.

sd:EntailmentProfile is an instance of rdfs:Class.

3.2.8 sd:Dataset

An instance of sd:Dataset represents a SPARQL Dataset comprised of a default graph and zero or more named graphs.

3.3 Instances

@@ Need to update list of instances with defined entailment profiles and supported functions.

3.3.1 sd:SPARQLQuery

sd:SPARQLQuery is an instance of sd:Language.

3.3.2 sd:SPARQLUpdate

sd:SPARQLUpdate is an instance of sd:Language.

3.3.3 sd:DereferencesURIs

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.

3.3.4 sd:UnionDefaultGraph

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.

3.4 Properties

3.4.1 sd:url

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.

3.4.2 sd:feature

Releates an instance of sd:Service with a resource representing a supported feature.

The rdfs:domain of sd:feature is sd:Service.

3.4.3 sd:defaultEntailmentRegime

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.

3.4.4 sd:supportedEntailmentProfile

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.

3.4.5 sd:entailmentRegime

Releates a graph with a resource representing an entailment regime used for basic graph pattern matching over that graph.

The rdfs:range of sd:supportedEntailment is sd:EntailmentRegime. @@ We don't have a class for graphs yet. @@ Should the range of this be the graph, or the named graph bnode (as used in the example below) -- the bnode is scoped to the dataset, but the graph description might span several different endpoints that use different entailments.

@@ Perhaps there is a better name for this property that differs in more than capitalization from sd:EntailmentRegime?

3.4.6 sd:extensionFunction

Releates an instance of sd:Service to a function that is supported as either a scalar, value testing function (as described in SPARQL 11.6 @@ old sparql spec reference) or an aggregate function. The rdf:type of the function may be used to indicate which of these function types apply, being either sd:ScalarFunction or sd:AggregateFunction.

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.

3.4.7 sd:languageExtension

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.

3.4.8 sd:supportedLanguage

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.

3.4.9 sd:defaultDatasetDescription

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.

3.4.10 sd:availableGraphDescriptions

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 modeling of the rdfs:range of this property (representing a collection of named graphs) has not been finished yet.

3.4.11 sd:defaultGraph

Relates an instance of sd:Dataset to the description of its default graph.

The rdfs:domain of sd:defaultGraph is sd:Dataset.

3.4.12 sd:namedGraph

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:named and sd:graph properties.

The rdfs:domain of sd:defaultGraph is sd:Dataset. @@ What is the rdfs:range of this property? It's not a graph because that's the range of sd:graph...

3.4.13 sd:named

Relates a named graph to the name by which it may be referenced in a FROM/FROM NAMED clause.

3.4.14 sd:graph

Relates a named graph to its graph description.

@@ For symmetry, this might be better named sd:graphDescription.

4 Example

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:named 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.

A References

A.1 Normative References

SPARQL/Query 1.0
SPARQL Query Language for RDF, ed. Eric Prud'hommeaux, Andy Seaborne. W3C Recommendation 15 January 2008. (See http://www.w3.org/TR/rdf-sparql-query/.)

B CVS History

$Log: Overview.html,v $
Revision 1.3  2018/10/09 13:23:38  denis
fix validation of xhtml documents

Revision 1.2  2017/10/02 10:42:18  denis
add fixup.js to old specs

Revision 1.1  2010/01/27 16:24:12  bertails
sparql

Revision 1.13  2010/01/22 00:57:56  apollere2
Changed anticipated pub date to 26

Revision 1.12  2010/01/22 00:18:52  apollere2
Added change-summary header.

Revision 1.11  2010/01/22 00:10:38  apollere2
Added Patents and No Endoresement boilerplates.

Revision 1.10  2010/01/21 23:53:12  apollere2
Changed current version URI.

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