Produced by Araxis Merge on 12/5/2017 12:06:38 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\CoreValueObjects\main\src\java\gov\va\med\imaging\exchange\business | ImageStreamResponse.java | Mon Dec 4 21:35:00 2017 UTC |
| 2 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\CoreValueObjects\main\src\java\gov\va\med\imaging\exchange\business | ImageStreamResponse.java | Mon Dec 4 21:58:47 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 400 |
| 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: Feb 1, 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.busi ness; | |
| 27 | ||
| 28 | import gov .va.med.Me diaType; | |
| 29 | import gov .va.med.im aging.exch ange.enums .ImageForm at; | |
| 30 | import gov .va.med.im aging.exch ange.enums .ImageQual ity; | |
| 31 | import gov .va.med.im aging.exch ange.stora ge.DataSou rceImageIn putStream; | |
| 32 | import gov .va.med.im aging.exch ange.stora ge.DataSou rceInputSt ream; | |
| 33 | import gov .va.med.im aging.exch ange.stora ge.excepti ons.Cannot CalculateC hecksumExc eption; | |
| 34 | ||
| 35 | /** | |
| 36 | * Represe nts the re sponse fro m streamin g an image . Contains the input stream an d the | |
| 37 | * checksu m for the image (if provided) | |
| 38 | * | |
| 39 | * @author
|
|
| 40 | * | |
| 41 | */ | |
| 42 | public cla ss ImageSt reamRespon se | |
| 43 | { | |
| 44 | pr otected fi nal DataSo urceImageI nputStream imageStre am; | |
| 45 | pr otected Da taSourceIn putStream txtStream = null; | |
| 46 | pr ivate Imag eQuality i mageQualit y; | |
| 47 | pr ivate Medi aType medi aType; | |
| 48 | pr ivate Stri ng filePat h; | |
| 49 | pr ivate Stri ng storage Username; | |
| 50 | pr ivate Stri ng storage Password; | |
| 51 | pr ivate Stri ng storage SiteNumber ; | |
| 52 | ||
| 53 | /* * | |
| 54 | * Create th e ImageStr eamRespons e with a k nown image stream | |
| 55 | * @param im ageStream | |
| 56 | * / | |
| 57 | pu blic Image StreamResp onse(DataS ourceImage InputStrea m imageStr eam) | |
| 58 | { | |
| 59 | this (imageStre am, null); | |
| 60 | } | |
| 61 | ||
| 62 | pu blic Image StreamResp onse(DataS ourceImage InputStrea m imageStr eam, Image Quality im ageQuality ) | |
| 63 | { | |
| 64 | this (imageStre am, null, imageQuali ty); | |
| 65 | } | |
| 66 | ||
| 67 | pu blic Image StreamResp onse(DataS ourceImage InputStrea m imageStr eam, | |
| 68 | DataSo urceInputS tream txtS tream, Ima geQuality imageQuali ty) | |
| 69 | { | |
| 70 | this .imageStre am = image Stream; | |
| 71 | this .imageQual ity = imag eQuality; | |
| 72 | this .txtStream = txtStre am; | |
| 73 | } | |
| 74 | ||
| 75 | pu blic DataS ourceImage InputStrea m getImage Stream() | |
| 76 | { | |
| 77 | retu rn imageSt ream; | |
| 78 | } | |
| 79 | ||
| 80 | pu blic DataS ourceInput Stream get TxtStream( ) | |
| 81 | { | |
| 82 | retu rn txtStre am; | |
| 83 | } | |
| 84 | ||
| 85 | pu blic void setTxtStre am(DataSou rceInputSt ream txtSt ream) | |
| 86 | { | |
| 87 | this .txtStream = txtStre am; | |
| 88 | } | |
| 89 | ||
| 90 | /* * | |
| 91 | * Convenien ce method for calcul ating the text file checksum, if there i s an error then null is return ed | |
| 92 | * @return | |
| 93 | * / | |
| 94 | pu blic Strin g getTxtCh ecksum() | |
| 95 | { | |
| 96 | try | |
| 97 | { | |
| 98 | return txtStream == null | | txtStrea m.getCalcu latedCheck sum() == n ull ? | |
| 99 | null :tx tStream.ge tCalculate dChecksum( ).toString (); | |
| 100 | } | |
| 101 | catc h(CannotCa lculateChe cksumExcep tion cccX) | |
| 102 | { | |
| 103 | return null; | |
| 104 | } | |
| 105 | } | |
| 106 | ||
| 107 | /* * | |
| 108 | * Convenien ce method for gettin g the prov ided image checksum. If none was provid ed null is returned. | |
| 109 | * @return | |
| 110 | * / | |
| 111 | pu blic Strin g getProvi dedImageCh ecksum() | |
| 112 | { | |
| 113 | if(i mageStream != null) | |
| 114 | { | |
| 115 | if(ima geStream.i sChecksumP rovided()) | |
| 116 | return i mageStream .getProvid edChecksum ().toStrin g(); | |
| 117 | } | |
| 118 | retu rn null; | |
| 119 | } | |
| 120 | ||
| 121 | /* * | |
| 122 | * Convenien ce method to get the image for mat of the image. I f the imag e stream i s null, nu ll is retu rned | |
| 123 | * @return t he imageFo rmat | |
| 124 | * / | |
| 125 | pu blic Image Format get ImageForma t() | |
| 126 | { | |
| 127 | if(i mageStream != null) | |
| 128 | return imageStre am.getImag eFormat(); | |
| 129 | retu rn null; | |
| 130 | } | |
| 131 | ||
| 132 | /* * | |
| 133 | * Convenien ce method to get the size of t he image. If the im age stream is null, 0 is retur ned. | |
| 134 | * @return | |
| 135 | * / | |
| 136 | pu blic int g etImageSiz e() | |
| 137 | { | |
| 138 | if(i mageStream != null) | |
| 139 | return imageStre am.getSize (); | |
| 140 | retu rn 0; | |
| 141 | } | |
| 142 | ||
| 143 | pu blic Image Quality ge tImageQual ity() { | |
| 144 | retu rn imageQu ality; | |
| 145 | } | |
| 146 | ||
| 147 | pu blic void setImageQu ality(Imag eQuality i mageQualit y) { | |
| 148 | this .imageQual ity = imag eQuality; | |
| 149 | } | |
| 150 | ||
| 151 | /* * | |
| 152 | * @return t he mediaTy pe | |
| 153 | * / | |
| 154 | pu blic Media Type getMe diaType() | |
| 155 | { | |
| 156 | retu rn this.me diaType; | |
| 157 | } | |
| 158 | ||
| 159 | /* * | |
| 160 | * @param me diaType th e mediaTyp e to set | |
| 161 | * / | |
| 162 | pu blic void setMediaTy pe(String mediaType) | |
| 163 | { | |
| 164 | this .mediaType = MediaTy pe.lookup( mediaType) ; | |
| 165 | } | |
| 166 | pu blic void setMediaTy pe(MediaTy pe mediaTy pe) | |
| 167 | { | |
| 168 | this .mediaType = mediaTy pe; | |
| 169 | } | |
| 170 | ||
| 171 | pu blic Strin g getFileP ath() { | |
| 172 | retu rn filePat h; | |
| 173 | } | |
| 174 | ||
| 175 | pu blic void setFilePat h(String f ilePath) { | |
| 176 | this .filePath = filePath ; | |
| 177 | } | |
| 178 | ||
| 179 | pu blic Strin g getStora geUsername () { | |
| 180 | retu rn storage Username; | |
| 181 | } | |
| 182 | ||
| 183 | pu blic void setStorage Username(S tring stor ageUsernam e) { | |
| 184 | this .storageUs ername = s torageUser name; | |
| 185 | } | |
| 186 | ||
| 187 | pu blic Strin g getStora gePassword () { | |
| 188 | retu rn storage Password; | |
| 189 | } | |
| 190 | ||
| 191 | pu blic void setStorage Password(S tring stor agePasswor d) { | |
| 192 | this .storagePa ssword = s toragePass word; | |
| 193 | } | |
| 194 | ||
| 195 | pu blic Strin g getStora geSiteNumb er() { | |
| 196 | retu rn storage SiteNumber ; | |
| 197 | } | |
| 198 | ||
| 199 | pu blic void setStorage SiteNumber (String st orageSiteN umber) { | |
| 200 | this .storageSi teNumber = storageSi teNumber; | |
| 201 | } | |
| 202 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.