/**
*/
package net.cis.common.model.structure.impl;
import net.cis.common.model.sector.Sector;
import net.cis.common.model.structure.Jumpgate;
import net.cis.common.model.structure.StructurePackage;
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;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Jumpgate</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link net.cis.common.model.structure.impl.JumpgateImpl#getLinkedJumpgate <em>Linked Jumpgate</em>}</li>
* <li>{@link net.cis.common.model.structure.impl.JumpgateImpl#getParentSector <em>Parent Sector</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class JumpgateImpl extends AbstractStructureImpl implements Jumpgate {
/**
* The cached value of the '{@link #getLinkedJumpgate() <em>Linked Jumpgate</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getLinkedJumpgate()
* @generated
* @ordered
*/
protected Jumpgate linkedJumpgate;
/**
* The cached value of the '{@link #getParentSector() <em>Parent Sector</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getParentSector()
* @generated
* @ordered
*/
protected Sector parentSector;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected JumpgateImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return StructurePackage.Literals.JUMPGATE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Jumpgate getLinkedJumpgate() {
if (linkedJumpgate != null && linkedJumpgate.eIsProxy()) {
InternalEObject oldLinkedJumpgate = (InternalEObject)linkedJumpgate;
linkedJumpgate = (Jumpgate)eResolveProxy(oldLinkedJumpgate);
if (linkedJumpgate != oldLinkedJumpgate) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, StructurePackage.JUMPGATE__LINKED_JUMPGATE, oldLinkedJumpgate, linkedJumpgate));
}
}
return linkedJumpgate;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Jumpgate basicGetLinkedJumpgate() {
return linkedJumpgate;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setLinkedJumpgate(Jumpgate newLinkedJumpgate) {
Jumpgate oldLinkedJumpgate = linkedJumpgate;
linkedJumpgate = newLinkedJumpgate;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, StructurePackage.JUMPGATE__LINKED_JUMPGATE, oldLinkedJumpgate, linkedJumpgate));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Sector getParentSector() {
if (parentSector != null && parentSector.eIsProxy()) {
InternalEObject oldParentSector = (InternalEObject)parentSector;
parentSector = (Sector)eResolveProxy(oldParentSector);
if (parentSector != oldParentSector) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, StructurePackage.JUMPGATE__PARENT_SECTOR, oldParentSector, parentSector));
}
}
return parentSector;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Sector basicGetParentSector() {
return parentSector;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setParentSector(Sector newParentSector) {
Sector oldParentSector = parentSector;
parentSector = newParentSector;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, StructurePackage.JUMPGATE__PARENT_SECTOR, oldParentSector, parentSector));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case StructurePackage.JUMPGATE__LINKED_JUMPGATE:
if (resolve) return getLinkedJumpgate();
return basicGetLinkedJumpgate();
case StructurePackage.JUMPGATE__PARENT_SECTOR:
if (resolve) return getParentSector();
return basicGetParentSector();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case StructurePackage.JUMPGATE__LINKED_JUMPGATE:
setLinkedJumpgate((Jumpgate)newValue);
return;
case StructurePackage.JUMPGATE__PARENT_SECTOR:
setParentSector((Sector)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case StructurePackage.JUMPGATE__LINKED_JUMPGATE:
setLinkedJumpgate((Jumpgate)null);
return;
case StructurePackage.JUMPGATE__PARENT_SECTOR:
setParentSector((Sector)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case StructurePackage.JUMPGATE__LINKED_JUMPGATE:
return linkedJumpgate != null;
case StructurePackage.JUMPGATE__PARENT_SECTOR:
return parentSector != null;
}
return super.eIsSet(featureID);
}
} //JumpgateImpl