Package org.apache.jena.query
Class QuerySolutionMap
- java.lang.Object
-
- org.apache.jena.sparql.core.QuerySolutionBase
-
- org.apache.jena.query.QuerySolutionMap
-
- All Implemented Interfaces:
QuerySolution
public class QuerySolutionMap extends QuerySolutionBase
Implementation of QuerySolution that is backed by an in-memory map.
-
-
Constructor Summary
Constructors Constructor Description QuerySolutionMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(java.lang.String name, RDFNode node)voidaddAll(QuerySolution other)Add all of the solutions from one QuerySolution into this QuerySolutionMapvoidaddAll(QuerySolutionMap other)Add all of the solutions from one QuerySolutionMap into this QuerySolutionMapjava.util.Map<java.lang.String,RDFNode>asMap()Return aMap<String, RDFNode>representing the current state of thisQuerySolutionMap.voidclear()Clear this QuerySolutionMapjava.lang.StringtoString()java.util.Iterator<java.lang.String>varNames()Iterate over the variable names (strings) in this QuerySolution.-
Methods inherited from class org.apache.jena.sparql.core.QuerySolutionBase
contains, get, getLiteral, getResource
-
-
-
-
Method Detail
-
add
public void add(java.lang.String name, RDFNode node)
-
varNames
public java.util.Iterator<java.lang.String> varNames()
Description copied from interface:QuerySolutionIterate over the variable names (strings) in this QuerySolution.- Specified by:
varNamesin interfaceQuerySolution- Specified by:
varNamesin classQuerySolutionBase- Returns:
- Iterator of strings
-
addAll
public void addAll(QuerySolutionMap other)
Add all of the solutions from one QuerySolutionMap into this QuerySolutionMap
-
asMap
public java.util.Map<java.lang.String,RDFNode> asMap()
Return aMap<String, RDFNode>representing the current state of thisQuerySolutionMap. The map is not connected to theQuerySolutionMapand later changes to eitherMaporQuerySolutionMapwill not reflected in the other.- Returns:
- Map<String, RDFNode>
-
addAll
public void addAll(QuerySolution other)
Add all of the solutions from one QuerySolution into this QuerySolutionMap
-
clear
public void clear()
Clear this QuerySolutionMap
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-