Class ServiceNodeImpl

    • Constructor Detail

      • ServiceNodeImpl

        protected ServiceNodeImpl​(IdGroupingToken tokenId)
        Constructor
        Parameters:
        tokenId - contiguous id generation within this group for instances of this class
      • ServiceNodeImpl

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

      • getEntrySegmentsDownstreamPhysicalNodeStream

        protected Stream<Node> getEntrySegmentsDownstreamPhysicalNodeStream()
        Collect stream of downstream physical nodes of attached entry service leg segments (if any)
        Returns:
        the stream
      • getExitSegmentsUpstreamPhysicalNodeStream

        protected Stream<Node> getExitSegmentsUpstreamPhysicalNodeStream()
        Collect stream of upstream physical nodes of attached exit service leg segments (if any)
        Returns:
        the stream
      • getPosition

        public final org.locationtech.jts.geom.Point getPosition()
        Construct new position based on underlying physical node(s). If multiple physical nodes are used to represent this service node, the average position of each of them is returned. Unlike physical nodes, the position of service nodes does not live on the object instance, it is recreated every time the position is queried.
        Specified by:
        getPosition in interface Vertex
        Overrides:
        getPosition in class VertexImpl<Edge>
        Returns:
        newly inferred service 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<Edge>
        Parameters:
        position - the center point for a vertex
      • getPhysicalParentNodes

        public final Set<Node> getPhysicalParentNodes()
        Collect the physical nodes at the extremities of all underlying physical link segments. Since these can be different, these might result in multiple physical nodes rather than one
        Specified by:
        getPhysicalParentNodes in interface ServiceNode
        Returns:
        related network layer node(s)
      • hasPhysicalParentNodes

        public boolean hasPhysicalParentNodes()
        Description copied from interface: ServiceNode
        Verify if a physical parent node is linked to this service node
        Specified by:
        hasPhysicalParentNodes in interface ServiceNode
        Returns:
        true when present false otherwise
      • isMappedToPhysicalParentNode

        public boolean isMappedToPhysicalParentNode​(Node physicalParentNode)
        Verify if provided node is registered as a physical parent node of this service node
        Specified by:
        isMappedToPhysicalParentNode in interface ServiceNode
        Parameters:
        physicalParentNode - to verify
        Returns:
        true when registered, false otherwise