|
2 | 2 |
|
3 | 3 | import com.fasterxml.jackson.databind.ObjectMapper; |
4 | 4 | import dev.zarr.zarrjava.ZarrException; |
| 5 | +import dev.zarr.zarrjava.core.Attributes; |
5 | 6 | import dev.zarr.zarrjava.store.FilesystemStore; |
6 | 7 | import dev.zarr.zarrjava.store.StoreHandle; |
7 | 8 | import dev.zarr.zarrjava.utils.Utils; |
@@ -64,14 +65,26 @@ public static Group create(@Nonnull StoreHandle storeHandle) throws IOException, |
64 | 65 | return create(storeHandle, new GroupMetadata()); |
65 | 66 | } |
66 | 67 |
|
| 68 | + public static Group create(@Nonnull StoreHandle storeHandle, Attributes attributes) throws IOException, ZarrException { |
| 69 | + return create(storeHandle, new GroupMetadata(attributes)); |
| 70 | + } |
| 71 | + |
67 | 72 | public static Group create(Path path) throws IOException, ZarrException { |
68 | 73 | return create(new StoreHandle(new FilesystemStore(path))); |
69 | 74 | } |
70 | 75 |
|
| 76 | + public static Group create(Path path, Attributes attributes) throws IOException, ZarrException { |
| 77 | + return create(new StoreHandle(new FilesystemStore(path)), attributes); |
| 78 | + } |
| 79 | + |
71 | 80 | public static Group create(String path) throws IOException, ZarrException { |
72 | 81 | return create(Paths.get(path)); |
73 | 82 | } |
74 | 83 |
|
| 84 | + public static Group create(String path, Attributes attributes) throws IOException, ZarrException { |
| 85 | + return create(Paths.get(path), attributes); |
| 86 | + } |
| 87 | + |
75 | 88 | @Nullable |
76 | 89 | public Node get(String key) throws ZarrException { |
77 | 90 | StoreHandle keyHandle = storeHandle.resolve(key); |
@@ -102,7 +115,7 @@ public String toString() { |
102 | 115 | } |
103 | 116 |
|
104 | 117 | @Override |
105 | | - public dev.zarr.zarrjava.core.GroupMetadata metadata() { |
| 118 | + public GroupMetadata metadata() { |
106 | 119 | return metadata; |
107 | 120 | } |
108 | 121 | } |
0 commit comments