1 package ca.uhn.hl7v2.conf.spec;
2
3 import ca.uhn.hl7v2.conf.spec.usecase.UseCase;
4 import ca.uhn.hl7v2.conf.spec.message.StaticDef;
5
6 import java.beans.PropertyVetoException;
7
8
9
10
11
12 public class Specification {
13
14 private ImpNote impNote;
15 private UseCase useCase;
16 private Conformance conformance;
17 private Encoding[] encodings;
18
19
20 private final java.beans.PropertyChangeSupport propertyChangeSupport = new java.beans.PropertyChangeSupport(this);
21
22
23 private final java.beans.VetoableChangeSupport vetoableChangeSupport = new java.beans.VetoableChangeSupport(this);
24
25
26 private StaticDef message;
27
28
29 private String specName;
30
31
32 private String orgName;
33
34
35 private String HL7Version;
36
37
38 private String specVersion;
39
40
41 private String status;
42
43
44 private String role;
45
46
47 private String HL7OID;
48
49
50 private String conformanceType;
51
52
53 public Specification() {
54 }
55
56
57
58
59 public void addPropertyChangeListener(java.beans.PropertyChangeListener l) {
60 propertyChangeSupport.addPropertyChangeListener(l);
61 }
62
63
64
65
66 public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {
67 propertyChangeSupport.removePropertyChangeListener(l);
68 }
69
70
71
72
73 public void addVetoableChangeListener(java.beans.VetoableChangeListener l) {
74 vetoableChangeSupport.addVetoableChangeListener(l);
75 }
76
77
78
79
80 public void removeVetoableChangeListener(java.beans.VetoableChangeListener l) {
81 vetoableChangeSupport.removeVetoableChangeListener(l);
82 }
83
84
85
86
87 public ImpNote getImpNote() {
88 return this.impNote;
89 }
90
91
92
93
94
95
96 public void setImpNote(ImpNote impNote) throws PropertyVetoException {
97 ImpNote oldImpNote = this.impNote;
98 vetoableChangeSupport.fireVetoableChange("impNote", oldImpNote, impNote);
99 this.impNote = impNote;
100 propertyChangeSupport.firePropertyChange("impNote", oldImpNote, impNote);
101 }
102
103
104
105
106 public UseCase getUseCase() {
107 return this.useCase;
108 }
109
110
111
112
113
114
115 public void setUseCase(UseCase useCase) throws PropertyVetoException {
116 UseCase oldUseCase = this.useCase;
117 vetoableChangeSupport.fireVetoableChange("useCase", oldUseCase, useCase);
118 this.useCase = useCase;
119 propertyChangeSupport.firePropertyChange("useCase", oldUseCase, useCase);
120 }
121
122
123
124
125 public Conformance getConformance() {
126 return this.conformance;
127 }
128
129
130
131
132
133
134 public void setConformance(Conformance conformance) throws PropertyVetoException {
135 Conformance oldConformance = this.conformance;
136 vetoableChangeSupport.fireVetoableChange("conformance", oldConformance, conformance);
137 this.conformance = conformance;
138 propertyChangeSupport.firePropertyChange("conformance", oldConformance, conformance);
139 }
140
141
142
143
144
145 public Encoding getEncodings(int index) {
146 return this.encodings[index];
147 }
148
149
150
151
152
153
154
155 public void setEncodings(int index, Encoding encodings) throws PropertyVetoException {
156 Encoding oldEncodings = this.encodings[index];
157 this.encodings[index] = encodings;
158 try {
159 vetoableChangeSupport.fireVetoableChange("encodings", null, null );
160 }
161 catch(PropertyVetoException vetoException ) {
162 this.encodings[index] = oldEncodings;
163 throw vetoException;
164 }
165 propertyChangeSupport.firePropertyChange("encodings", null, null );
166 }
167
168
169
170
171 public StaticDef getMessage() {
172 return this.message;
173 }
174
175
176
177
178
179
180 public void setMessage(StaticDef message) throws PropertyVetoException {
181 StaticDef oldMessage = this.message;
182 vetoableChangeSupport.fireVetoableChange("message", oldMessage, message);
183 this.message = message;
184 propertyChangeSupport.firePropertyChange("message", oldMessage, message);
185 }
186
187
188
189
190 public String getSpecName() {
191 return this.specName;
192 }
193
194
195
196
197
198
199 public void setSpecName(String specName) throws PropertyVetoException {
200 String oldSpecName = this.specName;
201 vetoableChangeSupport.fireVetoableChange("specName", oldSpecName, specName);
202 this.specName = specName;
203 propertyChangeSupport.firePropertyChange("specName", oldSpecName, specName);
204 }
205
206
207
208
209 public String getOrgName() {
210 return this.orgName;
211 }
212
213
214
215
216
217
218 public void setOrgName(String orgName) throws PropertyVetoException {
219 String oldOrgName = this.orgName;
220 vetoableChangeSupport.fireVetoableChange("orgName", oldOrgName, orgName);
221 this.orgName = orgName;
222 propertyChangeSupport.firePropertyChange("orgName", oldOrgName, orgName);
223 }
224
225
226
227
228 public String getHL7Version() {
229 return this.HL7Version;
230 }
231
232
233
234
235
236
237 public void setHL7Version(String HL7Version) throws PropertyVetoException {
238 String oldHL7Version = this.HL7Version;
239 vetoableChangeSupport.fireVetoableChange("HL7Version", oldHL7Version, HL7Version);
240 this.HL7Version = HL7Version;
241 propertyChangeSupport.firePropertyChange("HL7Version", oldHL7Version, HL7Version);
242 }
243
244
245
246
247 public String getSpecVersion() {
248 return this.specVersion;
249 }
250
251
252
253
254
255
256 public void setSpecVersion(String specVersion) throws PropertyVetoException {
257 String oldSpecVersion = this.specVersion;
258 vetoableChangeSupport.fireVetoableChange("specVersion", oldSpecVersion, specVersion);
259 this.specVersion = specVersion;
260 propertyChangeSupport.firePropertyChange("specVersion", oldSpecVersion, specVersion);
261 }
262
263
264
265
266 public String getStatus() {
267 return this.status;
268 }
269
270
271
272
273
274
275 public void setStatus(String status) throws PropertyVetoException {
276 String oldStatus = this.status;
277 vetoableChangeSupport.fireVetoableChange("status", oldStatus, status);
278 this.status = status;
279 propertyChangeSupport.firePropertyChange("status", oldStatus, status);
280 }
281
282
283
284
285 public String getRole() {
286 return this.role;
287 }
288
289
290
291
292
293
294 public void setRole(String role) throws PropertyVetoException {
295 String oldRole = this.role;
296 vetoableChangeSupport.fireVetoableChange("role", oldRole, role);
297 this.role = role;
298 propertyChangeSupport.firePropertyChange("role", oldRole, role);
299 }
300
301
302
303
304 public String getHL7OID() {
305 return this.HL7OID;
306 }
307
308
309
310
311
312
313 public void setHL7OID(String HL7OID) throws PropertyVetoException {
314 String oldHL7OID = this.HL7OID;
315 vetoableChangeSupport.fireVetoableChange("HL7OID", oldHL7OID, HL7OID);
316 this.HL7OID = HL7OID;
317 propertyChangeSupport.firePropertyChange("HL7OID", oldHL7OID, HL7OID);
318 }
319
320
321
322
323 public String getConformanceType() {
324 return this.conformanceType;
325 }
326
327
328
329
330
331
332 public void setConformanceType(String conformanceType) throws PropertyVetoException {
333 String oldConformanceType = this.conformanceType;
334 vetoableChangeSupport.fireVetoableChange("conformanceType", oldConformanceType, conformanceType);
335 this.conformanceType = conformanceType;
336 propertyChangeSupport.firePropertyChange("conformanceType", oldConformanceType, conformanceType);
337 }
338
339 }