From dbbf707d78c76f4bc001d7df2418bd6ceab12db3 Mon Sep 17 00:00:00 2001 From: OszkarSemerath Date: Sat, 24 Mar 2018 22:08:23 -0400 Subject: example projects added --- .../impl/FunctionalElementImpl.java | 318 +++++++++++++++++++++ 1 file changed, 318 insertions(+) create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalElementImpl.java (limited to 'Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalElementImpl.java') diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalElementImpl.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalElementImpl.java new file mode 100644 index 00000000..809e9ed5 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalElementImpl.java @@ -0,0 +1,318 @@ +/** + */ +package functionalarchitecture.impl; + +import functionalarchitecture.Function; +import functionalarchitecture.FunctionalArchitectureModel; +import functionalarchitecture.FunctionalElement; +import functionalarchitecture.FunctionalInterface; +import functionalarchitecture.FunctionalarchitecturePackage; + +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.EStructuralFeature; +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; + +/** + * + * An implementation of the model object 'Functional Element'. + * + *

+ * The following features are implemented: + *

+ * + * + * @generated + */ +public abstract class FunctionalElementImpl extends MinimalEObjectImpl.Container implements FunctionalElement { + /** + * The cached value of the '{@link #getInterface() Interface}' containment reference. + * + * + * @see #getInterface() + * @generated + * @ordered + */ + protected FunctionalInterface interface_; + + /** + * The cached setting delegate for the '{@link #getModel() Model}' reference. + * + * + * @see #getModel() + * @generated + * @ordered + */ + protected EStructuralFeature.Internal.SettingDelegate MODEL__ESETTING_DELEGATE = ((EStructuralFeature.Internal)FunctionalarchitecturePackage.Literals.FUNCTIONAL_ELEMENT__MODEL).getSettingDelegate(); + + /** + * + * + * @generated + */ + protected FunctionalElementImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionalarchitecturePackage.Literals.FUNCTIONAL_ELEMENT; + } + + /** + * + * + * @generated + */ + public FunctionalInterface getInterface() { + return interface_; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetInterface(FunctionalInterface newInterface, NotificationChain msgs) { + FunctionalInterface oldInterface = interface_; + interface_ = newInterface; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE, oldInterface, newInterface); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setInterface(FunctionalInterface newInterface) { + if (newInterface != interface_) { + NotificationChain msgs = null; + if (interface_ != null) + msgs = ((InternalEObject)interface_).eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT, FunctionalInterface.class, msgs); + if (newInterface != null) + msgs = ((InternalEObject)newInterface).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT, FunctionalInterface.class, msgs); + msgs = basicSetInterface(newInterface, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE, newInterface, newInterface)); + } + + /** + * + * + * @generated + */ + public FunctionalArchitectureModel getModel() { + return (FunctionalArchitectureModel)MODEL__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false); + } + + /** + * + * + * @generated + */ + public FunctionalArchitectureModel basicGetModel() { + return (FunctionalArchitectureModel)MODEL__ESETTING_DELEGATE.dynamicGet(this, null, 0, false, false); + } + + /** + * + * + * @generated + */ + public void setModel(FunctionalArchitectureModel newModel) { + MODEL__ESETTING_DELEGATE.dynamicSet(this, null, 0, newModel); + } + + /** + * + * + * @generated + */ + public Function getParent() { + if (eContainerFeatureID() != FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT) return null; + return (Function)eInternalContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetParent(Function newParent, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject)newParent, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + public void setParent(Function newParent) { + if (newParent != eInternalContainer() || (eContainerFeatureID() != FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT && newParent != null)) { + if (EcoreUtil.isAncestor(this, newParent)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newParent != null) + msgs = ((InternalEObject)newParent).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTION__SUB_ELEMENTS, Function.class, msgs); + msgs = basicSetParent(newParent, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT, newParent, newParent)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE: + if (interface_ != null) + msgs = ((InternalEObject)interface_).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE, null, msgs); + return basicSetInterface((FunctionalInterface)otherEnd, msgs); + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetParent((Function)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE: + return basicSetInterface(null, msgs); + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT: + return basicSetParent(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT: + return eInternalContainer().eInverseRemove(this, FunctionalarchitecturePackage.FUNCTION__SUB_ELEMENTS, Function.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE: + return getInterface(); + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__MODEL: + if (resolve) return getModel(); + return basicGetModel(); + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT: + return getParent(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE: + setInterface((FunctionalInterface)newValue); + return; + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__MODEL: + setModel((FunctionalArchitectureModel)newValue); + return; + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT: + setParent((Function)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE: + setInterface((FunctionalInterface)null); + return; + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__MODEL: + setModel((FunctionalArchitectureModel)null); + return; + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT: + setParent((Function)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE: + return interface_ != null; + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__MODEL: + return MODEL__ESETTING_DELEGATE.dynamicIsSet(this, null, 0); + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT: + return getParent() != null; + } + return super.eIsSet(featureID); + } + +} //FunctionalElementImpl -- cgit v1.2.3-54-g00ecf