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

org.contextmapper.dsl.contextMappingDSL.impl.UpstreamDownstreamRelationshipImpl Maven / Gradle / Ivy

There is a newer version: 6.12.0
Show newest version
/**
 * generated by Xtext 2.20.0
 */
package org.contextmapper.dsl.contextMappingDSL.impl;

import java.util.Collection;

import org.contextmapper.dsl.contextMappingDSL.Aggregate;
import org.contextmapper.dsl.contextMappingDSL.BoundedContext;
import org.contextmapper.dsl.contextMappingDSL.ContextMappingDSLPackage;
import org.contextmapper.dsl.contextMappingDSL.DownstreamGovernanceRights;
import org.contextmapper.dsl.contextMappingDSL.DownstreamRole;
import org.contextmapper.dsl.contextMappingDSL.UpstreamDownstreamRelationship;
import org.contextmapper.dsl.contextMappingDSL.UpstreamRole;

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

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

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.EDataTypeEList;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;

/**
 * 
 * An implementation of the model object 'Upstream Downstream Relationship'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.contextmapper.dsl.contextMappingDSL.impl.UpstreamDownstreamRelationshipImpl#getUpstream Upstream}
  • *
  • {@link org.contextmapper.dsl.contextMappingDSL.impl.UpstreamDownstreamRelationshipImpl#getUpstreamRoles Upstream Roles}
  • *
  • {@link org.contextmapper.dsl.contextMappingDSL.impl.UpstreamDownstreamRelationshipImpl#getDownstreamRoles Downstream Roles}
  • *
  • {@link org.contextmapper.dsl.contextMappingDSL.impl.UpstreamDownstreamRelationshipImpl#getDownstream Downstream}
  • *
  • {@link org.contextmapper.dsl.contextMappingDSL.impl.UpstreamDownstreamRelationshipImpl#getUpstreamExposedAggregates Upstream Exposed Aggregates}
  • *
  • {@link org.contextmapper.dsl.contextMappingDSL.impl.UpstreamDownstreamRelationshipImpl#getExposedAggregatesComment Exposed Aggregates Comment}
  • *
  • {@link org.contextmapper.dsl.contextMappingDSL.impl.UpstreamDownstreamRelationshipImpl#getDownstreamGovernanceRights Downstream Governance Rights}
  • *
* * @generated */ public class UpstreamDownstreamRelationshipImpl extends RelationshipImpl implements UpstreamDownstreamRelationship { /** * The cached value of the '{@link #getUpstream() Upstream}' reference. * * * @see #getUpstream() * @generated * @ordered */ protected BoundedContext upstream; /** * The cached value of the '{@link #getUpstreamRoles() Upstream Roles}' attribute list. * * * @see #getUpstreamRoles() * @generated * @ordered */ protected EList upstreamRoles; /** * The cached value of the '{@link #getDownstreamRoles() Downstream Roles}' attribute list. * * * @see #getDownstreamRoles() * @generated * @ordered */ protected EList downstreamRoles; /** * The cached value of the '{@link #getDownstream() Downstream}' reference. * * * @see #getDownstream() * @generated * @ordered */ protected BoundedContext downstream; /** * The cached value of the '{@link #getUpstreamExposedAggregates() Upstream Exposed Aggregates}' reference list. * * * @see #getUpstreamExposedAggregates() * @generated * @ordered */ protected EList upstreamExposedAggregates; /** * The default value of the '{@link #getExposedAggregatesComment() Exposed Aggregates Comment}' attribute. * * * @see #getExposedAggregatesComment() * @generated * @ordered */ protected static final String EXPOSED_AGGREGATES_COMMENT_EDEFAULT = null; /** * The cached value of the '{@link #getExposedAggregatesComment() Exposed Aggregates Comment}' attribute. * * * @see #getExposedAggregatesComment() * @generated * @ordered */ protected String exposedAggregatesComment = EXPOSED_AGGREGATES_COMMENT_EDEFAULT; /** * The default value of the '{@link #getDownstreamGovernanceRights() Downstream Governance Rights}' attribute. * * * @see #getDownstreamGovernanceRights() * @generated * @ordered */ protected static final DownstreamGovernanceRights DOWNSTREAM_GOVERNANCE_RIGHTS_EDEFAULT = DownstreamGovernanceRights.INFLUENCER; /** * The cached value of the '{@link #getDownstreamGovernanceRights() Downstream Governance Rights}' attribute. * * * @see #getDownstreamGovernanceRights() * @generated * @ordered */ protected DownstreamGovernanceRights downstreamGovernanceRights = DOWNSTREAM_GOVERNANCE_RIGHTS_EDEFAULT; /** * * * @generated */ protected UpstreamDownstreamRelationshipImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return ContextMappingDSLPackage.Literals.UPSTREAM_DOWNSTREAM_RELATIONSHIP; } /** * * * @generated */ public BoundedContext getUpstream() { if (upstream != null && upstream.eIsProxy()) { InternalEObject oldUpstream = (InternalEObject)upstream; upstream = (BoundedContext)eResolveProxy(oldUpstream); if (upstream != oldUpstream) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__UPSTREAM, oldUpstream, upstream)); } } return upstream; } /** * * * @generated */ public BoundedContext basicGetUpstream() { return upstream; } /** * * * @generated */ public void setUpstream(BoundedContext newUpstream) { BoundedContext oldUpstream = upstream; upstream = newUpstream; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__UPSTREAM, oldUpstream, upstream)); } /** * * * @generated */ public EList getUpstreamRoles() { if (upstreamRoles == null) { upstreamRoles = new EDataTypeEList(UpstreamRole.class, this, ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__UPSTREAM_ROLES); } return upstreamRoles; } /** * * * @generated */ public EList getDownstreamRoles() { if (downstreamRoles == null) { downstreamRoles = new EDataTypeEList(DownstreamRole.class, this, ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__DOWNSTREAM_ROLES); } return downstreamRoles; } /** * * * @generated */ public BoundedContext getDownstream() { if (downstream != null && downstream.eIsProxy()) { InternalEObject oldDownstream = (InternalEObject)downstream; downstream = (BoundedContext)eResolveProxy(oldDownstream); if (downstream != oldDownstream) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__DOWNSTREAM, oldDownstream, downstream)); } } return downstream; } /** * * * @generated */ public BoundedContext basicGetDownstream() { return downstream; } /** * * * @generated */ public void setDownstream(BoundedContext newDownstream) { BoundedContext oldDownstream = downstream; downstream = newDownstream; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__DOWNSTREAM, oldDownstream, downstream)); } /** * * * @generated */ public EList getUpstreamExposedAggregates() { if (upstreamExposedAggregates == null) { upstreamExposedAggregates = new EObjectResolvingEList(Aggregate.class, this, ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__UPSTREAM_EXPOSED_AGGREGATES); } return upstreamExposedAggregates; } /** * * * @generated */ public String getExposedAggregatesComment() { return exposedAggregatesComment; } /** * * * @generated */ public void setExposedAggregatesComment(String newExposedAggregatesComment) { String oldExposedAggregatesComment = exposedAggregatesComment; exposedAggregatesComment = newExposedAggregatesComment; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__EXPOSED_AGGREGATES_COMMENT, oldExposedAggregatesComment, exposedAggregatesComment)); } /** * * * @generated */ public DownstreamGovernanceRights getDownstreamGovernanceRights() { return downstreamGovernanceRights; } /** * * * @generated */ public void setDownstreamGovernanceRights(DownstreamGovernanceRights newDownstreamGovernanceRights) { DownstreamGovernanceRights oldDownstreamGovernanceRights = downstreamGovernanceRights; downstreamGovernanceRights = newDownstreamGovernanceRights == null ? DOWNSTREAM_GOVERNANCE_RIGHTS_EDEFAULT : newDownstreamGovernanceRights; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__DOWNSTREAM_GOVERNANCE_RIGHTS, oldDownstreamGovernanceRights, downstreamGovernanceRights)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__UPSTREAM: if (resolve) return getUpstream(); return basicGetUpstream(); case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__UPSTREAM_ROLES: return getUpstreamRoles(); case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__DOWNSTREAM_ROLES: return getDownstreamRoles(); case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__DOWNSTREAM: if (resolve) return getDownstream(); return basicGetDownstream(); case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__UPSTREAM_EXPOSED_AGGREGATES: return getUpstreamExposedAggregates(); case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__EXPOSED_AGGREGATES_COMMENT: return getExposedAggregatesComment(); case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__DOWNSTREAM_GOVERNANCE_RIGHTS: return getDownstreamGovernanceRights(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__UPSTREAM: setUpstream((BoundedContext)newValue); return; case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__UPSTREAM_ROLES: getUpstreamRoles().clear(); getUpstreamRoles().addAll((Collection)newValue); return; case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__DOWNSTREAM_ROLES: getDownstreamRoles().clear(); getDownstreamRoles().addAll((Collection)newValue); return; case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__DOWNSTREAM: setDownstream((BoundedContext)newValue); return; case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__UPSTREAM_EXPOSED_AGGREGATES: getUpstreamExposedAggregates().clear(); getUpstreamExposedAggregates().addAll((Collection)newValue); return; case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__EXPOSED_AGGREGATES_COMMENT: setExposedAggregatesComment((String)newValue); return; case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__DOWNSTREAM_GOVERNANCE_RIGHTS: setDownstreamGovernanceRights((DownstreamGovernanceRights)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__UPSTREAM: setUpstream((BoundedContext)null); return; case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__UPSTREAM_ROLES: getUpstreamRoles().clear(); return; case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__DOWNSTREAM_ROLES: getDownstreamRoles().clear(); return; case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__DOWNSTREAM: setDownstream((BoundedContext)null); return; case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__UPSTREAM_EXPOSED_AGGREGATES: getUpstreamExposedAggregates().clear(); return; case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__EXPOSED_AGGREGATES_COMMENT: setExposedAggregatesComment(EXPOSED_AGGREGATES_COMMENT_EDEFAULT); return; case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__DOWNSTREAM_GOVERNANCE_RIGHTS: setDownstreamGovernanceRights(DOWNSTREAM_GOVERNANCE_RIGHTS_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__UPSTREAM: return upstream != null; case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__UPSTREAM_ROLES: return upstreamRoles != null && !upstreamRoles.isEmpty(); case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__DOWNSTREAM_ROLES: return downstreamRoles != null && !downstreamRoles.isEmpty(); case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__DOWNSTREAM: return downstream != null; case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__UPSTREAM_EXPOSED_AGGREGATES: return upstreamExposedAggregates != null && !upstreamExposedAggregates.isEmpty(); case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__EXPOSED_AGGREGATES_COMMENT: return EXPOSED_AGGREGATES_COMMENT_EDEFAULT == null ? exposedAggregatesComment != null : !EXPOSED_AGGREGATES_COMMENT_EDEFAULT.equals(exposedAggregatesComment); case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP__DOWNSTREAM_GOVERNANCE_RIGHTS: return downstreamGovernanceRights != DOWNSTREAM_GOVERNANCE_RIGHTS_EDEFAULT; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (upstreamRoles: "); result.append(upstreamRoles); result.append(", downstreamRoles: "); result.append(downstreamRoles); result.append(", exposedAggregatesComment: "); result.append(exposedAggregatesComment); result.append(", downstreamGovernanceRights: "); result.append(downstreamGovernanceRights); result.append(')'); return result.toString(); } } //UpstreamDownstreamRelationshipImpl




© 2015 - 2025 Weber Informatics LLC | Privacy Policy