com.americancoders.edi.x12
Class Parser

java.lang.Object
  |
  +--com.americancoders.edi.x12.Parser

public class Parser
extends java.lang.Object

class to parse input string for all defined ediObjects Transaction Sets
x12 dependent


Constructor Summary
Parser(java.io.File inFile)
          builds a transaction set by reading a file
Parser(java.lang.String inString)
          create a transaction set from input string
Parser(TransactionSet inTransactionSet)
          builds a parser from an existing transactionSet object
Parser(java.net.URL inURL, java.lang.String text)
          builds a transaction set by reading a file from a url
 
Method Summary
 Segment getFunctional_Group_Header()
          returns the parsed Functional Group Header
 Segment getFunctional_Group_Trailer()
          returns the parsed Functional Group Trailer
 Segment getInterchange_Control_Header()
          returns the parsed Interchange Control Header
 Segment getInterchange_Control_Trailer()
          returns the parsed Interchange Trailer Header
 TransactionSet getNextTransactionSet()
          returns the next transaction set that was parsed
 TransactionSet getTransactionSet()
          returns the transaction set that was parsed
 TransactionSet getTransactionSet(int pos)
          returns the transaction set at a specified postion
 int getTransactionSetCount()
          returns the number of transaction sets that were parsed
 void ParseString(java.lang.String inString)
          builds a transaction set from input string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Parser

public Parser(java.lang.String inString)
       throws java.lang.Exception
create a transaction set from input string
Parameters:
String - the edi document
Throws:
java.lang.Exception - - unknown transaction set, this transaction set is undefined to ediObjects

Parser

public Parser(java.io.File inFile)
       throws java.lang.Exception
builds a transaction set by reading a file
Parameters:
File - the filename containing the edi document
Throws:
java.lang.Exception - - unknown transaction set, this transaction set is undefined to ediObjects

Parser

public Parser(java.net.URL inURL,
              java.lang.String text)
       throws java.lang.Exception
builds a transaction set by reading a file from a url
Parameters:
URL - the URL containing the edi document
String - input text
Throws:
java.lang.Exception - - unknown transaction set, this transaction set is undefined to ediObjects

Parser

public Parser(TransactionSet inTransactionSet)
       throws java.lang.Exception
builds a parser from an existing transactionSet object
Parameters:
TransactionSet - the filename containing the edi document
Throws:
java.lang.Exception - - unknown transaction set, this transaction set is undefined to ediObjects
Method Detail

ParseString

public void ParseString(java.lang.String inString)
                 throws java.lang.Exception
builds a transaction set from input string
Parameters:
String - the edi document
Throws:
java.lang.Exception - - unknown transaction set, this transaction set is undefined to ediObjects

getTransactionSet

public TransactionSet getTransactionSet()
returns the transaction set that was parsed
Returns:
TransactionSet - the transaction set parsed when object was built.

getTransactionSet

public TransactionSet getTransactionSet(int pos)
                                 throws java.lang.Exception
returns the transaction set at a specified postion
Parameters:
int - - position of transaction set & @exception - vector out of bounds exception most likely will occur
Returns:
TransactionSet - the transaction set parsed when object was built.

getNextTransactionSet

public TransactionSet getNextTransactionSet()
                                     throws java.lang.Exception
returns the next transaction set that was parsed
Returns:
TransactionSet - the transaction set parsed when object was built. & @exception - vector out of bounds exception most likely will occur

getTransactionSetCount

public int getTransactionSetCount()
returns the number of transaction sets that were parsed
Returns:
int

getInterchange_Control_Header

public Segment getInterchange_Control_Header()
returns the parsed Interchange Control Header
Returns:
Segment

getFunctional_Group_Header

public Segment getFunctional_Group_Header()
returns the parsed Functional Group Header
Returns:
Segment

getFunctional_Group_Trailer

public Segment getFunctional_Group_Trailer()
returns the parsed Functional Group Trailer
Returns:
Segment

getInterchange_Control_Trailer

public Segment getInterchange_Control_Trailer()
returns the parsed Interchange Trailer Header
Returns:
Segment