Main Page Classes

Public Member Functions | Static Public Member Functions | List of all members
Type Class Reference

## Public Member Functions
boolean | hasAttributes () throws CodaException
FormatEnum | getFormat () throws CodaException
TypeClassEnum | getTypeClass () throws CodaException
NativeTypeEnum | getReadType () throws CodaException
int | getStringLength () throws CodaException
long | getBitSize () throws CodaException
String | getName () throws CodaException
String | getDescription () throws CodaException
String | getUnit () throws CodaException
String | getFixedValue () throws CodaException
Type | getAttributes () throws CodaException
int | getNumRecordFields () throws CodaException
int | getRecordFieldIndexFromName (String name) throws CodaException
Type | getRecordFieldType (int index) throws CodaException
String | getRecordFieldName (int index) throws CodaException
String | getRecordFieldRealName (int index) throws CodaException
boolean | getRecordFieldHiddenStatus (int index) throws CodaException
int | getRecordFieldAvailableStatus (int index) throws CodaException
boolean | getRecordUnionStatus () throws CodaException
int | getArrayNumDims () throws CodaException
int[] | getArrayDim () throws CodaException
Type | getArrayBaseType () throws CodaException
SpecialTypeEnum | getSpecialType () throws CodaException
Type | getSpecialBaseType () throws CodaException

## Static Public Member Functions
static String | getFormatName (FormatEnum format)
static String | getClassName (TypeClassEnum typeClass)
static String | getNativeTypeName (NativeTypeEnum nativeType)
static String | getSpecialTypeName (SpecialTypeEnum specialType)

## Detailed Description

CODA Type class.

Each data element or group of data elements (such as an array or record) in a product file, independent of whether it is an ascii, binary, XML, netCDF, HDF4, or HDF5 product, has a unique description in CODA.

This class represents instances of such type descriptions and provides methods to retrieve information about the type.

## Member Function Documentation

Type getArrayBaseType | ( |  | ) | throws CodaException

Get the CODA type for the elements of an array.

Returns
  The base type.

Exceptions

  CodaException | If an error occurred.

int [] getArrayDim | ( |  | ) | throws CodaException

Retrieve the dimensions with a constant value for an array.

Returns
  The dimensions array.

Exceptions

  CodaException | If an error occurred.

int getArrayNumDims | ( |  | ) | throws CodaException

Get the number of dimensions for an array.

Returns
  The number of dimensions.

Exceptions

  CodaException | If an error occurred.

Type getAttributes | ( |  | ) | throws CodaException

Get the type for the associated attribute record.

Returns
  The type of the attribute record.

Exceptions

  CodaException | If an error occurred.

long getBitSize | ( |  | ) | throws CodaException

Get the bit size for the data type.

Returns
  The bit size.

Exceptions

  CodaException | If an error occurred.

static String getClassName | ( | TypeClassEnum | typeClass | ) |
| static

Returns the name of a type class. In case the type class is not recognised the string "unknown" is returned.

Parameters

  typeClass | CODA type class

Returns
  if the type class is known a string containing the name of the class, otherwise the string "unknown".

String getDescription | ( |  | ) | throws CodaException

Get the description of a type.

Returns
  The description of the type.

Exceptions

  CodaException | If an error occurred.

String getFixedValue | ( |  | ) | throws CodaException

Get the associated fixed value string of a type if it has one.

Returns
  The string length of the fixed value (can be null).

Exceptions

  CodaException | If an error occurred.

FormatEnum getFormat | ( |  | ) | throws CodaException

Get the storage format of a type.

Returns
  The format.

Exceptions

  CodaException | If an error occurred.

static String getFormatName | ( | FormatEnum | format | ) |
| static

Returns the name of a storage format.

Parameters

  format | CODA storage format

Returns
  if the format is known a string containing the name of the format, otherwise the string "unknown".

String getName | ( |  | ) | throws CodaException

Get the name of a type.

