com.mapquest
Class RouteOptions

java.lang.Object
  extended bycom.mapquest.MQObject
      extended bycom.mapquest.RouteOptions
All Implemented Interfaces:
java.lang.Cloneable

public class RouteOptions
extends MQObject

This class is used to set various options that will affect the type of route result returned from the DoRoute function.

See Also:
AutoRouteCovSwitch, IntCollection, DistanceUnits, NarrativeType, RouteType, StringCollection

Field Summary
static java.lang.String AVOID_ATTRIBUTE_FERRY
           
static java.lang.String AVOID_ATTRIBUTE_LIMITED_ACCESS
           
static java.lang.String AVOID_ATTRIBUTE_SEASONAL
           
static java.lang.String AVOID_ATTRIBUTE_TOLL_ROAD
           
static java.lang.String AVOID_ATTRIBUTE_UNPAVED_ROAD
           
static int CLASS_ID
           
static java.lang.String CLASS_NAME
           
static java.lang.String LANGUAGE_BRITISH_ENGLISH
           
static java.lang.String LANGUAGE_DANISH
           
static java.lang.String LANGUAGE_DUTCH
           
static java.lang.String LANGUAGE_ENGLISH
           
static java.lang.String LANGUAGE_FRENCH
           
static java.lang.String LANGUAGE_GERMAN
           
static java.lang.String LANGUAGE_IBERIAN_PORTUGUESE
           
static java.lang.String LANGUAGE_IBERIAN_SPANISH
           
static java.lang.String LANGUAGE_ITALIAN
           
static java.lang.String LANGUAGE_NORWEGIAN
           
static java.lang.String LANGUAGE_SPANISH
           
static java.lang.String LANGUAGE_SWEDISH
           
static java.lang.String szAttr_Ferry
          Deprecated. Use AVOID_ATTRIBUTE_FERRY instead.
static java.lang.String szAttr_LimitedAccess
          Deprecated. Use AVOID_ATTRIBUTE_LIMITED_ACCESS instead.
static java.lang.String szAttr_Seasonal
          Deprecated. Use AVOID_ATTRIBUTE_SEASONAL instead.
static java.lang.String szAttr_TollRoad
          Deprecated. Use AVOID_ATTRIBUTE_TOLL_ROAD instead.
static java.lang.String szAttr_UnpavedRoad
          Deprecated. Use AVOID_ATTRIBUTE_UNPAVED_ROAD instead.
static java.lang.String szLanguage_BritishEnglish
          Deprecated. Use LANGUAGE_BRITISH_ENGLISH instead.
static java.lang.String szLanguage_Danish
          Deprecated. Use LANGUAGE_DANISH instead.
static java.lang.String szLanguage_Dutch
          Deprecated. Use LANGUAGE_DUTCH instead.
static java.lang.String szLanguage_English
          Deprecated. Use LANGUAGE_ENGLISH instead.
static java.lang.String szLanguage_French
          Deprecated. Use LANGUAGE_FRENCH instead.
static java.lang.String szLanguage_German
          Deprecated. Use LANGUAGE_GERMAN instead.
static java.lang.String szLanguage_Iberian_Portuguese
          Deprecated. Use LANGUAGE_IBERIAN_PORTUGUESE instead.
static java.lang.String szLanguage_Iberian_Spanish
          Deprecated. Use LANGUAGE_IBERIAN_SPANISH instead.
static java.lang.String szLanguage_Italian
          Deprecated. Use LANGUAGE_ITALIAN instead.
static java.lang.String szLanguage_Norwegian
          Deprecated. Use LANGUAGE_NORWEGIAN instead.
static java.lang.String szLanguage_Spanish
          Deprecated. Use LANGUAGE_SPANISH instead.
static java.lang.String szLanguage_Swedish
          Deprecated. Use LANGUAGE_SWEDISH instead.
 
