bodhidharma
Class ProgressBarTaskFeatureExtractionMonitor

java.lang.Object
  extended by bodhidharma.utilities.ProgressBarTaskMonitor
      extended by bodhidharma.ProgressBarTaskFeatureExtractionMonitor

public class ProgressBarTaskFeatureExtractionMonitor
extends ProgressBarTaskMonitor

An implementation of the ProgressBarTaskMonitor abstract class. Parses MIDI files and extracts features from them and provides information to a ProgressBarDialog object that is used to keep it updated.

Parsing is started by calling the go method. This will cause the processing in ActualTask to occur. ActualTask will keep the fields described in this class' superclass updated, which can be accessed using the methods in this class' superclass.

The parsed contents of the MIDI files can be accessed with the getParsedFeatures method, which returns a FeatureSet array with entries corresponding to those of the recordings parameter passed to the constructor of this class. Entries are set to null if the corresponding file was not set to be parsed or was not succesfully parsed.

See Also:
ProgressBarTaskMonitor, ProgressBarDialog, SwingWorker, Recording, FeatureSet, RecordingsPanel
Author:
Cory McKay

Field Summary
 
Fields inherited from class bodhidharma.utilities.ProgressBarTaskMonitor
current_amount_completed, error_message, length_of_task, progress_message, task_canceled, task_completed, time_started
 
Constructor Summary
ProgressBarTaskFeatureExtractionMonitor(int number_of_sub_tasks, Recording[] recordings, boolean[] recordings_to_be_extracted, java.lang.String[] names_of_required_features)
          Same constructor as the superclass.
 
Method Summary
 FeatureSet[] getParsedFeatures()
          Returns value parsed_features, the results of parsing.
 void go()
          Called from a ProgressBarDialog object to the task to be performed.
 
Methods inherited from class bodhidharma.utilities.ProgressBarTaskMonitor
getCurrentAmountCompleted, getErrorMessage, getLengthOfTask, getProgressMessage, getTimeMessage, isCancelled, isDone, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgressBarTaskFeatureExtractionMonitor

public ProgressBarTaskFeatureExtractionMonitor(int number_of_sub_tasks,
                                               Recording[] recordings,
                                               boolean[] recordings_to_be_extracted,
                                               java.lang.String[] names_of_required_features)
Same constructor as the superclass. Also stores the given parameters and instantiates parsed_features with all entries set to null.

Parameters:
number_of_sub_tasks - Number of sub-tasks that will need to be completed in all.
recordings - The Recording objects containing the names of the files that are to be parsed.
recordings_to_be_extracted - Set to true if the file referred to in the corresponding entry of recordings is to be parsed.
names_of_required_features - The names of the features that are to be extracted.
Method Detail

go

public void go()
Called from a ProgressBarDialog object to the task to be performed. Sets up a SwingWorker thread to carry out the thread and sets time_started.

Specified by:
go in class ProgressBarTaskMonitor

getParsedFeatures

public FeatureSet[] getParsedFeatures()
Returns value parsed_features, the results of parsing. Entries correspond to those of the recordings_list field. Entries are set to null if the corresponding file was not set to be parsed or was not succesfully parsed.