| /** |
| */ |
| package org.eclipse.papyrus.bpmn.BPMNProfile.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| 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.MinimalEObjectImpl; |
| import org.eclipse.papyrus.bpmn.BPMNProfile.BPMNProfilePackage; |
| import org.eclipse.papyrus.bpmn.BPMNProfile.ExtensionAttributeDefinition; |
| import org.eclipse.uml2.uml.Property; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Extension Attribute Definition</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.papyrus.bpmn.BPMNProfile.impl.ExtensionAttributeDefinitionImpl#getBase_Property <em>Base Property</em>}</li> |
| * <li>{@link org.eclipse.papyrus.bpmn.BPMNProfile.impl.ExtensionAttributeDefinitionImpl#getType <em>Type</em>}</li> |
| * <li>{@link org.eclipse.papyrus.bpmn.BPMNProfile.impl.ExtensionAttributeDefinitionImpl#isReference <em>Is Reference</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ExtensionAttributeDefinitionImpl extends MinimalEObjectImpl.Container implements ExtensionAttributeDefinition { |
| /** |
| * The cached value of the '{@link #getBase_Property() <em>Base Property</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getBase_Property() |
| * @generated |
| * @ordered |
| */ |
| protected Property base_Property; |
| |
| /** |
| * The default value of the '{@link #getType() <em>Type</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getType() |
| * @generated |
| * @ordered |
| */ |
| protected static final String TYPE_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getType() <em>Type</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getType() |
| * @generated |
| * @ordered |
| */ |
| protected String type = TYPE_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #isReference() <em>Is Reference</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isReference() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean IS_REFERENCE_EDEFAULT = false; |
| |
| /** |
| * The cached value of the '{@link #isReference() <em>Is Reference</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isReference() |
| * @generated |
| * @ordered |
| */ |
| protected boolean isReference = IS_REFERENCE_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ExtensionAttributeDefinitionImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return BPMNProfilePackage.eINSTANCE.getExtensionAttributeDefinition(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Property getBase_Property() { |
| if (base_Property != null && base_Property.eIsProxy()) { |
| InternalEObject oldBase_Property = (InternalEObject)base_Property; |
| base_Property = (Property)eResolveProxy(oldBase_Property); |
| if (base_Property != oldBase_Property) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, BPMNProfilePackage.EXTENSION_ATTRIBUTE_DEFINITION__BASE_PROPERTY, oldBase_Property, base_Property)); |
| } |
| } |
| return base_Property; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Property basicGetBase_Property() { |
| return base_Property; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setBase_Property(Property newBase_Property) { |
| Property oldBase_Property = base_Property; |
| base_Property = newBase_Property; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, BPMNProfilePackage.EXTENSION_ATTRIBUTE_DEFINITION__BASE_PROPERTY, oldBase_Property, base_Property)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getType() { |
| return type; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setType(String newType) { |
| String oldType = type; |
| type = newType; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, BPMNProfilePackage.EXTENSION_ATTRIBUTE_DEFINITION__TYPE, oldType, type)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isReference() { |
| return isReference; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setIsReference(boolean newIsReference) { |
| boolean oldIsReference = isReference; |
| isReference = newIsReference; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, BPMNProfilePackage.EXTENSION_ATTRIBUTE_DEFINITION__IS_REFERENCE, oldIsReference, isReference)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case BPMNProfilePackage.EXTENSION_ATTRIBUTE_DEFINITION__BASE_PROPERTY: |
| if (resolve) return getBase_Property(); |
| return basicGetBase_Property(); |
| case BPMNProfilePackage.EXTENSION_ATTRIBUTE_DEFINITION__TYPE: |
| return getType(); |
| case BPMNProfilePackage.EXTENSION_ATTRIBUTE_DEFINITION__IS_REFERENCE: |
| return isReference(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case BPMNProfilePackage.EXTENSION_ATTRIBUTE_DEFINITION__BASE_PROPERTY: |
| setBase_Property((Property)newValue); |
| return; |
| case BPMNProfilePackage.EXTENSION_ATTRIBUTE_DEFINITION__TYPE: |
| setType((String)newValue); |
| return; |
| case BPMNProfilePackage.EXTENSION_ATTRIBUTE_DEFINITION__IS_REFERENCE: |
| setIsReference((Boolean)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case BPMNProfilePackage.EXTENSION_ATTRIBUTE_DEFINITION__BASE_PROPERTY: |
| setBase_Property((Property)null); |
| return; |
| case BPMNProfilePackage.EXTENSION_ATTRIBUTE_DEFINITION__TYPE: |
| setType(TYPE_EDEFAULT); |
| return; |
| case BPMNProfilePackage.EXTENSION_ATTRIBUTE_DEFINITION__IS_REFERENCE: |
| setIsReference(IS_REFERENCE_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case BPMNProfilePackage.EXTENSION_ATTRIBUTE_DEFINITION__BASE_PROPERTY: |
| return base_Property != null; |
| case BPMNProfilePackage.EXTENSION_ATTRIBUTE_DEFINITION__TYPE: |
| return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); |
| case BPMNProfilePackage.EXTENSION_ATTRIBUTE_DEFINITION__IS_REFERENCE: |
| return isReference != IS_REFERENCE_EDEFAULT; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public String toString() { |
| if (eIsProxy()) return super.toString(); |
| |
| StringBuffer result = new StringBuffer(super.toString()); |
| result.append(" (type: "); |
| result.append(type); |
| result.append(", isReference: "); |
| result.append(isReference); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //ExtensionAttributeDefinitionImpl |