blob: 999929aa62eeffa862ab587f851f060465710080 [file] [log] [blame]
/**
* ****************************************************************************
* Copyright (c) 2020 CEA LIST.
*
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Asma Smaoui (CEA LIST) asma.smaoui@cea.fr - Initial API and implementation
*
* ****************************************************************************
*/
package io.shell.admin.aas._1._0.impl;
import io.shell.admin.aas._1._0.IdPropertyDefinitionT;
import io.shell.admin.aas._1._0._0Package;
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;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Id Property Definition T</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link io.shell.admin.aas._1._0.impl.IdPropertyDefinitionTImpl#getValue <em>Value</em>}</li>
* <li>{@link io.shell.admin.aas._1._0.impl.IdPropertyDefinitionTImpl#getIdType <em>Id Type</em>}</li>
* </ul>
*
* @generated
*/
public class IdPropertyDefinitionTImpl extends MinimalEObjectImpl.Container implements IdPropertyDefinitionT {
/**
* The default value of the '{@link #getValue() <em>Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValue()
* @generated
* @ordered
*/
protected static final String VALUE_EDEFAULT = null;
/**
* The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValue()
* @generated
* @ordered
*/
protected String value = VALUE_EDEFAULT;
/**
* The default value of the '{@link #getIdType() <em>Id Type</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getIdType()
* @generated
* @ordered
*/
protected static final String ID_TYPE_EDEFAULT = null;
/**
* The cached value of the '{@link #getIdType() <em>Id Type</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getIdType()
* @generated
* @ordered
*/
protected String idType = ID_TYPE_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected IdPropertyDefinitionTImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return _0Package.Literals.ID_PROPERTY_DEFINITION_T;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setValue(String newValue) {
String oldValue = value;
value = newValue;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, _0Package.ID_PROPERTY_DEFINITION_T__VALUE, oldValue, value));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getIdType() {
return idType;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setIdType(String newIdType) {
String oldIdType = idType;
idType = newIdType;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, _0Package.ID_PROPERTY_DEFINITION_T__ID_TYPE, oldIdType, idType));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case _0Package.ID_PROPERTY_DEFINITION_T__VALUE:
return getValue();
case _0Package.ID_PROPERTY_DEFINITION_T__ID_TYPE:
return getIdType();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case _0Package.ID_PROPERTY_DEFINITION_T__VALUE:
setValue((String)newValue);
return;
case _0Package.ID_PROPERTY_DEFINITION_T__ID_TYPE:
setIdType((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case _0Package.ID_PROPERTY_DEFINITION_T__VALUE:
setValue(VALUE_EDEFAULT);
return;
case _0Package.ID_PROPERTY_DEFINITION_T__ID_TYPE:
setIdType(ID_TYPE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case _0Package.ID_PROPERTY_DEFINITION_T__VALUE:
return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
case _0Package.ID_PROPERTY_DEFINITION_T__ID_TYPE:
return ID_TYPE_EDEFAULT == null ? idType != null : !ID_TYPE_EDEFAULT.equals(idType);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (value: ");
result.append(value);
result.append(", idType: ");
result.append(idType);
result.append(')');
return result.toString();
}
} //IdPropertyDefinitionTImpl