| /** |
| * Copyright (c) 2014, Loetz GmbH&Co.KG (Heidelberg) |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Based on ideas from Xtext, Xtend, Xcore |
| * |
| * Contributors: |
| * Joerg Riegel - Initial implementation |
| * |
| */ |
| package org.eclipse.osbp.xtext.datainterchange.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| |
| import org.eclipse.osbp.xtext.datainterchange.DataDSLPackage; |
| import org.eclipse.osbp.xtext.datainterchange.DataInterchangeFileEDI; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Data Interchange File EDI</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.osbp.xtext.datainterchange.impl.DataInterchangeFileEDIImpl#getEncoding <em>Encoding</em>}</li> |
| * <li>{@link org.eclipse.osbp.xtext.datainterchange.impl.DataInterchangeFileEDIImpl#getLocale <em>Locale</em>}</li> |
| * <li>{@link org.eclipse.osbp.xtext.datainterchange.impl.DataInterchangeFileEDIImpl#getFileURL <em>File URL</em>}</li> |
| * <li>{@link org.eclipse.osbp.xtext.datainterchange.impl.DataInterchangeFileEDIImpl#getMappingModel <em>Mapping Model</em>}</li> |
| * <li>{@link org.eclipse.osbp.xtext.datainterchange.impl.DataInterchangeFileEDIImpl#isValidate <em>Validate</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class DataInterchangeFileEDIImpl extends DataInterchangeLazyResolverImpl implements DataInterchangeFileEDI { |
| /** |
| * The default value of the '{@link #getEncoding() <em>Encoding</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getEncoding() |
| * @generated |
| * @ordered |
| */ |
| protected static final String ENCODING_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getEncoding() <em>Encoding</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getEncoding() |
| * @generated |
| * @ordered |
| */ |
| protected String encoding = ENCODING_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #getLocale() <em>Locale</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getLocale() |
| * @generated |
| * @ordered |
| */ |
| protected static final String LOCALE_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getLocale() <em>Locale</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getLocale() |
| * @generated |
| * @ordered |
| */ |
| protected String locale = LOCALE_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #getFileURL() <em>File URL</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getFileURL() |
| * @generated |
| * @ordered |
| */ |
| protected static final String FILE_URL_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getFileURL() <em>File URL</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getFileURL() |
| * @generated |
| * @ordered |
| */ |
| protected String fileURL = FILE_URL_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #getMappingModel() <em>Mapping Model</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getMappingModel() |
| * @generated |
| * @ordered |
| */ |
| protected static final String MAPPING_MODEL_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getMappingModel() <em>Mapping Model</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getMappingModel() |
| * @generated |
| * @ordered |
| */ |
| protected String mappingModel = MAPPING_MODEL_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #isValidate() <em>Validate</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isValidate() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean VALIDATE_EDEFAULT = false; |
| |
| /** |
| * The cached value of the '{@link #isValidate() <em>Validate</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isValidate() |
| * @generated |
| * @ordered |
| */ |
| protected boolean validate = VALIDATE_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected DataInterchangeFileEDIImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return DataDSLPackage.Literals.DATA_INTERCHANGE_FILE_EDI; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getEncoding() { |
| return encoding; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setEncoding(String newEncoding) { |
| String oldEncoding = encoding; |
| encoding = newEncoding; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, DataDSLPackage.DATA_INTERCHANGE_FILE_EDI__ENCODING, oldEncoding, encoding)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getLocale() { |
| return locale; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setLocale(String newLocale) { |
| String oldLocale = locale; |
| locale = newLocale; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, DataDSLPackage.DATA_INTERCHANGE_FILE_EDI__LOCALE, oldLocale, locale)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getFileURL() { |
| return fileURL; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setFileURL(String newFileURL) { |
| String oldFileURL = fileURL; |
| fileURL = newFileURL; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, DataDSLPackage.DATA_INTERCHANGE_FILE_EDI__FILE_URL, oldFileURL, fileURL)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getMappingModel() { |
| return mappingModel; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setMappingModel(String newMappingModel) { |
| String oldMappingModel = mappingModel; |
| mappingModel = newMappingModel; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, DataDSLPackage.DATA_INTERCHANGE_FILE_EDI__MAPPING_MODEL, oldMappingModel, mappingModel)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isValidate() { |
| return validate; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setValidate(boolean newValidate) { |
| boolean oldValidate = validate; |
| validate = newValidate; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, DataDSLPackage.DATA_INTERCHANGE_FILE_EDI__VALIDATE, oldValidate, validate)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case DataDSLPackage.DATA_INTERCHANGE_FILE_EDI__ENCODING: |
| return getEncoding(); |
| case DataDSLPackage.DATA_INTERCHANGE_FILE_EDI__LOCALE: |
| return getLocale(); |
| case DataDSLPackage.DATA_INTERCHANGE_FILE_EDI__FILE_URL: |
| return getFileURL(); |
| case DataDSLPackage.DATA_INTERCHANGE_FILE_EDI__MAPPING_MODEL: |
| return getMappingModel(); |
| case DataDSLPackage.DATA_INTERCHANGE_FILE_EDI__VALIDATE: |
| return isValidate(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case DataDSLPackage.DATA_INTERCHANGE_FILE_EDI__ENCODING: |
| setEncoding((String)newValue); |
| return; |
| case DataDSLPackage.DATA_INTERCHANGE_FILE_EDI__LOCALE: |
| setLocale((String)newValue); |
| return; |
| case DataDSLPackage.DATA_INTERCHANGE_FILE_EDI__FILE_URL: |
| setFileURL((String)newValue); |
| return; |
| case DataDSLPackage.DATA_INTERCHANGE_FILE_EDI__MAPPING_MODEL: |
| setMappingModel((String)newValue); |
| return; |
| case DataDSLPackage.DATA_INTERCHANGE_FILE_EDI__VALIDATE: |
| setValidate((Boolean)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case DataDSLPackage.DATA_INTERCHANGE_FILE_EDI__ENCODING: |
| setEncoding(ENCODING_EDEFAULT); |
| return; |
| case DataDSLPackage.DATA_INTERCHANGE_FILE_EDI__LOCALE: |
| setLocale(LOCALE_EDEFAULT); |
| return; |
| case DataDSLPackage.DATA_INTERCHANGE_FILE_EDI__FILE_URL: |
| setFileURL(FILE_URL_EDEFAULT); |
| return; |
| case DataDSLPackage.DATA_INTERCHANGE_FILE_EDI__MAPPING_MODEL: |
| setMappingModel(MAPPING_MODEL_EDEFAULT); |
| return; |
| case DataDSLPackage.DATA_INTERCHANGE_FILE_EDI__VALIDATE: |
| setValidate(VALIDATE_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case DataDSLPackage.DATA_INTERCHANGE_FILE_EDI__ENCODING: |
| return ENCODING_EDEFAULT == null ? encoding != null : !ENCODING_EDEFAULT.equals(encoding); |
| case DataDSLPackage.DATA_INTERCHANGE_FILE_EDI__LOCALE: |
| return LOCALE_EDEFAULT == null ? locale != null : !LOCALE_EDEFAULT.equals(locale); |
| case DataDSLPackage.DATA_INTERCHANGE_FILE_EDI__FILE_URL: |
| return FILE_URL_EDEFAULT == null ? fileURL != null : !FILE_URL_EDEFAULT.equals(fileURL); |
| case DataDSLPackage.DATA_INTERCHANGE_FILE_EDI__MAPPING_MODEL: |
| return MAPPING_MODEL_EDEFAULT == null ? mappingModel != null : !MAPPING_MODEL_EDEFAULT.equals(mappingModel); |
| case DataDSLPackage.DATA_INTERCHANGE_FILE_EDI__VALIDATE: |
| return validate != VALIDATE_EDEFAULT; |
| } |
| 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(" (encoding: "); |
| result.append(encoding); |
| result.append(", locale: "); |
| result.append(locale); |
| result.append(", fileURL: "); |
| result.append(fileURL); |
| result.append(", mappingModel: "); |
| result.append(mappingModel); |
| result.append(", validate: "); |
| result.append(validate); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //DataInterchangeFileEDIImpl |