Package ucar.unidata.idv
Class SavedBundle
java.lang.Object
ucar.unidata.idv.SavedBundle
An object to handle a saved bundle.
- Version:
- $Revision
- Author:
- IDV development team
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringXml attribute name for the categorystatic final StringXml attribute name for the namestatic final Stringxml attrstatic final StringXml attribute name for the urlstatic final StringXml tag name for the bundle elementstatic final StringXml tag name for the bundles elementstatic final intThe type to specify the datastatic final intThe type to specify the display templatesstatic final intThe type to specify the "Favorites" bundlesstatic final Stringtype of saved bundlestatic final Stringtype of saved bundlestatic final Stringtype of saved bundle -
Constructor Summary
ConstructorsConstructorDescriptionSavedBundle(String url, String name, List categories) Create the saved bundle objectSavedBundle(String url, String name, List categories, boolean local) ctorSavedBundle(String url, String name, List categories, Object prototype, boolean local) Create the saved bundle objectSavedBundle(String url, String name, List categories, Object prototype, boolean local, int type) _more_SavedBundle(Element node, String dirRoot, IdvResourceManager resourceManager, boolean local) Create the saved bundle object -
Method Summary
Modifier and TypeMethodDescriptionGet the Category property.Get the name to use with the categories as a prefixgetLabel()Full labelbooleangetLocal()Get the Local property.getName()Get the Name property.Get the prototype - may be null.intgetType()Get the Type property.getUrl()Get the Url property.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 pathvoidsetCategories(List value) Set the Category property.voidsetLocal(boolean value) Set the Local property.voidSet the Name property.voidsetType(int value) Set the Type property.protected voidset the unique prefixvoidSet the Url property.toString()Override toString.voidWrite out the xml that defines this SavedBundle.voidWrite out the xml that defines this SavedBundle.
-
Field Details
-
TYPE_FAVORITE
public static final int TYPE_FAVORITEThe type to specify the "Favorites" bundles- See Also:
-
TYPE_DISPLAY
public static final int TYPE_DISPLAYThe type to specify the display templates- See Also:
-
TYPE_DATA
public static final int TYPE_DATAThe type to specify the data- See Also:
-
VALUE_FAVORITE
type of saved bundle- See Also:
-
VALUE_DATA
type of saved bundle- See Also:
-
VALUE_DISPLAY
type of saved bundle- See Also:
-
TAG_BUNDLES
Xml tag name for the bundles element- See Also:
-
TAG_BUNDLE
Xml tag name for the bundle element- See Also:
-
ATTR_URL
Xml attribute name for the url- See Also:
-
ATTR_NAME
Xml attribute name for the name- See Also:
-
ATTR_CATEGORY
Xml attribute name for the category- See Also:
-
ATTR_TYPE
xml attr- See Also:
-
-
Constructor Details
-
SavedBundle
Create the saved bundle object- Parameters:
node- The xml node that defines this objectdirRoot- The directory rootresourceManager- Reference to the resource manager so we add the sitepath, etc., macros into the urllocal- Is it a local file
-
SavedBundle
Create the saved bundle object- Parameters:
url- The urlname- The namecategories- List of (String) categories.
-
SavedBundle
ctor- Parameters:
url- the url pathname- namecategories- categorieslocal- is it a local file
-
SavedBundle
Create the saved bundle object- Parameters:
url- The urlname- The namecategories- 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
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 withroot- The xml root
-
toXml
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 withroot- The xml rootincludeCategoryInUrl- Should the category be included in the url
-
setUniquePrefix
set the unique prefix- Parameters:
p- prefix
-
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 rootresourceManager- The resource managerlocal- is it a local file- Returns:
- List of SavedBundle objects
-
setUrl
Set the Url property.- Parameters:
value- The new value for Url
-
getUrl
Get the Url property.- Returns:
- The Url
-
setName
Set the Name property.- Parameters:
value- The new value for Name
-
getName
Get the Name property.- Returns:
- The Name
-
setCategories
Set the Category property.- Parameters:
value- The new value for Category
-
getCategories
Get the Category property.- Returns:
- The Category
-
getPrototype
Get the prototype - may be null.- Returns:
- The prototype
-
getLabel
Full label- Returns:
- The name.
-
toString
Override toString. -
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
-