Network Graph Refactoring: WIP: extract the events by canceling matching events

 * Extract the events by canceling matching events
 * Don't embed the PortEvent inside the SwitchEvent, because with such
   with such embedding we cannot handle events reordering. E.g.,
   If ADD(SwitchEvent) with embedded ADD(PortEvent) is followed by
   REMOVE(PortEvent), then reordering of those two events is problematic
   and cannot be detected easily.

 * Adjust some of the API to reflect the removal of the embedded
  PortEvent events within the SwitchEvent.

 * Renamed TopologyManage.loadWholeTopologyFromDB() to
   readWholeTopologyFromDB() and change its implementation to
   return a collection of Topology Events.
   Not used for now.

Change-Id: I456514e1ef997c5b50684448193fe47d7a46b141
diff --git a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraphDiscoveryInterface.java b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraphDiscoveryInterface.java
index 87edb28..cabcd38 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraphDiscoveryInterface.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraphDiscoveryInterface.java
@@ -1,5 +1,7 @@
 package net.onrc.onos.ofcontroller.networkgraph;
 
+import java.util.Collection;
+
 /**
  * Interface used by the Topology Discovery module to write topology-related
  * events.
@@ -9,8 +11,10 @@
      * Switch discovered event.
      *
      * @param switchEvent the switch event.
+     * @param portEvents the corresponding port events for the switch.
      */
-    public void putSwitchDiscoveryEvent(SwitchEvent switchEvent);
+    public void putSwitchDiscoveryEvent(SwitchEvent switchEvent,
+					Collection<PortEvent> portEvents);
 
     /**
      * Switch removed event.