Home | Trees | Index | Help |
---|
Package rdflib :: Package sparql :: Module sparqlGraph :: Class SPARQLGraph |
|
SPARQL
--+
|
SPARQLGraph
Method Summary | |
---|---|
__init__(self,
graph)
| |
Set theoretical union | |
__getattr__(self,
attr)
| |
Set theoretical intersection | |
Set theoretical difference | |
myTripleStore
|
Cluster up and down, by summing up the forward and backward clustering |
myTripleStore
|
Cluster the triple store: from a seed, transitively get all properties and objects 'backward', ie, following the link back in the graph. |
myTripleStore
|
Cluster the triple store: from a seed, transitively get all properties and objects in direction of the arcs. |
Poor man's RDFS entailement. | |
Alt
|
Check if resource is an rdf:Alt. |
Bag
|
Check if resource is an rdf:Bag. |
RDFLib Resource |
Get a subject value for predicate and a value. |
an RDFLib Resource |
Get a predicate value for an subject. |
Seq
|
Check if resource is an rdf:Seq. |
Boolean |
Checking the truthfulness of a triplet, ie, its existence. |
Alt
|
Store a Seq container. |
Bag
|
Store a Seq container. |
Store a (Python) list as an RDF List, ie, a collection. | |
Seq
|
Store a Seq container. |
list |
Return a list of, well, list (collection) elements in RDF. |
Inherited from SPARQL | |
list of tuples |
A shorthand for the creation of a Query instance, returning the result of a
Query.select right away. |
Query
|
Creation of a Query instance. |
A shorthand for the creation of a Query instance and returning the result of
a selection right away. |
Method Details |
---|
__add__(self,
other)
Set theoretical union
|
__mul__(self, other)Set theoretical intersection |
__sub__(self,
other)
Set theoretical difference
|
cluster(self, seed)Cluster up and down, by summing up the forward and backward clustering
|
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.
|
clusterForward(self, seed, Cluster=None)Cluster the triple store: from a seed, transitively get all properties and objects in direction of the arcs.
|
extendRdfs(self)Poor man's RDFS entailement. The method does not do a full RDFS entailement (this would greatly increase the size of the triple store, and RDFLib may not be efficient enough for that). Instead:
|
getAlt(self, resource)Check if resource is an rdf:Alt. If yes, it returns a Alt class instance, None otherwise.
|
getBag(self, resource)Check if resource is an rdf:Bag. If yes, it returns a Bag class instance, None otherwise.
|
getPredicateSubject(self, p, v)Get a subject value for predicate and a value. Useful if one knows that there may only be one... Returns None if no value exists. It is one of those situations that occur a lot, hence this 'macro' like utility.
|
getPredicateValue(self, s, p)Get a predicate value for an subject. Useful if one knows that there may only be one... Returns None if no value exists. It is one of those situations that occur a lot, hence this 'macro' like utility.
|
getSeq(self, resource)Check if resource is an rdf:Seq. If yes, it returns a Seq class instance, None otherwise.
|
isTrue(self, s, p, o)Checking the truthfulness of a triplet, ie, its existence. Returns True/False. It is just an idiom...
|
storeAlt(self, elements, name=None)Store a Seq container. Elements given as an array are added to the triple store. The BNode for the container is created on the fly.
|
storeBag(self, elements, name=None)Store a Seq container. Elements given as an array are added to the triple store. The BNode for the container is created on the fly.
|
storeCollection(self, elements, name=None)Store a (Python) list as an RDF List, ie, a collection.
|
storeSeq(self, elements, name=None)Store a Seq container. Elements given as an array are added to the triple store. The BNode for the container is created on the fly.
|
unfoldCollection(self, resource)Return a list of, well, list (collection) elements in RDF. Rdflib's store has a method called item, which is generator over list elements. In some cases this is just enough. However, the advantage of using this method is that it returns a Python list that can be, for example, sliced, massaged, etc, and that is sometimes quite useful.
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Wed Jun 29 09:50:16 2005 | http://epydoc.sf.net |