| /** |
| * Copyright (c) 2020 CEA LIST |
| * |
| * All rights reserved. This program and the accompanying materials are |
| * made available under the terms of the Eclipse Public License v2.0 which |
| * accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| */ |
| package org.eclipse.papyrus.aiml.profile.AIML.Recurrent_layers.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.papyrus.aiml.profile.AIML.Recurrent_layers.*; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Factory</b>. |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class Recurrent_layersFactoryImpl extends EFactoryImpl implements Recurrent_layersFactory { |
| /** |
| * Creates the default factory implementation. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static Recurrent_layersFactory init() { |
| try { |
| Recurrent_layersFactory theRecurrent_layersFactory = (Recurrent_layersFactory)EPackage.Registry.INSTANCE.getEFactory(Recurrent_layersPackage.eNS_URI); |
| if (theRecurrent_layersFactory != null) { |
| return theRecurrent_layersFactory; |
| } |
| } |
| catch (Exception exception) { |
| EcorePlugin.INSTANCE.log(exception); |
| } |
| return new Recurrent_layersFactoryImpl(); |
| } |
| |
| /** |
| * Creates an instance of the factory. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Recurrent_layersFactoryImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EObject create(EClass eClass) { |
| switch (eClass.getClassifierID()) { |
| case Recurrent_layersPackage.RNN_CELL: return createRNNCell(); |
| case Recurrent_layersPackage.LSTM_CELL: return createLSTMCell(); |
| case Recurrent_layersPackage.GRU_CELL: return createGRUCell(); |
| case Recurrent_layersPackage.RNN: return createRNN(); |
| case Recurrent_layersPackage.LSTM: return createLSTM(); |
| case Recurrent_layersPackage.GRU: return createGRU(); |
| default: |
| throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public RNNCell createRNNCell() { |
| RNNCellImpl rnnCell = new RNNCellImpl(); |
| return rnnCell; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public LSTMCell createLSTMCell() { |
| LSTMCellImpl lstmCell = new LSTMCellImpl(); |
| return lstmCell; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public GRUCell createGRUCell() { |
| GRUCellImpl gruCell = new GRUCellImpl(); |
| return gruCell; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public RNN createRNN() { |
| RNNImpl rnn = new RNNImpl(); |
| return rnn; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public LSTM createLSTM() { |
| LSTMImpl lstm = new LSTMImpl(); |
| return lstm; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public GRU createGRU() { |
| GRUImpl gru = new GRUImpl(); |
| return gru; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Recurrent_layersPackage getRecurrent_layersPackage() { |
| return (Recurrent_layersPackage)getEPackage(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @deprecated |
| * @generated |
| */ |
| @Deprecated |
| public static Recurrent_layersPackage getPackage() { |
| return Recurrent_layersPackage.eINSTANCE; |
| } |
| |
| } //Recurrent_layersFactoryImpl |