Skip to content

Content of file TestPackageImpl.java

/*******************************************************************************
 * Copyright (c) 2011-2019 EclipseSource Muenchen GmbH and others.
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 * Eugen Neufeld - initial API and implementation
 * Christian W. Damus - bug 543190
 *******************************************************************************/
package org.eclipse.emf.ecp.view.validation.test.model.impl;

import static org.eclipse.emf.ecp.view.validation.test.model.TestPackage.CONTAINER;
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.EGenericType; import org.eclipse.emf.ecore.EOperation; 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.ecp.view.validation.test.model.Book; import org.eclipse.emf.ecp.view.validation.test.model.Color; import org.eclipse.emf.ecp.view.validation.test.model.Computer; import org.eclipse.emf.ecp.view.validation.test.model.Content; import org.eclipse.emf.ecp.view.validation.test.model.CrossReferenceContainer; import org.eclipse.emf.ecp.view.validation.test.model.CrossReferenceContent; import org.eclipse.emf.ecp.view.validation.test.model.Gender; import org.eclipse.emf.ecp.view.validation.test.model.Librarian; import org.eclipse.emf.ecp.view.validation.test.model.Library; import org.eclipse.emf.ecp.view.validation.test.model.Mainboard; import org.eclipse.emf.ecp.view.validation.test.model.Person; import org.eclipse.emf.ecp.view.validation.test.model.PowerBlock; import org.eclipse.emf.ecp.view.validation.test.model.Referencer; import org.eclipse.emf.ecp.view.validation.test.model.TableContent; import org.eclipse.emf.ecp.view.validation.test.model.TableContentWithInnerChild; import org.eclipse.emf.ecp.view.validation.test.model.TableContentWithInnerChild2; import org.eclipse.emf.ecp.view.validation.test.model.TableContentWithValidation; import org.eclipse.emf.ecp.view.validation.test.model.TableContentWithoutValidation; import org.eclipse.emf.ecp.view.validation.test.model.TableObject; import org.eclipse.emf.ecp.view.validation.test.model.TableWithMultiplicity; import org.eclipse.emf.ecp.view.validation.test.model.TableWithUnique; import org.eclipse.emf.ecp.view.validation.test.model.TableWithoutMultiplicity; import org.eclipse.emf.ecp.view.validation.test.model.TableWithoutMultiplicityConcrete; import org.eclipse.emf.ecp.view.validation.test.model.TestFactory; import org.eclipse.emf.ecp.view.validation.test.model.TestPackage; import org.eclipse.emf.ecp.view.validation.test.model.Writer; import org.eclipse.emf.ecp.view.validation.test.model.util.TestValidator; /** * <!-- begin-user-doc --> * An implementation of the model <b>Package</b>. * <!-- end-user-doc --> * * @generated */ public class TestPackageImpl extends EPackageImpl implements TestPackage { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EClass libraryEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EClass writerEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EClass bookEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EClass librarianEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EClass computerEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EClass mainboardEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EClass powerBlockEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EClass containerEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EClass contentEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EClass tableWithMultiplicityEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EClass tableContentEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EClass tableContentWithoutValidationEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EClass tableContentWithValidationEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EClass tableWithoutMultiplicityEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EClass tableWithUniqueEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EClass tableContentWithInnerChild2EClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EClass tableContentWithInnerChildEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EClass tableWithoutMultiplicityConcreteEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EClass referencerEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EClass crossReferenceContainerEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EClass crossReferenceContentEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EClass personEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EClass tableObjectEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EEnum genderEEnum = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EEnum colorEEnum = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EDataType stringWithMaxLength8EDataType = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EDataType onlyCapitalsEDataType = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EDataType customDataTypeEDataType = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EDataType phoneNumberEDataType = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EDataType minLengthOf3EDataType = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EDataType strictMinLengthOf3EDataType = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ private EDataType ageEDataType = 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.ecp.view.validation.test.model.TestPackage#eNS_URI * @see #init() * @generated */ private TestPackageImpl() { super(eNS_URI, TestFactory.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 TestPackage#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 TestPackage init() { if (isInited) { return (TestPackage) EPackage.Registry.INSTANCE.getEPackage(TestPackage.eNS_URI); } // Obtain or create and register package final Object registeredTestPackage = EPackage.Registry.INSTANCE.get(eNS_URI); final TestPackageImpl theTestPackage = registeredTestPackage instanceof TestPackageImpl ? (TestPackageImpl) registeredTestPackage : new TestPackageImpl(); isInited = true; // Create package meta-data objects theTestPackage.createPackageContents(); // Initialize created meta-data theTestPackage.initializePackageContents(); // Register package validator EValidator.Registry.INSTANCE.put(theTestPackage, new EValidator.Descriptor() { @Override public EValidator getEValidator() { return TestValidator.INSTANCE; } }); // Mark meta-data to indicate it can't be changed theTestPackage.freeze(); // Update the registry and return the package EPackage.Registry.INSTANCE.put(TestPackage.eNS_URI, theTestPackage); return theTestPackage; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EClass getLibrary() { return libraryEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getLibrary_Name() { return (EAttribute) libraryEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EReference getLibrary_Writers() { return (EReference) libraryEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EReference getLibrary_Books() { return (EReference) libraryEClass.getEStructuralFeatures().get(2); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EReference getLibrary_Librarian() { return (EReference) libraryEClass.getEStructuralFeatures().get(3); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getLibrary_PhoneNumber() { return (EAttribute) libraryEClass.getEStructuralFeatures().get(4); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EClass getWriter() { return writerEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getWriter_FirstName() { return (EAttribute) writerEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getWriter_LastName() { return (EAttribute) writerEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getWriter_EMail() { return (EAttribute) writerEClass.getEStructuralFeatures().get(2); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getWriter_BirthDate() { return (EAttribute) writerEClass.getEStructuralFeatures().get(3); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EReference getWriter_Books() { return (EReference) writerEClass.getEStructuralFeatures().get(4); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getWriter_Pseudonym() { return (EAttribute) writerEClass.getEStructuralFeatures().get(5); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EReference getWriter_Library() { return (EReference) writerEClass.getEStructuralFeatures().get(6); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getWriter_Initials() { return (EAttribute) writerEClass.getEStructuralFeatures().get(7); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getWriter_Title() { return (EAttribute) writerEClass.getEStructuralFeatures().get(8); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EClass getBook() { return bookEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getBook_Title() { return (EAttribute) bookEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getBook_Pages() { return (EAttribute) bookEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EReference getBook_Writers() { return (EReference) bookEClass.getEStructuralFeatures().get(2); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EClass getLibrarian() { return librarianEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getLibrarian_Name() { return (EAttribute) librarianEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EClass getComputer() { return computerEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EReference getComputer_Mainboard() { return (EReference) computerEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getComputer_Name() { return (EAttribute) computerEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EReference getComputer_PowerBlock() { return (EReference) computerEClass.getEStructuralFeatures().get(2); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getComputer_Colors() { return (EAttribute) computerEClass.getEStructuralFeatures().get(3); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EClass getMainboard() { return mainboardEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getMainboard_Name() { return (EAttribute) mainboardEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EClass getPowerBlock() { return powerBlockEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getPowerBlock_Name() { return (EAttribute) powerBlockEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EClass getContainer() { return containerEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EReference getContainer_Contents() { return (EReference) containerEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EClass getContent() { return contentEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getContent_UniqueAttribute() { return (EAttribute) contentEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getContent_SecondAttribute() { return (EAttribute) contentEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EClass getTableWithMultiplicity() { return tableWithMultiplicityEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EReference getTableWithMultiplicity_Content() { return (EReference) tableWithMultiplicityEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EClass getTableContent() { return tableContentEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EClass getTableContentWithoutValidation() { return tableContentWithoutValidationEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getTableContentWithoutValidation_Name() { return (EAttribute) tableContentWithoutValidationEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getTableContentWithoutValidation_Weight() { return (EAttribute) tableContentWithoutValidationEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EClass getTableContentWithValidation() { return tableContentWithValidationEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getTableContentWithValidation_Name() { return (EAttribute) tableContentWithValidationEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getTableContentWithValidation_Weight() { return (EAttribute) tableContentWithValidationEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EClass getTableWithoutMultiplicity() { return tableWithoutMultiplicityEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EReference getTableWithoutMultiplicity_Content() { return (EReference) tableWithoutMultiplicityEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EClass getTableWithUnique() { return tableWithUniqueEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EReference getTableWithUnique_Content() { return (EReference) tableWithUniqueEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EClass getTableContentWithInnerChild2() { return tableContentWithInnerChild2EClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EReference getTableContentWithInnerChild2_InnerChild() { return (EReference) tableContentWithInnerChild2EClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EClass getTableContentWithInnerChild() { return tableContentWithInnerChildEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EReference getTableContentWithInnerChild_InnerChild() { return (EReference) tableContentWithInnerChildEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getTableContentWithInnerChild_Stuff() { return (EAttribute) tableContentWithInnerChildEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EClass getTableWithoutMultiplicityConcrete() { return tableWithoutMultiplicityConcreteEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EReference getTableWithoutMultiplicityConcrete_Content() { return (EReference) tableWithoutMultiplicityConcreteEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EClass getReferencer() { return referencerEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EReference getReferencer_ReferencedContent() { return (EReference) referencerEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EClass getCrossReferenceContainer() { return crossReferenceContainerEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EReference getCrossReferenceContainer_Contents() { return (EReference) crossReferenceContainerEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EReference getCrossReferenceContainer_SingleContent() { return (EReference) crossReferenceContainerEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EClass getCrossReferenceContent() { return crossReferenceContentEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EReference getCrossReferenceContent_Parent() { return (EReference) crossReferenceContentEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EReference getCrossReferenceContent_SingleParent() { return (EReference) crossReferenceContentEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EClass getPerson() { return personEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getPerson_FirstName() { return (EAttribute) personEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getPerson_Gender() { return (EAttribute) personEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getPerson_LastName() { return (EAttribute) personEClass.getEStructuralFeatures().get(2); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getPerson_Custom() { return (EAttribute) personEClass.getEStructuralFeatures().get(3); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getPerson_Age() { return (EAttribute) personEClass.getEStructuralFeatures().get(4); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EClass getTableObject() { return tableObjectEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EAttribute getTableObject_Label() { return (EAttribute) tableObjectEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EDataType getStringWithMaxLength8() { return stringWithMaxLength8EDataType; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EDataType getOnlyCapitals() { return onlyCapitalsEDataType; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EDataType getCustomDataType() { return customDataTypeEDataType; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EDataType getPhoneNumber() { return phoneNumberEDataType; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EDataType getMinLengthOf3() { return minLengthOf3EDataType; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EDataType getStrictMinLengthOf3() { return strictMinLengthOf3EDataType; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EDataType getAge() { return ageEDataType; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EEnum getGender() { return genderEEnum; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EEnum getColor() { return colorEEnum; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public TestFactory getTestFactory() { return (TestFactory) 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 libraryEClass = createEClass(LIBRARY); createEAttribute(libraryEClass, LIBRARY__NAME); createEReference(libraryEClass, LIBRARY__WRITERS); createEReference(libraryEClass, LIBRARY__BOOKS); createEReference(libraryEClass, LIBRARY__LIBRARIAN); createEAttribute(libraryEClass, LIBRARY__PHONE_NUMBER); writerEClass = createEClass(WRITER); createEAttribute(writerEClass, WRITER__FIRST_NAME); createEAttribute(writerEClass, WRITER__LAST_NAME); createEAttribute(writerEClass, WRITER__EMAIL); createEAttribute(writerEClass, WRITER__BIRTH_DATE); createEReference(writerEClass, WRITER__BOOKS); createEAttribute(writerEClass, WRITER__PSEUDONYM); createEReference(writerEClass, WRITER__LIBRARY); createEAttribute(writerEClass, WRITER__INITIALS); createEAttribute(writerEClass, WRITER__TITLE); bookEClass = createEClass(BOOK); createEAttribute(bookEClass, BOOK__TITLE); createEAttribute(bookEClass, BOOK__PAGES); createEReference(bookEClass, BOOK__WRITERS); librarianEClass = createEClass(LIBRARIAN); createEAttribute(librarianEClass, LIBRARIAN__NAME); computerEClass = createEClass(COMPUTER); createEReference(computerEClass, COMPUTER__MAINBOARD); createEAttribute(computerEClass, COMPUTER__NAME); createEReference(computerEClass, COMPUTER__POWER_BLOCK); createEAttribute(computerEClass, COMPUTER__COLORS); mainboardEClass = createEClass(MAINBOARD); createEAttribute(mainboardEClass, MAINBOARD__NAME); powerBlockEClass = createEClass(POWER_BLOCK); createEAttribute(powerBlockEClass, POWER_BLOCK__NAME); containerEClass = createEClass(CONTAINER); createEReference(containerEClass, CONTAINER__CONTENTS); contentEClass = createEClass(CONTENT); createEAttribute(contentEClass, CONTENT__UNIQUE_ATTRIBUTE); createEAttribute(contentEClass, CONTENT__SECOND_ATTRIBUTE); tableWithMultiplicityEClass = createEClass(TABLE_WITH_MULTIPLICITY); createEReference(tableWithMultiplicityEClass, TABLE_WITH_MULTIPLICITY__CONTENT); tableContentEClass = createEClass(TABLE_CONTENT); tableContentWithoutValidationEClass = createEClass(TABLE_CONTENT_WITHOUT_VALIDATION); createEAttribute(tableContentWithoutValidationEClass, TABLE_CONTENT_WITHOUT_VALIDATION__NAME); createEAttribute(tableContentWithoutValidationEClass, TABLE_CONTENT_WITHOUT_VALIDATION__WEIGHT); tableContentWithValidationEClass = createEClass(TABLE_CONTENT_WITH_VALIDATION); createEAttribute(tableContentWithValidationEClass, TABLE_CONTENT_WITH_VALIDATION__NAME); createEAttribute(tableContentWithValidationEClass, TABLE_CONTENT_WITH_VALIDATION__WEIGHT); tableWithoutMultiplicityEClass = createEClass(TABLE_WITHOUT_MULTIPLICITY); createEReference(tableWithoutMultiplicityEClass, TABLE_WITHOUT_MULTIPLICITY__CONTENT); tableWithUniqueEClass = createEClass(TABLE_WITH_UNIQUE); createEReference(tableWithUniqueEClass, TABLE_WITH_UNIQUE__CONTENT); tableContentWithInnerChild2EClass = createEClass(TABLE_CONTENT_WITH_INNER_CHILD2); createEReference(tableContentWithInnerChild2EClass, TABLE_CONTENT_WITH_INNER_CHILD2__INNER_CHILD); tableContentWithInnerChildEClass = createEClass(TABLE_CONTENT_WITH_INNER_CHILD); createEReference(tableContentWithInnerChildEClass, TABLE_CONTENT_WITH_INNER_CHILD__INNER_CHILD); createEAttribute(tableContentWithInnerChildEClass, TABLE_CONTENT_WITH_INNER_CHILD__STUFF); tableWithoutMultiplicityConcreteEClass = createEClass(TABLE_WITHOUT_MULTIPLICITY_CONCRETE); createEReference(tableWithoutMultiplicityConcreteEClass, TABLE_WITHOUT_MULTIPLICITY_CONCRETE__CONTENT); referencerEClass = createEClass(REFERENCER); createEReference(referencerEClass, REFERENCER__REFERENCED_CONTENT); crossReferenceContainerEClass = createEClass(CROSS_REFERENCE_CONTAINER); createEReference(crossReferenceContainerEClass, CROSS_REFERENCE_CONTAINER__CONTENTS); createEReference(crossReferenceContainerEClass, CROSS_REFERENCE_CONTAINER__SINGLE_CONTENT); crossReferenceContentEClass = createEClass(CROSS_REFERENCE_CONTENT); createEReference(crossReferenceContentEClass, CROSS_REFERENCE_CONTENT__PARENT); createEReference(crossReferenceContentEClass, CROSS_REFERENCE_CONTENT__SINGLE_PARENT); personEClass = createEClass(PERSON); createEAttribute(personEClass, PERSON__FIRST_NAME); createEAttribute(personEClass, PERSON__GENDER); createEAttribute(personEClass, PERSON__LAST_NAME); createEAttribute(personEClass, PERSON__CUSTOM); createEAttribute(personEClass, PERSON__AGE); tableObjectEClass = createEClass(TABLE_OBJECT); createEAttribute(tableObjectEClass, TABLE_OBJECT__LABEL); // Create enums genderEEnum = createEEnum(GENDER); colorEEnum = createEEnum(COLOR); // Create data types stringWithMaxLength8EDataType = createEDataType(STRING_WITH_MAX_LENGTH8); onlyCapitalsEDataType = createEDataType(ONLY_CAPITALS); customDataTypeEDataType = createEDataType(CUSTOM_DATA_TYPE); phoneNumberEDataType = createEDataType(PHONE_NUMBER); minLengthOf3EDataType = createEDataType(MIN_LENGTH_OF3); strictMinLengthOf3EDataType = createEDataType(STRICT_MIN_LENGTH_OF3); ageEDataType = createEDataType(AGE); } /** * <!-- 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 tableWithMultiplicityEClass.getESuperTypes().add(getTableObject()); tableContentWithoutValidationEClass.getESuperTypes().add(getTableContent()); tableContentWithValidationEClass.getESuperTypes().add(getTableContent()); tableWithoutMultiplicityEClass.getESuperTypes().add(getTableObject()); tableWithUniqueEClass.getESuperTypes().add(getTableObject()); tableContentWithInnerChild2EClass.getESuperTypes().add(getTableContent()); tableContentWithInnerChildEClass.getESuperTypes().add(getTableContent()); tableWithoutMultiplicityConcreteEClass.getESuperTypes().add(getTableObject()); // Initialize classes and features; add operations and parameters initEClass(libraryEClass, Library.class, "Library", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getLibrary_Name(), ecorePackage.getEString(), "name", null, 0, 1, Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getLibrary_Writers(), getWriter(), getWriter_Library(), "writers", null, 1, -1, Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getLibrary_Books(), getBook(), null, "books", null, 0, -1, Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getLibrary_Librarian(), getLibrarian(), null, "librarian", null, 0, 1, Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getLibrary_PhoneNumber(), getPhoneNumber(), "phoneNumber", null, 0, 1, Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); EOperation op = addEOperation(libraryEClass, ecorePackage.getEBoolean(), "validate", 0, 1, IS_UNIQUE, IS_ORDERED); addEParameter(op, ecorePackage.getEDiagnosticChain(), "diagnostic", 0, 1, IS_UNIQUE, IS_ORDERED); EGenericType g1 = createEGenericType(ecorePackage.getEMap()); EGenericType g2 = createEGenericType(ecorePackage.getEJavaObject()); g1.getETypeArguments().add(g2); g2 = createEGenericType(ecorePackage.getEJavaObject()); g1.getETypeArguments().add(g2); addEParameter(op, g1, "context", 0, 1, IS_UNIQUE, IS_ORDERED); initEClass(writerEClass, Writer.class, "Writer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getWriter_FirstName(), ecorePackage.getEString(), "firstName", null, 0, 1, Writer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getWriter_LastName(), ecorePackage.getEString(), "lastName", null, 0, 1, Writer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getWriter_EMail(), ecorePackage.getEString(), "EMail", null, 0, 1, Writer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getWriter_BirthDate(), ecorePackage.getEDate(), "BirthDate", null, 0, 1, Writer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getWriter_Books(), getBook(), getBook_Writers(), "books", null, 0, -1, Writer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getWriter_Pseudonym(), ecorePackage.getEBoolean(), "Pseudonym", "false", 0, 1, Writer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getWriter_Library(), getLibrary(), getLibrary_Writers(), "library", null, 0, 1, Writer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getWriter_Initials(), getMinLengthOf3(), "initials", null, 0, 1, Writer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getWriter_Title(), getStrictMinLengthOf3(), "title", null, 0, 1, Writer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); op = addEOperation(writerEClass, ecorePackage.getEBoolean(), "validate", 0, 1, IS_UNIQUE, IS_ORDERED); addEParameter(op, ecorePackage.getEDiagnosticChain(), "diagnostic", 0, 1, IS_UNIQUE, IS_ORDERED); g1 = createEGenericType(ecorePackage.getEMap()); g2 = createEGenericType(ecorePackage.getEJavaObject()); g1.getETypeArguments().add(g2); g2 = createEGenericType(ecorePackage.getEJavaObject()); g1.getETypeArguments().add(g2); addEParameter(op, g1, "context", 0, 1, IS_UNIQUE, IS_ORDERED); initEClass(bookEClass, Book.class, "Book", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getBook_Title(), ecorePackage.getEString(), "title", null, 0, 1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getBook_Pages(), ecorePackage.getEInt(), "pages", "100", 0, 1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getBook_Writers(), getWriter(), getWriter_Books(), "writers", null, 0, 1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); op = addEOperation(bookEClass, ecorePackage.getEBoolean(), "validate", 0, 1, IS_UNIQUE, IS_ORDERED); addEParameter(op, ecorePackage.getEDiagnosticChain(), "diagnostic", 0, 1, IS_UNIQUE, IS_ORDERED); g1 = createEGenericType(ecorePackage.getEMap()); g2 = createEGenericType(ecorePackage.getEJavaObject()); g1.getETypeArguments().add(g2); g2 = createEGenericType(ecorePackage.getEJavaObject()); g1.getETypeArguments().add(g2); addEParameter(op, g1, "context", 0, 1, IS_UNIQUE, IS_ORDERED); initEClass(librarianEClass, Librarian.class, "Librarian", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getLibrarian_Name(), ecorePackage.getEString(), "name", null, 0, 1, Librarian.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); op = addEOperation(librarianEClass, ecorePackage.getEBoolean(), "validate", 0, 1, IS_UNIQUE, IS_ORDERED); addEParameter(op, ecorePackage.getEDiagnosticChain(), "diagnostic", 0, 1, IS_UNIQUE, IS_ORDERED); g1 = createEGenericType(ecorePackage.getEMap()); g2 = createEGenericType(ecorePackage.getEJavaObject()); g1.getETypeArguments().add(g2); g2 = createEGenericType(ecorePackage.getEJavaObject()); g1.getETypeArguments().add(g2); addEParameter(op, g1, "context", 0, 1, IS_UNIQUE, IS_ORDERED); initEClass(computerEClass, Computer.class, "Computer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getComputer_Mainboard(), getMainboard(), null, "mainboard", null, 0, 1, Computer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getComputer_Name(), ecorePackage.getEString(), "name", null, 1, 1, Computer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getComputer_PowerBlock(), getPowerBlock(), null, "powerBlock", null, 0, 1, Computer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getComputer_Colors(), getColor(), "colors", null, 0, -1, Computer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(mainboardEClass, Mainboard.class, "Mainboard", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getMainboard_Name(), ecorePackage.getEString(), "name", null, 1, 1, Mainboard.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(powerBlockEClass, PowerBlock.class, "PowerBlock", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getPowerBlock_Name(), ecorePackage.getEString(), "name", null, 1, 1, PowerBlock.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(containerEClass, org.eclipse.emf.ecp.view.validation.test.model.Container.class, "Container", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getContainer_Contents(), getContent(), null, "contents", null, 0, -1, org.eclipse.emf.ecp.view.validation.test.model.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(contentEClass, Content.class, "Content", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getContent_UniqueAttribute(), ecorePackage.getEString(), "uniqueAttribute", null, 0, 1, Content.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getContent_SecondAttribute(), ecorePackage.getEString(), "secondAttribute", null, 0, 1, Content.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(tableWithMultiplicityEClass, TableWithMultiplicity.class, "TableWithMultiplicity", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getTableWithMultiplicity_Content(), getTableContent(), null, "content", null, 1, -1, TableWithMultiplicity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(tableContentEClass, TableContent.class, "TableContent", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(tableContentWithoutValidationEClass, TableContentWithoutValidation.class, "TableContentWithoutValidation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getTableContentWithoutValidation_Name(), ecorePackage.getEString(), "name", null, 0, 1, TableContentWithoutValidation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getTableContentWithoutValidation_Weight(), ecorePackage.getEInt(), "weight", null, 0, 1, TableContentWithoutValidation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(tableContentWithValidationEClass, TableContentWithValidation.class, "TableContentWithValidation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getTableContentWithValidation_Name(), ecorePackage.getEString(), "name", null, 1, 1, TableContentWithValidation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getTableContentWithValidation_Weight(), ecorePackage.getEInt(), "weight", null, 0, 1, TableContentWithValidation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(tableWithoutMultiplicityEClass, TableWithoutMultiplicity.class, "TableWithoutMultiplicity", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getTableWithoutMultiplicity_Content(), getTableContent(), null, "content", null, 0, -1, TableWithoutMultiplicity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(tableWithUniqueEClass, TableWithUnique.class, "TableWithUnique", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getTableWithUnique_Content(), getTableContent(), null, "content", null, 0, -1, TableWithUnique.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(tableContentWithInnerChild2EClass, TableContentWithInnerChild2.class, "TableContentWithInnerChild2", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getTableContentWithInnerChild2_InnerChild(), getTableContent(), null, "innerChild", null, 0, 1, TableContentWithInnerChild2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(tableContentWithInnerChildEClass, TableContentWithInnerChild.class, "TableContentWithInnerChild", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getTableContentWithInnerChild_InnerChild(), getTableContent(), null, "innerChild", null, 0, 1, TableContentWithInnerChild.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getTableContentWithInnerChild_Stuff(), ecorePackage.getEString(), "stuff", null, 0, 1, TableContentWithInnerChild.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(tableWithoutMultiplicityConcreteEClass, TableWithoutMultiplicityConcrete.class, "TableWithoutMultiplicityConcrete", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getTableWithoutMultiplicityConcrete_Content(), getTableContentWithInnerChild(), null, "content", null, 0, -1, TableWithoutMultiplicityConcrete.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(referencerEClass, Referencer.class, "Referencer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getReferencer_ReferencedContent(), getComputer(), null, "referencedContent", null, 0, 1, Referencer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(crossReferenceContainerEClass, CrossReferenceContainer.class, "CrossReferenceContainer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getCrossReferenceContainer_Contents(), getCrossReferenceContent(), getCrossReferenceContent_Parent(), "contents", null, 0, -1, CrossReferenceContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getCrossReferenceContainer_SingleContent(), getCrossReferenceContent(), getCrossReferenceContent_SingleParent(), "singleContent", null, 0, 1, CrossReferenceContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(crossReferenceContentEClass, CrossReferenceContent.class, "CrossReferenceContent", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getCrossReferenceContent_Parent(), getCrossReferenceContainer(), getCrossReferenceContainer_Contents(), "parent", null, 0, 1, CrossReferenceContent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getCrossReferenceContent_SingleParent(), getCrossReferenceContainer(), getCrossReferenceContainer_SingleContent(), "singleParent", null, 0, 1, CrossReferenceContent.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_FirstName(), getStringWithMaxLength8(), "firstName", null, 0, 1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getPerson_Gender(), getGender(), "gender", null, 0, 1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getPerson_LastName(), getOnlyCapitals(), "lastName", null, 0, 1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getPerson_Custom(), getCustomDataType(), "custom", null, 0, 1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getPerson_Age(), getAge(), "age", null, 0, 1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(tableObjectEClass, TableObject.class, "TableObject", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getTableObject_Label(), ecorePackage.getEString(), "label", null, 0, 1, TableObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); // Initialize enums and add enum literals initEEnum(genderEEnum, Gender.class, "Gender"); addEEnumLiteral(genderEEnum, Gender.MALE); addEEnumLiteral(genderEEnum, Gender.FEMALE); addEEnumLiteral(genderEEnum, Gender.BOTH); initEEnum(colorEEnum, Color.class, "Color"); addEEnumLiteral(colorEEnum, Color.RED); addEEnumLiteral(colorEEnum, Color.GREEN); addEEnumLiteral(colorEEnum, Color.BLUE); // Initialize data types initEDataType(stringWithMaxLength8EDataType, String.class, "StringWithMaxLength8", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); initEDataType(onlyCapitalsEDataType, String.class, "OnlyCapitals", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); initEDataType(customDataTypeEDataType, String.class, "CustomDataType", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); initEDataType(phoneNumberEDataType, String.class, "PhoneNumber", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); initEDataType(minLengthOf3EDataType, String.class, "MinLengthOf3", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); initEDataType(strictMinLengthOf3EDataType, String.class, "StrictMinLengthOf3", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); initEDataType(ageEDataType, Integer.class, "Age", 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() { final String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; addAnnotation(stringWithMaxLength8EDataType, source, new String[] { "maxLength", "8" }); addAnnotation(onlyCapitalsEDataType, source, new String[] { "pattern", "[A-Z]+" }); addAnnotation(phoneNumberEDataType, source, new String[] { "pattern", "((\\+)?[a-c0-9*#]{1,20}){0,1}", "loosePattern", "[+0-9]+" }); addAnnotation(minLengthOf3EDataType, source, new String[] { "minLength", "3", "looseMinLength", "0" }); addAnnotation(strictMinLengthOf3EDataType, source, new String[] { "minLength", "3" }); addAnnotation(ageEDataType, source, new String[] { "minInclusive", "0", "maxInclusive", "100" }); } } // TestPackageImpl