com.esri.arcgis.datasourcesfile
Class SMDirItem

java.lang.Object
  extended by com.esri.arcgis.datasourcesfile.SMDirItem
All Implemented Interfaces:
ISMDirItem, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class SMDirItem
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, ISMDirItem

Deprecated as of 10.1. A description and geography of one item of driving directions.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
SMDirItem(Object obj)
          Construct a SMDirItem using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
 int getAzimuth()
          The azimuth of the direction item.
 ISMRouterEnvelope getBoundBox()
          The geographic extent of the direction item.
 String getDriveText()
          Formatted text descrbing the length and time of the direction item.
 int getItemType()
          The type of direction item.
 double getLength()
          The length of the route part, in miles by default, corresponding to the direction item.
 int getRoutePart()
          The route part number associated with a direction item.
 ISMPointsCollection getShape()
          A collection of points representing the shape of the direction item.
 String getStreetName()
          The street name of the direction item.
 String getText()
          A string describing the direction item.
 double getTime()
          The driving time of the route part corresponding to the direction item.
 double getTurnAngle()
          The turn angle of the direction item.
 int hashCode()
          the hashcode for this object
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

SMDirItem

public SMDirItem(Object obj)
          throws IOException
Construct a SMDirItem using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to SMDirItem.
Casting to this class from the return value of a method will not work, as this class represents an abstract class in ArcObjects.
*
SMDirItem o = (SMDirItem)obj; // will not work

SMDirItem o = new SMDirItem(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server

Throws:
IOException - if there are interop problems SMDirItem theSMDirItem = (SMDirItem) obj;
Method Detail

equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

getText

public String getText()
               throws IOException,
                      AutomationException
A string describing the direction item.

Description

Provides a description of the item.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getText in interface ISMDirItem
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLength

public double getLength()
                 throws IOException,
                        AutomationException
The length of the route part, in miles by default, corresponding to the direction item.

Description

Returns length (in miles) of the route part that the item describes.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getLength in interface ISMDirItem
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTime

public double getTime()
               throws IOException,
                      AutomationException
The driving time of the route part corresponding to the direction item.

Description

Returns the driving time for the item.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getTime in interface ISMDirItem
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDriveText

public String getDriveText()
                    throws IOException,
                           AutomationException
Formatted text descrbing the length and time of the direction item.

Description

Returns formatted text composed from the item length and time. For example, "drive 10 mi ~ 10 minutes".

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getDriveText in interface ISMDirItem
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getItemType

public int getItemType()
                throws IOException,
                       AutomationException
The type of direction item. Returns an esriSMDirItemType constant.

Description

Returns type of the driving directions item. One of esriSMDirItemType constants.

Remarks

Item type can have one value from the esriSMDirItemType enumeraiton. See esriSMDirItemType for more details.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getItemType in interface ISMDirItem
Returns:
A com.esri.arcgis.datasourcesfile.esriSMDirItemType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getRoutePart

public int getRoutePart()
                 throws IOException,
                        AutomationException
The route part number associated with a direction item.

Description

Route part is an ordinal associated with a direction item. It equals the ordinal number of the stop with which the current segment begins.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getRoutePart in interface ISMDirItem
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getShape

public ISMPointsCollection getShape()
                             throws IOException,
                                    AutomationException
A collection of points representing the shape of the direction item.

Description

Returns a collection of points that represent the item shape.

Remarks

Each direction item contains its shape. If you need the whole route path shape, then you need to append shapes from all items.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getShape in interface ISMDirItem
Returns:
A reference to a com.esri.arcgis.datasourcesfile.ISMPointsCollection
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBoundBox

public ISMRouterEnvelope getBoundBox()
                              throws IOException,
                                     AutomationException
The geographic extent of the direction item.

Description

Returns the geographic extent of the directions item.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getBoundBox in interface ISMDirItem
Returns:
A reference to a com.esri.arcgis.datasourcesfile.ISMRouterEnvelope
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getStreetName

public String getStreetName()
                     throws IOException,
                            AutomationException
The street name of the direction item.

Description

Provides a street name to the corresponding item.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getStreetName in interface ISMDirItem
Returns:
The pbstrStreetName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTurnAngle

public double getTurnAngle()
                    throws IOException,
                           AutomationException
The turn angle of the direction item.

Description

Provides an angle of the directions item.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getTurnAngle in interface ISMDirItem
Returns:
The pdAngle
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAzimuth

public int getAzimuth()
               throws IOException,
                      AutomationException
The azimuth of the direction item. Returns an esriSMAzimuthType constant.

Description

Provides the azimuth of the directions item.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getAzimuth in interface ISMDirItem
Returns:
A com.esri.arcgis.datasourcesfile.esriSMAzimuthType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.