Class XMLResultSet

java.lang.Object
ca.phon.query.db.xml.XMLResultSet
All Implemented Interfaces:
ResultSet, JAXBWrapper<ResultSetType>, Iterable<Result>
Direct Known Subclasses:
XMLLazyResultSet

public class XMLResultSet extends Object implements ResultSet, JAXBWrapper<ResultSetType>
XML-based implementation of ResultSet.
  • Field Details

  • Method Details

    • getXMLObject

      public ResultSetType getXMLObject()
      Get the JAXB element associated with this object.
      Specified by:
      getXMLObject in interface JAXBWrapper<ResultSetType>
      Returns:
    • getCorpus

      public String getCorpus()
      Description copied from interface: ResultSet
      Gets the corpus name for this result set.
      Specified by:
      getCorpus in interface ResultSet
      Returns:
      the corpus name
    • getSession

      public String getSession()
      Description copied from interface: ResultSet
      Gets the session name for this result set.
      Specified by:
      getSession in interface ResultSet
      Returns:
      the session name
    • getSessionPath

      public String getSessionPath()
      Description copied from interface: ResultSet
      Gets the session path for this result set. The session path should be of the form [corpus].[session]
      Specified by:
      getSessionPath in interface ResultSet
      Returns:
      the session path
    • setSessionPath

      public void setSessionPath(String sessionPath)
      Description copied from interface: ResultSet
      Sets the session path for this result set. The session path should be of the form [corpus].[session]
      Specified by:
      setSessionPath in interface ResultSet
      Parameters:
      sessionPath - the session path
    • setSessionPath

      public void setSessionPath(String corpus, String session)
      Description copied from interface: ResultSet
      Sets the session path for this result set. The session path will be of the form [corpus].[session]
      Specified by:
      setSessionPath in interface ResultSet
    • size

      public int size()
      Description copied from interface: ResultSet
      Get the number of results in this set.
      Specified by:
      size in interface ResultSet
      Returns:
      the size of the result set
    • removeResult

      public Result removeResult(int idx)
      Description copied from interface: ResultSet
      Remove the result specified by the given index.
      Specified by:
      removeResult in interface ResultSet
      Returns:
      the removed result
    • getResult

      public Result getResult(int idx)
      Description copied from interface: ResultSet
      Get the result specified by the given index.
      Specified by:
      getResult in interface ResultSet
      Returns:
      the result for the given index
    • addResult

      public void addResult(Result res)
      Description copied from interface: ResultSet
      Add the given result to the result set
      Specified by:
      addResult in interface ResultSet
    • numberOfResults

      public int numberOfResults(boolean includeExcluded)
      Description copied from interface: ResultSet
      Returns the number of results in this set.
      Specified by:
      numberOfResults in interface ResultSet
      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

      public String[] getMetadataKeys()
      Description copied from interface: ResultSet
      Return the list of metadata keys used in the result set.
      Specified by:
      getMetadataKeys in interface ResultSet
      Returns:
      the list of metadata keys
    • iterator

      public Iterator<Result> iterator(boolean includeExcluded)
      Description copied from interface: ResultSet
      Return an iterator for results
      Specified by:
      iterator in interface ResultSet
      Returns:
      iterator
    • iterator

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