Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/facet/org.eclipse.papyrus.emf.facet.util.emf.catalog/src/org/eclipse/papyrus/emf/facet/util/emf/catalog/impl/CatalogSetImpl.java')
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.util.emf.catalog/src/org/eclipse/papyrus/emf/facet/util/emf/catalog/impl/CatalogSetImpl.java163
1 files changed, 163 insertions, 0 deletions
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.util.emf.catalog/src/org/eclipse/papyrus/emf/facet/util/emf/catalog/impl/CatalogSetImpl.java b/plugins/facet/org.eclipse.papyrus.emf.facet.util.emf.catalog/src/org/eclipse/papyrus/emf/facet/util/emf/catalog/impl/CatalogSetImpl.java
new file mode 100644
index 00000000000..a3a6e332ccf
--- /dev/null
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.util.emf.catalog/src/org/eclipse/papyrus/emf/facet/util/emf/catalog/impl/CatalogSetImpl.java
@@ -0,0 +1,163 @@
+/**
+ * Copyright (c) 2011 Mia-Software.
+ *
+ * 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:
+ * Gregoire Dupe (Mia-Software) - Design
+ * Nicolas Guyomar (Mia-Software) - Implementation
+ *
+ */
+package org.eclipse.emf.facet.util.emf.catalog.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.emf.facet.util.emf.catalog.Catalog;
+import org.eclipse.emf.facet.util.emf.catalog.CatalogPackage;
+import org.eclipse.emf.facet.util.emf.catalog.CatalogSet;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Set</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.facet.util.emf.catalog.impl.CatalogSetImpl#getCatalogs <em>Catalogs</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class CatalogSetImpl extends EObjectImpl implements CatalogSet {
+ /**
+ * The cached value of the '{@link #getCatalogs() <em>Catalogs</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCatalogs()
+ * @generated
+ * @ordered
+ */
+ protected EList<Catalog> catalogs;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CatalogSetImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return CatalogPackage.Literals.CATALOG_SET;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Catalog> getCatalogs() {
+ if (catalogs == null) {
+ catalogs = new EObjectContainmentEList<Catalog>(Catalog.class, this, CatalogPackage.CATALOG_SET__CATALOGS);
+ }
+ return catalogs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case CatalogPackage.CATALOG_SET__CATALOGS:
+ return ((InternalEList<?>)getCatalogs()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case CatalogPackage.CATALOG_SET__CATALOGS:
+ return getCatalogs();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case CatalogPackage.CATALOG_SET__CATALOGS:
+ getCatalogs().clear();
+ getCatalogs().addAll((Collection<? extends Catalog>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case CatalogPackage.CATALOG_SET__CATALOGS:
+ getCatalogs().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case CatalogPackage.CATALOG_SET__CATALOGS:
+ return catalogs != null && !catalogs.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //CatalogSetImpl

Back to the top