com.ddtek.xmlconverter.adapter.edi
Interface EDISegmentDetails


public interface EDISegmentDetails

Contains information about the current segment. Many of the methods in "com.ddtek.xmlconverter.adapter.edi.EDIConverterListener" are notifications of a segment being processed. An EDISegmentDetails object is passed as a parameter to identify which segment is being processed.


Method Summary
 String getCodeListVersion()
          If there is a version of the codelists that is in context for the current segment, this returns that version.
 String getContentData(int element)
          Fetch a specific value from the segment currently being processed.
 String getContentData(int composite, int element)
          Fetch a specific value from the segment currently being processed.
 String getContentData(int composite, int subcomposite, int element)
          Fetch a specific value from the segment currently being processed.
 String getContentData(int composite, int subcomposite, int element, int repeat)
          Fetch a specific value from the segment currently being processed.
 String getControllingAgency()
          This is the controlling agency.
 String getDialect()
          The major EDI dialect
 String getHeaderVersion()
          If the header has the potential to be versioned differently than the payload, as for example EDIFACT and X12 allow, then this returns the version of the header.
 String getMessageRelease()
          This is the release of the current message or transaction set.
 String getMessageVersion()
          This is the version of the current message or transaction set.
 String getSegment()
          Name of current segment.
 int getSegmentNumber()
          The segment number of the current segment
 String getSyntaxLevel()
          For EDI dialects such as EDIFACT which have different levels of syntax support, the major version, such as 1, 2, 3 or 4, are returned by this method.
 String getSyntaxRelease()
          For EDI dialects such as EDIFACT which have different levels of syntax support, the minor version if specified.
 String getSystemVersion()
          If there is a version of the codelists that is in context for the most recently seen header segment.
 String getTransactionSet()
          Message name/Transaction set number, unless outside of a message, in which case null.
 

Method Detail

getSegment

String getSegment()
Name of current segment.


getSegmentNumber

int getSegmentNumber()
The segment number of the current segment


getTransactionSet

String getTransactionSet()
Message name/Transaction set number, unless outside of a message, in which case null.


getDialect

String getDialect()
The major EDI dialect

Returns:
This will be a string such as (but not limited to) EDIFACT, EANCOM, IATA, HL7, or X12.

getContentData

String getContentData(int element)
Fetch a specific value from the segment currently being processed.

Parameters:
element - The element sequence number, one-based.
Returns:
The element content at the specified location, or null if nothing exists there.

getContentData

String getContentData(int composite,
                      int element)
Fetch a specific value from the segment currently being processed.

Parameters:
composite - The composite element sequence number, one-based.
element - The element number within the above composite.
Returns:
The element content at the specified location, or null if nothing exists there.

getContentData

String getContentData(int composite,
                      int subcomposite,
                      int element)
Fetch a specific value from the segment currently being processed.

Parameters:
composite - The composite element sequence number, one-based.
subcomposite - The sub-composite element sequence number within the above composite.
element - The element number within the above sub-composite.
Returns:
The element content at the specified location, or null if nothing exists there.

getContentData

String getContentData(int composite,
                      int subcomposite,
                      int element,
                      int repeat)
Fetch a specific value from the segment currently being processed. This method has special properties, in that it can be used to retrieve repeating elements such as often used in HL7. To retrieve a repeating simple element, pass its index in the composite parameter and pass a 0 for the subcomposite and element arguments. To retrieve a repeating complex element, pass its index and sub-index in the composite and subcomposite parameters, and pass a 0 for the element argument. Remember that 0 is never a valid value for the repeat argument.

Parameters:
composite - The top level sequence number, one-based.
subcomposite - The second level sequence number, or 0 if not needed.
element - The third level sequence number, or 0 if not needed.
repeat - The repetition number of the top level element, one-based.
Returns:
The element content at the specified location, or null if nothing exists there.

getSyntaxLevel

String getSyntaxLevel()
For EDI dialects such as EDIFACT which have different levels of syntax support, the major version, such as 1, 2, 3 or 4, are returned by this method.

Returns:
Syntax level of active message if supported, or null if not supported or not in context yet of message.

getSyntaxRelease

String getSyntaxRelease()
For EDI dialects such as EDIFACT which have different levels of syntax support, the minor version if specified.

Returns:
Syntax release of active message if supported, or null if not supported, not supplied, or not in context yet of message.

getMessageVersion

String getMessageVersion()
This is the version of the current message or transaction set. In EDIFACT-based dialects, both getMessageVersion() and getMessageRelease() are used. In X12-based ones, getMessageRelease() holds the transaction set version number. In HL7, getMessageVersion() reports the message version.

Returns:
Message version, or null.
See Also:
getMessageRelease()

getMessageRelease

String getMessageRelease()
This is the release of the current message or transaction set. In EDIFACT-based dialects, both getMessageVersion() and getMessageRelease() are used. In X12-based ones, getMessageRelease() holds the transaction set version number. In HL7, getMessageVersion() reports the message version.

Returns:
Message release, or null.
See Also:
getMessageVersion()

getCodeListVersion

String getCodeListVersion()
If there is a version of the codelists that is in context for the current segment, this returns that version. Any validation or lookup of descriptions has been done against the codelist version specified here.

Returns:
The active codelist version for the current segment, or null.

getSystemVersion

String getSystemVersion()
If there is a version of the codelists that is in context for the most recently seen header segment. For example, EDIFACT allows in the de0110 element for the header to have a specific codelist version, and this would apply to UNS segments even in the message body.

Returns:
The active codelist version for the current segment, or null.

getHeaderVersion

String getHeaderVersion()
If the header has the potential to be versioned differently than the payload, as for example EDIFACT and X12 allow, then this returns the version of the header.

Returns:
The version of the EDI header or null if not appropriate or no header in context.

getControllingAgency

String getControllingAgency()
This is the controlling agency.

For X12, this is the full version number as specified in GS08, since the getMessageRelease() is set to the normalized six-digit version number. This way, user applications can query this field to get any 'X' suffix or extended version numbering for local dialects like HIPAA.

For EDIFACT, this comes from the UNH0204 or UIH0105 elements.

Returns:
The controlling agency as specified in the EDI header if supported, supplied and in context, or else null.