public class MT940_MxCamt05300102_Translation extends
Modifier | Constructor and Description |
---|---|
|
MT940_MxCamt05300102_Translation()
Creates the translation class initializing it with the proper MX identification.
|
protected |
MT940_MxCamt05300102_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(MT940 source)
Message criteria check
This method checks the content of the source MT940 and determines if it can be translated to the target MxCamt05300102 |
List<PreconditionError> |
preconditionsCheck(MT940 source)
Precondition check
This method checks the precondition on the content of the source MT940 |
void |
preconditionSR1Check(MT940 source)
Precondition check
This method checks the precondition SR1 on the content of the source MT940 IF (25 Account Identification IsPresent) THEN IF ((25 Account Identification\25 Length) GreaterThan '34') THEN Fail ('01053', 'Account Identification must be less than 35 characters.', 25 Account Identification\25) END END |
protected Integer |
resolveComponentNumber(String field,
String component)
Static mapping of fields component names into its correspondent component number
|
MxCamt05300102 |
translate(MT940 source)
Main entry point for the translation
|
protected void |
translate28C_Max5NumericText_SequenceNumber_not_present(String targetElement,
MtPathResult content)
Translate method 28C -> Max5NumericText : SequenceNumber not present
1 TRANSLATE(28C, Max5NumericText) 2 RULE 3 '1' CopyTo Max5NumericText 4 END 5 END |
protected void |
translate28C_Max5NumericText_SequenceNumber_present(String targetElement,
MtPathResult content)
Translate method 28C -> Max5NumericText : SequenceNumber present
6 TRANSLATE(28C, Max5NumericText) 7 RULE 8 Sequence Number CopyTo Max5NumericText 9 END 10 END |
protected void |
translate28C_YesNoIndicator_false(String targetElement,
MtPathResult content)
Translate method 28C -> YesNoIndicator : false
16 TRANSLATE(28C, YesNoIndicator) 17 RULE 18 'false' CopyTo YesNoIndicator 19 END 20 END |
protected void |
translate28C_YesNoIndicator_true(String targetElement,
MtPathResult content)
Translate method 28C -> YesNoIndicator : true
11 TRANSLATE(28C, YesNoIndicator) 12 RULE 13 'true' CopyTo YesNoIndicator 14 END 15 END |
protected void |
translate60F_4_BalanceType12Code_PRCD(String targetElement,
MtPathResult content)
Translate method 60F_4 -> BalanceType12Code : PRCD
31 TRANSLATE(60F_4, BalanceType12Code) 32 RULE 33 IF (60F_4 IsPresent) 34 THEN 35 'PRCD' CopyTo BalanceType12Code 36 END 37 END 38 END |
protected void |
translate60M_4_BalanceType12Code_ITBD(String targetElement,
MtPathResult content)
Translate method 60M_4 -> BalanceType12Code : ITBD
39 TRANSLATE(60M_4, BalanceType12Code) 40 RULE 41 IF (60M_4 IsPresent) 42 THEN 43 'ITBD' CopyTo BalanceType12Code 44 END 45 END 46 END |
protected void |
translate61_7_EntryStatus2Code_BOOK(String targetElement,
MtPathResult content)
Translate method 61_7 -> EntryStatus2Code : BOOK
177 TRANSLATE(61_7, EntryStatus2Code) 178 RULE 179 'BOOK' CopyTo EntryStatus2Code 180 END 181 END |
protected void |
translate62F_4_BalanceType12Code_CLBD(String targetElement,
MtPathResult content)
Translate method 62F_4 -> BalanceType12Code : CLBD
67 TRANSLATE(62F_4, BalanceType12Code) 68 RULE 69 IF (62F_4 IsPresent) 70 THEN 71 'CLBD' CopyTo BalanceType12Code 72 END 73 END 74 END |
protected void |
translate62M_4_BalanceType12Code_ITBD(String targetElement,
MtPathResult content)
Translate method 62M_4 -> BalanceType12Code : ITBD
75 TRANSLATE(62M_4, BalanceType12Code) 76 RULE 77 IF (62M_4 IsPresent) 78 THEN 79 'ITBD' CopyTo BalanceType12Code 80 END 81 END 82 END |
protected void |
translate64_4_BalanceType12Code_CLAV(String targetElement,
MtPathResult content)
Translate method 64_4 -> BalanceType12Code : CLAV
93 TRANSLATE(64_4, BalanceType12Code) 94 RULE 95 'CLAV' CopyTo BalanceType12Code 96 END 97 END |
protected void |
translate65_4_BalanceType12Code_FWAV(String targetElement,
MtPathResult content)
Translate method 65_4 -> BalanceType12Code : FWAV
118 TRANSLATE(65_4, BalanceType12Code) 119 RULE 120 IF (65_4 IsPresent) 121 THEN 122 'FWAV' CopyTo BalanceType12Code 123 END 124 END 125 END |
protected void |
translateAmount_FIN_15d_ActiveOrHistoricCurrencyAndAmount_Default(String targetElement,
MtPathResult content,
String currency)
Translate method Amount_FIN_15d -> ActiveOrHistoricCurrencyAndAmount : Default
98 TRANSLATE(Amount_FIN_15d, ActiveOrHistoricCurrencyAndAmount, currency:Currency) 99 RULE 100 NODE (Amount) 101 (Amount_FIN_15d FormatDecimal 'MX') CopyTo Amount 102 END 103 NODE (Currency) 104 $currency CopyTo Currency 105 END 106 END 107 END |
protected void |
translateAmount_FIN_15d_ActiveOrHistoricCurrencyAndAmountAmount_Default(String targetElement,
MtPathResult content)
Translate method Amount_FIN_15d -> ActiveOrHistoricCurrencyAndAmount\Amount : Default
47 TRANSLATE(Amount_FIN_15d, ActiveOrHistoricCurrencyAndAmount\Amount) 48 RULE 49 (Amount_FIN_15d FormatDecimal 'MX') CopyTo ActiveOrHistoricCurrencyAndAmount\Amount 50 END 51 END |
protected void |
translateCode_1a_1_CreditDebitCode_CRDT(String targetElement,
MtPathResult content)
Translate method Code_1!a_1 -> CreditDebitCode : CRDT
52 TRANSLATE(Code_1!a_1, CreditDebitCode) 53 RULE 54 'CRDT' CopyTo CreditDebitCode 55 END 56 END |
protected void |
translateCode_1a_1_CreditDebitCode_DBIT(String targetElement,
MtPathResult content)
Translate method Code_1!a_1 -> CreditDebitCode : DBIT
57 TRANSLATE(Code_1!a_1, CreditDebitCode) 58 RULE 59 'DBIT' CopyTo CreditDebitCode 60 END 61 END |
protected void |
translateCode_1a_27_CreditDebitCode_CRDT(String targetElement,
MtPathResult content)
Translate method Code_1!a_27 -> CreditDebitCode : CRDT
83 TRANSLATE(Code_1!a_27, CreditDebitCode) 84 RULE 85 'CRDT' CopyTo CreditDebitCode 86 END 87 END |
protected void |
translateCode_1a_27_CreditDebitCode_DBIT(String targetElement,
MtPathResult content)
Translate method Code_1!a_27 -> CreditDebitCode : DBIT
88 TRANSLATE(Code_1!a_27, CreditDebitCode) 89 RULE 90 'DBIT' CopyTo CreditDebitCode 91 END 92 END |
protected void |
translateCode_1a_29_CreditDebitCode_CRDT(String targetElement,
MtPathResult content)
Translate method Code_1!a_29 -> CreditDebitCode : CRDT
126 TRANSLATE(Code_1!a_29, CreditDebitCode) 127 RULE 128 'CRDT' CopyTo CreditDebitCode 129 END 130 END |
protected void |
translateCode_1a_29_CreditDebitCode_DBIT(String targetElement,
MtPathResult content)
Translate method Code_1!a_29 -> CreditDebitCode : DBIT
131 TRANSLATE(Code_1!a_29, CreditDebitCode) 132 RULE 133 'DBIT' CopyTo CreditDebitCode 134 END 135 END |
protected void |
translateCode_1a_33_CreditDebitCode_CRDT(String targetElement,
MtPathResult content)
Translate method Code_1!a_33 -> CreditDebitCode : CRDT
108 TRANSLATE(Code_1!a_33, CreditDebitCode) 109 RULE 110 'CRDT' CopyTo CreditDebitCode 111 END 112 END |
protected void |
translateCode_1a_33_CreditDebitCode_DBIT(String targetElement,
MtPathResult content)
Translate method Code_1!a_33 -> CreditDebitCode : DBIT
113 TRANSLATE(Code_1!a_33, CreditDebitCode) 114 RULE 115 'DBIT' CopyTo CreditDebitCode 116 END 117 END |
protected void |
translateCode_2a_1_CreditDebitCode_CRDT(String targetElement,
MtPathResult content)
Translate method Code_2a_1 -> CreditDebitCode : CRDT
159 TRANSLATE(Code_2a_1, CreditDebitCode) 160 RULE 161 IF (Code_2a_1 IsSameString 'C') 162 THEN 163 'CRDT' CopyTo CreditDebitCode 164 ELSE 165 IF (Code_2a_1 IsSameString 'RD') 166 THEN 167 'CRDT' CopyTo CreditDebitCode 168 END 169 END 170 END 171 END |
protected void |
translateCode_2a_1_CreditDebitCode_DBIT(String targetElement,
MtPathResult content)
Translate method Code_2a_1 -> CreditDebitCode : DBIT
146 TRANSLATE(Code_2a_1, CreditDebitCode) 147 RULE 148 IF (Code_2a_1 IsSameString 'D') 149 THEN 150 'DBIT' CopyTo CreditDebitCode 151 ELSE 152 IF (Code_2a_1 IsSameString 'RC') 153 THEN 154 'DBIT' CopyTo CreditDebitCode 155 END 156 END 157 END 158 END |
protected void |
translateCode_2a_1_TrueFalseIndicator_true(String targetElement,
MtPathResult content)
Translate method Code_2a_1 -> TrueFalseIndicator : true
172 TRANSLATE(Code_2a_1, TrueFalseIndicator) 173 RULE 174 'true' CopyTo TrueFalseIndicator 175 END 176 END |
protected void |
translateDateTime_YYMMDD_ISODate_Default(String targetElement,
MtPathResult content)
Translate method DateTime_YYMMDD -> ISODate : Default
62 TRANSLATE(DateTime_YYMMDD, ISODate) 63 RULE 64 (DateTime_YYMMDD FormatDateTime ('MT_YYMMDD', 'MX_Date')) CopyTo ISODate 65 END 66 END |
protected void |
translateDestinationAddress_AnyBICIdentifier_Default(String targetElement,
MtPathResult content)
Translate method DestinationAddress -> AnyBICIdentifier : Default
21 TRANSLATE(DestinationAddress, AnyBICIdentifier) 22 RULE 23 ((DestinationAddress Substring ('1', '8')) Concatenate (DestinationAddress Substring '10')) CopyTo AnyBICIdentifier 24 END 25 END |
protected void |
translateImpl(MT940 source)
Translation rules implementation
|
protected void |
translateLogicalTerminalAddress_BICIdentifier_Default(String targetElement,
MtPathResult content)
Translate method LogicalTerminalAddress -> BICIdentifier : Default
26 TRANSLATE(LogicalTerminalAddress, BICIdentifier) 27 RULE 28 ((LogicalTerminalAddress Substring ('1', '8')) Concatenate (LogicalTerminalAddress Substring '10')) CopyTo BICIdentifier 29 END 30 END |
protected void |
translateQuantity_FIN_15d_ActiveOrHistoricCurrencyAndAmount_Default(String targetElement,
MtPathResult content,
String Currency)
Translate method Quantity_FIN_15d -> ActiveOrHistoricCurrencyAndAmount : Default
136 TRANSLATE(Quantity_FIN_15d, ActiveOrHistoricCurrencyAndAmount, Currency:Currency) 137 RULE 138 NODE (Amount) 139 (Quantity_FIN_15d FormatDecimal 'MX') CopyTo Amount 140 END 141 NODE (Currency) 142 $Currency CopyTo Currency 143 END 144 END 145 END |
protected void |
translateText_FIN_16x_noDoubleSlash_Max35Text_Default(String targetElement,
MtPathResult content)
Translate method Text_FIN_16x_noDoubleSlash -> Max35Text : Default
182 TRANSLATE(Text_FIN_16x_noDoubleSlash, Max35Text) 183 RULE 184 Text_FIN_16x_noDoubleSlash CopyTo Max35Text 185 END 186 END |
public MT940_MxCamt05300102_Translation()
public final MxCamt05300102 translate(MT940 source) throws LogicalMessageCriteriaException, TranslationPreconditionException
source
- a well formed MT940 objectLogicalMessageCriteriaException
TranslationPreconditionException
protected final void translateImpl(MT940 source) throws LogicalMessageCriteriaException, TranslationPreconditionException
source
- a well formed MT940 objectLogicalMessageCriteriaException
TranslationPreconditionException
protected void translate28C_Max5NumericText_SequenceNumber_not_present(String targetElement, MtPathResult content)
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 translate28C_Max5NumericText_SequenceNumber_present(String targetElement, MtPathResult content)
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 translate28C_YesNoIndicator_true(String targetElement, MtPathResult content)
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 translate28C_YesNoIndicator_false(String targetElement, MtPathResult content)
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 translateDestinationAddress_AnyBICIdentifier_Default(String targetElement, MtPathResult content)
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 translateLogicalTerminalAddress_BICIdentifier_Default(String targetElement, MtPathResult content)
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 translate60F_4_BalanceType12Code_PRCD(String targetElement, MtPathResult content)
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 translate60M_4_BalanceType12Code_ITBD(String targetElement, MtPathResult content)
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 translateAmount_FIN_15d_ActiveOrHistoricCurrencyAndAmountAmount_Default(String targetElement, MtPathResult content)
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 translateCode_1a_1_CreditDebitCode_CRDT(String targetElement, MtPathResult content)
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 translateCode_1a_1_CreditDebitCode_DBIT(String targetElement, MtPathResult content)
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 translateDateTime_YYMMDD_ISODate_Default(String targetElement, MtPathResult content)
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 translate62F_4_BalanceType12Code_CLBD(String targetElement, MtPathResult content)
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 translate62M_4_BalanceType12Code_ITBD(String targetElement, MtPathResult content)
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 translateCode_1a_27_CreditDebitCode_CRDT(String targetElement, MtPathResult content)
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 translateCode_1a_27_CreditDebitCode_DBIT(String targetElement, MtPathResult content)
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 translate64_4_BalanceType12Code_CLAV(String targetElement, MtPathResult content)
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 translateAmount_FIN_15d_ActiveOrHistoricCurrencyAndAmount_Default(String targetElement, MtPathResult content, String currency)
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 translateCode_1a_33_CreditDebitCode_CRDT(String targetElement, MtPathResult content)
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 translateCode_1a_33_CreditDebitCode_DBIT(String targetElement, MtPathResult content)
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 translate65_4_BalanceType12Code_FWAV(String targetElement, MtPathResult content)
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 translateCode_1a_29_CreditDebitCode_CRDT(String targetElement, MtPathResult content)
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 translateCode_1a_29_CreditDebitCode_DBIT(String targetElement, MtPathResult content)
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 translateQuantity_FIN_15d_ActiveOrHistoricCurrencyAndAmount_Default(String targetElement, MtPathResult content, String Currency)
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 translateCode_2a_1_CreditDebitCode_DBIT(String targetElement, MtPathResult content)
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 translateCode_2a_1_CreditDebitCode_CRDT(String targetElement, MtPathResult content)
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 translateCode_2a_1_TrueFalseIndicator_true(String targetElement, MtPathResult content)
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 translate61_7_EntryStatus2Code_BOOK(String targetElement, MtPathResult content)
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 translateText_FIN_16x_noDoubleSlash_Max35Text_Default(String targetElement, MtPathResult content)
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(MT940 source)
source
- a well formed MT940 objectpublic final void preconditionSR1Check(MT940 source) throws TranslationPreconditionException
source
- a well formed MT940 objectTranslationPreconditionException
public final List<PreconditionError> preconditionsCheck(MT940 source)