hats.catalog.dataset.collection_properties
==========================================

.. py:module:: hats.catalog.dataset.collection_properties


Attributes
----------

.. autoapisummary::

   hats.catalog.dataset.collection_properties.EXTRA_ALLOWED_FIELDS


Classes
-------

.. autoapisummary::

   hats.catalog.dataset.collection_properties.CollectionProperties


Module Contents
---------------

.. py:data:: EXTRA_ALLOWED_FIELDS
   :value: ['addendum_did', 'bib_reference', 'bib_reference_url', 'creator_did', 'data_ucd',...


.. py:class:: CollectionProperties(/, **data: Any)

   Bases: :py:obj:`pydantic.BaseModel`


   
   Container class for catalog metadata
















   ..
       !! processed by numpydoc !!

   .. py:attribute:: name
      :type:  str
      :value: None



   .. py:attribute:: hats_primary_table_url
      :type:  str
      :value: None


      
      Reference to object catalog. Relevant for nested, margin, association, and index.
















      ..
          !! processed by numpydoc !!


   .. py:attribute:: all_margins
      :type:  Annotated[Optional[list[str]], Field(default=None)]


   .. py:attribute:: default_margin
      :type:  Optional[str]
      :value: None



   .. py:attribute:: all_indexes
      :type:  Annotated[Optional[dict[str, str]], Field(default=None)]


   .. py:attribute:: default_index
      :type:  Optional[str]
      :value: None



   .. py:attribute:: model_config

      
      Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
















      ..
          !! processed by numpydoc !!


   .. py:method:: space_delimited_list(str_value: str) -> list[str]
      :classmethod:


      
      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











      ..
          !! processed by numpydoc !!


   .. py:method:: index_tuples(str_value: str) -> dict[str, str]
      :classmethod:


      
      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




      :Raises:

          ValueError
              if the string list has an odd number of elements (and so is not pairs of
              field and index name)







      ..
          !! processed by numpydoc !!


   .. py:method:: serialize_list_as_space_delimited_list(str_list: Iterable[str]) -> str

      
      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











      ..
          !! processed by numpydoc !!


   .. py:method:: serialize_dict_as_space_delimited_list(str_dict: dict[str, str]) -> str

      
      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











      ..
          !! processed by numpydoc !!


   .. py:method:: check_allowed_and_required() -> Self

      
      Check that type-specific fields are appropriate, and required fields are set.
















      ..
          !! processed by numpydoc !!


   .. py:method:: check_default_margin_exists() -> Self

      
      Check that the default margin is in the list of all margins.
















      ..
          !! processed by numpydoc !!


   .. py:method:: check_default_index_exists() -> Self

      
      Check that the default index is in the list of all indexes.
















      ..
          !! processed by numpydoc !!


   .. py:method:: explicit_dict()

      
      Create a dict, based on fields that have been explicitly set, and are not "extra" keys.
















      ..
          !! processed by numpydoc !!


   .. py:method:: __str__()

      
      Friendly string representation based on named fields.
















      ..
          !! processed by numpydoc !!


   .. py:method:: read_from_dir(catalog_dir: str | pathlib.Path | upath.UPath) -> Self
      :classmethod:


      
      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.properties`` file in the directory.











      ..
          !! processed by numpydoc !!


   .. py:method:: to_properties_file(catalog_dir: str | pathlib.Path | upath.UPath)

      
      Write fields to a java-style properties file.


      :Parameters:

          **catalog_dir: str | Path | UPath**
              base directory of catalog.














      ..
          !! processed by numpydoc !!


