Oracle Application Server Wireless Java API Reference
B10400-01

oracle.panama.spatial.router
Interface Router


public interface Router

This interface defines routing service providers. Any class implementing this interface should be thread-safe.


Method Summary
 RoutingResult computeRoute(Location source, Location destination, Location[] viaPoints, RoutingSettings opt, java.util.Locale locale)
          This function computes a route from a start address to an end address, possibly including via points.
 RoutingResult computeRoute(Point source, Point destination, Point[] viaPoints, RoutingSettings opt, java.util.Locale locale)
          This function computes a route from a start point to an end point, possibly including via points.
 Ranking rankByDrivingDistance(Point source, Point[] locations)
          This function ranks an array of Point objects by driving distance from a common source Point.
 java.lang.String xmlRoute(org.w3c.dom.Document xmlRequest)
          This function performs routing based on an XML request (eLocation XML).

 

Method Detail

computeRoute

public RoutingResult computeRoute(Point source,
Point destination,
Point[] viaPoints,
RoutingSettings opt,
                                  java.util.Locale locale)
This function computes a route from a start point to an end point, possibly including via points. This function MUST be implemented by each provider proxy. It is part of the required core functionality. Any provider not supporting this function might have serious restrictions in supporting any reasonable application. At the very least, such a "lacking" provider proxy could not be used as a "primary" provider. However, fail-over guarantees that applications would work if this function is covered by at least one provider proxy.
Parameters:
source - a Point object representing the start point
destination - a Point object representing the end point
viaPoints - an array of Point objects representing the via points (might be null)
opt - a RoutingSettings object representing the detail options for routing, such as whether a routing map is requested
locale - a Locale object that might be used to affect the language of the result text or other settings (often, this Locale might not affect the result)
Returns:
a RoutingResult object

computeRoute

public RoutingResult computeRoute(Location source,
Location destination,
Location[] viaPoints,
RoutingSettings opt,
                                  java.util.Locale locale)
This function computes a route from a start address to an end address, possibly including via points. This function MAY be implemented by a provider proxy. It is part of the optional functionality and some provider proxies do support it.
Parameters:
source - a Location object representing the start address
destination - a Location object representing the end address
viaPoints - an array of Location objects representing the via addresses (might be null)
opt - a RoutingSettings object representing the detail options for routing, such as whether a routing map is requested
locale - a Locale object that might be used to affect the language of the result text or other settings (often, this Locale might not affect the result)
Returns:
a RoutingResult object

rankByDrivingDistance

public Ranking rankByDrivingDistance(Point source,
Point[] locations)
This function ranks an array of Point objects by driving distance from a common source Point. This function MAY be implemented by a provider proxy. It is part of the optional functionality and some provider proxies do support it.
Parameters:
source - a Point representing the common source
locations - an array of Point objects representing the list to be sorted (ranked)
Returns:
a Ranking object containing the sorted result

xmlRoute

public java.lang.String xmlRoute(org.w3c.dom.Document xmlRequest)
This function performs routing based on an XML request (eLocation XML). This function IS NOT TO BE implemented by any provider proxy. It is performed by the framework itself and translated to other functions.
Parameters:
xmlRequest - a Document object representing the XMl document of the routing request.
Returns:
a String representing the XMl String of the routing response.

Oracle Application Server Wireless Java API Reference
B10400-01

Copyright © 2003 Oracle Corporation. All Rights Reserved.