public class MT941_MxCamt05200102_Translation extends
Modifier | Constructor and Description |
---|---|
|
MT941_MxCamt05200102_Translation()
Creates the translation class initializing it with the proper MX identification.
|
protected |
MT941_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(MT941 source)
Message criteria check
This method checks the content of the source MT941 and determines if it can be translated to the target MxCamt05200102 |
List<PreconditionError> |
preconditionsCheck(MT941 source)
Precondition check
This method checks the precondition on the content of the source MT941 |
void |
preconditionSR1Check(MT941 source)
Precondition check
This method checks the precondition SR1 on the content of the source MT941 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(MT941 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 |
translate20_ISODateTime_13D_not_present(String targetElement,
MtPathResult content)
Translate method 20 -> ISODateTime : 13D not present
6 TRANSLATE(20, ISODateTime) 7 RULE 8 '9999-12-31T00:00:00' CopyTo ISODateTime 9 END 10 END |
protected void |
translate28_3_Max5NumericText_SequenceNumber_not_present(String targetElement,
MtPathResult content)
Translate method 28_3 -> Max5NumericText : SequenceNumber not present
11 TRANSLATE(28_3, Max5NumericText) 12 RULE 13 '1' CopyTo Max5NumericText 14 END 15 END |
protected void |
translate28_3_Max5NumericText_SequenceNumber_present(String targetElement,
MtPathResult content)
Translate method 28_3 -> Max5NumericText : SequenceNumber present
16 TRANSLATE(28_3, Max5NumericText) 17 RULE 18 Sequence Number CopyTo Max5NumericText 19 END 20 END |
protected void |
translate28_3_YesNoIndicator_Default(String targetElement,
MtPathResult content)
Translate method 28_3 -> YesNoIndicator : Default
21 TRANSLATE(28_3, YesNoIndicator) 22 RULE 23 'true' CopyTo YesNoIndicator 24 END 25 END |
protected void |
translate60F_5_BalanceType12Code_PRCD(String targetElement,
MtPathResult content)
Translate method 60F_5 -> BalanceType12Code : PRCD
36 TRANSLATE(60F_5, BalanceType12Code) 37 RULE 38 IF (60F_5 IsPresent) 39 THEN 40 'PRCD' CopyTo BalanceType12Code 41 END 42 END 43 END |
protected void |
translate62F_5_BalanceType12Code_CLBD(String targetElement,
MtPathResult content)
Translate method 62F_5 -> BalanceType12Code : CLBD
64 TRANSLATE(62F_5, BalanceType12Code) 65 RULE 66 IF (62F_5 IsPresent) 67 THEN 68 'CLBD' CopyTo BalanceType12Code 69 END 70 END 71 END |
protected void |
translate64_4_BalanceType12Code_CLAV(String targetElement,
MtPathResult content)
Translate method 64_4 -> BalanceType12Code : CLAV
82 TRANSLATE(64_4, BalanceType12Code) 83 RULE 84 'CLAV' CopyTo BalanceType12Code 85 END 86 END |
protected void |
translate65_4_BalanceType12Code_FWAV(String targetElement,
MtPathResult content)
Translate method 65_4 -> BalanceType12Code : FWAV
97 TRANSLATE(65_4, BalanceType12Code) 98 RULE 99 IF (65_4 IsPresent) 100 THEN 101 'FWAV' CopyTo BalanceType12Code 102 END 103 END 104 END |
protected void |
translateAmount_FIN_15d_ActiveOrHistoricCurrencyAndAmountAmount_Default(String targetElement,
MtPathResult content)
Translate method Amount_FIN_15d -> ActiveOrHistoricCurrencyAndAmount\Amount : Default
44 TRANSLATE(Amount_FIN_15d, ActiveOrHistoricCurrencyAndAmount\Amount) 45 RULE 46 (Amount_FIN_15d FormatDecimal 'MX') CopyTo ActiveOrHistoricCurrencyAndAmount\Amount 47 END 48 END |
protected void |
translateAmount_FIN_15d_DecimalNumber_Default(String targetElement,
MtPathResult content)
Translate method Amount_FIN_15d -> DecimalNumber : Default
115 TRANSLATE(Amount_FIN_15d, DecimalNumber) 116 RULE 117 (Amount_FIN_15d FormatDecimal 'MX') CopyTo DecimalNumber 118 END 119 END |
protected void |
translateCode_1a_29_CreditDebitCode_CRDT(String targetElement,
MtPathResult content)
Translate method Code_1!a_29 -> CreditDebitCode : CRDT
105 TRANSLATE(Code_1!a_29, CreditDebitCode) 106 RULE 107 'CRDT' CopyTo CreditDebitCode 108 END 109 END |
protected void |
translateCode_1a_29_CreditDebitCode_DBIT(String targetElement,
MtPathResult content)
Translate method Code_1!a_29 -> CreditDebitCode : DBIT
110 TRANSLATE(Code_1!a_29, CreditDebitCode) 111 RULE 112 'DBIT' CopyTo CreditDebitCode 113 END 114 END |
protected void |
translateCode_1a_33_CreditDebitCode_CRDT(String targetElement,
MtPathResult content)
Translate method Code_1!a_33 -> CreditDebitCode : CRDT
87 TRANSLATE(Code_1!a_33, CreditDebitCode) 88 RULE 89 'CRDT' CopyTo CreditDebitCode 90 END 91 END |
protected void |
translateCode_1a_33_CreditDebitCode_DBIT(String targetElement,
MtPathResult content)
Translate method Code_1!a_33 -> CreditDebitCode : DBIT
92 TRANSLATE(Code_1!a_33, CreditDebitCode) 93 RULE 94 'DBIT' CopyTo CreditDebitCode 95 END 96 END |
protected void |
translateCode_1a_34_CreditDebitCode_CRDT(String targetElement,
MtPathResult content)
Translate method Code_1!a_34 -> CreditDebitCode : CRDT
49 TRANSLATE(Code_1!a_34, CreditDebitCode) 50 RULE 51 'CRDT' CopyTo CreditDebitCode 52 END 53 END |
protected void |
translateCode_1a_34_CreditDebitCode_DBIT(String targetElement,
MtPathResult content)
Translate method Code_1!a_34 -> CreditDebitCode : DBIT
54 TRANSLATE(Code_1!a_34, CreditDebitCode) 55 RULE 56 'DBIT' CopyTo CreditDebitCode 57 END 58 END |
protected void |
translateCode_1a_35_CreditDebitCode_CRDT(String targetElement,
MtPathResult content)
Translate method Code_1!a_35 -> CreditDebitCode : CRDT
72 TRANSLATE(Code_1!a_35, CreditDebitCode) 73 RULE 74 'CRDT' CopyTo CreditDebitCode 75 END 76 END |
protected void |
translateCode_1a_35_CreditDebitCode_DBIT(String targetElement,
MtPathResult content)
Translate method Code_1!a_35 -> CreditDebitCode : DBIT
77 TRANSLATE(Code_1!a_35, CreditDebitCode) 78 RULE 79 'DBIT' CopyTo CreditDebitCode 80 END 81 END |
protected void |
translateDateTime_YYMMDD_ISODate_Default(String targetElement,
MtPathResult content)
Translate method DateTime_YYMMDD -> ISODate : Default
59 TRANSLATE(DateTime_YYMMDD, ISODate) 60 RULE 61 (DateTime_YYMMDD FormatDateTime ('MT_YYMMDD', 'MX_Date')) CopyTo ISODate 62 END 63 END |
protected void |
translateDestinationAddress_AnyBICIdentifier_Default(String targetElement,
MtPathResult content)
Translate method DestinationAddress -> AnyBICIdentifier : Default
26 TRANSLATE(DestinationAddress, AnyBICIdentifier) 27 RULE 28 ((DestinationAddress Substring ('1', '8')) Concatenate (DestinationAddress Substring '10')) CopyTo AnyBICIdentifier 29 END 30 END |
protected void |
translateImpl(MT941 source)
Translation rules implementation
|
protected void |
translateLogicalTerminalAddress_BICIdentifier_Default(String targetElement,
MtPathResult content)
Translate method LogicalTerminalAddress -> BICIdentifier : Default
31 TRANSLATE(LogicalTerminalAddress, BICIdentifier) 32 RULE 33 ((LogicalTerminalAddress Substring ('1', '8')) Concatenate (LogicalTerminalAddress Substring '10')) CopyTo BICIdentifier 34 END 35 END |
public MT941_MxCamt05200102_Translation()
public final MxCamt05200102 translate(MT941 source) throws LogicalMessageCriteriaException, TranslationPreconditionException
source
- a well formed MT941 objectLogicalMessageCriteriaException
TranslationPreconditionException
protected final void translateImpl(MT941 source) throws LogicalMessageCriteriaException, TranslationPreconditionException
source
- a well formed MT941 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 translate20_ISODateTime_13D_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 translate28_3_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 translate28_3_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 translate28_3_YesNoIndicator_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 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_5_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 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_34_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_34_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_5_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 translateCode_1a_35_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_35_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 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 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 addedpublic final Boolean logicalMessageCriteriaCheck(MT941 source)
source
- a well formed MT941 objectpublic final void preconditionSR1Check(MT941 source) throws TranslationPreconditionException
source
- a well formed MT941 objectTranslationPreconditionException
public final List<PreconditionError> preconditionsCheck(MT941 source)