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 / Avoid indexing error on multilingual feature catalogue #8013

Merged
merged 2 commits into from
May 17, 2024

Conversation

fxprunayre
Copy link
Member

To test, create a record with feature catalogue and add more than one language.

On the long run, we need to add multilingual support here.

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

…catalogue

On the long run, we need to add multilingual support here.
@fxprunayre fxprunayre added this to the 4.4.5 milestone May 2, 2024
@fxprunayre fxprunayre requested a review from josegar74 May 2, 2024 14:58
"code" :"<xsl:value-of select="util:escapeForJson(gfc:FC_FeatureType/gfc:code/*/text())"/>",
"isAbstract" :"<xsl:value-of select="gfc:FC_FeatureType/gfc:isAbstract/*/text()"/>",
"aliases" : "<xsl:value-of select="util:escapeForJson(gfc:FC_FeatureType/gfc:aliases/*/text())"/>"
"definition" :"<xsl:value-of select="util:escapeForJson(gfc:FC_FeatureType/gfc:definition/gco:CharacterString/text())"/>",
Copy link
Member

Choose a reason for hiding this comment

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

Should not be (gco:CharacterString|gcx:Anchor)?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've never seen Anchor used in here. If putting a link to a document for the feature type, it would go in definitionReference I suppose

               <gfc:featureType>
                  <gfc:FC_FeatureType>
                     <gfc:typeName/>
                     <gfc:definition gco:nilReason="missing" xsi:type="lan:PT_FreeText_PropertyType">
                        <gco:CharacterString/>
                     </gfc:definition>
                     <gfc:isAbstract>
                        <gco:Boolean>true</gco:Boolean>
                     </gfc:isAbstract>
                     <gfc:aliases/>
                     <gfc:definitionReference>
                        <gfc:FC_DefinitionReference>
                           <gfc:definitionSource>
                              <gfc:FC_DefinitionSource>
                                 <gfc:source>
                                    <cit:CI_Citation>
                                       <cit:title gco:nilReason="missing" xsi:type="lan:PT_FreeText_PropertyType">
                                          <gco:CharacterString/>
                                          <lan:PT_FreeText>
                                             <lan:textGroup>
                                                <lan:LocalisedCharacterString locale="#FR"/>
                                             </lan:textGroup>
                                             <lan:textGroup>
                                                <lan:LocalisedCharacterString locale="#EN">Data model published by the Sandre</lan:LocalisedCharacterString>
                                             </lan:textGroup>
                                          </lan:PT_FreeText>
                                       </cit:title>
                                       <cit:onlineResource>
                                          <cit:CI_OnlineResource>
                                             <cit:linkage xsi:type="lan:PT_FreeText_PropertyType">
                                                <gco:CharacterString/>
                                                <lan:PT_FreeText>
                                                   <lan:textGroup>
                                                      <lan:LocalisedCharacterString locale="#FR">https://www.sandre.eaufrance.fr/definition/eth/latest</lan:LocalisedCharacterString>
                                                   </lan:textGroup>

"aliases" : "<xsl:value-of select="util:escapeForJson(gfc:FC_FeatureType/gfc:aliases/*/text())"/>"
"definition" :"<xsl:value-of select="util:escapeForJson(gfc:FC_FeatureType/gfc:definition/gco:CharacterString/text())"/>",
"code" :"<xsl:value-of select="util:escapeForJson(gfc:FC_FeatureType/gfc:code/(gco:CharacterString|gcx:Anchor)/text())"/>",
"isAbstract" :"<xsl:value-of select="gfc:FC_FeatureType/gfc:isAbstract/gco:CharacterString/text()"/>",
Copy link
Member

Choose a reason for hiding this comment

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

Should not be (gco:CharacterString|gcx:Anchor)?

Copy link
Member Author

Choose a reason for hiding this comment

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

In fact this should be gco:Boolean. Fixed.

"definition" :"<xsl:value-of select="util:escapeForJson(gfc:FC_FeatureType/gfc:definition/gco:CharacterString/text())"/>",
"code" :"<xsl:value-of select="util:escapeForJson(gfc:FC_FeatureType/gfc:code/(gco:CharacterString|gcx:Anchor)/text())"/>",
"isAbstract" :"<xsl:value-of select="gfc:FC_FeatureType/gfc:isAbstract/gco:CharacterString/text()"/>",
"aliases" : "<xsl:value-of select="util:escapeForJson(gfc:FC_FeatureType/gfc:aliases/gco:CharacterString/text())"/>"
Copy link
Member

Choose a reason for hiding this comment

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

Should not be (gco:CharacterString|gcx:Anchor)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Same, never seen usage of Anchor in here.

Copy link

sonarcloud bot commented May 16, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@josegar74 josegar74 merged commit 99feb7b into main May 17, 2024
9 checks passed
@fxprunayre fxprunayre deleted the 44-115-multilingualfcat branch May 17, 2024 08:55
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.

None yet

2 participants