Class XMLResult

java.lang.Object
ca.phon.query.db.xml.XMLResult
All Implemented Interfaces:
Result, JAXBWrapper<ResultType>, Iterable<ResultValue>

public class XMLResult extends Object implements Result, JAXBWrapper<ResultType>
XML-based implementation of Result.
  • Method Details

    • getXMLObject

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

      public int getRecordIndex()
      Description copied from interface: Result
      Gets the record index for this result.
      Specified by:
      getRecordIndex in interface Result
      Returns:
      the record index
    • setRecordIndex

      public void setRecordIndex(int index)
      Description copied from interface: Result
      Sets the record index for this result.
      Specified by:
      setRecordIndex in interface Result
      Parameters:
      index - the record index
    • getMetadata

      public Map<String,String> getMetadata()
      Description copied from interface: Result
      Gets the map of metadata for this result.
      Specified by:
      getMetadata in interface Result
      Returns:
      the metadata map
    • getSchema

      public String getSchema()
      Description copied from interface: Result
      Gets the schema of this result.
      Specified by:
      getSchema in interface Result
      Returns:
      the schema
    • setSchema

      public void setSchema(String format)
      Description copied from interface: Result
      Sets the schema of this result.
      Specified by:
      setSchema in interface Result
      Parameters:
      format - the format
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isExcluded

      public boolean isExcluded()
      Description copied from interface: Result
      Is this result excluded from reports
      Specified by:
      isExcluded in interface Result
      Returns:
      true if this result should be excluded false otherwise.
    • setExcluded

      public void setExcluded(boolean excluded)
      Description copied from interface: Result
      Set the excluded status of this result.
      Specified by:
      setExcluded in interface Result
    • iterator

      public Iterator<ResultValue> iterator()
      Specified by:
      iterator in interface Iterable<ResultValue>
    • getNumberOfResultValues

      public int getNumberOfResultValues()
      Description copied from interface: Result
      Get the number of result values.
      Specified by:
      getNumberOfResultValues in interface Result
      Returns:
      number of result values
    • getResultValue

      public ResultValue getResultValue(int idx)
      Description copied from interface: Result
      Get the specified result value
      Specified by:
      getResultValue in interface Result
      Returns:
      result value
    • removeResultValue

      public ResultValue removeResultValue(int idx)
      Description copied from interface: Result
      Remove the specified result value
      Specified by:
      removeResultValue in interface Result
      Returns:
      the removed result value
    • addResultValue

      public int addResultValue(ResultValue resultValue)
      Description copied from interface: Result
      Add the given result value.
      Specified by:
      addResultValue in interface Result
      Returns:
      index of added result value
    • getResultValue

      public Optional<ResultValue> getResultValue(String name)
      Description copied from interface: Result
      Get the result value by name
      Specified by:
      getResultValue in interface Result
      Returns:
      result value optional