001 package ca.uhn.hl7v2.conf.spec; 002 003 import ca.uhn.hl7v2.conf.spec.usecase.UseCase; 004 import ca.uhn.hl7v2.conf.spec.message.StaticDef; 005 006 /** 007 * A conformance specification (see HL7 2.5 section 2.12). 008 * @author Bryan Tripp 009 */ 010 public class Specification { 011 012 private ImpNote impNote; 013 private UseCase useCase; 014 private Conformance conformance; 015 private Encoding[] encodings; 016 private StaticDef messageProfile; 017 018 /** Utility field used by bound properties. */ 019 private java.beans.PropertyChangeSupport propertyChangeSupport = new java.beans.PropertyChangeSupport(this); 020 021 /** Utility field used by constrained properties. */ 022 private java.beans.VetoableChangeSupport vetoableChangeSupport = new java.beans.VetoableChangeSupport(this); 023 024 /** Holds value of property message. */ 025 private StaticDef message; 026 027 /** Holds value of property specName. */ 028 private String specName; 029 030 /** Holds value of property orgName. */ 031 private String orgName; 032 033 /** Holds value of property HL7Version. */ 034 private String HL7Version; 035 036 /** Holds value of property specVersion. */ 037 private String specVersion; 038 039 /** Holds value of property status. */ 040 private String status; 041 042 /** Holds value of property role. */ 043 private String role; 044 045 /** Holds value of property HL7OID. */ 046 private String HL7OID; 047 048 /** Holds value of property conformanceType. */ 049 private String conformanceType; 050 051 /** Creates a new instance of Specification */ 052 public Specification() { 053 } 054 055 /** Adds a PropertyChangeListener to the listener list. 056 * @param l The listener to add. 057 */ 058 public void addPropertyChangeListener(java.beans.PropertyChangeListener l) { 059 propertyChangeSupport.addPropertyChangeListener(l); 060 } 061 062 /** Removes a PropertyChangeListener from the listener list. 063 * @param l The listener to remove. 064 */ 065 public void removePropertyChangeListener(java.beans.PropertyChangeListener l) { 066 propertyChangeSupport.removePropertyChangeListener(l); 067 } 068 069 /** Adds a VetoableChangeListener to the listener list. 070 * @param l The listener to add. 071 */ 072 public void addVetoableChangeListener(java.beans.VetoableChangeListener l) { 073 vetoableChangeSupport.addVetoableChangeListener(l); 074 } 075 076 /** Removes a VetoableChangeListener from the listener list. 077 * @param l The listener to remove. 078 */ 079 public void removeVetoableChangeListener(java.beans.VetoableChangeListener l) { 080 vetoableChangeSupport.removeVetoableChangeListener(l); 081 } 082 083 /** Getter for property impNote. 084 * @return Value of property impNote. 085 */ 086 public ImpNote getImpNote() { 087 return this.impNote; 088 } 089 090 /** Setter for property impNote. 091 * @param impNote New value of property impNote. 092 * 093 * @throws PropertyVetoException 094 */ 095 public void setImpNote(ImpNote impNote) throws java.beans.PropertyVetoException { 096 ImpNote oldImpNote = this.impNote; 097 vetoableChangeSupport.fireVetoableChange("impNote", oldImpNote, impNote); 098 this.impNote = impNote; 099 propertyChangeSupport.firePropertyChange("impNote", oldImpNote, impNote); 100 } 101 102 /** Getter for property useCase. 103 * @return Value of property useCase. 104 */ 105 public UseCase getUseCase() { 106 return this.useCase; 107 } 108 109 /** Setter for property useCase. 110 * @param useCase New value of property useCase. 111 * 112 * @throws PropertyVetoException 113 */ 114 public void setUseCase(UseCase useCase) throws java.beans.PropertyVetoException { 115 UseCase oldUseCase = this.useCase; 116 vetoableChangeSupport.fireVetoableChange("useCase", oldUseCase, useCase); 117 this.useCase = useCase; 118 propertyChangeSupport.firePropertyChange("useCase", oldUseCase, useCase); 119 } 120 121 /** Getter for property conformance. 122 * @return Value of property conformance. 123 */ 124 public Conformance getConformance() { 125 return this.conformance; 126 } 127 128 /** Setter for property conformance. 129 * @param conformance New value of property conformance. 130 * 131 * @throws PropertyVetoException 132 */ 133 public void setConformance(Conformance conformance) throws java.beans.PropertyVetoException { 134 Conformance oldConformance = this.conformance; 135 vetoableChangeSupport.fireVetoableChange("conformance", oldConformance, conformance); 136 this.conformance = conformance; 137 propertyChangeSupport.firePropertyChange("conformance", oldConformance, conformance); 138 } 139 140 /** Indexed getter for property encodings. 141 * @param index Index of the property. 142 * @return Value of the property at <CODE>index</CODE>. 143 */ 144 public Encoding getEncodings(int index) { 145 return this.encodings[index]; 146 } 147 148 /** Indexed setter for property encodings. 149 * @param index Index of the property. 150 * @param encodings New value of the property at <CODE>index</CODE>. 151 * 152 * @throws PropertyVetoException 153 */ 154 public void setEncodings(int index, Encoding encodings) throws java.beans.PropertyVetoException { 155 Encoding oldEncodings = this.encodings[index]; 156 this.encodings[index] = encodings; 157 try { 158 vetoableChangeSupport.fireVetoableChange("encodings", null, null ); 159 } 160 catch(java.beans.PropertyVetoException vetoException ) { 161 this.encodings[index] = oldEncodings; 162 throw vetoException; 163 } 164 propertyChangeSupport.firePropertyChange("encodings", null, null ); 165 } 166 167 /** Getter for property message. 168 * @return Value of property message. 169 */ 170 public StaticDef getMessage() { 171 return this.message; 172 } 173 174 /** Setter for property message. 175 * @param message New value of property message. 176 * 177 * @throws PropertyVetoException 178 */ 179 public void setMessage(StaticDef message) throws java.beans.PropertyVetoException { 180 StaticDef oldMessage = this.message; 181 vetoableChangeSupport.fireVetoableChange("message", oldMessage, message); 182 this.message = message; 183 propertyChangeSupport.firePropertyChange("message", oldMessage, message); 184 } 185 186 /** Getter for property specName. 187 * @return Value of property specName. 188 */ 189 public String getSpecName() { 190 return this.specName; 191 } 192 193 /** Setter for property specName. 194 * @param specName New value of property specName. 195 * 196 * @throws PropertyVetoException 197 */ 198 public void setSpecName(String specName) throws java.beans.PropertyVetoException { 199 String oldSpecName = this.specName; 200 vetoableChangeSupport.fireVetoableChange("specName", oldSpecName, specName); 201 this.specName = specName; 202 propertyChangeSupport.firePropertyChange("specName", oldSpecName, specName); 203 } 204 205 /** Getter for property orgName. 206 * @return Value of property orgName. 207 */ 208 public String getOrgName() { 209 return this.orgName; 210 } 211 212 /** Setter for property orgName. 213 * @param orgName New value of property orgName. 214 * 215 * @throws PropertyVetoException 216 */ 217 public void setOrgName(String orgName) throws java.beans.PropertyVetoException { 218 String oldOrgName = this.orgName; 219 vetoableChangeSupport.fireVetoableChange("orgName", oldOrgName, orgName); 220 this.orgName = orgName; 221 propertyChangeSupport.firePropertyChange("orgName", oldOrgName, orgName); 222 } 223 224 /** Getter for property HL7Version. 225 * @return Value of property HL7Version. 226 */ 227 public String getHL7Version() { 228 return this.HL7Version; 229 } 230 231 /** Setter for property HL7Version. 232 * @param HL7Version New value of property HL7Version. 233 * 234 * @throws PropertyVetoException 235 */ 236 public void setHL7Version(String HL7Version) throws java.beans.PropertyVetoException { 237 String oldHL7Version = this.HL7Version; 238 vetoableChangeSupport.fireVetoableChange("HL7Version", oldHL7Version, HL7Version); 239 this.HL7Version = HL7Version; 240 propertyChangeSupport.firePropertyChange("HL7Version", oldHL7Version, HL7Version); 241 } 242 243 /** Getter for property specVersion. 244 * @return Value of property specVersion. 245 */ 246 public String getSpecVersion() { 247 return this.specVersion; 248 } 249 250 /** Setter for property specVersion. 251 * @param specVersion New value of property specVersion. 252 * 253 * @throws PropertyVetoException 254 */ 255 public void setSpecVersion(String specVersion) throws java.beans.PropertyVetoException { 256 String oldSpecVersion = this.specVersion; 257 vetoableChangeSupport.fireVetoableChange("specVersion", oldSpecVersion, specVersion); 258 this.specVersion = specVersion; 259 propertyChangeSupport.firePropertyChange("specVersion", oldSpecVersion, specVersion); 260 } 261 262 /** Getter for property status. 263 * @return Value of property status. 264 */ 265 public String getStatus() { 266 return this.status; 267 } 268 269 /** Setter for property status. 270 * @param status New value of property status. 271 * 272 * @throws PropertyVetoException 273 */ 274 public void setStatus(String status) throws java.beans.PropertyVetoException { 275 String oldStatus = this.status; 276 vetoableChangeSupport.fireVetoableChange("status", oldStatus, status); 277 this.status = status; 278 propertyChangeSupport.firePropertyChange("status", oldStatus, status); 279 } 280 281 /** Getter for property role. 282 * @return Value of property role. 283 */ 284 public String getRole() { 285 return this.role; 286 } 287 288 /** Setter for property role. 289 * @param role New value of property role. 290 * 291 * @throws PropertyVetoException 292 */ 293 public void setRole(String role) throws java.beans.PropertyVetoException { 294 String oldRole = this.role; 295 vetoableChangeSupport.fireVetoableChange("role", oldRole, role); 296 this.role = role; 297 propertyChangeSupport.firePropertyChange("role", oldRole, role); 298 } 299 300 /** Getter for property HL7OID. 301 * @return Value of property HL7OID. 302 */ 303 public String getHL7OID() { 304 return this.HL7OID; 305 } 306 307 /** Setter for property HL7OID. 308 * @param HL7OID New value of property HL7OID. 309 * 310 * @throws PropertyVetoException 311 */ 312 public void setHL7OID(String HL7OID) throws java.beans.PropertyVetoException { 313 String oldHL7OID = this.HL7OID; 314 vetoableChangeSupport.fireVetoableChange("HL7OID", oldHL7OID, HL7OID); 315 this.HL7OID = HL7OID; 316 propertyChangeSupport.firePropertyChange("HL7OID", oldHL7OID, HL7OID); 317 } 318 319 /** Getter for property conformanceType. 320 * @return Value of property conformanceType. 321 */ 322 public String getConformanceType() { 323 return this.conformanceType; 324 } 325 326 /** Setter for property conformanceType. 327 * @param conformanceType New value of property conformanceType. 328 * 329 * @throws PropertyVetoException 330 */ 331 public void setConformanceType(String conformanceType) throws java.beans.PropertyVetoException { 332 String oldConformanceType = this.conformanceType; 333 vetoableChangeSupport.fireVetoableChange("conformanceType", oldConformanceType, conformanceType); 334 this.conformanceType = conformanceType; 335 propertyChangeSupport.firePropertyChange("conformanceType", oldConformanceType, conformanceType); 336 } 337 338 }