blob: 7a66ebd426216657393bf86343dc0ca205539e47 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2016 David Carlson 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:
* David Carlson (Clinical Cloud Solutions, LLC) - initial API and implementation
*******************************************************************************/
/**
*/
package org.eclipse.mdht.uml.fhir.core.resource.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.mdht.uml.fhir.core.datatype.CodeableConcept;
import org.eclipse.mdht.uml.fhir.core.datatype.Quantity;
import org.eclipse.mdht.uml.fhir.core.datatype.impl.BackboneElementImpl;
import org.eclipse.mdht.uml.fhir.core.resource.FhirResourcePackage;
import org.eclipse.mdht.uml.fhir.core.resource.SequenceQuality;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Sequence Quality</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.SequenceQualityImpl#getStart <em>Start</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.SequenceQualityImpl#getEnd <em>End</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.SequenceQualityImpl#getScore <em>Score</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.SequenceQualityImpl#getPlatform <em>Platform</em>}</li>
* </ul>
*
* @generated
*/
public class SequenceQualityImpl extends BackboneElementImpl implements SequenceQuality {
/**
* The cached value of the '{@link #getStart() <em>Start</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getStart()
* @generated
* @ordered
*/
protected org.eclipse.mdht.uml.fhir.core.datatype.Integer start;
/**
* The cached value of the '{@link #getEnd() <em>End</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getEnd()
* @generated
* @ordered
*/
protected org.eclipse.mdht.uml.fhir.core.datatype.Integer end;
/**
* The cached value of the '{@link #getScore() <em>Score</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getScore()
* @generated
* @ordered
*/
protected Quantity score;
/**
* The cached value of the '{@link #getPlatform() <em>Platform</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPlatform()
* @generated
* @ordered
*/
protected CodeableConcept platform;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected SequenceQualityImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FhirResourcePackage.eINSTANCE.getSequenceQuality();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.eclipse.mdht.uml.fhir.core.datatype.Integer getStart() {
if (start != null && start.eIsProxy()) {
InternalEObject oldStart = (InternalEObject)start;
start = (org.eclipse.mdht.uml.fhir.core.datatype.Integer)eResolveProxy(oldStart);
if (start != oldStart) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.SEQUENCE_QUALITY__START, oldStart, start));
}
}
return start;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.eclipse.mdht.uml.fhir.core.datatype.Integer basicGetStart() {
return start;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setStart(org.eclipse.mdht.uml.fhir.core.datatype.Integer newStart) {
org.eclipse.mdht.uml.fhir.core.datatype.Integer oldStart = start;
start = newStart;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.SEQUENCE_QUALITY__START, oldStart, start));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.eclipse.mdht.uml.fhir.core.datatype.Integer getEnd() {
if (end != null && end.eIsProxy()) {
InternalEObject oldEnd = (InternalEObject)end;
end = (org.eclipse.mdht.uml.fhir.core.datatype.Integer)eResolveProxy(oldEnd);
if (end != oldEnd) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.SEQUENCE_QUALITY__END, oldEnd, end));
}
}
return end;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.eclipse.mdht.uml.fhir.core.datatype.Integer basicGetEnd() {
return end;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setEnd(org.eclipse.mdht.uml.fhir.core.datatype.Integer newEnd) {
org.eclipse.mdht.uml.fhir.core.datatype.Integer oldEnd = end;
end = newEnd;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.SEQUENCE_QUALITY__END, oldEnd, end));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Quantity getScore() {
if (score != null && score.eIsProxy()) {
InternalEObject oldScore = (InternalEObject)score;
score = (Quantity)eResolveProxy(oldScore);
if (score != oldScore) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.SEQUENCE_QUALITY__SCORE, oldScore, score));
}
}
return score;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Quantity basicGetScore() {
return score;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setScore(Quantity newScore) {
Quantity oldScore = score;
score = newScore;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.SEQUENCE_QUALITY__SCORE, oldScore, score));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CodeableConcept getPlatform() {
if (platform != null && platform.eIsProxy()) {
InternalEObject oldPlatform = (InternalEObject)platform;
platform = (CodeableConcept)eResolveProxy(oldPlatform);
if (platform != oldPlatform) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.SEQUENCE_QUALITY__PLATFORM, oldPlatform, platform));
}
}
return platform;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CodeableConcept basicGetPlatform() {
return platform;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setPlatform(CodeableConcept newPlatform) {
CodeableConcept oldPlatform = platform;
platform = newPlatform;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.SEQUENCE_QUALITY__PLATFORM, oldPlatform, platform));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case FhirResourcePackage.SEQUENCE_QUALITY__START:
if (resolve) return getStart();
return basicGetStart();
case FhirResourcePackage.SEQUENCE_QUALITY__END:
if (resolve) return getEnd();
return basicGetEnd();
case FhirResourcePackage.SEQUENCE_QUALITY__SCORE:
if (resolve) return getScore();
return basicGetScore();
case FhirResourcePackage.SEQUENCE_QUALITY__PLATFORM:
if (resolve) return getPlatform();
return basicGetPlatform();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case FhirResourcePackage.SEQUENCE_QUALITY__START:
setStart((org.eclipse.mdht.uml.fhir.core.datatype.Integer)newValue);
return;
case FhirResourcePackage.SEQUENCE_QUALITY__END:
setEnd((org.eclipse.mdht.uml.fhir.core.datatype.Integer)newValue);
return;
case FhirResourcePackage.SEQUENCE_QUALITY__SCORE:
setScore((Quantity)newValue);
return;
case FhirResourcePackage.SEQUENCE_QUALITY__PLATFORM:
setPlatform((CodeableConcept)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FhirResourcePackage.SEQUENCE_QUALITY__START:
setStart((org.eclipse.mdht.uml.fhir.core.datatype.Integer)null);
return;
case FhirResourcePackage.SEQUENCE_QUALITY__END:
setEnd((org.eclipse.mdht.uml.fhir.core.datatype.Integer)null);
return;
case FhirResourcePackage.SEQUENCE_QUALITY__SCORE:
setScore((Quantity)null);
return;
case FhirResourcePackage.SEQUENCE_QUALITY__PLATFORM:
setPlatform((CodeableConcept)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FhirResourcePackage.SEQUENCE_QUALITY__START:
return start != null;
case FhirResourcePackage.SEQUENCE_QUALITY__END:
return end != null;
case FhirResourcePackage.SEQUENCE_QUALITY__SCORE:
return score != null;
case FhirResourcePackage.SEQUENCE_QUALITY__PLATFORM:
return platform != null;
}
return super.eIsSet(featureID);
}
} //SequenceQualityImpl