blob: 8e6b583736cddc7a776489654eb7ad9da11c2200 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2014 Bosch Software Innovations GmbH and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v1.0 which accompany this distribution.
*
* The Eclipse Public License is available at
* http://www.eclipse.org/legal/epl-v10.html
* The Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
* Bosch Software Innovations GmbH - Please refer to git log
*
*******************************************************************************/
/**
*/
package org.eclipse.vorto.functionblock.impl;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;
import org.eclipse.vorto.functionblock.Constraint;
import org.eclipse.vorto.functionblock.ConstraintIntervalType;
import org.eclipse.vorto.functionblock.Entity;
import org.eclipse.vorto.functionblock.EnumLiteral;
import org.eclipse.vorto.functionblock.Event;
import org.eclipse.vorto.functionblock.FBFeature;
import org.eclipse.vorto.functionblock.FunctionBlock;
import org.eclipse.vorto.functionblock.FunctionblockFactory;
import org.eclipse.vorto.functionblock.FunctionblockModel;
import org.eclipse.vorto.functionblock.FunctionblockPackage;
import org.eclipse.vorto.functionblock.ObjectParam;
import org.eclipse.vorto.functionblock.ObjectProperty;
import org.eclipse.vorto.functionblock.ObjectType;
import org.eclipse.vorto.functionblock.Operation;
import org.eclipse.vorto.functionblock.Parameter;
import org.eclipse.vorto.functionblock.Presence;
import org.eclipse.vorto.functionblock.PrimitiveParam;
import org.eclipse.vorto.functionblock.PrimitiveProperty;
import org.eclipse.vorto.functionblock.PrimitiveType;
import org.eclipse.vorto.functionblock.Property;
import org.eclipse.vorto.functionblock.ReturnObjectType;
import org.eclipse.vorto.functionblock.ReturnPrimitiveType;
import org.eclipse.vorto.functionblock.ReturnType;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
* <!-- end-user-doc -->
* @generated
*/
public class FunctionblockPackageImpl extends EPackageImpl implements FunctionblockPackage {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass functionblockModelEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass functionBlockEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass fbFeatureEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass objectTypeEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass propertyEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass entityEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass presenceEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass primitivePropertyEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass objectPropertyEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass constraintEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass operationEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass returnTypeEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass returnObjectTypeEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass returnPrimitiveTypeEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass parameterEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass objectParamEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass primitiveParamEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass enumEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass enumLiteralEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass eventEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum primitiveTypeEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum constraintIntervalTypeEEnum = null;
/**
* Creates an instance of the model <b>Package</b>, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
* <p>Note: the correct way to create the package is via the static
* factory method {@link #init init()}, which also performs
* initialization of the package, or returns the registered package,
* if one already exists.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.emf.ecore.EPackage.Registry
* @see org.eclipse.vorto.functionblock.FunctionblockPackage#eNS_URI
* @see #init()
* @generated
*/
private FunctionblockPackageImpl() {
super(eNS_URI, FunctionblockFactory.eINSTANCE);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static boolean isInited = false;
/**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
*
* <p>This method is used to initialize {@link FunctionblockPackage#eINSTANCE} when that field is accessed.
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #eNS_URI
* @see #createPackageContents()
* @see #initializePackageContents()
* @generated
*/
public static FunctionblockPackage init() {
if (isInited) return (FunctionblockPackage)EPackage.Registry.INSTANCE.getEPackage(FunctionblockPackage.eNS_URI);
// Obtain or create and register package
FunctionblockPackageImpl theFunctionblockPackage = (FunctionblockPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof FunctionblockPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new FunctionblockPackageImpl());
isInited = true;
// Create package meta-data objects
theFunctionblockPackage.createPackageContents();
// Initialize created meta-data
theFunctionblockPackage.initializePackageContents();
// Mark meta-data to indicate it can't be changed
theFunctionblockPackage.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(FunctionblockPackage.eNS_URI, theFunctionblockPackage);
return theFunctionblockPackage;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getFunctionblockModel() {
return functionblockModelEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getFunctionblockModel_Name() {
return (EAttribute)functionblockModelEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getFunctionblockModel_Functionblock() {
return (EReference)functionblockModelEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getFunctionblockModel_Elements() {
return (EReference)functionblockModelEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getFunctionblockModel_Enums() {
return (EReference)functionblockModelEClass.getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getFunctionBlock() {
return functionBlockEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getFunctionBlock_Displayname() {
return (EAttribute)functionBlockEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getFunctionBlock_Description() {
return (EAttribute)functionBlockEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getFunctionBlock_Vendor() {
return (EAttribute)functionBlockEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getFunctionBlock_Category() {
return (EAttribute)functionBlockEClass.getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getFunctionBlock_Version() {
return (EAttribute)functionBlockEClass.getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getFunctionBlock_Configuration() {
return (EReference)functionBlockEClass.getEStructuralFeatures().get(5);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getFunctionBlock_Status() {
return (EReference)functionBlockEClass.getEStructuralFeatures().get(6);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getFunctionBlock_Fault() {
return (EReference)functionBlockEClass.getEStructuralFeatures().get(7);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getFunctionBlock_Features() {
return (EReference)functionBlockEClass.getEStructuralFeatures().get(8);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getFunctionBlock_Events() {
return (EReference)functionBlockEClass.getEStructuralFeatures().get(9);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getFBFeature() {
return fbFeatureEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getFBFeature_Properties() {
return (EReference)fbFeatureEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getObjectType() {
return objectTypeEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getObjectType_Name() {
return (EAttribute)objectTypeEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getProperty() {
return propertyEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getProperty_Presence() {
return (EReference)propertyEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getProperty_Multiplicity() {
return (EAttribute)propertyEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getProperty_PropName() {
return (EAttribute)propertyEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getProperty_Description() {
return (EAttribute)propertyEClass.getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getEntity() {
return entityEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getEntity_SuperType() {
return (EReference)entityEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getEntity_Properties() {
return (EReference)entityEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getPresence() {
return presenceEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPresence_Mandatory() {
return (EAttribute)presenceEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPresence_Optional() {
return (EAttribute)presenceEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getPrimitiveProperty() {
return primitivePropertyEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPrimitiveProperty_Type() {
return (EAttribute)primitivePropertyEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getPrimitiveProperty_Constraints() {
return (EReference)primitivePropertyEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getObjectProperty() {
return objectPropertyEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getObjectProperty_Type() {
return (EReference)objectPropertyEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getConstraint() {
return constraintEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getConstraint_Type() {
return (EAttribute)constraintEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getConstraint_ConstraintValues() {
return (EAttribute)constraintEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getOperation() {
return operationEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getOperation_MethodName() {
return (EAttribute)operationEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getOperation_Params() {
return (EReference)operationEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getOperation_ReturnType() {
return (EReference)operationEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getOperation_Description() {
return (EAttribute)operationEClass.getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getReturnType() {
return returnTypeEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getReturnType_Multiplicity() {
return (EAttribute)returnTypeEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getReturnObjectType() {
return returnObjectTypeEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getReturnObjectType_ReturnType() {
return (EReference)returnObjectTypeEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getReturnPrimitiveType() {
return returnPrimitiveTypeEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getReturnPrimitiveType_ReturnType() {
return (EAttribute)returnPrimitiveTypeEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getParameter() {
return parameterEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getParameter_Multiplicity() {
return (EAttribute)parameterEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getParameter_ParamName() {
return (EAttribute)parameterEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getObjectParam() {
return objectParamEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getObjectParam_ParamType() {
return (EReference)objectParamEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getPrimitiveParam() {
return primitiveParamEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPrimitiveParam_ParamType() {
return (EAttribute)primitiveParamEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getEnum() {
return enumEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getEnum_Enums() {
return (EReference)enumEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getEnumLiteral() {
return enumLiteralEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getEnumLiteral_Literal() {
return (EAttribute)enumLiteralEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getEvent() {
return eventEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getEvent_Feature() {
return (EReference)eventEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getEvent_Name() {
return (EAttribute)eventEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getPrimitiveType() {
return primitiveTypeEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getConstraintIntervalType() {
return constraintIntervalTypeEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public FunctionblockFactory getFunctionblockFactory() {
return (FunctionblockFactory)getEFactoryInstance();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private boolean isCreated = false;
/**
* Creates the meta-model objects for the package. This method is
* guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void createPackageContents() {
if (isCreated) return;
isCreated = true;
// Create classes and their features
functionblockModelEClass = createEClass(FUNCTIONBLOCK_MODEL);
createEAttribute(functionblockModelEClass, FUNCTIONBLOCK_MODEL__NAME);
createEReference(functionblockModelEClass, FUNCTIONBLOCK_MODEL__FUNCTIONBLOCK);
createEReference(functionblockModelEClass, FUNCTIONBLOCK_MODEL__ELEMENTS);
createEReference(functionblockModelEClass, FUNCTIONBLOCK_MODEL__ENUMS);
functionBlockEClass = createEClass(FUNCTION_BLOCK);
createEAttribute(functionBlockEClass, FUNCTION_BLOCK__DISPLAYNAME);
createEAttribute(functionBlockEClass, FUNCTION_BLOCK__DESCRIPTION);
createEAttribute(functionBlockEClass, FUNCTION_BLOCK__VENDOR);
createEAttribute(functionBlockEClass, FUNCTION_BLOCK__CATEGORY);
createEAttribute(functionBlockEClass, FUNCTION_BLOCK__VERSION);
createEReference(functionBlockEClass, FUNCTION_BLOCK__CONFIGURATION);
createEReference(functionBlockEClass, FUNCTION_BLOCK__STATUS);
createEReference(functionBlockEClass, FUNCTION_BLOCK__FAULT);
createEReference(functionBlockEClass, FUNCTION_BLOCK__FEATURES);
createEReference(functionBlockEClass, FUNCTION_BLOCK__EVENTS);
fbFeatureEClass = createEClass(FB_FEATURE);
createEReference(fbFeatureEClass, FB_FEATURE__PROPERTIES);
objectTypeEClass = createEClass(OBJECT_TYPE);
createEAttribute(objectTypeEClass, OBJECT_TYPE__NAME);
propertyEClass = createEClass(PROPERTY);
createEReference(propertyEClass, PROPERTY__PRESENCE);
createEAttribute(propertyEClass, PROPERTY__MULTIPLICITY);
createEAttribute(propertyEClass, PROPERTY__PROP_NAME);
createEAttribute(propertyEClass, PROPERTY__DESCRIPTION);
entityEClass = createEClass(ENTITY);
createEReference(entityEClass, ENTITY__SUPER_TYPE);
createEReference(entityEClass, ENTITY__PROPERTIES);
presenceEClass = createEClass(PRESENCE);
createEAttribute(presenceEClass, PRESENCE__MANDATORY);
createEAttribute(presenceEClass, PRESENCE__OPTIONAL);
primitivePropertyEClass = createEClass(PRIMITIVE_PROPERTY);
createEAttribute(primitivePropertyEClass, PRIMITIVE_PROPERTY__TYPE);
createEReference(primitivePropertyEClass, PRIMITIVE_PROPERTY__CONSTRAINTS);
objectPropertyEClass = createEClass(OBJECT_PROPERTY);
createEReference(objectPropertyEClass, OBJECT_PROPERTY__TYPE);
constraintEClass = createEClass(CONSTRAINT);
createEAttribute(constraintEClass, CONSTRAINT__TYPE);
createEAttribute(constraintEClass, CONSTRAINT__CONSTRAINT_VALUES);
operationEClass = createEClass(OPERATION);
createEAttribute(operationEClass, OPERATION__METHOD_NAME);
createEReference(operationEClass, OPERATION__PARAMS);
createEReference(operationEClass, OPERATION__RETURN_TYPE);
createEAttribute(operationEClass, OPERATION__DESCRIPTION);
returnTypeEClass = createEClass(RETURN_TYPE);
createEAttribute(returnTypeEClass, RETURN_TYPE__MULTIPLICITY);
returnObjectTypeEClass = createEClass(RETURN_OBJECT_TYPE);
createEReference(returnObjectTypeEClass, RETURN_OBJECT_TYPE__RETURN_TYPE);
returnPrimitiveTypeEClass = createEClass(RETURN_PRIMITIVE_TYPE);
createEAttribute(returnPrimitiveTypeEClass, RETURN_PRIMITIVE_TYPE__RETURN_TYPE);
parameterEClass = createEClass(PARAMETER);
createEAttribute(parameterEClass, PARAMETER__MULTIPLICITY);
createEAttribute(parameterEClass, PARAMETER__PARAM_NAME);
objectParamEClass = createEClass(OBJECT_PARAM);
createEReference(objectParamEClass, OBJECT_PARAM__PARAM_TYPE);
primitiveParamEClass = createEClass(PRIMITIVE_PARAM);
createEAttribute(primitiveParamEClass, PRIMITIVE_PARAM__PARAM_TYPE);
enumEClass = createEClass(ENUM);
createEReference(enumEClass, ENUM__ENUMS);
enumLiteralEClass = createEClass(ENUM_LITERAL);
createEAttribute(enumLiteralEClass, ENUM_LITERAL__LITERAL);
eventEClass = createEClass(EVENT);
createEReference(eventEClass, EVENT__FEATURE);
createEAttribute(eventEClass, EVENT__NAME);
// Create enums
primitiveTypeEEnum = createEEnum(PRIMITIVE_TYPE);
constraintIntervalTypeEEnum = createEEnum(CONSTRAINT_INTERVAL_TYPE);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private boolean isInitialized = false;
/**
* Complete the initialization of the package and its meta-model. This
* method is guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void initializePackageContents() {
if (isInitialized) return;
isInitialized = true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Create type parameters
// Set bounds for type parameters
// Add supertypes to classes
entityEClass.getESuperTypes().add(this.getObjectType());
primitivePropertyEClass.getESuperTypes().add(this.getProperty());
objectPropertyEClass.getESuperTypes().add(this.getProperty());
returnObjectTypeEClass.getESuperTypes().add(this.getReturnType());
returnPrimitiveTypeEClass.getESuperTypes().add(this.getReturnType());
objectParamEClass.getESuperTypes().add(this.getParameter());
primitiveParamEClass.getESuperTypes().add(this.getParameter());
enumEClass.getESuperTypes().add(this.getObjectType());
// Initialize classes and features; add operations and parameters
initEClass(functionblockModelEClass, FunctionblockModel.class, "FunctionblockModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getFunctionblockModel_Name(), ecorePackage.getEString(), "name", null, 0, 1, FunctionblockModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getFunctionblockModel_Functionblock(), this.getFunctionBlock(), null, "functionblock", null, 0, 1, FunctionblockModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getFunctionblockModel_Elements(), this.getEntity(), null, "elements", null, 0, -1, FunctionblockModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getFunctionblockModel_Enums(), this.getEnum(), null, "enums", null, 0, -1, FunctionblockModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(functionBlockEClass, FunctionBlock.class, "FunctionBlock", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getFunctionBlock_Displayname(), ecorePackage.getEString(), "displayname", null, 0, 1, FunctionBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getFunctionBlock_Description(), ecorePackage.getEString(), "description", null, 0, 1, FunctionBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getFunctionBlock_Vendor(), ecorePackage.getEString(), "vendor", null, 0, 1, FunctionBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getFunctionBlock_Category(), ecorePackage.getEString(), "category", null, 0, 1, FunctionBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getFunctionBlock_Version(), ecorePackage.getEString(), "version", null, 0, 1, FunctionBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getFunctionBlock_Configuration(), this.getFBFeature(), null, "configuration", null, 0, 1, FunctionBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getFunctionBlock_Status(), this.getFBFeature(), null, "status", null, 0, 1, FunctionBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getFunctionBlock_Fault(), this.getFBFeature(), null, "fault", null, 0, 1, FunctionBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getFunctionBlock_Features(), this.getOperation(), null, "features", null, 0, -1, FunctionBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getFunctionBlock_Events(), this.getEvent(), null, "events", null, 0, -1, FunctionBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(fbFeatureEClass, FBFeature.class, "FBFeature", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getFBFeature_Properties(), this.getProperty(), null, "properties", null, 0, -1, FBFeature.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(objectTypeEClass, ObjectType.class, "ObjectType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getObjectType_Name(), ecorePackage.getEString(), "name", null, 0, 1, ObjectType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(propertyEClass, Property.class, "Property", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getProperty_Presence(), this.getPresence(), null, "presence", null, 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getProperty_Multiplicity(), ecorePackage.getEString(), "multiplicity", null, 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getProperty_PropName(), ecorePackage.getEString(), "propName", null, 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getProperty_Description(), ecorePackage.getEString(), "description", null, 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(entityEClass, Entity.class, "Entity", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getEntity_SuperType(), this.getEntity(), null, "superType", null, 0, 1, Entity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getEntity_Properties(), this.getFBFeature(), null, "properties", null, 0, 1, Entity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(presenceEClass, Presence.class, "Presence", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getPresence_Mandatory(), ecorePackage.getEString(), "mandatory", null, 0, 1, Presence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getPresence_Optional(), ecorePackage.getEString(), "optional", null, 0, 1, Presence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(primitivePropertyEClass, PrimitiveProperty.class, "PrimitiveProperty", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getPrimitiveProperty_Type(), this.getPrimitiveType(), "type", null, 0, 1, PrimitiveProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getPrimitiveProperty_Constraints(), this.getConstraint(), null, "Constraints", null, 0, -1, PrimitiveProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(objectPropertyEClass, ObjectProperty.class, "ObjectProperty", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getObjectProperty_Type(), this.getObjectType(), null, "type", null, 0, 1, ObjectProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(constraintEClass, Constraint.class, "Constraint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getConstraint_Type(), this.getConstraintIntervalType(), "type", null, 0, 1, Constraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getConstraint_ConstraintValues(), ecorePackage.getEString(), "constraintValues", null, 0, 1, Constraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(operationEClass, Operation.class, "Operation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getOperation_MethodName(), ecorePackage.getEString(), "methodName", null, 0, 1, Operation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getOperation_Params(), this.getParameter(), null, "params", null, 0, -1, Operation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getOperation_ReturnType(), this.getReturnType(), null, "returnType", null, 0, 1, Operation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getOperation_Description(), ecorePackage.getEString(), "description", null, 0, 1, Operation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(returnTypeEClass, ReturnType.class, "ReturnType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getReturnType_Multiplicity(), ecorePackage.getEString(), "multiplicity", null, 0, 1, ReturnType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(returnObjectTypeEClass, ReturnObjectType.class, "ReturnObjectType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getReturnObjectType_ReturnType(), this.getObjectType(), null, "returnType", null, 0, 1, ReturnObjectType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(returnPrimitiveTypeEClass, ReturnPrimitiveType.class, "ReturnPrimitiveType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getReturnPrimitiveType_ReturnType(), this.getPrimitiveType(), "returnType", null, 0, 1, ReturnPrimitiveType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(parameterEClass, Parameter.class, "Parameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getParameter_Multiplicity(), ecorePackage.getEString(), "multiplicity", null, 0, 1, Parameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getParameter_ParamName(), ecorePackage.getEString(), "paramName", null, 0, 1, Parameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(objectParamEClass, ObjectParam.class, "ObjectParam", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getObjectParam_ParamType(), this.getObjectType(), null, "paramType", null, 0, 1, ObjectParam.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(primitiveParamEClass, PrimitiveParam.class, "PrimitiveParam", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getPrimitiveParam_ParamType(), this.getPrimitiveType(), "paramType", null, 0, 1, PrimitiveParam.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(enumEClass, org.eclipse.vorto.functionblock.Enum.class, "Enum", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getEnum_Enums(), this.getEnumLiteral(), null, "enums", null, 0, -1, org.eclipse.vorto.functionblock.Enum.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(enumLiteralEClass, EnumLiteral.class, "EnumLiteral", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getEnumLiteral_Literal(), ecorePackage.getEString(), "literal", null, 0, 1, EnumLiteral.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(eventEClass, Event.class, "Event", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getEvent_Feature(), this.getFBFeature(), null, "feature", null, 0, 1, Event.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getEvent_Name(), ecorePackage.getEString(), "name", null, 0, 1, Event.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Initialize enums and add enum literals
initEEnum(primitiveTypeEEnum, PrimitiveType.class, "PrimitiveType");
addEEnumLiteral(primitiveTypeEEnum, PrimitiveType.STRING);
addEEnumLiteral(primitiveTypeEEnum, PrimitiveType.INT);
addEEnumLiteral(primitiveTypeEEnum, PrimitiveType.FLOAT);
addEEnumLiteral(primitiveTypeEEnum, PrimitiveType.BOOLEAN);
addEEnumLiteral(primitiveTypeEEnum, PrimitiveType.DATETIME);
addEEnumLiteral(primitiveTypeEEnum, PrimitiveType.DOUBLE);
addEEnumLiteral(primitiveTypeEEnum, PrimitiveType.LONG);
addEEnumLiteral(primitiveTypeEEnum, PrimitiveType.SHORT);
addEEnumLiteral(primitiveTypeEEnum, PrimitiveType.BASE64_BINARY);
addEEnumLiteral(primitiveTypeEEnum, PrimitiveType.BYTE);
initEEnum(constraintIntervalTypeEEnum, ConstraintIntervalType.class, "ConstraintIntervalType");
addEEnumLiteral(constraintIntervalTypeEEnum, ConstraintIntervalType.MIN);
addEEnumLiteral(constraintIntervalTypeEEnum, ConstraintIntervalType.MAX);
addEEnumLiteral(constraintIntervalTypeEEnum, ConstraintIntervalType.STRLEN);
addEEnumLiteral(constraintIntervalTypeEEnum, ConstraintIntervalType.REGEX);
// Create resource
createResource(eNS_URI);
}
} //FunctionblockPackageImpl