public class MxSetr01600201_MT509_Translation extends
Modifier | Constructor and Description |
---|---|
|
MxSetr01600201_MT509_Translation()
Creates the translation class initializing it with the proper MX identification.
|
protected |
MxSetr01600201_MT509_Translation(MxId mxId,
String mxDescription)
This constructor is intended for subclasses to override the translation rules for other versions of MX.
|
Modifier and Type | Method and Description |
---|---|
Boolean |
logicalMessageCriteriaCheck(MxSetr01600201 source)
Message criteria check
This method checks the content of the source MxSetr01600201 and determines if it can be translated to the target MT509 |
List<PreconditionError> |
preconditionsCheck(MxSetr01600201 source)
Precondition check
This method checks the precondition on the content of the source MxSetr01600201 |
void |
preconditionSR1Check(MxSetr01600201 source)
Precondition check
This method checks the precondition SR1 on the content of the source MxSetr01600201 IF ((IndividualOrderDetailsReport\Cancelled\ExtendedReason IsPresent) And (Not (IndividualOrderDetailsReport\Cancelled\ExtendedReason Matches '[A-Z0-9]{4}'))) THEN Fail ('05147', 'Extended Reason must be 4 upper case characters.', IndividualOrderDetailsReport\Cancelled\ExtendedReason) END |
void |
preconditionSR2Check(MxSetr01600201 source)
Precondition check
This method checks the precondition SR2 on the content of the source MxSetr01600201 IF ((IndividualOrderDetailsReport\Rejected\ExtendedReason IsPresent) And (Not (IndividualOrderDetailsReport\Rejected\ExtendedReason Matches '[A-Z0-9]{4}'))) THEN Fail ('05147', 'Extended Reason must be 4 upper case characters.', IndividualOrderDetailsReport\Rejected\ExtendedReason) END |
MT509 |
translate(MxSetr01600201 source)
Main entry point for the translation
|
protected void |
translateImpl(MxSetr01600201 source)
Translation rules implementation
|
protected void |
translateISODateTime_98C_Default(String targetElement,
XmlNode node)
Translate method ISODateTime -> 98C : Default
1 TRANSLATE(ISODateTime, 98C) 2 RULE 3 NODE (Date) 4 IF (Not ((ISODateTime Matches '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]*Z?') Or (((ISODateTime Matches '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z') Or (ISODateTime Matches '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[+-][0-9]{2}:[0-9]{2}')) Or (ISODateTime Matches '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]*[+-][0-9]{2}:[0-9]{2}')))) 5 THEN 6 ISODateTime TranslateTo Date 7 END 8 END 9 NODE (Time) 10 IF (Not ((ISODateTime Matches '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]*Z?') Or (((ISODateTime Matches '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z') Or (ISODateTime Matches '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[+-][0-9]{2}:[0-9]{2}')) Or (ISODateTime Matches '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]*[+-][0-9]{2}:[0-9]{2}')))) 11 THEN 12 ISODateTime TranslateTo Time 13 END 14 END 15 END 16 END |
protected void |
translateISODateTime_98E_1_Default(String targetElement,
XmlNode node)
Translate method ISODateTime -> 98E_1 : Default
27 TRANSLATE(ISODateTime, 98E_1) 28 RULE 29 NODE (Date) 30 IF ((((ISODateTime Matches '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]*Z?') Or (ISODateTime Matches '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z')) Or (ISODateTime Matches '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[+-][0-9]{2}:[0-9]{2}')) Or (ISODateTime Matches '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]*[+-][0-9]{2}:[0-9]{2}')) 31 THEN 32 ISODateTime TranslateTo Date 33 END 34 END 35 NODE (Time) 36 IF ((((ISODateTime Matches '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]*Z?') Or (ISODateTime Matches '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z')) Or (ISODateTime Matches '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[+-][0-9]{2}:[0-9]{2}')) Or (ISODateTime Matches '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]*[+-][0-9]{2}:[0-9]{2}')) 37 THEN 38 ISODateTime TranslateTo Time 39 END 40 END 41 NODE (Decimals) 42 IF ((ISODateTime Matches '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]*Z?') Or (ISODateTime Matches '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]*[+-][0-9]{2}:[0-9]{2}')) 43 THEN 44 ISODateTime TranslateTo Decimals 45 END 46 END 47 NODE (UTC Indicator) 48 IF ((((ISODateTime Matches '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]*Z?') Or (ISODateTime Matches '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z')) Or (ISODateTime Matches '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[+-][0-9]{2}:[0-9]{2}')) Or (ISODateTime Matches '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]*[+-][0-9]{2}:[0-9]{2}')) 49 THEN 50 ISODateTime TranslateTo UTC Indicator 51 END 52 END 53 END 54 END |
protected void |
translateISODateTime_DateTime_HHMMSS_Default(String targetElement,
XmlNode node)
Translate method ISODateTime -> DateTime_HHMMSS : Default
22 TRANSLATE(ISODateTime, DateTime_HHMMSS) 23 RULE 24 (ISODateTime FormatDateTime ('MX_DateTime', 'MT_HHMMSS')) CopyTo DateTime_HHMMSS 25 END 26 END |
protected void |
translateISODateTime_DateTime_UTCIndicator_1_Default(String targetElement,
XmlNode node)
Translate method ISODateTime -> DateTime_UTCIndicator_1 : Default
71 TRANSLATE(ISODateTime, DateTime_UTCIndicator_1) 72 RULE 73 IF (ISODateTime Matches '.*-00:00') 74 THEN 75 '0000' CopyTo DateTime_UTCIndicator_1 76 ELSE 77 (ISODateTime FormatDateTime ('MX_DateTime', 'MT_UTCIndicator')) CopyTo DateTime_UTCIndicator_1 78 END 79 END 80 END |
protected void |
translateISODateTime_DateTime_YYYYMMDD_Default(String targetElement,
XmlNode node)
Translate method ISODateTime -> DateTime_YYYYMMDD : Default
17 TRANSLATE(ISODateTime, DateTime_YYYYMMDD) 18 RULE 19 (ISODateTime FormatDateTime ('MX_DateTime', 'MT_YYYYMMDD')) CopyTo DateTime_YYYYMMDD 20 END 21 END |
protected void |
translateISODateTime_Quantity_FIN_3n_Default(String targetElement,
XmlNode node)
Translate method ISODateTime -> Quantity_FIN_3n : Default
55 TRANSLATE(ISODateTime, Quantity_FIN_3n) 56 RULE 57 IF (ISODateTime Matches '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]*') 58 THEN 59 (ISODateTime Substring (((ISODateTime Find '.') Add '1'), '3')) CopyTo Quantity_FIN_3n 60 END 61 IF (ISODateTime Matches '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]*[+-][0-9]{2}:[0-9]{2}') 62 THEN 63 (((ISODateTime Substring '1') ExtractPattern ('\.', '[+-]')) Substring ('2', '3')) CopyTo Quantity_FIN_3n 64 END 65 IF (ISODateTime Matches '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]*Z') 66 THEN 67 (((ISODateTime Substring '1') ExtractPattern ('\.', 'Z')) Substring ('2', '3')) CopyTo Quantity_FIN_3n 68 END 69 END 70 END |
protected void |
translateRestrictedFINMax210Text_Text_FIN_6M35x_1_Default(String targetElement,
XmlNode node)
Translate method RestrictedFINMax210Text -> Text_FIN_6M35x_1 : Default
81 TRANSLATE(RestrictedFINMax210Text, Text_FIN_6M35x_1) 82 RULE 83 NODE (Line) 84 (RestrictedFINMax210Text Substring ('1', '35')) CopyTo Line[1] 85 END 86 NODE (Line) 87 (RestrictedFINMax210Text Substring ('36', '35')) CopyTo Line[2] 88 END 89 NODE (Line) 90 (RestrictedFINMax210Text Substring ('71', '35')) CopyTo Line[3] 91 END 92 NODE (Line) 93 (RestrictedFINMax210Text Substring ('106', '35')) CopyTo Line[4] 94 END 95 NODE (Line) 96 (RestrictedFINMax210Text Substring ('141', '35')) CopyTo Line[5] 97 END 98 NODE (Line) 99 (RestrictedFINMax210Text Substring ('176', '35')) CopyTo Line[6] 100 END 101 END 102 END |
public MxSetr01600201_MT509_Translation()
public final MT509 translate(MxSetr01600201 source) throws LogicalMessageCriteriaException, TranslationPreconditionException
source
- a well formed MxSetr01600201 objectLogicalMessageCriteriaException
TranslationPreconditionException
protected final void translateImpl(MxSetr01600201 source) throws LogicalMessageCriteriaException, TranslationPreconditionException
source
- a well formed MxSetr01600201 objectLogicalMessageCriteriaException
TranslationPreconditionException
protected void translateISODateTime_98C_Default(String targetElement, XmlNode node)
source
- translation source message to read content fromcontent
- content to translate, gathered from a source selectortargetElement
- selector in target class where translated code will be addedprotected void translateISODateTime_DateTime_YYYYMMDD_Default(String targetElement, XmlNode node)
source
- translation source message to read content fromcontent
- content to translate, gathered from a source selectortargetElement
- selector in target class where translated code will be addedprotected void translateISODateTime_DateTime_HHMMSS_Default(String targetElement, XmlNode node)
source
- translation source message to read content fromcontent
- content to translate, gathered from a source selectortargetElement
- selector in target class where translated code will be addedprotected void translateISODateTime_98E_1_Default(String targetElement, XmlNode node)
source
- translation source message to read content fromcontent
- content to translate, gathered from a source selectortargetElement
- selector in target class where translated code will be addedprotected void translateISODateTime_Quantity_FIN_3n_Default(String targetElement, XmlNode node)
source
- translation source message to read content fromcontent
- content to translate, gathered from a source selectortargetElement
- selector in target class where translated code will be addedprotected void translateISODateTime_DateTime_UTCIndicator_1_Default(String targetElement, XmlNode node)
source
- translation source message to read content fromcontent
- content to translate, gathered from a source selectortargetElement
- selector in target class where translated code will be addedprotected void translateRestrictedFINMax210Text_Text_FIN_6M35x_1_Default(String targetElement, XmlNode node)
source
- translation source message to read content fromcontent
- content to translate, gathered from a source selectortargetElement
- selector in target class where translated code will be addedpublic final Boolean logicalMessageCriteriaCheck(MxSetr01600201 source)
source
- a well formed MxSetr01600201 objectpublic final void preconditionSR1Check(MxSetr01600201 source) throws TranslationPreconditionException
source
- a well formed MxSetr01600201 objectTranslationPreconditionException
public final void preconditionSR2Check(MxSetr01600201 source) throws TranslationPreconditionException
source
- a well formed MxSetr01600201 objectTranslationPreconditionException
public final List<PreconditionError> preconditionsCheck(MxSetr01600201 source)