Interface SPARQLGroupPattern
- All Superinterfaces:
Query
,SPARQLGraphPattern
- All Known Implementing Classes:
SPARQLGroupPatternImpl
A SPARQL group pattern represents a collection of SPARQL graph patterns
for which the results are meant to be joined. Hence, when considering an
algebraic representation of SPARQL queries, the algebraic operator that
corresponds to such a group pattern is a multiway join.
-
Method Summary
Modifier and TypeMethodDescriptionApplies the given solution mapping to this graph pattern and returns the resulting graph pattern in which all occurrences of the variables bound by the given solution mapping are replaced by the RDF terms that the solution mappings assigns to these variables.int
Returns the number of graph patterns that are combined in this group pattern.Returns all graph patterns that are combined in this group pattern.getSubPatterns
(int i) Returns the i-th of the graph patterns that are combined in this group pattern, where i starts at index 0 (zero).Methods inherited from interface se.liu.ida.hefquin.base.query.SPARQLGraphPattern
getAllMentionedTPs, getAllMentionedVariables, getCertainVariables, getExpectedVariables, getNumberOfTermMentions, getNumberOfVarMentions, getPossibleVariables, mergeWith, mergeWith, mergeWith
-
Method Details
-
getNumberOfSubPatterns
int getNumberOfSubPatterns()Returns the number of graph patterns that are combined in this group pattern. -
getSubPatterns
Iterable<SPARQLGraphPattern> getSubPatterns()Returns all graph patterns that are combined in this group pattern. -
getSubPatterns
Returns the i-th of the graph patterns that are combined in this group pattern, where i starts at index 0 (zero). If this group pattern has fewer sub-patterns, then anIndexOutOfBoundsException
will be thrown.- Throws:
IndexOutOfBoundsException
-
applySolMapToGraphPattern
SPARQLGroupPattern applySolMapToGraphPattern(SolutionMapping sm) throws VariableByBlankNodeSubstitutionException Description copied from interface:SPARQLGraphPattern
Applies the given solution mapping to this graph pattern and returns the resulting graph pattern in which all occurrences of the variables bound by the given solution mapping are replaced by the RDF terms that the solution mappings assigns to these variables.- Specified by:
applySolMapToGraphPattern
in interfaceSPARQLGraphPattern
- Throws:
VariableByBlankNodeSubstitutionException
- if one of the variables would be replaced by a blank node
-