setPublicAccess | R Documentation |
To be called prior to creating the object in DataONE. When called before creating the object, adds a rule to the access policy that makes this object publicly readable. If called after creation, it will only change the system metadata locally, and will not have any effect on remotely uploaded copies of the DataObject.
setPublicAccess(x, ...) ## S4 method for signature 'DataObject' setPublicAccess(x) ## S4 method for signature 'DataPackage' setPublicAccess(x, identifiers = list())
x |
DataObject |
... |
(not yet used) |
identifiers |
A list of |
A DataObject with modified access rules.
A DataPackage with modified access rules.
DataObject-class
DataObject-class
DataPackage-class
data <- charToRaw("1,2,3\n4,5,6\n") do <- new("DataObject", "id1", dataobj=data, "text/csv", "uid=jones,DC=example,DC=com", "urn:node:KNB") do <- setPublicAccess(do) # First create a sample package with two DataObjects dp <- new("DataPackage") data <- charToRaw("1,2,3\n4,5,6\n") obj <- new("DataObject", id="id1", dataobj=data, format="text/csv") dp <- addMember(dp, obj) data2 <- charToRaw("7,8,9\n4,10,11\n") obj2 <- new("DataObject", id="id2", dataobj=data2, format="text/csv") dp <- addMember(dp, obj2) # Now add public read to all package members ("id1", "id2") dp <- setPublicAccess(dp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.