ucar.unidata.data
Class DataSourceDescriptor

java.lang.Object
  extended by ucar.unidata.data.DataSourceDescriptor

public class DataSourceDescriptor
extends Object

A class to hold the descriptive metadata about a DataSource

Version:
$Revision: 1.18 $
Author:
IDV development team

Field Summary
protected  boolean doesMultiples
          flag for accepting multiple data references
protected  Class factoryClass
          The factory class
protected  boolean fileSelection
          flag for fileseletion
protected  String id
          Id for this DataSourceDescriptor
protected  String label
          label to display
protected  DataManager manager
          The data manager
protected  String patterns
          pattern string
protected  Hashtable properties
          Properties table
 
Constructor Summary
DataSourceDescriptor()
          Default constructor; does nothing
DataSourceDescriptor(String id, String label, DataManager manager, Class factory, String patterns, boolean fileSelection, boolean doesMultiples, Hashtable props)
          Create a DataSourceDescriptor
 
Method Summary
 boolean equals(Object o)
          See if the object in question is equal to this DataSourceDescriptor
 DataContext getDataContext()
          Get the context for this data.
 DataManager getDataManager()
          Get the DataManager for this DataSourceDescriptor
 boolean getDoesMultiples()
          Set the does multiples property
 Class getFactoryClass()
          Get the factory class for this DatSourceDescriptor
 FileFilter getFilePatternFilter()
          Get the file pattern filter for this Descriptor
 boolean getFileSelection()
          Get the file selection property
 String getId()
          Get the id for this DataSourceDescriptor.
 String getLabel()
          Get the label for this DataSourceDescriptor
 String getNcmlTemplate()
          Get the NcmlTemplate property.
 PatternFileFilter getPatternFileFilter()
          Get the file pattern filter for this Descriptor
 String getPatterns()
          Get the Patterns property.
 Hashtable getProperties()
          Get any properties associated with this
 String getProperty(String property)
          Get the property.
 boolean getStandalone()
          Get the Standalone property.
 int hashCode()
          Return the hashcode for this DataSourceDescription 8
 void setDataManager(DataManager m)
          Set the DataManager for this DataSourceDescriptor
 void setDoesMultiples(boolean value)
          Set the does multiples property
 void setFileSelection(boolean fileSelection)
          Set the file selection property
 void setId(String id)
          Set the id for this DataSourceDescriptor.
 void setLabel(String label)
          Get the label for this DataSourceDescriptor
 void setNcmlTemplate(String value)
          Set the NcmlTemplate property.
 void setPatterns(String value)
          Set the Patterns property.
 void setProperties(Hashtable p)
          Set the properties.
 void setStandalone(boolean value)
          Set the Standalone property.
 String toString()
          Return a string representation of this DataSourceDescriptor 8
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected String id
Id for this DataSourceDescriptor


manager

protected DataManager manager
The data manager


factoryClass

protected Class factoryClass
The factory class


properties

protected Hashtable properties
Properties table


label

protected String label
label to display


fileSelection

protected boolean fileSelection
flag for fileseletion


doesMultiples

protected boolean doesMultiples
flag for accepting multiple data references


patterns

protected String patterns
pattern string

Constructor Detail

DataSourceDescriptor

public DataSourceDescriptor()
Default constructor; does nothing


DataSourceDescriptor

public DataSourceDescriptor(String id,
                            String label,
                            DataManager manager,
                            Class factory,
                            String patterns,
                            boolean fileSelection,
                            boolean doesMultiples,
                            Hashtable props)
Create a DataSourceDescriptor

Parameters:
id - id for this
label - text for a label
manager - Associated DataManager
factory - the factory class
patterns - set of patterns
fileSelection - true if this supports file selection
doesMultiples - true if this handles multiple ids
props - extra properties
Method Detail

hashCode

public int hashCode()
Return the hashcode for this DataSourceDescription 8

Overrides:
hashCode in class Object
Returns:
the hash code

equals

public boolean equals(Object o)
See if the object in question is equal to this DataSourceDescriptor

Overrides:
equals in class Object
Parameters:
o - Object in question 8
Returns:
true if they are equal

getDataContext

public DataContext getDataContext()
Get the context for this data.

Returns:
the data context

getId

public String getId()
Get the id for this DataSourceDescriptor.

Returns:
the ID

setId

public void setId(String id)
Set the id for this DataSourceDescriptor.

Parameters:
id - new id

setDoesMultiples

public void setDoesMultiples(boolean value)
Set the does multiples property

Parameters:
value - true to handle, false to not

getDoesMultiples

public boolean getDoesMultiples()
Set the does multiples property

Returns:
true if does multiples

getDataManager

public DataManager getDataManager()
Get the DataManager for this DataSourceDescriptor

Returns:
the DataManager

setDataManager

public void setDataManager(DataManager m)
Set the DataManager for this DataSourceDescriptor

Parameters:
m - The DataManager

getLabel

public String getLabel()
Get the label for this DataSourceDescriptor

Returns:
the label

setLabel

public void setLabel(String label)
Get the label for this DataSourceDescriptor

Parameters:
label - The label

getFileSelection

public boolean getFileSelection()
Get the file selection property

Returns:
true if this is a source for file data

setFileSelection

public void setFileSelection(boolean fileSelection)
Set the file selection property

Parameters:
fileSelection - true to set up for file selection

getFactoryClass

public Class getFactoryClass()
Get the factory class for this DatSourceDescriptor

Returns:
the class

getProperties

public Hashtable getProperties()
Get any properties associated with this

Returns:
the properties or null

setProperties

public void setProperties(Hashtable p)
Set the properties.

Parameters:
p - new properties

getProperty

public String getProperty(String property)
Get the property.

Parameters:
property - key for property
Returns:
property value

toString

public String toString()
Return a string representation of this DataSourceDescriptor 8

Overrides:
toString in class Object
Returns:
a string representation of this

getFilePatternFilter

public FileFilter getFilePatternFilter()
Get the file pattern filter for this Descriptor

Returns:
the FileFilter

getPatternFileFilter

public PatternFileFilter getPatternFileFilter()
Get the file pattern filter for this Descriptor

Returns:
the FileFilter

setPatterns

public void setPatterns(String value)
Set the Patterns property.

Parameters:
value - The new value for Patterns

getPatterns

public String getPatterns()
Get the Patterns property.

Returns:
The Patterns

setNcmlTemplate

public void setNcmlTemplate(String value)
Set the NcmlTemplate property.

Parameters:
value - The new value for NcmlTemplate

getNcmlTemplate

public String getNcmlTemplate()
Get the NcmlTemplate property.

Returns:
The NcmlTemplate

setStandalone

public void setStandalone(boolean value)
Set the Standalone property.

Parameters:
value - The new value for Standalone

getStandalone

public boolean getStandalone()
Get the Standalone property.

Returns:
The Standalone