Produced by Araxis Merge on 7/10/2017 1:01:45 PM 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\IV-ehmp_cif\MIXCommon\main\src\java\gov\va\med\imaging\mix\webservices\rest\types\v1 | Instance.java | Thu Jun 29 17:22:01 2017 UTC |
| 2 | C:\AraxisMergeCompare\Pri_re\IV-ehmp_cif\MIXCommon\main\src\java\gov\va\med\imaging\mix\webservices\rest\types\v1 | Instance.java | Thu Jul 6 15:04:01 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 426 |
| Changed | 1 | 2 |
| 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 | */ | |
| 4 | package go v.va.med.i maging.mix .webservic es.rest.ty pes.v1; | |
| 5 | ||
| 6 | import gov .va.med.im aging.exch ange.busin ess.Compar ableUtil; | |
| 7 | //import g ov.va.med. imaging.ex change.enu ms.ObjectO rigin; | |
| 8 | //import g ov.va.med. imaging.ex change.enu ms.ObjectS tatus; | |
| 9 | ||
| 10 | ||
| 11 | ||
| 12 | import jav a.io.Seria lizable; | |
| 13 | import jav a.util.Dat e; | |
| 14 | ||
| 15 | import jav ax.xml.bin d.annotati on.XmlRoot Element; | |
| 16 | ||
| 17 | import org .apache.lo g4j.Logger ; | |
| 18 | ||
| 19 | /** | |
| 20 | * @author DNS TITTOC | |
| 21 | * | |
| 22 | * This In stance cla ss is for FHIR Imagi ngStudy mo del suppor t (referri ng to the equivalent DICOM Ins tance term ) | |
| 23 | * Cardina lity: Pati ent 1..* D iagnosticR eport 0..* ImagingSt udy 0..* S eries 0..* Instance | |
| 24 | */ | |
| 25 | @XmlRootEl ement (nam e="Instanc e") | |
| 26 | public cla ss Instanc e | |
| 27 | implements Serializa ble, Compa rable<Inst ance> | |
| 28 | { | |
| 29 | // pr ivate stat ic final l ong serial VersionUID = -402941 6178345334 605L; | |
| 30 | // pr ivate fina l static L ogger logg er = Logge r.getLogge r(Instance .class); | |
| 31 | ||
| 32 | protec ted Intege r number; // DICOM I nstance se quence num ber in Ser ies | |
| 33 | pr otected St ring uid; // R! DICOM SOP Instance U ID (for VA a '.' sep arated ima geURN carr ying site (Station) Number seg ment, imag e IEN, stu dy IEN and patient I CN!) | |
| 34 | protec ted String sopClass; // R! DICO M SOP clas s UID -- h ow to get it from VA legacy? - null? | |
| 35 | protec ted String type; // typ e of insta nce (image , ...) - u nused? | |
| 36 | protec ted String title; // Descrip tion of in stance - u nused | |
| 37 | protec ted String content; // attachm ent - cont ent of ins tance - un used! | |
| 38 | ||
| 39 | pu blic Insta nce() | |
| 40 | { | |
| 41 | uid = sopClass = type = title = co ntent = nu ll; | |
| 42 | numb er=null; | |
| 43 | } | |
| 44 | ||
| 45 | /* * | |
| 46 | * | |
| 47 | */ | |
| 48 | public Instance (Integer n umber, Str ing uid, S tring sopC lass, Stri ng type, S tring titl e, String content) | |
| 49 | { | |
| 50 | // In stance ins tance = ne w Instance (); | |
| 51 | ||
| 52 | th is.setNumb er(number) ; | |
| 53 | th is.setUid( uid); | |
| 54 | th is.setSopC lass(sopCl ass); | |
| 55 | th is.setType (type); | |
| 56 | th is.setTitl e(title); | |
| 57 | th is.setCont ent(conten t); | |
| 58 | ||
| 59 | // retu rn instanc e; | |
| 60 | } | |
| 61 | ||
| 62 | ||
| 63 | public Integer g etNumber() { | |
| 64 | retu rn number; | |
| 65 | } | |
| 66 | ||
| 67 | pu blic void setNumber( Integer nu mber) { | |
| 68 | this .number = number; | |
| 69 | } | |
| 70 | ||
| 71 | /** | |
| 72 | * @re turn the t itle | |
| 73 | */ | |
| 74 | public String ge tTitle() { | |
| 75 | re turn title ; | |
| 76 | } | |
| 77 | ||
| 78 | /** | |
| 79 | * @pa ram title the title (descripti on) to set | |
| 80 | */ | |
| 81 | public void setT itle(Strin g title) { | |
| 82 | th is.title = title; | |
| 83 | } | |
| 84 | ||
| 85 | /** | |
| 86 | * @re turn the S OP Class U ID | |
| 87 | */ | |
| 88 | public String ge tSopClass( ) { | |
| 89 | re turn sopCl ass; | |
| 90 | } | |
| 91 | ||
| 92 | /** | |
| 93 | * @pa ram sopCla ssUid the SOP Class UID to set | |
| 94 | */ | |
| 95 | public void setS opClass(St ring sopCl assUid) { | |
| 96 | th is.sopClas s = sopCla ssUid; | |
| 97 | } | |
| 98 | ||
| 99 | /** | |
| 100 | * @re turn the t ype | |
| 101 | */ | |
| 102 | public String ge tType() { | |
| 103 | re turn type; | |
| 104 | } | |
| 105 | ||
| 106 | /** | |
| 107 | * @pa ram type t he type of instance to set | |
| 108 | */ | |
| 109 | public void setT ype(String type) { | |
| 110 | th is.type = type; | |
| 111 | } | |
| 112 | ||
| 113 | ||
| 114 | /* * | |
| 115 | * @return t he uid | |
| 116 | * / | |
| 117 | pu blic Strin g getUid() { | |
| 118 | retu rn uid; | |
| 119 | } | |
| 120 | ||
| 121 | /* * | |
| 122 | * @param ui d the uid of the Ins tance to s et | |
| 123 | * / | |
| 124 | pu blic void setUid(Str ing uid) { | |
| 125 | this .uid = uid ; | |
| 126 | } | |
| 127 | ||
| 128 | public String ge tContent() { | |
| 129 | retu rn content ; | |
| 130 | } | |
| 131 | ||
| 132 | pu blic void setContent (String co ntent) { | |
| 133 | this .content = content; | |
| 134 | } | |
| 135 | ||
| 136 | ||
| 137 | @O verride | |
| 138 | pu blic Strin g toString () | |
| 139 | { | |
| 140 | Stri ng output = ""; | |
| 141 | outp ut += "Ins tance Prop erties:\n" ; | |
| 142 | outp ut += "uid : " + uid + "\n"; | |
| 143 | outp ut += "sop Class: " + sopClass + "\n"; | |
| 144 | outp ut += "typ e: " + typ e + "\n"; | |
| 145 | outp ut += "tit le: " + ti tle + "\n" ; | |
| 146 | outp ut += "con tent: " + content + "\n"; | |
| 147 | ||
| 148 | retu rn output; | |
| 149 | } | |
| 150 | ||
| 151 | /* * | |
| 152 | * @see java .lang.Obje ct#equals( java.lang. Object) | |
| 153 | * / | |
| 154 | @O verride | |
| 155 | pu blic boole an equals( Object arg 0) | |
| 156 | { | |
| 157 | if(a rg0 instan ceof Insta nce) | |
| 158 | { | |
| 159 | Instan ce that = (Instance) arg0; | |
| 160 | ||
| 161 | // if the intanc e uids are equal the n the rest better be equal, no netheless it is | |
| 162 | // com pared here to assure that .equ als and .c ompareTo a re strictl y compatib le | |
| 163 | if( this.uid != null & & this.uid .equals(th at.uid) && | |
| 164 | this.get Number() ! = null && (this.getN umber() == that.getN umber())) | |
| 165 | { | |
| 166 | return t rue; | |
| 167 | } | |
| 168 | } | |
| 169 | retu rn false; | |
| 170 | } | |
| 171 | ||
| 172 | /* * | |
| 173 | * The natur al sort or der of Ima ge instanc es is: | |
| 174 | * 1.) decre asing by p rocedure d ate | |
| 175 | * 2.) incre asing by s ite number | |
| 176 | * 3.) incre asing by s tudy IEN | |
| 177 | * 4.) incre asing by g roup IEN ( series) | |
| 178 | * 5.) incre asing by i mage IEN | |
| 179 | * | |
| 180 | * @see java .lang.Comp arable#com pareTo(jav a.lang.Obj ect) | |
| 181 | * / | |
| 182 | @O verride | |
| 183 | pu blic int c ompareTo(I nstance th at) | |
| 184 | { | |
| 185 | int cumulative Compare = 0; | |
| 186 | ||
| 187 | cumu lativeComp are = Comp arableUtil .compare(t his.uid, t hat.uid, f alse); | |
| 188 | if(c umulativeC ompare != 0) | |
| 189 | return cumulativ eCompare; | |
| 190 | ||
| 191 | cumu lativeComp are = this .getNumber () - that. getNumber( ); | |
| 192 | if(c umulativeC ompare != 0) | |
| 193 | return cumulativ eCompare; | |
| 194 | ||
| 195 | cumu lativeComp are = Comp arableUtil .compare(t his.getSop Class(), t hat.getSop Class(), t rue); | |
| 196 | if(c umulativeC ompare != 0) | |
| 197 | return cumulativ eCompare; | |
| 198 | ||
| 199 | cumu lativeComp are = Comp arableUtil .compare(t his.getTyp e(), that. getType(), true); | |
| 200 | if(c umulativeC ompare != 0) | |
| 201 | return cumulativ eCompare; | |
| 202 | ||
| 203 | cumu lativeComp are = Comp arableUtil .compare(t his.getTit le(), that .getTitle( ), true); | |
| 204 | if(c umulativeC ompare != 0) | |
| 205 | return cumulativ eCompare; | |
| 206 | ||
| 207 | cumu lativeComp are = Comp arableUtil .compare(t his.getCon tent(), th at.getCont ent(), tru e); | |
| 208 | if(c umulativeC ompare != 0) | |
| 209 | return cumulativ eCompare; | |
| 210 | ||
| 211 | retu rn 0; | |
| 212 | } | |
| 213 | ||
| 214 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.