Skip to content

Commit

Permalink
[sdk] Improve StorageInterface documentation
Browse files Browse the repository at this point in the history
- Fix example code in #at
- Clarify in #list that a trailing forward slash
  means that it's a directory
  • Loading branch information
Enet4 committed Jul 21, 2023
1 parent c97d7b2 commit fab83cb
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions sdk/src/main/java/pt/ua/dicoogle/sdk/StorageInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,16 @@ public default boolean handles(URI location) {
*
* The provided scheme is not relevant at this point, but the developer must avoid calling this method
* with a path of a different schema.
*
* <pre>for(StorageInputStream dicomObj : storagePlugin.at("file://dataset/")){
* System.err.println(dicomObj.getURI());
* }</pre>
*
* <pre>
* URI uri = URI.create("file://dataset/");
* for (StorageInputStream dicomObj: storagePlugin.at(uri)) {
* System.err.println(dicomObj.getURI());
* }
* </pre>
*
* @param location the location to read
* @param parameters a variable list of extra parameters for the retrieve
* @param parameters a variable list of extra retrieval parameters
* @return an iterable of storage input streams
* @see StorageInputStream
*/
Expand Down Expand Up @@ -139,6 +142,9 @@ default public StorageInputStream get(URI location, Object... parameters) {
* can yield intermediate URIs representing other directories rather than
* objects.
*
* Directories can be distinguished from regular files
* by the presence of a trailing forward slash in the URI.
*
* The provided scheme is not relevant at this point, but the developer
* must avoid calling this method with a path of a different scheme.
*
Expand Down

0 comments on commit fab83cb

Please sign in to comment.