/*-
* ============LICENSE_START==========================================
* OPENECOMP - DCAE
* ===================================================================
* Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
* ===================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END============================================
*/
/**
*/
package org.openecomp.ncomp.sirius.manager.graph.impl;
import org.openecomp.ncomp.sirius.manager.graph.GraphPackage;
import org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
/**
*
* An implementation of the model object 'Gui Graph Node'.
*
*
* The following features are implemented:
*
* - {@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphNodeImpl#getX X}
* - {@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphNodeImpl#getY Y}
* - {@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphNodeImpl#getH H}
* - {@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphNodeImpl#getW W}
*
*
*
* @generated
*/
public class GuiGraphNodeImpl extends GuiGraphItemImpl implements GuiGraphNode {
/**
* The default value of the '{@link #getX() X}' attribute.
*
*
* @see #getX()
* @generated
* @ordered
*/
protected static final Integer X_EDEFAULT = null;
/**
* The cached value of the '{@link #getX() X}' attribute.
*
*
* @see #getX()
* @generated
* @ordered
*/
protected Integer x = X_EDEFAULT;
/**
* The default value of the '{@link #getY() Y}' attribute.
*
*
* @see #getY()
* @generated
* @ordered
*/
protected static final Integer Y_EDEFAULT = null;
/**
* The cached value of the '{@link #getY() Y}' attribute.
*
*
* @see #getY()
* @generated
* @ordered
*/
protected Integer y = Y_EDEFAULT;
/**
* The default value of the '{@link #getH() H}' attribute.
*
*
* @see #getH()
* @generated
* @ordered
*/
protected static final Integer H_EDEFAULT = null;
/**
* The cached value of the '{@link #getH() H}' attribute.
*
*
* @see #getH()
* @generated
* @ordered
*/
protected Integer h = H_EDEFAULT;
/**
* The default value of the '{@link #getW() W}' attribute.
*
*
* @see #getW()
* @generated
* @ordered
*/
protected static final Integer W_EDEFAULT = null;
/**
* The cached value of the '{@link #getW() W}' attribute.
*
*
* @see #getW()
* @generated
* @ordered
*/
protected Integer w = W_EDEFAULT;
/**
*
*
* @generated
*/
protected GuiGraphNodeImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return GraphPackage.Literals.GUI_GRAPH_NODE;
}
/**
*
*
* @generated
*/
public Integer getX() {
return x;
}
/**
*
*
* @generated
*/
public void setX(Integer newX) {
Integer oldX = x;
x = newX;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GUI_GRAPH_NODE__X, oldX, x));
}
/**
*
*
* @generated
*/
public Integer getY() {
return y;
}
/**
*
*
* @generated
*/
public void setY(Integer newY) {
Integer oldY = y;
y = newY;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GUI_GRAPH_NODE__Y, oldY, y));
}
/**
*
*
* @generated
*/
public Integer getH() {
return h;
}
/**
*
*
* @generated
*/
public void setH(Integer newH) {
Integer oldH = h;
h = newH;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GUI_GRAPH_NODE__H, oldH, h));
}
/**
*
*
* @generated
*/
public Integer getW() {
return w;
}
/**
*
*
* @generated
*/
public void setW(Integer newW) {
Integer oldW = w;
w = newW;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GUI_GRAPH_NODE__W, oldW, w));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case GraphPackage.GUI_GRAPH_NODE__X:
return getX();
case GraphPackage.GUI_GRAPH_NODE__Y:
return getY();
case GraphPackage.GUI_GRAPH_NODE__H:
return getH();
case GraphPackage.GUI_GRAPH_NODE__W:
return getW();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case GraphPackage.GUI_GRAPH_NODE__X:
setX((Integer)newValue);
return;
case GraphPackage.GUI_GRAPH_NODE__Y:
setY((Integer)newValue);
return;
case GraphPackage.GUI_GRAPH_NODE__H:
setH((Integer)newValue);
return;
case GraphPackage.GUI_GRAPH_NODE__W:
setW((Integer)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case GraphPackage.GUI_GRAPH_NODE__X:
setX(X_EDEFAULT);
return;
case GraphPackage.GUI_GRAPH_NODE__Y:
setY(Y_EDEFAULT);
return;
case GraphPackage.GUI_GRAPH_NODE__H:
setH(H_EDEFAULT);
return;
case GraphPackage.GUI_GRAPH_NODE__W:
setW(W_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case GraphPackage.GUI_GRAPH_NODE__X:
return X_EDEFAULT == null ? x != null : !X_EDEFAULT.equals(x);
case GraphPackage.GUI_GRAPH_NODE__Y:
return Y_EDEFAULT == null ? y != null : !Y_EDEFAULT.equals(y);
case GraphPackage.GUI_GRAPH_NODE__H:
return H_EDEFAULT == null ? h != null : !H_EDEFAULT.equals(h);
case GraphPackage.GUI_GRAPH_NODE__W:
return W_EDEFAULT == null ? w != null : !W_EDEFAULT.equals(w);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (x: ");
result.append(x);
result.append(", y: ");
result.append(y);
result.append(", h: ");
result.append(h);
result.append(", w: ");
result.append(w);
result.append(')');
return result.toString();
}
} //GuiGraphNodeImpl