Commit 02bd8314 by Amelin Konstantin

Add ExecutionStatusReportTemplate.

parent bd34d099
<?xml version="1.0" encoding="windows-1251"?>
<nonpublicExecutionReport xmlns="http://www.fpml.org/FpML-5/recordkeeping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:fpmlext="http://www.fpml.org/FpML-5/ext" xmlns:nsdext="http://www.fpml.org/FpML-5/recordkeeping/nsd-ext" xsi:schemaLocation="http://www.fpml.org/FpML-5/recordkeeping fpml-recordkeeping-merged-schema.xsd http://www.fpml.org/FpML-5/recordkeeping/nsd-ext nsd-ext-merged-schema.xsd" fpmlVersion="5-4" actualBuild="5">
<header>
<messageId messageIdScheme="http://www.fpml.org/coding-scheme">BCSN1C66372dd0447faba3f8e426a0f4e0e</messageId>
<sentBy>RP0058900001</sentBy>
<sendTo>NDC000000000</sendTo>
<creationTimestamp>2018-04-11T18:48:28.581545</creationTimestamp>
<implementationSpecification>
<version>4.4</version>
</implementationSpecification>
</header>
<isCorrection>false</isCorrection>
<correlationId correlationIdScheme="http://www.fpml.org/coding-scheme">[RP0058900001]-[2018]-[BCSN1C66372dd0447faba3f8e426a0f4e0e]</correlationId>
<asOfDate>2018-04-12</asOfDate>
<nsdext:executionStatus>
<nsdext:repositoryMessageIdentifier>
<partyReference href="TradeRepository" />
<tradeId>NONREF</tradeId>
</nsdext:repositoryMessageIdentifier>
<nsdext:tradesWithStatus>
<nsdext:reportReferences>
<nsdext:tradeId>DW0004247144</nsdext:tradeId>
</nsdext:reportReferences>
<nsdext:tradeObligationStatus>T</nsdext:tradeObligationStatus>
</nsdext:tradesWithStatus>
</nsdext:executionStatus>
<party id="TradeRepository">
<partyId>NDC000000000</partyId>
<partyId>LEI_253400M18U5TB02TW421</partyId>
<partyName> </partyName>
</party>
<party id="Party1">
<partyId>RP0058900001</partyId>
<partyId>LEI_253400GRCV94X91GAW80</partyId>
<partyName> " "</partyName>
<classification>B</classification>
<country>RU</country>
<organizationType>L</organizationType>
</party>
<party id="Party2">
<partyId>NONREF</partyId>
<partyId>INN_5489471052</partyId>
<partyName> "-"</partyName>
<classification>Other</classification>
<country>RU</country>
<organizationType>L</organizationType>
</party>
<party id="Sender">
<partyId>RP0058900001</partyId>
<partyId>LEI_253400GRCV94X91GAW80</partyId>
<partyName> " "</partyName>
</party>
</nonpublicExecutionReport>
\ No newline at end of file
<?xml version="1.0" encoding="windows-1251"?>
<nonpublicExecutionReport xmlns="http://www.fpml.org/FpML-5/recordkeeping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:fpmlext="http://www.fpml.org/FpML-5/ext" xmlns:nsdext="http://www.fpml.org/FpML-5/recordkeeping/nsd-ext" fpmlVersion="5-4" xsi:schemaLocation="http://www.fpml.org/FpML-5/recordkeeping fpml-recordkeeping-merged-schema.xsd http://www.fpml.org/FpML-5/recordkeeping/nsd-ext nsd-ext-merged-schema.xsd">
<header>
<messageId messageIdScheme="http://repository.nsd.ru/coding-scheme/messageid(nsdrus)">BCS45b9164c3b0f4c84990a573b94742313</messageId>
<sentBy>RP0058900001</sentBy>
<sendTo>NDC000000000</sendTo>
<creationTimestamp>2017-04-13T08:55:29</creationTimestamp>
<implementationSpecification>
<version>4.4</version>
</implementationSpecification>
</header>
<isCorrection>false</isCorrection>
<correlationId correlationIdScheme="http://repository.nsd.ru/coding-scheme/correlationId(nsdrus)">[RP0058900001]-[2017]-[BCS45b9164c3b0f4c84990a573b94742313]</correlationId>
<asOfDate>2017-04-10</asOfDate>
<nsdext:executionStatus>
<nsdext:repositoryMessageIdentifier>
<partyReference href="TradeRepository"/>
<tradeId>NONREF</tradeId>
</nsdext:repositoryMessageIdentifier>
<nsdext:tradesWithStatus>
<nsdext:reportReferences>
<nsdext:tradeId>DR0002025394</nsdext:tradeId>
</nsdext:reportReferences>
<nsdext:tradeObligationStatus dealStatusScheme="http://repository.nsd.ru/coding-scheme/deal-status">T</nsdext:tradeObligationStatus>
</nsdext:tradesWithStatus>
</nsdext:executionStatus>
<party id="TradeRepository">
<partyId>NDC000000000</partyId>
<partyId>LEI_253400M18U5TB02TW421</partyId>
<partyName> </partyName>
</party>
<party id="Party1">
<partyId>RP0058900001</partyId>
<partyId>LEI_253400GRCV94X91GAW80</partyId>
<partyName> " "</partyName>
<classification>B</classification>
<country>RU</country>
<organizationType>L</organizationType>
</party>
<party id="Party2">
<partyId>NONREF</partyId>
<partyId>INN_8852792274</partyId>
<partyName> ""</partyName>
<classification>Other</classification>
<country>RU</country>
<organizationType>L</organizationType>
</party>
<party id="Sender">
<partyId>RP0058900001</partyId>
<partyId>LEI_253400GRCV94X91GAW80</partyId>
<partyName> " "</partyName>
</party>
</nonpublicExecutionReport>
\ No newline at end of file
<?xml version="1.0" encoding="windows-1251"?>
<nonpublicExecutionReport xmlns="http://www.fpml.org/FpML-5/recordkeeping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:fpmlext="http://www.fpml.org/FpML-5/ext" xmlns:nsdext="http://www.fpml.org/FpML-5/recordkeeping/nsd-ext" fpmlVersion="5-4" xsi:schemaLocation="http://www.fpml.org/FpML-5/recordkeeping fpml-recordkeeping-merged-schema.xsd http://www.fpml.org/FpML-5/recordkeeping/nsd-ext nsd-ext-merged-schema.xsd">
<header>
<messageId messageIdScheme="http://repository.nsd.ru/coding-scheme/messageid(nsdrus)">BCS546c0f894db74165af703cdbc0c08949</messageId>
<sentBy>RP0058900001</sentBy>
<sendTo>NDC000000000</sendTo>
<creationTimestamp>2017-04-13T09:05:09</creationTimestamp>
<implementationSpecification>
<version>4.4</version>
</implementationSpecification>
</header>
<isCorrection>false</isCorrection>
<correlationId correlationIdScheme="http://repository.nsd.ru/coding-scheme/correlationId(nsdrus)">[RP0058900001]-[2017]-[BCS546c0f894db74165af703cdbc0c08949]</correlationId>
<asOfDate>2017-04-11</asOfDate>
<nsdext:executionStatus>
<nsdext:repositoryMessageIdentifier>
<partyReference href="TradeRepository"/>
<tradeId>NONREF</tradeId>
</nsdext:repositoryMessageIdentifier>
<nsdext:tradesWithStatus>
<nsdext:reportReferences>
<nsdext:tradeId>DR0002025676</nsdext:tradeId>
</nsdext:reportReferences>
<nsdext:tradeObligationStatus dealStatusScheme="http://repository.nsd.ru/coding-scheme/deal-status">T</nsdext:tradeObligationStatus>
</nsdext:tradesWithStatus>
</nsdext:executionStatus>
<party id="TradeRepository">
<partyId>NDC000000000</partyId>
<partyId>LEI_253400M18U5TB02TW421</partyId>
<partyName> </partyName>
</party>
<party id="Party1">
<partyId>RP0058900001</partyId>
<partyId>LEI_253400GRCV94X91GAW80</partyId>
<partyName> " "</partyName>
<classification>B</classification>
<country>RU</country>
<organizationType>L</organizationType>
</party>
<party id="Party2">
<partyId>RPJ000000555</partyId>
<partyId>LEI_253400ABNUQNI0QEEF10</partyId>
<partyName> " "</partyName>
<classification>D</classification>
<country>RU</country>
<organizationType>L</organizationType>
</party>
<party id="Sender">
<partyId>RP0058900001</partyId>
<partyId>LEI_253400GRCV94X91GAW80</partyId>
<partyName> " "</partyName>
</party>
</nonpublicExecutionReport>
\ No newline at end of file
...@@ -47,7 +47,12 @@ object Main { ...@@ -47,7 +47,12 @@ object Main {
case _ => Try { (source \\ "masterAgreementTermination").head } match { case _ => Try { (source \\ "masterAgreementTermination").head } match {
case Success(_) => case Success(_) =>
if (debugMode) new MasterAgreementTemplate(source) with Logger else new MasterAgreementTemplate(source) if (debugMode) new MasterAgreementTemplate(source) with Logger else new MasterAgreementTemplate(source)
case _ => throw new Exception("Undefined trade type") case _ => Try { (source \\ "executionStatus").head } match {
case Success(_) =>
if (debugMode) new ExecutionStatusReportTemplate(source) with Logger
else new ExecutionStatusReportTemplate(source)
case _ => throw new Exception("Undefined trade type")
}
} }
} }
} }
......
package templates
import scala.xml.Node
class ExecutionStatusReportTemplate(source: Node) extends Template(source) {
def template: Node = {
<rtsrep:executionStatusReportRegistration xmlns:fpml="http://www.fpml.org/FpML-5/recordkeeping"
xmlns:fpmlext="http://www.fpml.org/FpML-5/ext" xmlns:rtsrep="http://www.fpml.ru/repository"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" fpmlVersion="5-7">
<fpml:header>
<fpml:messageId>{ get(source \ "header" \"messageId") }</fpml:messageId>
<fpml:sentBy>{ get(source \ "header" \ "sentBy") }</fpml:sentBy>
<fpml:sendTo>{ get(source \ "header" \ "sendTo") }</fpml:sendTo>
<fpml:creationTimestamp>{ get(source \ "header" \ "creationTimestamp") }</fpml:creationTimestamp>
<fpml:implementationSpecification>
<fpml:version>2</fpml:version>
</fpml:implementationSpecification>
</fpml:header>
<fpml:isCorrection>{ get(source \ "isCorrection") }</fpml:isCorrection>
<fpml:correlationId correlationIdScheme="">{ get(source \ "correlationId") }</fpml:correlationId>
<rtsrep:tradeId>{ get(source \ "executionStatus" \ "tradesWithStatus" \\ "tradeId") }</rtsrep:tradeId>
{/* statusDate isn`t present in the source */}
<rtsrep:statusDate>{ get(source \ "asOfDate") }</rtsrep:statusDate>
<rtsrep:tradeObligationStatus>{ get(source \ "executionStatus" \ "tradesWithStatus" \ "tradeObligationStatus") }</rtsrep:tradeObligationStatus>
</rtsrep:executionStatusReportRegistration>
}
def isStraight = true
}
...@@ -8,7 +8,7 @@ trait Logger { ...@@ -8,7 +8,7 @@ trait Logger {
this: Template => this: Template =>
private[this] val data = { private[this] val data = {
val m:mutable.LinkedHashMap[Int, mutable.Queue[(String, String, mutable.LinkedHashMap[Int, (String, String)])]] = val m: mutable.LinkedHashMap[Int, mutable.Queue[(String, String, mutable.LinkedHashMap[Int, (String, String)])]] =
mutable.LinkedHashMap() mutable.LinkedHashMap()
val items = source \\ "_" val items = source \\ "_"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment