Home | Trees | Index | Help |
---|
Package rdflib :: Package sparql :: Module graphPattern :: Class GraphPattern |
|
Method Summary | |
---|---|
| |
Adding means concatenating all the patterns and filters arrays | |
Adding means concatenating all the patterns and filters arrays | |
__repr__(self)
| |
__str__(self)
| |
Add a global filter constraint to the graph pattern. | |
Add a list of global filter constraints to the graph pattern. | |
Append a tuple to the local patterns. | |
Append a list of tuples to the local patterns. | |
Add triples to a tripleStore based on a variable bindings of the patterns stored locally. | |
Insert a tuple to to the start of local patterns. | |
Insert a list of tuples to the start of the local patterns. | |
Boolean |
Is the pattern empty? |
Method Details |
---|
__init__(self,
patterns=[])
|
__add__(self,
other)
Adding means concatenating all the patterns and filters arrays
|
__iadd__(self, other)Adding means concatenating all the patterns and filters arrays |
addConstraint(self, func)Add a global filter constraint to the graph pattern. 'func' must be a method with a single input parameter (a dictionary) returning a boolean. This method is added to previously added methods, ie, all methods must return True to accept a binding.
|
addConstraints(self, lst)Add a list of global filter constraints to the graph pattern. Each function in the list must be a method with a single input parameter (a dictionary) returning a boolean. These methods are added to previously added methods, ie, all methods must return True to accept a binding.
|
addPattern(self, tupl)Append a tuple to the local patterns. Possible type literals are converted to real literals on the fly. Each tuple should be contain either 3 elements (for an RDF Triplet pattern) or four, where the fourth element is a per-pattern constraint (filter). (The general constraint of SPARQL can be optimized by assigning a constraint to a specific pattern; because it stops the graph expansion, its usage might be much more optimal than the the 'global' constraint).
|
addPatterns(self, lst)Append a list of tuples to the local patterns. Possible type literals are converted to real literals on the fly. Each tuple should be contain either three elements (for an RDF Triplet pattern) or four, where the fourth element is a per-pattern constraint. (The general constraint of SPARQL can be optimized by assigning a constraint to a specific pattern; because it stops the graph expansion, its usage might be much more optimal than the the 'global' constraint).
|
construct(self, tripleStore, bindings)Add triples to a tripleStore based on a variable bindings of the patterns stored locally. The triples are patterned by the current Graph Pattern. The method is used to construct a graph after a successful querying.
|
insertPattern(self, tupl)Insert a tuple to to the start of local patterns. Possible type literals are converted to real literals on the fly. Each tuple should be contain either 3 elements (for an RDF Triplet pattern) or four, where the fourth element is a per-pattern constraint (filter). (The general constraint of SPARQL can be optimized by assigning a constraint to a specific pattern; because it stops the graph expansion, its usage might be much more optimal than the the 'global' constraint). Semantically, the behaviour induced by a graphPattern does not depend on the order of the patterns. However, due to the behaviour of the expansion algorithm, users may control the speed somewhat by adding patterns that would 'cut' the expansion tree soon (ie, patterns that reduce the available triplets significantly). API users may be able to do that, hence this additional method.
|
insertPatterns(self, lst)Insert a list of tuples to the start of the local patterns. Possible type literals are converted to real literals on the fly. Each tuple should be contain either three elements (for an RDF Triplet pattern) or four, where the fourth element is a per-pattern constraint. (The general constraint of SPARQL can be optimized by assigning a constraint to a specific pattern; because it stops the graph expansion, its usage might be much more optimal than the the 'global' constraint). Semantically, the behaviour induced by a graphPattern does not depend on the order of the patterns. However, due to the behaviour of the expansion algorithm, users may control the speed somewhat by adding patterns that would 'cut' the expansion tree soon (ie, patterns that reduce the available triplets significantly). API users may be able to do that, hence this additional method.
|
isEmpty(self)Is the pattern empty?
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Wed Jun 29 09:50:16 2005 | http://epydoc.sf.net |