| /** |
| * |
| * Copyright (c) 2011, 2016 - 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 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation |
| * |
| */ |
| package org.eclipse.osbp.ecview.core.common.model.core.authorization.impl; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.EObject; |
| import org.eclipse.emf.ecore.EPackage; |
| |
| import org.eclipse.emf.ecore.impl.EFactoryImpl; |
| |
| import org.eclipse.emf.ecore.plugin.EcorePlugin; |
| |
| import org.eclipse.osbp.ecview.core.common.model.core.authorization.*; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Factory</b>. |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class AuthorizationFactoryImpl extends EFactoryImpl implements AuthorizationFactory { |
| /** |
| * Creates the default factory implementation. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static AuthorizationFactory init() { |
| try { |
| AuthorizationFactory theAuthorizationFactory = (AuthorizationFactory)EPackage.Registry.INSTANCE.getEFactory(AuthorizationPackage.eNS_URI); |
| if (theAuthorizationFactory != null) { |
| return theAuthorizationFactory; |
| } |
| } |
| catch (Exception exception) { |
| EcorePlugin.INSTANCE.log(exception); |
| } |
| return new AuthorizationFactoryImpl(); |
| } |
| |
| /** |
| * Creates an instance of the factory. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public AuthorizationFactoryImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EObject create(EClass eClass) { |
| switch (eClass.getClassifierID()) { |
| case AuthorizationPackage.YAUTHORIZATION_STORE: return createYAuthorizationStore(); |
| case AuthorizationPackage.YFIELD_AUTHORIZATION: return createYFieldAuthorization(); |
| default: |
| throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public YAuthorizationStore createYAuthorizationStore() { |
| YAuthorizationStoreImpl yAuthorizationStore = new YAuthorizationStoreImpl(); |
| return yAuthorizationStore; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public YFieldAuthorization createYFieldAuthorization() { |
| YFieldAuthorizationImpl yFieldAuthorization = new YFieldAuthorizationImpl(); |
| return yFieldAuthorization; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public AuthorizationPackage getAuthorizationPackage() { |
| return (AuthorizationPackage)getEPackage(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @deprecated |
| * @generated |
| */ |
| @Deprecated |
| public static AuthorizationPackage getPackage() { |
| return AuthorizationPackage.eINSTANCE; |
| } |
| |
| } //AuthorizationFactoryImpl |