Class ConnectoidEdgeImpl

    • Field Detail

      • connectoidEdgeId

        protected long connectoidEdgeId
        unique internal identifier across connectoid edges
    • Constructor Detail

      • ConnectoidEdgeImpl

        protected ConnectoidEdgeImpl​(IdGroupingToken groupId,
                                     CentroidVertex centroidA,
                                     DirectedVertex vertexB,
                                     double length)
        Constructor
        Parameters:
        groupId - contiguous id generation within this group for instances of this class
        centroidA - the centroidVertex at one end of the connectoid
        vertexB - the vertex at the other end of the connectoid
        length - length of the current connectoid
      • ConnectoidEdgeImpl

        protected ConnectoidEdgeImpl​(ConnectoidEdgeImpl other,
                                     boolean deepCopy)
        Copy constructor
        Parameters:
        other - to copy
        deepCopy - when true, create a deep copy, shallow copy otherwise
    • Method Detail

      • generateConnectoidEdgeId

        protected static long generateConnectoidEdgeId​(IdGroupingToken tokenId)
        Generate connectoid id
        Parameters:
        tokenId - contiguous id generation within this group for instances of this class
        Returns:
        id of connectoid edge
      • setConnectoidEdgeId

        protected void setConnectoidEdgeId​(long connectoidEdgeId)
        Set the connectoidEdgeId
        Parameters:
        connectoidEdgeId - to set
      • recreateConnectoidEdgeId

        protected long recreateConnectoidEdgeId​(IdGroupingToken tokenId)
        recreate the internal connectoid edge id and set it
        Parameters:
        tokenId - to use
        Returns:
        updated id
      • populateGeometry

        public boolean populateGeometry​(boolean overwrite)
        Utilising the A and B vertex construct a direct line between the two points as the geometry. In case the centroid vertex has no geometry, we try to construct the closes projected point ont the parent zone's geometry instead.
        Parameters:
        overwrite - when true, overwrite existing geometry, otherwise ignore
        Returns:
        true when successful, false otherwise
      • recreateManagedIds

        public long recreateManagedIds​(IdGroupingToken tokenId)
        Recreate internal ids: id and connectoid edge id
        Specified by:
        recreateManagedIds in interface ManagedId
        Overrides:
        recreateManagedIds in class GraphEntityImpl
        Parameters:
        tokenId - to use (may be null in case managed id entity does not rely on token to recreate its managed id(s))
        Returns:
        recreated id
      • registerConnectoidSegment

        public ConnectoidSegment registerConnectoidSegment​(ConnectoidSegment connectoidSegment,
                                                           boolean directionAB)
        Register connectoidSegment. If there already exists a connectoidSegment for that direction it is replaced and returned
        Specified by:
        registerConnectoidSegment in interface ConnectoidEdge
        Parameters:
        connectoidSegment - connectoid segment to be registered
        directionAB - direction of travel
        Returns:
        replaced ConnectoidSegment
      • getConnectoidEdgeId

        public long getConnectoidEdgeId()
        Return the unique id of this connectoid edge
        Specified by:
        getConnectoidEdgeId in interface ConnectoidEdge
        Returns:
        id of this connectoid edge