ONOS-4971: Synthetic Link Data -- WIP

- Breaking out UiLink to subclasses for device links, host links, region links, region-device links,
    - (soon, also peer links).
- Augmenting UiLinkId to include regions as endpoints.
- Introduced UiSynthLink to encapsulate synthetic links bound to regions.
- Model Cache now computes synthetic links from the underlying link data.
- Added endPointA/B() and type() methods to UiLink.
- Updated topo2CurrentRegion response to include synth-links for the region.

Change-Id: Ifa62a15fbe0a58b134d92278b201fa7a72cbfa83
diff --git a/core/api/src/main/java/org/onosproject/ui/model/topo/UiRegion.java b/core/api/src/main/java/org/onosproject/ui/model/topo/UiRegion.java
index b3185f1..87d5036 100644
--- a/core/api/src/main/java/org/onosproject/ui/model/topo/UiRegion.java
+++ b/core/api/src/main/java/org/onosproject/ui/model/topo/UiRegion.java
@@ -53,7 +53,6 @@
     // loose bindings to things in this region
     private final Set<DeviceId> deviceIds = new HashSet<>();
     private final Set<HostId> hostIds = new HashSet<>();
-    private final Set<UiLinkId> uiLinkIds = new HashSet<>();
 
     private final List<String> layerOrder = new ArrayList<>();
 
@@ -84,7 +83,6 @@
     protected void destroy() {
         deviceIds.clear();
         hostIds.clear();
-        uiLinkIds.clear();
     }
 
     /**
@@ -135,6 +133,15 @@
     }
 
     /**
+     * Returns the UI region that is the parent of this region.
+     *
+     * @return the parent region
+     */
+    public UiRegion parentRegion() {
+        return topology.findRegion(parent);
+    }
+
+    /**
      * Sets the parent ID for this region.
      *
      * @param parentId parent ID
@@ -192,7 +199,6 @@
                 .add("kids", kids)
                 .add("devices", deviceIds)
                 .add("#hosts", hostIds.size())
-                .add("#links", uiLinkIds.size())
                 .toString();
     }
 
@@ -252,24 +258,6 @@
     }
 
     /**
-     * Returns the set of link identifiers for this region.
-     *
-     * @return link identifiers for this region
-     */
-    public Set<UiLinkId> linkIds() {
-        return ImmutableSet.copyOf(uiLinkIds);
-    }
-
-    /**
-     * Returns the links in this region.
-     *
-     * @return the links in this region
-     */
-    public Set<UiLink> links() {
-        return topology.linkSet(uiLinkIds);
-    }
-
-    /**
      * Returns the order in which layers should be rendered. Lower layers
      * come earlier in the list. For example, to indicate that nodes in the
      * optical layer should be rendered "below" nodes in the packet layer,