Interface ParameterValue

All Known Implementing Classes:
DurationParameterValue, TemporalParameterValue

public interface ParameterValue
Query parameter value holder.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets this parameter value as a string which can be inserted directly into a query.
    Gets the value held by this wrapper.
    default boolean
    Whether this parameter value is set or it represents just the parameter identification.
    default List<String>
    toQueryValues(int size)
    Builds a list of the specified size containing the value(s) represented by this parameter value.
    default int
    Returns the number of values held by this instance.
  • Method Details

    • getValue

      Object getValue()
      Gets the value held by this wrapper.
      Returns:
      The parameter value
    • getQueryString

      String getQueryString()
      Gets this parameter value as a string which can be inserted directly into a query.
      Returns:
      Value as query string
    • toQueryValues

      default List<String> toQueryValues(int size)
      Builds a list of the specified size containing the value(s) represented by this parameter value.

      If this instance does not contain enough values to fill in the list of the specified size, its remainder is filled with SparqlConstants.UNDEFs.

      The resulting list will be used to build a SPARQL VALUES table.

      Parameters:
      size - Requested size of value list
      Returns:
      List of values
    • isSet

      default boolean isSet()
      Whether this parameter value is set or it represents just the parameter identification.
      Returns:
      true if this instance represents an explicit parameter value
    • valueCount

      default int valueCount()
      Returns the number of values held by this instance.

      Will return number different from 1 only for collection value parameters.

      Returns:
      Number of values represented by this instance