gov.nasa.pds.objectAccess.table
Enum DelimiterType

java.lang.Object
  extended by java.lang.Enum<DelimiterType>
      extended by gov.nasa.pds.objectAccess.table.DelimiterType
All Implemented Interfaces:
Serializable, Comparable<DelimiterType>

public enum DelimiterType
extends Enum<DelimiterType>

Defines a set of field and record delimiters for a table. Indicates the type string that will be found in XML label instances, and the character representation of the type for a field delimiter, or the string representation of the type for a record delimiter.


Enum Constant Summary
CARRIAGE_RETURN_LINE_FEED
          Carriage return and line feed (CRLF) record delimiter.
COMMA
          Comma field delimiter.
HORIZONTAL_TAB
          Horizontal tab field delimiter.
SEMICOLON
          Semicolon field delimiter.
VERTICAL_BAR
          Vertical tab field delimiter.
 
Method Summary
static DelimiterType getDelimiterType(String xmlType)
          Gets the proper delimiter type for an XML type string in a label instance.
 char getFieldDelimiter()
          Gets the character value for this (field) delimiter type.
 String getRecordDelimiter()
          Gets the string value for this (record) delimiter type.
 String getXmlType()
          Gets the type string that will occur in XML labels.
static DelimiterType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static DelimiterType[] 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

COMMA

public static final DelimiterType COMMA
Comma field delimiter.


SEMICOLON

public static final DelimiterType SEMICOLON
Semicolon field delimiter.


HORIZONTAL_TAB

public static final DelimiterType HORIZONTAL_TAB
Horizontal tab field delimiter.


VERTICAL_BAR

public static final DelimiterType VERTICAL_BAR
Vertical tab field delimiter.


CARRIAGE_RETURN_LINE_FEED

public static final DelimiterType CARRIAGE_RETURN_LINE_FEED
Carriage return and line feed (CRLF) record delimiter.

Method Detail

values

public static DelimiterType[] 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 (DelimiterType c : DelimiterType.values())
    System.out.println(c);

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

valueOf

public static DelimiterType 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

getDelimiterType

public static DelimiterType getDelimiterType(String xmlType)
Gets the proper delimiter type for an XML type string in a label instance.

Parameters:
xmlType - the XML type string
Returns:
the delimiter 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

getFieldDelimiter

public char getFieldDelimiter()
Gets the character value for this (field) delimiter type.

Returns:
the field delimiter character

getRecordDelimiter

public String getRecordDelimiter()
Gets the string value for this (record) delimiter type.

Returns:
the record delimiter string


Copyright © 2013. All Rights Reserved.