|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface INAContextEdit
Provides access to the editable properties of a network analysis context.
The INAContextEdit interface is used to set up some of the internal references to objects and to manage edit operations within the NAClasses.
You must call Bind after calling CreateContext on NASolver. Solvers must call Initialize when they create the NAContext. If updating NALocationObjects outside of ArcMap, the methods to perform edits within an edit operation can be used. However, if edits are being done within ArcMap, it is recommended that the edit operation methods on the NAWindow's INAWindow be used instead so ArcMap's undo/redo stack remains in sync.
The Result and Solver properties should only be set from within a custom solver.
Method Summary | |
---|---|
void |
abortEditOperation()
Cancels an edit operation in progress. |
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. |
boolean |
hasRedos()
Indicates if any redo operations are available. |
boolean |
hasUndos()
Indicates if any undo operations are available. |
void |
initialize(String name,
IDENetworkDataset network)
Prepare the context for analysis. |
boolean |
isBeingEdited()
Indicates if the class is currently being edited. |
void |
redoEditOperation()
Repeats the last edit operation. |
void |
resultChanged()
Message all of the network analysis agents that the analysis results have changed. |
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. |
Method Detail |
---|
void setResultByRef(INAResult rhs1) throws IOException, AutomationException
The Result property is set by the solver after performing a network analysis.
This property should only be set by a custom solver after performing network analysis.
rhs1
- A reference to a com.esri.arcgis.networkanalyst.INAResult (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setSolverByRef(INASolver rhs1) throws IOException, AutomationException
The Solver property returns a reference back to the NASolver object that created the NAContext.
This property should only be set by a custom solver during the creation of the NAContext.
rhs1
- A reference to a com.esri.arcgis.networkanalyst.INASolver (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setLocatorByRef(INALocator rhs1) throws IOException, AutomationException
Use the Locator property to change the default NALocator for the NAContext.
The Locator is used by the network analyst loading tools when it tries to locate NALocationObjects. You can set the Locator property on the INAContextEdit interface to change the default locator. You can also override the locator used if you call NAClassLoader programmatically.
rhs1
- A reference to a com.esri.arcgis.networkanalyst.INALocator (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void initialize(String name, IDENetworkDataset network) throws IOException, AutomationException
Initialize should be called immediately after the NAContext is first created to create and initialize its internal member variables, including the workspace for the NAClasses, the NamedSet of NAAgents, the NamedSet of NAClasses, and the default NALocator .
Note: This method should only be called by a custom solver during the creation of the NAContext.
Note: If Initialize is called on a NAContext that has already been initialized, an exception will be thrown.
name
- The name (in)network
- A reference to a com.esri.arcgis.geodatabase.IDENetworkDataset (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void bind(INetworkDataset pNetworkDataset, IGPMessages pGPMessages) throws IOException, AutomationException
Bind attaches the NAContext to the input NetworkDataset. This ensures the NAContext is properly initialized based on the network dataset specified.
You must call Bind after calling CreateContext on NASolver.
pNetworkDataset
- A reference to a com.esri.arcgis.geodatabase.INetworkDataset (in)pGPMessages
- A reference to a com.esri.arcgis.geodatabase.IGPMessages (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void clearInputNAObjects() throws IOException, AutomationException
ClearInputNAObjects is a helper method to quickly go through the NAClasses that are used for input and to remove all of the rows from them.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void clearOutputNAObjects() throws IOException, AutomationException
ClearOutputNAObjects is a helper method to quickly go through the NAClasses that are used for output and to remove all of the rows from them.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void contextChanged() throws IOException, AutomationException
ContextChanged should be called if you have changed a property of the NAContext or have added NALocationObjects and want to fire the event OnNAContextUpdated on the INAContextEvents interface.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void resultChanged() throws IOException, AutomationException
ResultChanged should be called if a custom solver has performed a network analysis, has updated the NATraversalResult, and wants to fire the event OnNAResultUpdated on the INAContextEvents interface.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.INAClass createAnalysisClass(INAClassDefinition classDef) throws IOException, AutomationException
CreateAnalysisClass creates a new NAClass based on the INAClassDefinition that will be managed by the NAContext.
classDef
- A reference to a com.esri.arcgis.networkanalyst.INAClassDefinition (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void startEditing(boolean withUndoRedo) throws IOException, AutomationException
StartEditing starts an edit session on the NAContext's NAClasses. The withUndoRedo parameter can be used to suppress undo/redo logging if the workspace supports such suppression.
withUndoRedo
- The withUndoRedo (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void stopEditing(boolean saveEdits) throws IOException, AutomationException
StopEditing stops the edit session on the NAContext's NAClasses. The saveEdits parameter controls if edits are saved or discarded.
saveEdits
- The saveEdits (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void startEditOperation() throws IOException, AutomationException
StartEditOperation starts an edit operation on the NAContext's NAClasses. This can be used to enable undo and redo operations on changes to the NAClasses.
All related changes to objects in the database within an edit session should be grouped into edit operations. An edit operation is begun using the StartEditOperation method. An edit operation may be thought of as a short transaction nested within the long transaction corresponding to the edit session.
When using StartEditOperation, proper handling of errors, including the use of AbortEditOperation, is necessary.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void stopEditOperation() throws IOException, AutomationException
StopEditOperation stops the edit operation on the NAContext's NAClasses.
Applications are responsible for calling StopEditOperation to mark the end of a successfully completed edit operation. Completed edit operations can be thought of as being pushed onto an undo stack.
When using StopEditOperation, proper handling of errors, including the use of AbortEditOperation, is neccessary.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void abortEditOperation() throws IOException, AutomationException
AbortEditOperation aborts the edit operation on the NAContext's NAClasses.
Applications are responsible for calling the AbortEditOperation method to abort an edit operation if errors are detected within the methods executed for an edit operation.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void undoEditOperation() throws IOException, AutomationException
UndoEditOperation undoes the edit operation on the NAContext's NAClasses.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void redoEditOperation() throws IOException, AutomationException
RedoEditOperation redoes the edit operation on the NAContext's NAClasses.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean hasRedos() throws IOException, AutomationException
HasRedos specifies if there are operations that can be re-executed on the NAContext's NAClasses.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean hasUndos() throws IOException, AutomationException
HasUndos specifies if there are operations that can be undone on the NAContext's NAClasses.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isBeingEdited() throws IOException, AutomationException
IsBeingEdited specifies if there is a current active edit session on the NAContext's NAClasses.
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 |