Fields inherited from class com.mapquest.MQObject
DEFAULT_ID, DEFAULT_NAME, DEFAULT_VERSION, FORMAT_NUMERIC_ID, FORMAT_TEXT_NAME, INVALID_ID, INVALID_NAME, INVALID_VERSION
 
Constructor Summary
RouteOptions()
          default constructor.
 
Method Summary
 boolean equals(java.lang.Object otherObject)
          Compares this object to the specified object.
 IntCollection getAvoidAbsoluteGefIdList()
          Returns the IntCollection containing the GEFIDs to absolutely avoid.
 StringCollection getAvoidAttributeList()
          Returns the StringCollection containing the attributes to avoid.
 IntCollection getAvoidGefIdList()
          Returns the IntCollection containing the GEFIDs to try to avoid.
 int getClassId()
          Returns the numeric id of this class.
 java.lang.String getClassName()
          Returns the text name of this class.
 boolean getCountryBoundaryDisplay()
          Gets the Country boundary display flag.
 java.lang.String getCoverageName()
          Get the coverage name of the routing data to use takes precedence over CovSwitcher
 AutoRouteCovSwitch getCovSwitcher()
          Returns a AutoRouteCovSwitch object, which when selected will use the name specified in this object to select a Route data selector to automatically select a valid coverage to route on.
 java.lang.String getLanguage()
          Returns the language set for this RouteOptions object.
 int getMaxGEFIDsPerManeuver()
          Returns the maximum number of GEFIDs for the route options.
 int getMaxShapePointsPerManeuver()
          Returns the maximum number of shape points for the route options.
 DistanceUnits getNarrativeDistanceUnitType()
          Returns the narrative distance unit type.
 NarrativeType getNarrativeType()
          Returns the narrative type.
 RouteType getRouteType()
          Returns the route type.
 boolean getStateBoundaryDisplay()
          Gets the state boundary display flag.
 int hashCode()
          Returns a hash code for this RouteOptions.
 void init()
          Initializes object.
 void setAvoidAbsoluteGefIdList(IntCollection list)
          Sets the member for the list containing the GEFIDs to ABSOLUTELY avoid when performing a route.
 void setAvoidAttributeList(StringCollection list)
          Sets the member for the list containing the attributes to avoid when performing a route.
 void setAvoidGefIdList(IntCollection list)
          Sets the member for the list containing the GEFIDs to TRY TO avoid when performing a route.
 void setCountryBoundaryDisplay(boolean bFlag)
          Sets the Country boundary display flag.
 void setCoverageName(java.lang.String newCoverageName)
          Set the coverage name of the routing data to use takes precedence over CovSwitcher
 void setCovSwitcher(AutoRouteCovSwitch switcher)
          Set the member AutoRouteCovSwitch object, which when selected will use the name specified in this object to select a Route data selector to automatically select a valid coverage to route on.
 void setLanguage(java.lang.String strLanguage)
          Sets the language for the server to use on a route narrative.
 void setMaxGEFIDsPerManeuver(int nCount)
          Sets the maximum number of GEFIDs for the server to return from the route.
 void setMaxShapePointsPerManeuver(int nCount)
          Sets the maximum number of shape points for the server to return from the route.
 void setNarrativeDistanceUnitType(DistanceUnits narrativeDistanceUnitType)
          Sets the narrative distance unit type.
 void setNarrativeType(NarrativeType nNarrTypeFlag)
          Sets the narrative type.
 void setRouteType(RouteType nRouteTypeFlag)
          Sets the route type.
 void setStateBoundaryDisplay(boolean bFlag)
          Sets the state boundary display flag.
 
Methods inherited from class com.mapquest.MQObject
clone, getFormat, getIdWithVersion, getNameWithVersion, getObjectVersion, getTypeId, getTypeName, getVerboseConsoleOutput, setFormat, setObjectVersion, setVerboseConsoleOutput, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_ID

public static final int CLASS_ID
See Also:
Constant Field Values

CLASS_NAME

public static final java.lang.String CLASS_NAME
See Also:
Constant Field Values

szAttr_LimitedAccess

