1
|
for \$mdId in
|
2
|
distinct-values(
|
3
|
for \$x in collection('/db/DRIVER/MetaWorkflowDSResources/MetaWorkflowDSResourceType')[.//DATAPROVIDER/@id='$dsId$' and .//DATAPROVIDER/@interface='$apiId$']//WORKFLOW
|
4
|
let \$f := concat('/db/DRIVER/WorkflowDSResources/WorkflowDSResourceType/', substring-before(\$x/@id/string(), '_'))
|
5
|
return doc(\$f)[.//PARAM[@name="extraFieldForTotal" and text() = 'last_download_total']]//NODE[@type='DownloadFromMetadataOpenaire' or @type='UpdateObjectStoreSize']//PARAM[@category="OBJECTSTORE_ID"]/text()
|
6
|
)
|
7
|
let \$fmd := concat('/db/DRIVER/ObjectStoreDSResources/ObjectStoreDSResourceType/', substring-before(\$mdId, '_'))
|
8
|
return doc(\$fmd)
|
9
|
|