/******************************************************************************* | |
* Copyright (c) 2009, 2011 IBM Corporation and others. | |
* 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: | |
* IBM Corporation - initial API and implementation | |
*******************************************************************************/ | |
package org.eclipse.mdht.uml.cda.impl; | |
import org.eclipse.emf.common.notify.Notification; | |
import org.eclipse.emf.ecore.EClass; | |
import org.eclipse.emf.ecore.impl.ENotificationImpl; | |
import org.eclipse.mdht.uml.cda.CDAPackage; | |
import org.eclipse.mdht.uml.cda.RegionOfInterestValue; | |
import org.eclipse.mdht.uml.hl7.datatypes.impl.INTImpl; | |
/** | |
* <!-- begin-user-doc --> | |
* An implementation of the model object '<em><b>Region Of Interest Value</b></em>'. | |
* <!-- end-user-doc --> | |
* <p> | |
* The following features are implemented: | |
* </p> | |
* <ul> | |
* <li>{@link org.eclipse.mdht.uml.cda.impl.RegionOfInterestValueImpl#isUnsorted <em>Unsorted</em>}</li> | |
* </ul> | |
* | |
* @generated | |
*/ | |
public class RegionOfInterestValueImpl extends INTImpl implements RegionOfInterestValue { | |
/** | |
* The default value of the '{@link #isUnsorted() <em>Unsorted</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #isUnsorted() | |
* @generated | |
* @ordered | |
*/ | |
protected static final boolean UNSORTED_EDEFAULT = false; | |
/** | |
* The cached value of the '{@link #isUnsorted() <em>Unsorted</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #isUnsorted() | |
* @generated | |
* @ordered | |
*/ | |
protected boolean unsorted = UNSORTED_EDEFAULT; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
protected RegionOfInterestValueImpl() { | |
super(); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
protected EClass eStaticClass() { | |
return CDAPackage.Literals.REGION_OF_INTEREST_VALUE; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public boolean isUnsorted() { | |
return unsorted; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void setUnsorted(boolean newUnsorted) { | |
boolean oldUnsorted = unsorted; | |
unsorted = newUnsorted; | |
if (eNotificationRequired()) { | |
eNotify( | |
new ENotificationImpl( | |
this, Notification.SET, CDAPackage.REGION_OF_INTEREST_VALUE__UNSORTED, oldUnsorted, unsorted)); | |
} | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public Object eGet(int featureID, boolean resolve, boolean coreType) { | |
switch (featureID) { | |
case CDAPackage.REGION_OF_INTEREST_VALUE__UNSORTED: | |
return isUnsorted(); | |
} | |
return super.eGet(featureID, resolve, coreType); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eSet(int featureID, Object newValue) { | |
switch (featureID) { | |
case CDAPackage.REGION_OF_INTEREST_VALUE__UNSORTED: | |
setUnsorted((Boolean) newValue); | |
return; | |
} | |
super.eSet(featureID, newValue); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eUnset(int featureID) { | |
switch (featureID) { | |
case CDAPackage.REGION_OF_INTEREST_VALUE__UNSORTED: | |
setUnsorted(UNSORTED_EDEFAULT); | |
return; | |
} | |
super.eUnset(featureID); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public boolean eIsSet(int featureID) { | |
switch (featureID) { | |
case CDAPackage.REGION_OF_INTEREST_VALUE__UNSORTED: | |
return unsorted != UNSORTED_EDEFAULT; | |
} | |
return super.eIsSet(featureID); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public String toString() { | |
if (eIsProxy()) { | |
return super.toString(); | |
} | |
StringBuilder result = new StringBuilder(super.toString()); | |
result.append(" (unsorted: "); | |
result.append(unsorted); | |
result.append(')'); | |
return result.toString(); | |
} | |
} // RegionOfInterestValueImpl |