|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.geodatabase.NetworkAttribute
public class NetworkAttribute
A container for describing a network dataset attribute.
A NetworkAttribute object is a light weight object that holds the information about a network attribute in a network dataset.
Network attributes control traversability over the network dataset. 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.
The NetworkAttribute or EvaluatedNetworkAttribute object for an existing network dataset can be accessed through the INetworkDataset interface.
Constructor Summary | |
---|---|
NetworkAttribute(Object obj)
Construct a NetworkAttribute 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 |
getDataType()
Type of data used in 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 |
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 |
---|
public NetworkAttribute(Object obj) throws IOException
obj
to NetworkAttribute
. *
NetworkAttribute o = (NetworkAttribute)obj; // will not work
NetworkAttribute o = new NetworkAttribute(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server
IOException
- if there are interop problems
NetworkAttribute theNetworkAttribute = (NetworkAttribute) obj;
Method Detail |
---|
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String getName() throws IOException, AutomationException
getName
in interface INetworkAttribute
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setName(String attributeName) throws IOException, AutomationException
setName
in interface INetworkAttribute
attributeName
- The attributeName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getID() throws IOException, AutomationException
getID
in interface INetworkAttribute
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getDataType() throws IOException, AutomationException
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 |
getDataType
in interface INetworkAttribute
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setDataType(int dataType) throws IOException, AutomationException
setDataType
in interface INetworkAttribute
dataType
- A com.esri.arcgis.geodatabase.esriNetworkAttributeDataType constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getUsageType() throws IOException, AutomationException
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 |
getUsageType
in interface INetworkAttribute
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setUsageType(int usageType) throws IOException, AutomationException
setUsageType
in interface INetworkAttribute
usageType
- A com.esri.arcgis.geodatabase.esriNetworkAttributeUsageType constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getUnits() throws IOException, AutomationException
If the attribute is not measured in units of distance or time, specify the Units as esriNAUUnknown.
getUnits
in interface INetworkAttribute
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setUnits(int units) throws IOException, AutomationException
setUnits
in interface INetworkAttribute
units
- A com.esri.arcgis.geodatabase.esriNetworkAttributeUnits constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IArray getParameters() throws IOException, AutomationException
This property provides access to the IArray interface that holds the collection of NetworkAttributeParameter objects that are available for this NetworkAttribute.
getParameters
in interface INetworkAttribute2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setParametersByRef(IArray parameters) throws IOException, AutomationException
This property provides access to the IArray interface that holds the collection of NetworkAttributeParameter objects that are available for this NetworkAttribute.
setParametersByRef
in interface INetworkAttribute2
parameters
- A reference to a com.esri.arcgis.system.IArray (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void refresh() throws IOException, AutomationException
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.
refresh
in interface INetworkAttribute2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isUseByDefault() throws IOException, AutomationException
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.
isUseByDefault
in interface INetworkAttribute2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setUseByDefault(boolean useByDefault) throws IOException, AutomationException
setUseByDefault
in interface INetworkAttribute2
useByDefault
- The useByDefault (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isTimeAware(int elementType) throws IOException, AutomationException
isTimeAware
in interface INetworkAttribute3
elementType
- A com.esri.arcgis.geodatabase.esriNetworkElementType constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |