/*- * ============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.openstack.compute.impl; import org.openecomp.ncomp.openstack.compute.ComputePackage; import org.openecomp.ncomp.openstack.compute.Link; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; /** * * An implementation of the model object 'Link'. * *

* The following features are implemented: *

* * * @generated */ public class LinkImpl extends MinimalEObjectImpl.Container implements Link { /** * The default value of the '{@link #getRel() Rel}' attribute. * * * @see #getRel() * @generated * @ordered */ protected static final String REL_EDEFAULT = null; /** * The cached value of the '{@link #getRel() Rel}' attribute. * * * @see #getRel() * @generated * @ordered */ protected String rel = REL_EDEFAULT; /** * The default value of the '{@link #getHref() Href}' attribute. * * * @see #getHref() * @generated * @ordered */ protected static final String HREF_EDEFAULT = null; /** * The cached value of the '{@link #getHref() Href}' attribute. * * * @see #getHref() * @generated * @ordered */ protected String href = HREF_EDEFAULT; /** * The default value of the '{@link #getType() Type}' attribute. * * * @see #getType() * @generated * @ordered */ protected static final String TYPE_EDEFAULT = null; /** * The cached value of the '{@link #getType() Type}' attribute. * * * @see #getType() * @generated * @ordered */ protected String type = TYPE_EDEFAULT; /** * * * @generated */ protected LinkImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return ComputePackage.Literals.LINK; } /** * * * @generated */ public String getRel() { return rel; } /** * * * @generated */ public void setRel(String newRel) { String oldRel = rel; rel = newRel; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ComputePackage.LINK__REL, oldRel, rel)); } /** * * * @generated */ public String getHref() { return href; } /** * * * @generated */ public void setHref(String newHref) { String oldHref = href; href = newHref; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ComputePackage.LINK__HREF, oldHref, href)); } /** * * * @generated */ public String getType() { return type; } /** * * * @generated */ public void setType(String newType) { String oldType = type; type = newType; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ComputePackage.LINK__TYPE, oldType, type)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case ComputePackage.LINK__REL: return getRel(); case ComputePackage.LINK__HREF: return getHref(); case ComputePackage.LINK__TYPE: return getType(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case ComputePackage.LINK__REL: setRel((String)newValue); return; case ComputePackage.LINK__HREF: setHref((String)newValue); return; case ComputePackage.LINK__TYPE: setType((String)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case ComputePackage.LINK__REL: setRel(REL_EDEFAULT); return; case ComputePackage.LINK__HREF: setHref(HREF_EDEFAULT); return; case ComputePackage.LINK__TYPE: setType(TYPE_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case ComputePackage.LINK__REL: return REL_EDEFAULT == null ? rel != null : !REL_EDEFAULT.equals(rel); case ComputePackage.LINK__HREF: return HREF_EDEFAULT == null ? href != null : !HREF_EDEFAULT.equals(href); case ComputePackage.LINK__TYPE: return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (rel: "); result.append(rel); result.append(", href: "); result.append(href); result.append(", type: "); result.append(type); result.append(')'); return result.toString(); } } //LinkImpl