Add parking AvailabilityCondition validation - #369
Draft
teppope wants to merge 2 commits into
Draft
Conversation
- Narrow SiteFrame 'unexpected' warning to fire only when SiteFrame has no Parking content - Add DefaultParkingValidationTreeFactory with rules for AvailabilityCondition structure inside Parking/validityConditions: missing DayTypeRef, missing Timeband time fields, and invalid time range (EndTime < StartTime) - Register parking validation tree in PublicationDeliveryValidationTreeFactory Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds XPath validation rules for
AvailabilityConditionelements onParkingentities inside aSiteFrame.Changes
DefaultSiteFrameValidationTreeFactoryNarrows the 'unexpected SiteFrame' warning so it only fires when the
SiteFramecontains noParkingelements. ASiteFrameused exclusively for park-and-ride data is intentional and should not be warned against.DefaultParkingValidationTreeFactory(new)Three validation rules for
Parking/validityConditions/AvailabilityCondition:PARKING_AVAILABILITY_CONDITION_WITHOUT_DAY_TYPE(ERROR): EachAvailabilityConditionmust reference aDayTypeviadayTypes/DayTypeRef.PARKING_TIMEBAND_WITHOUT_START_OR_END_TIME(ERROR): EachTimebandmust have bothStartTimeandEndTime.PARKING_TIMEBAND_INVALID_TIME_RANGE(ERROR):EndTimemust not be beforeStartTime(00:00:00 is treated as midnight/24h and is exempt).PublicationDeliveryValidationTreeFactoryRegisters the new factory so parking rules run for both direct data-objects and frames-inside-CompositeFrame contexts.
Notes
This is part of a NeTEx Nordic CCB proposal to formally support park-and-ride opening hours (
AvailabilityConditioninsideParking/validityConditions). All 270 tests pass.