Skip to content

Commit

Permalink
Index contact for distribution (#5708)
Browse files Browse the repository at this point in the history
* Index contact for distribution in iso19139

* Add  contact for distribution as array field in ES

* Index contact for distribution in iso19115-3
  • Loading branch information
josegar74 authored May 26, 2021
1 parent 4132cd2 commit dd0ff02
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ private void checkIndexResponse(BulkResponse bulkItemResponses,
.add("format")
.add("contact")
.add("contactForResource")
.add("contactForDistribution")
.add("OrgForResource")
.add("resourceProviderOrgForResource")
.add("resourceVerticalRange")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@


<xsl:for-each select="mdb:resourceLineage/*">
<xsl:copy-of select="gn-fn-index:add-multilingual-field('lineage',
<xsl:copy-of select="gn-fn-index:add-multilingual-field('lineage',
mrl:statement, $allLanguages)"/>

<xsl:for-each select=".//mrl:source[@uuidref != '']">
Expand Down Expand Up @@ -1082,6 +1082,14 @@
</format>
</xsl:for-each>

<xsl:for-each select="mrd:distributor/mrd:MD_Distributor[mrd:distributorContact]">
<!-- Indexing resource contact -->
<xsl:apply-templates mode="index-contact"
select="mrd:distributorContact">
<xsl:with-param name="fieldSuffix" select="'ForDistribution'"/>
</xsl:apply-templates>
</xsl:for-each>

<xsl:for-each select="mrd:transferOptions/*/
mrd:onLine/*[cit:linkage/gco:CharacterString != '']">
<xsl:variable name="transferGroup"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,14 @@
</format>
</xsl:for-each>

<!-- Indexing distributor contact -->
<xsl:for-each select="gmd:distributor/*[gmd:distributorContact]">
<xsl:apply-templates mode="index-contact"
select="gmd:distributorContact">
<xsl:with-param name="fieldSuffix" select="'ForDistribution'"/>
</xsl:apply-templates>
</xsl:for-each>

<xsl:for-each select="gmd:transferOptions/*/
gmd:onLine/*[gmd:linkage/gmd:URL != '']">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@
* Return an object containing metadata contacts
* as an array and resource contacts as array
*
* @return {{metadata: Array, resource: Array}}
* @return {{metadata: Array, resource: Array, distribution: Array}}
*/
getAllContacts: function() {
this.allContacts = {metadata:[], resource:[]};
Expand All @@ -734,6 +734,9 @@
if (this.contactForResource && this.contactForResource.length > 0){
this.allContacts.resource = this.contactForResource;
}
if (this.contactForDistribution && this.contactForDistribution.length > 0){
this.allContacts.distribution = this.contactForDistribution;
}
return this.allContacts;
},
getOwnername: function() {
Expand Down

0 comments on commit dd0ff02

Please sign in to comment.