Returns
  The name of the type.

Exceptions

  CodaException | If an error occurred.

static String getNativeTypeName | ( | NativeTypeEnum | nativeType | ) |
| static

Returns the name of a native type.

Parameters

  nativeType | CODA native type

Returns
  if the native type is known a string containing the name of the native type, otherwise the string "unknown".

int getNumRecordFields | ( |  | ) | throws CodaException

Get the number of fields of a record type.

Returns
  The number of fields.

Exceptions

  CodaException | If an error occurred.

NativeTypeEnum getReadType | ( |  | ) | throws CodaException

Get the best native type for reading data of a CODA type.

Returns
  The native type for reading.

Exceptions

  CodaException | If an error occurred.

int getRecordFieldAvailableStatus | ( | int | index | ) | throws CodaException

Get the available status of a record field.

Parameters

  index | Field index (0 <= index < number of fields).

Returns
  The available status of the record field.

Exceptions

  CodaException | If an error occurred.

boolean getRecordFieldHiddenStatus | ( | int | index | ) | throws CodaException

Get the hidden status of a record field.

Parameters

  index | Field index (0 <= index < number of fields).

Returns
  The hidden status of the record field.

Exceptions

  CodaException | If an error occurred.

int getRecordFieldIndexFromName | ( | String | name | ) | throws CodaException

Get the field index from a field name for a record type.

Parameters

  name | Name of the record field.

Returns
  Pointer to a variable where the field index will be stored (0 <= index < number of fields).

Exceptions

  CodaException | If an error occurred.

String getRecordFieldName | ( | int | index | ) | throws CodaException

Get the name of a record field.

Parameters

  index | Field index (0 <= index < number of fields).

Returns
  The name of the record field.

Exceptions

  CodaException | If an error occurred.

String getRecordFieldRealName | ( | int | index | ) | throws CodaException

Get the real name of a record field.

Parameters

  index | Field index (0 <= index < number of fields).

Returns
  The real name of the record field.

Exceptions

  CodaException | If an error occurred.

Type getRecordFieldType | ( | int | index | ) | throws CodaException

Get the CODA type for a record field.

Parameters

  index | Field index (0 <= index < number of fields).

Returns
  The type of the record field.

Exceptions

  CodaException | If an error occurred.

boolean getRecordUnionStatus | ( |  | ) | throws CodaException

Get the union status of a record.

Returns
  1 if the record is a union (i.e. all fields are dynamically available and only one field can be available at any time), 0 otherwise.

Exceptions

  CodaException | If an error occurred.

Type getSpecialBaseType | ( |  | ) | throws CodaException

Get the base type for a special type.

Returns
  The base type.

Exceptions

  CodaException | If an error occurred.

SpecialTypeEnum getSpecialType | ( |  | ) | throws CodaException

Get the special type for a type.

Returns
  The special type.

Exceptions

  CodaException | If an error occurred.

static String getSpecialTypeName | ( | SpecialTypeEnum | specialType | ) |
| static

Returns the name of a special type. In case the special type is not recognised the string "unknown" is returned.

Parameters

  specialType | CODA special type

Returns
  if the special type is known a string containing the name of the special type, otherwise the string "unknown".

int getStringLength | ( |  | ) | throws CodaException

Get the length in bytes of a string data type.

Returns
  The string length (not including terminating 0).

Exceptions

  CodaException | If an error occurred.

TypeClassEnum getTypeClass | ( |  | ) | throws CodaException

Get the class of a type.

Returns
  The type class.

Exceptions

  CodaException | If an error occurred.

String getUnit | ( |  | ) | throws CodaException

Get the unit of a type.

Returns
  The unit information.

Exceptions

  CodaException | If an error occurred.

boolean hasAttributes | ( |  | ) | throws CodaException

Determine wether the type has attributes.

Returns
  Whether attributes are present.

Exceptions

  CodaException | If an error occurred.