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

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

/**
 * generated by Xtext 2.21.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.BoundedContextType;
import org.contextmapper.dsl.contextMappingDSL.ContextMappingDSLPackage;
import org.contextmapper.dsl.contextMappingDSL.DomainPart;
import org.contextmapper.dsl.contextMappingDSL.KnowledgeLevel;
import org.contextmapper.dsl.contextMappingDSL.SculptorModule;

import org.eclipse.emf.common.notify.Notification;
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.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;

import org.eclipse.emf.ecore.util.EDataTypeEList;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
import org.eclipse.emf.ecore.util.InternalEList;

/**
 * 
 * An implementation of the model object 'Bounded Context'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.contextmapper.dsl.contextMappingDSL.impl.BoundedContextImpl#getComment Comment}
  • *
  • {@link org.contextmapper.dsl.contextMappingDSL.impl.BoundedContextImpl#getName Name}
  • *
  • {@link org.contextmapper.dsl.contextMappingDSL.impl.BoundedContextImpl#getImplementedDomainParts Implemented Domain Parts}
  • *
  • {@link org.contextmapper.dsl.contextMappingDSL.impl.BoundedContextImpl#getRealizedBoundedContexts Realized Bounded Contexts}
  • *
  • {@link org.contextmapper.dsl.contextMappingDSL.impl.BoundedContextImpl#getRefinedBoundedContext Refined Bounded Context}
  • *
  • {@link org.contextmapper.dsl.contextMappingDSL.impl.BoundedContextImpl#getDomainVisionStatement Domain Vision Statement}
  • *
  • {@link org.contextmapper.dsl.contextMappingDSL.impl.BoundedContextImpl#getType Type}
  • *
  • {@link org.contextmapper.dsl.contextMappingDSL.impl.BoundedContextImpl#getResponsibilities Responsibilities}
  • *
  • {@link org.contextmapper.dsl.contextMappingDSL.impl.BoundedContextImpl#getImplementationTechnology Implementation Technology}
  • *
  • {@link org.contextmapper.dsl.contextMappingDSL.impl.BoundedContextImpl#getKnowledgeLevel Knowledge Level}
  • *
  • {@link org.contextmapper.dsl.contextMappingDSL.impl.BoundedContextImpl#getModules Modules}
  • *
  • {@link org.contextmapper.dsl.contextMappingDSL.impl.BoundedContextImpl#getAggregates Aggregates}
  • *
* * @generated */ public class BoundedContextImpl extends MinimalEObjectImpl.Container implements BoundedContext { /** * The default value of the '{@link #getComment() Comment}' attribute. * * * @see #getComment() * @generated * @ordered */ protected static final String COMMENT_EDEFAULT = null; /** * The cached value of the '{@link #getComment() Comment}' attribute. * * * @see #getComment() * @generated * @ordered */ protected String comment = COMMENT_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; /** * The cached value of the '{@link #getImplementedDomainParts() Implemented Domain Parts}' reference list. * * * @see #getImplementedDomainParts() * @generated * @ordered */ protected EList implementedDomainParts; /** * The cached value of the '{@link #getRealizedBoundedContexts() Realized Bounded Contexts}' reference list. * * * @see #getRealizedBoundedContexts() * @generated * @ordered */ protected EList realizedBoundedContexts; /** * The cached value of the '{@link #getRefinedBoundedContext() Refined Bounded Context}' reference. * * * @see #getRefinedBoundedContext() * @generated * @ordered */ protected BoundedContext refinedBoundedContext; /** * The default value of the '{@link #getDomainVisionStatement() Domain Vision Statement}' attribute. * * * @see #getDomainVisionStatement() * @generated * @ordered */ protected static final String DOMAIN_VISION_STATEMENT_EDEFAULT = null; /** * The cached value of the '{@link #getDomainVisionStatement() Domain Vision Statement}' attribute. * * * @see #getDomainVisionStatement() * @generated * @ordered */ protected String domainVisionStatement = DOMAIN_VISION_STATEMENT_EDEFAULT; /** * The default value of the '{@link #getType() Type}' attribute. * * * @see #getType() * @generated * @ordered */ protected static final BoundedContextType TYPE_EDEFAULT = BoundedContextType.UNDEFINED; /** * The cached value of the '{@link #getType() Type}' attribute. * * * @see #getType() * @generated * @ordered */ protected BoundedContextType type = TYPE_EDEFAULT; /** * The cached value of the '{@link #getResponsibilities() Responsibilities}' attribute list. * * * @see #getResponsibilities() * @generated * @ordered */ protected EList responsibilities; /** * The default value of the '{@link #getImplementationTechnology() Implementation Technology}' attribute. * * * @see #getImplementationTechnology() * @generated * @ordered */ protected static final String IMPLEMENTATION_TECHNOLOGY_EDEFAULT = null; /** * The cached value of the '{@link #getImplementationTechnology() Implementation Technology}' attribute. * * * @see #getImplementationTechnology() * @generated * @ordered */ protected String implementationTechnology = IMPLEMENTATION_TECHNOLOGY_EDEFAULT; /** * The default value of the '{@link #getKnowledgeLevel() Knowledge Level}' attribute. * * * @see #getKnowledgeLevel() * @generated * @ordered */ protected static final KnowledgeLevel KNOWLEDGE_LEVEL_EDEFAULT = KnowledgeLevel.META; /** * The cached value of the '{@link #getKnowledgeLevel() Knowledge Level}' attribute. * * * @see #getKnowledgeLevel() * @generated * @ordered */ protected KnowledgeLevel knowledgeLevel = KNOWLEDGE_LEVEL_EDEFAULT; /** * The cached value of the '{@link #getModules() Modules}' containment reference list. * * * @see #getModules() * @generated * @ordered */ protected EList modules; /** * The cached value of the '{@link #getAggregates() Aggregates}' containment reference list. * * * @see #getAggregates() * @generated * @ordered */ protected EList aggregates; /** * * * @generated */ protected BoundedContextImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return ContextMappingDSLPackage.Literals.BOUNDED_CONTEXT; } /** * * * @generated */ @Override public String getComment() { return comment; } /** * * * @generated */ @Override public void setComment(String newComment) { String oldComment = comment; comment = newComment; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ContextMappingDSLPackage.BOUNDED_CONTEXT__COMMENT, oldComment, comment)); } /** * * * @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, ContextMappingDSLPackage.BOUNDED_CONTEXT__NAME, oldName, name)); } /** * * * @generated */ @Override public EList getImplementedDomainParts() { if (implementedDomainParts == null) { implementedDomainParts = new EObjectResolvingEList(DomainPart.class, this, ContextMappingDSLPackage.BOUNDED_CONTEXT__IMPLEMENTED_DOMAIN_PARTS); } return implementedDomainParts; } /** * * * @generated */ @Override public EList getRealizedBoundedContexts() { if (realizedBoundedContexts == null) { realizedBoundedContexts = new EObjectResolvingEList(BoundedContext.class, this, ContextMappingDSLPackage.BOUNDED_CONTEXT__REALIZED_BOUNDED_CONTEXTS); } return realizedBoundedContexts; } /** * * * @generated */ @Override public BoundedContext getRefinedBoundedContext() { if (refinedBoundedContext != null && refinedBoundedContext.eIsProxy()) { InternalEObject oldRefinedBoundedContext = (InternalEObject)refinedBoundedContext; refinedBoundedContext = (BoundedContext)eResolveProxy(oldRefinedBoundedContext); if (refinedBoundedContext != oldRefinedBoundedContext) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, ContextMappingDSLPackage.BOUNDED_CONTEXT__REFINED_BOUNDED_CONTEXT, oldRefinedBoundedContext, refinedBoundedContext)); } } return refinedBoundedContext; } /** * * * @generated */ public BoundedContext basicGetRefinedBoundedContext() { return refinedBoundedContext; } /** * * * @generated */ @Override public void setRefinedBoundedContext(BoundedContext newRefinedBoundedContext) { BoundedContext oldRefinedBoundedContext = refinedBoundedContext; refinedBoundedContext = newRefinedBoundedContext; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ContextMappingDSLPackage.BOUNDED_CONTEXT__REFINED_BOUNDED_CONTEXT, oldRefinedBoundedContext, refinedBoundedContext)); } /** * * * @generated */ @Override public String getDomainVisionStatement() { return domainVisionStatement; } /** * * * @generated */ @Override public void setDomainVisionStatement(String newDomainVisionStatement) { String oldDomainVisionStatement = domainVisionStatement; domainVisionStatement = newDomainVisionStatement; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ContextMappingDSLPackage.BOUNDED_CONTEXT__DOMAIN_VISION_STATEMENT, oldDomainVisionStatement, domainVisionStatement)); } /** * * * @generated */ @Override public BoundedContextType getType() { return type; } /** * * * @generated */ @Override public void setType(BoundedContextType newType) { BoundedContextType oldType = type; type = newType == null ? TYPE_EDEFAULT : newType; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ContextMappingDSLPackage.BOUNDED_CONTEXT__TYPE, oldType, type)); } /** * * * @generated */ @Override public EList getResponsibilities() { if (responsibilities == null) { responsibilities = new EDataTypeEList(String.class, this, ContextMappingDSLPackage.BOUNDED_CONTEXT__RESPONSIBILITIES); } return responsibilities; } /** * * * @generated */ @Override public String getImplementationTechnology() { return implementationTechnology; } /** * * * @generated */ @Override public void setImplementationTechnology(String newImplementationTechnology) { String oldImplementationTechnology = implementationTechnology; implementationTechnology = newImplementationTechnology; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ContextMappingDSLPackage.BOUNDED_CONTEXT__IMPLEMENTATION_TECHNOLOGY, oldImplementationTechnology, implementationTechnology)); } /** * * * @generated */ @Override public KnowledgeLevel getKnowledgeLevel() { return knowledgeLevel; } /** * * * @generated */ @Override public void setKnowledgeLevel(KnowledgeLevel newKnowledgeLevel) { KnowledgeLevel oldKnowledgeLevel = knowledgeLevel; knowledgeLevel = newKnowledgeLevel == null ? KNOWLEDGE_LEVEL_EDEFAULT : newKnowledgeLevel; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ContextMappingDSLPackage.BOUNDED_CONTEXT__KNOWLEDGE_LEVEL, oldKnowledgeLevel, knowledgeLevel)); } /** * * * @generated */ @Override public EList getModules() { if (modules == null) { modules = new EObjectContainmentEList(SculptorModule.class, this, ContextMappingDSLPackage.BOUNDED_CONTEXT__MODULES); } return modules; } /** * * * @generated */ @Override public EList getAggregates() { if (aggregates == null) { aggregates = new EObjectContainmentEList(Aggregate.class, this, ContextMappingDSLPackage.BOUNDED_CONTEXT__AGGREGATES); } return aggregates; } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case ContextMappingDSLPackage.BOUNDED_CONTEXT__MODULES: return ((InternalEList)getModules()).basicRemove(otherEnd, msgs); case ContextMappingDSLPackage.BOUNDED_CONTEXT__AGGREGATES: return ((InternalEList)getAggregates()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case ContextMappingDSLPackage.BOUNDED_CONTEXT__COMMENT: return getComment(); case ContextMappingDSLPackage.BOUNDED_CONTEXT__NAME: return getName(); case ContextMappingDSLPackage.BOUNDED_CONTEXT__IMPLEMENTED_DOMAIN_PARTS: return getImplementedDomainParts(); case ContextMappingDSLPackage.BOUNDED_CONTEXT__REALIZED_BOUNDED_CONTEXTS: return getRealizedBoundedContexts(); case ContextMappingDSLPackage.BOUNDED_CONTEXT__REFINED_BOUNDED_CONTEXT: if (resolve) return getRefinedBoundedContext(); return basicGetRefinedBoundedContext(); case ContextMappingDSLPackage.BOUNDED_CONTEXT__DOMAIN_VISION_STATEMENT: return getDomainVisionStatement(); case ContextMappingDSLPackage.BOUNDED_CONTEXT__TYPE: return getType(); case ContextMappingDSLPackage.BOUNDED_CONTEXT__RESPONSIBILITIES: return getResponsibilities(); case ContextMappingDSLPackage.BOUNDED_CONTEXT__IMPLEMENTATION_TECHNOLOGY: return getImplementationTechnology(); case ContextMappingDSLPackage.BOUNDED_CONTEXT__KNOWLEDGE_LEVEL: return getKnowledgeLevel(); case ContextMappingDSLPackage.BOUNDED_CONTEXT__MODULES: return getModules(); case ContextMappingDSLPackage.BOUNDED_CONTEXT__AGGREGATES: return getAggregates(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case ContextMappingDSLPackage.BOUNDED_CONTEXT__COMMENT: setComment((String)newValue); return; case ContextMappingDSLPackage.BOUNDED_CONTEXT__NAME: setName((String)newValue); return; case ContextMappingDSLPackage.BOUNDED_CONTEXT__IMPLEMENTED_DOMAIN_PARTS: getImplementedDomainParts().clear(); getImplementedDomainParts().addAll((Collection)newValue); return; case ContextMappingDSLPackage.BOUNDED_CONTEXT__REALIZED_BOUNDED_CONTEXTS: getRealizedBoundedContexts().clear(); getRealizedBoundedContexts().addAll((Collection)newValue); return; case ContextMappingDSLPackage.BOUNDED_CONTEXT__REFINED_BOUNDED_CONTEXT: setRefinedBoundedContext((BoundedContext)newValue); return; case ContextMappingDSLPackage.BOUNDED_CONTEXT__DOMAIN_VISION_STATEMENT: setDomainVisionStatement((String)newValue); return; case ContextMappingDSLPackage.BOUNDED_CONTEXT__TYPE: setType((BoundedContextType)newValue); return; case ContextMappingDSLPackage.BOUNDED_CONTEXT__RESPONSIBILITIES: getResponsibilities().clear(); getResponsibilities().addAll((Collection)newValue); return; case ContextMappingDSLPackage.BOUNDED_CONTEXT__IMPLEMENTATION_TECHNOLOGY: setImplementationTechnology((String)newValue); return; case ContextMappingDSLPackage.BOUNDED_CONTEXT__KNOWLEDGE_LEVEL: setKnowledgeLevel((KnowledgeLevel)newValue); return; case ContextMappingDSLPackage.BOUNDED_CONTEXT__MODULES: getModules().clear(); getModules().addAll((Collection)newValue); return; case ContextMappingDSLPackage.BOUNDED_CONTEXT__AGGREGATES: getAggregates().clear(); getAggregates().addAll((Collection)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case ContextMappingDSLPackage.BOUNDED_CONTEXT__COMMENT: setComment(COMMENT_EDEFAULT); return; case ContextMappingDSLPackage.BOUNDED_CONTEXT__NAME: setName(NAME_EDEFAULT); return; case ContextMappingDSLPackage.BOUNDED_CONTEXT__IMPLEMENTED_DOMAIN_PARTS: getImplementedDomainParts().clear(); return; case ContextMappingDSLPackage.BOUNDED_CONTEXT__REALIZED_BOUNDED_CONTEXTS: getRealizedBoundedContexts().clear(); return; case ContextMappingDSLPackage.BOUNDED_CONTEXT__REFINED_BOUNDED_CONTEXT: setRefinedBoundedContext((BoundedContext)null); return; case ContextMappingDSLPackage.BOUNDED_CONTEXT__DOMAIN_VISION_STATEMENT: setDomainVisionStatement(DOMAIN_VISION_STATEMENT_EDEFAULT); return; case ContextMappingDSLPackage.BOUNDED_CONTEXT__TYPE: setType(TYPE_EDEFAULT); return; case ContextMappingDSLPackage.BOUNDED_CONTEXT__RESPONSIBILITIES: getResponsibilities().clear(); return; case ContextMappingDSLPackage.BOUNDED_CONTEXT__IMPLEMENTATION_TECHNOLOGY: setImplementationTechnology(IMPLEMENTATION_TECHNOLOGY_EDEFAULT); return; case ContextMappingDSLPackage.BOUNDED_CONTEXT__KNOWLEDGE_LEVEL: setKnowledgeLevel(KNOWLEDGE_LEVEL_EDEFAULT); return; case ContextMappingDSLPackage.BOUNDED_CONTEXT__MODULES: getModules().clear(); return; case ContextMappingDSLPackage.BOUNDED_CONTEXT__AGGREGATES: getAggregates().clear(); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case ContextMappingDSLPackage.BOUNDED_CONTEXT__COMMENT: return COMMENT_EDEFAULT == null ? comment != null : !COMMENT_EDEFAULT.equals(comment); case ContextMappingDSLPackage.BOUNDED_CONTEXT__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case ContextMappingDSLPackage.BOUNDED_CONTEXT__IMPLEMENTED_DOMAIN_PARTS: return implementedDomainParts != null && !implementedDomainParts.isEmpty(); case ContextMappingDSLPackage.BOUNDED_CONTEXT__REALIZED_BOUNDED_CONTEXTS: return realizedBoundedContexts != null && !realizedBoundedContexts.isEmpty(); case ContextMappingDSLPackage.BOUNDED_CONTEXT__REFINED_BOUNDED_CONTEXT: return refinedBoundedContext != null; case ContextMappingDSLPackage.BOUNDED_CONTEXT__DOMAIN_VISION_STATEMENT: return DOMAIN_VISION_STATEMENT_EDEFAULT == null ? domainVisionStatement != null : !DOMAIN_VISION_STATEMENT_EDEFAULT.equals(domainVisionStatement); case ContextMappingDSLPackage.BOUNDED_CONTEXT__TYPE: return type != TYPE_EDEFAULT; case ContextMappingDSLPackage.BOUNDED_CONTEXT__RESPONSIBILITIES: return responsibilities != null && !responsibilities.isEmpty(); case ContextMappingDSLPackage.BOUNDED_CONTEXT__IMPLEMENTATION_TECHNOLOGY: return IMPLEMENTATION_TECHNOLOGY_EDEFAULT == null ? implementationTechnology != null : !IMPLEMENTATION_TECHNOLOGY_EDEFAULT.equals(implementationTechnology); case ContextMappingDSLPackage.BOUNDED_CONTEXT__KNOWLEDGE_LEVEL: return knowledgeLevel != KNOWLEDGE_LEVEL_EDEFAULT; case ContextMappingDSLPackage.BOUNDED_CONTEXT__MODULES: return modules != null && !modules.isEmpty(); case ContextMappingDSLPackage.BOUNDED_CONTEXT__AGGREGATES: return aggregates != null && !aggregates.isEmpty(); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuilder result = new StringBuilder(super.toString()); result.append(" (comment: "); result.append(comment); result.append(", name: "); result.append(name); result.append(", domainVisionStatement: "); result.append(domainVisionStatement); result.append(", type: "); result.append(type); result.append(", responsibilities: "); result.append(responsibilities); result.append(", implementationTechnology: "); result.append(implementationTechnology); result.append(", knowledgeLevel: "); result.append(knowledgeLevel); result.append(')'); return result.toString(); } } //BoundedContextImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy