public SwapStream(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode calculationAmountNode = xmlNode.SelectSingleNode("calculationAmount");
     
     if (calculationAmountNode != null)
     {
         if (calculationAmountNode.Attributes["href"] != null || calculationAmountNode.Attributes["id"] != null) 
         {
             if (calculationAmountNode.Attributes["id"] != null) 
             {
                 calculationAmountIDRef_ = calculationAmountNode.Attributes["id"].Value;
                 CalculationAmount ob = new CalculationAmount(calculationAmountNode);
                 IDManager.SetID(calculationAmountIDRef_, ob);
             }
             else if (calculationAmountNode.Attributes["href"] != null)
             {
                 calculationAmountIDRef_ = calculationAmountNode.Attributes["href"].Value;
             }
             else
             {
                 calculationAmount_ = new CalculationAmount(calculationAmountNode);
             }
         }
         else
         {
             calculationAmount_ = new CalculationAmount(calculationAmountNode);
         }
     }
     
 
     XmlNode irCalculationNode = xmlNode.SelectSingleNode("irCalculation");
     
     if (irCalculationNode != null)
     {
         if (irCalculationNode.Attributes["href"] != null || irCalculationNode.Attributes["id"] != null) 
         {
             if (irCalculationNode.Attributes["id"] != null) 
             {
                 irCalculationIDRef_ = irCalculationNode.Attributes["id"].Value;
                 IRCalculation ob = new IRCalculation(irCalculationNode);
                 IDManager.SetID(irCalculationIDRef_, ob);
             }
             else if (irCalculationNode.Attributes["href"] != null)
             {
                 irCalculationIDRef_ = irCalculationNode.Attributes["href"].Value;
             }
             else
             {
                 irCalculation_ = new IRCalculation(irCalculationNode);
             }
         }
         else
         {
             irCalculation_ = new IRCalculation(irCalculationNode);
         }
     }
     
 
 }
