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

Export data from SpreadSheet

Bill, et al.,

I'd like to add a menuitem in the file menu to export data to HDF5 file.
I find out that I have to add code in FancySSCell and BasicSSCell.
This is something I don't like to do. I really don't want to change any
visad code. If you can change the code a little bit, I don't need to
touch FancySSCell and BasicSSCell to implement the save function
for HDF5 file.

For example, you can change FancySSCell.saveDataDialog(boolean netcdf)
to FancySSCell.saveDataDialog(String adapter_name).  You then can test
the adapter name again your_adapter.getclass().getname. Or 
change FancySSCell.saveDataDialog(boolean netcdf)
to FancySSCell.saveDataDialog(Object adapter). Then test adapter with
if (adapter instanceof FitsForm)
   ....
else if if (adapter instanceof GIFForm)
   ....
else if if (adapter instanceof HdfeosAdaptedForm)
   ....
else if if (adapter instanceof HdfeosAdaptedForm)
   ....
else if if (adapter instanceof HDF5Form)
.....
in BasicSSCell.saveData(File f, Object adapter)

In the SpreadSheet, I can just call 
DisplayCells[CurX][CurY].saveDataDialog(new HDF5Form()) to 
save data into HDF5 file. I don't need to touch any other
visad files.





-----------------------------------------------------------
Thanks,

Peter Xiangchi Cao
Tel. (217) 244-3830
Fax. (217) 244-1987
Scientific Data Technologies Division
National Center for Supercomputing Applications

 
 
  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