1 7 package Olj.impl; 8 9 import Olj.OljPackage; 10 import Olj.TransformationType; 11 import Olj.TransformationsType; 12 13 import java.util.Collection ; 14 15 import org.eclipse.emf.common.notify.NotificationChain; 16 17 import org.eclipse.emf.common.util.EList; 18 19 import org.eclipse.emf.ecore.EClass; 20 import org.eclipse.emf.ecore.EStructuralFeature; 21 import org.eclipse.emf.ecore.InternalEObject; 22 23 import org.eclipse.emf.ecore.impl.EObjectImpl; 24 25 import org.eclipse.emf.ecore.util.EObjectContainmentEList; 26 import org.eclipse.emf.ecore.util.InternalEList; 27 28 41 public class TransformationsTypeImpl extends EObjectImpl implements TransformationsType { 42 50 protected EList transformation = null; 51 52 57 protected TransformationsTypeImpl() { 58 super(); 59 } 60 61 66 protected EClass eStaticClass() { 67 return OljPackage.eINSTANCE.getTransformationsType(); 68 } 69 70 75 public EList getTransformation() { 76 if (transformation == null) { 77 transformation = new EObjectContainmentEList(TransformationType.class, this, OljPackage.TRANSFORMATIONS_TYPE__TRANSFORMATION); 78 } 79 return transformation; 80 } 81 82 87 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { 88 if (featureID >= 0) { 89 switch (eDerivedStructuralFeatureID(featureID, baseClass)) { 90 case OljPackage.TRANSFORMATIONS_TYPE__TRANSFORMATION: 91 return ((InternalEList)getTransformation()).basicRemove(otherEnd, msgs); 92 default: 93 return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); 94 } 95 } 96 return eBasicSetContainer(null, featureID, msgs); 97 } 98 99 104 public Object eGet(EStructuralFeature eFeature, boolean resolve) { 105 switch (eDerivedStructuralFeatureID(eFeature)) { 106 case OljPackage.TRANSFORMATIONS_TYPE__TRANSFORMATION: 107 return getTransformation(); 108 } 109 return eDynamicGet(eFeature, resolve); 110 } 111 112 117 public void eSet(EStructuralFeature eFeature, Object newValue) { 118 switch (eDerivedStructuralFeatureID(eFeature)) { 119 case OljPackage.TRANSFORMATIONS_TYPE__TRANSFORMATION: 120 getTransformation().clear(); 121 getTransformation().addAll((Collection )newValue); 122 return; 123 } 124 eDynamicSet(eFeature, newValue); 125 } 126 127 132 public void eUnset(EStructuralFeature eFeature) { 133 switch (eDerivedStructuralFeatureID(eFeature)) { 134 case OljPackage.TRANSFORMATIONS_TYPE__TRANSFORMATION: 135 getTransformation().clear(); 136 return; 137 } 138 eDynamicUnset(eFeature); 139 } 140 141 146 public boolean eIsSet(EStructuralFeature eFeature) { 147 switch (eDerivedStructuralFeatureID(eFeature)) { 148 case OljPackage.TRANSFORMATIONS_TYPE__TRANSFORMATION: 149 return transformation != null && !transformation.isEmpty(); 150 } 151 return eDynamicIsSet(eFeature); 152 } 153 154 } | Popular Tags |