Produced by Araxis Merge on 12/5/2017 12:06:44 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\ImagingDicomDCFSCU\src\java\gov\va\med\imaging\dicom\dcftoolkit\scu\storagescu\impl | SpecializedStoreSCU.java | Mon Dec 4 21:35:32 2017 UTC |
| 2 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ImagingDicomDCFSCU\src\java\gov\va\med\imaging\dicom\dcftoolkit\scu\storagescu\impl | SpecializedStoreSCU.java | Mon Dec 4 22:02:39 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 392 |
| 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: Oct 4, 2012 | |
| 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.dic om.dcftool kit.scu.st oragescu.i mpl; | |
| 27 | ||
| 28 | ||
| 29 | import gov .va.med.im aging.dico m.dcftoolk it.common. exceptions .DicomAsso ciationAbo rtExceptio n; | |
| 30 | ||
| 31 | import org .apache.lo gging.log4 j.LogManag er; | |
| 32 | import org .apache.lo gging.log4 j.Logger; | |
| 33 | ||
| 34 | import com .lbs.DCS.A cceptedPre sentationC ontext; | |
| 35 | import com .lbs.DCS.A ssociation Info; | |
| 36 | import com .lbs.DCS.C INFO; | |
| 37 | import com .lbs.DCS.D CM; | |
| 38 | import com .lbs.DCS.D CSExceptio n; | |
| 39 | import com .lbs.DCS.D icomDataSe t; | |
| 40 | import com .lbs.DCS.D icomSessio nSettings; | |
| 41 | import com .lbs.DCS.D imseMessag e; | |
| 42 | import com .lbs.DCS.I OException ; | |
| 43 | import com .lbs.DCS.I OReadExcep tion; | |
| 44 | import com .lbs.DCS.I OTimeoutEx ception; | |
| 45 | import com .lbs.DCS.I OWriteExce ption; | |
| 46 | import com .lbs.DCS.N oDataExcep tion; | |
| 47 | import com .lbs.DSS.S toreSCU; | |
| 48 | ||
| 49 | /** | |
| 50 | * @author
|
|
| 51 | * | |
| 52 | */ | |
| 53 | public cla ss Special izedStoreS CU extends StoreSCU { | |
| 54 | ||
| 55 | pr ivate Dims eMessage l ast_reques t_message; | |
| 56 | ||
| 57 | privat e static L ogger logg er = LogMa nager.getL ogger (Spe cializedSt oreSCU.cla ss); | |
| 58 | ||
| 59 | ||
| 60 | /* * | |
| 61 | * Construct or | |
| 62 | * | |
| 63 | * @param ai nfo | |
| 64 | * @throws D CSExceptio n | |
| 65 | * / | |
| 66 | pu blic Speci alizedStor eSCU(Assoc iationInfo ainfo) th rows DCSEx ception { | |
| 67 | supe r(ainfo); | |
| 68 | this .last_requ est_messag e = null; | |
| 69 | ||
| 70 | } | |
| 71 | ||
| 72 | /* * | |
| 73 | * Construct or | |
| 74 | * | |
| 75 | * @param ai nfo | |
| 76 | * @param se ssion_sett ings | |
| 77 | * @throws D CSExceptio n | |
| 78 | * / | |
| 79 | pu blic Speci alizedStor eSCU(Assoc iationInfo ainfo, | |
| 80 | DicomS essionSett ings sessi on_setting s) throws DCSExcepti on { | |
| 81 | supe r(ainfo, s ession_set tings); | |
| 82 | this .last_requ est_messag e = null; | |
| 83 | ||
| 84 | } | |
| 85 | ||
| 86 | /* * | |
| 87 | * Send the object to the SCU. Created th is extra m ethod to c ontrol the Presentat ion Contex t | |
| 88 | * that will be used. | |
| 89 | * | |
| 90 | * @param ds represent s the DICO M Dataset. | |
| 91 | * @param ct x represen ts the Pre sentation Context fo r sending the object . | |
| 92 | * @param se nd_timeout _seconds r epresents the sendin g timeout. | |
| 93 | * @param re ceive_time out_second s represen ts the rec eiving tim eout. | |
| 94 | * @return t he returne d DIMSE me ssage. | |
| 95 | * @throws I OWriteExce ption | |
| 96 | * @throws D CSExceptio n | |
| 97 | * / | |
| 98 | pu blic Dimse Message cS tore(Dicom DataSet ds , Accepted Presentati onContext ctx, | |
| 99 | int se nd_timeout _seconds, int receiv e_timeout_ seconds) | |
| 100 | throws IOTimeout Exception, IOReadExc eption, IO WriteExcep tion, IOEx ception, N oDataExcep tion, DCSE xception{ | |
| 101 | Stri ng newline = System. getPropert y( "line.s eparator" ); | |
| 102 | if( CINFO.test DebugFlags ( CINFO.df _SHOW_GENE RAL_FLOW ) ) | |
| 103 | { | |
| 104 | logger .debug( "S toreSCU.cS tore" | |
| 105 | + newlin e | |
| 106 | + ds.toS tring() | |
| 107 | + newlin e | |
| 108 | + "send_ timeout_se conds = " + send_tim eout_secon ds | |
| 109 | + newlin e | |
| 110 | + "recei ve_timeout _seconds = " + recei ve_timeout _seconds ) ; | |
| 111 | } | |
| 112 | ||
| 113 | if ( !getConnec ted()) | |
| 114 | { | |
| 115 | throw new DCSExc eption( "i nvalid sta te: not co nnected" ) ; | |
| 116 | } | |
| 117 | ||
| 118 | Dims eMessage m sg = new D imseMessag e(); | |
| 119 | ||
| 120 | Stri ng sop_cla ss_uid = ds.getEl ementStrin gValue( DC M.E_SOPCLA SS_UID ); | |
| 121 | Stri ng sop_ins tance_uid = ds.getEl ementStrin gValue( DC M.E_SOPINS TANCE_UID ); | |
| 122 | ||
| 123 | msg. commandFie ld( DimseM essage.C_S TORE_RQ ); | |
| 124 | msg. affectedSo pclassUid( sop_class _uid ); | |
| 125 | msg. affectedSo pinstanceU id( sop_in stance_uid ); | |
| 126 | msg. dataSetTyp e( 0x0100 ); | |
| 127 | msg. priority( 0 ); | |
| 128 | msg. context_id (ctx.getId ()); | |
| 129 | ||
| 130 | msg. data( ds ) ; | |
| 131 | ||
| 132 | this .last_requ est_messag e = msg; | |
| 133 | try | |
| 134 | { | |
| 135 | sendDi mseMessage ( msg, sen d_timeout_ seconds ); | |
| 136 | } | |
| 137 | ca tch(IORead Exception iorX){ | |
| 138 | this.set Connected( false); | |
| 139 | throw io rX; | |
| 140 | } | |
| 141 | ca tch(IOWrit eException iowX){ | |
| 142 | this.set Connected( false); | |
| 143 | throw io wX; | |
| 144 | } | |
| 145 | ca tch(IOTime outExcepti on iotoX){ | |
| 146 | this.set Connected( false); | |
| 147 | throw io toX; | |
| 148 | } | |
| 149 | ca tch(IOExce ption ioX) { | |
| 150 | this.set Connected( false); | |
| 151 | throw io X; | |
| 152 | } | |
| 153 | ca tch(DCSExc eption dcs ){ | |
| 154 | this.set Connected( false); | |
| 155 | throw dc s; | |
| 156 | } | |
| 157 | ||
| 158 | ||
| 159 | // r ead respon se..... | |
| 160 | Dims eMessage r sp = null; | |
| 161 | try{ | |
| 162 | rsp = receiveDim seMessage( (short)ct x.getId(), receive_t imeout_sec onds ); | |
| 163 | } | |
| 164 | ca tch(IORead Exception iorX){ | |
| 165 | this.set Connected( false); | |
| 166 | throw io rX; | |
| 167 | } | |
| 168 | ca tch(IOTime outExcepti on iotoX){ | |
| 169 | this.set Connected( false); | |
| 170 | throw io toX; | |
| 171 | } | |
| 172 | ca tch(IOExce ption ioX) { | |
| 173 | this.set Connected( false); | |
| 174 | throw io X; | |
| 175 | } | |
| 176 | ca tch(DCSExc eption dcs ){ | |
| 177 | this.set Connected( false); | |
| 178 | throw dc s; | |
| 179 | } | |
| 180 | ||
| 181 | if( CINFO.test DebugFlags ( CINFO.df _SHOW_GENE RAL_FLOW ) ) | |
| 182 | { | |
| 183 | logger .debug( "r eceived re sponse mes sage: " + newline + rsp.toStri ng() ); | |
| 184 | } | |
| 185 | ||
| 186 | retu rn rsp; | |
| 187 | } | |
| 188 | ||
| 189 | ||
| 190 | ||
| 191 | /* (non-Java doc) | |
| 192 | * @see com. lbs.DSS.St oreSCU#get LastReques tMessage() | |
| 193 | * / | |
| 194 | @O verride | |
| 195 | pu blic Dimse Message ge tLastReque stMessage( ) { | |
| 196 | retu rn this.la st_request _message; | |
| 197 | } | |
| 198 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.