Produced by Araxis Merge on 10/18/2018 2:02:20 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 | VIX_SIV_v3_0_patch_201_build_8.zip\v3.0_patch_201_build_8\VISA\Java\ImagingExchangeBaseWebProxy\main\src\java\gov\va\med\imaging\proxy\ids | IDSServiceParser.java | Thu Oct 11 13:30:19 2018 UTC |
2 | VIX_SIV_v3_0_patch_201_build_8.zip\v3.0_patch_201_build_8\VISA\Java\ImagingExchangeBaseWebProxy\main\src\java\gov\va\med\imaging\proxy\ids | IDSServiceParser.java | Wed Oct 17 18:56:30 2018 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 3 | 298 |
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 29, 2008 | |
6 | Site Nam e: Washin gton OI Fi eld Office , Silver S pring, MD | |
7 | Developer: PI I
|
|
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.pro xy.ids; | |
27 | ||
28 | import jav a.io.IOExc eption; | |
29 | import jav a.io.Input Stream; | |
30 | import jav a.util.Sor tedSet; | |
31 | import jav a.util.Tre eSet; | |
32 | ||
33 | import org .apache.lo gging.log4 j.LogManag er; | |
34 | import org .apache.lo gging.log4 j.Logger; | |
35 | import org .xml.sax.A ttributes; | |
36 | import org .xml.sax.I nputSource ; | |
37 | import org .xml.sax.S AXExceptio n; | |
38 | import org .xml.sax.h elpers.Def aultHandle r; | |
39 | import org .xml.sax.h elpers.XML ReaderFact ory; | |
40 | import org .xml.sax.X MLReader; | |
41 | ||
42 | /** | |
43 | * @author PI I
|
|
44 | * | |
45 | */ | |
46 | public cla ss IDSServ iceParser | |
47 | extends De faultHandl er | |
48 | { | |
49 | // pr ivate fina l static S tring IDSS ERVICE_TAG _SERVICES = "service s"; | |
50 | pr ivate fina l static S tring IDSS ERVICE_TAG _SERVICE = "Service" ; | |
51 | pr ivate fina l static S tring IDSS ERVICE_TAG _APPLICATI ON_PATH = "Applicati onPath"; | |
52 | // pr ivate fina l static S tring IDSS ERVICE_TAG _METADATA_ PATH = "Me tadataPath "; | |
53 | // pr ivate fina l static S tring IDSS ERVICE_TAG _IMAGE_PAT H = "Image Path"; | |
54 | pr ivate fina l static S tring IDSS ERVICE_TAG _OPERATION _PATH = "O perationPa th"; | |
55 | pr ivate fina l static S tring IDSS ERVICE_TAG _OPERATION = "Operat ion"; | |
56 | ||
57 | pr ivate fina l static L ogger logg er = LogMa nager.getL ogger(IDSS ervicePars er.class); | |
58 | ||
59 | pr ivate Stri ng current Tag = ""; | |
60 | pr ivate Sort edSet<IDSS ervice> se rvices = n ull; | |
61 | pr ivate IDSS ervice cur rentServic e = null; | |
62 | pr ivate IDSO peration c urrentOper ation = nu ll; | |
63 | ||
64 | pu blic IDSSe rviceParse r() | |
65 | { | |
66 | supe r(); | |
67 | } | |
68 | ||
69 | pu blic Sorte dSet<IDSSe rvice> par se(InputSt ream input Stream) | |
70 | th rows IOExc eption | |
71 | { | |
72 | this .currentTa g = ""; | |
73 | serv ices = new TreeSet<I DSService> (); | |
74 | try | |
75 | { | |
76 | XMLRea der xr = X MLReaderFa ctory.crea teXMLReade r(); | |
77 | xr.set ContentHan dler(this) ; | |
78 | xr.set ErrorHandl er(this); | |
79 | ||
80 | xr.par se(new Inp utSource(i nputStream )); | |
81 | } | |
82 | catc h(SAXExcep tion saxX) | |
83 | { | |
84 | logger .error("Er ror parsin g IDS serv ice respon se", saxX) ; | |
85 | throw new IOExce ption(saxX ); | |
86 | } | |
87 | ||
88 | retu rn service s; | |
89 | } | |
90 | ||
91 | @O verride | |
92 | pu blic void characters (char[] ch , int star t, int len gth) | |
93 | throws SAXExcept ion { | |
94 | if(c urrentServ ice != nul l) | |
95 | { | |
96 | if(IDS SERVICE_TA G_APPLICAT ION_PATH.e qualsIgnor eCase(curr entTag)) | |
97 | { | |
98 | currentS ervice.set Applicatio nPath(new String(ch, start,len gth)); | |
99 | } | |
100 | else i f(IDSSERVI CE_TAG_OPE RATION_PAT H.equalsIg noreCase(c urrentTag) ) | |
101 | { | |
102 | currentO peration.s etOperatio nPath(new String(ch, start, le ngth)); | |
103 | } | |
104 | /* | |
105 | else i f(IDSSERVI CE_TAG_IMA GE_PATH.eq ualsIgnore Case(curre ntTag)) | |
106 | { | |
107 | currentS ervice.set ImagePath( new String (ch, start ,length)); | |
108 | } | |
109 | else i f(IDSSERVI CE_TAG_MET ADATA_PATH .equalsIgn oreCase(cu rrentTag)) | |
110 | { | |
111 | currentS ervice.set MetadataPa th(new Str ing(ch, st art,length )); | |
112 | } | |
113 | */ | |
114 | } | |
115 | //su per.charac ters(ch, s tart, leng th); | |
116 | } | |
117 | ||
118 | @O verride | |
119 | pu blic void endElement (String ur i, String localName, String na me) | |
120 | throws SAXExcept ion { | |
121 | curr entTag = " "; | |
122 | //su per.endEle ment(uri, localName, name); | |
123 | } | |
124 | ||
125 | @O verride | |
126 | pu blic void startEleme nt(String uri, Strin g localNam e, String name, | |
127 | Attrib utes attri butes) thr ows SAXExc eption | |
128 | { | |
129 | curr entTag = n ame; | |
130 | ||
131 | ||
132 | if(I DSSERVICE_ TAG_SERVIC E.equals(n ame)) | |
133 | { | |
134 | curren tService = new IDSSe rvice(); | |
135 | String version = attribute s.getValue ("version" ); | |
136 | curren tService.s etVersion( version); | |
137 | servic es.add(cur rentServic e); | |
138 | String type = at tributes.g etValue("t ype"); | |
139 | curren tService.s etApplicat ionType(ty pe); | |
140 | } | |
141 | else if(IDSSER VICE_TAG_O PERATION.e quals(name )) | |
142 | { | |
143 | String operation Type = att ributes.ge tValue("ty pe"); | |
144 | ||
145 | curren tOperation = new IDS Operation( operationT ype); | |
146 | curren tService.a ddOperatio n(currentO peration); | |
147 | } | |
148 | //su per.startE lement(uri , localNam e, name, a ttributes) ; | |
149 | } | |
150 | ||
151 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.