Class SPARQLGroupPatternImpl
java.lang.Object
se.liu.ida.hefquin.base.query.impl.SPARQLGroupPatternImpl
- All Implemented Interfaces:
 Query,SPARQLGraphPattern,SPARQLGroupPattern
- 
Field Summary
Fields - 
Constructor Summary
ConstructorsConstructorDescriptionSPARQLGroupPatternImpl(List<SPARQLGraphPattern> subPatterns) SPARQLGroupPatternImpl(SPARQLGraphPattern... subPatterns)  - 
Method Summary
Modifier and TypeMethodDescriptionvoidApplies 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.booleanReturns a set of all triple patterns that are contained within this graph pattern.Set<org.apache.jena.sparql.core.Var> Returns the set of all variables mentioned in this graph pattern, except for the variables that occur only in expressions (in FILTER or in BIND).Set<org.apache.jena.sparql.core.Var> Returns the variables that are guaranteed to be bound in every solution mapping produced for this graph pattern.Returns the sets of variables that can be expected in the solution mappings produced for this graph pattern.intReturns the number of graph patterns that are combined in this group pattern.intReturns the number of times any RDF term is mentioned in this graph pattern (if the same term is mentioned multiple times, then each of these mentions is counted), but ignores terms mentions in expressions (in FILTER or in BIND).intReturns the number of times any variable is mentioned in this graph pattern (if the same variable is mentioned multiple times, then each of these mentions is counted), but ignores variable mentions in expressions (in FILTER or in BIND).Set<org.apache.jena.sparql.core.Var> Returns the variables that may be bound in solution mappings produced for this graph pattern, but that are not guaranteed to be bound in every such solution mapping.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).inthashCode()mergeWith(SPARQLGraphPattern other) If the given pattern is also aSPARQLGroupPattern, then this method returns aSPARQLGroupPatternthat consists of all the sub-patterns of this group pattern plus all the sub-patterns of the givenSPARQLGroupPattern.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface se.liu.ida.hefquin.base.query.SPARQLGraphPattern
mergeWith, mergeWith 
- 
Field Details
- 
subPatterns
 
 - 
 - 
Constructor Details
- 
SPARQLGroupPatternImpl
 - 
SPARQLGroupPatternImpl
 
 - 
 - 
Method Details
- 
getNumberOfSubPatterns
public int getNumberOfSubPatterns()Description copied from interface:SPARQLGroupPatternReturns the number of graph patterns that are combined in this group pattern.- Specified by:
 getNumberOfSubPatternsin interfaceSPARQLGroupPattern
 - 
getSubPatterns
Description copied from interface:SPARQLGroupPatternReturns all graph patterns that are combined in this group pattern.- Specified by:
 getSubPatternsin interfaceSPARQLGroupPattern
 - 
getSubPatterns
Description copied from interface:SPARQLGroupPatternReturns 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 anIndexOutOfBoundsExceptionwill be thrown.- Specified by:
 getSubPatternsin interfaceSPARQLGroupPattern- Throws:
 IndexOutOfBoundsException
 - 
addSubPattern
 - 
toString
 - 
equals
 - 
hashCode
 - 
getAllMentionedTPs
Description copied from interface:SPARQLGraphPatternReturns a set of all triple patterns that are contained within this graph pattern.- Specified by:
 getAllMentionedTPsin interfaceSPARQLGraphPattern
 - 
getCertainVariables
Description copied from interface:SPARQLGraphPatternReturns the variables that are guaranteed to be bound in every solution mapping produced for this graph pattern.- Specified by:
 getCertainVariablesin interfaceSPARQLGraphPattern
 - 
getPossibleVariables
Description copied from interface:SPARQLGraphPatternReturns the variables that may be bound in solution mappings produced for this graph pattern, but that are not guaranteed to be bound in every such solution mapping.- Specified by:
 getPossibleVariablesin interfaceSPARQLGraphPattern
 - 
getExpectedVariables
Description copied from interface:SPARQLGraphPatternReturns the sets of variables that can be expected in the solution mappings produced for this graph pattern. It holds that theExpectedVariables.getCertainVariables()and theExpectedVariables.getPossibleVariables()methods of the returned object return the same sets as returned bySPARQLGraphPattern.getCertainVariables()andSPARQLGraphPattern.getPossibleVariables(), respectively.- Specified by:
 getExpectedVariablesin interfaceSPARQLGraphPattern
 - 
getAllMentionedVariables
Description copied from interface:SPARQLGraphPatternReturns the set of all variables mentioned in this graph pattern, except for the variables that occur only in expressions (in FILTER or in BIND).- Specified by:
 getAllMentionedVariablesin interfaceSPARQLGraphPattern
 - 
getNumberOfVarMentions
public int getNumberOfVarMentions()Description copied from interface:SPARQLGraphPatternReturns the number of times any variable is mentioned in this graph pattern (if the same variable is mentioned multiple times, then each of these mentions is counted), but ignores variable mentions in expressions (in FILTER or in BIND).- Specified by:
 getNumberOfVarMentionsin interfaceSPARQLGraphPattern
 - 
getNumberOfTermMentions
public int getNumberOfTermMentions()Description copied from interface:SPARQLGraphPatternReturns the number of times any RDF term is mentioned in this graph pattern (if the same term is mentioned multiple times, then each of these mentions is counted), but ignores terms mentions in expressions (in FILTER or in BIND).- Specified by:
 getNumberOfTermMentionsin interfaceSPARQLGraphPattern
 - 
mergeWith
If the given pattern is also aSPARQLGroupPattern, then this method returns aSPARQLGroupPatternthat consists of all the sub-patterns of this group pattern plus all the sub-patterns of the givenSPARQLGroupPattern. Otherwise, this method returns aSPARQLGroupPatternthat consists of all the sub-patterns of this group pattern plus the other given pattern (whatever it is).- Specified by:
 mergeWithin interfaceSPARQLGraphPattern
 - 
applySolMapToGraphPattern
public SPARQLGroupPattern applySolMapToGraphPattern(SolutionMapping sm) throws VariableByBlankNodeSubstitutionException Description copied from interface:SPARQLGraphPatternApplies 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:
 applySolMapToGraphPatternin interfaceSPARQLGraphPattern- Specified by:
 applySolMapToGraphPatternin interfaceSPARQLGroupPattern- Throws:
 VariableByBlankNodeSubstitutionException- if one of the variables would be replaced by a blank node
 
 -