Last modified by Artur K. on 2026/06/01 15:50

From version 1.1
edited by Artur K.
on 2026/05/25 16:41
Change comment: There is no comment for this version
To version 3.6
edited by Artur K.
on 2026/06/01 15:50
Change comment: Copied from sdmxsrlocalization:OntologyElements.Intersection table of ML Elements with glossary terms.WebHome

Summary

Details

Page properties
Content
... ... @@ -1,8 +1,7 @@
1 -{{velocity}}
1 +{{velocity output="false"}}
2 2  #set($rootDocFullName = $doc.getParent())
3 3  #set($rootDoc = $xwiki.getDocument($rootDocFullName))
4 4  #set($fullNamePrefix = "${rootDoc.space}.%")
5 -
6 6  ## ----------------------------
7 7  ## 1. Получаем Ontology Elements
8 8  ## ----------------------------
... ... @@ -16,12 +16,7 @@
16 16   and doc.fullName <> :rootDocFullName
17 17   and doc.fullName like :fullNamePrefix
18 18  order by doc.fullName")
19 -
20 -#set($elementRows = $services.query.hql($hqlElements)
21 - .bindValue('rootDocFullName', $rootDocFullName)
22 - .bindValue('fullNamePrefix', $fullNamePrefix)
23 - .execute())
24 -
18 +#set($elementRows = $services.query.hql($hqlElements).bindValue('rootDocFullName', $rootDocFullName).bindValue('fullNamePrefix', $fullNamePrefix).execute())
25 25  ## ---------------------------
26 26  ## 2. Получаем термины глоссария
27 27  ## ----------------------------
... ... @@ -35,18 +35,16 @@
35 35  order by doc.fullName")
36 36  
37 37  #set($glossaryRows = $services.query.hql($hqlGlossary).execute())
38 -
39 39  ## ---------------------------
40 40  ## 3. Строим map глоссария по нормализованному title
41 41  ## ----------------------------
42 42  #set($glossaryMap = {})
43 -
44 44  #foreach($row in $glossaryRows)
45 45   #set($glossaryFullName = $row[0])
46 46   #set($glossaryTitle = "$!row[1]")
47 47  
48 48   #if("$!glossaryTitle" != "")
49 - #set($normalizedGlossaryTitle = $stringtool.lowerCase($glossaryTitle).replaceAll("\\s+", ""))
41 + #set($normalizedGlossaryTitle = $stringtool.lowerCase($glossaryTitle).replaceAll("\s+", ""))
50 50  
51 51   #if("$!normalizedGlossaryTitle" != "")
52 52   #set($discard = $glossaryMap.put($normalizedGlossaryTitle, {
... ... @@ -56,7 +56,6 @@
56 56   #end
57 57   #end
58 58  #end
59 -
60 60  ## ----------------------------
61 61  ## 4. Ищем совпадения
62 62  ## ----------------------------
... ... @@ -68,7 +68,7 @@
68 68   #set($elementTitle = "$!row[1]")
69 69  
70 70   #if("$!elementTitle" != "")
71 - #set($normalizedElementTitle = $stringtool.lowerCase($elementTitle).replaceAll("\\s+", ""))
62 + #set($normalizedElementTitle = $stringtool.lowerCase($elementTitle).replaceAll("\s+", ""))
72 72  
73 73   #if($glossaryMap.containsKey($normalizedElementTitle))
74 74   #set($glossaryData = $glossaryMap.get($normalizedElementTitle))
... ... @@ -84,7 +84,7 @@
84 84   #end
85 85   #end
86 86  #end
87 -
78 +{{/velocity}}{{velocity output="true"}}
88 88  ## ---------------------------
89 89  ## 5. Выводим таблицу совпадений
90 90  ## ----------------------------
... ... @@ -92,7 +92,7 @@
92 92  <table class="wikitable" border="1">
93 93   <thead>
94 94   <tr>
95 - <th>Ontology elements</th>
86 + <th>ML elements</th>
96 96   <th>Glossary terms</th>
97 97   </tr>
98 98   </thead>
© Semantic R&D Group, 2026