TopoRegions: created skeleton Topo2 UI view for development of the "region-aware" topology.
- Added initial event generation (layout/region/ etc.) -- WIP
Change-Id: I2f93eea7505ff0400085d7f67491f6b61231cb86
diff --git a/core/api/src/main/java/org/onosproject/ui/model/topo/UiTopoLayout.java b/core/api/src/main/java/org/onosproject/ui/model/topo/UiTopoLayout.java
index 8b421c0..604cf65 100644
--- a/core/api/src/main/java/org/onosproject/ui/model/topo/UiTopoLayout.java
+++ b/core/api/src/main/java/org/onosproject/ui/model/topo/UiTopoLayout.java
@@ -17,6 +17,7 @@
package org.onosproject.ui.model.topo;
import org.onosproject.net.region.Region;
+import org.onosproject.net.region.RegionId;
/**
* Represents a specific "subset" of the UI model of the network topology
@@ -41,6 +42,11 @@
this.parent = parent;
}
+ @Override
+ public String toString() {
+ return "{UiTopoLayout: " + id + "}";
+ }
+
/**
* Returns the UI layout identifier.
*
@@ -51,7 +57,8 @@
}
/**
- * Returns the backing region with which this layout is associated.
+ * Returns the backing region with which this layout is associated. Note
+ * that this may be null (for the root layout).
*
* @return backing region
*/
@@ -60,6 +67,16 @@
}
/**
+ * Returns the identifier of the backing region. Will be null if the
+ * region is null.
+ *
+ * @return backing region identifier
+ */
+ public RegionId regionId() {
+ return region == null ? null : region.id();
+ }
+
+ /**
* Returns the parent layout identifier.
*
* @return parent layout identifier