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 TypeMethodDescriptionvoid
close()
Closes the search results, releasing the connection to the server.default com.google.gson.JsonArray
iterator()
Returns anIterator
of the search results (either String or DigitalObject).Returns a parallelStream
of the search results (either String or DigitalObject).int
size()
Returns the full number of search results across all pages, or -1 if the number is not availabledefault Spliterator<T>
stream()
Returns a sequentialStream
of 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 anIterator
of the search results (either String or DigitalObject). -
close
void close()Closes the search results, releasing the connection to the server.- Specified by:
close
in interfaceAutoCloseable
-
spliterator
- Specified by:
spliterator
in interfaceIterable<T>
-
stream
Returns a sequentialStream
of these search results (either String or DigitalObject).- Returns:
- a sequential stream of type T of these search results of type T
-
parallelStream
Returns a parallelStream
of the search results (either String or DigitalObject).- Returns:
- a parallel stream of type T of these search results of type T
-