File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
schemas-parse/src/main/groovy/org/cedar/schemas/parse Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -425,11 +425,19 @@ class ISOParser {
425425 }
426426
427427 static List<Link > parseLinks (GPathResult metadata ) {
428- def linkNodes = metadata.distributionInfo.MD_Distribution . ' **' . findAll {
428+ def allLinkNodes = metadata.distributionInfo.MD_Distribution . ' **' . findAll {
429429 it. name() == ' CI_OnlineResource'
430430 }
431- def uniqueLinks = linkNodes. collect(ISOParser . &parseLink). findAll() as Set
432- return uniqueLinks. toList()
431+ def allUniqueLinks = allLinkNodes. collect(ISOParser . &parseLink). findAll() as Set
432+
433+ // Find all contact links and remove them
434+ def allContactLinkNodes = metadata.distributionInfo.MD_Distribution.distributor.MD_Distributor . distributorContact. ' **' . findAll {
435+ it. name() == ' CI_OnlineResource'
436+ }
437+ def allUniqueContactLinks = allContactLinkNodes. collect(ISOParser . &parseLink). findAll() as Set
438+
439+ allUniqueLinks. removeAll(allUniqueContactLinks)
440+ return allUniqueLinks. toList()
433441 }
434442
435443 static Link parseLink (GPathResult node ) {
You can’t perform that action at this time.
0 commit comments