Produced by Araxis Merge on 12/21/2017 6:15:14 PM Eastern 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 | Genisis_2.0_v7_bld7.zip\TS\Service\term-service\src\main\java\gov\va\genisis2\ts\utils | TSJsonDeserializer.java | Thu Dec 14 19:57:15 2017 UTC |
| 2 | Genisis_2.0_v7_bld7.zip\TS\Service\term-service\src\main\java\gov\va\genisis2\ts\utils | TSJsonDeserializer.java | Thu Dec 21 22:13:14 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 96 |
| 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.genis is2.ts.uti ls; | |
| 5 | ||
| 6 | import jav a.io.IOExc eption; | |
| 7 | ||
| 8 | import com .fasterxml .jackson.c ore.JsonPa rseExcepti on; | |
| 9 | import com .fasterxml .jackson.d atabind.Js onMappingE xception; | |
| 10 | import com .fasterxml .jackson.d atabind.Ob jectMapper ; | |
| 11 | ||
| 12 | import gov .va.genisi s2.ts.dto. SolrDTO; | |
| 13 | ||
| 14 | /** | |
| 15 | * @author P II | |
| 16 | * | |
| 17 | */ | |
| 18 | public cla ss TSJsonD eserialize r { | |
| 19 | ||
| 20 | /* * | |
| 21 | * @param ar gs | |
| 22 | * / | |
| 23 | pu blic stati c void mai n(String[] args) { | |
| 24 | Obje ctMapper m apper = ne w ObjectMa pper(); | |
| 25 | ||
| 26 | //St ring jsonI nString = "{\"name\" :\"concept namestring \",\"uri\" :\"sameuri asidentifi edinGETreq uest\",\"d escription \":{\"defi nition\":\ "definitio nstring\", \"altDefin itions\":[ {\"altDefi nition\":\ "alternate definition string\"}] ,\"synonym s\":[\"syn onym1\",\" synonym2\" ]},\"relat ionships\" :{\"superC lasses\":[ {\"name\": \"supertyp estring\", \"uri\":\" supertypeu ri\"}],\"s ubClasses\ ":[{\"name \":\"subty pe1string\ ",\"uri\": \"subtype1 uri\"},{\" name\":\"s ubtype2str ing\",\"ur i\":\"subt yp2euri\"} ]}}"; | |
| 27 | Stri ng jsonInS tring = "{ \"response Header\":{ \"status\" :0,\"QTime \":1,\"par ams\":{\"q \":\"(Labe l:*diabete s*)\",\"fl \":\"id,La bel,Defini tion\",\"j son\":\"\" ,\"wt\":\" json\"}},\ "response\ ":{\"numFo und\":1023 ,\"start\" :0,\"docs\ ":[{\"id\" :\"http:// ncicb.nci. nih.gov/xm l/owl/EVS/ Thesaurus. owl#C12268 5\",\"Labe l\":\"Pred iabetes\", \"Definiti on\":\" A condition in which b lood gluco se levels are high, but not hi gh enough to be clas sified as type 2 dia betes.\"}, {\"id\":\" http://pur l.bioontol ogy.org/on tology/HOM -ICD9CM/MM _CLASS_118 95\",\"Lab el\":\"Nep hrogenic d iabetes in sipidus (5 88.1)\",\" Definition \":\" \"}, {\"id\":\" http://pur l.bioontol ogy.org/on tology/HOM -ICD9CM/MM _CLASS_168 48\",\"Lab el\":\"Neo natal diab etes melli tus (775.1 )\",\"Defi nition\":\ " \"},{\"i d\":\"http ://purl.bi oontology. org/ontolo gy/HOM-ICD 9CM/MM_CLA SS_19506\" ,\"Label\" :\"Family history of diabetes mellitus ( V18.0)\",\ "Definitio n\":\" \"} ,{\"id\":\ "http://pu rl.bioonto logy.org/o ntology/HO M-ICD9CM/M M_CLASS_20 332\",\"La bel\":\"Sc reening fo r diabetes mellitus (V77.1)\", \"Definiti on\":\" \" },{\"id\": \"http://p url.bioont ology.org/ ontology/H OM-ICD9CM/ MM_CLASS_7 494\",\"La bel\":\"Se condary di abetes mel litus (249 )\",\"Defi nition\":\ " \"},{\"i d\":\"http ://purl.bi oontology. org/ontolo gy/HOM-ICD 9CM/MM_CLA SS_7495\", \"Label\": \"Secondar y diabetes mellitus, without m ention of complicati on (249.0) \",\"Defin ition\":\" \"},{\"id \":\"http: //purl.bio ontology.o rg/ontolog y/HOM-ICD9 CM/MM_CLAS S_7496\",\ "Label\":\ "Secondary diabetes mellitus, not stated as uncont rolled, or unspecifi ed (249.00 )\",\"Defi nition\":\ " \"},{\"i d\":\"http ://purl.bi oontology. org/ontolo gy/HOM-ICD 9CM/MM_CLA SS_7497\", \"Label\": \"Secondar y diabetes mellitus, uncontrol led (249.0 1)\",\"Def inition\": \" \"},{\" id\":\"htt p://purl.b ioontology .org/ontol ogy/HOM-IC D9CM/MM_CL ASS_7498\" ,\"Label\" :\"Seconda ry diabete s mellitus with keto acidosis ( 249.1)\",\ "Definitio n\":\" \"} ]}}"; | |
| 28 | ||
| 29 | // J SON from S tring to O bject | |
| 30 | try { | |
| 31 | //Conc eptCardDTO obj = map per.readVa lue(jsonIn String, Co nceptCardD TO.class); | |
| 32 | SolrDT O obj = ma pper.readV alue(jsonI nString, S olrDTO.cla ss); | |
| 33 | System .out.print ln(obj.get Response() ); | |
| 34 | //Syst em.out.pri ntln(obj.g etName()); | |
| 35 | //Syst em.out.pri ntln(obj.g etDescript ion().getD efinition( )); | |
| 36 | } ca tch (JsonP arseExcept ion e) { | |
| 37 | // TOD O Auto-gen erated cat ch block | |
| 38 | e.prin tStackTrac e(); | |
| 39 | } ca tch (JsonM appingExce ption e) { | |
| 40 | // TOD O Auto-gen erated cat ch block | |
| 41 | e.prin tStackTrac e(); | |
| 42 | } ca tch (IOExc eption e) { | |
| 43 | // TOD O Auto-gen erated cat ch block | |
| 44 | e.prin tStackTrac e(); | |
| 45 | } | |
| 46 | ||
| 47 | } | |
| 48 | ||
| 49 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.