|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.geodatabase.NetworkDataset
public class NetworkDataset
A container for querying information about a network dataset.
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.
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.
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 |
---|
public NetworkDataset(Object obj) throws IOException
obj
to NetworkDataset
. *
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
IOException
- if there are interop problems
NetworkDataset theNetworkDataset = (NetworkDataset) obj;
Method Detail |
---|
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int getID() throws IOException, AutomationException
getID
in interface IDatasetComponent2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IDEDataset getDataElement() throws IOException, AutomationException
The DataElement method is used to access the data element for this dataset component.
getDataElement
in interface IDatasetComponent
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IDataset getParent() throws IOException, AutomationException
Returns the parent of the dataset component. For example, for geodatabase network datasets this will return the containing feature dataset.
getParent
in interface IDatasetComponent
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IFeatureClass esri_getClass(int classIndex) throws IOException, AutomationException
esri_getClass
in interface IFeatureClassContainer
classIndex
- The classIndex (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IFeatureClass getClassByID(int iD) throws IOException, AutomationException
getClassByID
in interface IFeatureClassContainer
iD
- The iD (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IFeatureClass getClassByName(String name) throws IOException, AutomationException
getClassByName
in interface IFeatureClassContainer
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getClassCount() throws IOException, AutomationException
getClassCount
in interface IFeatureClassContainer
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumFeatureClass getClasses() throws IOException, AutomationException
There is no guarentee on the order that the feature classes will be returned.
getClasses
in interface IFeatureClassContainer
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isBuildable() throws IOException, AutomationException
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.
isBuildable
in interface INetworkDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getNetworkType() throws IOException, AutomationException
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.
getNetworkType
in interface INetworkDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isSupportsTurns() throws IOException, AutomationException
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.
isSupportsTurns
in interface INetworkDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public INetworkAttribute getAttributeByID(int iD) throws IOException, AutomationException
getAttributeByID
in interface INetworkDataset
iD
- The iD (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public INetworkAttribute getAttributeByName(String name) throws IOException, AutomationException
getAttributeByName
in interface INetworkDataset
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getAttributeCount() throws IOException, AutomationException
Returns the number of attributes assigned to the network dataset.
getAttributeCount
in interface INetworkDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public INetworkAttribute getAttribute(int index) throws IOException, AutomationException
getAttribute
in interface INetworkDataset
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public INetworkSource getSourceByID(int iD) throws IOException, AutomationException
getSourceByID
in interface INetworkDataset
iD
- The iD (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public INetworkSource getSourceByName(String name) throws IOException, AutomationException
getSourceByName
in interface INetworkDataset
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getSourceCount() throws IOException, AutomationException
Returns the number of sources in the network dataset.
getSourceCount
in interface INetworkDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public INetworkSource esri_getSource(int index) throws IOException, AutomationException
esri_getSource
in interface INetworkDataset
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getState() throws IOException, AutomationException
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."
getState
in interface INetworkDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPolygon getDirtyArea(IPolygon location) throws IOException, AutomationException
getDirtyArea
in interface INetworkDataset2
location
- A reference to a com.esri.arcgis.geometry.IPolygon (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addAttribute(INetworkAttribute attribute) throws IOException, AutomationException
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.
addAttribute
in interface INetworkBuild
attribute
- A reference to a com.esri.arcgis.geodatabase.INetworkAttribute (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addSource(INetworkSource source) throws IOException, AutomationException
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.
addSource
in interface INetworkBuild
source
- A reference to a com.esri.arcgis.geodatabase.INetworkSource (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deleteAttribute(INetworkAttribute attribute) throws IOException, AutomationException
DeleteAttribute removes the specified attribute from the network dataset. After calling DeleteAttribute, the network needs to be rebuilt.
deleteAttribute
in interface INetworkBuild
attribute
- A reference to a com.esri.arcgis.geodatabase.INetworkAttribute (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deleteSource(INetworkSource source) throws IOException, AutomationException
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.
deleteSource
in interface INetworkBuild
source
- A reference to a com.esri.arcgis.geodatabase.INetworkSource (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void updateSchema(IDENetworkDataset dataElement) throws IOException, AutomationException
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:
updateSchema
in interface INetworkBuild
dataElement
- A reference to a com.esri.arcgis.geodatabase.IDENetworkDataset (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnvelope buildNetwork(IEnvelope areaToBuild) throws IOException, AutomationException
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.
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.
buildNetwork
in interface INetworkBuild
areaToBuild
- A reference to a com.esri.arcgis.geometry.IEnvelope (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getMaxEID(int elementType) throws IOException, AutomationException
getMaxEID
in interface INetworkQuery
elementType
- A com.esri.arcgis.geodatabase.esriNetworkElementType constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getMaxValence() throws IOException, AutomationException
The MaxValence is the largest number of edge elements in the network that are adjacent to a single junction element.
getMaxValence
in interface INetworkQuery
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getElementCount(int elementType) throws IOException, AutomationException
getElementCount
in interface INetworkQuery
elementType
- A com.esri.arcgis.geodatabase.esriNetworkElementType constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getComplexTurnCount() throws IOException, AutomationException
The ComplexTurnCount is the number of turn elements that traverse three or more edge elements in the network.
getComplexTurnCount
in interface INetworkQuery
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public INetworkForwardStar createForwardStar() throws IOException, AutomationException
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.
createForwardStar
in interface INetworkQuery
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public INetworkForwardStarAdjacencies createForwardStarAdjacencies() throws IOException, AutomationException
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.
createForwardStarAdjacencies
in interface INetworkQuery
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public INetworkElement createNetworkElement(int elementType) throws IOException, AutomationException
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.
createNetworkElement
in interface INetworkQuery
elementType
- A com.esri.arcgis.geodatabase.esriNetworkElementType constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void queryEdge(int eID, int direction, INetworkEdge edge) throws IOException, AutomationException
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.
queryEdge
in interface INetworkQuery
eID
- The eID (in)direction
- A com.esri.arcgis.geodatabase.esriNetworkEdgeDirection constant (in)edge
- A reference to a com.esri.arcgis.geodatabase.INetworkEdge (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void queryJunction(int eID, INetworkJunction junction) throws IOException, AutomationException
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.
queryJunction
in interface INetworkQuery
eID
- The eID (in)junction
- A reference to a com.esri.arcgis.geodatabase.INetworkJunction (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void queryTurn(int eID, INetworkTurn turn) throws IOException, AutomationException
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.
queryTurn
in interface INetworkQuery
eID
- The eID (in)turn
- A reference to a com.esri.arcgis.geodatabase.INetworkTurn (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumNetworkElement getElementsByOID(int sourceID, int oID) throws IOException, AutomationException
getElementsByOID
in interface INetworkQuery
sourceID
- The sourceID (in)oID
- The oID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumNetworkElement getEdgesByPosition(int sourceID, int oID, double position, boolean includeRelatedSDCHyperEdges) throws IOException, AutomationException
getEdgesByPosition
in interface INetworkQuery
sourceID
- The sourceID (in)oID
- The oID (in)position
- The position (in)includeRelatedSDCHyperEdges
- The includeRelatedSDCHyperEdges (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumNetworkElement getEdgesBySegment(int sourceID, int oID, double fromPosition, double toPosition) throws IOException, AutomationException
getEdgesBySegment
in interface INetworkQuery
sourceID
- The sourceID (in)oID
- The oID (in)fromPosition
- The fromPosition (in)toPosition
- The toPosition (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumNetworkElement getElements(int elementType) throws IOException, AutomationException
getElements
in interface INetworkQuery
elementType
- A com.esri.arcgis.geodatabase.esriNetworkElementType constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumNetworkElement getElementsByOIDs(int sourceID, ILongArray oids) throws IOException, AutomationException
getElementsByOIDs
in interface INetworkQuery
sourceID
- The sourceID (in)oids
- A reference to a com.esri.arcgis.system.ILongArray (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumNetworkElement getElementsForSource(int sourceID) throws IOException, AutomationException
getElementsForSource
in interface INetworkQuery
sourceID
- The sourceID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void clearIDCache() throws IOException, AutomationException
clearIDCache
in interface INetworkQuery
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void populateIDCache(int sourceID) throws IOException, AutomationException
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.
populateIDCache
in interface INetworkQuery
sourceID
- The sourceID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getTimeZoneID(INetworkElement networkElement) throws IOException, AutomationException
getTimeZoneID
in interface INetworkQuery2
networkElement
- A reference to a com.esri.arcgis.geodatabase.INetworkElement (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Date convertLocalTimeToUTCTime(int localTimeZoneID, Date localTime) throws IOException, AutomationException
convertLocalTimeToUTCTime
in interface INetworkQuery2
localTimeZoneID
- The localTimeZoneID (in)localTime
- The localTime (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Date convertUTCTimeToLocalTime(int localTimeZoneID, Date utcTime) throws IOException, AutomationException
convertUTCTimeToLocalTime
in interface INetworkQuery2
localTimeZoneID
- The localTimeZoneID (in)utcTime
- The utcTime (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getName() throws IOException, AutomationException
getName
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IName getFullName() throws IOException, AutomationException
getFullName
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getBrowseName() throws IOException, AutomationException
getBrowseName
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setBrowseName(String name) throws IOException, AutomationException
setBrowseName
in interface IDataset
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getType() throws IOException, AutomationException
// 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());
getType
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getCategory() throws IOException, AutomationException
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.
getCategory
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumDataset getSubsets() throws IOException, AutomationException
The Subsets property returns other Dataset objects contained in this dataset.
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.
getSubsets
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IWorkspace getWorkspace() throws IOException, AutomationException
The Workspace property returns the containing workspace for this dataset.
getWorkspace
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPropertySet getPropertySet() throws IOException, AutomationException
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.
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.
getPropertySet
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean canCopy() throws IOException, AutomationException
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:
canCopy
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IDataset copy(String copyName, IWorkspace copyWorkspace) throws IOException, AutomationException
IDataset::Copy should only be used with datasets from file-based data sources, such as shapefiles and coverages.
copy
in interface IDataset
copyName
- The copyName (in)copyWorkspace
- A reference to a com.esri.arcgis.geodatabase.IWorkspace (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean canDelete() throws IOException, AutomationException
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.
canDelete
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void delete() throws IOException, AutomationException
Certain feature classes, such as network and topology feature classes, cannot be deleted until their containing objects are deleted.
delete
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean canRename() throws IOException, AutomationException
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.
canRename
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void rename(String name) throws IOException, AutomationException
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.
rename
in interface IDataset
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isBeingEdited() throws IOException, AutomationException
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).
isBeingEdited
in interface IDatasetEdit
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isCanEdit() throws IOException, AutomationException
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.
isCanEdit
in interface IDatasetEditInfo
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isCanUndo() throws IOException, AutomationException
isCanUndo
in interface IDatasetEditInfo
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isCanRedo() throws IOException, AutomationException
isCanRedo
in interface IDatasetEditInfo
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void changeSchemaLock(int schemaLock) throws IOException, AutomationException
changeSchemaLock
in interface ISchemaLock
schemaLock
- A com.esri.arcgis.geodatabase.esriSchemaLock constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getCurrentSchemaLocks(IEnumSchemaLockInfo[] schemaLockInfo) throws IOException, AutomationException
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.
getCurrentSchemaLocks
in interface ISchemaLock
schemaLockInfo
- A reference to a com.esri.arcgis.geodatabase.IEnumSchemaLockInfo (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isHasUncompressedEdits() throws IOException, AutomationException
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.
isHasUncompressedEdits
in interface IVersionedObject2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IVersion getVersion() throws IOException, AutomationException
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.
getVersion
in interface IVersionedObject
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isRegisteredAsVersioned() throws IOException, AutomationException
Returns if the underlying dataset is registered as versioned. This only applies to datasets that exist in versioned workspaces.
isRegisteredAsVersioned
in interface IVersionedObject
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void registerAsVersioned(boolean isVersioned) throws IOException, AutomationException
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.
registerAsVersioned
in interface IVersionedObject
isVersioned
- The isVersioned (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void analyze(int tableComponents) throws IOException, AutomationException
When applied to a feature dataset, Analyze updates the statistics for all of the tables.
analyze
in interface IDatasetAnalyze
tableComponents
- The tableComponents (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getAllowableComponents() throws IOException, AutomationException
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.
getAllowableComponents
in interface IDatasetAnalyze
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ISpatialReference getSpatialReference() throws IOException, AutomationException
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.
getSpatialReference
in interface IGeoDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnvelope getExtent() throws IOException, AutomationException
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.
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.
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.
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.
getExtent
in interface IGeoDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isCanAlterSpatialReference() throws IOException, AutomationException
isCanAlterSpatialReference
in interface IGeoDatasetSchemaEdit
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void alterSpatialReference(ISpatialReference spatialReference) throws IOException, AutomationException
alterSpatialReference
in interface IGeoDatasetSchemaEdit
spatialReference
- A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPropertySet getMetadata() throws IOException, AutomationException
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.
getMetadata
in interface IMetadata
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setMetadata(IPropertySet ppPropertySet) throws IOException, AutomationException
setMetadata
in interface IMetadata
ppPropertySet
- A reference to a com.esri.arcgis.system.IPropertySet (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void synchronize(int action, int interval) throws IOException, AutomationException
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.
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.
synchronize
in interface IMetadata
action
- A com.esri.arcgis.geodatabase.esriMetadataSyncAction constant (in)interval
- The interval (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isCanEditMetadata() throws IOException, AutomationException
This property is available to those objects that support metadata.
isCanEditMetadata
in interface IMetadataEdit
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public INativeType getNativeType() throws IOException, AutomationException
getNativeType
in interface INativeTypeInfo
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void interfaceSupportsErrorInfo(GUID riid) throws IOException, AutomationException
Indicates whether the interface supports IErrorInfo.
interfaceSupportsErrorInfo
in interface ISupportErrorInfo
riid
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |