blob: d072f0742e892c2bffc97cc374f8dd78534ac7a6 [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;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Error</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.mdt.bpmn.impl.ErrorImpl#getStructureRef <em>Structure Ref</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class ErrorImpl extends RootElementImpl implements
org.eclipse.mdt.bpmn.Error {
/**
* The default value of the '{@link #getStructureRef() <em>Structure Ref</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getStructureRef()
* @generated
* @ordered
*/
protected static final QName STRUCTURE_REF_EDEFAULT = null;
/**
* The cached value of the '{@link #getStructureRef() <em>Structure Ref</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getStructureRef()
* @generated
* @ordered
*/
protected QName structureRef = STRUCTURE_REF_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ErrorImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return BpmnPackage.eINSTANCE.getError();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public QName getStructureRef() {
return structureRef;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setStructureRef(QName newStructureRef) {
QName oldStructureRef = structureRef;
structureRef = newStructureRef;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET,
BpmnPackage.ERROR__STRUCTURE_REF, oldStructureRef,
structureRef));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BpmnPackage.ERROR__STRUCTURE_REF:
return getStructureRef();
}
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.ERROR__STRUCTURE_REF:
setStructureRef((QName) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BpmnPackage.ERROR__STRUCTURE_REF:
setStructureRef(STRUCTURE_REF_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BpmnPackage.ERROR__STRUCTURE_REF:
return STRUCTURE_REF_EDEFAULT == null ? structureRef != null
: !STRUCTURE_REF_EDEFAULT.equals(structureRef);
}
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(" (structureRef: "); //$NON-NLS-1$
result.append(structureRef);
result.append(')');
return result.toString();
}
} //ErrorImpl