diff options
Diffstat (limited to 'examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/detach/detachfeaturemap/impl/DetachfeaturemapPackageImpl.java')
-rw-r--r-- | examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/detach/detachfeaturemap/impl/DetachfeaturemapPackageImpl.java | 393 |
1 files changed, 0 insertions, 393 deletions
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/detach/detachfeaturemap/impl/DetachfeaturemapPackageImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/detach/detachfeaturemap/impl/DetachfeaturemapPackageImpl.java deleted file mode 100644 index 3b06a762a..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/detach/detachfeaturemap/impl/DetachfeaturemapPackageImpl.java +++ /dev/null @@ -1,393 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: DetachfeaturemapPackageImpl.java,v 1.1 2006/07/11 16:57:06 mtaal Exp $ - */ -package org.eclipse.emf.teneo.samples.emf.detach.detachfeaturemap.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.eclipse.emf.ecore.xml.type.XMLTypePackage; - -import org.eclipse.emf.ecore.xml.type.impl.XMLTypePackageImpl; - -import org.eclipse.emf.teneo.samples.emf.detach.detachfeaturemap.Contacts; -import org.eclipse.emf.teneo.samples.emf.detach.detachfeaturemap.DetachfeaturemapFactory; -import org.eclipse.emf.teneo.samples.emf.detach.detachfeaturemap.DetachfeaturemapPackage; -import org.eclipse.emf.teneo.samples.emf.detach.detachfeaturemap.Person; -import org.eclipse.emf.teneo.samples.emf.detach.detachfeaturemap.SpecialPerson; - - -/** - * <!-- begin-user-doc --> - * An implementation of the model <b>Package</b>. - * <!-- end-user-doc --> - * @generated - */ -public class DetachfeaturemapPackageImpl extends EPackageImpl implements DetachfeaturemapPackage { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass contactsEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass personEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass specialPersonEClass = 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.emf.teneo.samples.emf.detach.detachfeaturemap.DetachfeaturemapPackage#eNS_URI - * @see #init() - * @generated - */ - private DetachfeaturemapPackageImpl() { - super(eNS_URI, DetachfeaturemapFactory.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. Simple - * dependencies are satisfied by calling this method on all - * dependent packages before doing anything else. This method drives - * initialization for interdependent packages directly, in parallel - * with this package, itself. - * <p>Of this package and its interdependencies, all packages which - * have not yet been registered by their URI values are first created - * and registered. The packages are then initialized in two steps: - * meta-model objects for all of the packages are created before any - * are initialized, since one package's meta-model objects may refer to - * those of another. - * <p>Invocation of this method will not affect any packages that have - * already been initialized. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static DetachfeaturemapPackage init() { - if (isInited) return (DetachfeaturemapPackage)EPackage.Registry.INSTANCE.getEPackage(DetachfeaturemapPackage.eNS_URI); - - // Obtain or create and register package - DetachfeaturemapPackageImpl theDetachfeaturemapPackage = (DetachfeaturemapPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof DetachfeaturemapPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new DetachfeaturemapPackageImpl()); - - isInited = true; - - // Initialize simple dependencies - XMLTypePackageImpl.init(); - - // Create package meta-data objects - theDetachfeaturemapPackage.createPackageContents(); - - // Initialize created meta-data - theDetachfeaturemapPackage.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theDetachfeaturemapPackage.freeze(); - - return theDetachfeaturemapPackage; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getContacts() { - return contactsEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getContacts_Persons() { - return (EReference)contactsEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getPerson() { - return personEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getPerson_Name() { - return (EAttribute)personEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getPerson_Phones() { - return (EAttribute)personEClass.getEStructuralFeatures().get(1); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getPerson_Office() { - return (EAttribute)personEClass.getEStructuralFeatures().get(2); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getPerson_Mobile() { - return (EAttribute)personEClass.getEStructuralFeatures().get(3); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getPerson_Fax() { - return (EAttribute)personEClass.getEStructuralFeatures().get(4); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getPerson_Home() { - return (EAttribute)personEClass.getEStructuralFeatures().get(5); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getSpecialPerson() { - return specialPersonEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public DetachfeaturemapFactory getDetachfeaturemapFactory() { - return (DetachfeaturemapFactory)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 - contactsEClass = createEClass(CONTACTS); - createEReference(contactsEClass, CONTACTS__PERSONS); - - personEClass = createEClass(PERSON); - createEAttribute(personEClass, PERSON__NAME); - createEAttribute(personEClass, PERSON__PHONES); - createEAttribute(personEClass, PERSON__OFFICE); - createEAttribute(personEClass, PERSON__MOBILE); - createEAttribute(personEClass, PERSON__FAX); - createEAttribute(personEClass, PERSON__HOME); - - specialPersonEClass = createEClass(SPECIAL_PERSON); - } - - /** - * <!-- 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 - XMLTypePackageImpl theXMLTypePackage = (XMLTypePackageImpl)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI); - - // Add supertypes to classes - specialPersonEClass.getESuperTypes().add(this.getPerson()); - - // Initialize classes and features; add operations and parameters - initEClass(contactsEClass, Contacts.class, "Contacts", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getContacts_Persons(), this.getPerson(), null, "persons", null, 0, -1, Contacts.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(personEClass, Person.class, "Person", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getPerson_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getPerson_Phones(), ecorePackage.getEFeatureMapEntry(), "phones", null, 0, -1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getPerson_Office(), theXMLTypePackage.getString(), "office", null, 0, -1, Person.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, IS_DERIVED, IS_ORDERED); - initEAttribute(getPerson_Mobile(), theXMLTypePackage.getString(), "mobile", null, 0, -1, Person.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, IS_DERIVED, IS_ORDERED); - initEAttribute(getPerson_Fax(), theXMLTypePackage.getString(), "fax", null, 0, -1, Person.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, IS_DERIVED, IS_ORDERED); - initEAttribute(getPerson_Home(), theXMLTypePackage.getString(), "home", null, 0, -1, Person.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, IS_DERIVED, IS_ORDERED); - - initEClass(specialPersonEClass, SpecialPerson.class, "SpecialPerson", !IS_ABSTRACT, !IS_INTERFACE, 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 - (contactsEClass, - source, - new String[] { - "name", "Contacts", - "kind", "elementOnly" - }); - addAnnotation - (getContacts_Persons(), - source, - new String[] { - "kind", "element", - "name", "persons" - }); - addAnnotation - (personEClass, - source, - new String[] { - "name", "Person", - "kind", "elementOnly" - }); - addAnnotation - (getPerson_Name(), - source, - new String[] { - "kind", "element", - "name", "name" - }); - addAnnotation - (getPerson_Phones(), - source, - new String[] { - "kind", "group", - "name", "phones:1" - }); - addAnnotation - (getPerson_Office(), - source, - new String[] { - "kind", "element", - "name", "office", - "group", "#phones:1" - }); - addAnnotation - (getPerson_Mobile(), - source, - new String[] { - "kind", "element", - "name", "mobile", - "group", "#phones:1" - }); - addAnnotation - (getPerson_Fax(), - source, - new String[] { - "kind", "element", - "name", "fax", - "group", "#phones:1" - }); - addAnnotation - (getPerson_Home(), - source, - new String[] { - "kind", "element", - "name", "home", - "group", "#phones:1" - }); - addAnnotation - (specialPersonEClass, - source, - new String[] { - "name", "SpecialPerson", - "kind", "elementOnly" - }); - } - -} //DetachfeaturemapPackageImpl |