gov.nasa.pds.label.object
Enum FieldType

java.lang.Object
  extended by java.lang.Enum<FieldType>
      extended by gov.nasa.pds.label.object.FieldType
All Implemented Interfaces:
Serializable, Comparable<FieldType>

public enum FieldType
extends Enum<FieldType>

Defines the set of field types that may appear in tables of any of the table types. Indicates the type string that will be found in XML label instances, the field justification when displayed in fixed-width format, and the field adapter for reading and writing the field.


Enum Constant Summary
ASCII_ANYURI
          Any URI.
ASCII_BOOLEAN
          Boolean true or false.
ASCII_DATE_DOY
          A date using day-of-year.
ASCII_DATE_TIME_DOY
          A date-time using day-of-year.
ASCII_DATE_TIME_UTC
          A date-time using year-month-day in UTC time zone.
ASCII_DATE_TIME_YMD
          A date-time using year-month-day.
ASCII_DATE_YMD
          A date using year-month-day.
ASCII_DOI
          Digital object identifier.
ASCII_FILE_NAME
          A file name.
ASCII_FILE_SPECIFICATION_NAME
          A file spec name.
ASCII_INTEGER
          An integer.
ASCII_LID
          A logical identifier.
ASCII_LIDVID
          A logical identifier with version ID.
ASCII_MD5_CHECKSUM
          An MD5 hash.
ASCII_NONNEGATIVE_INTEGER
          A nonnegative integer.
ASCII_NUMERIC_BASE16
          A hexadecimal integer.
ASCII_NUMERIC_BASE2
          A base 2 integer.
ASCII_REAL
          A floating-point value.
ASCII_SHORT_STRING_COLLAPSED
          A short string where whitespace is not significant.
ASCII_SHORT_STRING_PRESERVED
          A short string where whitespace is significant.
ASCII_STRING
          A string.
ASCII_TEXT_PRESERVED
          A string where whitespace is significant.
ASCII_TIME
          A time.
ASCII_VID
          A version ID.
COMPLEXLSB16
          A complex, little-endian, 16-byte binary value.
COMPLEXLSB8
          A complex, little-endian, 8-byte binary value.
COMPLEXMSB16
          A complex, big-endian, 16-byte binary value.
COMPLEXMSB8
          A complex, big-endian, 8-byte binary value.
IEEE754LSBDOUBLE
          An 8-byte, little-endian IEEE real.
IEEE754LSBSINGLE
          A 4-byte, little-endian IEEE real.
IEEE754MSBDOUBLE
          An 8-byte, big-endian IEEE real.
IEEE754MSBSINGLE
          A 4-byte, big-endian IEEE real.
SIGNEDBITSTRING
          A signed bit string in a packed field.
SIGNEDBYTE
          A signed 1-byte integer.
SIGNEDLSB2
          A signed, 2-byte, little-endian integer.
SIGNEDLSB4
          A signed, 4-byte, little-endian integer.
SIGNEDLSB8
          A signed, 8-byte, little-endian integer.
SIGNEDMSB2
          A signed, 2-byte, big-endian integer.
SIGNEDMSB4
          A signed, 4-byte, big-endian integer.
SIGNEDMSB8
          A signed, 8-byte, big-endian integer.
UNSIGNEDBITSTRING
          An unsigned bit string in a packed field.
UNSIGNEDBYTE
          An unsigned, 1-byte integer.
UNSIGNEDLSB2
          An unsigned, 2-byte, little-endian integer.
UNSIGNEDLSB4
          An unsigned, 4-byte, little-endian integer.
UNSIGNEDLSB8
          An unsigned, 8-byte, little-endian integer.
UNSIGNEDMSB2
          An unsigned, 2-byte, big-endian integer.
UNSIGNEDMSB4
          An unsigned, 4-byte, big-endian integer.
UNSIGNEDMSB8
          An unsigned, 8-byte, big-endian integer.
UTF8_STRING
          A Unicode string encoded into bytes using UTF-8 encoding.
 
Method Summary
 FieldAdapter getAdapter()
          Gets a field adapter for this field type.
static FieldType getFieldType(String xmlType)
          Gets the proper field type for an XML type string in a label instance.
 String getXMLType()
          Gets the type string that will occur in XML labels.
 boolean isRightJustified()
          Tests whether the field should be right justified on output.
static FieldType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static FieldType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ASCII_ANYURI

public static final FieldType ASCII_ANYURI
Any URI.


ASCII_BOOLEAN

public static final FieldType ASCII_BOOLEAN
Boolean true or false.


ASCII_DOI

public static final FieldType ASCII_DOI
Digital object identifier.


ASCII_DATE_DOY

public static final FieldType ASCII_DATE_DOY
A date using day-of-year.


ASCII_DATE_TIME_DOY

public static final FieldType ASCII_DATE_TIME_DOY
A date-time using day-of-year.


ASCII_DATE_TIME_UTC

public static final FieldType ASCII_DATE_TIME_UTC
A date-time using year-month-day in UTC time zone.


ASCII_DATE_TIME_YMD

public static final FieldType ASCII_DATE_TIME_YMD
A date-time using year-month-day.


ASCII_DATE_YMD

public static final FieldType ASCII_DATE_YMD
A date using year-month-day.


ASCII_FILE_NAME

public static final FieldType ASCII_FILE_NAME
A file name.


ASCII_FILE_SPECIFICATION_NAME

public static final FieldType ASCII_FILE_SPECIFICATION_NAME
A file spec name.


