Package rdflib :: Package sparql :: Module sparqlGraph :: Class SPARQLGraph
[show private | hide private]
[frames | no frames]

Class SPARQLGraph

SPARQL --+
         |
        SPARQLGraph


A wrapper class around the original triple store, that includes some additional utility methods
Method Summary
  __init__(self, graph)
  __add__(self, other)
Set theoretical union
  __getattr__(self, attr)
  __mul__(self, other)
Set theoretical intersection
  __sub__(self, other)
Set theoretical difference
sparqlGraph cluster(self, seed)
Cluster up and down, by summing up the forward and backward clustering
sparqlGraph clusterBackward(self, seed, Cluster)
Cluster the triple store: from a seed, transitively get all properties and objects 'backward', ie, following the link back in the graph.
sparqlGraph clusterForward(self, seed, Cluster)
Cluster the triple store: from a seed, transitively get all properties and objects in direction of the arcs.
    Inherited from SPARQL
list of tuples query(self, selection, patterns, optionalPatterns, initialBindings)
A shorthand for the creation of a Query instance, returning the result of a Query.select right away.
Query queryObject(self, patterns, optionalPatterns, initialBindings)
Creation of a Query instance.
  sparqlQuery(self, selectU, where, constraints, optional)
A shorthand for the creation of a Query instance and returning the result of a selection right away.

Method Details

__add__(self, other)
(Addition operator)

Set theoretical union

__mul__(self, other)

Set theoretical intersection

__sub__(self, other)
(Subtraction operator)

Set theoretical difference

cluster(self, seed)

Cluster up and down, by summing up the forward and backward clustering
Parameters:
seed - RDFLib Resource
Returns:
The triple store containing the cluster
           (type=sparqlGraph)

clusterBackward(self, seed, Cluster=None)

Cluster the triple store: from a seed, transitively get all properties and objects 'backward', ie, following the link back in the graph.
Parameters:
seed - RDFLib Resource
Cluster - another sparqlGraph instance; if None, a new one will be created. The subgraph will be added to this graph.
Returns:
The triple store containing the cluster
           (type=sparqlGraph)

clusterForward(self, seed, Cluster=None)

Cluster the triple store: from a seed, transitively get all properties and objects in direction of the arcs.
Parameters:
seed - RDFLib Resource
Cluster - another sparqlGraph instance; if None, a new one will be created. The subgraph will be added to this graph.
Returns:
The triple store containing the cluster
           (type=sparqlGraph)

Generated by Epydoc 2.1 on Mon Oct 23 14:11:23 2006 http://epydoc.sf.net