com.esri.arcgis.networkanalyst
Class NAContext

java.lang.Object
  extended by com.esri.arcgis.networkanalyst.NAContext
All Implemented Interfaces:
IConnectionPointContainer, com.esri.arcgis.interop.RemoteObjRef, INAContext, INAContextEdit, IPersist, IPersistStream, java.io.Externalizable, java.io.Serializable

public class NAContext
extends java.lang.Object
implements com.esri.arcgis.interop.RemoteObjRef, INAContext, INAContextEdit, IPersistStream, IConnectionPointContainer, java.io.Externalizable

COM Class 'NAContext'. Generated 3/19/2015 1:20:45 PM from 'C:\ArcGIS\COM\esriNetworkAnalyst.olb'

Description 'The analysis and problem definition container.' Generator Options: PromptForTypeLibraries = False ClashPrefix = esri_ LowerCaseMemberNames = True IDispatchOnly = False RetryOnReject = False AwtForOcxs = True ArraysAsObjects = False DontRenameSameMethods = False ImplementConflictingInterfaces = True ReuseMethods = True RenameConflictingInterfaceMethods = True GenBeanInfo = True GenerateJavadoc =

See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
 
Fields inherited from interface com.esri.arcgis.networkanalyst.INAContext
IID, IIDc719fa92_cd10_4fcd_aa0b_38921f1d40e9, xxDummy
 
Fields inherited from interface com.esri.arcgis.networkanalyst.INAContextEdit
IID, IID83fb4cbe_4f5c_451e_89ba_db9f01244f4f, xxDummy
 
Fields inherited from interface com.esri.arcgis.system.IPersistStream
IID, IID00000109_0000_0000_c000_000000000046, xxDummy
 
Fields inherited from interface com.esri.arcgis.system.IPersist
IID0000010c_0000_0000_c000_000000000046
 
Fields inherited from interface com.esri.arcgis.display.IConnectionPointContainer
IID, IIDb196b284_bab4_101a_b69c_00aa00341d07, xxDummy
 
Constructor Summary
NAContext()
          Constructs a NAContext using ArcGIS Engine.
