com.esri.arcgis.geodatabase
Class NetworkWorkspace

java.lang.Object
  extended by com.esri.arcgis.geodatabase.NetworkWorkspace
All Implemented Interfaces:
INetworkWorkspace, INetworkWorkspace2, com.esri.arcgis.interop.RemoteObjRef, ISupportErrorInfo, Serializable

public class NetworkWorkspace
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, INetworkWorkspace, INetworkWorkspace2, ISupportErrorInfo

A container for creating and maintaining information about the logical networks in this workspace.

Description

The NetworkWorkspace is a type of Workspace used to create and open logical networks in a geodatabase. You access the NetworkWorkspace by QI to the INetworkWorkspace interface of a Workspace.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
NetworkWorkspace(Object obj)
          Construct a NetworkWorkspace using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 INetwork createNetwork(String networkName, int networkType, boolean buildNormalizedTables)
          Creates a logical network.
 INetwork createNetworkEx(String networkName, int networkType, boolean buildNormalizedTables, String configKeyword, int formatNum)
          Creates a logical network based on the specified configuration keyword.
 boolean equals(Object o)
          Compare this object with another
 int getFormatNumber(int index)
          The specified format number.
 int getFormatNumberCount()
          The count of valid format numbers.
 int getMaxStorableClassID(int formatNum)
          Returns the maximum storable feature class ID for the given format number.
 IEnumBSTR getNetworkNames()
          Returns an enumeration of the names of the logical networks within the current workspace.
 int hashCode()
          the hashcode for this object
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 INetwork openNetwork(String networkName, int networkType, int networkAccess)
          Opens a logical network.
 
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

NetworkWorkspace

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

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

Throws:
IOException - if there are interop problems NetworkWorkspace theNetworkWorkspace = (NetworkWorkspace) 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

createNetwork

public INetwork createNetwork(String networkName,
                              int networkType,
                              boolean buildNormalizedTables)
                       throws IOException,
                              AutomationException
Creates a logical network.

Remarks

CreateNetwork should be used to create a logical network that is not associated with a geometric network. If you want to create a geometric network that with it's associated logical network, use:
INetworkCollection::CreateGeometricNetwork
INetworkCollection2::CreateGeometricNetworkEx
INetworkLoader
Use INetworkWorkspace2::CreateNetworkEx to create a stand-alone logical network based on a configuration keyword.
The connectivity for the logical network is stored in a series of tables in the database. The actual connectivity is managed in a series of BLOBs.
As of the 10.0 release; the CreateNetwork method is no longer supported on Logical Networks that is not associated with a geometric network.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
createNetwork in interface INetworkWorkspace
Parameters:
networkName - The networkName (in)
networkType - A com.esri.arcgis.geodatabase.esriNetworkType constant (in)
buildNormalizedTables - The buildNormalizedTables (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.INetwork
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

openNetwork

public INetwork openNetwork(String networkName,
                            int networkType,
                            int networkAccess)
                     throws IOException,
                            AutomationException
Opens a logical network.

Remarks

The OpenNetwork method should only be used to open a logical network that does not have any corresponding geometric network. Opening a logical network with a corresponding geometric network for the purposes of updating network elements, can lead to inconsistencies between the logical and geometric networks.
As of the 10.0 release; the OpenNetwork method is no longer supported on Logical Networks that are associated with a Geometric Network.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
openNetwork in interface INetworkWorkspace
Parameters:
networkName - The networkName (in)
networkType - A com.esri.arcgis.geodatabase.esriNetworkType constant (in)
networkAccess - A com.esri.arcgis.geodatabase.esriNetworkAccess constant (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.INetwork
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getNetworkNames

public IEnumBSTR getNetworkNames()
                          throws IOException,
                                 AutomationException
Returns an enumeration of the names of the logical networks within the current workspace.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getNetworkNames in interface INetworkWorkspace
Returns:
A reference to a com.esri.arcgis.system.IEnumBSTR
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFormatNumberCount

public int getFormatNumberCount()
                         throws IOException,
                                AutomationException
The count of valid format numbers.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getFormatNumberCount in interface INetworkWorkspace2
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFormatNumber

public int getFormatNumber(int index)
                    throws IOException,
                           AutomationException
The specified format number.

Product Availability

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

Specified by:
getFormatNumber in interface INetworkWorkspace2
Parameters:
index - The index (in)
Returns:
The formatNum
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMaxStorableClassID

public int getMaxStorableClassID(int formatNum)
                          throws IOException,
                                 AutomationException
Returns the maximum storable feature class ID for the given format number.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getMaxStorableClassID in interface INetworkWorkspace2
Parameters:
formatNum - The formatNum (in)
Returns:
The maxClassID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createNetworkEx

public INetwork createNetworkEx(String networkName,
                                int networkType,
                                boolean buildNormalizedTables,
                                String configKeyword,
                                int formatNum)
                         throws IOException,
                                AutomationException
Creates a logical network based on the specified configuration keyword.

Remarks

CreateNetworkEx is used to create a logical network that is not associated with a geometric network. If you want to create a geometric network along with the logical network, then use the INetworkCollection2::CreateGeometricNetworkEx method.
CreateNetworkEx differs from INetworkWorkspace::CreateNetwork in that this method contains additional parameters to specify the Configuration keyword for creating networks in ArcSDE and for specifying the storage format for the network. The configuartion keyword specifies how the logical network tables and indexes are stored in ArcSDE.
The format parameter outlines the storage of feature class IDs which participate in the geometric network. The storage format can be specified as either narrow or wide. Networks with a narrow format can only contain feature classes with class IDs less than 10,000 while networks with a wide format have no limitation on the feature class ID value. Unless you specifically require narrow networks, the format should always be set to a value of 1 for the wide storage format.
The connectivity for the logical network is stored in a series of tables in the database. The actual connectivity is managed in a series of BLOBs.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
createNetworkEx in interface INetworkWorkspace2
Parameters:
networkName - The networkName (in)
networkType - A com.esri.arcgis.geodatabase.esriNetworkType constant (in)
buildNormalizedTables - The buildNormalizedTables (in)
configKeyword - The configKeyword (in)
formatNum - The formatNum (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.INetwork
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws IOException,
                                       AutomationException
interfaceSupportsErrorInfo

Description

Indicates whether the interface supports IErrorInfo.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
interfaceSupportsErrorInfo in interface ISupportErrorInfo
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.