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

org.openxma.dsl.dom.model.impl.PropertyImpl Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
/**
 * 
 * 
 *
 * $Id$
 */
package org.openxma.dsl.dom.model.impl;

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.openxma.dsl.core.CorePackage;
import org.openxma.dsl.core.model.IDocumentable;
import org.openxma.dsl.core.model.SimpleType;
import org.openxma.dsl.core.model.impl.ReferenceableByXmadslVariableImpl;
import org.openxma.dsl.dom.DomPackage;
import org.openxma.dsl.dom.model.Property;

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

* The following features are implemented: *

    *
  • {@link org.openxma.dsl.dom.model.impl.PropertyImpl#getTxtDescription Txt Description}
  • *
  • {@link org.openxma.dsl.dom.model.impl.PropertyImpl#getType Type}
  • *
  • {@link org.openxma.dsl.dom.model.impl.PropertyImpl#getName Name}
  • *
  • {@link org.openxma.dsl.dom.model.impl.PropertyImpl#getDefaultValue Default Value}
  • *
*

* * @generated */ public class PropertyImpl extends ReferenceableByXmadslVariableImpl implements Property { /** * The default value of the '{@link #getTxtDescription() Txt Description}' attribute. * * * @see #getTxtDescription() * @generated * @ordered */ protected static final String TXT_DESCRIPTION_EDEFAULT = null; /** * The cached value of the '{@link #getTxtDescription() Txt Description}' attribute. * * * @see #getTxtDescription() * @generated * @ordered */ protected String txtDescription = TXT_DESCRIPTION_EDEFAULT; /** * The cached value of the '{@link #getType() Type}' reference. * * * @see #getType() * @generated * @ordered */ protected SimpleType type; /** * 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 #getDefaultValue() Default Value}' attribute. * * * @see #getDefaultValue() * @generated * @ordered */ protected static final String DEFAULT_VALUE_EDEFAULT = null; /** * The cached value of the '{@link #getDefaultValue() Default Value}' attribute. * * * @see #getDefaultValue() * @generated * @ordered */ protected String defaultValue = DEFAULT_VALUE_EDEFAULT; /** * * * @generated */ protected PropertyImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return DomPackage.Literals.PROPERTY; } /** * * * @generated */ public String getTxtDescription() { return txtDescription; } /** * * * @generated */ public void setTxtDescription(String newTxtDescription) { String oldTxtDescription = txtDescription; txtDescription = newTxtDescription; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.PROPERTY__TXT_DESCRIPTION, oldTxtDescription, txtDescription)); } /** * * * @generated */ public SimpleType getType() { if (type != null && type.eIsProxy()) { InternalEObject oldType = (InternalEObject)type; type = (SimpleType)eResolveProxy(oldType); if (type != oldType) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, DomPackage.PROPERTY__TYPE, oldType, type)); } } return type; } /** * * * @generated */ public SimpleType basicGetType() { return type; } /** * * * @generated */ public void setType(SimpleType newType) { SimpleType oldType = type; type = newType; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.PROPERTY__TYPE, oldType, type)); } /** * * * @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, DomPackage.PROPERTY__NAME, oldName, name)); } /** * * * @generated */ public String getDefaultValue() { return defaultValue; } /** * * * @generated */ public void setDefaultValue(String newDefaultValue) { String oldDefaultValue = defaultValue; defaultValue = newDefaultValue; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.PROPERTY__DEFAULT_VALUE, oldDefaultValue, defaultValue)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case DomPackage.PROPERTY__TXT_DESCRIPTION: return getTxtDescription(); case DomPackage.PROPERTY__TYPE: if (resolve) return getType(); return basicGetType(); case DomPackage.PROPERTY__NAME: return getName(); case DomPackage.PROPERTY__DEFAULT_VALUE: return getDefaultValue(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case DomPackage.PROPERTY__TXT_DESCRIPTION: setTxtDescription((String)newValue); return; case DomPackage.PROPERTY__TYPE: setType((SimpleType)newValue); return; case DomPackage.PROPERTY__NAME: setName((String)newValue); return; case DomPackage.PROPERTY__DEFAULT_VALUE: setDefaultValue((String)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case DomPackage.PROPERTY__TXT_DESCRIPTION: setTxtDescription(TXT_DESCRIPTION_EDEFAULT); return; case DomPackage.PROPERTY__TYPE: setType((SimpleType)null); return; case DomPackage.PROPERTY__NAME: setName(NAME_EDEFAULT); return; case DomPackage.PROPERTY__DEFAULT_VALUE: setDefaultValue(DEFAULT_VALUE_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case DomPackage.PROPERTY__TXT_DESCRIPTION: return TXT_DESCRIPTION_EDEFAULT == null ? txtDescription != null : !TXT_DESCRIPTION_EDEFAULT.equals(txtDescription); case DomPackage.PROPERTY__TYPE: return type != null; case DomPackage.PROPERTY__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case DomPackage.PROPERTY__DEFAULT_VALUE: return DEFAULT_VALUE_EDEFAULT == null ? defaultValue != null : !DEFAULT_VALUE_EDEFAULT.equals(defaultValue); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { if (baseClass == IDocumentable.class) { switch (derivedFeatureID) { case DomPackage.PROPERTY__TXT_DESCRIPTION: return CorePackage.IDOCUMENTABLE__TXT_DESCRIPTION; default: return -1; } } return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); } /** * * * @generated */ @Override public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { if (baseClass == IDocumentable.class) { switch (baseFeatureID) { case CorePackage.IDOCUMENTABLE__TXT_DESCRIPTION: return DomPackage.PROPERTY__TXT_DESCRIPTION; default: return -1; } } return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (txtDescription: "); result.append(txtDescription); result.append(", name: "); result.append(name); result.append(", defaultValue: "); result.append(defaultValue); result.append(')'); return result.toString(); } } //PropertyImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy