Package task

Class ExecutorView

java.lang.Object
task.ExecutorView

public class ExecutorView extends Object
The ExecutorView class is responsible for executing the view task for inspecting data.

This class initializes the CLI view, loads the storage, and manages the storage table. It provides functionality to apply queries, populate the storage table based on the content type, and either print or write the output to a file.

  • Constructor Details

    • ExecutorView

      public ExecutorView(CLIView cli) throws IOException
      Constructs an instance of the ExecutorView class.

      This constructor initializes the CLI view, loads the storage from the input path, and creates a storage table for managing data.

      Parameters:
      cli - The CLIView object containing user input and options.
      Throws:
      IOException - If an error occurs while loading the storage.
  • Method Details

    • run

      public void run()
      Executes the main logic of the view task.

      This method applies the query filters if provided, populates the storage table based on the content type, and either prints the table to the console or writes it to the specified output file.

      The method performs the following steps:

      • Applies query filters to the storage table if the query is not empty.
      • Populates the storage table based on the content type (features, samples, or variants).
      • Prints the table to the console if no output file is specified, or writes it to the output file.
      Throws:
      IllegalStateException - If the content type is unexpected.