Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SPB_Exchange_Repo
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Amelin Konstantin
SPB_Exchange_Repo
Commits
02bd8314
Commit
02bd8314
authored
Nov 12, 2018
by
Amelin Konstantin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ExecutionStatusReportTemplate.
parent
bd34d099
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
198 additions
and
1 deletions
+198
-1
input/Status Client 1.xml
+54
-0
input/Status Client 2.xml
+54
-0
input/Status Client 3.xml
+54
-0
src/main/scala/Main.scala
+5
-0
src/main/scala/templates/ExecutionStatusReportTemplate.scala
+30
-0
src/main/scala/templates/Logger.scala
+1
-1
No files found.
input/Status Client 1.xml
0 → 100644
View file @
02bd8314
<?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
input/Status Client 2.xml
0 → 100644
View file @
02bd8314
<?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
input/Status Client 3.xml
0 → 100644
View file @
02bd8314
<?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
src/main/scala/Main.scala
View file @
02bd8314
...
@@ -47,12 +47,17 @@ object Main {
...
@@ -47,12 +47,17 @@ 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
_
=>
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"
)
case
_
=>
throw
new
Exception
(
"Undefined trade type"
)
}
}
}
}
}
}
}
}
}
}
}
def
main
(
args
:
Array
[
String
])
:
Unit
=
{
def
main
(
args
:
Array
[
String
])
:
Unit
=
{
if
(
args
.
length
!=
2
)
println
(
"Error: Undefined INPUT/OUTPUT directory. Usage: app INPUT OUTPUT"
)
if
(
args
.
length
!=
2
)
println
(
"Error: Undefined INPUT/OUTPUT directory. Usage: app INPUT OUTPUT"
)
...
...
src/main/scala/templates/ExecutionStatusReportTemplate.scala
0 → 100644
View file @
02bd8314
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
}
src/main/scala/templates/Logger.scala
View file @
02bd8314
...
@@ -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
\\
"_"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment