com.esri.arcgis.geodatabase
Class NetworkDatasetWorkspaceExtension

java.lang.Object
  extended bycom.esri.arcgis.geodatabase.NetworkDatasetWorkspaceExtension
All Implemented Interfaces:
IDatasetContainer, IDatasetContainer2, IDatasetContainer3, IDatasetEdit, IWorkspaceExtension, IWorkspaceExtension2, IWorkspaceExtensionControl, java.io.Serializable

public class NetworkDatasetWorkspaceExtension
extends java.lang.Object
implements IWorkspaceExtension2, IWorkspaceExtensionControl, IDatasetContainer3, IDatasetEdit

A container for describing this network dataset's workspace extension properties.

Product Availability

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

Description

The NetworkDatasetWorkspaceExtension object contains members that facilitate the creation and browsing of network datasets inside of a shapefile or SDC workspace.  The IDatasetContainer2 interface contains the CreateDataset method which should be used to create network datasets with a populated data element.

See Also:
Serialized Form

Constructor Summary
NetworkDatasetWorkspaceExtension(java.lang.Object obj)
          Construct a NetworkDatasetWorkspaceExtension using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 void addDataset(IDataset pDatasetToAdd)
          Adds a dataset to the dataset collection.
 IDataset createDataset(IDEDataset dataElement)
          Given a data element, create a dataset in this container.
 boolean equals(java.lang.Object o)
          Compare this object with another
 IDatasetContainer3 getAsIDatasetContainer3()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IDatasetEdit getAsIDatasetEdit()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IWorkspaceExtension2 getAsIWorkspaceExtension2()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IWorkspaceExtensionControl getAsIWorkspaceExtensionControl()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IEnumBSTR getDataDictionaryTableNames()
          Any data dictionary tables that should not be exposed to browsers and should not participate in edit sessions.
 IDataset getDataset(int type, int index)
          The dataset associated with the specified index value and dataset type.
 IDataset getDatasetByID(int type, int datasetID)
          The dataset associated with the specified index value and dataset type.
 IDataset getDatasetByName(int type, java.lang.String name)
          The dataset of the specified type with the specified name.
 int getDatasetCount(int type)
          The number of datasets of the specified type in this container.
 IEnumDatasetName getDatasetNames(int type)
          The names of all the datasets with the specified type.
 IEnumDataset getDatasets(int type)
          An enumerator over the datasets of the specified type.
 IEnumDatasetType getDatasetTypes()
          The names of all the datasets with the specified type.
 IUID getGUID()
          The GUID that identifies this Workspace Extension.
 java.lang.String getName()
          The Name for this Workspace Extension.
 IEnumBSTR getPrivateDatasetNames(int dtype)
          The private datasets that should not be exposed to browsers.
 IWorkspace getWorkspace()
          The workspace associated with this Workspace Extension.
 int hashCode()
          the hashcode for this object
 void init(IWorkspaceHelper pWorkspaceHelper)
          Initializes the extension, passing in a reference to its workspace helper.
 boolean isBeingEdited()
          True if the dataset is being edited.
 boolean ownsDatasetType(int datasetType)
          Indicates if the workspace extension owns the dataset type.
 void shutdown()
          Informs the extension that its workspace helper (and workspace) are going away.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkDatasetWorkspaceExtension

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

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

Throws:
java.io.IOException - if there are interop problems
Method Detail

getAsIWorkspaceExtension2

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


getAsIWorkspaceExtensionControl

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


getAsIDatasetContainer3

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


getAsIDatasetEdit

public IDatasetEdit getAsIDatasetEdit()
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


ownsDatasetType

public boolean ownsDatasetType(int datasetType)
                        throws java.io.IOException,
                               AutomationException
Description copied from interface: IWorkspaceExtension2
Indicates if the workspace extension owns the dataset type.

Remarks

The OwnDatasetType method returns a boolean indicating whether the workspace extension supports the specified dataset type.  For ArcGIS 9.1, OwnDatasetType will only return True for Network Datasets (esriDTNetworkDataset).

Specified by:
ownsDatasetType in interface IWorkspaceExtension2
Parameters:
datasetType - A com.esri.arcgis.geodatabase.esriDatasetType constant (in)
Returns:
The pOwnsType
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWorkspace

public IWorkspace getWorkspace()
                        throws java.io.IOException,
                               AutomationException
Description copied from interface: IWorkspaceExtension2
The workspace associated with this Workspace Extension.

Remarks

The Workspace property returns a reference to the workspace associated with the extension.

Specified by:
getWorkspace in interface IWorkspaceExtension2
Returns:
A reference to a com.esri.arcgis.geodatabase.IWorkspace
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: IWorkspaceExtension
The Name for this Workspace Extension.

Supported Platforms

Windows, Solaris, Linux

Remarks

The Name property is the name of the extension.

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

getGUID

public IUID getGUID()
             throws java.io.IOException,
                    AutomationException
Description copied from interface: IWorkspaceExtension
The GUID that identifies this Workspace Extension.

Supported Platforms

Windows, Solaris, Linux

Remarks

The GUID property returns the well-known GUID for the extension and is guaranteed to be unique.  For example, the GUID for Shapefile and SDC network dataset based workspace extensions is: {4C1B151C-48C3-46C5-AB57-E6B941A1D00A}.

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

getPrivateDatasetNames

public IEnumBSTR getPrivateDatasetNames(int dtype)
                                 throws java.io.IOException,
                                        AutomationException
Description copied from interface: IWorkspaceExtension
The private datasets that should not be exposed to browsers.

Supported Platforms

Windows, Solaris, Linux

Remarks

The PrivateDatasetNames and DataDictionaryNames properties return the names of tables and datasets that are private to the extension and will not be exposed by the workspace to browsing clients.  Since they return an EnumBSTR object that is not cocreatable, you must create your own object that implements IEnumBSTR. 

Specified by:
getPrivateDatasetNames in interface IWorkspaceExtension
Parameters:
dtype - A com.esri.arcgis.geodatabase.esriDatasetType constant (in)
Returns:
A reference to a com.esri.arcgis.system.IEnumBSTR
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDataDictionaryTableNames

public IEnumBSTR getDataDictionaryTableNames()
                                      throws java.io.IOException,
                                             AutomationException
Description copied from interface: IWorkspaceExtension
Any data dictionary tables that should not be exposed to browsers and should not participate in edit sessions.

Supported Platforms

Windows, Solaris, Linux

Remarks

The PrivateDatasetNames and DataDictionaryNames properties return the names of tables and datasets that are private to the extension and will not be exposed by the workspace to browsing clients.  Since they return an EnumBSTR object that is not cocreatable, you must create your own object that implements IEnumBSTR. 

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

init

public void init(IWorkspaceHelper pWorkspaceHelper)
          throws java.io.IOException,
                 AutomationException
Description copied from interface: IWorkspaceExtensionControl
Initializes the extension, passing in a reference to its workspace helper.

Supported Platforms

Windows, Solaris, Linux

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

shutdown

public void shutdown()
              throws java.io.IOException,
                     AutomationException
Description copied from interface: IWorkspaceExtensionControl
Informs the extension that its workspace helper (and workspace) are going away.

Supported Platforms

Windows, Solaris, Linux

Remarks

The Shutdown method informs the workspace extension that the workspace has been released by all clients and is about to go away. In response, the workspace extension should release its reference on the workspace helper. Any subsequent calls by the application to the workspace extension should return an error.

Specified by:
shutdown in interface IWorkspaceExtensionControl
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDatasetByID

public IDataset getDatasetByID(int type,
                               int datasetID)
                        throws java.io.IOException,
                               AutomationException
Description copied from interface: IDatasetContainer3
The dataset associated with the specified index value and dataset type.

