com.esri.arcgis.geodatabase
Class NetworkDataset

java.lang.Object
  extended by com.esri.arcgis.geodatabase.NetworkDataset
All Implemented Interfaces:
IDataset, IDatasetAnalyze, IDatasetComponent, IDatasetComponent2, IDatasetEdit, IDatasetEditInfo, IFeatureClassContainer, IGeoDataset, IGeoDatasetSchemaEdit, IMetadata, IMetadataEdit, INativeTypeInfo, INetworkBuild, INetworkDataset, INetworkDataset2, INetworkQuery, INetworkQuery2, ISchemaLock, IVersionedObject, IVersionedObject2, com.esri.arcgis.interop.RemoteObjRef, ISupportErrorInfo, Serializable

public class NetworkDataset
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IDatasetComponent2, IFeatureClassContainer, INetworkDataset, INetworkDataset2, INetworkBuild, INetworkQuery, INetworkQuery2, IDataset, IDatasetEdit, IDatasetEditInfo, ISchemaLock, IVersionedObject2, IDatasetAnalyze, IGeoDataset, IGeoDatasetSchemaEdit, IMetadata, IMetadataEdit, INativeTypeInfo, ISupportErrorInfo

A container for querying information about a network dataset.

Description

A NetworkDataset is a collection of feature classes called network sources, 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 dataset.

Network datasets may also have any number of network attributes, which are used for network analysis such as finding the shortest path or performing a service area analysis. The INetworkAttribute interface has the properties that return information on the network attribute, such as it data or usage type.

Schema changes to a network dataset may be performed through two different mechanisms The INetworkBuild interface allows for the addition or removal of individual sources or attributes. Multiple schema edits to a network dataset can be performed by using the INetworkBuild::UpdateSchema method and an IDENetworkDataset object.

Remarks

In order to create a new network dataset or to an open an existing one, you must first get access to the NetworkDatasetFDExtension object (for network datasets in a geodatabase feature dataset) or the NetworkDatasetWorkspaceExtension object (for shapefile network datasets). Once you have the appropriate extension object, you can QI to the IDatasetContainer2 interface to create or open a network dataset.

When working with a Map, you can open a network dataset from its NetworkLayer by calling INetworkLayer.NetworkDataset.

The IDatasetContainer2.CreateDataset method should be used for creating network datasets. Network Datasets must be built after creation, using the INetworkBuild.BuildNetwork method.

The NetworkDatasetName objects of the network datasets can be accessed by the IDatasetContainer2.DatasetNames method.

Product Availability

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

See Also:
Serialized Form

