hats.catalog.dataset.collection_properties#
Attributes#
Classes#
Container class for catalog metadata |
Module Contents#
- EXTRA_ALLOWED_FIELDS = ['addendum_did', 'bib_reference', 'bib_reference_url', 'creator_did', 'data_ucd',...[source]#
- class CollectionProperties(/, **data: Any)[source]#
Bases:
pydantic.BaseModelContainer class for catalog metadata
- hats_primary_table_url: str = None[source]#
Reference to object catalog. Relevant for nested, margin, association, and index.
- model_config[source]#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- classmethod space_delimited_list(str_value: str) list[str][source]#
Convert a space-delimited list string into a python list of strings.
- Parameters:
- str_value: str
a space-delimited list string
- Returns:
- list[str]
a python list of strings
- classmethod index_tuples(str_value: str) dict[str, str][source]#
Convert a space-delimited list string into a python list of strings.
- Parameters:
- str_value: str
a space-delimited list string
- Returns:
- dict[str, str]
a python dict of strings
- serialize_list_as_space_delimited_list(str_list: Iterable[str]) str[source]#
Convert a python list of strings into a space-delimited string.
- Parameters:
- str_list: Iterable[str]
a python list of strings
- Returns:
- str
a space-delimited string
- serialize_dict_as_space_delimited_list(str_dict: dict[str, str]) str[source]#
Convert a python list of strings into a space-delimited string.
- Parameters:
- str_dict: dict[str, str]
a python dict of strings
- Returns:
- str
a space-delimited string
- check_allowed_and_required() typing_extensions.Self[source]#
Check that type-specific fields are appropriate, and required fields are set.
- check_default_margin_exists() typing_extensions.Self[source]#
Check that the default margin is in the list of all margins.
- check_default_index_exists() typing_extensions.Self[source]#
Check that the default index is in the list of all indexes.
- explicit_dict()[source]#
Create a dict, based on fields that have been explicitly set, and are not “extra” keys.
- classmethod read_from_dir(catalog_dir: str | pathlib.Path | upath.UPath) typing_extensions.Self[source]#
Read field values from a java-style properties file.
- Parameters:
- catalog_dir: str | Path | UPath
base directory of catalog.
- Returns:
- CollectionProperties
new object from the contents of a
collection.propertiesfile in the directory.