com.esri.arcgis.geodatabase
Class NetworkForwardStarAdjacencies

java.lang.Object
  extended by com.esri.arcgis.geodatabase.NetworkForwardStarAdjacencies
All Implemented Interfaces:
INetworkForwardStarAdjacencies, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class NetworkForwardStarAdjacencies
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, INetworkForwardStarAdjacencies

A container for retrieving information about the elements adjacent to a given network element.

Description

The NetworkForwardStarAdjacencies object holds the adjacent network elements that were queried by calling the INetworkForwardStar::QueryAdjacencies method. The NetworkForwardStarAdjacencies object is created by calling the INetworkQuery::CreateForwardStarAdjacencies method.

Product Availability

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

See Also:
Serialized Form

Constructor Summary
NetworkForwardStarAdjacencies(Object obj)
          Construct a NetworkForwardStarAdjacencies using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
 int getCount()
          Number of adjacent edges returned by the NetworkForwardStar object.
 int hashCode()
          the hashcode for this object
 boolean isHasTurn(int index)
          Indicates if the adjacent edge at the specified index has a turn.
 boolean isHasTurnRestriction()
          Indicates if any of the adjacent edges are restricted due to a turn restriction.
 void queryAtJunction(INetworkJunction junction)
          Queries the junction element used as the atJunction in the NetworkForwardStar object.
 void queryEdge(int index, INetworkEdge adjacentEdge, double[] fromPosition, double[] toPosition)
          Queries the adjacent edge element at the specified index.
 void queryToJunction(int index, INetworkJunction adjacentJunction, boolean[] isFiltered)
          For the adjacent edge element at the specified index, queries the junction element opposite of the atJunction.
 void queryTurn(int index, INetworkTurn adjacentTurn)
          Queries the turn element that passes through the fromEdge, the atJunction, and the adjacent edge at the specified index.
 
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

NetworkForwardStarAdjacencies

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

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

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

getCount

public int getCount()
             throws IOException,
                    AutomationException
Number of adjacent edges returned by the NetworkForwardStar object.

Remarks

The Count is the number of adjacent edge elements returned by INetworkForwardStar::QueryAdjacencies.

Product Availability

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

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

queryAtJunction

public void queryAtJunction(INetworkJunction junction)
                     throws IOException,
                            AutomationException
Queries the junction element used as the atJunction in the NetworkForwardStar object.

Remarks

The QueryAtJunction method retrieves the junction element used by the INetworkForwardStar::QueryAdjacencies method.

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

Product Availability

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

Specified by:
queryAtJunction in interface INetworkForwardStarAdjacencies
Parameters:
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.

queryEdge

public void queryEdge(int index,
                      INetworkEdge adjacentEdge,
                      double[] fromPosition,
                      double[] toPosition)
               throws IOException,
                      AutomationException
Queries the adjacent edge element at the specified index.

Remarks

The QueryEdge method returns the edge element that is adjacent to the atJunction at the specified index.

The index values range from 0 to (Count - 1).

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 INetworkQuery::CreateNetworkElement method.

The fromPosition and toPosition parameters indicate the range of positional values along the network edge element that was queried. The position values range from 0.0 to 1.0, where 0.0 is at the starting end of the edge element and 1.0 is at the terminating end of the edge element. The fromPosition value will always be less than or equal to the toPosition value, regardless of the Direction property of the edge element. In most cases, the entire edge element is queried, so the fromPosition parameter will be returned as 0.0 and the toPosition parameter will be returned as 1.0. A common case when only a portion of the edge element is queried is when querying an SDC network dataset with hyperedges.

When analyzing an SDC network dataset that has hyperedges, the call to QueryAdjacencies will also return the portion of the hyperedges that corresponds to the queried adjacent edge elements. For example, below is a simple network dataset with three junctions (A, B, and C), two regular edges (EIDs 51 and 52), and a hyperedge (EID 88); and all three edge elements are digitized from left to right:

SDC network dataset with hyperedge

Example A: When calling QueryAdjacencies with junction A as the atJunction, the NetworkForwardStarAdjacencies object will contain edge 51 in the along-digitized Direction, with a fromPosition parameter of 0.0 and a toPosition parameter of 1.0. It will also include the portion of the hyperedge that corresponds to that edge element -- edge 88 in the along-digitized Direction, with a fromPosition parameter of 0.0 and a toPosition parameter of 1.0.

Example B: When calling QueryAdjacencies with junction B as the atJunction, the NetworkForwardStarAdjacencies object will contain edge 51 in the against-digitized Direction, with a fromPosition of 0.0 and a toPosition of 1.0; and edge 52 in the along-digitized Direction, with a fromPosition parameter of 0.0 and a toPosition parameter of 1.0. The NetworkForwardStarAdjacencies object will also include the portions of the hyperedge that correspond to those edge elements:

Product Availability

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

Specified by:
queryEdge in interface INetworkForwardStarAdjacencies
Parameters:
index - The index (in)
adjacentEdge - A reference to a com.esri.arcgis.geodatabase.INetworkEdge (in)
fromPosition - The fromPosition (out: use single element array)
toPosition - The toPosition (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryToJunction

public void queryToJunction(int index,
                            INetworkJunction adjacentJunction,
                            boolean[] isFiltered)
                     throws IOException,
                            AutomationException
For the adjacent edge element at the specified index, queries the junction element opposite of the atJunction.

Remarks

The QueryToJunction method returns the junction element that is opposite the atJunction via the QueryEdge edge element at the specified index.

The index values range from 0 to (Count - 1).

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

Product Availability

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

Specified by:
queryToJunction in interface INetworkForwardStarAdjacencies
Parameters:
index - The index (in)
adjacentJunction - A reference to a com.esri.arcgis.geodatabase.INetworkJunction (in)
isFiltered - The isFiltered (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryTurn

public void queryTurn(int index,
                      INetworkTurn adjacentTurn)
               throws IOException,
                      AutomationException
Queries the turn element that passes through the fromEdge, the atJunction, and the adjacent edge at the specified index.

Remarks

The QueryTurn method returns the turn element that traverses from the fromEdge through the atJunction to the QueryEdge edge element at the specified index. The QueryTurn method does not always return a turn element -- to determine if a turn element will be returned, call the HasTurn property using the same index value.

The index values range from 0 to (Count - 1).

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 INetworkQuery::CreateNetworkElement method.

Product Availability

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

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

isHasTurn

public boolean isHasTurn(int index)
                  throws IOException,
                         AutomationException
Indicates if the adjacent edge at the specified index has a turn.

Product Availability

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

Specified by:
isHasTurn in interface INetworkForwardStarAdjacencies
Parameters:
index - The index (in)
Returns:
The hasTurn
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isHasTurnRestriction

public boolean isHasTurnRestriction()
                             throws IOException,
                                    AutomationException
Indicates if any of the adjacent edges are restricted due to a turn restriction.

Remarks

The HasTurnRestriction property indicates whether or not the QueryTurn method will not return a turn element due to a Restriction attribute set in the NetworkForwardStar object.

Product Availability

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

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