Class ServiceNodeImpl

    • Field Detail

      • networkNode

        protected Node networkNode
        underlying network node
    • Constructor Detail

      • ServiceNodeImpl

        protected ServiceNodeImpl​(IdGroupingToken tokenId,
                                  Node networkNode)
        Constructor
        Parameters:
        tokenId - contiguous id generation within this group for instances of this class
        networkNode - referenced by this service node
      • ServiceNodeImpl

        protected ServiceNodeImpl​(ServiceNodeImpl serviceNode)
        Copy constructor
        Parameters:
        serviceNode - to copy
    • Method Detail

      • setNetworkLayerNode

        protected void setNetworkLayerNode​(Node networkNode)
        Set the network layer node this service node refers to
        Parameters:
        networkNode - to use
      • addEdgeSegment

        public boolean addEdgeSegment​(EdgeSegment serviceLegSegment)
        Add edgeSegment, do not invoke when parsing networks, this connection is auto-populated before the assignment starts based on the edge segment vertices that have been registered.
        Specified by:
        addEdgeSegment in interface DirectedVertex
        Overrides:
        addEdgeSegment in class DirectedVertexImpl
        Parameters:
        serviceLegSegment - EdgeSegment object to be added
        Returns:
        true when added, false when already present (and not added)
      • getPosition

        public final org.locationtech.jts.geom.Point getPosition()
        Based on network node
        Specified by:
        getPosition in interface Vertex
        Overrides:
        getPosition in class VertexImpl
        Returns:
        network node position
      • setPosition

        public void setPosition​(org.locationtech.jts.geom.Point position)
        Description copied from class: VertexImpl
        #Set the center point geometry for a vertex
        Specified by:
        setPosition in interface Vertex
        Overrides:
        setPosition in class VertexImpl
        Parameters:
        position - the center point for a vertex
      • getParentNode

        public final Node getParentNode()
        Collect the network layer node this service node relates to
        Specified by:
        getParentNode in interface ServiceNode
        Returns:
        related network layer node