Interface QueryResult


  • public interface QueryResult
    A result a of query execution, containing bindings for variables defined in the SPARQL SELECT clause.
    Since:
    1.1.0
    See Also:
    QueryResultSet.getResults()
    • Method Detail

      • getURI

        URI getURI​(String name)
        Returns the URI value bound to the specified SPARQL SELECT variable name.

        This method is applicable if the underlying predicate references a resource.

        Parameters:
        name - a variable name
        Returns:
        the bound value for this result, null if none.
        Throws:
        ClassCastException - if the value is not a URI.
      • getString

        String getString​(String name)
        Returns the String value bound to the specified SPARQL SELECT variable name.

        This method is applicable if the underlying predicate references a String literal.

        Parameters:
        name - a variable name
        Returns:
        the bound value for this result, null if none.
        Throws:
        ClassCastException - if the value is not a String.
      • getBoolean

        Boolean getBoolean​(String name)
        Returns the Boolean value bound to the specified SPARQL SELECT variable name.

        This method is applicable if the underlying predicate references a Boolean literal (http://www.w3.org/2001/XMLSchema#boolean).

        Parameters:
        name - a variable name
        Returns:
        the bound value for this result, null if none.
        Throws:
        ClassCastException - if the value is not a Boolean.
      • getInteger

        Integer getInteger​(String name)
        Returns the Integer value bound to the specified SPARQL SELECT variable name.

        This method is applicable if the underlying predicate references a Integer literal (http://www.w3.org/2001/XMLSchema#integer).

        Parameters:
        name - a variable name
        Returns:
        the bound value for this result, null if none.
        Throws:
        ClassCastException - if the value is not a Integer.
      • getDate

        Date getDate​(String name)
        Returns the Date value bound to the specified SPARQL SELECT variable name.

        This method is applicable if the underlying predicate references a Date literal (http://www.w3.org/2001/XMLSchema#dateTime).

        Parameters:
        name - a variable name
        Returns:
        the bound value for this result, null if none.
        Throws:
        ClassCastException - if the value is not a Date.