-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
113 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
import attr | ||
from typing import Sequence | ||
|
||
|
||
@attr.s(auto_attribs=True, frozen=True) | ||
class ExternalNumbers: | ||
cdli_number: str = "" | ||
bm_id_number: str = "" | ||
archibab_number: str = "" | ||
bdtns_number: str = "" | ||
chicago_isac_number: str = "" | ||
ur_online_number: str = "" | ||
hilprecht_jena_number: str = "" | ||
hilprecht_heidelberg_number: str = "" | ||
metropolitan_number: str = "" | ||
louvre_number: str = "" | ||
dublin_tcd_number: str = "" | ||
alalah_hpm_number: str = "" | ||
australianinstituteofarchaeology_number: str = "" | ||
philadelphia_number: str = "" | ||
achemenet_number: str = "" | ||
nabucco_number: str = "" | ||
yale_peabody_number: str = "" | ||
oracc_numbers: Sequence[str] = () | ||
seal_numbers: Sequence[str] = () | ||
|
||
|
||
class FragmentExternalNumbers: | ||
external_numbers: ExternalNumbers = ExternalNumbers() | ||
|
||
def _get_external_number(self, number_type: str) -> str: | ||
return getattr(self.external_numbers, f"{number_type}_number") | ||
|
||
@property | ||
def cdli_number(self) -> str: | ||
return self._get_external_number("cdli") | ||
|
||
@property | ||
def bm_id_number(self) -> str: | ||
return self._get_external_number("bm_id") | ||
|
||
@property | ||
def archibab_number(self) -> str: | ||
return self._get_external_number("archibab") | ||
|
||
@property | ||
def bdtns_number(self) -> str: | ||
return self._get_external_number("bdtns") | ||
|
||
@property | ||
def chicago_isac_number(self) -> str: | ||
return self._get_external_number("chicago_isac") | ||
|
||
@property | ||
def ur_online_number(self) -> str: | ||
return self._get_external_number("ur_online") | ||
|
||
@property | ||
def hilprecht_jena_number(self) -> str: | ||
return self._get_external_number("hilprecht_jena") | ||
|
||
@property | ||
def hilprecht_heidelberg_number(self) -> str: | ||
return self._get_external_number("hilprecht_heidelberg") | ||
|
||
@property | ||
def yale_peabody_number(self) -> str: | ||
return self._get_external_number("yale_peabody") | ||
|
||
@property | ||
def metropolitan_number(self) -> str: | ||
return self._get_external_number("metropolitan_number") | ||
|
||
@property | ||
def louvre_number(self) -> str: | ||
return self._get_external_number("louvre_number") | ||
|
||
@property | ||
def dublin_tcd_number(self) -> str: | ||
return self._get_external_number("dublin_tcd_number") | ||
|
||
@property | ||
def alalah_hpm_number(self) -> str: | ||
return self._get_external_number("alalah_hpm_number") | ||
|
||
@property | ||
def australianinstituteofarchaeology_number(self) -> str: | ||
return self._get_external_number("australianinstituteofarchaeology_number") | ||
|
||
@property | ||
def achemenet_number(self) -> str: | ||
return self._get_external_number("achemenet") | ||
|
||
@property | ||
def nabucco_number(self) -> str: | ||
return self._get_external_number("nabucco") | ||
|
||
@property | ||
def philadelphia_number(self) -> str: | ||
return self._get_external_number("philadelphia_number") | ||
|
||
@property | ||
def seal_number(self) -> str: | ||
return self._get_external_number("seal_number") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters