Package ucar.unidata.idv.chooser
Class ThreddsHandler
java.lang.Object
ucar.unidata.idv.chooser.XmlHandler
ucar.unidata.idv.chooser.ThreddsHandler
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 Summary
FieldsFields inherited from class ucar.unidata.idv.chooser.XmlHandler
chooser, path, root, tree -
Constructor Summary
ConstructorsConstructorDescriptionThreddsHandler(XmlChooser chooser, Element root, String path) Create the handler -
Method Summary
Modifier and TypeMethodDescriptionvoiddoLoad()The user has pressed the 'Load' button.protected JComponentCreate the UIvoidfetchImages(String[] tuple) Fetch the image url and update the tree.protected StringgetDocumentationLabel(Element node) For the given documentation node return the label that we use (eg:, Summary, rights, etc)protected StringGet the tooltip text to use for the given documentation node.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.static voidTest the html generationvoidprocessNode(Element node) Process the given nodeprotected voidUpdate the statusMethods inherited from class ucar.unidata.idv.chooser.XmlHandler
getContents, getPath
-
Field Details
-
NULL_STRING
More clear than then doing (String)null
-
-
Constructor Details
-
ThreddsHandler
Create the handler- Parameters:
chooser- The chooser we are inroot- The root of the xml treepath- The url path of the xml document
-
-
Method Details
-
updateStatus
protected void updateStatus()Update the status- Overrides:
updateStatusin classXmlHandler
-
getDocumentationLabel
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
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
Create the UI- Specified by:
doMakeContentsin classXmlHandler- Returns:
- The UI component
-
fetchImages
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:
doLoadin classXmlHandler
-
processNode
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 fordflt- The default value returned.- Returns:
- The value of the given attribute or dflt if not found.
-
main
Test the html generation- Parameters:
args- Command line args- Throws:
Exception- problem occurred
-