|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.americancoders.edi.SegmentContainer | +--com.americancoders.edi.Segment
class for Segments 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
Field Summary | |
protected java.lang.Object[] |
deArray
|
protected java.lang.String |
description
|
protected java.lang.String |
id
|
protected TemplateSegment |
myTemplate
|
protected int |
occurs
|
protected char |
required
|
protected int |
sequence
|
protected java.lang.String |
xmlTag
|
Fields inherited from class com.americancoders.edi.SegmentContainer |
segmentArray,
templateSegmentVector |
Constructor Summary | |
Segment(java.lang.String inId,
int inSequence,
java.lang.String inShortDescription,
int inOccurs,
char inRequired)
create a Segment, defaults the xmltag to the field id value |
|
Segment(java.lang.String inId,
int inSequence,
java.lang.String inShortDescription,
int inOccurs,
char inRequired,
java.lang.String inXMLTag)
create a Segment |
|
Segment(TemplateSegment inTemplateSegment)
create a Segment based on its template |
Method Summary | |
void |
addCompositeDE(CompositeDE inCDE)
adds a composite DE to vector |
void |
addDataElement(DataElement inDE)
adds a DE to vector |
java.lang.Object |
buildDE(int pos)
defines a dataelement by the predefined templateDE array |
Segment |
createSegment(java.lang.String ID)
this is here as a stub because of the segment container interface |
java.lang.String |
get()
returns all the data associated with the Segment |
CompositeDE |
getCompositeDE(int inSequence)
returns a compositeDE by its position |
CompositeDE |
getCompositeDE(java.lang.String inID)
returns a compositeDE by its id |
DataElement |
getDataElement(int inSequence)
returns a data element by its sequence number, not location within vector |
DataElement |
getDataElement(java.lang.String inID)
returns a data element by its id |
int |
getDataElementSize()
returns the number of defined data element |
java.lang.String |
getDescription()
returns the Short Description for the Segment |
java.lang.String |
getFormattedText(int formatType)
returns the formatted text |
java.lang.String |
getID()
gets the segment id |
int |
getOccurs()
returns the occurs value |
char |
getRequired()
returns the required flag |
int |
getSegmentCount()
returns the number of subsegments and itself |
int |
getSegmentSize()
returns the number of segments within this segment |
int |
getSequence()
gets the segment sequence |
TemplateSegment |
getTemplate()
returns the TemplateSegment used to build the Segment |
java.lang.String |
getXMLTag()
returns the xml tag field |
boolean |
isCompositeDE(int inSequence)
returns a boolean if vector position held by a composite |
boolean |
isDataElement(int inSequence)
returns a boolean if vector position held by a data element |
ITokenizer |
parse(ITokenizer TransactionTokenizedString)
parses a EDI Document, this maybe x12 dependent. |
void |
parse(org.w3c.dom.Node node)
parses a XML EDI Document adds to datalement vector or compositeDE and adds to secondary segment vector |
void |
setDescription(java.lang.String inDesc)
sets Description for the Segmemt param String description |
void |
setID(java.lang.String inId)
sets the segment id |
void |
setOccurs(int inOccurs)
sets the occurs value |
void |
setRequired(char inRequired)
sets the required flag |
void |
setSequence(int inSequence)
sets the segment sequence |
void |
setXMLTag(java.lang.String inXMLTag)
sets the xmltag field |
boolean |
validate()
used to verify if the segment is built correctly. |
Methods inherited from class com.americancoders.edi.SegmentContainer |
addSegment,
addSegment,
addSegmentToVector,
addTemplateSegment,
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 |
protected java.lang.String id
protected int sequence
protected java.lang.String description
protected java.lang.Object[] deArray
protected TemplateSegment myTemplate
protected int occurs
protected char required
protected java.lang.String xmlTag
Constructor Detail |
public Segment(TemplateSegment inTemplateSegment) throws java.lang.Exception
TemplateSegment
- predefined templatepublic Segment(java.lang.String inId, int inSequence, java.lang.String inShortDescription, int inOccurs, char inRequired, java.lang.String inXMLTag) throws java.lang.Exception
String
- idint
- sequenceString
- descriptionint
- occurschar
- requiredString
- xmltagpublic Segment(java.lang.String inId, int inSequence, java.lang.String inShortDescription, int inOccurs, char inRequired) throws java.lang.Exception
String
- idint
- sequenceString
- descriptionint
- occurs
8 @param char requiredMethod Detail |
public TemplateSegment getTemplate()
TemplateSegment
- public void setID(java.lang.String inId)
String
- idpublic java.lang.String getID()
public void setOccurs(int inOccurs)
int
- occurance valuepublic int getOccurs()
public void setRequired(char inRequired)
char
- required flagpublic char getRequired()
public void setXMLTag(java.lang.String inXMLTag)
String
- xmltagpublic java.lang.String getXMLTag()
public void setSequence(int inSequence)
int
- sequence numberpublic int getSequence()
public Segment createSegment(java.lang.String ID) throws java.lang.Exception
String
- idpublic void setDescription(java.lang.String inDesc)
public java.lang.String getDescription()
public ITokenizer parse(ITokenizer TransactionTokenizedString) throws java.lang.Exception
ITokenizer
- input tokenized stringITokenizer
- what is leftpublic void parse(org.w3c.dom.Node node) throws java.lang.Exception
Node
- input XML nodepublic java.lang.Object buildDE(int pos)
int
- position in templateDE arraypublic void addCompositeDE(CompositeDE inCDE)
compositeDE
- public void addDataElement(DataElement inDE)
DataElement
- public boolean validate()
public int getSegmentCount()
public int getSegmentSize()
public java.lang.String getFormattedText(int formatType)
int
- public java.lang.String get() throws java.lang.Exception
public int getDataElementSize()
public DataElement getDataElement(java.lang.String inID)
String
- id of the data elementpublic DataElement getDataElement(int inSequence)
int
- sequence number of data elementpublic CompositeDE getCompositeDE(java.lang.String inID)
String
- id of the compositepublic CompositeDE getCompositeDE(int inSequence)
int
- position of the compositepublic boolean isDataElement(int inSequence)
int
- sequence number of vector elementpublic boolean isCompositeDE(int inSequence)
int
- sequence number of vector element
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |