/** | |
* | |
* Copyright (c) 2009 Hatha Systems. | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License v1.0 | |
* which accompanies this distribution, and is available at | |
* http://www.eclipse.org/legal/epl-v10.html | |
* | |
* Contributors: | |
* Nikolai Mansourov (Hatha Systems) - initial API and implementation | |
* Gabriel Barbier (Mia-Software) - minor evolutions for version 1.1 | |
* | |
* $Id$ | |
*/ | |
package org.eclipse.gmt.modisco.omg.kdm.kdm.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.eclipse.gmt.modisco.omg.kdm.core.impl.ElementImpl; | |
import org.eclipse.gmt.modisco.omg.kdm.kdm.ExtendedValue; | |
import org.eclipse.gmt.modisco.omg.kdm.kdm.KdmPackage; | |
import org.eclipse.gmt.modisco.omg.kdm.kdm.TagDefinition; | |
/** | |
* <!-- begin-user-doc --> | |
* An implementation of the model object '<em><b>Extended Value</b></em>'. | |
* <!-- end-user-doc --> | |
* <p> | |
* The following features are implemented: | |
* <ul> | |
* <li>{@link org.eclipse.gmt.modisco.omg.kdm.kdm.impl.ExtendedValueImpl#getTag <em>Tag</em>}</li> | |
* </ul> | |
* </p> | |
* | |
* @generated | |
*/ | |
public abstract class ExtendedValueImpl extends ElementImpl implements ExtendedValue { | |
/** | |
* The cached value of the '{@link #getTag() <em>Tag</em>}' reference. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getTag() | |
* @generated | |
* @ordered | |
*/ | |
protected TagDefinition tag; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
protected ExtendedValueImpl() { | |
super(); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
protected EClass eStaticClass() { | |
return KdmPackage.Literals.EXTENDED_VALUE; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public TagDefinition getTag() { | |
if (tag != null && tag.eIsProxy()) { | |
InternalEObject oldTag = (InternalEObject)tag; | |
tag = (TagDefinition)eResolveProxy(oldTag); | |
if (tag != oldTag) { | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.RESOLVE, KdmPackage.EXTENDED_VALUE__TAG, oldTag, tag)); | |
} | |
} | |
return tag; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public TagDefinition basicGetTag() { | |
return tag; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public void setTag(TagDefinition newTag) { | |
TagDefinition oldTag = tag; | |
tag = newTag; | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.SET, KdmPackage.EXTENDED_VALUE__TAG, oldTag, tag)); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public Object eGet(int featureID, boolean resolve, boolean coreType) { | |
switch (featureID) { | |
case KdmPackage.EXTENDED_VALUE__TAG: | |
if (resolve) return getTag(); | |
return basicGetTag(); | |
} | |
return super.eGet(featureID, resolve, coreType); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eSet(int featureID, Object newValue) { | |
switch (featureID) { | |
case KdmPackage.EXTENDED_VALUE__TAG: | |
setTag((TagDefinition)newValue); | |
return; | |
} | |
super.eSet(featureID, newValue); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eUnset(int featureID) { | |
switch (featureID) { | |
case KdmPackage.EXTENDED_VALUE__TAG: | |
setTag((TagDefinition)null); | |
return; | |
} | |
super.eUnset(featureID); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public boolean eIsSet(int featureID) { | |
switch (featureID) { | |
case KdmPackage.EXTENDED_VALUE__TAG: | |
return tag != null; | |
} | |
return super.eIsSet(featureID); | |
} | |
} //ExtendedValueImpl |