Specified by:
getDatasetByID in interface IDatasetContainer3
Parameters:
type - A com.esri.arcgis.geodatabase.esriDatasetType constant (in)
datasetID - The datasetID (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IDataset
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDataset

public IDataset getDataset(int type,
                           int index)
                    throws java.io.IOException,
                           AutomationException
Description copied from interface: IDatasetContainer2
The dataset associated with the specified index value and dataset type.

Remarks

The Dataset property returns the dataset of the specified index value and dataset type. The Dataset property only supports Network Datasets and will only return a reference to a network dataset when the esriDTNetworkDataset and esriDTAny enumeration values are supplied.

Specified by:
getDataset in interface IDatasetContainer2
Parameters:
type - A com.esri.arcgis.geodatabase.esriDatasetType constant (in)
index - The index (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IDataset
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDatasets

public IEnumDataset getDatasets(int type)
                         throws java.io.IOException,
                                AutomationException
Description copied from interface: IDatasetContainer2
An enumerator over the datasets of the specified type.

Remarks

The Datasets property returns an enumerator over the datasets of the specified type. The Datasets property only supports Network Datasets and will only return an enumeration of network datasets when the esriDTNetworkDataset and esriDTAny enumeration values are supplied.

Specified by:
getDatasets in interface IDatasetContainer2
Parameters:
type - A com.esri.arcgis.geodatabase.esriDatasetType constant (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumDataset
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDatasetCount

public int getDatasetCount(int type)
                    throws java.io.IOException,
                           AutomationException
Description copied from interface: IDatasetContainer2
The number of datasets of the specified type in this container.

Remarks

The DatasetCount property returns the number of datasets of the specified type in this container. The DatasetCount property only supports Network Datasets and will only return a count of network datasets when the esriDTNetworkDataset and esriDTAny enumeration values are supplied.

Specified by:
getDatasetCount in interface IDatasetContainer2
Parameters:
type - A com.esri.arcgis.geodatabase.esriDatasetType constant (in)
Returns:
The count
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getDatasetByName

public IDataset getDatasetByName(int type,
                                 java.lang.String name)
                          throws java.io.IOException,
                                 AutomationException
Description copied from interface: IDatasetContainer2
The dataset of the specified type with the specified name.

Remarks

The DatasetByName property returns the dataset of the specified type with the specified name.  The DatasetByName property only supports Network Datasets and will only return a reference to the network datasets when the esriDTNetworkDataset and esriDTAny enumeration values are supplied.

Specified by:
getDatasetByName in interface IDatasetContainer2
Parameters:
type - A com.esri.arcgis.geodatabase.esriDatasetType constant (in)
name - The name (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IDataset
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getDatasetNames

public IEnumDatasetName getDatasetNames(int type)
                                 throws java.io.IOException,
                                        AutomationException
Description copied from interface: IDatasetContainer2
The names of all the datasets with the specified type.

Remarks

The DatasetNames property returns an enumerator of IDatasetNames over the datasets of the specified type.  The DatasetNames property only supports Network Datasets and will only return an enumerator of network datasets when the esriDTNetworkDataset and esriDTAny enumeration values are supplied.

Specified by:
getDatasetNames in interface IDatasetContainer2
Parameters:
type - A com.esri.arcgis.geodatabase.esriDatasetType constant (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumDatasetName
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDatasetTypes

public IEnumDatasetType getDatasetTypes()
                                 throws java.io.IOException,
                                        AutomationException
Description copied from interface: IDatasetContainer2
The names of all the datasets with the specified type.

Remarks

The DatasetTypes property returns an enumerator of IEnumDatasetType containing the supported esriDatasetTypes for the container.  Use this method to determine the supported datasets for the container.  At 9.1, only datasets of type esriDTNetworkDataset are supported.

 

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

createDataset

public IDataset createDataset(IDEDataset dataElement)
                       throws java.io.IOException,
                              AutomationException
Description copied from interface: IDatasetContainer2
Given a data element, create a dataset in this container.

Remarks

The CreateDataset method will create a dataset given a populated data element.  Use the DatasetTypes property to determine the supported dataset types.

Specified by:
createDataset in interface IDatasetContainer2
Parameters:
dataElement - A reference to a com.esri.arcgis.geodatabase.IDEDataset (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IDataset
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

addDataset

public void addDataset(IDataset pDatasetToAdd)
                throws java.io.IOException,
                       AutomationException
Description copied from interface: IDatasetContainer
Adds a dataset to the dataset collection.

Supported Platforms

Windows, Solaris, Linux

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

isBeingEdited

public boolean isBeingEdited()
                      throws java.io.IOException,
                             AutomationException
Description copied from interface: IDatasetEdit
True if the dataset is being edited.

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