-
Notifications
You must be signed in to change notification settings - Fork 19
ensure you can create a package from standalone data objects #297
Copy link
Copy link
Open
Labels
Description
@taojing2002 pointed me to this issue
You cannot create a data package (resource map) using the package from standalone objects.
metadataId <- "urn:uuid:3bc5168b-bd5d-455a-a65c-621756582fb1" # already on node
dataId1 <- "urn:uuid:949be248-5e03-4a8a-a780-e5cb4e61d39c" # already on node
mn <- MNode("https://valley.duckdns.org/metacat/d1/mn/v2")
cn <- CNode("PROD")
d1c <- D1Client(cn, mn)
# Create a new package, and download each member (lazyLoaded) that was just uploaded, then add them
# to the package and upload.
pkg <- new("DataPackage")
# Create metadata object that describes science data
metadataObj <- getDataObject(d1c, metadataId, lazyLoad=T, quiet=F)
pkg <- addMember(pkg, metadataObj)
dataObj1 <- getDataObject(d1c, dataId1, lazyLoad=T, quiet=F)
pkg <- addMember(pkg, dataObj1, metadataObj)
resourceMapId <- uploadDataPackage(d1c, pkg, public=TRUE, quiet=FALSE)
print(resourceMapId)
the return message is:
Lazy Loaded object at URL https://valley.duckdns.org/metacat/d1/mn/v2/object/urn%3Auuid%3A1b78673a-34bf-4a91-b5e2-e13af946cff9
Lazy Loaded object at URL https://valley.duckdns.org/metacat/d1/mn/v2/object/urn%3Auuid%3Ab51580b6-0540-470e-8c14-68355afac406
Uploading a new package to member node https://valley.duckdns.org/metacat/d1/mn/v2
No DataObjects uploaded from the DataPackage, so a resource map will not be created and uploaded.
[1] NA
This stems from the logic here:
Line 1143 in 75b3711
| if(!quiet) cat(sprintf("No DataObjects uploaded from the DataPackage, so a resource map will not be created and uploaded.\n")) |
Reactions are currently unavailable