001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id: AddressTypeImpl.java 7522 2007-09-12 22:00:10Z saul.farber $
006: */package net.opengis.ows.impl;
007:
008: import net.opengis.ows.AddressType;
009: import net.opengis.ows.OwsPackage;
010:
011: import org.eclipse.emf.common.notify.Notification;
012:
013: import org.eclipse.emf.ecore.EClass;
014:
015: import org.eclipse.emf.ecore.impl.ENotificationImpl;
016: import org.eclipse.emf.ecore.impl.EObjectImpl;
017:
018: /**
019: * <!-- begin-user-doc -->
020: * An implementation of the model object '<em><b>Address Type</b></em>'.
021: * <!-- end-user-doc -->
022: * <p>
023: * The following features are implemented:
024: * <ul>
025: * <li>{@link net.opengis.ows.impl.AddressTypeImpl#getDeliveryPoint <em>Delivery Point</em>}</li>
026: * <li>{@link net.opengis.ows.impl.AddressTypeImpl#getCity <em>City</em>}</li>
027: * <li>{@link net.opengis.ows.impl.AddressTypeImpl#getAdministrativeArea <em>Administrative Area</em>}</li>
028: * <li>{@link net.opengis.ows.impl.AddressTypeImpl#getPostalCode <em>Postal Code</em>}</li>
029: * <li>{@link net.opengis.ows.impl.AddressTypeImpl#getCountry <em>Country</em>}</li>
030: * <li>{@link net.opengis.ows.impl.AddressTypeImpl#getElectronicMailAddress <em>Electronic Mail Address</em>}</li>
031: * </ul>
032: * </p>
033: *
034: * @generated
035: */
036: public class AddressTypeImpl extends EObjectImpl implements AddressType {
037: /**
038: * The default value of the '{@link #getDeliveryPoint() <em>Delivery Point</em>}' attribute.
039: * <!-- begin-user-doc -->
040: * <!-- end-user-doc -->
041: * @see #getDeliveryPoint()
042: * @generated
043: * @ordered
044: */
045: protected static final String DELIVERY_POINT_EDEFAULT = null;
046:
047: /**
048: * The cached value of the '{@link #getDeliveryPoint() <em>Delivery Point</em>}' attribute.
049: * <!-- begin-user-doc -->
050: * <!-- end-user-doc -->
051: * @see #getDeliveryPoint()
052: * @generated
053: * @ordered
054: */
055: protected String deliveryPoint = DELIVERY_POINT_EDEFAULT;
056:
057: /**
058: * The default value of the '{@link #getCity() <em>City</em>}' attribute.
059: * <!-- begin-user-doc -->
060: * <!-- end-user-doc -->
061: * @see #getCity()
062: * @generated
063: * @ordered
064: */
065: protected static final String CITY_EDEFAULT = null;
066:
067: /**
068: * The cached value of the '{@link #getCity() <em>City</em>}' attribute.
069: * <!-- begin-user-doc -->
070: * <!-- end-user-doc -->
071: * @see #getCity()
072: * @generated
073: * @ordered
074: */
075: protected String city = CITY_EDEFAULT;
076:
077: /**
078: * The default value of the '{@link #getAdministrativeArea() <em>Administrative Area</em>}' attribute.
079: * <!-- begin-user-doc -->
080: * <!-- end-user-doc -->
081: * @see #getAdministrativeArea()
082: * @generated
083: * @ordered
084: */
085: protected static final String ADMINISTRATIVE_AREA_EDEFAULT = null;
086:
087: /**
088: * The cached value of the '{@link #getAdministrativeArea() <em>Administrative Area</em>}' attribute.
089: * <!-- begin-user-doc -->
090: * <!-- end-user-doc -->
091: * @see #getAdministrativeArea()
092: * @generated
093: * @ordered
094: */
095: protected String administrativeArea = ADMINISTRATIVE_AREA_EDEFAULT;
096:
097: /**
098: * The default value of the '{@link #getPostalCode() <em>Postal Code</em>}' attribute.
099: * <!-- begin-user-doc -->
100: * <!-- end-user-doc -->
101: * @see #getPostalCode()
102: * @generated
103: * @ordered
104: */
105: protected static final String POSTAL_CODE_EDEFAULT = null;
106:
107: /**
108: * The cached value of the '{@link #getPostalCode() <em>Postal Code</em>}' attribute.
109: * <!-- begin-user-doc -->
110: * <!-- end-user-doc -->
111: * @see #getPostalCode()
112: * @generated
113: * @ordered
114: */
115: protected String postalCode = POSTAL_CODE_EDEFAULT;
116:
117: /**
118: * The default value of the '{@link #getCountry() <em>Country</em>}' attribute.
119: * <!-- begin-user-doc -->
120: * <!-- end-user-doc -->
121: * @see #getCountry()
122: * @generated
123: * @ordered
124: */
125: protected static final String COUNTRY_EDEFAULT = null;
126:
127: /**
128: * The cached value of the '{@link #getCountry() <em>Country</em>}' attribute.
129: * <!-- begin-user-doc -->
130: * <!-- end-user-doc -->
131: * @see #getCountry()
132: * @generated
133: * @ordered
134: */
135: protected String country = COUNTRY_EDEFAULT;
136:
137: /**
138: * The default value of the '{@link #getElectronicMailAddress() <em>Electronic Mail Address</em>}' attribute.
139: * <!-- begin-user-doc -->
140: * <!-- end-user-doc -->
141: * @see #getElectronicMailAddress()
142: * @generated
143: * @ordered
144: */
145: protected static final String ELECTRONIC_MAIL_ADDRESS_EDEFAULT = null;
146:
147: /**
148: * The cached value of the '{@link #getElectronicMailAddress() <em>Electronic Mail Address</em>}' attribute.
149: * <!-- begin-user-doc -->
150: * <!-- end-user-doc -->
151: * @see #getElectronicMailAddress()
152: * @generated
153: * @ordered
154: */
155: protected String electronicMailAddress = ELECTRONIC_MAIL_ADDRESS_EDEFAULT;
156:
157: /**
158: * <!-- begin-user-doc -->
159: * <!-- end-user-doc -->
160: * @generated
161: */
162: protected AddressTypeImpl() {
163: super ();
164: }
165:
166: /**
167: * <!-- begin-user-doc -->
168: * <!-- end-user-doc -->
169: * @generated
170: */
171: protected EClass eStaticClass() {
172: return OwsPackage.Literals.ADDRESS_TYPE;
173: }
174:
175: /**
176: * <!-- begin-user-doc -->
177: * <!-- end-user-doc -->
178: * @generated
179: */
180: public String getDeliveryPoint() {
181: return deliveryPoint;
182: }
183:
184: /**
185: * <!-- begin-user-doc -->
186: * <!-- end-user-doc -->
187: * @generated
188: */
189: public void setDeliveryPoint(String newDeliveryPoint) {
190: String oldDeliveryPoint = deliveryPoint;
191: deliveryPoint = newDeliveryPoint;
192: if (eNotificationRequired())
193: eNotify(new ENotificationImpl(this , Notification.SET,
194: OwsPackage.ADDRESS_TYPE__DELIVERY_POINT,
195: oldDeliveryPoint, deliveryPoint));
196: }
197:
198: /**
199: * <!-- begin-user-doc -->
200: * <!-- end-user-doc -->
201: * @generated
202: */
203: public String getCity() {
204: return city;
205: }
206:
207: /**
208: * <!-- begin-user-doc -->
209: * <!-- end-user-doc -->
210: * @generated
211: */
212: public void setCity(String newCity) {
213: String oldCity = city;
214: city = newCity;
215: if (eNotificationRequired())
216: eNotify(new ENotificationImpl(this , Notification.SET,
217: OwsPackage.ADDRESS_TYPE__CITY, oldCity, city));
218: }
219:
220: /**
221: * <!-- begin-user-doc -->
222: * <!-- end-user-doc -->
223: * @generated
224: */
225: public String getAdministrativeArea() {
226: return administrativeArea;
227: }
228:
229: /**
230: * <!-- begin-user-doc -->
231: * <!-- end-user-doc -->
232: * @generated
233: */
234: public void setAdministrativeArea(String newAdministrativeArea) {
235: String oldAdministrativeArea = administrativeArea;
236: administrativeArea = newAdministrativeArea;
237: if (eNotificationRequired())
238: eNotify(new ENotificationImpl(this , Notification.SET,
239: OwsPackage.ADDRESS_TYPE__ADMINISTRATIVE_AREA,
240: oldAdministrativeArea, administrativeArea));
241: }
242:
243: /**
244: * <!-- begin-user-doc -->
245: * <!-- end-user-doc -->
246: * @generated
247: */
248: public String getPostalCode() {
249: return postalCode;
250: }
251:
252: /**
253: * <!-- begin-user-doc -->
254: * <!-- end-user-doc -->
255: * @generated
256: */
257: public void setPostalCode(String newPostalCode) {
258: String oldPostalCode = postalCode;
259: postalCode = newPostalCode;
260: if (eNotificationRequired())
261: eNotify(new ENotificationImpl(this , Notification.SET,
262: OwsPackage.ADDRESS_TYPE__POSTAL_CODE,
263: oldPostalCode, postalCode));
264: }
265:
266: /**
267: * <!-- begin-user-doc -->
268: * <!-- end-user-doc -->
269: * @generated
270: */
271: public String getCountry() {
272: return country;
273: }
274:
275: /**
276: * <!-- begin-user-doc -->
277: * <!-- end-user-doc -->
278: * @generated
279: */
280: public void setCountry(String newCountry) {
281: String oldCountry = country;
282: country = newCountry;
283: if (eNotificationRequired())
284: eNotify(new ENotificationImpl(this , Notification.SET,
285: OwsPackage.ADDRESS_TYPE__COUNTRY, oldCountry,
286: country));
287: }
288:
289: /**
290: * <!-- begin-user-doc -->
291: * <!-- end-user-doc -->
292: * @generated
293: */
294: public String getElectronicMailAddress() {
295: return electronicMailAddress;
296: }
297:
298: /**
299: * <!-- begin-user-doc -->
300: * <!-- end-user-doc -->
301: * @generated
302: */
303: public void setElectronicMailAddress(String newElectronicMailAddress) {
304: String oldElectronicMailAddress = electronicMailAddress;
305: electronicMailAddress = newElectronicMailAddress;
306: if (eNotificationRequired())
307: eNotify(new ENotificationImpl(this , Notification.SET,
308: OwsPackage.ADDRESS_TYPE__ELECTRONIC_MAIL_ADDRESS,
309: oldElectronicMailAddress, electronicMailAddress));
310: }
311:
312: /**
313: * <!-- begin-user-doc -->
314: * <!-- end-user-doc -->
315: * @generated
316: */
317: public Object eGet(int featureID, boolean resolve, boolean coreType) {
318: switch (featureID) {
319: case OwsPackage.ADDRESS_TYPE__DELIVERY_POINT:
320: return getDeliveryPoint();
321: case OwsPackage.ADDRESS_TYPE__CITY:
322: return getCity();
323: case OwsPackage.ADDRESS_TYPE__ADMINISTRATIVE_AREA:
324: return getAdministrativeArea();
325: case OwsPackage.ADDRESS_TYPE__POSTAL_CODE:
326: return getPostalCode();
327: case OwsPackage.ADDRESS_TYPE__COUNTRY:
328: return getCountry();
329: case OwsPackage.ADDRESS_TYPE__ELECTRONIC_MAIL_ADDRESS:
330: return getElectronicMailAddress();
331: }
332: return super .eGet(featureID, resolve, coreType);
333: }
334:
335: /**
336: * <!-- begin-user-doc -->
337: * <!-- end-user-doc -->
338: * @generated
339: */
340: public void eSet(int featureID, Object newValue) {
341: switch (featureID) {
342: case OwsPackage.ADDRESS_TYPE__DELIVERY_POINT:
343: setDeliveryPoint((String) newValue);
344: return;
345: case OwsPackage.ADDRESS_TYPE__CITY:
346: setCity((String) newValue);
347: return;
348: case OwsPackage.ADDRESS_TYPE__ADMINISTRATIVE_AREA:
349: setAdministrativeArea((String) newValue);
350: return;
351: case OwsPackage.ADDRESS_TYPE__POSTAL_CODE:
352: setPostalCode((String) newValue);
353: return;
354: case OwsPackage.ADDRESS_TYPE__COUNTRY:
355: setCountry((String) newValue);
356: return;
357: case OwsPackage.ADDRESS_TYPE__ELECTRONIC_MAIL_ADDRESS:
358: setElectronicMailAddress((String) newValue);
359: return;
360: }
361: super .eSet(featureID, newValue);
362: }
363:
364: /**
365: * <!-- begin-user-doc -->
366: * <!-- end-user-doc -->
367: * @generated
368: */
369: public void eUnset(int featureID) {
370: switch (featureID) {
371: case OwsPackage.ADDRESS_TYPE__DELIVERY_POINT:
372: setDeliveryPoint(DELIVERY_POINT_EDEFAULT);
373: return;
374: case OwsPackage.ADDRESS_TYPE__CITY:
375: setCity(CITY_EDEFAULT);
376: return;
377: case OwsPackage.ADDRESS_TYPE__ADMINISTRATIVE_AREA:
378: setAdministrativeArea(ADMINISTRATIVE_AREA_EDEFAULT);
379: return;
380: case OwsPackage.ADDRESS_TYPE__POSTAL_CODE:
381: setPostalCode(POSTAL_CODE_EDEFAULT);
382: return;
383: case OwsPackage.ADDRESS_TYPE__COUNTRY:
384: setCountry(COUNTRY_EDEFAULT);
385: return;
386: case OwsPackage.ADDRESS_TYPE__ELECTRONIC_MAIL_ADDRESS:
387: setElectronicMailAddress(ELECTRONIC_MAIL_ADDRESS_EDEFAULT);
388: return;
389: }
390: super .eUnset(featureID);
391: }
392:
393: /**
394: * <!-- begin-user-doc -->
395: * <!-- end-user-doc -->
396: * @generated
397: */
398: public boolean eIsSet(int featureID) {
399: switch (featureID) {
400: case OwsPackage.ADDRESS_TYPE__DELIVERY_POINT:
401: return DELIVERY_POINT_EDEFAULT == null ? deliveryPoint != null
402: : !DELIVERY_POINT_EDEFAULT.equals(deliveryPoint);
403: case OwsPackage.ADDRESS_TYPE__CITY:
404: return CITY_EDEFAULT == null ? city != null
405: : !CITY_EDEFAULT.equals(city);
406: case OwsPackage.ADDRESS_TYPE__ADMINISTRATIVE_AREA:
407: return ADMINISTRATIVE_AREA_EDEFAULT == null ? administrativeArea != null
408: : !ADMINISTRATIVE_AREA_EDEFAULT
409: .equals(administrativeArea);
410: case OwsPackage.ADDRESS_TYPE__POSTAL_CODE:
411: return POSTAL_CODE_EDEFAULT == null ? postalCode != null
412: : !POSTAL_CODE_EDEFAULT.equals(postalCode);
413: case OwsPackage.ADDRESS_TYPE__COUNTRY:
414: return COUNTRY_EDEFAULT == null ? country != null
415: : !COUNTRY_EDEFAULT.equals(country);
416: case OwsPackage.ADDRESS_TYPE__ELECTRONIC_MAIL_ADDRESS:
417: return ELECTRONIC_MAIL_ADDRESS_EDEFAULT == null ? electronicMailAddress != null
418: : !ELECTRONIC_MAIL_ADDRESS_EDEFAULT
419: .equals(electronicMailAddress);
420: }
421: return super .eIsSet(featureID);
422: }
423:
424: /**
425: * <!-- begin-user-doc -->
426: * <!-- end-user-doc -->
427: * @generated
428: */
429: public String toString() {
430: if (eIsProxy())
431: return super .toString();
432:
433: StringBuffer result = new StringBuffer(super .toString());
434: result.append(" (deliveryPoint: ");
435: result.append(deliveryPoint);
436: result.append(", city: ");
437: result.append(city);
438: result.append(", administrativeArea: ");
439: result.append(administrativeArea);
440: result.append(", postalCode: ");
441: result.append(postalCode);
442: result.append(", country: ");
443: result.append(country);
444: result.append(", electronicMailAddress: ");
445: result.append(electronicMailAddress);
446: result.append(')');
447: return result.toString();
448: }
449:
450: } //AddressTypeImpl
|