Interface SolutionMappingsIndex
- All Superinterfaces:
Collection<SolutionMapping>
,Iterable<SolutionMapping>
,StatsProvider
- All Known Implementing Classes:
SolutionMappingsHashTable
,SolutionMappingsHashTableBasedOnOneVar
,SolutionMappingsHashTableBasedOnTwoVars
,SolutionMappingsIndexBase
,SolutionMappingsIndexForMixedUsage
,SolutionMappingsIndexNoJoinVars
,SolutionMappingsIndexWithPostMatching
,WrappingSolutionMappingsIndex
Implementations of this interface can be used as an index for
SolutionMapping
objects.
In general, such an index may contain duplicates. That is, multiple
identical solution mappings may be added and should be possible to
retrieve. However, there may be implementations of this interface
that are explicitly restricted to index sets of solution mappings
(rather than multisets).-
Method Summary
Modifier and TypeMethodDescriptionfindSolutionMappings
(org.apache.jena.sparql.core.Var var, org.apache.jena.graph.Node value) Returns an iterator over all solution mappings in this index that map the given variable to the given value.findSolutionMappings
(org.apache.jena.sparql.core.Var var1, org.apache.jena.graph.Node value1, org.apache.jena.sparql.core.Var var2, org.apache.jena.graph.Node value2) Returns an iterator over all solution mappings in this index that map the first variable to the first value and the second variable to the second value.findSolutionMappings
(org.apache.jena.sparql.core.Var var1, org.apache.jena.graph.Node value1, org.apache.jena.sparql.core.Var var2, org.apache.jena.graph.Node value2, org.apache.jena.sparql.core.Var var3, org.apache.jena.graph.Node value3) This method is a three-variables version of the methodfindSolutionMappings(Var, Node)
.Returns all solution mappings currently in this index.Returns an iterator over all solution mappings in this index that are compatible with the given solution mappings.default Iterator
<SolutionMapping> iterator()
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArray
Methods inherited from interface se.liu.ida.hefquin.base.utils.StatsProvider
getStats, resetStats
-
Method Details
-
getJoinPartners
Returns an iterator over all solution mappings in this index that are compatible with the given solution mappings. Implementations may choose to support this method only for specific types of solution mappings (e.g., with specific variables), in which case anUnsupportedOperationException
will be thrown if the method is called with an unsupported variable.- Throws:
UnsupportedOperationException
-
findSolutionMappings
Iterable<SolutionMapping> findSolutionMappings(org.apache.jena.sparql.core.Var var, org.apache.jena.graph.Node value) throws UnsupportedOperationException Returns an iterator over all solution mappings in this index that map the given variable to the given value. Implementations may choose to support this method only for specific variables, in which case anUnsupportedOperationException
will be thrown if the method is called with an unsupported variable. The result of this method should essentially be the same as the result of callinggetJoinPartners(SolutionMapping)
with a solution mapping that is defined only for the given variable and that maps this variable to the given value.- Throws:
UnsupportedOperationException
-
findSolutionMappings
Iterable<SolutionMapping> findSolutionMappings(org.apache.jena.sparql.core.Var var1, org.apache.jena.graph.Node value1, org.apache.jena.sparql.core.Var var2, org.apache.jena.graph.Node value2) throws UnsupportedOperationException Returns an iterator over all solution mappings in this index that map the first variable to the first value and the second variable to the second value. Hence, this method is a two-variables version of the methodfindSolutionMappings(Var, Node)
.- Throws:
UnsupportedOperationException
-
findSolutionMappings
Iterable<SolutionMapping> findSolutionMappings(org.apache.jena.sparql.core.Var var1, org.apache.jena.graph.Node value1, org.apache.jena.sparql.core.Var var2, org.apache.jena.graph.Node value2, org.apache.jena.sparql.core.Var var3, org.apache.jena.graph.Node value3) throws UnsupportedOperationException This method is a three-variables version of the methodfindSolutionMappings(Var, Node)
.- Throws:
UnsupportedOperationException
-
getAllSolutionMappings
Iterable<SolutionMapping> getAllSolutionMappings()Returns all solution mappings currently in this index. -
iterator
- Specified by:
iterator
in interfaceCollection<SolutionMapping>
- Specified by:
iterator
in interfaceIterable<SolutionMapping>
-