![JAR search and dependency download from the Maven repository](/logo.png)
org.contextmapper.servicecutter.dsl.serviceCutterConfigurationDSL.impl.CharacteristicImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of context-mapper-dsl Show documentation
Show all versions of context-mapper-dsl Show documentation
Use the ContextMapper DSL in your standalone application.
/**
* generated by Xtext 2.20.0
*/
package org.contextmapper.servicecutter.dsl.serviceCutterConfigurationDSL.impl;
import java.util.Collection;
import org.contextmapper.servicecutter.dsl.serviceCutterConfigurationDSL.Characteristic;
import org.contextmapper.servicecutter.dsl.serviceCutterConfigurationDSL.ServiceCutterConfigurationDSLPackage;
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.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EDataTypeEList;
/**
*
* An implementation of the model object 'Characteristic'.
*
*
* The following features are implemented:
*
*
* - {@link org.contextmapper.servicecutter.dsl.serviceCutterConfigurationDSL.impl.CharacteristicImpl#getDoc Doc}
* - {@link org.contextmapper.servicecutter.dsl.serviceCutterConfigurationDSL.impl.CharacteristicImpl#getCharacteristic Characteristic}
* - {@link org.contextmapper.servicecutter.dsl.serviceCutterConfigurationDSL.impl.CharacteristicImpl#getCharacteristicDoc Characteristic Doc}
* - {@link org.contextmapper.servicecutter.dsl.serviceCutterConfigurationDSL.impl.CharacteristicImpl#getNanoentities Nanoentities}
*
*
* @generated
*/
public class CharacteristicImpl extends MinimalEObjectImpl.Container implements Characteristic
{
/**
* 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 #getCharacteristic() Characteristic}' attribute.
*
*
* @see #getCharacteristic()
* @generated
* @ordered
*/
protected static final String CHARACTERISTIC_EDEFAULT = null;
/**
* The cached value of the '{@link #getCharacteristic() Characteristic}' attribute.
*
*
* @see #getCharacteristic()
* @generated
* @ordered
*/
protected String characteristic = CHARACTERISTIC_EDEFAULT;
/**
* The default value of the '{@link #getCharacteristicDoc() Characteristic Doc}' attribute.
*
*
* @see #getCharacteristicDoc()
* @generated
* @ordered
*/
protected static final String CHARACTERISTIC_DOC_EDEFAULT = null;
/**
* The cached value of the '{@link #getCharacteristicDoc() Characteristic Doc}' attribute.
*
*
* @see #getCharacteristicDoc()
* @generated
* @ordered
*/
protected String characteristicDoc = CHARACTERISTIC_DOC_EDEFAULT;
/**
* The cached value of the '{@link #getNanoentities() Nanoentities}' attribute list.
*
*
* @see #getNanoentities()
* @generated
* @ordered
*/
protected EList nanoentities;
/**
*
*
* @generated
*/
protected CharacteristicImpl()
{
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass()
{
return ServiceCutterConfigurationDSLPackage.Literals.CHARACTERISTIC;
}
/**
*
*
* @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, ServiceCutterConfigurationDSLPackage.CHARACTERISTIC__DOC, oldDoc, doc));
}
/**
*
*
* @generated
*/
public String getCharacteristic()
{
return characteristic;
}
/**
*
*
* @generated
*/
public void setCharacteristic(String newCharacteristic)
{
String oldCharacteristic = characteristic;
characteristic = newCharacteristic;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ServiceCutterConfigurationDSLPackage.CHARACTERISTIC__CHARACTERISTIC, oldCharacteristic, characteristic));
}
/**
*
*
* @generated
*/
public String getCharacteristicDoc()
{
return characteristicDoc;
}
/**
*
*
* @generated
*/
public void setCharacteristicDoc(String newCharacteristicDoc)
{
String oldCharacteristicDoc = characteristicDoc;
characteristicDoc = newCharacteristicDoc;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ServiceCutterConfigurationDSLPackage.CHARACTERISTIC__CHARACTERISTIC_DOC, oldCharacteristicDoc, characteristicDoc));
}
/**
*
*
* @generated
*/
public EList getNanoentities()
{
if (nanoentities == null)
{
nanoentities = new EDataTypeEList(String.class, this, ServiceCutterConfigurationDSLPackage.CHARACTERISTIC__NANOENTITIES);
}
return nanoentities;
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case ServiceCutterConfigurationDSLPackage.CHARACTERISTIC__DOC:
return getDoc();
case ServiceCutterConfigurationDSLPackage.CHARACTERISTIC__CHARACTERISTIC:
return getCharacteristic();
case ServiceCutterConfigurationDSLPackage.CHARACTERISTIC__CHARACTERISTIC_DOC:
return getCharacteristicDoc();
case ServiceCutterConfigurationDSLPackage.CHARACTERISTIC__NANOENTITIES:
return getNanoentities();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case ServiceCutterConfigurationDSLPackage.CHARACTERISTIC__DOC:
setDoc((String)newValue);
return;
case ServiceCutterConfigurationDSLPackage.CHARACTERISTIC__CHARACTERISTIC:
setCharacteristic((String)newValue);
return;
case ServiceCutterConfigurationDSLPackage.CHARACTERISTIC__CHARACTERISTIC_DOC:
setCharacteristicDoc((String)newValue);
return;
case ServiceCutterConfigurationDSLPackage.CHARACTERISTIC__NANOENTITIES:
getNanoentities().clear();
getNanoentities().addAll((Collection extends String>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case ServiceCutterConfigurationDSLPackage.CHARACTERISTIC__DOC:
setDoc(DOC_EDEFAULT);
return;
case ServiceCutterConfigurationDSLPackage.CHARACTERISTIC__CHARACTERISTIC:
setCharacteristic(CHARACTERISTIC_EDEFAULT);
return;
case ServiceCutterConfigurationDSLPackage.CHARACTERISTIC__CHARACTERISTIC_DOC:
setCharacteristicDoc(CHARACTERISTIC_DOC_EDEFAULT);
return;
case ServiceCutterConfigurationDSLPackage.CHARACTERISTIC__NANOENTITIES:
getNanoentities().clear();
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case ServiceCutterConfigurationDSLPackage.CHARACTERISTIC__DOC:
return DOC_EDEFAULT == null ? doc != null : !DOC_EDEFAULT.equals(doc);
case ServiceCutterConfigurationDSLPackage.CHARACTERISTIC__CHARACTERISTIC:
return CHARACTERISTIC_EDEFAULT == null ? characteristic != null : !CHARACTERISTIC_EDEFAULT.equals(characteristic);
case ServiceCutterConfigurationDSLPackage.CHARACTERISTIC__CHARACTERISTIC_DOC:
return CHARACTERISTIC_DOC_EDEFAULT == null ? characteristicDoc != null : !CHARACTERISTIC_DOC_EDEFAULT.equals(characteristicDoc);
case ServiceCutterConfigurationDSLPackage.CHARACTERISTIC__NANOENTITIES:
return nanoentities != null && !nanoentities.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(", characteristic: ");
result.append(characteristic);
result.append(", characteristicDoc: ");
result.append(characteristicDoc);
result.append(", nanoentities: ");
result.append(nanoentities);
result.append(')');
return result.toString();
}
} //CharacteristicImpl
© 2015 - 2025 Weber Informatics LLC | Privacy Policy