Interface ServiceLegSegment

    • Method Detail

      • getParent

        ServiceLeg getParent()
        Return the parent leg of this leg segment
        Specified by:
        getParent in interface EdgeSegment
        Returns:
        leg instance which is the parent of this leg segment
      • getGeometry

        org.locationtech.jts.geom.LineString getGeometry()
        Collect the geometry of this service leg segment. Because service leg segments comprise one or more physical link segments, they may have unique geometry compared to their opposite direction counterpart. Therefore, they are expected to be able to provide their own unique access to their geometry rather than rely on their parent, also this may be generated on the fly rather than stored on the instance
        Returns:
        lineString
      • deepClone

        ServiceLegSegment deepClone()
        An id entity should always support a deep copy, i.e., all "owned" members will be deep copied when a clone of this instance is created via this call. To be used with caution if not called by managed id container related code
        Specified by:
        deepClone in interface EdgeSegment
        Specified by:
        deepClone in interface GraphEntity
        Specified by:
        deepClone in interface IdAble
        Returns:
        deep copy of entity
      • getUpstreamServiceNode

        default ServiceNode getUpstreamServiceNode()
        Get the segment's upstream service node
        Returns:
        upstream vertex
      • getDownstreamServiceNode

        default ServiceNode getDownstreamServiceNode()
        Get the segment's downstream vertex
        Returns:
        downstream service node
      • hasGeometry

        default boolean hasGeometry()
        Description copied from interface: EdgeSegment
        verify if geometry is present based on parent's geometry
        Specified by:
        hasGeometry in interface EdgeSegment
        Returns:
        true when parent has geometry, false otherwise
      • getPhysicalParentSegments

        List<? extends LinkSegment> getPhysicalParentSegments()
        Collect the links that make up this leg ordered and in direction from A to B
        Returns:
        parent links this leg represents
      • setPhysicalParentSegments

        void setPhysicalParentSegments​(List<? extends LinkSegment> networkLayerLinkSegments)
        Set the network layer links that make up this leg irrespective wether they have been set before. Use with caution
        Parameters:
        networkLayerLinkSegments - to use
      • hasPhysicalParentSegments

        default boolean hasPhysicalParentSegments()
        verify if any physical parent leg segments are registered for this service leg segment
        Returns:
        true when present false otherwise
      • getFirstPhysicalLinkSegment

        default LinkSegment getFirstPhysicalLinkSegment()
        Collect the first physical link underpinning the service leg route
        Returns:
        first parent link
      • getLastPhysicalLinkSegment

        default LinkSegment getLastPhysicalLinkSegment()
        Collect the last parent link
        Returns:
        last parent link