org.nasdanika.models.rules.impl.CreateBinaryResourceActionImpl Maven / Gradle / Ivy
/**
*/
package org.nasdanika.models.rules.impl;
import org.eclipse.emf.ecore.EClass;
import org.nasdanika.models.rules.BinaryResourceAction;
import org.nasdanika.models.rules.CreateBinaryResourceAction;
import org.nasdanika.models.rules.RulesPackage;
/**
*
* An implementation of the model object 'Create Binary Resource Action'.
*
*
* The following features are implemented:
*
*
* - {@link org.nasdanika.models.rules.impl.CreateBinaryResourceActionImpl#getContent Content}
*
*
* @generated
*/
public class CreateBinaryResourceActionImpl extends CreateResourceActionImpl implements CreateBinaryResourceAction {
/**
* The default value of the '{@link #getContent() Content}' attribute.
*
*
* @see #getContent()
* @generated
* @ordered
*/
protected static final byte[] CONTENT_EDEFAULT = null;
/**
*
*
* @generated
*/
protected CreateBinaryResourceActionImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return RulesPackage.Literals.CREATE_BINARY_RESOURCE_ACTION;
}
/**
*
*
* @generated
*/
@Override
public byte[] getContent() {
return (byte[])eDynamicGet(RulesPackage.CREATE_BINARY_RESOURCE_ACTION__CONTENT, RulesPackage.Literals.BINARY_RESOURCE_ACTION__CONTENT, true, true);
}
/**
*
*
* @generated
*/
@Override
public void setContent(byte[] newContent) {
eDynamicSet(RulesPackage.CREATE_BINARY_RESOURCE_ACTION__CONTENT, RulesPackage.Literals.BINARY_RESOURCE_ACTION__CONTENT, newContent);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case RulesPackage.CREATE_BINARY_RESOURCE_ACTION__CONTENT:
return getContent();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case RulesPackage.CREATE_BINARY_RESOURCE_ACTION__CONTENT:
setContent((byte[])newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case RulesPackage.CREATE_BINARY_RESOURCE_ACTION__CONTENT:
setContent(CONTENT_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case RulesPackage.CREATE_BINARY_RESOURCE_ACTION__CONTENT:
return CONTENT_EDEFAULT == null ? getContent() != null : !CONTENT_EDEFAULT.equals(getContent());
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public int eBaseStructuralFeatureID(int derivedFeatureID, Class> baseClass) {
if (baseClass == BinaryResourceAction.class) {
switch (derivedFeatureID) {
case RulesPackage.CREATE_BINARY_RESOURCE_ACTION__CONTENT: return RulesPackage.BINARY_RESOURCE_ACTION__CONTENT;
default: return -1;
}
}
return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
}
/**
*
*
* @generated
*/
@Override
public int eDerivedStructuralFeatureID(int baseFeatureID, Class> baseClass) {
if (baseClass == BinaryResourceAction.class) {
switch (baseFeatureID) {
case RulesPackage.BINARY_RESOURCE_ACTION__CONTENT: return RulesPackage.CREATE_BINARY_RESOURCE_ACTION__CONTENT;
default: return -1;
}
}
return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
}
} //CreateBinaryResourceActionImpl