public static final java.lang.String szAttr_LimitedAccess
Deprecated. Use AVOID_ATTRIBUTE_LIMITED_ACCESS instead.

See Also:
Constant Field Values

szAttr_TollRoad

public static final java.lang.String szAttr_TollRoad
Deprecated. Use AVOID_ATTRIBUTE_TOLL_ROAD instead.

See Also:
Constant Field Values

szAttr_Ferry

public static final java.lang.String szAttr_Ferry
Deprecated. Use AVOID_ATTRIBUTE_FERRY instead.

See Also:
Constant Field Values

szAttr_UnpavedRoad

public static final java.lang.String szAttr_UnpavedRoad
Deprecated. Use AVOID_ATTRIBUTE_UNPAVED_ROAD instead.

See Also:
Constant Field Values

szAttr_Seasonal

public static final java.lang.String szAttr_Seasonal
Deprecated. Use AVOID_ATTRIBUTE_SEASONAL instead.

See Also:
Constant Field Values

AVOID_ATTRIBUTE_LIMITED_ACCESS

public static final java.lang.String AVOID_ATTRIBUTE_LIMITED_ACCESS
See Also:
Constant Field Values

AVOID_ATTRIBUTE_TOLL_ROAD

public static final java.lang.String AVOID_ATTRIBUTE_TOLL_ROAD
See Also:
Constant Field Values

AVOID_ATTRIBUTE_FERRY

public static final java.lang.String AVOID_ATTRIBUTE_FERRY
See Also:
Constant Field Values

AVOID_ATTRIBUTE_UNPAVED_ROAD

public static final java.lang.String AVOID_ATTRIBUTE_UNPAVED_ROAD
See Also:
Constant Field Values

AVOID_ATTRIBUTE_SEASONAL

public static final java.lang.String AVOID_ATTRIBUTE_SEASONAL
See Also:
Constant Field Values

szLanguage_English

public static final java.lang.String szLanguage_English
Deprecated. Use LANGUAGE_ENGLISH instead.

See Also:
Constant Field Values

szLanguage_French

public static final java.lang.String szLanguage_French
Deprecated. Use LANGUAGE_FRENCH instead.

See Also:
Constant Field Values

szLanguage_German

public static final java.lang.String szLanguage_German
Deprecated. Use LANGUAGE_GERMAN instead.

See Also:
Constant Field Values

szLanguage_Italian

public static final java.lang.String szLanguage_Italian
Deprecated. Use LANGUAGE_ITALIAN instead.

See Also:
Constant Field Values

szLanguage_Spanish

public static final java.lang.String szLanguage_Spanish
Deprecated. Use LANGUAGE_SPANISH instead.

See Also:
Constant Field Values

szLanguage_Danish

public static final java.lang.String szLanguage_Danish
Deprecated. Use LANGUAGE_DANISH instead.

See Also:
Constant Field Values

szLanguage_Dutch

public static final java.lang.String szLanguage_Dutch
Deprecated. Use LANGUAGE_DUTCH instead.

See Also:
Constant Field Values

szLanguage_Norwegian

public static final java.lang.String szLanguage_Norwegian
Deprecated. Use LANGUAGE_NORWEGIAN instead.

See Also:
Constant Field Values

szLanguage_Swedish

public static final java.lang.String szLanguage_Swedish
Deprecated. Use LANGUAGE_SWEDISH instead.

See Also:
Constant Field Values

szLanguage_Iberian_Spanish

public static final java.lang.String szLanguage_Iberian_Spanish
Deprecated. Use LANGUAGE_IBERIAN_SPANISH instead.

See Also:
Constant Field Values

szLanguage_BritishEnglish

public static final java.lang.String szLanguage_BritishEnglish
Deprecated. Use LANGUAGE_BRITISH_ENGLISH instead.

See Also:
Constant Field Values

szLanguage_Iberian_Portuguese

public static final java.lang.String szLanguage_Iberian_Portuguese
Deprecated. Use LANGUAGE_IBERIAN_PORTUGUESE instead.

