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

fix: suggester field synonyms #93

Merged
merged 9 commits into from
Mar 4, 2024
Merged

Conversation

nsenave
Copy link
Contributor

@nsenave nsenave commented Mar 4, 2024

Summary

The synonyms property this time.

Done

Why a dirty "pre-processing" class?

The current output of Pogues app for suggesters (including field synonyms) is as it should be in Lunatic. I wanted to keep that.

Yet XSD generated classes doesn't allow to have key/value pairs (at least not without some hacking which would be worst).

So, I added a pre-processing step for json questionnaire inputs to change key/value pairs into source/target fields.

In the end, the usage of this is as follows:

  1. questionnaires are be converted from json to xml
  2. Eno v2 does Pogues to DDI using the xml output, and the suggester parameters are put in a CDATA in the DDI
  3. Eno v3 does the DDI to Lunatic, it will require a patch to read the xml content of that CDATA anyway to convert it to Lunatic json...

=> Later on, when Eno v3 does the Pogues to DDI/Lunatic transformation, we will only use the json representation in Pouges-Model and this pre-processing will be removed.

@nsenave nsenave requested review from BulotF and laurentC35 March 4, 2024 15:25
@nsenave nsenave self-assigned this Mar 4, 2024
@nsenave
Copy link
Contributor Author

nsenave commented Mar 4, 2024

Note: I tried to replace jaxb with jackson, but maintaining the json <-> xml conversions would be too much work (too much risks).

Switch to jackson will be done when the xml format will no longer be required (i.e. when Eno v3 can do the Pogues to DDI transformation)

@nsenave nsenave merged commit e98ea50 into main Mar 4, 2024
7 checks passed
@nsenave nsenave deleted the fix/suggester-field-synonyms branch March 4, 2024 15:34
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