Package task
Class ExecutorView
java.lang.Object
task.ExecutorView
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 Summary
Constructors -
Method Summary
-
Constructor Details
-
ExecutorView
Constructs an instance of theExecutorViewclass.This constructor initializes the CLI view, loads the storage from the input path, and creates a storage table for managing data.
- Parameters:
cli- TheCLIViewobject 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 theviewtask.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.
-