public abstract class DataProcess extends ProcessParamsManagement implements IIncrementable, IncrementableListener, Runnable, Disposable
Modifier and Type | Field and Description |
---|---|
protected Thread |
blinker |
protected IProcessActions |
externalActions |
protected IncrementableTask |
incrementableTask |
protected Logger |
logger |
protected TaskEventManager |
taskEventManager |
protected Hashtable<String,Object> |
taskParams |
inputParameters, OUTPUT_HEIGHT, OUTPUT_WIDTH, outputParameters, PREVIEW, PROCESS, PROCESS_NAME, REGISTER_INPUT_PARAMETERS_LABEL, REGISTER_OUTPUT_PARAMETERS_LABEL, ROI_EPSG, TIME, WINDOW
doubleNODATA
Constructor and Description |
---|
DataProcess() |
Modifier and Type | Method and Description |
---|---|
void |
actionCanceled(IncrementableEvent e)
Un evento de cancelado es enviado a la tarea cuando actionCanceled es activado.
|
void |
actionResumed(IncrementableEvent e)
Invocado cuando se aprieta el boton Resumir de la ventana
|
void |
actionSuspended(IncrementableEvent e)
Invocado cuando se aprieta el boton Suspender de la ventana
|
protected void |
addOutputValue(String key,
Object value)
Adds a output from the process in runtime
|
void |
dispose()
Disposes the current object, to allow it to close and dispose any used
resources.
|
void |
execute()
Sequential execution of this task
|
protected void |
finalize() |
IProcessActions |
getActions()
Gets the object to execute external actions.
|
IncrementableTask |
getIncrementableTask()
Builds the window
IncrementableTask to show
the increment of the task. |
String |
getLabel()
Gets the last line in the increment window
|
String |
getLog()
Gets the log of the increment window
|
String |
getName() |
int |
getPercent()
Devuelve el porcentaje de 0 a 100 de la ventana IncrementableTask
|
HashMap<String,Object> |
getResult()
Gets the result of the process.
|
long |
getTime()
Gets the time that a task lasts
|
IProcessActions |
getUniqueProcessActions()
Gets the object to execute actions in the queue of processes
|
abstract void |
init()
A specific task will load parameters using this initialization.
|
protected void |
insertLineLog(String line)
Inserts a new line in the increment window
|
boolean |
isCancelable()
Determines if this process can be canceled.
|
boolean |
isPausable()
Determines if this process can be paused.
|
abstract void |
process()
This call will be implemented by a specific process.
|
void |
run()
This method will be executed by the Thread.
|
void |
setActions(IProcessActions actions)
Sets the object to execute external actions.
|
void |
setCancelable(boolean enabled)
Sets the button to cancel the task
|
void |
setName(String name) |
void |
setProgressActive(boolean active)
When the process is launched in a thread, this method enables or disables
the GUI to show the progress.
|
void |
setUniqueProcessActions(IProcessActions actions)
Asigna el objeto para ejecutar acciones externar.
|
void |
showIncrementableWindow()
Show the increment of this task
IncrementableTask |
void |
start()
Starts the process.
|
void |
updatePercent(int parcial,
int total)
Updates the percentaje of progress and manages the cancelation
|
addParam, getBooleanParam, getByteParam, getDoubleArrayParam, getDoubleParam, getExtentParam, getFloatParam, getIntArrayParam, getIntParam, getOutputHeight, getOutputWidth, getOutputWindow, getParam, getParameterClassList, getParameterTypeByProcess, getRasterTaskInputParameters, getRasterTaskOutputParameters, getROIEPSG, getStringParam, isForPreviews, isOutputRescaled, loadGlobalParameters, registerGlobalInputParameters, registerGlobalOutputParameters, registerInputParameter, registerOutputParameter, removeParam
createOutputBuffer, createOutputBuffer, createSourceBuffer, debug, exportRaster, exportRaster, exportRaster, exportRaster, exportRaster, exportRaster, exportRaster, getData, getExtentResult, getIntersectionInPxCoords, getSourcePxBox, isAnalizedEntireLayer, isInsideOfROI, messageBoxError, messageBoxError, messageBoxError
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTitle
protected IncrementableTask incrementableTask
protected volatile Thread blinker
protected TaskEventManager taskEventManager
protected IProcessActions externalActions
protected Logger logger
public IncrementableTask getIncrementableTask()
IncrementableTask
to show
the increment of the task.public void setCancelable(boolean enabled)
public void showIncrementableWindow()
IncrementableTask
public void start()
public abstract void init()
public abstract void process() throws ProcessInterruptedException, ProcessException
public HashMap<String,Object> getResult()
IProcessActions
when the task
is thrown in a thread or is recovered by the user when the task is thrown sequentially.protected void addOutputValue(String key, Object value)
key
- value
- public void execute() throws ProcessInterruptedException, ProcessException
public void run()
execute
function.public void setProgressActive(boolean active)
public long getTime()
public IProcessActions getActions()
public void setActions(IProcessActions actions)
public IProcessActions getUniqueProcessActions()
public void setUniqueProcessActions(IProcessActions actions)
IProcessActions
- protected void insertLineLog(String line)
public String getLabel()
getLabel
in interface IIncrementable
public String getLog()
getLog
in interface IIncrementable
public void actionCanceled(IncrementableEvent e)
actionCanceled
in interface IncrementableListener
public void updatePercent(int parcial, int total) throws ProcessInterruptedException
parcial
- total
- ProcessInterruptedException
public int getPercent()
IIncrementable
getPercent
in interface IIncrementable
public void actionResumed(IncrementableEvent e)
IncrementableListener
actionResumed
in interface IncrementableListener
public void actionSuspended(IncrementableEvent e)
IncrementableListener
actionSuspended
in interface IncrementableListener
public boolean isCancelable()
IIncrementable
Determines if this process can be canceled.
isCancelable
in interface IIncrementable
true
if this process can be canceled, otherwise false
public boolean isPausable()
IIncrementable
Determines if this process can be paused.
isPausable
in interface IIncrementable
true
if this process can be paused, otherwise false
public String getName()
public void setName(String name)
public void dispose()
Disposable
NOTE:After calling this method, the object may not be usable anymore.
dispose
in interface Disposable
protected void finalize() throws Throwable
finalize
in class ProcessParamsManagement
Throwable