GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
Class representing the model. More...
Public Member Functions | |
def | __init__ |
def | GetCanvas |
Get canvas or None. More... | |
def | GetItems |
Get list of model items. More... | |
def | GetItem |
Get item of given id. More... | |
def | GetNumItems |
Get number of items. More... | |
def | GetNextId |
Get next id (data ignored) More... | |
def | GetProperties |
Get model properties. More... | |
def | GetVariables |
Get model variables. More... | |
def | SetVariables |
Set model variables. More... | |
def | Reset |
Reset model. More... | |
def | RemoveItem |
Remove item from model. More... | |
def | FindAction |
Find action by id. More... | |
def | GetData |
Get list of data items. More... | |
def | FindData |
Find data item in the model. More... | |
def | LoadModel |
Load model definition stored in GRASS Model XML file (gxm) More... | |
def | AddItem |
Add item to the list. More... | |
def | IsValid |
def | Validate |
Validate model, return None if model is valid otherwise error string. More... | |
def | OnPrepare |
def | RunAction |
Run given action. More... | |
def | Run |
Run model. More... | |
def | DeleteIntermediateData |
Detele intermediate data. More... | |
def | GetIntermediateData |
Get info about intermediate data. More... | |
def | Update |
Update model. More... | |
def | IsParameterized |
Return True if model is parameterized. More... | |
def | Parameterize |
Return parameterized options. More... | |
Data Fields | |
items | |
properties | |
variables | |
variablesParams | |
canvas | |
fileInput | |
def model.Model.AddItem | ( | self, | |
newItem | |||
) |
Add item to the list.
Definition at line 340 of file model.py.
References model.Model.items.
Referenced by gselect.TreeCtrlComboPopup.GetAdjustedSize(), and model.Model.LoadModel().
def model.Model.DeleteIntermediateData | ( | self, | |
log | |||
) |
Detele intermediate data.
Definition at line 632 of file model.py.
References model.Model.GetIntermediateData().
Referenced by model.Model.Run().
def model.Model.FindAction | ( | self, | |
aId | |||
) |
Find action by id.
Definition at line 177 of file model.py.
References model.Model.GetItems(), dialogs.ModelLoopDialog.GetItems(), dialogs.ModelConditionDialog.GetItems(), and dialogs.ItemCheckListCtrl.GetItems().
Referenced by model.Model.LoadModel().
def model.Model.FindData | ( | self, | |
value, | |||
prompt | |||
) |
Find data item in the model.
value | value |
prompt | prompt |
Definition at line 205 of file model.py.
References model.Model.GetData(), dialogs.VariableListCtrl.GetData(), and dialogs.ItemListCtrl.GetData().
def model.Model.GetCanvas | ( | self | ) |
Get canvas or None.
Definition at line 67 of file model.py.
References model.Model.canvas, and frame.ModelFrame.canvas.
def model.Model.GetData | ( | self | ) |
Get list of data items.
Definition at line 186 of file model.py.
References model.Model.GetItems(), dialogs.ModelLoopDialog.GetItems(), dialogs.ModelConditionDialog.GetItems(), and dialogs.ItemCheckListCtrl.GetItems().
Referenced by model.Model.FindData(), and model.Model.GetIntermediateData().
def model.Model.GetIntermediateData | ( | self | ) |
Get info about intermediate data.
Definition at line 643 of file model.py.
References model.Model.GetData(), dialogs.VariableListCtrl.GetData(), and dialogs.ItemListCtrl.GetData().
Referenced by model.Model.DeleteIntermediateData().
def model.Model.GetItem | ( | self, | |
aId | |||
) |
Get item of given id.
aId | item id |
Definition at line 86 of file model.py.
References model.Model.GetItems(), dialogs.ModelLoopDialog.GetItems(), dialogs.ModelConditionDialog.GetItems(), and dialogs.ItemCheckListCtrl.GetItems().
Referenced by dialogs.ItemCheckListCtrl.CheckItemById(), manager.VirtualAttributeList.GetColumnText(), dialogs.ItemCheckListCtrl.GetItems(), dialogs.LayersList.GetLayers(), model.Model.LoadModel(), dialogs.VariableListCtrl.OnEndEdit(), dialogs.ItemListCtrl.OnEndEdit(), manager.GCPList.OnItemActivated(), and dialogs.ItemListCtrl.OnRemove().
def model.Model.GetItems | ( | self, | |
objType = None |
|||
) |
Get list of model items.
objType | Object type to filter model objects |
Definition at line 71 of file model.py.
References model.Model.items.
Referenced by model.Model.FindAction(), model.Model.GetData(), model.Model.GetItem(), model.Model.GetNumItems(), prompt.TextCtrlAutoComplete.OnCommandSelect(), prompt.TextCtrlAutoComplete.OnKeyDown(), model.Model.Parameterize(), model.Model.RemoveItem(), gselect.LayerSelect.Reset(), model.Model.Run(), and model.Model.Validate().
def model.Model.GetNextId | ( | self | ) |
Get next id (data ignored)
Definition at line 108 of file model.py.
References model.Model.items.
def model.Model.GetNumItems | ( | self, | |
actionOnly = False |
|||
) |
Get number of items.
Definition at line 101 of file model.py.
References model.Model.GetItems(), dialogs.ModelLoopDialog.GetItems(), dialogs.ModelConditionDialog.GetItems(), and dialogs.ItemCheckListCtrl.GetItems().
Referenced by model.Model.Run().
def model.Model.GetProperties | ( | self | ) |
def model.Model.GetVariables | ( | self, | |
params = False |
|||
) |
Get model variables.
Definition at line 126 of file model.py.
References model.Model.variables, and model.Model.variablesParams.
Referenced by model.Model.Run(), and model.Model.Validate().
def model.Model.IsParameterized | ( | self | ) |
Return True if model is parameterized.
Definition at line 678 of file model.py.
References model.Model.Parameterize().
def model.Model.IsValid | ( | self | ) |
Return True if model is valid
Definition at line 353 of file model.py.
References model.Model.Validate().
def model.Model.LoadModel | ( | self, | |
filename | |||
) |
Load model definition stored in GRASS Model XML file (gxm)
Raise exception on error.
Definition at line 221 of file model.py.
References model.Model.AddItem(), model.Model.canvas, frame.ModelFrame.canvas, model.Model.FindAction(), model.Model.GetItem(), model.Model.properties, and model.Model.variables.
def model.Model.OnPrepare | ( | self, | |
item, | |||
params | |||
) |
Definition at line 464 of file model.py.
References model.Model._substituteFile().
Referenced by model.Model.RunAction().
def model.Model.Parameterize | ( | self | ) |
Return parameterized options.
Definition at line 685 of file model.py.
References model.Model.GetItems(), dialogs.ModelLoopDialog.GetItems(), dialogs.ModelConditionDialog.GetItems(), dialogs.ItemCheckListCtrl.GetItems(), model.Model.variables, and model.Model.variablesParams.
Referenced by model.Model.IsParameterized(), and model.Model.Run().
def model.Model.RemoveItem | ( | self, | |
item | |||
) |
Remove item from model.
Definition at line 141 of file model.py.
References model.Model.GetItems(), dialogs.ModelLoopDialog.GetItems(), dialogs.ModelConditionDialog.GetItems(), and dialogs.ItemCheckListCtrl.GetItems().
def model.Model.Reset | ( | self | ) |
def model.Model.Run | ( | self, | |
log, | |||
onDone, | |||
parent = None |
|||
) |
Run model.
log | logging window (see goutput.GMConsole) |
onDone | on-done method |
parent | window for messages or None |
Definition at line 493 of file model.py.
References utils.CmdToTuple(), model.Model.DeleteIntermediateData(), model.Model.GetItems(), dialogs.ModelLoopDialog.GetItems(), dialogs.ModelConditionDialog.GetItems(), dialogs.ItemCheckListCtrl.GetItems(), model.Model.GetNumItems(), model.Model.GetVariables(), model.Model.Parameterize(), model.Model.RunAction(), gcmd.RunCommand(), utils.split(), and model.Model.Validate().
def model.Model.RunAction | ( | self, | |
item, | |||
params, | |||
log, | |||
onDone, | |||
onPrepare = None , |
|||
statusbar = None |
|||
) |
Run given action.
item | action item |
params | parameters dict |
log | logging window |
onDone | on-done method |
onPrepare | on-prepare method |
statusbar | wx.StatusBar instance or None |
Definition at line 467 of file model.py.
References model.Model.OnPrepare().
Referenced by model.Model.Run().
def model.Model.SetVariables | ( | self, | |
data | |||
) |
def model.Model.Update | ( | self | ) |
Update model.
Definition at line 673 of file model.py.
References model.Model.items.
Referenced by model.ModelObject.Enable(), wizard.DatumPage.OnDText(), colorrules.VectorColorTable.OnLayerSelection(), manager.GroupPage.OnMkGroup(), statusbar.SbManager.OnToggleStatus(), and mapwindow.BufferedWindow.TextBounds().
def model.Model.Validate | ( | self | ) |
Validate model, return None if model is valid otherwise error string.
Definition at line 360 of file model.py.
References model.Model.GetItems(), dialogs.ModelLoopDialog.GetItems(), dialogs.ModelConditionDialog.GetItems(), dialogs.ItemCheckListCtrl.GetItems(), and model.Model.GetVariables().
Referenced by model.Model.IsValid(), widgets.BaseValidator.OnText(), and model.Model.Run().
model.Model.canvas |
Definition at line 65 of file model.py.
Referenced by gprint.MapPrint.__init__(), model.Model.GetCanvas(), and model.Model.LoadModel().
model.Model.items |
Definition at line 55 of file model.py.
Referenced by model.Model.AddItem(), model.ModelLoop.Enable(), model.Model.GetItems(), model.ModelItem.GetItems(), model.Model.GetNextId(), model.Model.Reset(), model.ModelCondition.SetItems(), and model.Model.Update().
model.Model.properties |
Definition at line 58 of file model.py.
Referenced by colorrules.VectorColorTable.AddTemporaryColumn(), colorrules.ColorTable.CreateColorTable(), colorrules.VectorColorTable.DeleteTemporaryColumn(), base.BasePlotFrame.DrawPlot(), model.Model.GetProperties(), base.BasePlotFrame.InitRasterOpts(), model.Model.LoadModel(), colorrules.VectorColorTable.LoadRulesFromColumn(), colorrules.ColorTable.LoadTable(), colorrules.VectorColorTable.OnAddColumn(), colorrules.VectorColorTable.OnApply(), colorrules.VectorColorTable.OnCheckColumn(), colorrules.VectorColorTable.OnColumnPreview(), colorrules.VectorColorTable.OnFromColSelection(), colorrules.VectorColorTable.OnLayerSelection(), base.BasePlotFrame.OnPlotText(), colorrules.VectorColorTable.OnSourceColumnSelection(), colorrules.VectorColorTable.OnToColSelection(), colorrules.ColorTable.ReadColorTable(), base.BasePlotFrame.SetGraphStyle(), colorrules.VectorColorTable.SetRangeLabel(), colorrules.RulesPanel.SQLConvert(), colorrules.VectorColorTable.UpdateColorColumn(), dialogs.TextDialog.UpdateSettings(), dialogs.OptDialog.UpdateSettings(), and colorrules.VectorColorTable.UseAttrColumn().
model.Model.variables |
Definition at line 62 of file model.py.
Referenced by model.Model.GetVariables(), model.Model.LoadModel(), model.Model.Parameterize(), and model.Model.SetVariables().
model.Model.variablesParams |
Definition at line 63 of file model.py.
Referenced by model.Model.GetVariables(), and model.Model.Parameterize().