Commits
lene@kvalitetsit.dk authored 54589a798bc
1 + | /* |
2 + | * The MIT License |
3 + | * |
4 + | * Original work sponsored and donated by The Danish Health Data Authority (http://www.sundhedsdatastyrelsen.dk) |
5 + | * |
6 + | * Copyright (C) 2017 The Danish Health Data Authority (http://www.sundhedsdatastyrelsen.dk) |
7 + | * |
8 + | * |
9 + | * Permission is hereby granted, free of charge, to any person obtaining a copy of |
10 + | * this software and associated documentation files (the "Software"), to deal in |
11 + | * the Software without restriction, including without limitation the rights to |
12 + | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies |
13 + | * of the Software, and to permit persons to whom the Software is furnished to do |
14 + | * so, subject to the following conditions: |
15 + | * |
16 + | * |
17 + | * The above copyright notice and this permission notice shall be included in all |
18 + | * copies or substantial portions of the Software. |
19 + | * |
20 + | * |
21 + | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
22 + | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
23 + | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
24 + | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
25 + | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
26 + | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
27 + | * SOFTWARE. |
28 + | */ |
29 + | |
30 + | package org.hl7.v3; |
31 + | |
32 + | import java.io.Serializable; |
33 + | import java.util.ArrayList; |
34 + | import java.util.List; |
35 + | import javax.xml.bind.annotation.XmlAccessType; |
36 + | import javax.xml.bind.annotation.XmlAccessorType; |
37 + | import javax.xml.bind.annotation.XmlAttribute; |
38 + | import javax.xml.bind.annotation.XmlSeeAlso; |
39 + | import javax.xml.bind.annotation.XmlType; |
40 + | import org.hl7.btr.TreatmentWill; |
41 + | import org.hl7.btrv2.TreatmentWillV2; |
42 + | import org.hl7.ltr.LivingWill; |
43 + | |
44 + | |
45 + | /** |
46 + | * |
47 + | * Defines the basic properties of every data value. This |
48 + | * is an abstract type, meaning that no value can be just |
49 + | * a data value without belonging to any concrete type. |
50 + | * Every concrete type is a specialization of this |
51 + | * general abstract DataValue type. |
52 + | * |
53 + | * |
54 + | * <p>Java class for ANY complex type. |
55 + | * |
56 + | * <p>The following schema fragment specifies the expected content contained within this class. |
57 + | * |
58 + | * <pre> |
59 + | * <complexType name="ANY"> |
60 + | * <complexContent> |
61 + | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
62 + | * <attribute name="nullFlavor" type="{urn:hl7-org:v3}NullFlavor" /> |
63 + | * </restriction> |
64 + | * </complexContent> |
65 + | * </complexType> |
66 + | * </pre> |
67 + | * |
68 + | * |
69 + | */ |
70 + | //TODO: når oprindelig treatmentWill wsdl fjernes |
71 + | /* |
72 + | * Denne klasse er lavet for at de 2 wsdl'er for treatmentwill og tilhørende xsd'er til TreatmentWill kan leve side om side midlertidigt, indtil den oprindelige wsdl bliver udfaset. |
73 + | * |
74 + | * Da det kun er en midlertidig løsning, er følgende genveje taget i løsningen som hele, også for at det er lettere at fjerne den oprindelige kode senere. |
75 + | * (Disse eller deres "ophav" kan fjernes igen, når gammel wsdl fjernes): |
76 + | * |
77 + | * - vha jaxws-maven-plugin genereres de 2 wsdl til 2 forskellige biblioteker. |
78 + | * - der er lavet source sletning i ltr-btr-schemas modulet vha. maven-clean-plugin plugin. |
79 + | * - ANY.java klassen vedligeholdes manuelt |
80 + | * - alle klasser, der gør brug af de nye typer, er kopieret "as is" fra de gamle klasser og fået inkluderet v2 i navnet. |
81 + | * Det drejer sig om følgende klasser (tilhørende test udeladt) |
82 + | * > ltr-btr-service/src/main/java/dk/sundhedsdatastyrelsen/livstestamente/service/webservice/TreatmentWillWebServiceV2.java |
83 + | * > ltr-btr-service/src/main/java/dk/sundhedsdatastyrelsen/livstestamente/service/webservice/TreatmentWillWebServiceImplV2.java |
84 + | * > ltr-btr-service/src/main/java/dk/sundhedsdatastyrelsen/livstestamente/service/webservice/WebServiceDelegateV2.java |
85 + | * > ltr-btr-service/src/main/java/dk/sundhedsdatastyrelsen/livstestamente/service/webservice/hl7cda/TreatmentWillHL7CDAMapperV2.java |
86 + | * > ltr-btr-service/src/main/java/dk/sundhedsdatastyrelsen/livstestamente/service/webservice/hl7cda/TreatmentWillHL7CDAValidatorV2.java |
87 + | * > ltr-btr-service/src/test/java/dk/sundhedsdatastyrelsen/livstestamente/service/util/TestHelperV2.java |
88 + | * |
89 + | * - business logikken og database adgangen styres af en switch om der skal køres med ny logik eller ej. |
90 + | * (ovenstående liste er ikke udtømmende. For de ændringer, der er lavet, se istedet commit for SDS-3183) |
91 + | * |
92 + | */ |
93 + | |
94 + | XmlAccessType.FIELD) | (
95 + | name = "ANY") | (
96 + | ({ |
97 + | TreatmentWill.class, |
98 + | TreatmentWillV2.class, |
99 + | AD.class, |
100 + | ANYNonNull.class, |
101 + | CR.class, |
102 + | II.class, |
103 + | SLISTTS.class, |
104 + | GLISTPQ.class, |
105 + | SLISTPQ.class, |
106 + | EN.class, |
107 + | GLISTTS.class, |
108 + | QTY.class, |
109 + | CD.class, |
110 + | URL.class, |
111 + | BIN.class, |
112 + | LivingWill.class, |
113 + | DeceasedInd.class |
114 + | }) |
115 + | public abstract class ANY |
116 + | implements Serializable |
117 + | { |
118 + | |
119 + | name = "nullFlavor") | (
120 + | protected List<String> nullFlavors; |
121 + | |
122 + | /** |
123 + | * Gets the value of the nullFlavors property. |
124 + | * |
125 + | * <p> |
126 + | * This accessor method returns a reference to the live list, |
127 + | * not a snapshot. Therefore any modification you make to the |
128 + | * returned list will be present inside the JAXB object. |
129 + | * This is why there is not a <CODE>set</CODE> method for the nullFlavors property. |
130 + | * |
131 + | * <p> |
132 + | * For example, to add a new item, do as follows: |
133 + | * <pre> |
134 + | * getNullFlavors().add(newItem); |
135 + | * </pre> |
136 + | * |
137 + | * |
138 + | * <p> |
139 + | * Objects of the following type(s) are allowed in the list |
140 + | * {@link String } |
141 + | * |
142 + | * |
143 + | */ |
144 + | public List<String> getNullFlavors() { |
145 + | if (nullFlavors == null) { |
146 + | nullFlavors = new ArrayList<String>(); |
147 + | } |
148 + | return this.nullFlavors; |
149 + | } |
150 + | |
151 + | |
152 + | |
153 + | } |