com.esri.arcgis.geodatabase
Class NetworkSource

java.lang.Object
  extended bycom.esri.arcgis.geodatabase.NetworkSource
All Implemented Interfaces:
INetworkSource, java.io.Serializable

public class NetworkSource
extends java.lang.Object
implements INetworkSource

A container for describing a network dataset source.

Product Availability

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

Description

A network source is a feature class or table that is used to generate network elements into a network dataset.  A NetworkSource object is a light weight object that holds the information about a network source in a network dataset.

The NetworkSource object for an existing network dataset can be accessed through the INetworkDataset interface.

See Also:
Serialized Form

Constructor Summary
NetworkSource()
          Constructs a NetworkSource using ArcGIS Engine.
NetworkSource(java.lang.Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
 
Method Summary
 boolean equals(java.lang.Object o)
          Compare this object with another
 INetworkSource getAsINetworkSource()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
static java.lang.String getClsid()
           
 int getElementType()
          Network element type of this network source.
 int getID()
          Unique identifier of this network source.
 java.lang.String getName()
          Name of the class associated with this network source.
 INetworkSourceDirections getNetworkSourceDirections()
          The driving directions settings for this network source.
 IPropertySet getProperties()
          Property set of this network source.
 int getSourceType()
          Type of network source.
 int hashCode()
          the hashcode for this object
 boolean isUsesGeometryInConnectivity()
          Indicates if the source object's geometry is used in determining network connectivity.
 void setElementType(int elementType)
          Network element type of this network source.
 void setName(java.lang.String sourceName)
          Name of the class associated with this network source.
 void setNetworkSourceDirectionsByRef(INetworkSourceDirections sourceDirections)
          The driving directions settings for this network source.
 void setProperties(IPropertySet sourceProperties)
          Property set of this network source.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkSource

public NetworkSource()
              throws java.io.IOException,
                     java.net.UnknownHostException
Constructs a NetworkSource using ArcGIS Engine.

Throws:
java.io.IOException - if there are interop problems
java.net.UnknownHostException - if there are interop problems

NetworkSource

public NetworkSource(java.lang.Object obj)
              throws java.io.IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.

Construct a NetworkSource using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to NetworkSource.
NetworkSource theNetworkSource = (NetworkSource) obj;

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
java.io.IOException - if there are interop problems
Method Detail

getClsid

public static java.lang.String getClsid()

getAsINetworkSource

public INetworkSource getAsINetworkSource()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


equals

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


hashCode

public int hashCode()
the hashcode for this object


getID

public int getID()
          throws java.io.IOException,
                 AutomationException
Description copied from interface: INetworkSource
Unique identifier of this network source.

Remarks

Each source in a Network Dataset is identified by a unique value, the ID property.  The ID property can be used to get a reference to the corresponding network source through the INetworkDataset::SourceByID property.  This ID is different than the ID value returned by the IObjectClass::ObjectClassID property.

As with ObjectID values, SourceID values are never reused.  They are not guaranteed to be sequential, but are guaranteed to be in increasing order based on when the source was added to the network.  Unless the source is added or deleted from the DataElement, the SourceID values will remain constant after the INetworkDataset::UpdateSchema method is called.

Specified by:
getID in interface INetworkSource
Returns:
The iD
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getElementType

public int getElementType()
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: INetworkSource
Network element type of this network source.

Specified by:
getElementType in interface INetworkSource
Returns:
A com.esri.arcgis.geodatabase.esriNetworkElementType constant
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setElementType

public void setElementType(int elementType)
                    throws java.io.IOException,
                           AutomationException
Description copied from interface: INetworkSource
Network element type of this network source.

Specified by:
setElementType in interface INetworkSource
Parameters:
elementType - A com.esri.arcgis.geodatabase.esriNetworkElementType constant (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getName

public java.lang.String getName()
                         throws java.io.IOException,
                                AutomationException
Description copied from interface: INetworkSource
Name of the class associated with this network source.

Specified by:
getName in interface INetworkSource
Returns:
The sourceName
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

setName

public void setName(java.lang.String sourceName)
             throws java.io.IOException,
                    AutomationException
Description copied from interface: INetworkSource
Name of the class associated with this network source.

Specified by:
setName in interface INetworkSource
Parameters:
sourceName - The sourceName (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getProperties

public IPropertySet getProperties()
                           throws java.io.IOException,
                                  AutomationException
Description copied from interface: INetworkSource
Property set of this network source.

Specified by:
getProperties in interface INetworkSource
Returns:
A reference to a com.esri.arcgis.system.IPropertySet
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setProperties

public void setProperties(IPropertySet sourceProperties)
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: INetworkSource
Property set of this network source.

Specified by:
setProperties in interface INetworkSource
Parameters:
sourceProperties - A reference to a com.esri.arcgis.system.IPropertySet (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

isUsesGeometryInConnectivity

public boolean isUsesGeometryInConnectivity()
                                     throws java.io.IOException,
                                            AutomationException
Description copied from interface: INetworkSource
Indicates if the source object's geometry is used in determining network connectivity.

Remarks

The UsesGeometryInConnectivity property indicates whether the geometries of the features in a NetworkSource  are used in determining how its network elements are connected to each other.

For example, the geometries of the features in an EdgeFeatureSource and JunctionFeatureSource are used to determine how the generated edge and junction elements connect to each other.  The UsesGeometryInConnectivity property for these sources is True.

In contrast, the geometries of the features in a TurnFeatureSource are not used in deteriming how the turn elements are associated with the edges and junctions of the network -- the fields of the TurnFeatureSource feature class determine this.  The UsesGeometryInConnectivity property for the TurnFeatureSource is False.

Specified by:
isUsesGeometryInConnectivity in interface INetworkSource
Returns:
The usesGeometry
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getSourceType

public int getSourceType()
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: INetworkSource
Type of network source.

Specified by:
getSourceType in interface INetworkSource
Returns:
A com.esri.arcgis.geodatabase.esriNetworkSourceType constant
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getNetworkSourceDirections

public INetworkSourceDirections getNetworkSourceDirections()
                                                    throws java.io.IOException,
                                                           AutomationException
Description copied from interface: INetworkSource
The driving directions settings for this network source.

Remarks

The NetworkSourceDirections property specifies the information needed to generate driving directions when reporting routes traversing elements from this NetworkSource.

Specified by:
getNetworkSourceDirections in interface INetworkSource
Returns:
A reference to a com.esri.arcgis.geodatabase.INetworkSourceDirections
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setNetworkSourceDirectionsByRef

public void setNetworkSourceDirectionsByRef(INetworkSourceDirections sourceDirections)
                                     throws java.io.IOException,
                                            AutomationException
Description copied from interface: INetworkSource
The driving directions settings for this network source.

Specified by:
setNetworkSourceDirectionsByRef in interface INetworkSource
Parameters:
sourceDirections - A reference to a com.esri.arcgis.geodatabase.INetworkSourceDirections (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.