Produced by Araxis Merge on 3/25/2019 8:58:05 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
# | Location | File | Last Modified |
---|---|---|---|
1 | C:\AraxisMergeCompare\Pri_un\IMAG_Source\VISA\Java\ViewerImagingWebApp\main\src\java\gov\va\med\imaging\viewer\rest\translator | ViewerImagingRestTranslator.java | Mon Mar 18 20:39:13 2019 UTC |
2 | C:\AraxisMergeCompare\Pri_re\IMAG_Source\VISA\Java\ViewerImagingWebApp\main\src\java\gov\va\med\imaging\viewer\rest\translator | ViewerImagingRestTranslator.java | Tue Mar 19 15:12:02 2019 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 3 | 1046 |
Changed | 2 | 4 |
Inserted | 0 | 0 |
Removed | 0 | 0 |
Whitespace | |
---|---|
Character case | Differences in character case are significant |
Line endings | Differences in line endings (CR and LF characters) are ignored |
CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
1 | /** | |
2 | * Date Cr eated: Apr 25, 2017 | |
3 | * Develop er: DNS tjahjb | |
4 | */ | |
5 | package go v.va.med.i maging.vie wer.rest.t ranslator; | |
6 | ||
7 | import jav a.util.Arr ayList; | |
8 | import jav a.util.Lis t; | |
9 | ||
10 | import org .apache.lo gging.log4 j.LogManag er; | |
11 | import org .apache.lo gging.log4 j.Logger; | |
12 | ||
13 | import gov .va.med.im aging.exch ange.busin ess.ImageA ccessReaso n; | |
14 | import gov .va.med.im aging.view er.ViewerI magingCont ext; | |
15 | import gov .va.med.im aging.view er.busines s.CaptureU serResult; | |
16 | import gov .va.med.im aging.view er.busines s.DeleteIm ageUrn; | |
17 | import gov .va.med.im aging.view er.busines s.DeleteIm ageUrnResu lt; | |
18 | import gov .va.med.im aging.view er.busines s.DeleteRe asonsType; | |
19 | import gov .va.med.im aging.view er.busines s.FlagSens itiveImage Urn; | |
20 | import gov .va.med.im aging.view er.busines s.FlagSens itiveImage UrnResult; | |
21 | import gov .va.med.im aging.view er.busines s.ImageFil terField; | |
22 | import gov .va.med.im aging.view er.busines s.ImageFil terFieldVa lue; | |
23 | import gov .va.med.im aging.view er.busines s.ImageFil terResult; | |
24 | import gov .va.med.im aging.view er.busines s.ImagePro perty; | |
25 | import gov .va.med.im aging.view er.busines s.LogAcces sImageUrn; | |
26 | import gov .va.med.im aging.view er.busines s.LogAcces sImageUrnR esult; | |
27 | import gov .va.med.im aging.view er.busines s.PrintRea sonsType; | |
28 | import gov .va.med.im aging.view er.busines s.QAReview ReportResu lt; | |
29 | import gov .va.med.im aging.view er.busines s.StatusRe asonsType; | |
30 | import gov .va.med.im aging.view er.busines s.Treating FacilityRe sult; | |
31 | import gov .va.med.im aging.view er.rest.ty pes.Captur eUserResul tType; | |
32 | import gov .va.med.im aging.view er.rest.ty pes.Captur eUserResul tsType; | |
33 | import gov .va.med.im aging.view er.rest.ty pes.Delete ImageUrnRe sultType; | |
34 | import gov .va.med.im aging.view er.rest.ty pes.Delete ImageUrnRe sultsType; | |
35 | import gov .va.med.im aging.view er.rest.ty pes.Delete ImageUrnTy pe; | |
36 | import gov .va.med.im aging.view er.rest.ty pes.Delete ImageUrnsT ype; | |
37 | import gov .va.med.im aging.view er.rest.ty pes.FlagSe nsitiveIma geUrnResul tType; | |
38 | import gov .va.med.im aging.view er.rest.ty pes.FlagSe nsitiveIma geUrnResul tsType; | |
39 | import gov .va.med.im aging.view er.rest.ty pes.FlagSe nsitiveIma geUrnType; | |
40 | import gov .va.med.im aging.view er.rest.ty pes.FlagSe nsitiveIma geUrnsType ; | |
41 | import gov .va.med.im aging.view er.rest.ty pes.ImageF ilterDetai lResultTyp e; | |
42 | import gov .va.med.im aging.view er.rest.ty pes.ImageF ilterResul tType; | |
43 | import gov .va.med.im aging.view er.rest.ty pes.ImageF ilterResul tsType; | |
44 | import gov .va.med.im aging.view er.rest.ty pes.ImageP ropertiesT ype; | |
45 | import gov .va.med.im aging.view er.rest.ty pes.ImageP ropertyTyp e; | |
46 | import gov .va.med.im aging.view er.rest.ty pes.LogAcc essImageUr nResultTyp e; | |
47 | import gov .va.med.im aging.view er.rest.ty pes.LogAcc essImageUr nResultsTy pe; | |
48 | import gov .va.med.im aging.view er.rest.ty pes.LogAcc essImageUr nType; | |
49 | import gov .va.med.im aging.view er.rest.ty pes.LogAcc essImageUr nsType; | |
50 | import gov .va.med.im aging.view er.rest.ty pes.QARevi ewReportRe sultType; | |
51 | import gov .va.med.im aging.view er.rest.ty pes.QARevi ewReportRe sultsType; | |
52 | import gov .va.med.im aging.view er.rest.ty pes.SetIma geProperti esResultsT ype; | |
53 | import gov .va.med.im aging.view er.rest.ty pes.Treati ngFacility ResultType ; | |
54 | import gov .va.med.im aging.view er.rest.ty pes.Treati ngFacility ResultsTyp e; | |
55 | import gov .va.med.im aging.view er.rest.ty pes.UserIn foType; | |
56 | import gov .va.med.im aging.view er.rest.ty pes.UserSe curityKeyT ype; | |
57 | import gov .va.med.im aging.view er.rest.ty pes.UserSe curityKeys Type; | |
58 | ||
59 | ||
60 | /** | |
61 | * @author DNS tjahjb | |
62 | * | |
63 | */ | |
64 | public cla ss ViewerI magingRest Translator | |
65 | { | |
66 | pr ivate fina l static L ogger logg er = LogMa nager.getL ogger(View erImagingC ontext.cla ss); | |
67 | ||
68 | pu blic stati c List<Del eteImageUr n> transla teImageUrn s(DeleteIm ageUrnsTyp e imageUrn s) | |
69 | { | |
70 | if(i mageUrns = = null) | |
71 | return null; | |
72 | ||
73 | Stri ng default Reason = i mageUrns.g etDefaultD eleteReaso n(); | |
74 | ||
75 | List <DeleteIma geUrn> res ult = new ArrayList< DeleteImag eUrn>(); | |
76 | ||
77 | for( DeleteImag eUrnType i tem : imag eUrns.getD eleteImage Urns()) | |
78 | { | |
79 | if ((i tem.getRea son() == n ull) || it em.getReas on().isEmp ty()) | |
80 | { | |
81 | if (defa ultReason != null) | |
82 | { | |
83 | item.setRe ason(defau ltReason); | |
84 | } | |
85 | } | |
86 | if ((i tem.getDel eteGroup() == null) || item.ge tDeleteGro up().isEmp ty()) | |
87 | { | |
88 | item.set DeleteGrou p("false") ; | |
89 | } | |
90 | result .add(trans lateDelete ImageUrn(i tem)); | |
91 | } | |
92 | retu rn result; | |
93 | } | |
94 | ||
95 | pr ivate stat ic DeleteI mageUrn tr anslateDel eteImageUr n( | |
96 | Delete ImageUrnTy pe item) { | |
97 | retu rn new Del eteImageUr n( | |
98 | item.get Value(), | |
99 | (item.ge tDeleteGro up().equal s("true") ? true : f alse), | |
100 | item.get Reason()); | |
101 | } | |
102 | ||
103 | pu blic stati c DeleteIm ageUrnResu ltsType tr anslateDel eteImageUr nResults(L ist<Delete ImageUrnRe sult> dele teImageUrn s) | |
104 | { | |
105 | if(d eleteImage Urns == nu ll) | |
106 | return null; | |
107 | ||
108 | Dele teImageUrn ResultType [] result = new Dele teImageUrn ResultType [deleteIma geUrns.siz e()]; | |
109 | for( int i = 0; i < delet eImageUrns .size(); i ++) | |
110 | { | |
111 | result [i] = tran slate(dele teImageUrn s.get(i)); | |
112 | } | |
113 | retu rn new Del eteImageUr nResultsTy pe(result) ; | |
114 | ||
115 | } | |
116 | ||
117 | pu blic stati c DeleteIm ageUrnResu ltType tra nslate(Del eteImageUr nResult de leteImageU rnResult) | |
118 | { | |
119 | retu rn new Del eteImageUr nResultTyp e( | |
120 | deleteIm ageUrnResu lt.getValu e(), | |
121 | deleteIm ageUrnResu lt.getResu lt().equal s("1")?"SU CCESS":"ER ROR", | |
122 | deleteIm ageUrnResu lt.getResu lt().equal s("1")?"": deleteImag eUrnResult .getMsg() | |
123 | ); | |
124 | } | |
125 | ||
126 | pu blic stati c DeleteRe asonsType translateD eleteReaso ns( | |
127 | List<I mageAccess Reason> ro uterResult ) { | |
128 | ||
129 | Stri ng[] delet eReasons = new Strin g[routerRe sult.size( )]; | |
130 | int idx = 0; | |
131 | for( ImageAcces sReason de lReason : routerResu lt) | |
132 | { | |
133 | delete Reasons[id x] = delRe ason.getDe scription( ); | |
134 | idx++; | |
135 | } | |
136 | ||
137 | retu rn new Del eteReasons Type(delet eReasons); | |
138 | } | |
139 | ||
140 | pu blic stati c PrintRea sonsType t ranslatePr intReasons ( | |
141 | List<I mageAccess Reason> ro uterResult ) | |
142 | { | |
143 | ||
144 | Stri ng[] print Reasons = new String [routerRes ult.size() ]; | |
145 | int idx = 0; | |
146 | for( ImageAcces sReason pr tReason : routerResu lt) | |
147 | { | |
148 | printR easons[idx ] = prtRea son.getDes cription() ; | |
149 | idx++; | |
150 | } | |
151 | ||
152 | retu rn new Pri ntReasonsT ype(printR easons); | |
153 | } | |
154 | ||
155 | pu blic stati c StatusRe asonsType translateS tatusReaso ns( | |
156 | List<I mageAccess Reason> ro uterResult ) | |
157 | { | |
158 | ||
159 | Stri ng[] statR easons = n ew String[ routerResu lt.size()] ; | |
160 | int idx = 0; | |
161 | for( ImageAcces sReason st atReason : routerRes ult) | |
162 | { | |
163 | statRe asons[idx] = statRea son.getDes cription() ; | |
164 | idx++; | |
165 | } | |
166 | ||
167 | retu rn new Sta tusReasons Type(statR easons); | |
168 | } | |
169 | ||
170 | pu blic stati c List<Fla gSensitive ImageUrn> translateI mageUrns(F lagSensiti veImageUrn sType imag eUrns) | |
171 | { | |
172 | if(i mageUrns = = null) | |
173 | return null; | |
174 | ||
175 | Stri ng default Sensitive = imageUrn s.getDefau ltSensitiv e(); | |
176 | ||
177 | List <FlagSensi tiveImageU rn> result = new Arr ayList<Fla gSensitive ImageUrn>( ); | |
178 | ||
179 | for( FlagSensit iveImageUr nType item : imageUr ns.getFlag SensitiveI mageUrns() ) | |
180 | { | |
181 | if ((i tem.getSen sitive() = = null) || item.getS ensitive() .isEmpty() ) | |
182 | { | |
183 | if (defa ultSensiti ve != null ) | |
184 | { | |
185 | item.setSe nsitive(de faultSensi tive); | |
186 | } | |
187 | } | |
188 | ||
189 | result .add(trans lateFlagSe nsitiveIma geUrn(item )); | |
190 | } | |
191 | retu rn result; | |
192 | } | |
193 | ||
194 | pr ivate stat ic FlagSen sitiveImag eUrn trans lateFlagSe nsitiveIma geUrn( | |
195 | FlagSe nsitiveIma geUrnType item) { | |
196 | retu rn new Fla gSensitive ImageUrn( | |
197 | item.get ImageUrn() , | |
198 | (item.ge tSensitive ().equals( "true") ? true : fal se)); | |
199 | } | |
200 | ||
201 | ||
202 | pu blic stati c FlagSens itiveImage UrnResults Type trans lateFlagSe nsitiveIma geUrnResul ts(List<Fl agSensitiv eImageUrnR esult> ima geUrns) | |
203 | { | |
204 | if(i mageUrns = = null) | |
205 | return null; | |
206 | ||
207 | Flag SensitiveI mageUrnRes ultType[] result = n ew FlagSen sitiveImag eUrnResult Type[image Urns.size( )]; | |
208 | for( int i = 0; i < image Urns.size( ); i++) | |
209 | { | |
210 | result [i] = tran slate(imag eUrns.get( i)); | |
211 | } | |
212 | retu rn new Fla gSensitive ImageUrnRe sultsType( result); | |
213 | } | |
214 | ||
215 | pu blic stati c FlagSens itiveImage UrnResultT ype transl ate(FlagSe nsitiveIma geUrnResul t imageUrn Result) | |
216 | { | |
217 | retu rn new Fla gSensitive ImageUrnRe sultType( | |
218 | imageUrn Result.get ImageUrn() , | |
219 | imageUrn Result.get Result().e quals("1") ?"SUCCESS" :"ERROR", | |
220 | imageUrn Result.get Result().e quals("1") ?"":imageU rnResult.g etMsg() | |
221 | ); | |
222 | } | |
223 | ||
224 | pu blic stati c UserInfo Type trans lateUserIn fo(List<St ring> rout erResult) | |
225 | { | |
226 | if(r outerResul t == null) | |
227 | return null; | |
228 | ||
229 | Stri ng[] secur ityKeys = new String [routerRes ult.size() -1]; | |
230 | for( int i = 0; i < route rResult.si ze()-1; i+ +) | |
231 | { | |
232 | logger .debug("ke y: " + rou terResult. get(i)); | |
233 | securi tyKeys[i] = routerRe sult.get(i ); | |
234 | } | |
235 | ||
236 | Stri ng userInf o = router Result.get (routerRes ult.size() - 1); | |
237 | logg er.debug(" userInfo: " + userIn fo); | |
238 | Stri ng[] user = userInfo .split("\\ ^"); | |
239 | Stri ng userNam e = user[0 ]; | |
240 | Stri ng userIni tials = us er[1]; | |
241 | ||
242 | retu rn new Use rInfoType( userName, userInitia ls, new Us erSecurity KeysType(s ecurityKey s)); | |
243 | } | |
244 | ||
245 | pu blic stati c List<Log AccessImag eUrn> tran slateImage Urns(LogAc cessImageU rnsType im ageUrns) | |
246 | { | |
247 | if(i mageUrns = = null) | |
248 | return null; | |
249 | ||
250 | Stri ng default AccessReas on = image Urns.getDe faultLogAc cessReason (); | |
251 | ||
252 | List <LogAccess ImageUrn> result = n ew ArrayLi st<LogAcce ssImageUrn >(); | |
253 | ||
254 | for( LogAccessI mageUrnTyp e item : i mageUrns.g etLogAcces sImageUrns ()) | |
255 | { | |
256 | if ((i tem.getRea son() == n ull) || it em.getReas on().isEmp ty()) | |
257 | { | |
258 | if (defa ultAccessR eason != n ull) | |
259 | { | |
260 | item.setRe ason(defau ltAccessRe ason); | |
261 | } | |
262 | } | |
263 | ||
264 | result .add(trans lateLogAcc essImageUr n(item)); | |
265 | } | |
266 | retu rn result; | |
267 | } | |
268 | ||
269 | pr ivate stat ic LogAcce ssImageUrn translate LogAccessI mageUrn( | |
270 | LogAcc essImageUr nType item ) { | |
271 | retu rn new Log AccessImag eUrn( | |
272 | item.get Value(), | |
273 | item.get Reason()); | |
274 | } | |
275 | ||
276 | pu blic stati c LogAcces sImageUrnR esultsType translate LogAccessI mageUrnRes ults( | |
277 | List<L ogAccessIm ageUrnResu lt> imageU rns) | |
278 | { | |
279 | if(i mageUrns = = null) | |
280 | return null; | |
281 | ||
282 | LogA ccessImage UrnResultT ype[] resu lt = new L ogAccessIm ageUrnResu ltType[ima geUrns.siz e()]; | |
283 | for( int i = 0; i < image Urns.size( ); i++) | |
284 | { | |
285 | result [i] = tran slate(imag eUrns.get( i)); | |
286 | } | |
287 | retu rn new Log AccessImag eUrnResult sType(resu lt); | |
288 | } | |
289 | ||
290 | pu blic stati c LogAcces sImageUrnR esultType translate( LogAccessI mageUrnRes ult imageU rnResult) | |
291 | { | |
292 | retu rn new Log AccessImag eUrnResult Type( | |
293 | imageUrn Result.get ImageUrn() , | |
294 | imageUrn Result.get Result().e quals("1") ?"SUCCESS" :"ERROR", | |
295 | imageUrn Result.get Result().e quals("1") ?"":imageU rnResult.g etMsg() | |
296 | ); | |
297 | } | |
298 | ||
299 | ||
300 | pu blic stati c Treating FacilityRe sultsType translateT reatingFac ilityResul ts( | |
301 | List<T reatingFac ilityResul t> treatin gFacilitie s) | |
302 | { | |
303 | if(t reatingFac ilities == null) | |
304 | return null; | |
305 | ||
306 | Trea tingFacili tyResultTy pe[] resul t = new Tr eatingFaci lityResult Type[treat ingFacilit ies.size() ]; | |
307 | for( int i = 0; i < treat ingFacilit ies.size() ; i++) | |
308 | { | |
309 | result [i] = tran slate(trea tingFacili ties.get(i )); | |
310 | } | |
311 | retu rn new Tre atingFacil ityResults Type(resul t); | |
312 | } | |
313 | ||
314 | pu blic stati c Treating FacilityRe sultType t ranslate(T reatingFac ilityResul t treating FacilityRe sult) | |
315 | { | |
316 | retu rn new Tre atingFacil ityResultT ype( | |
317 | treating FacilityRe sult.getIn stitutionI EN(), | |
318 | treating FacilityRe sult.getIn stitutionN ame(), | |
319 | treating FacilityRe sult.getCu rrentDateO nRecord(), | |
320 | treating FacilityRe sult.getFa cilityType () | |
321 | ); | |
322 | } | |
323 | ||
324 | ||
325 | pu blic stati c CaptureU serResults Type trans lateCaptur eUserResul ts( | |
326 | List<C aptureUser Result> ca ptureUsers ) | |
327 | { | |
328 | if(c aptureUser s == null) | |
329 | return null; | |
330 | ||
331 | Capt ureUserRes ultType[] result = n ew Capture UserResult Type[captu reUsers.si ze()]; | |
332 | for( int i = 0; i < captu reUsers.si ze(); i++) | |
333 | { | |
334 | result [i] = tran slate(capt ureUsers.g et(i)); | |
335 | } | |
336 | retu rn new Cap tureUserRe sultsType( result); | |
337 | } | |
338 | ||
339 | pu blic stati c CaptureU serResultT ype transl ate(Captur eUserResul t captureU serResult) | |
340 | { | |
341 | retu rn new Cap tureUserRe sultType( | |
342 | captureU serResult. getUserId( ), | |
343 | captureU serResult. getUserNam e() | |
344 | ); | |
345 | } | |
346 | ||
347 | pu blic stati c ImageFil terResults Type trans late(List< ImageFilte rResult> i mageFilter s) { | |
348 | if(i mageFilter s == null) | |
349 | return null; | |
350 | ||
351 | Imag eFilterRes ultType[] result = n ew ImageFi lterResult Type[image Filters.si ze()]; | |
352 | for( int i = 0; i < image Filters.si ze(); i++) | |
353 | { | |
354 | result [i] = tran slate(imag eFilters.g et(i)); | |
355 | } | |
356 | retu rn new Ima geFilterRe sultsType( result); | |
357 | } | |
358 | ||
359 | pr ivate stat ic ImageFi lterResult Type trans late(Image FilterResu lt imageFi lterResult ) { | |
360 | retu rn new Ima geFilterRe sultType( | |
361 | imageFil terResult. getFilterI EN(), | |
362 | imageFil terResult. getFilterN ame(), | |
363 | imageFil terResult. getUserId( ) | |
364 | ); | |
365 | } | |
366 | ||
367 | pu blic stati c ImageFil terDetailR esultType translateI mageFilter FieldValue s(List<Ima geFilterFi eldValue> imageFilte rFieldValu es) { | |
368 | if(i mageFilter FieldValue s == null) | |
369 | return null; | |
370 | ||
371 | Imag eFilterDet ailResultT ype result = new Ima geFilterDe tailResult Type(); | |
372 | ||
373 | for (ImageFilt erFieldVal ue imageFi lterFieldV alue : ima geFilterFi eldValues) | |
374 | { | |
375 | if (Im ageFilterF ield.CAPTU REDBY.getF ieldNumber ().equals( imageFilte rFieldValu e.getField Name())) | |
376 | { | |
377 | result.s etCaptured By(imageFi lterFieldV alue.getFi eldValue() ); | |
378 | } | |
379 | else i f (ImageFi lterField. CLASSINDEX .getFieldN umber().eq uals(image FilterFiel dValue.get FieldName( ))) | |
380 | { | |
381 | result.s etClassInd ex(imageFi lterFieldV alue.getFi eldValue() ); | |
382 | } | |
383 | else i f (ImageFi lterField. COLUMNWIDT HS.getFiel dNumber(). equals(ima geFilterFi eldValue.g etFieldNam e())) | |
384 | { | |
385 | result.s etColumnWi dths(image FilterFiel dValue.get FieldValue ()); | |
386 | } | |
387 | else i f (ImageFi lterField. DATEFROM.g etFieldNum ber().equa ls(imageFi lterFieldV alue.getFi eldName()) ) | |
388 | { | |
389 | result.s etDateFrom (imageFilt erFieldVal ue.getFiel dValue()); | |
390 | } | |
391 | else i f (ImageFi lterField. DATETHROUG H.getField Number().e quals(imag eFilterFie ldValue.ge tFieldName ())) | |
392 | { | |
393 | result.s etDateThro ugh(imageF ilterField Value.getF ieldValue( )); | |
394 | } | |
395 | else i f (ImageFi lterField. DAYRANGE.g etFieldNum ber().equa ls(imageFi lterFieldV alue.getFi eldName()) ) | |
396 | { | |
397 | result.s etDayRange (imageFilt erFieldVal ue.getFiel dValue()); | |
398 | } | |
399 | else i f (ImageFi lterField. DESCRIPTIO NCONTAINS. getFieldNu mber().equ als(imageF ilterField Value.getF ieldName() )) | |
400 | { | |
401 | result.s etDescript ionContain s(imageFil terFieldVa lue.getFie ldValue()) ; | |
402 | } | |
403 | else i f (ImageFi lterField. EVENTINDEX .getFieldN umber().eq uals(image FilterFiel dValue.get FieldName( ))) | |
404 | { | |
405 | result.s etEventInd ex(imageFi lterFieldV alue.getFi eldValue() ); | |
406 | } | |
407 | else i f (ImageFi lterField. FILTERIEN. getFieldNu mber().equ als(imageF ilterField Value.getF ieldName() )) | |
408 | { | |
409 | result.s etFilterIE N(imageFil terFieldVa lue.getFie ldValue()) ; | |
410 | } | |
411 | else i f (ImageFi lterField. FILTERNAME .getFieldN umber().eq uals(image FilterFiel dValue.get FieldName( ))) | |
412 | { | |
413 | result.s etFilterNa me(imageFi lterFieldV alue.getFi eldValue() ); | |
414 | } | |
415 | else i f (ImageFi lterField. IMAGESTATU S.getField Number().e quals(imag eFilterFie ldValue.ge tFieldName ())) | |
416 | { | |
417 | result.s etImageSta tus(imageF ilterField Value.getF ieldValue( )); | |
418 | } | |
419 | else i f (ImageFi lterField. ORIGIN.get FieldNumbe r().equals (imageFilt erFieldVal ue.getFiel dName())) | |
420 | { | |
421 | result.s etOrigin(i mageFilter FieldValue .getFieldV alue()); | |
422 | } | |
423 | else i f (ImageFi lterField. PACKAGEIND EX.getFiel dNumber(). equals(ima geFilterFi eldValue.g etFieldNam e())) | |
424 | { | |
425 | result.s etPackageI ndex(image FilterFiel dValue.get FieldValue ()); | |
426 | } | |
427 | else i f (ImageFi lterField. PERCENT.ge tFieldNumb er().equal s(imageFil terFieldVa lue.getFie ldName())) | |
428 | { | |
429 | result.s etPercent( imageFilte rFieldValu e.getField Value()); | |
430 | } | |
431 | else i f (ImageFi lterField. RELATIVERA NGE.getFie ldNumber() .equals(im ageFilterF ieldValue. getFieldNa me())) | |
432 | { | |
433 | result.s etRelative Range(imag eFilterFie ldValue.ge tFieldValu e()); | |
434 | } | |
435 | else i f (ImageFi lterField. SPECIALTIE SINDEX.get FieldNumbe r().equals (imageFilt erFieldVal ue.getFiel dName())) | |
436 | { | |
437 | result.s etSpecialt iesIndex(i mageFilter FieldValue .getFieldV alue()); | |
438 | } | |
439 | else i f (ImageFi lterField. TYPEINDEX. getFieldNu mber().equ als(imageF ilterField Value.getF ieldName() )) | |
440 | { | |
441 | result.s etTypeInde x(imageFil terFieldVa lue.getFie ldValue()) ; | |
442 | } | |
443 | else i f (ImageFi lterField. USECAPTURE DATES.getF ieldNumber ().equals( imageFilte rFieldValu e.getField Name())) | |
444 | { | |
445 | result.s etUseCaptu reDates(im ageFilterF ieldValue. getFieldVa lue()); | |
446 | } | |
447 | ||
448 | } | |
449 | retu rn result; | |
450 | } | |
451 | ||
452 | pu blic stati c QAReview ReportResu ltsType tr anslateQAR eviewRepor tResults(L ist<QARevi ewReportRe sult> qaRe viewReport s) | |
453 | { | |
454 | if(q aReviewRep orts == nu ll) | |
455 | return null; | |
456 | ||
457 | QARe viewReport ResultType [] result = new QARe viewReport ResultType [qaReviewR eports.siz e()]; | |
458 | for( int i = 0; i < qaRev iewReports .size(); i ++) | |
459 | { | |
460 | result [i] = tran slate(qaRe viewReport s.get(i)); | |
461 | } | |
462 | retu rn new QAR eviewRepor tResultsTy pe(result) ; | |
463 | } | |
464 | ||
465 | pu blic stati c QAReview ReportResu ltType tra nslate(QAR eviewRepor tResult qa ReviewRepo rt) | |
466 | { | |
467 | retu rn new QAR eviewRepor tResultTyp e( | |
468 | qaReview Report.get ReportFlag s(), | |
469 | qaReview Report.get FromDate() , | |
470 | qaReview Report.get ThroughDat e(), | |
471 | qaReview Report.get ReportStar tDateTime( ), | |
472 | qaReview Report.get ReportComp letedDateT ime() | |
473 | ); | |
474 | } | |
475 | ||
476 | pu blic stati c List<Ima geProperty > translat eImageProp erties(Ima geProperti esType ima geProperti es) | |
477 | { | |
478 | if(i mageProper ties == nu ll) | |
479 | return null; | |
480 | ||
481 | List <ImageProp erty> resu lt = new A rrayList<I mageProper ty>(); | |
482 | ||
483 | for( ImagePrope rtyType it em : image Properties .getImageP roperties( )) | |
484 | { | |
485 | result .add(trans lateImageP roperty(it em)); | |
486 | } | |
487 | retu rn result; | |
488 | } | |
489 | ||
490 | pr ivate stat ic ImagePr operty tra nslateImag eProperty( ImagePrope rtyType it em) | |
491 | { | |
492 | retu rn new Ima geProperty (item.getI en(), item .getFlags( ), item.ge tName(), i tem.getVal ue()); | |
493 | } | |
494 | ||
495 | pu blic stati c ImagePro pertiesTyp e translat eImageProp erties(Lis t<ImagePro perty> ima geProperti es) | |
496 | { | |
497 | if(i mageProper ties == nu ll) | |
498 | return null; | |
499 | ||
500 | Imag ePropertyT ype[] resu lt = new I mageProper tyType[ima geProperti es.size()] ; | |
501 | for( int i = 0; i < image Properties .size(); i ++) | |
502 | { | |
503 | result [i] = tran slate(imag ePropertie s.get(i)); | |
504 | } | |
505 | ||
506 | ||
507 | retu rn new Ima geProperti esType(res ult); | |
508 | } | |
509 | ||
510 | pr ivate stat ic ImagePr opertyType translate (ImageProp erty image Property) | |
511 | { | |
512 | retu rn new Ima geProperty Type(image Property.g etIen(), i mageProper ty.getFlag s(), image Property.g etName(), imagePrope rty.getVal ue()); | |
513 | } | |
514 | ||
515 | ||
516 | pu blic stati c SetImage Properties ResultsTyp e translat eSetImageP ropertiesR esults(Lis t<String> imagePrope rties) | |
517 | { | |
518 | if(i mageProper ties == nu ll) | |
519 | return null; | |
520 | ||
521 | Stri ng[] resul t = imageP roperties. toArray(ne w String[i mageProper ties.size( )]); | |
522 | retu rn new Set ImagePrope rtiesResul tsType(res ult); | |
523 | } | |
524 | ||
525 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.