|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.networkanalyst.NAClassLoader
public class NAClassLoader
Loads a network class based on its field maps.
An NAClass is like a feature class with "rows" of network analysis inputs and outputs. The NAClassLoader uses a specified field mapping (INAClassFieldMap) and a network locator (INALocator) to populate an NAClass.
Constructor Summary | |
---|---|
NAClassLoader()
Constructs a NAClassLoader using ArcGIS Engine. |
|
NAClassLoader(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. NAClassLoader theNAClassLoader = (NAClassLoader) obj; |
Method Summary | |
---|---|
boolean |
equals(Object o)
Compare this object with another |
ILocator |
getAddressLocator()
The address locator to be used. |
static String |
getClsid()
getClsid. |
INAClassFieldMap |
getFieldMap()
The field mapping definition. |
INALocator |
getLocator()
The locator to be used. |
INAClass |
getNAClass()
The network analysis class. |
double |
getSnapOffsetDistance()
The snap offset distance from the network. |
int |
getSnapOffsetUnits()
The snap offset units. |
int |
hashCode()
the hashcode for this object |
void |
initialize(INAContext context,
String nAClassName,
ICursor cursor)
Quickly initializes the class loader to be able to load information from a cursor into a given NAClass. |
void |
interfaceSupportsErrorInfo(GUID riid)
interfaceSupportsErrorInfo |
boolean |
isSnapToNetwork()
Indicates if the geometry should be snapped to the network. |
void |
load(ICursor cursor,
ITrackCancel trackCancel,
int[] rowsInCursor,
int[] rowsLocated)
Populate the network analysis class. |
void |
setAddressLocatorByRef(ILocator addressLocator)
The address locator to be used. |
void |
setFieldMapByRef(INAClassFieldMap fieldMapping)
The field mapping definition. |
void |
setLocatorByRef(INALocator loaderLocator)
The locator to be used. |
void |
setNAClassByRef(INAClass classToLoadInto)
The network analysis class. |
void |
setSnapOffsetDistance(double distance)
The snap offset distance from the network. |
void |
setSnapOffsetUnits(int units)
The snap offset units. |
void |
setSnapToNetwork(boolean enabled)
Indicates if the geometry should be snapped to the network. |
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 NAClassLoader() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic NAClassLoader(Object obj) throws IOException
NAClassLoader theNAClassLoader = (NAClassLoader) obj;
obj
to NAClassLoader
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problemsMethod Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void setNAClassByRef(INAClass classToLoadInto) throws IOException, AutomationException
The NAClass property specifies the NAClass feature class holding the network locations that will be populated when INAClassLoader::Load is called.
setNAClassByRef
in interface INAClassLoader
classToLoadInto
- A reference to a com.esri.arcgis.networkanalyst.INAClass (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public INAClass getNAClass() throws IOException, AutomationException
The NAClass property specifies the NAClass feature class holding the network locations that will be populated when INAClassLoader::Load is called.
getNAClass
in interface INAClassLoader
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setFieldMapByRef(INAClassFieldMap fieldMapping) throws IOException, AutomationException
FieldMap specifies the NAClassFieldMap that dictates what the values for the newly created NALocationFeatures will be. If there is a mapped field, the mapped field value will be used. If there is no mapped field or the mapped field value is NULL, the default value will be used.
setFieldMapByRef
in interface INAClassLoader
fieldMapping
- A reference to a com.esri.arcgis.networkanalyst.INAClassFieldMap (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public INAClassFieldMap getFieldMap() throws IOException, AutomationException
FieldMap specifies the NAClassFieldMap that dictates what the values for the newly created NALocationFeatures will be. If there is a mapped field, the mapped field value will be used. If there is no mapped field or the mapped field value is NULL, the default value will be used.
getFieldMap
in interface INAClassLoader
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setLocatorByRef(INALocator loaderLocator) throws IOException, AutomationException
The Locator property specifies how network locations will be found.
setLocatorByRef
in interface INAClassLoader
loaderLocator
- A reference to a com.esri.arcgis.networkanalyst.INALocator (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public INALocator getLocator() throws IOException, AutomationException
The Locator property specifies how network locations will be found.
getLocator
in interface INAClassLoader
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void load(ICursor cursor, ITrackCancel trackCancel, int[] rowsInCursor, int[] rowsLocated) throws IOException, AutomationException
Load iterates through the input cursor and populates the NAClass with NALocationFeatures with field values based on the FieldMap and Locator. It returns as output parameters the number of features in the cursor and the number of network locations that could be located.
If you know the number of rows in the input cursor and are passing a TrackCancel object that has a reference to an object that implements IStepProgressor, you should set the rowsInCursor parameter to the number of rows in the cursor. This will allow for feedback showing how many rows have been loaded out of the total number to load. For example it might say "Loading into "Stops" (120 of 230)". If you do not know how many rows are in the cursor, you should initialize the rowsInCursor variable to 0 prior to calling Load.
This method will return the error E_ABORT if the ITrackCancel object passed in to Load causes the load to cancel.
load
in interface INAClassLoader
cursor
- A reference to a com.esri.arcgis.geodatabase.ICursor (in)trackCancel
- A reference to a com.esri.arcgis.system.ITrackCancel (in)rowsInCursor
- The rowsInCursor (in/out: use single element array)rowsLocated
- The rowsLocated (in/out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void initialize(INAContext context, String nAClassName, ICursor cursor) throws IOException, AutomationException
The INAClassLoader2::Initialize method sets the Locator, NAClass, and FieldMap properties otherwise set via methods on the INAClassLoader interface.
initialize
in interface INAClassLoader2
context
- A reference to a com.esri.arcgis.networkanalyst.INAContext (in)nAClassName
- The nAClassName (in)cursor
- A reference to a com.esri.arcgis.geodatabase.ICursor (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setAddressLocatorByRef(ILocator addressLocator) throws IOException, AutomationException
The AddressLocator property specifies the ILocator address locator used to determine the name of the network location based on reverse geocoding of the network location's geometry.
setAddressLocatorByRef
in interface INAClassLoader2
addressLocator
- A reference to a com.esri.arcgis.geodatabase.ILocator (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ILocator getAddressLocator() throws IOException, AutomationException
The AddressLocator property specifies the ILocator address locator used to determine the name of the network location based on reverse geocoding of the network location's geometry.
getAddressLocator
in interface INAClassLoader2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSnapToNetwork(boolean enabled) throws IOException, AutomationException
SnapToNetwork specifies if the network location's geometry should be a snapped to where it lies on the network dataset during load.
Specify the SnapOffsetDistance and SnapOffsetUnits if you want the network location offset a fixed difference from the true snap location. This is useful if you care about the side of the road the network location is on.
setSnapToNetwork
in interface INAClassLoader2
enabled
- The enabled (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isSnapToNetwork() throws IOException, AutomationException
SnapToNetwork specifies if the network location's geometry should be snapped to where it lies on the network dataset during load.
Specify the SnapOffsetDistance and SnapOffsetUnits if you want the network location offset a fixed difference from the true snap location. This is useful if you care about the side of the road the network location is on.
isSnapToNetwork
in interface INAClassLoader2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSnapOffsetDistance(double distance) throws IOException, AutomationException
Specify the SnapOffsetDistance and SnapOffsetUnits if you want the network location offset a fixed difference from the true snap location. This is useful if you care about the side of the road the network location is on.
This is only applicable if SnapToNetwork is true.
setSnapOffsetDistance
in interface INAClassLoader2
distance
- The distance (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getSnapOffsetDistance() throws IOException, AutomationException
Specify the SnapOffsetDistance and SnapOffsetUnits if you want the network location offset a fixed difference from the true snap location. This is useful if you care about the side of the road the network location is on.
This is only applicable if SnapToNetwork is true.
getSnapOffsetDistance
in interface INAClassLoader2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSnapOffsetUnits(int units) throws IOException, AutomationException
Specify the SnapOffsetDistance and SnapOffsetUnits if you want the network location offset a fixed difference from the true snap location. This is useful if you care about the side of the road the network location is on.
This is only applicable if SnapToNetwork is true.
setSnapOffsetUnits
in interface INAClassLoader2
units
- A com.esri.arcgis.system.esriUnits constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getSnapOffsetUnits() throws IOException, AutomationException
Specify the SnapOffsetDistance and SnapOffsetUnits if you want the network location offset a fixed difference from the true snap location. This is useful if you care about the side of the road the network location is on.
This is only applicable if SnapToNetwork is true.
getSnapOffsetUnits
in interface INAClassLoader2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void interfaceSupportsErrorInfo(GUID riid) throws IOException, AutomationException
Indicates whether the interface supports IErrorInfo.
interfaceSupportsErrorInfo
in interface ISupportErrorInfo
riid
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (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 |