/** * * * * $Id$ */ package net.opengis.wfs20.impl; import java.util.Collection; import javax.xml.namespace.QName; import net.opengis.ows11.MetadataType; import net.opengis.wfs20.AbstractType; import net.opengis.wfs20.ParameterExpressionType; import net.opengis.wfs20.TitleType; import net.opengis.wfs20.Wfs20Package; 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 'Parameter Expression Type'. * *

* The following features are implemented: *

*

* * @generated */ public class ParameterExpressionTypeImpl extends EObjectImpl implements ParameterExpressionType { /** * The cached value of the '{@link #getTitle() Title}' containment reference list. * * * @see #getTitle() * @generated * @ordered */ protected EList title; /** * The cached value of the '{@link #getAbstract() Abstract}' containment reference list. * * * @see #getAbstract() * @generated * @ordered */ protected EList abstract_; /** * 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; /** * The default value of the '{@link #getType() Type}' attribute. * * * @see #getType() * @generated * @ordered */ protected static final QName TYPE_EDEFAULT = null; /** * The cached value of the '{@link #getType() Type}' attribute. * * * @see #getType() * @generated * @ordered */ protected QName type = TYPE_EDEFAULT; /** * * * @generated */ protected ParameterExpressionTypeImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return Wfs20Package.Literals.PARAMETER_EXPRESSION_TYPE; } /** * * * @generated */ public EList getTitle() { if (title == null) { title = new EObjectContainmentEList(TitleType.class, this, Wfs20Package.PARAMETER_EXPRESSION_TYPE__TITLE); } return title; } /** * * * @generated */ public EList getAbstract() { if (abstract_ == null) { abstract_ = new EObjectContainmentEList(AbstractType.class, this, Wfs20Package.PARAMETER_EXPRESSION_TYPE__ABSTRACT); } return abstract_; } /** * * * @generated */ public EList getMetadata() { if (metadata == null) { metadata = new EObjectContainmentEList(MetadataType.class, this, Wfs20Package.PARAMETER_EXPRESSION_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, Wfs20Package.PARAMETER_EXPRESSION_TYPE__NAME, oldName, name)); } /** * * * @generated */ public QName getType() { return type; } /** * * * @generated */ public void setType(QName newType) { QName oldType = type; type = newType; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Wfs20Package.PARAMETER_EXPRESSION_TYPE__TYPE, oldType, type)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case Wfs20Package.PARAMETER_EXPRESSION_TYPE__TITLE: return ((InternalEList)getTitle()).basicRemove(otherEnd, msgs); case Wfs20Package.PARAMETER_EXPRESSION_TYPE__ABSTRACT: return ((InternalEList)getAbstract()).basicRemove(otherEnd, msgs); case Wfs20Package.PARAMETER_EXPRESSION_TYPE__METADATA: return ((InternalEList)getMetadata()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case Wfs20Package.PARAMETER_EXPRESSION_TYPE__TITLE: return getTitle(); case Wfs20Package.PARAMETER_EXPRESSION_TYPE__ABSTRACT: return getAbstract(); case Wfs20Package.PARAMETER_EXPRESSION_TYPE__METADATA: return getMetadata(); case Wfs20Package.PARAMETER_EXPRESSION_TYPE__NAME: return getName(); case Wfs20Package.PARAMETER_EXPRESSION_TYPE__TYPE: return getType(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case Wfs20Package.PARAMETER_EXPRESSION_TYPE__TITLE: getTitle().clear(); getTitle().addAll((Collection)newValue); return; case Wfs20Package.PARAMETER_EXPRESSION_TYPE__ABSTRACT: getAbstract().clear(); getAbstract().addAll((Collection)newValue); return; case Wfs20Package.PARAMETER_EXPRESSION_TYPE__METADATA: getMetadata().clear(); getMetadata().addAll((Collection)newValue); return; case Wfs20Package.PARAMETER_EXPRESSION_TYPE__NAME: setName((String)newValue); return; case Wfs20Package.PARAMETER_EXPRESSION_TYPE__TYPE: setType((QName)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case Wfs20Package.PARAMETER_EXPRESSION_TYPE__TITLE: getTitle().clear(); return; case Wfs20Package.PARAMETER_EXPRESSION_TYPE__ABSTRACT: getAbstract().clear(); return; case Wfs20Package.PARAMETER_EXPRESSION_TYPE__METADATA: getMetadata().clear(); return; case Wfs20Package.PARAMETER_EXPRESSION_TYPE__NAME: setName(NAME_EDEFAULT); return; case Wfs20Package.PARAMETER_EXPRESSION_TYPE__TYPE: setType(TYPE_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case Wfs20Package.PARAMETER_EXPRESSION_TYPE__TITLE: return title != null && !title.isEmpty(); case Wfs20Package.PARAMETER_EXPRESSION_TYPE__ABSTRACT: return abstract_ != null && !abstract_.isEmpty(); case Wfs20Package.PARAMETER_EXPRESSION_TYPE__METADATA: return metadata != null && !metadata.isEmpty(); case Wfs20Package.PARAMETER_EXPRESSION_TYPE__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case Wfs20Package.PARAMETER_EXPRESSION_TYPE__TYPE: return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (name: "); result.append(name); result.append(", type: "); result.append(type); result.append(')'); return result.toString(); } } //ParameterExpressionTypeImpl