Class SavedBundle

java.lang.Object
ucar.unidata.idv.SavedBundle

public class SavedBundle extends Object
An object to handle a saved bundle.
Version:
$Revision
Author:
IDV development team
  • Field Details

  • Constructor Details

    • SavedBundle

      public SavedBundle(Element node, String dirRoot, IdvResourceManager resourceManager, boolean local)
      Create the saved bundle object
      Parameters:
      node - The xml node that defines this object
      dirRoot - The directory root
      resourceManager - Reference to the resource manager so we add the sitepath, etc., macros into the url
      local - Is it a local file
    • SavedBundle

      public SavedBundle(String url, String name, List categories)
      Create the saved bundle object
      Parameters:
      url - The url
      name - The name
      categories - List of (String) categories.
    • SavedBundle

      public SavedBundle(String url, String name, List categories, boolean local)
      ctor
      Parameters:
      url - the url path
      name - name
      categories - categories
      local - is it a local file
    • SavedBundle

      public SavedBundle(String url, String name, List categories, Object prototype, boolean local)
      Create the saved bundle object
      Parameters:
      url - The url
      name - The name
      categories - List of (String) categories.
      prototype - The object this bundle represents - may be null.
      local - is it a local file
    • SavedBundle

      public SavedBundle(String url, String name, List categories, Object prototype, boolean local, int type)
      _more_
      Parameters:
      url - _more_
      name - _more_
      categories - _more_
      prototype - _more_
      local - _more_
      type - _more_
  • Method Details

    • toXml

      public void toXml(Document doc, Element root)
      Write out the xml that defines this SavedBundle. Note: this writes out the url as just the file name, not the full path
      Parameters:
      doc - The document to create the xml with
      root - The xml root
    • toXml

      public void toXml(Document doc, Element root, boolean includeCategoryInUrl)
      Write out the xml that defines this SavedBundle. Note: this writes out the url as just the file name, not the full path
      Parameters:
      doc - The document to create the xml with
      root - The xml root
      includeCategoryInUrl - Should the category be included in the url
    • setUniquePrefix

      protected void setUniquePrefix(String p)
      set the unique prefix
      Parameters:
      p - prefix
    • getCategorizedName

      public String getCategorizedName()
      Get the name to use with the categories as a prefix
      Returns:
      categorized name
    • processBundleXml

      public static List<SavedBundle> processBundleXml(Element root, String dirRoot, IdvResourceManager resourceManager, boolean local)
      Utility that created a list of SavedBundle objects from the document at the given xml path
      Parameters:
      root - Root of the bundles xml doc.
      dirRoot - The directory root
      resourceManager - The resource manager
      local - is it a local file
      Returns:
      List of SavedBundle objects
    • setUrl

      public void setUrl(String value)
      Set the Url property.
      Parameters:
      value - The new value for Url
    • getUrl

      public String getUrl()
      Get the Url property.
      Returns:
      The Url
    • 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
    • setCategories

      public void setCategories(List value)
      Set the Category property.
      Parameters:
      value - The new value for Category
    • getCategories

      public List getCategories()
      Get the Category property.
      Returns:
      The Category
    • getPrototype

      public Object getPrototype()
      Get the prototype - may be null.
      Returns:
      The prototype
    • getLabel

      public String getLabel()
      Full label
      Returns:
      The name.
    • toString

      public String toString()
      Override toString.
      Overrides:
      toString in class Object
      Returns:
      The name.
    • setType

      public void setType(int value)
      Set the Type property.
      Parameters:
      value - The new value for Type
    • getType

      public int getType()
      Get the Type property.
      Returns:
      The Type
    • setLocal

      public void setLocal(boolean value)
      Set the Local property.
      Parameters:
      value - The new value for Local
    • getLocal

      public boolean getLocal()
      Get the Local property.
      Returns:
      The Local