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

org.contextmapper.tactic.dsl.tacticdsl.impl.ApplicationImpl Maven / Gradle / Ivy

/**
 * generated by Xtext 2.20.0
 */
package org.contextmapper.tactic.dsl.tacticdsl.impl;

import java.util.Collection;

import org.contextmapper.tactic.dsl.tacticdsl.Application;
import org.contextmapper.tactic.dsl.tacticdsl.Consumer;
import org.contextmapper.tactic.dsl.tacticdsl.Resource;
import org.contextmapper.tactic.dsl.tacticdsl.Service;
import org.contextmapper.tactic.dsl.tacticdsl.SimpleDomainObject;
import org.contextmapper.tactic.dsl.tacticdsl.TacticdslPackage;

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

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

* The following features are implemented: *

*
    *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ApplicationImpl#getDoc Doc}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ApplicationImpl#getName Name}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ApplicationImpl#getBasePackage Base Package}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ApplicationImpl#getServices Services}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ApplicationImpl#getResources Resources}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ApplicationImpl#getConsumers Consumers}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ApplicationImpl#getDomainObjects Domain Objects}
  • *
* * @generated */ public class ApplicationImpl extends MinimalEObjectImpl.Container implements Application { /** * The default value of the '{@link #getDoc() Doc}' attribute. * * * @see #getDoc() * @generated * @ordered */ protected static final String DOC_EDEFAULT = null; /** * The cached value of the '{@link #getDoc() Doc}' attribute. * * * @see #getDoc() * @generated * @ordered */ protected String doc = DOC_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 default value of the '{@link #getBasePackage() Base Package}' attribute. * * * @see #getBasePackage() * @generated * @ordered */ protected static final String BASE_PACKAGE_EDEFAULT = null; /** * The cached value of the '{@link #getBasePackage() Base Package}' attribute. * * * @see #getBasePackage() * @generated * @ordered */ protected String basePackage = BASE_PACKAGE_EDEFAULT; /** * The cached value of the '{@link #getServices() Services}' containment reference list. * * * @see #getServices() * @generated * @ordered */ protected EList services; /** * The cached value of the '{@link #getResources() Resources}' containment reference list. * * * @see #getResources() * @generated * @ordered */ protected EList resources; /** * The cached value of the '{@link #getConsumers() Consumers}' containment reference list. * * * @see #getConsumers() * @generated * @ordered */ protected EList consumers; /** * The cached value of the '{@link #getDomainObjects() Domain Objects}' containment reference list. * * * @see #getDomainObjects() * @generated * @ordered */ protected EList domainObjects; /** * * * @generated */ protected ApplicationImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return TacticdslPackage.Literals.APPLICATION; } /** * * * @generated */ public String getDoc() { return doc; } /** * * * @generated */ public void setDoc(String newDoc) { String oldDoc = doc; doc = newDoc; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.APPLICATION__DOC, oldDoc, doc)); } /** * * * @generated */ public String getName() { return name; } /** * * * @generated */ public void setName(String newName) { String oldName = name; name = newName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.APPLICATION__NAME, oldName, name)); } /** * * * @generated */ public String getBasePackage() { return basePackage; } /** * * * @generated */ public void setBasePackage(String newBasePackage) { String oldBasePackage = basePackage; basePackage = newBasePackage; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.APPLICATION__BASE_PACKAGE, oldBasePackage, basePackage)); } /** * * * @generated */ public EList getServices() { if (services == null) { services = new EObjectContainmentEList(Service.class, this, TacticdslPackage.APPLICATION__SERVICES); } return services; } /** * * * @generated */ public EList getResources() { if (resources == null) { resources = new EObjectContainmentEList(Resource.class, this, TacticdslPackage.APPLICATION__RESOURCES); } return resources; } /** * * * @generated */ public EList getConsumers() { if (consumers == null) { consumers = new EObjectContainmentEList(Consumer.class, this, TacticdslPackage.APPLICATION__CONSUMERS); } return consumers; } /** * * * @generated */ public EList getDomainObjects() { if (domainObjects == null) { domainObjects = new EObjectContainmentEList(SimpleDomainObject.class, this, TacticdslPackage.APPLICATION__DOMAIN_OBJECTS); } return domainObjects; } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case TacticdslPackage.APPLICATION__SERVICES: return ((InternalEList)getServices()).basicRemove(otherEnd, msgs); case TacticdslPackage.APPLICATION__RESOURCES: return ((InternalEList)getResources()).basicRemove(otherEnd, msgs); case TacticdslPackage.APPLICATION__CONSUMERS: return ((InternalEList)getConsumers()).basicRemove(otherEnd, msgs); case TacticdslPackage.APPLICATION__DOMAIN_OBJECTS: return ((InternalEList)getDomainObjects()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case TacticdslPackage.APPLICATION__DOC: return getDoc(); case TacticdslPackage.APPLICATION__NAME: return getName(); case TacticdslPackage.APPLICATION__BASE_PACKAGE: return getBasePackage(); case TacticdslPackage.APPLICATION__SERVICES: return getServices(); case TacticdslPackage.APPLICATION__RESOURCES: return getResources(); case TacticdslPackage.APPLICATION__CONSUMERS: return getConsumers(); case TacticdslPackage.APPLICATION__DOMAIN_OBJECTS: return getDomainObjects(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case TacticdslPackage.APPLICATION__DOC: setDoc((String)newValue); return; case TacticdslPackage.APPLICATION__NAME: setName((String)newValue); return; case TacticdslPackage.APPLICATION__BASE_PACKAGE: setBasePackage((String)newValue); return; case TacticdslPackage.APPLICATION__SERVICES: getServices().clear(); getServices().addAll((Collection)newValue); return; case TacticdslPackage.APPLICATION__RESOURCES: getResources().clear(); getResources().addAll((Collection)newValue); return; case TacticdslPackage.APPLICATION__CONSUMERS: getConsumers().clear(); getConsumers().addAll((Collection)newValue); return; case TacticdslPackage.APPLICATION__DOMAIN_OBJECTS: getDomainObjects().clear(); getDomainObjects().addAll((Collection)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case TacticdslPackage.APPLICATION__DOC: setDoc(DOC_EDEFAULT); return; case TacticdslPackage.APPLICATION__NAME: setName(NAME_EDEFAULT); return; case TacticdslPackage.APPLICATION__BASE_PACKAGE: setBasePackage(BASE_PACKAGE_EDEFAULT); return; case TacticdslPackage.APPLICATION__SERVICES: getServices().clear(); return; case TacticdslPackage.APPLICATION__RESOURCES: getResources().clear(); return; case TacticdslPackage.APPLICATION__CONSUMERS: getConsumers().clear(); return; case TacticdslPackage.APPLICATION__DOMAIN_OBJECTS: getDomainObjects().clear(); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case TacticdslPackage.APPLICATION__DOC: return DOC_EDEFAULT == null ? doc != null : !DOC_EDEFAULT.equals(doc); case TacticdslPackage.APPLICATION__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case TacticdslPackage.APPLICATION__BASE_PACKAGE: return BASE_PACKAGE_EDEFAULT == null ? basePackage != null : !BASE_PACKAGE_EDEFAULT.equals(basePackage); case TacticdslPackage.APPLICATION__SERVICES: return services != null && !services.isEmpty(); case TacticdslPackage.APPLICATION__RESOURCES: return resources != null && !resources.isEmpty(); case TacticdslPackage.APPLICATION__CONSUMERS: return consumers != null && !consumers.isEmpty(); case TacticdslPackage.APPLICATION__DOMAIN_OBJECTS: return domainObjects != null && !domainObjects.isEmpty(); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (doc: "); result.append(doc); result.append(", name: "); result.append(name); result.append(", basePackage: "); result.append(basePackage); result.append(')'); return result.toString(); } } //ApplicationImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy