Skip to content

NeTEx 2.0 breaking changes: new coordinates, base package and LocalDate mapping - #312

Merged
vpaturet merged 4 commits into
upgrade-netex-2.0from
netex2-breaking-changes
Oct 13, 2026
Merged

vpaturet merged 4 commits into
upgrade-netex-2.0from
netex2-breaking-changes

Conversation

@vpaturet

Copy link
Copy Markdown
Contributor

Three breaking changes for the NeTEx 2.0 model, one per commit, so that it can be published and consumed side by side with the NeTEx 1.x model.

1. Maven coordinates: org.entur:netex2-java-model

The artifact is renamed from netex-java-model to netex2-java-model (pom.xml, README snippets and badges, release/hotfix workflow summaries). The repository URL and SCM entries are unchanged.

2. Base package: org.entur.netex2

  • Generated model: org.rutebanken.netex.model → org.entur.netex2.model
  • Utilities: org.rutebanken.netex{,.client,.util,.validation} → org.entur.netex2{,.client,.util,.validation}
  • The JPMS module is renamed from org.entur.netex.java.model to org.entur.netex2 so that the module name matches its root package.

Together with the new artifactId this lets a consumer depend on both netex-java-model (1.x) and netex2-java-model (2.0) without split packages.

3. xsd:date is mapped to java.time.LocalDate

xsd:date elements such as OperatingDay/CalendarDate, DayTypeAssignment/Date, ServiceCalendar/FromDate|ToDate are now LocalDate instead of LocalDateTime at midnight. LocalDateXmlAdapter accepts an optional trailing zone offset (2024-05-01+02:00, 2024-05-01Z) as permitted by xsd:date and ignores it; it always marshals as yyyy-MM-dd. xsd:dateTime elements (e.g. OperatingPeriod/FromDate) are still LocalDateTime.

Not changed

The GitHub repository name and URLs still refer to entur/netex-java-model.

The NeTEx 2.0 model is published as a separate artifact so that it can
coexist with the NeTEx 1.x model (org.entur:netex-java-model) on the same
classpath.
The generated model now lives in org.entur.netex2.model and the hand-written
utilities in org.entur.netex2, org.entur.netex2.client, org.entur.netex2.util
and org.entur.netex2.validation. The JPMS module is renamed accordingly to
org.entur.netex2 so that the module name matches its root package.
xsd:date elements (OperatingDay/CalendarDate, DayTypeAssignment/Date,
ServiceCalendar/FromDate and ToDate, ...) were previously bound to
LocalDateTime at midnight. They are now bound to LocalDate.

LocalDateXmlAdapter accepts an optional trailing zone offset when
unmarshalling, as permitted by xsd:date, and ignores it. Dates are always
marshalled as yyyy-MM-dd. xsd:dateTime elements are still bound to
LocalDateTime.
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
52.7% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@vpaturet
vpaturet merged commit 591201d into upgrade-netex-2.0 Oct 13, 2026
3 of 4 checks passed
@vpaturet
vpaturet deleted the netex2-breaking-changes branch October 13, 2026 08:46
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