Skip to content

Commit

Permalink
ERM-2094: Populate GOKb UUID and ID as package identifier (#561)
Browse files Browse the repository at this point in the history
* ERM-2094

* ERM-2094
  • Loading branch information
peterboehm authored Jun 27, 2022
1 parent f0e4313 commit 8183a64
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions service/src/main/groovy/org/olf/kb/adapters/GOKbOAIAdapter.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,22 @@ public class GOKbOAIAdapter extends WebSourceAdapter implements KBCacheUpdater,
value: it.@value?.text()
]
}

identifiers.addAll(
package_record.find{
it.@id?.text() != null || it.@id?.text()?.trim() != ''
}?.collect {
[ namespace: 'gokb_id', value: it.@id?.text() ]
}
)

identifiers.addAll(
package_record.find{
it.@uuid?.text() != null || it.@uuid?.text()?.trim() != ''
}?.collect{
[ namespace: 'gokb_uuid', value: it.@uuid?.text() ]
}
)

result = [
header:[
Expand Down

0 comments on commit 8183a64

Please sign in to comment.