Interface RetrievalResultList
- All Superinterfaces:
Iterable<RetrievalResult>
- All Known Subinterfaces:
DependencyRetrievalResultList
- All Known Implementing Classes:
DependencyRetrievalResultListImpl
,RetrievalResultListImpl
A list of retrieval results.
- Author:
- Rainer Maximini
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(RetrievalResult object) Adds a retrieval result to the list.Converts a serialized RetrievalResultList-XML into a Query-objectgetQuery()
long
long
getRetrievalTime
(String format) getRetrievalTimeString
(String format) iterator()
void
remove
(RetrievalResult object) Removes a retrieval result from the list.void
Removes a retrieval result from the list.void
setRetrievalTime
(long retrievalTimeNano) Set the retrieval time.int
size()
stream()
Returns a stream of the retrieval results.Transforms this retrieval result list into aWriteableObjectPool
.toXML()
Converts full RetrievalResultList to XMLConverts RetrievalResultList to XML, ignoring the fields specified in toOmitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
size
int size()- Returns:
- The number of retrieval results.
-
iterator
Iterator<RetrievalResult> iterator()- Specified by:
iterator
in interfaceIterable<RetrievalResult>
- Returns:
- an ordered iterator over all retrieval results starting with the most similar one
-
toObjectPool
ReadableObjectPool<DataObject> toObjectPool()Transforms this retrieval result list into aWriteableObjectPool
.- 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
- 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
- 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
Adds a retrieval result to the list.- Parameters:
object
- The retrieval result to add.
-
remove
Removes a retrieval result from the list.- Parameters:
object
- The retrieval result to remove.
-
remove
Removes a retrieval result from the list.- Parameters:
resultObjectId
- The retrieval result to remove.
-
stream
Stream<RetrievalResult> 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
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
Converts a serialized RetrievalResultList-XML into a Query-object- Parameters:
retrievalResultListXML
- Query XML String- Returns:
- Query-object
-