/** */ package org.opendaylight.nemo.tool.eclipse.plugin.editor.impl; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.impl.EPackageImpl; import org.opendaylight.nemo.tool.eclipse.plugin.editor.Connection; import org.opendaylight.nemo.tool.eclipse.plugin.editor.ConnectionUpdate; import org.opendaylight.nemo.tool.eclipse.plugin.editor.EditorFactory; import org.opendaylight.nemo.tool.eclipse.plugin.editor.EditorPackage; import org.opendaylight.nemo.tool.eclipse.plugin.editor.Flow; import org.opendaylight.nemo.tool.eclipse.plugin.editor.FlowUpdate; import org.opendaylight.nemo.tool.eclipse.plugin.editor.Model; import org.opendaylight.nemo.tool.eclipse.plugin.editor.Node; import org.opendaylight.nemo.tool.eclipse.plugin.editor.NodeModel; import org.opendaylight.nemo.tool.eclipse.plugin.editor.NodeOperating; import org.opendaylight.nemo.tool.eclipse.plugin.editor.Operation; import org.opendaylight.nemo.tool.eclipse.plugin.editor.Sentence; /** * * An implementation of the model Package. * * @generated */ public class EditorPackageImpl extends EPackageImpl implements EditorPackage { /** * * * @generated */ private EClass modelEClass = null; /** * * * @generated */ private EClass sentenceEClass = null; /** * * * @generated */ private EClass nodeEClass = null; /** * * * @generated */ private EClass nodeModelEClass = null; /** * * * @generated */ private EClass nodeOperatingEClass = null; /** * * * @generated */ private EClass connectionEClass = null; /** * * * @generated */ private EClass connectionUpdateEClass = null; /** * * * @generated */ private EClass flowEClass = null; /** * * * @generated */ private EClass flowUpdateEClass = null; /** * * * @generated */ private EClass operationEClass = null; /** * Creates an instance of the model Package, registered with * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package * package URI value. *

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. * * * @see org.eclipse.emf.ecore.EPackage.Registry * @see org.opendaylight.nemo.tool.eclipse.plugin.editor.EditorPackage#eNS_URI * @see #init() * @generated */ private EditorPackageImpl() { super(eNS_URI, EditorFactory.eINSTANCE); } /** * * * @generated */ private static boolean isInited = false; /** * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. * *

This method is used to initialize {@link EditorPackage#eINSTANCE} when that field is accessed. * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. * * * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() * @generated */ public static EditorPackage init() { if (isInited) return (EditorPackage)EPackage.Registry.INSTANCE.getEPackage(EditorPackage.eNS_URI); // Obtain or create and register package EditorPackageImpl theEditorPackage = (EditorPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof EditorPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new EditorPackageImpl()); isInited = true; // Create package meta-data objects theEditorPackage.createPackageContents(); // Initialize created meta-data theEditorPackage.initializePackageContents(); // Mark meta-data to indicate it can't be changed theEditorPackage.freeze(); // Update the registry and return the package EPackage.Registry.INSTANCE.put(EditorPackage.eNS_URI, theEditorPackage); return theEditorPackage; } /** * * * @generated */ public EClass getModel() { return modelEClass; } /** * * * @generated */ public EReference getModel_Sentences() { return (EReference)modelEClass.getEStructuralFeatures().get(0); } /** * * * @generated */ public EClass getSentence() { return sentenceEClass; } /** * * * @generated */ public EClass getNode() { return nodeEClass; } /** * * * @generated */ public EAttribute getNode_Name() { return (EAttribute)nodeEClass.getEStructuralFeatures().get(0); } /** * * * @generated */ public EReference getNode_Nodes() { return (EReference)nodeEClass.getEStructuralFeatures().get(1); } /** * * * @generated */ public EClass getNodeModel() { return nodeModelEClass; } /** * * * @generated */ public EAttribute getNodeModel_Name() { return (EAttribute)nodeModelEClass.getEStructuralFeatures().get(0); } /** * * * @generated */ public EClass getNodeOperating() { return nodeOperatingEClass; } /** * * * @generated */ public EReference getNodeOperating_Nodename() { return (EReference)nodeOperatingEClass.getEStructuralFeatures().get(0); } /** * * * @generated */ public EReference getNodeOperating_Nodes() { return (EReference)nodeOperatingEClass.getEStructuralFeatures().get(1); } /** * * * @generated */ public EClass getConnection() { return connectionEClass; } /** * * * @generated */ public EAttribute getConnection_Name() { return (EAttribute)connectionEClass.getEStructuralFeatures().get(0); } /** * * * @generated */ public EReference getConnection_Endnode() { return (EReference)connectionEClass.getEStructuralFeatures().get(1); } /** * * * @generated */ public EClass getConnectionUpdate() { return connectionUpdateEClass; } /** * * * @generated */ public EReference getConnectionUpdate_Connectionname() { return (EReference)connectionUpdateEClass.getEStructuralFeatures().get(0); } /** * * * @generated */ public EReference getConnectionUpdate_Endnode() { return (EReference)connectionUpdateEClass.getEStructuralFeatures().get(1); } /** * * * @generated */ public EClass getFlow() { return flowEClass; } /** * * * @generated */ public EAttribute getFlow_Name() { return (EAttribute)flowEClass.getEStructuralFeatures().get(0); } /** * * * @generated */ public EClass getFlowUpdate() { return flowUpdateEClass; } /** * * * @generated */ public EReference getFlowUpdate_FlowId() { return (EReference)flowUpdateEClass.getEStructuralFeatures().get(0); } /** * * * @generated */ public EClass getOperation() { return operationEClass; } /** * * * @generated */ public EAttribute getOperation_Name() { return (EAttribute)operationEClass.getEStructuralFeatures().get(0); } /** * * * @generated */ public EAttribute getOperation_Value() { return (EAttribute)operationEClass.getEStructuralFeatures().get(1); } /** * * * @generated */ public EReference getOperation_TargetId() { return (EReference)operationEClass.getEStructuralFeatures().get(2); } /** * * * @generated */ public EReference getOperation_TargetNode() { return (EReference)operationEClass.getEStructuralFeatures().get(3); } /** * * * @generated */ public EditorFactory getEditorFactory() { return (EditorFactory)getEFactoryInstance(); } /** * * * @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. * * * @generated */ public void createPackageContents() { if (isCreated) return; isCreated = true; // Create classes and their features modelEClass = createEClass(MODEL); createEReference(modelEClass, MODEL__SENTENCES); sentenceEClass = createEClass(SENTENCE); nodeEClass = createEClass(NODE); createEAttribute(nodeEClass, NODE__NAME); createEReference(nodeEClass, NODE__NODES); nodeModelEClass = createEClass(NODE_MODEL); createEAttribute(nodeModelEClass, NODE_MODEL__NAME); nodeOperatingEClass = createEClass(NODE_OPERATING); createEReference(nodeOperatingEClass, NODE_OPERATING__NODENAME); createEReference(nodeOperatingEClass, NODE_OPERATING__NODES); connectionEClass = createEClass(CONNECTION); createEAttribute(connectionEClass, CONNECTION__NAME); createEReference(connectionEClass, CONNECTION__ENDNODE); connectionUpdateEClass = createEClass(CONNECTION_UPDATE); createEReference(connectionUpdateEClass, CONNECTION_UPDATE__CONNECTIONNAME); createEReference(connectionUpdateEClass, CONNECTION_UPDATE__ENDNODE); flowEClass = createEClass(FLOW); createEAttribute(flowEClass, FLOW__NAME); flowUpdateEClass = createEClass(FLOW_UPDATE); createEReference(flowUpdateEClass, FLOW_UPDATE__FLOW_ID); operationEClass = createEClass(OPERATION); createEAttribute(operationEClass, OPERATION__NAME); createEAttribute(operationEClass, OPERATION__VALUE); createEReference(operationEClass, OPERATION__TARGET_ID); createEReference(operationEClass, OPERATION__TARGET_NODE); } /** * * * @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. * * * @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 nodeEClass.getESuperTypes().add(this.getSentence()); nodeOperatingEClass.getESuperTypes().add(this.getSentence()); connectionEClass.getESuperTypes().add(this.getSentence()); connectionUpdateEClass.getESuperTypes().add(this.getSentence()); flowEClass.getESuperTypes().add(this.getSentence()); flowUpdateEClass.getESuperTypes().add(this.getSentence()); operationEClass.getESuperTypes().add(this.getSentence()); // Initialize classes and features; add operations and parameters initEClass(modelEClass, Model.class, "Model", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getModel_Sentences(), this.getSentence(), null, "sentences", null, 0, -1, Model.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(sentenceEClass, Sentence.class, "Sentence", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(nodeEClass, Node.class, "Node", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getNode_Name(), ecorePackage.getEString(), "name", null, 0, 1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getNode_Nodes(), this.getNode(), null, "nodes", null, 0, -1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(nodeModelEClass, NodeModel.class, "NodeModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getNodeModel_Name(), ecorePackage.getEString(), "name", null, 0, 1, NodeModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(nodeOperatingEClass, NodeOperating.class, "NodeOperating", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getNodeOperating_Nodename(), this.getNode(), null, "nodename", null, 0, -1, NodeOperating.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getNodeOperating_Nodes(), this.getNode(), null, "nodes", null, 0, -1, NodeOperating.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_Name(), ecorePackage.getEString(), "name", null, 0, 1, Connection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getConnection_Endnode(), this.getNode(), null, "endnode", 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(connectionUpdateEClass, ConnectionUpdate.class, "ConnectionUpdate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getConnectionUpdate_Connectionname(), this.getConnection(), null, "connectionname", null, 0, -1, ConnectionUpdate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getConnectionUpdate_Endnode(), this.getNode(), null, "endnode", null, 0, -1, ConnectionUpdate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(flowEClass, Flow.class, "Flow", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getFlow_Name(), ecorePackage.getEString(), "name", null, 0, 1, Flow.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(flowUpdateEClass, FlowUpdate.class, "FlowUpdate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getFlowUpdate_FlowId(), this.getFlow(), null, "flowId", null, 0, -1, FlowUpdate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(operationEClass, Operation.class, "Operation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getOperation_Name(), ecorePackage.getEString(), "name", null, 0, 1, Operation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getOperation_Value(), ecorePackage.getEInt(), "value", null, 0, -1, Operation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getOperation_TargetId(), this.getFlow(), null, "targetId", 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_TargetNode(), this.getNode(), null, "targetNode", null, 0, 1, Operation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); // Create resource createResource(eNS_URI); } } //EditorPackageImpl