def get_by_system(system_class: str, parser: Dict[str, Any]) \ -> List[Entity]: if system_class not in g.classes: raise InvalidSystemClassError return [ Entity(row) for row in Db.get_by_system_class(system_class, parser) ]
def get_by_view(code_: str, parser: dict[str, Any]) -> list[Entity]: if code_ not in g.view_class_mapping: raise InvalidCodeError # pragma: no cover sys_class = Db.get_by_system_class(g.view_class_mapping[code_], parser) return [Entity(row) for row in sys_class]
def get_by_class(class_code: str, parser: dict[str, Any]) -> list[Entity]: if class_code not in g.cidoc_classes: raise InvalidCidocClassCode # pragma: no cover return [Entity(row) for row in Db.get_by_class_code(class_code, parser)]