103 if (hdf_status ==
FAIL)
111 hdf_status =
SDend(sd_id);
112 if (hdf_status ==
FAIL)
137 char *coremeta = NULL;
140 char *temp_file_name;
145 GROUP grpNode = NULL;
148 VALUE valueNode = NULL;
149 char **strPtr1 = NULL;
151 double *dblPtr = NULL;
154 if (param == NULL || metadata == NULL)
167 printf(
"Unable to create odl aggregate locAggr\n");
179 temp_file_name = _tempnam(NULL, NULL);
180 temp = fopen(temp_file_name,
"w+");
188 fprintf(temp,
"%s",coremeta);
197 printf(
"Unable to convert to an odl structure\n");
205 grpNode =
FindGroup(aggNode,
"INVENTORYMETADATA");
211 objNode =
FindObject(grpNode, (
char *)param, NULL);
218 if (parmNode == NULL)
230 if (md.
data.
s == NULL)
236 while (valueNode != NULL)
238 *strPtr1 = (
char*)malloc((strlen(valueNode->
item.
value.
string) + 1) *
sizeof(char));
239 if (*strPtr1 == NULL)
251 if (md.
data.
i == NULL)
257 while (valueNode != NULL)
268 if (md.
data.
d == NULL)
274 while (valueNode != NULL)
299 if (coremeta != NULL)
314 char *coremeta = NULL;
317 char *temp_file_name;
322 GROUP grpNode = NULL;
325 VALUE valueNode = NULL;
326 char **strPtr1 = NULL;
328 double *dblPtr = NULL;
331 if (param == NULL || metadata == NULL)
344 printf(
"Unable to create odl aggregate locAggr\n");
356 temp_file_name = _tempnam(NULL, NULL);
357 temp = fopen(temp_file_name,
"w+");
365 fprintf(temp,
"%s",coremeta);
374 printf(
"Unable to convert to an odl structure\n");
382 grpNode =
FindGroup(aggNode,
"INVENTORYMETADATA");
388 objNode =
FindObject(grpNode, (
char *)param, NULL);
395 if (parmNode == NULL)
407 if (md.
data.
s == NULL)
413 while (valueNode != NULL)
415 *strPtr1 = (
char*)malloc((strlen(valueNode->
item.
value.
string) + 1) *
sizeof(char));
416 if (*strPtr1 == NULL)
428 if (md.
data.
i == NULL)
434 while (valueNode != NULL)
445 if (md.
data.
d == NULL)
451 while (valueNode != NULL)
476 if (coremeta != NULL)
AGGREGATE RemoveAggregate(AGGREGATE base_node)
MTKt_status MtkCoreMetaDataFree(MtkCoreMetaData *metadata)
Free core metadata.
struct ODLInteger integer
#define MTK_ERR_CODE_JUMP(code)
GROUP FindGroup(AGGREGATE base_node, char *name)
OBJECT FindObject(AGGREGATE base_node, char *name, char *thisClass)
HDFLIBAPI int32 SDstart(const char *name, int32 accs)
#define MTK_CORE_METADATA_INIT
HDFLIBAPI intn SDend(int32 fid)
MTKt_status MtkFileCoreMetaDataRawFid(int32 sds_id, char **coremeta)
Version of MtkFileCoreMetaDataRaw that takes an HDF SD file identifier rather than a filename...
PARAMETER FindParameter()
struct Parameter_Node * parameter
MTKt_status MtkFileCoreMetaDataRawNcid(int ncid, char **coremeta)
#define MTK_ERR_COND_JUMP(code)
EXTERNL int nc_close(int ncid)
AGGREGATE NewAggregate(AGGREGATE base_node, AGGREGATE_KIND kind, char *name, char *classType)
union Value_Data::@2 value
EXTERNL int nc_open(const char *path, int mode, int *ncidp)