Produced by Araxis Merge on 12/5/2017 12:06:40 PM Central Standard 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 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ExchangeSiteServiceSOAPServer\main\src\java\gov\va\med\imaging\exchange\siteservice\translator | ExchangeSiteServiceTranslator.java | Mon Dec 4 21:35:28 2017 UTC |
| 2 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ExchangeSiteServiceSOAPServer\main\src\java\gov\va\med\imaging\exchange\siteservice\translator | ExchangeSiteServiceTranslator.java | Mon Dec 4 22:00:15 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 322 |
| 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 | * | |
| 3 | Package: MAG - Vis tA Imaging | |
| 4 | WARNING: Per VHA D irective 2 004-038, t his routin e should n ot be modi fied. | |
| 5 | Date Cre ated: Aug 20, 2008 | |
| 6 | Site Nam e: Washin gton OI Fi eld Office , Silver S pring, MD | |
| 7 | Developer:
|
|
| 8 | Descript ion: | |
| 9 | ||
| 10 | ;; +-------- ---------- ---------- ---------- ---------- ---------- ---------- + | |
| 11 | ;; Property of the US Government . | |
| 12 | ;; No permis sion to co py or redi stribute t his softwa re is give n. | |
| 13 | ;; Use of un released v ersions of this soft ware requi res the us er | |
| 14 | ;; to execu te a writt en test ag reement wi th the Vis tA Imaging | |
| 15 | ;; Developm ent Office of the De partment o f Veterans Affairs, | |
| 16 | ;; telephon e (301) 73 4-0100. | |
| 17 | ;; | |
| 18 | ;; The Food and Drug A dministrat ion classi fies this software a s | |
| 19 | ;; a Class I I medical device. A s such, it may not b e changed | |
| 20 | ;; in any wa y. Modifi cations to this soft ware may r esult in a n | |
| 21 | ;; adulterat ed medical device un der 21CFR8 20, the us e of which | |
| 22 | ;; is consid ered to be a violati on of US F ederal Sta tutes. | |
| 23 | ;; +-------- ---------- ---------- ---------- ---------- ---------- ---------- + | |
| 24 | ||
| 25 | */ | |
| 26 | package go v.va.med.i maging.exc hange.site service.tr anslator; | |
| 27 | ||
| 28 | import gov .va.med.im aging.Stri ngUtil; | |
| 29 | import gov .va.med.im aging.exch ange.busin ess.Region ; | |
| 30 | import gov .va.med.im aging.exch ange.busin ess.Site; | |
| 31 | ||
| 32 | import jav a.util.Arr ayList; | |
| 33 | import jav a.util.Lis t; | |
| 34 | ||
| 35 | import org .apache.lo gging.log4 j.LogManag er; | |
| 36 | import org .apache.lo gging.log4 j.Logger; | |
| 37 | /** | |
| 38 | * Exchang e site ser vice trans lator | |
| 39 | * | |
| 40 | * @author
|
|
| 41 | * | |
| 42 | */ | |
| 43 | public cla ss Exchang eSiteServi ceTranslat or | |
| 44 | { | |
| 45 | pr ivate fina l static L ogger logg er = LogMa nager.getL ogger(Exch angeSiteSe rviceTrans lator.clas s); | |
| 46 | pr ivate fina l static S tring site NumberDeli miter = "^ "; | |
| 47 | ||
| 48 | /* * | |
| 49 | * Convert a site obje ct. This w ill always return an ImagingEx changeSite TO object which will | |
| 50 | * either co ntain the converted values or a FaultTO containing error inf ormation | |
| 51 | * @param si te | |
| 52 | * @param si teNumber | |
| 53 | * @return | |
| 54 | * / | |
| 55 | pu blic stati c gov.va.m ed.vistawe b.webservi ces.Imagin gExchangeS iteService .ImagingEx changeSite TO convert Site( | |
| 56 | Site site, | |
| 57 | Stri ng siteNum ber) | |
| 58 | { | |
| 59 | gov. va.med.vis taweb.webs ervices.Im agingExcha ngeSiteSer vice.Imagi ngExchange SiteTO sit eTo = | |
| 60 | new go v.va.med.v istaweb.we bservices. ImagingExc hangeSiteS ervice.Ima gingExchan geSiteTO() ; | |
| 61 | try | |
| 62 | { | |
| 63 | siteTo .setAccele ratorPort( site.getAc celeratorP ort()); | |
| 64 | siteTo .setAccele ratorServe r(site.get Accelerato rServer()) ; | |
| 65 | siteTo .setRegion ID(site.ge tRegionId( )); | |
| 66 | siteTo .setSiteAb br(site.ge tSiteAbbr( )); | |
| 67 | siteTo .setSiteNa me(site.ge tSiteName( )); | |
| 68 | siteTo .setSiteNu mber(site. getSiteNum ber()); | |
| 69 | siteTo .setVistaP ort(site.g etVistaPor t()); | |
| 70 | siteTo .setVistaS erver(site .getVistaS erver()); | |
| 71 | } | |
| 72 | catc h(Exceptio n ex) | |
| 73 | { | |
| 74 | logger .error(ex. getClass() .getName() + " Error translati ng site (" + siteNum ber + ")") ; | |
| 75 | siteTo .setSiteNu mber(siteN umber); | |
| 76 | siteTo .setFaultT O(createFa ult(ex, "I nvalid sit e code?")) ; | |
| 77 | } | |
| 78 | retu rn siteTo; | |
| 79 | } | |
| 80 | ||
| 81 | /* * | |
| 82 | * Convert a list of s ite object s. This wi ll always return an array of I magingExch angeSiteTO objects | |
| 83 | * which wil l contain ImagingExc hangeSiteT O objects containing either th e converte d site | |
| 84 | * or a Faul tTO contai ning error informati on | |
| 85 | * @param si tes | |
| 86 | * @return | |
| 87 | * / | |
| 88 | pu blic stati c gov.va.m ed.vistawe b.webservi ces.Imagin gExchangeS iteService .ImagingEx changeSite TO [] conv ertSites(L ist<Site> sites) | |
| 89 | { | |
| 90 | List <gov.va.me d.vistaweb .webservic es.Imaging ExchangeSi teService. ImagingExc hangeSiteT O> sitesTo = | |
| 91 | new Ar rayList<go v.va.med.v istaweb.we bservices. ImagingExc hangeSiteS ervice.Ima gingExchan geSiteTO>( ); | |
| 92 | for( Site site : sites) | |
| 93 | { | |
| 94 | sitesT o.add(conv ertSite(si te, "")); | |
| 95 | } | |
| 96 | retu rn sitesTo .toArray(n ew gov.va. med.vistaw eb.webserv ices.Imagi ngExchange SiteServic e.ImagingE xchangeSit eTO[sitesT o.size()]) ; | |
| 97 | } | |
| 98 | ||
| 99 | pu blic stati c gov.va.m ed.vistawe b.webservi ces.Imagin gExchangeS iteService .ImagingEx changeRegi onTO conve rtRegion(R egion regi on, String regionId) | |
| 100 | { | |
| 101 | gov. va.med.vis taweb.webs ervices.Im agingExcha ngeSiteSer vice.Imagi ngExchange RegionTO r esult = | |
| 102 | new go v.va.med.v istaweb.we bservices. ImagingExc hangeSiteS ervice.Ima gingExchan geRegionTO (); | |
| 103 | try | |
| 104 | { | |
| 105 | result .setID(reg ion.getReg ionNumber( )); | |
| 106 | result .setName(r egion.getR egionName( )); | |
| 107 | ||
| 108 | gov.va .med.vista web.webser vices.Imag ingExchang eSiteServi ce.Imaging ExchangeSi teTO [] si tes = conv ertSites(r egion.getS ites()); | |
| 109 | result .setSites( new gov.va .med.vista web.webser vices.Imag ingExchang eSiteServi ce.ArrayOf ImagingExc hangeSiteT O(sites)); | |
| 110 | } | |
| 111 | catc h(Exceptio n ex) | |
| 112 | { | |
| 113 | logger .error(ex. getClass() .getName() + " Error translati ng region (" + regio nId + ")") ; | |
| 114 | result .setID(reg ionId); | |
| 115 | result .setFaultT O(createFa ult(ex, "I nvalid VIS N number?" )); | |
| 116 | } | |
| 117 | retu rn result; | |
| 118 | } | |
| 119 | ||
| 120 | /* * | |
| 121 | * Create a fault base d on an ex ception | |
| 122 | * @param ex An except ion that o ccurred | |
| 123 | * @param su ggestion S uggestion for the ca use of the problem | |
| 124 | * @return | |
| 125 | * / | |
| 126 | pr ivate stat ic gov.va. med.vistaw eb.webserv ices.Imagi ngExchange SiteServic e.FaultTO createFaul t(Exceptio n ex, Stri ng suggest ion) | |
| 127 | { | |
| 128 | gov. va.med.vis taweb.webs ervices.Im agingExcha ngeSiteSer vice.Fault TO fault = | |
| 129 | new go v.va.med.v istaweb.we bservices. ImagingExc hangeSiteS ervice.Fau ltTO(ex.ge tClass().t oString(), ex.getMes sage(), ex .getStackT race().toS tring(), s uggestion) ; | |
| 130 | retu rn fault; | |
| 131 | } | |
| 132 | ||
| 133 | pu blic stati c gov.va.m ed.vistawe b.webservi ces.Imagin gExchangeS iteService .ArrayOfIm agingExcha ngeSiteTO convertReg ionsToSite s(List<Reg ion> regio ns) | |
| 134 | { | |
| 135 | List <gov.va.me d.vistaweb .webservic es.Imaging ExchangeSi teService. ImagingExc hangeSiteT O> sites = | |
| 136 | new Ar rayList<go v.va.med.v istaweb.we bservices. ImagingExc hangeSiteS ervice.Ima gingExchan geSiteTO>( ); | |
| 137 | ||
| 138 | for( Region reg ion : regi ons) | |
| 139 | { | |
| 140 | for(Si te site : region.get Sites()) | |
| 141 | { | |
| 142 | sites.ad d(convertS ite(site, "")); | |
| 143 | } | |
| 144 | } | |
| 145 | gov. va.med.vis taweb.webs ervices.Im agingExcha ngeSiteSer vice.Imagi ngExchange SiteTO [] sitesTo = | |
| 146 | sites. toArray(ne w gov.va.m ed.vistawe b.webservi ces.Imagin gExchangeS iteService .ImagingEx changeSite TO[sites.s ize()]); | |
| 147 | ||
| 148 | gov. va.med.vis taweb.webs ervices.Im agingExcha ngeSiteSer vice.Array OfImagingE xchangeSit eTO result = | |
| 149 | new go v.va.med.v istaweb.we bservices. ImagingExc hangeSiteS ervice.Arr ayOfImagin gExchangeS iteTO(site sTo); | |
| 150 | retu rn result; | |
| 151 | } | |
| 152 | ||
| 153 | /* * | |
| 154 | * Converted the delim ited strin g into an array of s ite number s | |
| 155 | * @param de limitedSit eNumbers | |
| 156 | * @return | |
| 157 | * / | |
| 158 | pu blic stati c String[] convertDe limitedStr ingsIntoSi teNumbers( String del imitedSite Numbers) | |
| 159 | { | |
| 160 | retu rn StringU til.split( delimitedS iteNumbers , siteNumb erDelimite r); | |
| 161 | } | |
| 162 | ||
| 163 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.