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

Standard / ISO19115-3 / Improve linking to parent #8018

Merged
merged 1 commit into from
May 17, 2024

Conversation

fxprunayre
Copy link
Member

@fxprunayre fxprunayre commented May 6, 2024

In ISO19115-3, linking to parent are most of the time done using associated resources with specific association type (partOfSeamlessDatabase by default, but also series or largerWorkCitation). This can be configured in the plugin but some users have a mix of "old" encoding using parentMetadata element.

   <mdb:parentMetadata uuidref="fa6e13d4-5700-4391-a472-dd29b82ba3db"
                       xlink:title="REMI Network Observation and Monitoring Locations"/>

Now the default encoding is:

   <mri:associatedResource>
      <mri:MD_AssociatedResource>
         <mri:associationType>
            <mri:DS_AssociationTypeCode codeList="http://standards.iso.org/iso/19115/resources/Codelists/cat/codelists.xml#DS_AssociationTypeCode"
                                        codeListValue="partOfSeamlessDatabase"/>
         </mri:associationType>
         <mri:metadataReference uuidref="0aa26e4e-4e10-4986-a433-986c2d247669"
                                xlink:href="http://localhost:8080/geonetwork/srv/api/records/0aa26e4e-4e10-4986-a433-986c2d247669"/>
      </mri:MD_AssociatedResource>
   </mri:associatedResource>

This fix the case of a mix of encoding is used for encoding parent relationships and display in the editor associated resource panel a parent block with either parentMetadata or associatedResource. When removing a parent relation, the parent-remove.xsl process handle both encoding. New links are created based on the current plugin configuration. Record view shows both.

image

Funded by Ifremer

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

In ISO19115-3, linking to parent are most of the time done using associated resources with specific association type (partOfSeamlessDatabase by default, but also series or largerWorkCitation). This can be configured in the plugin but some users have a mix of "old" encoding using parentMetadata element.

This fix the case of a mix of encoding is used for encoding parent relationships and display in the editor associated resource panel a parent block with either `parentMetadata` or `associatedResource`. When removing a parent relation, the `parent-remove.xsl` process handle both encoding. New links are created based on the current plugin configuration. Record view shows both.

```xml
   <mdb:parentMetadata uuidref="fa6e13d4-5700-4391-a472-dd29b82ba3db"
                       xlink:title="REMI Network Observation and Monitoring Locations"/>

or

   <mri:associatedResource>
      <mri:MD_AssociatedResource>
         <mri:associationType>
            <mri:DS_AssociationTypeCode codeList="http://standards.iso.org/iso/19115/resources/Codelists/cat/codelists.xml#DS_AssociationTypeCode"
                                        codeListValue="partOfSeamlessDatabase"/>
         </mri:associationType>
         <mri:metadataReference uuidref="0aa26e4e-4e10-4986-a433-986c2d247669"
                                xlink:href="http://localhost:8080/geonetwork/srv/api/records/0aa26e4e-4e10-4986-a433-986c2d247669"/>
      </mri:MD_AssociatedResource>
   </mri:associatedResource>
```

Funded by Ifremer
@fxprunayre fxprunayre added this to the 4.4.5 milestone May 6, 2024
@fxprunayre fxprunayre requested a review from josegar74 May 6, 2024 13:57
Copy link

sonarcloud bot commented May 6, 2024

@josegar74 josegar74 merged commit b407555 into main May 17, 2024
9 checks passed
@fxprunayre fxprunayre deleted the 44-editorparentin1153 branch May 17, 2024 09:31
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.

None yet

2 participants