com.esri.arcgis.geodatabase
Class EvaluatedNetworkAttribute

java.lang.Object
  extended by com.esri.arcgis.geodatabase.EvaluatedNetworkAttribute
All Implemented Interfaces:
IEvaluatedNetworkAttribute, IEvaluatedNetworkAttribute2, INetworkAttribute, INetworkAttribute2, INetworkAttribute3, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class EvaluatedNetworkAttribute
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, INetworkAttribute, INetworkAttribute2, INetworkAttribute3, IEvaluatedNetworkAttribute, IEvaluatedNetworkAttribute2

A container for describing a network dataset attribute and its evaluators.

Description

Network dataset attributes control traversability over the network. They specify properties of junctions, edge, and turns used as input for network solvers, such as time travel of road segments, speeds along a road, and whether a given road is one-way.

An EvaluatedNetworkAttribute object is a light weight object that holds the information about a network dataset attribute that determines its values by use of network evaluators. Examples of network evaluators are the NetworkConstantEvaluator, NetworkFieldEvaluator, and NetworkScriptEvaluator.

The NetworkAttribute or EvaluatedNetworkAttribute object for an existing network dataset can be accessed through the INetworkDataset interface.

Product Availability

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

See Also:
Serialized Form

Constructor Summary
EvaluatedNetworkAttribute()
          Constructs a EvaluatedNetworkAttribute using ArcGIS Engine.
