Package org.apache.jena.query
Interface QuerySolution
-
- All Known Implementing Classes:
QuerySolutionBase,QuerySolutionMap,ResultBinding
public interface QuerySolutionA single answer from a SELECT query.
-
-
Method Summary
All Methods Instance Methods Abstract 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.java.util.Iterator<java.lang.String>varNames()Iterate over the variable names (strings) in this QuerySolution.
-
-
-
Method Detail
-
get
RDFNode get(java.lang.String varName)
Return the value of the named variable in this binding. A return of null indicates that the variable is not present in this solution.- Parameters:
varName-- Returns:
- RDFNode
-
getResource
Resource getResource(java.lang.String varName)
Return 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.- Parameters:
varName-- Returns:
- Resource
-
getLiteral
Literal getLiteral(java.lang.String varName)
Return 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.- Parameters:
varName-- Returns:
- Resource
-
contains
boolean contains(java.lang.String varName)
Return true if the named variable is in this binding
-
varNames
java.util.Iterator<java.lang.String> varNames()
Iterate over the variable names (strings) in this QuerySolution.- Returns:
- Iterator of strings
-
-