SPARQL Query Language for RDF
Popularity Report
![]() |
|||
![]() |
|||
![]() |
|||
![]() |
|||
![]() |
|||
![]() |
URL Tag Cloud
- rdf
- , sparql
- , semanticweb
- , reference
- , w3c
- , query
- , xml
- , semantic
- , semweb
- , owl
- , programming
- , development
- , web
- , toread
- , access
- , wsdl
- , standards
- , metadata
- , semantic_web
Bookmark History
Saved by 42 people (19 private), first by anonymouse user on 2006-03-24
- Jaffamonkey on 2008-09-11 - Tags semanticweb , sparql , rdf , w3c , xml
- Cydawn on 2008-07-05 - Tags semantic
- Bt2000 on 2008-06-19 - Tags no_tag
- Arobase on 2008-06-10 - Tags [Nom du dossier]
- Tgtlwtpeabs on 2008-06-02 - Tags Links , RDF
Public Sticky notes
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Definition: Group Graph Pattern
A group graph pattern GP is a set of graph patterns, GPi.
A solution of Group Graph Pattern GP on graph G is any solution S such that, for every element GPi of GP, S is a solution of GPi.
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
UNION keyword is the syntax for pattern
alternatives.
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Definition: Union Graph Pattern
A union graph pattern is a set of graph patterns GPi.
A union graph pattern matches a graph G with solution S if there is some GPi such that GPi matches G with solution S.
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Example 1:
# Default graph
@prefix dc: <http://purl.org/dc/elements/1.1/> .
<http://example.org/bob> dc:publisher "Bob" .
<http://example.org/alice> dc:publisher "Alice" .
# Named graph: http://example.org/bob
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
_:a foaf:name "Bob" .
_:a foaf:mbox <mailto:bob@oldcorp.example.org> .
# Named graph: http://example.org/alice
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
_:a foaf:name "Alice" .
_:a foaf:mbox <mailto:alice@work.example.org> .
Highlighted by cosentino
In this next example, the named graphs contain the same triples as before. The RDF dataset includes an RDF merge of the named graphs in the default graph, re-labeling blank nodes to keep them distinct.
# Default graph @prefix foaf: <http://xmlns.com/foaf/0.1/> . _:x foaf:name "Bob" . _:x foaf:mbox <mailto:bob@oldcorp.example.org> . _:y foaf:name "Alice" . _:y foaf:mbox <mailto:alice@work.example.org> .
# Named graph: http://example.org/bob @prefix foaf: <http://xmlns.com/foaf/0.1/> . _:a foaf:name "Bob" . _:a foaf:mbox <mailto:bob@oldcorp.example.org> .
# Named graph: http://example.org/alice @prefix foaf: <http://xmlns.com/foaf/0.1/> . _:a foaf:name "Alice" . _:a foaf:mbox <mailto:alice@work.example> .
Highlighted by cosentino
Highlighted by cosentino
GRAPH
keyword is used to match patterns against named graphs.
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
GRAPH clause may also be
used in another GRAPH
clause or in a graph pattern matched against the default graph in the
dataset.
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
FROM clauses give IRIs that the query processor
can use to create the default graph and the FROM NAMED
clause can be used to specify named graphs.
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
FROM and FROM NAMED
keywords allow a query to specify an RDF dataset by reference; they indicate that the
dataset should include graphs
that are obtained from representations of the resources
identified by the given IRIs
Highlighted by cosentino
The dataset resulting from a number of FROM and
FROM NAMED
clauses is:
- a default graph consisting of the merge of the graphs referred to in the
FROMclauses - a set of (IRI, graph) pairs, one from each
FROM NAMEDclause.
Highlighted by cosentino
Highlighted by cosentino
FROM clause contains an IRI that indicates the
graph to be used to form the default graph.
Highlighted by cosentino
FROM NAMED clause.
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
FROM NAMED syntax suggests that the
IRI
identifies the corresponding graph, but actually the relationship between a URI and
a graph in an RDF dataset is indirect. The IRI identifies a resource, and the
resource is represented by a graph (or, more precisely: by a document that
serializes a graph).
Highlighted by cosentino
Highlighted by cosentino
Highlighted by cosentino
Highlighted by audreyh
Highlighted by cosentino
Highlighted by titter
Highlighted by titter
Highlighted by titter
Highlighted by titter
Highlighted by titter
Highlighted by titter
Highlighted by titter
SELECT clause
Highlighted by titter
Highlighted by titter
Highlighted by titter
WHERE clause
Highlighted by titter
Highlighted by titter
Highlighted by titter
Highlighted by titter
SELECT query form
returns variable bindings
Highlighted by titter
CONSTRUCT query form
returns an RDF graph.
Highlighted by titter
Highlighted by titter
FILTERs
Highlighted by titter
Highlighted by titter
Highlighted by titter
Highlighted by titter
UNION
Highlighted by titter
Highlighted by titter
RDF is a directed, labeled graph data format for representing information in the Web. RDF is often used to represent, among other things, personal information, social networks, metadata about digital artifacts, as well as to provide a means of integration over disparate sources of information. This specification defines the syntax and semantics of the SPARQL query language for RDF.
The SPARQL query language for RDF is designed to meet the use cases and requirements identified by the RDF Data Access Working Group in RDF Data Access Use Cases and Requirements [UCNR].
The SPARQL query language is closely related to the following specifications:
- The SPARQL Protocol for RDF [SPROT] specification defines the remote protocol for issuing SPARQL queries and receiving the results.
- The SPARQL Query Results XML Format [RESULTS] specification defines an XML document format for representing the results of SPARQL SELECT and ASK queries.
Highlighted by compwoman
11.2.2 Effective Boolean Value (EBV)
Effective boolean value is used to calculate the arguments to the logical functions logical-and, logical-or, and fn:not, as well as evaluate the result of a FILTER expression.
The XQuery Effective Boolean Value rules rely on the definition of XPath's fn:boolean. The following rules reflect the rules for fn:boolean applied to the argument types present in SPARQL Queries:
- The EBV of any literal whose type is
xsd:booleanor numeric is false if the lexical form is not valid for that datatype (e.g. "abc"^^xsd:integer). - If the argument is a typed literal with a datatype of
xsd:boolean, the EBV is the value of that argument. - If the argument is a plain literal or a typed literal with a datatype of
xsd:string, the EBV is false if the operand value has zero length; otherwise the EBV is true. - If the argument is a numeric type or a typed literal with a datatype derived from a numeric type, the EBV is false if the operand value is NaN or is numerically equal to zero; otherwise the EBV is true.
- All other arguments, including unbound arguments, produce a type error.
An EBV of true is represented as a typed literal with a datatype of xsd:boolean and a lexical value of "true"; an EBV of false is represented as a typed literal with a datatype of xsd:boolean and a lexical value of "false".
Highlighted by marido


Public Comment