@@ -27,7 +27,7 @@ class DownloadInfo(NamedTuple):
27
27
has_distribution : bool
28
28
has_direct_download : bool
29
29
visualization_urls : list [str ]
30
- format : str
30
+ formats : list [ str ] # Changed from single format to list of formats
31
31
32
32
33
33
class ProcessingInfo (NamedTuple ):
@@ -190,7 +190,17 @@ def _process_download_info(self) -> DownloadInfo:
190
190
has_distribution = False
191
191
has_direct_download = False
192
192
visualization_urls = []
193
+ formats = []
193
194
195
+ # Extract formats from FileDistributionInformation
196
+ archive_info = self .umm .get ("ArchiveAndDistributionInformation" , {})
197
+ distribution_info = archive_info .get ("FileDistributionInformation" , [])
198
+
199
+ for info in distribution_info :
200
+ if "Format" in info :
201
+ formats .append (info ["Format" ])
202
+
203
+ # Process RelatedUrls
194
204
related_urls = self .umm .get ("RelatedUrls" , [])
195
205
for url in related_urls :
196
206
if url .get ("URLContentType" ) == "DistributionURL" and url .get ("Type" ) == "GET DATA" :
@@ -204,9 +214,14 @@ def _process_download_info(self) -> DownloadInfo:
204
214
has_distribution = has_distribution ,
205
215
has_direct_download = has_direct_download ,
206
216
visualization_urls = visualization_urls ,
207
- format = self . meta . get ( "format" , "" ) ,
217
+ formats = formats ,
208
218
)
209
219
220
+ @property
221
+ def format (self ) -> str :
222
+ """Get dataset formats as semicolon-separated string."""
223
+ return "; " .join (self .download_info .formats ) if self .download_info .formats else ""
224
+
210
225
def _process_processing_info (self ) -> ProcessingInfo :
211
226
"""Process all processing level information."""
212
227
processing_level = self .umm .get ("ProcessingLevel" , {}).get ("Id" , "" )
@@ -331,8 +346,8 @@ def projects(self) -> str:
331
346
332
347
@property
333
348
def dataset_name (self ) -> str :
334
- """Get dataset short name ."""
335
- return self .umm .get ("ShortName" , "" )
349
+ """Get dataset entry title or shortname ."""
350
+ return self .umm .get ("EntryTitle" , self . umm . get ( " ShortName" , "" ) )
336
351
337
352
@property
338
353
def description (self ) -> str :
@@ -344,11 +359,6 @@ def limitations(self) -> str:
344
359
"""Get dataset access constraints."""
345
360
return self .umm .get ("AccessConstraints" , {}).get ("Description" , "" )
346
361
347
- @property
348
- def format (self ) -> str :
349
- """Get dataset format."""
350
- return self .download_info .format
351
-
352
362
@property
353
363
def temporal_extent (self ) -> str :
354
364
"""Get dataset temporal extent."""
0 commit comments