blob: fba589282cc8c7cd661e31ce7f7d9e6984fa7bbf [file] [log] [blame]
/**
*/
package org.hl7.fhir.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.hl7.fhir.CodeableConcept;
import org.hl7.fhir.FhirPackage;
import org.hl7.fhir.Quantity;
import org.hl7.fhir.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.hl7.fhir.impl.SequenceQualityImpl#getStart <em>Start</em>}</li>
* <li>{@link org.hl7.fhir.impl.SequenceQualityImpl#getEnd <em>End</em>}</li>
* <li>{@link org.hl7.fhir.impl.SequenceQualityImpl#getScore <em>Score</em>}</li>
* <li>{@link org.hl7.fhir.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>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getStart()
* @generated
* @ordered
*/
protected org.hl7.fhir.Integer start;
/**
* The cached value of the '{@link #getEnd() <em>End</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getEnd()
* @generated
* @ordered
*/
protected org.hl7.fhir.Integer end;
/**
* The cached value of the '{@link #getScore() <em>Score</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getScore()
* @generated
* @ordered
*/
protected Quantity score;
/**
* The cached value of the '{@link #getPlatform() <em>Platform</em>}' containment 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 FhirPackage.eINSTANCE.getSequenceQuality();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.hl7.fhir.Integer getStart() {
return start;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetStart(org.hl7.fhir.Integer newStart, NotificationChain msgs) {
org.hl7.fhir.Integer oldStart = start;
start = newStart;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.SEQUENCE_QUALITY__START, oldStart, newStart);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setStart(org.hl7.fhir.Integer newStart) {
if (newStart != start) {
NotificationChain msgs = null;
if (start != null)
msgs = ((InternalEObject)start).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SEQUENCE_QUALITY__START, null, msgs);
if (newStart != null)
msgs = ((InternalEObject)newStart).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SEQUENCE_QUALITY__START, null, msgs);
msgs = basicSetStart(newStart, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.SEQUENCE_QUALITY__START, newStart, newStart));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.hl7.fhir.Integer getEnd() {
return end;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetEnd(org.hl7.fhir.Integer newEnd, NotificationChain msgs) {
org.hl7.fhir.Integer oldEnd = end;
end = newEnd;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.SEQUENCE_QUALITY__END, oldEnd, newEnd);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setEnd(org.hl7.fhir.Integer newEnd) {
if (newEnd != end) {
NotificationChain msgs = null;
if (end != null)
msgs = ((InternalEObject)end).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SEQUENCE_QUALITY__END, null, msgs);
if (newEnd != null)
msgs = ((InternalEObject)newEnd).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SEQUENCE_QUALITY__END, null, msgs);
msgs = basicSetEnd(newEnd, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.SEQUENCE_QUALITY__END, newEnd, newEnd));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Quantity getScore() {
return score;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetScore(Quantity newScore, NotificationChain msgs) {
Quantity oldScore = score;
score = newScore;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.SEQUENCE_QUALITY__SCORE, oldScore, newScore);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setScore(Quantity newScore) {
if (newScore != score) {
NotificationChain msgs = null;
if (score != null)
msgs = ((InternalEObject)score).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SEQUENCE_QUALITY__SCORE, null, msgs);
if (newScore != null)
msgs = ((InternalEObject)newScore).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SEQUENCE_QUALITY__SCORE, null, msgs);
msgs = basicSetScore(newScore, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.SEQUENCE_QUALITY__SCORE, newScore, newScore));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CodeableConcept getPlatform() {
return platform;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetPlatform(CodeableConcept newPlatform, NotificationChain msgs) {
CodeableConcept oldPlatform = platform;
platform = newPlatform;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.SEQUENCE_QUALITY__PLATFORM, oldPlatform, newPlatform);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setPlatform(CodeableConcept newPlatform) {
if (newPlatform != platform) {
NotificationChain msgs = null;
if (platform != null)
msgs = ((InternalEObject)platform).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SEQUENCE_QUALITY__PLATFORM, null, msgs);
if (newPlatform != null)
msgs = ((InternalEObject)newPlatform).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SEQUENCE_QUALITY__PLATFORM, null, msgs);
msgs = basicSetPlatform(newPlatform, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.SEQUENCE_QUALITY__PLATFORM, newPlatform, newPlatform));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case FhirPackage.SEQUENCE_QUALITY__START:
return basicSetStart(null, msgs);
case FhirPackage.SEQUENCE_QUALITY__END:
return basicSetEnd(null, msgs);
case FhirPackage.SEQUENCE_QUALITY__SCORE:
return basicSetScore(null, msgs);
case FhirPackage.SEQUENCE_QUALITY__PLATFORM:
return basicSetPlatform(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case FhirPackage.SEQUENCE_QUALITY__START:
return getStart();
case FhirPackage.SEQUENCE_QUALITY__END:
return getEnd();
case FhirPackage.SEQUENCE_QUALITY__SCORE:
return getScore();
case FhirPackage.SEQUENCE_QUALITY__PLATFORM:
return getPlatform();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case FhirPackage.SEQUENCE_QUALITY__START:
setStart((org.hl7.fhir.Integer)newValue);
return;
case FhirPackage.SEQUENCE_QUALITY__END:
setEnd((org.hl7.fhir.Integer)newValue);
return;
case FhirPackage.SEQUENCE_QUALITY__SCORE:
setScore((Quantity)newValue);
return;
case FhirPackage.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 FhirPackage.SEQUENCE_QUALITY__START:
setStart((org.hl7.fhir.Integer)null);
return;
case FhirPackage.SEQUENCE_QUALITY__END:
setEnd((org.hl7.fhir.Integer)null);
return;
case FhirPackage.SEQUENCE_QUALITY__SCORE:
setScore((Quantity)null);
return;
case FhirPackage.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 FhirPackage.SEQUENCE_QUALITY__START:
return start != null;
case FhirPackage.SEQUENCE_QUALITY__END:
return end != null;
case FhirPackage.SEQUENCE_QUALITY__SCORE:
return score != null;
case FhirPackage.SEQUENCE_QUALITY__PLATFORM:
return platform != null;
}
return super.eIsSet(featureID);
}
} //SequenceQualityImpl