com.esri.arcgis.networkanalyst
Class NAVRPResult

java.lang.Object
  extended by com.esri.arcgis.networkanalyst.NAVRPResult
All Implemented Interfaces:
com.esri.arcgis.interop.RemoteObjRef, INAResult, INAResult2, INAVRPResult, IPersist, IPersistStream, Externalizable, Serializable

public class NAVRPResult
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, INAResult, INAResult2, INAVRPResult, IPersistStream, Externalizable

Contains a VRP result.

Description

This object is new at ArcGIS 9.3.

Remarks

The NAVRPResult object is created by the NAVRPSolver in order to provide access to the internally-managed NAODCostMatrix object and Route NAContext used by the VRP solver in its analysis and output. The NAVRPSolver will only create an NAVRPResult when INAVRPSolver::InternalODCostMatrixType is equal to esriNAODCostMatrixFull or esriNAODCostMatrixUpdate. The NAVRPResult may be accessed from the INAContext::Result property of a VRP NAContext instance.

Product Availability

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

See Also:
Serialized Form

Constructor Summary
NAVRPResult()
          Constructs a NAVRPResult using ArcGIS Engine.
NAVRPResult(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
NAVRPResult theNAVRPResult = (NAVRPResult) obj;
 
Method Summary
 void create(String name, INAContextHelper nAContextHelper, boolean isScratch)
          Set up for a new analysis.
 void emptyAll()
          Clear out all existing rows from any previous analysis.
 boolean equals(Object o)
          Compare this object with another
 void getClassID(GUID[] pClassID)
          getClassID
static String getClsid()
          getClsid.
 INAODCostMatrix getInternalODCostMatrix()
          The internal OD cost matrix.
 INAContext getInternalRouteContext()
          The NAContext for the internal route problem.
 INAContext getNAContext()
          The context for the result.
 String getName()
          The name of the result.
 IPropertySet getOutputProperties()
          The properties of the output.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 int hashCode()
          the hashcode for this object
 void initialize(String name, INAContext nAContext, boolean isScratch)
          Set up for a new analysis.
 void initializeEx(INAContextHelper nAContextHelper)
          Provides the result object with a reference to the context.
 void isDirty()
          isDirty
 boolean isHasValidResult()
          Indicates if the current result is valid.
 void load(IStream pstm)
          load
 void readExternal(ObjectInput in)
           
 void save(IStream pstm, int fClearDirty)
          save
 void setHasValidResult(boolean pFlag)
          Indicates if the current result is valid.
 void writeExternal(ObjectOutput out)
           
 
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

NAVRPResult

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

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

NAVRPResult

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

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

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

initialize

public void initialize(String name,
                       INAContext nAContext,
                       boolean isScratch)
                throws IOException,
                       AutomationException
Set up for a new analysis.

Remarks

This method has been deprecated and should not be used. Instead, use INAResult2.Create to initialize a result object after creating it.

Product Availability

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

Specified by:
initialize in interface INAResult
Parameters:
name - The name (in)
nAContext - A reference to a com.esri.arcgis.networkanalyst.INAContext (in)
isScratch - The isScratch (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getOutputProperties

public IPropertySet getOutputProperties()
                                 throws IOException,
                                        AutomationException
The properties of the output.

Remarks

The OutputProperties property returns a PropertySet that may contain information about the results of the network analysis.

The contents of the property set is up to the individual solver. For the solvers that ESRI has released, HasGapsInEdgeCumulativeImpedances returns True if there are impedance values on the junction elements that were traversed. This is important because measures are not generated on the resulting polyline feature class (Route, CFLines, SALines) in this case.

Closest Facility:

HasGapsInEdgeCumulativeImpedances True/False

Route:

HasGapsInEdgeCumulativeImpedances True/False

Service Area:

HasGapsInEdgeCumulativeImpedances True/False
TravelDirection TRAVEL_FROM/TRAVEL_TO

Origin Destination Cost Matrix:

** No TraversalResult generated

Product Availability

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

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

isHasValidResult

public boolean isHasValidResult()
                         throws IOException,
                                AutomationException
Indicates if the current result is valid.

Remarks

The HasValidResult property denotes if network analysis has been performed and the result object has been populated with valid information.

Product Availability

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

Specified by:
isHasValidResult in interface INAResult
Returns:
The pFlag
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setHasValidResult

public void setHasValidResult(boolean pFlag)
                       throws IOException,
                              AutomationException
Indicates if the current result is valid.

Remarks

The HasValidResult property denotes if network analysis has been performed and the result object has been populated with valid information.

Product Availability

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

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

emptyAll

public void emptyAll()
              throws IOException,
                     AutomationException
Clear out all existing rows from any previous analysis.

Remarks

Clears the traversal result.

Product Availability

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

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

getName

public String getName()
               throws IOException,
                      AutomationException
The name of the result.

Remarks

The Name property returns the name of the traversal result that was set during the call to Create.

Product Availability

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

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

getNAContext

public INAContext getNAContext()
                        throws IOException,
                               AutomationException
The context for the result.

Remarks

The NAContext returns the context that this traversal result was based upon.

Product Availability

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

Specified by:
getNAContext in interface INAResult
Returns:
A reference to a com.esri.arcgis.networkanalyst.INAContext
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

create

public void create(String name,
                   INAContextHelper nAContextHelper,
                   boolean isScratch)
            throws IOException,
                   AutomationException
Set up for a new analysis.

Remarks

The method Create is called by the solver when it creates a new result object.

The isScratch parameter specifies if the result feature classes should be kept in memory (false) or saved on disk (true).

The NAContextHelper object passed in is used to get back to the NAContext. You can maintain a strong reference to the NAContextHelper object within your custom result object, but do not hold onto a strong reference to the NAContext itself as this will create a circular reference.

This method should be called instead of INAResult.Initialize.

Product Availability

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

Specified by:
create in interface INAResult2
Parameters:
name - The name (in)
nAContextHelper - A reference to a com.esri.arcgis.networkanalyst.INAContextHelper (in)
isScratch - The isScratch (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

initializeEx

public void initializeEx(INAContextHelper nAContextHelper)
                  throws IOException,
                         AutomationException
Provides the result object with a reference to the context.

Remarks

The InitializeEx method is called after the result object has been deserialized as part of the NAContext being loaded. It is called to pass to the result object a backpointer reference to the NAContext that it's bound to.

The NAContextHelper object passed in is used to get back to the NAContext. You can maintain a strong reference to the NAContextHelper object within your custom result object, but do not hold onto a strong reference to the NAContext itself as this will create a circular reference.

Product Availability

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

Specified by:
initializeEx in interface INAResult2
Parameters:
nAContextHelper - A reference to a com.esri.arcgis.networkanalyst.INAContextHelper (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getInternalODCostMatrix

public INAODCostMatrix getInternalODCostMatrix()
                                        throws IOException,
                                               AutomationException
The internal OD cost matrix.

Remarks

The InternalODCostMatrix property provides access to the internally-managed NAODCostMatrixResult object generated or updated by the VRP solver during its last Solve operation.

Product Availability

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

Specified by:
getInternalODCostMatrix in interface INAVRPResult
Returns:
A reference to a com.esri.arcgis.networkanalyst.INAODCostMatrix
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getInternalRouteContext

public INAContext getInternalRouteContext()
                                   throws IOException,
                                          AutomationException
The NAContext for the internal route problem.

Remarks

The InternalRouteContext property provides access to the internally-managed Route NAContext object generated or updated by the VRP solver during its last Solve operation. This internal route NAContext can be used to generate directions for a given VRP instance.

If the INAVRPSolver.GenerateInternalRouteContext property is set to False, this property will return null.

Product Availability

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

Specified by:
getInternalRouteContext in interface INAVRPResult
Returns:
A reference to a com.esri.arcgis.networkanalyst.INAContext
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDirty

public void isDirty()
             throws IOException,
                    AutomationException
isDirty

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

load

public void load(IStream pstm)
          throws IOException,
                 AutomationException
load

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

save

public void save(IStream pstm,
                 int fClearDirty)
          throws IOException,
                 AutomationException
save

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
save in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
fClearDirty - The fClearDirty (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSizeMax

public void getSizeMax(_ULARGE_INTEGER[] pcbSize)
                throws IOException,
                       AutomationException
getSizeMax

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSizeMax in interface IPersistStream
Parameters:
pcbSize - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getClassID

public void getClassID(GUID[] pClassID)
                throws IOException,
                       AutomationException
getClassID

Description

IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getClassID in interface IPersist
Parameters:
pClassID - A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException