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/web/gui/src/main/java/org/onosproject/ui/impl/topo/Topo2ViewMessageHandler.java b/web/gui/src/main/java/org/onosproject/ui/impl/topo/Topo2ViewMessageHandler.java
index 7795271..86d54cc 100644
--- a/web/gui/src/main/java/org/onosproject/ui/impl/topo/Topo2ViewMessageHandler.java
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/topo/Topo2ViewMessageHandler.java
@@ -26,6 +26,7 @@
 import org.onosproject.ui.model.topo.UiClusterMember;
 import org.onosproject.ui.model.topo.UiNode;
 import org.onosproject.ui.model.topo.UiRegion;
+import org.onosproject.ui.model.topo.UiSynthLink;
 import org.onosproject.ui.model.topo.UiTopoLayout;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -125,7 +126,8 @@
             //   (as well as layer-order hints)
             UiRegion region = topoSession.getRegion(currentLayout);
             Set<UiRegion> kids = topoSession.getSubRegions(currentLayout);
-            sendMessage(CURRENT_REGION, t2json.region(region, kids));
+            List<UiSynthLink> links = topoSession.getLinks(currentLayout);
+            sendMessage(CURRENT_REGION, t2json.region(region, kids, links));
 
             // these are the regions/devices that are siblings to this region
             Set<UiNode> peers = topoSession.getPeerNodes(currentLayout);
@@ -133,6 +135,8 @@
             peersPayload.set("peers", t2json.closedNodes(peers));
             sendMessage(PEER_REGIONS, peersPayload);
 
+            // TODO: send breadcrumb message
+
             // finally, tell the UI that we are done : TODO review / delete??
             sendMessage(TOPO_START_DONE, null);