001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id: MetadataURLTypeImpl.java 7522 2007-09-12 22:00:10Z saul.farber $
006: */package net.opengis.wfs.impl;
007:
008: import net.opengis.wfs.MetadataURLType;
009: import net.opengis.wfs.WfsPackage;
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>Metadata URL Type</b></em>'.
021: * <!-- end-user-doc -->
022: * <p>
023: * The following features are implemented:
024: * <ul>
025: * <li>{@link net.opengis.wfs.impl.MetadataURLTypeImpl#getValue <em>Value</em>}</li>
026: * <li>{@link net.opengis.wfs.impl.MetadataURLTypeImpl#getFormat <em>Format</em>}</li>
027: * <li>{@link net.opengis.wfs.impl.MetadataURLTypeImpl#getType <em>Type</em>}</li>
028: * </ul>
029: * </p>
030: *
031: * @generated
032: */
033: public class MetadataURLTypeImpl extends EObjectImpl implements
034: MetadataURLType {
035: /**
036: * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
037: * <!-- begin-user-doc -->
038: * <!-- end-user-doc -->
039: * @see #getValue()
040: * @generated
041: * @ordered
042: */
043: protected static final String VALUE_EDEFAULT = null;
044:
045: /**
046: * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
047: * <!-- begin-user-doc -->
048: * <!-- end-user-doc -->
049: * @see #getValue()
050: * @generated
051: * @ordered
052: */
053: protected String value = VALUE_EDEFAULT;
054:
055: /**
056: * The default value of the '{@link #getFormat() <em>Format</em>}' attribute.
057: * <!-- begin-user-doc -->
058: * <!-- end-user-doc -->
059: * @see #getFormat()
060: * @generated
061: * @ordered
062: */
063: protected static final String FORMAT_EDEFAULT = null;
064:
065: /**
066: * The cached value of the '{@link #getFormat() <em>Format</em>}' attribute.
067: * <!-- begin-user-doc -->
068: * <!-- end-user-doc -->
069: * @see #getFormat()
070: * @generated
071: * @ordered
072: */
073: protected String format = FORMAT_EDEFAULT;
074:
075: /**
076: * The default value of the '{@link #getType() <em>Type</em>}' attribute.
077: * <!-- begin-user-doc -->
078: * <!-- end-user-doc -->
079: * @see #getType()
080: * @generated
081: * @ordered
082: */
083: protected static final String TYPE_EDEFAULT = null;
084:
085: /**
086: * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
087: * <!-- begin-user-doc -->
088: * <!-- end-user-doc -->
089: * @see #getType()
090: * @generated
091: * @ordered
092: */
093: protected String type = TYPE_EDEFAULT;
094:
095: /**
096: * <!-- begin-user-doc -->
097: * <!-- end-user-doc -->
098: * @generated
099: */
100: protected MetadataURLTypeImpl() {
101: super ();
102: }
103:
104: /**
105: * <!-- begin-user-doc -->
106: * <!-- end-user-doc -->
107: * @generated
108: */
109: protected EClass eStaticClass() {
110: return WfsPackage.Literals.METADATA_URL_TYPE;
111: }
112:
113: /**
114: * <!-- begin-user-doc -->
115: * <!-- end-user-doc -->
116: * @generated
117: */
118: public String getValue() {
119: return value;
120: }
121:
122: /**
123: * <!-- begin-user-doc -->
124: * <!-- end-user-doc -->
125: * @generated
126: */
127: public void setValue(String newValue) {
128: String oldValue = value;
129: value = newValue;
130: if (eNotificationRequired())
131: eNotify(new ENotificationImpl(this , Notification.SET,
132: WfsPackage.METADATA_URL_TYPE__VALUE, oldValue,
133: value));
134: }
135:
136: /**
137: * <!-- begin-user-doc -->
138: * <!-- end-user-doc -->
139: * @generated
140: */
141: public String getFormat() {
142: return format;
143: }
144:
145: /**
146: * <!-- begin-user-doc -->
147: * <!-- end-user-doc -->
148: * @generated
149: */
150: public void setFormat(String newFormat) {
151: String oldFormat = format;
152: format = newFormat;
153: if (eNotificationRequired())
154: eNotify(new ENotificationImpl(this , Notification.SET,
155: WfsPackage.METADATA_URL_TYPE__FORMAT, oldFormat,
156: format));
157: }
158:
159: /**
160: * <!-- begin-user-doc -->
161: * <!-- end-user-doc -->
162: * @generated
163: */
164: public String getType() {
165: return type;
166: }
167:
168: /**
169: * <!-- begin-user-doc -->
170: * <!-- end-user-doc -->
171: * @generated
172: */
173: public void setType(String newType) {
174: String oldType = type;
175: type = newType;
176: if (eNotificationRequired())
177: eNotify(new ENotificationImpl(this , Notification.SET,
178: WfsPackage.METADATA_URL_TYPE__TYPE, oldType, type));
179: }
180:
181: /**
182: * <!-- begin-user-doc -->
183: * <!-- end-user-doc -->
184: * @generated
185: */
186: public Object eGet(int featureID, boolean resolve, boolean coreType) {
187: switch (featureID) {
188: case WfsPackage.METADATA_URL_TYPE__VALUE:
189: return getValue();
190: case WfsPackage.METADATA_URL_TYPE__FORMAT:
191: return getFormat();
192: case WfsPackage.METADATA_URL_TYPE__TYPE:
193: return getType();
194: }
195: return super .eGet(featureID, resolve, coreType);
196: }
197:
198: /**
199: * <!-- begin-user-doc -->
200: * <!-- end-user-doc -->
201: * @generated
202: */
203: public void eSet(int featureID, Object newValue) {
204: switch (featureID) {
205: case WfsPackage.METADATA_URL_TYPE__VALUE:
206: setValue((String) newValue);
207: return;
208: case WfsPackage.METADATA_URL_TYPE__FORMAT:
209: setFormat((String) newValue);
210: return;
211: case WfsPackage.METADATA_URL_TYPE__TYPE:
212: setType((String) newValue);
213: return;
214: }
215: super .eSet(featureID, newValue);
216: }
217:
218: /**
219: * <!-- begin-user-doc -->
220: * <!-- end-user-doc -->
221: * @generated
222: */
223: public void eUnset(int featureID) {
224: switch (featureID) {
225: case WfsPackage.METADATA_URL_TYPE__VALUE:
226: setValue(VALUE_EDEFAULT);
227: return;
228: case WfsPackage.METADATA_URL_TYPE__FORMAT:
229: setFormat(FORMAT_EDEFAULT);
230: return;
231: case WfsPackage.METADATA_URL_TYPE__TYPE:
232: setType(TYPE_EDEFAULT);
233: return;
234: }
235: super .eUnset(featureID);
236: }
237:
238: /**
239: * <!-- begin-user-doc -->
240: * <!-- end-user-doc -->
241: * @generated
242: */
243: public boolean eIsSet(int featureID) {
244: switch (featureID) {
245: case WfsPackage.METADATA_URL_TYPE__VALUE:
246: return VALUE_EDEFAULT == null ? value != null
247: : !VALUE_EDEFAULT.equals(value);
248: case WfsPackage.METADATA_URL_TYPE__FORMAT:
249: return FORMAT_EDEFAULT == null ? format != null
250: : !FORMAT_EDEFAULT.equals(format);
251: case WfsPackage.METADATA_URL_TYPE__TYPE:
252: return TYPE_EDEFAULT == null ? type != null
253: : !TYPE_EDEFAULT.equals(type);
254: }
255: return super .eIsSet(featureID);
256: }
257:
258: /**
259: * <!-- begin-user-doc -->
260: * <!-- end-user-doc -->
261: * @generated
262: */
263: public String toString() {
264: if (eIsProxy())
265: return super .toString();
266:
267: StringBuffer result = new StringBuffer(super .toString());
268: result.append(" (value: ");
269: result.append(value);
270: result.append(", format: ");
271: result.append(format);
272: result.append(", type: ");
273: result.append(type);
274: result.append(')');
275: return result.toString();
276: }
277:
278: } //MetadataURLTypeImpl
|