/** * * * * $Id$ */ package net.opengis.ows10.impl; import java.util.Collection; import net.opengis.ows10.DomainType; import net.opengis.ows10.MetadataType; import net.opengis.ows10.Ows10Package; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.EObjectImpl; import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; /** * * An implementation of the model object 'Domain Type'. * *

* The following features are implemented: *

*

* * @generated */ public class DomainTypeImpl extends EObjectImpl implements DomainType { /** * The default value of the '{@link #getValue() Value}' attribute. * * * @see #getValue() * @generated * @ordered */ protected static final String VALUE_EDEFAULT = null; /** * The cached value of the '{@link #getValue() Value}' attribute. * * * @see #getValue() * @generated * @ordered */ protected String value = VALUE_EDEFAULT; /** * The cached value of the '{@link #getMetadata() Metadata}' containment reference list. * * * @see #getMetadata() * @generated * @ordered */ protected EList metadata; /** * The default value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ protected static final String NAME_EDEFAULT = null; /** * The cached value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ protected String name = NAME_EDEFAULT; /** * * * @generated */ protected DomainTypeImpl() { super(); } /** * * * @generated */ protected EClass eStaticClass() { return Ows10Package.eINSTANCE.getDomainType(); } /** * * * @generated */ public String getValue() { return value; } /** * * * @generated */ public void setValue(String newValue) { String oldValue = value; value = newValue; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Ows10Package.DOMAIN_TYPE__VALUE, oldValue, value)); } /** * * * @generated */ public EList getMetadata() { if (metadata == null) { metadata = new EObjectContainmentEList(MetadataType.class, this, Ows10Package.DOMAIN_TYPE__METADATA); } return metadata; } /** * * * @generated */ public String getName() { return name; } /** * * * @generated */ public void setName(String newName) { String oldName = name; name = newName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Ows10Package.DOMAIN_TYPE__NAME, oldName, name)); } /** * * * @generated */ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case Ows10Package.DOMAIN_TYPE__METADATA: return ((InternalEList)getMetadata()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case Ows10Package.DOMAIN_TYPE__VALUE: return getValue(); case Ows10Package.DOMAIN_TYPE__METADATA: return getMetadata(); case Ows10Package.DOMAIN_TYPE__NAME: return getName(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ public void eSet(int featureID, Object newValue) { switch (featureID) { case Ows10Package.DOMAIN_TYPE__VALUE: setValue((String)newValue); return; case Ows10Package.DOMAIN_TYPE__METADATA: getMetadata().clear(); getMetadata().addAll((Collection)newValue); return; case Ows10Package.DOMAIN_TYPE__NAME: setName((String)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ public void eUnset(int featureID) { switch (featureID) { case Ows10Package.DOMAIN_TYPE__VALUE: setValue(VALUE_EDEFAULT); return; case Ows10Package.DOMAIN_TYPE__METADATA: getMetadata().clear(); return; case Ows10Package.DOMAIN_TYPE__NAME: setName(NAME_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ public boolean eIsSet(int featureID) { switch (featureID) { case Ows10Package.DOMAIN_TYPE__VALUE: return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); case Ows10Package.DOMAIN_TYPE__METADATA: return metadata != null && !metadata.isEmpty(); case Ows10Package.DOMAIN_TYPE__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); } return super.eIsSet(featureID); } /** * * * @generated */ public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (value: "); result.append(value); result.append(", name: "); result.append(name); result.append(')'); return result.toString(); } } //DomainTypeImpl