Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confused by VehicleMode, TransportMode, AllVehicleModesOfTransport, etc. #772

Open
trurlurl opened this issue Sep 4, 2024 · 3 comments
Open
Assignees
Labels
change-request Additional feature, discussed withe the group and having a proper Change Requet in Basecamp.
Milestone

Comments

@trurlurl
Copy link
Collaborator

trurlurl commented Sep 4, 2024

There are elements like VehicleMode(s), TransportMode(s), OtherTransportModes, Mode that map to the following three enumerations, but in very inconsistent or non-obvious ways: VehicleModeEnumeration, AllVehicleModesOfTransportEnumeration, AllModesEnumeration. It would be helpful to disentangle things a bit - by improving annotations and perhaps, where possible, by renaming elements and the three enumeration types.

What I've found (unless I made some mistake):

  • AllVehicleModesOfTransportEnumeration is a superset of VehicleModeEnumeration, with additional values unknown, anyMode, intercityRail, urbanRail
  • AllModesEnumeration is a superset of AllVehicleModesOfTransportEnumeration, with additional values foot, bicycle, motorcycle, scooter, car, shuttle

I guess we can't get rid of VehicleModeEnumeration in favor of AllVehicleModesOfTransportEnumeration - or can we? If not, it would be good to describe the difference / rationale.

Could we choose less confusing names? E.g., PrimaryVehicleModesOfTransportEnumeration, AllVehicleModesOfTransportEnumeration, AllModesOfTransportEnumeration?

If the subset-superset hierarchy between the three enumerations were to hold in the future - would it make sense to inherit the values from the subset using the union construct in XSD?

As for the mapping from element names to the enumerations, could we choose more consistent names?

  • I guess that VehicleMode needs to stay for backwards compatibility. But then it would be good if OtherTransportModes (which also maps to VehicleModeEnumeration / PrimaryVehicleModesOfTransportEnumeration) could be renamed to OtherVehicleModes or OtherPrimaryVehicleModes.

  • TransportMode(s) should always map to AllModesEnumeration / AllModesOfTransportEnumeration.

  • A new name VehicleTransportMode might be introduced to consistently map to AllVehicleModesOfTransportEnumeration?

Last question: the plural forms referring to a list should, in principle, start with a lower case (transportModes). Change or leave it (many places)?

Depending on your feedback I would prepare a PR.

@trurlurl trurlurl added this to the netex_2.0 milestone Sep 4, 2024
@ue71603 ue71603 assigned Aurige and unassigned skinkie, Aurige and ue71603 Sep 24, 2024
@ue71603
Copy link
Contributor

ue71603 commented Sep 24, 2024

@Aurige Can you pls instruct André? Or we discuss it tomorrow.

@Aurige
Copy link
Contributor

Aurige commented Sep 25, 2024

I'm open to renaming the enumeration's name and to "merge" some (most probably forgot VehicleModeEnumeration and only keep AllVehicleModesOfTransportEnumeration for example)
But that's definitely to be discussed/approved by the group first

@Aurige
Copy link
Contributor

Aurige commented Sep 25, 2024

Ok for a PR @trurlurl : trying to match TM as much as possible and avoid breaking compatibility
With support from @Ulf9 @nick-knowles and me

@ue71603 ue71603 assigned trurlurl and unassigned Aurige Oct 15, 2024
@ue71603 ue71603 added the change-request Additional feature, discussed withe the group and having a proper Change Requet in Basecamp. label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change-request Additional feature, discussed withe the group and having a proper Change Requet in Basecamp.
Projects
None yet
Development

No branches or pull requests

4 participants