blob: e52ffac4f4458563fedc8ada7a5f452208db2cea [file] [log] [blame]
/**
* Copyright (c) 2000-2009, Intalio Inc.
* 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:
* Intalio Inc. - initial API and implementation
*
*/
package org.eclipse.mdt.bpmn.impl;
import javax.xml.namespace.QName;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.mdt.bpmn.BpmnPackage;
import org.eclipse.mdt.bpmn.Group;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Group</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.mdt.bpmn.impl.GroupImpl#getCategoryRef <em>Category Ref</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class GroupImpl extends ArtifactImpl implements Group {
/**
* The default value of the '{@link #getCategoryRef() <em>Category Ref</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCategoryRef()
* @generated
* @ordered
*/
protected static final QName CATEGORY_REF_EDEFAULT = null;
/**
* The cached value of the '{@link #getCategoryRef() <em>Category Ref</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCategoryRef()
* @generated
* @ordered
*/
protected QName categoryRef = CATEGORY_REF_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected GroupImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return BpmnPackage.eINSTANCE.getGroup();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public QName getCategoryRef() {
return categoryRef;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setCategoryRef(QName newCategoryRef) {
QName oldCategoryRef = categoryRef;
categoryRef = newCategoryRef;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET,
BpmnPackage.GROUP__CATEGORY_REF, oldCategoryRef,
categoryRef));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BpmnPackage.GROUP__CATEGORY_REF:
return getCategoryRef();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case BpmnPackage.GROUP__CATEGORY_REF:
setCategoryRef((QName) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BpmnPackage.GROUP__CATEGORY_REF:
setCategoryRef(CATEGORY_REF_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BpmnPackage.GROUP__CATEGORY_REF:
return CATEGORY_REF_EDEFAULT == null ? categoryRef != null
: !CATEGORY_REF_EDEFAULT.equals(categoryRef);
}
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(" (categoryRef: "); //$NON-NLS-1$
result.append(categoryRef);
result.append(')');
return result.toString();
}
} //GroupImpl