Skip to content

Conversation

@brokkoli71
Copy link
Member

@brokkoli71 brokkoli71 commented Oct 23, 2025

  • adds attributes to v2 (fixes [v2] Attributes #23)
  • adds Attributes class for v2 and v3
  • adds array.resize

@brokkoli71 brokkoli71 self-assigned this Oct 23, 2025
@brokkoli71 brokkoli71 marked this pull request as draft October 23, 2025 09:50
@brokkoli71 brokkoli71 marked this pull request as ready for review October 26, 2025 16:09
import java.util.Map;
import java.util.function.Function;

public class Attributes extends HashMap<String, Object> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What were your inspirations for API design?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted:

  • typed getters like getInt, getList, and getAttributes to avoid unsafe casting in user code
  • an Attributes builder with add (or set) and delete.

Maybe Attributes.of or Attributes.builder().add(...) would be more idiomatic for Java.
Do you have suggestions or preferences on how the API could be improved?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be useful to consider how user-libraries, such as an OME-Zarr library, would want to access the attributes. Maybe they just want to take the ome (0.5) or multiscales (0.4) objects and parse for themselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[v2] Attributes

3 participants