dicoogle
dicoogle copied to clipboard
Improve StorageInterface, add method `get`
This PR proposes a backwards-compatible extension to StorageInterface with default method get. Unlike at, get is designed to retrieve up to a single item in storage, so it does not need file system tree traversal or building up iterables and iterators.
A default implementation is provided that uses at underneath, but implementors may wish to override it for more efficiency.
This PR also includes a few quality-of-life improvements, including some clarifications to other methods in the plugin interface.
Summary
- Add default method
StorageInterface#get, to retrieve a single item from storage- update code in core to use it where suitable
- also correct image servlet to only query for instances to DIM providers if specified
- Fix example code in
at - Clarify in
listthat a trailing forward slash means that it's a directory
@bastiao Since the next Dicoogle version is intended to be a patch version, let's keep this PR on hold until we plan to deploy a feature release.
@bastiao Next version of Dicoogle should be 3.4.0, so we're ready to start merging this and the other ones in the milestone:
- #660
- #598
- #695
- Maybe even #631