Class CompositeDataChoice


public class CompositeDataChoice extends DirectDataChoice
A class for compositing data choices. This is useful for having a DataChoice with associated categories and child choices for the individual components.
Version:
$Revision: 1.36 $
Author:
IDV Development Team
  • Constructor Details

    • CompositeDataChoice

      public CompositeDataChoice()
      Create a CompositeDataChoices with no associated child choices
    • CompositeDataChoice

      public CompositeDataChoice(CompositeDataChoice other)
      Create a CompositeDataChoices from another composite. Clones the set of DataChoices from other.
      Parameters:
      other - other composite
    • CompositeDataChoice

      public CompositeDataChoice(DataSource dataSource, Object id, String description, List categories)
      Create a composite data choice for the associated DataSource given the other parameters.
      Parameters:
      dataSource - source of the data
      id - id of this choice
      description - description for this choice
      categories - choice categories
    • CompositeDataChoice

      public CompositeDataChoice(DataSource dataSource, Object id, String name, String description, List categories)
      Create a composite data choice for the associated DataSource given the other parameters.
      Parameters:
      dataSource - source of the data
      id - id of this choice
      name - name of this choice
      description - description for this choice
      categories - choice categories
    • CompositeDataChoice

      public CompositeDataChoice(DataSource dataSource, Object id, String name, String description, List categories, Hashtable properties)
      Create a composite data choice for the associated DataSource given the other parameters.
      Parameters:
      dataSource - source of the data
      id - id of this choice
      name - name of this choice
      description - description for this choice
      categories - choice categories
      properties - miscellaneous properties for this choice
  • Method Details

    • expandIfNeeded

      public void expandIfNeeded()
      Gets called by the GUI to incrementally add children if needed
    • cloneMe

      public DataChoice cloneMe()
      Method for cloning this choice.
      Overrides:
      cloneMe in class DirectDataChoice
      Returns:
      new DataChoice with same properties as this.
    • initAfterUnPersistence

      public void initAfterUnPersistence(Hashtable properties)
      This gets called after the data choice has been unpersisted
      Overrides:
      initAfterUnPersistence in class DirectDataChoice
      Parameters:
      properties - Properties
    • getFinalDataChoices

      public void getFinalDataChoices(List finalDataChoices)
      Add to the given list all final data choices (i.e., the leafs of the datachoice tree)
      Overrides:
      getFinalDataChoices in class DirectDataChoice
      Parameters:
      finalDataChoices - The list to add to
    • getNumChildren

      public int getNumChildren()
      Get the number of child DataChoices
      Returns:
      number of child choices
    • getAllLevels

      public List getAllLevels(DataSelection dataSelection)
      Get all the levels associated with this choice
      Overrides:
      getAllLevels in class DirectDataChoice
      Parameters:
      dataSelection - data selection
      Returns:
      List of levels
    • getAllDateTimes

      public List getAllDateTimes()
      Override the superclass method for this.
      Overrides:
      getAllDateTimes in class DirectDataChoice
      Returns:
      a unique composite of the times for all child choices.
    • getSelectedDateTimes

      public List getSelectedDateTimes()
      Override the superclass method for this.
      Overrides:
      getSelectedDateTimes in class DirectDataChoice
      Returns:
      a unique set of the selected times of all child choices
    • addDataChoice

      public void addDataChoice(DataChoice c)
      Add a DataChoice to the composite
      Parameters:
      c - choice to add
    • replaceDataChoice

      public void replaceDataChoice(DataChoice oldDataChoice, DataChoice newDataChoice)
      Replace the given child with the given chold
      Parameters:
      oldDataChoice - old one
      newDataChoice - new one
    • replaceDataChoices

      public void replaceDataChoices(List newChoices)
      Remove the current children and add the new ones
      Parameters:
      newChoices - New children data choices
    • removeAllDataChoices

      public void removeAllDataChoices()
      Remove the current children
    • removeDataChoice

      public void removeDataChoice(DataChoice c)
      Remove a DataChoice from the composite
      Parameters:
      c - choice to remove
    • getDataChoices

      public List getDataChoices()
      Get the list of child data choices.
      Returns:
      list of children
    • setDataChoices

      public void setDataChoices(List l)
      Set the list of child data choices for this composite
      Parameters:
      l - list of choices
    • setUseDataSourceToFindTimes

      public void setUseDataSourceToFindTimes(boolean value)
      Set the UseDataSourceToFindTimes property.
      Parameters:
      value - The new value for UseDataSourceToFindTimes
    • getUseDataSourceToFindTimes

      public boolean getUseDataSourceToFindTimes()
      Get the UseDataSourceToFindTimes property.
      Returns:
      The UseDataSourceToFindTimes