| /******************************************************************************* |
| * Copyright (c) 2005, 2009 IBM Corporation and others. |
| * 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: |
| * IBM Corporation - initial implementation |
| *******************************************************************************/ |
| package org.eclipse.epf.xml.uma.impl; |
| |
| import javax.xml.datatype.XMLGregorianCalendar; |
| 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.PlanningData; |
| import org.eclipse.epf.xml.uma.UmaPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Planning Data</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.epf.xml.uma.impl.PlanningDataImpl#getFinishDate <em>Finish Date</em>}</li> |
| * <li>{@link org.eclipse.epf.xml.uma.impl.PlanningDataImpl#getRank <em>Rank</em>}</li> |
| * <li>{@link org.eclipse.epf.xml.uma.impl.PlanningDataImpl#getStartDate <em>Start Date</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class PlanningDataImpl extends ProcessElementImpl implements PlanningData { |
| /** |
| * The default value of the '{@link #getFinishDate() <em>Finish Date</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getFinishDate() |
| * @generated |
| * @ordered |
| */ |
| protected static final XMLGregorianCalendar FINISH_DATE_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getFinishDate() <em>Finish Date</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getFinishDate() |
| * @generated |
| * @ordered |
| */ |
| protected XMLGregorianCalendar finishDate = FINISH_DATE_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #getRank() <em>Rank</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getRank() |
| * @generated |
| * @ordered |
| */ |
| protected static final String RANK_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getRank() <em>Rank</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getRank() |
| * @generated |
| * @ordered |
| */ |
| protected String rank = RANK_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #getStartDate() <em>Start Date</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getStartDate() |
| * @generated |
| * @ordered |
| */ |
| protected static final XMLGregorianCalendar START_DATE_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getStartDate() <em>Start Date</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getStartDate() |
| * @generated |
| * @ordered |
| */ |
| protected XMLGregorianCalendar startDate = START_DATE_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected PlanningDataImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return UmaPackage.Literals.PLANNING_DATA; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public XMLGregorianCalendar getFinishDate() { |
| return finishDate; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setFinishDate(XMLGregorianCalendar newFinishDate) { |
| XMLGregorianCalendar oldFinishDate = finishDate; |
| finishDate = newFinishDate; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, UmaPackage.PLANNING_DATA__FINISH_DATE, oldFinishDate, finishDate)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getRank() { |
| return rank; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setRank(String newRank) { |
| String oldRank = rank; |
| rank = newRank; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, UmaPackage.PLANNING_DATA__RANK, oldRank, rank)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public XMLGregorianCalendar getStartDate() { |
| return startDate; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setStartDate(XMLGregorianCalendar newStartDate) { |
| XMLGregorianCalendar oldStartDate = startDate; |
| startDate = newStartDate; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, UmaPackage.PLANNING_DATA__START_DATE, oldStartDate, startDate)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case UmaPackage.PLANNING_DATA__FINISH_DATE: |
| return getFinishDate(); |
| case UmaPackage.PLANNING_DATA__RANK: |
| return getRank(); |
| case UmaPackage.PLANNING_DATA__START_DATE: |
| return getStartDate(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case UmaPackage.PLANNING_DATA__FINISH_DATE: |
| setFinishDate((XMLGregorianCalendar)newValue); |
| return; |
| case UmaPackage.PLANNING_DATA__RANK: |
| setRank((String)newValue); |
| return; |
| case UmaPackage.PLANNING_DATA__START_DATE: |
| setStartDate((XMLGregorianCalendar)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case UmaPackage.PLANNING_DATA__FINISH_DATE: |
| setFinishDate(FINISH_DATE_EDEFAULT); |
| return; |
| case UmaPackage.PLANNING_DATA__RANK: |
| setRank(RANK_EDEFAULT); |
| return; |
| case UmaPackage.PLANNING_DATA__START_DATE: |
| setStartDate(START_DATE_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case UmaPackage.PLANNING_DATA__FINISH_DATE: |
| return FINISH_DATE_EDEFAULT == null ? finishDate != null : !FINISH_DATE_EDEFAULT.equals(finishDate); |
| case UmaPackage.PLANNING_DATA__RANK: |
| return RANK_EDEFAULT == null ? rank != null : !RANK_EDEFAULT.equals(rank); |
| case UmaPackage.PLANNING_DATA__START_DATE: |
| return START_DATE_EDEFAULT == null ? startDate != null : !START_DATE_EDEFAULT.equals(startDate); |
| } |
| 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(" (finishDate: "); |
| result.append(finishDate); |
| result.append(", rank: "); |
| result.append(rank); |
| result.append(", startDate: "); |
| result.append(startDate); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //PlanningDataImpl |