I wrote a general-purpose file opener class that, for lack of a better
name, I called "FormRepository". It has an internal list of all the
current filetype Forms so that you can just call:
FormRepository repo = new FormRepository("FormRepo", "foo");
Data data = repo.open(filename);
and it'll read in "filename" using the appropriate Form and return the
Data object, or throw a VisADException
This is really handy for crosschecking that the FITS stuff works with
Data objects from the other file formats, and I'd bet people would like to
have something like this that we kept up to date with all the supported
filetype Forms so they didn't have to keep updating something like it.
Does this belong in the visad hierarchy? If so, where? And what should it
be called?
(If it does go into visad, it'd need an "add(Form form)" method so users can
easily augment this class with their own homebrew filetype Forms.)