Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Is this of any use?

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.)

 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690