All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.opengis.wfsv.util.WfsvSwitch Maven / Gradle / Ivy

/**
 * 
 * 
 *
 * $Id: WfsvSwitch.java 7988 2007-12-12 20:29:15Z aaime $
 */
package net.opengis.wfsv.util;

import java.util.List;

import net.opengis.wfs.BaseRequestType;
import net.opengis.wfs.DeleteElementType;
import net.opengis.wfs.DescribeFeatureTypeType;
import net.opengis.wfs.FeatureCollectionType;
import net.opengis.wfs.GetFeatureType;
import net.opengis.wfs.NativeType;
import net.opengis.wfs.UpdateElementType;

import net.opengis.wfsv.*;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;

/**
 * 
 * The Switch for the model's inheritance hierarchy.
 * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
 * to invoke the caseXXX method for each class of the model,
 * starting with the actual class of the object
 * and proceeding up the inheritance hierarchy
 * until a non-null result is returned,
 * which is the result of the switch.
 * 
 * @see net.opengis.wfsv.WfsvPackage
 * @generated
 */
public class WfsvSwitch {
    /**
     * The cached model package
     * 
     * 
     * @generated
     */
    protected static WfsvPackage modelPackage;

    /**
     * Creates an instance of the switch.
     * 
     * 
     * @generated
     */
    public WfsvSwitch() {
        if (modelPackage == null) {
            modelPackage = WfsvPackage.eINSTANCE;
        }
    }

    /**
     * Calls caseXXX for each class of the model until one returns a non null result; it yields that result.
     * 
     * 
     * @return the first non-null result returned by a caseXXX call.
     * @generated
     */
    public Object doSwitch(EObject theEObject) {
        return doSwitch(theEObject.eClass(), theEObject);
    }

    /**
     * Calls caseXXX for each class of the model until one returns a non null result; it yields that result.
     * 
     * 
     * @return the first non-null result returned by a caseXXX call.
     * @generated
     */
    protected Object doSwitch(EClass theEClass, EObject theEObject) {
        if (theEClass.eContainer() == modelPackage) {
            return doSwitch(theEClass.getClassifierID(), theEObject);
        }
        else {
            List eSuperTypes = theEClass.getESuperTypes();
            return
                eSuperTypes.isEmpty() ?
                    defaultCase(theEObject) :
                    doSwitch((EClass)eSuperTypes.get(0), theEObject);
        }
    }

