Interface RouteMetadataSource
- All Known Implementing Classes:
CompositeRouteMetadataSource,RouteDistanceAndTimeCache
public interface RouteMetadataSource
Provides
DistanceAndTime metadata for a Route, keyed by its URL.
Sources are queried in priority order via CompositeRouteMetadataSource:
the session-scoped RouteDistanceAndTimeCache first, since values routed by
the client overwrite server-provided ones; then the server metadata from the
catalog XML attributes (specs/00055), which shows before a route is opened.- Author:
- Christian Pesch
-
Method Summary
Modifier and TypeMethodDescriptiongetDistanceAndTime(String url) Returns the known distance and time for the route with the given URL.static booleanhasNoDistance(DistanceAndTime distanceAndTime) The single definition of a missing distance shared by the routes table renderer (which shows–) and the length comparator (which sorts such rows last): no metadata at all, no distance or a non-positive distance all count as missing.static booleanhasNoTime(DistanceAndTime distanceAndTime) The single definition of a missing duration shared by the routes table renderer (which shows–) and the duration comparator (which sorts such rows last): no metadata at all, no time or a non-positive time all count as missing.
-
Method Details
-
getDistanceAndTime
Returns the known distance and time for the route with the given URL.- Parameters:
url- the URL of the route- Returns:
- the distance and time or null if this source does not know the route
-