Previous: Using VisAD Data in the IDV Next:  Display Controls Table of contents Frames User guide
Unidata IDV Workshop for version 6.2u2 > Java Developer Topics > Data Sources

5.5.2 Creating a Weather Text Data Source
Let's create a custom Data Source for our weather text.
  1. Change to the example directory.
    cd /home/idv/idv/ucar/unidata/apps/example
  2. Open WxTextDataSource.java in an editor and let's look what's there.
  3. Copy datasource.xml up from the resources subdirectory and take a look at that.
  4. Now, edit WxTextChooser and change:
            makeDataSource(urls, "FILE.ADDETEXT", ht);
    
    to:
            makeDataSource(urls, "ADDE.WXTEXT", ht);
    
    to make the appropriate data source.
  5. Compile the chooser and data source.
  6. Start the IDV.
  7. Select a product from the Weather Text chooser and click the Add Source button.
  8. Notice in the Field Selector, that our data choices defined in the data source are listed in the Fields panel.
  9. Expand the first category and click on Weather Text Bulletin. Notice which displays are availble for this parameter.
  10. Display the data in the Text/Html Display.

Now let's remove the extraneous data choices and try this again.

  1. Exit the IDV.
  2. Open WxTextDataSource.java in an editor.
  3. Remove the section in doMakeDataChoices() which adds the extra data choices.
  4. Start the IDV and load in some weather text.
  5. Notice the change in the Fields panel.
  6. Save this as your default bundle and then reload it.

 


Previous: Using VisAD Data in the IDV Next:  Display Controls Table of contents Frames User guide
Unidata IDV Workshop for version 6.2u2 > Java Developer Topics > Data Sources