com.esri.arcgis.networkanalysis
Class NetElementBarriers

java.lang.Object
  extended by com.esri.arcgis.networkanalysis.NetElementBarriers
All Implemented Interfaces:
com.esri.arcgis.interop.RemoteObjRef, INetElementBarriersGEN, ISupportErrorInfo, Serializable

public class NetElementBarriers
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, INetElementBarriersGEN, ISupportErrorInfo

A container for defining to the NetSolver which network elements have barriers.

Description

The NetElementBarriers object contains references to barriers on a geometric network.

Remarks

A NetElementBarriers object is used to specify element barriers for the TraceFlowSolver object. Because NetElementBarriers objects are co-creatable, you can use this class to specify barriers using code. Alternatively, by calling INetworkAnalysisExtBarriers::CreateElementBarriers, you can create NetElementBarriers objects that represent all the edge or junction barriers that were placed on the current network using the Utility Network Analyst toolbar.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
com.esri.arcgis.editorext.UtilityNetworkAnalysisExt, Serialized Form

Constructor Summary
NetElementBarriers()
          Constructs a NetElementBarriers using ArcGIS Engine.
NetElementBarriers(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
NetElementBarriers theNetElementBarriers = (NetElementBarriers) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 int getElementType()
          Type of network element on which the barriers are placed.
 INetwork getNetwork()
          Network on which the barrier set is placed.
 int hashCode()
          the hashcode for this object
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 void setBarriers(int userClassID, int[] userIDs)
          Specifies a set of network features to use as barriers.
 void setBarriersByEID(int[] eIDs)
          Specifies a set of network element IDs to use as barriers.
 void setElementType(int elementType)
          Type of network element on which the barriers are placed.
 void setNetworkByRef(INetwork network)
          Network on which the barrier set is placed.
 
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

NetElementBarriers

public NetElementBarriers()
                   throws IOException,
                          UnknownHostException
Constructs a NetElementBarriers using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

NetElementBarriers

public NetElementBarriers(Object obj)
                   throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
NetElementBarriers theNetElementBarriers = (NetElementBarriers) obj;

Construct a NetElementBarriers using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to NetElementBarriers.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


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

setNetworkByRef

public void setNetworkByRef(INetwork network)
                     throws IOException,
                            AutomationException
Network on which the barrier set is placed.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getNetwork

public INetwork getNetwork()
                    throws IOException,
                           AutomationException
Network on which the barrier set is placed.

Product Availability

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

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

setElementType

public void setElementType(int elementType)
                    throws IOException,
                           AutomationException
Type of network element on which the barriers are placed.

Remarks

Barriers can be placed on either edge or junction elements.

Product Availability

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

Specified by:
setElementType in interface INetElementBarriersGEN
Parameters:
elementType - A com.esri.arcgis.geodatabase.esriElementType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getElementType

public int getElementType()
                   throws IOException,
                          AutomationException
Type of network element on which the barriers are placed.

Remarks

Barriers can be placed on either edge or junction elements.

Product Availability

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

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

setBarriers

public void setBarriers(int userClassID,
                        int[] userIDs)
                 throws IOException,
                        AutomationException
Specifies a set of network features to use as barriers.

Remarks

The Network and ElementType properties must be set before calling SetBarriers.

Product Availability

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

Specified by:
setBarriers in interface INetElementBarriersGEN
Parameters:
userClassID - The userClassID (in)
userIDs - The userIDs (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setBarriersByEID

public void setBarriersByEID(int[] eIDs)
                      throws IOException,
                             AutomationException
Specifies a set of network element IDs to use as barriers.

Remarks

The Network and ElementType properties must be set before calling SetBarriersByEID.

If there are values in the array that do not correspond to a valid EID in the specified Network, then the NetElementBarriers object simply ignores these values.

Product Availability

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

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

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws IOException,
                                       AutomationException
interfaceSupportsErrorInfo

Description

Indicates whether the interface supports IErrorInfo.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
interfaceSupportsErrorInfo in interface ISupportErrorInfo
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.