Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.hp.hpl.jena.query
Interface QuerySolution

All Known Implementing Classes:
  com.hp.hpl.jena.sparql.core.QuerySolutionBase, QuerySolutionMap

    public interface QuerySolution

A single answer from a SELECT query.

Author:
  Andy Seaborne

Method Summary
`boolean` | `contains(java.lang.String varName)` Return true if the named variable is in this binding
`com.hp.hpl.jena.rdf.model.RDFNode` | `get(java.lang.String varName)` Return the value of the named variable in this binding.
`com.hp.hpl.jena.rdf.model.Literal` | `getLiteral(java.lang.String varName)` Return the value of the named variable in this binding, casting to a Literal.
`com.hp.hpl.jena.rdf.model.Resource` | `getResource(java.lang.String varName)` Return the value of the named variable in this binding, casting to a Resource.
`java.util.Iterator` | `varNames()` Iterate over the variable names (strings) in this QuerySolution.

Method Detail

### get

    com.hp.hpl.jena.rdf.model.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

    com.hp.hpl.jena.rdf.model.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

    com.hp.hpl.jena.rdf.model.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 varNames()

  Iterate over the variable names (strings) in this QuerySolution.

  Returns:
    Iterator of strings

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP