ucar.ma2
Class StructureMembers.Member

java.lang.Object
  extended by ucar.ma2.StructureMembers.Member
Enclosing class:
StructureMembers

public class StructureMembers.Member
extends Object

A member of a StructureData.


Constructor Summary
StructureMembers.Member(String name, String desc, String units, DataType dtype, int[] shape)
           
StructureMembers.Member(StructureMembers.Member from)
           
 
Method Summary
 Array getDataArray()
          Get the data array, if any.
 Object getDataObject()
          Get an opaque data object, for use behind the scenes.
 int getDataParam()
          Get the data parameter value, for use behind the scenes.
 DataType getDataType()
          Get the DataType.
 String getDescription()
          Get the description, if any.
 String getFullNameEscaped()
           
 String getName()
          Get the short name.
 int[] getShape()
          Get the array shape.
 int getSize()
          Get the total number of elements.
 int getSizeBytes()
          Get the total size in bytes.
 StructureMembers getStructureMembers()
           
 String getUnitsString()
          Get the units string, if any.
 boolean isScalar()
          Is this a scalar (size == 1).
 void setDataArray(Array data)
          Set the data array.
 void setDataObject(Object o)
          Set an opaque data object, for use behind the scenes.
 void setDataParam(int dataParam)
          Set the data parameter value, for use behind the scenes.
 void setShape(int[] shape)
           
 void setStructureMembers(StructureMembers members)
           
 void setVariableInfo(String vname, String desc, String unitString, DataType dtype)
           
 void showInternal(Formatter f, String leadingSpace)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StructureMembers.Member

public StructureMembers.Member(String name,
                               String desc,
                               String units,
                               DataType dtype,
                               int[] shape)

StructureMembers.Member

public StructureMembers.Member(StructureMembers.Member from)
Method Detail

setStructureMembers

public void setStructureMembers(StructureMembers members)

getStructureMembers

public StructureMembers getStructureMembers()

setShape

public void setShape(int[] shape)

getName

public String getName()
Get the short name.

Returns:
the short name.

getFullNameEscaped

public String getFullNameEscaped()

getUnitsString

public String getUnitsString()
Get the units string, if any.

Returns:
the units string, or null if none.

getDescription

public String getDescription()
Get the description, if any.

Returns:
the description, or null if none.

getDataType

public DataType getDataType()
Get the DataType.

Returns:
the DataType.

getShape

public int[] getShape()
Get the array shape. This does not have to match the VariableSimpleIF.

Returns:
the array shape.

getSize

public int getSize()
Get the total number of elements. This does not have to match the VariableSimpleIF.

Returns:
the total number of elements.

getSizeBytes

public int getSizeBytes()
Get the total size in bytes. This does not have to match the VariableSimpleIF. Note that this will not be correct when containing a member of type Sequence, or String, since those are variable length. In that case

Returns:
total size in bytes

isScalar

public boolean isScalar()
Is this a scalar (size == 1). This does not have to match the VariableSimpleIF.

Returns:
if this is a scalar

getDataParam

public int getDataParam()
Get the data parameter value, for use behind the scenes.

Returns:
data parameter value

setDataParam

public void setDataParam(int dataParam)
Set the data parameter value, for use behind the scenes.

Parameters:
dataParam - set to this value

getDataArray

public Array getDataArray()
Get the data array, if any. Used for implementation, DO NOT USE DIRECTLY!

Returns:
data object, may be null

setDataArray

public void setDataArray(Array data)
Set the data array. Used for implementation, DO NOT USE DIRECTLY!

Parameters:
data - set to this Array. must not be a logical view

getDataObject

public Object getDataObject()
Get an opaque data object, for use behind the scenes. May be null

Returns:
data object, may be null

setDataObject

public void setDataObject(Object o)
Set an opaque data object, for use behind the scenes.

Parameters:
o - set to this value

setVariableInfo

public void setVariableInfo(String vname,
                            String desc,
                            String unitString,
                            DataType dtype)

showInternal

public void showInternal(Formatter f,
                         String leadingSpace)

toString

public String toString()
Overrides:
toString in class Object


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