Skip to content

Add parser support for parking opening hours (AvailabilityCondition) - #309

Draft
teppope wants to merge 2 commits into
entur:masterfrom
tmfg:feat/parking-availability-conditions
Draft

teppope wants to merge 2 commits into
entur:masterfrom
tmfg:feat/parking-availability-conditions

Conversation

@teppope

@teppope teppope commented Jul 21, 2026 •

Copy link
Copy Markdown

Summary

Consumers can look up the opening hours of a parking by parking id, with getAvailabilityConditionsByParkingIdIndex() on NetexEntitiesIndex.

  • SiteFrameParser fills the index from the AvailabilityCondition elements in validityConditions of each Parking.
  • NetexEntitiesIndexImpl holds the backing Multimap<String, AvailabilityCondition>.
  • The change targets the 5.x line with org.entur.netex2.model classes (netex2-java-model 3.0.0).

Before this change, the parser put AvailabilityCondition elements into the raw Parking object only. Consumers had no direct query path for parking opening hours.

Verification

  • ✅ mvn verify -P prettierCheck — BUILD SUCCESS, 39 tests, 0 failures
  • ✅ TestParkingAvailabilityConditions — 4 tests green
  • ✅ Shown to fail without the fix: with the SiteFrameParser of master, 3 of 4 tests fail (expected: <2> but was: <0> and two NoSuchElementException: No value present). The test without conditions stays green.
  • ✅ The test fixture validates against the NeTEx 1.16 XSD

Known limitations

  • Each class that implements NetexEntitiesIndex must add getAvailabilityConditionsByParkingIdIndex(). The new method is abstract, as the other index getters are.

@teppope
teppope force-pushed the feat/parking-availability-conditions branch from 8e7dd5a to 4bd62f0 Compare November 5, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant