336. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/5/2017 12:06:47 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.

336.1 Files compared

# Location File Last Modified
1 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\PathologyCommon\main\src\java\gov\va\med\imaging\pathology PathologyFieldURN.java Mon Dec 4 21:34:30 2017 UTC
2 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\PathologyCommon\main\src\java\gov\va\med\imaging\pathology PathologyFieldURN.java Mon Dec 4 22:04:55 2017 UTC

336.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 674
Changed 2 4
Inserted 0 0
Removed 0 0

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

336.4 Active regular expressions

No regular expressions were active.

336.5 Comparison detail

  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: Jul  6, 2012
  6     Site Nam e:  Washin gton OI Fi eld Office , Silver S pring, MD
  7       Developer:          
WERFEJ
  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.pat hology;
  27  
  28   import gov .va.med.Gl obalArtifa ctIdentifi er;
  29   import gov .va.med.Gl obalArtifa ctIdentifi erImpl;
  30   import gov .va.med.Na mespaceIde ntifier;
  31   import gov .va.med.Ro utingToken ;
  32   import gov .va.med.Ro utingToken Impl;
  33   import gov .va.med.SE RIALIZATIO N_FORMAT;
  34   import gov .va.med.UR N;
  35   import gov .va.med.UR NComponent s;
  36   import gov .va.med.UR NType;
  37   import gov .va.med.We llKnownOID ;
  38   import gov .va.med.im aging.exce ptions.URN FormatExce ption;
  39   import gov .va.med.im aging.path ology.enum s.Patholog yField;
  40  
  41   import jav a.io.Seria lizable;
  42   import jav a.util.reg ex.Matcher ;
  43   import jav a.util.reg ex.Pattern ;
  44  
  45   import org .apache.lo gging.log4 j.LogManag er;
  46   import org .apache.lo gging.log4 j.Logger;
  47  
  48   /**
  49    * @author         
WERFEJ
  50    *
  51    */
  52   @URNType(n amespace=" vapatholog yfield")
  53   public cla ss Patholo gyFieldURN
  54   extends UR N
  55   implements  Serializa ble, Globa lArtifactI dentifier
  56   {
  57  
  58           pr ivate stat ic final l ong serial VersionUID  = 1L;
  59           
  60           pr otected St ring origi natingSite Id;
  61           pr otected Pa thologyFie ld patholo gyField;
  62           pr otected St ring field Id;
  63           
  64           
  65           pr ivate stat ic final S tring name space = "v apathology field";
  66           pu blic stati c final We llKnownOID  DEFAULT_H OME_COMMUN ITY_ID = W ellKnownOI D.VA_RADIO LOGY_IMAGE ;
  67           
  68           pr ivate stat ic final S tring name spaceSpeci ficStringR egex = 
  69                    "([^ -]+)" +                                                                   //  the site  ID
  70                    URN. namespaceS pecificStr ingDelimit er +
  71                    "([^ -]+)" +                                                                            // t he patholo gy field 
  72                    URN. namespaceS pecificStr ingDelimit er +
  73                    "([^ -]+)";                                                                             // t he field I D
  74           pr ivate stat ic final P attern nam espaceSpec ificString Pattern =  Pattern.co mpile(name spaceSpeci ficStringR egex);
  75           pr ivate stat ic final i nt SITE_ID _GROUP = 1 ;
  76           pr ivate stat ic final i nt PATHOLO GY_FIELD_G ROUP = 2;
  77           pr ivate stat ic final i nt FIELD_I D_GROUP =  3;
  78           
  79           pr ivate stat ic Namespa ceIdentifi er namespa ceIdentifi er = new N amespaceId entifier(n amespace);
  80           
  81           pr ivate fina l static L ogger logg er = LogMa nager.getL ogger(Path ologyField URN.class) ;
  82  
  83           pu blic stati c synchron ized Names paceIdenti fier getMa nagedNames pace()
  84           {
  85                    retu rn namespa ceIdentifi er;
  86           }
  87           
  88           pu blic stati c Patholog yFieldURN  create(Str ing origin atingSiteI d, 
  89                             Pathol ogyField p athologyFi eld, Strin g fieldId)
  90           th rows URNFo rmatExcept ion
  91           {        
  92                    retu rn new Pat hologyFiel dURN(Patho logyFieldU RN.getMana gedNamespa ce(),
  93                                      originat ingSiteId,  pathology Field, fie ldId);
  94           }
  95           
  96           pu blic stati c Patholog yFieldURN  create(URN Components  urnCompon ents, 
  97                             SERIAL IZATION_FO RMAT seria lizationFo rmat) 
  98           th rows URNFo rmatExcept ion
  99           {
  100                    retu rn new Pat hologyFiel dURN(urnCo mponents,  serializat ionFormat) ;
  101           }
  102           
  103           /* *
  104            *  Used dire ctly and a  pass thro ugh for de rived clas ses.
  105            *  The const ructor cal led by the  URN class  when a UR N derived  class
  106            *  is being  created fr om a Strin g represen tation.
  107            *  
  108            *  @param co mponents
  109            *  @throws U RNFormatEx ception
  110            * /
  111           pr otected Pa thologyFie ldURN(URNC omponents  urnCompone nts, SERIA LIZATION_F ORMAT seri alizationF ormat) 
  112           th rows URNFo rmatExcept ion
  113           {
  114                    supe r(urnCompo nents, ser ialization Format);
  115           }
  116           
  117           pr otected Pa thologyFie ldURN(Name spaceIdent ifier name spaceIdent ifier,
  118                             String  originati ngSiteId, 
  119                             Pathol ogyField p athologyFi eld, Strin g fieldId)
  120           th rows URNFo rmatExcept ion
  121           {
  122                    supe r(namespac eIdentifie r);
  123                    setO riginating SiteId(ori ginatingSi teId);
  124                    setP athologyFi eld(pathol ogyField);
  125                    setF ieldId(fie ldId);
  126           }
  127  
  128           @O verride
  129           pu blic Strin g getHomeC ommunityId ()
  130           {
  131                    // I mages are  always in  the VA com munity
  132                    retu rn WellKno wnOID.VA_R ADIOLOGY_I MAGE.getCa nonicalVal ue().toStr ing();
  133           }
  134  
  135           @O verride
  136           pu blic Strin g getRepos itoryUniqu eId()
  137           {
  138                    retu rn origina tingSiteId ;
  139           }
  140  
  141           @O verride
  142           pu blic boole an isEquiv alent(Rout ingToken t hat)
  143           {
  144                    retu rn Routing TokenImpl. isEquivale nt(this, t hat);
  145           }
  146  
  147           @O verride
  148           pu blic boole an isInclu ding(Routi ngToken th at)
  149           {
  150                    retu rn Routing TokenImpl. isIncludin g(this, th at);
  151           }
  152  
  153           @O verride
  154           pu blic Strin g toRoutin gTokenStri ng()
  155           {
  156                    retu rn getHome CommunityI d() + ","  + getRepos itoryUniqu eId();
  157           }
  158  
  159           @O verride
  160           pu blic int c ompareTo(G lobalArtif actIdentif ier o)
  161           {
  162                    retu rn GlobalA rtifactIde ntifierImp l.compareT o(this, o) ;
  163           }
  164  
  165           @O verride
  166           pu blic boole an equalsG lobalArtif actIdentif ier(Global ArtifactId entifier t hat)
  167           {
  168                    retu rn GlobalA rtifactIde ntifierImp l.equalsGl obalArtifa ctIdentifi er(this, t hat);
  169           }
  170           
  171           @O verride
  172           pu blic Patho logyFieldU RN clone()  
  173           th rows Clone NotSupport edExceptio n
  174           {
  175                    try
  176                    {
  177                             return  create(ge tOriginati ngSiteId() , getPatho logyField( ), getFiel dId());
  178                    } 
  179                    catc h (URNForm atExceptio n e)
  180                    {
  181                             throw  new CloneN otSupporte dException (e.getMess age());
  182                    }
  183           }
  184  
  185           pu blic Patho logyField  getPatholo gyField()
  186           {
  187                    retu rn patholo gyField;
  188           }
  189  
  190           pu blic void  setPatholo gyField(Pa thologyFie ld patholo gyField)
  191           {
  192                    this .pathology Field = pa thologyFie ld;
  193           }
  194  
  195           pu blic Strin g getField Id()
  196           {
  197                    retu rn fieldId ;
  198           }
  199  
  200           pu blic void  setFieldId (String fi eldId)
  201           {
  202                    this .fieldId =  fieldId;
  203           }
  204  
  205           pu blic Strin g getOrigi natingSite Id()
  206           {
  207                    retu rn origina tingSiteId ;
  208           }
  209  
  210           pu blic void  setOrigina tingSiteId (String or iginatingS iteId)
  211           {
  212                    this .originati ngSiteId =  originati ngSiteId;
  213           }
  214           
  215           /*  (non-Java doc)
  216            *  @see gov. va.med.URN #toString( )
  217            * /
  218           @O verride
  219           pu blic Strin g toString ()
  220           {
  221                    Stri ngBuilder  ahnold = n ew StringB uilder();
  222                    
  223                    // b uild the s cheme iden tifier
  224                    ahno ld.append( urnSchemaI dentifier) ;
  225                    ahno ld.append( urnCompone ntDelimite r);
  226  
  227                    // b uild the n amespace i dentifier
  228                    ahno ld.append( this.getNa mespaceIde ntifier()) ;
  229                    ahno ld.append( urnCompone ntDelimite r);
  230                    
  231                    ahno ld.append( this.getNa mespaceSpe cificStrin g());
  232                    
  233                    retu rn ahnold. toString() ;
  234           }
  235  
  236           /*  (non-Java doc)
  237            *  @see gov. va.med.URN #toStringA sNative()
  238            * /
  239           @O verride
  240           pr otected St ring toStr ingNative( )
  241           {
  242                    Stri ngBuilder  ahnold = n ew StringB uilder();
  243                    
  244                    // b uild the s cheme iden tifier
  245                    ahno ld.append( urnSchemaI dentifier) ;
  246                    ahno ld.append( urnCompone ntDelimite r);
  247  
  248                    // b uild the n amespace i dentifier
  249                    ahno ld.append( this.getNa mespaceIde ntifier()) ;
  250                    ahno ld.append( urnCompone ntDelimite r);
  251                    
  252                    // r estore any  RFC2141 i llegal cha racters
  253                    ahno ld.append(  RFC2141_E SCAPING.un escapeIlle galCharact ers(this.g etNamespac eSpecificS tring()) ) ;
  254                    
  255                    retu rn ahnold. toString() ;
  256           }
  257  
  258           /*  (non-Java doc)
  259            *  @see gov. va.med.URN #toStringA sVAInterna l()
  260            * /
  261           @O verride
  262           pu blic Strin g toString CDTP()
  263           {
  264                    Stri ngBuilder  ahnold = n ew StringB uilder();
  265                    
  266                    // b uild the s cheme iden tifier
  267                    ahno ld.append( urnSchemaI dentifier) ;
  268                    ahno ld.append( urnCompone ntDelimite r);
  269  
  270                    // b uild the n amespace i dentifier
  271                    ahno ld.append( this.getNa mespaceIde ntifier()) ;
  272                    ahno ld.append( urnCompone ntDelimite r);
  273                    
  274                    Stri ng nss = t his.getNam espaceSpec ificString ();
  275                    // e scape any  filename i llegal cha racters
  276                    nss  = FILENAME _ESCAPING. escapeIlle galCharact ers(nss);
  277                    ahno ld.append( nss);
  278                    
  279                    Stri ng additio nalIdentif iers = thi s.getAddit ionalIdent ifiersStri ng();
  280                    // e scape any  filename i llegal cha racters
  281                    addi tionalIden tifiers =  FILENAME_E SCAPING.es capeIllega lCharacter s(addition alIdentifi ers);
  282                    ahno ld.append( additional Identifier s);
  283                    
  284                    retu rn ahnold. toString() ;       
  285           }
  286  
  287           /* *
  288            *  
  289            * /
  290           @O verride
  291           pu blic Strin g getNames paceSpecif icString(S ERIALIZATI ON_FORMAT  serializat ionFormat)
  292           {
  293                    Stri ngBuilder  ahnold = n ew StringB uilder();
  294                    
  295                    // b uild the n amespace s pecific st ring
  296                    ahno ld.append( this.origi natingSite Id);
  297                    ahno ld.append( URN.namesp aceSpecifi cStringDel imiter);
  298                    ahno ld.append( this.patho logyField) ;
  299                    ahno ld.append( URN.namesp aceSpecifi cStringDel imiter);
  300                    ahno ld.append( this.field Id);
  301                    
  302                    retu rn ahnold. toString() ;
  303           }
  304  
  305           @O verride
  306           pu blic void  parseNames paceSpecif icString(N amespaceId entifier n amespace,
  307                             String  namespace SpecificSt ring,
  308                             SERIAL IZATION_FO RMAT seria lizationFo rmat) 
  309           th rows URNFo rmatExcept ion                         
  310           {
  311                    if(n amespaceSp ecificStri ng == null )
  312                             throw  new URNFor matExcepti on("The na mespace sp ecific str ing for a( n) " + thi s.getClass ().getSimp leName() +  " cannot  be null.") ;
  313                    
  314                    Matc her nssMat cher = nam espaceSpec ificString Pattern.ma tcher(name spaceSpeci ficString) ;
  315                    
  316                    if(!  nssMatche r.matches( ))
  317                    {
  318                             String  msg = "Na mespace sp ecific str ing '" + n amespaceSp ecificStri ng + "' is  not valid .";
  319                             logger .warn(msg) ;
  320                             throw  new URNFor matExcepti on(msg);
  321                    }
  322           
  323                    setO riginating SiteId( ns sMatcher.g roup(Patho logyFieldU RN.SITE_ID _GROUP).tr im() );
  324                    setP athologyFi eld( Patho logyField. valueOf(ns sMatcher.g roup(Patho logyFieldU RN.PATHOLO GY_FIELD_G ROUP).trim ()) );
  325                    setF ieldId( ns sMatcher.g roup(Patho logyFieldU RN.FIELD_I D_GROUP).t rim() );         
  326           }
  327  
  328           @O verride
  329           pu blic Strin g getDocum entUniqueI d()
  330           {
  331                    Stri ngBuilder  sb = new S tringBuild er();
  332                    
  333                    sb.a ppend(getP athologyFi eld());
  334                    sb.a ppend(URN. namespaceS pecificStr ingDelimit er);
  335                    sb.a ppend(getF ieldId());
  336                    
  337                    retu rn sb.toSt ring();
  338           }
  339   }