214. EPMO Open Source Coordination Office Redaction File Detail Report

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

214.1 Files compared

# Location File Last Modified
1 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ImageGearDataSourceProvider\main\src\java\gov\va\med\imaging\imagegear\datasource ImageGearDataSourceProvider.java Mon Dec 4 21:35:06 2017 UTC
2 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ImageGearDataSourceProvider\main\src\java\gov\va\med\imaging\imagegear\datasource ImageGearDataSourceProvider.java Mon Dec 4 22:01:12 2017 UTC

214.2 Comparison summary

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

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

214.4 Active regular expressions

No regular expressions were active.

214.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: Mar  23, 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.ima gegear.dat asource;
  27  
  28   import jav a.lang.man agement.Ma nagementFa ctory;
  29   import jav a.util.Col lections;
  30   import jav a.util.Has htable;
  31   import jav a.util.Sor tedSet;
  32   import jav a.util.Tre eSet;
  33  
  34   import jav ax.managem ent.MBeanS erver;
  35   import jav ax.managem ent.Object Name;
  36  
  37   import org .apache.lo gging.log4 j.LogManag er;
  38   import org .apache.lo gging.log4 j.Logger;
  39  
  40   import gov .va.med.im aging.Imag ingMBean;
  41   import gov .va.med.im aging.data source.Pro vider;
  42   import gov .va.med.im aging.data source.Pro viderServi ce;
  43   import gov .va.med.im aging.imag egear.data source.con figuration .ImageGear Configurat ion;
  44   import gov .va.med.im aging.imag egear.data source.sta tistics.Im ageGearDat aSourcePro viderStati stics;
  45   import gov .va.med.im aging.roi. datasource .ImageAnno tationWrit erDataSour ceSpi;
  46   import gov .va.med.im aging.roi. datasource .ImageMerg eWriterDat aSourceSpi ;
  47  
  48   /**
  49    * @author         
WERFEJ
  50    *
  51    */
  52   public cla ss ImageGe arDataSour ceProvider
  53   extends Pr ovider
  54   {
  55           pr ivate stat ic final S tring PROV IDER_NAME  = "ImageGe arDataSour ce";
  56           pr ivate stat ic final d ouble PROV IDER_VERSI ON = 1.0d;
  57           pr ivate stat ic final S tring PROV IDER_INFO 
  58                    "Imp lements: \ n" + 
  59                    "Stu dyGraphDat aSource, I mageDataSo urce, and  ImageAcces sLoggingDa taSource S PI \n" + 
  60                    "bac ked by a V istA data  store.";
  61  
  62           pr ivate stat ic final l ong serial VersionUID  = 1L;
  63           pr ivate stat ic ImageGe arConfigur ation imag eGearConfi guration =  null;
  64           pr ivate stat ic ImageGe arDataSour ceProvider Statistics  statistic s = null;
  65           pr ivate fina l static L ogger logg er = LogMa nager.getL ogger(Imag eGearDataS ourceProvi der.class) ;
  66           
  67           pr ivate fina l SortedSe t<Provider Service> s ervices;
  68  
  69           /* *
  70            *  The publi c "nullary " construc tor that i s used by  the Servic eLoader cl ass
  71            *  to create  instances .
  72            * /
  73           pu blic Image GearDataSo urceProvid er()
  74           {
  75                    this (PROVIDER_ NAME, PROV IDER_VERSI ON, PROVID ER_INFO);
  76           }
  77  
  78           /* *
  79            *  @param na me
  80            *  @param ve rsion
  81            *  @param in fo
  82            * /
  83           pr ivate Imag eGearDataS ourceProvi der(String  name, dou ble versio n, String  info)
  84           {
  85                    supe r(name, ve rsion, inf o);
  86  
  87                    serv ices = new  TreeSet<P roviderSer vice>();
  88                    
  89                    serv ices.add(
  90                                      new Prov iderServic e(
  91                                               this,
  92                                               ImageAnnot ationWrite rDataSourc eSpi.class ,
  93                                               ImageGearI mageAnnota tionWriter DataSource Service.SU PPORTED_PR OTOCOL,
  94                                               ImageGearI mageAnnota tionWriter DataSource Service.pr otocolVers ion,
  95                                               ImageGearI mageAnnota tionWriter DataSource Service.cl ass)
  96                                      );
  97                    serv ices.add(
  98                                      new Prov iderServic e(
  99                                               this,
  100                                               ImageMerge WriterData SourceSpi. class,
  101                                               ImageGearI mageMergeW riterDataS ourceServi ce.SUPPORT ED_PROTOCO L,
  102                                               ImageGearI mageMergeW riterDataS ourceServi ce.protoco lVersion,
  103                                               ImageGearI mageMergeW riterDataS ourceServi ce.class)
  104                                      );
  105                    /*
  106                     //  for local  data sourc e - put in  for P118
  107                    serv ices.add(
  108                                      new Prov iderServic e(
  109                                               this, 
  110                                               DataDictio naryDataSo urceSpi.cl ass,
  111                                               (byte)1, 
  112                                               VistaImagi ngDataDict ionaryData SourceServ ice.class)
  113                                      );*/
  114                    
  115                    // l oad the Fe derationCo nfiguratio n if it ex ists
  116                    sync hronized(I mageGearDa taSourcePr ovider.cla ss)
  117                {
  118                             try
  119                             {
  120                                      if(image GearConfig uration ==  null)
  121                                      {
  122                                               imageGearC onfigurati on = (Imag eGearConfi guration)l oadConfigu ration();
  123                                               if(imageGe arConfigur ation == n ull)
  124                                               {
  125                                                       im ageGearCon figuration  = ImageGe arConfigur ation.crea teDefaultC onfigurati on();
  126                                               }
  127                                      }
  128                                      if(stati stics == n ull)
  129                                               statistics  = new Ima geGearData SourceProv iderStatis tics();
  130                                      register MBeanServe r();
  131                                      
  132                             }
  133                             catch( ClassCastE xception c cX)
  134                             {
  135                                      logger.e rror("Unab le to load  configura tion becau se the con figuration  file is i nvalid.",  ccX);
  136                             }
  137                }
  138                    
  139                    Imag eGearMerge OutputPurg e.schedule MergeOutpu tPurge();
  140  
  141           }
  142           
  143           pr ivate stat ic ObjectN ame imageG earStatist icsMBeanNa me = null;
  144           
  145           pr ivate stat ic synchro nized void  registerM BeanServer ()
  146           {
  147                    if(i mageGearSt atisticsMB eanName ==  null)
  148                    {
  149                             logger .info("Reg istering I mage Gear  Data Sourc e Provider  Log with  JMX");
  150                             try
  151                             {
  152                         // add sta tistics
  153                                      MBeanSer ver mBeanS erver = Ma nagementFa ctory.getP latformMBe anServer() ;
  154                                      Hashtabl e<String,  String> mB eanPropert ies = new  Hashtable< String, St ring>();
  155                                      mBeanPro perties.pu t( "type",  "ImageGea rDataSourc eProvider"  );
  156                                      mBeanPro perties.pu t( "name",  "Statisti cs");
  157                                      imageGea rStatistic sMBeanName  = new Obj ectName(Im agingMBean .VIX_MBEAN _DOMAIN_NA ME, mBeanP roperties) ;
  158                                      mBeanSer ver.regist erMBean(st atistics,  imageGearS tatisticsM BeanName);
  159                             }
  160                             catch( Exception  ex)
  161                             {
  162                                      logger.e rror("Erro r register ing transa ction log  with JMX",  ex);
  163                             }
  164                    }
  165           }
  166           
  167           /* *
  168            *  A special  construct or that is  only used  for creat ing a conf iguration
  169            *  file.
  170            *  
  171            *  @param ex changeConf iguration
  172            * /
  173           pr ivate Imag eGearDataS ourceProvi der(ImageG earConfigu ration ima geGearConf iguration)  
  174           {
  175                    this ();
  176                    Imag eGearDataS ourceProvi der.imageG earConfigu ration = i mageGearCo nfiguratio n;
  177           }
  178  
  179           @O verride
  180           pu blic Sorte dSet<Provi derService > getServi ces()
  181           {
  182                    retu rn Collect ions.unmod ifiableSor tedSet(ser vices);
  183           }
  184           
  185           @O verride
  186           pu blic void  storeConfi guration()
  187       {
  188                storeCon figuration (getImageG earConfigu ration());
  189       }
  190           
  191           /* *
  192            *  A package  level met hod for SP I implemen tation to  get the
  193            *  Configura tion.
  194            *  
  195            *  @return
  196            * /
  197           st atic Image GearConfig uration ge tImageGear Configurat ion()
  198           {
  199                    if(i mageGearCo nfiguratio n == null)
  200                             logger .error("Im ageGearCon figuration  is null,  possibly c alled befo re ImageGe arDataSour ceProvider  was insta ntiated.") ;
  201                    
  202                    retu rn imageGe arConfigur ation;
  203           }
  204           
  205           st atic Image GearDataSo urceProvid erStatisti cs getStat istics()
  206           {
  207                    retu rn statist ics;
  208           }
  209           
  210           pu blic stati c void mai n(String [ ] args)
  211           {
  212                    if(a rgs.length  == 4)
  213                    {
  214                             String  groupOutp utDirector y = args[0 ];
  215                             String  siteName  = args[1];
  216                             String  pdfGenera torExePath  = args[2] ;
  217                             String  burnAnnot ationsExeP ath = args [3];
  218                             
  219                             ImageG earConfigu ration con fig = Imag eGearConfi guration.c reateDefau ltConfigur ation();
  220                             config .setGroupO utputDirec tory(group OutputDire ctory);
  221                             config .setPdfGen eratorExeP ath(pdfGen eratorExeP ath);
  222                             config .setRoiOff iceName(si teName);
  223                             config .setBurnAn notationsE xePath(bur nAnnotatio nsExePath) ;
  224                             ImageG earDataSou rceProvide r provider  = new Ima geGearData SourceProv ider(confi g);
  225                             provid er.storeCo nfiguratio n();
  226                    }
  227                    else
  228                    {
  229                             System .out.print ln("Requir es 4 param eters: <Ou tput Temp  Directory>  <ROI Site  Name> <PD F Generato r EXE Path > <Burn An notation E XE Path>") ;
  230                    }
  231           }
  232   }