Skip to content

Commit cccc124

Browse files
committed
begin work on restucturing XDI validation
1 parent a901ed9 commit cccc124

File tree

3 files changed

+287
-92
lines changed

3 files changed

+287
-92
lines changed

c/xdi_reader.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,18 @@ int main(int argc, char **argv) {
5858
xdifile->meta_families[i],
5959
xdifile->meta_keywords[i],
6060
xdifile->meta_values[i]);
61+
62+
j = XDI_validate_item(xdifile, xdifile->meta_families[i], xdifile->meta_keywords[i], xdifile->meta_values[i]);
63+
if (j!=0) {
64+
printf("-- Warning for %s.%s: %s\t(error code = %ld)\n\t%s\n",
65+
xdifile->meta_families[i], xdifile->meta_keywords[i], xdifile->meta_values[i], j, xdifile->error_message);
66+
}
6167
}
6268

69+
j = XDI_required_metadata(xdifile);
70+
printf("-- required metadata check -- (requirement code %ld):\n%s\n", j, xdifile->error_message);
71+
72+
6373
nout = min(4, xdifile->npts - 2);
6474
printf("# Arrays Index, Name, Values: (%ld points total): \n", xdifile->npts);
6575
tdat = (double *)calloc(xdifile->npts, sizeof(double));

0 commit comments

Comments
 (0)