Class ListDataSource

All Implemented Interfaces:
Sharable, DataSource, DataSourceFactory, XmlPersistable

public class ListDataSource extends DataSourceImpl
This simply holds a list of DataChoices It is used, for example, to represent a collection of end-user defined formulas (i.e., DerivedDataChoice)
Version:
$Revision: 1.30 $
Author:
Metapps development team
  • Constructor Details

    • ListDataSource

      public ListDataSource()
      Default bean constructor; does nothing
    • ListDataSource

      public ListDataSource(String name, String description)
      Create a ListDataSource
      Parameters:
      name - name of this DataSource
      description - long name
  • Method Details

    • getDataInner

      protected Data getDataInner(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, Hashtable requestProperties) throws VisADException, RemoteException
      This should never get called. We need to overwrite this to return null.
      Overrides:
      getDataInner in class DataSourceImpl
      Parameters:
      dataChoice - The data choice that identifies the requested data.
      category - The data category of the request.
      dataSelection - Identifies any subsetting of the data.
      requestProperties - Hashtable that holds any detailed request properties.
      Returns:
      null
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • getDataChoices

      public List getDataChoices()
      Get the DataChoices.
      Specified by:
      getDataChoices in interface DataSource
      Overrides:
      getDataChoices in class DataSourceImpl
      Returns:
      List of DataChoices.
    • setDataChoices

      public void setDataChoices(List l)
      Set the list of DataChoices
      Parameters:
      l - list of DataChoices
    • addDataChoice

      public void addDataChoice(DataChoice choice)
      Add a DataChoice.
      Overrides:
      addDataChoice in class DataSourceImpl
      Parameters:
      choice - choice to add
    • removeDataChoice

      public void removeDataChoice(DataChoice choice)
      Remove a DataChoice from the list.
      Overrides:
      removeDataChoice in class DataSourceImpl
      Parameters:
      choice - Choice to remove
    • contains

      public boolean contains(DataChoice choice)
      See if this contains the choice in question.
      Parameters:
      choice - choice to look for
      Returns:
      true if choice is in here
    • get

      public DataChoice get(int i)
      Get the DataChoice at index i
      Parameters:
      i - index
      Returns:
      the choice at i
    • size

      public int size()
      Return the number of choices in this data source
      Returns:
      number of choices