Class History

java.lang.Object
ucar.unidata.idv.History
Direct Known Subclasses:
DataSourceHistory, FileHistory

public abstract class History extends Object
This class is used to keep track of the files and the data sources that a user has loaded. It is abstract, with derived classes FileHistory and DataSourceHistory These history classes are used to show a history list in the File menu so, once the user has loaded some file, they can easily reload the file.
Author:
IDV development team
  • Constructor Details

    • History

      public History()
      Parameterless ctor for xml encoding/decoding
    • History

      public History(String name)
      Create this History object
      Parameters:
      name - The name
  • Method Details

    • hasAlias

      public boolean hasAlias()
      Does this object have an alias.
      Returns:
      Has a non-null, non-zero length alias.
    • process

      public abstract boolean process(IntegratedDataViewer idv)
      Create the data source (or load the file) represented by this object. This is actually implemented in the derived classes.
      Parameters:
      idv - The idv
      Returns:
      true if this was successful.
    • setName

      public void setName(String value)
      Set the Name property.
      Parameters:
      value - The new value for Name
    • getName

      public String getName()
      Get the Name property.
      Returns:
      The Name
    • setAlias

      public void setAlias(String value)
      Set the Alias property.
      Parameters:
      value - The new value for Alias
    • getAlias

      public String getAlias()
      Get the Alias property.
      Returns:
      The Alias
    • toString

      public String toString()
      Override the toString method
      Overrides:
      toString in class Object
      Returns:
      String representation of this object
    • hashCode

      public int hashCode()
      Override the hashcode method. Use the name member
      Overrides:
      hashCode in class Object
      Returns:
      The hashcode
    • equals

      public boolean equals(Object o)
      Override the equals method
      Overrides:
      equals in class Object
      Parameters:
      o - The other object
      Returns:
      Is equals
    • findWithAlias

      public static History findWithAlias(String alias, List historyList, Class theClass)
      Search the given list for a PC object that has the given alias.
      Parameters:
      alias - The alias to serach for.
      historyList - The list of History objects
      theClass - If non-null then only find History objects of the given theClass
      Returns:
      The PC object in the list with the given alias or null if none found.