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

Re: Add new form in visad

"Peter X. Cao" wrote:
> Bill, et al.,
> 
> I need to add an HDF5 data adaptor into visad so the SpreadSheet can read
> the data.
> I don't where to add my HDF5Form (extends Form implements FormFileInformer).
> 
> I checked your code. FormFamily.addFormNode() seems the one to add new forms.
> I search all the code. I didn't see anywhere the function
> FormFamily.addFormNode()
> is used. How did you add your default forms, which are
> visad.data.fits.FitsForm
> visad.data.gif.GIFForm
> visad.data.hdfeos.HdfeosAdaptedForm
> visad.data.netcdf.Plain
> visad.data.visad.VisADForm
> visad.data.mcidas.AreaForm

visad.data.DefaultFamily has a buildList() method which creates the list
of Forms.  Add an import statement at the top of the file, some code like:

        try {
          list[i] = new HDF5Form();
          i++;
        } catch (Throwable t) {
        }

near the end of that method, recompile, and the Spreadsheet should magically
start reading HDF5 files.

DefaultFamily is sort of my responsibility (I wrote it and I don't think
anyone else would want to claim it :-), so feel free to ask me any
questions about it.


 
 
  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