    /**
     * Calls caseXXX for each class of the model until one returns a non null result; it yields that result.
     * 
     * 
     * @return the first non-null result returned by a caseXXX call.
     * @generated
     */
    protected Object doSwitch(int classifierID, EObject theEObject) {
        switch (classifierID) {
            case WfsvPackage.ABSTRACT_VERSIONED_FEATURE_TYPE: {
                AbstractVersionedFeatureType abstractVersionedFeatureType = (AbstractVersionedFeatureType)theEObject;
                Object result = caseAbstractVersionedFeatureType(abstractVersionedFeatureType);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            case WfsvPackage.DESCRIBE_VERSIONED_FEATURE_TYPE_TYPE: {
                DescribeVersionedFeatureTypeType describeVersionedFeatureTypeType = (DescribeVersionedFeatureTypeType)theEObject;
                Object result = caseDescribeVersionedFeatureTypeType(describeVersionedFeatureTypeType);
                if (result == null) result = caseDescribeFeatureTypeType(describeVersionedFeatureTypeType);
                if (result == null) result = caseBaseRequestType(describeVersionedFeatureTypeType);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            case WfsvPackage.DIFFERENCE_QUERY_TYPE: {
                DifferenceQueryType differenceQueryType = (DifferenceQueryType)theEObject;
                Object result = caseDifferenceQueryType(differenceQueryType);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            case WfsvPackage.DOCUMENT_ROOT: {
                DocumentRoot documentRoot = (DocumentRoot)theEObject;
                Object result = caseDocumentRoot(documentRoot);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            case WfsvPackage.GET_DIFF_TYPE: {
                GetDiffType getDiffType = (GetDiffType)theEObject;
                Object result = caseGetDiffType(getDiffType);
                if (result == null) result = caseBaseRequestType(getDiffType);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            case WfsvPackage.GET_LOG_TYPE: {
                GetLogType getLogType = (GetLogType)theEObject;
                Object result = caseGetLogType(getLogType);
                if (result == null) result = caseBaseRequestType(getLogType);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            case WfsvPackage.GET_VERSIONED_FEATURE_TYPE: {
                GetVersionedFeatureType getVersionedFeatureType = (GetVersionedFeatureType)theEObject;
                Object result = caseGetVersionedFeatureType(getVersionedFeatureType);
                if (result == null) result = caseGetFeatureType(getVersionedFeatureType);
                if (result == null) result = caseBaseRequestType(getVersionedFeatureType);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            case WfsvPackage.ROLLBACK_TYPE: {
                RollbackType rollbackType = (RollbackType)theEObject;
                Object result = caseRollbackType(rollbackType);
                if (result == null) result = caseNativeType(rollbackType);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            case WfsvPackage.VERSIONED_DELETE_ELEMENT_TYPE: {
                VersionedDeleteElementType versionedDeleteElementType = (VersionedDeleteElementType)theEObject;
                Object result = caseVersionedDeleteElementType(versionedDeleteElementType);
                if (result == null) result = caseDeleteElementType(versionedDeleteElementType);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            case WfsvPackage.VERSIONED_FEATURE_COLLECTION_TYPE: {
                VersionedFeatureCollectionType versionedFeatureCollectionType = (VersionedFeatureCollectionType)theEObject;
                Object result = caseVersionedFeatureCollectionType(versionedFeatureCollectionType);
                if (result == null) result = caseFeatureCollectionType(versionedFeatureCollectionType);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            case WfsvPackage.VERSIONED_UPDATE_ELEMENT_TYPE: {
                VersionedUpdateElementType versionedUpdateElementType = (VersionedUpdateElementType)theEObject;
                Object result = caseVersionedUpdateElementType(versionedUpdateElementType);
                if (result == null) result = caseUpdateElementType(versionedUpdateElementType);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            default: return defaultCase(theEObject);
        }
    }

    /**
     * Returns the result of interpreting the object as an instance of 'Abstract Versioned Feature Type'.
     * 
     * This implementation returns null;
     * returning a non-null result will terminate the switch.
     * 
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of 'Abstract Versioned Feature Type'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
    public Object caseAbstractVersionedFeatureType(AbstractVersionedFeatureType object) {
        return null;
    }

    /**
     * Returns the result of interpreting the object as an instance of 'Describe Versioned Feature Type Type'.
     * 
     * This implementation returns null;
     * returning a non-null result will terminate the switch.
     * 
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of 'Describe Versioned Feature Type Type'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
    public Object caseDescribeVersionedFeatureTypeType(DescribeVersionedFeatureTypeType object) {
        return null;
    }

    /**
     * Returns the result of interpreting the object as an instance of 'Difference Query Type'.
     * 
     * This implementation returns null;
     * returning a non-null result will terminate the switch.
     * 
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of 'Difference Query Type'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
    public Object caseDifferenceQueryType(DifferenceQueryType object) {
        return null;
    }

    /**
     * Returns the result of interpreting the object as an instance of 'Document Root'.
     * 
     * This implementation returns null;
     * returning a non-null result will terminate the switch.
     * 
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of 'Document Root'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
    public Object caseDocumentRoot(DocumentRoot object) {
        return null;
    }

    /**
     * Returns the result of interpreting the object as an instance of 'Get Diff Type'.
     * 
     * This implementation returns null;
     * returning a non-null result will terminate the switch.
     * 
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of 'Get Diff Type'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
    public Object caseGetDiffType(GetDiffType object) {
        return null;
    }

    /**
     * Returns the result of interpreting the object as an instance of 'Get Log Type'.
     * 
     * This implementation returns null;
     * returning a non-null result will terminate the switch.
     * 
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of 'Get Log Type'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
    public Object caseGetLogType(GetLogType object) {
        return null;
    }

    /**
     * Returns the result of interpreting the object as an instance of 'Get Versioned Feature Type'.
     * 
     * This implementation returns null;
     * returning a non-null result will terminate the switch.
     * 
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of 'Get Versioned Feature Type'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
    public Object caseGetVersionedFeatureType(GetVersionedFeatureType object) {
        return null;
    }

    /**
     * Returns the result of interpreting the object as an instance of 'Rollback Type'.
     * 
     * This implementation returns null;
     * returning a non-null result will terminate the switch.
     * 
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of 'Rollback Type'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
    public Object caseRollbackType(RollbackType object) {
        return null;
    }

    /**
     * Returns the result of interpreting the object as an instance of 'Versioned Delete Element Type'.
     * 
     * This implementation returns null;
     * returning a non-null result will terminate the switch.
     * 
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of 'Versioned Delete Element Type'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
    public Object caseVersionedDeleteElementType(VersionedDeleteElementType object) {
        return null;
    }

    /**
     * Returns the result of interpreting the object as an instance of 'Versioned Feature Collection Type'.
     * 
     * This implementation returns null;
     * returning a non-null result will terminate the switch.
     * 
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of 'Versioned Feature Collection Type'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
    public Object caseVersionedFeatureCollectionType(VersionedFeatureCollectionType object) {
        return null;
    }

    /**
     * Returns the result of interpreting the object as an instance of 'Versioned Update Element Type'.
     * 
     * This implementation returns null;
     * returning a non-null result will terminate the switch.
     * 
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of 'Versioned Update Element Type'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
    public Object caseVersionedUpdateElementType(VersionedUpdateElementType object) {
        return null;
    }

    /**
     * Returns the result of interpreting the object as an instance of 'Base Request Type'.
     * 
     * This implementation returns null;
     * returning a non-null result will terminate the switch.
     * 
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of 'Base Request Type'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
    public Object caseBaseRequestType(BaseRequestType object) {
        return null;
    }

    /**
     * Returns the result of interpreting the object as an instance of 'Describe Feature Type Type'.
     * 
     * This implementation returns null;
     * returning a non-null result will terminate the switch.
     * 
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of 'Describe Feature Type Type'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
    public Object caseDescribeFeatureTypeType(DescribeFeatureTypeType object) {
        return null;
    }

    /**
     * Returns the result of interpreting the object as an instance of 'Get Feature Type'.
     * 
     * This implementation returns null;
     * returning a non-null result will terminate the switch.
     * 
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of 'Get Feature Type'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
    public Object caseGetFeatureType(GetFeatureType object) {
        return null;
    }

    /**
     * Returns the result of interpreting the object as an instance of 'Native Type'.
     * 
     * This implementation returns null;
     * returning a non-null result will terminate the switch.
     * 
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of 'Native Type'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
    public Object caseNativeType(NativeType object) {
        return null;
    }

    /**
     * Returns the result of interpreting the object as an instance of 'Delete Element Type'.
     * 
     * This implementation returns null;
     * returning a non-null result will terminate the switch.
     * 
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of 'Delete Element Type'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
    public Object caseDeleteElementType(DeleteElementType object) {
        return null;
    }

    /**
     * Returns the result of interpreting the object as an instance of 'Feature Collection Type'.
     * 
     * This implementation returns null;
     * returning a non-null result will terminate the switch.
     * 
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of 'Feature Collection Type'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
    public Object caseFeatureCollectionType(FeatureCollectionType object) {
        return null;
    }

    /**
     * Returns the result of interpreting the object as an instance of 'Update Element Type'.
     * 
     * This implementation returns null;
     * returning a non-null result will terminate the switch.
     * 
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of 'Update Element Type'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
    public Object caseUpdateElementType(UpdateElementType object) {
        return null;
    }

    /**
     * Returns the result of interpreting the object as an instance of 'EObject'.
     * 
     * This implementation returns null;
     * returning a non-null result will terminate the switch, but this is the last case anyway.
     * 
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of 'EObject'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject)
     * @generated
     */
    public Object defaultCase(EObject object) {
        return null;
    }

} //WfsvSwitch




© 2015 - 2025 Weber Informatics LLC | Privacy Policy