/**
*
*
*
* $Id$
*/
package net.opengis.wps10.impl;
import javax.xml.datatype.XMLGregorianCalendar;
import net.opengis.wps10.ProcessFailedType;
import net.opengis.wps10.ProcessStartedType;
import net.opengis.wps10.StatusType;
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 'Status Type'.
*
*
* The following features are implemented:
*
* - {@link net.opengis.wps10.impl.StatusTypeImpl#getProcessAccepted Process Accepted}
* - {@link net.opengis.wps10.impl.StatusTypeImpl#getProcessStarted Process Started}
* - {@link net.opengis.wps10.impl.StatusTypeImpl#getProcessPaused Process Paused}
* - {@link net.opengis.wps10.impl.StatusTypeImpl#getProcessSucceeded Process Succeeded}
* - {@link net.opengis.wps10.impl.StatusTypeImpl#getProcessFailed Process Failed}
* - {@link net.opengis.wps10.impl.StatusTypeImpl#getCreationTime Creation Time}
*
*
*
* @generated
*/
public class StatusTypeImpl extends EObjectImpl implements StatusType {
/**
* The default value of the '{@link #getProcessAccepted() Process Accepted}' attribute.
*
*
* @see #getProcessAccepted()
* @generated
* @ordered
*/
protected static final String PROCESS_ACCEPTED_EDEFAULT = null;
/**
* The cached value of the '{@link #getProcessAccepted() Process Accepted}' attribute.
*
*
* @see #getProcessAccepted()
* @generated
* @ordered
*/
protected String processAccepted = PROCESS_ACCEPTED_EDEFAULT;
/**
* The cached value of the '{@link #getProcessStarted() Process Started}' containment reference.
*
*
* @see #getProcessStarted()
* @generated
* @ordered
*/
protected ProcessStartedType processStarted;
/**
* The cached value of the '{@link #getProcessPaused() Process Paused}' containment reference.
*
*
* @see #getProcessPaused()
* @generated
* @ordered
*/
protected ProcessStartedType processPaused;
/**
* The default value of the '{@link #getProcessSucceeded() Process Succeeded}' attribute.
*
*
* @see #getProcessSucceeded()
* @generated
* @ordered
*/
protected static final String PROCESS_SUCCEEDED_EDEFAULT = null;
/**
* The cached value of the '{@link #getProcessSucceeded() Process Succeeded}' attribute.
*
*
* @see #getProcessSucceeded()
* @generated
* @ordered
*/
protected String processSucceeded = PROCESS_SUCCEEDED_EDEFAULT;
/**
* The cached value of the '{@link #getProcessFailed() Process Failed}' containment reference.
*
*
* @see #getProcessFailed()
* @generated
* @ordered
*/
protected ProcessFailedType processFailed;
/**
* The default value of the '{@link #getCreationTime() Creation Time}' attribute.
*
*
* @see #getCreationTime()
* @generated
* @ordered
*/
protected static final Object CREATION_TIME_EDEFAULT = null;
/**
* The cached value of the '{@link #getCreationTime() Creation Time}' attribute.
*
*
* @see #getCreationTime()
* @generated
* @ordered
*/
protected Object creationTime = CREATION_TIME_EDEFAULT;
/**
*
*
* @generated
*/
protected StatusTypeImpl() {
super();
}
/**
*
*
* @generated
*/
protected EClass eStaticClass() {
return Wps10Package.Literals.STATUS_TYPE;
}
/**
*
*
* @generated
*/
public String getProcessAccepted() {
return processAccepted;
}
/**
*
*
* @generated
*/
public void setProcessAccepted(String newProcessAccepted) {
String oldProcessAccepted = processAccepted;
processAccepted = newProcessAccepted;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wps10Package.STATUS_TYPE__PROCESS_ACCEPTED, oldProcessAccepted, processAccepted));
}
/**
*
*
* @generated
*/
public ProcessStartedType getProcessStarted() {
return processStarted;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetProcessStarted(ProcessStartedType newProcessStarted, NotificationChain msgs) {
ProcessStartedType oldProcessStarted = processStarted;
processStarted = newProcessStarted;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wps10Package.STATUS_TYPE__PROCESS_STARTED, oldProcessStarted, newProcessStarted);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
*
*
* @generated
*/
public void setProcessStarted(ProcessStartedType newProcessStarted) {
if (newProcessStarted != processStarted) {
NotificationChain msgs = null;
if (processStarted != null)
msgs = ((InternalEObject)processStarted).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Wps10Package.STATUS_TYPE__PROCESS_STARTED, null, msgs);
if (newProcessStarted != null)
msgs = ((InternalEObject)newProcessStarted).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Wps10Package.STATUS_TYPE__PROCESS_STARTED, null, msgs);
msgs = basicSetProcessStarted(newProcessStarted, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wps10Package.STATUS_TYPE__PROCESS_STARTED, newProcessStarted, newProcessStarted));
}
/**
*
*
* @generated
*/
public ProcessStartedType getProcessPaused() {
return processPaused;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetProcessPaused(ProcessStartedType newProcessPaused, NotificationChain msgs) {
ProcessStartedType oldProcessPaused = processPaused;
processPaused = newProcessPaused;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wps10Package.STATUS_TYPE__PROCESS_PAUSED, oldProcessPaused, newProcessPaused);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
*
*
* @generated
*/
public void setProcessPaused(ProcessStartedType newProcessPaused) {
if (newProcessPaused != processPaused) {
NotificationChain msgs = null;
if (processPaused != null)
msgs = ((InternalEObject)processPaused).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Wps10Package.STATUS_TYPE__PROCESS_PAUSED, null, msgs);
if (newProcessPaused != null)
msgs = ((InternalEObject)newProcessPaused).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Wps10Package.STATUS_TYPE__PROCESS_PAUSED, null, msgs);
msgs = basicSetProcessPaused(newProcessPaused, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wps10Package.STATUS_TYPE__PROCESS_PAUSED, newProcessPaused, newProcessPaused));
}
/**
*
*
* @generated
*/
public String getProcessSucceeded() {
return processSucceeded;
}
/**
*
*
* @generated
*/
public void setProcessSucceeded(String newProcessSucceeded) {
String oldProcessSucceeded = processSucceeded;
processSucceeded = newProcessSucceeded;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wps10Package.STATUS_TYPE__PROCESS_SUCCEEDED, oldProcessSucceeded, processSucceeded));
}
/**
*
*
* @generated
*/
public ProcessFailedType getProcessFailed() {
return processFailed;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetProcessFailed(ProcessFailedType newProcessFailed, NotificationChain msgs) {
ProcessFailedType oldProcessFailed = processFailed;
processFailed = newProcessFailed;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wps10Package.STATUS_TYPE__PROCESS_FAILED, oldProcessFailed, newProcessFailed);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
*
*
* @generated
*/
public void setProcessFailed(ProcessFailedType newProcessFailed) {
if (newProcessFailed != processFailed) {
NotificationChain msgs = null;
if (processFailed != null)
msgs = ((InternalEObject)processFailed).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Wps10Package.STATUS_TYPE__PROCESS_FAILED, null, msgs);
if (newProcessFailed != null)
msgs = ((InternalEObject)newProcessFailed).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Wps10Package.STATUS_TYPE__PROCESS_FAILED, null, msgs);
msgs = basicSetProcessFailed(newProcessFailed, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wps10Package.STATUS_TYPE__PROCESS_FAILED, newProcessFailed, newProcessFailed));
}
/**
*
*
* @generated
*/
public Object getCreationTime() {
return creationTime;
}
/**
*
*
* @generated
*/
public void setCreationTime(Object newCreationTime) {
Object oldCreationTime = creationTime;
creationTime = newCreationTime;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wps10Package.STATUS_TYPE__CREATION_TIME, oldCreationTime, creationTime));
}
/**
*
*
* @generated
*/
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case Wps10Package.STATUS_TYPE__PROCESS_STARTED:
return basicSetProcessStarted(null, msgs);
case Wps10Package.STATUS_TYPE__PROCESS_PAUSED:
return basicSetProcessPaused(null, msgs);
case Wps10Package.STATUS_TYPE__PROCESS_FAILED:
return basicSetProcessFailed(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Wps10Package.STATUS_TYPE__PROCESS_ACCEPTED:
return getProcessAccepted();
case Wps10Package.STATUS_TYPE__PROCESS_STARTED:
return getProcessStarted();
case Wps10Package.STATUS_TYPE__PROCESS_PAUSED:
return getProcessPaused();
case Wps10Package.STATUS_TYPE__PROCESS_SUCCEEDED:
return getProcessSucceeded();
case Wps10Package.STATUS_TYPE__PROCESS_FAILED:
return getProcessFailed();
case Wps10Package.STATUS_TYPE__CREATION_TIME:
return getCreationTime();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Wps10Package.STATUS_TYPE__PROCESS_ACCEPTED:
setProcessAccepted((String)newValue);
return;
case Wps10Package.STATUS_TYPE__PROCESS_STARTED:
setProcessStarted((ProcessStartedType)newValue);
return;
case Wps10Package.STATUS_TYPE__PROCESS_PAUSED:
setProcessPaused((ProcessStartedType)newValue);
return;
case Wps10Package.STATUS_TYPE__PROCESS_SUCCEEDED:
setProcessSucceeded((String)newValue);
return;
case Wps10Package.STATUS_TYPE__PROCESS_FAILED:
setProcessFailed((ProcessFailedType)newValue);
return;
case Wps10Package.STATUS_TYPE__CREATION_TIME:
setCreationTime(newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
public void eUnset(int featureID) {
switch (featureID) {
case Wps10Package.STATUS_TYPE__PROCESS_ACCEPTED:
setProcessAccepted(PROCESS_ACCEPTED_EDEFAULT);
return;
case Wps10Package.STATUS_TYPE__PROCESS_STARTED:
setProcessStarted((ProcessStartedType)null);
return;
case Wps10Package.STATUS_TYPE__PROCESS_PAUSED:
setProcessPaused((ProcessStartedType)null);
return;
case Wps10Package.STATUS_TYPE__PROCESS_SUCCEEDED:
setProcessSucceeded(PROCESS_SUCCEEDED_EDEFAULT);
return;
case Wps10Package.STATUS_TYPE__PROCESS_FAILED:
setProcessFailed((ProcessFailedType)null);
return;
case Wps10Package.STATUS_TYPE__CREATION_TIME:
setCreationTime(CREATION_TIME_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
public boolean eIsSet(int featureID) {
switch (featureID) {
case Wps10Package.STATUS_TYPE__PROCESS_ACCEPTED:
return PROCESS_ACCEPTED_EDEFAULT == null ? processAccepted != null : !PROCESS_ACCEPTED_EDEFAULT.equals(processAccepted);
case Wps10Package.STATUS_TYPE__PROCESS_STARTED:
return processStarted != null;
case Wps10Package.STATUS_TYPE__PROCESS_PAUSED:
return processPaused != null;
case Wps10Package.STATUS_TYPE__PROCESS_SUCCEEDED:
return PROCESS_SUCCEEDED_EDEFAULT == null ? processSucceeded != null : !PROCESS_SUCCEEDED_EDEFAULT.equals(processSucceeded);
case Wps10Package.STATUS_TYPE__PROCESS_FAILED:
return processFailed != null;
case Wps10Package.STATUS_TYPE__CREATION_TIME:
return CREATION_TIME_EDEFAULT == null ? creationTime != null : !CREATION_TIME_EDEFAULT.equals(creationTime);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (processAccepted: ");
result.append(processAccepted);
result.append(", processSucceeded: ");
result.append(processSucceeded);
result.append(", creationTime: ");
result.append(creationTime);
result.append(')');
return result.toString();
}
} //StatusTypeImpl