EvaluatedNetworkAttribute(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
EvaluatedNetworkAttribute theEvaluatedNetworkAttribute = (EvaluatedNetworkAttribute) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 int getDataType()
          Type of data used in this network attribute.
 INetworkEvaluator getDefaultEvaluator(int elementType)
          Evaluator used to derive attribute values for the given element type when an evaluator is not specified for a network element's source.
 IDENetworkDataset getDENetworkDataset()
          Evaluator used to derive values from the given network source for this network attribute.
 INetworkEvaluator getEvaluator(INetworkSource networkSource, int direction)
          Evaluator used to derive values from the given network source for this network attribute.
 int getID()
          Unique identifier of this network attribute.
 String getName()
          Name of this network attribute.
 IArray getParameters()
          Array of parameters for this network attribute.
 int getUnits()
          Units of this network attribute.
 int getUsageType()
          Usage type of this network attribute.
 int hashCode()
          the hashcode for this object
 boolean isTimeAware(int elementType)
          Indicates if the network attribute is time aware.
 boolean isUseByDefault()
          Indicates if this network attribute is to be used by default.
 void refresh()
          Refresh the network evaluators assigned to this network attribute.
 void setDataType(int dataType)
          Type of data used in this network attribute.
 void setDefaultEvaluatorByRef(int elementType, INetworkEvaluator evaluator)
          Evaluator used to derive attribute values for the given element type when an evaluator is not specified for a network element's source.
 void setEvaluatorByRef(INetworkSource networkSource, int direction, INetworkEvaluator evaluator)
          Evaluator used to derive values from the given network source for this network attribute.
 void setName(String attributeName)
          Name of this network attribute.
 void setParametersByRef(IArray parameters)
          Array of parameters for this network attribute.
 void setUnits(int units)
          Units of this network attribute.
 void setUsageType(int usageType)
          Usage type of this network attribute.
 void setUseByDefault(boolean useByDefault)
          Indicates if this network attribute is to be used by default.
 
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

EvaluatedNetworkAttribute

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

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

EvaluatedNetworkAttribute

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

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

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

getName

public String getName()
               throws IOException,
                      AutomationException
Name of this network attribute.

Product Availability

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

Specified by:
getName in interface INetworkAttribute
Returns:
The attributeName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setName

public void setName(String attributeName)
             throws IOException,
                    AutomationException
Name of this network attribute.

Product Availability

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

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

getID

public int getID()
          throws IOException,
                 AutomationException
Unique identifier of this network attribute.

Product Availability

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

Specified by:
getID in interface INetworkAttribute
Returns:
The attributeID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDataType

public int getDataType()
                throws IOException,
                       AutomationException
Type of data used in this network attribute.

Remarks

The DataType for the network attribute can be either Integer, Float, Double, or Boolean.

Depending on the UsageType for the network attribute, only certain DataTypes are allowed:

UsageType: Allowed DataTypes:
esriNAUTCost esriNADTInteger, esriNADTFloat, esriNADTDouble
esriNAUTDescriptor esriNADTInteger, esriNADTFloat, esriNADTDouble, esriNADTBoolean
esriNAUTRestriction esriNADTBoolean
esriNAUTHierarchy esriNADTInteger

Product Availability

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

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

setDataType

public void setDataType(int dataType)
                 throws IOException,
                        AutomationException
Type of data used in this network attribute.

Product Availability

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

Specified by:
setDataType in interface INetworkAttribute
Parameters:
dataType - A com.esri.arcgis.geodatabase.esriNetworkAttributeDataType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getUsageType

public int getUsageType()
                 throws IOException,
                        AutomationException
Usage type of this network attribute.

Remarks

The UsageType for the network attribute can be either Cost, Descriptor, Restriction, or Hierarchy.

Depending on the UsageType for the network attribute, only certain DataTypes are allowed:

UsageType: Allowed DataTypes:
esriNAUTCost esriNADTInteger, esriNADTFloat, esriNADTDouble
esriNAUTDescriptor esriNADTInteger, esriNADTFloat, esriNADTDouble, esriNADTBoolean
esriNAUTRestriction esriNADTBoolean
esriNAUTHierarchy esriNADTInteger

Product Availability

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

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

setUsageType

public void setUsageType(int usageType)
                  throws IOException,
                         AutomationException
Usage type of this network attribute.

Product Availability

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

Specified by:
setUsageType in interface INetworkAttribute
Parameters:
usageType - A com.esri.arcgis.geodatabase.esriNetworkAttributeUsageType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getUnits

public int getUnits()
             throws IOException,
                    AutomationException
Units of this network attribute.

Remarks

If the attribute is not measured in units of distance or time, specify the Units as esriNAUUnknown.

Product Availability

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

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

setUnits

public void setUnits(int units)
              throws IOException,
                     AutomationException
Units of this network attribute.

Product Availability

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

Specified by:
setUnits in interface INetworkAttribute
Parameters:
units - A com.esri.arcgis.geodatabase.esriNetworkAttributeUnits constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getParameters

public IArray getParameters()
                     throws IOException,
                            AutomationException
Array of parameters for this network attribute.

Remarks

This property provides access to the IArray interface that holds the collection of NetworkAttributeParameter objects that are available for this NetworkAttribute.

Product Availability

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

Specified by:
getParameters in interface INetworkAttribute2
Returns:
A reference to a com.esri.arcgis.system.IArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setParametersByRef

public void setParametersByRef(IArray parameters)
                        throws IOException,
                               AutomationException
Array of parameters for this network attribute.

Remarks

This property provides access to the IArray interface that holds the collection of NetworkAttributeParameter objects that are available for this NetworkAttribute.

Product Availability

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

Specified by:
setParametersByRef in interface INetworkAttribute2
Parameters:
parameters - A reference to a com.esri.arcgis.system.IArray (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

refresh

public void refresh()
             throws IOException,
                    AutomationException
Refresh the network evaluators assigned to this network attribute.

Remarks

Calling Refresh propogates the call to INetworkEvaluator2::Refresh on the attribute's underlying network evaluators that implement INetworkEvaluator2. This gives the evaluator an opportunity to update its state based on current data or parameter values. This method is called by the network analyst solvers after setting INetworkAttribute2::Parameters prior to performing the solve operation.

Product Availability

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

Specified by:
refresh in interface INetworkAttribute2
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isUseByDefault

public boolean isUseByDefault()
                       throws IOException,
                              AutomationException
Indicates if this network attribute is to be used by default.

Remarks

If the UseByDefault property is set to True for a NetworkAttribute, the network attribute will automatically be set as an option (e.g., impedance, restriction, hierarchy) when a new network analysis layer is created in ArcMap.

Product Availability

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

Specified by:
isUseByDefault in interface INetworkAttribute2
Returns:
The useByDefault
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setUseByDefault

public void setUseByDefault(boolean useByDefault)
                     throws IOException,
                            AutomationException
Indicates if this network attribute is to be used by default.

Product Availability

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

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

isTimeAware

public boolean isTimeAware(int elementType)
                    throws IOException,
                           AutomationException
Indicates if the network attribute is time aware.

Product Availability

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

Specified by:
isTimeAware in interface INetworkAttribute3
Parameters:
elementType - A com.esri.arcgis.geodatabase.esriNetworkElementType constant (in)
Returns:
The isTimeAware
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDefaultEvaluatorByRef

public void setDefaultEvaluatorByRef(int elementType,
                                     INetworkEvaluator evaluator)
                              throws IOException,
                                     AutomationException
Evaluator used to derive attribute values for the given element type when an evaluator is not specified for a network element's source.

Product Availability

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

Specified by:
setDefaultEvaluatorByRef in interface IEvaluatedNetworkAttribute
Parameters:
elementType - A com.esri.arcgis.geodatabase.esriNetworkElementType constant (in)
evaluator - A reference to a com.esri.arcgis.geodatabase.INetworkEvaluator (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDefaultEvaluator

public INetworkEvaluator getDefaultEvaluator(int elementType)
                                      throws IOException,
                                             AutomationException
Evaluator used to derive attribute values for the given element type when an evaluator is not specified for a network element's source.

Product Availability

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

Specified by:
getDefaultEvaluator in interface IEvaluatedNetworkAttribute
Parameters:
elementType - A com.esri.arcgis.geodatabase.esriNetworkElementType constant (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.INetworkEvaluator
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setEvaluatorByRef

public void setEvaluatorByRef(INetworkSource networkSource,
                              int direction,
                              INetworkEvaluator evaluator)
                       throws IOException,
                              AutomationException
Evaluator used to derive values from the given network source for this network attribute.

Product Availability

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

Specified by:
setEvaluatorByRef in interface IEvaluatedNetworkAttribute
Parameters:
networkSource - A reference to a com.esri.arcgis.geodatabase.INetworkSource (in)
direction - A com.esri.arcgis.geodatabase.esriNetworkEdgeDirection constant (in)
evaluator - A reference to a com.esri.arcgis.geodatabase.INetworkEvaluator (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getEvaluator

public INetworkEvaluator getEvaluator(INetworkSource networkSource,
                                      int direction)
                               throws IOException,
                                      AutomationException
Evaluator used to derive values from the given network source for this network attribute.

Product Availability

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

Specified by:
getEvaluator in interface IEvaluatedNetworkAttribute
Parameters:
networkSource - A reference to a com.esri.arcgis.geodatabase.INetworkSource (in)
direction - A com.esri.arcgis.geodatabase.esriNetworkEdgeDirection constant (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.INetworkEvaluator
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDENetworkDataset

public IDENetworkDataset getDENetworkDataset()
                                      throws IOException,
                                             AutomationException
Evaluator used to derive values from the given network source for this network attribute.

Product Availability

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

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