Produced by Araxis Merge on 6/11/2019 10:54:12 AM Eastern Daylight 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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\fw\io\writer | OutputFileFieldMetaData.java | Wed May 29 15:26:34 2019 UTC |
| 2 | HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\fw\io\writer | OutputFileFieldMetaData.java | Mon Jun 10 19:30:05 2019 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 250 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| 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 |
No regular expressions were active.
| 1 | /********* ********** ********** ********** ********** ********** ********* | |
| 2 | * Copyrii ght 2005 V HA. All ri ghts reser ved | |
| 3 | ********* ********** ********** ********** ********** ********** *********/ | |
| 4 | ||
| 5 | package go v.va.med.f w.io.write r; | |
| 6 | ||
| 7 | import org .apache.co mmons.lang .StringUti ls; | |
| 8 | ||
| 9 | import gov .va.med.fw .io.FileFi eldMetaDat a; | |
| 10 | import gov .va.med.fw .util.Inva lidConfigu rationExce ption; | |
| 11 | ||
| 12 | /** | |
| 13 | * Specifi c informat ion regard ing a fiel d for writ ing to a F ile. | |
| 14 | * | |
| 15 | * Created Feb 21, 2 006 4:34:0 3 PM | |
| 16 | * | |
| 17 | * @author DNS DN S
|
|
| 18 | */ | |
| 19 | public cla ss OutputF ileFieldMe taData ext ends FileF ieldMetaDa ta { | |
| 20 | pr ivate stat ic char DE FAULT_FILL ER_VALUE = ' '; | |
| 21 | pr ivate bool ean beginN ewLine; | |
| 22 | pr ivate Stri ng section Header; | |
| 23 | pr ivate int fillerCoun t; | |
| 24 | pr ivate Stri ng fillerV alue; | |
| 25 | ||
| 26 | pu blic Objec t transfor m(Object r awValue) { | |
| 27 | Obje ct transfo rmedValue = super.tr ansform(ra wValue); | |
| 28 | if ( getMaxLeng th() > 0 & & transfor medValue ! = null) { | |
| 29 | // if setting th e maxLengt h, then as sume the t ransformed value | |
| 30 | // sho uld be a s tring | |
| 31 | String value = t ransformed Value.toSt ring(); | |
| 32 | if (St ringUtils. isNotBlank (value)) { | |
| 33 | if (getM axLength() < 4) | |
| 34 | transforme dValue = v alue.subst ring(0, ge tMaxLength ()); | |
| 35 | else | |
| 36 | transforme dValue = S tringUtils .abbreviat e(value, g etMaxLengt h()); | |
| 37 | } | |
| 38 | } | |
| 39 | retu rn transfo rmedValue; | |
| 40 | } | |
| 41 | ||
| 42 | /* * | |
| 43 | * @return R eturns the sectionHe ader. | |
| 44 | * / | |
| 45 | pu blic Strin g getSecti onHeader() { | |
| 46 | retu rn section Header; | |
| 47 | } | |
| 48 | ||
| 49 | /* * | |
| 50 | * @param se ctionHeade r | |
| 51 | * The sect ionHeader to set. | |
| 52 | * / | |
| 53 | pu blic void setSection Header(Str ing sectio nHeader) { | |
| 54 | this .sectionHe ader = sec tionHeader ; | |
| 55 | } | |
| 56 | ||
| 57 | pu blic boole an isSecti onHeaderFi eld() { | |
| 58 | retu rn section Header != null; | |
| 59 | } | |
| 60 | ||
| 61 | /* * | |
| 62 | * @return R eturns the beginNewL ine. | |
| 63 | * / | |
| 64 | pu blic boole an isBegin NewLine() { | |
| 65 | retu rn beginNe wLine; | |
| 66 | } | |
| 67 | ||
| 68 | /* * | |
| 69 | * @param be ginNewLine | |
| 70 | * The begi nNewLine t o set. | |
| 71 | * / | |
| 72 | pu blic void setBeginNe wLine(bool ean beginN ewLine) { | |
| 73 | this .beginNewL ine = begi nNewLine; | |
| 74 | } | |
| 75 | ||
| 76 | /* * | |
| 77 | * @return R eturns the fillerCou nt. | |
| 78 | * / | |
| 79 | pu blic int g etFillerCo unt() { | |
| 80 | retu rn fillerC ount; | |
| 81 | } | |
| 82 | ||
| 83 | /* * | |
| 84 | * @param fi llerCount | |
| 85 | * The fill erCount to set. | |
| 86 | * / | |
| 87 | pu blic void setFillerC ount(int f illerCount ) { | |
| 88 | this .fillerCou nt = fille rCount; | |
| 89 | } | |
| 90 | ||
| 91 | pu blic boole an isFille rField() { | |
| 92 | retu rn fillerC ount != 0; | |
| 93 | } | |
| 94 | ||
| 95 | pu blic Strin g getFille rValue() { | |
| 96 | retu rn fillerV alue; | |
| 97 | } | |
| 98 | ||
| 99 | pu blic void afterPrope rtiesSet() { | |
| 100 | veri fySettings (); | |
| 101 | if ( fillerCoun t < 0) | |
| 102 | throw new Invali dConfigura tionExcept ion("fille rCount mus t be posit ive number "); | |
| 103 | ||
| 104 | if ( !isFixedWi dthFormat( ) && getNa me() == nu ll && !isS ectionHead erField() | |
| 105 | && fille rCount == 0) | |
| 106 | throw new Invali dConfigura tionExcept ion("Name is require d"); | |
| 107 | else if (isFix edWidthFor mat()) { | |
| 108 | if (ge tName() == null && f illerCount == 0) { | |
| 109 | // allow this but calculate the filler Count from startPosi tion | |
| 110 | // and e ndPosition | |
| 111 | fillerCo unt = getE ndPosition () - getSt artPositio n() + 1; | |
| 112 | } | |
| 113 | } | |
| 114 | ||
| 115 | if ( fillerCoun t != 0 && getName() != null) | |
| 116 | throw new Invali dConfigura tionExcept ion( | |
| 117 | "Can not h ave filler count whe n there is a propert y name"); | |
| 118 | ||
| 119 | if ( fillerCoun t > 0) { | |
| 120 | String Builder bu f = new St ringBuilde r(fillerCo unt); | |
| 121 | for (i nt i = 0; i < filler Count; i++ ) | |
| 122 | buf.appe nd(DEFAULT _FILLER_VA LUE); | |
| 123 | filler Value = bu f.toString (); | |
| 124 | } | |
| 125 | } | |
| 126 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.