283. EPMO Open Source Coordination Office Redaction File Detail Report

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

283.1 Files compared

# Location File Last Modified
1 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ImagingDicomUtilities\src\java\gov\va\med\imaging\dicom\utilities\api\reconstitution\impl DicomObjectReconstitutionManager.java Mon Dec 4 21:35:30 2017 UTC
2 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ImagingDicomUtilities\src\java\gov\va\med\imaging\dicom\utilities\api\reconstitution\impl DicomObjectReconstitutionManager.java Mon Dec 4 22:03:09 2017 UTC

283.2 Comparison summary

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

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

283.4 Active regular expressions

No regular expressions were active.

283.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: Sept ember 26,  2005
  6     Site Nam e:  Washin gton OI Fi eld Office , Silver S pring, MD
  7       Developer:          
PETERB
  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   package go v.va.med.i maging.dic om.utiliti es.api.rec onstitutio n.impl;
  26  
  27   import gov .va.med.im aging.Size dInputStre am;
  28   import gov .va.med.im aging.dico m.common.i nterfaces. IDicomData Set;
  29   import gov .va.med.im aging.dico m.dcftoolk it.common. impl.Dicom DataSetImp l;
  30   import gov .va.med.im aging.dico m.utilitie s.api.reco nstitution .interface s.DicomObj ectReconst itutionFac ade;
  31   import gov .va.med.im aging.dico m.utilitie s.exceptio ns.Generic DicomRecon stitutionE xception;
  32   import gov .va.med.im aging.dico m.utilitie s.exceptio ns.Generic DicomUtili tiesTGAFil eException ;
  33   import gov .va.med.im aging.dico m.utilitie s.exceptio ns.Generic DicomUtili tiesTGAFil eNotFoundE xception;
  34   import gov .va.med.im aging.dico m.utilitie s.exceptio ns.Generic DicomUtili tiesTextFi leExceptio n;
  35   import gov .va.med.im aging.dico m.utilitie s.exceptio ns.Generic DicomUtili tiesTextFi leExtracti onExceptio n;
  36   import gov .va.med.im aging.dico m.utilitie s.exceptio ns.Generic DicomUtili tiesTextFi leNotFound Exception;
  37   import gov .va.med.im aging.dico m.utilitie s.impl.Bus inessDataS etImpl;
  38   import gov .va.med.im aging.dico m.utilitie s.interfac es.IBusine ssDataSet;
  39   import gov .va.med.im aging.dico m.utilitie s.reconsti tution.imp l.DicomRec onstitutio nImpl;
  40   import gov .va.med.im aging.dico m.utilitie s.reconsti tution.int erfaces.ID icomRecons titution;
  41  
  42   import jav a.util.Has hMap;
  43  
  44   import org .apache.lo gging.log4 j.LogManag er;
  45   import org .apache.lo gging.log4 j.Logger;
  46  
  47   /**
  48    *
  49    * Impleme ntation of  the Dicom ObjectReco nstitution Facade Int erface.  T his is the  
  50    * Boundar y class to  reconstit ute a DICO M object b ased on va rious file s from the  Legacy 
  51    * environ ment.
  52    *
  53    *
  54    * @author  William P eterson
  55    *
  56    */
  57   public cla ss DicomOb jectRecons titutionMa nager impl ements
  58           Di comObjectR econstitut ionFacade  {
  59       privat e IDicomRe constituti on reconst itute = nu ll;
  60  
  61       privat e static f inal Logge r logger =  LogManage r.getLogge r (DicomOb jectRecons titutionMa nager.clas s);
  62  
  63       
  64       /**
  65        * Con structor
  66        */
  67       public  DicomObje ctReconsti tutionMana ger() {
  68           su per();
  69           th is.reconst itute = ne w DicomRec onstitutio nImpl();
  70       }
  71  
  72       /* (no n-Javadoc)
  73        * @se e gov.va.m ed.imaging .dicom.uti lities.api .reconstit ution.inte rfaces.Dic omObjectRe constituti onFacade#a ssembleDic omObject(j ava.lang.S tring, jav a.lang.Str ing, java. util.HashM ap, boolea n)
  74        */
  75       public  IBusiness DataSet as sembleDico mObject(St ring textF ilename,
  76                String t gaFilename , HashMap< String, St ring> hisC hanges)
  77                throws G enericDico mReconstit utionExcep tion {
  78           
  79                try{
  80                    
  81                    IDic omDataSet  dds = new  DicomDataS etImpl();
  82                    
  83                    dds  = reconsti tute.assem bleDicomOb ject(textF ilename, t gaFilename , hisChang es);
  84                    logg er.debug(" Assembling  DICOM Obj ect via re constituti on with TG A file.");
  85  
  86                    retu rn (this.e ncapsulate DicomDataS et(dds));
  87                }
  88                catch(Ge nericDicom UtilitiesT extFileNot FoundExcep tion noTex t){
  89                    logg er.error(n oText.getM essage());
  90                    logg er.error(t his.getCla ss().getNa me() + ":  " +
  91                             "\nExc eption thr own while  assembling  Dicom Obj ect.");
  92                    thro w new Gene ricDicomRe constituti onExceptio n(
  93                             "Failu re to asse mble Dicom  Object.",  noText);
  94                }
  95                catch(Ge nericDicom UtilitiesT extFileExt ractionExc eption ext ract){
  96                    logg er.error(e xtract.get Message()) ;
  97                    logg er.error(t his.getCla ss().getNa me() + ":  " +
  98                             "\nExc eption thr own while  assembling  Dicom Obj ect.");
  99                    thro w new Gene ricDicomRe constituti onExceptio n(
  100                             "Failu re to asse mble Dicom  Object.",  extract);
  101                }
  102                catch(Ge nericDicom UtilitiesT extFileExc eption e){
  103                    logg er.error(e .getMessag e());
  104                    logg er.error(t his.getCla ss().getNa me() + ":  " +
  105                             "\nExc eption thr own while  assembling  Dicom Obj ect.");
  106                    thro w new Gene ricDicomRe constituti onExceptio n(
  107                             "Failu re to asse mble Dicom  Object.",  e);
  108                }
  109                catch(Ge nericDicom UtilitiesT GAFileExce ption e){
  110                    logg er.error(e .getMessag e());
  111                    logg er.error(t his.getCla ss().getNa me()+": "  +
  112                             "\nExc eption thr own while  assembling  Dicom Obj ect.");
  113                    thro w new Gene ricDicomRe constituti onExceptio n(
  114                             "Failu re to asse mble Dicom  Object.",  e);
  115                }
  116                catch(Ge nericDicom UtilitiesT GAFileNotF oundExcept ion e){
  117                    logg er.error(e .getMessag e());
  118                    logg er.error(t his.getCla ss().getNa me()+": "  +
  119                             "\nExc eption thr own while  assembling  Dicom Obj ect.");
  120                    thro w new Gene ricDicomRe constituti onExceptio n(
  121                             "Failu re to asse mble Dicom  Object.",  e);
  122                }   
  123     }
  124  
  125       public  byte[] as sembleDico mStream(Si zedInputSt ream textS tream, 
  126                    Size dInputStre am tgaStre am)
  127                    thro ws Generic DicomRecon stitutionE xception {
  128           tr y{
  129                byte[] d ata=null;
  130  
  131                data = r econstitut e.assemble DicomStrea m(textStre am, tgaStr eam);
  132                logger.d ebug("Asse mbling DIC OM Object  via recons titution w ith TGA st ream.");
  133  
  134                return ( data);
  135           }
  136           ca tch(Generi cDicomUtil itiesTextF ileNotFoun dException  noText){
  137                logger.e rror("Erro r: " + noT ext.getMes sage());
  138                logger.e rror("Exce ption thro wn while a ssembling  Dicom Obje ct.");
  139                throw ne w GenericD icomRecons titutionEx ception(
  140                         "Failure t o assemble  Dicom Obj ect.", noT ext);
  141           }
  142           ca tch(Generi cDicomUtil itiesTextF ileExtract ionExcepti on extract ){
  143                logger.e rror("Erro r: " + ext ract.getMe ssage());
  144                logger.e rror("Exce ption thro wn while a ssembling  Dicom Obje ct.");
  145                throw ne w GenericD icomRecons titutionEx ception(
  146                         "Failure t o assemble  Dicom Obj ect.", ext ract);
  147           }
  148           ca tch(Generi cDicomUtil itiesTextF ileExcepti on e){
  149                logger.e rror("Erro r: " + e.g etMessage( ));
  150                logger.e rror("Exce ption thro wn while a ssembling  Dicom Obje ct.");
  151                throw ne w GenericD icomRecons titutionEx ception(
  152                         "Failure t o assemble  Dicom Obj ect.", e);
  153           }
  154           ca tch(Generi cDicomUtil itiesTGAFi leExceptio n e){
  155                logger.e rror("Erro r: " + e.g etMessage( ));
  156                logger.e rror("Exce ption thro wn while a ssembling  Dicom Obje ct.");
  157                throw ne w GenericD icomRecons titutionEx ception(
  158                         "Failure t o assemble  Dicom Obj ect.", e);
  159           }
  160           ca tch(Generi cDicomUtil itiesTGAFi leNotFound Exception  e){
  161                logger.e rror("Erro r: " + e.g etMessage( ));
  162                logger.e rror("Exce ption thro wn while a ssembling  Dicom Obje ct.");
  163                throw ne w GenericD icomRecons titutionEx ception(
  164                         "Failure t o assemble  Dicom Obj ect.", e);
  165           }     
  166       }
  167  
  168       /* (no n-Javadoc)
  169        * @se e gov.va.m ed.imaging .dicom.uti lities.api .reconstit ution.inte rfaces.Dic omObjectRe constituti onFacade#u pdateDicom Object(Str ing, java. util.HashM ap, boolea n)
  170        */
  171       public  IBusiness DataSet up dateDicomO bject(Stri ng dicomFi le, HashMa p<String,  String> hi sChanges) 
  172                                                                thro ws Generic DicomRecon stitutionE xception {
  173           
  174           ID icomDataSe t dds = ne w DicomDat aSetImpl() ;
  175           
  176           dd s = recons titute.upd ateDicomOb ject(dicom File, hisC hanges);
  177           lo gger.debug ("Updating  DICOM Obj ect via re constituti on with DI COM file." );
  178           
  179           re turn (this .encapsula teDicomDat aSet(dds)) ;
  180       }
  181  
  182       /* (no n-Javadoc)
  183        * @se e gov.va.m ed.imaging .dicom.uti lities.api .reconstit ution.inte rfaces.Dic omObjectRe constituti onFacade#u pdateDicom Stream(jav a.io.Input Stream, ja va.util.Ha shMap, boo lean)
  184        */
  185       public  byte[] up dateDicomS tream(Size dInputStre am sizedDi comStream,  SizedInpu tStream si zedTextStr eam) 
  186                                                                thro ws Generic DicomRecon stitutionE xception {
  187           
  188           by te[] data= null;
  189           da ta = recon stitute.up dateDicomS tream(size dDicomStre am, sizedT extStream) ;
  190           lo gger.debug ("Updating  DICOM Obj ect via re constituti on with DI COM stream .");
  191           
  192           re turn (data );
  193       }
  194       
  195       privat e IBusines sDataSet e ncapsulate DicomDataS et(IDicomD ataSet dds ){
  196           
  197           lo gger.info( this.getCl ass().getN ame()+": G eneric DIC OM Layer:  " +
  198                    "... encapsulat ing DicomD ataSet to  pass back  to Busines s Layer.") ;
  199  
  200           IB usinessDat aSet busin essDS = ne w Business DataSetImp l();
  201           bu sinessDS.s etDicomDat aSet(dds);
  202           
  203           re turn busin essDS;
  204       }
  205  
  206   }