ucar.unidata.idv
Class IdvResourceManager.IdvResource

java.lang.Object
  extended by ucar.unidata.idv.IdvResourceManager.IdvResource
Direct Known Subclasses:
IdvResourceManager.XmlIdvResource
Enclosing class:
IdvResourceManager

public static class IdvResourceManager.IdvResource
extends Object

Class IdvResource holds the resources files for a particular type of resource

Author:
IDV development team

Field Summary
protected  List extraPaths
          Extra paths we add on for plugin
protected  String fileNamePattern
          The pattern to match on files
protected  Pattern pattern
          Keep the file name pattern around.
 
Constructor Summary
IdvResourceManager.IdvResource(String id)
          Create the object with the given id
IdvResourceManager.IdvResource(String id, String description)
          Create the object with the given id and description
IdvResourceManager.IdvResource(String id, String description, String fileNamePattern)
          Create the object with the given id, description and edit command
IdvResourceManager.IdvResource(String id, String description, String fileNamePattern, boolean isUser)
          Create an IdvResource
IdvResourceManager.IdvResource(String id, String description, String fileNamePattern, boolean isXml, boolean forUser)
          Create the object with the given id, description and edit command If isXml is true then this is an xml resource
 
Method Summary
 void addExtraPath(String path)
          Add the extra path
 String getDescription()
          Get the description
 String getId()
          Get the id
 Pattern getPattern()
          Create, if needed, and return the file pattern
 ResourceCollection initResourceCollection(IdvResourceManager resourceManager)
          Create the actual ResourceCollection
 String toString()
          toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

extraPaths

protected List extraPaths
Extra paths we add on for plugin


fileNamePattern

protected String fileNamePattern
The pattern to match on files


pattern

protected Pattern pattern
Keep the file name pattern around. This is used to find files that may match this resource type

Constructor Detail

IdvResourceManager.IdvResource

public IdvResourceManager.IdvResource(String id)
Create the object with the given id

Parameters:
id - The id (e.g., idv.resource.colortables)

IdvResourceManager.IdvResource

public IdvResourceManager.IdvResource(String id,
                                      String description)
Create the object with the given id and description

Parameters:
id - The id (e.g., idv.resource.colortables)
description - The description

IdvResourceManager.IdvResource

public IdvResourceManager.IdvResource(String id,
                                      String description,
                                      String fileNamePattern)
Create the object with the given id, description and edit command

Parameters:
id - The id (e.g., idv.resource.colortables)
description - The description
fileNamePattern - The pattern to match

IdvResourceManager.IdvResource

public IdvResourceManager.IdvResource(String id,
                                      String description,
                                      String fileNamePattern,
                                      boolean isUser)
Create an IdvResource

Parameters:
id - the id
description - a description
fileNamePattern - the file name pattern
isUser - true if this is a use pattern

IdvResourceManager.IdvResource

public IdvResourceManager.IdvResource(String id,
                                      String description,
                                      String fileNamePattern,
                                      boolean isXml,
                                      boolean forUser)
Create the object with the given id, description and edit command If isXml is true then this is an xml resource

Parameters:
id - The id (e.g., idv.resource.colortables)
description - The description
fileNamePattern - pattern
isXml - Flag to denote if this is an xml resource
forUser - flat to denote if this is for the user
Method Detail

getId

public String getId()
Get the id

Returns:
the id

getDescription

public String getDescription()
Get the description

Returns:
description

getPattern

public Pattern getPattern()
Create, if needed, and return the file pattern

Returns:
file pattern

initResourceCollection

public ResourceCollection initResourceCollection(IdvResourceManager resourceManager)
Create the actual ResourceCollection

Parameters:
resourceManager - The manager that really creates the collection
Returns:
The collection

addExtraPath

public void addExtraPath(String path)
Add the extra path

Parameters:
path - extra path

toString

public String toString()
toString

Overrides:
toString in class Object
Returns:
toString