VSN-1999 : Phase one , Adding utility process to retrieve complete data from the two sheets excel file & construct adapted prepared passengers objects.
VSN-1999: Utility Process for Excel Data Integration
Overview
This set of modifications introduces a utility process designed to retrieve complete data from a two-sheet Excel file and construct adapted prepared passenger objects. The changes focus on building a robust pipeline for reading, parsing, and transforming raw Excel data into structured domain objects that can be used across the preparation service.
Detailed Modifications
Construction Method
A new construction method has been added to assemble prepared passenger objects.
- It ensures that data retrieved from multiple sheets is combined into coherent passenger representations.
- The method acts as the central point where raw data is transformed into usable entities for downstream processes.
Attachment Method
An attachment method has been introduced to link supplementary information to passenger objects.
- This allows additional metadata or related records to be associated with each passenger.
- The design supports extensibility, making it easier to enrich passenger data with future attributes.
Reading Methods
Dedicated methods for reading Excel data have been implemented.
- These methods handle the parsing of rows and columns from the source file.
- They ensure that both sheets are processed consistently, with error handling for incomplete or malformed entries.
- The reading logic abstracts away low-level file operations, providing a clean interface for higher-level utilities.
Utility Methods for File Data
Utility methods have been created to streamline the process of extracting and interpreting file data.
- They provide reusable functions for common tasks such as row iteration, cell value conversion, and validation.
- These utilities reduce duplication and improve maintainability across the codebase.
Fetching Passengers from the First Sheet
A specific method has been added to fetch passenger data from the first sheet of the Excel file.
- This sheet contains the primary passenger records.
- The method ensures that all relevant fields are captured and mapped correctly to the prepared passenger objects.
Representative Line Object
A new object has been defined to represent a single line of data from the Excel file.
- This object encapsulates the raw values of a row, making it easier to manipulate and validate before transformation.
- It serves as the foundation for constructing higher-level passenger entities.
Prepared Passenger Line Object
Another object has been introduced to represent a prepared passenger line.
- Unlike the representative line object, this one is tailored to the domain model, containing structured and validated passenger information.
- It bridges the gap between raw Excel data and the business logic of the preparation service.
Final Description
Together, these modifications establish a comprehensive framework for handling Excel-based passenger data. The process begins with reading and utility methods that parse raw file content, continues with representative line objects that encapsulate row-level data, and culminates in prepared passenger line objects that integrate all necessary attributes. The construction and attachment methods ensure that passenger objects are complete and enriched with supplementary information. This foundation significantly enhances the reliability and scalability of the preparation service, enabling it to process complex datasets with greater accuracy and efficiency.
Closes VSN-1990