Class UpdateConnectoidsOnVertexRemovalHandler

  • All Implemented Interfaces:
    EventListener, EventListener, DirectedGraphModifierListener, GraphModifierListener

    public class UpdateConnectoidsOnVertexRemovalHandler
    extends Object
    implements DirectedGraphModifierListener
    A listener designed to deal with the situation that sub graphs are removed from the network which leaves connectoids in the zoning that reference these sub graph elements invalid. This listener should be used to register on the DirectedGraphModifier before any call to GraphModifier.removeSubGraph in which case callbacks are triggered which allow this instance to update the connectoids, i.e., remove any affected connectoids that are no longer valid.
    Author:
    markr
    • Field Detail

      • zoning

        protected final Zoning zoning
        zoning to update zoning components when needed
    • Constructor Detail

      • UpdateConnectoidsOnVertexRemovalHandler

        public UpdateConnectoidsOnVertexRemovalHandler​(Zoning zoning)
        constructor
        Parameters:
        zoning - to use
    • Method Detail

      • initialiseIndices

        protected void initialiseIndices()
        initialise indices used
      • removeConnectoidsWithAccessVertex

        protected void removeConnectoidsWithAccessVertex​(Vertex vertex)
        Remove connectoids for the given access vertex
        Parameters:
        vertex - to remove connectoids for
      • afterSubGraphRemovalComplete

        protected void afterSubGraphRemovalComplete()
        finalise subgraph removal for the connectoids by recreating the connectoid ids
      • getKnownSupportedEventTypes

        public EventType[] getKnownSupportedEventTypes()
        Collect explicitly supported event types that are known. When not defined the user has to explicitly provide them upon registering the listener on an event producer, otherwise they can be extracted from here
        Specified by:
        getKnownSupportedEventTypes in interface EventListener
        Returns:
        the supported event types