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

Incorrect plural field and accessor method names #32

Open
abyrd opened this issue Jan 23, 2024 · 0 comments
Open

Incorrect plural field and accessor method names #32

abyrd opened this issue Jan 23, 2024 · 0 comments

Comments

@abyrd
Copy link

abyrd commented Jan 23, 2024

When working with SIRI data, @leonardehrenfried and I both noticed that some fields and accessor methods have strange plural forms. For example:

  • uk.org.siri.siri20.AffectsScopeStructure.VehicleJourneys#affectedVehicleJourneies
  • uk.org.siri.siri20.AffectsScopeStructure.VehicleJourneys#getAffectedVehicleJourneies
  • uk.org.siri.siri13.AffectedVehicleJourneyStructure#vehicleJourneyReves
  • uk.org.siri.siri13.AffectedVehicleJourneyStructure#getVehicleJourneyReves

These appear to be over-generalizations of irregular English plurals (here, leaf/wolf/elf). They could be introduced at the data model (UML) stage, the XSD downstream from UML, or the Java code generation from the XSD. Depending on where they are introduced, they could lead to anything from failed deserialization to harmless but odd looking Java code.

We searched through the SIRI XSD via https://github.com/SIRI-CEN/SIRI and did not discover any of these plural forms, so our suspicion is that they're introduced in the code generation stage. https://github.com/entur/siri-java-model/blob/master/pom.xml#L178-L226 shows use of cxf-xjc-plugin. This appears to be a related discussion on StackOverflow: https://stackoverflow.com/q/4502229/778449
https://stackoverflow.com/a/13359717/778449

If our understanding is correct, this is not expected to create any errors in the short term. I am creating this issue because people may reuse this siri-java-model within or outside Entur, and may be concerned and invest time the way we did into verifying whether or not this will cause problems. If the plurals can be fixed it may save confusion in the future.

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

No branches or pull requests

1 participant