dicoogle icon indicating copy to clipboard operation
dicoogle copied to clipboard

Improve StorageInterface, add method `get`

Open Enet4 opened this issue 2 years ago • 1 comments

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 list that a trailing forward slash means that it's a directory

Enet4 avatar Jul 21 '23 10:07 Enet4

@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.

Enet4 avatar Aug 25 '23 08:08 Enet4

@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

Enet4 avatar Aug 23 '24 16:08 Enet4