public class MT524_MxSese02000201_Translation extends
Modifier | Constructor and Description |
---|---|
|
MT524_MxSese02000201_Translation()
Creates the translation class initializing it with the proper MX identification.
|
protected |
MT524_MxSese02000201_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(MT524 source)
Message criteria check
This method checks the content of the source MT524 and determines if it can be translated to the target MxSese02000201 SELECT CRITERIA MustBe (MT524 Intra-Position Instruction\A\23G Function of the Message\23G\Function IsSameString 'CANC') MustBe (MT524 Intra-Position Instruction\A1\20C Reference\PREV IsPresent) END |
List<PreconditionError> |
preconditionsCheck(MT524 source)
Precondition check
This method checks the precondition on the content of the source MT524 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
|
MxSese02000201 |
translate(MT524 source)
Main entry point for the translation
|
protected void |
translateImpl(MT524 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(Identifier_Isin, ISINIdentifier) 121 RULE 122 (Identifier_Isin Substring '6') CopyTo ISINIdentifier 123 END 124 END |
protected void |
translateTTR15(String targetElement,
MtPathResult content)
Translate method TTR15
125 TRANSLATE(35B, AlternateIdentification2) 126 RULE 127 NODE (Identification) 128 IF (((((DescriptionOfSecurity\Line[1] Substring ('1', '1')) IsSameString '/') And (((DescriptionOfSecurity\Line[1] Substring ('2', '2')) IsCountry) And ((DescriptionOfSecurity\Line[1] Substring ('4', '1')) IsSameString '/'))) Or ((DescriptionOfSecurity\Line[1] Substring ('1', '4')) IsSameString '/XX/')) Or ((DescriptionOfSecurity\Line[1] Substring ('1', '4')) IsSameString '/TS/')) 129 THEN 130 (DescriptionOfSecurity\Line[1] Substring '5') CopyTo Identification 131 ELSE 132 IF (Not (IdentificationOfSecurity IsPresent)) 133 THEN 134 IF ((DescriptionOfSecurity\Line[1] Length) LessThanOrEqualTo '31') 135 THEN 136 (DescriptionOfSecurity\Line[1] TrimLeft '/') CopyTo Identification 137 ELSE 138 (DescriptionOfSecurity\Line[1] Substring ('1', '31')) CopyTo Identification 139 END 140 END 141 END 142 END 143 NODE (IdentificationSource) 144 NODE (Domestic) 145 IF (((DescriptionOfSecurity\Line[1] Substring ('1', '1')) IsSameString '/') And (((DescriptionOfSecurity\Line[1] Substring ('2', '2')) IsCountry) And ((DescriptionOfSecurity\Line[1] Substring ('4', '1')) IsSameString '/'))) 146 THEN 147 (DescriptionOfSecurity\Line[1] Substring ('2', '2')) CopyTo IdentificationSource\Domestic 148 END 149 END 150 NODE (Proprietary) 151 IF (((DescriptionOfSecurity\Line[1] Substring ('1', '4')) IsSameString '/TS/') Or ((DescriptionOfSecurity\Line[1] Substring ('1', '4')) IsSameString '/XX/')) 152 THEN 153 (DescriptionOfSecurity\Line[1] Substring ('2', '2')) CopyTo IdentificationSource\Proprietary 154 END 155 IF ((((Not (((DescriptionOfSecurity\Line[1] Substring ('1', '1')) IsSameString '/') And (((DescriptionOfSecurity\Line[1] Substring ('2', '2')) IsCountry) And ((DescriptionOfSecurity\Line[1] Substring ('4', '1')) IsSameString '/')))) And (Not ((DescriptionOfSecurity\Line[1] Substring ('1', '4')) IsSameString '/XX/'))) And (Not ((DescriptionOfSecurity\Line[1] Substring ('1', '4')) IsSameString '/TS/'))) And (Not (IdentificationOfSecurity IsPresent))) 156 THEN 157 'XX' CopyTo IdentificationSource\Proprietary 158 END 159 END 160 END 161 END 162 END |
protected void |
translateTTR16(String targetElement,
MtPathResult content)
Translate method TTR16
163 TRANSLATE(Text_FIN_4M35x, RestrictedFINXMax140Text) 164 RULE 165 ((Line[2] Concatenate (Line[3] Concatenate Line[4])) TrimRight ' ') CopyTo RestrictedFINXMax140Text 166 END 167 END |
protected void |
translateTTR17(String targetElement,
MtPathResult content)
Translate method TTR17
168 TRANSLATE(Text_FIN_4M35x, RestrictedFINXMax140Text) 169 RULE 170 (Line[*] Concatenate) CopyTo RestrictedFINXMax140Text 171 END 172 END |
protected void |
translateTTR18(String targetElement,
MtPathResult content)
Translate method TTR18
173 TRANSLATE(98A, SettlementDate4Choice) 174 RULE 175 NODE (Date) 176 NODE (Date) 177 Date TranslateTo Date\Date 178 END 179 END 180 END 181 END |
protected void |
translateTTR19(String targetElement,
String content)
Translate method TTR19
182 TRANSLATE(DateTime_YYYYMMDD, ISODate) 183 RULE 184 (DateTime_YYYYMMDD FormatDateTime ('MT_YYYYMMDD', 'MX_Date')) CopyTo ISODate 185 END 186 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 |
translateTTR20(String targetElement,
MtPathResult content)
Translate method TTR20
187 TRANSLATE(98C, SettlementDate4Choice) 188 RULE 189 NODE (Date) 190 NODE (DateTime) 191 98C TranslateTo Date\DateTime 192 END 193 END 194 END 195 END |
protected void |
translateTTR21(String targetElement,
Field field)
Translate method TTR21
196 TRANSLATE(98C, ISODateTime) 197 RULE 198 ((Date FormatDateTime ('MT_YYYYMMDD', 'MX_Date')) Concatenate ('T', (Time FormatDateTime ('MT_HHMMSS', 'MX_Time')))) CopyTo ISODateTime 199 END 200 END |
protected void |
translateTTR22(String targetElement,
MtPathResult content)
Translate method TTR22
201 TRANSLATE(36B, Quantity10Choice) 202 RULE 203 NODE (Quantity) 204 NODE (Unit) 205 IF (QuantityTypeCode IsSameString 'UNIT') 206 THEN 207 Quantity TranslateTo Quantity\Unit 208 END 209 END 210 NODE (FaceAmount) 211 IF (QuantityTypeCode IsSameString 'FAMT') 212 THEN 213 Quantity TranslateTo Quantity\FaceAmount 214 END 215 END 216 NODE (AmortisedValue) 217 IF (QuantityTypeCode IsSameString 'AMOR') 218 THEN 219 Quantity TranslateTo Quantity\AmortisedValue 220 END 221 END 222 END 223 END 224 END |
protected void |
translateTTR23(String targetElement,
String content)
Translate method TTR23
225 TRANSLATE(Quantity_FIN_15d, RestrictedFINDecimalNumber) 226 RULE 227 (Quantity_FIN_15d FormatDecimal 'MX') CopyTo RestrictedFINDecimalNumber 228 END 229 END |
protected void |
translateTTR24(String targetElement,
String content)
Translate method TTR24
230 TRANSLATE(Quantity_FIN_15d, RestrictedFINImpliedCurrencyAndAmount) 231 RULE 232 (Quantity_FIN_15d FormatDecimal 'MX') CopyTo RestrictedFINImpliedCurrencyAndAmount 233 END 234 END |
protected void |
translateTTR25(String targetElement,
MtPathResult content)
Translate method TTR25
235 TRANSLATE(95P_2, PartyIdentification16Choice) 236 RULE 237 NODE (BICOrBEI) 238 IdentifierCode TranslateTo BICOrBEI 239 END 240 END 241 END |
protected void |
translateTTR26(String targetElement,
MtPathResult content)
Translate method TTR26
242 TRANSLATE(95Q, PartyIdentification16Choice) 243 RULE 244 NODE (NameAndAddress) 245 NameAndAddress TranslateTo NameAndAddress 246 END 247 END 248 END |
protected void |
translateTTR27(String targetElement,
String content)
Translate method TTR27
249 TRANSLATE(Text_FIN_4M35x, NameAndAddress12) 250 RULE 251 NODE (Name) 252 ((Line[*] ConcatenateWithSeparator '-') ReplaceAll ('/', '-')) CopyTo Name 253 END 254 END 255 END |
protected void |
translateTTR28(String targetElement,
MtPathResult content)
Translate method TTR28
256 TRANSLATE(95R, PartyIdentification16Choice) 257 RULE 258 NODE (ProprietaryIdentification) 259 NODE (Identification) 260 ProprietaryCode TranslateTo ProprietaryIdentification\Identification 261 END 262 DataSourceScheme TranslateTo ProprietaryIdentification 263 END 264 END 265 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 MT524_MxSese02000201_Translation()
public final MxSese02000201 translate(MT524 source) throws LogicalMessageCriteriaException, TranslationPreconditionException
source
- a well formed MT524 objectLogicalMessageCriteriaException
TranslationPreconditionException
protected final void translateImpl(MT524 source) throws LogicalMessageCriteriaException, TranslationPreconditionException
source
- a well formed MT524 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, 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 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 addedprotected void translateTTR18(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 translateTTR19(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 translateTTR20(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 translateTTR21(String targetElement, Field field)
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 translateTTR22(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 translateTTR23(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 translateTTR24(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 translateTTR25(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 translateTTR26(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 translateTTR27(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 translateTTR28(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(MT524 source)
source
- a well formed MT524 objectpublic final List<PreconditionError> preconditionsCheck(MT524 source)