# SDK Pullenti Lingvo, version 4.33, fabruary 2026. Copyright (c) 2013-2026, Pullenti. All rights reserved.
# Non-Commercial Freeware and Commercial Software.
# This class is generated using the converter Unisharping (www.unisharping.ru) from Pullenti C# project.
# The latest version of the code is available on the site www.pullenti.ru

from pullenti.unisharp.Utils import Utils

from pullenti.ner.metadata.ReferentClass import ReferentClass
from pullenti.ner.link.LinkType import LinkType

class MetaLink(ReferentClass):
    
    @staticmethod
    def initialize() -> None:
        from pullenti.ner.link.LinkReferent import LinkReferent
        MetaLink.GLOBAL_META = MetaLink()
        MetaLink.TYPES = MetaLink.GLOBAL_META.add_feature(LinkReferent.ATTR_TYPE, "Тип", 1, 1)
        MetaLink.TYPES.add_value(Utils.enumToString(LinkType.BORN).lower(), "Рождение", None, None)
        MetaLink.TYPES.add_value(Utils.enumToString(LinkType.FAMILY).lower(), "Родственник", None, None)
        MetaLink.TYPES.add_value(Utils.enumToString(LinkType.STUDY).lower(), "Учеба", None, None)
        MetaLink.TYPES.add_value(Utils.enumToString(LinkType.WORK).lower(), "Работа", None, None)
        MetaLink.TYPES.add_value(Utils.enumToString(LinkType.CONTACT).lower(), "Контакт", None, None)
        MetaLink.TYPES.add_value(Utils.enumToString(LinkType.DOCUMENT).lower(), "Документ", None, None)
        MetaLink.TYPES.add_value(Utils.enumToString(LinkType.ADDRESS).lower(), "Локация", None, None)
        MetaLink.GLOBAL_META.add_feature(LinkReferent.ATTR_PARAM, "Параметр", 0, 1)
        MetaLink.GLOBAL_META.add_feature(LinkReferent.ATTR_OBJECT1, "Первый объект", 1, 1)
        MetaLink.GLOBAL_META.add_feature(LinkReferent.ATTR_OBJECT2, "Второй объект", 1, 1)
        MetaLink.GLOBAL_META.add_feature(LinkReferent.ATTR_DATEFROM, "Начало интервала", 0, 1)
        MetaLink.GLOBAL_META.add_feature(LinkReferent.ATTR_DATETO, "Окончание интервала", 0, 1)
    
    TYPES = None
    
    @property
    def name(self) -> str:
        from pullenti.ner.link.LinkReferent import LinkReferent
        return LinkReferent.OBJ_TYPENAME
    
    @property
    def caption(self) -> str:
        return "Связь сущностей"
    
    IMAGE_ID = "link"
    
    def get_image_id(self, obj : 'Referent'=None) -> str:
        return MetaLink.IMAGE_ID
    
    GLOBAL_META = None