public class MT538_MxSemt02000201_Translation extends
Modifier | Constructor and Description |
---|---|
|
MT538_MxSemt02000201_Translation()
Creates the translation class initializing it with the proper MX identification.
|
protected |
MT538_MxSemt02000201_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(MT538 source)
Message criteria check
This method checks the content of the source MT538 and determines if it can be translated to the target MxSemt02000201 SELECT CRITERIA MustBe (MT538 Statement of Intra-Position Advices\A\23G Function of the Message\23G\Function IsSameString 'CANC') MustBe (MT538 Statement of Intra-Position Advices\A1[*]\20C Reference\PREV IsPresent) END |
List<PreconditionError> |
preconditionsCheck(MT538 source)
Precondition check
This method checks the precondition on the content of the source MT538 return a list with a precondition errors for each failed check, or an empty list if all preconditions are satisfied |
protected Integer |
resolveComponentNumber(String field,
String component)
Static mapping of fields component names into its correspondent component number
|
MxSemt02000201 |
translate(MT538 source)
Main entry point for the translation
|
protected void |
translateImpl(MT538 source)
Translation rules implementation
|
protected void |
translateTTR1(String targetElement,
MtPathResult content)
Translate method TTR1
1 TRANSLATE(98A, DateAndDateTimeChoice) 2 RULE 3 NODE (Date) 4 (Date FormatDateTime ('MT_YYYYMMDD', 'MX_Date')) CopyTo Date 5 END 6 END 7 END |
protected void |
translateTTR10(String targetElement,
MtPathResult content)
Translate method TTR10
76 TRANSLATE(97A, SecuritiesAccount17) 77 RULE 78 NODE (Identification) 79 AccountNumber TranslateTo Identification 80 END 81 END 82 END |
protected void |
translateTTR11(String targetElement,
String content)
Translate method TTR11
83 TRANSLATE(Identifier_FIN_35x, RestrictedFINXMax35Text) 84 RULE 85 Identifier_FIN_35x CopyTo RestrictedFINXMax35Text 86 END 87 END |
protected void |
translateTTR12(String targetElement,
MtPathResult content)
Translate method TTR12
88 TRANSLATE(97B_2, SecuritiesAccount17) 89 RULE 90 NODE (Identification) 91 AccountNumber CopyTo Identification 92 END 93 NODE (Type) 94 NODE (Identification) 95 AccountTypeCode CopyTo Type\Identification 96 END 97 DataSourceScheme TranslateTo Type 98 NODE (Issuer) 99 IF (Not (DataSourceScheme IsPresent)) 100 THEN 101 'NONE' CopyTo Type\Issuer 102 END 103 END 104 END 105 END 106 END |
protected void |
translateTTR13(String targetElement,
String content)
Translate method TTR13
107 TRANSLATE(Identifier_FIN_8c, GenericIdentification25) 108 RULE 109 NODE (Issuer) 110 (Identifier_FIN_8c Substring ('1', '4')) CopyTo Issuer 111 END 112 NODE (SchemeName) 113 IF (Not (((Identifier_FIN_8c Substring '5') Length) IsSameNumber '0')) 114 THEN 115 (Identifier_FIN_8c Substring '5') CopyTo SchemeName 116 END 117 END 118 END 119 END |
protected void |
translateTTR14(String targetElement,
MtPathResult content)
Translate method TTR14
120 TRANSLATE(95P_2, PartyIdentification16Choice) 121 RULE 122 NODE (BICOrBEI) 123 IdentifierCode TranslateTo BICOrBEI 124 END 125 END 126 END |
protected void |
translateTTR15(String targetElement,
MtPathResult content)
Translate method TTR15
127 TRANSLATE(95Q, PartyIdentification16Choice) 128 RULE 129 NODE (NameAndAddress) 130 NameAndAddress TranslateTo NameAndAddress 131 END 132 END 133 END |
protected void |
translateTTR16(String targetElement,
String content)
Translate method TTR16
134 TRANSLATE(Text_FIN_4M35x, NameAndAddress12) 135 RULE 136 NODE (Name) 137 ((Line[*] ConcatenateWithSeparator '-') ReplaceAll ('/', '-')) CopyTo Name 138 END 139 END 140 END |
protected void |
translateTTR17(String targetElement,
MtPathResult content)
Translate method TTR17
141 TRANSLATE(95R, PartyIdentification16Choice) 142 RULE 143 NODE (ProprietaryIdentification) 144 NODE (Identification) 145 ProprietaryCode TranslateTo ProprietaryIdentification\Identification 146 END 147 DataSourceScheme TranslateTo ProprietaryIdentification 148 END 149 END 150 END |
protected void |
translateTTR2(String targetElement,
MtPathResult content)
Translate method TTR2
8 TRANSLATE(98C, DateAndDateTimeChoice) 9 RULE 10 NODE (DateTime) 11 (Date FormatDateTime ('MT_YYYYMMDD', 'MX_Date')) CopyTo DateTime 12 'T' CopyTo DateTime 13 (Time FormatDateTime ('MT_HHMMSS', 'MX_Time')) CopyTo DateTime 14 END 15 END 16 END |
protected void |
translateTTR3(String targetElement,
MtPathResult content)
Translate method TTR3
17 TRANSLATE(98E_1, DateAndDateTimeChoice) 18 RULE 19 NODE (DateTime) 20 IF (Decimals IsPresent) 21 THEN 22 ((((((Date FormatDateTime ('MT_YYYYMMDD', 'MX_Date')) Concatenate 'T') Concatenate (Time FormatDateTime ('MT_HHMMSS', 'MX_Time'))) Concatenate '.') Concatenate Decimals) Concatenate (UTCIndicator FormatDateTime ('MT_UTCIndicator', 'MX_TimeOffset'))) CopyTo DateTime 23 ELSE 24 ((((Date FormatDateTime ('MT_YYYYMMDD', 'MX_Date')) Concatenate 'T') Concatenate (Time FormatDateTime ('MT_HHMMSS', 'MX_Time'))) Concatenate (UTCIndicator FormatDateTime ('MT_UTCIndicator', 'MX_TimeOffset'))) CopyTo DateTime 25 END 26 END 27 END 28 END |
protected void |
translateTTR4(String targetElement,
MtPathResult content)
Translate method TTR4
29 TRANSLATE(Code_4!c_4, CopyDuplicate1Code) 30 RULE 31 'CODU' EquivalentTo 'CODU' 32 'COPY' EquivalentTo 'COPY' 33 'DUPL' EquivalentTo 'DUPL' 34 END 35 END |
protected void |
translateTTR5(String targetElement,
MtPathResult content)
Translate method TTR5
36 TRANSLATE(95P_2, PartyIdentification18Choice) 37 RULE 38 NODE (BICOrBEI) 39 IdentifierCode TranslateTo BICOrBEI 40 END 41 END 42 END |
protected void |
translateTTR6(String targetElement,
String content)
Translate method TTR6
43 TRANSLATE(Identifier_BICBEI, AnyBICIdentifier) 44 RULE 45 Identifier_BICBEI CopyTo AnyBICIdentifier 46 END 47 END |
protected void |
translateTTR7(String targetElement,
MtPathResult content)
Translate method TTR7
48 TRANSLATE(95R, PartyIdentification18Choice) 49 RULE 50 NODE (ProprietaryIdentification) 51 NODE (Identification) 52 ProprietaryCode TranslateTo ProprietaryIdentification\Identification 53 END 54 DataSourceScheme TranslateTo ProprietaryIdentification 55 END 56 END 57 END |
protected void |
translateTTR8(String targetElement,
String content)
Translate method TTR8
58 TRANSLATE(Text_FIN_34x, RestrictedFINXMax34Text) 59 RULE 60 Text_FIN_34x CopyTo RestrictedFINXMax34Text 61 END 62 END |
protected void |
translateTTR9(String targetElement,
String content)
Translate method TTR9
63 TRANSLATE(Identifier_FIN_8c, GenericIdentification24) 64 RULE 65 NODE (Issuer) 66 (Identifier_FIN_8c Substring ('1', '4')) CopyTo Issuer 67 END 68 NODE (SchemeName) 69 IF (Not (((Identifier_FIN_8c Substring '5') Length) IsSameNumber '0')) 70 THEN 71 (Identifier_FIN_8c Substring '5') CopyTo SchemeName 72 END 73 END 74 END 75 END |
public MT538_MxSemt02000201_Translation()
public final MxSemt02000201 translate(MT538 source) throws LogicalMessageCriteriaException, TranslationPreconditionException
source
- a well formed MT538 objectLogicalMessageCriteriaException
TranslationPreconditionException
protected final void translateImpl(MT538 source) throws LogicalMessageCriteriaException, TranslationPreconditionException
source
- a well formed MT538 objectLogicalMessageCriteriaException
TranslationPreconditionException
protected void translateTTR1(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 translateTTR2(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 translateTTR3(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 translateTTR4(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 translateTTR5(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 translateTTR6(String targetElement, String 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 translateTTR7(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 translateTTR8(String targetElement, String 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 translateTTR9(String targetElement, String 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 translateTTR10(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 translateTTR11(String targetElement, String 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 translateTTR12(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 translateTTR13(String targetElement, String 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 translateTTR14(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 translateTTR15(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 translateTTR16(String targetElement, String 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 translateTTR17(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(MT538 source)
source
- a well formed MT538 objectpublic final List<PreconditionError> preconditionsCheck(MT538 source)