See Also:
Constant Field Values

LANGUAGE_ENGLISH

public static final java.lang.String LANGUAGE_ENGLISH
See Also:
Constant Field Values

LANGUAGE_FRENCH

public static final java.lang.String LANGUAGE_FRENCH
See Also:
Constant Field Values

LANGUAGE_GERMAN

public static final java.lang.String LANGUAGE_GERMAN
See Also:
Constant Field Values

LANGUAGE_ITALIAN

public static final java.lang.String LANGUAGE_ITALIAN
See Also:
Constant Field Values

LANGUAGE_SPANISH

public static final java.lang.String LANGUAGE_SPANISH
See Also:
Constant Field Values

LANGUAGE_DANISH

public static final java.lang.String LANGUAGE_DANISH
See Also:
Constant Field Values

LANGUAGE_DUTCH

public static final java.lang.String LANGUAGE_DUTCH
See Also:
Constant Field Values

LANGUAGE_NORWEGIAN

public static final java.lang.String LANGUAGE_NORWEGIAN
See Also:
Constant Field Values

LANGUAGE_SWEDISH

public static final java.lang.String LANGUAGE_SWEDISH
See Also:
Constant Field Values

LANGUAGE_IBERIAN_SPANISH

public static final java.lang.String LANGUAGE_IBERIAN_SPANISH
See Also:
Constant Field Values

LANGUAGE_BRITISH_ENGLISH

public static final java.lang.String LANGUAGE_BRITISH_ENGLISH
See Also:
Constant Field Values

LANGUAGE_IBERIAN_PORTUGUESE

public static final java.lang.String LANGUAGE_IBERIAN_PORTUGUESE
See Also:
Constant Field Values
Constructor Detail

RouteOptions

public RouteOptions()
default constructor.

Method Detail

init

public void init()
Initializes object.

Overrides:
init in class MQObject

getClassId

public int getClassId()
Returns the numeric id of this class.

Overrides:
getClassId in class MQObject
Returns:
the numeric id of this class.

getClassName

public java.lang.String getClassName()
Returns the text name of this class.

Overrides:
getClassName in class MQObject
Returns:
the text name of this class.

setRouteType

public void setRouteType(RouteType nRouteTypeFlag)
Sets the route type. Valid values include values of this object Starting with nRouteType_.

Parameters:
nRouteTypeFlag - int valid value for the route type.

getRouteType

public RouteType getRouteType()
Returns the route type.


setNarrativeType

public void setNarrativeType(NarrativeType nNarrTypeFlag)
Sets the narrative type. Valid values include values of this object Starting with nNarrType_.

Parameters:
nNarrTypeFlag - int valid value for the narrative type.

getNarrativeType

public NarrativeType getNarrativeType()
Returns the narrative type.


setNarrativeDistanceUnitType

public void setNarrativeDistanceUnitType(DistanceUnits narrativeDistanceUnitType)
Sets the narrative distance unit type.

Parameters:
narrativeDistanceUnitType - narrative distance unit type.

getNarrativeDistanceUnitType

public DistanceUnits getNarrativeDistanceUnitType()
Returns the narrative distance unit type.


setMaxShapePointsPerManeuver

public void setMaxShapePointsPerManeuver(int nCount)
Sets the maximum number of shape points for the server to return from the route. The smaller the number the less data gets returned from the server response on a route.

Parameters:
nCount - int with the maximum number of shape points.

getMaxShapePointsPerManeuver

public int getMaxShapePointsPerManeuver()
Returns the maximum number of shape points for the route options.


setMaxGEFIDsPerManeuver

public void setMaxGEFIDsPerManeuver(int nCount)
Sets the maximum number of GEFIDs for the server to return from the route. The smaller the number the less data gets returned from the server response on a route.

Parameters:
nCount - int with the maximum number of GEFIDs.

getMaxGEFIDsPerManeuver

public int getMaxGEFIDsPerManeuver()
Returns the maximum number of GEFIDs for the route options.


