org.openxma.dsl.dom.model.impl.ServiceImpl Maven / Gradle / Ivy
/**
*
*
*
* $Id: ServiceImpl.java 10224 2013-01-04 15:48:48Z dschwarz $
*/
package org.openxma.dsl.dom.model.impl;
import java.util.Collection;
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.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
import org.eclipse.emf.ecore.util.InternalEList;
import org.openxma.dsl.core.model.impl.ModelElementImpl;
import org.openxma.dsl.dom.DomPackage;
import org.openxma.dsl.dom.model.DelegateOperation;
import org.openxma.dsl.dom.model.Dependant;
import org.openxma.dsl.dom.model.Operation;
import org.openxma.dsl.dom.model.Service;
/**
*
* An implementation of the model object 'Service'.
*
*
* The following features are implemented:
*
* - {@link org.openxma.dsl.dom.model.impl.ServiceImpl#getDependencies Dependencies}
* - {@link org.openxma.dsl.dom.model.impl.ServiceImpl#getOperations Operations}
* - {@link org.openxma.dsl.dom.model.impl.ServiceImpl#getDelegateOperations Delegate Operations}
*
*
*
* @generated
*/
public class ServiceImpl extends ModelElementImpl implements Service {
/**
* The cached value of the '{@link #getDependencies() Dependencies}' reference list.
*
*
* @see #getDependencies()
* @generated
* @ordered
*/
protected EList dependencies;
/**
* The cached value of the '{@link #getOperations() Operations}' containment reference list.
*
*
* @see #getOperations()
* @generated
* @ordered
*/
protected EList operations;
/**
* The cached value of the '{@link #getDelegateOperations() Delegate Operations}' containment reference list.
*
*
* @see #getDelegateOperations()
* @generated
* @ordered
*/
protected EList delegateOperations;
/**
*
*
* @generated
*/
protected ServiceImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return DomPackage.Literals.SERVICE;
}
/**
*
*
* @generated
*/
public EList getDependencies() {
if (dependencies == null) {
dependencies = new EObjectResolvingEList(Dependant.class, this, DomPackage.SERVICE__DEPENDENCIES);
}
return dependencies;
}
/**
*
*
* @generated
*/
public EList getDelegateOperations() {
if (delegateOperations == null) {
delegateOperations = new EObjectContainmentEList(DelegateOperation.class, this, DomPackage.SERVICE__DELEGATE_OPERATIONS);
}
return delegateOperations;
}
/**
*
*
* @generated
*/
public EList getOperations() {
if (operations == null) {
operations = new EObjectContainmentEList(Operation.class, this, DomPackage.SERVICE__OPERATIONS);
}
return operations;
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case DomPackage.SERVICE__OPERATIONS:
return ((InternalEList)getOperations()).basicRemove(otherEnd, msgs);
case DomPackage.SERVICE__DELEGATE_OPERATIONS:
return ((InternalEList)getDelegateOperations()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case DomPackage.SERVICE__DEPENDENCIES:
return getDependencies();
case DomPackage.SERVICE__OPERATIONS:
return getOperations();
case DomPackage.SERVICE__DELEGATE_OPERATIONS:
return getDelegateOperations();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case DomPackage.SERVICE__DEPENDENCIES:
getDependencies().clear();
getDependencies().addAll((Collection)newValue);
return;
case DomPackage.SERVICE__OPERATIONS:
getOperations().clear();
getOperations().addAll((Collection)newValue);
return;
case DomPackage.SERVICE__DELEGATE_OPERATIONS:
getDelegateOperations().clear();
getDelegateOperations().addAll((Collection)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case DomPackage.SERVICE__DEPENDENCIES:
getDependencies().clear();
return;
case DomPackage.SERVICE__OPERATIONS:
getOperations().clear();
return;
case DomPackage.SERVICE__DELEGATE_OPERATIONS:
getDelegateOperations().clear();
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case DomPackage.SERVICE__DEPENDENCIES:
return dependencies != null && !dependencies.isEmpty();
case DomPackage.SERVICE__OPERATIONS:
return operations != null && !operations.isEmpty();
case DomPackage.SERVICE__DELEGATE_OPERATIONS:
return delegateOperations != null && !delegateOperations.isEmpty();
}
return super.eIsSet(featureID);
}
} //ServiceImpl