Interface IDfModifiableResultEntry

All Superinterfaces:
IDfResultEntry

public interface IDfModifiableResultEntry extends IDfResultEntry
Represents a single result entry from a query execution and defines the methods necessary to modify and manipulate it.
  • Method Details

    • setScore

      void setScore(double score)
      Sets this result score.
    • setSeqNumber

      void setSeqNumber(int seqNumber)
      Sets this result sequence number.
    • setGlobalSeqNumber

      void setGlobalSeqNumber(int globalSeqNumber)
      Sets this result global sequence number.
    • setStatus

      void setStatus(int status)
      Sets the status of the result.
      Parameters:
      status - The constant corresponding to the result status.
      See Also:
    • setURL

      void setURL(String value)
      Sets the URL for this result.
    • addAttribute

      void addAttribute(String attrName, int value) throws IllegalArgumentException
      Adds a non-repeating integer attribute and its value.
      Throws:
      IllegalArgumentException - If attribute already exists.
    • addAttribute

      void addAttribute(String attrName, double value) throws IllegalArgumentException
      Adds a non-repeating double attribute and its value.
      Throws:
      IllegalArgumentException - If attribute already exists.
    • addDateAttribute

      void addDateAttribute(String attrName, String value, String dateFormat) throws IllegalArgumentException
      Adds a non-repeating date attribute with its value.
      Throws:
      IllegalArgumentException - If the attribute already exists or the date value doesn't match the date format.
    • addAttribute

      void addAttribute(String attrName, int type, String value) throws IllegalArgumentException
      Adds a non-repeating attribute and its value.
      Throws:
      IllegalArgumentException - If the attribute already exists or if types are not compatible.
    • addRepeatingAttribute

      void addRepeatingAttribute(String attrName, int type, List values) throws IllegalArgumentException
      Adds a repeating attribute and its values.
      Parameters:
      values - List of String
      Throws:
      IllegalArgumentException - If the attribute already exists or if types are not compatible.
    • addRepeatingDateAttribute

      void addRepeatingDateAttribute(String attrName, int type, List values, String dateFormat) throws IllegalArgumentException
      Adds a repeating attribute and its values.
      Parameters:
      values - List of String
      Throws:
      IllegalArgumentException - If the attribute already exists or if types are not compatible.
    • setContentDescriptor

      void setContentDescriptor(String contentDescriptor) throws DfException
      Sets the descriptor of an external result content. This desrciptor is an opaque String.
      Parameters:
      contentDescriptor -
      Throws:
      DfException
    • getContentDescriptor

      String getContentDescriptor() throws DfException
      Gets the descriptor of an external result content. This descriptor is an opaque String that is only useful when serializing and deserializing a result entry.
      Throws:
      DfException
    • setMatchingTerms

      void setMatchingTerms(List matchingTerms)
      Sets the result terms matching the query. For example, these terms can be highlighted when displaying the result. Warning: the matching terms must be lower case, with no duplicate.
      Parameters:
      matchingTerms - The result matching terms (List of String).
    • getList

      IDfList getList(String attrName) throws IllegalArgumentException
      Gets the list of value for a repeating attribute.
      Parameters:
      attrName - The name of the attribute.
      Returns:
      The list of values.
      Throws:
      IllegalArgumentException - If the attribute is not found or is not repeating.
    • getList

      IDfList getList(int attrIndex) throws IllegalArgumentException
      Gets the list of value for a repeating attribute.
      Parameters:
      attrIndex - The index of the attribute.
      Returns:
      The list of values.
      Throws:
      IllegalArgumentException - If the attribute is not found or is not repeating.