| /** |
| * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| * 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: |
| * Florian Pirchner - Initial implementation |
| */ |
| package org.eclipse.osbp.ecview.core.extension.model.datatypes.impl; |
| |
| import java.util.Collection; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| import org.eclipse.emf.common.notify.NotificationChain; |
| import org.eclipse.emf.common.util.EList; |
| import org.eclipse.emf.common.util.EMap; |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.EStructuralFeature; |
| import org.eclipse.emf.ecore.InternalEObject; |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; |
| import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; |
| import org.eclipse.emf.ecore.util.EObjectResolvingEList; |
| import org.eclipse.emf.ecore.util.EcoreEMap; |
| import org.eclipse.emf.ecore.util.InternalEList; |
| import org.eclipse.osbp.ecview.core.common.model.core.CoreModelPackage; |
| import org.eclipse.osbp.ecview.core.common.model.core.impl.YStringToStringMapImpl; |
| import org.eclipse.osbp.ecview.core.common.model.validation.ValidationPackage; |
| import org.eclipse.osbp.ecview.core.common.model.validation.YRegexpValidationConfig; |
| import org.eclipse.osbp.ecview.core.common.model.validation.YValidationConfig; |
| import org.eclipse.osbp.ecview.core.common.model.validation.YValidator; |
| import org.eclipse.osbp.ecview.core.extension.model.datatypes.ExtDatatypesPackage; |
| import org.eclipse.osbp.ecview.core.extension.model.datatypes.YNumericDatatype; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>YNumeric Datatype</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.osbp.ecview.core.extension.model.datatypes.impl.YNumericDatatypeImpl#getTags <em>Tags</em>}</li> |
| * <li>{@link org.eclipse.osbp.ecview.core.extension.model.datatypes.impl.YNumericDatatypeImpl#getId <em>Id</em>}</li> |
| * <li>{@link org.eclipse.osbp.ecview.core.extension.model.datatypes.impl.YNumericDatatypeImpl#getName <em>Name</em>}</li> |
| * <li>{@link org.eclipse.osbp.ecview.core.extension.model.datatypes.impl.YNumericDatatypeImpl#getProperties <em>Properties</em>}</li> |
| * <li>{@link org.eclipse.osbp.ecview.core.extension.model.datatypes.impl.YNumericDatatypeImpl#getDescription <em>Description</em>}</li> |
| * <li>{@link org.eclipse.osbp.ecview.core.extension.model.datatypes.impl.YNumericDatatypeImpl#getValidators <em>Validators</em>}</li> |
| * <li>{@link org.eclipse.osbp.ecview.core.extension.model.datatypes.impl.YNumericDatatypeImpl#getErrorCode <em>Error Code</em>}</li> |
| * <li>{@link org.eclipse.osbp.ecview.core.extension.model.datatypes.impl.YNumericDatatypeImpl#getDefaultErrorMessage <em>Default Error Message</em>}</li> |
| * <li>{@link org.eclipse.osbp.ecview.core.extension.model.datatypes.impl.YNumericDatatypeImpl#getRegExpression <em>Reg Expression</em>}</li> |
| * <li>{@link org.eclipse.osbp.ecview.core.extension.model.datatypes.impl.YNumericDatatypeImpl#isGrouping <em>Grouping</em>}</li> |
| * <li>{@link org.eclipse.osbp.ecview.core.extension.model.datatypes.impl.YNumericDatatypeImpl#isMarkNegative <em>Mark Negative</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class YNumericDatatypeImpl extends MinimalEObjectImpl.Container implements YNumericDatatype { |
| /** |
| * The cached value of the '{@link #getTags() <em>Tags</em>}' attribute list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getTags() |
| * @generated |
| * @ordered |
| */ |
| protected EList<String> tags; |
| |
| /** |
| * The default value of the '{@link #getId() <em>Id</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getId() |
| * @generated |
| * @ordered |
| */ |
| protected static final String ID_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getId() <em>Id</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getId() |
| * @generated |
| * @ordered |
| */ |
| protected String id = ID_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #getName() <em>Name</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getName() |
| * @generated |
| * @ordered |
| */ |
| protected static final String NAME_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getName() <em>Name</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getName() |
| * @generated |
| * @ordered |
| */ |
| protected String name = NAME_EDEFAULT; |
| |
| /** |
| * The cached value of the '{@link #getProperties() <em>Properties</em>}' map. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getProperties() |
| * @generated |
| * @ordered |
| */ |
| protected EMap<String, String> properties; |
| |
| /** |
| * The default value of the '{@link #getDescription() <em>Description</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getDescription() |
| * @generated |
| * @ordered |
| */ |
| protected static final String DESCRIPTION_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getDescription() |
| * @generated |
| * @ordered |
| */ |
| protected String description = DESCRIPTION_EDEFAULT; |
| |
| /** |
| * The cached value of the '{@link #getValidators() <em>Validators</em>}' reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getValidators() |
| * @generated |
| * @ordered |
| */ |
| protected EList<YValidator> validators; |
| |
| /** |
| * The default value of the '{@link #getErrorCode() <em>Error Code</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getErrorCode() |
| * @generated |
| * @ordered |
| */ |
| protected static final String ERROR_CODE_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getErrorCode() <em>Error Code</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getErrorCode() |
| * @generated |
| * @ordered |
| */ |
| protected String errorCode = ERROR_CODE_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #getDefaultErrorMessage() <em>Default Error Message</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getDefaultErrorMessage() |
| * @generated |
| * @ordered |
| */ |
| protected static final String DEFAULT_ERROR_MESSAGE_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getDefaultErrorMessage() <em>Default Error Message</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getDefaultErrorMessage() |
| * @generated |
| * @ordered |
| */ |
| protected String defaultErrorMessage = DEFAULT_ERROR_MESSAGE_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #getRegExpression() <em>Reg Expression</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getRegExpression() |
| * @generated |
| * @ordered |
| */ |
| protected static final String REG_EXPRESSION_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getRegExpression() <em>Reg Expression</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getRegExpression() |
| * @generated |
| * @ordered |
| */ |
| protected String regExpression = REG_EXPRESSION_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #isGrouping() <em>Grouping</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isGrouping() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean GROUPING_EDEFAULT = true; |
| |
| /** |
| * The cached value of the '{@link #isGrouping() <em>Grouping</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isGrouping() |
| * @generated |
| * @ordered |
| */ |
| protected boolean grouping = GROUPING_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #isMarkNegative() <em>Mark Negative</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isMarkNegative() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean MARK_NEGATIVE_EDEFAULT = true; |
| |
| /** |
| * The cached value of the '{@link #isMarkNegative() <em>Mark Negative</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isMarkNegative() |
| * @generated |
| * @ordered |
| */ |
| protected boolean markNegative = MARK_NEGATIVE_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected YNumericDatatypeImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return ExtDatatypesPackage.Literals.YNUMERIC_DATATYPE; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getId() { |
| return id; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setId(String newId) { |
| String oldId = id; |
| id = newId; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, ExtDatatypesPackage.YNUMERIC_DATATYPE__ID, oldId, id)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getName() { |
| return name; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setName(String newName) { |
| String oldName = name; |
| name = newName; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, ExtDatatypesPackage.YNUMERIC_DATATYPE__NAME, oldName, name)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EList<String> getTags() { |
| if (tags == null) { |
| tags = new EDataTypeUniqueEList<String>(String.class, this, ExtDatatypesPackage.YNUMERIC_DATATYPE__TAGS); |
| } |
| return tags; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EMap<String, String> getProperties() { |
| if (properties == null) { |
| properties = new EcoreEMap<String,String>(CoreModelPackage.Literals.YSTRING_TO_STRING_MAP, YStringToStringMapImpl.class, this, ExtDatatypesPackage.YNUMERIC_DATATYPE__PROPERTIES); |
| } |
| return properties; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getDescription() { |
| return description; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setDescription(String newDescription) { |
| String oldDescription = description; |
| description = newDescription; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, ExtDatatypesPackage.YNUMERIC_DATATYPE__DESCRIPTION, oldDescription, description)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EList<YValidator> getValidators() { |
| if (validators == null) { |
| validators = new EObjectResolvingEList<YValidator>(YValidator.class, this, ExtDatatypesPackage.YNUMERIC_DATATYPE__VALIDATORS); |
| } |
| return validators; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getErrorCode() { |
| return errorCode; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setErrorCode(String newErrorCode) { |
| String oldErrorCode = errorCode; |
| errorCode = newErrorCode; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, ExtDatatypesPackage.YNUMERIC_DATATYPE__ERROR_CODE, oldErrorCode, errorCode)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getDefaultErrorMessage() { |
| return defaultErrorMessage; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setDefaultErrorMessage(String newDefaultErrorMessage) { |
| String oldDefaultErrorMessage = defaultErrorMessage; |
| defaultErrorMessage = newDefaultErrorMessage; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, ExtDatatypesPackage.YNUMERIC_DATATYPE__DEFAULT_ERROR_MESSAGE, oldDefaultErrorMessage, defaultErrorMessage)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getRegExpression() { |
| return regExpression; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setRegExpression(String newRegExpression) { |
| String oldRegExpression = regExpression; |
| regExpression = newRegExpression; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, ExtDatatypesPackage.YNUMERIC_DATATYPE__REG_EXPRESSION, oldRegExpression, regExpression)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isGrouping() { |
| return grouping; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setGrouping(boolean newGrouping) { |
| boolean oldGrouping = grouping; |
| grouping = newGrouping; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, ExtDatatypesPackage.YNUMERIC_DATATYPE__GROUPING, oldGrouping, grouping)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isMarkNegative() { |
| return markNegative; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setMarkNegative(boolean newMarkNegative) { |
| boolean oldMarkNegative = markNegative; |
| markNegative = newMarkNegative; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, ExtDatatypesPackage.YNUMERIC_DATATYPE__MARK_NEGATIVE, oldMarkNegative, markNegative)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__PROPERTIES: |
| return ((InternalEList<?>)getProperties()).basicRemove(otherEnd, msgs); |
| } |
| return super.eInverseRemove(otherEnd, featureID, msgs); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__TAGS: |
| return getTags(); |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__ID: |
| return getId(); |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__NAME: |
| return getName(); |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__PROPERTIES: |
| if (coreType) return getProperties(); |
| else return getProperties().map(); |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__DESCRIPTION: |
| return getDescription(); |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__VALIDATORS: |
| return getValidators(); |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__ERROR_CODE: |
| return getErrorCode(); |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__DEFAULT_ERROR_MESSAGE: |
| return getDefaultErrorMessage(); |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__REG_EXPRESSION: |
| return getRegExpression(); |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__GROUPING: |
| return isGrouping(); |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__MARK_NEGATIVE: |
| return isMarkNegative(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @SuppressWarnings("unchecked") |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__TAGS: |
| getTags().clear(); |
| getTags().addAll((Collection<? extends String>)newValue); |
| return; |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__ID: |
| setId((String)newValue); |
| return; |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__NAME: |
| setName((String)newValue); |
| return; |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__PROPERTIES: |
| ((EStructuralFeature.Setting)getProperties()).set(newValue); |
| return; |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__DESCRIPTION: |
| setDescription((String)newValue); |
| return; |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__VALIDATORS: |
| getValidators().clear(); |
| getValidators().addAll((Collection<? extends YValidator>)newValue); |
| return; |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__ERROR_CODE: |
| setErrorCode((String)newValue); |
| return; |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__DEFAULT_ERROR_MESSAGE: |
| setDefaultErrorMessage((String)newValue); |
| return; |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__REG_EXPRESSION: |
| setRegExpression((String)newValue); |
| return; |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__GROUPING: |
| setGrouping((Boolean)newValue); |
| return; |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__MARK_NEGATIVE: |
| setMarkNegative((Boolean)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__TAGS: |
| getTags().clear(); |
| return; |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__ID: |
| setId(ID_EDEFAULT); |
| return; |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__NAME: |
| setName(NAME_EDEFAULT); |
| return; |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__PROPERTIES: |
| getProperties().clear(); |
| return; |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__DESCRIPTION: |
| setDescription(DESCRIPTION_EDEFAULT); |
| return; |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__VALIDATORS: |
| getValidators().clear(); |
| return; |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__ERROR_CODE: |
| setErrorCode(ERROR_CODE_EDEFAULT); |
| return; |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__DEFAULT_ERROR_MESSAGE: |
| setDefaultErrorMessage(DEFAULT_ERROR_MESSAGE_EDEFAULT); |
| return; |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__REG_EXPRESSION: |
| setRegExpression(REG_EXPRESSION_EDEFAULT); |
| return; |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__GROUPING: |
| setGrouping(GROUPING_EDEFAULT); |
| return; |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__MARK_NEGATIVE: |
| setMarkNegative(MARK_NEGATIVE_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__TAGS: |
| return tags != null && !tags.isEmpty(); |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__ID: |
| return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__NAME: |
| return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__PROPERTIES: |
| return properties != null && !properties.isEmpty(); |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__DESCRIPTION: |
| return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__VALIDATORS: |
| return validators != null && !validators.isEmpty(); |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__ERROR_CODE: |
| return ERROR_CODE_EDEFAULT == null ? errorCode != null : !ERROR_CODE_EDEFAULT.equals(errorCode); |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__DEFAULT_ERROR_MESSAGE: |
| return DEFAULT_ERROR_MESSAGE_EDEFAULT == null ? defaultErrorMessage != null : !DEFAULT_ERROR_MESSAGE_EDEFAULT.equals(defaultErrorMessage); |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__REG_EXPRESSION: |
| return REG_EXPRESSION_EDEFAULT == null ? regExpression != null : !REG_EXPRESSION_EDEFAULT.equals(regExpression); |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__GROUPING: |
| return grouping != GROUPING_EDEFAULT; |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__MARK_NEGATIVE: |
| return markNegative != MARK_NEGATIVE_EDEFAULT; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) { |
| if (baseClass == YValidationConfig.class) { |
| switch (derivedFeatureID) { |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__ERROR_CODE: return ValidationPackage.YVALIDATION_CONFIG__ERROR_CODE; |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__DEFAULT_ERROR_MESSAGE: return ValidationPackage.YVALIDATION_CONFIG__DEFAULT_ERROR_MESSAGE; |
| default: return -1; |
| } |
| } |
| if (baseClass == YRegexpValidationConfig.class) { |
| switch (derivedFeatureID) { |
| case ExtDatatypesPackage.YNUMERIC_DATATYPE__REG_EXPRESSION: return ValidationPackage.YREGEXP_VALIDATION_CONFIG__REG_EXPRESSION; |
| default: return -1; |
| } |
| } |
| return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) { |
| if (baseClass == YValidationConfig.class) { |
| switch (baseFeatureID) { |
| case ValidationPackage.YVALIDATION_CONFIG__ERROR_CODE: return ExtDatatypesPackage.YNUMERIC_DATATYPE__ERROR_CODE; |
| case ValidationPackage.YVALIDATION_CONFIG__DEFAULT_ERROR_MESSAGE: return ExtDatatypesPackage.YNUMERIC_DATATYPE__DEFAULT_ERROR_MESSAGE; |
| default: return -1; |
| } |
| } |
| if (baseClass == YRegexpValidationConfig.class) { |
| switch (baseFeatureID) { |
| case ValidationPackage.YREGEXP_VALIDATION_CONFIG__REG_EXPRESSION: return ExtDatatypesPackage.YNUMERIC_DATATYPE__REG_EXPRESSION; |
| default: return -1; |
| } |
| } |
| return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public String toString() { |
| if (eIsProxy()) return super.toString(); |
| |
| StringBuffer result = new StringBuffer(super.toString()); |
| result.append(" (tags: "); |
| result.append(tags); |
| result.append(", id: "); |
| result.append(id); |
| result.append(", name: "); |
| result.append(name); |
| result.append(", description: "); |
| result.append(description); |
| result.append(", errorCode: "); |
| result.append(errorCode); |
| result.append(", defaultErrorMessage: "); |
| result.append(defaultErrorMessage); |
| result.append(", regExpression: "); |
| result.append(regExpression); |
| result.append(", grouping: "); |
| result.append(grouping); |
| result.append(", markNegative: "); |
| result.append(markNegative); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //YNumericDatatypeImpl |