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
|
101
|
93 <h:outputText value="Own Value" />
|
|
94 <h:outputText value="#{Session.importMerge.firstEntity.getOwnValue()}" />
|
|
95 <h:outputText value="#{Session.importMerge.secondEntity.getOwnValue()}" />
|
|
96
|
97
|
97 </h:panelGrid>
|
|
98
|
|
99 <h:panelGrid columns="2" styleClass="createPanel"
|
|
100 columnClasses="createPanelFirstColumn,createPanelColumn02,createPanelColumn02"
|
|
101 rendered="#{Session.importMerge.entitiesLoaded}">
|
96
|
102
|
|
103 <h:outputText value="Attributes" />
|
|
104 <rich:dataTable var="attName"
|
|
105 value="#{Session.importMerge.attLabels}"
|
|
106 rendered="#{!empty Session.importMerge.attLabels}">
|
|
107 <h:column>
|
|
108 <f:facet name="header">
|
|
109 <h:outputText value="Attribute Name" />
|
|
110 </f:facet>
|
|
111 <h:outputText value="#{attName}" />
|
|
112 </h:column>
|
|
113 <h:column>
|
|
114 <f:facet name="header">
|
|
115 <h:outputText value="Value Old Entity" />
|
|
116 </f:facet>
|
|
117 <h:outputText
|
|
118 value="#{Session.importMerge.firstAttMap[attName]}" />
|
|
119 </h:column>
|
|
120 <h:column>
|
|
121 <f:facet name="header">
|
|
122 <h:outputText value="Value New Entity" />
|
|
123 </f:facet>
|
|
124 <h:outputText
|
|
125 value="#{Session.importMerge.secondAttMap[attName]}" />
|
|
126 </h:column>
|
|
127 <h:column style="width:300px;">
|
|
128 <f:facet name="header">
|
|
129 <h:outputText value="Select Value" />
|
|
130 </f:facet>
|
|
131 <h:selectOneRadio
|
|
132 value="#{Session.importMerge.selectedAtts[attName]}">
|
|
133 <f:selectItems value="#{Session.importMerge.attSelectItems}" />
|
|
134 </h:selectOneRadio>
|
|
135 </h:column>
|
|
136 </rich:dataTable>
|
|
137
|
|
138 </h:panelGrid>
|
|
139
|
|
140 <h:panelGrid columns="3" styleClass="createPanel"
|
|
141 columnClasses="createPanelFirstColumn,createPanelColumn02,createPanelColumn02"
|
|
142 rendered="#{Session.importMerge.entitiesLoaded}">
|
|
143
|
|
144
|
|
145 <h:outputText value="Source Relations" />
|
|
146
|
|
147 <h:panelGrid columns="1">
|
|
148 <rich:dataTable var="srcRelation"
|
|
149 rendered="#{!empty Session.importMerge.firstEntity.sourceRelations}"
|
|
150 value="#{Session.importMerge.firstEntity.sourceRelations}">
|
|
151
|
|
152 <h:column>
|
|
153 <f:facet name="header">
|
|
154 <h:outputText value="Relation Name" />
|
|
155 </f:facet>
|
|
156 <h:outputText value="#{srcRelation.ownValue}" />
|
|
157 </h:column>
|
|
158 <h:column>
|
|
159 <f:facet name="header">
|
|
160 <h:outputText value="linked to this" />
|
|
161 </f:facet>
|
|
162 <h:outputText
|
|
163 value="#{srcRelation.target.ownValue} [#{srcRelation.target.objectClass}-#{srcRelation.targetId}]" />
|
|
164 </h:column>
|
|
165
|
|
166 <h:column>
|
|
167 <h:selectOneRadio
|
|
168 value="#{Session.importMerge.selectedFirstSrcRelations[srcRelation.id]}">
|
|
169 <f:selectItems value="#{Session.importMerge.relSelectItems}" />
|
|
170 </h:selectOneRadio>
|
|
171 </h:column>
|
|
172
|
|
173 </rich:dataTable>
|
|
174
|
|
175 <h:outputText
|
|
176 value="The old entity does not have source relations"
|
|
177 rendered="#{empty Session.importMerge.firstEntity.sourceRelations}" />
|
|
178 </h:panelGrid>
|
|
179
|
|
180 <h:panelGrid columns="1">
|
|
181
|
|
182 <rich:dataTable var="srcRelation"
|
|
183 rendered="#{!empty Session.importMerge.secondEntity.sourceRelations}"
|
|
184 value="#{Session.importMerge.secondEntity.sourceRelations}">
|
|
185 <h:column>
|
|
186 <f:facet name="header">
|
|
187 <h:outputText value="Relation Name" />
|
|
188 </f:facet>
|
|
189 <h:outputText value="#{srcRelation.ownValue}" />
|
|
190 </h:column>
|
|
191 <h:column>
|
|
192 <f:facet name="header">
|
|
193 <h:outputText value="linked to this" />
|
|
194 </f:facet>
|
|
195 <h:outputText
|
|
196 value="#{srcRelation.target.ownValue} [#{srcRelation.target.objectClass}-#{srcRelation.targetId}]" />
|
|
197 </h:column>
|
|
198 <h:column>
|
|
199 <h:selectOneRadio
|
|
200 value="#{Session.importMerge.selectedSecondSrcRelations[srcRelation.id]}">
|
|
201 <f:selectItems value="#{Session.importMerge.relSelectItems}" />
|
|
202 </h:selectOneRadio>
|
|
203 </h:column>
|
|
204 </rich:dataTable>
|
|
205
|
|
206 <h:outputText
|
|
207 value="The new entity does not have source relations"
|
|
208 rendered="#{empty Session.importMerge.secondEntity.sourceRelations}" />
|
|
209
|
|
210 </h:panelGrid>
|
|
211
|
|
212
|
|
213 <h:outputText value="Target Relations" />
|
|
214
|
|
215 <h:panelGrid columns="1">
|
|
216 <rich:dataTable var="tarRelation"
|
|
217 rendered="#{!empty Session.importMerge.firstEntity.targetRelations}"
|
|
218 value="#{Session.importMerge.firstEntity.targetRelations}"
|
|
219 style="width:60%;">
|
|
220
|
|
221 <h:column>
|
|
222 <f:facet name="header">
|
|
223 <h:outputText value="linked from this" />
|
|
224 </f:facet>
|
|
225 <h:outputText
|
|
226 value="#{tarRelation.source.ownValue} [#{tarRelation.source.objectClass}-#{tarRelation.sourceId}]" />
|
|
227 </h:column>
|
|
228
|
|
229 <h:column>
|
|
230 <f:facet name="header">
|
|
231 <h:outputText value="Relation Name" />
|
|
232 </f:facet>
|
|
233 <h:outputText value="#{tarRelation.ownValue}" />
|
|
234 </h:column>
|
|
235
|
|
236 <h:column>
|
|
237 <h:selectOneRadio
|
|
238 value="#{Session.importMerge.selectedFirstTarRelations[tarRelation.id]}">
|
|
239 <f:selectItems value="#{Session.importMerge.relSelectItems}" />
|
|
240 </h:selectOneRadio>
|
|
241 </h:column>
|
|
242 </rich:dataTable>
|
|
243 <h:outputText
|
|
244 value="The old entity does not have target relations."
|
|
245 rendered="#{empty Session.importMerge.firstEntity.targetRelations}" />
|
|
246 </h:panelGrid>
|
|
247
|
|
248 <h:panelGrid columns="1">
|
|
249
|
|
250 <rich:dataTable var="tarRelation"
|
|
251 rendered="#{!empty Session.importMerge.secondEntity.targetRelations}"
|
|
252 value="#{Session.importMerge.secondEntity.targetRelations}"
|
|
253 style="width:60%;">
|
|
254
|
|
255 <h:column>
|
|
256 <f:facet name="header">
|
|
257 <h:outputText value="linked from this" />
|
|
258 </f:facet>
|
|
259 <h:outputText
|
|
260 value="#{tarRelation.source.ownValue} [#{tarRelation.source.objectClass}-#{tarRelation.sourceId}]" />
|
|
261 </h:column>
|
|
262
|
|
263 <h:column>
|
|
264 <f:facet name="header">
|
|
265 <h:outputText value="Relation Name" />
|
|
266 </f:facet>
|
|
267 <h:outputText value="#{tarRelation.ownValue}" />
|
|
268 </h:column>
|
|
269
|
|
270 <h:column>
|
|
271 <h:selectOneRadio
|
|
272 value="#{Session.importMerge.selectedSecondTarRelations[tarRelation.id]}">
|
|
273 <f:selectItems value="#{Session.importMerge.relSelectItems}" />
|
|
274 </h:selectOneRadio>
|
|
275 </h:column>
|
|
276
|
|
277 </rich:dataTable>
|
|
278
|
|
279 <h:outputText
|
|
280 value="The new entity does not have target relations"
|
|
281 rendered="#{empty Session.importMerge.secondEntity.targetRelations}" />
|
|
282
|
|
283 </h:panelGrid>
|
|
284 </h:panelGrid>
|
|
285
|
|
286 <h:panelGrid columns="2" styleClass="controlPanel"
|
|
287 rendered="#{Session.importMerge.entitiesLoaded}">
|
|
288
|
|
289 <a4j:commandButton value="Preview"
|
|
290 actionListener="#{Session.importMerge.preview}"
|
|
291 rendered="#{Session.importMerge.entitiesLoaded}"
|
|
292 render="mergingPanel" />
|
|
293
|
|
294 <a4j:commandButton value="Execute Merge"
|
|
295 actionListener="#{Session.importMerge.listenerExecuteMerge }"
|
|
296 rendered="#{Session.importMerge.entitiesLoaded}"
|
|
297 onclick="#{ApplicationBean1.JSConfirmationMerge}"
|
|
298 render="mergingPanel" />
|
|
299
|
|
300 </h:panelGrid>
|
|
301
|
|
302
|
|
303 <h:outputText value="Entity Preview"
|
97
|
304 rendered="#{Session.importMerge.entResult != null}"
|
96
|
305 styleClass="titlePanel"/>
|
97
|
306
|
96
|
307 <h:panelGrid columns="2" styleClass="createPanel"
|
|
308 columnClasses="createPanelFirstColumn"
|
97
|
309 rendered="#{Session.importMerge.entResult != null}">
|
96
|
310
|
97
|
311 <h:outputText value="ID"/>
|
|
312 <h:outputText value="#{Session.importMerge.entResult.getId()}" styleClass="textBack"/>
|
|
313
|
|
314 <h:outputText value="Class"/>
|
|
315 <h:outputText value="#{Session.importMerge.entResult.getObjectClass()}" styleClass="textBack"/>
|
96
|
316
|
|
317 <h:outputText value="Attributes" />
|
|
318 <rich:dataTable
|
|
319 value="#{Session.importMerge.entResult.attributes}"
|
|
320 var="attribute" border="1">
|
|
321 <h:column>
|
|
322 <f:facet name="header">
|
|
323 <h:outputText value="Name" />
|
|
324 </f:facet>
|
|
325 <h:outputText value="#{attribute.objectClass}" />
|
|
326 </h:column>
|
|
327 <h:column>
|
|
328 <f:facet name="header">
|
|
329 <h:outputText value="Value" />
|
|
330 </f:facet>
|
|
331 <h:outputText value="#{attribute.ownValue}" />
|
|
332 </h:column>
|
|
333 </rich:dataTable>
|
|
334
|
|
335
|
|
336 <h:outputText value="Source Relations" />
|
|
337 <rich:dataTable
|
|
338 value="#{Session.importMerge.entResult.sourceRelations}"
|
|
339 var="srcRelation" border="1">
|
|
340
|
|
341 <h:column>
|
|
342 <f:facet name="header">
|
|
343 <h:outputText value="linked from this" />
|
|
344 </f:facet>
|
|
345 <h:outputText value="#{'x'}" />
|
|
346 </h:column>
|
|
347
|
|
348 <h:column>
|
|
349 <f:facet name="header">
|
|
350 <h:outputText value="Relation Name" />
|
|
351 </f:facet>
|
|
352 <h:outputText value="#{srcRelation.ownValue}" />
|
|
353 </h:column>
|
|
354 <h:column>
|
|
355 <f:facet name="header">
|
|
356 <h:outputText value="linked to this" />
|
|
357 </f:facet>
|
|
358 <h:outputText
|
|
359 value="#{srcRelation.target.ownValue} [#{srcRelation.target.objectClass}]" />
|
|
360 </h:column>
|
|
361 </rich:dataTable>
|
|
362
|
|
363 <h:outputText value="Target Relations" />
|
|
364 <rich:dataTable
|
|
365 value="#{Session.importMerge.entResult.targetRelations}"
|
|
366 var="tarRelation" border="1">
|
|
367 <h:column>
|
|
368 <f:facet name="header">
|
|
369 <h:outputText value="linked from this" />
|
|
370 </f:facet>
|
|
371 <h:outputText
|
|
372 value="#{tarRelation.source.ownValue} [#{tarRelation.source.objectClass}]" />
|
|
373 </h:column>
|
|
374 <h:column>
|
|
375 <f:facet name="header">
|
|
376 <h:outputText value="Relation Name" />
|
|
377 </f:facet>
|
|
378 <h:outputText value="#{tarRelation.ownValue}" />
|
|
379 </h:column>
|
|
380 <h:column>
|
|
381 <f:facet name="header">
|
|
382 <h:outputText value="linked to this" />
|
|
383 </f:facet>
|
|
384 <h:outputText value="#{'x'}" />
|
|
385 </h:column>
|
|
386 </rich:dataTable>
|
|
387
|
|
388
|
|
389 </h:panelGrid>
|
|
390
|
|
391
|
|
392
|
|
393 </h:panelGrid>
|
|
394
|
|
395
|
|
396
|
|
397 </h:panelGrid>
|
|
398 </ui:define>
|
|
399 </ui:composition>
|
|
400 </body>
|
|
401 </html> |