{"id":179949,"date":"2013-05-28T17:47:05","date_gmt":"2013-05-28T13:47:05","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=179949"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=179949","title":{"rendered":"<span class=\"post_title\">\u0411\u0414. \u0421\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0438. \u0413\u043b\u043e\u0431\u0430\u043b\u044b. \u0412\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u0416\u0438\u0432\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<i>\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u044f\u0449\u0435\u0439 <b>\u00ab\u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438\u00bb<\/b> \u043a\u0430\u043c\u0435\u0440\u044b \u0441 \u043f\u0430\u0440\u0430\u0448\u044e\u0442\u043e\u043c \u0432 \u0440\u0430\u043d\u0435\u0446.<\/i><br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/082\/fe4\/0ab\/082fe40ab657d34379e7b41a99d9e78d.jpg\" align=\"left\"\/><br \/>  <a href=\"http:\/\/habrahabr.ru\/company\/intersystems\/blog\/175773\/\">\u0427\u0430\u0441\u0442\u044c 1<\/a><br \/>  <a href=\"http:\/\/habrahabr.ru\/company\/intersystems\/blog\/177319\/\">\u0427\u0430\u0441\u0442\u044c 2<\/a><br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/178563\/\">\u0427\u0430\u0441\u0442\u044c 3<\/a><\/p>\n<p>  \u0412 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437 \u043c\u044b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438\u0441\u044c \u043d\u0430 \u0442\u043e\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <a href=\"http:\/\/habrahabr.ru\/post\/178563\/#create\"><b>create()<\/b><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u0430 \u043f\u0440\u0430\u0432\u0438\u043b <a href=\"http:\/\/habrahabr.ru\/post\/178563\/#ruleDic\"><b>^RuleDictionary<\/b><\/a> \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430. \u041d\u0430\u043c\u0438 \u0431\u044b\u043b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0433\u043e, \u043e\u0434\u043d\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0433\u043e \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430. \u0421\u0435\u0433\u043e\u0434\u043d\u044f, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0430\u0448\u0438\u0445 \u0433\u043b\u043e\u0431\u0430\u043b\u043e\u0432 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b.<\/p>\n<p>  \u0412 <a href=\"http:\/\/habrahabr.ru\/post\/178563\/#allDictionary\">\u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/a>, \u0431\u044b\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b <i>\u00ab\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0435\u00bb<\/i> \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <b>t<\/b> \u0438 <b>map<\/b>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043d\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u043c\u0435\u0442\u043e\u0434\u044b, \u043d\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0438\u0445. \u041c\u043d\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u043b\u0443\u0447\u0448\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0442\u043e, \u0447\u0442\u043e \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430, \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 Cach\u00e9 Object Script \u2014 \u043d\u043e\u0432. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u043c, \u0432\u043d\u0435\u0441\u0451\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443.<\/p>\n<hr\/>\n<p>  <a name=\"habracut\"><\/a><a name=\"macros\"><\/a>  <\/p>\n<h4>\u041c\u0430\u043a\u0440\u043e\u0441\u044b<\/h4>\n<p>  \u041c\u0430\u043a\u0440\u043e\u0441\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c\u044b (\u0434\u0440\u0443\u0433\u0438\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f) \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430\u043c, \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u043c \u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u043a\u0443\u0441\u043a\u0430\u043c \u043a\u043e\u0434\u0430 \u0438 \u043f\u0440\u043e\u0447\u0435\u043c\u0443. \u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u0430\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0451\u043d, \u0433\u043b\u043e\u0431\u0430\u043b\u043e\u0432 \u0438 \u0442.\u0434.), \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u043c\u0430\u043a\u0440\u043e\u0441 (\u0432 inc \u0444\u0430\u0439\u043b\u0435), \u043f\u0435\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442, \u0438 \u0432\u0441\u0451 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c\u0438. \u0422\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c, \u043d\u0435 \u0442\u0435\u0440\u044f\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e\u043d\u044f\u0442\u043b\u0438\u0432\u043e\u0441\u0442\u0438. \u041c\u0430\u043a\u0440\u043e\u0441 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u043c \u0441\u043b\u043e\u0432\u043e\u043c <b>#define<\/b>, \u0434\u0430\u043b\u0435\u0435 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0438\u043c\u044f \u043c\u0430\u043a\u0440\u043e\u0441\u0430, \u0435\u0449\u0451 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0431\u0435\u043b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u043c\u0430\u043a\u0440\u043e\u0441 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442. \u041c\u0430\u043a\u0440\u043e\u0441\u044b \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0431\u044f \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u0430\u043a\u0440\u043e\u0441\u044b, \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0447\u0442\u043e \u0431\u044b \u043e\u043d\u0438 \u0431\u044b\u043b\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0440\u0430\u043d\u0435\u0435. \u0412 \u043c\u0430\u043a\u0440\u043e\u0441\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b (\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0437\u043d\u0430\u043a\u043e\u043c <b>%<\/b>).<\/p>\n<p>  <b>#define defNameSpace \u00abMONTOLOGY\u00bb<\/b><\/p>\n<p>  \u042d\u0442\u043e\u0442 \u043c\u0430\u043a\u0440\u043e\u0441 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c, \u0432\u043c\u0435\u0441\u0442\u043e <b>\u00abMONTOLOGY\u00bb<\/b> \u2014 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c <b>$$$defNameSpace<\/b>. \u0422\u0440\u0438 \u0434\u043e\u043b\u043b\u0430\u0440\u0430 \u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442 \u0447\u0442\u043e \u043c\u0430\u043a\u0440\u043e\u0441 \u0441\u043e\u0437\u0434\u0430\u043d \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c (\u043d\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439). \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e <b>$$$defNameSpace<\/b>, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0438 \u043c\u0435\u043d\u044c\u0448\u0435 \u044f\u0441\u043d\u043e\u0441\u0442\u0438, \u0447\u0435\u043c <b>\u00abMONTOLOGY<\/b>\u00bb, \u044d\u0442\u043e\u0442 \u043c\u0430\u043a\u0440\u043e\u0441 \u043d\u0430\u043c \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0430\u043a\u0440\u043e\u0441\u0430\u0445, \u0430 \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/p>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c \u0443 \u043d\u0430\u0441 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0444\u0430\u0439\u043b <b>Dictionary.inc<\/b><\/p>\n<pre><code class=\"bash\">#; \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0451\u043d \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e #define defNameSpace &quot;MONTOLOGY&quot;  #; \u0433\u043b\u043e\u0431\u0430\u043b \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 #define dData ^|$$$defNameSpace|Dictionary  #; \u0438\u043c\u0435\u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 #define dName ^|$$$defNameSpace|NameDictionaryElement  #; \u0438\u043d\u0434\u0435\u043a\u0441 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 #define dIndex ^|$$$defNameSpace|IndexDictionary  #; \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 #define dRefs ^|$$$defNameSpace|RefsDictionary  #; \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 #define dMaxID $increment($$$dData(&quot;MaxID&quot;))  #; \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 #define dRule ^|$$$defNameSpace|RuleDictionary  #; \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0433\u043b\u043e\u0431\u0430\u043b \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 #define dDTO ^|$$$defNameSpace|tmwOntology  #; \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0438\u0437 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u0430 #define getDTOin(%param,%def) $get($$$dDTO($job,&quot;in&quot;,%param),%def)  #; \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432 \u0432\u0435\u0442\u043a\u0443 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u0430 #define setDTOproc(%param,%val) set $$$dDTO($job,&quot;proc&quot;,%param)=%val  #; \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0438\u0437 \u0432\u0435\u0442\u043a\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u0430 #define getDTOproc(%param,%def) $get($$$dDTO($job,&quot;proc&quot;,%param),%def)  #; \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432 \u0432\u044b\u0445\u043e\u0434\u043d\u0443\u044e \u0432\u0435\u0442\u043a\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u0430 #define setDTOout(%param,%val) set $$$dDTO($job,&quot;out&quot;,%param)=%val  #; \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0438\u0437 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u0430 #define getDTOout(%param,%def) $get($$$dDTO($job,&quot;out&quot;,%param),%def)  #; \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u044f\u0437\u044b\u043a\u0443 \u0438\u0437 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u0430 #define getDTOname(%lang) $get($$$dDTO($job,&quot;in&quot;,&quot;nameList&quot;,%lang)) <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0431\u044b \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u0433\u043b\u043e\u0431\u0430\u043b\u0443: <b>^|\u00abMONTOLOGY\u00bb|IndexDictionary<\/b> \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e <b>$$$dIndex<\/b>. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043c\u0430\u043a\u0440\u043e\u0441 <b>$$$dMaxID<\/b>: \u0432 \u043d\u0451\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0438\u043d\u043a\u0440\u0438\u043c\u0435\u043d\u0442\u0430. \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0439\u0434\u0451\u0442 \u043f\u043e \u0432\u0441\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 <b>Dictionary<\/b> \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442 \u0432\u0441\u0435 \u043c\u0430\u043a\u0440\u043e\u0441\u044b, \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043e\u043d\u0438 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442. \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442 \u043e\u0431\u044b\u0447\u043d\u0443\u044e \u0437\u0430\u043c\u0435\u043d\u0443 \u0442\u0435\u043a\u0441\u0442\u0430. \u041c\u0430\u043a\u0440\u043e\u0441 <b>$$$dDTO<\/b> (dictionary Data Transfer Object) \u2014 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <b>map<\/b>, \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u0434\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u043c\u0438. <a href=\"http:\/\/docs.intersystems.com\/ens20091\/csp\/docbook\/DocBook.UI.Page.cls?KEY=RCOS_vjob#RCOS_B50963\"><b>$job<\/b><\/a> \u2014 \u044d\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u0422\u043e \u0435\u0441\u0442\u044c, \u043c\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c, \u0447\u0442\u043e \u0441 \u0433\u043b\u043e\u0431\u0430\u043b\u043e\u043c <b>^|\u00abMONTOLOGY\u00bb|tmwOntology<\/b>, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u043f\u043e \u043c\u0430\u043a\u0440\u043e\u0441\u0443 <b>$$$dDTO<\/b>, \u043c\u043e\u0433\u0443\u0442 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432. \u041a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043d\u0438\u0445 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0441\u0432\u043e\u0435\u043c\u0443 \u0438\u043d\u0434\u0435\u043a\u0441\u0443 <b>$$$dDTO($job)<\/b>, \u0430 \u0434\u0430\u043b\u0435\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0435 \u0432\u0435\u0442\u043a\u0438:<\/p>\n<ul>\n<li><b>$$$dDTO($job,\u00abin\u00bb)<\/b> \u2014 \u0432\u0435\u0442\u043a\u0430 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432<\/li>\n<li><b>$$$dDTO($job,\u00abproc\u00bb)<\/b> \u2014 \u0432\u0435\u0442\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/li>\n<li><b>$$$dDTO($job,\u00about\u00bb)<\/b> \u2014 \u0432\u0435\u0442\u043a\u0430 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432<\/li>\n<\/ul>\n<p>  \u041d\u0430\u0448\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044b, \u0438\u0437 \u043f\u0440\u043e\u0448\u043b\u044b\u0445 \u0441\u0442\u0430\u0442\u0435\u0439, \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u0434\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043c\u0430\u043a\u0440\u043e\u0441\u0430\u043c:  <\/p>\n<ul>\n<li><a href=\"http:\/\/habrahabr.ru\/company\/intersystems\/blog\/175773\/#Dictionary\"><b>^Dictionary<\/b><\/a> \u2014 <b>$$$dData<\/b><\/li>\n<li><a href=\"http:\/\/habrahabr.ru\/company\/intersystems\/blog\/175773\/#NameDictionaryElement\"><b>^NameDictionaryElement<\/b><\/a> \u2014 <b>$$$dName<\/b><\/li>\n<li><a href=\"http:\/\/habrahabr.ru\/company\/intersystems\/blog\/177319\/#IndexDictionary\"><b>^IndexDictionary<\/b><\/a> \u2014 <b>$$$dIndex<\/b><\/li>\n<li><a href=\"http:\/\/habrahabr.ru\/company\/intersystems\/blog\/177319\/#RefsDictionary\"><b>^RefsDictionary<\/b><\/a> \u2014 <b>$$$dRefs<\/b><\/li>\n<li><a href=\"http:\/\/habrahabr.ru\/post\/178563\/#ruleDic\"><b>^RuleDictionary<\/b><\/a> \u2014 <b>$$$dRule<\/b><\/li>\n<\/ul>\n<p>  \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043f\u0435\u0440\u0435\u043f\u0438\u0448\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b <b>Dictionary<\/b> \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432<\/p>\n<p>  \u0411\u044b\u043b\u043e (\u0431\u0435\u0437 \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432):  <\/p>\n<pre><code class=\"bash\">#; -------------------------------------------------------------------------------------------------- #; \u0418\u043c\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b #; -------------------------------------------------------------------------------------------------- Dictionary #; -------------------------------------------------------------------------------------------------- #; \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430. #; -------------------------------------------------------------------------------------------------- retrieve(id,lang=&quot;ru&quot;,version=0)     quit $get(^NameDictionaryElement(id,lang,version),&quot;&quot;) #; -------------------------------------------------------------------------------------------------- <\/code><\/pre>\n<p>  \u0421\u0442\u0430\u043b\u043e (\u0441 \u043c\u0430\u043a\u0440\u043e\u0441\u0430\u043c\u0438):  <\/p>\n<pre><code class=\"bash\">#; -------------------------------------------------------------------------------------------------- #; \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b Dictionary.inc, \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 (inc) - \u043f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e #include Dictionary  #; -------------------------------------------------------------------------------------------------- #; \u0418\u043c\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b #; -------------------------------------------------------------------------------------------------- Dictionary #; -------------------------------------------------------------------------------------------------- #; \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430. #; -------------------------------------------------------------------------------------------------- retrieve(id,lang=&quot;ru&quot;,version=0)     quit $get($$$dName(id,lang,version),&quot;&quot;) #; -------------------------------------------------------------------------------------------------- <\/code><\/pre>\n<p>  \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0432\u0435\u0441\u044c \u043a\u043e\u0434 <a href=\"http:\/\/habrahabr.ru\/post\/178563\/#allDictionary\">\u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/a> \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432 \u0438 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 Dictionary<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">#; -------------------------------------------------------------------------------------------------- #; \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b Dictionary.inc, \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 (inc) - \u043f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e #include Dictionary #; -------------------------------------------------------------------------------------------------- #; \u0418\u043c\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b #; -------------------------------------------------------------------------------------------------- Dictionary #; -------------------------------------------------------------------------------------------------- #; \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430. #; -------------------------------------------------------------------------------------------------- retrieve(id,lang=&quot;ru&quot;,version=0)     quit $get($$$dName(id,lang,version),&quot;&quot;) #; -------------------------------------------------------------------------------------------------- #; \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443. #; -------------------------------------------------------------------------------------------------- retrieveListByIndex(ontology,type,index,value,str=&quot;&quot;,lang=&quot;ru&quot;)       #;\u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u043c \u0432 \u043d\u0438\u0436\u043d\u0438\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0441\u0442\u0440\u043e\u043a\u0443, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0434\u043e\u043b\u0436\u043d\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u0441\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432     set str=$zconvert(str,&quot;L&quot;)      set id=&quot;&quot;      for {         #;\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440(\u0438\u043d\u0434\u0435\u043a\u0441) \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0443\u0440\u043e\u0432\u043d\u0435         set id=$order($$$dIndex(ontology,type,index,value,id))          #;\u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0446\u0438\u043a\u043b\u0430, \u0435\u0441\u043b\u0438 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u0442         quit:id=&quot;&quot;          #;\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430         set name=$$retrieve(id,lang)          #;\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043b\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 str         if $extract($zconvert(name,&quot;L&quot;),1,$length(str))=str {             #;\u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (\u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435)             write id_&quot; &quot;_name,!         }     }     quit #; -------------------------------------------------------------------------------------------------- #; \u0421\u043e\u0437\u0434\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430. #; \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445. #; -------------------------------------------------------------------------------------------------- create() \t \t#; \u043e\u0447\u0438\u0449\u0430\u0435\u043c \u043a\u0430\u0440\u0442\u0443 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \tkill $$$dDTO($job,&quot;out&quot;) \t \t#; \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u0443\u044e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443 t \t#; \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432\u0441\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 create \tnew t \t \t#; \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \tset t(&quot;err&quot;)=$$check(&quot;create&quot;) \t \t#; \u0432\u044b\u0445\u043e\u0434\u0438\u043c, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0430 \tif t(&quot;err&quot;)&lt;0 { quit t(&quot;err&quot;) } \t \ts t(&quot;ontology&quot;)=$$$getDTOin(&quot;ontology&quot;,&quot;&quot;) \ts t(&quot;type&quot;)=$$$getDTOin(&quot;type&quot;,&quot;&quot;) \ts t(&quot;id&quot;)=$$$getDTOproc(&quot;id&quot;,&quot;&quot;) \t \t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e &quot;UpdateTime&quot; \tdo setProperty(t(&quot;ontology&quot;),t(&quot;type&quot;),&quot;UpdateTime&quot;,$horolog,t(&quot;id&quot;),&quot;false&quot;) \t \t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e &quot;uid&quot; \tdo setProperty(t(&quot;ontology&quot;),t(&quot;type&quot;),&quot;uid&quot;,$$$getDTOin(&quot;uid&quot;,888),t(&quot;id&quot;),&quot;true&quot;) \t \tset t(&quot;lang&quot;)=&quot;&quot;  \tfor { \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u044f\u0437\u044b\u043a (\u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u0434\u0430\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430) \t\tset t(&quot;lang&quot;)=$order($$$dDTO($job,&quot;in&quot;,&quot;nameList&quot;,t(&quot;lang&quot;))) \t\t \t\t#; \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0446\u0438\u043a\u043b\u0430, \u0435\u0441\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u043d\u0435\u0442 \t\tquit:t(&quot;lang&quot;)=&quot;&quot; \t\t \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \t\tset t(&quot;name&quot;)=$get($$$dDTO($job,&quot;in&quot;,&quot;nameList&quot;,t(&quot;lang&quot;)),&quot;&quot;) \t\t \t\t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \t\tdo setName(t(&quot;ontology&quot;),t(&quot;type&quot;),t(&quot;lang&quot;),t(&quot;name&quot;),t(&quot;id&quot;)) \t} \t \t#; \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u044e \u0438 \u0442\u0438\u043f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u043c \u0433\u043b\u043e\u0431\u0430\u043b\u0435 \tdo saveOntoAndTypeID(t(&quot;id&quot;),t(&quot;ontology&quot;),t(&quot;type&quot;)) \t \t#; \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u043c \u0433\u043b\u043e\u0431\u0430\u043b\u0435 \tdo saveElementPath(t(&quot;id&quot;),$$$getDTOproc(&quot;path&quot;,&quot;&quot;)) \t \t#; \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u043a\u0430\u0440\u0442\u0443 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \t$$$setDTOout(&quot;id&quot;,t(&quot;id&quot;)) \t \t#; \u043e\u0447\u0438\u0449\u0430\u0435\u043c \u043a\u0430\u0440\u0442\u0443 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \tkill $$$dDTO($job,&quot;in&quot;) \t \t#; \u043e\u0447\u0438\u0449\u0430\u0435\u043c \u043a\u0430\u0440\u0442\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \tkill $$$dDTO($job,&quot;porc&quot;) \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \tquit t(&quot;id&quot;) #; -------------------------------------------------------------------------------------------------- #; \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438. #; \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0433\u043b\u043e\u0431\u0430\u043b \u043f\u0440\u0430\u0432\u0438\u043b ^RuleDictionary \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. #; -------------------------------------------------------------------------------------------------- check(action)private \t \t#; \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u0443\u044e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e check \tnew check \t \t#; \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f action \tset check=$case(action,&quot;create&quot;:$$checkCreate(),&quot;update&quot;:$$checkUpdate(),&quot;delete&quot;:$$checkDelete(),:-1) \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443 \tquit:check&lt;0 check \t \t#; \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043b\u0438 \u0432\u0435\u0442\u043a\u0430 \u0433\u043b\u043e\u0431\u0430\u043b\u0430 \u043f\u0440\u0430\u0432\u0438\u043b &quot;check&quot;, \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u0438 \u0442\u0438\u043f\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \tif $data($$$dRule($$$getDTOin(&quot;ontology&quot;,&quot;&quot;),$$$getDTOin(&quot;type&quot;,&quot;&quot;),action,&quot;check&quot;))  \t{  \t\t#; \u0432 check(&quot;map&quot;) \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043a\u0430\u043d\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0438\u043c\u044f \u043d\u0443\u0436\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u0430 \u043f\u0440\u0430\u0432\u0438\u043b \t\tset check(&quot;map&quot;)=$name($$$dRule($$$getDTOin(&quot;ontology&quot;,&quot;&quot;),$$$getDTOin(&quot;type&quot;,&quot;&quot;),action,&quot;check&quot;))  \t} \telse {  \t\t#; \u0432 check(&quot;map&quot;) \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043a\u0430\u043d\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0438\u043c\u044f \u0432\u0435\u0442\u043a\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u0430 \u043f\u0440\u0430\u0432\u0438\u043b \u0434\u043b\u044f \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u0438 \u0438 \u0442\u0438\u043f\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \t\tset check(&quot;map&quot;)=$name($$$dRule(&quot;SimpleOntology&quot;,&quot;SimpleType&quot;,action,&quot;check&quot;))  \t} \t \tset check(&quot;i&quot;)=&quot;&quot;  \tfor { \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043d\u043e\u043c\u0435\u0440 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \t\tset check(&quot;i&quot;)=$order(@check(&quot;map&quot;)@(check(&quot;i&quot;))) \t\t \t\t#; \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0446\u0438\u043a\u043b\u0430, \u0435\u0441\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043d\u043e\u043c\u0435\u0440\u0430 \u043d\u0435\u0442 \t\tquit:check(&quot;i&quot;)=&quot;&quot; \t\t \t\t#; \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \t\txecute $get(@check(&quot;map&quot;)@(check(&quot;i&quot;))) \t\t \t\t#; \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0446\u0438\u043a\u043b\u0430, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0435 \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u0430 \t\tquit:check&lt;0 \t} \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \tquit check #; -------------------------------------------------------------------------------------------------- #; \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438. #; -------------------------------------------------------------------------------------------------- checkCreate()private \t \tnew t \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443 \u0435\u0441\u043b\u0438 \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u044f \u043d\u0435 \u0437\u0430\u0434\u0430\u043d\u0430 \tquit:$$$getDTOin(&quot;ontology&quot;,&quot;&quot;)=&quot;&quot; -1 \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443, \u0435\u0441\u043b\u0438 \u0442\u0438\u043f \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u043d\u0435 \u0437\u0430\u0434\u0430\u043d \tquit:$$$getDTOin(&quot;type&quot;,&quot;&quot;)=&quot;&quot; -1 \t \t#; \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438\u043c\u0451\u043d \tset t(&quot;check&quot;)=$$checkNames() \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0435 \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u0430 \tquit:t(&quot;check&quot;)&lt;0 t(&quot;check&quot;) \t \t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \t$$$setDTOproc(&quot;id&quot;,$$$dMaxID) \t \t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u0432\u0435\u0442\u043a\u0435 \u0433\u043b\u043e\u0431\u0430\u043b\u0430 ^Dictionary \t$$$setDTOproc(&quot;path&quot;,$name($$$dData($$$getDTOin(&quot;ontology&quot;,&quot;&quot;),$$$getDTOin(&quot;type&quot;,&quot;&quot;),$$$getDTOproc(&quot;id&quot;,&quot;&quot;)))) \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \tquit 0 #; -------------------------------------------------------------------------------------------------- checkUpdate() quit 0 #; -------------------------------------------------------------------------------------------------- checkDelete() quit 0 #; -------------------------------------------------------------------------------------------------- #; \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438\u043c\u0451\u043d \u043d\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445. #; -------------------------------------------------------------------------------------------------- checkNames()private \t \tnew t \t \t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0432 t(&quot;check&quot;) \u043e\u0448\u0438\u0431\u043a\u0443 \t#; \u0434\u043b\u044f \u0441\u043b\u0443\u0447\u0430\u044f \u043a\u043e\u0433\u0434\u0430 \u043d\u0438 \u043e\u0434\u0438\u043d \u044f\u0437\u044b\u043a \u043d\u0435 \u0437\u0430\u0434\u0430\u043d \tset t(&quot;check&quot;)=-1 \t \tset t(&quot;lang&quot;)=&quot;&quot;  \tfor { \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u044f\u0437\u044b\u043a \t\tset t(&quot;lang&quot;)=$order($$$dDTO($job,&quot;in&quot;,&quot;nameList&quot;,t(&quot;lang&quot;))) \t\t \t\t#; \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0446\u0438\u043a\u043b\u0430, \u0435\u0441\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u043d\u0435\u0442 \t\tquit:t(&quot;lang&quot;)=&quot;&quot;  \t\t \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \t\tset t(&quot;name&quot;)=$get($$$dDTO($job,&quot;in&quot;,&quot;nameList&quot;,t(&quot;lang&quot;)),&quot;&quot;) \t\t \t\t#; \u0435\u0441\u043b\u0438 \u0438\u043c\u044f \u043f\u0443\u0441\u0442\u043e\u0435 \t\tif t(&quot;name&quot;)=&quot;&quot; {   \t\t\t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0432 t(&quot;check&quot;) \u043e\u0448\u0438\u0431\u043a\u0443 \t\t\tset t(&quot;check&quot;)=-1 \t\t \t\t\t#; \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0446\u0438\u043a\u043b\u0430 \t\t\tquit \t\t} \t\telse {  \t\t\t#; \u0432 t(&quot;check&quot;) \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432\u0441\u0451 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435  \t\t\tset t(&quot;check&quot;)=0 \t\t} \t} \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438\u043c\u0451\u043d \tquit t(&quot;check&quot;) #; -------------------------------------------------------------------------------------------------- #; \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439. #; -------------------------------------------------------------------------------------------------- processingNames(function)  \tnew t \tset t(&quot;lang&quot;)=&quot;&quot;  \tfor {  \t\t#; \u0446\u0438\u043a\u043b \u043f\u043e \u0432\u0441\u0435\u043c \u044f\u0437\u044b\u043a\u0430\u043c \t\tset t(&quot;lang&quot;)=$order($$$dDTO($job,&quot;in&quot;,&quot;nameList&quot;,t(&quot;lang&quot;))) \t\tquit:t(&quot;lang&quot;)=&quot;&quot;   \t\t \t\t#; \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u044f\u0437\u044b\u043a\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \t\txecute &quot;set &quot;_$name($$$dDTO($job,&quot;in&quot;,&quot;nameList&quot;,t(&quot;lang&quot;)))_&quot;=$$&quot;_function_&quot;(&quot;&quot;&quot;_$$$getDTOname(t(&quot;lang&quot;))_&quot;&quot;&quot;)&quot; \t} \tquit #; -------------------------------------------------------------------------------------------------- checkUniqueNameElementAllLang()  \tnew t  \tset t(&quot;check&quot;)=0 \ts t(&quot;ontology&quot;)=$$$getDTOin(&quot;ontology&quot;,&quot;&quot;) \ts t(&quot;type&quot;)=$$$getDTOin(&quot;type&quot;,&quot;&quot;) \tset t(&quot;lang&quot;)=&quot;&quot;  \tfor {  \t\t#; \u0446\u0438\u043a\u043b \u043f\u043e \u0432\u0441\u0435\u043c \u044f\u0437\u044b\u043a\u0430\u043c \t\tset t(&quot;lang&quot;)=$order($$$dDTO($job,&quot;in&quot;,&quot;nameList&quot;,t(&quot;lang&quot;))) \t\tquit:t(&quot;lang&quot;)=&quot;&quot;   \t\t \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \t\tset t(&quot;name&quot;)=$get($$$dDTO($job,&quot;in&quot;,&quot;nameList&quot;,t(&quot;lang&quot;)),&quot;&quot;) \t\t \t\t#; \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e t(&quot;check&quot;) \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0441\u0442\u0430\u0442\u0443\u0441 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u043c\u0435\u043d\u0438 (0 - \u0437\u043d\u0430\u0447\u0438\u0442 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e) \t\ts t(&quot;check&quot;)=$$checkUniqueNameElement(t(&quot;ontology&quot;),t(&quot;type&quot;),t(&quot;lang&quot;),t(&quot;name&quot;),$$$getDTOproc(&quot;id&quot;,&quot;&quot;)) \t\t \t\t#; \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0446\u0438\u043a\u043b\u0430 \u0435\u0441\u043b\u0438 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0438\u043c\u044f \u043d\u0435 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e \t\tquit:t(&quot;check&quot;)&lt;0  \t} \tquit t(&quot;check&quot;) #; -------------------------------------------------------------------------------------------------- #; \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432\u0441\u044e \u043f\u0443\u043d\u043a\u0442\u0443\u0430\u0446\u0438\u044e \u0438 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b. #; -------------------------------------------------------------------------------------------------- clearPunctuationAndControlChar(str) \t \tnew t  \t \t#; \u0432 t(&quot;str&quot;) \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \tset t(&quot;str&quot;)=&quot;&quot; \t \t#; \u0446\u0438\u043a\u043b \u043f\u043e \u0432\u0441\u0435\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c \u0441\u0442\u0440\u043e\u043a\u0438  \tfor t(&quot;i&quot;)=1:1:$length(str) { \t\t \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u0438\u043c\u0432\u043e\u043b \t\tset t(&quot;ch&quot;)=$extract(str,t(&quot;i&quot;)) \t\t \t\tif `((t(&quot;ch&quot;)?1P)||(t(&quot;ch&quot;)?1C)) { \t\t\t#; \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0442\u0440\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u0438\u043c\u0432\u043e\u043b \t\t\tset t(&quot;str&quot;)=t(&quot;str&quot;)_t(&quot;ch&quot;) \t\t} \t} \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \tquit t(&quot;str&quot;) #; -------------------------------------------------------------------------------------------------- #; -------------------------------------------------------------------------------------------------- #; \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432\u0441\u0435 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b. #; \u0423\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0441\u044f \u043f\u0443\u043d\u043a\u0442\u0443\u0430\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u0434 \u043f\u0435\u0440\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u043e\u043c. #; \u041c\u0435\u0436\u0434\u0443 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043a\u0440\u0430\u0439\u043d\u0438\u0439 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c (\u0441\u0438\u043c\u0432\u043e\u043b \u043f\u0443\u043d\u043a\u0442\u0443\u0430\u0446\u0438\u0438 \u043f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043d\u0435 \u043f\u0440\u043e\u0431\u0435\u043b). #; \u041f\u043e\u0441\u043b\u0435 \u043a\u0440\u0430\u0439\u043d\u0435\u0433\u043e \u0441\u043b\u043e\u0432\u0430 \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0441\u044f \u043f\u0443\u043d\u043a\u0442\u0443\u0430\u0446\u0438\u044f, \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e &quot;.&quot; \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u0435\u0441\u0442\u044c. #; -------------------------------------------------------------------------------------------------- specialClearStr(str) \t \tnew t  \t \tset t(&quot;str&quot;)=&quot;&quot;,t(&quot;flag&quot;)=&quot;start&quot;,t(&quot;delim&quot;)=&quot;&quot; \tfor t(&quot;i&quot;)=1:1:$L(str) {  \t \t\tset t(&quot;ch&quot;)=$extract(str,t(&quot;i&quot;)) \t\t \t\t;# \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u044e \u043d\u0430 \u043f\u0440\u043e\u0431\u0435\u043b \t\tset:t(&quot;ch&quot;)=$char(9) t(&quot;ch&quot;)=&quot; &quot; \t\tcontinue:(t(&quot;ch&quot;)?1C) \t\tif (t(&quot;flag&quot;)=&quot;start&quot;)&&`(t(&quot;ch&quot;)?1P) { set t(&quot;str&quot;)=t(&quot;ch&quot;),t(&quot;flag&quot;)=&quot;word&quot; } \t\telseif t(&quot;flag&quot;)=&quot;word&quot; {  \t\t\tif `(t(&quot;ch&quot;)?1P) { set t(&quot;str&quot;)=t(&quot;str&quot;)_t(&quot;ch&quot;) }  \t\t\telse { set t(&quot;delim&quot;)=t(&quot;ch&quot;),t(&quot;flag&quot;)=&quot;delim&quot; } \t\t} \t\telseif t(&quot;flag&quot;)=&quot;delim&quot; { if (t(&quot;ch&quot;)?1P) { set:t(&quot;ch&quot;)`=&quot; &quot; t(&quot;delim&quot;)=t(&quot;ch&quot;) } \t\t\telse { set t(&quot;str&quot;)=t(&quot;str&quot;)_t(&quot;delim&quot;)_t(&quot;ch&quot;),t(&quot;flag&quot;)=&quot;word&quot;,t(&quot;delim&quot;)=&quot;&quot; } \t\t} \t} \tset:t(&quot;delim&quot;)=&quot;.&quot; t(&quot;str&quot;)=t(&quot;str&quot;)_t(&quot;delim&quot;) \t \tquit t(&quot;str&quot;) #; -------------------------------------------------------------------------------------------------- #; -------------------------------------------------------------------------------------------------- #; \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043d\u0430 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u043c\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430, \u0442\u0438\u043f\u0430 \u0438 \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u0438. #; \u041f\u0440\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435, \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043d\u0438\u0437. #; -------------------------------------------------------------------------------------------------- checkUniqueNameElement(ontology,type,lang,name,id) \t \tnew t \t \t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \tset t(&quot;q&quot;)=0 \t \tset t(&quot;uniqueId&quot;)=&quot;&quot;  \tfor { \t\t#; \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0435\u0441\u0442\u044c \u043b\u0438 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u043c \u0433\u043b\u043e\u0431\u0430\u043b\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \t\t#; \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u0438, \u0442\u0438\u043f\u0430,\u044f\u0437\u044b\u043a\u0430 \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f (\u0432 \u043d\u0438\u0436\u043d\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435) \t\tset t(&quot;uniqueId&quot;)=$order($$$dIndex(ontology,type,&quot;name&quot;,lang,$zconvert(name,&quot;l&quot;),t(&quot;uniqueId&quot;))) \t\t \t\t#; \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0435\u0441\u043b\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u043d\u0435\u0442 \t\tquit:t(&quot;uniqueId&quot;)=&quot;&quot; \t\t \t\t#; \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \t\t#; \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u0430 update  \t\tif (t(&quot;uniqueId&quot;)`=id) { \t\t\t \t\t\t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443, \u0435\u0441\u043b\u0438 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \t\t\tset t(&quot;q&quot;)=-1 \t\t\tquit \t\t} \t} \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \tquit t(&quot;q&quot;) #; -------------------------------------------------------------------------------------------------- #; \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430. #; \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441 \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043d\u0435\u0433\u043e. #; -------------------------------------------------------------------------------------------------- setProperty(ontology,type,property,value,id,index=&quot;true&quot;)private \t \t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u043d\u0443\u043b\u0435\u0432\u0443\u044e (\u0442\u0435\u043a\u0443\u0449\u0443\u044e) \u0432\u0435\u0440\u0441\u0438\u044e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \tset $$$dData(ontology,type,id,0,property)=value \t \t#; \u0435\u0441\u043b\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \tif index=&quot;true&quot; { \t\t \t\t#; \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0438\u043d\u0434\u0435\u043a\u0441 \t\tset $$$dIndex(ontology,type,property,value,id)=1 \t\t \t\t#; \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0438\u043d\u0434\u0435\u043a\u0441 \t\tset $$$dRefs(id,$name($$$dIndex(ontology,type,property,value,id)))=1 \t} \t\t \tquit 0 #; -------------------------------------------------------------------------------------------------- #; \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u043d\u0438, \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430. #; \u0421\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441(\u0432 \u043d\u0438\u0436\u043d\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435) \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430. #; -------------------------------------------------------------------------------------------------- setName(ontology,type,lang,value,id)private \t \t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u043c\u0435\u043d\u0438 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0438 \u044f\u0437\u044b\u043a\u0430 \tset $$$dName(id,lang,0)=value \t \t#; \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0434\u0430\u0442\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f\/\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \tset $$$dName(id,lang,0,&quot;UpdateTime&quot;)=$horolog \t \t#; \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0438\u043d\u0434\u0435\u043a\u0441 \u043f\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \tset $$$dIndex(ontology,type,&quot;name&quot;,lang,$zconvert(value,&quot;l&quot;),id)=1 \t \t#; \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443 \tset $$$dRefs(id,$name($$$dIndex(ontology,type,&quot;name&quot;,lang,$zconvert(value,&quot;l&quot;),id)))=1 \t \tquit 0 #; -------------------------------------------------------------------------------------------------- saveOntoAndTypeID(id,ontology,type) \tset $$$dIndex(&quot;ID&quot;,id,&quot;ontology&quot;)=ontology \tset $$$dRefs(id,$name($$$dIndex(&quot;ID&quot;,id,&quot;ontology&quot;)))=1 \tset $$$dIndex(&quot;ID&quot;,id,&quot;type&quot;)=type \tset $$$dRefs(id,$name($$$dIndex(&quot;ID&quot;,id,&quot;type&quot;)))=1 \t \tquit #; -------------------------------------------------------------------------------------------------- saveElementPath(id,path) \tset $$$dIndex(&quot;ID&quot;,id,&quot;path&quot;)=path \tset $$$dRefs(id,$name($$$dIndex(&quot;ID&quot;,id,&quot;path&quot;)))=1 \t \tquit #; -------------------------------------------------------------------------------------------------- <\/code><\/pre>\n<p>  \u0412 \u043b\u0438\u0441\u0442\u0438\u043d\u0433\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0430 \u0437\u0430\u043c\u0435\u043d\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 <b>&#8216;<\/b> \u043d\u0430 \u0441\u0438\u043c\u0432\u043e\u043b <b>`<\/b> \u2014 \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0433\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432 Cach\u00e9 \u2014 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0437\u0430\u043c\u0435\u043d\u0443: \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b <b>`<\/b> \u043d\u0430 <b>&#8216;<\/b>  <\/div>\n<\/div>\n<p>  \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0433\u043b\u043e\u0431\u0430\u043b \u043f\u0440\u0430\u0432\u0438\u043b:<\/p>\n<pre><code class=\"bash\">MONTOLOGY&gt;zwrite ^RuleDictionary(&quot;SimpleOntology&quot;) ^RuleDictionary(&quot;SimpleOntology&quot;,&quot;SimpleType&quot;,&quot;create&quot;,&quot;check&quot;,10)=&quot;do processingNames(&quot;&quot;clearPunctuationAndControlChar&quot;&quot;)&quot; ^RuleDictionary(&quot;SimpleOntology&quot;,&quot;SimpleType&quot;,&quot;create&quot;,&quot;check&quot;,20)=&quot;s check=$$checkUniqueNameElementAllLang()&quot; ^RuleDictionary(&quot;SimpleOntology&quot;,&quot;SimpleType&quot;,&quot;update&quot;,&quot;check&quot;,10)=&quot;do processingNames(&quot;&quot;clearPunctuationAndControlChar&quot;&quot;)&quot; ^RuleDictionary(&quot;SimpleOntology&quot;,&quot;SimpleType&quot;,&quot;update&quot;,&quot;check&quot;,20)=&quot;s check=$$checkUniqueNameElementAllLang()&quot;  MONTOLOGY&gt; <\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0433\u043b\u043e\u0431\u0430\u043b Ctrl+\u0421\/V<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">set ^RuleDictionary(&quot;SimpleOntology&quot;,&quot;SimpleType&quot;,&quot;create&quot;,&quot;check&quot;,10)=&quot;do processingNames(&quot;&quot;clearPunctuationAndControlChar&quot;&quot;)&quot; set ^RuleDictionary(&quot;SimpleOntology&quot;,&quot;SimpleType&quot;,&quot;create&quot;,&quot;check&quot;,20)=&quot;s check=$$checkUniqueNameElementAllLang()&quot; set ^RuleDictionary(&quot;SimpleOntology&quot;,&quot;SimpleType&quot;,&quot;update&quot;,&quot;check&quot;,10)=&quot;do processingNames(&quot;&quot;clearPunctuationAndControlChar&quot;&quot;)&quot; set ^RuleDictionary(&quot;SimpleOntology&quot;,&quot;SimpleType&quot;,&quot;update&quot;,&quot;check&quot;,20)=&quot;s check=$$checkUniqueNameElementAllLang()&quot; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043e\u0447\u0438\u0441\u0442\u043a\u0443 \u0433\u043b\u043e\u0431\u0430\u043b\u043e\u0432 (\u043a\u0440\u043e\u043c\u0435 \u0433\u043b\u043e\u0431\u0430\u043b\u0430 \u043f\u0440\u0430\u0432\u0438\u043b) \u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0443 \u043f\u0435\u0440\u0432\u044b\u0445 \u0434\u0432\u0443\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430, \u043a\u0430\u043a \u0432 <a href=\"http:\/\/habrahabr.ru\/post\/178563\/#testCreate\">\u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437<\/a>, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043c\u044b \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0438, \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043d\u0430 \u043c\u0430\u043a\u0440\u043e\u0441\u044b \u0438 \u0443\u0445\u043e\u0434\u0430 \u043e\u0442 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b Dictionary<\/b><\/p>\n<div class=\"spoiler_text\">\u0423\u0434\u0430\u043b\u0438\u043c \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044b, \u043a\u0440\u043e\u043c\u0435 \u0433\u043b\u043e\u0431\u0430\u043b\u0430 \u043f\u0440\u0430\u0432\u0438\u043b <b>^RuleDictionary<\/b>:  <\/p>\n<pre><code class=\"bash\">MONTOLOGY&gt;kill ^Dictionary,^IndexDictionary,^NameDictionaryElement,^RefsDictionary  MONTOLOGY&gt; <\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u0432\u0430 \u043f\u0435\u0440\u0432\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430:  <\/p>\n<pre><code class=\"bash\">MONTOLOGY&gt;kill ^tmwOntology($job)  MONTOLOGY&gt;set ^tmwOntology($job,&quot;in&quot;,&quot;ontology&quot;)=&quot;Vehicle&quot;,^tmwOntology($job,&quot;in&quot;,&quot;type&quot;)=&quot;TransmissionType&quot;  MONTOLOGY&gt;set ^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;ru&quot;)=&quot; \u0410\u041a\u041f,&quot;,^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;partUri&quot;)=&quot;akp&quot;  MONTOLOGY&gt;write $$create^Dictionary() 1 MONTOLOGY&gt;kill ^tmwOntology($job)  MONTOLOGY&gt;set ^tmwOntology($job,&quot;in&quot;,&quot;ontology&quot;)=&quot;Vehicle&quot;,^tmwOntology($job,&quot;in&quot;,&quot;type&quot;)=&quot;TransmissionType&quot;  MONTOLOGY&gt;set ^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;ru&quot;)=&quot;\u041c\u0415\u0425&quot;,^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;partUri&quot;)=&quot;meh&quot;  MONTOLOGY&gt;write $$create^Dictionary() 2 MONTOLOGY&gt; <\/code><\/pre>\n<p>  \u0420\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u0430\u0435\u043c \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044b:  <\/p>\n<pre><code class=\"bash\">MONTOLOGY&gt;zwrite ^Dictionary,^IndexDictionary,^NameDictionaryElement,^RefsDictionary ^Dictionary(&quot;MaxID&quot;)=2 ^Dictionary(&quot;Vehicle&quot;,&quot;TransmissionType&quot;,1,0,&quot;UpdateTime&quot;)=&quot;62968,77638&quot; ^Dictionary(&quot;Vehicle&quot;,&quot;TransmissionType&quot;,1,0,&quot;uid&quot;)=888 ^Dictionary(&quot;Vehicle&quot;,&quot;TransmissionType&quot;,2,0,&quot;UpdateTime&quot;)=&quot;62968,77664&quot; ^Dictionary(&quot;Vehicle&quot;,&quot;TransmissionType&quot;,2,0,&quot;uid&quot;)=888 ^IndexDictionary(&quot;ID&quot;,1,&quot;ontology&quot;)=&quot;Vehicle&quot; ^IndexDictionary(&quot;ID&quot;,1,&quot;path&quot;)=&quot;^|&quot;&quot;MONTOLOGY&quot;&quot;|Dictionary(&quot;&quot;Vehicle&quot;&quot;,&quot;&quot;TransmissionType&quot;&quot;,1)&quot; ^IndexDictionary(&quot;ID&quot;,1,&quot;type&quot;)=&quot;TransmissionType&quot; ^IndexDictionary(&quot;ID&quot;,2,&quot;ontology&quot;)=&quot;Vehicle&quot; ^IndexDictionary(&quot;ID&quot;,2,&quot;path&quot;)=&quot;^|&quot;&quot;MONTOLOGY&quot;&quot;|Dictionary(&quot;&quot;Vehicle&quot;&quot;,&quot;&quot;TransmissionType&quot;&quot;,2)&quot; ^IndexDictionary(&quot;ID&quot;,2,&quot;type&quot;)=&quot;TransmissionType&quot; ^IndexDictionary(&quot;Vehicle&quot;,&quot;TransmissionType&quot;,&quot;name&quot;,&quot;partUri&quot;,&quot;akp&quot;,1)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;TransmissionType&quot;,&quot;name&quot;,&quot;partUri&quot;,&quot;meh&quot;,2)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;TransmissionType&quot;,&quot;name&quot;,&quot;ru&quot;,&quot;\u0430\u043a\u043f&quot;,1)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;TransmissionType&quot;,&quot;name&quot;,&quot;ru&quot;,&quot;\u043c\u0435\u0445&quot;,2)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;TransmissionType&quot;,&quot;uid&quot;,888,1)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;TransmissionType&quot;,&quot;uid&quot;,888,2)=1 ^NameDictionaryElement(1,&quot;partUri&quot;,0)=&quot;akp&quot; ^NameDictionaryElement(1,&quot;partUri&quot;,0,&quot;UpdateTime&quot;)=&quot;62968,77638&quot; ^NameDictionaryElement(1,&quot;ru&quot;,0)=&quot;\u0410\u041a\u041f&quot; ^NameDictionaryElement(1,&quot;ru&quot;,0,&quot;UpdateTime&quot;)=&quot;62968,77638&quot; ^NameDictionaryElement(2,&quot;partUri&quot;,0)=&quot;meh&quot; ^NameDictionaryElement(2,&quot;partUri&quot;,0,&quot;UpdateTime&quot;)=&quot;62968,77664&quot; ^NameDictionaryElement(2,&quot;ru&quot;,0)=&quot;\u041c\u0415\u0425&quot; ^NameDictionaryElement(2,&quot;ru&quot;,0,&quot;UpdateTime&quot;)=&quot;62968,77664&quot; ^RefsDictionary(1,&quot;^|&quot;&quot;MONTOLOGY&quot;&quot;|IndexDictionary(&quot;&quot;ID&quot;&quot;,1,&quot;&quot;ontology&quot;&quot;)&quot;)=1 ^RefsDictionary(1,&quot;^|&quot;&quot;MONTOLOGY&quot;&quot;|IndexDictionary(&quot;&quot;ID&quot;&quot;,1,&quot;&quot;path&quot;&quot;)&quot;)=1 ^RefsDictionary(1,&quot;^|&quot;&quot;MONTOLOGY&quot;&quot;|IndexDictionary(&quot;&quot;ID&quot;&quot;,1,&quot;&quot;type&quot;&quot;)&quot;)=1 ^RefsDictionary(1,&quot;^|&quot;&quot;MONTOLOGY&quot;&quot;|IndexDictionary(&quot;&quot;Vehicle&quot;&quot;,&quot;&quot;TransmissionType&quot;&quot;,&quot;&quot;name&quot;&quot;,&quot;&quot;partUri&quot;&quot;,&quot;&quot;akp&quot;&quot;,1)&quot;)=1 ^RefsDictionary(1,&quot;^|&quot;&quot;MONTOLOGY&quot;&quot;|IndexDictionary(&quot;&quot;Vehicle&quot;&quot;,&quot;&quot;TransmissionType&quot;&quot;,&quot;&quot;name&quot;&quot;,&quot;&quot;ru&quot;&quot;,&quot;&quot;\u0430\u043a\u043f&quot;&quot;,1)&quot;)=1 ^RefsDictionary(1,&quot;^|&quot;&quot;MONTOLOGY&quot;&quot;|IndexDictionary(&quot;&quot;Vehicle&quot;&quot;,&quot;&quot;TransmissionType&quot;&quot;,&quot;&quot;uid&quot;&quot;,888,1)&quot;)=1 ^RefsDictionary(2,&quot;^|&quot;&quot;MONTOLOGY&quot;&quot;|IndexDictionary(&quot;&quot;ID&quot;&quot;,2,&quot;&quot;ontology&quot;&quot;)&quot;)=1 ^RefsDictionary(2,&quot;^|&quot;&quot;MONTOLOGY&quot;&quot;|IndexDictionary(&quot;&quot;ID&quot;&quot;,2,&quot;&quot;path&quot;&quot;)&quot;)=1 ^RefsDictionary(2,&quot;^|&quot;&quot;MONTOLOGY&quot;&quot;|IndexDictionary(&quot;&quot;ID&quot;&quot;,2,&quot;&quot;type&quot;&quot;)&quot;)=1 ^RefsDictionary(2,&quot;^|&quot;&quot;MONTOLOGY&quot;&quot;|IndexDictionary(&quot;&quot;Vehicle&quot;&quot;,&quot;&quot;TransmissionType&quot;&quot;,&quot;&quot;name&quot;&quot;,&quot;&quot;partUri&quot;&quot;,&quot;&quot;meh&quot;&quot;,2)&quot;)=1 ^RefsDictionary(2,&quot;^|&quot;&quot;MONTOLOGY&quot;&quot;|IndexDictionary(&quot;&quot;Vehicle&quot;&quot;,&quot;&quot;TransmissionType&quot;&quot;,&quot;&quot;name&quot;&quot;,&quot;&quot;ru&quot;&quot;,&quot;&quot;\u043c\u0435\u0445&quot;&quot;,2)&quot;)=1 ^RefsDictionary(2,&quot;^|&quot;&quot;MONTOLOGY&quot;&quot;|IndexDictionary(&quot;&quot;Vehicle&quot;&quot;,&quot;&quot;TransmissionType&quot;&quot;,&quot;&quot;uid&quot;&quot;,888,2)&quot;)=1  <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u044d\u0442\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044b \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0442 <a href=\"http:\/\/habrahabr.ru\/post\/178563\/#result\">\u044d\u0442\u0438\u0445<\/a>, \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <b>\u00abUpdateTime\u00bb<\/b>. \u0412\u043d\u0435\u0441\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 <b>Dictionary<\/b> \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c.  <\/div>\n<\/div>\n<hr\/>\n<p>  <a name=\"nested\"><\/a><\/p>\n<h4>\u0412\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b<\/h4>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u043e\u0432. \u041f\u0443\u0441\u0442\u044c \u0432 \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u0438 <b>Vehicle<\/b> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a <b>Make<\/b>, \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a <b>Model<\/b> (\u043c\u0430\u0440\u043a\u0438-\u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432). \u041e\u043f\u0438\u0448\u0435\u043c \u044d\u0442\u0438 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0438 \u0432 \u043d\u0430\u0448\u0435\u043c \u0433\u043b\u043e\u0431\u0430\u043b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b <b>^RuleDIctionary<\/b>. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 <b>InitRuleDic<\/b> \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u0433\u043b\u043e\u0431\u0430\u043b \u043f\u0440\u0430\u0432\u0438\u043b. \u0422\u0430\u043a\u0436\u0435 \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u0432 \u043d\u0435\u0451 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u0438 \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u041d\u0430\u043f\u043e\u043c\u043d\u044e \u0447\u0442\u043e \u0432\u043c\u0435\u0441\u0442\u043e <b>^RuleDictionary<\/b>, \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u043d\u0430\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0441\u043e\u043a\u0440\u0430\u0449\u0451\u043d\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c <b>$$$dRule<\/b>.<\/p>\n<pre><code class=\"bash\">#; ------------------------------------------------------------------------------------------------------------ #include Dictionary #; ------------------------------------------------------------------------------------------------------------ InitRuleDic #; ------------------------------------------------------------------------------------------------------------ \tkill $$$dRule \t \tset $$$dRule(&quot;SimpleOntology&quot;,&quot;SimpleType&quot;,&quot;create&quot;,&quot;check&quot;,10)=&quot;do processingNames(&quot;&quot;clearPunctuationAndControlChar&quot;&quot;)&quot; \tset $$$dRule(&quot;SimpleOntology&quot;,&quot;SimpleType&quot;,&quot;create&quot;,&quot;check&quot;,20)=&quot;s check=$$checkUniqueNameElementAllLang()&quot; \tset $$$dRule(&quot;SimpleOntology&quot;,&quot;SimpleType&quot;,&quot;update&quot;,&quot;check&quot;,10)=&quot;do processingNames(&quot;&quot;clearPunctuationAndControlChar&quot;&quot;)&quot; \tset $$$dRule(&quot;SimpleOntology&quot;,&quot;SimpleType&quot;,&quot;update&quot;,&quot;check&quot;,20)=&quot;s check=$$checkUniqueNameElementAllLang()&quot;  \tset $$$dRule(&quot;Vehicle&quot;,&quot;Make&quot;,&quot;property&quot;,&quot;lastId&quot;)=&quot;otherId&quot;  \tset $$$dRule(&quot;Vehicle&quot;,&quot;Make&quot;,&quot;property&quot;,&quot;lastId&quot;,&quot;index&quot;)=&quot;true&quot;  \tset $$$dRule(&quot;Vehicle&quot;,&quot;Make&quot;,&quot;create&quot;,&quot;check&quot;,10)=&quot;do processingNames(&quot;&quot;specialClearStr&quot;&quot;)&quot; \tset $$$dRule(&quot;Vehicle&quot;,&quot;Make&quot;,&quot;create&quot;,&quot;check&quot;,20)=&quot;s check=$$checkUniqueNameElementAllLang()&quot; \tset $$$dRule(&quot;Vehicle&quot;,&quot;Make&quot;,&quot;create&quot;,&quot;check&quot;,50)=&quot;s check=$$checkUniqueParamElement(&quot;&quot;lastId&quot;&quot;,&quot;&quot;Vehicle&quot;&quot;,&quot;&quot;Make&quot;&quot;)&quot; \tset $$$dRule(&quot;Vehicle&quot;,&quot;Make&quot;,&quot;update&quot;,&quot;check&quot;,10)=&quot;do processingNames(&quot;&quot;specialClearStr&quot;&quot;)&quot; \tset $$$dRule(&quot;Vehicle&quot;,&quot;Make&quot;,&quot;update&quot;,&quot;check&quot;,20)=&quot;s check=$$checkUniqueNameElementAllLang()&quot; \tset $$$dRule(&quot;Vehicle&quot;,&quot;Make&quot;,&quot;update&quot;,&quot;check&quot;,50)=&quot;s check=$$checkUniqueParamElement(&quot;&quot;lastId&quot;&quot;,&quot;&quot;Vehicle&quot;&quot;,&quot;&quot;Make&quot;&quot;)&quot; \t \tset $$$dRule(&quot;Vehicle&quot;,&quot;Model&quot;,&quot;parent&quot;)=&quot;Make&quot; \tset $$$dRule(&quot;Vehicle&quot;,&quot;Model&quot;,&quot;property&quot;,&quot;parentId&quot;)=&quot;parent&quot; \tset $$$dRule(&quot;Vehicle&quot;,&quot;Model&quot;,&quot;property&quot;,&quot;parentId&quot;,&quot;index&quot;)=&quot;true&quot; \tset $$$dRule(&quot;Vehicle&quot;,&quot;Model&quot;,&quot;property&quot;,&quot;lastId&quot;)=&quot;otherId&quot; \tset $$$dRule(&quot;Vehicle&quot;,&quot;Model&quot;,&quot;property&quot;,&quot;lastId&quot;,&quot;index&quot;)=&quot;true&quot; \tset $$$dRule(&quot;Vehicle&quot;,&quot;Model&quot;,&quot;create&quot;,&quot;check&quot;,15)=&quot;do processingNames(&quot;&quot;specialClearStr&quot;&quot;)&quot; \tset $$$dRule(&quot;Vehicle&quot;,&quot;Model&quot;,&quot;create&quot;,&quot;check&quot;,20)=&quot;s check=$$checkUniqueNameElementAllLang(&quot;&quot;true&quot;&quot;)&quot; \tset $$$dRule(&quot;Vehicle&quot;,&quot;Model&quot;,&quot;create&quot;,&quot;check&quot;,50)=&quot;s check=$$checkUniqueParamElement(&quot;&quot;lastId&quot;&quot;,&quot;&quot;Vehicle&quot;&quot;,&quot;&quot;Model&quot;&quot;)&quot; \tset $$$dRule(&quot;Vehicle&quot;,&quot;Model&quot;,&quot;update&quot;,&quot;check&quot;,15)=&quot;do processingNames(&quot;&quot;specialClearStr&quot;&quot;)&quot; \tset $$$dRule(&quot;Vehicle&quot;,&quot;Model&quot;,&quot;update&quot;,&quot;check&quot;,20)=&quot;s check=$$checkUniqueNameElementAllLang(&quot;&quot;true&quot;&quot;)&quot; \tset $$$dRule(&quot;Vehicle&quot;,&quot;Model&quot;,&quot;update&quot;,&quot;check&quot;,50)=&quot;s check=$$checkUniqueParamElement(&quot;&quot;lastId&quot;&quot;,&quot;&quot;Vehicle&quot;&quot;,&quot;&quot;Model&quot;&quot;)&quot; \t\t \tzwrite $$$dRule  \t   quit #; ------------------------------------------------------------------------------------------------------------ <\/code><\/pre>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043d\u0430\u0448 \u0433\u043b\u043e\u0431\u0430\u043b \u043f\u0440\u0430\u0432\u0438\u043b. \u0412 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0435 <b>Make<\/b> \u2014 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <b>lastId<\/b>. \u042d\u0442\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u0432 \u0441\u0442\u0430\u0440\u043e\u0439 \u0411\u0414 (\u043d\u0435 \u0433\u043b\u043e\u0431\u0430\u043b\u044b). \u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445, \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c. \u0417\u0430\u0434\u0430\u0447\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u043e\u0432 (\u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445) \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0422\u0438\u043f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 <b>otherId<\/b> \u2014 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435, \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438. \u041f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u043d\u0438\u0447\u0442\u043e \u043d\u0435 \u043f\u043e\u043c\u0435\u0448\u0430\u0435\u0442 \u043d\u0430\u0432\u0435\u0441\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u043d\u0430 \u0442\u0430\u043a\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u043c\u0435\u0442\u043e\u0434\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u043e\u0432. \u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e <b>lastId<\/b> \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0443\u0435\u043c\u043e\u0435, \u043d\u0430 \u0447\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u0435\u0442\u043a\u0430 <b>index<\/b> \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <b>\u00abture\u00bb<\/b>. \u0414\u0430\u043b\u0435\u0435 \u0438\u0434\u0451\u0442 \u043d\u0430\u0431\u043e\u0440 \u0438\u0437 \u0442\u0440\u0451\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438\/\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <b>checkUniqueParamElement()<\/b> \u0434\u043b\u044f \u043d\u0430\u0441 \u043d\u043e\u0432\u0430\u044f \u2014 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0451 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">checkUniqueParamElement()<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">#; -------------------------------------------------------------------------------------------------- #; \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043d\u0430 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. #; -------------------------------------------------------------------------------------------------- checkUniqueParamElement(param,ontology,type) \t \tnew t \t \t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \tset t(&quot;value&quot;)=$$$getDTOin(param,&quot;&quot;) \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0435\u0441\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043d\u0435 \u0437\u0430\u0434\u0430\u043d - \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0430 \tquit:t(&quot;value&quot;)=&quot;&quot; 0 \t \t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \tset t(&quot;q&quot;)=0  \t \tset t(&quot;uniqueId&quot;)=&quot;&quot;  \t \tfor { \t\t#; \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0435\u0441\u0442\u044c \u043b\u0438 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u043c \u0433\u043b\u043e\u0431\u0430\u043b\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \t\t#; \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u0438, \u0442\u0438\u043f\u0430, \u044f\u0437\u044b\u043a\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \t\tset t(&quot;uniqueId&quot;)=$o($$$dIndex(ontology,type,param,t(&quot;value&quot;),t(&quot;uniqueId&quot;))) \t\t \t\t#; \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0435\u0441\u043b\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u043d\u0435\u0442 \t\tquit:t(&quot;uniqueId&quot;)=&quot;&quot; \t\t \t\t#; \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \t\t#; \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u0430 update  \t\tif (t(&quot;uniqueId&quot;)`=$$$getDTOproc(&quot;id&quot;,&quot;&quot;)) { \t\t\t \t\t\t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443, \u0435\u0441\u043b\u0438 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \t\t\tset t(&quot;q&quot;)=-1 \t\t\tquit \t\t} \t} \t \tquit t(&quot;q&quot;) #; -------------------------------------------------------------------------------------------------- <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0420\u0430\u0441\u0448\u0438\u0440\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0448\u0435\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 <b>create()<\/b> \u2014 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043d\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0441\u0432\u043e\u0439\u0441\u0442\u0432:  <\/p>\n<pre><code class=\"bash\">\ts t(&quot;property&quot;)=&quot;&quot;  \tfor { \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \t\ts t(&quot;property&quot;)=$o($$$dDTO($j,&quot;in&quot;,t(&quot;property&quot;)))  \t\t \t\t#; \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0446\u0438\u043a\u043b\u0430, \u0435\u0441\u043b\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0435\u0442 \t\tquit:t(&quot;property&quot;)=&quot;&quot; \t\t \t\t#; \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e, \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u043d\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u0438 \u0438 \u0442\u0438\u043f\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \t\tcontinue:$get($$$dRule(t(&quot;ontology&quot;),t(&quot;type&quot;),&quot;property&quot;,t(&quot;property&quot;)),&quot;&quot;)=&quot;&quot; \t\t \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \t\tset t(&quot;index&quot;)=$get($$$dRule(t(&quot;ontology&quot;),t(&quot;type&quot;),&quot;property&quot;,t(&quot;property&quot;),&quot;index&quot;),&quot;false&quot;) \t\t \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \t\tset t(&quot;value&quot;)=$get($$$dDTO($j,&quot;in&quot;,t(&quot;property&quot;)),&quot;&quot;) \t\t \t\t#; \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u043f\u0443\u0441\u0442\u043e\u0435 - \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \t\tif t(&quot;value&quot;)`=&quot;&quot; {  \t\t\tdo setProperty(t(&quot;ontology&quot;),t(&quot;type&quot;),t(&quot;property&quot;),t(&quot;value&quot;),t(&quot;id&quot;),t(&quot;index&quot;),$$$getDTOproc(&quot;pathParent&quot;,&quot;&quot;)) \t\t} \t} <\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u043b\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f create<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">#; -------------------------------------------------------------------------------------------------- #; \u0421\u043e\u0437\u0434\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430. #; \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445. #; -------------------------------------------------------------------------------------------------- create() \t \t#; \u043e\u0447\u0438\u0449\u0430\u0435\u043c \u043a\u0430\u0440\u0442\u0443 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \tkill $$$dDTO($job,&quot;out&quot;) \t \t#; \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u0443\u044e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443 t \t#; \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432\u0441\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 create \tnew t \t \t#; \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \tset t(&quot;err&quot;)=$$check(&quot;create&quot;) \t \t#; \u0432\u044b\u0445\u043e\u0434\u0438\u043c, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0430 \tif t(&quot;err&quot;)&lt;0 { quit t(&quot;err&quot;) } \t \ts t(&quot;ontology&quot;)=$$$getDTOin(&quot;ontology&quot;,&quot;&quot;) \ts t(&quot;type&quot;)=$$$getDTOin(&quot;type&quot;,&quot;&quot;) \ts t(&quot;id&quot;)=$$$getDTOproc(&quot;id&quot;,&quot;&quot;) \t \t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e &quot;UpdateTime&quot; \tdo setProperty(t(&quot;ontology&quot;),t(&quot;type&quot;),&quot;UpdateTime&quot;,$horolog,t(&quot;id&quot;),&quot;false&quot;,$$$getDTOproc(&quot;pathParent&quot;,&quot;&quot;)) \t \t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e &quot;uid&quot; \tdo setProperty(t(&quot;ontology&quot;),t(&quot;type&quot;),&quot;uid&quot;,$$$getDTOin(&quot;uid&quot;,888),t(&quot;id&quot;),&quot;true&quot;,$$$getDTOproc(&quot;pathParent&quot;,&quot;&quot;)) \t \tset t(&quot;lang&quot;)=&quot;&quot;  \tfor { \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u044f\u0437\u044b\u043a (\u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u0434\u0430\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430) \t\tset t(&quot;lang&quot;)=$order($$$dDTO($job,&quot;in&quot;,&quot;nameList&quot;,t(&quot;lang&quot;))) \t\t \t\t#; \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0446\u0438\u043a\u043b\u0430, \u0435\u0441\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u043d\u0435\u0442 \t\tquit:t(&quot;lang&quot;)=&quot;&quot; \t\t \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \t\tset t(&quot;name&quot;)=$get($$$dDTO($job,&quot;in&quot;,&quot;nameList&quot;,t(&quot;lang&quot;)),&quot;&quot;) \t\t \t\t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \t\tdo setName(t(&quot;ontology&quot;),t(&quot;type&quot;),t(&quot;lang&quot;),t(&quot;name&quot;),t(&quot;id&quot;)) \t} \t \ts t(&quot;property&quot;)=&quot;&quot;  \tfor { \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \t\ts t(&quot;property&quot;)=$o($$$dDTO($j,&quot;in&quot;,t(&quot;property&quot;)))  \t\t \t\t#; \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0446\u0438\u043a\u043b\u0430, \u0435\u0441\u043b\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0435\u0442 \t\tquit:t(&quot;property&quot;)=&quot;&quot; \t\t \t\t#; \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e, \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u043d\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u0438 \u0438 \u0442\u0438\u043f\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \t\tcontinue:$get($$$dRule(t(&quot;ontology&quot;),t(&quot;type&quot;),&quot;property&quot;,t(&quot;property&quot;)),&quot;&quot;)=&quot;&quot; \t\t \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \t\tset t(&quot;index&quot;)=$get($$$dRule(t(&quot;ontology&quot;),t(&quot;type&quot;),&quot;property&quot;,t(&quot;property&quot;),&quot;index&quot;),&quot;false&quot;) \t\t \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \t\tset t(&quot;value&quot;)=$get($$$dDTO($j,&quot;in&quot;,t(&quot;property&quot;)),&quot;&quot;) \t\t \t\t#; \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u043f\u0443\u0441\u0442\u043e\u0435 - \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \t\tif t(&quot;value&quot;)`=&quot;&quot; {  \t\t\tdo setProperty(t(&quot;ontology&quot;),t(&quot;type&quot;),t(&quot;property&quot;),t(&quot;value&quot;),t(&quot;id&quot;),t(&quot;index&quot;),$$$getDTOproc(&quot;pathParent&quot;,&quot;&quot;)) \t\t} \t} \t \t#; \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u044e \u0438 \u0442\u0438\u043f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u043c \u0433\u043b\u043e\u0431\u0430\u043b\u0435 \tdo saveOntoAndTypeID(t(&quot;id&quot;),t(&quot;ontology&quot;),t(&quot;type&quot;)) \t \t#; \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u043c \u0433\u043b\u043e\u0431\u0430\u043b\u0435 \tdo saveElementPath(t(&quot;id&quot;),$$$getDTOproc(&quot;path&quot;,&quot;&quot;)) \t \t#; \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u043a\u0430\u0440\u0442\u0443 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \t$$$setDTOout(&quot;id&quot;,t(&quot;id&quot;)) \t \t#; \u043e\u0447\u0438\u0449\u0430\u0435\u043c \u043a\u0430\u0440\u0442\u0443 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \tkill $$$dDTO($job,&quot;in&quot;) \t \t#; \u043e\u0447\u0438\u0449\u0430\u0435\u043c \u043a\u0430\u0440\u0442\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \tkill $$$dDTO($job,&quot;porc&quot;) \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \tquit t(&quot;id&quot;) #; -------------------------------------------------------------------------------------------------- <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u0442\u0440\u043e\u0447\u043a\u0443:<\/p>\n<p>  <i>do setProperty(t(\u00abontology\u00bb),t(\u00abtype\u00bb),t(\u00abproperty\u00bb),t(\u00abvalue\u00bb),t(\u00abid\u00bb),t(\u00abindex\u00bb),$$$getDTOproc(\u00abpathParent\u00bb,&quot;&quot;))<\/i><\/p>\n<p>  \u0412 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 <b>setProperty()<\/b> \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0441\u044f \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <b>pathParent<\/b> \u2014 \u043e\u043d \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438. <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0430\u0440\u0443 \u043c\u0430\u0440\u043e\u043a \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u0435\u0439 \u0432 \u043d\u0430\u0448 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a (\u043c\u0430\u0440\u043a\u0438 \u0432\u044b\u0431\u0440\u0430\u043d\u044b \u043c\u043d\u043e\u0439 \u043d\u0430\u0443\u0433\u0430\u0434 &#8212; \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0440\u0435\u043a\u043b\u0430\u043c\u044b \u0442\u0443\u0442 \u043d\u0435\u0442).<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">MONTOLOGY&gt;kill ^tmwOntology($job)  MONTOLOGY&gt;set ^tmwOntology($job,&quot;in&quot;,&quot;ontology&quot;)=&quot;Vehicle&quot;,^tmwOntology($job,&quot;in&quot;,&quot;type&quot;)=&quot;Make&quot;  MONTOLOGY&gt;set ^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;ru&quot;)=&quot;MAZDA&quot;,^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;partUri&quot;)=&quot;mazda&quot;  MONTOLOGY&gt;set ^tmwOntology($job,&quot;in&quot;,&quot;lastId&quot;)=122  MONTOLOGY&gt;write $$create^Dictionary() 3 MONTOLOGY&gt;kill ^tmwOntology($job)  MONTOLOGY&gt;set ^tmwOntology($job,&quot;in&quot;,&quot;ontology&quot;)=&quot;Vehicle&quot;,^tmwOntology($job,&quot;in&quot;,&quot;type&quot;)=&quot;Make&quot;  MONTOLOGY&gt;set ^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;ru&quot;)=&quot;BMW&quot;,^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;partUri&quot;)=&quot;bmw&quot;  MONTOLOGY&gt;set ^tmwOntology($job,&quot;in&quot;,&quot;lastId&quot;)=1269  MONTOLOGY&gt;write $$create^Dictionary() 4 MONTOLOGY&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 <a href=\"#nested\">\u043f\u0440\u0430\u0432\u0438\u043b\u0430<\/a> \u0434\u043b\u044f \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 <b>Model<\/b>. \u041f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u0435\u0442\u043a\u0430 <b>parent<\/b> \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <b>\u00abMake\u00bb<\/b> \u2014 \u044d\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u043c, \u0434\u043b\u044f \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 <b>Model<\/b>, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <b>Make<\/b>. \u0414\u0430\u043b\u0435\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0443\u0435\u043c\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <b>parentId<\/b>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f. \u041f\u0443\u0441\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430, \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u0435 <b>^Dictionary<\/b>, \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0432\u0435\u0442\u043a\u0435 <b>children<\/b> \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c (\u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0434\u043b\u0438\u043d\u0443 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439). \u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u043c, \u0447\u0442\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0438 \u0438\u043c\u0435\u043d\u0430 \u0434\u043b\u044f \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u0438 \u0434\u043b\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u0445. \u041d\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f.<\/p>\n<pre><code class=\"bash\">#; -------------------------------------------------------------------------------------------------- #; \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f, \u0435\u0441\u043b\u0438 \u043e\u043d \u0435\u0441\u0442\u044c. #; \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u044e \u0438 \u0442\u0438\u043f \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f. #; -------------------------------------------------------------------------------------------------- checkParent()private \t \tnew t \t \t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0438\u043f \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b (\u0435\u0441\u043b\u0438 \u043e\u043d \u0435\u0441\u0442\u044c) \ts t(&quot;parent&quot;)=$get($$$dRule($$$getDTOin(&quot;ontology&quot;,&quot;&quot;),$$$getDTOin(&quot;type&quot;,&quot;&quot;),&quot;parent&quot;),&quot;&quot;) \t \t#; \u0435\u0441\u043b\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u0435\u0441\u0442\u044c \tif t(&quot;parent&quot;)`=&quot;&quot; { \t\t \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 parentId \u0438\u0437 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0438 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u043e\u0433\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u0430 \t\tset t(&quot;parentId&quot;)=$$$getDTOin(&quot;parentId&quot;,&quot;&quot;) \t\t \t\t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443 \u0435\u0441\u043b\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u043d\u0435 \u0437\u0430\u0434\u0430\u043d \t\tif t(&quot;parentId&quot;)=&quot;&quot; { quit -1 } \t\t \t\t#; \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u044e \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u043c \u0433\u043b\u043e\u0431\u0430\u043b\u0435  \t\t#; \u043e\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u0435\u0439 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \t\tif $get($$$dIndex(&quot;ID&quot;,t(&quot;parentId&quot;),&quot;ontology&quot;),&quot;&quot;)`=$$$getDTOin(&quot;ontology&quot;,&quot;&quot;) { quit -1 } \t\t \t\t#; \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0442\u0438\u043f \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u043c \u0433\u043b\u043e\u0431\u0430\u043b\u0435  \t\tif $get($$$dIndex(&quot;ID&quot;,t(&quot;parentId&quot;),&quot;type&quot;),&quot;&quot;)`=t(&quot;parent&quot;) { quit -1 } \t\t \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044e \t\ts t(&quot;pathParent&quot;)=$get($$$dIndex(&quot;ID&quot;,t(&quot;parentId&quot;),&quot;path&quot;),&quot;&quot;) \t\t \t\t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443 \u0435\u0441\u043b\u0438 \u043f\u0443\u0442\u0438 \u043d\u0435\u0442 \t\tif t(&quot;pathParent&quot;)=&quot;&quot; { quit -1 } \t\t \t\t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044e \u0432 \u0432\u0435\u0442\u043a\u0443 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u043e\u0433\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u0430 \t\t$$$setDTOproc(&quot;pathParent&quot;,t(&quot;pathParent&quot;)) \t} \t\t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \tquit 0 #; -------------------------------------------------------------------------------------------------- <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c, \u0438 \u0435\u0441\u043b\u0438 \u0434\u0430 \u2014 \u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f. \u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0432\u043d\u0435\u0441\u0442\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043c\u0435\u0442\u043e\u0434 <b>checkCreate()<\/b>: \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043d\u0435\u0433\u043e \u0432\u044b\u0437\u043e\u0432 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f, \u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0443\u0442\u0438 \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u0435 <b>^Dictionary<\/b>.<\/p>\n<pre><code class=\"bash\">#; -------------------------------------------------------------------------------------------------- #; \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438. #; -------------------------------------------------------------------------------------------------- checkCreate()private \t \tnew t \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443 \u0435\u0441\u043b\u0438 \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u044f \u043d\u0435 \u0437\u0430\u0434\u0430\u043d\u0430 \tquit:$$$getDTOin(&quot;ontology&quot;,&quot;&quot;)=&quot;&quot; -1 \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443, \u0435\u0441\u043b\u0438 \u0442\u0438\u043f \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u043d\u0435 \u0437\u0430\u0434\u0430\u043d \tquit:$$$getDTOin(&quot;type&quot;,&quot;&quot;)=&quot;&quot; -1 \t \t#; \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \ts t(&quot;check&quot;)=$$checkParent() \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0435 \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u0430 \tquit:t(&quot;check&quot;)&lt;0 t(&quot;check&quot;) \t \t#; \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438\u043c\u0451\u043d \tset t(&quot;check&quot;)=$$checkNames() \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0435 \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u0430 \tquit:t(&quot;check&quot;)&lt;0 t(&quot;check&quot;) \t \t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \t$$$setDTOproc(&quot;id&quot;,$$$dMaxID) \t \t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u0432\u0435\u0442\u043a\u0435 \u0433\u043b\u043e\u0431\u0430\u043b\u0430 ^Dictionary \tif $$$getDTOproc(&quot;pathParent&quot;,&quot;&quot;)=&quot;&quot; {  \t\t \t\t#; \u0435\u0441\u043b\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u043d\u0435\u0442 - \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043a\u0430\u043a ^Dictionary(ontology) \t\tset t(&quot;path&quot;)=$name($$$dData($$$getDTOin(&quot;ontology&quot;,&quot;&quot;)))  \t} \telse {  \t\t \t\t#; \u0435\u0441\u043b\u0438 \u043f\u0443\u0442\u044c \u043a \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044e \u0435\u0441\u0442\u044c - \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u043f\u0443\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e children \t\tset t(&quot;path&quot;)=$name(@($$$getDTOproc(&quot;pathParent&quot;,&quot;&quot;))@(0,&quot;children&quot;))  \t}  \t \t#; \u043a \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0438\u043f \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0438 \u0435\u0433\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \ts t(&quot;path&quot;)=$name(@(t(&quot;path&quot;))@($$$getDTOin(&quot;type&quot;,&quot;&quot;),$$$getDTOproc(&quot;id&quot;,&quot;&quot;))) \t \t$$$setDTOproc(&quot;path&quot;,t(&quot;path&quot;)) \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \tquit 0 #; -------------------------------------------------------------------------------------------------- <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b:<\/p>\n<p>  <i>set $$$dRule(\u00abVehicle\u00bb,\u00abModel\u00bb,\u00abcreate\u00bb,\u00abcheck\u00bb,20)=\u00abs check=$$checkUniqueNameElementAllLang(\u00bb\u00abtrue\u00bb&quot;)&quot;<\/i><\/p>\n<p>  \u0412 \u043c\u0435\u0442\u043e\u0434 <b>checkUniqueNameElement()<\/b> \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043e\u0434\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <b>inparent<\/b>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043d\u0430 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u0432\u0441\u0435\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f. \u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f \u044d\u0442\u043e \u043b\u0435\u0433\u043a\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f, \u043d\u043e \u043c\u0430\u0440\u043a\u0438 \u0443 \u043d\u0438\u0445 \u0440\u0430\u0437\u043d\u044b\u0435. \u041d\u0430\u043c \u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c, \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u2014 \u0438 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u0430\u0434\u0440\u0435\u0441\u0430. \u0412 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0435 \u0435\u0441\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u0441\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043f\u0443\u043d\u043a\u0442\u043e\u0432 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c\u0438. \u0421\u0430\u043c \u0431\u044b\u043b \u0443\u0434\u0438\u0432\u043b\u0451\u043d \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u043c \u043d\u0430\u043b\u0438\u0447\u0438\u0435\u043c \u0442\u0430\u043a\u0438\u0445 \u043d\u0430\u0441\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043f\u0443\u043d\u043a\u0442\u043e\u0432 \u0432 \u0423\u043a\u0440\u0430\u0438\u043d\u0435 \u043a\u0430\u043a \u041d\u0438\u043a\u043e\u043b\u0430\u0435\u0432, \u041f\u043e\u043b\u0442\u0430\u0432\u0430, \u0427\u0435\u0440\u043a\u0430\u0441\u0441\u044b \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u043f\u0440\u043e\u0447\u0438\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u043d\u043e\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u0434\u043e\u043c\u0435\u043d, \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/p>\n<pre><code class=\"bash\">#; -------------------------------------------------------------------------------------------------- #; \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043d\u0430 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u043c\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430, \u0442\u0438\u043f\u0430 \u0438 \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u0438. #; \u041f\u0440\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435, \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043d\u0438\u0437. #; -------------------------------------------------------------------------------------------------- checkUniqueNameElement(ontology,type,lang,name,id,inparent=&quot;false&quot;) \t \tnew t \t \t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \tset t(&quot;q&quot;)=0 \t \tset t(&quot;uniqueId&quot;)=&quot;&quot;  \tfor { \t\t#; \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0435\u0441\u0442\u044c \u043b\u0438 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u043c \u0433\u043b\u043e\u0431\u0430\u043b\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \t\t#; \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u0438, \u0442\u0438\u043f\u0430,\u044f\u0437\u044b\u043a\u0430 \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f (\u0432 \u043d\u0438\u0436\u043d\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435) \t\tset t(&quot;uniqueId&quot;)=$order($$$dIndex(ontology,type,&quot;name&quot;,lang,$zconvert(name,&quot;l&quot;),t(&quot;uniqueId&quot;))) \t\t \t\t#; \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0435\u0441\u043b\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u043d\u0435\u0442 \t\tquit:t(&quot;uniqueId&quot;)=&quot;&quot; \t\t \t\t#; \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \t\t#; \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u0430 update  \t\tif (t(&quot;uniqueId&quot;)`=id) { \t\t\t \t\t\t#; \u0435\u0441\u043b\u0438 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u0432\u0441\u0435\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \t\t\tif inparent=&quot;false&quot; { \t\t\t\t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443, \u0435\u0441\u043b\u0438 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \t\t\t\tset t(&quot;q&quot;)=-1 \t\t\t\tquit \t\t\t} \t\t\telse { \t\t\t\t#; \u0435\u0441\u043b\u0438 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \t\t\t\tif $data($$$dIndex(ontology,type,&quot;parentId&quot;,$$$getDTOin(&quot;parentId&quot;,&quot;&quot;),t(&quot;uniqueId&quot;))) { \t\t\t\t\t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443 \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c  \t\t\t\t\t#; \u043a\u0430\u043a \u0438 \u0443 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e\/\u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \t\t\t\t\tset t(&quot;q&quot;)=-1 \t\t\t\t\tquit \t\t\t\t}\t \t\t\t} \t\t} \t} \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \tquit t(&quot;q&quot;) #; -------------------------------------------------------------------------------------------------- <\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412\u0435\u0441\u044c \u043a\u043e\u0434 Dictionary<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">#; -------------------------------------------------------------------------------------------------- #; \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b Dictionary.inc, \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 (inc) - \u043f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e #include Dictionary #; -------------------------------------------------------------------------------------------------- #; \u0418\u043c\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b #; -------------------------------------------------------------------------------------------------- Dictionary #; -------------------------------------------------------------------------------------------------- #; \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430. #; -------------------------------------------------------------------------------------------------- retrieve(id,lang=&quot;ru&quot;,version=0)     quit $get($$$dName(id,lang,version),&quot;&quot;) #; -------------------------------------------------------------------------------------------------- #; \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443. #; -------------------------------------------------------------------------------------------------- retrieveListByIndex(ontology,type,index,value,str=&quot;&quot;,lang=&quot;ru&quot;)       #;\u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u043c \u0432 \u043d\u0438\u0436\u043d\u0438\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0441\u0442\u0440\u043e\u043a\u0443, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0434\u043e\u043b\u0436\u043d\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u0441\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432     set str=$zconvert(str,&quot;L&quot;)      set id=&quot;&quot;      for {         #;\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440(\u0438\u043d\u0434\u0435\u043a\u0441) \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0443\u0440\u043e\u0432\u043d\u0435         set id=$order($$$dIndex(ontology,type,index,value,id))          #;\u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0446\u0438\u043a\u043b\u0430, \u0435\u0441\u043b\u0438 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u0442         quit:id=&quot;&quot;          #;\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430         set name=$$retrieve(id,lang)          #;\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043b\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 str         if $extract($zconvert(name,&quot;L&quot;),1,$length(str))=str {             #;\u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (\u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435)             write id_&quot; &quot;_name,!         }     }     quit #; -------------------------------------------------------------------------------------------------- #; \u0421\u043e\u0437\u0434\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430. #; \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445. #; -------------------------------------------------------------------------------------------------- create() \t \t#; \u043e\u0447\u0438\u0449\u0430\u0435\u043c \u043a\u0430\u0440\u0442\u0443 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \tkill $$$dDTO($job,&quot;out&quot;) \t \t#; \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u0443\u044e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443 t \t#; \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432\u0441\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 create \tnew t \t \t#; \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \tset t(&quot;err&quot;)=$$check(&quot;create&quot;) \t \t#; \u0432\u044b\u0445\u043e\u0434\u0438\u043c, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0430 \tif t(&quot;err&quot;)&lt;0 { quit t(&quot;err&quot;) } \t \ts t(&quot;ontology&quot;)=$$$getDTOin(&quot;ontology&quot;,&quot;&quot;) \ts t(&quot;type&quot;)=$$$getDTOin(&quot;type&quot;,&quot;&quot;) \ts t(&quot;id&quot;)=$$$getDTOproc(&quot;id&quot;,&quot;&quot;) \t \t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e &quot;UpdateTime&quot; \tdo setProperty(t(&quot;ontology&quot;),t(&quot;type&quot;),&quot;UpdateTime&quot;,$horolog,t(&quot;id&quot;),&quot;false&quot;,$$$getDTOproc(&quot;pathParent&quot;,&quot;&quot;)) \t \t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e &quot;uid&quot; \tdo setProperty(t(&quot;ontology&quot;),t(&quot;type&quot;),&quot;uid&quot;,$$$getDTOin(&quot;uid&quot;,888),t(&quot;id&quot;),&quot;true&quot;,$$$getDTOproc(&quot;pathParent&quot;,&quot;&quot;)) \t \tset t(&quot;lang&quot;)=&quot;&quot;  \tfor { \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u044f\u0437\u044b\u043a (\u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u0434\u0430\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430) \t\tset t(&quot;lang&quot;)=$order($$$dDTO($job,&quot;in&quot;,&quot;nameList&quot;,t(&quot;lang&quot;))) \t\t \t\t#; \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0446\u0438\u043a\u043b\u0430, \u0435\u0441\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u043d\u0435\u0442 \t\tquit:t(&quot;lang&quot;)=&quot;&quot; \t\t \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \t\tset t(&quot;name&quot;)=$get($$$dDTO($job,&quot;in&quot;,&quot;nameList&quot;,t(&quot;lang&quot;)),&quot;&quot;) \t\t \t\t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \t\tdo setName(t(&quot;ontology&quot;),t(&quot;type&quot;),t(&quot;lang&quot;),t(&quot;name&quot;),t(&quot;id&quot;)) \t} \t \ts t(&quot;property&quot;)=&quot;&quot;  \tfor { \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \t\ts t(&quot;property&quot;)=$order($$$dDTO($j,&quot;in&quot;,t(&quot;property&quot;)))  \t\t \t\t#; \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0446\u0438\u043a\u043b\u0430, \u0435\u0441\u043b\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0435\u0442 \t\tquit:t(&quot;property&quot;)=&quot;&quot; \t\t \t\t#; \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e, \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u043d\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u0438 \u0438 \u0442\u0438\u043f\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \t\tcontinue:$get($$$dRule(t(&quot;ontology&quot;),t(&quot;type&quot;),&quot;property&quot;,t(&quot;property&quot;)),&quot;&quot;)=&quot;&quot; \t\t \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \t\tset t(&quot;index&quot;)=$get($$$dRule(t(&quot;ontology&quot;),t(&quot;type&quot;),&quot;property&quot;,t(&quot;property&quot;),&quot;index&quot;),&quot;false&quot;) \t\t \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \t\tset t(&quot;value&quot;)=$get($$$dDTO($j,&quot;in&quot;,t(&quot;property&quot;)),&quot;&quot;) \t\t \t\t#; \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u043f\u0443\u0441\u0442\u043e\u0435 - \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \t\tif t(&quot;value&quot;)`=&quot;&quot; {  \t\t\tdo setProperty(t(&quot;ontology&quot;),t(&quot;type&quot;),t(&quot;property&quot;),t(&quot;value&quot;),t(&quot;id&quot;),t(&quot;index&quot;),$$$getDTOproc(&quot;pathParent&quot;,&quot;&quot;)) \t\t} \t} \t \t#; \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u044e \u0438 \u0442\u0438\u043f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u043c \u0433\u043b\u043e\u0431\u0430\u043b\u0435 \tdo saveOntoAndTypeID(t(&quot;id&quot;),t(&quot;ontology&quot;),t(&quot;type&quot;)) \t \t#; \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u043c \u0433\u043b\u043e\u0431\u0430\u043b\u0435 \tdo saveElementPath(t(&quot;id&quot;),$$$getDTOproc(&quot;path&quot;,&quot;&quot;)) \t \t#; \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u043a\u0430\u0440\u0442\u0443 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \t$$$setDTOout(&quot;id&quot;,t(&quot;id&quot;)) \t \t#; \u043e\u0447\u0438\u0449\u0430\u0435\u043c \u043a\u0430\u0440\u0442\u0443 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \tkill $$$dDTO($job,&quot;in&quot;) \t \t#; \u043e\u0447\u0438\u0449\u0430\u0435\u043c \u043a\u0430\u0440\u0442\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \tkill $$$dDTO($job,&quot;porc&quot;) \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \tquit t(&quot;id&quot;) #; -------------------------------------------------------------------------------------------------- #; \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438. #; \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0433\u043b\u043e\u0431\u0430\u043b \u043f\u0440\u0430\u0432\u0438\u043b ^RuleDictionary \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. #; -------------------------------------------------------------------------------------------------- check(action)private \t \t#; \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u0443\u044e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e check \tnew check \t \t#; \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f action \tset check=$case(action,&quot;create&quot;:$$checkCreate(),&quot;update&quot;:$$checkUpdate(),&quot;delete&quot;:$$checkDelete(),:-1) \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443 \tquit:check&lt;0 check \t \t#; \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043b\u0438 \u0432\u0435\u0442\u043a\u0430 \u0433\u043b\u043e\u0431\u0430\u043b\u0430 \u043f\u0440\u0430\u0432\u0438\u043b &quot;check&quot;, \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u0438 \u0442\u0438\u043f\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \tif $data($$$dRule($$$getDTOin(&quot;ontology&quot;,&quot;&quot;),$$$getDTOin(&quot;type&quot;,&quot;&quot;),action,&quot;check&quot;))  \t{  \t\t#; \u0432 check(&quot;map&quot;) \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043a\u0430\u043d\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0438\u043c\u044f \u043d\u0443\u0436\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u0430 \u043f\u0440\u0430\u0432\u0438\u043b \t\tset check(&quot;map&quot;)=$name($$$dRule($$$getDTOin(&quot;ontology&quot;,&quot;&quot;),$$$getDTOin(&quot;type&quot;,&quot;&quot;),action,&quot;check&quot;))  \t} \telse {  \t\t#; \u0432 check(&quot;map&quot;) \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043a\u0430\u043d\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0438\u043c\u044f \u0432\u0435\u0442\u043a\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u0430 \u043f\u0440\u0430\u0432\u0438\u043b \u0434\u043b\u044f \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u0438 \u0438 \u0442\u0438\u043f\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \t\tset check(&quot;map&quot;)=$name($$$dRule(&quot;SimpleOntology&quot;,&quot;SimpleType&quot;,action,&quot;check&quot;))  \t} \t \tset check(&quot;i&quot;)=&quot;&quot;  \tfor { \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043d\u043e\u043c\u0435\u0440 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \t\tset check(&quot;i&quot;)=$order(@check(&quot;map&quot;)@(check(&quot;i&quot;))) \t\t \t\t#; \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0446\u0438\u043a\u043b\u0430, \u0435\u0441\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043d\u043e\u043c\u0435\u0440\u0430 \u043d\u0435\u0442 \t\tquit:check(&quot;i&quot;)=&quot;&quot; \t\t \t\t#; \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \t\txecute $get(@check(&quot;map&quot;)@(check(&quot;i&quot;))) \t\t \t\t#; \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0446\u0438\u043a\u043b\u0430, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0435 \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u0430 \t\tquit:check&lt;0 \t} \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \tquit check #; -------------------------------------------------------------------------------------------------- #; \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438. #; -------------------------------------------------------------------------------------------------- checkCreate()private \t \tnew t \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443 \u0435\u0441\u043b\u0438 \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u044f \u043d\u0435 \u0437\u0430\u0434\u0430\u043d\u0430 \tquit:$$$getDTOin(&quot;ontology&quot;,&quot;&quot;)=&quot;&quot; -1 \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443, \u0435\u0441\u043b\u0438 \u0442\u0438\u043f \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u043d\u0435 \u0437\u0430\u0434\u0430\u043d \tquit:$$$getDTOin(&quot;type&quot;,&quot;&quot;)=&quot;&quot; -1 \t \t#; \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \ts t(&quot;check&quot;)=$$checkParent() \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0435 \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u0430 \tquit:t(&quot;check&quot;)&lt;0 t(&quot;check&quot;) \t \t#; \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438\u043c\u0451\u043d \tset t(&quot;check&quot;)=$$checkNames() \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0435 \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u0430 \tquit:t(&quot;check&quot;)&lt;0 t(&quot;check&quot;) \t \t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \t$$$setDTOproc(&quot;id&quot;,$$$dMaxID) \t \t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u0432\u0435\u0442\u043a\u0435 \u0433\u043b\u043e\u0431\u0430\u043b\u0430 ^Dictionary \tif $$$getDTOproc(&quot;pathParent&quot;,&quot;&quot;)=&quot;&quot; {  \t\t \t\t#; \u0435\u0441\u043b\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u043d\u0435\u0442 - \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043a\u0430\u043a ^Dictionary(ontology) \t\tset t(&quot;path&quot;)=$name($$$dData($$$getDTOin(&quot;ontology&quot;,&quot;&quot;)))  \t} \telse {  \t\t \t\t#; \u0435\u0441\u043b\u0438 \u043f\u0443\u0442\u044c \u043a \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044e \u0435\u0441\u0442\u044c - \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u043f\u0443\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e children \t\tset t(&quot;path&quot;)=$name(@($$$getDTOproc(&quot;pathParent&quot;,&quot;&quot;))@(0,&quot;children&quot;))  \t}  \t \t#; \u043a \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0438\u043f \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0438 \u0435\u0433\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \ts t(&quot;path&quot;)=$name(@(t(&quot;path&quot;))@($$$getDTOin(&quot;type&quot;,&quot;&quot;),$$$getDTOproc(&quot;id&quot;,&quot;&quot;))) \t \t$$$setDTOproc(&quot;path&quot;,t(&quot;path&quot;)) \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \tquit 0 #; -------------------------------------------------------------------------------------------------- #; \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f, \u0435\u0441\u043b\u0438 \u043e\u043d \u0435\u0441\u0442\u044c. #; \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u044e \u0438 \u0442\u0438\u043f \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f. #; -------------------------------------------------------------------------------------------------- checkParent()private \t \tnew t \t \t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0438\u043f \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b (\u0435\u0441\u043b\u0438 \u043e\u043d \u0435\u0441\u0442\u044c) \ts t(&quot;parent&quot;)=$get($$$dRule($$$getDTOin(&quot;ontology&quot;,&quot;&quot;),$$$getDTOin(&quot;type&quot;,&quot;&quot;),&quot;parent&quot;),&quot;&quot;) \t \t#; \u0435\u0441\u043b\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u0435\u0441\u0442\u044c \tif t(&quot;parent&quot;)`=&quot;&quot; { \t\t \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 parentId \u0438\u0437 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0438 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u043e\u0433\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u0430 \t\tset t(&quot;parentId&quot;)=$$$getDTOin(&quot;parentId&quot;,&quot;&quot;) \t\t \t\t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443 \u0435\u0441\u043b\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u043d\u0435 \u0437\u0430\u0434\u0430\u043d \t\tif t(&quot;parentId&quot;)=&quot;&quot; { quit -1 } \t\t \t\t#; \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u044e \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u043c \u0433\u043b\u043e\u0431\u0430\u043b\u0435  \t\t#; \u043e\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u0435\u0439 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \t\tif $get($$$dIndex(&quot;ID&quot;,t(&quot;parentId&quot;),&quot;ontology&quot;),&quot;&quot;)`=$$$getDTOin(&quot;ontology&quot;,&quot;&quot;) { quit -1 } \t\t \t\t#; \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0442\u0438\u043f \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u043c \u0433\u043b\u043e\u0431\u0430\u043b\u0435  \t\tif $get($$$dIndex(&quot;ID&quot;,t(&quot;parentId&quot;),&quot;type&quot;),&quot;&quot;)`=t(&quot;parent&quot;) { quit -1 } \t\t \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044e \t\ts t(&quot;pathParent&quot;)=$get($$$dIndex(&quot;ID&quot;,t(&quot;parentId&quot;),&quot;path&quot;),&quot;&quot;) \t\t \t\t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443 \u0435\u0441\u043b\u0438 \u043f\u0443\u0442\u0438 \u043d\u0435\u0442 \t\tif t(&quot;pathParent&quot;)=&quot;&quot; { quit -1 } \t\t \t\t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044e \u0432 \u0432\u0435\u0442\u043a\u0443 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u043e\u0433\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u0430 \t\t$$$setDTOproc(&quot;pathParent&quot;,t(&quot;pathParent&quot;)) \t} \t\t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \tquit 0 #; -------------------------------------------------------------------------------------------------- checkUpdate() quit 0 #; -------------------------------------------------------------------------------------------------- checkDelete() quit 0 #; -------------------------------------------------------------------------------------------------- #; \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438\u043c\u0451\u043d \u043d\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445. #; -------------------------------------------------------------------------------------------------- checkNames()private \t \tnew t \t \t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0432 t(&quot;check&quot;) \u043e\u0448\u0438\u0431\u043a\u0443 \t#; \u0434\u043b\u044f \u0441\u043b\u0443\u0447\u0430\u044f \u043a\u043e\u0433\u0434\u0430 \u043d\u0438 \u043e\u0434\u0438\u043d \u044f\u0437\u044b\u043a \u043d\u0435 \u0437\u0430\u0434\u0430\u043d \tset t(&quot;check&quot;)=-1 \t \tset t(&quot;lang&quot;)=&quot;&quot;  \tfor { \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u044f\u0437\u044b\u043a \t\tset t(&quot;lang&quot;)=$order($$$dDTO($job,&quot;in&quot;,&quot;nameList&quot;,t(&quot;lang&quot;))) \t\t \t\t#; \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0446\u0438\u043a\u043b\u0430, \u0435\u0441\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u043d\u0435\u0442 \t\tquit:t(&quot;lang&quot;)=&quot;&quot;  \t\t \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \t\tset t(&quot;name&quot;)=$get($$$dDTO($job,&quot;in&quot;,&quot;nameList&quot;,t(&quot;lang&quot;)),&quot;&quot;) \t\t \t\t#; \u0435\u0441\u043b\u0438 \u0438\u043c\u044f \u043f\u0443\u0441\u0442\u043e\u0435 \t\tif t(&quot;name&quot;)=&quot;&quot; {   \t\t\t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0432 t(&quot;check&quot;) \u043e\u0448\u0438\u0431\u043a\u0443 \t\t\tset t(&quot;check&quot;)=-1 \t\t \t\t\t#; \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0446\u0438\u043a\u043b\u0430 \t\t\tquit \t\t} \t\telse {  \t\t\t#; \u0432 t(&quot;check&quot;) \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432\u0441\u0451 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435  \t\t\tset t(&quot;check&quot;)=0 \t\t} \t} \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438\u043c\u0451\u043d \tquit t(&quot;check&quot;) #; -------------------------------------------------------------------------------------------------- #; \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439. #; -------------------------------------------------------------------------------------------------- processingNames(function)  \tnew t \tset t(&quot;lang&quot;)=&quot;&quot;  \tfor {  \t\t#; \u0446\u0438\u043a\u043b \u043f\u043e \u0432\u0441\u0435\u043c \u044f\u0437\u044b\u043a\u0430\u043c \t\tset t(&quot;lang&quot;)=$order($$$dDTO($job,&quot;in&quot;,&quot;nameList&quot;,t(&quot;lang&quot;))) \t\tquit:t(&quot;lang&quot;)=&quot;&quot;   \t\t \t\t#; \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u044f\u0437\u044b\u043a\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \t\txecute &quot;set &quot;_$name($$$dDTO($job,&quot;in&quot;,&quot;nameList&quot;,t(&quot;lang&quot;)))_&quot;=$$&quot;_function_&quot;(&quot;&quot;&quot;_$$$getDTOname(t(&quot;lang&quot;))_&quot;&quot;&quot;)&quot; \t} \tquit #; -------------------------------------------------------------------------------------------------- checkUniqueNameElementAllLang(inparent=&quot;false&quot;)  \tnew t  \tset t(&quot;check&quot;)=0 \ts t(&quot;ontology&quot;)=$$$getDTOin(&quot;ontology&quot;,&quot;&quot;) \ts t(&quot;type&quot;)=$$$getDTOin(&quot;type&quot;,&quot;&quot;) \tset t(&quot;lang&quot;)=&quot;&quot;  \tfor {  \t\t#; \u0446\u0438\u043a\u043b \u043f\u043e \u0432\u0441\u0435\u043c \u044f\u0437\u044b\u043a\u0430\u043c \t\tset t(&quot;lang&quot;)=$order($$$dDTO($job,&quot;in&quot;,&quot;nameList&quot;,t(&quot;lang&quot;))) \t\tquit:t(&quot;lang&quot;)=&quot;&quot;   \t\t \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \t\tset t(&quot;name&quot;)=$get($$$dDTO($job,&quot;in&quot;,&quot;nameList&quot;,t(&quot;lang&quot;)),&quot;&quot;) \t\t \t\t#; \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e t(&quot;check&quot;) \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0441\u0442\u0430\u0442\u0443\u0441 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u043c\u0435\u043d\u0438 (0 - \u0437\u043d\u0430\u0447\u0438\u0442 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e) \t\ts t(&quot;check&quot;)=$$checkUniqueNameElement(t(&quot;ontology&quot;),t(&quot;type&quot;),t(&quot;lang&quot;),t(&quot;name&quot;),$$$getDTOproc(&quot;id&quot;,&quot;&quot;),inparent) \t\t \t\t#; \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0446\u0438\u043a\u043b\u0430 \u0435\u0441\u043b\u0438 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0438\u043c\u044f \u043d\u0435 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e \t\tquit:t(&quot;check&quot;)&lt;0  \t} \tquit t(&quot;check&quot;) #; -------------------------------------------------------------------------------------------------- #; \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432\u0441\u044e \u043f\u0443\u043d\u043a\u0442\u0443\u0430\u0446\u0438\u044e \u0438 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b. #; -------------------------------------------------------------------------------------------------- clearPunctuationAndControlChar(str) \t \tnew t  \t \t#; \u0432 t(&quot;str&quot;) \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \tset t(&quot;str&quot;)=&quot;&quot; \t \t#; \u0446\u0438\u043a\u043b \u043f\u043e \u0432\u0441\u0435\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c \u0441\u0442\u0440\u043e\u043a\u0438  \tfor t(&quot;i&quot;)=1:1:$length(str) { \t\t \t\t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u0438\u043c\u0432\u043e\u043b \t\tset t(&quot;ch&quot;)=$extract(str,t(&quot;i&quot;)) \t\t \t\tif `((t(&quot;ch&quot;)?1P)||(t(&quot;ch&quot;)?1C)) { \t\t\t#; \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0442\u0440\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u0438\u043c\u0432\u043e\u043b \t\t\tset t(&quot;str&quot;)=t(&quot;str&quot;)_t(&quot;ch&quot;) \t\t} \t} \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \tquit t(&quot;str&quot;) #; -------------------------------------------------------------------------------------------------- #; -------------------------------------------------------------------------------------------------- #; \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432\u0441\u0435 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b. #; \u0423\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0441\u044f \u043f\u0443\u043d\u043a\u0442\u0443\u0430\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u0434 \u043f\u0435\u0440\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u043e\u043c. #; \u041c\u0435\u0436\u0434\u0443 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043a\u0440\u0430\u0439\u043d\u0438\u0439 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c (\u0441\u0438\u043c\u0432\u043e\u043b \u043f\u0443\u043d\u043a\u0442\u0443\u0430\u0446\u0438\u0438 \u043f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043d\u0435 \u043f\u0440\u043e\u0431\u0435\u043b). #; \u041f\u043e\u0441\u043b\u0435 \u043a\u0440\u0430\u0439\u043d\u0435\u0433\u043e \u0441\u043b\u043e\u0432\u0430 \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0441\u044f \u043f\u0443\u043d\u043a\u0442\u0443\u0430\u0446\u0438\u044f, \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e &quot;.&quot; \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u0435\u0441\u0442\u044c. #; -------------------------------------------------------------------------------------------------- specialClearStr(str) \t \tnew t  \t \tset t(&quot;str&quot;)=&quot;&quot;,t(&quot;flag&quot;)=&quot;start&quot;,t(&quot;delim&quot;)=&quot;&quot; \tfor t(&quot;i&quot;)=1:1:$length(str) {  \t \t\tset t(&quot;ch&quot;)=$extract(str,t(&quot;i&quot;)) \t\t \t\t;# \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u044e \u043d\u0430 \u043f\u0440\u043e\u0431\u0435\u043b \t\tset:t(&quot;ch&quot;)=$char(9) t(&quot;ch&quot;)=&quot; &quot; \t\tcontinue:(t(&quot;ch&quot;)?1C) \t\tif (t(&quot;flag&quot;)=&quot;start&quot;)&&`(t(&quot;ch&quot;)?1P) { set t(&quot;str&quot;)=t(&quot;ch&quot;),t(&quot;flag&quot;)=&quot;word&quot; } \t\telseif t(&quot;flag&quot;)=&quot;word&quot; {  \t\t\tif `(t(&quot;ch&quot;)?1P) { set t(&quot;str&quot;)=t(&quot;str&quot;)_t(&quot;ch&quot;) }  \t\t\telse { set t(&quot;delim&quot;)=t(&quot;ch&quot;),t(&quot;flag&quot;)=&quot;delim&quot; } \t\t} \t\telseif t(&quot;flag&quot;)=&quot;delim&quot; { if (t(&quot;ch&quot;)?1P) { set:t(&quot;ch&quot;)`=&quot; &quot; t(&quot;delim&quot;)=t(&quot;ch&quot;) } \t\t\telse { set t(&quot;str&quot;)=t(&quot;str&quot;)_t(&quot;delim&quot;)_t(&quot;ch&quot;),t(&quot;flag&quot;)=&quot;word&quot;,t(&quot;delim&quot;)=&quot;&quot; } \t\t} \t} \tset:t(&quot;delim&quot;)=&quot;.&quot; t(&quot;str&quot;)=t(&quot;str&quot;)_t(&quot;delim&quot;) \t \tquit t(&quot;str&quot;) #; -------------------------------------------------------------------------------------------------- #; \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043d\u0430 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. #; -------------------------------------------------------------------------------------------------- checkUniqueParamElement(param,ontology,type) \t \tnew t \t \t#; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \tset t(&quot;value&quot;)=$$$getDTOin(param,&quot;&quot;) \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0435\u0441\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043d\u0435 \u0437\u0430\u0434\u0430\u043d - \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0430 \tquit:t(&quot;value&quot;)=&quot;&quot; 0 \t \t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \tset t(&quot;q&quot;)=0  \t \tset t(&quot;uniqueId&quot;)=&quot;&quot;  \t \tfor { \t\t#; \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0435\u0441\u0442\u044c \u043b\u0438 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u043c \u0433\u043b\u043e\u0431\u0430\u043b\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \t\t#; \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u0438, \u0442\u0438\u043f\u0430, \u044f\u0437\u044b\u043a\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \t\tset t(&quot;uniqueId&quot;)=$order($$$dIndex(ontology,type,param,t(&quot;value&quot;),t(&quot;uniqueId&quot;))) \t\t \t\t#; \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0435\u0441\u043b\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u043d\u0435\u0442 \t\tquit:t(&quot;uniqueId&quot;)=&quot;&quot; \t\t \t\t#; \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \t\t#; \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u0430 update  \t\tif (t(&quot;uniqueId&quot;)`=$$$getDTOproc(&quot;id&quot;,&quot;&quot;)) { \t\t\t \t\t\t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443, \u0435\u0441\u043b\u0438 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \t\t\tset t(&quot;q&quot;)=-1 \t\t\tquit \t\t} \t} \t \tquit t(&quot;q&quot;) #; -------------------------------------------------------------------------------------------------- #; \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043d\u0430 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u043c\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430, \u0442\u0438\u043f\u0430 \u0438 \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u0438. #; \u041f\u0440\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435, \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043d\u0438\u0437. #; -------------------------------------------------------------------------------------------------- checkUniqueNameElement(ontology,type,lang,name,id,inparent=&quot;false&quot;) \t \tnew t \t \t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \tset t(&quot;q&quot;)=0 \t \tset t(&quot;uniqueId&quot;)=&quot;&quot;  \tfor { \t\t#; \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0435\u0441\u0442\u044c \u043b\u0438 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u043c \u0433\u043b\u043e\u0431\u0430\u043b\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \t\t#; \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u0438, \u0442\u0438\u043f\u0430,\u044f\u0437\u044b\u043a\u0430 \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f (\u0432 \u043d\u0438\u0436\u043d\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435) \t\tset t(&quot;uniqueId&quot;)=$order($$$dIndex(ontology,type,&quot;name&quot;,lang,$zconvert(name,&quot;l&quot;),t(&quot;uniqueId&quot;))) \t\t \t\t#; \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0435\u0441\u043b\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u043d\u0435\u0442 \t\tquit:t(&quot;uniqueId&quot;)=&quot;&quot; \t\t \t\t#; \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \t\t#; \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u0430 update  \t\tif (t(&quot;uniqueId&quot;)`=id) { \t\t\t \t\t\t#; \u0435\u0441\u043b\u0438 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u0432\u0441\u0435\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \t\t\tif inparent=&quot;false&quot; { \t\t\t\t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443, \u0435\u0441\u043b\u0438 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \t\t\t\tset t(&quot;q&quot;)=-1 \t\t\t\tquit \t\t\t} \t\t\telse { \t\t\t\t#; \u0435\u0441\u043b\u0438 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \t\t\t\tif $data($$$dIndex(ontology,type,&quot;parentId&quot;,$$$getDTOin(&quot;parentId&quot;,&quot;&quot;),t(&quot;uniqueId&quot;))) { \t\t\t\t\t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443 \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c  \t\t\t\t\t#; \u043a\u0430\u043a \u0438 \u0443 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e\/\u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \t\t\t\t\tset t(&quot;q&quot;)=-1 \t\t\t\t\tquit \t\t\t\t}\t \t\t\t} \t\t} \t} \t \t#; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \tquit t(&quot;q&quot;) #; -------------------------------------------------------------------------------------------------- #; \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430. #; \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441 \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043d\u0435\u0433\u043e. #; -------------------------------------------------------------------------------------------------- setProperty(ontology,type,property,value,id,index=&quot;true&quot;,pathParent=&quot;&quot;)private \t \t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u043d\u0443\u043b\u0435\u0432\u0443\u044e (\u0442\u0435\u043a\u0443\u0449\u0443\u044e) \u0432\u0435\u0440\u0441\u0438\u044e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \tif pathParent=&quot;&quot; {  \t\t#; \u0415\u0441\u043b\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u043d\u0435\u0442 \t\tset $$$dData(ontology,type,id,0,property)=value  \t} \telse {  \t\t#; \u0415\u0441\u043b\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u0435\u0441\u0442\u044c \t\tset @(pathParent)@(0,&quot;children&quot;,type,id,0,property)=value  \t} \t \t#; \u0435\u0441\u043b\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \tif index=&quot;true&quot; { \t\t \t\t#; \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0438\u043d\u0434\u0435\u043a\u0441 \t\tset $$$dIndex(ontology,type,property,value,id)=1 \t\t \t\t#; \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0438\u043d\u0434\u0435\u043a\u0441 \t\tset $$$dRefs(id,$name($$$dIndex(ontology,type,property,value,id)))=1 \t} \t\t \tquit 0 #; -------------------------------------------------------------------------------------------------- #; \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u043d\u0438, \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430. #; \u0421\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441(\u0432 \u043d\u0438\u0436\u043d\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435) \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430. #; -------------------------------------------------------------------------------------------------- setName(ontology,type,lang,value,id)private \t \t#; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u043c\u0435\u043d\u0438 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0438 \u044f\u0437\u044b\u043a\u0430 \tset $$$dName(id,lang,0)=value \t \t#; \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0434\u0430\u0442\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f\/\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \tset $$$dName(id,lang,0,&quot;UpdateTime&quot;)=$horolog \t \t#; \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0438\u043d\u0434\u0435\u043a\u0441 \u043f\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \tset $$$dIndex(ontology,type,&quot;name&quot;,lang,$zconvert(value,&quot;l&quot;),id)=1 \t \t#; \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443 \tset $$$dRefs(id,$name($$$dIndex(ontology,type,&quot;name&quot;,lang,$zconvert(value,&quot;l&quot;),id)))=1 \t \tquit 0 #; -------------------------------------------------------------------------------------------------- saveOntoAndTypeID(id,ontology,type) \tset $$$dIndex(&quot;ID&quot;,id,&quot;ontology&quot;)=ontology \tset $$$dRefs(id,$name($$$dIndex(&quot;ID&quot;,id,&quot;ontology&quot;)))=1 \tset $$$dIndex(&quot;ID&quot;,id,&quot;type&quot;)=type \tset $$$dRefs(id,$name($$$dIndex(&quot;ID&quot;,id,&quot;type&quot;)))=1 \t \tquit #; -------------------------------------------------------------------------------------------------- saveElementPath(id,path) \tset $$$dIndex(&quot;ID&quot;,id,&quot;path&quot;)=path \tset $$$dRefs(id,$name($$$dIndex(&quot;ID&quot;,id,&quot;path&quot;)))=1 \t \tquit #; -------------------------------------------------------------------------------------------------- <\/code><\/pre>\n<p>  \u0412 \u043b\u0438\u0441\u0442\u0438\u043d\u0433\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0430 \u0437\u0430\u043c\u0435\u043d\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 <b>&#8216;<\/b> \u043d\u0430 \u0441\u0438\u043c\u0432\u043e\u043b <b>`<\/b> \u2014 \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0433\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432 Cach\u00e9 \u2014 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0437\u0430\u043c\u0435\u043d\u0443: \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b <b>`<\/b> \u043d\u0430 <b>&#8216;<\/b>  <\/div>\n<\/div>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0430\u0440\u0443 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0440\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u0430\u0435\u043c \u043d\u0430\u0448\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044b \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u0435 <b>^Dictionary<\/b>.  <\/p>\n<pre><code class=\"bash\">MONTOLOGY&gt;kill ^tmwOntology($job)  MONTOLOGY&gt;set ^tmwOntology($job,&quot;in&quot;,&quot;ontology&quot;)=&quot;Vehicle&quot;,^tmwOntology($job,&quot;in&quot;,&quot;type&quot;)=&quot;Model&quot;  MONTOLOGY&gt;set ^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;ru&quot;)=6,^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;partUri&quot;)=6  MONTOLOGY&gt;set ^tmwOntology($job,&quot;in&quot;,&quot;parentId&quot;)=3  MONTOLOGY&gt;write $$create^Dictionary() 5 MONTOLOGY&gt;kill ^tmwOntology($job)  MONTOLOGY&gt;set ^tmwOntology($job,&quot;in&quot;,&quot;ontology&quot;)=&quot;Vehicle&quot;,^tmwOntology($job,&quot;in&quot;,&quot;type&quot;)=&quot;Model&quot;  MONTOLOGY&gt;set ^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;ru&quot;)=&quot;BMW&quot;,^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;partUri&quot;)=&quot;bmw&quot;  MONTOLOGY&gt;^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;ru&quot;)=3,^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;partUri&quot;)=3  MONTOLOGY&gt;write $$create^Dictionary() 6 MONTOLOGY&gt;zw ^Dictionary ^Dictionary(&quot;MaxID&quot;)=6 ^Dictionary(&quot;Vehicle&quot;,&quot;Make&quot;,3,0,&quot;UpdateTime&quot;)=&quot;62970,58071&quot; ^Dictionary(&quot;Vehicle&quot;,&quot;Make&quot;,3,0,&quot;children&quot;,&quot;Model&quot;,5,0,&quot;UpdateTime&quot;)=&quot;62970,58071&quot; ^Dictionary(&quot;Vehicle&quot;,&quot;Make&quot;,3,0,&quot;children&quot;,&quot;Model&quot;,5,0,&quot;parentId&quot;)=3 ^Dictionary(&quot;Vehicle&quot;,&quot;Make&quot;,3,0,&quot;children&quot;,&quot;Model&quot;,5,0,&quot;uid&quot;)=888 ^Dictionary(&quot;Vehicle&quot;,&quot;Make&quot;,3,0,&quot;children&quot;,&quot;Model&quot;,6,0,&quot;UpdateTime&quot;)=&quot;62970,58071&quot; ^Dictionary(&quot;Vehicle&quot;,&quot;Make&quot;,3,0,&quot;children&quot;,&quot;Model&quot;,6,0,&quot;parentId&quot;)=3 ^Dictionary(&quot;Vehicle&quot;,&quot;Make&quot;,3,0,&quot;children&quot;,&quot;Model&quot;,6,0,&quot;uid&quot;)=888 ^Dictionary(&quot;Vehicle&quot;,&quot;Make&quot;,3,0,&quot;lastId&quot;)=122 ^Dictionary(&quot;Vehicle&quot;,&quot;Make&quot;,3,0,&quot;uid&quot;)=888 ^Dictionary(&quot;Vehicle&quot;,&quot;Make&quot;,4,0,&quot;UpdateTime&quot;)=&quot;62970,58071&quot; ^Dictionary(&quot;Vehicle&quot;,&quot;Make&quot;,4,0,&quot;lastId&quot;)=1269 ^Dictionary(&quot;Vehicle&quot;,&quot;Make&quot;,4,0,&quot;uid&quot;)=888 ^Dictionary(&quot;Vehicle&quot;,&quot;TransmissionType&quot;,1,0,&quot;UpdateTime&quot;)=&quot;62970,58071&quot; ^Dictionary(&quot;Vehicle&quot;,&quot;TransmissionType&quot;,1,0,&quot;uid&quot;)=888 ^Dictionary(&quot;Vehicle&quot;,&quot;TransmissionType&quot;,2,0,&quot;UpdateTime&quot;)=&quot;62970,58071&quot; ^Dictionary(&quot;Vehicle&quot;,&quot;TransmissionType&quot;,2,0,&quot;uid&quot;)=888  MONTOLOGY&gt;zw ^IndexDictionaryT ^IndexDictionary(&quot;ID&quot;,1,&quot;ontology&quot;)=&quot;Vehicle&quot; ^IndexDictionary(&quot;ID&quot;,1,&quot;path&quot;)=&quot;^|&quot;&quot;MONTOLOGY&quot;&quot;|Dictionary(&quot;&quot;Vehicle&quot;&quot;,&quot;&quot;TransmissionType&quot;&quot;,1)&quot; ^IndexDictionary(&quot;ID&quot;,1,&quot;type&quot;)=&quot;TransmissionType&quot; ^IndexDictionary(&quot;ID&quot;,2,&quot;ontology&quot;)=&quot;Vehicle&quot; ^IndexDictionary(&quot;ID&quot;,2,&quot;path&quot;)=&quot;^|&quot;&quot;MONTOLOGY&quot;&quot;|Dictionary(&quot;&quot;Vehicle&quot;&quot;,&quot;&quot;TransmissionType&quot;&quot;,2)&quot; ^IndexDictionary(&quot;ID&quot;,2,&quot;type&quot;)=&quot;TransmissionType&quot; ^IndexDictionary(&quot;ID&quot;,3,&quot;ontology&quot;)=&quot;Vehicle&quot; ^IndexDictionary(&quot;ID&quot;,3,&quot;path&quot;)=&quot;^|&quot;&quot;MONTOLOGY&quot;&quot;|Dictionary(&quot;&quot;Vehicle&quot;&quot;,&quot;&quot;Make&quot;&quot;,3)&quot; ^IndexDictionary(&quot;ID&quot;,3,&quot;type&quot;)=&quot;Make&quot; ^IndexDictionary(&quot;ID&quot;,4,&quot;ontology&quot;)=&quot;Vehicle&quot; ^IndexDictionary(&quot;ID&quot;,4,&quot;path&quot;)=&quot;^|&quot;&quot;MONTOLOGY&quot;&quot;|Dictionary(&quot;&quot;Vehicle&quot;&quot;,&quot;&quot;Make&quot;&quot;,4)&quot; ^IndexDictionary(&quot;ID&quot;,4,&quot;type&quot;)=&quot;Make&quot; ^IndexDictionary(&quot;ID&quot;,5,&quot;ontology&quot;)=&quot;Vehicle&quot; ^IndexDictionary(&quot;ID&quot;,5,&quot;path&quot;)=&quot;^|&quot;&quot;MONTOLOGY&quot;&quot;|Dictionary(&quot;&quot;Vehicle&quot;&quot;,&quot;&quot;Make&quot;&quot;,3,0,&quot;&quot;children&quot;&quot;,&quot;&quot;Model&quot;&quot;,5)&quot; ^IndexDictionary(&quot;ID&quot;,5,&quot;type&quot;)=&quot;Model&quot; ^IndexDictionary(&quot;ID&quot;,6,&quot;ontology&quot;)=&quot;Vehicle&quot; ^IndexDictionary(&quot;ID&quot;,6,&quot;path&quot;)=&quot;^|&quot;&quot;MONTOLOGY&quot;&quot;|Dictionary(&quot;&quot;Vehicle&quot;&quot;,&quot;&quot;Make&quot;&quot;,3,0,&quot;&quot;children&quot;&quot;,&quot;&quot;Model&quot;&quot;,6)&quot; ^IndexDictionary(&quot;ID&quot;,6,&quot;type&quot;)=&quot;Model&quot; ^IndexDictionary(&quot;Vehicle&quot;,&quot;Make&quot;,&quot;lastId&quot;,122,3)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;Make&quot;,&quot;lastId&quot;,1269,4)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;Make&quot;,&quot;name&quot;,&quot;partUri&quot;,&quot;bmw&quot;,4)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;Make&quot;,&quot;name&quot;,&quot;partUri&quot;,&quot;mazda&quot;,3)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;Make&quot;,&quot;name&quot;,&quot;ru&quot;,&quot;bmw&quot;,4)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;Make&quot;,&quot;name&quot;,&quot;ru&quot;,&quot;mazda&quot;,3)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;Make&quot;,&quot;uid&quot;,888,3)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;Make&quot;,&quot;uid&quot;,888,4)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;Model&quot;,&quot;name&quot;,&quot;partUri&quot;,3,6)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;Model&quot;,&quot;name&quot;,&quot;partUri&quot;,6,5)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;Model&quot;,&quot;name&quot;,&quot;ru&quot;,3,6)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;Model&quot;,&quot;name&quot;,&quot;ru&quot;,6,5)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;Model&quot;,&quot;parentId&quot;,3,5)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;Model&quot;,&quot;parentId&quot;,3,6)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;Model&quot;,&quot;uid&quot;,888,5)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;Model&quot;,&quot;uid&quot;,888,6)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;TransmissionType&quot;,&quot;name&quot;,&quot;partUri&quot;,&quot;akp&quot;,1)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;TransmissionType&quot;,&quot;name&quot;,&quot;partUri&quot;,&quot;meh&quot;,2)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;TransmissionType&quot;,&quot;name&quot;,&quot;ru&quot;,&quot;\u0430\u043a\u043f&quot;,1)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;TransmissionType&quot;,&quot;name&quot;,&quot;ru&quot;,&quot;\u043c\u0435\u0445&quot;,2)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;TransmissionType&quot;,&quot;uid&quot;,888,1)=1 ^IndexDictionary(&quot;Vehicle&quot;,&quot;TransmissionType&quot;,&quot;uid&quot;,888,2)=1  MONTOLOGY&gt; <\/code><\/pre>\n<p>  \u041d\u0430\u043c\u0438 \u0431\u044b\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0434\u0432\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u0430\u0440\u043a\u0438 <b>MAZDA<\/b>: <b>3<\/b> \u0438 <b>6<\/b> (\u0446\u0438\u0444\u0440\u044b \u044d\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439).<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412\u0441\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">\tkill ^Dictionary,^IndexDictionary,^NameDictionaryElement,^RefsDictionary \td ^InitRuleDic \tkill ^tmwOntology($job) \tset ^tmwOntology($job,&quot;in&quot;,&quot;ontology&quot;)=&quot;Vehicle&quot;,^tmwOntology($job,&quot;in&quot;,&quot;type&quot;)=&quot;TransmissionType&quot; \tset ^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;ru&quot;)=&quot; \u0410\u041a\u041f,&quot;,^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;partUri&quot;)=&quot;akp&quot; \twrite $$create^Dictionary(),! \tkill ^tmwOntology($job) \tset ^tmwOntology($job,&quot;in&quot;,&quot;ontology&quot;)=&quot;Vehicle&quot;,^tmwOntology($job,&quot;in&quot;,&quot;type&quot;)=&quot;TransmissionType&quot; \tset ^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;ru&quot;)=&quot;\u041c\u0415\u0425&quot;,^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;partUri&quot;)=&quot;meh&quot; \twrite $$create^Dictionary(),! \tkill ^tmwOntology($job) \tset ^tmwOntology($job,&quot;in&quot;,&quot;ontology&quot;)=&quot;Vehicle&quot;,^tmwOntology($job,&quot;in&quot;,&quot;type&quot;)=&quot;Make&quot; \tset ^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;ru&quot;)=&quot;MAZDA&quot;,^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;partUri&quot;)=&quot;mazda&quot; \tset ^tmwOntology($job,&quot;in&quot;,&quot;lastId&quot;)=122 \twrite $$create^Dictionary(),! \tkill ^tmwOntology($job) \tset ^tmwOntology($job,&quot;in&quot;,&quot;ontology&quot;)=&quot;Vehicle&quot;,^tmwOntology($job,&quot;in&quot;,&quot;type&quot;)=&quot;Make&quot; \tset ^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;ru&quot;)=&quot;BMW&quot;,^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;partUri&quot;)=&quot;bmw&quot; \tset ^tmwOntology($job,&quot;in&quot;,&quot;lastId&quot;)=1269 \twrite $$create^Dictionary(),! \tkill ^tmwOntology($job) \tset ^tmwOntology($job,&quot;in&quot;,&quot;ontology&quot;)=&quot;Vehicle&quot;,^tmwOntology($job,&quot;in&quot;,&quot;type&quot;)=&quot;Model&quot; \tset ^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;ru&quot;)=6,^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;partUri&quot;)=6 \tset ^tmwOntology($job,&quot;in&quot;,&quot;parentId&quot;)=3 \twrite $$create^Dictionary(),! \tkill ^tmwOntology($job) \tset ^tmwOntology($job,&quot;in&quot;,&quot;ontology&quot;)=&quot;Vehicle&quot;,^tmwOntology($job,&quot;in&quot;,&quot;type&quot;)=&quot;Model&quot; \tset ^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;ru&quot;)=3,^tmwOntology($job,&quot;in&quot;,&quot;nameList&quot;,&quot;partUri&quot;)=3 \tset ^tmwOntology($job,&quot;in&quot;,&quot;parentId&quot;)=3 \twrite $$create^Dictionary(),! \tzwrite ^Dictionary,^IndexDictionary,^NameDictionaryElement,^RefsDictionary <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0414\u0443\u043c\u0430\u044e \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u0432\u0430\u0441 \u043e\u0431\u0440\u0430\u0442\u0438\u043b\u0438 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445, \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439, \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043e\u043a \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0448\u0438\u0431\u043e\u043a (\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c -1 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043b\u044e\u0431\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u044f\u0432\u043d\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e). \u0418\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043c\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0435\u0441\u043b\u0438 \u0432 \u043a\u043e\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043e\u0436\u0435\u043b\u0430\u043d\u0438\u0439. <\/p>\n<p>  \u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e \u0447\u0442\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u044b \u0438 \u043a\u043e\u0434\u044b \u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0436\u0438\u0432\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 (\u043f\u0440\u0430\u0432\u0434\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u0441\u044f \u043e\u0442 \u0442\u0435\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435).<\/p>\n<p>  \u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c \u0438 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f\u043c, \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0439\u0442\u0435 \u043a\u0430\u043a \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0435 \u0432\u044b \u0443 \u0441\u0435\u0431\u044f \u0432 \u0411\u0414 (\u043f\u0443\u0441\u0442\u044c \u0434\u0430\u0436\u0435 \u0442\u0430\u043c \u043d\u0435\u0442 \u0433\u043b\u043e\u0431\u0430\u043b\u043e\u0432 \u0430 \u0435\u0441\u0442\u044c SQL). <\/p>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.    \t \t\t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/179949\/\"> http:\/\/habrahabr.ru\/post\/179949\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<i>\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u044f\u0449\u0435\u0439 <b>\u00ab\u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438\u00bb<\/b> \u043a\u0430\u043c\u0435\u0440\u044b \u0441 \u043f\u0430\u0440\u0430\u0448\u044e\u0442\u043e\u043c \u0432 \u0440\u0430\u043d\u0435\u0446.<\/i><br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/082\/fe4\/0ab\/082fe40ab657d34379e7b41a99d9e78d.jpg\" align=\"left\"\/><br \/>  <a href=\"http:\/\/habrahabr.ru\/company\/intersystems\/blog\/175773\/\">\u0427\u0430\u0441\u0442\u044c 1<\/a><br \/>  <a href=\"http:\/\/habrahabr.ru\/company\/intersystems\/blog\/177319\/\">\u0427\u0430\u0441\u0442\u044c 2<\/a><br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/178563\/\">\u0427\u0430\u0441\u0442\u044c 3<\/a><\/p>\n<p>  \u0412 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437 \u043c\u044b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438\u0441\u044c \u043d\u0430 \u0442\u043e\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <a href=\"http:\/\/habrahabr.ru\/post\/178563\/#create\"><b>create()<\/b><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u0430 \u043f\u0440\u0430\u0432\u0438\u043b <a href=\"http:\/\/habrahabr.ru\/post\/178563\/#ruleDic\"><b>^RuleDictionary<\/b><\/a> \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430. \u041d\u0430\u043c\u0438 \u0431\u044b\u043b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0433\u043e, \u043e\u0434\u043d\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0433\u043e \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430. \u0421\u0435\u0433\u043e\u0434\u043d\u044f, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0430\u0448\u0438\u0445 \u0433\u043b\u043e\u0431\u0430\u043b\u043e\u0432 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b.<\/p>\n<p>  \u0412 <a href=\"http:\/\/habrahabr.ru\/post\/178563\/#allDictionary\">\u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/a>, \u0431\u044b\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b <i>\u00ab\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0435\u00bb<\/i> \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <b>t<\/b> \u0438 <b>map<\/b>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043d\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u043c\u0435\u0442\u043e\u0434\u044b, \u043d\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0438\u0445. \u041c\u043d\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u043b\u0443\u0447\u0448\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0442\u043e, \u0447\u0442\u043e \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430, \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 Cach\u00e9 Object Script \u2014 \u043d\u043e\u0432. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u043c, \u0432\u043d\u0435\u0441\u0451\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443.<\/p>\n<hr\/>\n<p>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-179949","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/179949","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=179949"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/179949\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=179949"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=179949"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=179949"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}