ucar.unidata.data
Class DataOperand

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

public class DataOperand
extends Object

This class holds a name/value pair that represents an operand for the DerivedDataChoice

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

Field Summary
static String PROP_LEVEL
          The level property
 
Constructor Summary
DataOperand(String name)
          Create a new DataOperand with null data
DataOperand(String name, Object data)
          Create a new DataOperand
DataOperand(String name, String description, List categories, boolean multiple)
          ctor
 
Method Summary
 boolean equals(Object o)
          Check to see if the object in question is equal to this.
 List getCategories()
          Get the list of DataCategorys that are defined by the categories property
 Object getData()
          Get the data.
 String getDataSourceName()
          DOes this operand have a datasource property
 String getDescription()
          Get the description from the properties
 String getLabel()
          Get the name used for the label in the gui
 boolean getMultiple()
          Get the multiple property
 String getName()
          Get the name.
 String getParamName()
          Get just the param name, strip off the categories
 String getPattern()
          Get the pattern from the properties
 String getProperty(String name)
          Get the named property
 List getTimeIndices()
          Get the list of time (Integer) indices defined with the times property
 String getUserDefault()
          Get the default user value
 int hashCode()
          Return the hashcode for this DataOperand.
 boolean isBound()
          See if this a bound operand or not (has data)
 boolean isPersistent()
          Is this operand persistent
 boolean isUser()
          Is this operand an end user defined value
static void main(String[] argv)
          Test
 String makeLegalJython()
          Remove all of the special IDV characters in the given jython operand.
 void putCategories(List categories)
          Set the categories
 void putDescription(String desc)
          Put the description in the properties
 void putMultiple(boolean b)
          Put the multiple property
 void putPattern(String pattern)
          Put the pattern into the properties
 void setData(Object value)
          Set the data.
 void setName(String value)
          Set the name.
 String toString()
          Return a string representation of this DataOperand.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PROP_LEVEL

public static final String PROP_LEVEL
The level property

See Also:
Constant Field Values
Constructor Detail

DataOperand

public DataOperand(String name)
Create a new DataOperand with null data

Parameters:
name - name for this object

DataOperand

public DataOperand(String name,
                   Object data)
Create a new DataOperand

Parameters:
name - name for this object
data - associated data

DataOperand

public DataOperand(String name,
                   String description,
                   List categories,
                   boolean multiple)
ctor

Parameters:
name - name
description - description
categories - categories
multiple - supports multiples
Method Detail

putDescription

public void putDescription(String desc)
Put the description in the properties

Parameters:
desc - description

getDescription

public String getDescription()
Get the description from the properties

Returns:
description

putPattern

public void putPattern(String pattern)
Put the pattern into the properties

Parameters:
pattern - the pattern

getPattern

public String getPattern()
Get the pattern from the properties

Returns:
the pattern

equals

public boolean equals(Object o)
Check to see if the object in question is equal to this.

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

hashCode

public int hashCode()
Return the hashcode for this DataOperand.

Overrides:
hashCode in class Object
Returns:
the hashcode

toString

public String toString()
Return a string representation of this DataOperand.

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

putCategories

public void putCategories(List categories)
Set the categories

Parameters:
categories - catgegories

getCategories

public List getCategories()
Get the list of DataCategorys that are defined by the categories property

Returns:
List of data categories or null if none defined

setName

public void setName(String value)
Set the name. (Used by XML persistence)

Parameters:
value - name for this object

getName

public String getName()
Get the name. (Used by XML persistence)

Returns:
this object's name

setData

public void setData(Object value)
Set the data. (Used by XML persistence)

Parameters:
value - the data

getData

public Object getData()
Get the data. (Used by XML persistence)

Returns:
the data

isBound

public boolean isBound()
See if this a bound operand or not (has data)

Returns:
true if data is not null

putMultiple

public void putMultiple(boolean b)
Put the multiple property

Parameters:
b - multiple

getMultiple

public boolean getMultiple()
Get the multiple property

Returns:
multiple

isPersistent

public boolean isPersistent()
Is this operand persistent

Returns:
is persistent

isUser

public boolean isUser()
Is this operand an end user defined value

Returns:
Is define dby the user

getDataSourceName

public String getDataSourceName()
DOes this operand have a datasource property

Returns:
The data source property

getUserDefault

public String getUserDefault()
Get the default user value

Returns:
The default for user specified values

getProperty

public String getProperty(String name)
Get the named property

Parameters:
name - property name
Returns:
The property

getParamName

public String getParamName()
Get just the param name, strip off the categories

Returns:
The param name

getLabel

public String getLabel()
Get the name used for the label in the gui

Returns:
The label.

makeLegalJython

public String makeLegalJython()
Remove all of the special IDV characters in the given jython operand.

Returns:
cleaned up operand

getTimeIndices

public List getTimeIndices()
Get the list of time (Integer) indices defined with the times property

Returns:
Listof time indices or null

main

public static void main(String[] argv)
Test

Parameters:
argv - Cmd line args