/** * CertWare Project * Copyright (c) 2010 National Aeronautics and Space Administration. All rights reserved. */ package net.certware.verification.checklist.impl; import net.certware.verification.checklist.Category; import net.certware.verification.checklist.Checklist; import net.certware.verification.checklist.ChecklistFactory; import net.certware.verification.checklist.ChecklistPackage; import net.certware.verification.checklist.Choices; import net.certware.verification.checklist.Item; 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; /** * <!-- begin-user-doc --> * An implementation of the model <b>Package</b>. * <!-- end-user-doc --> * @generated */ public class ChecklistPackageImpl extends EPackageImpl implements ChecklistPackage { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static final String copyright = "Copyright (c) 2010 National Aeronautics and Space Administration"; //$NON-NLS-1$ /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass categoryEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass itemEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass checklistEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EEnum choicesEEnum = 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 net.certware.verification.checklist.ChecklistPackage#eNS_URI * @see #init() * @generated */ private ChecklistPackageImpl() { super(eNS_URI, ChecklistFactory.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 ChecklistPackage#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 ChecklistPackage init() { if (isInited) return (ChecklistPackage)EPackage.Registry.INSTANCE.getEPackage(ChecklistPackage.eNS_URI); // Obtain or create and register package ChecklistPackageImpl theChecklistPackage = (ChecklistPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ChecklistPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ChecklistPackageImpl()); isInited = true; // Create package meta-data objects theChecklistPackage.createPackageContents(); // Initialize created meta-data theChecklistPackage.initializePackageContents(); // Mark meta-data to indicate it can't be changed theChecklistPackage.freeze(); // Update the registry and return the package EPackage.Registry.INSTANCE.put(ChecklistPackage.eNS_URI, theChecklistPackage); return theChecklistPackage; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getCategory() { return categoryEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getCategory_Name() { return (EAttribute)categoryEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getCategory_Items() { return (EReference)categoryEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getCategory_Comment() { return (EAttribute)categoryEClass.getEStructuralFeatures().get(2); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getItem() { return itemEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getItem_Identifier() { return (EAttribute)itemEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getItem_Description() { return (EAttribute)itemEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getItem_Reference() { return (EAttribute)itemEClass.getEStructuralFeatures().get(2); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getItem_Result() { return (EAttribute)itemEClass.getEStructuralFeatures().get(3); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getItem_Comment() { return (EAttribute)itemEClass.getEStructuralFeatures().get(4); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getChecklist() { return checklistEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getChecklist_Name() { return (EAttribute)checklistEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getChecklist_Version() { return (EAttribute)checklistEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getChecklist_Categories() { return (EReference)checklistEClass.getEStructuralFeatures().get(2); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getChecklist_Comment() { return (EAttribute)checklistEClass.getEStructuralFeatures().get(3); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EEnum getChoices() { return choicesEEnum; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ChecklistFactory getChecklistFactory() { return (ChecklistFactory)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 categoryEClass = createEClass(CATEGORY); createEAttribute(categoryEClass, CATEGORY__NAME); createEReference(categoryEClass, CATEGORY__ITEMS); createEAttribute(categoryEClass, CATEGORY__COMMENT); itemEClass = createEClass(ITEM); createEAttribute(itemEClass, ITEM__IDENTIFIER); createEAttribute(itemEClass, ITEM__DESCRIPTION); createEAttribute(itemEClass, ITEM__REFERENCE); createEAttribute(itemEClass, ITEM__RESULT); createEAttribute(itemEClass, ITEM__COMMENT); checklistEClass = createEClass(CHECKLIST); createEAttribute(checklistEClass, CHECKLIST__NAME); createEAttribute(checklistEClass, CHECKLIST__VERSION); createEReference(checklistEClass, CHECKLIST__CATEGORIES); createEAttribute(checklistEClass, CHECKLIST__COMMENT); // Create enums choicesEEnum = createEEnum(CHOICES); } /** * <!-- 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 // Initialize classes and features; add operations and parameters initEClass(categoryEClass, Category.class, "Category", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ initEAttribute(getCategory_Name(), ecorePackage.getEString(), "name", null, 0, 1, Category.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ initEReference(getCategory_Items(), this.getItem(), null, "items", null, 1, -1, Category.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ initEAttribute(getCategory_Comment(), ecorePackage.getEString(), "comment", null, 0, 1, Category.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ initEClass(itemEClass, Item.class, "Item", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ initEAttribute(getItem_Identifier(), ecorePackage.getEString(), "identifier", "", 0, 1, Item.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$ initEAttribute(getItem_Description(), ecorePackage.getEString(), "description", "", 0, 1, Item.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$ initEAttribute(getItem_Reference(), ecorePackage.getEString(), "reference", null, 0, 1, Item.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ initEAttribute(getItem_Result(), this.getChoices(), "result", "UNKNOWN", 1, 1, Item.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$ initEAttribute(getItem_Comment(), ecorePackage.getEString(), "comment", null, 0, 1, Item.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ initEClass(checklistEClass, Checklist.class, "Checklist", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ initEAttribute(getChecklist_Name(), ecorePackage.getEString(), "name", null, 0, 1, Checklist.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ initEAttribute(getChecklist_Version(), ecorePackage.getEString(), "version", null, 0, 1, Checklist.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ initEReference(getChecklist_Categories(), this.getCategory(), null, "categories", null, 1, -1, Checklist.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ initEAttribute(getChecklist_Comment(), ecorePackage.getEString(), "comment", null, 0, 1, Checklist.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ // Initialize enums and add enum literals initEEnum(choicesEEnum, Choices.class, "Choices"); //$NON-NLS-1$ addEEnumLiteral(choicesEEnum, Choices.UNKNOWN); addEEnumLiteral(choicesEEnum, Choices.NO); addEEnumLiteral(choicesEEnum, Choices.YES); addEEnumLiteral(choicesEEnum, Choices.NOT_APPLICABLE); // Create resource createResource(eNS_URI); } } //ChecklistPackageImpl