Package org.apache.jena.sparql.core
Class QuerySolutionBase
- java.lang.Object
-
- org.apache.jena.sparql.core.QuerySolutionBase
-
- All Implemented Interfaces:
QuerySolution
- Direct Known Subclasses:
QuerySolutionMap,ResultBinding
public abstract class QuerySolutionBase extends java.lang.Object implements QuerySolution
Implementation of QuerySolution that contains the canonicalization and casting code.
-
-
Constructor Summary
Constructors Constructor Description QuerySolutionBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleancontains(java.lang.String varName)Return true if the named variable is in this bindingRDFNodeget(java.lang.String varName)Return the value of the named variable in this binding.LiteralgetLiteral(java.lang.String varName)Return the value of the named variable in this binding, casting to a Literal.ResourcegetResource(java.lang.String varName)Return the value of the named variable in this binding, casting to a Resource.abstract java.util.Iterator<java.lang.String>varNames()Iterate over the variable names (strings) in this QuerySolution.
-
-
-
Method Detail
-
get
public RDFNode get(java.lang.String varName)
Description copied from interface:QuerySolutionReturn the value of the named variable in this binding. A return of null indicates that the variable is not present in this solution.- Specified by:
getin interfaceQuerySolution- Returns:
- RDFNode
-
getResource
public Resource getResource(java.lang.String varName)
Description copied from interface:QuerySolutionReturn the value of the named variable in this binding, casting to a Resource. A return of null indicates that the variable is not present in this solution. An exception indicates it was present but not a resource.- Specified by:
getResourcein interfaceQuerySolution- Returns:
- Resource
-
getLiteral
public Literal getLiteral(java.lang.String varName)
Description copied from interface:QuerySolutionReturn the value of the named variable in this binding, casting to a Literal. A return of null indicates that the variable is not present in this solution. An exception indicates it was present but not a literal.- Specified by:
getLiteralin interfaceQuerySolution- Returns:
- Resource
-
contains
public boolean contains(java.lang.String varName)
Description copied from interface:QuerySolutionReturn true if the named variable is in this binding- Specified by:
containsin interfaceQuerySolution
-
varNames
public abstract java.util.Iterator<java.lang.String> varNames()
Description copied from interface:QuerySolutionIterate over the variable names (strings) in this QuerySolution.- Specified by:
varNamesin interfaceQuerySolution- Returns:
- Iterator of strings
-
-