com.esri.arcgis.geodatabase
Interface INetworkDataset

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
INetworkDatasetProxy, NetworkDataset

public interface INetworkDataset
extends java.io.Serializable

Provides access to members that query the schema of the network dataset.

Product Availability

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

Remarks

A NetworkDataset is a collection of feature classes that participate in a network relationship. Each feature class has a topological role in the network and a network may have multiple feature classes in the same role. A feature dataset may have multiple networks but a feature class can only belong to one network, either a network dataset or geometric network. A Feature class in the network dataset is called a network source.  Network datasets may also have attributes which are used for solving against a network dataset.  Network dataset sources can also participate within a Topology.

The IDatasetContainer2 interface should be used for creating and opening network datasets.  The INetworkBuild interface should be used for adding or removing sources or attributes from a network dataset and for building a network dataset.


Method Summary
 INetworkSource esri_getSource(int index)
          Network dataset source by index.
 INetworkAttribute getAttribute(int index)
          Network dataset attribute by index.
 INetworkAttribute getAttributeByID(int iD)
          Network dataset attribute corresponding to the specified ID.
 INetworkAttribute getAttributeByName(java.lang.String name)
          Network dataset attribute corresponding to the specified name.
 int getAttributeCount()
          Number of attributes in the network dataset.
 int getNetworkType()
          The type of the network dataset.
 INetworkSource getSourceByID(int iD)
          Network dataset source corresponding to the specified ID.
 INetworkSource getSourceByName(java.lang.String name)
          Network dataset source corresponding to the specified name.
 int getSourceCount()
          Number of sources in the network dataset.
 int getState()
          Indicates whether the network dataset is built or not.
 boolean isBuildable()
          Indicates if this network dataset is buildable.
 boolean isSupportsTurns()
          Indicates if this network dataset supports network turn elements.
 

Method Detail

isBuildable

public boolean isBuildable()
                    throws java.io.IOException,
                           AutomationException
Indicates if this network dataset is buildable.

Remarks

Returns a boolean value indicating if the network dataset can be built using the INetworkBuild:BuildNetwork method.  This method will return true for Geodatabase and Shapefile network datasets and false for SDC network datasets.  Use the INetworkDataset:NetworkType property to determine the type of network dataset.

Returns:
The buildable
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getNetworkType

public int getNetworkType()
                   throws java.io.IOException,
                          AutomationException
The type of the network dataset.

Remarks

Returns the type of network dataset; geodatabase, shapefile, SDC or unknown.  Use this property to handle properties that differ based on the type of network dataset.

Returns:
A com.esri.arcgis.geodatabase.esriNetworkDatasetType constant
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isSupportsTurns

public boolean isSupportsTurns()
                        throws java.io.IOException,
                               AutomationException
Indicates if this network dataset supports network turn elements.

Description

Returns a boolean value indicating if the network dataset supports turns.  For shapefile and geodatabase networks, this property is set on the IDENetworkDataset interface of the data element.  SDC based network datasets do not support turns.

Once a network dataset is created, turn support cannot be added.  This can only be specified when the network is created.

Returns:
The supportsTurns
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAttributeByID

public INetworkAttribute getAttributeByID(int iD)
                                   throws java.io.IOException,
                                          AutomationException
Network dataset attribute corresponding to the specified ID.

Parameters:
iD - The iD (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.INetworkAttribute
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAttributeByName

public INetworkAttribute getAttributeByName(java.lang.String name)
                                     throws java.io.IOException,
                                            AutomationException
Network dataset attribute corresponding to the specified name.

Remarks

The AttributeByName property will return a reference to the attribute with the specified name. Attribute names are not case sensitive.

Parameters:
name - The name (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.INetworkAttribute
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAttributeCount

public int getAttributeCount()
                      throws java.io.IOException,
                             AutomationException
Number of attributes in the network dataset.

Remarks

Returns the number of attributes assigned to the network dataset.

Returns:
The count
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAttribute

public INetworkAttribute getAttribute(int index)
                               throws java.io.IOException,
                                      AutomationException
Network dataset attribute by index.

Remarks

Returns the attribute at the specified index.  The indexes go from 0 to AttributeCount -1.

Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.INetworkAttribute
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSourceByID

public INetworkSource getSourceByID(int iD)
                             throws java.io.IOException,
                                    AutomationException
Network dataset source corresponding to the specified ID.

Remarks

Returns the source with the specified ID.  The ID is not equal to the index.  Rather it is the internal ID of the source as stored in the metadata tables.  It can be retrieved from the INetworkSource::ID property.

Parameters:
iD - The iD (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.INetworkSource
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSourceByName

public INetworkSource getSourceByName(java.lang.String name)
                               throws java.io.IOException,
                                      AutomationException
Network dataset source corresponding to the specified name.

Remarks

The SourceByName property will return a reference to the source with the specified name. Source names are not case sensitive.  For ArcSDE Geodatabases, both the fully qualified name and unqualified name can be used to return topologies.

Parameters:
name - The name (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.INetworkSource
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSourceCount

public int getSourceCount()
                   throws java.io.IOException,
                          AutomationException
Number of sources in the network dataset.

Remarks

Returns the number of sources in the network dataset.

Returns:
The count
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_getSource

public INetworkSource esri_getSource(int index)
                              throws java.io.IOException,
                                     AutomationException
Network dataset source by index.

Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.INetworkSource
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getState

public int getState()
             throws java.io.IOException,
                    AutomationException
Indicates whether the network dataset is built or not.

Remarks

The State property indicates the current status of the network dataset; whether the network dataset is unbuilt, built or empty.  Network analysis may be performed on unbuilt network datasets, but the results cannot be guaranteed to be correct and will depend on the edits that have been made.

For network datasets in an ArcSDE geodatabase, the State property will return the error "Object does not support this action."

Returns:
A com.esri.arcgis.geodatabase.esriNetworkDatasetState constant
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.