- All Known Implementing Classes:
QuerySolutionBase,QuerySolutionMap,ResultBinding
public interface QuerySolution
A single answer from a SELECT query.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn true if the named variable is in this bindingorg.apache.jena.rdf.model.RDFNodeReturn the value of the named variable in this binding.org.apache.jena.rdf.model.LiteralgetLiteral(String varName) Return the value of the named variable in this binding, casting to aLiteral.org.apache.jena.rdf.model.ResourcegetResource(String varName) Return the value of the named variable in this binding, casting to aResource.org.apache.jena.rdf.model.StatementTermgetStatementTerm(String varName) Return the value of the named variable in this binding, casting to aStatementTerm.varNames()Iterate over the variable names (strings) in this QuerySolution.
-
Method Details
-
get
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
Return the value of the named variable in this binding, casting to aResource. 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
Return the value of the named variable in this binding, casting to aLiteral. 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
-
getStatementTerm
Return the value of the named variable in this binding, casting to aStatementTerm. A return of null indicates that the variable is not present in this solution. An exception indicates it was present but not a triple term.- Parameters:
varName-- Returns:
- Resource
-
contains
Return true if the named variable is in this binding -
varNames
Iterate over the variable names (strings) in this QuerySolution.- Returns:
- Iterator of strings
-