setLanguage

public void setLanguage(java.lang.String strLanguage)
Sets the language for the server to use on a route narrative.

Parameters:
strLanguage - String containing a valid language Valid values for languages are defined by the members of this class starting with the prefix szLanguage_.

getLanguage

public java.lang.String getLanguage()
Returns the language set for this RouteOptions object.


setAvoidAttributeList

public void setAvoidAttributeList(StringCollection list)
Sets the member for the list containing the attributes to avoid when performing a route.

Parameters:
list - StringCollection containing valid attributes to avoid. Valid values are the member variables of the object with the prefix szAttr_.

getAvoidAttributeList

public StringCollection getAvoidAttributeList()
Returns the StringCollection containing the attributes to avoid.


setAvoidGefIdList

public void setAvoidGefIdList(IntCollection list)
Sets the member for the list containing the GEFIDs to TRY TO avoid when performing a route.

Parameters:
list - IntCollection containing GEFIDs to TRY TO avoid.

getAvoidGefIdList

public IntCollection getAvoidGefIdList()
Returns the IntCollection containing the GEFIDs to try to avoid.


setAvoidAbsoluteGefIdList

public void setAvoidAbsoluteGefIdList(IntCollection list)
Sets the member for the list containing the GEFIDs to ABSOLUTELY avoid when performing a route. If the server is unable to calculate a route without using one of these IDs the route will fail.

Parameters:
list - IntCollection containing GEFIDs to ABSOLUTELY avoid.

getAvoidAbsoluteGefIdList

public IntCollection getAvoidAbsoluteGefIdList()
Returns the IntCollection containing the GEFIDs to absolutely avoid.


getCoverageName

public java.lang.String getCoverageName()
Get the coverage name of the routing data to use takes precedence over CovSwitcher

Returns:
the Coverage name

setCoverageName

public void setCoverageName(java.lang.String newCoverageName)
Set the coverage name of the routing data to use takes precedence over CovSwitcher

Parameters:
newCoverageName - the Coverage name

setCovSwitcher

public void setCovSwitcher(AutoRouteCovSwitch switcher)
Set the member AutoRouteCovSwitch object, which when selected will use the name specified in this object to select a Route data selector to automatically select a valid coverage to route on. CoverageName property takes precedence over this object. Leave Coverage name and CovSwitcher blank to use server default switcher If configured.


getCovSwitcher

public AutoRouteCovSwitch getCovSwitcher()
Returns a AutoRouteCovSwitch object, which when selected will use the name specified in this object to select a Route data selector to automatically select a valid coverage to route on. CoverageName property takes precedence over this object. Leave Coverage name and CovSwitcher blank to use server default switcher If configured.


setStateBoundaryDisplay

public void setStateBoundaryDisplay(boolean bFlag)
Sets the state boundary display flag.

Parameters:
bFlag - true if a state boundary text should be displayed, false otherwise.

getStateBoundaryDisplay

public boolean getStateBoundaryDisplay()
Gets the state boundary display flag.

Returns:
true if a state boundary text should be displayed, false otherwise.

setCountryBoundaryDisplay

public void setCountryBoundaryDisplay(boolean bFlag)
Sets the Country boundary display flag.

Parameters:
bFlag - true if a Country boundary text should be displayed, false otherwise.

getCountryBoundaryDisplay

public boolean getCountryBoundaryDisplay()
Gets the Country boundary display flag.

Returns:
true if a Country boundary text should be displayed, false otherwise.

equals

public boolean equals(java.lang.Object otherObject)
Compares this object to the specified object. The result is true if and only if the argument is not null and is a RouteOptions object that has same attributes as this object.

Overrides:
equals in class MQObject
Parameters:
otherObject - the object to compare this RouteOptions against.
Returns:
true if the RouteOptions objects are equal; false otherwise.

hashCode

public int hashCode()
Returns a hash code for this RouteOptions.

Overrides:
hashCode in class MQObject
Returns:
a hash code value for this RouteOptions.