Constructor Summary
NetworkDataset(Object obj)
          Construct a NetworkDataset using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 void addAttribute(INetworkAttribute attribute)
          Adds the given attribute to the schema of the network dataset.
 void addSource(INetworkSource source)
          Adds the given source to the schema of the network dataset.
 void alterSpatialReference(ISpatialReference spatialReference)
          Alters the spatial reference of the dataset to match the coordinate system of the input spatial reference, does not reproject the data.
 void analyze(int tableComponents)
          Analyze the data to update/generate DBMS statistics.
 IEnvelope buildNetwork(IEnvelope areaToBuild)
          Builds the network dataset for the given extent.
 boolean canCopy()
          True if this dataset can be copied.
 boolean canDelete()
          True if this dataset can be deleted.
 boolean canRename()
          True if this dataset can be renamed.
 void changeSchemaLock(int schemaLock)
          Changes a schema lock.
 void clearIDCache()
          Empties the contents of the index used for finding network elements by source.
 Date convertLocalTimeToUTCTime(int localTimeZoneID, Date localTime)
          Converts local time for the given time zone to UTC time.
 Date convertUTCTimeToLocalTime(int localTimeZoneID, Date utcTime)
          Converts UTC time to local time for the given time zone.
 IDataset copy(String copyName, IWorkspace copyWorkspace)
          Copies this dataset to a new dataset with the specified name.
 INetworkForwardStar createForwardStar()
          Creates a NetworkForwardStar object for traversing the network dataset.
 INetworkForwardStarAdjacencies createForwardStarAdjacencies()
          Creates a NetworkForwardStarAdjacencies container object for forward star queries.
 INetworkElement createNetworkElement(int elementType)
          Creates an uninitialized network element of the specified type for use in network dataset queries.
 void delete()
          Deletes this dataset.
 void deleteAttribute(INetworkAttribute attribute)
          Deletes the given attribute from the network dataset.
 void deleteSource(INetworkSource source)
          Deletes the given source from the network dataset.
 boolean equals(Object o)
          Compare this object with another
 IFeatureClass esri_getClass(int classIndex)
          The FeatureClass associated with the specified index value.
 INetworkSource esri_getSource(int index)
          Network dataset source by index.
 int getAllowableComponents()
          The allowable components to be analyzed.
 INetworkAttribute getAttribute(int index)
          Network dataset attribute by index.
 INetworkAttribute getAttributeByID(int iD)
          Network dataset attribute corresponding to the specified ID.
 INetworkAttribute getAttributeByName(String name)
          Network dataset attribute corresponding to the specified name.
 int getAttributeCount()
          Number of attributes in the network dataset.
 String getBrowseName()
          The browse name of the dataset.
 String getCategory()
          The category of the dataset.
 IFeatureClass getClassByID(int iD)
          The FeatureClass with the specified ID.
 IFeatureClass getClassByName(String name)
          The FeatureClass with the specified name.
 int getClassCount()
          The number of FeatureClasses in this container.
 IEnumFeatureClass getClasses()
          An enumerator over the FeatureClasses.
 int getComplexTurnCount()
          Number of turn elements in the network dataset having more than two edge elements participating.
 void getCurrentSchemaLocks(IEnumSchemaLockInfo[] schemaLockInfo)
          The list of current locks.
 IDEDataset getDataElement()
          The data element corresponding to the dataset component.
 IPolygon getDirtyArea(IPolygon location)
          The dirty area polygon of the network dataset.
 IEnumNetworkElement getEdgesByPosition(int sourceID, int oID, double position, boolean includeRelatedSDCHyperEdges)
          Edge elements in the network dataset with a from and to position that includes the given position for the given source object.
 IEnumNetworkElement getEdgesBySegment(int sourceID, int oID, double fromPosition, double toPosition)
          Edge elements in the network dataset with a from and to position included in the given range for the given source object.
 int getElementCount(int elementType)
          Number of network elements of the given type in the network dataset.
 IEnumNetworkElement getElements(int elementType)
          Enumeration of all elements in the network dataset of the given type.
 IEnumNetworkElement getElementsByOID(int sourceID, int oID)
          Elements in the network dataset corresponding to the given source object.
 IEnumNetworkElement getElementsByOIDs(int sourceID, ILongArray oids)
          Elements in the network dataset corresponding to the given source objects.
 IEnumNetworkElement getElementsForSource(int sourceID)
          Enumeration of all elements in the network dataset corresponding to the given source.
 IEnvelope getExtent()
          The extent of the GeoDataset.
 IName getFullName()
          The associated name object.
 int getID()
          The data element corresponding to the dataset component.
 int getMaxEID(int elementType)
          Highest element ID in the network dataset for the given element type.
 int getMaxValence()
          Maximum number of edge elements connected to any single junction element.
 IPropertySet getMetadata()
          The PropertySet containing metadata.
 String getName()
          The name of the Dataset.
 INativeType getNativeType()
          The native type.
 int getNetworkType()
          The type of the network dataset.
 IDataset getParent()
          The containing parent dataset.
 IPropertySet getPropertySet()
          The set of properties for the dataset.
 INetworkSource getSourceByID(int iD)
          Network dataset source corresponding to the specified ID.
 INetworkSource getSourceByName(String name)
          Network dataset source corresponding to the specified name.
 int getSourceCount()
          Number of sources in the network dataset.
 ISpatialReference getSpatialReference()
          The spatial reference of the GeoDataset.
 int getState()
          Indicates whether the network dataset is built or not.
 IEnumDataset getSubsets()
          Datasets contained within this dataset.
 int getTimeZoneID(INetworkElement networkElement)
          The time zone ID for the given network element.
 int getType()
          The type of the Dataset.
 IVersion getVersion()
          The object's current version.
 IWorkspace getWorkspace()
          The workspace containing this dataset.
 int hashCode()
          the hashcode for this object
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 boolean isBeingEdited()
          True if the dataset is being edited.
 boolean isBuildable()
          Indicates if this network dataset is buildable.
 boolean isCanAlterSpatialReference()
          Indicates if the spatial reference of the dataset can be altered.
 boolean isCanEdit()
          True if the dataset supports edit sessions with the ability to discard edits on save.
 boolean isCanEditMetadata()
          Indicates if metadata can be edited.
 boolean isCanRedo()
          True if the dataset supports edit sessions with the ability to redo undone operations.
 boolean isCanUndo()
          True if the dataset supports edit sessions with the ability to undo individual edit operations.
 boolean isHasUncompressedEdits()
          Indicates if the object has edits that haven't been compressed yet.
 boolean isRegisteredAsVersioned()
          Indicates if the object is registered as versioned.
 boolean isSupportsTurns()
          Indicates if this network dataset supports network turn elements.
 void populateIDCache(int sourceID)
          Initializes the index used for quickly finding network elements for the given source ID.
 void queryEdge(int eID, int direction, INetworkEdge edge)
          Performs a network edge element query by element ID and edge direction and populates the given edge element object.
 void queryJunction(int eID, INetworkJunction junction)
          Performs a network junction element query by element ID and populates the given junction element object.
 void queryTurn(int eID, INetworkTurn turn)
          Performs a network turn element query by element ID and populates the given turn element object.
 void registerAsVersioned(boolean isVersioned)
          Register/UnRegister the object as being versioned.
 void rename(String name)
          Renames this Dataset.
 void setBrowseName(String name)
          The browse name of the dataset.
 void setMetadata(IPropertySet ppPropertySet)
          The PropertySet containing metadata.
 void synchronize(int action, int interval)
          Updates metadata with the current properties; may create metadata if it doesn't already exist.
 void updateSchema(IDENetworkDataset dataElement)
          Updates the schema for the network dataset based upon the given data element.
 
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

NetworkDataset

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

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

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

getID

public int getID()
          throws IOException,
                 AutomationException
The data element corresponding to the dataset component.

Product Availability

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

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

getDataElement

public IDEDataset getDataElement()
                          throws IOException,
                                 AutomationException
The data element corresponding to the dataset component.

Remarks

The DataElement method is used to access the data element for this dataset component.

Product Availability

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

Specified by:
getDataElement in interface IDatasetComponent
Returns:
A reference to a com.esri.arcgis.geodatabase.IDEDataset
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getParent

public IDataset getParent()
                   throws IOException,
                          AutomationException
The containing parent dataset.

Remarks

Returns the parent of the dataset component. For example, for geodatabase network datasets this will return the containing feature dataset.

Product Availability

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

Specified by:
getParent in interface IDatasetComponent
Returns:
A reference to a com.esri.arcgis.geodatabase.IDataset
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_getClass

public IFeatureClass esri_getClass(int classIndex)
                            throws IOException,
                                   AutomationException
The FeatureClass associated with the specified index value.

Product Availability

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

