1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package de.uka.ipd.sdq.pcm.designdecision.QualityProperties.impl; |
8 | |
9 | import de.uka.ipd.sdq.pcm.designdecision.QualityProperties.ConfidenceInterval; |
10 | import de.uka.ipd.sdq.pcm.designdecision.QualityProperties.NumericQualityProperty; |
11 | import de.uka.ipd.sdq.pcm.designdecision.QualityProperties.QualityPropertiesPackage; |
12 | |
13 | import de.uka.ipd.sdq.pcm.resultdecorator.ResultDecoratorRepository; |
14 | |
15 | import org.eclipse.emf.common.notify.Notification; |
16 | |
17 | import org.eclipse.emf.ecore.EClass; |
18 | import org.eclipse.emf.ecore.InternalEObject; |
19 | |
20 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
21 | |
22 | /** |
23 | * <!-- begin-user-doc --> |
24 | * An implementation of the model object '<em><b>Numeric Quality Property</b></em>'. |
25 | * <!-- end-user-doc --> |
26 | * <p> |
27 | * The following features are implemented: |
28 | * <ul> |
29 | * <li>{@link de.uka.ipd.sdq.pcm.designdecision.QualityProperties.impl.NumericQualityPropertyImpl#getResultDecoratorRepository <em>Result Decorator Repository</em>}</li> |
30 | * <li>{@link de.uka.ipd.sdq.pcm.designdecision.QualityProperties.impl.NumericQualityPropertyImpl#getConfidenceInterval <em>Confidence Interval</em>}</li> |
31 | * </ul> |
32 | * </p> |
33 | * |
34 | * @generated |
35 | */ |
36 | public abstract class NumericQualityPropertyImpl extends QualityPropertyImpl implements NumericQualityProperty { |
37 | /** |
38 | * The cached value of the '{@link #getResultDecoratorRepository() <em>Result Decorator Repository</em>}' reference. |
39 | * <!-- begin-user-doc --> |
40 | * <!-- end-user-doc --> |
41 | * @see #getResultDecoratorRepository() |
42 | * @generated |
43 | * @ordered |
44 | */ |
45 | protected ResultDecoratorRepository resultDecoratorRepository; |
46 | |
47 | /** |
48 | * The cached value of the '{@link #getConfidenceInterval() <em>Confidence Interval</em>}' reference. |
49 | * <!-- begin-user-doc --> |
50 | * <!-- end-user-doc --> |
51 | * @see #getConfidenceInterval() |
52 | * @generated |
53 | * @ordered |
54 | */ |
55 | protected ConfidenceInterval confidenceInterval; |
56 | |
57 | /** |
58 | * <!-- begin-user-doc --> |
59 | * <!-- end-user-doc --> |
60 | * @generated |
61 | */ |
62 | protected NumericQualityPropertyImpl() { |
63 | super(); |
64 | } |
65 | |
66 | /** |
67 | * <!-- begin-user-doc --> |
68 | * <!-- end-user-doc --> |
69 | * @generated |
70 | */ |
71 | @Override |
72 | protected EClass eStaticClass() { |
73 | return QualityPropertiesPackage.Literals.NUMERIC_QUALITY_PROPERTY; |
74 | } |
75 | |
76 | /** |
77 | * <!-- begin-user-doc --> |
78 | * <!-- end-user-doc --> |
79 | * @generated |
80 | */ |
81 | public ResultDecoratorRepository getResultDecoratorRepository() { |
82 | if (resultDecoratorRepository != null && resultDecoratorRepository.eIsProxy()) { |
83 | InternalEObject oldResultDecoratorRepository = (InternalEObject)resultDecoratorRepository; |
84 | resultDecoratorRepository = (ResultDecoratorRepository)eResolveProxy(oldResultDecoratorRepository); |
85 | if (resultDecoratorRepository != oldResultDecoratorRepository) { |
86 | if (eNotificationRequired()) |
87 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, QualityPropertiesPackage.NUMERIC_QUALITY_PROPERTY__RESULT_DECORATOR_REPOSITORY, oldResultDecoratorRepository, resultDecoratorRepository)); |
88 | } |
89 | } |
90 | return resultDecoratorRepository; |
91 | } |
92 | |
93 | /** |
94 | * <!-- begin-user-doc --> |
95 | * <!-- end-user-doc --> |
96 | * @generated |
97 | */ |
98 | public ResultDecoratorRepository basicGetResultDecoratorRepository() { |
99 | return resultDecoratorRepository; |
100 | } |
101 | |
102 | /** |
103 | * <!-- begin-user-doc --> |
104 | * <!-- end-user-doc --> |
105 | * @generated |
106 | */ |
107 | public void setResultDecoratorRepository(ResultDecoratorRepository newResultDecoratorRepository) { |
108 | ResultDecoratorRepository oldResultDecoratorRepository = resultDecoratorRepository; |
109 | resultDecoratorRepository = newResultDecoratorRepository; |
110 | if (eNotificationRequired()) |
111 | eNotify(new ENotificationImpl(this, Notification.SET, QualityPropertiesPackage.NUMERIC_QUALITY_PROPERTY__RESULT_DECORATOR_REPOSITORY, oldResultDecoratorRepository, resultDecoratorRepository)); |
112 | } |
113 | |
114 | /** |
115 | * <!-- begin-user-doc --> |
116 | * <!-- end-user-doc --> |
117 | * @generated |
118 | */ |
119 | public ConfidenceInterval getConfidenceInterval() { |
120 | if (confidenceInterval != null && confidenceInterval.eIsProxy()) { |
121 | InternalEObject oldConfidenceInterval = (InternalEObject)confidenceInterval; |
122 | confidenceInterval = (ConfidenceInterval)eResolveProxy(oldConfidenceInterval); |
123 | if (confidenceInterval != oldConfidenceInterval) { |
124 | if (eNotificationRequired()) |
125 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, QualityPropertiesPackage.NUMERIC_QUALITY_PROPERTY__CONFIDENCE_INTERVAL, oldConfidenceInterval, confidenceInterval)); |
126 | } |
127 | } |
128 | return confidenceInterval; |
129 | } |
130 | |
131 | /** |
132 | * <!-- begin-user-doc --> |
133 | * <!-- end-user-doc --> |
134 | * @generated |
135 | */ |
136 | public ConfidenceInterval basicGetConfidenceInterval() { |
137 | return confidenceInterval; |
138 | } |
139 | |
140 | /** |
141 | * <!-- begin-user-doc --> |
142 | * <!-- end-user-doc --> |
143 | * @generated |
144 | */ |
145 | public void setConfidenceInterval(ConfidenceInterval newConfidenceInterval) { |
146 | ConfidenceInterval oldConfidenceInterval = confidenceInterval; |
147 | confidenceInterval = newConfidenceInterval; |
148 | if (eNotificationRequired()) |
149 | eNotify(new ENotificationImpl(this, Notification.SET, QualityPropertiesPackage.NUMERIC_QUALITY_PROPERTY__CONFIDENCE_INTERVAL, oldConfidenceInterval, confidenceInterval)); |
150 | } |
151 | |
152 | /** |
153 | * <!-- begin-user-doc --> |
154 | * <!-- end-user-doc --> |
155 | * @generated |
156 | */ |
157 | @Override |
158 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
159 | switch (featureID) { |
160 | case QualityPropertiesPackage.NUMERIC_QUALITY_PROPERTY__RESULT_DECORATOR_REPOSITORY: |
161 | if (resolve) return getResultDecoratorRepository(); |
162 | return basicGetResultDecoratorRepository(); |
163 | case QualityPropertiesPackage.NUMERIC_QUALITY_PROPERTY__CONFIDENCE_INTERVAL: |
164 | if (resolve) return getConfidenceInterval(); |
165 | return basicGetConfidenceInterval(); |
166 | } |
167 | return super.eGet(featureID, resolve, coreType); |
168 | } |
169 | |
170 | /** |
171 | * <!-- begin-user-doc --> |
172 | * <!-- end-user-doc --> |
173 | * @generated |
174 | */ |
175 | @Override |
176 | public void eSet(int featureID, Object newValue) { |
177 | switch (featureID) { |
178 | case QualityPropertiesPackage.NUMERIC_QUALITY_PROPERTY__RESULT_DECORATOR_REPOSITORY: |
179 | setResultDecoratorRepository((ResultDecoratorRepository)newValue); |
180 | return; |
181 | case QualityPropertiesPackage.NUMERIC_QUALITY_PROPERTY__CONFIDENCE_INTERVAL: |
182 | setConfidenceInterval((ConfidenceInterval)newValue); |
183 | return; |
184 | } |
185 | super.eSet(featureID, newValue); |
186 | } |
187 | |
188 | /** |
189 | * <!-- begin-user-doc --> |
190 | * <!-- end-user-doc --> |
191 | * @generated |
192 | */ |
193 | @Override |
194 | public void eUnset(int featureID) { |
195 | switch (featureID) { |
196 | case QualityPropertiesPackage.NUMERIC_QUALITY_PROPERTY__RESULT_DECORATOR_REPOSITORY: |
197 | setResultDecoratorRepository((ResultDecoratorRepository)null); |
198 | return; |
199 | case QualityPropertiesPackage.NUMERIC_QUALITY_PROPERTY__CONFIDENCE_INTERVAL: |
200 | setConfidenceInterval((ConfidenceInterval)null); |
201 | return; |
202 | } |
203 | super.eUnset(featureID); |
204 | } |
205 | |
206 | /** |
207 | * <!-- begin-user-doc --> |
208 | * <!-- end-user-doc --> |
209 | * @generated |
210 | */ |
211 | @Override |
212 | public boolean eIsSet(int featureID) { |
213 | switch (featureID) { |
214 | case QualityPropertiesPackage.NUMERIC_QUALITY_PROPERTY__RESULT_DECORATOR_REPOSITORY: |
215 | return resultDecoratorRepository != null; |
216 | case QualityPropertiesPackage.NUMERIC_QUALITY_PROPERTY__CONFIDENCE_INTERVAL: |
217 | return confidenceInterval != null; |
218 | } |
219 | return super.eIsSet(featureID); |
220 | } |
221 | |
222 | } //NumericQualityPropertyImpl |