예제 #2
0
        public SwapStream(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode calculationAmountNode = xmlNode.SelectSingleNode("calculationAmount");

            if (calculationAmountNode != null)
            {
                if (calculationAmountNode.Attributes["href"] != null || calculationAmountNode.Attributes["id"] != null)
                {
                    if (calculationAmountNode.Attributes["id"] != null)
                    {
                        calculationAmountIDRef_ = calculationAmountNode.Attributes["id"].Value;
                        CalculationAmount ob = new CalculationAmount(calculationAmountNode);
                        IDManager.SetID(calculationAmountIDRef_, ob);
                    }
                    else if (calculationAmountNode.Attributes["href"] != null)
                    {
                        calculationAmountIDRef_ = calculationAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationAmount_ = new CalculationAmount(calculationAmountNode);
                    }
                }
                else
                {
                    calculationAmount_ = new CalculationAmount(calculationAmountNode);
                }
            }


            XmlNode irCalculationNode = xmlNode.SelectSingleNode("irCalculation");

            if (irCalculationNode != null)
            {
                if (irCalculationNode.Attributes["href"] != null || irCalculationNode.Attributes["id"] != null)
                {
                    if (irCalculationNode.Attributes["id"] != null)
                    {
                        irCalculationIDRef_ = irCalculationNode.Attributes["id"].Value;
                        IRCalculation ob = new IRCalculation(irCalculationNode);
                        IDManager.SetID(irCalculationIDRef_, ob);
                    }
                    else if (irCalculationNode.Attributes["href"] != null)
                    {
                        irCalculationIDRef_ = irCalculationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        irCalculation_ = new IRCalculation(irCalculationNode);
                    }
                }
                else
                {
                    irCalculation_ = new IRCalculation(irCalculationNode);
                }
            }
        }
 public static CalculationAmount CreateCalculationAmount(XmlNode node)
 {
     return(CalculationAmount.CreateCalculationAmount(Type.KRW, 1));
 }
        public SwapInfo(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode tradeDateNode = xmlNode.SelectSingleNode("tradeDate");

            if (tradeDateNode != null)
            {
                if (tradeDateNode.Attributes["href"] != null || tradeDateNode.Attributes["id"] != null)
                {
                    if (tradeDateNode.Attributes["id"] != null)
                    {
                        tradeDateIDRef_ = tradeDateNode.Attributes["id"].Value;
                        XsdTypeDate ob = new XsdTypeDate(tradeDateNode);
                        IDManager.SetID(tradeDateIDRef_, ob);
                    }
                    else if (tradeDateNode.Attributes["href"] != null)
                    {
                        tradeDateIDRef_ = tradeDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        tradeDate_ = new XsdTypeDate(tradeDateNode);
                    }
                }
                else
                {
                    tradeDate_ = new XsdTypeDate(tradeDateNode);
                }
            }


            XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate");

            if (effectiveDateNode != null)
            {
                if (effectiveDateNode.Attributes["href"] != null || effectiveDateNode.Attributes["id"] != null)
                {
                    if (effectiveDateNode.Attributes["id"] != null)
                    {
                        effectiveDateIDRef_ = effectiveDateNode.Attributes["id"].Value;
                        XsdTypeDate ob = new XsdTypeDate(effectiveDateNode);
                        IDManager.SetID(effectiveDateIDRef_, ob);
                    }
                    else if (effectiveDateNode.Attributes["href"] != null)
                    {
                        effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        effectiveDate_ = new XsdTypeDate(effectiveDateNode);
                    }
                }
                else
                {
                    effectiveDate_ = new XsdTypeDate(effectiveDateNode);
                }
            }


            XmlNode maturityDateNode = xmlNode.SelectSingleNode("maturityDate");

            if (maturityDateNode != null)
            {
                if (maturityDateNode.Attributes["href"] != null || maturityDateNode.Attributes["id"] != null)
                {
                    if (maturityDateNode.Attributes["id"] != null)
                    {
                        maturityDateIDRef_ = maturityDateNode.Attributes["id"].Value;
                        XsdTypeDate ob = new XsdTypeDate(maturityDateNode);
                        IDManager.SetID(maturityDateIDRef_, ob);
                    }
                    else if (maturityDateNode.Attributes["href"] != null)
                    {
                        maturityDateIDRef_ = maturityDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        maturityDate_ = new XsdTypeDate(maturityDateNode);
                    }
                }
                else
                {
                    maturityDate_ = new XsdTypeDate(maturityDateNode);
                }
            }


            XmlNode calculationAmountNode = xmlNode.SelectSingleNode("calculationAmount");

            if (calculationAmountNode != null)
            {
                if (calculationAmountNode.Attributes["href"] != null || calculationAmountNode.Attributes["id"] != null)
                {
                    if (calculationAmountNode.Attributes["id"] != null)
                    {
                        calculationAmountIDRef_ = calculationAmountNode.Attributes["id"].Value;
                        CalculationAmount ob = new CalculationAmount(calculationAmountNode);
                        IDManager.SetID(calculationAmountIDRef_, ob);
                    }
                    else if (calculationAmountNode.Attributes["href"] != null)
                    {
                        calculationAmountIDRef_ = calculationAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationAmount_ = new CalculationAmount(calculationAmountNode);
                    }
                }
                else
                {
                    calculationAmount_ = new CalculationAmount(calculationAmountNode);
                }
            }


            XmlNode premiumNode = xmlNode.SelectSingleNode("premium");

            if (premiumNode != null)
            {
                if (premiumNode.Attributes["href"] != null || premiumNode.Attributes["id"] != null)
                {
                    if (premiumNode.Attributes["id"] != null)
                    {
                        premiumIDRef_ = premiumNode.Attributes["id"].Value;
                        XsdTypeDouble ob = new XsdTypeDouble(premiumNode);
                        IDManager.SetID(premiumIDRef_, ob);
                    }
                    else if (premiumNode.Attributes["href"] != null)
                    {
                        premiumIDRef_ = premiumNode.Attributes["href"].Value;
                    }
                    else
                    {
                        premium_ = new XsdTypeDouble(premiumNode);
                    }
                }
                else
                {
                    premium_ = new XsdTypeDouble(premiumNode);
                }
            }
        }
 public SwapInfo(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode tradeDateNode = xmlNode.SelectSingleNode("tradeDate");
     
     if (tradeDateNode != null)
     {
         if (tradeDateNode.Attributes["href"] != null || tradeDateNode.Attributes["id"] != null) 
         {
             if (tradeDateNode.Attributes["id"] != null) 
             {
                 tradeDateIDRef_ = tradeDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(tradeDateNode);
                 IDManager.SetID(tradeDateIDRef_, ob);
             }
             else if (tradeDateNode.Attributes["href"] != null)
             {
                 tradeDateIDRef_ = tradeDateNode.Attributes["href"].Value;
             }
             else
             {
                 tradeDate_ = new XsdTypeDate(tradeDateNode);
             }
         }
         else
         {
             tradeDate_ = new XsdTypeDate(tradeDateNode);
         }
     }
     
 
     XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate");
     
     if (effectiveDateNode != null)
     {
         if (effectiveDateNode.Attributes["href"] != null || effectiveDateNode.Attributes["id"] != null) 
         {
             if (effectiveDateNode.Attributes["id"] != null) 
             {
                 effectiveDateIDRef_ = effectiveDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(effectiveDateNode);
                 IDManager.SetID(effectiveDateIDRef_, ob);
             }
             else if (effectiveDateNode.Attributes["href"] != null)
             {
                 effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value;
             }
             else
             {
                 effectiveDate_ = new XsdTypeDate(effectiveDateNode);
             }
         }
         else
         {
             effectiveDate_ = new XsdTypeDate(effectiveDateNode);
         }
     }
     
 
     XmlNode maturityDateNode = xmlNode.SelectSingleNode("maturityDate");
     
     if (maturityDateNode != null)
     {
         if (maturityDateNode.Attributes["href"] != null || maturityDateNode.Attributes["id"] != null) 
         {
             if (maturityDateNode.Attributes["id"] != null) 
             {
                 maturityDateIDRef_ = maturityDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(maturityDateNode);
                 IDManager.SetID(maturityDateIDRef_, ob);
             }
             else if (maturityDateNode.Attributes["href"] != null)
             {
                 maturityDateIDRef_ = maturityDateNode.Attributes["href"].Value;
             }
             else
             {
                 maturityDate_ = new XsdTypeDate(maturityDateNode);
             }
         }
         else
         {
             maturityDate_ = new XsdTypeDate(maturityDateNode);
         }
     }
     
 
     XmlNode calculationAmountNode = xmlNode.SelectSingleNode("calculationAmount");
     
     if (calculationAmountNode != null)
     {
         if (calculationAmountNode.Attributes["href"] != null || calculationAmountNode.Attributes["id"] != null) 
         {
             if (calculationAmountNode.Attributes["id"] != null) 
             {
                 calculationAmountIDRef_ = calculationAmountNode.Attributes["id"].Value;
                 CalculationAmount ob = new CalculationAmount(calculationAmountNode);
                 IDManager.SetID(calculationAmountIDRef_, ob);
             }
             else if (calculationAmountNode.Attributes["href"] != null)
             {
                 calculationAmountIDRef_ = calculationAmountNode.Attributes["href"].Value;
             }
             else
             {
                 calculationAmount_ = new CalculationAmount(calculationAmountNode);
             }
         }
         else
         {
             calculationAmount_ = new CalculationAmount(calculationAmountNode);
         }
     }
     
 
     XmlNode premiumNode = xmlNode.SelectSingleNode("premium");
     
     if (premiumNode != null)
     {
         if (premiumNode.Attributes["href"] != null || premiumNode.Attributes["id"] != null) 
         {
             if (premiumNode.Attributes["id"] != null) 
             {
                 premiumIDRef_ = premiumNode.Attributes["id"].Value;
                 XsdTypeDouble ob = new XsdTypeDouble(premiumNode);
                 IDManager.SetID(premiumIDRef_, ob);
             }
             else if (premiumNode.Attributes["href"] != null)
             {
                 premiumIDRef_ = premiumNode.Attributes["href"].Value;
             }
             else
             {
                 premium_ = new XsdTypeDouble(premiumNode);
             }
         }
         else
         {
             premium_ = new XsdTypeDouble(premiumNode);
         }
     }
     
 
 }
 public ProtectionTerms(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode calculationAmountNode = xmlNode.SelectSingleNode("calculationAmount");
     
     if (calculationAmountNode != null)
     {
         if (calculationAmountNode.Attributes["href"] != null || calculationAmountNode.Attributes["id"] != null) 
         {
             if (calculationAmountNode.Attributes["id"] != null) 
             {
                 calculationAmountIDRef_ = calculationAmountNode.Attributes["id"].Value;
                 CalculationAmount ob = new CalculationAmount(calculationAmountNode);
                 IDManager.SetID(calculationAmountIDRef_, ob);
             }
             else if (calculationAmountNode.Attributes["href"] != null)
             {
                 calculationAmountIDRef_ = calculationAmountNode.Attributes["href"].Value;
             }
             else
             {
                 calculationAmount_ = new CalculationAmount(calculationAmountNode);
             }
         }
         else
         {
             calculationAmount_ = new CalculationAmount(calculationAmountNode);
         }
     }
     
 
     XmlNode creditEventsNode = xmlNode.SelectSingleNode("creditEvents");
     
     if (creditEventsNode != null)
     {
         if (creditEventsNode.Attributes["href"] != null || creditEventsNode.Attributes["id"] != null) 
         {
             if (creditEventsNode.Attributes["id"] != null) 
             {
                 creditEventsIDRef_ = creditEventsNode.Attributes["id"].Value;
                 CreditEvents ob = new CreditEvents(creditEventsNode);
                 IDManager.SetID(creditEventsIDRef_, ob);
             }
             else if (creditEventsNode.Attributes["href"] != null)
             {
                 creditEventsIDRef_ = creditEventsNode.Attributes["href"].Value;
             }
             else
             {
                 creditEvents_ = new CreditEvents(creditEventsNode);
             }
         }
         else
         {
             creditEvents_ = new CreditEvents(creditEventsNode);
         }
     }
     
 
     XmlNode accrualCouponNode = xmlNode.SelectSingleNode("accrualCoupon");
     
     if (accrualCouponNode != null)
     {
         if (accrualCouponNode.Attributes["href"] != null || accrualCouponNode.Attributes["id"] != null) 
         {
             if (accrualCouponNode.Attributes["id"] != null) 
             {
                 accrualCouponIDRef_ = accrualCouponNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(accrualCouponNode);
                 IDManager.SetID(accrualCouponIDRef_, ob);
             }
             else if (accrualCouponNode.Attributes["href"] != null)
             {
                 accrualCouponIDRef_ = accrualCouponNode.Attributes["href"].Value;
             }
             else
             {
                 accrualCoupon_ = new XsdTypeBoolean(accrualCouponNode);
             }
         }
         else
         {
             accrualCoupon_ = new XsdTypeBoolean(accrualCouponNode);
         }
     }
     
 
 }
        public CreditDefaultSwapPricing(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode calculationAmountNode = xmlNode.SelectSingleNode("calculationAmount");

            if (calculationAmountNode != null)
            {
                if (calculationAmountNode.Attributes["href"] != null || calculationAmountNode.Attributes["id"] != null)
                {
                    if (calculationAmountNode.Attributes["id"] != null)
                    {
                        calculationAmountIDRef_ = calculationAmountNode.Attributes["id"].Value;
                        CalculationAmount ob = new CalculationAmount(calculationAmountNode);
                        IDManager.SetID(calculationAmountIDRef_, ob);
                    }
                    else if (calculationAmountNode.Attributes["href"] != null)
                    {
                        calculationAmountIDRef_ = calculationAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationAmount_ = new CalculationAmount(calculationAmountNode);
                    }
                }
                else
                {
                    calculationAmount_ = new CalculationAmount(calculationAmountNode);
                }
            }


            XmlNode referenceEntityInfoNode = xmlNode.SelectSingleNode("referenceEntityInfo");

            if (referenceEntityInfoNode != null)
            {
                if (referenceEntityInfoNode.Attributes["href"] != null || referenceEntityInfoNode.Attributes["id"] != null)
                {
                    if (referenceEntityInfoNode.Attributes["id"] != null)
                    {
                        referenceEntityInfoIDRef_ = referenceEntityInfoNode.Attributes["id"].Value;
                        ReferenceEntityInfo ob = new ReferenceEntityInfo(referenceEntityInfoNode);
                        IDManager.SetID(referenceEntityInfoIDRef_, ob);
                    }
                    else if (referenceEntityInfoNode.Attributes["href"] != null)
                    {
                        referenceEntityInfoIDRef_ = referenceEntityInfoNode.Attributes["href"].Value;
                    }
                    else
                    {
                        referenceEntityInfo_ = new ReferenceEntityInfo(referenceEntityInfoNode);
                    }
                }
                else
                {
                    referenceEntityInfo_ = new ReferenceEntityInfo(referenceEntityInfoNode);
                }
            }


            XmlNode evaluationCurvesNode = xmlNode.SelectSingleNode("evaluationCurves");

            if (evaluationCurvesNode != null)
            {
                if (evaluationCurvesNode.Attributes["href"] != null || evaluationCurvesNode.Attributes["id"] != null)
                {
                    if (evaluationCurvesNode.Attributes["id"] != null)
                    {
                        evaluationCurvesIDRef_ = evaluationCurvesNode.Attributes["id"].Value;
                        EvaluationCurves ob = new EvaluationCurves(evaluationCurvesNode);
                        IDManager.SetID(evaluationCurvesIDRef_, ob);
                    }
                    else if (evaluationCurvesNode.Attributes["href"] != null)
                    {
                        evaluationCurvesIDRef_ = evaluationCurvesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        evaluationCurves_ = new EvaluationCurves(evaluationCurvesNode);
                    }
                }
                else
                {
                    evaluationCurves_ = new EvaluationCurves(evaluationCurvesNode);
                }
            }


            XmlNode discountCurveNode = xmlNode.SelectSingleNode("discountCurve");

            if (discountCurveNode != null)
            {
                if (discountCurveNode.Attributes["href"] != null || discountCurveNode.Attributes["id"] != null)
                {
                    if (discountCurveNode.Attributes["id"] != null)
                    {
                        discountCurveIDRef_ = discountCurveNode.Attributes["id"].Value;
                        DiscountCurve ob = new DiscountCurve(discountCurveNode);
                        IDManager.SetID(discountCurveIDRef_, ob);
                    }
                    else if (discountCurveNode.Attributes["href"] != null)
                    {
                        discountCurveIDRef_ = discountCurveNode.Attributes["href"].Value;
                    }
                    else
                    {
                        discountCurve_ = new DiscountCurve(discountCurveNode);
                    }
                }
                else
                {
                    discountCurve_ = new DiscountCurve(discountCurveNode);
                }
            }


            XmlNode recoveryRateNode = xmlNode.SelectSingleNode("recoveryRate");

            if (recoveryRateNode != null)
            {
                if (recoveryRateNode.Attributes["href"] != null || recoveryRateNode.Attributes["id"] != null)
                {
                    if (recoveryRateNode.Attributes["id"] != null)
                    {
                        recoveryRateIDRef_ = recoveryRateNode.Attributes["id"].Value;
                        XsdTypeDouble ob = new XsdTypeDouble(recoveryRateNode);
                        IDManager.SetID(recoveryRateIDRef_, ob);
                    }
                    else if (recoveryRateNode.Attributes["href"] != null)
                    {
                        recoveryRateIDRef_ = recoveryRateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        recoveryRate_ = new XsdTypeDouble(recoveryRateNode);
                    }
                }
                else
                {
                    recoveryRate_ = new XsdTypeDouble(recoveryRateNode);
                }
            }
        }
        public ProtectionTerms(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode calculationAmountNode = xmlNode.SelectSingleNode("calculationAmount");

            if (calculationAmountNode != null)
            {
                if (calculationAmountNode.Attributes["href"] != null || calculationAmountNode.Attributes["id"] != null)
                {
                    if (calculationAmountNode.Attributes["id"] != null)
                    {
                        calculationAmountIDRef_ = calculationAmountNode.Attributes["id"].Value;
                        CalculationAmount ob = new CalculationAmount(calculationAmountNode);
                        IDManager.SetID(calculationAmountIDRef_, ob);
                    }
                    else if (calculationAmountNode.Attributes["href"] != null)
                    {
                        calculationAmountIDRef_ = calculationAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationAmount_ = new CalculationAmount(calculationAmountNode);
                    }
                }
                else
                {
                    calculationAmount_ = new CalculationAmount(calculationAmountNode);
                }
            }


            XmlNode creditEventsNode = xmlNode.SelectSingleNode("creditEvents");

            if (creditEventsNode != null)
            {
                if (creditEventsNode.Attributes["href"] != null || creditEventsNode.Attributes["id"] != null)
                {
                    if (creditEventsNode.Attributes["id"] != null)
                    {
                        creditEventsIDRef_ = creditEventsNode.Attributes["id"].Value;
                        CreditEvents ob = new CreditEvents(creditEventsNode);
                        IDManager.SetID(creditEventsIDRef_, ob);
                    }
                    else if (creditEventsNode.Attributes["href"] != null)
                    {
                        creditEventsIDRef_ = creditEventsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        creditEvents_ = new CreditEvents(creditEventsNode);
                    }
                }
                else
                {
                    creditEvents_ = new CreditEvents(creditEventsNode);
                }
            }


            XmlNode accrualCouponNode = xmlNode.SelectSingleNode("accrualCoupon");

            if (accrualCouponNode != null)
            {
                if (accrualCouponNode.Attributes["href"] != null || accrualCouponNode.Attributes["id"] != null)
                {
                    if (accrualCouponNode.Attributes["id"] != null)
                    {
                        accrualCouponIDRef_ = accrualCouponNode.Attributes["id"].Value;
                        XsdTypeBoolean ob = new XsdTypeBoolean(accrualCouponNode);
                        IDManager.SetID(accrualCouponIDRef_, ob);
                    }
                    else if (accrualCouponNode.Attributes["href"] != null)
                    {
                        accrualCouponIDRef_ = accrualCouponNode.Attributes["href"].Value;
                    }
                    else
                    {
                        accrualCoupon_ = new XsdTypeBoolean(accrualCouponNode);
                    }
                }
                else
                {
                    accrualCoupon_ = new XsdTypeBoolean(accrualCouponNode);
                }
            }
        }