com.esri.arcgis.geodatabase
Class INetworkProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.geodatabase.INetworkProxy
All Implemented Interfaces:
INetwork, Externalizable, Serializable
Direct Known Subclasses:
IStreetNetworkProxy, IUtilityNetworkGENProxy, IUtilityNetworkProxy

public class INetworkProxy
extends com.esri.arcgis.interop.Dispatch
implements INetwork, Serializable

Provides access to members that give general information about the network and its elements.

Remarks

To obtain a reference to the logical network of a geometric network you first need to obtain a reference to the geometric network. An example of this can be found in the help for IGeometricNetwork.

Once you have a reference to the geometric network you can obtain a reference to the logical network using the IGeometricNetwork::Network property.

The INetwork interface is on the Network abstract class, which contains other interfaces for use with logical networks:

INetworkUpdate - Used for starting updating sessions in the logical network.
INetElements - Used for getting element ID's (EID's) and verify valid elements.
INetSchema - Used for getting element classes and in a logical network.
INetSchemaEdit - Used for editing the schema of the logical network such as adding weights.
INetAttributes - Used for getting weight values and enabled/disabled state of elements.
INetAttributesEdit - Used for changing weight values and disabled/enabling elements.
INetTopology - Used for seeing what elements are connect to another element.
INetTopologyEdit - Used for adding and deleting elements from the logical network.

When To Use

Use the INetwork interface when you want to query the network for general information such as the status of the network or the number of edges in your network. You can also use this interface to create a forwardstar object, which is used for traversing the network.

Product Availability

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

See Also:
INetworkUpdate, IForwardStar, IGraph, INetworkClass.getNetworkAncillaryRole(), INetworkWorkspace, INetworkClass.getGeometricNetwork(), INetworkClass.getFieldToWeightMapping(int), IUtilityNetwork, INetwork, Serialized Form

Field Summary
 boolean noncastable
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Constructor Summary
  INetworkProxy()
           
  INetworkProxy(Object obj)
           
protected INetworkProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 IForwardStar createForwardStar(boolean honorState, INetWeight junctionWeight, INetWeight fromToEdgeWeight, INetWeight toFromEdgeWeight, INetWeight turnWeight)
          Creates a forward star cursor on the network index.
 IEnumNetEID createNetBrowser(int elementType)
          Creates a network index element browser.
 int getEdgeCount()
          Number of edges in the network.
 int getJunctionCount()
          Number of junctions in the network.
 int getMaxDegree()
          Maximum degree of a junction.
 int getMaxTurn()
          Maximum number of turns associated with a junction.
 int getStatus()
          Status of the network.
 int getTurnCount()
          Number of turns in the network.
 void removeListener(String iidStr, Object theListener)
           
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

noncastable

public boolean noncastable
Constructor Detail

INetworkProxy

public INetworkProxy()

INetworkProxy

public INetworkProxy(Object obj)
              throws IOException
Throws:
IOException

INetworkProxy

protected INetworkProxy(Object obj,
                        String iid)
                 throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

getStatus

public int getStatus()
              throws IOException,
                     AutomationException
Status of the network.

Remarks

The status of a network can be:

esriNSInvalidConnection
esriNSNetworkAlreadyExist
esriNSReadOnlyNetwork
esriNSCannotOpenTables
esriNSCannotCreateTables
esriNSInvalidElementClasses
esriNSInvalidWeights
esriNSUnknownStatus
esriNSValidNetwork

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getStatus in interface INetwork
Returns:
A com.esri.arcgis.geodatabase.esriNetworkStatus constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getJunctionCount

public int getJunctionCount()
                     throws IOException,
                            AutomationException
Number of junctions in the network.

Remarks

JunctionCount returns a count of all the junctions in the network.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getJunctionCount in interface INetwork
Returns:
The junctionCount
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getEdgeCount

public int getEdgeCount()
                 throws IOException,
                        AutomationException
Number of edges in the network.

Remarks

EdgeCount returns a count of all the edges within the network.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getEdgeCount in interface INetwork
Returns:
The edgeCount
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTurnCount

public int getTurnCount()
                 throws IOException,
                        AutomationException
Number of turns in the network.

Remarks

TurnCount returns a count of all the turns within a StreetNetwork. For a UtilityNetwork, TurnCount will return 0.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getTurnCount in interface INetwork
Returns:
The turnCount
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMaxDegree

public int getMaxDegree()
                 throws IOException,
                        AutomationException
Maximum degree of a junction.

Remarks

The MaxDegree is the maximum number of edges connected to any given junction in the network. This property can be used to determine if there are incorrect connections within the network. For instance, in a Gas Network it is unlikely that there would ever be more than 4 edges attached to a junction. If MaxDegree returned a number greater than 4, it would indicate a problem in the network.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getMaxDegree in interface INetwork
Returns:
The maxDegree
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMaxTurn

public int getMaxTurn()
               throws IOException,
                      AutomationException
Maximum number of turns associated with a junction.

Remarks

MaxTurn returns the maximum number of turns assigned to any given junction within a StreetNetwork. For a UtilityNetwork, MaxTurn will always return 0.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getMaxTurn in interface INetwork
Returns:
The maxTurn
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createForwardStar

public IForwardStar createForwardStar(boolean honorState,
                                      INetWeight junctionWeight,
                                      INetWeight fromToEdgeWeight,
                                      INetWeight toFromEdgeWeight,
                                      INetWeight turnWeight)
                               throws IOException,
                                      AutomationException
Creates a forward star cursor on the network index.

Remarks

CreateForwardStar generates an IForwardStar object that can be used for stepping through the network. The input parameters for the method are as follows:

HonorState refers to elements in your network that are enabled/disabled. If you set HonorState to True then the ForwardStar will only return elements that are not disabled. If you specify False then any element that is connected to the element you are accessing will return a ForwardStar.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
createForwardStar in interface INetwork
Parameters:
honorState - The honorState (in)
junctionWeight - A reference to a com.esri.arcgis.geodatabase.INetWeight (in)
fromToEdgeWeight - A reference to a com.esri.arcgis.geodatabase.INetWeight (in)
toFromEdgeWeight - A reference to a com.esri.arcgis.geodatabase.INetWeight (in)
turnWeight - A reference to a com.esri.arcgis.geodatabase.INetWeight (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IForwardStar
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INetwork.createForwardStar(boolean, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight), IForwardStar.queryAdjacentEdge(int, int[], boolean[], Object[]), IForwardStar.queryAdjacentJunction(int, int[], Object[]), IForwardStar.getNetwork(), IForwardStar.findAdjacent(int, int, int[]), IForwardStar.queryAtTurns(int, int[], Object[]), IForwardStar.queryAdjacentEdges(int, int[], boolean[], Object[]), IForwardStar.queryAdjacentJunctions(int, int[], Object[]), IForwardStar.queryAtTurn(int, int[], Object[])

createNetBrowser

public IEnumNetEID createNetBrowser(int elementType)
                             throws IOException,
                                    AutomationException
Creates a network index element browser.

Remarks

CreateNetBrowser returns a reference to an IEnumNetEID interface. This particular enumeration represents all of the elements within the network. Use this method when you want to access all of the individual elements of the network for setting the enabled/disabled property or some other similar purpose.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
createNetBrowser in interface INetwork
Parameters:
elementType - A com.esri.arcgis.geodatabase.esriElementType constant (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumNetEID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.