ucar.nc2
Class VariableSimpleAdapter

java.lang.Object
  extended by ucar.nc2.VariableSimpleAdapter
All Implemented Interfaces:
java.lang.Comparable<VariableSimpleIF>, VariableSimpleIF

public class VariableSimpleAdapter
extends java.lang.Object
implements VariableSimpleIF

Adapt a StructureMembers.Member into a VariableSimpleIF.

Since:
Apr 20, 2008
Author:
caron

Constructor Summary
VariableSimpleAdapter(StructureMembers.Member m)
          Constructor
 
Method Summary
 int compareTo(VariableSimpleIF o)
          Sort by name
static java.util.List<VariableSimpleIF> convert(StructureMembers sm)
           
 Attribute findAttributeIgnoreCase(java.lang.String attName)
          find the attribute for the variable with the given name, ignoring case.
 java.util.List<Attribute> getAttributes()
          Attributes for the variable.
 DataType getDataType()
          Variable's data type
 java.lang.String getDescription()
          description of the Variable
 java.util.List<Dimension> getDimensions()
          Dimension List.
 java.lang.String getName()
          full name of the data Variable
 int getRank()
          Variable rank
 int[] getShape()
          Variable shape
 java.lang.String getShortName()
          short name of the data Variable
 java.lang.String getUnitsString()
          Units of the Variable.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VariableSimpleAdapter

public VariableSimpleAdapter(StructureMembers.Member m)
Constructor

Parameters:
m - adapt this Member
Method Detail

convert

public static java.util.List<VariableSimpleIF> convert(StructureMembers sm)

getName

public java.lang.String getName()
Description copied from interface: VariableSimpleIF
full name of the data Variable

Specified by:
getName in interface VariableSimpleIF
Returns:
full name of the data Variable

getShortName

public java.lang.String getShortName()
Description copied from interface: VariableSimpleIF
short name of the data Variable

Specified by:
getShortName in interface VariableSimpleIF
Returns:
short name of the data Variable

getDataType

public DataType getDataType()
Description copied from interface: VariableSimpleIF
Variable's data type

Specified by:
getDataType in interface VariableSimpleIF
Returns:
Variable's data type

getDescription

public java.lang.String getDescription()
Description copied from interface: VariableSimpleIF
description of the Variable

Specified by:
getDescription in interface VariableSimpleIF
Returns:
description of the Variable, or null if none.

getUnitsString

public java.lang.String getUnitsString()
Description copied from interface: VariableSimpleIF
Units of the Variable. These should be udunits compatible if possible

Specified by:
getUnitsString in interface VariableSimpleIF
Returns:
Units of the Variable, or null if none.

getRank

public int getRank()
Description copied from interface: VariableSimpleIF
Variable rank

Specified by:
getRank in interface VariableSimpleIF
Returns:
Variable rank

getShape

public int[] getShape()
Description copied from interface: VariableSimpleIF
Variable shape

Specified by:
getShape in interface VariableSimpleIF
Returns:
Variable shape

getDimensions

public java.util.List<Dimension> getDimensions()
Description copied from interface: VariableSimpleIF
Dimension List. empty for a scalar variable.

Specified by:
getDimensions in interface VariableSimpleIF
Returns:
List of ucar.nc2.Dimension

getAttributes

public java.util.List<Attribute> getAttributes()
Description copied from interface: VariableSimpleIF
Attributes for the variable.

Specified by:
getAttributes in interface VariableSimpleIF
Returns:
List of type ucar.nc2.Attribute

findAttributeIgnoreCase

public Attribute findAttributeIgnoreCase(java.lang.String attName)
Description copied from interface: VariableSimpleIF
find the attribute for the variable with the given name, ignoring case.

Specified by:
findAttributeIgnoreCase in interface VariableSimpleIF
Parameters:
attName - attribute name
Returns:
the attribute for the variable with the given name, or null if not found.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(VariableSimpleIF o)
Sort by name

Specified by:
compareTo in interface java.lang.Comparable<VariableSimpleIF>