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