32
32
33
33
34
34
class Dimension (ABC ):
35
+ properties : Dict [str , Any ]
36
+
35
37
def __init__ (self , properties : Dict [str , Any ]) -> None :
36
38
self .properties = properties
37
39
@@ -350,6 +352,9 @@ def ext(obj: T) -> "DatacubeExtension[T]":
350
352
351
353
352
354
class CollectionDatacubeExtension (DatacubeExtension [pystac .Collection ]):
355
+ collection : pystac .Collection
356
+ properties : Dict [str , Any ]
357
+
353
358
def __init__ (self , collection : pystac .Collection ):
354
359
self .collection = collection
355
360
self .properties = collection .extra_fields
@@ -359,6 +364,9 @@ def __repr__(self) -> str:
359
364
360
365
361
366
class ItemDatacubeExtension (DatacubeExtension [pystac .Item ]):
367
+ item : pystac .Item
368
+ properties : Dict [str , Any ]
369
+
362
370
def __init__ (self , item : pystac .Item ):
363
371
self .item = item
364
372
self .properties = item .properties
@@ -368,11 +376,17 @@ def __repr__(self) -> str:
368
376
369
377
370
378
class AssetDatacubeExtension (DatacubeExtension [pystac .Asset ]):
379
+ asset_href : str
380
+ properties : Dict [str , Any ]
381
+ additional_read_properties : Optional [List [Dict [str , Any ]]]
382
+
371
383
def __init__ (self , asset : pystac .Asset ):
372
384
self .asset_href = asset .href
373
385
self .properties = asset .properties
374
386
if asset .owner and isinstance (asset .owner , pystac .Item ):
375
387
self .additional_read_properties = [asset .owner .properties ]
388
+ else :
389
+ self .additional_read_properties = None
376
390
377
391
def __repr__ (self ) -> str :
378
392
return "<AssetDatacubeExtension Item id={}>" .format (self .asset_href )
0 commit comments