org.basex.core
Class Progress

java.lang.Object
  extended by org.basex.core.Progress
Direct Known Subclasses:
Builder, FSParser, IndexBuilder, Parser, Proc, QueryContext, QueryProcessor, XMLScanner

public abstract class Progress
extends Object

This class is implemented by all kinds of processes. It gives feedback on the current process. Moreover, it allows to interrupt the process by calling the stop() method.

Author:
Workgroup DBIS, University of Konstanz 2005-10, ISC License, Christian Gruen

Constructor Summary
Progress()
           
 
Method Summary
 void abort()
          Aborts a failed or interrupted progress.
 void checkStop()
          Checks if the progress was interrupted; if yes, sends a runtime exception.
 String det()
          Returns short information on this process.
 String detail()
          Returns detailed information on the current process or sub process.
 double prog()
          Returns progress information.
 double progress()
          Returns a progress value (0 - 1).
 void progress(Progress prog)
          Sets a new sub progress.
 void stop()
          Stops a process or sub process.
 String tit()
          Returns short information on this process.
 String title()
          Returns short information on the current process or sub process.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Progress

public Progress()
Method Detail

title

public final String title()
Returns short information on the current process or sub process.

Returns:
header information

tit

public String tit()
Returns short information on this process. Can be overwritten to give more detailed information.

Returns:
header information

detail

public final String detail()
Returns detailed information on the current process or sub process. Can be overwritten to give more detailed information.

Returns:
information in detail

det

public String det()
Returns short information on this process.

Returns:
header information

progress

public final double progress()
Returns a progress value (0 - 1).

Returns:
header information

prog

public double prog()
Returns progress information. Can be overwritten to give more detailed information.

Returns:
header information

progress

public final void progress(Progress prog)
Sets a new sub progress.

Parameters:
prog - progress

stop

public final void stop()
Stops a process or sub process.


checkStop

public void checkStop()
Checks if the progress was interrupted; if yes, sends a runtime exception.


abort

public void abort()
Aborts a failed or interrupted progress.