com.esri.arcgis.geodatabase
Class NetworkJunction

java.lang.Object
  extended by com.esri.arcgis.geodatabase.NetworkJunction
All Implemented Interfaces:
INetworkElement, INetworkJunction, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class NetworkJunction
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, INetworkElement, INetworkJunction

A container for querying information on a network dataset junction element.

Description

To access the NetworkJunction object for an existing junction element in the network dataset, use the QueryJunction method on the INetworkQuery interface.

Product Availability

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

See Also:
Serialized Form

Constructor Summary
NetworkJunction(Object obj)
          Construct a NetworkJunction using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
 Object getAttributeValue(int attributeID)
          Value of this network element for the given network attribute ID.
 Object getAttributeValueByName(String attributeName)
          Value of this network element for the given network attribute name.
 int getEdgeCount()
          Number of network edge elements adjacent to this network junction element.
 int getEID()
          Element ID for this network element.
 int getElementType()
          Type of this network element.
 int getOID()
          Object ID of the object corresponding to this network element.
 int getSourceID()
          ID of the network dataset source from which this network element was derived.
 int getTurnCount()
          Number of network turn elements anchored at this network junction.
 int hashCode()
          the hashcode for this object
 void queryEdge(int index, boolean leavingJunction, INetworkEdge edge)
          Queries the index'th network edge element adjacent to this network junction element.
 void queryPoint(IPoint point)
          Queries the point object corresponding to this network junction element.
 void queryTurn(int index, INetworkTurn turn)
          Queries the index'th network turn element anchored at this network junction 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

NetworkJunction

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

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

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

getEID

public int getEID()
           throws IOException,
                  AutomationException
Element ID for this network element.

Product Availability

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

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

getElementType

public int getElementType()
                   throws IOException,
                          AutomationException
Type of this network element.

Product Availability

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

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

getSourceID

public int getSourceID()
                throws IOException,
                       AutomationException
ID of the network dataset source from which this network element was derived.

Remarks

The SourceID is the unique ID of the NetworkSource that generated this network element.

Product Availability

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

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

getOID

public int getOID()
           throws IOException,
                  AutomationException
Object ID of the object corresponding to this network element.

Remarks

The OID property returns the ObjectID of the feature that generated this network element.

Product Availability

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

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

getAttributeValue

public Object getAttributeValue(int attributeID)
                         throws IOException,
                                AutomationException
Value of this network element for the given network attribute ID.

Product Availability

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

Specified by:
getAttributeValue in interface INetworkElement
Parameters:
attributeID - The attributeID (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAttributeValueByName

public Object getAttributeValueByName(String attributeName)
                               throws IOException,
                                      AutomationException
Value of this network element for the given network attribute name.

Product Availability

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

Specified by:
getAttributeValueByName in interface INetworkElement
Parameters:
attributeName - The attributeName (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getEdgeCount

public int getEdgeCount()
                 throws IOException,
                        AutomationException
Number of network edge elements adjacent to this network junction element.

Remarks

The EdgeCount is the number of adjacent edge elements leaving this junction.

Product Availability

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

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

getTurnCount

public int getTurnCount()
                 throws IOException,
                        AutomationException
Number of network turn elements anchored at this network junction.

Remarks

The TurnCount is the number of turn elements that are anchored to this junction. A turn element is anchored at a junction if the last two edges of the turn pass through the junction.

Product Availability

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

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

queryEdge

public void queryEdge(int index,
                      boolean leavingJunction,
                      INetworkEdge edge)
               throws IOException,
                      AutomationException
Queries the index'th network edge element adjacent to this network junction element.

Remarks

The QueryEdge method retrieves the edge element adjacent to this junction at the specified index. The index values range from 0 to (EdgeCount - 1).

The leavingJunction parameter determines in which travel direction the edge element is returned. If the leavingJunction parameter is True, then the edge element returned is the element that travels in the direction away from the junction.

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

Product Availability

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

Specified by:
queryEdge in interface INetworkJunction
Parameters:
index - The index (in)
leavingJunction - The leavingJunction (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.

queryTurn

public void queryTurn(int index,
                      INetworkTurn turn)
               throws IOException,
                      AutomationException
Queries the index'th network turn element anchored at this network junction element.

Remarks

The QueryTurn method retrieves the turn element anchored to this junction at the specified index. A turn element is anchored at a junction if the last two edges of the turn pass through the junction. The index values range from 0 to (TurnCount - 1).

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

Product Availability

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

Specified by:
queryTurn in interface INetworkJunction
Parameters:
index - The index (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.

queryPoint

public void queryPoint(IPoint point)
                throws IOException,
                       AutomationException
Queries the point object corresponding to this network junction element.

Remarks

The QueryPoint method retrieves the Point geometry associated with this junction element.

This method requires an instantiated Point object to be passed in as a parameter.

On an SDC network dataset, QueryPoint returns an empty Point object for junction elements that do not connect to any edges (i.e., have an EdgeCount of zero).

Product Availability

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

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