⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 exceptiontypeimpl.java

📁 电子地图服务器,搭建自己的地图服务
💻 JAVA
字号:
/**
 * <copyright>
 * </copyright>
 *
 * $Id: ExceptionTypeImpl.java 7522 2007-09-12 22:00:10Z saul.farber $
 */
package net.opengis.ows.impl;

import java.util.Collection;

import net.opengis.ows.ExceptionType;
import net.opengis.ows.OwsPackage;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Exception Type</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link net.opengis.ows.impl.ExceptionTypeImpl#getExceptionText <em>Exception Text</em>}</li>
 *   <li>{@link net.opengis.ows.impl.ExceptionTypeImpl#getExceptionCode <em>Exception Code</em>}</li>
 *   <li>{@link net.opengis.ows.impl.ExceptionTypeImpl#getLocator <em>Locator</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class ExceptionTypeImpl extends EObjectImpl implements ExceptionType {
	/**
     * The cached value of the '{@link #getExceptionText() <em>Exception Text</em>}' attribute list.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @see #getExceptionText()
     * @generated
     * @ordered
     */
	protected EList exceptionText;

	/**
     * The default value of the '{@link #getExceptionCode() <em>Exception Code</em>}' attribute.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @see #getExceptionCode()
     * @generated
     * @ordered
     */
	protected static final String EXCEPTION_CODE_EDEFAULT = null;

	/**
     * The cached value of the '{@link #getExceptionCode() <em>Exception Code</em>}' attribute.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @see #getExceptionCode()
     * @generated
     * @ordered
     */
	protected String exceptionCode = EXCEPTION_CODE_EDEFAULT;

	/**
     * The default value of the '{@link #getLocator() <em>Locator</em>}' attribute.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @see #getLocator()
     * @generated
     * @ordered
     */
	protected static final String LOCATOR_EDEFAULT = null;

	/**
     * The cached value of the '{@link #getLocator() <em>Locator</em>}' attribute.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @see #getLocator()
     * @generated
     * @ordered
     */
	protected String locator = LOCATOR_EDEFAULT;

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	protected ExceptionTypeImpl() {
        super();
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	protected EClass eStaticClass() {
        return OwsPackage.Literals.EXCEPTION_TYPE;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EList getExceptionText() {
        if (exceptionText == null) {
            exceptionText = new EDataTypeUniqueEList(String.class, this, OwsPackage.EXCEPTION_TYPE__EXCEPTION_TEXT);
        }
        return exceptionText;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public String getExceptionCode() {
        return exceptionCode;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setExceptionCode(String newExceptionCode) {
        String oldExceptionCode = exceptionCode;
        exceptionCode = newExceptionCode;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, OwsPackage.EXCEPTION_TYPE__EXCEPTION_CODE, oldExceptionCode, exceptionCode));
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public String getLocator() {
        return locator;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setLocator(String newLocator) {
        String oldLocator = locator;
        locator = newLocator;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, OwsPackage.EXCEPTION_TYPE__LOCATOR, oldLocator, locator));
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
        switch (featureID) {
            case OwsPackage.EXCEPTION_TYPE__EXCEPTION_TEXT:
                return getExceptionText();
            case OwsPackage.EXCEPTION_TYPE__EXCEPTION_CODE:
                return getExceptionCode();
            case OwsPackage.EXCEPTION_TYPE__LOCATOR:
                return getLocator();
        }
        return super.eGet(featureID, resolve, coreType);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void eSet(int featureID, Object newValue) {
        switch (featureID) {
            case OwsPackage.EXCEPTION_TYPE__EXCEPTION_TEXT:
                getExceptionText().clear();
                getExceptionText().addAll((Collection)newValue);
                return;
            case OwsPackage.EXCEPTION_TYPE__EXCEPTION_CODE:
                setExceptionCode((String)newValue);
                return;
            case OwsPackage.EXCEPTION_TYPE__LOCATOR:
                setLocator((String)newValue);
                return;
        }
        super.eSet(featureID, newValue);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void eUnset(int featureID) {
        switch (featureID) {
            case OwsPackage.EXCEPTION_TYPE__EXCEPTION_TEXT:
                getExceptionText().clear();
                return;
            case OwsPackage.EXCEPTION_TYPE__EXCEPTION_CODE:
                setExceptionCode(EXCEPTION_CODE_EDEFAULT);
                return;
            case OwsPackage.EXCEPTION_TYPE__LOCATOR:
                setLocator(LOCATOR_EDEFAULT);
                return;
        }
        super.eUnset(featureID);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public boolean eIsSet(int featureID) {
        switch (featureID) {
            case OwsPackage.EXCEPTION_TYPE__EXCEPTION_TEXT:
                return exceptionText != null && !exceptionText.isEmpty();
            case OwsPackage.EXCEPTION_TYPE__EXCEPTION_CODE:
                return EXCEPTION_CODE_EDEFAULT == null ? exceptionCode != null : !EXCEPTION_CODE_EDEFAULT.equals(exceptionCode);
            case OwsPackage.EXCEPTION_TYPE__LOCATOR:
                return LOCATOR_EDEFAULT == null ? locator != null : !LOCATOR_EDEFAULT.equals(locator);
        }
        return super.eIsSet(featureID);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public String toString() {
        if (eIsProxy()) return super.toString();

        StringBuffer result = new StringBuffer(super.toString());
        result.append(" (exceptionText: ");
        result.append(exceptionText);
        result.append(", exceptionCode: ");
        result.append(exceptionCode);
        result.append(", locator: ");
        result.append(locator);
        result.append(')');
        return result.toString();
    }

} //ExceptionTypeImpl

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -