com.sap.tc.webdynpro.clientserver.uielib.graphics.api

Interface IWDGeoRouter


public interface IWDGeoRouter

This interface provides geo routing services.

A route denotes the complete itinerary from start to end. A part is a fragment of the itenary between two stops, a segment is a fragment of a path that follows a street or road. GEO ROUTING IS ONLY FUNCTIONAL IF AN IGS WITH ADDITIONAL GEO-SERVICES IS INSTALLED.

Type Classification Type Classification:

This interface is part of the Web Dynpro API, so applications may reference it or call any method of it, but they must not implement or extend it.

For a detailed explanation of API classification see the Web Dynpro Compatibility Guide

Method Summary
 void addProperty(String name, String value)
          Adds a property to the route.
 void addStop(String id, String description, WDGeoPosition wdPosition)
          Adds a stop to the route, e.g. the start or end.
 void addStop(WDGeoRouterStop wdStop)
          Adds a stop to the route, e.g. the start or end.
 void clearAll()
          Clears all paramters of the geo router.
 void execute()
          Calculates the route.
 String getErrors()
          Returns any errors that occured during the processing of the route.
 WDGeoBorder getPartBorder(int partIndex)
          Returns the geo border of a part.
 int getPartCount()
          Returns the part count of the route, usually the number of stops minus one.
 String getPartDescription(int partIndex)
          Returns the description of a part in the language determined by setLanguage.
 double getPartDistance(int partIndex)
          Returns the distance of a part.
 double getPartDuration(int partIndex)
          Returns the duration of a part.
 List getPartPath(int partIndex)
          Returns the path of WDGeoPositions of a part.
 WDGeoBorder getRouteBorder()
          Returns the border of the whole route.
 String getRouteDescription()
          Returns the description of the whole route.
 double getRouteDistance()
          Returns the distance of the whole route.
 double getRouteDuration()
          Returns the duration of the whole route.
 List getRoutePath()
          Returns the path of WDGeoPositions of the whole route.
 int getSegmentCount(int partIndex)
          Returns the number of segments of a part.
 String getSegmentDescription(int partIndex, int segmentIndex)
          Returns the description of a segment in the language determined by setLanguage.
 double getSegmentDistance(int partIndex, int segmentIndex)
          Returns the distance of a segment.
 double getSegmentDuration(int partIndex, int segmentIndex)
          Returns the duration of a segment.
 List getSegmentPath(int partIndex, int segmentIndex)
          Returns the path of WDGeoPositions of a segment.
 void setIgsUrl(URL igsURL)
          Set the URL of the IGS that provides the GIS services
 void setLanguage(String language)
          Sets the desired language for descriptions.
 void setQuickest()
          Calculate the quickest route.
 void setShortest()
          Calculate the shortest route.
 

Method Detail

setIgsUrl

public void setIgsUrl(URL igsURL)
Set the URL of the IGS that provides the GIS services


clearAll

public void clearAll()
Clears all paramters of the geo router.


execute

public void execute()
Calculates the route.


getErrors

public String getErrors()
Returns any errors that occured during the processing of the route.


addStop

public void addStop(String id,
                    String description,
                    WDGeoPosition wdPosition)
Adds a stop to the route, e.g. the start or end.


addStop

public void addStop(WDGeoRouterStop wdStop)
Adds a stop to the route, e.g. the start or end.


addProperty

public void addProperty(String name,
                        String value)
Adds a property to the route. A property stands for extra information that the geo service might need to process the route. The two most popular properties are already covered by setQuickest and setShortest.


setQuickest

public void setQuickest()
Calculate the quickest route.


setShortest

public void setShortest()
Calculate the shortest route.


setLanguage

public void setLanguage(String language)
Sets the desired language for descriptions.


getPartCount

public int getPartCount()
Returns the part count of the route, usually the number of stops minus one.


getPartBorder

public WDGeoBorder getPartBorder(int partIndex)
Returns the geo border of a part.


getPartDistance

public double getPartDistance(int partIndex)
Returns the distance of a part.


getPartDuration

public double getPartDuration(int partIndex)
Returns the duration of a part.

Returns:
min.sec

getPartDescription

public String getPartDescription(int partIndex)
Returns the description of a part in the language determined by setLanguage.

See Also:
setLanguage(java.lang.String)

getPartPath

public List getPartPath(int partIndex)
Returns the path of WDGeoPositions of a part.

Returns:
a list WDGeoPositions

getSegmentCount

public int getSegmentCount(int partIndex)
Returns the number of segments of a part.


getSegmentDistance

public double getSegmentDistance(int partIndex,
                                 int segmentIndex)
Returns the distance of a segment.


getSegmentDuration

public double getSegmentDuration(int partIndex,
                                 int segmentIndex)
Returns the duration of a segment.

Returns:
min.sec

getSegmentDescription

public String getSegmentDescription(int partIndex,
                                    int segmentIndex)
Returns the description of a segment in the language determined by setLanguage.

See Also:
setLanguage(java.lang.String)

getSegmentPath

public List getSegmentPath(int partIndex,
                           int segmentIndex)
Returns the path of WDGeoPositions of a segment.

Returns:
a list WDGeoPositions

getRouteBorder

public WDGeoBorder getRouteBorder()
Returns the border of the whole route.


getRouteDistance

public double getRouteDistance()
Returns the distance of the whole route.

Returns:
distance

getRouteDuration

public double getRouteDuration()
Returns the duration of the whole route.

Returns:
min.sec

getRouteDescription

public String getRouteDescription()
Returns the description of the whole route. Note: this is not the concatenated description ot the parts but an optional total description. To obtain a detailed description of the route, request the descriptions of the parts.

See Also:
getPartDescription(int)

getRoutePath

public List getRoutePath()
Returns the path of WDGeoPositions of the whole route.

Returns:
a list of WDGeoPositions


Copyright 2006 SAP AG Complete Copyright Notice