From 445235443af0e018bdfacb033aabd743280f77e7 Mon Sep 17 00:00:00 2001
From: Stefan Herrnleben <s.herrnleben@syslex.de>
Date: Tue, 25 Jul 2017 18:37:18 +0200
Subject: [PATCH] add interface Identifier to AdaptationGroups to enable auto
 generated UID

---
 .../model/DNIMM3AP.xcore                      |   2 +-
 .../descartes/dni/dnimm3ap/DNIAPPackage.java  |  56 ++++++-
 .../dni/dnimm3ap/IAdaptationGroup.java        |   3 +-
 .../dni/dnimm3ap/impl/DNIAPPackageImpl.java   |   1 +
 .../impl/LinkAdaptationGroupImpl.java         | 152 ++++++++++++++++++
 .../impl/NodeAdaptationGroupImpl.java         | 152 ++++++++++++++++++
 .../LinkAdaptationGroupItemProvider.java      |  48 ++++++
 .../NodeAdaptationGroupItemProvider.java      |  48 ++++++
 .../dnimm3ap/util/DNIAPAdapterFactory.java    |  19 +++
 .../dni/dnimm3ap/util/DNIAPSwitch.java        |  19 +++
 10 files changed, 497 insertions(+), 3 deletions(-)

diff --git a/tools.descartes.dni.adaptation/model/DNIMM3AP.xcore b/tools.descartes.dni.adaptation/model/DNIMM3AP.xcore
index 1da11333..e4f4039b 100644
--- a/tools.descartes.dni.adaptation/model/DNIMM3AP.xcore
+++ b/tools.descartes.dni.adaptation/model/DNIMM3AP.xcore
@@ -140,7 +140,7 @@ class AdaptationGroups {
 	contains LinkAdaptationGroup[] links
 }
 
