| Home | Trees | Index | Help |
|---|
| Package rdflib :: Package sparql |
|
TODO: merge this first bit from sparql.sparql.py into rest of doc... updating all along the way.
SPARQL implementation on top of RDFLib
Implementation of the <a
href="http://www.w3.org/TR/rdf-sparql-query/">W3C
SPARQL</a> language (version April 2005). The basic class here is
supposed to be a superclass of rdflib.sparql.sparqlGraph; it has been
separated only for a better maintainability.
There is a separate description for the functionalities.
For a general description of the SPARQL API, see the separate, more complete description.from rdflibUtils import myTripleStore from rdflibUtils import retrieveRDFFiles from rdflibUtils import SPARQLError from rdflibUtils import GraphPatternThe module imports and/or creates some frequently used Namespaces, and these can then be imported by the user like:
from rdflibUtils import ns_rdfFinally, the package also has a set of convenience string defines for XML Schema datatypes (ie, the URI-s of the datatypes); ie, one can use:
from rdflibUtils import type_string from rdflibUtils import type_integer from rdflibUtils import type_long from rdflibUtils import type_double from rdflibUtils import type_float from rdflibUtils import type_decimal from rdflibUtils import type_dateTime from rdflibUtils import type_date from rdflibUtils import type_time from rdflibUtils import type_duration
These are used, for example, in the sparql-p implementation.
The three most important classes in RDFLib for the average user are Namespace, URIRef and Literal; these are also imported, so the user can also use, eg:from rdflibUtils import Namespace, URIRef, Literal
GraphPattern class, etc).
myTripleStore
to handle Alt and Bag the same way as
Seq - added also methods to add collections and
containers to the triple store, not only retrieve them
Version: 2.2
Author: Ivan Herman
Contact: Ivan Herman, ivan@ivan-herman.net
License: This software is available for use under the W3C Software License
| Submodules | |
|---|---|
| |
| Classes | |
|---|---|
Processor |
|
| Exceptions | |
|---|---|
SPARQLError |
Am SPARQL error has been detected |
| Function Summary | |
|---|---|
| a function suitable as a sparql filter |
Generate a function that can then be used as a global constaint in sparql to check whether the 'item' is an element of the 'collection' (a.k.a. |
| Function Details |
|---|
generateCollectionConstraint(triplets, collection, item)Generate a function that can then be used as a global constaint in sparql to check whether the 'item' is an element of the 'collection' (a.k.a. list). Both collection and item can be a real resource or a query string. Furthermore, item might be a plain string, that is then turned into a literal run-time. The function returns an adapted filter method that can then be plugged into a sparql request.
|
| Home | Trees | Index | Help |
|---|
| Generated by Epydoc 2.1 on Wed Apr 4 16:05:47 2007 | http://epydoc.sf.net |