NAContext(java.lang.Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
NAContext theNAContext = (NAContext) obj;
 
Method Summary
 void abortEditOperation()
          Cancels an edit operation in progress.
 void addINAContextEvents2Listener(INAContextEvents2 theListener)
          addINAContextEvents2Listener.
 void addINAContextEventsListener(INAContextEvents theListener)
          addINAContextEventsListener.
 void bind(INetworkDataset pNetworkDataset, IGPMessages pGPMessages)
          Prepare the context for analysis based upon the current network dataset schema.
 void clearInputNAObjects()
          Empty NAClasses that are defined as input or input/output.
 void clearOutputNAObjects()
          Empty NAClasses that are defined as output only.
 void contextChanged()
          Message all of the network analysis agents that the analysis context has changed.
 INAClass createAnalysisClass(INAClassDefinition classDef)
          Create a new analysis class based upon the given class definition.
 void enumConnectionPoints(IEnumConnectionPoints[] ppEnum)
          enumConnectionPoints
 boolean equals(java.lang.Object o)
          Compare this object with another
 void findConnectionPoint(GUID riid, IConnectionPoint[] ppCP)
          findConnectionPoint
 INamedSet getAgents()
          The collection of agents associated with the analysis.
 void getClassID(GUID[] pClassID)
          getClassID
static java.lang.String getClsid()
          getClsid.
 com.esri.arcgis.interop.Dispatch getJintegraDispatch()
          Deprecated. Internal use only.
 INALocator getLocator()
          The locator used for finding network locations for class items.
 INamedSet getNAClasses()
          The collection of classes associated with the analysis.
 java.lang.String getName()
          The name of the analysis.
 INetworkDataset getNetworkDataset()
          The associated network dataset.
 IName getNetworkDatasetName()
          The associated network dataset name.
 INAResult getResult()
          The result for the analysis.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 INASolver getSolver()
          The function used for the analysis.
 ISpatialReference getSpatialReference()
          The spatial reference of the analysis.
 int hashCode()
          the hashcode for this object
 boolean hasRedos()
          Indicates if any redo operations are available.
 boolean hasUndos()
          Indicates if any undo operations are available.
 void initialize(java.lang.String name, IDENetworkDataset network)
          Prepare the context for analysis.
 boolean isBeingEdited()
          Indicates if the class is currently being edited.
 void isDirty()
          isDirty
 void load(IStream pstm)
          load
 void readExternal(java.io.ObjectInput in)
           
 void redoEditOperation()
          Repeats the last edit operation.
 void release()
          Release a NAContext.
 void removeINAContextEvents2Listener(INAContextEvents2 theListener)
          removeINAContextEvents2Listener.
 void removeINAContextEventsListener(INAContextEvents theListener)
          removeINAContextEventsListener.
 void resultChanged()
          Message all of the network analysis agents that the analysis results have changed.
 void save(IStream pstm, int fClearDirty)
          save
 void setLocatorByRef(INALocator rhs1)
          The locator used for finding network locations.
 void setResultByRef(INAResult rhs1)
          The result of the analysis.
 void setSolverByRef(INASolver rhs1)
          The function used for the analysis.
 void startEditing(boolean withUndoRedo)
          Starts an edit session.
 void startEditOperation()
          Starts an edit operation.
 void stopEditing(boolean saveEdits)
          Stops an edit session.
 void stopEditOperation()
          Stops an edit operation.
 void undoEditOperation()
          Cancels the last edit operation and returns to the state before it was started.
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

NAContext

public NAContext()
          throws java.io.IOException,
                 java.net.UnknownHostException
Constructs a NAContext using ArcGIS Engine.

Throws:
java.io.IOException - if there are interop problems
java.net.UnknownHostException - if there are interop problems

NAContext

public NAContext(java.lang.Object obj)
          throws java.io.IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
NAContext theNAContext = (NAContext) obj;

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

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

getClsid

public static java.lang.String getClsid()
getClsid.


equals

public boolean equals(java.lang.Object o)
Compare this object with another

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class java.lang.Object

getJintegraDispatch

public com.esri.arcgis.interop.Dispatch getJintegraDispatch()
Deprecated. Internal use only.

Specified by:
getJintegraDispatch in interface com.esri.arcgis.interop.RemoteObjRef

addINAContextEventsListener

public void addINAContextEventsListener(INAContextEvents theListener)
                                 throws java.io.IOException
addINAContextEventsListener. Listen to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.networkanalyst.INAContextEvents interface.
Throws:
java.io.IOException - If there are communications problems.

removeINAContextEventsListener

public void removeINAContextEventsListener(INAContextEvents theListener)
                                    throws java.io.IOException
removeINAContextEventsListener. Stop listening to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.networkanalyst.INAContextEvents interface.
Throws:
java.io.IOException - If there are communications problems.

addINAContextEvents2Listener

public void addINAContextEvents2Listener(INAContextEvents2 theListener)
                                  throws java.io.IOException
addINAContextEvents2Listener. Listen to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.networkanalyst.INAContextEvents2 interface.
Throws:
java.io.IOException - If there are communications problems.

removeINAContextEvents2Listener

public void removeINAContextEvents2Listener(INAContextEvents2 theListener)
                                     throws java.io.IOException
removeINAContextEvents2Listener. Stop listening to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.networkanalyst.INAContextEvents2 interface.
Throws:
java.io.IOException - If there are communications problems.

release

public void release()
Release a NAContext.

Specified by:
release in interface com.esri.arcgis.interop.RemoteObjRef

getName

public java.lang.String getName()
                         throws java.io.IOException,
                                AutomationException
The name of the analysis.

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

getSpatialReference

public ISpatialReference getSpatialReference()
                                      throws java.io.IOException,
                                             AutomationException
The spatial reference of the analysis.

Specified by:
getSpatialReference in interface INAContext
Returns:
A reference to a com.esri.arcgis.geometry.ISpatialReference
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSolver

public INASolver getSolver()
                    throws java.io.IOException,
                           AutomationException
The function used for the analysis.

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

getAgents

public INamedSet getAgents()
                    throws java.io.IOException,
                           AutomationException
The collection of agents associated with the analysis.

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

getResult

public INAResult getResult()
                    throws java.io.IOException,
                           AutomationException
The result for the analysis.

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

getNAClasses

public INamedSet getNAClasses()
                       throws java.io.IOException,
                              AutomationException
The collection of classes associated with the analysis.

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

getLocator

public INALocator getLocator()
                      throws java.io.IOException,
                             AutomationException
The locator used for finding network locations for class items.

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

getNetworkDataset

public INetworkDataset getNetworkDataset()
                                  throws java.io.IOException,
                                         AutomationException
The associated network dataset.

Specified by:
getNetworkDataset in interface INAContext
Returns:
A reference to a com.esri.arcgis.geodatabase.INetworkDataset
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getNetworkDatasetName

public IName getNetworkDatasetName()
                            throws java.io.IOException,
                                   AutomationException
The associated network dataset name.

Specified by:
getNetworkDatasetName in interface INAContext
Returns:
A reference to a com.esri.arcgis.system.IName
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setResultByRef

public void setResultByRef(INAResult rhs1)
                    throws java.io.IOException,
                           AutomationException
The result of the analysis.

Specified by:
setResultByRef in interface INAContextEdit
Parameters:
rhs1 - A reference to a com.esri.arcgis.networkanalyst.INAResult (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSolverByRef

public void setSolverByRef(INASolver rhs1)
                    throws java.io.IOException,
                           AutomationException
The function used for the analysis.

Specified by:
setSolverByRef in interface INAContextEdit
Parameters:
rhs1 - A reference to a com.esri.arcgis.networkanalyst.INASolver (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setLocatorByRef

public void setLocatorByRef(INALocator rhs1)
                     throws java.io.IOException,
                            AutomationException
The locator used for finding network locations.

Specified by:
setLocatorByRef in interface INAContextEdit
Parameters:
rhs1 - A reference to a com.esri.arcgis.networkanalyst.INALocator (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

initialize

public void initialize(java.lang.String name,
                       IDENetworkDataset network)
                throws java.io.IOException,
                       AutomationException
Prepare the context for analysis.

Specified by:
initialize in interface INAContextEdit
Parameters:
name - The name (in)
network - A reference to a com.esri.arcgis.geodatabase.IDENetworkDataset (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

bind

public void bind(INetworkDataset pNetworkDataset,
                 IGPMessages pGPMessages)
          throws java.io.IOException,
                 AutomationException
Prepare the context for analysis based upon the current network dataset schema.

Specified by:
bind in interface INAContextEdit
Parameters:
pNetworkDataset - A reference to a com.esri.arcgis.geodatabase.INetworkDataset (in)
pGPMessages - A reference to a com.esri.arcgis.geodatabase.IGPMessages (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

clearInputNAObjects

public void clearInputNAObjects()
                         throws java.io.IOException,
                                AutomationException
Empty NAClasses that are defined as input or input/output.

Specified by:
clearInputNAObjects in interface INAContextEdit
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

clearOutputNAObjects

public void clearOutputNAObjects()
                          throws java.io.IOException,
                                 AutomationException
Empty NAClasses that are defined as output only.

Specified by:
clearOutputNAObjects in interface INAContextEdit
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

contextChanged

public void contextChanged()
                    throws java.io.IOException,
                           AutomationException
Message all of the network analysis agents that the analysis context has changed.

Specified by:
contextChanged in interface INAContextEdit
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

resultChanged

public void resultChanged()
                   throws java.io.IOException,
                          AutomationException
Message all of the network analysis agents that the analysis results have changed.

Specified by:
resultChanged in interface INAContextEdit
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createAnalysisClass

public INAClass createAnalysisClass(INAClassDefinition classDef)
                             throws java.io.IOException,
                                    AutomationException
Create a new analysis class based upon the given class definition.

Specified by:
createAnalysisClass in interface INAContextEdit
Parameters:
classDef - A reference to a com.esri.arcgis.networkanalyst.INAClassDefinition (in)
Returns:
A reference to a com.esri.arcgis.networkanalyst.INAClass
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

startEditing

public void startEditing(boolean withUndoRedo)
                  throws java.io.IOException,
                         AutomationException
Starts an edit session.

Specified by:
startEditing in interface INAContextEdit
Parameters:
withUndoRedo - The withUndoRedo (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

stopEditing

public void stopEditing(boolean saveEdits)
                 throws java.io.IOException,
                        AutomationException
Stops an edit session.

Specified by:
stopEditing in interface INAContextEdit
Parameters:
saveEdits - The saveEdits (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

startEditOperation

public void startEditOperation()
                        throws java.io.IOException,
                               AutomationException
Starts an edit operation.

Specified by:
startEditOperation in interface INAContextEdit
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

stopEditOperation

public void stopEditOperation()
                       throws java.io.IOException,
                              AutomationException
Stops an edit operation.

Specified by:
stopEditOperation in interface INAContextEdit
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

abortEditOperation

public void abortEditOperation()
                        throws java.io.IOException,
                               AutomationException
Cancels an edit operation in progress.

Specified by:
abortEditOperation in interface INAContextEdit
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

undoEditOperation

public void undoEditOperation()
                       throws java.io.IOException,
                              AutomationException
Cancels the last edit operation and returns to the state before it was started.

Specified by:
undoEditOperation in interface INAContextEdit
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

redoEditOperation

public void redoEditOperation()
                       throws java.io.IOException,
                              AutomationException
Repeats the last edit operation.

Specified by:
redoEditOperation in interface INAContextEdit
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

hasRedos

public boolean hasRedos()
                 throws java.io.IOException,
                        AutomationException
Indicates if any redo operations are available.

Specified by:
hasRedos in interface INAContextEdit
Returns:
The flag
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

hasUndos

public boolean hasUndos()
                 throws java.io.IOException,
                        AutomationException
Indicates if any undo operations are available.

Specified by:
hasUndos in interface INAContextEdit
Returns:
The flag
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isBeingEdited

public boolean isBeingEdited()
                      throws java.io.IOException,
                             AutomationException
Indicates if the class is currently being edited.

Specified by:
isBeingEdited in interface INAContextEdit
Returns:
The flag
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDirty

public void isDirty()
             throws java.io.IOException,
                    AutomationException
isDirty

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

load

public void load(IStream pstm)
          throws java.io.IOException,
                 AutomationException
load

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

save

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

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

getSizeMax

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

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

getClassID

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

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

enumConnectionPoints

public void enumConnectionPoints(IEnumConnectionPoints[] ppEnum)
                          throws java.io.IOException,
                                 AutomationException
enumConnectionPoints

Specified by:
enumConnectionPoints in interface IConnectionPointContainer
Parameters:
ppEnum - A reference to a com.esri.arcgis.display.IEnumConnectionPoints (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findConnectionPoint

public void findConnectionPoint(GUID riid,
                                IConnectionPoint[] ppCP)
                         throws java.io.IOException,
                                AutomationException
findConnectionPoint

Specified by:
findConnectionPoint in interface IConnectionPointContainer
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
ppCP - A reference to a com.esri.arcgis.display.IConnectionPoint (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeExternal

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

readExternal

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