Interface RetrievalResultList

All Superinterfaces:
Iterable<RetrievalResult>
All Known Subinterfaces:
DependencyRetrievalResultList
All Known Implementing Classes:
DependencyRetrievalResultListImpl, RetrievalResultListImpl

public interface RetrievalResultList extends Iterable<RetrievalResult>
A list of retrieval results.
Author:
Rainer Maximini
See Also:
  • Method Details

    • size

      int size()
      Returns:
      The number of retrieval results.
    • iterator

      Specified by:
      iterator in interface Iterable<RetrievalResult>
      Returns:
      an ordered iterator over all retrieval results starting with the most similar one
    • toObjectPool

      Transforms this retrieval result list into a WriteableObjectPool.
      Returns:
      the transformed pool
    • getRetrievalTime

      long getRetrievalTime()
      Returns:
      The time used for retrieval in nanoseconds.
    • setRetrievalTime

      void setRetrievalTime(long retrievalTimeNano)
      Set the retrieval time.
      Parameters:
      retrievalTimeNano - the retrieval time in nanoseconds
    • getRetrievalTime

      long getRetrievalTime(String format)
      Parameters:
      format - The format for the time (nanoseconds, microseconds, milliseconds, seconds)
      Returns:
      The time used for retrieval in the specified format.
    • getRetrievalTimeString

      String getRetrievalTimeString()
      Returns:
      The time used for retrieval as formatted String
    • getRetrievalTimeString

      String getRetrievalTimeString(String format)
      Parameters:
      format - The format for the time (nanoseconds, microseconds, milliseconds, seconds)
      Returns:
      The time used for retrieval as String in the specified format.
    • getQuery

      Query getQuery()
      Returns:
      query
    • add

      void add(RetrievalResult object)
      Adds a retrieval result to the list.
      Parameters:
      object - The retrieval result to add.
    • remove

      void remove(RetrievalResult object)
      Removes a retrieval result from the list.
      Parameters:
      object - The retrieval result to remove.
    • remove

      void remove(String resultObjectId)
      Removes a retrieval result from the list.
      Parameters:
      resultObjectId - The retrieval result to remove.
    • stream

      Returns a stream of the retrieval results.
      Returns:
      a stream of results
    • toXML

      String toXML()
      Converts full RetrievalResultList to XML
      Returns:
      XML String
    • toXML

      String toXML(HashMap<Class,List<String>> toOmit)
      Converts RetrievalResultList to XML, ignoring the fields specified in toOmit
      Parameters:
      toOmit - HashMap that contains classes as a key and a corresponding list of fields that should be ignored in the particular class
      Returns:
      XML String
    • fromXML

      RetrievalResultListImpl fromXML(String retrievalResultListXML)
      Converts a serialized RetrievalResultList-XML into a Query-object
      Parameters:
      retrievalResultListXML - Query XML String
      Returns:
      Query-object