24. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/21/2017 6:15:13 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.

24.1 Files compared

# Location File Last Modified
1 Genisis_2.0_v7_bld7.zip\TS\Service\bookmarking-service\src\main\java\gov\va\genisis2\bs\converter BookmarkConverter.java Thu Dec 14 19:57:16 2017 UTC
2 Genisis_2.0_v7_bld7.zip\TS\Service\bookmarking-service\src\main\java\gov\va\genisis2\bs\converter BookmarkConverter.java Thu Dec 21 21:17:12 2017 UTC

24.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 138
Changed 1 2
Inserted 0 0
Removed 0 0

24.3 Comparison options

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

24.4 Active regular expressions

No regular expressions were active.

24.5 Comparison detail

  1   package go v.va.genis is2.bs.con verter;
  2  
  3   import jav a.util.Lis t;
  4   import jav a.util.Map ;
  5  
  6   import jav ax.annotat ion.Resour ce;
  7  
  8   import org .springfra mework.bea ns.factory .annotatio n.Autowire d;
  9   import org .springfra mework.cor e.convert. converter. Converter;
  10   import org .springfra mework.ste reotype.Co mponent;
  11  
  12   import gov .va.genisi s2.bs.data .model.Boo kmark;
  13   import gov .va.genisi s2.bs.data .model.Lab el;
  14   import gov .va.genisi s2.ts.comm on.dto.Boo kmarkDTO;
  15  
  16   /**
  17    * Used to  convert B ookmark Ob ject to Bo okmark DTO 's and vic e versa
  18    * @author   PII
  19    */
  20   @Component
  21   public cla ss Bookmar kConverter  implement s Converte r<Bookmark , Bookmark DTO> {
  22           
  23           @A utowired
  24           pu blic Label Converter  labelConve rter;
  25           
  26           @R esource(na me = "onto logyNamesM ap")
  27           pr ivate Map< String, St ring> onto logyNamesM ap;
  28           
  29           @O verride
  30           pu blic Bookm arkDTO con vert(Bookm ark bookma rk) {
  31                    Book markDTO bo okmarkDto  = new Book markDTO();
  32                    
  33                    book markDto.se tBookmarkI d(bookmark .getBookma rkId());
  34                    book markDto.se tConceptUr i(bookmark .getConcep tUri());
  35                    book markDto.se tConceptNa me(bookmar k.getConce ptName());
  36                    book markDto.se tConceptNa meWithOnto logyName(b ookmark.ge tConceptNa me()  + ge tOntologyN ameForConc eptUri(boo kmark.getC onceptUri( )));
  37                    book markDto.se tUsername( bookmark.g etUsername ());
  38  
  39                    List <Label> la bels = boo kmark.getL abels();
  40  
  41                    if ( null != la bels && !l abels.isEm pty()) {
  42                             bookma rkDto.setL abels(labe lConverter .convert(l abels));
  43                    }
  44  
  45                    retu rn bookmar kDto;
  46           }
  47           
  48           pu blic Bookm ark conver t(Bookmark DTO bookma rkDto) {
  49                    Book mark bookm ark = new  Bookmark() ;
  50                    
  51                    book mark.setBo okmarkId(b ookmarkDto .getBookma rkId());
  52                    book mark.setCo nceptUri(b ookmarkDto .getConcep tUri());
  53                    book mark.setCo nceptName( bookmarkDt o.getConce ptName());
  54                    book mark.setUs ername(boo kmarkDto.g etUsername ());
  55                    
  56                    retu rn bookmar k;
  57           }
  58           
  59           pr ivate Stri ng getOnto logyNameFo rConceptUr i(String c onceptUri)  {
  60                    if ( null == co nceptUri)  {
  61                             return  null;
  62                    }
  63           
  64                    Stri ng ontolog yName = on tologyName sMap.entry Set().stre am().filte r(e -> con ceptUri.to UpperCase( ).startsWi th(e.getKe y()))
  65                                      .map(Map .Entry::ge tValue).fi ndFirst(). orElse(nul l);
  66  
  67                    retu rn (null ! = ontology Name) ? "  [" + ontol ogyName +  "]" : null ;
  68           }
  69  
  70   }