All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.bpmn2.impl.ExtensionAttributeDefinitionImpl Maven / Gradle / Ivy

There is a newer version: 7.54.0.Final
Show newest version
/**
 * 
 * 
 * Copyright (c) 2010 SAP AG.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *    Reiner Hille-Doering (SAP AG) - initial API and implementation and/or initial documentation
 * 
 * 
 */
package org.eclipse.bpmn2.impl;

import com.google.gwt.user.client.rpc.GwtTransient;

import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.ExtensionAttributeDefinition;
import org.eclipse.bpmn2.ExtensionDefinition;

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;

import org.eclipse.emf.ecore.util.EcoreUtil;

/**
 * 
 * An implementation of the model object 'Extension Attribute Definition'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.eclipse.bpmn2.impl.ExtensionAttributeDefinitionImpl#getName Name}
  • *
  • {@link org.eclipse.bpmn2.impl.ExtensionAttributeDefinitionImpl#getType Type}
  • *
  • {@link org.eclipse.bpmn2.impl.ExtensionAttributeDefinitionImpl#isIsReference Is Reference}
  • *
  • {@link org.eclipse.bpmn2.impl.ExtensionAttributeDefinitionImpl#getExtensionDefinition Extension Definition}
  • *
* * @generated */ public class ExtensionAttributeDefinitionImpl extends EObjectImpl implements ExtensionAttributeDefinition { /** * The default value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ protected static final String NAME_EDEFAULT = null; /** * The cached value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ @GwtTransient protected String name = NAME_EDEFAULT; /** * The default value of the '{@link #getType() Type}' attribute. * * * @see #getType() * @generated * @ordered */ protected static final String TYPE_EDEFAULT = null; /** * The cached value of the '{@link #getType() Type}' attribute. * * * @see #getType() * @generated * @ordered */ @GwtTransient protected String type = TYPE_EDEFAULT; /** * The default value of the '{@link #isIsReference() Is Reference}' attribute. * * * @see #isIsReference() * @generated * @ordered */ protected static final boolean IS_REFERENCE_EDEFAULT = false; /** * The cached value of the '{@link #isIsReference() Is Reference}' attribute. * * * @see #isIsReference() * @generated * @ordered */ @GwtTransient protected boolean isReference = IS_REFERENCE_EDEFAULT; /** * * * @generated */ protected ExtensionAttributeDefinitionImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return Bpmn2Package.Literals.EXTENSION_ATTRIBUTE_DEFINITION; } /** * * * @generated */ @Override public String getName() { return name; } /** * * * @generated */ @Override public void setName(String newName) { String oldName = name; name = newName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__NAME, oldName, name)); } /** * * * @generated */ @Override public String getType() { return type; } /** * * * @generated */ @Override public void setType(String newType) { String oldType = type; type = newType; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__TYPE, oldType, type)); } /** * * * @generated */ @Override public boolean isIsReference() { return isReference; } /** * * * @generated */ @Override public void setIsReference(boolean newIsReference) { boolean oldIsReference = isReference; isReference = newIsReference; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__IS_REFERENCE, oldIsReference, isReference)); } /** * * * @generated */ @Override public ExtensionDefinition getExtensionDefinition() { if (eContainerFeatureID() != Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__EXTENSION_DEFINITION) return null; return (ExtensionDefinition) eInternalContainer(); } /** * * * @generated */ public NotificationChain basicSetExtensionDefinition(ExtensionDefinition newExtensionDefinition, NotificationChain msgs) { msgs = eBasicSetContainer((InternalEObject) newExtensionDefinition, Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__EXTENSION_DEFINITION, msgs); return msgs; } /** * * * @generated */ @Override public void setExtensionDefinition(ExtensionDefinition newExtensionDefinition) { if (newExtensionDefinition != eInternalContainer() || (eContainerFeatureID() != Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__EXTENSION_DEFINITION && newExtensionDefinition != null)) { if (EcoreUtil.isAncestor(this, newExtensionDefinition)) throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); NotificationChain msgs = null; if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); if (newExtensionDefinition != null) msgs = ((InternalEObject) newExtensionDefinition).eInverseAdd(this, Bpmn2Package.EXTENSION_DEFINITION__EXTENSION_ATTRIBUTE_DEFINITIONS, ExtensionDefinition.class, msgs); msgs = basicSetExtensionDefinition(newExtensionDefinition, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__EXTENSION_DEFINITION, newExtensionDefinition, newExtensionDefinition)); } /** * * * @generated */ @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__EXTENSION_DEFINITION: if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); return basicSetExtensionDefinition((ExtensionDefinition) otherEnd, msgs); } return super.eInverseAdd(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__EXTENSION_DEFINITION: return basicSetExtensionDefinition(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { switch (eContainerFeatureID()) { case Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__EXTENSION_DEFINITION: return eInternalContainer().eInverseRemove(this, Bpmn2Package.EXTENSION_DEFINITION__EXTENSION_ATTRIBUTE_DEFINITIONS, ExtensionDefinition.class, msgs); } return super.eBasicRemoveFromContainerFeature(msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__NAME: return getName(); case Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__TYPE: return getType(); case Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__IS_REFERENCE: return isIsReference(); case Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__EXTENSION_DEFINITION: return getExtensionDefinition(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__NAME: setName((String) newValue); return; case Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__TYPE: setType((String) newValue); return; case Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__IS_REFERENCE: setIsReference((Boolean) newValue); return; case Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__EXTENSION_DEFINITION: setExtensionDefinition((ExtensionDefinition) newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__NAME: setName(NAME_EDEFAULT); return; case Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__TYPE: setType(TYPE_EDEFAULT); return; case Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__IS_REFERENCE: setIsReference(IS_REFERENCE_EDEFAULT); return; case Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__EXTENSION_DEFINITION: setExtensionDefinition((ExtensionDefinition) null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__TYPE: return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); case Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__IS_REFERENCE: return isReference != IS_REFERENCE_EDEFAULT; case Bpmn2Package.EXTENSION_ATTRIBUTE_DEFINITION__EXTENSION_DEFINITION: return getExtensionDefinition() != null; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuilder result = new StringBuilder(super.toString()); result.append(" (name: "); result.append(name); result.append(", type: "); result.append(type); result.append(", isReference: "); result.append(isReference); result.append(')'); return result.toString(); } } //ExtensionAttributeDefinitionImpl




© 2015 - 2025 Weber Informatics LLC | Privacy Policy