/**
*
*
*
* $Id$
*/
package net.opengis.wps10.impl;
import net.opengis.wps10.OutputDefinitionType;
import net.opengis.wps10.ResponseDocumentType;
import net.opengis.wps10.ResponseFormType;
import net.opengis.wps10.Wps10Package;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
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;
/**
*
* An implementation of the model object 'Response Form Type'.
*
*
* The following features are implemented:
*
* - {@link net.opengis.wps10.impl.ResponseFormTypeImpl#getResponseDocument Response Document}
* - {@link net.opengis.wps10.impl.ResponseFormTypeImpl#getRawDataOutput Raw Data Output}
*
*
*
* @generated
*/
public class ResponseFormTypeImpl extends EObjectImpl implements ResponseFormType {
/**
* The cached value of the '{@link #getResponseDocument() Response Document}' containment reference.
*
*
* @see #getResponseDocument()
* @generated
* @ordered
*/
protected ResponseDocumentType responseDocument;
/**
* The cached value of the '{@link #getRawDataOutput() Raw Data Output}' containment reference.
*
*
* @see #getRawDataOutput()
* @generated
* @ordered
*/
protected OutputDefinitionType rawDataOutput;
/**
*
*
* @generated
*/
protected ResponseFormTypeImpl() {
super();
}
/**
*
*
* @generated
*/
protected EClass eStaticClass() {
return Wps10Package.Literals.RESPONSE_FORM_TYPE;
}
/**
*
*
* @generated
*/
public ResponseDocumentType getResponseDocument() {
return responseDocument;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetResponseDocument(ResponseDocumentType newResponseDocument, NotificationChain msgs) {
ResponseDocumentType oldResponseDocument = responseDocument;
responseDocument = newResponseDocument;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wps10Package.RESPONSE_FORM_TYPE__RESPONSE_DOCUMENT, oldResponseDocument, newResponseDocument);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
*
*
* @generated
*/
public void setResponseDocument(ResponseDocumentType newResponseDocument) {
if (newResponseDocument != responseDocument) {
NotificationChain msgs = null;
if (responseDocument != null)
msgs = ((InternalEObject)responseDocument).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Wps10Package.RESPONSE_FORM_TYPE__RESPONSE_DOCUMENT, null, msgs);
if (newResponseDocument != null)
msgs = ((InternalEObject)newResponseDocument).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Wps10Package.RESPONSE_FORM_TYPE__RESPONSE_DOCUMENT, null, msgs);
msgs = basicSetResponseDocument(newResponseDocument, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wps10Package.RESPONSE_FORM_TYPE__RESPONSE_DOCUMENT, newResponseDocument, newResponseDocument));
}
/**
*
*
* @generated
*/
public OutputDefinitionType getRawDataOutput() {
return rawDataOutput;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetRawDataOutput(OutputDefinitionType newRawDataOutput, NotificationChain msgs) {
OutputDefinitionType oldRawDataOutput = rawDataOutput;
rawDataOutput = newRawDataOutput;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wps10Package.RESPONSE_FORM_TYPE__RAW_DATA_OUTPUT, oldRawDataOutput, newRawDataOutput);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
*
*
* @generated
*/
public void setRawDataOutput(OutputDefinitionType newRawDataOutput) {
if (newRawDataOutput != rawDataOutput) {
NotificationChain msgs = null;
if (rawDataOutput != null)
msgs = ((InternalEObject)rawDataOutput).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Wps10Package.RESPONSE_FORM_TYPE__RAW_DATA_OUTPUT, null, msgs);
if (newRawDataOutput != null)
msgs = ((InternalEObject)newRawDataOutput).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Wps10Package.RESPONSE_FORM_TYPE__RAW_DATA_OUTPUT, null, msgs);
msgs = basicSetRawDataOutput(newRawDataOutput, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wps10Package.RESPONSE_FORM_TYPE__RAW_DATA_OUTPUT, newRawDataOutput, newRawDataOutput));
}
/**
*
*
* @generated
*/
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case Wps10Package.RESPONSE_FORM_TYPE__RESPONSE_DOCUMENT:
return basicSetResponseDocument(null, msgs);
case Wps10Package.RESPONSE_FORM_TYPE__RAW_DATA_OUTPUT:
return basicSetRawDataOutput(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Wps10Package.RESPONSE_FORM_TYPE__RESPONSE_DOCUMENT:
return getResponseDocument();
case Wps10Package.RESPONSE_FORM_TYPE__RAW_DATA_OUTPUT:
return getRawDataOutput();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Wps10Package.RESPONSE_FORM_TYPE__RESPONSE_DOCUMENT:
setResponseDocument((ResponseDocumentType)newValue);
return;
case Wps10Package.RESPONSE_FORM_TYPE__RAW_DATA_OUTPUT:
setRawDataOutput((OutputDefinitionType)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
public void eUnset(int featureID) {
switch (featureID) {
case Wps10Package.RESPONSE_FORM_TYPE__RESPONSE_DOCUMENT:
setResponseDocument((ResponseDocumentType)null);
return;
case Wps10Package.RESPONSE_FORM_TYPE__RAW_DATA_OUTPUT:
setRawDataOutput((OutputDefinitionType)null);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
public boolean eIsSet(int featureID) {
switch (featureID) {
case Wps10Package.RESPONSE_FORM_TYPE__RESPONSE_DOCUMENT:
return responseDocument != null;
case Wps10Package.RESPONSE_FORM_TYPE__RAW_DATA_OUTPUT:
return rawDataOutput != null;
}
return super.eIsSet(featureID);
}
} //ResponseFormTypeImpl