blob: 19188cc95b94c60124051ad6f4b0e1d31982a061 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2006, 2012 Obeo.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
package org.eclipse.acceleo.model.mtl.impl;
import org.eclipse.acceleo.model.mtl.ModuleDocumentation;
import org.eclipse.acceleo.model.mtl.MtlPackage;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
/**
* <!-- begin-user-doc --> An implementation of the model object '<em><b>Module Documentation</b></em>'. <!--
* end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.acceleo.model.mtl.impl.ModuleDocumentationImpl#getAuthor <em>Author</em>}</li>
* <li>{@link org.eclipse.acceleo.model.mtl.impl.ModuleDocumentationImpl#getVersion <em>Version</em>}</li>
* <li>{@link org.eclipse.acceleo.model.mtl.impl.ModuleDocumentationImpl#getSince <em>Since</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class ModuleDocumentationImpl extends DocumentationImpl implements ModuleDocumentation {
/**
* The default value of the '{@link #getAuthor() <em>Author</em>}' attribute. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
* @see #getAuthor()
* @generated
* @ordered
*/
protected static final String AUTHOR_EDEFAULT = null;
/**
* The cached value of the '{@link #getAuthor() <em>Author</em>}' attribute. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
* @see #getAuthor()
* @generated
* @ordered
*/
protected String author = AUTHOR_EDEFAULT;
/**
* The default value of the '{@link #getVersion() <em>Version</em>}' attribute. <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @see #getVersion()
* @generated
* @ordered
*/
protected static final String VERSION_EDEFAULT = null;
/**
* The cached value of the '{@link #getVersion() <em>Version</em>}' attribute. <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @see #getVersion()
* @generated
* @ordered
*/
protected String version = VERSION_EDEFAULT;
/**
* The default value of the '{@link #getSince() <em>Since</em>}' attribute. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
* @see #getSince()
* @generated
* @ordered
*/
protected static final String SINCE_EDEFAULT = null;
/**
* The cached value of the '{@link #getSince() <em>Since</em>}' attribute. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
* @see #getSince()
* @generated
* @ordered
*/
protected String since = SINCE_EDEFAULT;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
protected ModuleDocumentationImpl() {
super();
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return MtlPackage.Literals.MODULE_DOCUMENTATION;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
public String getAuthor() {
return author;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
public void setAuthor(String newAuthor) {
String oldAuthor = author;
author = newAuthor;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, MtlPackage.MODULE_DOCUMENTATION__AUTHOR,
oldAuthor, author));
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
public String getVersion() {
return version;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
public void setVersion(String newVersion) {
String oldVersion = version;
version = newVersion;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, MtlPackage.MODULE_DOCUMENTATION__VERSION,
oldVersion, version));
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
public String getSince() {
return since;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
public void setSince(String newSince) {
String oldSince = since;
since = newSince;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, MtlPackage.MODULE_DOCUMENTATION__SINCE,
oldSince, since));
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case MtlPackage.MODULE_DOCUMENTATION__AUTHOR:
return getAuthor();
case MtlPackage.MODULE_DOCUMENTATION__VERSION:
return getVersion();
case MtlPackage.MODULE_DOCUMENTATION__SINCE:
return getSince();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case MtlPackage.MODULE_DOCUMENTATION__AUTHOR:
setAuthor((String)newValue);
return;
case MtlPackage.MODULE_DOCUMENTATION__VERSION:
setVersion((String)newValue);
return;
case MtlPackage.MODULE_DOCUMENTATION__SINCE:
setSince((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case MtlPackage.MODULE_DOCUMENTATION__AUTHOR:
setAuthor(AUTHOR_EDEFAULT);
return;
case MtlPackage.MODULE_DOCUMENTATION__VERSION:
setVersion(VERSION_EDEFAULT);
return;
case MtlPackage.MODULE_DOCUMENTATION__SINCE:
setSince(SINCE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case MtlPackage.MODULE_DOCUMENTATION__AUTHOR:
return AUTHOR_EDEFAULT == null ? author != null : !AUTHOR_EDEFAULT.equals(author);
case MtlPackage.MODULE_DOCUMENTATION__VERSION:
return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version);
case MtlPackage.MODULE_DOCUMENTATION__SINCE:
return SINCE_EDEFAULT == null ? since != null : !SINCE_EDEFAULT.equals(since);
}
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(" (author: "); //$NON-NLS-1$
result.append(author);
result.append(", version: "); //$NON-NLS-1$
result.append(version);
result.append(", since: "); //$NON-NLS-1$
result.append(since);
result.append(')');
return result.toString();
}
} // ModuleDocumentationImpl