86. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 3/1/2018 12:13:17 PM Central 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.

86.1 Files compared

# Location File Last Modified
1 ehealth_xchange_cif.zip\NHIN_adapter\AdapterLIB\src\main\java\gov\va\med\nhin\adapter\datamanager\translators ReplaceAllDataTranslator.java Thu Feb 22 14:26:42 2018 UTC
2 ehealth_xchange_cif.zip\NHIN_adapter\AdapterLIB\src\main\java\gov\va\med\nhin\adapter\datamanager\translators ReplaceAllDataTranslator.java Tue Feb 27 14:28:56 2018 UTC

86.2 Comparison summary

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

86.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

86.4 Active regular expressions

No regular expressions were active.

86.5 Comparison detail

  1   /*
  2    * To chan ge this li cense head er, choose  License H eaders in  Project Pr operties.
  3    * To chan ge this te mplate fil e, choose  Tools | Te mplates
  4    * and ope n the temp late in th e editor.
  5    */
  6   package go v.va.med.n hin.adapte r.datamana ger.transl ators;
  7  
  8   import jav a.util.reg ex.*;
  9  
  10   import gov .va.med.nh in.adapter .datamanag er.*;
  11   import gov .va.med.nh in.adapter .utils.*;
  12  
  13   /**
  14    *
  15    * @author   DN S      VAZQUD
  16    */
  17   public cla ss Replace AllDataTra nslator im plements D ataTransla tor
  18   {
  19       @Overr ide
  20       public  Object tr anslate(Ob ject input , Object r esult, Ref erence tra nslation,  DataQuery  dataQuery)
  21       {
  22           St ring ret =  null;
  23           
  24           if  (input !=  null) {
  25                String r egex = tra nslation.g etProperty ("regex");
  26                if (Null Checker.is NullOrEmpt y(regex))  {
  27                    thro w new Data ManagerExc eption("re gex proper ty must be  set.");
  28                }
  29                String r eplacement  = transla tion.getPr operty("re placement" );
  30                // we ch eck for nu ll instead  of isNull OrEmpty so  that we c an replace  regex wit h empty st rings.
  31                if (repl acement ==  null) {
  32                    thro w new Data ManagerExc eption("re placement  property m ust be set .");
  33                }
  34                if (!(in put instan ceof Strin g)) {
  35                    thro w new Data ManagerExc eption("in put must b e of type  java.lang. String.");
  36                }
  37                String i nputAsStri ng = (Stri ng)input;
  38                ret = in putAsStrin g.replaceA ll(regex,  Matcher.qu oteReplace ment(repla cement));
  39           }
  40           
  41           re turn ret;
  42      }
  43   }