Commit eba24207 by Amelin Konstantin

Add comments to some template class

parent e27a7096
......@@ -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>
......
......@@ -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") }>
......
......@@ -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>
......
package templates
import scala.util.{Failure, Success, Try}
import scala.xml.Node
abstract class PartyTemplate(source: Node) extends Template(source) {
......
......@@ -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>
{/* executionDateTime isn`t present in the source */}
{/* value 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>
}
......
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