Refactor event occurrence parsing to unify section header handling and event count tracking

This commit updates the EventOccurrenceParseResult and EventOccurrenceParserResult classes to consolidate the handling of skipped section headers and event counts into a single set of properties. The previous separate lists and counts for middle school and high school sections have been replaced with a unified approach, improving clarity and maintainability. Additionally, the EventOccurrenceParserService has been modified to reflect these changes, ensuring consistent behavior across the application. This refactor enhances the overall structure of the event parsing logic.
This commit is contained in:
2026-01-10 18:19:16 -05:00
parent b7e812bb63
commit ecd6173a44
11 changed files with 528 additions and 472 deletions
+6 -15
View File
@@ -31,26 +31,17 @@ public class EventOccurrenceParseResult
public List<ParsingIssue> Issues { get; set; } = new();
/// <summary>
/// List of high school (HS) section headers that were encountered but skipped
/// List of section headers that were encountered but skipped
/// because they don't match the chapter's school level setting.
/// Headers may contain " - MS" or " - HS" to indicate school level.
/// </summary>
public List<string> SkippedHSSectionHeaders { get; set; } = new();
public List<string> SkippedSectionHeaders { get; set; } = new();
/// <summary>
/// List of middle school (MS) section headers that were encountered but skipped
/// because they don't match the chapter's school level setting.
/// Number of event occurrences that were skipped due to school level filtering.
/// This includes both MS and HS events that don't match the chapter's school level setting.
/// </summary>
public List<string> SkippedMSSectionHeaders { get; set; } = new();
/// <summary>
/// Number of Middle School (MS) event occurrences that were skipped due to school level filtering.
/// </summary>
public int SkippedMSEventCount { get; set; }
/// <summary>
/// Number of High School (HS) event occurrences that were skipped due to school level filtering.
/// </summary>
public int SkippedHSEventCount { get; set; }
public int SkippedEventCount { get; set; }
/// <summary>
/// Footnotes captured for each event definition. Footnotes are lines that start with "*" or are parenthetical notes.