Package net.dona.doip.client
Interface SearchResults<T>
- Type Parameters:
T- either String for searchIds or DigitalObject for full search
- All Superinterfaces:
AutoCloseable,Iterable<T>
- All Known Implementing Classes:
DoipSearchResults
A representation of search results from
DoipClient search operations.
Provides either ids (an {code Iterable} or Stream of String objects) or
Digital Objects (an Iterable or Stream of DigitalObject objects).-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the search results, releasing the connection to the server.default com.google.gson.JsonArrayiterator()Returns anIteratorof the search results (either String or DigitalObject).Returns a parallelStreamof the search results (either String or DigitalObject).intsize()Returns the full number of search results across all pages, or -1 if the number is not availabledefault Spliterator<T>stream()Returns a sequentialStreamof these search results (either String or DigitalObject).
-
Method Details
-
size
int size()Returns the full number of search results across all pages, or -1 if the number is not available- Returns:
- the full number of search result across all pages, or -1 if the number is not available
-
getFacets
default com.google.gson.JsonArray getFacets() -
iterator
Returns anIteratorof the search results (either String or DigitalObject). -
close
void close()Closes the search results, releasing the connection to the server.- Specified by:
closein interfaceAutoCloseable
-
spliterator
- Specified by:
spliteratorin interfaceIterable<T>
-
stream
Returns a sequentialStreamof these search results (either String or DigitalObject).- Returns:
- a sequential stream of type T of these search results of type T
-
parallelStream
Returns a parallelStreamof the search results (either String or DigitalObject).- Returns:
- a parallel stream of type T of these search results of type T
-