96
|
1
|
|
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3 <html xmlns="http://www.w3.org/1999/xhtml"
|
|
4 xmlns:h="http://java.sun.com/jsf/html"
|
|
5 xmlns:f="http://java.sun.com/jsf/core"
|
|
6 xmlns:ui="http://java.sun.com/jsf/facelets"
|
|
7 xmlns:a4j="http://richfaces.org/a4j"
|
|
8 xmlns:rich="http://richfaces.org/rich">
|
|
9
|
|
10 <body>
|
|
11 <ui:composition template="/templates/privateTemplate.xhtml">
|
|
12
|
|
13 <ui:define name="privateContent">
|
|
14
|
|
15 <div id="pageTitle">
|
|
16 <h:outputText value="Merge Import List" />
|
|
17 </div>
|
|
18
|
|
19 <h:panelGrid rendered="#{Session.user != null}"
|
97
|
20 styleClass="mainPanel" id="mainPanel" columns="1">
|
96
|
21
|
|
22
|
|
23
|
|
24 <h:panelGrid columns="2" styleClass="createPanel"
|
|
25 columnClasses="createPanelFirstColumn" id="loadListPanel">
|
|
26
|
98
|
27 <h:outputText value="Load File" />
|
96
|
28
|
98
|
29 <h:panelGrid columns="1">
|
|
30 <rich:fileUpload fileUploadListener="#{Session.importMerge.uploadListener}" id="upload" acceptedTypes=".csv"
|
|
31 ontyperejected="alert('Only CSV files are accepted');" maxFilesQuantity="1"
|
|
32 listHeight="60px" addLabel="Select file to upload...">
|
|
33 <a4j:ajax event="uploadcomplete" execute="@none" render="mainPanel" />
|
|
34 </rich:fileUpload>
|
|
35
|
96
|
36 <h:outputText
|
|
37 value="#{Session.importMerge.importFileMsg}"
|
|
38 rendered="#{!empty Session.importMerge.importFileMsg}"
|
|
39 styleClass="textBack"/>
|
|
40 </h:panelGrid>
|
|
41 </h:panelGrid>
|
|
42
|
|
43 <h:panelGrid columns="2" styleClass="createPanel"
|
|
44 columnClasses="createPanelFirstColumn" id="loadingPanel"
|
97
|
45 rendered="#{Session.importMerge.getImportNodeListLength() > 0}">
|
96
|
46
|
|
47 <h:outputText value="Import Nodes" />
|
|
48
|
|
49 <h:panelGrid columns="3">
|
|
50
|
|
51 <h:outputText value="Node #{Session.importMerge.importNodeIdx + 1} / #{Session.importMerge.importNodeListLength}"
|
|
52 styleClass="textBack"/>
|
|
53 <a4j:commandButton value="Skip"
|
|
54 actionListener="#{Session.importMerge.skipCurrentNode}"
|
|
55 render="loadingPanel,mergingPanel" />
|
|
56 <h:column>
|
|
57 <h:outputText
|
|
58 value="#{Session.importMerge.importNodeAsText}"
|
|
59 rendered="#{Session.importMerge.importNode != null}"
|
|
60 styleClass="textBack"/>
|
|
61 </h:column>
|
|
62
|
|
63 <h:outputText/>
|
|
64 <a4j:commandButton value="Load"
|
|
65 actionListener="#{Session.importMerge.loadFirstEntity}"
|
|
66 render="loadingPanel,mergingPanel" />
|
|
67 <h:outputText
|
|
68 value="#{Session.importMerge.importNodeMsg}"
|
|
69 rendered="#{! empty Session.importMerge.importNodeMsg}"
|
|
70 styleClass="textBack"/>
|
|
71 </h:panelGrid>
|
|
72
|
|
73 </h:panelGrid>
|
|
74
|
|
75 <h:panelGrid columns="1" id="mergingPanel">
|
|
76
|
|
77 <h:outputText value="Merge Mapping"
|
|
78 rendered="#{Session.importMerge.entitiesLoaded}"
|
|
79 styleClass="titlePanel"/>
|
|
80
|
97
|
81 <h:panelGrid columns="3" styleClass="createPanel"
|
96
|
82 columnClasses="createPanelFirstColumn,createPanelColumn02,createPanelColumn02"
|
|
83 rendered="#{Session.importMerge.entitiesLoaded}">
|
|
84
|
97
|
85 <h:outputText value="ID" />
|
|
86 <h:outputText value="#{Session.importMerge.firstEntity.getId()}" />
|
|
87 <h:outputText value="#{Session.importMerge.secondEntity.getId()}" />
|
|
88
|
|
89 <h:outputText value="Class" />
|
|
90 <h:outputText value="#{Session.importMerge.firstEntity.getObjectClass()}" />
|
|
91 <h:outputText value="#{Session.importMerge.secondEntity.getObjectClass()}" />
|
|
92
|
|
93 </h:panelGrid>
|
|
94
|
|
95 <h:panelGrid columns="2" styleClass="createPanel"
|
|
96 columnClasses="createPanelFirstColumn,createPanelColumn02,createPanelColumn02"
|
|
97 rendered="#{Session.importMerge.entitiesLoaded}">
|
96
|
98
|
|
99 <h:outputText value="Attributes" />
|
|
100 <rich:dataTable var="attName"
|
|
101 value="#{Session.importMerge.attLabels}"
|
|
102 rendered="#{!empty Session.importMerge.attLabels}">
|
|
103 <h:column>
|
|
104 <f:facet name="header">
|
|
105 <h:outputText value="Attribute Name" />
|
|
106 </f:facet>
|
|
107 <h:outputText value="#{attName}" />
|
|
108 </h:column>
|
|
109 <h:column>
|
|
110 <f:facet name="header">
|
|
111 <h:outputText value="Value Old Entity" />
|
|
112 </f:facet>
|
|
113 <h:outputText
|
|
114 value="#{Session.importMerge.firstAttMap[attName]}" />
|
|
115 </h:column>
|
|
116 <h:column>
|
|
117 <f:facet name="header">
|
|
118 <h:outputText value="Value New Entity" />
|
|
119 </f:facet>
|
|
120 <h:outputText
|
|
121 value="#{Session.importMerge.secondAttMap[attName]}" />
|
|
122 </h:column>
|
|
123 <h:column style="width:300px;">
|
|
124 <f:facet name="header">
|
|
125 <h:outputText value="Select Value" />
|
|
126 </f:facet>
|
|
127 <h:selectOneRadio
|
|
128 value="#{Session.importMerge.selectedAtts[attName]}">
|
|
129 <f:selectItems value="#{Session.importMerge.attSelectItems}" />
|
|
130 </h:selectOneRadio>
|
|
131 </h:column>
|
|
132 </rich:dataTable>
|
|
133
|
|
134 </h:panelGrid>
|
|
135
|
|
136 <h:panelGrid columns="3" styleClass="createPanel"
|
|
137 columnClasses="createPanelFirstColumn,createPanelColumn02,createPanelColumn02"
|
|
138 rendered="#{Session.importMerge.entitiesLoaded}">
|
|
139
|
|
140
|
|
141 <h:outputText value="Source Relations" />
|
|
142
|
|
143 <h:panelGrid columns="1">
|
|
144 <rich:dataTable var="srcRelation"
|
|
145 rendered="#{!empty Session.importMerge.firstEntity.sourceRelations}"
|
|
146 value="#{Session.importMerge.firstEntity.sourceRelations}">
|
|
147
|
|
148 <h:column>
|
|
149 <f:facet name="header">
|
|
150 <h:outputText value="Relation Name" />
|
|
151 </f:facet>
|
|
152 <h:outputText value="#{srcRelation.ownValue}" />
|
|
153 </h:column>
|
|
154 <h:column>
|
|
155 <f:facet name="header">
|
|
156 <h:outputText value="linked to this" />
|
|
157 </f:facet>
|
|
158 <h:outputText
|
|
159 value="#{srcRelation.target.ownValue} [#{srcRelation.target.objectClass}-#{srcRelation.targetId}]" />
|
|
160 </h:column>
|
|
161
|
|
162 <h:column>
|
|
163 <h:selectOneRadio
|
|
164 value="#{Session.importMerge.selectedFirstSrcRelations[srcRelation.id]}">
|
|
165 <f:selectItems value="#{Session.importMerge.relSelectItems}" />
|
|
166 </h:selectOneRadio>
|
|
167 </h:column>
|
|
168
|
|
169 </rich:dataTable>
|
|
170
|
|
171 <h:outputText
|
|
172 value="The old entity does not have source relations"
|
|
173 rendered="#{empty Session.importMerge.firstEntity.sourceRelations}" />
|
|
174 </h:panelGrid>
|
|
175
|
|
176 <h:panelGrid columns="1">
|
|
177
|
|
178 <rich:dataTable var="srcRelation"
|
|
179 rendered="#{!empty Session.importMerge.secondEntity.sourceRelations}"
|
|
180 value="#{Session.importMerge.secondEntity.sourceRelations}">
|
|
181 <h:column>
|
|
182 <f:facet name="header">
|
|
183 <h:outputText value="Relation Name" />
|
|
184 </f:facet>
|
|
185 <h:outputText value="#{srcRelation.ownValue}" />
|
|
186 </h:column>
|
|
187 <h:column>
|
|
188 <f:facet name="header">
|
|
189 <h:outputText value="linked to this" />
|
|
190 </f:facet>
|
|
191 <h:outputText
|
|
192 value="#{srcRelation.target.ownValue} [#{srcRelation.target.objectClass}-#{srcRelation.targetId}]" />
|
|
193 </h:column>
|
|
194 <h:column>
|
|
195 <h:selectOneRadio
|
|
196 value="#{Session.importMerge.selectedSecondSrcRelations[srcRelation.id]}">
|
|
197 <f:selectItems value="#{Session.importMerge.relSelectItems}" />
|
|
198 </h:selectOneRadio>
|
|
199 </h:column>
|
|
200 </rich:dataTable>
|
|
201
|
|
202 <h:outputText
|
|
203 value="The new entity does not have source relations"
|
|
204 rendered="#{empty Session.importMerge.secondEntity.sourceRelations}" />
|
|
205
|
|
206 </h:panelGrid>
|
|
207
|
|
208
|
|
209 <h:outputText value="Target Relations" />
|
|
210
|
|
211 <h:panelGrid columns="1">
|
|
212 <rich:dataTable var="tarRelation"
|
|
213 rendered="#{!empty Session.importMerge.firstEntity.targetRelations}"
|
|
214 value="#{Session.importMerge.firstEntity.targetRelations}"
|
|
215 style="width:60%;">
|
|
216
|
|
217 <h:column>
|
|
218 <f:facet name="header">
|
|
219 <h:outputText value="linked from this" />
|
|
220 </f:facet>
|
|
221 <h:outputText
|
|
222 value="#{tarRelation.source.ownValue} [#{tarRelation.source.objectClass}-#{tarRelation.sourceId}]" />
|
|
223 </h:column>
|
|
224
|
|
225 <h:column>
|
|
226 <f:facet name="header">
|
|
227 <h:outputText value="Relation Name" />
|
|
228 </f:facet>
|
|
229 <h:outputText value="#{tarRelation.ownValue}" />
|
|
230 </h:column>
|
|
231
|
|
232 <h:column>
|
|
233 <h:selectOneRadio
|
|
234 value="#{Session.importMerge.selectedFirstTarRelations[tarRelation.id]}">
|
|
235 <f:selectItems value="#{Session.importMerge.relSelectItems}" />
|
|
236 </h:selectOneRadio>
|
|
237 </h:column>
|
|
238 </rich:dataTable>
|
|
239 <h:outputText
|
|
240 value="The old entity does not have target relations."
|
|
241 rendered="#{empty Session.importMerge.firstEntity.targetRelations}" />
|
|
242 </h:panelGrid>
|
|
243
|
|
244 <h:panelGrid columns="1">
|
|
245
|
|
246 <rich:dataTable var="tarRelation"
|
|
247 rendered="#{!empty Session.importMerge.secondEntity.targetRelations}"
|
|
248 value="#{Session.importMerge.secondEntity.targetRelations}"
|
|
249 style="width:60%;">
|
|
250
|
|
251 <h:column>
|
|
252 <f:facet name="header">
|
|
253 <h:outputText value="linked from this" />
|
|
254 </f:facet>
|
|
255 <h:outputText
|
|
256 value="#{tarRelation.source.ownValue} [#{tarRelation.source.objectClass}-#{tarRelation.sourceId}]" />
|
|
257 </h:column>
|
|
258
|
|
259 <h:column>
|
|
260 <f:facet name="header">
|
|
261 <h:outputText value="Relation Name" />
|
|
262 </f:facet>
|
|
263 <h:outputText value="#{tarRelation.ownValue}" />
|
|
264 </h:column>
|
|
265
|
|
266 <h:column>
|
|
267 <h:selectOneRadio
|
|
268 value="#{Session.importMerge.selectedSecondTarRelations[tarRelation.id]}">
|
|
269 <f:selectItems value="#{Session.importMerge.relSelectItems}" />
|
|
270 </h:selectOneRadio>
|
|
271 </h:column>
|
|
272
|
|
273 </rich:dataTable>
|
|
274
|
|
275 <h:outputText
|
|
276 value="The new entity does not have target relations"
|
|
277 rendered="#{empty Session.importMerge.secondEntity.targetRelations}" />
|
|
278
|
|
279 </h:panelGrid>
|
|
280 </h:panelGrid>
|
|
281
|
|
282 <h:panelGrid columns="2" styleClass="controlPanel"
|
|
283 rendered="#{Session.importMerge.entitiesLoaded}">
|
|
284
|
|
285 <a4j:commandButton value="Preview"
|
|
286 actionListener="#{Session.importMerge.preview}"
|
|
287 rendered="#{Session.importMerge.entitiesLoaded}"
|
|
288 render="mergingPanel" />
|
|
289
|
|
290 <a4j:commandButton value="Execute Merge"
|
|
291 actionListener="#{Session.importMerge.listenerExecuteMerge }"
|
|
292 rendered="#{Session.importMerge.entitiesLoaded}"
|
|
293 onclick="#{ApplicationBean1.JSConfirmationMerge}"
|
|
294 render="mergingPanel" />
|
|
295
|
|
296 </h:panelGrid>
|
|
297
|
|
298
|
|
299 <h:outputText value="Entity Preview"
|
97
|
300 rendered="#{Session.importMerge.entResult != null}"
|
96
|
301 styleClass="titlePanel"/>
|
97
|
302
|
96
|
303 <h:panelGrid columns="2" styleClass="createPanel"
|
|
304 columnClasses="createPanelFirstColumn"
|
97
|
305 rendered="#{Session.importMerge.entResult != null}">
|
96
|
306
|
97
|
307 <h:outputText value="ID"/>
|
|
308 <h:outputText value="#{Session.importMerge.entResult.getId()}" styleClass="textBack"/>
|
|
309
|
|
310 <h:outputText value="Class"/>
|
|
311 <h:outputText value="#{Session.importMerge.entResult.getObjectClass()}" styleClass="textBack"/>
|
96
|
312
|
|
313 <h:outputText value="Attributes" />
|
|
314 <rich:dataTable
|
|
315 value="#{Session.importMerge.entResult.attributes}"
|
|
316 var="attribute" border="1">
|
|
317 <h:column>
|
|
318 <f:facet name="header">
|
|
319 <h:outputText value="Name" />
|
|
320 </f:facet>
|
|
321 <h:outputText value="#{attribute.objectClass}" />
|
|
322 </h:column>
|
|
323 <h:column>
|
|
324 <f:facet name="header">
|
|
325 <h:outputText value="Value" />
|
|
326 </f:facet>
|
|
327 <h:outputText value="#{attribute.ownValue}" />
|
|
328 </h:column>
|
|
329 </rich:dataTable>
|
|
330
|
|
331
|
|
332 <h:outputText value="Source Relations" />
|
|
333 <rich:dataTable
|
|
334 value="#{Session.importMerge.entResult.sourceRelations}"
|
|
335 var="srcRelation" border="1">
|
|
336
|
|
337 <h:column>
|
|
338 <f:facet name="header">
|
|
339 <h:outputText value="linked from this" />
|
|
340 </f:facet>
|
|
341 <h:outputText value="#{'x'}" />
|
|
342 </h:column>
|
|
343
|
|
344 <h:column>
|
|
345 <f:facet name="header">
|
|
346 <h:outputText value="Relation Name" />
|
|
347 </f:facet>
|
|
348 <h:outputText value="#{srcRelation.ownValue}" />
|
|
349 </h:column>
|
|
350 <h:column>
|
|
351 <f:facet name="header">
|
|
352 <h:outputText value="linked to this" />
|
|
353 </f:facet>
|
|
354 <h:outputText
|
|
355 value="#{srcRelation.target.ownValue} [#{srcRelation.target.objectClass}]" />
|
|
356 </h:column>
|
|
357 </rich:dataTable>
|
|
358
|
|
359 <h:outputText value="Target Relations" />
|
|
360 <rich:dataTable
|
|
361 value="#{Session.importMerge.entResult.targetRelations}"
|
|
362 var="tarRelation" border="1">
|
|
363 <h:column>
|
|
364 <f:facet name="header">
|
|
365 <h:outputText value="linked from this" />
|
|
366 </f:facet>
|
|
367 <h:outputText
|
|
368 value="#{tarRelation.source.ownValue} [#{tarRelation.source.objectClass}]" />
|
|
369 </h:column>
|
|
370 <h:column>
|
|
371 <f:facet name="header">
|
|
372 <h:outputText value="Relation Name" />
|
|
373 </f:facet>
|
|
374 <h:outputText value="#{tarRelation.ownValue}" />
|
|
375 </h:column>
|
|
376 <h:column>
|
|
377 <f:facet name="header">
|
|
378 <h:outputText value="linked to this" />
|
|
379 </f:facet>
|
|
380 <h:outputText value="#{'x'}" />
|
|
381 </h:column>
|
|
382 </rich:dataTable>
|
|
383
|
|
384
|
|
385 </h:panelGrid>
|
|
386
|
|
387
|
|
388
|
|
389 </h:panelGrid>
|
|
390
|
|
391
|
|
392
|
|
393 </h:panelGrid>
|
|
394 </ui:define>
|
|
395 </ui:composition>
|
|
396 </body>
|
|
397 </html> |