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

From 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
To version 1.2
edited by Artur K.
on 2026/05/25 16:41
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,7 +1,8 @@
1 -{{velocity output="false"}}
1 +{{velocity}}
2 2  #set($rootDocFullName = $doc.getParent())
3 3  #set($rootDoc = $xwiki.getDocument($rootDocFullName))
4 4  #set($fullNamePrefix = "${rootDoc.space}.%")
5 +
5 5  ## ----------------------------
6 6  ## 1. Получаем Ontology Elements
7 7  ## ----------------------------
... ... @@ -15,7 +15,12 @@
15 15   and doc.fullName <> :rootDocFullName
16 16   and doc.fullName like :fullNamePrefix
17 17  order by doc.fullName")
18 -#set($elementRows = $services.query.hql($hqlElements).bindValue('rootDocFullName', $rootDocFullName).bindValue('fullNamePrefix', $fullNamePrefix).execute())
19 +
20 +#set($elementRows = $services.query.hql($hqlElements)
21 + .bindValue('rootDocFullName', $rootDocFullName)
22 + .bindValue('fullNamePrefix', $fullNamePrefix)
23 + .execute())
24 +
19 19  ## ---------------------------
20 20  ## 2. Получаем термины глоссария
21 21  ## ----------------------------
... ... @@ -29,16 +29,18 @@
29 29  order by doc.fullName")
30 30  
31 31  #set($glossaryRows = $services.query.hql($hqlGlossary).execute())
38 +
32 32  ## ---------------------------
33 33  ## 3. Строим map глоссария по нормализованному title
34 34  ## ----------------------------
35 35  #set($glossaryMap = {})
43 +
36 36  #foreach($row in $glossaryRows)
37 37   #set($glossaryFullName = $row[0])
38 38   #set($glossaryTitle = "$!row[1]")
39 39  
40 40   #if("$!glossaryTitle" != "")
41 - #set($normalizedGlossaryTitle = $stringtool.lowerCase($glossaryTitle).replaceAll("\s+", ""))
49 + #set($normalizedGlossaryTitle = $stringtool.lowerCase($glossaryTitle).replaceAll("\\s+", ""))
42 42  
43 43   #if("$!normalizedGlossaryTitle" != "")
44 44   #set($discard = $glossaryMap.put($normalizedGlossaryTitle, {
... ... @@ -48,6 +48,7 @@
48 48   #end
49 49   #end
50 50  #end
59 +
51 51  ## ----------------------------
52 52  ## 4. Ищем совпадения
53 53  ## ----------------------------
... ... @@ -75,7 +75,7 @@
75 75   #end
76 76   #end
77 77  #end
78 -{{/velocity}}{{velocity output="true"}}
87 +
79 79  ## ---------------------------
80 80  ## 5. Выводим таблицу совпадений
81 81  ## ----------------------------
... ... @@ -83,7 +83,7 @@
83 83  <table class="wikitable" border="1">
84 84   <thead>
85 85   <tr>
86 - <th>ML elements</th>
95 + <th>Ontology elements</th>
87 87   <th>Glossary terms</th>
88 88   </tr>
89 89   </thead>
© Semantic R&D Group, 2026