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

org.nasdanika.models.architecture.impl.CompositeRelationshipTargetImpl Maven / Gradle / Ivy

The newest version!
/**
 */
package org.nasdanika.models.architecture.impl;

import java.util.Collection;

import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

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

import org.nasdanika.graph.model.ConnectionTarget;
import org.nasdanika.graph.model.DocumentedNamedConnectionTarget;
import org.nasdanika.graph.model.ModelPackage;

import org.nasdanika.models.architecture.ArchitecturePackage;
import org.nasdanika.models.architecture.CompositeRelationshipTarget;
import org.nasdanika.models.architecture.Relationship;
import org.nasdanika.models.architecture.RelationshipTarget;

/**
 * 
 * An implementation of the model object 'Composite Relationship Target'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.nasdanika.models.architecture.impl.CompositeRelationshipTargetImpl#getIncomingConnections Incoming Connections}
  • *
* * @generated */ public class CompositeRelationshipTargetImpl extends DomainImpl implements CompositeRelationshipTarget { /** * * * @generated */ protected CompositeRelationshipTargetImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return ArchitecturePackage.Literals.COMPOSITE_RELATIONSHIP_TARGET; } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public EList getIncomingConnections() { return (EList)eDynamicGet(ArchitecturePackage.COMPOSITE_RELATIONSHIP_TARGET__INCOMING_CONNECTIONS, ModelPackage.Literals.CONNECTION_TARGET__INCOMING_CONNECTIONS, true, true); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case ArchitecturePackage.COMPOSITE_RELATIONSHIP_TARGET__INCOMING_CONNECTIONS: return ((InternalEList)(InternalEList)getIncomingConnections()).basicAdd(otherEnd, msgs); } return super.eInverseAdd(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case ArchitecturePackage.COMPOSITE_RELATIONSHIP_TARGET__INCOMING_CONNECTIONS: return ((InternalEList)getIncomingConnections()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case ArchitecturePackage.COMPOSITE_RELATIONSHIP_TARGET__INCOMING_CONNECTIONS: return getIncomingConnections(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case ArchitecturePackage.COMPOSITE_RELATIONSHIP_TARGET__INCOMING_CONNECTIONS: getIncomingConnections().clear(); getIncomingConnections().addAll((Collection)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case ArchitecturePackage.COMPOSITE_RELATIONSHIP_TARGET__INCOMING_CONNECTIONS: getIncomingConnections().clear(); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case ArchitecturePackage.COMPOSITE_RELATIONSHIP_TARGET__INCOMING_CONNECTIONS: return !getIncomingConnections().isEmpty(); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { if (baseClass == ConnectionTarget.class) { switch (derivedFeatureID) { case ArchitecturePackage.COMPOSITE_RELATIONSHIP_TARGET__INCOMING_CONNECTIONS: return ModelPackage.CONNECTION_TARGET__INCOMING_CONNECTIONS; default: return -1; } } if (baseClass == DocumentedNamedConnectionTarget.class) { switch (derivedFeatureID) { default: return -1; } } if (baseClass == RelationshipTarget.class) { switch (derivedFeatureID) { default: return -1; } } return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); } /** * * * @generated */ @Override public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { if (baseClass == ConnectionTarget.class) { switch (baseFeatureID) { case ModelPackage.CONNECTION_TARGET__INCOMING_CONNECTIONS: return ArchitecturePackage.COMPOSITE_RELATIONSHIP_TARGET__INCOMING_CONNECTIONS; default: return -1; } } if (baseClass == DocumentedNamedConnectionTarget.class) { switch (baseFeatureID) { default: return -1; } } if (baseClass == RelationshipTarget.class) { switch (baseFeatureID) { default: return -1; } } return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); } } //CompositeRelationshipTargetImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy