| /******************************************************************************* |
| * CHESS core plugin |
| * |
| * Copyright (C) 2011-2015 |
| * Mälardalen University, Sweden |
| * |
| * |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License |
| * v1.0 which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| *******************************************************************************/ |
| /** |
| */ |
| package org.polarsys.chess.fla.flaxml.impl; |
| |
| import org.eclipse.emf.ecore.EAttribute; |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.EDataType; |
| import org.eclipse.emf.ecore.EEnum; |
| import org.eclipse.emf.ecore.EPackage; |
| import org.eclipse.emf.ecore.EReference; |
| import org.eclipse.emf.ecore.EValidator; |
| import org.eclipse.emf.ecore.impl.EPackageImpl; |
| import org.eclipse.emf.ecore.xml.type.XMLTypePackage; |
| import org.polarsys.chess.fla.flaxml.Component; |
| import org.polarsys.chess.fla.flaxml.Components; |
| import org.polarsys.chess.fla.flaxml.CompositeComponent; |
| import org.polarsys.chess.fla.flaxml.Connection; |
| import org.polarsys.chess.fla.flaxml.Connections; |
| import org.polarsys.chess.fla.flaxml.DocumentRoot; |
| import org.polarsys.chess.fla.flaxml.Failure; |
| import org.polarsys.chess.fla.flaxml.FailureType; |
| import org.polarsys.chess.fla.flaxml.FlaxmlFactory; |
| import org.polarsys.chess.fla.flaxml.FlaxmlPackage; |
| import org.polarsys.chess.fla.flaxml.FptcRules; |
| import org.polarsys.chess.fla.flaxml.InputPort; |
| import org.polarsys.chess.fla.flaxml.InputPorts; |
| import org.polarsys.chess.fla.flaxml.NamedElement; |
| import org.polarsys.chess.fla.flaxml.OutputPort; |
| import org.polarsys.chess.fla.flaxml.OutputPorts; |
| import org.polarsys.chess.fla.flaxml.RuleString; |
| import org.polarsys.chess.fla.flaxml.SimpleComponent; |
| import org.polarsys.chess.fla.flaxml.util.FlaxmlValidator; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Package</b>. |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class FlaxmlPackageImpl extends EPackageImpl implements FlaxmlPackage { |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass componentEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass componentsEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass compositeComponentEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass connectionEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass connectionsEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass documentRootEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass failureEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass fptcRulesEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass inputPortEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass inputPortsEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass namedElementEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass outputPortEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass outputPortsEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass ruleStringEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass simpleComponentEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass systemEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EEnum failureTypeEEnum = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EDataType failureTypeObjectEDataType = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EDataType patternTypeEDataType = 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.polarsys.chess.fla.flaxml.FlaxmlPackage#eNS_URI |
| * @see #init() |
| * @generated |
| */ |
| private FlaxmlPackageImpl() { |
| super(eNS_URI, FlaxmlFactory.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 FlaxmlPackage#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 FlaxmlPackage init() { |
| if (isInited) return (FlaxmlPackage)EPackage.Registry.INSTANCE.getEPackage(FlaxmlPackage.eNS_URI); |
| |
| // Obtain or create and register package |
| FlaxmlPackageImpl theFlaxmlPackage = (FlaxmlPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof FlaxmlPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new FlaxmlPackageImpl()); |
| |
| isInited = true; |
| |
| // Initialize simple dependencies |
| XMLTypePackage.eINSTANCE.eClass(); |
| |
| // Create package meta-data objects |
| theFlaxmlPackage.createPackageContents(); |
| |
| // Initialize created meta-data |
| theFlaxmlPackage.initializePackageContents(); |
| |
| // Register package validator |
| EValidator.Registry.INSTANCE.put |
| (theFlaxmlPackage, |
| new EValidator.Descriptor() { |
| public EValidator getEValidator() { |
| return FlaxmlValidator.INSTANCE; |
| } |
| }); |
| |
| // Mark meta-data to indicate it can't be changed |
| theFlaxmlPackage.freeze(); |
| |
| |
| // Update the registry and return the package |
| EPackage.Registry.INSTANCE.put(FlaxmlPackage.eNS_URI, theFlaxmlPackage); |
| return theFlaxmlPackage; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getComponent() { |
| return componentEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getComponent_InputPorts() { |
| return (EReference)componentEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getComponent_OutputPorts() { |
| return (EReference)componentEClass.getEStructuralFeatures().get(1); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getComponents() { |
| return componentsEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getComponents_Component() { |
| return (EReference)componentsEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getCompositeComponent() { |
| return compositeComponentEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getCompositeComponent_Connections() { |
| return (EReference)compositeComponentEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getCompositeComponent_Components() { |
| return (EReference)compositeComponentEClass.getEStructuralFeatures().get(1); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getConnection() { |
| return connectionEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EAttribute getConnection_SourceComponent() { |
| return (EAttribute)connectionEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EAttribute getConnection_SourceId() { |
| return (EAttribute)connectionEClass.getEStructuralFeatures().get(1); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EAttribute getConnection_TargetComponent() { |
| return (EAttribute)connectionEClass.getEStructuralFeatures().get(2); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EAttribute getConnection_TargetId() { |
| return (EAttribute)connectionEClass.getEStructuralFeatures().get(3); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getConnection_Rules() { |
| return (EReference)connectionEClass.getEStructuralFeatures().get(4); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getConnections() { |
| return connectionsEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getConnections_Connection() { |
| return (EReference)connectionsEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getDocumentRoot() { |
| return documentRootEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EAttribute getDocumentRoot_Mixed() { |
| return (EAttribute)documentRootEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getDocumentRoot_XMLNSPrefixMap() { |
| return (EReference)documentRootEClass.getEStructuralFeatures().get(1); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getDocumentRoot_XSISchemaLocation() { |
| return (EReference)documentRootEClass.getEStructuralFeatures().get(2); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getDocumentRoot_System() { |
| return (EReference)documentRootEClass.getEStructuralFeatures().get(3); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getFailure() { |
| return failureEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EAttribute getFailure_Type() { |
| return (EAttribute)failureEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getFptcRules() { |
| return fptcRulesEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getFptcRules_Rule() { |
| return (EReference)fptcRulesEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getInputPort() { |
| return inputPortEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getInputPort_InputFailure() { |
| return (EReference)inputPortEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getInputPorts() { |
| return inputPortsEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getInputPorts_InputPort() { |
| return (EReference)inputPortsEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getNamedElement() { |
| return namedElementEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EAttribute getNamedElement_Id() { |
| return (EAttribute)namedElementEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EAttribute getNamedElement_Name() { |
| return (EAttribute)namedElementEClass.getEStructuralFeatures().get(1); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getOutputPort() { |
| return outputPortEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getOutputPort_OutputFailure() { |
| return (EReference)outputPortEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getOutputPorts() { |
| return outputPortsEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getOutputPorts_OutputPort() { |
| return (EReference)outputPortsEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getRuleString() { |
| return ruleStringEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EAttribute getRuleString_Pattern() { |
| return (EAttribute)ruleStringEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getSimpleComponent() { |
| return simpleComponentEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getSimpleComponent_Rules() { |
| return (EReference)simpleComponentEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getSystem() { |
| return systemEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getSystem_Component() { |
| return (EReference)systemEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EEnum getFailureType() { |
| return failureTypeEEnum; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EDataType getFailureTypeObject() { |
| return failureTypeObjectEDataType; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EDataType getPatternType() { |
| return patternTypeEDataType; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public FlaxmlFactory getFlaxmlFactory() { |
| return (FlaxmlFactory)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 |
| componentEClass = createEClass(COMPONENT); |
| createEReference(componentEClass, COMPONENT__INPUT_PORTS); |
| createEReference(componentEClass, COMPONENT__OUTPUT_PORTS); |
| |
| componentsEClass = createEClass(COMPONENTS); |
| createEReference(componentsEClass, COMPONENTS__COMPONENT); |
| |
| compositeComponentEClass = createEClass(COMPOSITE_COMPONENT); |
| createEReference(compositeComponentEClass, COMPOSITE_COMPONENT__CONNECTIONS); |
| createEReference(compositeComponentEClass, COMPOSITE_COMPONENT__COMPONENTS); |
| |
| connectionEClass = createEClass(CONNECTION); |
| createEAttribute(connectionEClass, CONNECTION__SOURCE_COMPONENT); |
| createEAttribute(connectionEClass, CONNECTION__SOURCE_ID); |
| createEAttribute(connectionEClass, CONNECTION__TARGET_COMPONENT); |
| createEAttribute(connectionEClass, CONNECTION__TARGET_ID); |
| createEReference(connectionEClass, CONNECTION__RULES); |
| |
| connectionsEClass = createEClass(CONNECTIONS); |
| createEReference(connectionsEClass, CONNECTIONS__CONNECTION); |
| |
| documentRootEClass = createEClass(DOCUMENT_ROOT); |
| createEAttribute(documentRootEClass, DOCUMENT_ROOT__MIXED); |
| createEReference(documentRootEClass, DOCUMENT_ROOT__XMLNS_PREFIX_MAP); |
| createEReference(documentRootEClass, DOCUMENT_ROOT__XSI_SCHEMA_LOCATION); |
| createEReference(documentRootEClass, DOCUMENT_ROOT__SYSTEM); |
| |
| failureEClass = createEClass(FAILURE); |
| createEAttribute(failureEClass, FAILURE__TYPE); |
| |
| fptcRulesEClass = createEClass(FPTC_RULES); |
| createEReference(fptcRulesEClass, FPTC_RULES__RULE); |
| |
| inputPortEClass = createEClass(INPUT_PORT); |
| createEReference(inputPortEClass, INPUT_PORT__INPUT_FAILURE); |
| |
| inputPortsEClass = createEClass(INPUT_PORTS); |
| createEReference(inputPortsEClass, INPUT_PORTS__INPUT_PORT); |
| |
| namedElementEClass = createEClass(NAMED_ELEMENT); |
| createEAttribute(namedElementEClass, NAMED_ELEMENT__ID); |
| createEAttribute(namedElementEClass, NAMED_ELEMENT__NAME); |
| |
| outputPortEClass = createEClass(OUTPUT_PORT); |
| createEReference(outputPortEClass, OUTPUT_PORT__OUTPUT_FAILURE); |
| |
| outputPortsEClass = createEClass(OUTPUT_PORTS); |
| createEReference(outputPortsEClass, OUTPUT_PORTS__OUTPUT_PORT); |
| |
| ruleStringEClass = createEClass(RULE_STRING); |
| createEAttribute(ruleStringEClass, RULE_STRING__PATTERN); |
| |
| simpleComponentEClass = createEClass(SIMPLE_COMPONENT); |
| createEReference(simpleComponentEClass, SIMPLE_COMPONENT__RULES); |
| |
| systemEClass = createEClass(SYSTEM); |
| createEReference(systemEClass, SYSTEM__COMPONENT); |
| |
| // Create enums |
| failureTypeEEnum = createEEnum(FAILURE_TYPE); |
| |
| // Create data types |
| failureTypeObjectEDataType = createEDataType(FAILURE_TYPE_OBJECT); |
| patternTypeEDataType = createEDataType(PATTERN_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); |
| |
| // Obtain other dependent packages |
| XMLTypePackage theXMLTypePackage = (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI); |
| |
| // Create type parameters |
| |
| // Set bounds for type parameters |
| |
| // Add supertypes to classes |
| componentEClass.getESuperTypes().add(this.getNamedElement()); |
| compositeComponentEClass.getESuperTypes().add(this.getComponent()); |
| inputPortEClass.getESuperTypes().add(this.getNamedElement()); |
| outputPortEClass.getESuperTypes().add(this.getNamedElement()); |
| simpleComponentEClass.getESuperTypes().add(this.getComponent()); |
| |
| // Initialize classes, features, and operations; add parameters |
| initEClass(componentEClass, Component.class, "Component", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEReference(getComponent_InputPorts(), this.getInputPorts(), null, "inputPorts", null, 1, 1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| initEReference(getComponent_OutputPorts(), this.getOutputPorts(), null, "outputPorts", null, 1, 1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(componentsEClass, Components.class, "Components", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEReference(getComponents_Component(), this.getComponent(), null, "component", null, 1, -1, Components.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(compositeComponentEClass, CompositeComponent.class, "CompositeComponent", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEReference(getCompositeComponent_Connections(), this.getConnections(), null, "connections", null, 1, 1, CompositeComponent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| initEReference(getCompositeComponent_Components(), this.getComponents(), null, "components", null, 1, 1, CompositeComponent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(connectionEClass, Connection.class, "Connection", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEAttribute(getConnection_SourceComponent(), theXMLTypePackage.getString(), "sourceComponent", null, 0, 1, Connection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| initEAttribute(getConnection_SourceId(), theXMLTypePackage.getString(), "sourceId", null, 1, 1, Connection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| initEAttribute(getConnection_TargetComponent(), theXMLTypePackage.getString(), "targetComponent", null, 0, 1, Connection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| initEAttribute(getConnection_TargetId(), theXMLTypePackage.getString(), "targetId", null, 1, 1, Connection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| initEReference(getConnection_Rules(), this.getFptcRules(), null, "rules", null, 0, 1, Connection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(connectionsEClass, Connections.class, "Connections", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEReference(getConnections_Connection(), this.getConnection(), null, "connection", null, 1, -1, Connections.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(documentRootEClass, DocumentRoot.class, "DocumentRoot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEAttribute(getDocumentRoot_Mixed(), ecorePackage.getEFeatureMapEntry(), "mixed", null, 0, -1, null, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| initEReference(getDocumentRoot_XMLNSPrefixMap(), ecorePackage.getEStringToStringMapEntry(), null, "xMLNSPrefixMap", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| initEReference(getDocumentRoot_XSISchemaLocation(), ecorePackage.getEStringToStringMapEntry(), null, "xSISchemaLocation", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| initEReference(getDocumentRoot_System(), this.getSystem(), null, "system", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); |
| |
| initEClass(failureEClass, Failure.class, "Failure", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEAttribute(getFailure_Type(), this.getFailureType(), "type", null, 1, 1, Failure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(fptcRulesEClass, FptcRules.class, "FptcRules", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEReference(getFptcRules_Rule(), this.getRuleString(), null, "rule", null, 1, -1, FptcRules.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(inputPortEClass, InputPort.class, "InputPort", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEReference(getInputPort_InputFailure(), this.getFailure(), null, "inputFailure", null, 0, -1, InputPort.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(inputPortsEClass, InputPorts.class, "InputPorts", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEReference(getInputPorts_InputPort(), this.getInputPort(), null, "inputPort", null, 0, -1, InputPorts.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(namedElementEClass, NamedElement.class, "NamedElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEAttribute(getNamedElement_Id(), theXMLTypePackage.getString(), "id", null, 1, 1, NamedElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| initEAttribute(getNamedElement_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, NamedElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(outputPortEClass, OutputPort.class, "OutputPort", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEReference(getOutputPort_OutputFailure(), this.getFailure(), null, "outputFailure", null, 0, -1, OutputPort.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(outputPortsEClass, OutputPorts.class, "OutputPorts", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEReference(getOutputPorts_OutputPort(), this.getOutputPort(), null, "outputPort", null, 0, -1, OutputPorts.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(ruleStringEClass, RuleString.class, "RuleString", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEAttribute(getRuleString_Pattern(), this.getPatternType(), "pattern", null, 1, 1, RuleString.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(simpleComponentEClass, SimpleComponent.class, "SimpleComponent", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEReference(getSimpleComponent_Rules(), this.getFptcRules(), null, "rules", null, 1, 1, SimpleComponent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(systemEClass, org.polarsys.chess.fla.flaxml.System.class, "System", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEReference(getSystem_Component(), this.getComponent(), null, "component", null, 0, 1, org.polarsys.chess.fla.flaxml.System.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| // Initialize enums and add enum literals |
| initEEnum(failureTypeEEnum, FailureType.class, "FailureType"); |
| addEEnumLiteral(failureTypeEEnum, FailureType.NO_FAILURE); |
| addEEnumLiteral(failureTypeEEnum, FailureType.LATE); |
| addEEnumLiteral(failureTypeEEnum, FailureType.EARLY); |
| addEEnumLiteral(failureTypeEEnum, FailureType.VALUE_SUBTLE); |
| addEEnumLiteral(failureTypeEEnum, FailureType.VALUE_COARSE); |
| addEEnumLiteral(failureTypeEEnum, FailureType.OMISSION); |
| addEEnumLiteral(failureTypeEEnum, FailureType.COMMISSION); |
| |
| // Initialize data types |
| initEDataType(failureTypeObjectEDataType, FailureType.class, "FailureTypeObject", IS_SERIALIZABLE, IS_GENERATED_INSTANCE_CLASS); |
| initEDataType(patternTypeEDataType, String.class, "PatternType", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); |
| |
| // Create resource |
| createResource(eNS_URI); |
| |
| // Create annotations |
| // http:///org/eclipse/emf/ecore/util/ExtendedMetaData |
| createExtendedMetaDataAnnotations(); |
| } |
| |
| /** |
| * Initializes the annotations for <b>http:///org/eclipse/emf/ecore/util/ExtendedMetaData</b>. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void createExtendedMetaDataAnnotations() { |
| String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; |
| addAnnotation |
| (componentEClass, |
| source, |
| new String[] { |
| "name", "component", |
| "kind", "empty" |
| }); |
| addAnnotation |
| (getComponent_InputPorts(), |
| source, |
| new String[] { |
| "kind", "element", |
| "name", "inputPorts", |
| "namespace", "##targetNamespace" |
| }); |
| addAnnotation |
| (getComponent_OutputPorts(), |
| source, |
| new String[] { |
| "kind", "element", |
| "name", "outputPorts", |
| "namespace", "##targetNamespace" |
| }); |
| addAnnotation |
| (componentsEClass, |
| source, |
| new String[] { |
| "name", "components", |
| "kind", "elementOnly" |
| }); |
| addAnnotation |
| (getComponents_Component(), |
| source, |
| new String[] { |
| "kind", "element", |
| "name", "component", |
| "namespace", "##targetNamespace" |
| }); |
| addAnnotation |
| (compositeComponentEClass, |
| source, |
| new String[] { |
| "name", "compositeComponent", |
| "kind", "elementOnly" |
| }); |
| addAnnotation |
| (getCompositeComponent_Connections(), |
| source, |
| new String[] { |
| "kind", "element", |
| "name", "connections", |
| "namespace", "##targetNamespace" |
| }); |
| addAnnotation |
| (getCompositeComponent_Components(), |
| source, |
| new String[] { |
| "kind", "element", |
| "name", "components", |
| "namespace", "##targetNamespace" |
| }); |
| addAnnotation |
| (connectionEClass, |
| source, |
| new String[] { |
| "name", "connection", |
| "kind", "empty" |
| }); |
| addAnnotation |
| (getConnection_SourceComponent(), |
| source, |
| new String[] { |
| "kind", "attribute", |
| "name", "sourceComponent" |
| }); |
| addAnnotation |
| (getConnection_SourceId(), |
| source, |
| new String[] { |
| "kind", "attribute", |
| "name", "sourceId" |
| }); |
| addAnnotation |
| (getConnection_TargetComponent(), |
| source, |
| new String[] { |
| "kind", "attribute", |
| "name", "targetComponent" |
| }); |
| addAnnotation |
| (getConnection_TargetId(), |
| source, |
| new String[] { |
| "kind", "attribute", |
| "name", "targetId" |
| }); |
| addAnnotation |
| (connectionsEClass, |
| source, |
| new String[] { |
| "name", "connections", |
| "kind", "elementOnly" |
| }); |
| addAnnotation |
| (getConnections_Connection(), |
| source, |
| new String[] { |
| "kind", "element", |
| "name", "connection", |
| "namespace", "##targetNamespace" |
| }); |
| addAnnotation |
| (documentRootEClass, |
| source, |
| new String[] { |
| "name", "", |
| "kind", "mixed" |
| }); |
| addAnnotation |
| (getDocumentRoot_Mixed(), |
| source, |
| new String[] { |
| "kind", "elementWildcard", |
| "name", ":mixed" |
| }); |
| addAnnotation |
| (getDocumentRoot_XMLNSPrefixMap(), |
| source, |
| new String[] { |
| "kind", "attribute", |
| "name", "xmlns:prefix" |
| }); |
| addAnnotation |
| (getDocumentRoot_XSISchemaLocation(), |
| source, |
| new String[] { |
| "kind", "attribute", |
| "name", "xsi:schemaLocation" |
| }); |
| addAnnotation |
| (getDocumentRoot_System(), |
| source, |
| new String[] { |
| "kind", "element", |
| "name", "system", |
| "namespace", "##targetNamespace" |
| }); |
| addAnnotation |
| (failureEClass, |
| source, |
| new String[] { |
| "name", "failure", |
| "kind", "empty" |
| }); |
| addAnnotation |
| (getFailure_Type(), |
| source, |
| new String[] { |
| "kind", "attribute", |
| "name", "type" |
| }); |
| addAnnotation |
| (failureTypeEEnum, |
| source, |
| new String[] { |
| "name", "failureType" |
| }); |
| addAnnotation |
| (failureTypeObjectEDataType, |
| source, |
| new String[] { |
| "name", "failureType:Object", |
| "baseType", "failureType" |
| }); |
| addAnnotation |
| (fptcRulesEClass, |
| source, |
| new String[] { |
| "name", "fptcRules", |
| "kind", "elementOnly" |
| }); |
| addAnnotation |
| (getFptcRules_Rule(), |
| source, |
| new String[] { |
| "kind", "element", |
| "name", "rule", |
| "namespace", "##targetNamespace" |
| }); |
| addAnnotation |
| (inputPortEClass, |
| source, |
| new String[] { |
| "name", "inputPort", |
| "kind", "elementOnly" |
| }); |
| addAnnotation |
| (getInputPort_InputFailure(), |
| source, |
| new String[] { |
| "kind", "element", |
| "name", "inputFailure", |
| "namespace", "##targetNamespace" |
| }); |
| addAnnotation |
| (inputPortsEClass, |
| source, |
| new String[] { |
| "name", "inputPorts", |
| "kind", "elementOnly" |
| }); |
| addAnnotation |
| (getInputPorts_InputPort(), |
| source, |
| new String[] { |
| "kind", "element", |
| "name", "inputPort", |
| "namespace", "##targetNamespace" |
| }); |
| addAnnotation |
| (namedElementEClass, |
| source, |
| new String[] { |
| "name", "namedElement", |
| "kind", "empty" |
| }); |
| addAnnotation |
| (getNamedElement_Id(), |
| source, |
| new String[] { |
| "kind", "attribute", |
| "name", "id" |
| }); |
| addAnnotation |
| (getNamedElement_Name(), |
| source, |
| new String[] { |
| "kind", "attribute", |
| "name", "name" |
| }); |
| addAnnotation |
| (outputPortEClass, |
| source, |
| new String[] { |
| "name", "outputPort", |
| "kind", "elementOnly" |
| }); |
| addAnnotation |
| (outputPortsEClass, |
| source, |
| new String[] { |
| "name", "outputPorts", |
| "kind", "elementOnly" |
| }); |
| addAnnotation |
| (getOutputPorts_OutputPort(), |
| source, |
| new String[] { |
| "kind", "element", |
| "name", "outputPort", |
| "namespace", "##targetNamespace" |
| }); |
| addAnnotation |
| (patternTypeEDataType, |
| source, |
| new String[] { |
| "name", "pattern_._type", |
| "baseType", "http://www.eclipse.org/emf/2003/XMLType#string", |
| "pattern", "[^>]+\\.[^>]+->[^>]+\\.[^>]+" |
| }); |
| addAnnotation |
| (ruleStringEClass, |
| source, |
| new String[] { |
| "name", "ruleString", |
| "kind", "empty" |
| }); |
| addAnnotation |
| (getRuleString_Pattern(), |
| source, |
| new String[] { |
| "kind", "attribute", |
| "name", "pattern" |
| }); |
| addAnnotation |
| (simpleComponentEClass, |
| source, |
| new String[] { |
| "name", "simpleComponent", |
| "kind", "elementOnly" |
| }); |
| addAnnotation |
| (getSimpleComponent_Rules(), |
| source, |
| new String[] { |
| "kind", "element", |
| "name", "rules", |
| "namespace", "##targetNamespace" |
| }); |
| addAnnotation |
| (systemEClass, |
| source, |
| new String[] { |
| "name", "system", |
| "kind", "elementOnly" |
| }); |
| addAnnotation |
| (getSystem_Component(), |
| source, |
| new String[] { |
| "kind", "element", |
| "name", "component", |
| "namespace", "##targetNamespace" |
| }); |
| } |
| |
| } //FlaxmlPackageImpl |