ucar.nc2
Interface VariableIF

All Superinterfaces:
Comparable<VariableSimpleIF>, VariableSimpleIF
All Known Subinterfaces:
VariableEnhanced
All Known Implementing Classes:
AddeVariable, CoordinateAxis, CoordinateAxis1D, CoordinateAxis1DTime, CoordinateAxis2D, DODSGrid, DODSStructure, DODSVariable, Sequence, SequenceDS, Structure, StructureDS, StructurePseudo, StructurePseudo2Dim, StructurePseudoDS, Variable, VariableDS

public interface VariableIF
extends VariableSimpleIF

The public interface to a Variable.

Author:
caron

Method Summary
 Attribute findAttribute(String attName)
           
 Attribute findAttributeIgnoreCase(String attName)
          find the attribute for the variable with the given name, ignoring case.
 int findDimensionIndex(String dimName)
           
 List<Attribute> getAttributes()
          Attributes for the variable.
 DataType getDataType()
          Variable's data type
 String getDescription()
          description of the Variable
 Dimension getDimension(int index)
           
 List<Dimension> getDimensions()
          Dimension List.
 List<Dimension> getDimensionsAll()
           
 int getElementSize()
           
 String getFullName()
           
 String getFullNameEscaped()
           
 void getNameAndDimensions(Formatter result, boolean useFullName, boolean strict)
           
 Group getParentGroup()
           
 Structure getParentStructure()
           
 List<Range> getRanges()
           
 int getRank()
          Variable rank
 int[] getShape()
          Variable shape
 Section getShapeAsSection()
           
 String getShortName()
          short name of the data Variable
 long getSize()
           
 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(String rangeSpec)
           
 byte readScalarByte()
           
 double readScalarDouble()
           
 float readScalarFloat()
           
 int readScalarInt()
           
 long readScalarLong()
           
 short readScalarShort()
           
 String readScalarString()
           
 Variable section(List<Range> ranges)
           
 String toStringDebug()
           
 
Methods inherited from interface ucar.nc2.VariableSimpleIF
getName
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getFullName

String getFullName()

getFullNameEscaped

String getFullNameEscaped()

getShortName

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(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

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(String dimName)

getAttributes

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(String attName)

findAttributeIgnoreCase

Attribute findAttributeIgnoreCase(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(List<Range> ranges)
                 throws InvalidRangeException
Throws:
InvalidRangeException

getShapeAsSection

Section getShapeAsSection()

getRanges

List<Range> getRanges()

read

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

read

Array read(String rangeSpec)
           throws IOException,
                  InvalidRangeException
Throws:
IOException
InvalidRangeException

read

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

read

Array read()
           throws IOException
Throws:
IOException

isCoordinateVariable

boolean isCoordinateVariable()

isMemberOfStructure

boolean isMemberOfStructure()

isVariableLength

boolean isVariableLength()

isMetadata

boolean isMetadata()

getParentStructure

Structure getParentStructure()

getDescription

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

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

List<Dimension> getDimensionsAll()

readScalarByte

byte readScalarByte()
                    throws IOException
Throws:
IOException

readScalarShort

short readScalarShort()
                      throws IOException
Throws:
IOException

readScalarInt

int readScalarInt()
                  throws IOException
Throws:
IOException

readScalarLong

long readScalarLong()
                    throws IOException
Throws:
IOException

readScalarFloat

float readScalarFloat()
                      throws IOException
Throws:
IOException

readScalarDouble

double readScalarDouble()
                        throws IOException
Throws:
IOException

readScalarString

String readScalarString()
                        throws IOException
Throws:
IOException

toStringDebug

String toStringDebug()


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.