Open Business Objects for EDI
v3.6.0

com.americancoders.edi
Interface ITokenizer

All Known Implementing Classes:
ACHTokenizer, EDIFactTokenizer, Tokenizer, TradacomsTokenizer, X12Tokenizer

public interface ITokenizer

interface for Tokenizers

OBOE - Open Business Objects for EDI

Part of the OBOE Basic Extended Package
An EDI and XML Translator Written In Java
Copyright 1998-2009 - 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:
3.6.0
Author:
Joe McVerry - American Coders, Ltd.

Method Summary
 int countDataElements()
          number of dataelements in token string
 java.lang.String getCurrentDataElement()
          get the contents for the current data element
 java.lang.String getDataElementAt(int pos)
          returns data element at preparsed position
 int getDataElementPos()
          gets the position within segment or composite of the current data element
 java.lang.String getElementSeparator()
          returns the element delimiter
 java.lang.String getEscapeCharacters()
          returns the escape character string
 int getInputByteCount()
          returns the byte position in the input stream of the current token
 java.lang.String getNextDataElement()
          look ahead to the next data element
 com.americancoders.edi.IDataTokenizer getNextSegment(com.americancoders.edi.SegmentContainer inSegContainer)
          gets the next DataTokenizer object
 java.lang.String getRepeaterCharacter()
          returns the repeater delimiter
 int getSegmentPos()
          gets the current segment position within tokenized object
 int getSegmentPosition()
          returns the relative segment position
 boolean hasMoreDataElements()
          determine if there are more data elements to parse in token
 boolean hasMoreSegments()
          determine if there are more segments to parse
 boolean isThereADataElement()
          is there a data element to parse or a segment
 com.americancoders.edi.IDataTokenizer makeSubfieldTokenizer()
          turn the current tokenizer into a subfield tokenizer
 void reportError(java.lang.String inDescription)
          adds an error description to the OBOEParserErrors object
 void reportError(java.lang.String inDescription, com.americancoders.edi.SegmentContainer inRequestingContainer, java.lang.String inCode, java.lang.Object inObject, int inInt)
          adds an error description to the OBOEParserErrors object
 com.americancoders.edi.IDataTokenizer resetSegment()
          reset for look ahead
 java.lang.String toString()
           
 

Method Detail

countDataElements

public int countDataElements()
number of dataelements in token string

Returns:
int

getCurrentDataElement

public java.lang.String getCurrentDataElement()
get the contents for the current data element

Returns:
String

getDataElementPos

public int getDataElementPos()
gets the position within segment or composite of the current data element

Returns:
int

getNextDataElement

public java.lang.String getNextDataElement()
look ahead to the next data element

Returns:
String

getDataElementAt

public java.lang.String getDataElementAt(int pos)
returns data element at preparsed position

Parameters:
pos - int position
Returns:
String may return null

getNextSegment

public com.americancoders.edi.IDataTokenizer getNextSegment(com.americancoders.edi.SegmentContainer inSegContainer)
gets the next DataTokenizer object

Parameters:
inSegContainer - SegmentContainer requesting the next segment. Used for error handling and recovery.
Returns:
IDataTokenizer

getSegmentPos

public int getSegmentPos()
gets the current segment position within tokenized object

Returns:
int

hasMoreDataElements

public boolean hasMoreDataElements()
determine if there are more data elements to parse in token

Returns:
true or false

hasMoreSegments

public boolean hasMoreSegments()
determine if there are more segments to parse

Returns:
true or false

isThereADataElement

public boolean isThereADataElement()
is there a data element to parse or a segment

Returns:
true - data element false - segment

resetSegment

public com.americancoders.edi.IDataTokenizer resetSegment()
reset for look ahead

Returns:
IDataTokenizer

makeSubfieldTokenizer

public com.americancoders.edi.IDataTokenizer makeSubfieldTokenizer()
turn the current tokenizer into a subfield tokenizer

Returns:
IDataTokenizer

reportError

public void reportError(java.lang.String inDescription)
adds an error description to the OBOEParserErrors object

Parameters:
inDescription - description of the error,

reportError

public void reportError(java.lang.String inDescription,
                        com.americancoders.edi.SegmentContainer inRequestingContainer,
                        java.lang.String inCode,
                        java.lang.Object inObject,
                        int inInt)
adds an error description to the OBOEParserErrors object

Parameters:
inDescription - description of the error,
inRequestingContainer - segment, table...
inCode - 720 code
inObject - object reporting erro
inInt - level of error

getEscapeCharacters

public java.lang.String getEscapeCharacters()
returns the escape character string

Returns:
String

getRepeaterCharacter

public java.lang.String getRepeaterCharacter()
returns the repeater delimiter

Returns:
String

getElementSeparator

public java.lang.String getElementSeparator()
returns the element delimiter

Returns:
String

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getInputByteCount

public int getInputByteCount()
returns the byte position in the input stream of the current token

Returns:
int

getSegmentPosition

public int getSegmentPosition()
returns the relative segment position

Returns:
int

Open Business Objects for EDI
v3.6.0


OBOE is a trademark or registered trademark of American Coders, Ltd. in the US and other countries.
Copyright 1999-2004 American Coders, Ltd.
POB 97462
Raleigh NC 27624 USA
All Rights Reserved.