/**
 * <copyright>
 * </copyright>
 *
 * $Id: ArtifactDescriptionImpl.java,v 1.2 2006/06/23 00:01:25 jxi Exp $
 */
package org.eclipse.epf.xml.uma.impl;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

import org.eclipse.epf.xml.uma.ArtifactDescription;
import org.eclipse.epf.xml.uma.UmaPackage;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Artifact Description</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link org.eclipse.epf.xml.uma.impl.ArtifactDescriptionImpl#getBriefOutline <em>Brief Outline</em>}</li>
 *   <li>{@link org.eclipse.epf.xml.uma.impl.ArtifactDescriptionImpl#getRepresentationOptions <em>Representation Options</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class ArtifactDescriptionImpl extends WorkProductDescriptionImpl implements ArtifactDescription {
	/**
	 * The default value of the '{@link #getBriefOutline() <em>Brief Outline</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getBriefOutline()
	 * @generated
	 * @ordered
	 */
	protected static final String BRIEF_OUTLINE_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getBriefOutline() <em>Brief Outline</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getBriefOutline()
	 * @generated
	 * @ordered
	 */
	protected String briefOutline = BRIEF_OUTLINE_EDEFAULT;

	/**
	 * The default value of the '{@link #getRepresentationOptions() <em>Representation Options</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getRepresentationOptions()
	 * @generated
	 * @ordered
	 */
	protected static final String REPRESENTATION_OPTIONS_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getRepresentationOptions() <em>Representation Options</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getRepresentationOptions()
	 * @generated
	 * @ordered
	 */
	protected String representationOptions = REPRESENTATION_OPTIONS_EDEFAULT;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected ArtifactDescriptionImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected EClass eStaticClass() {
		return UmaPackage.Literals.ARTIFACT_DESCRIPTION;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getBriefOutline() {
		return briefOutline;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setBriefOutline(String newBriefOutline) {
		String oldBriefOutline = briefOutline;
		briefOutline = newBriefOutline;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, UmaPackage.ARTIFACT_DESCRIPTION__BRIEF_OUTLINE, oldBriefOutline, briefOutline));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getRepresentationOptions() {
		return representationOptions;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setRepresentationOptions(String newRepresentationOptions) {
		String oldRepresentationOptions = representationOptions;
		representationOptions = newRepresentationOptions;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, UmaPackage.ARTIFACT_DESCRIPTION__REPRESENTATION_OPTIONS, oldRepresentationOptions, representationOptions));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case UmaPackage.ARTIFACT_DESCRIPTION__BRIEF_OUTLINE:
				return getBriefOutline();
			case UmaPackage.ARTIFACT_DESCRIPTION__REPRESENTATION_OPTIONS:
				return getRepresentationOptions();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case UmaPackage.ARTIFACT_DESCRIPTION__BRIEF_OUTLINE:
				setBriefOutline((String)newValue);
				return;
			case UmaPackage.ARTIFACT_DESCRIPTION__REPRESENTATION_OPTIONS:
				setRepresentationOptions((String)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void eUnset(int featureID) {
		switch (featureID) {
			case UmaPackage.ARTIFACT_DESCRIPTION__BRIEF_OUTLINE:
				setBriefOutline(BRIEF_OUTLINE_EDEFAULT);
				return;
			case UmaPackage.ARTIFACT_DESCRIPTION__REPRESENTATION_OPTIONS:
				setRepresentationOptions(REPRESENTATION_OPTIONS_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case UmaPackage.ARTIFACT_DESCRIPTION__BRIEF_OUTLINE:
				return BRIEF_OUTLINE_EDEFAULT == null ? briefOutline != null : !BRIEF_OUTLINE_EDEFAULT.equals(briefOutline);
			case UmaPackage.ARTIFACT_DESCRIPTION__REPRESENTATION_OPTIONS:
				return REPRESENTATION_OPTIONS_EDEFAULT == null ? representationOptions != null : !REPRESENTATION_OPTIONS_EDEFAULT.equals(representationOptions);
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (briefOutline: ");
		result.append(briefOutline);
		result.append(", representationOptions: ");
		result.append(representationOptions);
		result.append(')');
		return result.toString();
	}

} //ArtifactDescriptionImpl