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

Indexing / Do not create empty object if no text #7294

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

fxprunayre
Copy link
Member

When a CharacterString or an Anchor is empty, an empty object is created in the index. This is not necessary.

eg.

   <gmd:identificationInfo>
      <gmd:MD_DataIdentification>
         <gmd:citation>
            <gmd:CI_Citation>
               <gmd:title>
                  <gco:CharacterString>Biologische Waarderingskaart en Natura 2000 Habitat</gco:CharacterString>
               </gmd:title>
               <gmd:alternateTitle gco:nilReason="missing">
                  <gco:CharacterString/>
               </gmd:alternateTitle>

Index change:
Pasted image

This would avoid field label to be displayed with no value eg.
image

When a CharacterString or an Anchor is empty, an empty object is created in the index. This is not necessary.

eg.
```xml
   <gmd:identificationInfo>
      <gmd:MD_DataIdentification>
         <gmd:citation>
            <gmd:CI_Citation>
               <gmd:title>
                  <gco:CharacterString>Biologische Waarderingskaart en Natura 2000 Habitat</gco:CharacterString>
               </gmd:title>
               <gmd:alternateTitle gco:nilReason="missing">
                  <gco:CharacterString/>
               </gmd:alternateTitle>
```
@fxprunayre fxprunayre added this to the 4.4.0 milestone Aug 29, 2023
@sonarcloud
Copy link

sonarcloud bot commented Aug 29, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

warning The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

Copy link
Member

@josegar74 josegar74 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, works fine.

@josegar74 josegar74 merged commit 89194c6 into main Sep 20, 2023
10 checks passed
fxprunayre added a commit that referenced this pull request Sep 21, 2023
Follow #7294

Clarify usage of the function which can return an element or text.
josegar74 pushed a commit that referenced this pull request Sep 21, 2023
Follow #7294

Clarify usage of the function which can return an element or text.
josegar74 pushed a commit that referenced this pull request Sep 21, 2023
When a CharacterString or an Anchor is empty, an empty object is created in the index. This is not necessary.

eg.
```xml
   <gmd:identificationInfo>
      <gmd:MD_DataIdentification>
         <gmd:citation>
            <gmd:CI_Citation>
               <gmd:title>
                  <gco:CharacterString>Biologische Waarderingskaart en Natura 2000 Habitat</gco:CharacterString>
               </gmd:title>
               <gmd:alternateTitle gco:nilReason="missing">
                  <gco:CharacterString/>
               </gmd:alternateTitle>
```
josegar74 pushed a commit that referenced this pull request Sep 21, 2023
Follow #7294

Clarify usage of the function which can return an element or text.
@fxprunayre fxprunayre deleted the 440-emptyfieldindexing branch September 25, 2023 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants