Interface ResultSet

All Superinterfaces:
Iterable<Result>
All Known Implementing Classes:
XMLLazyResultSet, XMLResultSet

public interface ResultSet extends Iterable<Result>
Interface for a set of results from a Phon query.
  • Method Details

    • getCorpus

      String getCorpus()
      Gets the corpus name for this result set.
      Returns:
      the corpus name
    • getSession

      String getSession()
      Gets the session name for this result set.
      Returns:
      the session name
    • getSessionPath

      String getSessionPath()
      Gets the session path for this result set. The session path should be of the form [corpus].[session]
      Returns:
      the session path
    • setSessionPath

      void setSessionPath(String sessionPath)
      Sets the session path for this result set. The session path should be of the form [corpus].[session]
      Parameters:
      sessionPath - the session path
    • setSessionPath

      void setSessionPath(String corpus, String session)
      Sets the session path for this result set. The session path will be of the form [corpus].[session]
      Parameters:
      sessionPath - the session path
    • size

      int size()
      Get the number of results in this set.
      Returns:
      the size of the result set
    • getResult

      Result getResult(int idx)
      Get the result specified by the given index.
      Parameters:
      idx -
      Returns:
      the result for the given index
      Throws:
      ArrayIndexOutOfBoundsException
    • removeResult

      Result removeResult(int idx)
      Remove the result specified by the given index.
      Parameters:
      idx -
      Returns:
      the removed result
      Throws:
      ArrayIndexOutOfBoundsException
    • addResult

      void addResult(Result res)
      Add the given result to the result set
      Parameters:
      result -
    • numberOfResults

      int numberOfResults(boolean includeExcluded)
      Returns the number of results in this set.
      Parameters:
      includeExcluded - include excluded results in the set. If true this will return this same value as
      invalid @link
      #getResults()
      .size()
      Returns:
      the number of (non-excluded) results in this set
    • getMetadataKeys

      String[] getMetadataKeys()
      Return the list of metadata keys used in the result set.
      Returns:
      the list of metadata keys
    • iterator

      Iterator<Result> iterator(boolean includeExcluded)
      Return an iterator for results
      Parameters:
      includeExcluded -
      Returns:
      iterator
    • iterator

      Iterator<Result> iterator()
      Return an iterator for all results in this set. This is the same as calling iterator(true).
      Specified by:
      iterator in interface Iterable<Result>