Changeset View
Changeset View
Standalone View
Standalone View
swh/indexer/metadata_dictionary/base.py
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | def translate(self, file_content: bytes) -> Optional[Dict]: | ||||
object.""" | object.""" | ||||
raise NotImplementedError(f"{self.__class__.__name__}.translate") | raise NotImplementedError(f"{self.__class__.__name__}.translate") | ||||
def normalize_translation(self, metadata: Dict[str, Any]) -> Dict[str, Any]: | def normalize_translation(self, metadata: Dict[str, Any]) -> Dict[str, Any]: | ||||
raise NotImplementedError(f"{self.__class__.__name__}.normalize_translation") | raise NotImplementedError(f"{self.__class__.__name__}.normalize_translation") | ||||
class BaseExtrinsicMapping(BaseMapping): | class BaseExtrinsicMapping(BaseMapping): | ||||
"""Base class for extrinsic-metadata mappings to inherit from | """Base class for extrinsic_metadata mappings to inherit from | ||||
To implement a new mapping: | To implement a new mapping: | ||||
- inherit this class | - inherit this class | ||||
- override translate function | - override translate function | ||||
""" | """ | ||||
@classmethod | @classmethod | ||||
▲ Show 20 Lines • Show All 192 Lines • Show Last 20 Lines |