/*
 * 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#.NET project. 
 * The latest version of the code is available on the site www.pullenti.ru
 */


const ReferentClass = require("./../metadata/ReferentClass");
const LinkType = require("./LinkType");

class MetaLink extends ReferentClass {
    
    static initialize() {
        const LinkReferent = require("./LinkReferent");
        MetaLink.GLOBAL_META = new MetaLink();
        MetaLink.TYPES = MetaLink.GLOBAL_META.addFeature(LinkReferent.ATTR_TYPE, "Тип", 1, 1);
        MetaLink.TYPES.addValue(LinkType.BORN.toString().toLowerCase(), "Рождение", null, null);
        MetaLink.TYPES.addValue(LinkType.FAMILY.toString().toLowerCase(), "Родственник", null, null);
        MetaLink.TYPES.addValue(LinkType.STUDY.toString().toLowerCase(), "Учеба", null, null);
        MetaLink.TYPES.addValue(LinkType.WORK.toString().toLowerCase(), "Работа", null, null);
        MetaLink.TYPES.addValue(LinkType.CONTACT.toString().toLowerCase(), "Контакт", null, null);
        MetaLink.TYPES.addValue(LinkType.DOCUMENT.toString().toLowerCase(), "Документ", null, null);
        MetaLink.TYPES.addValue(LinkType.ADDRESS.toString().toLowerCase(), "Локация", null, null);
        MetaLink.GLOBAL_META.addFeature(LinkReferent.ATTR_PARAM, "Параметр", 0, 1);
        MetaLink.GLOBAL_META.addFeature(LinkReferent.ATTR_OBJECT1, "Первый объект", 1, 1);
        MetaLink.GLOBAL_META.addFeature(LinkReferent.ATTR_OBJECT2, "Второй объект", 1, 1);
        MetaLink.GLOBAL_META.addFeature(LinkReferent.ATTR_DATEFROM, "Начало интервала", 0, 1);
        MetaLink.GLOBAL_META.addFeature(LinkReferent.ATTR_DATETO, "Окончание интервала", 0, 1);
    }
    
    get name() {
        const LinkReferent = require("./LinkReferent");
        return LinkReferent.OBJ_TYPENAME;
    }
    
    get caption() {
        return "Связь сущностей";
    }
    
    getImageId(obj = null) {
        return MetaLink.IMAGE_ID;
    }
    
    static static_constructor() {
        MetaLink.TYPES = null;
        MetaLink.IMAGE_ID = "link";
        MetaLink.GLOBAL_META = null;
    }
}


MetaLink.static_constructor();

module.exports = MetaLink