ucar.nc2
Interface VariableIF

All Superinterfaces:
java.lang.Comparable<VariableSimpleIF>, VariableSimpleIF
All Known Subinterfaces:
VariableEnhanced
All Known Implementing Classes:
CoordinateAxis, CoordinateAxis1D, CoordinateAxis1DTime, CoordinateAxis2D, Sequence, Structure, StructureDS, StructurePseudo, Variable, VariableDS

public interface VariableIF
extends VariableSimpleIF

The public interface to a Variable.

Author:
caron

Method Summary
 Attribute findAttribute(java.lang.String attName)
           
 Attribute findAttributeIgnoreCase(java.lang.String attName)
          find the attribute for the variable with the given name, ignoring case.
 int findDimensionIndex(java.lang.String dimName)
           
 java.util.List<Attribute> getAttributes()
          Attributes for the variable.
 DataType getDataType()
          Variable's data type
 java.lang.String getDescription()
          description of the Variable
 Dimension getDimension(int index)
           
 java.util.List<Dimension> getDimensions()
          Dimension List.
 java.util.List<Dimension> getDimensionsAll()
           
 int getElementSize()
           
 java.lang.String getName()
          full name of the data Variable
 void getNameAndDimensions(java.util.Formatter result, boolean useFullName, boolean strict)
           
 java.lang.String getNameEscaped()
           
 Group getParentGroup()
           
 Structure getParentStructure()
           
 java.util.List<Range> getRanges()
           
 int getRank()
          Variable rank
 int[] getShape()
          Variable shape
 Section getShapeAsSection()
           
 java.lang.String getShortName()
          short name of the data Variable
 long getSize()
           
 java.lang.String getUnitsString()
          Units of the Variable.
 boolean isCoordinateVariable()
           
 boolean isMemberOfStructure()
           
 boolean isMetadata()
           
 boolean isScalar()
           
 boolean isUnlimited()
           
 boolean isUnsigned()
           
 boolean isVariableLength()
           
 Array read()
           
 Array read(int[] origin, int[] shape)
           
 Array read(Section section)
           
 Array read(java.lang.String rangeSpec)
           
 byte readScalarByte()
           
 double readScalarDouble()
           
 float readScalarFloat()
           
 int readScalarInt()
           
 long readScalarLong()
           
 short readScalarShort()
           
 java.lang.String readScalarString()
           
 Variable section(java.util.List<Range> ranges)
           
 java.lang.String toStringDebug()
           
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getName

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

getNameEscaped

java.lang.String getNameEscaped()

getShortName

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

getNameAndDimensions

void getNameAndDimensions(java.util.Formatter result,
                          boolean useFullName,
                          boolean strict)

isUnlimited

boolean isUnlimited()

isUnsigned

boolean isUnsigned()

getDataType

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

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

getRank

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

Specified by:
getRank in interface VariableSimpleIF
Returns:
Variable rank

isScalar

boolean isScalar()

getSize

long getSize()

getElementSize

int getElementSize()

getShape

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

Specified by:
getShape in interface VariableSimpleIF
Returns:
Variable shape

getDimensions

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

getDimension

Dimension getDimension(int index)

findDimensionIndex

int findDimensionIndex(java.lang.String dimName)

getAttributes

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

findAttribute

Attribute findAttribute(java.lang.String attName)

findAttributeIgnoreCase

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.

getParentGroup

Group getParentGroup()

section

Variable section(java.util.List<Range> ranges)
                 throws InvalidRangeException
Throws:
InvalidRangeException

getShapeAsSection

Section getShapeAsSection()

getRanges

java.util.List<Range> getRanges()

read

Array read(int[] origin,
           int[] shape)
           throws java.io.IOException,
                  InvalidRangeException
Throws:
java.io.IOException
InvalidRangeException

read

Array read(java.lang.String rangeSpec)
           throws java.io.IOException,
                  InvalidRangeException
Throws:
java.io.IOException
InvalidRangeException

read

Array read(Section section)
           throws java.io.IOException,
                  InvalidRangeException
Throws:
java.io.IOException
InvalidRangeException

read

Array read()
           throws java.io.IOException
Throws:
java.io.IOException

isCoordinateVariable

boolean isCoordinateVariable()

isMemberOfStructure

boolean isMemberOfStructure()

isVariableLength

boolean isVariableLength()

isMetadata

boolean isMetadata()

getParentStructure

Structure getParentStructure()

getDescription

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

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.

getDimensionsAll

java.util.List<Dimension> getDimensionsAll()

readScalarByte

byte readScalarByte()
                    throws java.io.IOException
Throws:
java.io.IOException

readScalarShort

short readScalarShort()
                      throws java.io.IOException
Throws:
java.io.IOException

readScalarInt

int readScalarInt()
                  throws java.io.IOException
Throws:
java.io.IOException

readScalarLong

long readScalarLong()
                    throws java.io.IOException
Throws:
java.io.IOException

readScalarFloat

float readScalarFloat()
                      throws java.io.IOException
Throws:
java.io.IOException

readScalarDouble

double readScalarDouble()
                        throws java.io.IOException
Throws:
java.io.IOException

readScalarString

java.lang.String readScalarString()
                                  throws java.io.IOException
Throws:
java.io.IOException

toStringDebug

java.lang.String toStringDebug()