Performs queries over metadata or Matlab structures marked for deletion in the archive.
qresults = gd_querydeleted(query)
qresults = gd_querydeleted(query,datasource)
qresults = gd_querydeleted(query,datasource,resultfields)
qresults = gd_query(query,datasource,resultfields) has exactly the same functionality as gd_query but performs the queries over data that has been marked for deletion using the gd_markfordeletion function. gd_querydeleted returns a cell array of metadata structures, one for each matching result. The standard.ID field in each result can be passed to the gd_unmarkfordeletion function, which can recover data that was mistakenly marked for deletion. This function will only return results for data that has not already been permanently deleted from the archive by an administrator.
A brief description of the input arguments is given here, see gd_query for further information. To view the query results, use function gd_display.
query A query takes the form 'field = value' where field is the name of a field in the archived metadata/variable structure, for example iterations or standard.ID (dot notation is used to access the subfields of a structure). The value is an alphanumeric value the field should contain. The operator & (meaning ‘and’) can be used to specify more than one search condition.
datasource The data source indicates which type of data to query, and can be specified by one of the following strings (the default datasource value is 'file'):
‘file’ |
Metadata about files. |
‘datagroup’ |
Metadata about datagroups. |
‘monitor’ |
Metadata about monitorable datagroups. |
‘varmeta’ |
Metadata about Matlab variables. |
‘var’ |
Matlab variables. |
resultfields The resultfields string is a comma separated list indicating which fields should be returned for each result, for example just the standard.ID fields. The default, *, returns all fields.
Query variable metadata that has been marked for deletion, and then unmark the corresponding variables so that they are no longer eligible for deletion from the archive.
q = 'standard.archiveDate > 2004-12-01 & a.b < -500';
qresults = gd_querydeleted(q, 'varmeta');
for i=1:size(qresults,2)
IDs{i} = qresults{i}.standard.ID;
end
unmarktotal = gd_unmarkfordeletion(IDs)
unmarktotal =
5
When querying standard date information (archiveDate or createDate), specify the date/time using the International Standard Date and Time Notation (ISO 8601) which is: "YYYY-MM-DD hh:mm:ss" (hh:mm:ss is optional).
Only results for data marked for deletion and owned by the user (i.e. data the user archived/created) will be returned.
If the marked data has been permanently deleted from the archive by an administrator it cannot be queried.
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_unmarkfordeletion, gd_markfordeletion, gd_display, gd_query, gd_createproxy
Copyright © 2005, The Geodise Project, University of Southampton