1
1
/*
2
- * (C) Copyright IBM Corp. 2019, 2020
2
+ * (C) Copyright IBM Corp. 2019, 2021
3
3
*
4
4
* SPDX-License-Identifier: Apache-2.0
5
5
*/
38
38
)
39
39
@ Generated ("com.ibm.fhir.tools.CodeGenerator" )
40
40
public class Narrative extends Element {
41
+ public static final Narrative EMPTY = builder ().status (NarrativeStatus .EMPTY ).div (Xhtml .from ("Narrative text intentionally left empty" )).build ();
42
+
41
43
@ Binding (
42
44
bindingName = "NarrativeStatus" ,
43
45
strength = BindingStrength .ValueSet .REQUIRED ,
@@ -59,9 +61,9 @@ private Narrative(Builder builder) {
59
61
}
60
62
61
63
/**
62
- * The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or
64
+ * The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or
63
65
* whether a human authored it and it may contain additional data.
64
- *
66
+ *
65
67
* @return
66
68
* An immutable object of type {@link NarrativeStatus} that is non-null.
67
69
*/
@@ -71,7 +73,7 @@ public NarrativeStatus getStatus() {
71
73
72
74
/**
73
75
* The actual narrative content, a stripped down version of XHTML.
74
- *
76
+ *
75
77
* @return
76
78
* An immutable object of type {@link Xhtml} that is non-null.
77
79
*/
@@ -81,8 +83,8 @@ public Xhtml getDiv() {
81
83
82
84
@ Override
83
85
public boolean hasChildren () {
84
- return super .hasChildren () ||
85
- (status != null ) ||
86
+ return super .hasChildren () ||
87
+ (status != null ) ||
86
88
(div != null );
87
89
}
88
90
@@ -114,19 +116,19 @@ public boolean equals(Object obj) {
114
116
return false ;
115
117
}
116
118
Narrative other = (Narrative ) obj ;
117
- return Objects .equals (id , other .id ) &&
118
- Objects .equals (extension , other .extension ) &&
119
- Objects .equals (status , other .status ) &&
119
+ return Objects .equals (id , other .id ) &&
120
+ Objects .equals (extension , other .extension ) &&
121
+ Objects .equals (status , other .status ) &&
120
122
Objects .equals (div , other .div );
121
123
}
122
124
123
125
@ Override
124
126
public int hashCode () {
125
127
int result = hashCode ;
126
128
if (result == 0 ) {
127
- result = Objects .hash (id ,
128
- extension ,
129
- status ,
129
+ result = Objects .hash (id ,
130
+ extension ,
131
+ status ,
130
132
div );
131
133
hashCode = result ;
132
134
}
@@ -151,12 +153,12 @@ private Builder() {
151
153
}
152
154
153
155
/**
154
- * Unique id for the element within a resource (for internal references). This may be any string value that does not
156
+ * Unique id for the element within a resource (for internal references). This may be any string value that does not
155
157
* contain spaces.
156
- *
158
+ *
157
159
* @param id
158
160
* Unique id for inter-element referencing
159
- *
161
+ *
160
162
* @return
161
163
* A reference to this Builder instance
162
164
*/
@@ -166,16 +168,16 @@ public Builder id(java.lang.String id) {
166
168
}
167
169
168
170
/**
169
- * May be used to represent additional information that is not part of the basic definition of the element. To make the
170
- * use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of
171
- * extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part
171
+ * May be used to represent additional information that is not part of the basic definition of the element. To make the
172
+ * use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of
173
+ * extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part
172
174
* of the definition of the extension.
173
- *
175
+ *
174
176
* <p>Adds new element(s) to the existing list
175
- *
177
+ *
176
178
* @param extension
177
179
* Additional content defined by implementations
178
- *
180
+ *
179
181
* @return
180
182
* A reference to this Builder instance
181
183
*/
@@ -185,16 +187,16 @@ public Builder extension(Extension... extension) {
185
187
}
186
188
187
189
/**
188
- * May be used to represent additional information that is not part of the basic definition of the element. To make the
189
- * use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of
190
- * extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part
190
+ * May be used to represent additional information that is not part of the basic definition of the element. To make the
191
+ * use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of
192
+ * extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part
191
193
* of the definition of the extension.
192
- *
194
+ *
193
195
* <p>Replaces the existing list with a new one containing elements from the Collection
194
- *
196
+ *
195
197
* @param extension
196
198
* Additional content defined by implementations
197
- *
199
+ *
198
200
* @return
199
201
* A reference to this Builder instance
200
202
*/
@@ -204,14 +206,14 @@ public Builder extension(Collection<Extension> extension) {
204
206
}
205
207
206
208
/**
207
- * The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or
209
+ * The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or
208
210
* whether a human authored it and it may contain additional data.
209
- *
211
+ *
210
212
* <p>This element is required.
211
- *
213
+ *
212
214
* @param status
213
215
* generated | extensions | additional | empty
214
- *
216
+ *
215
217
* @return
216
218
* A reference to this Builder instance
217
219
*/
@@ -222,12 +224,12 @@ public Builder status(NarrativeStatus status) {
222
224
223
225
/**
224
226
* The actual narrative content, a stripped down version of XHTML.
225
- *
227
+ *
226
228
* <p>This element is required.
227
- *
229
+ *
228
230
* @param div
229
231
* Limited xhtml content
230
- *
232
+ *
231
233
* @return
232
234
* A reference to this Builder instance
233
235
*/
@@ -238,13 +240,13 @@ public Builder div(Xhtml div) {
238
240
239
241
/**
240
242
* Build the {@link Narrative}
241
- *
243
+ *
242
244
* <p>Required elements:
243
245
* <ul>
244
246
* <li>status</li>
245
247
* <li>div</li>
246
248
* </ul>
247
- *
249
+ *
248
250
* @return
249
251
* An immutable object of type {@link Narrative}
250
252
* @throws IllegalStateException
0 commit comments