public IRCalculation(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode paymentDatesNode = xmlNode.SelectSingleNode("paymentDates");

            if (paymentDatesNode != null)
            {
                if (paymentDatesNode.Attributes["href"] != null || paymentDatesNode.Attributes["id"] != null)
                {
                    if (paymentDatesNode.Attributes["id"] != null)
                    {
                        paymentDatesIDRef_ = paymentDatesNode.Attributes["id"].Value;
                        SchduleGen ob = new SchduleGen(paymentDatesNode);
                        IDManager.SetID(paymentDatesIDRef_, ob);
                    }
                    else if (paymentDatesNode.Attributes["href"] != null)
                    {
                        paymentDatesIDRef_ = paymentDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        paymentDates_ = new SchduleGen(paymentDatesNode);
                    }
                }
                else
                {
                    paymentDates_ = new SchduleGen(paymentDatesNode);
                }
            }


            XmlNode fixedRateNode = xmlNode.SelectSingleNode("fixedRate");

            if (fixedRateNode != null)
            {
                if (fixedRateNode.Attributes["href"] != null || fixedRateNode.Attributes["id"] != null)
                {
                    if (fixedRateNode.Attributes["id"] != null)
                    {
                        fixedRateIDRef_ = fixedRateNode.Attributes["id"].Value;
                        FixedRate ob = new FixedRate(fixedRateNode);
                        IDManager.SetID(fixedRateIDRef_, ob);
                    }
                    else if (fixedRateNode.Attributes["href"] != null)
                    {
                        fixedRateIDRef_ = fixedRateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fixedRate_ = new FixedRate(fixedRateNode);
                    }
                }
                else
                {
                    fixedRate_ = new FixedRate(fixedRateNode);
                }
            }


            XmlNode dayCountFractionNode = xmlNode.SelectSingleNode("dayCountFraction");

            if (dayCountFractionNode != null)
            {
                if (dayCountFractionNode.Attributes["href"] != null || dayCountFractionNode.Attributes["id"] != null)
                {
                    if (dayCountFractionNode.Attributes["id"] != null)
                    {
                        dayCountFractionIDRef_ = dayCountFractionNode.Attributes["id"].Value;
                        XsdTypeToken ob = new XsdTypeToken(dayCountFractionNode);
                        IDManager.SetID(dayCountFractionIDRef_, ob);
                    }
                    else if (dayCountFractionNode.Attributes["href"] != null)
                    {
                        dayCountFractionIDRef_ = dayCountFractionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dayCountFraction_ = new XsdTypeToken(dayCountFractionNode);
                    }
                }
                else
                {
                    dayCountFraction_ = new XsdTypeToken(dayCountFractionNode);
                }
            }


            XmlNode inArrearNode = xmlNode.SelectSingleNode("inArrear");

            if (inArrearNode != null)
            {
                if (inArrearNode.Attributes["href"] != null || inArrearNode.Attributes["id"] != null)
                {
                    if (inArrearNode.Attributes["id"] != null)
                    {
                        inArrearIDRef_ = inArrearNode.Attributes["id"].Value;
                        XsdTypeBoolean ob = new XsdTypeBoolean(inArrearNode);
                        IDManager.SetID(inArrearIDRef_, ob);
                    }
                    else if (inArrearNode.Attributes["href"] != null)
                    {
                        inArrearIDRef_ = inArrearNode.Attributes["href"].Value;
                    }
                    else
                    {
                        inArrear_ = new XsdTypeBoolean(inArrearNode);
                    }
                }
                else
                {
                    inArrear_ = new XsdTypeBoolean(inArrearNode);
                }
            }
        }
 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 IRCalculation(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode paymentDatesNode = xmlNode.SelectSingleNode("paymentDates");
     
     if (paymentDatesNode != null)
     {
         if (paymentDatesNode.Attributes["href"] != null || paymentDatesNode.Attributes["id"] != null) 
         {
             if (paymentDatesNode.Attributes["id"] != null) 
             {
                 paymentDatesIDRef_ = paymentDatesNode.Attributes["id"].Value;
                 SchduleGen ob = new SchduleGen(paymentDatesNode);
                 IDManager.SetID(paymentDatesIDRef_, ob);
             }
             else if (paymentDatesNode.Attributes["href"] != null)
             {
                 paymentDatesIDRef_ = paymentDatesNode.Attributes["href"].Value;
             }
             else
             {
                 paymentDates_ = new SchduleGen(paymentDatesNode);
             }
         }
         else
         {
             paymentDates_ = new SchduleGen(paymentDatesNode);
         }
     }
     
 
     XmlNode fixedRateNode = xmlNode.SelectSingleNode("fixedRate");
     
     if (fixedRateNode != null)
     {
         if (fixedRateNode.Attributes["href"] != null || fixedRateNode.Attributes["id"] != null) 
         {
             if (fixedRateNode.Attributes["id"] != null) 
             {
                 fixedRateIDRef_ = fixedRateNode.Attributes["id"].Value;
                 FixedRate ob = new FixedRate(fixedRateNode);
                 IDManager.SetID(fixedRateIDRef_, ob);
             }
             else if (fixedRateNode.Attributes["href"] != null)
             {
                 fixedRateIDRef_ = fixedRateNode.Attributes["href"].Value;
             }
             else
             {
                 fixedRate_ = new FixedRate(fixedRateNode);
             }
         }
         else
         {
             fixedRate_ = new FixedRate(fixedRateNode);
         }
     }
     
 
     XmlNode dayCountFractionNode = xmlNode.SelectSingleNode("dayCountFraction");
     
     if (dayCountFractionNode != null)
     {
         if (dayCountFractionNode.Attributes["href"] != null || dayCountFractionNode.Attributes["id"] != null) 
         {
             if (dayCountFractionNode.Attributes["id"] != null) 
             {
                 dayCountFractionIDRef_ = dayCountFractionNode.Attributes["id"].Value;
                 XsdTypeToken ob = new XsdTypeToken(dayCountFractionNode);
                 IDManager.SetID(dayCountFractionIDRef_, ob);
             }
             else if (dayCountFractionNode.Attributes["href"] != null)
             {
                 dayCountFractionIDRef_ = dayCountFractionNode.Attributes["href"].Value;
             }
             else
             {
                 dayCountFraction_ = new XsdTypeToken(dayCountFractionNode);
             }
         }
         else
         {
             dayCountFraction_ = new XsdTypeToken(dayCountFractionNode);
         }
     }
     
 
     XmlNode inArrearNode = xmlNode.SelectSingleNode("inArrear");
     
     if (inArrearNode != null)
     {
         if (inArrearNode.Attributes["href"] != null || inArrearNode.Attributes["id"] != null) 
         {
             if (inArrearNode.Attributes["id"] != null) 
             {
                 inArrearIDRef_ = inArrearNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(inArrearNode);
                 IDManager.SetID(inArrearIDRef_, ob);
             }
             else if (inArrearNode.Attributes["href"] != null)
             {
                 inArrearIDRef_ = inArrearNode.Attributes["href"].Value;
             }
             else
             {
                 inArrear_ = new XsdTypeBoolean(inArrearNode);
             }
         }
         else
         {
             inArrear_ = new XsdTypeBoolean(inArrearNode);
         }
     }
     
 
 }
        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);
                }
            }
        }