diff options
Diffstat (limited to 'plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/impl/ConcernImpl.java')
-rw-r--r-- | plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/impl/ConcernImpl.java | 203 |
1 files changed, 203 insertions, 0 deletions
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/impl/ConcernImpl.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/impl/ConcernImpl.java new file mode 100644 index 00000000000..5c877f24095 --- /dev/null +++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.architecture/src-gen/org/eclipse/papyrus/infra/core/architecture/impl/ConcernImpl.java @@ -0,0 +1,203 @@ +/** +* Copyright (c) 2017 CEA LIST. + * + * 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: + * Maged Elaasar - Initial API and implementation + * + * + */ +package org.eclipse.papyrus.infra.core.architecture.impl; + +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.util.EcoreUtil; +import org.eclipse.papyrus.infra.core.architecture.ArchitectureDomain; +import org.eclipse.papyrus.infra.core.architecture.ArchitecturePackage; +import org.eclipse.papyrus.infra.core.architecture.Concern; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Concern</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrus.infra.core.architecture.impl.ConcernImpl#getDomain <em>Domain</em>}</li> + * </ul> + * + * @generated + */ +public class ConcernImpl extends ADElementImpl implements Concern { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ConcernImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ArchitecturePackage.Literals.CONCERN; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ArchitectureDomain getDomain() { + if (eContainerFeatureID() != ArchitecturePackage.CONCERN__DOMAIN) return null; + return (ArchitectureDomain)eInternalContainer(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetDomain(ArchitectureDomain newDomain, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject)newDomain, ArchitecturePackage.CONCERN__DOMAIN, msgs); + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDomain(ArchitectureDomain newDomain) { + if (newDomain != eInternalContainer() || (eContainerFeatureID() != ArchitecturePackage.CONCERN__DOMAIN && newDomain != null)) { + if (EcoreUtil.isAncestor(this, newDomain)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newDomain != null) + msgs = ((InternalEObject)newDomain).eInverseAdd(this, ArchitecturePackage.ARCHITECTURE_DOMAIN__CONCERNS, ArchitectureDomain.class, msgs); + msgs = basicSetDomain(newDomain, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ArchitecturePackage.CONCERN__DOMAIN, newDomain, newDomain)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ArchitecturePackage.CONCERN__DOMAIN: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetDomain((ArchitectureDomain)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ArchitecturePackage.CONCERN__DOMAIN: + return basicSetDomain(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case ArchitecturePackage.CONCERN__DOMAIN: + return eInternalContainer().eInverseRemove(this, ArchitecturePackage.ARCHITECTURE_DOMAIN__CONCERNS, ArchitectureDomain.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ArchitecturePackage.CONCERN__DOMAIN: + return getDomain(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ArchitecturePackage.CONCERN__DOMAIN: + setDomain((ArchitectureDomain)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ArchitecturePackage.CONCERN__DOMAIN: + setDomain((ArchitectureDomain)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ArchitecturePackage.CONCERN__DOMAIN: + return getDomain() != null; + } + return super.eIsSet(featureID); + } + +} //ConcernImpl |