diff options
Diffstat (limited to 'plugins/infra/filters/org.eclipse.papyrus.infra.filters/src-gen/org/eclipse/papyrus/infra/filters/impl/FiltersPackageImpl.java')
-rw-r--r-- | plugins/infra/filters/org.eclipse.papyrus.infra.filters/src-gen/org/eclipse/papyrus/infra/filters/impl/FiltersPackageImpl.java | 462 |
1 files changed, 462 insertions, 0 deletions
diff --git a/plugins/infra/filters/org.eclipse.papyrus.infra.filters/src-gen/org/eclipse/papyrus/infra/filters/impl/FiltersPackageImpl.java b/plugins/infra/filters/org.eclipse.papyrus.infra.filters/src-gen/org/eclipse/papyrus/infra/filters/impl/FiltersPackageImpl.java new file mode 100644 index 00000000000..3ce25b4c4a7 --- /dev/null +++ b/plugins/infra/filters/org.eclipse.papyrus.infra.filters/src-gen/org/eclipse/papyrus/infra/filters/impl/FiltersPackageImpl.java @@ -0,0 +1,462 @@ +/** + * Copyright (c) 2014 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christian W. Damus - Initial API and implementation + */ +package org.eclipse.papyrus.infra.filters.impl; + +import org.eclipse.emf.common.util.URI; +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.papyrus.infra.filters.CompoundFilter; +import org.eclipse.papyrus.infra.filters.Equals; +import org.eclipse.papyrus.infra.filters.Filter; +import org.eclipse.papyrus.infra.filters.FiltersFactory; +import org.eclipse.papyrus.infra.filters.FiltersPackage; +import org.eclipse.papyrus.infra.filters.OperatorKind; +import org.eclipse.papyrus.infra.filters.util.FiltersValidator; +import org.eclipse.uml2.types.TypesPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Package</b>. + * <!-- end-user-doc --> + * + * @generated + */ +public class FiltersPackageImpl extends EPackageImpl implements FiltersPackage +{ + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private EClass compoundFilterEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private EClass filterEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private EClass equalsEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private EEnum operatorKindEEnum = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private EDataType objectEDataType = 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.papyrus.infra.filters.FiltersPackage#eNS_URI + * @see #init() + * @generated + */ + private FiltersPackageImpl() + { + super(eNS_URI, FiltersFactory.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 FiltersPackage#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 FiltersPackage init() + { + if (isInited) { + return (FiltersPackage) EPackage.Registry.INSTANCE.getEPackage(FiltersPackage.eNS_URI); + } + + // Obtain or create and register package + FiltersPackageImpl theFiltersPackage = (FiltersPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof FiltersPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new FiltersPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + TypesPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theFiltersPackage.createPackageContents(); + + // Initialize created meta-data + theFiltersPackage.initializePackageContents(); + + // Register package validator + EValidator.Registry.INSTANCE.put + (theFiltersPackage, + new EValidator.Descriptor() + { + @Override + public EValidator getEValidator() + { + return FiltersValidator.INSTANCE; + } + }); + + // Mark meta-data to indicate it can't be changed + theFiltersPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(FiltersPackage.eNS_URI, theFiltersPackage); + return theFiltersPackage; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getCompoundFilter() + { + return compoundFilterEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getCompoundFilter_Filter() + { + return (EReference) compoundFilterEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getCompoundFilter_OwnedFilter() + { + return (EReference) compoundFilterEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getCompoundFilter_Operator() + { + return (EAttribute) compoundFilterEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EOperation getCompoundFilter__ValidateAcyclic__DiagnosticChain_Map() + { + return compoundFilterEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getFilter() + { + return filterEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getFilter_Name() + { + return (EAttribute) filterEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EOperation getFilter__Matches__Object() + { + return filterEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getEquals() + { + return equalsEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getEquals_Object() + { + return (EAttribute) equalsEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EEnum getOperatorKind() + { + return operatorKindEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public EDataType getObject() + { + return objectEDataType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public FiltersFactory getFiltersFactory() + { + return (FiltersFactory) 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 + compoundFilterEClass = createEClass(COMPOUND_FILTER); + createEReference(compoundFilterEClass, COMPOUND_FILTER__FILTER); + createEReference(compoundFilterEClass, COMPOUND_FILTER__OWNED_FILTER); + createEAttribute(compoundFilterEClass, COMPOUND_FILTER__OPERATOR); + createEOperation(compoundFilterEClass, COMPOUND_FILTER___VALIDATE_ACYCLIC__DIAGNOSTICCHAIN_MAP); + + filterEClass = createEClass(FILTER); + createEAttribute(filterEClass, FILTER__NAME); + createEOperation(filterEClass, FILTER___MATCHES__OBJECT); + + equalsEClass = createEClass(EQUALS); + createEAttribute(equalsEClass, EQUALS__OBJECT); + + // Create enums + operatorKindEEnum = createEEnum(OPERATOR_KIND); + + // Create data types + objectEDataType = createEDataType(OBJECT); + } + + /** + * <!-- 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 + TypesPackage theTypesPackage = (TypesPackage) EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + compoundFilterEClass.getESuperTypes().add(this.getFilter()); + equalsEClass.getESuperTypes().add(this.getFilter()); + + // Initialize classes, features, and operations; add parameters + initEClass(compoundFilterEClass, CompoundFilter.class, "CompoundFilter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEReference(getCompoundFilter_Filter(), this.getFilter(), null, "filter", null, 1, -1, CompoundFilter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEReference(getCompoundFilter_OwnedFilter(), this.getFilter(), null, + "ownedFilter", null, 0, -1, CompoundFilter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getCompoundFilter_Operator(), this.getOperatorKind(), "operator", null, 1, 1, CompoundFilter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + + EOperation op = initEOperation(getCompoundFilter__ValidateAcyclic__DiagnosticChain_Map(), ecorePackage.getEBoolean(), "validateAcyclic", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, ecorePackage.getEDiagnosticChain(), "diagnostics", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$ + 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); //$NON-NLS-1$ + + initEClass(filterEClass, Filter.class, "Filter", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getFilter_Name(), theTypesPackage.getString(), "name", null, 0, 1, Filter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + + op = initEOperation(getFilter__Matches__Object(), theTypesPackage.getBoolean(), "matches", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, this.getObject(), "input", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ + + initEClass(equalsEClass, Equals.class, "Equals", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getEquals_Object(), this.getObject(), "object", null, 1, 1, Equals.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(operatorKindEEnum, OperatorKind.class, "OperatorKind"); //$NON-NLS-1$ + addEEnumLiteral(operatorKindEEnum, OperatorKind.AND); + addEEnumLiteral(operatorKindEEnum, OperatorKind.OR); + addEEnumLiteral(operatorKindEEnum, OperatorKind.XOR); + addEEnumLiteral(operatorKindEEnum, OperatorKind.NOT); + + // Initialize data types + initEDataType(objectEDataType, Object.class, "Object", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + // Create resource + createResource(eNS_URI); + + // Create annotations + // subsets + createSubsetsAnnotations(); + } + + /** + * Initializes the annotations for <b>subsets</b>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void createSubsetsAnnotations() + { + String source = "subsets"; //$NON-NLS-1$ + addAnnotation(getCompoundFilter_OwnedFilter(), + source, + new String[] + { + }, + new URI[] + { + URI.createURI(eNS_URI).appendFragment("//CompoundFilter/filter") //$NON-NLS-1$ + }); + } + +} // FiltersPackageImpl |