Repository navigation
NeTEx 2.0 breaking changes: new coordinates, base package and LocalDate mapping - #312
Merged
Merged
Conversation
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.
|
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.


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-modelThe artifact is renamed from
netex-java-modeltonetex2-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.netex2org.rutebanken.netex.model→org.entur.netex2.modelorg.rutebanken.netex{,.client,.util,.validation}→org.entur.netex2{,.client,.util,.validation}org.entur.netex.java.modeltoorg.entur.netex2so 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) andnetex2-java-model(2.0) without split packages.3.
xsd:dateis mapped tojava.time.LocalDatexsd:dateelements such asOperatingDay/CalendarDate,DayTypeAssignment/Date,ServiceCalendar/FromDate|ToDateare nowLocalDateinstead ofLocalDateTimeat midnight.LocalDateXmlAdapteraccepts an optional trailing zone offset (2024-05-01+02:00,2024-05-01Z) as permitted byxsd:dateand ignores it; it always marshals asyyyy-MM-dd.xsd:dateTimeelements (e.g.OperatingPeriod/FromDate) are stillLocalDateTime.Not changed
The GitHub repository name and URLs still refer to
entur/netex-java-model.