1 | |
package ca.uhn.hl7v2.conf.spec.message; |
2 | |
|
3 | |
import ca.uhn.hl7v2.conf.ProfileException; |
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
public class SegGroup extends AbstractSegmentContainer implements ProfileStructure { |
10 | |
|
11 | |
private String predicate; |
12 | |
private String name; |
13 | |
private String longName; |
14 | |
private String usage; |
15 | |
private short min; |
16 | |
private short max; |
17 | |
|
18 | |
|
19 | 90 | private java.beans.PropertyChangeSupport propertyChangeSupport = new java.beans.PropertyChangeSupport(this); |
20 | |
|
21 | |
|
22 | 90 | private java.beans.VetoableChangeSupport vetoableChangeSupport = new java.beans.VetoableChangeSupport(this); |
23 | |
|
24 | |
|
25 | 90 | public SegGroup() { |
26 | 90 | } |
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
@Override |
32 | |
public String toString() { |
33 | 0 | return "SegGroup[" + getName() + "]"; |
34 | |
} |
35 | |
|
36 | |
|
37 | |
|
38 | |
|
39 | |
public void addPropertyChangeListener(java.beans.PropertyChangeListener l) { |
40 | 0 | propertyChangeSupport.addPropertyChangeListener(l); |
41 | 0 | } |
42 | |
|
43 | |
|
44 | |
|
45 | |
|
46 | |
public void removePropertyChangeListener(java.beans.PropertyChangeListener l) { |
47 | 0 | propertyChangeSupport.removePropertyChangeListener(l); |
48 | 0 | } |
49 | |
|
50 | |
|
51 | |
|
52 | |
|
53 | |
public void addVetoableChangeListener(java.beans.VetoableChangeListener l) { |
54 | 0 | vetoableChangeSupport.addVetoableChangeListener(l); |
55 | 0 | } |
56 | |
|
57 | |
|
58 | |
|
59 | |
|
60 | |
public void removeVetoableChangeListener(java.beans.VetoableChangeListener l) { |
61 | 0 | vetoableChangeSupport.removeVetoableChangeListener(l); |
62 | 0 | } |
63 | |
|
64 | |
|
65 | |
|
66 | |
|
67 | |
public String getPredicate() { |
68 | 0 | return this.predicate; |
69 | |
} |
70 | |
|
71 | |
|
72 | |
|
73 | |
|
74 | |
|
75 | |
|
76 | |
public void setPredicate(String predicate) throws ProfileException { |
77 | 90 | String oldPredicate = this.predicate; |
78 | |
try { |
79 | 90 | vetoableChangeSupport.fireVetoableChange("predicate", oldPredicate, predicate); |
80 | 0 | } catch (Exception e) { |
81 | 0 | throw new ProfileException(null, e); |
82 | 90 | } |
83 | 90 | this.predicate = predicate; |
84 | 90 | propertyChangeSupport.firePropertyChange("predicate", oldPredicate, predicate); |
85 | 90 | } |
86 | |
|
87 | |
|
88 | |
|
89 | |
|
90 | |
public String getName() { |
91 | 30 | return this.name; |
92 | |
} |
93 | |
|
94 | |
|
95 | |
|
96 | |
|
97 | |
|
98 | |
|
99 | |
public void setName(String name) throws ProfileException { |
100 | 90 | String oldName = this.name; |
101 | |
try { |
102 | 90 | vetoableChangeSupport.fireVetoableChange("name", oldName, name); |
103 | 0 | } catch (Exception e) { |
104 | 0 | throw new ProfileException(null, e); |
105 | 90 | } |
106 | 90 | this.name = name; |
107 | 90 | propertyChangeSupport.firePropertyChange("name", oldName, name); |
108 | 90 | } |
109 | |
|
110 | |
|
111 | |
|
112 | |
|
113 | |
public String getLongName() { |
114 | 0 | return this.longName; |
115 | |
} |
116 | |
|
117 | |
|
118 | |
|
119 | |
|
120 | |
|
121 | |
|
122 | |
public void setLongName(String longName) throws ProfileException { |
123 | 90 | String oldLongName = this.longName; |
124 | |
try { |
125 | 90 | vetoableChangeSupport.fireVetoableChange("longName", oldLongName, longName); |
126 | 0 | } catch (Exception e) { |
127 | 0 | throw new ProfileException(null, e); |
128 | 90 | } |
129 | 90 | this.longName = longName; |
130 | 90 | propertyChangeSupport.firePropertyChange("longName", oldLongName, longName); |
131 | 90 | } |
132 | |
|
133 | |
|
134 | |
|
135 | |
|
136 | |
public String getUsage() { |
137 | 10 | return this.usage; |
138 | |
} |
139 | |
|
140 | |
|
141 | |
|
142 | |
|
143 | |
|
144 | |
|
145 | |
public void setUsage(String usage) throws ProfileException { |
146 | 90 | String oldUsage = this.usage; |
147 | |
try { |
148 | 90 | vetoableChangeSupport.fireVetoableChange("usage", oldUsage, usage); |
149 | 0 | } catch (Exception e) { |
150 | 0 | throw new ProfileException(null, e); |
151 | 90 | } |
152 | 90 | this.usage = usage; |
153 | 90 | propertyChangeSupport.firePropertyChange("usage", oldUsage, usage); |
154 | 90 | } |
155 | |
|
156 | |
|
157 | |
|
158 | |
|
159 | |
public short getMin() { |
160 | 0 | return this.min; |
161 | |
} |
162 | |
|
163 | |
|
164 | |
|
165 | |
|
166 | |
|
167 | |
|
168 | |
public void setMin(short min) throws ProfileException { |
169 | 90 | short oldMin = this.min; |
170 | |
try { |
171 | 90 | vetoableChangeSupport.fireVetoableChange("min", oldMin, min); |
172 | 0 | } catch (Exception e) { |
173 | 0 | throw new ProfileException(null, e); |
174 | 90 | } |
175 | 90 | this.min = min; |
176 | 90 | propertyChangeSupport.firePropertyChange("min", oldMin, min); |
177 | 90 | } |
178 | |
|
179 | |
|
180 | |
|
181 | |
|
182 | |
public short getMax() { |
183 | 0 | return this.max; |
184 | |
} |
185 | |
|
186 | |
|
187 | |
|
188 | |
|
189 | |
|
190 | |
|
191 | |
public void setMax(short max) throws ProfileException { |
192 | 90 | short oldMax = this.max; |
193 | |
try { |
194 | 90 | vetoableChangeSupport.fireVetoableChange("max", new Short(oldMax), new Short(max)); |
195 | 0 | } catch (Exception e) { |
196 | 0 | throw new ProfileException(null, e); |
197 | 90 | } |
198 | 90 | this.max = max; |
199 | 90 | propertyChangeSupport.firePropertyChange("max", new Short(oldMax), new Short(max)); |
200 | 90 | } |
201 | |
|
202 | |
} |