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

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

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

import java.util.Collection;

import org.contextmapper.tactic.dsl.tacticdsl.Resource;
import org.contextmapper.tactic.dsl.tacticdsl.ResourceOperation;
import org.contextmapper.tactic.dsl.tacticdsl.ServiceDependency;
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 'Resource'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ResourceImpl#getDoc Doc}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ResourceImpl#getName Name}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ResourceImpl#isGapClass Gap Class}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ResourceImpl#isNoGapClass No Gap Class}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ResourceImpl#getHint Hint}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ResourceImpl#isScaffold Scaffold}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ResourceImpl#getPath Path}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ResourceImpl#getDependencies Dependencies}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ResourceImpl#getOperations Operations}
  • *
* * @generated */ public class ResourceImpl extends MinimalEObjectImpl.Container implements Resource { /** * 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 #isGapClass() Gap Class}' attribute. * * * @see #isGapClass() * @generated * @ordered */ protected static final boolean GAP_CLASS_EDEFAULT = false; /** * The cached value of the '{@link #isGapClass() Gap Class}' attribute. * * * @see #isGapClass() * @generated * @ordered */ protected boolean gapClass = GAP_CLASS_EDEFAULT; /** * The default value of the '{@link #isNoGapClass() No Gap Class}' attribute. * * * @see #isNoGapClass() * @generated * @ordered */ protected static final boolean NO_GAP_CLASS_EDEFAULT = false; /** * The cached value of the '{@link #isNoGapClass() No Gap Class}' attribute. * * * @see #isNoGapClass() * @generated * @ordered */ protected boolean noGapClass = NO_GAP_CLASS_EDEFAULT; /** * The default value of the '{@link #getHint() Hint}' attribute. * * * @see #getHint() * @generated * @ordered */ protected static final String HINT_EDEFAULT = null; /** * The cached value of the '{@link #getHint() Hint}' attribute. * * * @see #getHint() * @generated * @ordered */ protected String hint = HINT_EDEFAULT; /** * The default value of the '{@link #isScaffold() Scaffold}' attribute. * * * @see #isScaffold() * @generated * @ordered */ protected static final boolean SCAFFOLD_EDEFAULT = false; /** * The cached value of the '{@link #isScaffold() Scaffold}' attribute. * * * @see #isScaffold() * @generated * @ordered */ protected boolean scaffold = SCAFFOLD_EDEFAULT; /** * The default value of the '{@link #getPath() Path}' attribute. * * * @see #getPath() * @generated * @ordered */ protected static final String PATH_EDEFAULT = null; /** * The cached value of the '{@link #getPath() Path}' attribute. * * * @see #getPath() * @generated * @ordered */ protected String path = PATH_EDEFAULT; /** * The cached value of the '{@link #getDependencies() Dependencies}' containment reference list. * * * @see #getDependencies() * @generated * @ordered */ protected EList dependencies; /** * The cached value of the '{@link #getOperations() Operations}' containment reference list. * * * @see #getOperations() * @generated * @ordered */ protected EList operations; /** * * * @generated */ protected ResourceImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return TacticdslPackage.Literals.RESOURCE; } /** * * * @generated */ @Override public String getDoc() { return doc; } /** * * * @generated */ @Override public void setDoc(String newDoc) { String oldDoc = doc; doc = newDoc; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.RESOURCE__DOC, oldDoc, doc)); } /** * * * @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, TacticdslPackage.RESOURCE__NAME, oldName, name)); } /** * * * @generated */ @Override public boolean isGapClass() { return gapClass; } /** * * * @generated */ @Override public void setGapClass(boolean newGapClass) { boolean oldGapClass = gapClass; gapClass = newGapClass; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.RESOURCE__GAP_CLASS, oldGapClass, gapClass)); } /** * * * @generated */ @Override public boolean isNoGapClass() { return noGapClass; } /** * * * @generated */ @Override public void setNoGapClass(boolean newNoGapClass) { boolean oldNoGapClass = noGapClass; noGapClass = newNoGapClass; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.RESOURCE__NO_GAP_CLASS, oldNoGapClass, noGapClass)); } /** * * * @generated */ @Override public String getHint() { return hint; } /** * * * @generated */ @Override public void setHint(String newHint) { String oldHint = hint; hint = newHint; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.RESOURCE__HINT, oldHint, hint)); } /** * * * @generated */ @Override public boolean isScaffold() { return scaffold; } /** * * * @generated */ @Override public void setScaffold(boolean newScaffold) { boolean oldScaffold = scaffold; scaffold = newScaffold; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.RESOURCE__SCAFFOLD, oldScaffold, scaffold)); } /** * * * @generated */ @Override public String getPath() { return path; } /** * * * @generated */ @Override public void setPath(String newPath) { String oldPath = path; path = newPath; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.RESOURCE__PATH, oldPath, path)); } /** * * * @generated */ @Override public EList getDependencies() { if (dependencies == null) { dependencies = new EObjectContainmentEList(ServiceDependency.class, this, TacticdslPackage.RESOURCE__DEPENDENCIES); } return dependencies; } /** * * * @generated */ @Override public EList getOperations() { if (operations == null) { operations = new EObjectContainmentEList(ResourceOperation.class, this, TacticdslPackage.RESOURCE__OPERATIONS); } return operations; } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case TacticdslPackage.RESOURCE__DEPENDENCIES: return ((InternalEList)getDependencies()).basicRemove(otherEnd, msgs); case TacticdslPackage.RESOURCE__OPERATIONS: return ((InternalEList)getOperations()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case TacticdslPackage.RESOURCE__DOC: return getDoc(); case TacticdslPackage.RESOURCE__NAME: return getName(); case TacticdslPackage.RESOURCE__GAP_CLASS: return isGapClass(); case TacticdslPackage.RESOURCE__NO_GAP_CLASS: return isNoGapClass(); case TacticdslPackage.RESOURCE__HINT: return getHint(); case TacticdslPackage.RESOURCE__SCAFFOLD: return isScaffold(); case TacticdslPackage.RESOURCE__PATH: return getPath(); case TacticdslPackage.RESOURCE__DEPENDENCIES: return getDependencies(); case TacticdslPackage.RESOURCE__OPERATIONS: return getOperations(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case TacticdslPackage.RESOURCE__DOC: setDoc((String)newValue); return; case TacticdslPackage.RESOURCE__NAME: setName((String)newValue); return; case TacticdslPackage.RESOURCE__GAP_CLASS: setGapClass((Boolean)newValue); return; case TacticdslPackage.RESOURCE__NO_GAP_CLASS: setNoGapClass((Boolean)newValue); return; case TacticdslPackage.RESOURCE__HINT: setHint((String)newValue); return; case TacticdslPackage.RESOURCE__SCAFFOLD: setScaffold((Boolean)newValue); return; case TacticdslPackage.RESOURCE__PATH: setPath((String)newValue); return; case TacticdslPackage.RESOURCE__DEPENDENCIES: getDependencies().clear(); getDependencies().addAll((Collection)newValue); return; case TacticdslPackage.RESOURCE__OPERATIONS: getOperations().clear(); getOperations().addAll((Collection)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case TacticdslPackage.RESOURCE__DOC: setDoc(DOC_EDEFAULT); return; case TacticdslPackage.RESOURCE__NAME: setName(NAME_EDEFAULT); return; case TacticdslPackage.RESOURCE__GAP_CLASS: setGapClass(GAP_CLASS_EDEFAULT); return; case TacticdslPackage.RESOURCE__NO_GAP_CLASS: setNoGapClass(NO_GAP_CLASS_EDEFAULT); return; case TacticdslPackage.RESOURCE__HINT: setHint(HINT_EDEFAULT); return; case TacticdslPackage.RESOURCE__SCAFFOLD: setScaffold(SCAFFOLD_EDEFAULT); return; case TacticdslPackage.RESOURCE__PATH: setPath(PATH_EDEFAULT); return; case TacticdslPackage.RESOURCE__DEPENDENCIES: getDependencies().clear(); return; case TacticdslPackage.RESOURCE__OPERATIONS: getOperations().clear(); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case TacticdslPackage.RESOURCE__DOC: return DOC_EDEFAULT == null ? doc != null : !DOC_EDEFAULT.equals(doc); case TacticdslPackage.RESOURCE__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case TacticdslPackage.RESOURCE__GAP_CLASS: return gapClass != GAP_CLASS_EDEFAULT; case TacticdslPackage.RESOURCE__NO_GAP_CLASS: return noGapClass != NO_GAP_CLASS_EDEFAULT; case TacticdslPackage.RESOURCE__HINT: return HINT_EDEFAULT == null ? hint != null : !HINT_EDEFAULT.equals(hint); case TacticdslPackage.RESOURCE__SCAFFOLD: return scaffold != SCAFFOLD_EDEFAULT; case TacticdslPackage.RESOURCE__PATH: return PATH_EDEFAULT == null ? path != null : !PATH_EDEFAULT.equals(path); case TacticdslPackage.RESOURCE__DEPENDENCIES: return dependencies != null && !dependencies.isEmpty(); case TacticdslPackage.RESOURCE__OPERATIONS: return operations != null && !operations.isEmpty(); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuilder result = new StringBuilder(super.toString()); result.append(" (doc: "); result.append(doc); result.append(", name: "); result.append(name); result.append(", gapClass: "); result.append(gapClass); result.append(", noGapClass: "); result.append(noGapClass); result.append(", hint: "); result.append(hint); result.append(", scaffold: "); result.append(scaffold); result.append(", path: "); result.append(path); result.append(')'); return result.toString(); } } //ResourceImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy