Skip to content

Commit 4e46270

Browse files
committed
add Catalog.is_relative() function
1 parent 495bf2b commit 4e46270

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pystac/catalog.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,9 @@ def set_root(self, root):
148148
root._resolved_objects = ResolvedObjectCache.merge(root._resolved_objects,
149149
self._resolved_objects)
150150

151+
def is_relative(self):
152+
return self.catalog_type in [CatalogType.RELATIVE_PUBLISHED, CatalogType.SELF_CONTAINED]
153+
151154
def add_child(self, child, title=None):
152155
"""Adds a link to a child :class:`~pystac.Catalog` or :class:`~pystac.Collection`.
153156
This method will set the child's parent to this object, and its root to

0 commit comments

Comments
 (0)