org.jboss.drools.impl.DroolsFactoryImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jbpm-bpmn2-emfextmodel Show documentation
Show all versions of jbpm-bpmn2-emfextmodel Show documentation
jBPM BPMN2 EMF Extension Model
/*
* Copyright 2015 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
*/
package org.jboss.drools.impl;
import java.math.BigInteger;
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.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
import org.eclipse.emf.ecore.xml.type.XMLTypeFactory;
import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
import org.jboss.drools.*;
/**
*
* An implementation of the model Factory.
*
* @generated
*/
public class DroolsFactoryImpl extends EFactoryImpl implements DroolsFactory {
/**
* Creates the default factory implementation.
*
*
* @generated
*/
public static DroolsFactory init() {
try {
DroolsFactory theDroolsFactory = (DroolsFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.jboss.org/drools");
if (theDroolsFactory != null) {
return theDroolsFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new DroolsFactoryImpl();
}
/**
* Creates an instance of the factory.
*
*
* @generated
*/
public DroolsFactoryImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case DroolsPackage.DOCUMENT_ROOT: return createDocumentRoot();
case DroolsPackage.GLOBAL_TYPE: return createGlobalType();
case DroolsPackage.IMPORT_TYPE: return createImportType();
case DroolsPackage.META_DATA_TYPE: return createMetaDataType();
case DroolsPackage.ON_ENTRY_SCRIPT_TYPE: return createOnEntryScriptType();
case DroolsPackage.ON_EXIT_SCRIPT_TYPE: return createOnExitScriptType();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
*
*
* @generated
*/
@Override
public Object createFromString(EDataType eDataType, String initialValue) {
switch (eDataType.getClassifierID()) {
case DroolsPackage.PACKAGE_NAME_TYPE:
return createPackageNameTypeFromString(eDataType, initialValue);
case DroolsPackage.PRIORITY_TYPE:
return createPriorityTypeFromString(eDataType, initialValue);
case DroolsPackage.RULE_FLOW_GROUP_TYPE:
return createRuleFlowGroupTypeFromString(eDataType, initialValue);
case DroolsPackage.TASK_NAME_TYPE:
return createTaskNameTypeFromString(eDataType, initialValue);
case DroolsPackage.VERSION_TYPE:
return createVersionTypeFromString(eDataType, initialValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
/**
*
*
* @generated
*/
@Override
public String convertToString(EDataType eDataType, Object instanceValue) {
switch (eDataType.getClassifierID()) {
case DroolsPackage.PACKAGE_NAME_TYPE:
return convertPackageNameTypeToString(eDataType, instanceValue);
case DroolsPackage.PRIORITY_TYPE:
return convertPriorityTypeToString(eDataType, instanceValue);
case DroolsPackage.RULE_FLOW_GROUP_TYPE:
return convertRuleFlowGroupTypeToString(eDataType, instanceValue);
case DroolsPackage.TASK_NAME_TYPE:
return convertTaskNameTypeToString(eDataType, instanceValue);
case DroolsPackage.VERSION_TYPE:
return convertVersionTypeToString(eDataType, instanceValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
/**
*
*
* @generated
*/
public DocumentRoot createDocumentRoot() {
DocumentRootImpl documentRoot = new DocumentRootImpl();
return documentRoot;
}
/**
*
*
* @generated
*/
public GlobalType createGlobalType() {
GlobalTypeImpl globalType = new GlobalTypeImpl();
return globalType;
}
/**
*
*
* @generated
*/
public ImportType createImportType() {
ImportTypeImpl importType = new ImportTypeImpl();
return importType;
}
/**
*
*
* @generated
*/
public MetaDataType createMetaDataType() {
MetaDataTypeImpl metaDataType = new MetaDataTypeImpl();
return metaDataType;
}
/**
*
*
* @generated
*/
public OnEntryScriptType createOnEntryScriptType() {
OnEntryScriptTypeImpl onEntryScriptType = new OnEntryScriptTypeImpl();
return onEntryScriptType;
}
/**
*
*
* @generated
*/
public OnExitScriptType createOnExitScriptType() {
OnExitScriptTypeImpl onExitScriptType = new OnExitScriptTypeImpl();
return onExitScriptType;
}
/**
*
*
* @generated
*/
public String createPackageNameTypeFromString(EDataType eDataType, String initialValue) {
return (String)XMLTypeFactory.eINSTANCE.createFromString(XMLTypePackage.Literals.STRING, initialValue);
}
/**
*
*
* @generated
*/
public String convertPackageNameTypeToString(EDataType eDataType, Object instanceValue) {
return XMLTypeFactory.eINSTANCE.convertToString(XMLTypePackage.Literals.STRING, instanceValue);
}
/**
*
*
* @generated
*/
public BigInteger createPriorityTypeFromString(EDataType eDataType, String initialValue) {
return (BigInteger)XMLTypeFactory.eINSTANCE.createFromString(XMLTypePackage.Literals.INTEGER, initialValue);
}
/**
*
*
* @generated
*/
public String convertPriorityTypeToString(EDataType eDataType, Object instanceValue) {
return XMLTypeFactory.eINSTANCE.convertToString(XMLTypePackage.Literals.INTEGER, instanceValue);
}
/**
*
*
* @generated
*/
public String createRuleFlowGroupTypeFromString(EDataType eDataType, String initialValue) {
return (String)XMLTypeFactory.eINSTANCE.createFromString(XMLTypePackage.Literals.STRING, initialValue);
}
/**
*
*
* @generated
*/
public String convertRuleFlowGroupTypeToString(EDataType eDataType, Object instanceValue) {
return XMLTypeFactory.eINSTANCE.convertToString(XMLTypePackage.Literals.STRING, instanceValue);
}
/**
*
*
* @generated
*/
public String createTaskNameTypeFromString(EDataType eDataType, String initialValue) {
return (String)XMLTypeFactory.eINSTANCE.createFromString(XMLTypePackage.Literals.STRING, initialValue);
}
/**
*
*
* @generated
*/
public String convertTaskNameTypeToString(EDataType eDataType, Object instanceValue) {
return XMLTypeFactory.eINSTANCE.convertToString(XMLTypePackage.Literals.STRING, instanceValue);
}
/**
*
*
* @generated
*/
public String createVersionTypeFromString(EDataType eDataType, String initialValue) {
return (String)XMLTypeFactory.eINSTANCE.createFromString(XMLTypePackage.Literals.STRING, initialValue);
}
/**
*
*
* @generated
*/
public String convertVersionTypeToString(EDataType eDataType, Object instanceValue) {
return XMLTypeFactory.eINSTANCE.convertToString(XMLTypePackage.Literals.STRING, instanceValue);
}
/**
*
*
* @generated
*/
public DroolsPackage getDroolsPackage() {
return (DroolsPackage)getEPackage();
}
/**
*
*
* @deprecated
* @generated
*/
@Deprecated
public static DroolsPackage getPackage() {
return DroolsPackage.eINSTANCE;
}
} //DroolsFactoryImpl
© 2015 - 2025 Weber Informatics LLC | Privacy Policy