Produced by Araxis Merge on 6/9/2017 3:49:58 PM 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 | Fri Jun 9 19:49:58 2017 UTC | ||
| 2 | eHealth_Exch (eHealth Exchange Enhancements) Build 3 docs & code_May_2017.zip\VAP_CIF_CODE0502.zip\VAP_CIF_CODE0502\VAP_CIF_CODE0502\nvap-common\src\main\java\gov\va\nvap\common\transformer\xsl | PropertiesToXml.java | Fri Apr 21 20:03:26 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 0 | 0 |
| Changed | 0 | 0 |
| Inserted | 1 | 60 |
| 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 | package go v.va.nvap. common.tra nsformer.x sl; | |||||
| 2 | ||||||
| 3 | import gov .va.nvap.c ommon.tran sformer.Tr ansformer; | |||||
| 4 | import gov .va.nvap.c ommon.tran sformer.Tr ansformerE xception; | |||||
| 5 | import gov .va.nvap.c ommon.vali dation.Ass ert; | |||||
| 6 | import gov .va.nvap.c ommon.vali dation.Nul lChecker; | |||||
| 7 | ||||||
| 8 | import jav a.util.Map ; | |||||
| 9 | ||||||
| 10 | import jav ax.xml.par sers.Docum entBuilder Factory; | |||||
| 11 | import jav ax.xml.par sers.Parse rConfigura tionExcept ion; | |||||
| 12 | import jav ax.xml.tra nsform.Res ult; | |||||
| 13 | import jav ax.xml.tra nsform.dom .DOMResult ; | |||||
| 14 | import jav ax.xml.tra nsform.dom .DOMSource ; | |||||
| 15 | ||||||
| 16 | import org .springfra mework.bea ns.factory .annotatio n.Required ; | |||||
| 17 | import org .w3c.dom.D ocument; | |||||
| 18 | ||||||
| 19 | /** | |||||
| 20 | * Transfo rm a XSL s tylesheet with the o ptional pa ramters. | |||||
| 21 | * | |||||
| 22 | * @author Asha Amri traj | |||||
| 23 | * | |||||
| 24 | */ | |||||
| 25 | public cla ss Propert iesToXml i mplements | |||||
| 26 | Tran sformer<Ma p<String, Object>, D ocument> { | |||||
| 27 | ||||||
| 28 | De faultXSLTr ansformer transforme r; | |||||
| 29 | ||||||
| 30 | @R equired | |||||
| 31 | pu blic void setTransfo rmer(final DefaultXS LTransform er transfo rmer) { | |||||
| 32 | this .transform er = trans former; | |||||
| 33 | } | |||||
| 34 | ||||||
| 35 | @O verride | |||||
| 36 | pu blic Docum ent transf orm(final Map<String , Object> parameters ) | |||||
| 37 | throws Transform erExceptio n { | |||||
| 38 | Asse rt.assertN otEmpty(pa rameters, "Parameter s cannot b e empty!") ; | |||||
| 39 | try { | |||||
| 40 | ||||||
| 41 | final Result res ult = this .transform er.transfo rm(new DOM Source( | |||||
| 42 | DocumentBu ilderFacto ry.newInst ance().new DocumentBu ilder() | |||||
| 43 | .new Document() ), new DOM Result( | |||||
| 44 | DocumentBu ilderFacto ry.newInst ance().new DocumentBu ilder() | |||||
| 45 | .new Document() ), paramet ers); | |||||
| 46 | ||||||
| 47 | if (Nu llChecker. isNotEmpty (result) | |||||
| 48 | && NullChe cker.isIns tance(resu lt, DOMRes ult.class) ) { | |||||
| 49 | return ( Document) ((DOMResul t) result) .getNode() ; | |||||
| 50 | } | |||||
| 51 | ||||||
| 52 | } ca tch (final javax.xml .transform .Transform erExceptio n ex) { | |||||
| 53 | throw new Transf ormerExcep tion(ex); | |||||
| 54 | } ca tch (final ParserCon figuration Exception ex) { | |||||
| 55 | throw new Transf ormerExcep tion(ex); | |||||
| 56 | } | |||||
| 57 | retu rn null; | |||||
| 58 | } | |||||
| 59 | ||||||
| 60 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.