-interface IAdaptationGroup extends tools.descartes.dni.dnimm3.NamedElement {
+interface IAdaptationGroup extends tools.descartes.dni.dnimm3.NamedElement, tools.descartes.dni.dnimm3.Identifier {
 }
 
 class NodeAdaptationGroup extends IAdaptationGroup {
diff --git a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/DNIAPPackage.java b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/DNIAPPackage.java
index beab7c71..6372f150 100644
--- a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/DNIAPPackage.java
+++ b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/DNIAPPackage.java
@@ -892,6 +892,24 @@ public interface DNIAPPackage extends EPackage {
 	 */
 	int IADAPTATION_GROUP__DESCRIPTION = DNIPackage.NAMED_ELEMENT__DESCRIPTION;
 
+	/**
+	 * The feature id for the '<em><b>Uid</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int IADAPTATION_GROUP__UID = DNIPackage.NAMED_ELEMENT_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Uid generated</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int IADAPTATION_GROUP__UID_GENERATED = DNIPackage.NAMED_ELEMENT_FEATURE_COUNT + 1;
+
 	/**
 	 * The number of structural features of the '<em>IAdaptation Group</em>' class.
 	 * <!-- begin-user-doc -->
@@ -899,7 +917,7 @@ public interface DNIAPPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int IADAPTATION_GROUP_FEATURE_COUNT = DNIPackage.NAMED_ELEMENT_FEATURE_COUNT + 0;
+	int IADAPTATION_GROUP_FEATURE_COUNT = DNIPackage.NAMED_ELEMENT_FEATURE_COUNT + 2;
 
 	/**
 	 * The number of operations of the '<em>IAdaptation Group</em>' class.
@@ -938,6 +956,24 @@ public interface DNIAPPackage extends EPackage {
 	 */
 	int NODE_ADAPTATION_GROUP__DESCRIPTION = IADAPTATION_GROUP__DESCRIPTION;
 
+	/**
+	 * The feature id for the '<em><b>Uid</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int NODE_ADAPTATION_GROUP__UID = IADAPTATION_GROUP__UID;
+
+	/**
+	 * The feature id for the '<em><b>Uid generated</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int NODE_ADAPTATION_GROUP__UID_GENERATED = IADAPTATION_GROUP__UID_GENERATED;
+
 	/**
 	 * The feature id for the '<em><b>Items</b></em>' reference list.
 	 * <!-- begin-user-doc -->
@@ -993,6 +1029,24 @@ public interface DNIAPPackage extends EPackage {
 	 */
 	int LINK_ADAPTATION_GROUP__DESCRIPTION = IADAPTATION_GROUP__DESCRIPTION;
 
+	/**
+	 * The feature id for the '<em><b>Uid</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int LINK_ADAPTATION_GROUP__UID = IADAPTATION_GROUP__UID;
+
+	/**
+	 * The feature id for the '<em><b>Uid generated</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int LINK_ADAPTATION_GROUP__UID_GENERATED = IADAPTATION_GROUP__UID_GENERATED;
+
 	/**
 	 * The feature id for the '<em><b>Items</b></em>' reference list.
 	 * <!-- begin-user-doc -->
diff --git a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/IAdaptationGroup.java b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/IAdaptationGroup.java
index aac0ade1..47570959 100644
--- a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/IAdaptationGroup.java
+++ b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/IAdaptationGroup.java
@@ -2,6 +2,7 @@
  */
 package tools.descartes.dni.dnimm3ap;
 
+import tools.descartes.dni.dnimm3.Identifier;
 import tools.descartes.dni.dnimm3.NamedElement;
 
 /**
@@ -14,5 +15,5 @@ import tools.descartes.dni.dnimm3.NamedElement;
  * @model interface="true" abstract="true"
  * @generated
  */
-public interface IAdaptationGroup extends NamedElement {
+public interface IAdaptationGroup extends NamedElement, Identifier {
 } // IAdaptationGroup
diff --git a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/impl/DNIAPPackageImpl.java b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/impl/DNIAPPackageImpl.java
index 5027c6d3..6a026d93 100644
--- a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/impl/DNIAPPackageImpl.java
+++ b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/impl/DNIAPPackageImpl.java
@@ -1030,6 +1030,7 @@ public class DNIAPPackageImpl extends EPackageImpl implements DNIAPPackage {
 		g1.getETypeArguments().add(g2);
 		adaptableNetworkInterfacePerformanceEClass.getEGenericSuperTypes().add(g1);
 		iAdaptationGroupEClass.getESuperTypes().add(theDNIPackage.getNamedElement());
+		iAdaptationGroupEClass.getESuperTypes().add(theDNIPackage.getIdentifier());
 		nodeAdaptationGroupEClass.getESuperTypes().add(this.getIAdaptationGroup());
 		linkAdaptationGroupEClass.getESuperTypes().add(this.getIAdaptationGroup());
 		g1 = createEGenericType(this.getAlternativeVariable());
diff --git a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/impl/LinkAdaptationGroupImpl.java b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/impl/LinkAdaptationGroupImpl.java
index 3bc533cc..aeb52b28 100644
--- a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/impl/LinkAdaptationGroupImpl.java
+++ b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/impl/LinkAdaptationGroupImpl.java
@@ -16,8 +16,11 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl;
 import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
 
 import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
 import org.eclipse.emf.ecore.util.InternalEList;
 
+import tools.descartes.dni.dnimm3.DNIPackage;
+import tools.descartes.dni.dnimm3.Identifier;
 import tools.descartes.dni.dnimm3ap.AdaptableLink;
 import tools.descartes.dni.dnimm3ap.DNIAPPackage;
 import tools.descartes.dni.dnimm3ap.LinkAdaptationGroup;
@@ -32,6 +35,8 @@ import tools.descartes.dni.dnimm3ap.LinkAdaptationGroup;
  * <ul>
  *   <li>{@link tools.descartes.dni.dnimm3ap.impl.LinkAdaptationGroupImpl#getName <em>Name</em>}</li>
  *   <li>{@link tools.descartes.dni.dnimm3ap.impl.LinkAdaptationGroupImpl#getDescription <em>Description</em>}</li>
+ *   <li>{@link tools.descartes.dni.dnimm3ap.impl.LinkAdaptationGroupImpl#getUid <em>Uid</em>}</li>
+ *   <li>{@link tools.descartes.dni.dnimm3ap.impl.LinkAdaptationGroupImpl#getUid_generated <em>Uid generated</em>}</li>
  *   <li>{@link tools.descartes.dni.dnimm3ap.impl.LinkAdaptationGroupImpl#getItems <em>Items</em>}</li>
  * </ul>
  *
@@ -78,6 +83,45 @@ public class LinkAdaptationGroupImpl extends MinimalEObjectImpl.Container implem
 	 */
 	protected String description = DESCRIPTION_EDEFAULT;
 
+	/**
+	 * The default value of the '{@link #getUid() <em>Uid</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getUid()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String UID_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getUid() <em>Uid</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getUid()
+	 * @generated
+	 * @ordered
+	 */
+	protected String uid = UID_EDEFAULT;
+
+	/**
+	 * This is true if the Uid attribute has been set.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean uidESet;
+
+	/**
+	 * The default value of the '{@link #getUid_generated() <em>Uid generated</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getUid_generated()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String UID_GENERATED_EDEFAULT = null;
+
 	/**
 	 * The cached value of the '{@link #getItems() <em>Items</em>}' reference list.
 	 * <!-- begin-user-doc -->
@@ -149,6 +193,64 @@ public class LinkAdaptationGroupImpl extends MinimalEObjectImpl.Container implem
 			eNotify(new ENotificationImpl(this, Notification.SET, DNIAPPackage.LINK_ADAPTATION_GROUP__DESCRIPTION, oldDescription, description));
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getUid() {
+		return uid;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setUid(String newUid) {
+		String oldUid = uid;
+		uid = newUid;
+		boolean oldUidESet = uidESet;
+		uidESet = true;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, DNIAPPackage.LINK_ADAPTATION_GROUP__UID, oldUid, uid, !oldUidESet));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void unsetUid() {
+		String oldUid = uid;
+		boolean oldUidESet = uidESet;
+		uid = UID_EDEFAULT;
+		uidESet = false;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.UNSET, DNIAPPackage.LINK_ADAPTATION_GROUP__UID, oldUid, UID_EDEFAULT, oldUidESet));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public boolean isSetUid() {
+		return uidESet;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getUid_generated() {
+		if (((this.getUid() == null) || this.getUid().isEmpty())) {
+			this.setUid(EcoreUtil.generateUUID().toString());
+		}
+		return this.getUid();
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -202,6 +304,10 @@ public class LinkAdaptationGroupImpl extends MinimalEObjectImpl.Container implem
 				return getName();
 			case DNIAPPackage.LINK_ADAPTATION_GROUP__DESCRIPTION:
 				return getDescription();
+			case DNIAPPackage.LINK_ADAPTATION_GROUP__UID:
+				return getUid();
+			case DNIAPPackage.LINK_ADAPTATION_GROUP__UID_GENERATED:
+				return getUid_generated();
 			case DNIAPPackage.LINK_ADAPTATION_GROUP__ITEMS:
 				return getItems();
 		}
@@ -223,6 +329,9 @@ public class LinkAdaptationGroupImpl extends MinimalEObjectImpl.Container implem
 			case DNIAPPackage.LINK_ADAPTATION_GROUP__DESCRIPTION:
 				setDescription((String)newValue);
 				return;
+			case DNIAPPackage.LINK_ADAPTATION_GROUP__UID:
+				setUid((String)newValue);
+				return;
 			case DNIAPPackage.LINK_ADAPTATION_GROUP__ITEMS:
 				getItems().clear();
 				getItems().addAll((Collection<? extends AdaptableLink>)newValue);
@@ -245,6 +354,9 @@ public class LinkAdaptationGroupImpl extends MinimalEObjectImpl.Container implem
 			case DNIAPPackage.LINK_ADAPTATION_GROUP__DESCRIPTION:
 				setDescription(DESCRIPTION_EDEFAULT);
 				return;
+			case DNIAPPackage.LINK_ADAPTATION_GROUP__UID:
+				unsetUid();
+				return;
 			case DNIAPPackage.LINK_ADAPTATION_GROUP__ITEMS:
 				getItems().clear();
 				return;
@@ -264,12 +376,50 @@ public class LinkAdaptationGroupImpl extends MinimalEObjectImpl.Container implem
 				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
 			case DNIAPPackage.LINK_ADAPTATION_GROUP__DESCRIPTION:
 				return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+			case DNIAPPackage.LINK_ADAPTATION_GROUP__UID:
+				return isSetUid();
+			case DNIAPPackage.LINK_ADAPTATION_GROUP__UID_GENERATED:
+				return UID_GENERATED_EDEFAULT == null ? getUid_generated() != null : !UID_GENERATED_EDEFAULT.equals(getUid_generated());
 			case DNIAPPackage.LINK_ADAPTATION_GROUP__ITEMS:
 				return items != null && !items.isEmpty();
 		}
 		return super.eIsSet(featureID);
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
+		if (baseClass == Identifier.class) {
+			switch (derivedFeatureID) {
+				case DNIAPPackage.LINK_ADAPTATION_GROUP__UID: return DNIPackage.IDENTIFIER__UID;
+				case DNIAPPackage.LINK_ADAPTATION_GROUP__UID_GENERATED: return DNIPackage.IDENTIFIER__UID_GENERATED;
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
+		if (baseClass == Identifier.class) {
+			switch (baseFeatureID) {
+				case DNIPackage.IDENTIFIER__UID: return DNIAPPackage.LINK_ADAPTATION_GROUP__UID;
+				case DNIPackage.IDENTIFIER__UID_GENERATED: return DNIAPPackage.LINK_ADAPTATION_GROUP__UID_GENERATED;
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -284,6 +434,8 @@ public class LinkAdaptationGroupImpl extends MinimalEObjectImpl.Container implem
 		result.append(name);
 		result.append(", description: ");
 		result.append(description);
+		result.append(", uid: ");
+		if (uidESet) result.append(uid); else result.append("<unset>");
 		result.append(')');
 		return result.toString();
 	}
diff --git a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/impl/NodeAdaptationGroupImpl.java b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/impl/NodeAdaptationGroupImpl.java
index a9c95411..2e817c00 100644
--- a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/impl/NodeAdaptationGroupImpl.java
+++ b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/impl/NodeAdaptationGroupImpl.java
@@ -16,8 +16,11 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl;
 import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
 
 import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
 import org.eclipse.emf.ecore.util.InternalEList;
 
+import tools.descartes.dni.dnimm3.DNIPackage;
+import tools.descartes.dni.dnimm3.Identifier;
 import tools.descartes.dni.dnimm3ap.AdaptableNode;
 import tools.descartes.dni.dnimm3ap.DNIAPPackage;
 import tools.descartes.dni.dnimm3ap.NodeAdaptationGroup;
@@ -32,6 +35,8 @@ import tools.descartes.dni.dnimm3ap.NodeAdaptationGroup;
  * <ul>
  *   <li>{@link tools.descartes.dni.dnimm3ap.impl.NodeAdaptationGroupImpl#getName <em>Name</em>}</li>
  *   <li>{@link tools.descartes.dni.dnimm3ap.impl.NodeAdaptationGroupImpl#getDescription <em>Description</em>}</li>
+ *   <li>{@link tools.descartes.dni.dnimm3ap.impl.NodeAdaptationGroupImpl#getUid <em>Uid</em>}</li>
+ *   <li>{@link tools.descartes.dni.dnimm3ap.impl.NodeAdaptationGroupImpl#getUid_generated <em>Uid generated</em>}</li>
  *   <li>{@link tools.descartes.dni.dnimm3ap.impl.NodeAdaptationGroupImpl#getItems <em>Items</em>}</li>
  * </ul>
  *
@@ -78,6 +83,45 @@ public class NodeAdaptationGroupImpl extends MinimalEObjectImpl.Container implem
 	 */
 	protected String description = DESCRIPTION_EDEFAULT;
 
+	/**
+	 * The default value of the '{@link #getUid() <em>Uid</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getUid()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String UID_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getUid() <em>Uid</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getUid()
+	 * @generated
+	 * @ordered
+	 */
+	protected String uid = UID_EDEFAULT;
+
+	/**
+	 * This is true if the Uid attribute has been set.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean uidESet;
+
+	/**
+	 * The default value of the '{@link #getUid_generated() <em>Uid generated</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getUid_generated()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String UID_GENERATED_EDEFAULT = null;
+
 	/**
 	 * The cached value of the '{@link #getItems() <em>Items</em>}' reference list.
 	 * <!-- begin-user-doc -->
@@ -149,6 +193,64 @@ public class NodeAdaptationGroupImpl extends MinimalEObjectImpl.Container implem
 			eNotify(new ENotificationImpl(this, Notification.SET, DNIAPPackage.NODE_ADAPTATION_GROUP__DESCRIPTION, oldDescription, description));
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getUid() {
+		return uid;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setUid(String newUid) {
+		String oldUid = uid;
+		uid = newUid;
+		boolean oldUidESet = uidESet;
+		uidESet = true;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, DNIAPPackage.NODE_ADAPTATION_GROUP__UID, oldUid, uid, !oldUidESet));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void unsetUid() {
+		String oldUid = uid;
+		boolean oldUidESet = uidESet;
+		uid = UID_EDEFAULT;
+		uidESet = false;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.UNSET, DNIAPPackage.NODE_ADAPTATION_GROUP__UID, oldUid, UID_EDEFAULT, oldUidESet));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public boolean isSetUid() {
+		return uidESet;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getUid_generated() {
+		if (((this.getUid() == null) || this.getUid().isEmpty())) {
+			this.setUid(EcoreUtil.generateUUID().toString());
+		}
+		return this.getUid();
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -202,6 +304,10 @@ public class NodeAdaptationGroupImpl extends MinimalEObjectImpl.Container implem
 				return getName();
 			case DNIAPPackage.NODE_ADAPTATION_GROUP__DESCRIPTION:
 				return getDescription();
+			case DNIAPPackage.NODE_ADAPTATION_GROUP__UID:
+				return getUid();
+			case DNIAPPackage.NODE_ADAPTATION_GROUP__UID_GENERATED:
+				return getUid_generated();
 			case DNIAPPackage.NODE_ADAPTATION_GROUP__ITEMS:
 				return getItems();
 		}
@@ -223,6 +329,9 @@ public class NodeAdaptationGroupImpl extends MinimalEObjectImpl.Container implem
 			case DNIAPPackage.NODE_ADAPTATION_GROUP__DESCRIPTION:
 				setDescription((String)newValue);
 				return;
+			case DNIAPPackage.NODE_ADAPTATION_GROUP__UID:
+				setUid((String)newValue);
+				return;
 			case DNIAPPackage.NODE_ADAPTATION_GROUP__ITEMS:
 				getItems().clear();
 				getItems().addAll((Collection<? extends AdaptableNode>)newValue);
@@ -245,6 +354,9 @@ public class NodeAdaptationGroupImpl extends MinimalEObjectImpl.Container implem
 			case DNIAPPackage.NODE_ADAPTATION_GROUP__DESCRIPTION:
 				setDescription(DESCRIPTION_EDEFAULT);
 				return;
+			case DNIAPPackage.NODE_ADAPTATION_GROUP__UID:
+				unsetUid();
+				return;
 			case DNIAPPackage.NODE_ADAPTATION_GROUP__ITEMS:
 				getItems().clear();
 				return;
@@ -264,12 +376,50 @@ public class NodeAdaptationGroupImpl extends MinimalEObjectImpl.Container implem
 				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
 			case DNIAPPackage.NODE_ADAPTATION_GROUP__DESCRIPTION:
 				return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+			case DNIAPPackage.NODE_ADAPTATION_GROUP__UID:
+				return isSetUid();
+			case DNIAPPackage.NODE_ADAPTATION_GROUP__UID_GENERATED:
+				return UID_GENERATED_EDEFAULT == null ? getUid_generated() != null : !UID_GENERATED_EDEFAULT.equals(getUid_generated());
 			case DNIAPPackage.NODE_ADAPTATION_GROUP__ITEMS:
 				return items != null && !items.isEmpty();
 		}
 		return super.eIsSet(featureID);
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
+		if (baseClass == Identifier.class) {
+			switch (derivedFeatureID) {
+				case DNIAPPackage.NODE_ADAPTATION_GROUP__UID: return DNIPackage.IDENTIFIER__UID;
+				case DNIAPPackage.NODE_ADAPTATION_GROUP__UID_GENERATED: return DNIPackage.IDENTIFIER__UID_GENERATED;
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
+		if (baseClass == Identifier.class) {
+			switch (baseFeatureID) {
+				case DNIPackage.IDENTIFIER__UID: return DNIAPPackage.NODE_ADAPTATION_GROUP__UID;
+				case DNIPackage.IDENTIFIER__UID_GENERATED: return DNIAPPackage.NODE_ADAPTATION_GROUP__UID_GENERATED;
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -284,6 +434,8 @@ public class NodeAdaptationGroupImpl extends MinimalEObjectImpl.Container implem
 		result.append(name);
 		result.append(", description: ");
 		result.append(description);
+		result.append(", uid: ");
+		if (uidESet) result.append(uid); else result.append("<unset>");
 		result.append(')');
 		return result.toString();
 	}
diff --git a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/provider/LinkAdaptationGroupItemProvider.java b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/provider/LinkAdaptationGroupItemProvider.java
index d1ab2a31..f0c0cac0 100644
--- a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/provider/LinkAdaptationGroupItemProvider.java
+++ b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/provider/LinkAdaptationGroupItemProvider.java
@@ -64,6 +64,8 @@ public class LinkAdaptationGroupItemProvider
 
 			addNamePropertyDescriptor(object);
 			addDescriptionPropertyDescriptor(object);
+			addUidPropertyDescriptor(object);
+			addUid_generatedPropertyDescriptor(object);
 			addItemsPropertyDescriptor(object);
 		}
 		return itemPropertyDescriptors;
@@ -113,6 +115,50 @@ public class LinkAdaptationGroupItemProvider
 				 null));
 	}
 
+	/**
+	 * This adds a property descriptor for the Uid feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addUidPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_Identifier_uid_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_Identifier_uid_feature", "_UI_Identifier_type"),
+				 DNIPackage.Literals.IDENTIFIER__UID,
+				 true,
+				 false,
+				 false,
+				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+				 null,
+				 null));
+	}
+
+	/**
+	 * This adds a property descriptor for the Uid generated feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addUid_generatedPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_Identifier_uid_generated_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_Identifier_uid_generated_feature", "_UI_Identifier_type"),
+				 DNIPackage.Literals.IDENTIFIER__UID_GENERATED,
+				 false,
+				 false,
+				 false,
+				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+				 null,
+				 null));
+	}
+
 	/**
 	 * This adds a property descriptor for the Items feature.
 	 * <!-- begin-user-doc -->
@@ -175,6 +221,8 @@ public class LinkAdaptationGroupItemProvider
 		switch (notification.getFeatureID(LinkAdaptationGroup.class)) {
 			case DNIAPPackage.LINK_ADAPTATION_GROUP__NAME:
 			case DNIAPPackage.LINK_ADAPTATION_GROUP__DESCRIPTION:
+			case DNIAPPackage.LINK_ADAPTATION_GROUP__UID:
+			case DNIAPPackage.LINK_ADAPTATION_GROUP__UID_GENERATED:
 				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
 				return;
 		}
diff --git a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/provider/NodeAdaptationGroupItemProvider.java b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/provider/NodeAdaptationGroupItemProvider.java
index 0c5e4870..c8c77054 100644
--- a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/provider/NodeAdaptationGroupItemProvider.java
+++ b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/provider/NodeAdaptationGroupItemProvider.java
@@ -64,6 +64,8 @@ public class NodeAdaptationGroupItemProvider
 
 			addNamePropertyDescriptor(object);
 			addDescriptionPropertyDescriptor(object);
+			addUidPropertyDescriptor(object);
+			addUid_generatedPropertyDescriptor(object);
 			addItemsPropertyDescriptor(object);
 		}
 		return itemPropertyDescriptors;
@@ -113,6 +115,50 @@ public class NodeAdaptationGroupItemProvider
 				 null));
 	}
 
+	/**
+	 * This adds a property descriptor for the Uid feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addUidPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_Identifier_uid_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_Identifier_uid_feature", "_UI_Identifier_type"),
+				 DNIPackage.Literals.IDENTIFIER__UID,
+				 true,
+				 false,
+				 false,
+				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+				 null,
+				 null));
+	}
+
+	/**
+	 * This adds a property descriptor for the Uid generated feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addUid_generatedPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_Identifier_uid_generated_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_Identifier_uid_generated_feature", "_UI_Identifier_type"),
+				 DNIPackage.Literals.IDENTIFIER__UID_GENERATED,
+				 false,
+				 false,
+				 false,
+				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+				 null,
+				 null));
+	}
+
 	/**
 	 * This adds a property descriptor for the Items feature.
 	 * <!-- begin-user-doc -->
@@ -175,6 +221,8 @@ public class NodeAdaptationGroupItemProvider
 		switch (notification.getFeatureID(NodeAdaptationGroup.class)) {
 			case DNIAPPackage.NODE_ADAPTATION_GROUP__NAME:
 			case DNIAPPackage.NODE_ADAPTATION_GROUP__DESCRIPTION:
+			case DNIAPPackage.NODE_ADAPTATION_GROUP__UID:
+			case DNIAPPackage.NODE_ADAPTATION_GROUP__UID_GENERATED:
 				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
 				return;
 		}
diff --git a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/util/DNIAPAdapterFactory.java b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/util/DNIAPAdapterFactory.java
index 9a7c399f..19b28a8f 100644
--- a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/util/DNIAPAdapterFactory.java
+++ b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/util/DNIAPAdapterFactory.java
@@ -10,6 +10,7 @@ import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
 import org.eclipse.emf.ecore.EObject;
 
 import tools.descartes.dni.dnimm3.ITypedEntity;
+import tools.descartes.dni.dnimm3.Identifier;
 import tools.descartes.dni.dnimm3.NamedElement;
 
 import tools.descartes.dni.dnimm3ap.*;
@@ -159,6 +160,10 @@ public class DNIAPAdapterFactory extends AdapterFactoryImpl {
 				return createNamedElementAdapter();
 			}
 			@Override
+			public Adapter caseIdentifier(Identifier object) {
+				return createIdentifierAdapter();
+			}
+			@Override
 			public Adapter defaultCase(EObject object) {
 				return createEObjectAdapter();
 			}
@@ -486,6 +491,20 @@ public class DNIAPAdapterFactory extends AdapterFactoryImpl {
 		return null;
 	}
 
+	/**
+	 * Creates a new adapter for an object of class '{@link tools.descartes.dni.dnimm3.Identifier <em>Identifier</em>}'.
+	 * <!-- begin-user-doc -->
+	 * This default implementation returns null so that we can easily ignore cases;
+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
+	 * <!-- end-user-doc -->
+	 * @return the new adapter.
+	 * @see tools.descartes.dni.dnimm3.Identifier
+	 * @generated
+	 */
+	public Adapter createIdentifierAdapter() {
+		return null;
+	}
+
 	/**
 	 * Creates a new adapter for the default case.
 	 * <!-- begin-user-doc -->
diff --git a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/util/DNIAPSwitch.java b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/util/DNIAPSwitch.java
index 7f40cb5c..9764434f 100644
--- a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/util/DNIAPSwitch.java
+++ b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/util/DNIAPSwitch.java
@@ -8,6 +8,7 @@ import org.eclipse.emf.ecore.EPackage;
 import org.eclipse.emf.ecore.util.Switch;
 
 import tools.descartes.dni.dnimm3.ITypedEntity;
+import tools.descartes.dni.dnimm3.Identifier;
 import tools.descartes.dni.dnimm3.NamedElement;
 
 import tools.descartes.dni.dnimm3ap.*;
@@ -161,6 +162,7 @@ public class DNIAPSwitch<T1> extends Switch<T1> {
 				IAdaptationGroup iAdaptationGroup = (IAdaptationGroup)theEObject;
 				T1 result = caseIAdaptationGroup(iAdaptationGroup);
 				if (result == null) result = caseNamedElement(iAdaptationGroup);
+				if (result == null) result = caseIdentifier(iAdaptationGroup);
 				if (result == null) result = defaultCase(theEObject);
 				return result;
 			}
@@ -169,6 +171,7 @@ public class DNIAPSwitch<T1> extends Switch<T1> {
 				T1 result = caseNodeAdaptationGroup(nodeAdaptationGroup);
 				if (result == null) result = caseIAdaptationGroup(nodeAdaptationGroup);
 				if (result == null) result = caseNamedElement(nodeAdaptationGroup);
+				if (result == null) result = caseIdentifier(nodeAdaptationGroup);
 				if (result == null) result = defaultCase(theEObject);
 				return result;
 			}
@@ -177,6 +180,7 @@ public class DNIAPSwitch<T1> extends Switch<T1> {
 				T1 result = caseLinkAdaptationGroup(linkAdaptationGroup);
 				if (result == null) result = caseIAdaptationGroup(linkAdaptationGroup);
 				if (result == null) result = caseNamedElement(linkAdaptationGroup);
+				if (result == null) result = caseIdentifier(linkAdaptationGroup);
 				if (result == null) result = defaultCase(theEObject);
 				return result;
 			}
@@ -548,6 +552,21 @@ public class DNIAPSwitch<T1> extends Switch<T1> {
 		return null;
 	}
 
+	/**
+	 * Returns the result of interpreting the object as an instance of '<em>Identifier</em>'.
+	 * <!-- begin-user-doc -->
+	 * This implementation returns null;
+	 * returning a non-null result will terminate the switch.
+	 * <!-- end-user-doc -->
+	 * @param object the target of the switch.
+	 * @return the result of interpreting the object as an instance of '<em>Identifier</em>'.
+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+	 * @generated
+	 */
+	public T1 caseIdentifier(Identifier object) {
+		return null;
+	}
+
 	/**
 	 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
 	 * <!-- begin-user-doc -->
-- 
GitLab