@@ -55,6 +55,9 @@ public final class ArrayMetadata {
55
55
@ Nullable
56
56
@ JsonProperty ("dimension_names" )
57
57
public String [] dimensionNames ;
58
+ @ Nullable
59
+ @ JsonProperty ("storage_transformers" )
60
+ public Map <String , Object >[] storageTransformers ;
58
61
59
62
@ JsonIgnore
60
63
public CoreArrayMetadata coreArrayMetadata ;
@@ -64,11 +67,12 @@ public ArrayMetadata(
64
67
Object fillValue ,
65
68
@ Nonnull Codec [] codecs ,
66
69
@ Nullable String [] dimensionNames ,
67
- @ Nullable Map <String , Object > attributes
70
+ @ Nullable Map <String , Object > attributes ,
71
+ @ Nullable Map <String , Object >[] storageTransformers
68
72
) throws ZarrException {
69
73
this (ZARR_FORMAT , NODE_TYPE , shape , dataType , chunkGrid , chunkKeyEncoding , fillValue , codecs ,
70
74
dimensionNames ,
71
- attributes
75
+ attributes , storageTransformers
72
76
);
73
77
}
74
78
@@ -83,7 +87,8 @@ public ArrayMetadata(
83
87
@ JsonProperty (value = "fill_value" , required = true ) Object fillValue ,
84
88
@ Nonnull @ JsonProperty (value = "codecs" ) Codec [] codecs ,
85
89
@ 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
87
92
) throws ZarrException {
88
93
if (zarrFormat != this .zarrFormat ) {
89
94
throw new ZarrException (
@@ -93,7 +98,10 @@ public ArrayMetadata(
93
98
throw new ZarrException (
94
99
"Expected node type '" + this .nodeType + "', got '" + nodeType + "'." );
95
100
}
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
+ }
97
105
if (chunkGrid instanceof RegularChunkGrid ) {
98
106
int [] chunkShape = ((RegularChunkGrid ) chunkGrid ).configuration .chunkShape ;
99
107
if (shape .length != chunkShape .length ) {
@@ -126,6 +134,7 @@ public ArrayMetadata(
126
134
this .codecs = codecs ;
127
135
this .dimensionNames = dimensionNames ;
128
136
this .attributes = attributes ;
137
+ this .storageTransformers = storageTransformers ;
129
138
this .coreArrayMetadata =
130
139
new CoreArrayMetadata (shape , ((RegularChunkGrid ) chunkGrid ).configuration .chunkShape ,
131
140
dataType ,
0 commit comments