institution
institution ¶
Address ¶
institution address.
ComponentType ¶
Contact ¶
Institution ¶
institution.
InstitutionList ¶
list of institutions.
Item ¶
make_address ¶
make_address(data)
make Address.
Source code in src/itkdb/models/institution.py
def make_address(data):
"""
make Address.
"""
return Address(
building=data.get("building"),
city=data.get("city"),
state=data.get("state"),
street=data.get("street"),
zip_code=data.get("zipCode"),
)
make_component_type ¶
make_component_type(data)
make ComponentType.
Source code in src/itkdb/models/institution.py
def make_component_type(data):
"""
make ComponentType.
"""
return ComponentType(
name=data["name"],
code=data["code"],
item_list=list(map(make_item, data["itemList"])),
)
make_contacts ¶
make_contacts(data)
make Contact.
Source code in src/itkdb/models/institution.py
def make_contacts(data):
"""
make Contact.
"""
return Contact(
email=data.get("email"), phone=data.get("phone"), web=data.get("web")
)
make_institution ¶
make_institution(data)
make Institution.
Source code in src/itkdb/models/institution.py
def make_institution(data):
"""
make Institution.
"""
return Institution(
address=make_address(data["address"]),
code=data["code"],
component_type=list(map(make_component_type, data["componentType"])),
contacts=make_contacts(data["contacts"]),
id=data["id"],
latitude=data["latitude"],
longitude=data["longitude"],
name=data["name"],
supervisor=data["supervisor"],
)
make_institution_list ¶
make_institution_list(data)
make InstitutionList.
Source code in src/itkdb/models/institution.py
def make_institution_list(data):
"""
make InstitutionList.
"""
return InstitutionList(institutions=list(map(make_institution, data)))
make_item ¶
make_item(data)
make Item.
Source code in src/itkdb/models/institution.py
def make_item(data):
"""
make Item.
"""
return Item(code=data["code"], id=data["id"], name=data["name"])