Produced by Araxis Merge on 12/20/2017 5:56:05 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_v6_bld6.zip\Source Code\TS\Service\term-service\src\main\java\gov\va\genisis2\ts\service\impl | MappingService.java | Thu Dec 14 19:57:19 2017 UTC |
| 2 | Genisis_2.0_v6_bld6.zip\Source Code\TS\Service\term-service\src\main\java\gov\va\genisis2\ts\service\impl | MappingService.java | Wed Dec 20 20:37:13 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 122 |
| 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 | package go v.va.genis is2.ts.ser vice.impl; | |
| 2 | ||
| 3 | import jav a.util.Lis t; | |
| 4 | ||
| 5 | import jav ax.annotat ion.Resour ce; | |
| 6 | ||
| 7 | import org .apache.lo gging.log4 j.LogManag er; | |
| 8 | import org .apache.lo gging.log4 j.Logger; | |
| 9 | import org .springfra mework.bea ns.factory .annotatio n.Autowire d; | |
| 10 | import org .springfra mework.ste reotype.Se rvice; | |
| 11 | ||
| 12 | import gov .va.genisi s2.ts.comm on.excepti on.TSInern alSystemEx ception; | |
| 13 | import gov .va.genisi s2.ts.comm on.excepti on.TSRunti meExceptio n; | |
| 14 | import gov .va.genisi s2.ts.fuse ki.FusekiC lient; | |
| 15 | import gov .va.genisi s2.ts.serv ice.IMappi ngService; | |
| 16 | import gov .va.genisi s2.ts.util s.TSProper tiesUtil; | |
| 17 | ||
| 18 | /** | |
| 19 | * @author P II | |
| 20 | * | |
| 21 | */ | |
| 22 | @Service | |
| 23 | public cla ss Mapping Service im plements I MappingSer vice { | |
| 24 | ||
| 25 | pr ivate stat ic final L ogger LOGG ER = LogMa nager.getL ogger(Mapp ingService .class); | |
| 26 | ||
| 27 | @A utowired | |
| 28 | pr ivate Fuse kiClient f usekiClien t; | |
| 29 | ||
| 30 | @R esource(na me = "self MappedUriL ist") | |
| 31 | pr ivate List <String> s elfMappedU riList; | |
| 32 | ||
| 33 | @A utowired | |
| 34 | pr ivate TSPr opertiesUt il propsUt il; | |
| 35 | ||
| 36 | @O verride | |
| 37 | pu blic boole an hasMapp ing(String conceptUr i) { | |
| 38 | bool ean hasMap ping = fal se; | |
| 39 | ||
| 40 | if ( null == co nceptUri) { | |
| 41 | LOGGER .error("co nceptUri i s null"); | |
| 42 | throw new TSRunt imeExcepti on("concep tUri is nu ll"); | |
| 43 | } el se if (isS elfMappedU ri(concept Uri)) { | |
| 44 | return true; | |
| 45 | } | |
| 46 | ||
| 47 | try { | |
| 48 | // Con cept Mappi ng Data-El ements SPA RQL query | |
| 49 | String conceptma ppingDataE lementsSpa rqlQuery = String.fo rmat(props Util.getCo nceptmappi ngDataElem entsSparql Query(), c onceptUri) ; | |
| 50 | hasMap ping = fus ekiClient. performAsk (conceptma ppingDataE lementsSpa rqlQuery, propsUtil. getSparqlE ndpoint()) ; | |
| 51 | } ca tch (Excep tion e) { | |
| 52 | LOGGER .error("Er ror in exe cution Con cept Mappi ng Data-El ements SPA RQL query" , e); | |
| 53 | throw new TSIner nalSystemE xception(" Error in e xecution C oncept Map ping Data- Elements S PARQL quer y", e); | |
| 54 | } | |
| 55 | ||
| 56 | retu rn hasMapp ing; | |
| 57 | } | |
| 58 | ||
| 59 | pr ivate bool ean isSelf MappedUri( String con ceptUri) { | |
| 60 | retu rn this.se lfMappedUr iList.stre am().filte r(s -> s.e qualsIgnor eCase(conc eptUri)).f indFirst() .isPresent (); | |
| 61 | } | |
| 62 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.