Skip to content

Standard / ISO19115-3 / Metadata linkage readonly for multilingual records - #9249

Draft
fxprunayre wants to merge 1 commit into
mainfrom
44-191153-metadatalinkagereadonly
Draft

Standard / ISO19115-3 / Metadata linkage readonly for multilingual records#9249
fxprunayre wants to merge 1 commit into
mainfrom
44-191153-metadatalinkagereadonly

Conversation

@fxprunayre

Copy link
Copy Markdown
Member

Follow up of #9167.

6c3535f reported an issue for multilingual record.

Make the metadata linkage readonly (completeMetadata) also if record is multilingual.

Checklist

  • I have read the contribution guidelines
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests
  • User documentation provided for new features or enhancements in manual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

records

Follow up of #9167.

6c3535f reported an issue for multilingual record.

Make the metadata linkage readonly (completeMetadata) also if record is multilingual.
@fxprunayre fxprunayre added this to the 4.4.11 milestone Apr 23, 2026
@sonarqubecloud

Copy link
Copy Markdown

@fxprunayre

Copy link
Copy Markdown
Member Author

Hi @cmangeat, I was addressing the issue you mentionned in 6c3535f but BuildEditorFormTest fails even if editing
https://github.com/geonetwork/core-geonetwork/blob/main/schemas/iso19115-3.2018/src/test/resources/UpperRhineCastles-iso19115-3.2018.xml works fine (all views). The test is based on https://github.com/geonetwork/core-geonetwork/blob/main/schemas/iso19115-3.2018/src/test/resources/raw-UpperRhineCastles-inflated-for-edition.xml - do you have any helper to generate the "inflated" version from the original XML which should be UpperRhineCastles-iso19115-3.2018.xml ? Any pointer welcomed.

@cmangeat

cmangeat commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Hi @cmangeat, I was addressing the issue you mentionned in 6c3535f but BuildEditorFormTest fails even if editing https://github.com/geonetwork/core-geonetwork/blob/main/schemas/iso19115-3.2018/src/test/resources/UpperRhineCastles-iso19115-3.2018.xml works fine (all views). The test is based on https://github.com/geonetwork/core-geonetwork/blob/main/schemas/iso19115-3.2018/src/test/resources/raw-UpperRhineCastles-inflated-for-edition.xml - do you have any helper to generate the "inflated" version from the original XML which should be UpperRhineCastles-iso19115-3.2018.xml ? Any pointer welcomed.

Hello, as I remember, "inflated" version was generated using a vanillia gn, using such a snippet before the transformation (at the beginning of Xml.transform(...)):

XMLOutputter xmlOutputter = new XMLOutputter(Format.getCompactFormat());
String rawXml = xmlOutputter.outputString(xml);
FileWriter fw = new FileWriter(".../schemas/iso19115-3.2018/src/test/resources/raw-UpperRhineCastles-inflated-for-edition.xml");
fw.write(rawXml);
fw.flush();
  • compact format has to be chosen as used deserialisation to dom tree add empty element for "\n" if not chosen
  • a few entries has then to be obfuscated then so to please github and avoid "security disclosures" (mail account for example, but NOT password as they are not embedded)

The file is NOT updated regularly, could have also occurred that a section has been updated manually at a given moment.

Please also remember that patching input in test is also simple, cf. https://github.com/metadata101/iso19115-3.2018.che/blob/4.4.9/src/test/java/org/fao/geonet/schema/BuildEditorFormTest.java#L119.

"Any tests are better than no tests." ?

@josegar74 josegar74 modified the milestones: 4.4.11, 4.4.12 Jun 2, 2026
@fxprunayre fxprunayre modified the milestones: 4.4.12, 4.4.13 Jul 8, 2026
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.

3 participants