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

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

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

import org.contextmapper.tactic.dsl.tacticdsl.Event;
import org.contextmapper.tactic.dsl.tacticdsl.Publish;
import org.contextmapper.tactic.dsl.tacticdsl.TacticdslPackage;

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

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;

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

* The following features are implemented: *

*
    *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.PublishImpl#getEventType Event Type}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.PublishImpl#getTopic Topic}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.PublishImpl#getEventBus Event Bus}
  • *
* * @generated */ public class PublishImpl extends MinimalEObjectImpl.Container implements Publish { /** * The cached value of the '{@link #getEventType() Event Type}' reference. * * * @see #getEventType() * @generated * @ordered */ protected Event eventType; /** * The default value of the '{@link #getTopic() Topic}' attribute. * * * @see #getTopic() * @generated * @ordered */ protected static final String TOPIC_EDEFAULT = null; /** * The cached value of the '{@link #getTopic() Topic}' attribute. * * * @see #getTopic() * @generated * @ordered */ protected String topic = TOPIC_EDEFAULT; /** * The default value of the '{@link #getEventBus() Event Bus}' attribute. * * * @see #getEventBus() * @generated * @ordered */ protected static final String EVENT_BUS_EDEFAULT = null; /** * The cached value of the '{@link #getEventBus() Event Bus}' attribute. * * * @see #getEventBus() * @generated * @ordered */ protected String eventBus = EVENT_BUS_EDEFAULT; /** * * * @generated */ protected PublishImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return TacticdslPackage.Literals.PUBLISH; } /** * * * @generated */ public Event getEventType() { if (eventType != null && eventType.eIsProxy()) { InternalEObject oldEventType = (InternalEObject)eventType; eventType = (Event)eResolveProxy(oldEventType); if (eventType != oldEventType) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, TacticdslPackage.PUBLISH__EVENT_TYPE, oldEventType, eventType)); } } return eventType; } /** * * * @generated */ public Event basicGetEventType() { return eventType; } /** * * * @generated */ public void setEventType(Event newEventType) { Event oldEventType = eventType; eventType = newEventType; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.PUBLISH__EVENT_TYPE, oldEventType, eventType)); } /** * * * @generated */ public String getTopic() { return topic; } /** * * * @generated */ public void setTopic(String newTopic) { String oldTopic = topic; topic = newTopic; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.PUBLISH__TOPIC, oldTopic, topic)); } /** * * * @generated */ public String getEventBus() { return eventBus; } /** * * * @generated */ public void setEventBus(String newEventBus) { String oldEventBus = eventBus; eventBus = newEventBus; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.PUBLISH__EVENT_BUS, oldEventBus, eventBus)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case TacticdslPackage.PUBLISH__EVENT_TYPE: if (resolve) return getEventType(); return basicGetEventType(); case TacticdslPackage.PUBLISH__TOPIC: return getTopic(); case TacticdslPackage.PUBLISH__EVENT_BUS: return getEventBus(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case TacticdslPackage.PUBLISH__EVENT_TYPE: setEventType((Event)newValue); return; case TacticdslPackage.PUBLISH__TOPIC: setTopic((String)newValue); return; case TacticdslPackage.PUBLISH__EVENT_BUS: setEventBus((String)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case TacticdslPackage.PUBLISH__EVENT_TYPE: setEventType((Event)null); return; case TacticdslPackage.PUBLISH__TOPIC: setTopic(TOPIC_EDEFAULT); return; case TacticdslPackage.PUBLISH__EVENT_BUS: setEventBus(EVENT_BUS_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case TacticdslPackage.PUBLISH__EVENT_TYPE: return eventType != null; case TacticdslPackage.PUBLISH__TOPIC: return TOPIC_EDEFAULT == null ? topic != null : !TOPIC_EDEFAULT.equals(topic); case TacticdslPackage.PUBLISH__EVENT_BUS: return EVENT_BUS_EDEFAULT == null ? eventBus != null : !EVENT_BUS_EDEFAULT.equals(eventBus); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (topic: "); result.append(topic); result.append(", eventBus: "); result.append(eventBus); result.append(')'); return result.toString(); } } //PublishImpl




© 2015 - 2025 Weber Informatics LLC | Privacy Policy