com.americancoders.edi
Class Table

java.lang.Object
  |
  +--com.americancoders.edi.SegmentContainer
        |
        +--com.americancoders.edi.Table

public class Table
extends SegmentContainer
implements ITemplateSegmentContainer, java.io.Externalizable

class for Tables a general class for the transaction set's heading detail and summary.

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.
See Also:
Serialized Form

Field Summary
protected  java.lang.String xmlTag
           
 
Fields inherited from class com.americancoders.edi.SegmentContainer
segmentArray, templateSegmentVector
 
Constructor Summary
Table()
          constructor takes no parameters
 
Method Summary
 boolean doYouWantThisNode(org.w3c.dom.Node node)
          tests if the node is part of this table
 java.lang.String get()
          returns the Table in an EDI document format
 java.lang.String getFormattedText(int formatType)
          returns a preformatted string
 java.lang.String getID()
          returns the table id, since there are no tables id it returns a ""
 int getSegmentCount()
          returns the total number of segments in use within the the table this includes the count of subsegments
 java.lang.String getXMLTag()
          returns the xml tag field
 void parse(ITokenizer TransactionTokenizedString)
          parses an EDI Document
 void parse(org.w3c.dom.Node node)
          parses a XML EDI Document
 void readExternal(java.io.ObjectInput in)
          used by externalize methods
 void setXMLTag(java.lang.String inXMLTag)
          sets the xml tag field
 boolean validate()
          validates if the table is defined correctly
 void writeExternal(java.io.ObjectOutput out)
          used by externalize methods
 
Methods inherited from class com.americancoders.edi.SegmentContainer
addSegment, addSegment, addSegmentToVector, addTemplateSegment, createSegment, defineSegmentArray, getSegment, getSegment, getSegment, getSubsegmentCount, getTemplateSegment, getTemplateSegment, getTemplateSegmentSize, isSegment, isVector, removeSegment, removeSegment, removeSegment, removeSegment, setSegmentAt, setSegmentAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xmlTag

protected java.lang.String xmlTag
Constructor Detail

Table

public Table()
constructor takes no parameters
Method Detail

parse

public void parse(ITokenizer TransactionTokenizedString)
           throws java.lang.Exception
parses an EDI Document
Parameters:
ITokenizer - input string containing all of the transaction data pretokened by EDIObjects.Tokenizer
Throws:
java.lang.Exception - thrown when the transaction id string is incorrect
java.lang.Exception - thrown when an unknown segment id string is foundi

parse

public void parse(org.w3c.dom.Node node)
           throws java.lang.Exception
parses a XML EDI Document
Parameters:
Node - DOM XML Node
Throws:
java.lang.Exception - thrown when the transaction id string is incorrect
java.lang.Exception - thrown when an unknown segment id string is foundi

doYouWantThisNode

public boolean doYouWantThisNode(org.w3c.dom.Node node)
                          throws java.lang.Exception
tests if the node is part of this table
Parameters:
Node - XML Node
Returns:
boolean
Throws:
java.lang.Exception - thrown when the transaction id string is incorrect
java.lang.Exception - thrown when an unknown segment id string is foundi

validate

public boolean validate()
validates if the table is defined correctly
Returns:
boolean true if built correctly

get

public java.lang.String get()
                     throws java.lang.Exception
returns the Table in an EDI document format
Returns:
String

getSegmentCount

public int getSegmentCount()
returns the total number of segments in use within the the table this includes the count of subsegments
Returns:
int

getFormattedText

public java.lang.String getFormattedText(int formatType)
returns a preformatted string
Parameters:
int - type - TransactionSet.XML_FORMAT returns a string of the entire table. default is plain text
Returns:
String

getID

public java.lang.String getID()
returns the table id, since there are no tables id it returns a ""
Overrides:
getID in class SegmentContainer
Returns:
String

setXMLTag

public void setXMLTag(java.lang.String inXMLTag)
sets the xml tag field
Parameters:
String - xml tag value

getXMLTag

public java.lang.String getXMLTag()
returns the xml tag field
Returns:
String tag value

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
used by externalize methods
Specified by:
readExternal in interface java.io.Externalizable
Parameters:
ObjectInput - object input stream
Throws:
java.io.IOException - - most likely class changed since written
java.lang.ClassNotFoundException - - only when dummy constructro not found

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
used by externalize methods
Specified by:
writeExternal in interface java.io.Externalizable
Parameters:
ObjectInput - object input stream
Throws:
java.io.IOException -