Skip to content

Latest commit

 

History

History
125 lines (69 loc) · 5.76 KB

File metadata and controls

125 lines (69 loc) · 5.76 KB
graph LR
    DownloadOrchestrator["DownloadOrchestrator"]
    FileValidator["FileValidator"]
    ImportInitiator["ImportInitiator"]
    ConversionChecker["ConversionChecker"]
    DataProcessor["DataProcessor"]
    LocaleDataDispatcher["LocaleDataDispatcher"]
    DataParsers["DataParsers"]
    DataWriter["DataWriter"]
    XMLTextExtractor["XMLTextExtractor"]
    ElementSkipper["ElementSkipper"]
    ImportInitiator -- "triggers" --> DownloadOrchestrator
    DownloadOrchestrator -- "relies on" --> FileValidator
    ImportInitiator -- "delegates to" --> DataProcessor
    DataProcessor -- "consults" --> ConversionChecker
    DataProcessor -- "orchestrates via" --> LocaleDataDispatcher
    DataProcessor -- "uses" --> DataWriter
    LocaleDataDispatcher -- "dispatches tasks to" --> DataParsers
    DataParsers -- "utilizes" --> XMLTextExtractor
    DataParsers -- "utilizes" --> ElementSkipper
Loading

CodeBoardingDemoContact

Details

The CLDR data import subsystem in Babel is designed to efficiently download, validate, process, and persist CLDR (Common Locale Data Repository) data.

DownloadOrchestrator

Manages the process of downloading CLDR data archives from external sources, ensuring the raw data is available for processing. This is critical for the "Data-Driven" nature of the library.

Related Classes/Methods:

FileValidator

Ensures the integrity and correct format of the downloaded CLDR data files before further processing, acting as a gatekeeper for data quality.

Related Classes/Methods:

ImportInitiator

Serves as the main entry point for triggering the CLDR data import and conversion workflow, orchestrating the overall data pipeline.

Related Classes/Methods:

ConversionChecker

Determines if a new conversion of CLDR data is necessary by comparing timestamps or versions of existing data, optimizing the process by avoiding redundant work.

Related Classes/Methods:

DataProcessor

Orchestrates the overall conversion of raw CLDR XML data into Babel's structured internal data, coordinating both global and locale-specific parsing. This is the core transformation engine.

Related Classes/Methods:

LocaleDataDispatcher

Manages and dispatches the parsing of various categories of locale-specific CLDR data (e.g., display names, calendar data) to specialized parsers, embodying the "Functional Decomposition" pattern for locale data.

Related Classes/Methods:

DataParsers

A collection of specialized functions, each dedicated to extracting and transforming a particular type of CLDR data from the XML structure into Babel's internal format. These components implement the "Data/Logic Separation" by focusing solely on parsing logic.

Related Classes/Methods:

DataWriter

Persists the fully processed and converted CLDR data into the appropriate output files or internal data structures for Babel's runtime use, completing the data pipeline.

Related Classes/Methods:

XMLTextExtractor

Utility function for extracting text from XML elements.

Related Classes/Methods:

ElementSkipper

Utility function for determining if an XML element should be ignored during parsing.

Related Classes/Methods: