entur / netex-java-model

Java JAXB binding classes for NeTEx xsd schema
European Union Public License 1.2
12 stars 13 forks source link

JAXB2 Simplify plugin #3

Open skinkie opened 6 years ago

skinkie commented 6 years ago

One of the problems of the current NeTEx XSD is 'xs:choice' to model inheritance. For the programmer the resulting code form xjc is terrible. For all choice elements explicit casting is required. One of the solutions for this might be https://github.com/highsource/jaxb2-basics/wiki/JAXB2-Simplify-Plugin

I am also open for alternative solutions, which may or may not require some transformation code or even a custom netex-java-model, which is able to parse NeTEx but lacks the pain with JAXBElement.

sunghangga commented 3 years ago

One of the problems of the current NeTEx XSD is 'xs:choice' to model inheritance. For the programmer the resulting code form xjc is terrible. For all choice elements explicit casting is required. One of the solutions for this might be https://github.com/highsource/jaxb2-basics/wiki/JAXB2-Simplify-Plugin

I am also open for alternative solutions, which may or may not require some transformation code or even a custom netex-java-model, which is able to parse NeTEx but lacks the pain with JAXBElement.

Can this jaxb source code used for generate another netex scheme profile? for example is BISON Netex profile. Thank you @skinkie

skinkie commented 3 years ago

The BISON NeTEx profile is not created for generating source code, but convenience for validation. But yes, you could create source code for it.

sunghangga commented 3 years ago

The BISON NeTEx profile is not created for generating source code, but convenience for validation. But yes, you could create source code for it.

Thank's for your response. Would you like to give me some explanation or example for implement BISON Netex profile to this netex-java-model source code? I will be very helpful @skinkie

skinkie commented 3 years ago

For the BISON profile you can use this repository as-is. The BISON profile is limited to the "NeTEx-CEN" repository for which this profile generates its code. Not leading you in a direction you should not go. And if you have any questions concerning BISON NeTEx please participate in the next "Architectuurwerkgroep" at the April 22th.

sunghangga commented 3 years ago

For the BISON profile you can use this repository as-is. The BISON profile is limited to the "NeTEx-CEN" repository for which this profile generates its code. Not leading you in a direction you should not go. And if you have any questions concerning BISON NeTEx please participate in the next "Architectuurwerkgroep" at the April 22th.

Fine, thank you for your kind response. How I can join that "Architectuurwerkgroep"? @skinkie

skinkie commented 3 years ago

Fine, thank you for your kind response. How I can join that "Architectuurwerkgroep"? @skinkie

Just ask for an invitation; https://bison.dova.nu/contactinformatie-bison

sunghangga commented 3 years ago

Fine, thank you for your kind response. How I can join that "Architectuurwerkgroep"? @skinkie

Just ask for an invitation; https://bison.dova.nu/contactinformatie-bison

Hi Stefan, I would to ask how I can do import data with this jaxb and insert to database with BISON profile? or do you have some best solution? Thank you. @skinkie

skinkie commented 3 years ago

Are you looking for paid consultancy?