Class TextProductDataSource

All Implemented Interfaces:
Sharable, DataSource, DataSourceFactory, XmlPersistable
Direct Known Subclasses:
NwxTextProductDataSource

public abstract class TextProductDataSource extends FilesDataSource
A class for handling text products (e.g. weather bulletins)
Version:
$Revision: 1.15 $
Author:
IDV development team
  • Constructor Details

    • TextProductDataSource

      public TextProductDataSource()
      Default bean constructor; does nothing.
    • TextProductDataSource

      public TextProductDataSource(DataSourceDescriptor descriptor, String name, String description, Hashtable properties)
      Ctor
      Parameters:
      descriptor - The descriptor
      name - The name
      description - The long name
      properties - properties
    • TextProductDataSource

      public TextProductDataSource(DataSourceDescriptor descriptor, List newSources, String description, Hashtable properties)
      Ctor
      Parameters:
      descriptor - The descriptor
      newSources - List of files or urls
      description - The long name
      properties - properties
    • TextProductDataSource

      public TextProductDataSource(DataSourceDescriptor descriptor, List newSources, String name, String description, Hashtable properties)
      Create a TrackDataSource from the specification given.
      Parameters:
      descriptor - data source descriptor
      newSources - List of sources of data (filename/URL)
      name - my name
      description - description of the data
      properties - extra properties for initialization
  • Method Details

    • readProducts

      public abstract List<Product> readProducts(ProductType productType, List<NamedStationImpl> stations, DateSelection dateSelection)
      Read the products for the product type and station
      Parameters:
      productType - the product type
      stations - the stations
      dateSelection - the date selection
      Returns:
      the list of products
    • getStations

      public abstract NamedStationTable getStations(ProductType productType, DateSelection dateSelection) throws Exception
      Get the stations for a productType
      Parameters:
      productType - the product type
      dateSelection - the date selection
      Returns:
      the list of stations
      Throws:
      Exception - problem getting the stations
    • makeStationMap

      protected static Hashtable<String,Integer> makeStationMap(List<NamedStationImpl> stations)
      Make a mapping of station name to integer count
      Parameters:
      stations - list of stations
      Returns:
      mapping of station name to integer count
    • getProductGroups

      public abstract List<ProductGroup> getProductGroups()
      Get the list of product groups
      Returns:
      the list of product groups
    • doMakeDataChoices

      protected void doMakeDataChoices()
      Make the data choices
      Overrides:
      doMakeDataChoices in class DataSourceImpl