public class MT942_MxCamt05200102_Translation extends
Modifier | Constructor and Description |
---|---|
|
MT942_MxCamt05200102_Translation()
Creates the translation class initializing it with the proper MX identification.
|
protected |
MT942_MxCamt05200102_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(MT942 source)
Message criteria check
This method checks the content of the source MT942 and determines if it can be translated to the target MxCamt05200102 |
List<PreconditionError> |
preconditionsCheck(MT942 source)
Precondition check
This method checks the precondition on the content of the source MT942 |
void |
preconditionSR1Check(MT942 source)
Precondition check
This method checks the precondition SR1 on the content of the source MT942 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
|
MxCamt05200102 |
translate(MT942 source)
Main entry point for the translation
|
protected void |
translate13D_ISODateTime_13D_present(String targetElement,
MtPathResult content)
Translate method 13D -> ISODateTime : 13D present
1 TRANSLATE(13D, ISODateTime) 2 RULE 3 ((Date FormatDateTime ('MT_YYMMDD', 'MX_Date')) Concatenate ('T', ((Time FormatDateTime ('MT_HHMM', 'MX_Time')) Concatenate (Sign, ((Offset FormatDateTime ('MT_HHMM', 'MX_Time')) Substring ('1', '5')))))) CopyTo ISODateTime 4 END 5 END |
protected void |
translate28C_Max5NumericText_SequenceNumber_not_present(String targetElement,
MtPathResult content)
Translate method 28C -> Max5NumericText : SequenceNumber not present
6 TRANSLATE(28C, Max5NumericText) 7 RULE 8 '1' CopyTo Max5NumericText 9 END 10 END |
protected void |
translate28C_Max5NumericText_SequenceNumber_present(String targetElement,
MtPathResult content)
Translate method 28C -> Max5NumericText : SequenceNumber present
11 TRANSLATE(28C, Max5NumericText) 12 RULE 13 Sequence Number CopyTo Max5NumericText 14 END 15 END |
protected void |
translate28C_YesNoIndicator_true(String targetElement,
MtPathResult content)
Translate method 28C -> YesNoIndicator : true
16 TRANSLATE(28C, YesNoIndicator) 17 RULE 18 'true' CopyTo YesNoIndicator 19 END 20 END |
protected void |
translate61_8_EntryStatus2Code_BOOK(String targetElement,
MtPathResult content)
Translate method 61_8 -> EntryStatus2Code : BOOK
87 TRANSLATE(61_8, EntryStatus2Code) 88 RULE 89 'BOOK' CopyTo EntryStatus2Code 90 END 91 END |
protected void |
translate61_8_EntryStatus2Code_PDNG(String targetElement,
MtPathResult content)
Translate method 61_8 -> EntryStatus2Code : PDNG
92 TRANSLATE(61_8, EntryStatus2Code) 93 RULE 94 'PDNG' CopyTo EntryStatus2Code 95 END 96 END |
protected void |
translateAmount_FIN_15d_DecimalNumber_Default(String targetElement,
MtPathResult content)
Translate method Amount_FIN_15d -> DecimalNumber : Default
31 TRANSLATE(Amount_FIN_15d, DecimalNumber) 32 RULE 33 (Amount_FIN_15d FormatDecimal 'MX') CopyTo DecimalNumber 34 END 35 END |
protected void |
translateCode_2a_3_CreditDebitCode_CRDT(String targetElement,
MtPathResult content)
Translate method Code_2a_3 -> CreditDebitCode : CRDT
64 TRANSLATE(Code_2a_3, CreditDebitCode) 65 RULE 66 IF (Code_2a_3 IsSameString 'C') 67 THEN 68 'CRDT' CopyTo CreditDebitCode 69 ELSE 70 IF (Code_2a_3 IsSameString 'RD') 71 THEN 72 'CRDT' CopyTo CreditDebitCode 73 ELSE 74 IF (Code_2a_3 IsSameString 'EC') 75 THEN 76 'CRDT' CopyTo CreditDebitCode 77 END 78 END 79 END 80 END 81 END |
protected void |
translateCode_2a_3_CreditDebitCode_DBIT(String targetElement,
MtPathResult content)
Translate method Code_2a_3 -> CreditDebitCode : DBIT
46 TRANSLATE(Code_2a_3, CreditDebitCode) 47 RULE 48 IF (Code_2a_3 IsSameString 'D') 49 THEN 50 'DBIT' CopyTo CreditDebitCode 51 ELSE 52 IF (Code_2a_3 IsSameString 'RC') 53 THEN 54 'DBIT' CopyTo CreditDebitCode 55 ELSE 56 IF (Code_2a_3 IsSameString 'ED') 57 THEN 58 'DBIT' CopyTo CreditDebitCode 59 END 60 END 61 END 62 END 63 END |
protected void |
translateCode_2a_3_TrueFalseIndicator_true(String targetElement,
MtPathResult content)
Translate method Code_2a_3 -> TrueFalseIndicator : true
82 TRANSLATE(Code_2a_3, TrueFalseIndicator) 83 RULE 84 'true' CopyTo TrueFalseIndicator 85 END 86 END |
protected void |
translateDateTime_MMDD_1_ISODate_No_Century(String targetElement,
MtPathResult content)
Translate method DateTime_MMDD_1 -> ISODate : No Century
97 TRANSLATE(DateTime_MMDD_1, ISODate) 98 RULE 99 ('9999' Concatenate ('-', (DateTime_MMDD_1 Substring ('1', '2')), '-', (DateTime_MMDD_1 Substring ('3', '2')))) CopyTo ISODate 100 END 101 END |
protected void |
translateDateTime_YYMMDD_ISODate_Default(String targetElement,
MtPathResult content)
Translate method DateTime_YYMMDD -> ISODate : Default
102 TRANSLATE(DateTime_YYMMDD, ISODate) 103 RULE 104 (DateTime_YYMMDD FormatDateTime ('MT_YYMMDD', 'MX_Date')) CopyTo ISODate 105 END 106 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(MT942 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
36 TRANSLATE(Quantity_FIN_15d, ActiveOrHistoricCurrencyAndAmount, Currency:Currency) 37 RULE 38 NODE (Amount) 39 (Quantity_FIN_15d FormatDecimal 'MX') CopyTo Amount 40 END 41 NODE (Currency) 42 $Currency CopyTo Currency 43 END 44 END 45 END |
public MT942_MxCamt05200102_Translation()
public final MxCamt05200102 translate(MT942 source) throws LogicalMessageCriteriaException, TranslationPreconditionException
source
- a well formed MT942 objectLogicalMessageCriteriaException
TranslationPreconditionException
protected final void translateImpl(MT942 source) throws LogicalMessageCriteriaException, TranslationPreconditionException
source
- a well formed MT942 objectLogicalMessageCriteriaException
TranslationPreconditionException
protected void translate13D_ISODateTime_13D_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_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 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 translateAmount_FIN_15d_DecimalNumber_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 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_3_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_3_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_3_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_8_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 translate61_8_EntryStatus2Code_PDNG(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_MMDD_1_ISODate_No_Century(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 addedpublic final Boolean logicalMessageCriteriaCheck(MT942 source)
source
- a well formed MT942 objectpublic final void preconditionSR1Check(MT942 source) throws TranslationPreconditionException
source
- a well formed MT942 objectTranslationPreconditionException
public final List<PreconditionError> preconditionsCheck(MT942 source)