Class BGPImpl
java.lang.Object
se.liu.ida.hefquin.base.query.impl.BGPImpl
- 
Constructor Summary
ConstructorsConstructorDescriptionBGPImpl()BGPImpl(Set<TriplePattern> tps) BGPImpl(org.apache.jena.sparql.core.BasicPattern pattern) BGPImpl(org.apache.jena.sparql.core.PathBlock pattern) Assumes that the givenPathBlockdoes not contain property path patterns (but only triple patterns).BGPImpl(org.apache.jena.sparql.syntax.ElementPathBlock pattern) Assumes that the givenElementPathBlockdoes not contain property path patterns (but only triple patterns).BGPImpl(BGP otherBGP, TriplePattern tp) BGPImpl(TriplePattern tp, BGP otherBGP) BGPImpl(TriplePattern tp, TriplePattern... tps)  - 
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.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 an unmodifiable set of triple patterns.inthashCode()static SPARQLGraphPatternMerges the given BGP into the given graph pattern.Return a BGP that contains all triple patterns of this BGP plus all triple patterns of the given BGP.mergeWith(SPARQLGraphPattern other) Merges this graph pattern with the given graph pattern, using join semantics, and returns the resulting, merged pattern.Returns a BGP that contains all triple patterns of this BGP plus the given triple pattern.toString()Returns a string representation of the BGPMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface se.liu.ida.hefquin.base.query.SPARQLGraphPattern
getExpectedVariables, mergeWith, mergeWith 
- 
Constructor Details
- 
BGPImpl
public BGPImpl() - 
BGPImpl
 - 
BGPImpl
 - 
BGPImpl
 - 
BGPImpl
 - 
BGPImpl
 - 
BGPImpl
 - 
BGPImpl
public BGPImpl(org.apache.jena.sparql.core.BasicPattern pattern)  - 
BGPImpl
public BGPImpl(org.apache.jena.sparql.syntax.ElementPathBlock pattern) Assumes that the givenElementPathBlockdoes not contain property path patterns (but only triple patterns). If it does, this methods throws anIllegalArgumentException. - 
BGPImpl
public BGPImpl(org.apache.jena.sparql.core.PathBlock pattern) Assumes that the givenPathBlockdoes not contain property path patterns (but only triple patterns). If it does, this methods throws anIllegalArgumentException. 
 - 
 - 
Method Details
- 
getTriplePatterns
Description copied from interface:BGPReturns an unmodifiable set of triple patterns.- Specified by:
 getTriplePatternsin interfaceBGP
 - 
addTriplePattern
 - 
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
 - 
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
 - 
applySolMapToGraphPattern
public BGP 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 interfaceBGP- Specified by:
 applySolMapToGraphPatternin interfaceSPARQLGraphPattern- Throws:
 VariableByBlankNodeSubstitutionException- if one of the variables would be replaced by a blank node
 - 
mergeWith
Description copied from interface:SPARQLGraphPatternMerges this graph pattern with the given graph pattern, using join semantics, and returns the resulting, merged pattern.- Specified by:
 mergeWithin interfaceSPARQLGraphPattern
 - 
mergeWith
Description copied from interface:BGPReturns a BGP that contains all triple patterns of this BGP plus the given triple pattern. This method is a more specific version ofSPARQLGraphPattern.mergeWith(SPARQLGraphPattern). - 
mergeWith
Description copied from interface:BGPReturn a BGP that contains all triple patterns of this BGP plus all triple patterns of the given BGP. This method is a more specific version ofSPARQLGraphPattern.mergeWith(SPARQLGraphPattern). - 
merge
Merges the given BGP into the given graph pattern. If the given graph pattern is also a BGP, then the resulting graph pattern is a BGP that is the union of the two given BGPs. Otherwise, the resulting graph pattern is the given graph pattern with the BGP joined into it. 
 -