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/SwitchEvent.java b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/SwitchEvent.java
index dce0725..ea5b66d 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/SwitchEvent.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/SwitchEvent.java
@@ -5,7 +5,7 @@
 import java.util.List;
 
 /**
- * Self-contained Switch and Port event Object
+ * Self-contained Switch Object
  *
  * TODO: We probably want common base class/interface for Self-Contained Event Object
  *
@@ -13,8 +13,6 @@
 public class SwitchEvent {
     private final Long dpid;
 
-    private List<PortEvent> ports;
-
     /**
      * Default constructor.
      */
@@ -23,26 +21,13 @@
     }
 
     public SwitchEvent(Long dpid) {
-	this(dpid, new ArrayList<PortEvent>());
-    }
-
-    public SwitchEvent(Long dpid, List<PortEvent> ports) {
 	this.dpid = dpid;
-	this.ports = ports;
     }
 
     public Long getDpid() {
 	return dpid;
     }
 
-    public List<PortEvent> getPorts() {
-	return ports;
-    }
-
-    public void setPorts(List<PortEvent> ports) {
-	this.ports = ports;
-    }
-
     @Override
     public String toString() {
 	return "[SwitchEvent 0x" + Long.toHexString(dpid) + "]";