ASCII_INTEGER

public static final FieldType ASCII_INTEGER
An integer.


ASCII_LID

public static final FieldType ASCII_LID
A logical identifier.


ASCII_LIDVID

public static final FieldType ASCII_LIDVID
A logical identifier with version ID.


ASCII_MD5_CHECKSUM

public static final FieldType ASCII_MD5_CHECKSUM
An MD5 hash.


ASCII_NONNEGATIVE_INTEGER

public static final FieldType ASCII_NONNEGATIVE_INTEGER
A nonnegative integer.


ASCII_NUMERIC_BASE16

public static final FieldType ASCII_NUMERIC_BASE16
A hexadecimal integer.


ASCII_NUMERIC_BASE2

public static final FieldType ASCII_NUMERIC_BASE2
A base 2 integer.


ASCII_REAL

public static final FieldType ASCII_REAL
A floating-point value.


ASCII_SHORT_STRING_COLLAPSED

public static final FieldType ASCII_SHORT_STRING_COLLAPSED
A short string where whitespace is not significant.


ASCII_SHORT_STRING_PRESERVED

public static final FieldType ASCII_SHORT_STRING_PRESERVED
A short string where whitespace is significant.


ASCII_STRING

public static final FieldType ASCII_STRING
A string.


ASCII_TEXT_PRESERVED

public static final FieldType ASCII_TEXT_PRESERVED
A string where whitespace is significant.


ASCII_TIME

public static final FieldType ASCII_TIME
A time.


ASCII_VID

public static final FieldType ASCII_VID
A version ID.


COMPLEXLSB16

public static final FieldType COMPLEXLSB16
A complex, little-endian, 16-byte binary value. (double real, double imaginary)


COMPLEXLSB8

public static final FieldType COMPLEXLSB8
A complex, little-endian, 8-byte binary value. (float real, float imaginary)


COMPLEXMSB16

public static final FieldType COMPLEXMSB16
A complex, big-endian, 16-byte binary value. (double real, double imaginary)


COMPLEXMSB8

public static final FieldType COMPLEXMSB8
A complex, big-endian, 8-byte binary value. (float real, float imaginary)


IEEE754LSBDOUBLE

public static final FieldType IEEE754LSBDOUBLE
An 8-byte, little-endian IEEE real.


IEEE754LSBSINGLE

public static final FieldType IEEE754LSBSINGLE
A 4-byte, little-endian IEEE real.


IEEE754MSBDOUBLE

public static final FieldType IEEE754MSBDOUBLE
An 8-byte, big-endian IEEE real.


IEEE754MSBSINGLE

public static final FieldType IEEE754MSBSINGLE
A 4-byte, big-endian IEEE real.


SIGNEDBYTE

public static final FieldType SIGNEDBYTE
A signed 1-byte integer.


SIGNEDLSB2

public static final FieldType SIGNEDLSB2
A signed, 2-byte, little-endian integer.


SIGNEDLSB4

public static final FieldType SIGNEDLSB4
A signed, 4-byte, little-endian integer.


SIGNEDLSB8

public static final FieldType SIGNEDLSB8
A signed, 8-byte, little-endian integer.


SIGNEDMSB2

public static final FieldType SIGNEDMSB2
A signed, 2-byte, big-endian integer.


SIGNEDMSB4

public static final FieldType SIGNEDMSB4
A signed, 4-byte, big-endian integer.


SIGNEDMSB8

public static final FieldType SIGNEDMSB8
A signed, 8-byte, big-endian integer.


UTF8_STRING

public static final FieldType UTF8_STRING
A Unicode string encoded into bytes using UTF-8 encoding.


UNSIGNEDBYTE

public static final FieldType UNSIGNEDBYTE
An unsigned, 1-byte integer.


UNSIGNEDLSB2

public static final FieldType UNSIGNEDLSB2
An unsigned, 2-byte, little-endian integer.


UNSIGNEDLSB4

public static final FieldType UNSIGNEDLSB4
An unsigned, 4-byte, little-endian integer.


UNSIGNEDLSB8

public static final FieldType UNSIGNEDLSB8
An unsigned, 8-byte, little-endian integer.


UNSIGNEDMSB2

public static final FieldType UNSIGNEDMSB2
An unsigned, 2-byte, big-endian integer.


UNSIGNEDMSB4

public static final FieldType UNSIGNEDMSB4
An unsigned, 4-byte, big-endian integer.


UNSIGNEDMSB8

public static final FieldType UNSIGNEDMSB8
An unsigned, 8-byte, big-endian integer.


SIGNEDBITSTRING

public static final FieldType SIGNEDBITSTRING
A signed bit string in a packed field.


UNSIGNEDBITSTRING

public static final FieldType UNSIGNEDBITSTRING
An unsigned bit string in a packed field.

Method Detail

values

public static FieldType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (FieldType c : FieldType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static FieldType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getFieldType

public static FieldType getFieldType(String xmlType)
Gets the proper field type for an XML type string in a label instance.

Parameters:
xmlType - the XML type string
Returns:
the field type corresponding to the XML type

getXMLType

public String getXMLType()
Gets the type string that will occur in XML labels.

Returns:
the XML type string

getAdapter

public FieldAdapter getAdapter()
Gets a field adapter for this field type.

Returns:
the field adapter

isRightJustified

public boolean isRightJustified()
Tests whether the field should be right justified on output.

Returns:
true, if the field should be right justified, false otherwise


Copyright © 2013. All Rights Reserved.