1 | /**
|
---|
2 | */
|
---|
3 | package de.ugoe.cs.swe.bnftools.ebnf.impl;
|
---|
4 |
|
---|
5 | import de.ugoe.cs.swe.bnftools.ebnf.EbnfPackage;
|
---|
6 | import de.ugoe.cs.swe.bnftools.ebnf.Import;
|
---|
7 |
|
---|
8 | import org.eclipse.emf.common.notify.Notification;
|
---|
9 |
|
---|
10 | import org.eclipse.emf.ecore.EClass;
|
---|
11 |
|
---|
12 | import org.eclipse.emf.ecore.impl.ENotificationImpl;
|
---|
13 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
|
---|
14 |
|
---|
15 | /**
|
---|
16 | * <!-- begin-user-doc -->
|
---|
17 | * An implementation of the model object '<em><b>Import</b></em>'.
|
---|
18 | * <!-- end-user-doc -->
|
---|
19 | * <p>
|
---|
20 | * The following features are implemented:
|
---|
21 | * <ul>
|
---|
22 | * <li>{@link de.ugoe.cs.swe.bnftools.ebnf.impl.ImportImpl#getImportURI <em>Import URI</em>}</li>
|
---|
23 | * <li>{@link de.ugoe.cs.swe.bnftools.ebnf.impl.ImportImpl#getGrammarType <em>Grammar Type</em>}</li>
|
---|
24 | * <li>{@link de.ugoe.cs.swe.bnftools.ebnf.impl.ImportImpl#getLabel <em>Label</em>}</li>
|
---|
25 | * </ul>
|
---|
26 | * </p>
|
---|
27 | *
|
---|
28 | * @generated
|
---|
29 | */
|
---|
30 | public class ImportImpl extends MinimalEObjectImpl.Container implements Import
|
---|
31 | {
|
---|
32 | /**
|
---|
33 | * The default value of the '{@link #getImportURI() <em>Import URI</em>}' attribute.
|
---|
34 | * <!-- begin-user-doc -->
|
---|
35 | * <!-- end-user-doc -->
|
---|
36 | * @see #getImportURI()
|
---|
37 | * @generated
|
---|
38 | * @ordered
|
---|
39 | */
|
---|
40 | protected static final String IMPORT_URI_EDEFAULT = null;
|
---|
41 |
|
---|
42 | /**
|
---|
43 | * The cached value of the '{@link #getImportURI() <em>Import URI</em>}' attribute.
|
---|
44 | * <!-- begin-user-doc -->
|
---|
45 | * <!-- end-user-doc -->
|
---|
46 | * @see #getImportURI()
|
---|
47 | * @generated
|
---|
48 | * @ordered
|
---|
49 | */
|
---|
50 | protected String importURI = IMPORT_URI_EDEFAULT;
|
---|
51 |
|
---|
52 | /**
|
---|
53 | * The default value of the '{@link #getGrammarType() <em>Grammar Type</em>}' attribute.
|
---|
54 | * <!-- begin-user-doc -->
|
---|
55 | * <!-- end-user-doc -->
|
---|
56 | * @see #getGrammarType()
|
---|
57 | * @generated
|
---|
58 | * @ordered
|
---|
59 | */
|
---|
60 | protected static final String GRAMMAR_TYPE_EDEFAULT = null;
|
---|
61 |
|
---|
62 | /**
|
---|
63 | * The cached value of the '{@link #getGrammarType() <em>Grammar Type</em>}' attribute.
|
---|
64 | * <!-- begin-user-doc -->
|
---|
65 | * <!-- end-user-doc -->
|
---|
66 | * @see #getGrammarType()
|
---|
67 | * @generated
|
---|
68 | * @ordered
|
---|
69 | */
|
---|
70 | protected String grammarType = GRAMMAR_TYPE_EDEFAULT;
|
---|
71 |
|
---|
72 | /**
|
---|
73 | * The default value of the '{@link #getLabel() <em>Label</em>}' attribute.
|
---|
74 | * <!-- begin-user-doc -->
|
---|
75 | * <!-- end-user-doc -->
|
---|
76 | * @see #getLabel()
|
---|
77 | * @generated
|
---|
78 | * @ordered
|
---|
79 | */
|
---|
80 | protected static final String LABEL_EDEFAULT = null;
|
---|
81 |
|
---|
82 | /**
|
---|
83 | * The cached value of the '{@link #getLabel() <em>Label</em>}' attribute.
|
---|
84 | * <!-- begin-user-doc -->
|
---|
85 | * <!-- end-user-doc -->
|
---|
86 | * @see #getLabel()
|
---|
87 | * @generated
|
---|
88 | * @ordered
|
---|
89 | */
|
---|
90 | protected String label = LABEL_EDEFAULT;
|
---|
91 |
|
---|
92 | /**
|
---|
93 | * <!-- begin-user-doc -->
|
---|
94 | * <!-- end-user-doc -->
|
---|
95 | * @generated
|
---|
96 | */
|
---|
97 | protected ImportImpl()
|
---|
98 | {
|
---|
99 | super();
|
---|
100 | }
|
---|
101 |
|
---|
102 | /**
|
---|
103 | * <!-- begin-user-doc -->
|
---|
104 | * <!-- end-user-doc -->
|
---|
105 | * @generated
|
---|
106 | */
|
---|
107 | @Override
|
---|
108 | protected EClass eStaticClass()
|
---|
109 | {
|
---|
110 | return EbnfPackage.Literals.IMPORT;
|
---|
111 | }
|
---|
112 |
|
---|
113 | /**
|
---|
114 | * <!-- begin-user-doc -->
|
---|
115 | * <!-- end-user-doc -->
|
---|
116 | * @generated
|
---|
117 | */
|
---|
118 | public String getImportURI()
|
---|
119 | {
|
---|
120 | return importURI;
|
---|
121 | }
|
---|
122 |
|
---|
123 | /**
|
---|
124 | * <!-- begin-user-doc -->
|
---|
125 | * <!-- end-user-doc -->
|
---|
126 | * @generated
|
---|
127 | */
|
---|
128 | public void setImportURI(String newImportURI)
|
---|
129 | {
|
---|
130 | String oldImportURI = importURI;
|
---|
131 | importURI = newImportURI;
|
---|
132 | if (eNotificationRequired())
|
---|
133 | eNotify(new ENotificationImpl(this, Notification.SET, EbnfPackage.IMPORT__IMPORT_URI, oldImportURI, importURI));
|
---|
134 | }
|
---|
135 |
|
---|
136 | /**
|
---|
137 | * <!-- begin-user-doc -->
|
---|
138 | * <!-- end-user-doc -->
|
---|
139 | * @generated
|
---|
140 | */
|
---|
141 | public String getGrammarType()
|
---|
142 | {
|
---|
143 | return grammarType;
|
---|
144 | }
|
---|
145 |
|
---|
146 | /**
|
---|
147 | * <!-- begin-user-doc -->
|
---|
148 | * <!-- end-user-doc -->
|
---|
149 | * @generated
|
---|
150 | */
|
---|
151 | public void setGrammarType(String newGrammarType)
|
---|
152 | {
|
---|
153 | String oldGrammarType = grammarType;
|
---|
154 | grammarType = newGrammarType;
|
---|
155 | if (eNotificationRequired())
|
---|
156 | eNotify(new ENotificationImpl(this, Notification.SET, EbnfPackage.IMPORT__GRAMMAR_TYPE, oldGrammarType, grammarType));
|
---|
157 | }
|
---|
158 |
|
---|
159 | /**
|
---|
160 | * <!-- begin-user-doc -->
|
---|
161 | * <!-- end-user-doc -->
|
---|
162 | * @generated
|
---|
163 | */
|
---|
164 | public String getLabel()
|
---|
165 | {
|
---|
166 | return label;
|
---|
167 | }
|
---|
168 |
|
---|
169 | /**
|
---|
170 | * <!-- begin-user-doc -->
|
---|
171 | * <!-- end-user-doc -->
|
---|
172 | * @generated
|
---|
173 | */
|
---|
174 | public void setLabel(String newLabel)
|
---|
175 | {
|
---|
176 | String oldLabel = label;
|
---|
177 | label = newLabel;
|
---|
178 | if (eNotificationRequired())
|
---|
179 | eNotify(new ENotificationImpl(this, Notification.SET, EbnfPackage.IMPORT__LABEL, oldLabel, label));
|
---|
180 | }
|
---|
181 |
|
---|
182 | /**
|
---|
183 | * <!-- begin-user-doc -->
|
---|
184 | * <!-- end-user-doc -->
|
---|
185 | * @generated
|
---|
186 | */
|
---|
187 | @Override
|
---|
188 | public Object eGet(int featureID, boolean resolve, boolean coreType)
|
---|
189 | {
|
---|
190 | switch (featureID)
|
---|
191 | {
|
---|
192 | case EbnfPackage.IMPORT__IMPORT_URI:
|
---|
193 | return getImportURI();
|
---|
194 | case EbnfPackage.IMPORT__GRAMMAR_TYPE:
|
---|
195 | return getGrammarType();
|
---|
196 | case EbnfPackage.IMPORT__LABEL:
|
---|
197 | return getLabel();
|
---|
198 | }
|
---|
199 | return super.eGet(featureID, resolve, coreType);
|
---|
200 | }
|
---|
201 |
|
---|
202 | /**
|
---|
203 | * <!-- begin-user-doc -->
|
---|
204 | * <!-- end-user-doc -->
|
---|
205 | * @generated
|
---|
206 | */
|
---|
207 | @Override
|
---|
208 | public void eSet(int featureID, Object newValue)
|
---|
209 | {
|
---|
210 | switch (featureID)
|
---|
211 | {
|
---|
212 | case EbnfPackage.IMPORT__IMPORT_URI:
|
---|
213 | setImportURI((String)newValue);
|
---|
214 | return;
|
---|
215 | case EbnfPackage.IMPORT__GRAMMAR_TYPE:
|
---|
216 | setGrammarType((String)newValue);
|
---|
217 | return;
|
---|
218 | case EbnfPackage.IMPORT__LABEL:
|
---|
219 | setLabel((String)newValue);
|
---|
220 | return;
|
---|
221 | }
|
---|
222 | super.eSet(featureID, newValue);
|
---|
223 | }
|
---|
224 |
|
---|
225 | /**
|
---|
226 | * <!-- begin-user-doc -->
|
---|
227 | * <!-- end-user-doc -->
|
---|
228 | * @generated
|
---|
229 | */
|
---|
230 | @Override
|
---|
231 | public void eUnset(int featureID)
|
---|
232 | {
|
---|
233 | switch (featureID)
|
---|
234 | {
|
---|
235 | case EbnfPackage.IMPORT__IMPORT_URI:
|
---|
236 | setImportURI(IMPORT_URI_EDEFAULT);
|
---|
237 | return;
|
---|
238 | case EbnfPackage.IMPORT__GRAMMAR_TYPE:
|
---|
239 | setGrammarType(GRAMMAR_TYPE_EDEFAULT);
|
---|
240 | return;
|
---|
241 | case EbnfPackage.IMPORT__LABEL:
|
---|
242 | setLabel(LABEL_EDEFAULT);
|
---|
243 | return;
|
---|
244 | }
|
---|
245 | super.eUnset(featureID);
|
---|
246 | }
|
---|
247 |
|
---|
248 | /**
|
---|
249 | * <!-- begin-user-doc -->
|
---|
250 | * <!-- end-user-doc -->
|
---|
251 | * @generated
|
---|
252 | */
|
---|
253 | @Override
|
---|
254 | public boolean eIsSet(int featureID)
|
---|
255 | {
|
---|
256 | switch (featureID)
|
---|
257 | {
|
---|
258 | case EbnfPackage.IMPORT__IMPORT_URI:
|
---|
259 | return IMPORT_URI_EDEFAULT == null ? importURI != null : !IMPORT_URI_EDEFAULT.equals(importURI);
|
---|
260 | case EbnfPackage.IMPORT__GRAMMAR_TYPE:
|
---|
261 | return GRAMMAR_TYPE_EDEFAULT == null ? grammarType != null : !GRAMMAR_TYPE_EDEFAULT.equals(grammarType);
|
---|
262 | case EbnfPackage.IMPORT__LABEL:
|
---|
263 | return LABEL_EDEFAULT == null ? label != null : !LABEL_EDEFAULT.equals(label);
|
---|
264 | }
|
---|
265 | return super.eIsSet(featureID);
|
---|
266 | }
|
---|
267 |
|
---|
268 | /**
|
---|
269 | * <!-- begin-user-doc -->
|
---|
270 | * <!-- end-user-doc -->
|
---|
271 | * @generated
|
---|
272 | */
|
---|
273 | @Override
|
---|
274 | public String toString()
|
---|
275 | {
|
---|
276 | if (eIsProxy()) return super.toString();
|
---|
277 |
|
---|
278 | StringBuffer result = new StringBuffer(super.toString());
|
---|
279 | result.append(" (importURI: ");
|
---|
280 | result.append(importURI);
|
---|
281 | result.append(", grammarType: ");
|
---|
282 | result.append(grammarType);
|
---|
283 | result.append(", label: ");
|
---|
284 | result.append(label);
|
---|
285 | result.append(')');
|
---|
286 | return result.toString();
|
---|
287 | }
|
---|
288 |
|
---|
289 | } //ImportImpl
|
---|