dcraft.domain.layer package
Submodules
dcraft.domain.layer.base module
- class dcraft.domain.layer.base.BaseLayerData(id: str | None, project_name: str, content: DataFrame | dict | List[Dict], author: str | None, created_at: datetime, description: str | None, extra_info: dict | None)
Bases:
ABC- property content: Any
- property content_type: ContentType
- property id: str | None
- abstract save(format: str, data_repository: DataRepository, metadata_repository: MetadataRepository)
Save the content in the specified format using the provided data repository.
- Parameters:
format (str) – The format in which the content will be saved.
data_repository (DataRepository) – The data repository where the content will be saved.
metadata_repository (MetadataRepository) – The metadata repository where the metadata will be saved.
- Returns:
None
dcraft.domain.layer.raw module
- class dcraft.domain.layer.raw.RawLayerData(id: str | None, project_name: str, content: DataFrame | dict | List[Dict], author: str | None, created_at: datetime, description: str | None, extra_info: dict | None)
Bases:
BaseLayerDataThis stores raw data and manage.
This class is used to store raw data. Loaded raw layer data is stored on this class. And also, this manages saving and metadata.
- id
Unique id for the data and metadata
- Type:
str, optional
- project_name
Name of the project
- Type:
str
- content
Content of the data
- Type:
CoveredContentType
- author
Author of the data
- Type:
str, optional
- created_at
Created at
- Type:
datetime
- description
Description of the data
- Type:
str, optional
- extra_info
Extra information of the data
- Type:
dict, optional
- save(format: str, data_repository: DataRepository, metadata_repository: MetadataRepository)
Saves the content of the object to the data repository and the metadata to the metadata repository. On the timing of saving, the id of the object will be updated.
- Parameters:
format (str) – The format in which the content will be saved.
data_repository (DataRepository) – The data repository where the content will be saved.
metadata_repository (MetadataRepository) – The metadata repository where the metadata will be saved.
- Returns:
None
dcraft.domain.layer.refined module
- class dcraft.domain.layer.refined.RefinedLayerData(id: str | None, project_name: str, content: DataFrame | dict | List[Dict], author: str | None, created_at: datetime, description: str | None, extra_info: dict | None, source_ids: List[str] | None)
Bases:
BaseLayerDataThis stores refined data and manage.
This class is used to store refined data. Loaded refined layer data is stored on this class. And also, this manages saving and metadata.
- id
Unique id for the data and metadata
- Type:
str, optional
- project_name
Name of the project
- Type:
str
- content
Content of the data
- Type:
CoveredContentType
- author
Author of the data
- Type:
str, optional
- created_at
Created at
- Type:
datetime
- description
Description of the data
- Type:
str, optional
- extra_info
Extra information of the data
- Type:
dict, optional
- source_ids
List of source ids
- Type:
List[str], optional
- save(format: str, data_repository: DataRepository, metadata_repository: MetadataRepository)
Saves the content of this object to the data repository and metadata repository. On the timing of saving, the id of the object will be updated.
- Parameters:
format (str) – The format in which to save the content.
data_repository (DataRepository) – The data repository used for saving the content.
metadata_repository (MetadataRepository) – The metadata repository used for saving the metadata.
- Returns:
None
dcraft.domain.layer.trusted module
- class dcraft.domain.layer.trusted.TrustedLayerData(id: str | None, project_name: str, content: DataFrame | dict | List[Dict], author: str | None, created_at: datetime, description: str | None, extra_info: dict | None, source_ids: List[str] | None)
Bases:
BaseLayerDataThis stores trusted data and manage.
This class is used to store trusted data. Loaded trusted layer data is stored on this class. And also, this manages saving and metadata.
- id
Unique id for the data and metadata
- Type:
str, optional
- project_name
Name of the project
- Type:
str
- content
Content of the data
- Type:
CoveredContentType
- author
Author of the data
- Type:
str, optional
- created_at
Created at
- Type:
datetime
- description
Description of the data
- Type:
str, optional
- extra_info
Extra information of the data
- Type:
dict, optional
- source_ids
List of source ids
- Type:
List[str], optional
- save(format: str, data_repository: DataRepository, metadata_repository: MetadataRepository)
Save the content of the object to the data repository and metadata repository. On the timing of saving, the id of the object will be updated.
- Parameters:
format (str) – The format in which the content should be saved.
data_repository (DataRepository) – The data repository where the content should be saved.
metadata_repository (MetadataRepository) – The metadata repository where the metadata should be saved.
- Returns:
None