/** */ package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl; import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir; import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject; import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.File; import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem; import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemFactory; import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage; import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model; 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; /** * * An implementation of the model Package. * * @generated */ public class FilesystemPackageImpl extends EPackageImpl implements FilesystemPackage { /** * * * @generated */ private EClass fileSystemEClass = null; /** * * * @generated */ private EClass fsObjectEClass = null; /** * * * @generated */ private EClass dirEClass = null; /** * * * @generated */ private EClass fileEClass = null; /** * * * @generated */ private EClass modelEClass = 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 hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage#eNS_URI * @see #init() * @generated */ private FilesystemPackageImpl() { super(eNS_URI, FilesystemFactory.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 FilesystemPackage#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 FilesystemPackage init() { if (isInited) return (FilesystemPackage)EPackage.Registry.INSTANCE.getEPackage(FilesystemPackage.eNS_URI); // Obtain or create and register package Object registeredFilesystemPackage = EPackage.Registry.INSTANCE.get(eNS_URI); FilesystemPackageImpl theFilesystemPackage = registeredFilesystemPackage instanceof FilesystemPackageImpl ? (FilesystemPackageImpl)registeredFilesystemPackage : new FilesystemPackageImpl(); isInited = true; // Create package meta-data objects theFilesystemPackage.createPackageContents(); // Initialize created meta-data theFilesystemPackage.initializePackageContents(); // Mark meta-data to indicate it can't be changed theFilesystemPackage.freeze(); // Update the registry and return the package EPackage.Registry.INSTANCE.put(FilesystemPackage.eNS_URI, theFilesystemPackage); return theFilesystemPackage; } /** * * * @generated */ @Override public EClass getFileSystem() { return fileSystemEClass; } /** * * * @generated */ @Override public EReference getFileSystem_Root() { return (EReference)fileSystemEClass.getEStructuralFeatures().get(0); } /** * * * @generated */ @Override public EReference getFileSystem_Live() { return (EReference)fileSystemEClass.getEStructuralFeatures().get(1); } /** * * * @generated */ @Override public EClass getFSObject() { return fsObjectEClass; } /** * * * @generated */ @Override public EReference getFSObject_Parent() { return (EReference)fsObjectEClass.getEStructuralFeatures().get(0); } /** * * * @generated */ @Override public EClass getDir() { return dirEClass; } /** * * * @generated */ @Override public EReference getDir_Contents() { return (EReference)dirEClass.getEStructuralFeatures().get(0); } /** * * * @generated */ @Override public EClass getFile() { return fileEClass; } /** * * * @generated */ @Override public EClass getModel() { return modelEClass; } /** * * * @generated */ @Override public EReference getModel_Filesystems() { return (EReference)modelEClass.getEStructuralFeatures().get(0); } /** * * * @generated */ @Override public EReference getModel_OtherFSObjects() { return (EReference)modelEClass.getEStructuralFeatures().get(1); } /** * * * @generated */ @Override public FilesystemFactory getFilesystemFactory() { return (FilesystemFactory)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 fileSystemEClass = createEClass(FILE_SYSTEM); createEReference(fileSystemEClass, FILE_SYSTEM__ROOT); createEReference(fileSystemEClass, FILE_SYSTEM__LIVE); fsObjectEClass = createEClass(FS_OBJECT); createEReference(fsObjectEClass, FS_OBJECT__PARENT); dirEClass = createEClass(DIR); createEReference(dirEClass, DIR__CONTENTS); fileEClass = createEClass(FILE); modelEClass = createEClass(MODEL); createEReference(modelEClass, MODEL__FILESYSTEMS); createEReference(modelEClass, MODEL__OTHER_FS_OBJECTS); } /** * * * @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 dirEClass.getESuperTypes().add(this.getFSObject()); fileEClass.getESuperTypes().add(this.getFSObject()); // Initialize classes, features, and operations; add parameters initEClass(fileSystemEClass, FileSystem.class, "FileSystem", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getFileSystem_Root(), this.getFSObject(), null, "root", null, 1, 1, FileSystem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getFileSystem_Live(), this.getFSObject(), null, "live", null, 0, -1, FileSystem.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); initEClass(fsObjectEClass, FSObject.class, "FSObject", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getFSObject_Parent(), this.getDir(), this.getDir_Contents(), "parent", null, 0, 1, FSObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(dirEClass, Dir.class, "Dir", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getDir_Contents(), this.getFSObject(), this.getFSObject_Parent(), "contents", null, 0, -1, Dir.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(fileEClass, File.class, "File", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(modelEClass, Model.class, "Model", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getModel_Filesystems(), this.getFileSystem(), null, "filesystems", null, 1, 1, Model.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getModel_OtherFSObjects(), this.getFSObject(), null, "otherFSObjects", null, 0, -1, Model.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); // Create annotations // http://www.eclipse.org/emf/2002/Ecore createEcoreAnnotations(); // org.eclipse.viatra.query.querybasedfeature createOrgAnnotations(); } /** * Initializes the annotations for http://www.eclipse.org/emf/2002/Ecore. * * * @generated */ protected void createEcoreAnnotations() { String source = "http://www.eclipse.org/emf/2002/Ecore"; addAnnotation (this, source, new String[] { "settingDelegates", "org.eclipse.viatra.query.querybasedfeature" }); } /** * Initializes the annotations for org.eclipse.viatra.query.querybasedfeature. * * * @generated */ protected void createOrgAnnotations() { String source = "org.eclipse.viatra.query.querybasedfeature"; addAnnotation (getFileSystem_Live(), source, new String[] { "patternFQN", "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.live" }); } } //FilesystemPackageImpl