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
eba24207
Commit
eba24207
authored
Dec 19, 2018
by
Amelin Konstantin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comments to some template class
parent
e27a7096
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
4 deletions
+8
-4
src/main/scala/templates/CommodityForwardTemplate.scala
+1
-1
src/main/scala/templates/CommodityOptionTemplate.scala
+1
-1
src/main/scala/templates/CommoditySwapTemplate.scala
+1
-0
src/main/scala/templates/PartyTemplate.scala
+0
-1
src/main/scala/templates/TradeTemplate.scala
+5
-1
No files found.
src/main/scala/templates/CommodityForwardTemplate.scala
View file @
eba24207
...
...
@@ -62,7 +62,7 @@ class CommodityForwardTemplate(source: Node) extends TradeTemplate(source) {
<fpml:currency>
{
get
(
source
\\
"
trade
"
\
"
commodityForward
"
\
"
floatingForwardLeg
"
\
"
commodity
"
\
"
currency
"
)
}
</fpml:currency>
</rtsrep:commodity>
<fpml:totalNotionalQuantity>
{
get
(
source
\\
"
trade
"
\
"
commodityForward
"
\
"
floatingForwardLeg
"
\
"
totalNotionalQuantity
"
)
}
</fpml:totalNotionalQuantity>
{
/*
calculation/pricingDates
isn`t
present
in
source!!!*/
}
{
/*
Should
be
filled.
calculation/pricingDates
isn`t
present
in
source!!!*/
}
<rtsrep:calculation>
<fpml:pricingDates>
<fpml:pricingDates>
...
...
src/main/scala/templates/CommodityOptionTemplate.scala
View file @
eba24207
...
...
@@ -11,7 +11,7 @@ class CommodityOptionTemplate(source: Node) extends TradeTemplate(source) {
{
/*
Uses
dictionary
from
PartyTemplate
for
identifier
*/
}
<fpml:buyerPartyReference
href
={
parties
(
get
(
source
\\
"trade"
\
"commodityOption"
\
"buyerPartyReference"
,
"href"
).
mkString
).
_1
}/>
<
fpml
:
sellerPartyReference
href
={
parties
(
get
(
source
\\
"trade"
\
"commodityOption"
\
"sellerPartyReference"
,
"href"
).
mkString
).
_1
}/>
{
/* optionType isn`t present in source!!!*/
}
{
/*
Should be filled.
optionType isn`t present in source!!!*/
}
{
/* { <fpml:optionType>{ get(source \\ "trade" \ "commodityOption" \ "optionType") }</fpml:optionType> } */
}
<
fpml
:
optionType>
{
if
(
get
(
source
\\
"
trade
"
\
"
commodityOption
"
\
"
buyerPartyReference
"
,
"
href
"
)
.mkString
==
"Party1"
)
"Call"
else
"Put"
}</
fpml
:
optionType>
<fpml:commodity
id
={
get
(
source
\\
"trade"
\
"commodityOption"
\
"commodity"
,
"id"
)
}>
...
...
src/main/scala/templates/CommoditySwapTemplate.scala
View file @
eba24207
...
...
@@ -5,6 +5,7 @@ import scala.xml.Node
class
CommoditySwapTemplate
(
source
:
Node
)
extends
TradeTemplate
(
source
)
{
protected
[
this
]
def
templateTradeBody
:
Node
=
{
<
fpml
:
commoditySwap>
{
/*
productType
is
unknown
for
RTS
*/
}
{
/*
<fpml:productType>
{
get
(
source
\\
"
trade
"
\
"
commoditySwap
"
\
"
productType
"
)
}
</fpml:productType>
*/
}
<fpml:productId>
{
get
(
source
\\
"
trade
"
\
"
commoditySwap
"
\
"
productId
"
)
}
</fpml:productId>
<fpml:effectiveDate>
...
...
src/main/scala/templates/PartyTemplate.scala
View file @
eba24207
package
templates
import
scala.util.
{
Failure
,
Success
,
Try
}
import
scala.xml.Node
abstract
class
PartyTemplate
(
source
:
Node
)
extends
Template
(
source
)
{
...
...
src/main/scala/templates/TradeTemplate.scala
View file @
eba24207
...
...
@@ -30,12 +30,14 @@ abstract class TradeTemplate(source: Node) extends RegiAmendTradeTemplate(source
<fpml:partyReference
href
={
parties
(
get
(
source
\\
"trade"
\
"tradeHeader"
\
"partyTradeInformation"
\
"partyReference"
,
"href"
).
mkString
).
_1
}
/>
<
fpml
:
role>ClearingOrganization</fpml:role>
</fpml:relatedParty>
{
/*
value
isn`t
present
in
the
source
*/
}
<fpml:category
categoryScheme
=
"http://www.fpml.ru/repository/trade-settlement-type"
>{
get
(
source
\\
"trade"
\
"nsdSpecificTradeFields"
\
"clearSettlementType"
)
}</
fpml
:
category>
<fpml:category
categoryScheme
=
"http://www.fpml.ru/repository/trade-settlement-method"
>{
get
(
source
\\
"trade"
\
"nsdSpecificTradeFields"
\
"clearSettlementMethod"
)
}</
fpml
:
category>
{
/*
executionDateTim
e
isn`t
present
in
the
source
*/
}
{
/*
valu
e
isn`t
present
in
the
source
*/
}
<fpml:executionDateTime>
{
get
(
source
\\
"
trade
"
\
"
tradeHeader
"
\
"
tradeDate
"
)
+
"
T00:
00
:
00"
}
</fpml:executionDateTime>
<fpml:reportingRegime>
<fpml:name>
{
get
(
source
\\
"
trade
"
\
"
tradeHeader
"
\
"
partyTradeInformation
"
\
"
reportingRegime
"
\
"
name
"
)
}
</fpml:name>
{
/*
value
isn`t
present
in
the
source.
Rule
from
xls
file
*/
}
<fpml:mandatorilyClearable>
{
if
(
get
(
source
\\
"
trade
"
\
"
nsdSpecificTradeFields
"
\
"
cleared
"
)
.mkString.contains
(
"
Y
"
))
"
true
"
else
msgNotFound
}
</fpml:mandatorilyClearable>
</fpml:reportingRegime>
</fpml:partyTradeInformation>
...
...
@@ -77,6 +79,7 @@ abstract class TradeTemplate(source: Node) extends RegiAmendTradeTemplate(source
}</
fpml
:
value>
</fpml:timestamp>
</fpml:timestamps>
{
/*
value
isn`t
present
in
the
source
*/
}
<fpml:collateralizationType>
{
get
(
source
\\
"
trade
"
\
"
collateral
"
\
"
marginType
"
)
.mkString
match
{
case
"
FC
"
=>
"
Fully
"
...
...
@@ -86,6 +89,7 @@ abstract class TradeTemplate(source: Node) extends RegiAmendTradeTemplate(source
case
_
=>
msgNotFound
}
}</
fpml
:
collateralizationType>
{
/*
value
isn`t
present
in
the
source
*/
}
<fpml:collateralPortfolio>
{
get
(
source
\\
"
trade
"
\
"
collateral
"
\
"
collateralForm
"
)
}
</fpml:collateralPortfolio>
</fpml:partyTradeInformation>
}
...
...
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