/**
*/
package com.hundsun.ares.studio.ui.template.impl;
import com.hundsun.ares.studio.ui.template.Template;
import com.hundsun.ares.studio.ui.template.TemplatePackage;
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>Template</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link com.hundsun.ares.studio.ui.template.impl.TemplateImpl#getId <em>Id</em>}</li>
* <li>{@link com.hundsun.ares.studio.ui.template.impl.TemplateImpl#getName <em>Name</em>}</li>
* <li>{@link com.hundsun.ares.studio.ui.template.impl.TemplateImpl#getDescription <em>Description</em>}</li>
* <li>{@link com.hundsun.ares.studio.ui.template.impl.TemplateImpl#getPath <em>Path</em>}</li>
* <li>{@link com.hundsun.ares.studio.ui.template.impl.TemplateImpl#isLocal <em>Local</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class TemplateImpl extends MinimalEObjectImpl.Container implements Template {
/**
* The default value of the '{@link #getId() <em>Id</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getId()
* @generated
* @ordered
*/
protected static final String ID_EDEFAULT = null;
/**
* The cached value of the '{@link #getId() <em>Id</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getId()
* @generated
* @ordered
*/
protected String id = ID_EDEFAULT;
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDescription()
* @generated
* @ordered
*/
protected static final String DESCRIPTION_EDEFAULT = null;
/**
* The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDescription()
* @generated
* @ordered
*/
protected String description = DESCRIPTION_EDEFAULT;
/**
* The default value of the '{@link #getPath() <em>Path</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPath()
* @generated
* @ordered
*/
protected static final String PATH_EDEFAULT = null;
/**
* The cached value of the '{@link #getPath() <em>Path</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPath()
* @generated
* @ordered
*/
protected String path = PATH_EDEFAULT;
/**
* The default value of the '{@link #isLocal() <em>Local</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isLocal()
* @generated
* @ordered
*/
protected static final boolean LOCAL_EDEFAULT = false;
/**
* The cached value of the '{@link #isLocal() <em>Local</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isLocal()
* @generated
* @ordered
*/
protected boolean local = LOCAL_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected TemplateImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return TemplatePackage.Literals.TEMPLATE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getId() {
return id;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setId(String newId) {
String oldId = id;
id = newId;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TemplatePackage.TEMPLATE__ID, oldId, id));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TemplatePackage.TEMPLATE__NAME, oldName, name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getDescription() {
return description;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDescription(String newDescription) {
String oldDescription = description;
description = newDescription;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TemplatePackage.TEMPLATE__DESCRIPTION, oldDescription, description));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getPath() {
return path;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setPath(String newPath) {
String oldPath = path;
path = newPath;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TemplatePackage.TEMPLATE__PATH, oldPath, path));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isLocal() {
return local;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setLocal(boolean newLocal) {
boolean oldLocal = local;
local = newLocal;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TemplatePackage.TEMPLATE__LOCAL, oldLocal, local));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case TemplatePackage.TEMPLATE__ID:
return getId();
case TemplatePackage.TEMPLATE__NAME:
return getName();
case TemplatePackage.TEMPLATE__DESCRIPTION:
return getDescription();
case TemplatePackage.TEMPLATE__PATH:
return getPath();
case TemplatePackage.TEMPLATE__LOCAL:
return isLocal();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case TemplatePackage.TEMPLATE__ID:
setId((String)newValue);
return;
case TemplatePackage.TEMPLATE__NAME:
setName((String)newValue);
return;
case TemplatePackage.TEMPLATE__DESCRIPTION:
setDescription((String)newValue);
return;
case TemplatePackage.TEMPLATE__PATH:
setPath((String)newValue);
return;
case TemplatePackage.TEMPLATE__LOCAL:
setLocal((Boolean)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case TemplatePackage.TEMPLATE__ID:
setId(ID_EDEFAULT);
return;
case TemplatePackage.TEMPLATE__NAME:
setName(NAME_EDEFAULT);
return;
case TemplatePackage.TEMPLATE__DESCRIPTION:
setDescription(DESCRIPTION_EDEFAULT);
return;
case TemplatePackage.TEMPLATE__PATH:
setPath(PATH_EDEFAULT);
return;
case TemplatePackage.TEMPLATE__LOCAL:
setLocal(LOCAL_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case TemplatePackage.TEMPLATE__ID:
return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
case TemplatePackage.TEMPLATE__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case TemplatePackage.TEMPLATE__DESCRIPTION:
return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
case TemplatePackage.TEMPLATE__PATH:
return PATH_EDEFAULT == null ? path != null : !PATH_EDEFAULT.equals(path);
case TemplatePackage.TEMPLATE__LOCAL:
return local != LOCAL_EDEFAULT;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (id: ");
result.append(id);
result.append(", name: ");
result.append(name);
result.append(", description: ");
result.append(description);
result.append(", path: ");
result.append(path);
result.append(", local: ");
result.append(local);
result.append(')');
return result.toString();
}
} //TemplateImpl