This section describes the signature and description for each available UN/EDIFACT OTD method.
public java.lang.String[] check() |
Validates the content of the OTD data tree at runtime and returns a string array of validation errors for the message body only; validation errors for envelope segments are not included. To include envelope segments, see the checkAll() method below.
The method returns null if there are no validation errors.
None.
public java.lang.String[] checkAll() |
Validates the content of the OTD data tree at runtime and returns a string array of validation errors for the message body and the envelope segments. The checkAll() method is only available for fully enveloped OTDs.
The method returns null if there are no validation errors.
None.
public java.lang.Object clone() |
Creates and returns a copy of this OTD instance.
java.lang.CloneNotSupportedException
public int countxxx() |
where xxx is the bean name for repeatable nodes.
Counts the repetitions of the node at runtime.
None.
public int countLoopxxx() |
where xxx is the bean node for a repeatable segment loop.
Counts the repetitions of the loop at runtime.
None.
public item getxxx() |
where xxx is the bean name for the node and where item is the Java type for the node.
public item[] getxxx() |
where xxx is the bean name for the repeatable node and where item[] is the Java type for the node.
Returns the node object or the object array for the node.
None.
public java.lang.String[] getAllErrors() |
Returns all the validation errors as a string array. These validation errors include errors encountered during unmarshaling input data and the validation results from both the message and the envelope segments.
None.
public char getDecimalMark() |
Returns the decimal mark.
None.
public char getElementSeparator() |
Gets the elementSeparator character.
None.
com.stc.edifact_v3_d95B.EDF_..._...Outer myOTD=new com.stc .edifact_v3_d95B.EDF_..._Outer(); ...... ...... char elmSep=myOTD.getElementSeparator(); |
public com.stc.otd.runtime.edi.FGError[] getFGValidationResult() |
Returns the validation errors for the functional group envelope in the format of an FGError array. This method is available only at the Outer and Inner root levels of fully-evenloped OTDs.
None.
public com.stc.otd.runtime.edi.ICError[] getICValidationResult() |
Returns the validation errors for the interchange envelope in the format of an ICError array. This method is available only at the Outer and Inner root levels of fully-evenloped OTDs.
None.
public byte[] getInputSource() |
Returns the byte array of the original input data source.
None.
public item getLoopxxx() |
where Loopxxx is the bean name for the segment loop and where item is the Java type for the segment loop.
public item[] getLoopxxx() |
where Loopxxx is the bean name for the repeatable segment loop and where item[] is the Java type for the repeatable segment loop.
Returns the segment loop object or the object array for the segment loop.
None.
public int getMaxDataError() |
Returns the maximum number of message validation errors held in the msgValidationResult bean node. If this method returns -1 there is no limit of how many errors can be reported.
None.
public int getMaxFreedSegsComsNum() |
Returns the maximum number of segment and composite objects marked to be freed from memory.
None.
public int getMaxParsedSegsComsNum() |
Returns the maximum number of segments and composite objects to be parsed.
None.
public java.long.Boolean getMarshalUNA() |
Returns the Boolean value to indicate whether or not the UNA segment is to be marshaled. This method is only available at the top “outer” level of the OTD.
if the return value is java.lang.Boolean.TRUE, then UNA segment data is always included in the output message.
if the return value is java.lang.Boolean.FALSE, then UNA segment data is never included in the output message.
if the return value is null (or user never sets its value), then inclusion of UNA segment data in the output message is based on the following:
If any delimiter values are set through UNA segment object, the UNA segment data is included in the output message regardless of default or non-default delimiters are used. Otherwise,
if non-default delimiters are used, then UNA segment data is included in the output message.
if default delimiters are used, then UNA segment data is not included in the output message.
None.
public com.stc.otd.runtime.check.sef.DataError[] getMsgValidationResult() |
Returns the validation errors for the message body. Use this method after the performValidation() method. For information, refer to performValidation.
This method method is available at the Outer, Inner, and message root levels of fully-enveloped OTDs. It is also available at the top root level of non-enveloped OTDs.
None.
public char getRelease() |
Returns the release character.
None.
public char getRepetitionSeparator() |
Returns the repetition separator character.
None.
com.stc.edifact_v3_d95B.EDF_..._...Outer myOTD=new com.stc. edifact_v3_d95B.EDF_..._Outer(); ...... ...... char repSep=myOTD.getRepetitionSeparator(); |
public int getSegmentCount() |
Returns the segment count at the current level.
None.
public char getSegmentTerminator() |
Returns the segment terminator character.
None.
com.stc.edifact_v3_d95B.EDF_..._...Outer myOTD=new com.stc.edifact_v3_d95B.EDF_..._Outer(); ...... ...... char segTerm=myOTD.getSegmentTerminator(); |
public char getSubelementSeparator() |
Returns the subelement/composite element separator character.
None.
com.stc.edifact_v3_d95B.EDF_..._...Outer myOTD=new com.stc.edifact_v3_d95B.EDF_..._Outer(); ...... ...... char subeleSep=myOTD.getSubelementSeparator(); |
public com.stc.otd.runtime.edi.TSError[] getTSValidationResult() |
Returns the validation errors for the message envelope (segments UNH/UIH and UNT/UIT) in the format of an TSError array. This method is available only in the Outer, Inner, and message root levels of fully enveloped OTDs. It is also available at the top root level of non-enveloped OTDs.
None.
public com.stc.otd.runtime.check.sef.DataError[] getUnmarshalError() |
Returns the unmarshal errors as an array of the DataError objects. The unmarshal errors are reported from an UnmarshalException generated during unmarshaling. Usually these errors are associated with otd.isUnmarshalComplete=false.
None.
public boolean hasxxx() |
where xxx is the bean name for the node.
Verifies if the node is present in the runtime data.
None.
public boolean hasLoopxxx() |
where Loopxxx is the bean name for the segment loop.
Verifies if the segment loop is present in the runtime data.
None.
public boolean isUnmarshalComplete() |
Flag for whether or not unmarshaling completed successfully. For more information, see On Demand Parsing and Errors and Exceptions.
None.
public void marshal(com.stc.otd.runtime.OtdOutputStream) |
Marshals the internal data tree into an output stream. For more information, see On Demand Parsing .
java.io.IOException for output problems
com.stc.otd.runtime.MarshalException for an inconsistent internal tree
public byte[] marshalToBytes() |
Marshals the internal data tree into a byte array.
java.io.IOException for output problems
com.stc.otd.runtime.MarshalException for an inconsistent internal tree
public java.lang.String marshalToString() |
Marshals the internal data tree into a String.
java.io.IOException for input problems
com.stc.otd.runtime.MarshalException for an inconsistent internal tree
public void performValidation() |
Performs validation on the OTD instance unmarshaled from input data.
You can access the validation results from a list of nodes, such as allErrors, msgValidationResult, and the node for reporting envelope errors (such as ICValidationResult, FGValidationResult, and TSValidationResult).
For more information, refer to UN/EDIFACT Validation Support.
None.
public void reset() |
Clears out any data and resources held by this OTD instance.
None.
public void setxxx(item) |
where xxx is the bean name for the node and where item is the Java type for the node.
public void setxxx(item[]) |
where xxx is the bean name for the repeatable node and where item[] is the Java type for the node.
Sets the node object or the object array for the node.
None.
public void setDecimalMark(char) |
Sets the decimal mark.
None.
public void setDefaultEdifactDelimiters() |
Sets the current delimiters to the default UN/EDIFACT delimiters:
segment terminator = ’
element separator = +
subelement separator = :
repetition separator = *
For more information, refer to Setting Delimiters and Indicators.
None
com.stc.edifact_v3_d95B.EDF_..._...Outer myOTD=new com.stc.edifact_v3_d95B.EDF_..._Outer(); ...... ...... myOTD.setDefaultEdifactDelimiters(); |
public void setElementSeparator(char) |
Sets the element separator character. For more information, refer to Setting Delimiters and Indicators.
None
com.stc.edifact_v3_d95B.EDF_..._...Outer myOTD=new com.stc. edifact_v3_d95B.EDF_..._Outer(); ...... ...... char c=’+’; myOTD.setElementSeparator(c); |
public void setLoopxxx(item) |
where Loopxxx is the bean name for the segment loop and where item is the Java type for the segment loop.
public void setLoopxxx(item[]) |
where Loopxxx is the bean name for the repeatable segment loop and where item[] is the Java type for the repeatable segment loop.
Sets the segment loop object or the object array for the segment loop.
None.
public void setMaxDataError(int) |
Returns the maximum number of message validation errors held in the msgValidationResult bean node. If this method returns -1 there is no limit of how many errors can be reported.
None.
public void setMaxFreedSegsComsNum(int) |
Sets the maximum number of segment and composite objects marked to be freed from memory. For more information, refer to On Demand Parsing.
None.
public void setMaxParsedSegsComsNum(int) |
Sets the maximum number of segments and composite objects to be parsed. For more information, refer to On Demand Parsing.
None.
public void setMarshalUNA (java.long.Boolean) |
Sets the Boolean value to indicate whether or not the UNA segment is to be marshaled. This method is only available at the top “outer” level of the OTD.
If the item is java.lang.Boolean.TRUE, then UNA segment data is always included in the output message.
If the item is java.lang.Boolean.FALSE, then UNA segment data is never included in the output message.
If the item is null (or user never sets its value), then inclusion of UNA segment data in the output message is based on the following:
If any delimiter values are set through UNA segment object, the UNA segment data is included in the output message regardless of default or non-default delimiters are used. Otherwise,
if non-default delimiters are used, then UNA segment data is included in the output message.
if default delimiters are used, then UNA segment data is not included in the output message.
For more information, refer to UNA Segment Support.
None.
public void setRelease(char) |
Sets the release character.
None.
public void setRepetitionSeparator(char) |
Sets the repetition separator character. For more information, refer to Setting Delimiters and Indicators.
None.
com.stc.edifact_v3_d95B.EDF_..._...Outer myOTD=new com.stc.edifact_v3_d95B.EDF_..._Outer(); ...... ...... char c=’*’; myOTD.setRepetitionSeparator(c); |
public void setSegmentTerminator(char) |
Sets the segment terminator character. For more information, refer to Setting Delimiters and Indicators.
None.
com.stc.edifact_v3_d95B.EDF_..._...Outer myOTD=new com.stc. edifact_v3_d95B.EDF_..._Outer(); ...... ...... char c=’~’; myOTD.setSegmentTerminator(c); |
public void setSubelementSeparator(char) |
Sets the subelement separator character. For more information, refer to Setting Delimiters and Indicators.
None.
com.stc.edifact_v3_d95B.EDF_..._...Outer myOTD=new com.stc. edifact_v3_d95B.EDF_..._Outer(); ...... ...... char c=’:’; myOTD.setSubelementSeparator(c); |
public void unmarshal(com.stc.otd.runtime.OtdInputStream) |
Unmarshals the given input into an internal data tree.
For more information, refer to On Demand Parsing and Errors and Exceptions.
java.io.IOException for output problems
com.stc.otd.runtime.UnmarshalException for a lexical or other mismatch
public void unmarshalFromBytes(byte[]) |
Unmarshals the given input byte array into an internal data tree.
java.io.IOException for input problems
com.stc.otd.runtime.UnmarshalException for an inconsistent internal tree
public void unmarshalFromString(java.lang.String) |
Unmarshals (deserializes, parses) the given input string into an internal data tree.
java.io.IOException for input problems
com.stc.otd.runtime.UnmarshalException for an inconsistent internal tree. This typically occurs when the OTD does not recognize the incoming message as X12.