@@ -55,6 +55,9 @@ public final class ArrayMetadata {
5555 @ Nullable
5656 @ JsonProperty ("dimension_names" )
5757 public String [] dimensionNames ;
58+ @ Nullable
59+ @ JsonProperty ("storage_transformers" )
60+ public Map <String , Object >[] storageTransformers ;
5861
5962 @ JsonIgnore
6063 public CoreArrayMetadata coreArrayMetadata ;
@@ -64,11 +67,12 @@ public ArrayMetadata(
6467 Object fillValue ,
6568 @ Nonnull Codec [] codecs ,
6669 @ Nullable String [] dimensionNames ,
67- @ Nullable Map <String , Object > attributes
70+ @ Nullable Map <String , Object > attributes ,
71+ @ Nullable Map <String , Object >[] storageTransformers
6872 ) throws ZarrException {
6973 this (ZARR_FORMAT , NODE_TYPE , shape , dataType , chunkGrid , chunkKeyEncoding , fillValue , codecs ,
7074 dimensionNames ,
71- attributes
75+ attributes , storageTransformers
7276 );
7377 }
7478
@@ -83,7 +87,8 @@ public ArrayMetadata(
8387 @ JsonProperty (value = "fill_value" , required = true ) Object fillValue ,
8488 @ Nonnull @ JsonProperty (value = "codecs" ) Codec [] codecs ,
8589 @ Nullable @ JsonProperty (value = "dimension_names" ) String [] dimensionNames ,
86- @ Nullable @ JsonProperty (value = "attributes" ) Map <String , Object > attributes
90+ @ Nullable @ JsonProperty (value = "attributes" ) Map <String , Object > attributes ,
91+ @ Nullable @ JsonProperty (value = "storage_transformers" ) Map <String , Object >[] storageTransformers
8792 ) throws ZarrException {
8893 if (zarrFormat != this .zarrFormat ) {
8994 throw new ZarrException (
@@ -93,7 +98,10 @@ public ArrayMetadata(
9398 throw new ZarrException (
9499 "Expected node type '" + this .nodeType + "', got '" + nodeType + "'." );
95100 }
96-
101+ if (storageTransformers != null && storageTransformers .length > 0 ) {
102+ throw new ZarrException (
103+ "Storage transformers are not supported in this version of Zarr Java." );
104+ }
97105 if (chunkGrid instanceof RegularChunkGrid ) {
98106 int [] chunkShape = ((RegularChunkGrid ) chunkGrid ).configuration .chunkShape ;
99107 if (shape .length != chunkShape .length ) {
@@ -126,6 +134,7 @@ public ArrayMetadata(
126134 this .codecs = codecs ;
127135 this .dimensionNames = dimensionNames ;
128136 this .attributes = attributes ;
137+ this .storageTransformers = storageTransformers ;
129138 this .coreArrayMetadata =
130139 new CoreArrayMetadata (shape , ((RegularChunkGrid ) chunkGrid ).configuration .chunkShape ,
131140 dataType ,
0 commit comments