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. |
Recursively build a list. | |
Cluster the triple store: from a seed, transitively get all properties and objects in backward direction of the arcs. | |
Cluster the triple store: from a seed, transitively get all properties and objects in direction of the arcs. | |
Extend the graph by a recursively adding the new triples for subproperies (calling _extendPropertiesR for possible
combinations). | |
Semi-reification for subPropertyOf: for a (s,prop,o) (s,P,o) is also added where (prop,subPropertyOf,P), and this is done recursively by adding it to target. | |
Extend the graph with the range and domains by adding new types for all predicates in the original graphs. | |
Extend the graph by a recursively adding the new types based on rdf:subClassOf (calling _extendTypesR for possible
combinations). | |
Semi-reification for subClassOf. | |
BNode |
Store a container. |
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. | |
Creation of a Query instance. |
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.
|
_buildCollection(self, elements, father)Recursively build a list.
|
_clusterBackward(self, seed, Cluster)Cluster the triple store: from a seed, transitively get all properties and objects in backward direction of the arcs.
|
_clusterForward(self, seed, Cluster)Cluster the triple store: from a seed, transitively get all properties and objects in direction of the arcs.
|
_extendProperties(self)Extend the graph by a recursively adding the new triples for subproperies (calling_extendPropertiesR for possible
combinations).
|
_extendPropertiesR(self, target, s, o, prop)Semi-reification for subPropertyOf: for a (s,prop,o) (s,P,o) is also added where (prop,subPropertyOf,P), and this is done recursively by adding it to target.
|
_extendRangeDomain(self)Extend the graph with the range and domains by adding new types for all predicates in the original graphs.
|
_extendTypes(self)Extend the graph by a recursively adding the new types based on rdf:subClassOf (calling_extendTypesR for possible
combinations).
|
_extendTypesR(self, target, res, typ)Semi-reification for subClassOf. For all X such as (typ,rdf:subClassOf,X) and for all resources such as (res,rdf:type,typ), the (res,rdf:type,X) is added to target, and then this is done recursively for (target,res,X).
|
_storeContainer(self, elements, contType, name)Store a container. Elements given as an array are added to the triple store. The BNode for the container is created on the fly.
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Wed Jun 29 09:50:16 2005 | http://epydoc.sf.net |