Specified by:
esri_getClass in interface IFeatureClassContainer
Parameters:
classIndex - The classIndex (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IFeatureClass
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getClassByID

public IFeatureClass getClassByID(int iD)
                           throws IOException,
                                  AutomationException
The FeatureClass with the specified ID.

Product Availability

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

Specified by:
getClassByID in interface IFeatureClassContainer
Parameters:
iD - The iD (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IFeatureClass
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getClassByName

public IFeatureClass getClassByName(String name)
                             throws IOException,
                                    AutomationException
The FeatureClass with the specified name.

Product Availability

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

Specified by:
getClassByName in interface IFeatureClassContainer
Parameters:
name - The name (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IFeatureClass
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getClassCount

public int getClassCount()
                  throws IOException,
                         AutomationException
The number of FeatureClasses in this container.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getClassCount in interface IFeatureClassContainer
Returns:
The numClasses
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getClasses

public IEnumFeatureClass getClasses()
                             throws IOException,
                                    AutomationException
An enumerator over the FeatureClasses.

Remarks

There is no guarentee on the order that the feature classes will be returned.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getClasses in interface IFeatureClassContainer
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumFeatureClass
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isBuildable

public boolean isBuildable()
                    throws 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.

Product Availability

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

Specified by:
isBuildable in interface INetworkDataset
Returns:
The buildable
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getNetworkType

public int getNetworkType()
                   throws 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.

Product Availability

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

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

isSupportsTurns

public boolean isSupportsTurns()
                        throws 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.

Product Availability

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

Specified by:
isSupportsTurns in interface INetworkDataset
Returns:
The supportsTurns
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAttributeByID

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

Product Availability

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

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

getAttributeByName

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

Product Availability

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

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

getAttributeCount

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

Remarks

Returns the number of attributes assigned to the network dataset.

Product Availability

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

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

getAttribute

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

Product Availability

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

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

getSourceByID

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

Product Availability

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

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

getSourceByName

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

Product Availability

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

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

getSourceCount

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

Remarks

Returns the number of sources in the network dataset.

Product Availability

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

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

esri_getSource

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

Product Availability

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

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

getState

public int getState()
             throws 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."

Product Availability

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

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

getDirtyArea

public IPolygon getDirtyArea(IPolygon location)
                      throws IOException,
                             AutomationException
The dirty area polygon of the network dataset.

Product Availability

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

Specified by:
getDirtyArea in interface INetworkDataset2
Parameters:
location - A reference to a com.esri.arcgis.geometry.IPolygon (in)
Returns:
A reference to a com.esri.arcgis.geometry.IPolygon
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addAttribute

public void addAttribute(INetworkAttribute attribute)
                  throws IOException,
                         AutomationException
Adds the given attribute to the schema of the network dataset.

Remarks

The AddAttribute method is used to add an attribute to the network dataset. After calling AddAttribute, the network needs to be rebuilt in order to reflect the change.

Product Availability

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

Specified by:
addAttribute in interface INetworkBuild
Parameters:
attribute - A reference to a com.esri.arcgis.geodatabase.INetworkAttribute (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addSource

public void addSource(INetworkSource source)
               throws IOException,
                      AutomationException
Adds the given source to the schema of the network dataset.

Remarks

The AddSource method is used to add a feature class to the network dataset. Depending on the source being added to the network dataset, different properties may be specified. While turn sources require no additional parameters, edge and junction sources require a connectivity policy and group and optionally can have elevation fields defined.

Object classes, tables and non-simple feature classes, such as annotation, dimension, geometric network feature classes and feature classes already in a network dataset cannot be added to a network dataset. After calling AddSource, the network needs to be rebuilt in order to reflect the change.

Product Availability

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

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

deleteAttribute

public void deleteAttribute(INetworkAttribute attribute)
                     throws IOException,
                            AutomationException
Deletes the given attribute from the network dataset.

Remarks

DeleteAttribute removes the specified attribute from the network dataset. After calling DeleteAttribute, the network needs to be rebuilt.

Product Availability

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

Specified by:
deleteAttribute in interface INetworkBuild
Parameters:
attribute - A reference to a com.esri.arcgis.geodatabase.INetworkAttribute (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deleteSource

public void deleteSource(INetworkSource source)
                  throws IOException,
                         AutomationException
Deletes the given source from the network dataset.

Remarks

DeleteSource removes the specified source from the network dataset. The source will be removed from all the network attributes and directions for the network dataset. DeleteSource cannot be performed on the system junction source for the network dataset. After calling DeleteSource, the network needs to be rebuilt.

Product Availability

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

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

updateSchema

public void updateSchema(IDENetworkDataset dataElement)
                  throws IOException,
                         AutomationException
Updates the schema for the network dataset based upon the given data element.

Remarks

The UpdateSchema method should be used to make multiple schema changes to a network dataset in one operation. Use the Delete and Add methods for Attributes and Sources in order to make simple schema edits.

Use IDatasetComponent::DataElement to retrieve a copy of the data element for this network dataset. Make the changes to the data element copy, then call UpdateSchema to update the network dataset. The end user is responsible for ensuring the integrity of the data element when it’s supplied to the UpdateSchema method.

Certain operations are not allowed and will return an error when performed with the UpdateSchema method, these include:

Product Availability

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

Specified by:
updateSchema in interface INetworkBuild
Parameters:
dataElement - A reference to a com.esri.arcgis.geodatabase.IDENetworkDataset (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

buildNetwork

public IEnvelope buildNetwork(IEnvelope areaToBuild)
                       throws IOException,
                              AutomationException
Builds the network dataset for the given extent.

Description

BuildNetwork builds the network dataset in the area specified by the areaToValidate envelope and returns the envelope of the validated area. If an empty envelope is supplied, BuildNetwork will return an empty validated area. The simplest way to build a Network Dataset is to pass in the envelope of the extent of the network dataset. Note that the network dataset must be rebuilt when edits are made to the underlying features or feature classes. Edits include:

Incremental rebuilds of the network dataset are not supported in ArcGIS 9 - the entire network must be rebuilt. If any envelope other than that of the Network Dataset extent is supplied, the entire network will still be built.

Remarks

BuildNetwork must be performed outside of an edit session on shapefile or Geodatabase network datasets. During the process, the connectivity of features will be determined based on the connectivity policy and group settings and the elevation fields. The attributes defined on the network dataset will be populated within the logical network. Solve operations can still be performed on Network Datasets that have been edited since they have been built, however, the results are not guaranteed to be correct.

Product Availability

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

Specified by:
buildNetwork in interface INetworkBuild
Parameters:
areaToBuild - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMaxEID

public int getMaxEID(int elementType)
              throws IOException,
                     AutomationException
Highest element ID in the network dataset for the given element type.

Product Availability

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

Specified by:
getMaxEID in interface INetworkQuery
Parameters:
elementType - A com.esri.arcgis.geodatabase.esriNetworkElementType constant (in)
Returns:
The maxEID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMaxValence

public int getMaxValence()
                  throws IOException,
                         AutomationException
Maximum number of edge elements connected to any single junction element.

Remarks

The MaxValence is the largest number of edge elements in the network that are adjacent to a single junction element.

Product Availability

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

Specified by:
getMaxValence in interface INetworkQuery
Returns:
The maxValence
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getElementCount

public int getElementCount(int elementType)
                    throws IOException,
                           AutomationException
Number of network elements of the given type in the network dataset.

Product Availability

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

Specified by:
getElementCount in interface INetworkQuery
Parameters:
elementType - A com.esri.arcgis.geodatabase.esriNetworkElementType constant (in)
Returns:
The elementCount
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getComplexTurnCount

public int getComplexTurnCount()
                        throws IOException,
                               AutomationException
Number of turn elements in the network dataset having more than two edge elements participating.

Remarks

The ComplexTurnCount is the number of turn elements that traverse three or more edge elements in the network.

Product Availability

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

Specified by:
getComplexTurnCount in interface INetworkQuery
Returns:
The complexTurnCount
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createForwardStar

public INetworkForwardStar createForwardStar()
                                      throws IOException,
                                             AutomationException
Creates a NetworkForwardStar object for traversing the network dataset.

Remarks

CreateForwardStar can only be called when a Network license is checked out.

Before using the NetworkForwardStar object, you must specify its traversal parameters in the INetworkForwardStarSetup interface.

Product Availability

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

Specified by:
createForwardStar in interface INetworkQuery
Returns:
A reference to a com.esri.arcgis.geodatabase.INetworkForwardStar
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createForwardStarAdjacencies

public INetworkForwardStarAdjacencies createForwardStarAdjacencies()
                                                            throws IOException,
                                                                   AutomationException
Creates a NetworkForwardStarAdjacencies container object for forward star queries.

Remarks

The NetworkForwardStarAdjacencies object is populated by passing it as a parameter to the INetworkForwardStar::QueryAdjacencies method. The NetworkForwardStarAdjacencies object should be reused in subsequent calls to INetworkForwardStar::QueryAdjacencies.

Product Availability

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

Specified by:
createForwardStarAdjacencies in interface INetworkQuery
Returns:
A reference to a com.esri.arcgis.geodatabase.INetworkForwardStarAdjacencies
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createNetworkElement

public INetworkElement createNetworkElement(int elementType)
                                     throws IOException,
                                            AutomationException
Creates an uninitialized network element of the specified type for use in network dataset queries.

Remarks

The CreateNetworkElement method creates an empty network element object of the specified element type. This object is passed to the Query methods on the INetworkQuery, INetworkForwardStarAdjacencies, INetworkJunction, INetworkEdge, and INetworkTurn interfaces. When calling these Query methods, the empty network element object is populated with the appropriate information from the queried element.

Product Availability

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

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

queryEdge

public void queryEdge(int eID,
                      int direction,
                      INetworkEdge edge)
               throws IOException,
                      AutomationException
Performs a network edge element query by element ID and edge direction and populates the given edge element object.

Remarks

The QueryEdge method requires an instantiated NetworkEdge object to be passed in as a parameter. You can create an empty NetworkEdge object by using the CreateNetworkElement method.

Product Availability

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

Specified by:
queryEdge in interface INetworkQuery
Parameters:
eID - The eID (in)
direction - A com.esri.arcgis.geodatabase.esriNetworkEdgeDirection constant (in)
edge - A reference to a com.esri.arcgis.geodatabase.INetworkEdge (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryJunction

public void queryJunction(int eID,
                          INetworkJunction junction)
                   throws IOException,
                          AutomationException
Performs a network junction element query by element ID and populates the given junction element object.

Remarks

The QueryJunction method requires an instantiated NetworkJunction object to be passed in as a parameter. You can create an empty NetworkJunction object by using the CreateNetworkElement method.

Product Availability

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

Specified by:
queryJunction in interface INetworkQuery
Parameters:
eID - The eID (in)
junction - A reference to a com.esri.arcgis.geodatabase.INetworkJunction (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryTurn

public void queryTurn(int eID,
                      INetworkTurn turn)
               throws IOException,
                      AutomationException
Performs a network turn element query by element ID and populates the given turn element object.

Remarks

The QueryTurn method requires an instantiated NetworkTurn object to be passed in as a parameter. You can create an empty NetworkTurn object by using the CreateNetworkElement method.

Product Availability

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

Specified by:
queryTurn in interface INetworkQuery
Parameters:
eID - The eID (in)
turn - A reference to a com.esri.arcgis.geodatabase.INetworkTurn (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getElementsByOID

public IEnumNetworkElement getElementsByOID(int sourceID,
                                            int oID)
                                     throws IOException,
                                            AutomationException
Elements in the network dataset corresponding to the given source object.

Product Availability

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

Specified by:
getElementsByOID in interface INetworkQuery
Parameters:
sourceID - The sourceID (in)
oID - The oID (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumNetworkElement
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getEdgesByPosition

public IEnumNetworkElement getEdgesByPosition(int sourceID,
                                              int oID,
                                              double position,
                                              boolean includeRelatedSDCHyperEdges)
                                       throws IOException,
                                              AutomationException
Edge elements in the network dataset with a from and to position that includes the given position for the given source object.

Product Availability

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

Specified by:
getEdgesByPosition in interface INetworkQuery
Parameters:
sourceID - The sourceID (in)
oID - The oID (in)
position - The position (in)
includeRelatedSDCHyperEdges - The includeRelatedSDCHyperEdges (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumNetworkElement
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getEdgesBySegment

public IEnumNetworkElement getEdgesBySegment(int sourceID,
                                             int oID,
                                             double fromPosition,
                                             double toPosition)
                                      throws IOException,
                                             AutomationException
Edge elements in the network dataset with a from and to position included in the given range for the given source object.

Product Availability

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

Specified by:
getEdgesBySegment in interface INetworkQuery
Parameters:
sourceID - The sourceID (in)
oID - The oID (in)
fromPosition - The fromPosition (in)
toPosition - The toPosition (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumNetworkElement
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getElements

public IEnumNetworkElement getElements(int elementType)
                                throws IOException,
                                       AutomationException
Enumeration of all elements in the network dataset of the given type.

Product Availability

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

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

getElementsByOIDs

public IEnumNetworkElement getElementsByOIDs(int sourceID,
                                             ILongArray oids)
                                      throws IOException,
                                             AutomationException
Elements in the network dataset corresponding to the given source objects.

Product Availability

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

Specified by:
getElementsByOIDs in interface INetworkQuery
Parameters:
sourceID - The sourceID (in)
oids - A reference to a com.esri.arcgis.system.ILongArray (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumNetworkElement
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getElementsForSource

public IEnumNetworkElement getElementsForSource(int sourceID)
                                         throws IOException,
                                                AutomationException
Enumeration of all elements in the network dataset corresponding to the given source.

Product Availability

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

Specified by:
getElementsForSource in interface INetworkQuery
Parameters:
sourceID - The sourceID (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumNetworkElement
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

clearIDCache

public void clearIDCache()
                  throws IOException,
                         AutomationException
Empties the contents of the index used for finding network elements by source.

Product Availability

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

Specified by:
clearIDCache in interface INetworkQuery
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

populateIDCache

public void populateIDCache(int sourceID)
                     throws IOException,
                            AutomationException
Initializes the index used for quickly finding network elements for the given source ID.

Remarks

The PopulateIDCache method caches the IDs for network elements in the specified source, improving the performance of element queries. Populating the ID cache is useful when performing many queries for network elements within those cached source(s).

The SourceID parameter is the unique ID assigned to the NetworkSource in the network dataset.

Product Availability

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

Specified by:
populateIDCache in interface INetworkQuery
Parameters:
sourceID - The sourceID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTimeZoneID

public int getTimeZoneID(INetworkElement networkElement)
                  throws IOException,
                         AutomationException
The time zone ID for the given network element.

Product Availability

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

Specified by:
getTimeZoneID in interface INetworkQuery2
Parameters:
networkElement - A reference to a com.esri.arcgis.geodatabase.INetworkElement (in)
Returns:
The timeZoneID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

convertLocalTimeToUTCTime

public Date convertLocalTimeToUTCTime(int localTimeZoneID,
                                      Date localTime)
                               throws IOException,
                                      AutomationException
Converts local time for the given time zone to UTC time.

Product Availability

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

Specified by:
convertLocalTimeToUTCTime in interface INetworkQuery2
Parameters:
localTimeZoneID - The localTimeZoneID (in)
localTime - The localTime (in)
Returns:
The utcTime
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

convertUTCTimeToLocalTime

public Date convertUTCTimeToLocalTime(int localTimeZoneID,
                                      Date utcTime)
                               throws IOException,
                                      AutomationException
Converts UTC time to local time for the given time zone.

Product Availability

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

Specified by:
convertUTCTimeToLocalTime in interface INetworkQuery2
Parameters:
localTimeZoneID - The localTimeZoneID (in)
utcTime - The utcTime (in)
Returns:
The localTime
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getName

public String getName()
               throws IOException,
                      AutomationException
The name of the Dataset.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getFullName

public IName getFullName()
                  throws IOException,
                         AutomationException
The associated name object.

Remarks

The FullName property returns a Name object for the dataset. The Name object can be persisted and provides a way to get back to the dataset in a future session of the application, via the Open method on the Name object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getBrowseName

public String getBrowseName()
                     throws IOException,
                            AutomationException
The browse name of the dataset.

Remarks

BrowseName returns file names without their extension. For example, States.shp would appear as States.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getBrowseName in interface IDataset
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setBrowseName

public void setBrowseName(String name)
                   throws IOException,
                          AutomationException
The browse name of the dataset.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setBrowseName in interface IDataset
Parameters:
name - The name (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getType

public int getType()
            throws IOException,
                   AutomationException
The type of the Dataset.

Remarks

The Type property returns the an esriDatasetType value indicating the dataset type, such as esriDTTable or esriDTFeatureClass.

Example:


// Assume we have a reference to an IfeatureClass (pFeatureClass) IDataset pDataset = null;
pDataset = new IDatasetProxy(pFeatureClass);
System.out.println(pDataset.getName() + " " + pDataset.getType());
if(pFeatureClass != null){
pDataset = pFeatureClass.getFeatureDataset();
System.out.println(pDataset.getName() + " " + pDataset.getType());
}
pDataset = new IDatasetProxy(pDataset.getWorkspace());
System.out.println(pDataset.getName() + " " +
pDataset.getType());

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getCategory

public String getCategory()
                   throws IOException,
                          AutomationException
The category of the dataset.

Remarks

IDataset::Category returns a description of the category of the dataset. The description returned from the Category property is the same value that is displayed in the Type column within the Contents tab in ArcCatalog. The value will contain a description of the dataset such as "Topology" prefixed with a description of the type of workspace containing the dataset such as "File Geodatabase".

The description returned from IDataset::Category may change between releases of ArcGIS. In addition to this, returned strings are localized, meaning that code relying on a specific string being provided may fail when deployed with a different version of ArcGIS than it was developed with, or when deployed to a client using a different language than it was developed with.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getCategory in interface IDataset
Returns:
The category
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSubsets

public IEnumDataset getSubsets()
                        throws IOException,
                               AutomationException
Datasets contained within this dataset.

Description

The Subsets property returns other Dataset objects contained in this dataset.

Remarks

IDataset::Subsets is not supported for Graph objects such as a Geometric Network. To return the feature classes contained in a Geometric Network, use the IFeatureClassContainer interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSubsets in interface IDataset
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumDataset
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWorkspace

public IWorkspace getWorkspace()
                        throws IOException,
                               AutomationException
The workspace containing this dataset.

Description

The Workspace property returns the containing workspace for this dataset.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getWorkspace in interface IDataset
Returns:
A reference to a com.esri.arcgis.geodatabase.IWorkspace
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPropertySet

public IPropertySet getPropertySet()
                            throws IOException,
                                   AutomationException
The set of properties for the dataset.

Description

The PropertySet property is used to return any additional intrinsic properties (but not metadata properties) that may apply to the dataset. One use of this property is to distinguish between the types of File Geodatabase datafile formats. If called on a Feature Class or Table in a File Geodatabase the Datafile Format property can either be esriFGDBStandardDatafile or esriFGDBCompressedDatafile.

Most datasets do not implement this property and will either raise an error or return a null value if it's called. There are a handful of exceptions that will return property sets; these include the datasets from file geodatabases (as mentioned above) and coverages.

Remarks

Examples of intrinsic properties for which explicit methods exist include the SpatialReference and the Extent methods available on the IGeoDataset interface. In most cases this PropertySet will be empty.

IDataset::PropertySet is not supported for Graph objects such as a Geometric Network.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

canCopy

public boolean canCopy()
                throws IOException,
                       AutomationException
True if this dataset can be copied.

Remarks

The CanCopy, CanDelete, and CanRename properties are meant to be used in conjunction with the Copy, Delete, and Rename methods and signify whether a dataset is supported by these methods. For example, you may not delete a network feature class nor can you use the Copy method on a Geodatabase feature class. To copy Geodatabase datasets, including feature classes, geometric networks, topologies, etc., use the IGeoDBDataTransfer interface.

The CanCopy method is supported by:

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

copy

public IDataset copy(String copyName,
                     IWorkspace copyWorkspace)
              throws IOException,
                     AutomationException
Copies this dataset to a new dataset with the specified name.

Remarks

IDataset::Copy should only be used with datasets from file-based data sources, such as shapefiles and coverages.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
copy in interface IDataset
Parameters:
copyName - The copyName (in)
copyWorkspace - A reference to a com.esri.arcgis.geodatabase.IWorkspace (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IDataset
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

canDelete

public boolean canDelete()
                  throws IOException,
                         AutomationException
True if this dataset can be deleted.

Remarks

The CanCopy, CanDelete, and CanRename properties are meant to be used in conjunction with the Copy, Delete, and Rename methods and signify whether a dataset is supported by these methods. For example, you may not delete a network feature class nor can you use the Copy method on a Geodatabase feature class. To copy Geodatabase datasets, including feature classes, geometric networks, topologies, etc., use the IGeoDBDataTransfer interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

delete

public void delete()
            throws IOException,
                   AutomationException
Deletes this dataset.

Remarks

Certain feature classes, such as network and topology feature classes, cannot be deleted until their containing objects are deleted.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
delete in interface IDataset
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

canRename

public boolean canRename()
                  throws IOException,
                         AutomationException
True if this dataset can be renamed.

Remarks

The CanCopy, CanDelete, and CanRename properties are meant to be used in conjunction with the Copy, Delete, and Rename methods and signify whether a dataset is supported by these methods. For example, you may not delete or rename a network feature class nor can you use the Copy method on a Geodatabase feature class. To copy Geodatabase datasets, including feature classes, geometric networks, topologies, etc., use the IGeoDBDataTransfer interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

rename

public void rename(String name)
            throws IOException,
                   AutomationException
Renames this Dataset.

Remarks

IDataset::Rename does not support the renaming of Graph objects such as a Geometric Network. In addition, certain feature classes, such as network feature classes, cannot be renamed.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
rename in interface IDataset
Parameters:
name - The name (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isBeingEdited

public boolean isBeingEdited()
                      throws IOException,
                             AutomationException
True if the dataset is being edited.

Remarks

Once an edit session has been started on a workspace, the IsBeingEdited method on the IDatasetEdit interface can be used to determine if a particular dataset is participating in the edit session.

The reasons why a dataset may not participate include the connected user has no privileges or permission to edit the dataset, the connected user is not licensed to edit this type of dataset, or the dataset is not versioned but a versioned edit session has been started (or vice versa).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isCanEdit

public boolean isCanEdit()
                  throws IOException,
                         AutomationException
True if the dataset supports edit sessions with the ability to discard edits on save.

Remarks

This property is to be used within an active edit session, results cannot be guaranteed if called on a dataset outside of an edit session.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isCanEdit in interface IDatasetEditInfo
Returns:
The pCanEdit
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isCanUndo

public boolean isCanUndo()
                  throws IOException,
                         AutomationException
True if the dataset supports edit sessions with the ability to undo individual edit operations.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isCanUndo in interface IDatasetEditInfo
Returns:
The pCanUndo
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isCanRedo

public boolean isCanRedo()
                  throws IOException,
                         AutomationException
True if the dataset supports edit sessions with the ability to redo undone operations.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isCanRedo in interface IDatasetEditInfo
Returns:
The pCanUndo
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

changeSchemaLock

public void changeSchemaLock(int schemaLock)
                      throws IOException,
                             AutomationException
Changes a schema lock.

Remarks

There are two kinds of schema locks: shared and exclusive. Shared schema locks are applied automatically by the geodatabase when accessing a dataset and are removed when all references to the dataset are removed. For this reason, it's not necessary to explicitly apply or remove shared schema locks. There is no limit to the number of shared schema locks a dataset or object can have at any given time.
In contrast to shared schema locks, exclusive schema locks are controlled by the developer or ArcGIS application, such as ArcMap or ArcCatalog. An exclusive lock is used to lock a geodatabase dataset or object from use by others to make the necessary changes to it. An exclusive lock is promoted from a shared lock and demoted back to a shared lock when no longer needed. The presence of additional shared schema locks on a dataset or object prevents an exclusive schema lock from being applied and precludes the ability to make changes to the underlying dataset and its schema while it is in use. Only one exclusive schema lock is allowed per dataset. As opposed to shared schema locks, exclusive schema locks are not applied or removed automatically; it is the responsibility of the developer to apply or remove exclusive schema locks.
Limit the scope of exclusive schema locks to the operation that requires the lock. Gather the necessary information to perform the action, obtain the exclusive lock, make the change, and release the lock. Some examples of operations for which an exclusive schema lock should be obtained include:
  • Modifications to attribute domains, such as adding or removing values from a coded value domain or changing the range for range domains
  • Adding or deleting a field from a feature class or object class
  • Associating a class extension with a feature class
  • Creating a topology, geometric network, network dataset, terrain, schematic dataset, representation, or cadastral fabric on a set of feature classes
  • Any use of the IClassSchemaEdit interface
  • Putting a feature class into and taking it out of load-only mode with the IFeatureClassLoad.LoadOnlyMode method
  • Managing (creating, deleting, or modifying) spatial and attribute indexes
Once the action requiring an exclusive schema lock is complete, the exclusive schema lock must be demoted to a shared lock. This includes when errors are raised during the schema modification, for example, consider the case where a field is being deleted from a feature class. To delete the field, an exclusive schema lock is obtained. However, on the call to DeleteField, an error is thrown; that is, the field being deleted is a required field, such as the ObjectID field. In the handling of the error, the exclusive schema lock must be demoted to a shared lock before proceeding.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
changeSchemaLock in interface ISchemaLock
Parameters:
schemaLock - A com.esri.arcgis.geodatabase.esriSchemaLock constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCurrentSchemaLocks

public void getCurrentSchemaLocks(IEnumSchemaLockInfo[] schemaLockInfo)
                           throws IOException,
                                  AutomationException
The list of current locks.

Remarks

The ISchemaLockInfo interface is used in concert with ISchemaLock to provide information about a schema lock, for example, whether it is shared or exclusive and for ArcSDE geodatabases, the name of the user who has the lock. Note that there will always be at least one schema lock on the dataset. Also note that by checking the schema locks on a dataset a shared schema lock is applied to the data.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getCurrentSchemaLocks in interface ISchemaLock
Parameters:
schemaLockInfo - A reference to a com.esri.arcgis.geodatabase.IEnumSchemaLockInfo (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isHasUncompressedEdits

public boolean isHasUncompressedEdits()
                               throws IOException,
                                      AutomationException
Indicates if the object has edits that haven't been compressed yet.

Remarks

The HasUncompressedEdits method returns a boolean value that represents if the dataset contains versioned edits that have not been compressed to the base state.

Knowing if the dataset contains any edits is important prior to unregistering the dataset as versioned.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isHasUncompressedEdits in interface IVersionedObject2
Returns:
The hasUncompressedEdits
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getVersion

public IVersion getVersion()
                    throws IOException,
                           AutomationException
The object's current version.

Remarks

The Version method returns an IVersion object that is the current version the object references. This provides a mechanism to easily detect the version of the database that an object references.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getVersion in interface IVersionedObject
Returns:
A reference to a com.esri.arcgis.geodatabase.IVersion
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isRegisteredAsVersioned

public boolean isRegisteredAsVersioned()
                                throws IOException,
                                       AutomationException
Indicates if the object is registered as versioned.

Remarks

Returns if the underlying dataset is registered as versioned. This only applies to datasets that exist in versioned workspaces.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isRegisteredAsVersioned in interface IVersionedObject
Returns:
The pIsRegistered
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

registerAsVersioned

public void registerAsVersioned(boolean isVersioned)
                         throws IOException,
                                AutomationException
Register/UnRegister the object as being versioned.

Remarks

The RegisterAsVersioned method registers or unregisters datasets. Feature classes that participate in feature datasets can be registered or unregistered, although it is highly recomended that the operation be performed on the entire feature dataset. The method requires a boolean argument, true to register or false to unregister the object.

Unregistering an object class as versioned permanently drops the object's delta tables. To preserve the edits, perform a compress prior to unregistering as versioned. See IVersionedWorkspace.Compress and IVersionedObject2 for additional information.

Only the owner can register or unregister the object.

By programmatically registering a class participating in a geometric network as versioned it does not guarantee the entire geometric network including other participating classes will also be registered. It is then recommended the registration take place at the feature dataset level rather than on the individual feature class. This workflow is exposed by default through the user interface in ArcCatalog. If there is a need to register individual classes as versioned within a feature dataset without registering the entire dataset it is crucial the every class participating in a geometric network, including the geometric network itself, is explicitly registered individually.

Archiving must first be disabaled on a class before it can be unregistered as versioned. This situation only applies to classes that have been registered as versioned with the MoveEditsToBase option set to false through the IVersionObject3.RegisterAsVersioned3 method.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
registerAsVersioned in interface IVersionedObject
Parameters:
isVersioned - The isVersioned (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

analyze

public void analyze(int tableComponents)
             throws IOException,
                    AutomationException
Analyze the data to update/generate DBMS statistics.

Remarks

When applied to a feature dataset, Analyze updates the statistics for all of the tables.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
analyze in interface IDatasetAnalyze
Parameters:
tableComponents - The tableComponents (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAllowableComponents

public int getAllowableComponents()
                           throws IOException,
                                  AutomationException
The allowable components to be analyzed.

Remarks

The AllowableComponents property indicates which parts of the table or feature class can be analyzed. The returned value is based on the esriTableComponents enumeration. Members from this enumeration can be bitwise or’d together.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getAllowableComponents in interface IDatasetAnalyze
Returns:
The allowableComponents
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSpatialReference

public ISpatialReference getSpatialReference()
                                      throws IOException,
                                             AutomationException
The spatial reference of the GeoDataset.

Remarks

This property is read only. For layers, when the first layer is added to ArcMap, its spatial reference is read by this property, and the map is set to this spatial reference.

Instances of the esriCarto.GroupLayer class will return null for this property, as a group layer can contain multiple datasets with different spatial references.

Modifications to a spatial reference returned by this property will not be persisted. To modify the spatial reference of a dataset, the IGeoDatasetSchemaEdit and IGeoDatasetSchemaEdit2 interfaces should be used.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSpatialReference in interface IGeoDataset
Returns:
A reference to a com.esri.arcgis.geometry.ISpatialReference
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExtent

public IEnvelope getExtent()
                    throws IOException,
                           AutomationException
The extent of the GeoDataset.

Remarks

The IGeoDataset::Extent property returns an envelope representing the maximum extent of data which has been stored in the dataset.

Consider the following scenario. A new feature class has features added to it. The IGeoDataset::Extent is then requested and an envelope is returned. The extents of the envelope returned are represented by the red box in the image below.

The red box represents the IGeoDataset extent

If a portion of the features were then deleted and the extent is again requested an envelope with the exact same extents as during the first request would be returned (see image below). This is because the deletion of features does not shrink the extent. However all additions of features outside the red box would increase the envelope returned to encompass the newly added features.

The red box represents the IGeoDataset extent after some of the features have been deleted

If you would like to update the IGeoDataset::Extent property to reflect the current features in your dataset please see IFeatureClassManage::UpdateExtent (also see IFeatureClassLoad). In the image below the extent has been updated and a new envelope is being returned.

The red box represents the IGeoDataset extent after it has been updated

ESRI's GroupLayer implements this property differently from most other layer coclasses. When you instantiate a new GroupLayer, this property will return a valid envelope with zero height and width. With most other newly instantiated layers (for example FeatureLayer, RasterLayer, TinLayer), this property initally returns Nothing.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getExtent in interface IGeoDataset
Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isCanAlterSpatialReference

public boolean isCanAlterSpatialReference()
                                   throws IOException,
                                          AutomationException
Indicates if the spatial reference of the dataset can be altered.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isCanAlterSpatialReference in interface IGeoDatasetSchemaEdit
Returns:
The canAlter
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

alterSpatialReference

public void alterSpatialReference(ISpatialReference spatialReference)
                           throws IOException,
                                  AutomationException
Alters the spatial reference of the dataset to match the coordinate system of the input spatial reference, does not reproject the data.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
alterSpatialReference in interface IGeoDatasetSchemaEdit
Parameters:
spatialReference - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMetadata

public IPropertySet getMetadata()
                         throws IOException,
                                AutomationException
The PropertySet containing metadata.

Remarks

The variable to hold the data must be of IPropertySet data type.

The metadata property is frequently used to save, or update, changes to metadata documents that have taken place through methods available on the IPropertySet, IXmlPropertySet, and/or IXmlPropertySet2 interfaces.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setMetadata

public void setMetadata(IPropertySet ppPropertySet)
                 throws IOException,
                        AutomationException
The PropertySet containing metadata.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

synchronize

public void synchronize(int action,
                        int interval)
                 throws IOException,
                        AutomationException
Updates metadata with the current properties; may create metadata if it doesn't already exist.

Description

The Synchronize method is used to extract metadata properties from an object and write those properties to the metadata .xml. Depending on the value of the esriMetaSyncAction, the Synchronize method may generate a new set of metadata if it doesn't already exist.

Remarks

The following actions will result in synchronization given each of the listed conditions:

Action Metadata status Esri/Sync element Interval parameter
esriMSAAccessed Doesn't matter Must not be FALSE Must be less than actual interval
esriMSAAlways Doesn't matter Doesn't matter Doesn't matter
esriMSACreated Must not exist Must not be FALSE Must be less than actual interval
esriMSANotCreated Must exist Must not be FALSE Must be less than actual interval
esriMSAOverwrite Doesn't matter Doesn't matter Doesn't matter

The difference between esriMSAAlways and esriMSAOverwrite lies in which elements are synchronized. esriMSAAlways will honor the removal or value change of an element's Sync attribute (to disable synchronization), whereas using esriMSAOverwrite is equivalent to setting the IXmlPropertySet2.OverwriteSyncAttribute to true for the metadata's property set, meaning that even elements without a Sync attribute of TRUE will be synchronized.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
synchronize in interface IMetadata
Parameters:
action - A com.esri.arcgis.geodatabase.esriMetadataSyncAction constant (in)
interval - The interval (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isCanEditMetadata

public boolean isCanEditMetadata()
                          throws IOException,
                                 AutomationException
Indicates if metadata can be edited.

Remarks

This property is available to those objects that support metadata.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isCanEditMetadata in interface IMetadataEdit
Returns:
The pCanEdit
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getNativeType

public INativeType getNativeType()
                          throws IOException,
                                 AutomationException
The native type.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getNativeType in interface INativeTypeInfo
Returns:
A reference to a com.esri.arcgis.geodatabase.INativeType
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.