Adds an archived file, variable or subdatagroup to a datagroup.
success = gd_datagroupadd(datagroupID,ID)
success = gd_datagroupadd(datagroupID,subdatagroupID)
success = gd_datagroupadd(datagroupID,ID) adds a file or variable to a datagroup. The datagroup is specified by its unique identifier datagroupID and the identifier of the file or variable to add is specified with ID. The datagroup must have been created with gd_datagroup and the file or variable must have been archived using gd_archive. The function returns 1 if successful, or 0 if failed (for example if the datagroup does not exist).
success = gd_datagroupadd(datagroupID,subdatagroupID) adds a datagroup (subdatagroupID) to another datagroup (datagroupID). The datagroup to be added is known as a subdatagroup. Both datagroups must have been created with gd_datagroup.
Add a file and a variable to a datagroup after they have been archived.
datagroupID = gd_datagroup('design opt 2004-09-03');
fileID = gd_archive('C:\file.dat');
gd_datagroupadd(datagroupID,fileID);
v.width = 12;
varID = gd_archive(v);
gd_datagroupadd(datagroupID,varID);
Add a datagroup to another datagroup
datagroupID = gd_datagroup('parent datagroup');
subdatagroupID = gd_datagroup('child datagroup');
gd_datagroupadd(datagroupID,subdatagroupID);
Only the owner of a datagroup can add data to it.
Attempting to add a file, variable or subdatagroup twice to the same datagroup will cause an error.
Attempting to add a datagroup to another datagroup that it is already the parent or ancestor of will cause an error. E.g. If datagroup b is added to datagroup a, and datagroup c is added to b, then a cannot be added to b or c.
A valid proxy certificate is required (see gd_createproxy from the Geodise Compute Toolbox).
Your certificate subject must have been added to the authorisation database.
gd_datagroup, gd_archive, gd_retrieve, gd_archivefiles, gd_retrievefiles, gd_query, gd_createproxy
Copyright © 2007, The Geodise Project, University of Southampton