Class ThreddsHandler

java.lang.Object
ucar.unidata.idv.chooser.XmlHandler
ucar.unidata.idv.chooser.ThreddsHandler

public class ThreddsHandler extends XmlHandler
This handles the Thredds catalog xml for the XmlChooser.
Version:
$Revision: 1.68 $Date: 2007/07/09 22:59:58 $
Author:
IDV development team
  • Field Details

    • NULL_STRING

      public static final String NULL_STRING
      More clear than then doing (String)null
  • Constructor Details

    • ThreddsHandler

      public ThreddsHandler(XmlChooser chooser, Element root, String path)
      Create the handler
      Parameters:
      chooser - The chooser we are in
      root - The root of the xml tree
      path - The url path of the xml document
  • Method Details

    • updateStatus

      protected void updateStatus()
      Update the status
      Overrides:
      updateStatus in class XmlHandler
    • getDocumentationLabel

      protected String getDocumentationLabel(Element node)
      For the given documentation node return the label that we use (eg:, Summary, rights, etc)
      Parameters:
      node - The documentation node
      Returns:
      The label to use
    • getDocumentationToolTip

      protected String getDocumentationToolTip(Element node)
      Get the tooltip text to use for the given documentation node.
      Parameters:
      node - The xml doc node
      Returns:
      The tooltip - show the documentation if it is a summary or rights. Else return null.
    • doMakeContents

      protected JComponent doMakeContents()
      Create the UI
      Specified by:
      doMakeContents in class XmlHandler
      Returns:
      The UI component
    • fetchImages

      public void fetchImages(String[] tuple)
      Fetch the image url and update the tree. The tuple contains a pair [id, imageUrl] where id is either icon or thumbnail
      Parameters:
      tuple - id and url
    • doLoad

      public void doLoad()
      The user has pressed the 'Load' button. Check if a node is selected
      Specified by:
      doLoad in class XmlHandler
    • processNode

      public void processNode(Element node)
      Process the given node
      Parameters:
      node - node
    • getPropertyAttributeFromChild

      public String getPropertyAttributeFromChild(Element parent, String nameValueLookingFor, String dflt)
      Look for the named attribute contained by a child of the given element with the given tag name.
      Parameters:
      parent - The xml node to look within.
      nameValueLookingFor - The value we are looking for
      dflt - The default value returned.
      Returns:
      The value of the given attribute or dflt if not found.
    • main

      public static void main(String[] args) throws Exception
      Test the html generation
      Parameters:
      args - Command line args
      Throws:
      Exception - problem occurred