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

fr.lip6.move.pnml.symmetricnet.terms.impl.TermsDeclarationImpl Maven / Gradle / Ivy

/**
 *  Copyright 2009-2016 Université Paris Ouest and Sorbonne Universités,
 * 							Univ. Paris 06 - CNRS UMR 7606 (LIP6)
 *
 *  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
 *
 *  Project leader / Initial Contributor:
 *    Lom Messan Hillah - 
 *
 *  Contributors:
 *    ${ocontributors} - <$oemails}>
 *
 *  Mailing list:
 *    [email protected]
 */
/**
 * (C) Sorbonne Universités, UPMC Univ Paris 06, UMR CNRS 7606 (LIP6/MoVe)
 * 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: 
 *    Lom HILLAH (LIP6) - Initial models and implementation
 *    Rachid Alahyane (UPMC) - Infrastructure and continuous integration
 *    Bastien Bouzerau (UPMC) - Architecture 
 *    Guillaume Giffo (UPMC) - Code generation refactoring, High-level API
 */
package fr.lip6.move.pnml.symmetricnet.terms.impl;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.DiagnosticChain;
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.emf.ecore.util.EcoreUtil;

import fr.lip6.move.pnml.symmetricnet.terms.Declarations;
import fr.lip6.move.pnml.symmetricnet.terms.TermsDeclaration;
import fr.lip6.move.pnml.symmetricnet.terms.TermsPackage;

/**
 * 
 * An implementation of the model object 'Declaration'.
 * 
 * 

* The following features are implemented: *

    *
  • {@link fr.lip6.move.pnml.symmetricnet.terms.impl.TermsDeclarationImpl#getId Id}
  • *
  • {@link fr.lip6.move.pnml.symmetricnet.terms.impl.TermsDeclarationImpl#getName Name}
  • *
  • {@link fr.lip6.move.pnml.symmetricnet.terms.impl.TermsDeclarationImpl#getContainerDeclarations Container Declarations}
  • *
*

* * @generated */ public abstract class TermsDeclarationImpl extends MinimalEObjectImpl implements TermsDeclaration { /** * The default value of the '{@link #getId() Id}' attribute. * * * @see #getId() * @generated * @ordered */ protected static final String ID_EDEFAULT = null; /** * The cached value of the '{@link #getId() Id}' attribute. * * * @see #getId() * @generated * @ordered */ protected String id = ID_EDEFAULT; /** * 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 */ protected String name = NAME_EDEFAULT; /** * * * @generated */ protected TermsDeclarationImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return TermsPackage.Literals.TERMS_DECLARATION; } /** * * * @generated */ @Override public String getId() { return id; } /** * * * @generated */ @Override public void setId(String newId) { String oldId = id; id = newId; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TermsPackage.TERMS_DECLARATION__ID, oldId, id)); } /** * * * @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, TermsPackage.TERMS_DECLARATION__NAME, oldName, name)); } /** * * * @generated */ @Override public Declarations getContainerDeclarations() { if (eContainerFeatureID() != TermsPackage.TERMS_DECLARATION__CONTAINER_DECLARATIONS) return null; return (Declarations) eInternalContainer(); } /** * * * @generated */ public NotificationChain basicSetContainerDeclarations(Declarations newContainerDeclarations, NotificationChain msgs) { msgs = eBasicSetContainer((InternalEObject) newContainerDeclarations, TermsPackage.TERMS_DECLARATION__CONTAINER_DECLARATIONS, msgs); return msgs; } /** * * * @generated */ @Override public void setContainerDeclarations(Declarations newContainerDeclarations) { if (newContainerDeclarations != eInternalContainer() || (eContainerFeatureID() != TermsPackage.TERMS_DECLARATION__CONTAINER_DECLARATIONS && newContainerDeclarations != null)) { if (EcoreUtil.isAncestor(this, newContainerDeclarations)) throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); NotificationChain msgs = null; if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); if (newContainerDeclarations != null) msgs = ((InternalEObject) newContainerDeclarations).eInverseAdd(this, TermsPackage.DECLARATIONS__DECLARATION, Declarations.class, msgs); msgs = basicSetContainerDeclarations(newContainerDeclarations, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TermsPackage.TERMS_DECLARATION__CONTAINER_DECLARATIONS, newContainerDeclarations, newContainerDeclarations)); } /** * * * @generated */ @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case TermsPackage.TERMS_DECLARATION__CONTAINER_DECLARATIONS: if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); return basicSetContainerDeclarations((Declarations) otherEnd, msgs); } return super.eInverseAdd(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case TermsPackage.TERMS_DECLARATION__CONTAINER_DECLARATIONS: return basicSetContainerDeclarations(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { switch (eContainerFeatureID()) { case TermsPackage.TERMS_DECLARATION__CONTAINER_DECLARATIONS: return eInternalContainer().eInverseRemove(this, TermsPackage.DECLARATIONS__DECLARATION, Declarations.class, msgs); } return super.eBasicRemoveFromContainerFeature(msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case TermsPackage.TERMS_DECLARATION__ID: return getId(); case TermsPackage.TERMS_DECLARATION__NAME: return getName(); case TermsPackage.TERMS_DECLARATION__CONTAINER_DECLARATIONS: return getContainerDeclarations(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case TermsPackage.TERMS_DECLARATION__ID: setId((String) newValue); return; case TermsPackage.TERMS_DECLARATION__NAME: setName((String) newValue); return; case TermsPackage.TERMS_DECLARATION__CONTAINER_DECLARATIONS: setContainerDeclarations((Declarations) newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case TermsPackage.TERMS_DECLARATION__ID: setId(ID_EDEFAULT); return; case TermsPackage.TERMS_DECLARATION__NAME: setName(NAME_EDEFAULT); return; case TermsPackage.TERMS_DECLARATION__CONTAINER_DECLARATIONS: setContainerDeclarations((Declarations) null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case TermsPackage.TERMS_DECLARATION__ID: return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); case TermsPackage.TERMS_DECLARATION__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case TermsPackage.TERMS_DECLARATION__CONTAINER_DECLARATIONS: return getContainerDeclarations() != null; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (id: "); result.append(id); result.append(", name: "); result.append(name); result.append(')'); return result.toString(); } @Override public abstract boolean validateOCL(DiagnosticChain diagnostics); } //TermsDeclarationImpl




© 2015 - 2025 Weber Informatics LLC | Privacy Policy