com.esri.arcgis.geodatabase
Class INetworkQueryProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.geodatabase.INetworkQueryProxy
All Implemented Interfaces:
INetworkQuery, Externalizable, Serializable
Direct Known Subclasses:
INetworkQuery2Proxy

public class INetworkQueryProxy
extends com.esri.arcgis.interop.Dispatch
implements INetworkQuery, Serializable

Provides access to members that query the elements of the network dataset.

Remarks

The INetworkQuery interface is used to retrieve the elements of the network dataset. You can query for network elements by their element type, by the source that generated them, or by the Object IDs of their source features.

You can also query other elements that are immediately adjacent to given elements by using the NetworkForwardStar object. This object allows you to repeatedly query the adjacent elements and their attribute values efficiently.

Product Availability

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

See Also:
Serialized Form

Field Summary
 boolean noncastable
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Constructor Summary
  INetworkQueryProxy()
           
  INetworkQueryProxy(Object obj)
           
protected INetworkQueryProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 void clearIDCache()
          Empties the contents of the index used for finding network elements by source.
 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.
 int getComplexTurnCount()
          Number of turn elements in the network dataset having more than two edge elements participating.
 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.
 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.
 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 removeListener(String iidStr, Object theListener)
           
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

noncastable

public boolean noncastable
Constructor Detail

INetworkQueryProxy

public INetworkQueryProxy()

INetworkQueryProxy

public INetworkQueryProxy(Object obj)
                   throws IOException
Throws:
IOException

INetworkQueryProxy

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

addListener

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

removeListener

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

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.