Class DescriptorDataSource

All Implemented Interfaces:
Sharable, DataSource, DataSourceFactory, XmlPersistable

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

    • DescriptorDataSource

      public DescriptorDataSource()
      Default constructor.
    • DescriptorDataSource

      public DescriptorDataSource(String name, String description)
      Construct a DatasourceDescriptor with the given name and description.
      Parameters:
      name - name of this
      description - description of what this is.
    • DescriptorDataSource

      public DescriptorDataSource(String name, String description, List descriptors)
      Construct a DatasourceDescriptor with the given name and description and populate it with the initial list of descriptors.
      Parameters:
      name - name of this
      description - description of what this is.
      descriptors - initial list of DerivedDataDescriptors.
  • Method Details

    • addDescriptor

      public void addDescriptor(DerivedDataDescriptor descriptor)
      Add a new descriptor to the list.
      Parameters:
      descriptor - object to add to the list
    • removeDescriptor

      public void removeDescriptor(DerivedDataDescriptor descriptor)
      Remove a new descriptor to the list.
      Parameters:
      descriptor - object to remove from the list
    • getDescriptors

      public List getDescriptors()
      Get the descriptors held by this object.
      Returns:
      the list of descriptors
    • setDescriptors

      public void setDescriptors(List d)
      Set the list of descriptors that this object holds.
      Parameters:
      d - list of descriptors. No check is made on whether this is a list of descriptors or not.
    • getDataInner

      protected Data getDataInner(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, Hashtable requestProperties) throws VisADException, RemoteException
      Override the superclass method to return null, since this does not have any data.
      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 list of DataChoice-s held by the descriptors of this object.
      Specified by:
      getDataChoices in interface DataSource
      Overrides:
      getDataChoices in class DataSourceImpl
      Returns:
      list of DataChoice-s
    • contains

      public boolean contains(DerivedDataDescriptor descriptor)
      See if the descriptor is already in the list.
      Parameters:
      descriptor - descriptor in question.
      Returns:
      true if it exists in the list.