com.americancoders.edi
Class TimeDE

java.lang.Object
  |
  +--com.americancoders.edi.DataElement
        |
        +--com.americancoders.edi.TimeDE

public class TimeDE
extends DataElement

class for Data Elements defined as Time

OBOE - Open Business Objects for EDI
An EDI and XML Translator Written In Java
Copyright 1998-2000 - American Coders, LTD - Raleigh NC USA
All rights reserved
American Coders, Ltd
P. O. Box 97462
Raleigh, NC 27624 USA
1-919-846-2014
http://www.americancoders.com

Version:
1.4.1
Author:
Joe McVerry, American Coders Ltd.

Fields inherited from class com.americancoders.edi.DataElement
description, id, maxLength, minLength, referenceId, required, sequence, value, xmlTag
 
Constructor Summary
TimeDE(java.lang.String inID, int inSequence, java.lang.String inDesc, char inRequired, int inMinLength, int inMaxLength)
          constructs a TimeDE object
TimeDE(java.lang.String inID, int inSequence, java.lang.String inDesc, char inRequired, int inMinLength, int inMaxLength, java.lang.String inXMLTag)
          constructs a TimeDE object
TimeDE(java.lang.String inTime, java.lang.String inID, int inSequence, java.lang.String inDesc, char inRequired, int inMinLength, int inMaxLength)
          constructs TimeDE object using an input string in the format HHMMSS where
some time fields are 4 characters long others maybe 6 or more.
TimeDE(java.lang.String inTime, java.lang.String inID, int inSequence, java.lang.String inDesc, char inRequired, int inMinLength, int inMaxLength, java.lang.String inXMLTag)
          constructs TimeDE object using an input string in the format HHMMSS where
some time fields are 4 characters long others maybe 6 or more.
 
Method Summary
 java.lang.String get()
          returns the date stored in HHMMSS format where HH is hour MM is minutes SS is seconds
 int get(int field)
          returns the date field as stored
 java.lang.String getFormattedText(int formatType)
          formats text of data element
Short Description of DataElement is defined in the class
value is the current value set in the object
 void set(int field, int value)
          sets a specific part of the date field
 void set(java.lang.String inTime)
          sets the value stored using an input string in the format HHMMSS where HH is hour MM is minutes SS is seconds,
 
Methods inherited from class com.americancoders.edi.DataElement
getDescription, getID, getLength, getMaxLength, getMinLength, getRequired, getSequence, getType, getXMLTag, setDescription, setID, setMaxLength, setMinLength, setRequired, setSequence, setValue, setXMLTag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeDE

public TimeDE(java.lang.String inID,
              int inSequence,
              java.lang.String inDesc,
              char inRequired,
              int inMinLength,
              int inMaxLength,
              java.lang.String inXMLTag)
constructs a TimeDE object
Parameters:
String - ID
int - sequence number within structure
String - Description
char - required
int - minimum allowed length
int - maximum allowed length
String - xml tag value

TimeDE

public TimeDE(java.lang.String inID,
              int inSequence,
              java.lang.String inDesc,
              char inRequired,
              int inMinLength,
              int inMaxLength)
constructs a TimeDE object
Parameters:
String - ID
int - sequence number within structure
String - Description
char - required
int - minimum allowed length
int - maximum allowed length

TimeDE

public TimeDE(java.lang.String inTime,
              java.lang.String inID,
              int inSequence,
              java.lang.String inDesc,
              char inRequired,
              int inMinLength,
              int inMaxLength,
              java.lang.String inXMLTag)
constructs TimeDE object using an input string in the format HHMMSS where
some time fields are 4 characters long others maybe 6 or more.
Parameters:
inTime - String field in format HHMMSS
String - ID
int - sequence number within structure
String - Description
char - required
int - minimum allowed length
int - maximum allowed length
String - xml tag value

TimeDE

public TimeDE(java.lang.String inTime,
              java.lang.String inID,
              int inSequence,
              java.lang.String inDesc,
              char inRequired,
              int inMinLength,
              int inMaxLength)
constructs TimeDE object using an input string in the format HHMMSS where
some time fields are 4 characters long others maybe 6 or more.
Parameters:
inTime - String field in format HHMMSS
String - ID
int - sequence number within structure
String - Description
char - required
int - minimum allowed length
int - maximum allowed length
Method Detail

get

public java.lang.String get()
returns the date stored in HHMMSS format where
Overrides:
get in class DataElement
Returns:
String in format HHMMSS

get

public int get(int field)
returns the date field as stored
Parameters:
int - field identifier
use the java.util.Calendar fields:
  1. HOUR
  2. MINUTE
  3. SECOND
Returns:
String in format HHMMSS
See Also:
Calendar

set

public void set(java.lang.String inTime)
sets the value stored using an input string in the format HHMMSS where
Overrides:
set in class DataElement
Parameters:
inTime - String field in format HHMMSS

set

public void set(int field,
                int value)
sets a specific part of the date field
Parameters:
int - field identifier
use the java.util.Calendar fields:
  1. HOUR
  2. MINUTE
  3. SECOND
int - value
See Also:
Calendar

getFormattedText

public java.lang.String getFormattedText(int formatType)
formats text of data element
Short Description of DataElement is defined in the class
value is the current value set in the object
Overrides:
getFormattedText in class DataElement
Parameters:
int - formatType
Returns:
String formatted string