blob: bcffd041b24b7af86d5e2357e8f9e5ec257ea953 [file] [log] [blame]
/**
* 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
*
* generated from ActionDSL.xcore
*
*
*/
package org.eclipse.osbp.xtext.action.impl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
import org.eclipse.osbp.xtext.action.*;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class ActionDSLFactoryImpl extends EFactoryImpl implements ActionDSLFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static ActionDSLFactory init() {
try {
ActionDSLFactory theActionDSLFactory = (ActionDSLFactory)EPackage.Registry.INSTANCE.getEFactory(ActionDSLPackage.eNS_URI);
if (theActionDSLFactory != null) {
return theActionDSLFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new ActionDSLFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ActionDSLFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case ActionDSLPackage.ACTION_MODEL: return createActionModel();
case ActionDSLPackage.ACTION_LAZY_RESOLVER: return createActionLazyResolver();
case ActionDSLPackage.ACTION_PACKAGE: return createActionPackage();
case ActionDSLPackage.ACTION_BASE: return createActionBase();
case ActionDSLPackage.ACTION_COMMAND: return createActionCommand();
case ActionDSLPackage.ACTION_TOOLBAR: return createActionToolbar();
case ActionDSLPackage.ACTION_BUTTON: return createActionButton();
case ActionDSLPackage.ACTION_SPACER: return createActionSpacer();
case ActionDSLPackage.ACTION_TASK: return createActionTask();
case ActionDSLPackage.ACTION_SELECT_WORKLOAD: return createActionSelectWorkload();
case ActionDSLPackage.ACTION_DIALOG: return createActionDialog();
case ActionDSLPackage.ACTION_REPORT: return createActionReport();
case ActionDSLPackage.ACTION_CHART: return createActionChart();
case ActionDSLPackage.ACTION_WORKFLOW: return createActionWorkflow();
case ActionDSLPackage.ACTION_DATAINTERCHANGE: return createActionDatainterchange();
case ActionDSLPackage.ACTION_UI: return createActionUI();
case ActionDSLPackage.ACTION_FUNCTION: return createActionFunction();
case ActionDSLPackage.ACTION_PARAMETER: return createActionParameter();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object createFromString(EDataType eDataType, String initialValue) {
switch (eDataType.getClassifierID()) {
case ActionDSLPackage.TASK_ACTION_ENUM:
return createTaskActionEnumFromString(eDataType, initialValue);
case ActionDSLPackage.SELECT_WORKLOAD_ACTION_ENUM:
return createSelectWorkloadActionEnumFromString(eDataType, initialValue);
case ActionDSLPackage.DIALOG_ACTION_ENUM:
return createDialogActionEnumFromString(eDataType, initialValue);
case ActionDSLPackage.REPORT_ACTION_ENUM:
return createReportActionEnumFromString(eDataType, initialValue);
case ActionDSLPackage.CHART_ACTION_ENUM:
return createChartActionEnumFromString(eDataType, initialValue);
case ActionDSLPackage.WORKFLOW_ACTION_ENUM:
return createWorkflowActionEnumFromString(eDataType, initialValue);
case ActionDSLPackage.DATAINTERCHANGE_ACTION_ENUM:
return createDatainterchangeActionEnumFromString(eDataType, initialValue);
case ActionDSLPackage.UI_ACTION_ENUM:
return createUIActionEnumFromString(eDataType, initialValue);
case ActionDSLPackage.INTERNAL_EOBJECT:
return createInternalEObjectFromString(eDataType, initialValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String convertToString(EDataType eDataType, Object instanceValue) {
switch (eDataType.getClassifierID()) {
case ActionDSLPackage.TASK_ACTION_ENUM:
return convertTaskActionEnumToString(eDataType, instanceValue);
case ActionDSLPackage.SELECT_WORKLOAD_ACTION_ENUM:
return convertSelectWorkloadActionEnumToString(eDataType, instanceValue);
case ActionDSLPackage.DIALOG_ACTION_ENUM:
return convertDialogActionEnumToString(eDataType, instanceValue);
case ActionDSLPackage.REPORT_ACTION_ENUM:
return convertReportActionEnumToString(eDataType, instanceValue);
case ActionDSLPackage.CHART_ACTION_ENUM:
return convertChartActionEnumToString(eDataType, instanceValue);
case ActionDSLPackage.WORKFLOW_ACTION_ENUM:
return convertWorkflowActionEnumToString(eDataType, instanceValue);
case ActionDSLPackage.DATAINTERCHANGE_ACTION_ENUM:
return convertDatainterchangeActionEnumToString(eDataType, instanceValue);
case ActionDSLPackage.UI_ACTION_ENUM:
return convertUIActionEnumToString(eDataType, instanceValue);
case ActionDSLPackage.INTERNAL_EOBJECT:
return convertInternalEObjectToString(eDataType, instanceValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ActionModel createActionModel() {
ActionModelImpl actionModel = new ActionModelImpl();
return actionModel;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ActionLazyResolver createActionLazyResolver() {
ActionLazyResolverImpl actionLazyResolver = new ActionLazyResolverImpl();
return actionLazyResolver;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ActionPackage createActionPackage() {
ActionPackageImpl actionPackage = new ActionPackageImpl();
return actionPackage;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ActionBase createActionBase() {
ActionBaseImpl actionBase = new ActionBaseImpl();
return actionBase;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ActionCommand createActionCommand() {
ActionCommandImpl actionCommand = new ActionCommandImpl();
return actionCommand;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ActionToolbar createActionToolbar() {
ActionToolbarImpl actionToolbar = new ActionToolbarImpl();
return actionToolbar;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ActionButton createActionButton() {
ActionButtonImpl actionButton = new ActionButtonImpl();
return actionButton;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ActionSpacer createActionSpacer() {
ActionSpacerImpl actionSpacer = new ActionSpacerImpl();
return actionSpacer;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ActionTask createActionTask() {
ActionTaskImpl actionTask = new ActionTaskImpl();
return actionTask;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ActionSelectWorkload createActionSelectWorkload() {
ActionSelectWorkloadImpl actionSelectWorkload = new ActionSelectWorkloadImpl();
return actionSelectWorkload;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ActionDialog createActionDialog() {
ActionDialogImpl actionDialog = new ActionDialogImpl();
return actionDialog;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ActionReport createActionReport() {
ActionReportImpl actionReport = new ActionReportImpl();
return actionReport;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ActionChart createActionChart() {
ActionChartImpl actionChart = new ActionChartImpl();
return actionChart;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ActionWorkflow createActionWorkflow() {
ActionWorkflowImpl actionWorkflow = new ActionWorkflowImpl();
return actionWorkflow;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ActionDatainterchange createActionDatainterchange() {
ActionDatainterchangeImpl actionDatainterchange = new ActionDatainterchangeImpl();
return actionDatainterchange;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ActionUI createActionUI() {
ActionUIImpl actionUI = new ActionUIImpl();
return actionUI;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ActionFunction createActionFunction() {
ActionFunctionImpl actionFunction = new ActionFunctionImpl();
return actionFunction;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ActionParameter createActionParameter() {
ActionParameterImpl actionParameter = new ActionParameterImpl();
return actionParameter;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public TaskActionEnum createTaskActionEnumFromString(EDataType eDataType, String initialValue) {
TaskActionEnum result = TaskActionEnum.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String convertTaskActionEnumToString(EDataType eDataType, Object instanceValue) {
return instanceValue == null ? null : instanceValue.toString();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SelectWorkloadActionEnum createSelectWorkloadActionEnumFromString(EDataType eDataType, String initialValue) {
SelectWorkloadActionEnum result = SelectWorkloadActionEnum.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String convertSelectWorkloadActionEnumToString(EDataType eDataType, Object instanceValue) {
return instanceValue == null ? null : instanceValue.toString();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public DialogActionEnum createDialogActionEnumFromString(EDataType eDataType, String initialValue) {
DialogActionEnum result = DialogActionEnum.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String convertDialogActionEnumToString(EDataType eDataType, Object instanceValue) {
return instanceValue == null ? null : instanceValue.toString();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ReportActionEnum createReportActionEnumFromString(EDataType eDataType, String initialValue) {
ReportActionEnum result = ReportActionEnum.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String convertReportActionEnumToString(EDataType eDataType, Object instanceValue) {
return instanceValue == null ? null : instanceValue.toString();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ChartActionEnum createChartActionEnumFromString(EDataType eDataType, String initialValue) {
ChartActionEnum result = ChartActionEnum.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String convertChartActionEnumToString(EDataType eDataType, Object instanceValue) {
return instanceValue == null ? null : instanceValue.toString();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public WorkflowActionEnum createWorkflowActionEnumFromString(EDataType eDataType, String initialValue) {
WorkflowActionEnum result = WorkflowActionEnum.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String convertWorkflowActionEnumToString(EDataType eDataType, Object instanceValue) {
return instanceValue == null ? null : instanceValue.toString();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public DatainterchangeActionEnum createDatainterchangeActionEnumFromString(EDataType eDataType, String initialValue) {
DatainterchangeActionEnum result = DatainterchangeActionEnum.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String convertDatainterchangeActionEnumToString(EDataType eDataType, Object instanceValue) {
return instanceValue == null ? null : instanceValue.toString();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public UIActionEnum createUIActionEnumFromString(EDataType eDataType, String initialValue) {
UIActionEnum result = UIActionEnum.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String convertUIActionEnumToString(EDataType eDataType, Object instanceValue) {
return instanceValue == null ? null : instanceValue.toString();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public InternalEObject createInternalEObjectFromString(EDataType eDataType, String initialValue) {
return (InternalEObject)super.createFromString(eDataType, initialValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String convertInternalEObjectToString(EDataType eDataType, Object instanceValue) {
return super.convertToString(eDataType, instanceValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ActionDSLPackage getActionDSLPackage() {
return (ActionDSLPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static ActionDSLPackage getPackage() {
return ActionDSLPackage.eINSTANCE;
}
} //ActionDSLFactoryImpl