@@ -68,7 +68,7 @@ def determine_type(cls, stac_json: Dict[str, Any]) -> Optional["CatalogType"]:
68
68
Only applies to Catalogs or Collections
69
69
70
70
Args:
71
- stac_json (dict) : The STAC JSON dict to determine the catalog type
71
+ stac_json : The STAC JSON dict to determine the catalog type
72
72
73
73
Returns:
74
74
Optional[CatalogType]: The catalog type of the catalog or collection.
@@ -102,28 +102,28 @@ class Catalog(STACObject):
102
102
as well as :class:`~pystac.Item` s.
103
103
104
104
Args:
105
- id (str) : Identifier for the catalog. Must be unique within the STAC.
106
- description (str) : Detailed multi-line description to fully explain the catalog.
105
+ id : Identifier for the catalog. Must be unique within the STAC.
106
+ description : Detailed multi-line description to fully explain the catalog.
107
107
`CommonMark 0.28 syntax <http://commonmark.org/>`_ MAY be used for rich text
108
108
representation.
109
- title (str or None) : Optional short descriptive one-line title for the catalog.
110
- stac_extensions (List[str]) : Optional list of extensions the Catalog implements.
111
- href (str or None) : Optional HREF for this catalog, which be set as the
109
+ title : Optional short descriptive one-line title for the catalog.
110
+ stac_extensions : Optional list of extensions the Catalog implements.
111
+ href : Optional HREF for this catalog, which be set as the
112
112
catalog's self link's HREF.
113
- catalog_type (str or None) : Optional catalog type for this catalog. Must
113
+ catalog_type : Optional catalog type for this catalog. Must
114
114
be one of the values in :class`~pystac.CatalogType`.
115
115
116
116
Attributes:
117
- id (str) : Identifier for the catalog.
118
- description (str) : Detailed multi-line description to fully explain the catalog.
119
- title (str or None) : Optional short descriptive one-line title for the catalog.
120
- stac_extensions (List[str] or None) : Optional list of extensions the Catalog
117
+ id : Identifier for the catalog.
118
+ description : Detailed multi-line description to fully explain the catalog.
119
+ title : Optional short descriptive one-line title for the catalog.
120
+ stac_extensions : Optional list of extensions the Catalog
121
121
implements.
122
- extra_fields (dict or None) : Extra fields that are part of the top-level JSON
122
+ extra_fields : Extra fields that are part of the top-level JSON
123
123
properties of the Catalog.
124
- links (List[Link]) : A list of :class:`~pystac.Link` objects representing
124
+ links : A list of :class:`~pystac.Link` objects representing
125
125
all links associated with this Catalog.
126
- catalog_type (str) : The catalog type. Defaults to ABSOLUTE_PUBLISHED
126
+ catalog_type : The catalog type. Defaults to ABSOLUTE_PUBLISHED
127
127
"""
128
128
129
129
STAC_OBJECT_TYPE = pystac .STACObjectType .CATALOG
@@ -197,9 +197,9 @@ def add_child(
197
197
this Catalog's root.
198
198
199
199
Args:
200
- child (Catalog or Collection) : The child to add.
201
- title (str) : Optional title to give to the :class:`~pystac.Link`
202
- strategy (HrefLayoutStrategy) : The layout strategy to use for setting the
200
+ child : The child to add.
201
+ title : Optional title to give to the :class:`~pystac.Link`
202
+ strategy : The layout strategy to use for setting the
203
203
self href of the child.
204
204
"""
205
205
@@ -229,7 +229,7 @@ def add_children(
229
229
this Catalog's root.
230
230
231
231
Args:
232
- children (Iterable[Catalog or Collection]) : The children to add.
232
+ children : The children to add.
233
233
"""
234
234
for child in children :
235
235
self .add_child (child )
@@ -245,8 +245,8 @@ def add_item(
245
245
this Catalog's root.
246
246
247
247
Args:
248
- item (Item) : The item to add.
249
- title (str) : Optional title to give to the :class:`~pystac.Link`
248
+ item : The item to add.
249
+ title : Optional title to give to the :class:`~pystac.Link`
250
250
"""
251
251
252
252
# Prevent typo confusion
@@ -273,7 +273,7 @@ def add_items(self, items: Iterable["Item_Type"]) -> None:
273
273
this Catalog's root.
274
274
275
275
Args:
276
- items (Iterable[Item]) : The items to add.
276
+ items : The items to add.
277
277
"""
278
278
for item in items :
279
279
self .add_item (item )
@@ -284,8 +284,8 @@ def get_child(
284
284
"""Gets the child of this catalog with the given ID, if it exists.
285
285
286
286
Args:
287
- id (str) : The ID of the child to find.
288
- recursive (bool) : If True, search this catalog and all children for the
287
+ id : The ID of the child to find.
288
+ recursive : If True, search this catalog and all children for the
289
289
item; otherwise, only search the children of this catalog. Defaults
290
290
to False.
291
291
@@ -336,7 +336,7 @@ def remove_child(self, child_id: str) -> None:
336
336
"""Removes an child from this catalog.
337
337
338
338
Args:
339
- child_id (str) : The ID of the child to remove.
339
+ child_id : The ID of the child to remove.
340
340
"""
341
341
new_links : List [pystac .Link ] = []
342
342
root = self .get_root ()
@@ -357,8 +357,8 @@ def get_item(self, id: str, recursive: bool = False) -> Optional["Item_Type"]:
357
357
"""Returns an item with a given ID.
358
358
359
359
Args:
360
- id (str) : The ID of the item to find.
361
- recursive (bool) : If True, search this catalog and all children for the
360
+ id : The ID of the item to find.
361
+ recursive : If True, search this catalog and all children for the
362
362
item; otherwise, only search the items of this catalog. Defaults
363
363
to False.
364
364
@@ -400,7 +400,7 @@ def remove_item(self, item_id: str) -> None:
400
400
"""Removes an item from this catalog.
401
401
402
402
Args:
403
- item_id (str) : The ID of the item to remove.
403
+ item_id : The ID of the item to remove.
404
404
"""
405
405
new_links : List [pystac .Link ] = []
406
406
root = self .get_root ()
@@ -515,13 +515,13 @@ def normalize_and_save(
515
515
in sequence.
516
516
517
517
Args:
518
- root_href (str) : The absolute HREF that all links will be normalized
518
+ root_href : The absolute HREF that all links will be normalized
519
519
against.
520
- catalog_type (str) : The catalog type that dictates the structure of
520
+ catalog_type : The catalog type that dictates the structure of
521
521
the catalog to save. Use a member of :class:`~pystac.CatalogType`.
522
522
Defaults to the root catalog.catalog_type or the current catalog
523
523
catalog_type if there is no root catalog.
524
- strategy (HrefLayoutStrategy) : The layout strategy to use in setting the
524
+ strategy : The layout strategy to use in setting the
525
525
HREFS for this catalog. Defaults to
526
526
:class:`~pystac.layout.BestPracticesLayoutStrategy`
527
527
"""
@@ -538,8 +538,8 @@ def normalize_hrefs(
538
538
This method mutates the entire catalog tree.
539
539
540
540
Args:
541
- root_href (str) : The absolute HREF that all links will be normalized against.
542
- strategy (HrefLayoutStrategy) : The layout strategy to use in setting the HREFS
541
+ root_href : The absolute HREF that all links will be normalized against.
542
+ strategy : The layout strategy to use in setting the HREFS
543
543
for this catalog. Defaults to :class:`~pystac.layout.BestPracticesLayoutStrategy`
544
544
545
545
See:
@@ -611,12 +611,12 @@ def generate_subcatalogs(
611
611
and organize the items based on template values.
612
612
613
613
Args:
614
- template (str) : A template string that
614
+ template : A template string that
615
615
can be consumed by a :class:`~pystac.layout.LayoutTemplate`
616
- defaults (dict) : Default values for the template variables
616
+ defaults : Default values for the template variables
617
617
that will be used if the property cannot be found on
618
618
the item.
619
- parent_ids (List[str]) : Optional list of the parent catalogs'
619
+ parent_ids : Optional list of the parent catalogs'
620
620
identifiers. If the bottom-most subcatalogs already match the
621
621
template, no subcatalog is added.
622
622
@@ -683,7 +683,7 @@ def save(self, catalog_type: Optional[CatalogType] = None) -> None:
683
683
self link HREF.
684
684
685
685
Args:
686
- catalog_type (str) : The catalog type that dictates the structure of
686
+ catalog_type : The catalog type that dictates the structure of
687
687
the catalog to save. Use a member of :class:`~pystac.CatalogType`.
688
688
If not supplied, the catalog_type of this catalog will be used.
689
689
If that attribute is not set, an exception will be raised.
@@ -783,7 +783,7 @@ def map_items(
783
783
item_mapper function.
784
784
785
785
Args:
786
- item_mapper (Callable) : A function that takes in an item, and returns
786
+ item_mapper : A function that takes in an item, and returns
787
787
either an item or list of items. The item that is passed into the
788
788
item_mapper is a copy, so the method can mutate it safely.
789
789
@@ -829,7 +829,7 @@ def map_assets(
829
829
through the asset_mapper function.
830
830
831
831
Args:
832
- asset_mapper (Callable) : A function that takes in an key and an Asset, and
832
+ asset_mapper : A function that takes in an key and an Asset, and
833
833
returns either an Asset, a (key, Asset), or a dictionary of Assets with
834
834
unique keys. The Asset that is passed into the item_mapper is a copy,
835
835
so the method can mutate it safely.
0 commit comments