dcraft.domain.loader package

Submodules

dcraft.domain.loader.metadata module

dcraft.domain.loader.metadata.read_metadata(id: str, metadata_repository: MetadataRepository) Metadata

Retrieves metadata for a given ID.

Parameters:
  • id (str) – The ID of the metadata to retrieve.

  • metadata_repository (MetadataRepository) – The repository to load the metadata from.

Returns:

The loaded metadata.

Return type:

Metadata

dcraft.domain.loader.raw module

dcraft.domain.loader.raw.create_raw(content: DataFrame | dict | List[Dict], project_name: str, author: str | None = None, description: str | None = None, extra_info: dict | None = None) RawLayerData

Create a RawLayerData object with the given content, project name, author, description, and extra information.

Parameters:
  • content (CoveredContentType) – The content to be stored in the RawLayerData object.

  • project_name (str) – The name of the project.

  • author (Optional[str], optional) – The author of the content. Defaults to None.

  • description (Optional[str], optional) – A description of the content. Defaults to None.

  • extra_info (Optional[dict], optional) – Extra information related to the content. Defaults to None.

Returns:

The created RawLayerData object.

Return type:

RawLayerData

dcraft.domain.loader.refined module

dcraft.domain.loader.refined.create_refined(content: DataFrame | dict | List[Dict], project_name: str, author: str | None = None, description: str | None = None, extra_info: dict | None = None, source_ids: List[str] | None = None) RefinedLayerData

Create a refined layer data object.

Parameters:
  • content (CoveredContentType) – The content of the refined layer.

  • project_name (str) – The name of the project.

  • author (Optional[str], optional) – The author of the refined layer. Defaults to None.

  • description (Optional[str], optional) – The description of the refined layer. Defaults to None.

  • extra_info (Optional[dict], optional) – Extra information about the refined layer. Defaults to None.

  • source_ids (Optional[List[str]], optional) – The source IDs of the refined layer. Defaults to None.

Returns:

The created refined layer data object.

Return type:

RefinedLayerData

dcraft.domain.loader.trusted module

dcraft.domain.loader.trusted.create_trusted(content: DataFrame | dict | List[Dict], project_name: str, author: str | None = None, description: str | None = None, extra_info: dict | None = None, source_ids: List[str] | None = None) TrustedLayerData

Creates a trusted layer data object.

Parameters:
  • content (CoveredContentType) – The content of the trusted layer.

  • project_name (str) – The name of the project.

  • author (Optional[str], optional) – The author of the trusted layer. Defaults to None.

  • description (Optional[str], optional) – A description of the trusted layer. Defaults to None.

  • extra_info (Optional[dict], optional) – Any extra information associated with the trusted layer. Defaults to None.

  • source_ids (Optional[List[str]], optional) – The source IDs associated with the trusted layer. Defaults to None.

Returns:

The created trusted layer data object.

Return type:

TrustedLayerData

Module contents

dcraft.domain.loader.read_layer_data(id: str, data_repository: DataRepository, metadata_repository: MetadataRepository) RawLayerData | TrustedLayerData | RefinedLayerData