public ProtectionTerms(XmlNode xmlNode)
 {
     XmlNodeList calculationAmountNodeList = xmlNode.SelectNodes("calculationAmount");
     if (calculationAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationAmountIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(calculationAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationAmount = new Money(item);
             }
         }
     }
     
 
     XmlNodeList creditEventsNodeList = xmlNode.SelectNodes("creditEvents");
     if (creditEventsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in creditEventsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 creditEventsIDRef = item.Attributes["id"].Name;
                 CreditEvents ob = CreditEvents();
                 IDManager.SetID(creditEventsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 creditEventsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 creditEvents = new CreditEvents(item);
             }
         }
     }
     
 
     XmlNodeList obligationsNodeList = xmlNode.SelectNodes("obligations");
     if (obligationsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in obligationsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 obligationsIDRef = item.Attributes["id"].Name;
                 Obligations ob = Obligations();
                 IDManager.SetID(obligationsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 obligationsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 obligations = new Obligations(item);
             }
         }
     }
     
 
     XmlNodeList floatingAmountEventsNodeList = xmlNode.SelectNodes("floatingAmountEvents");
     if (floatingAmountEventsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in floatingAmountEventsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 floatingAmountEventsIDRef = item.Attributes["id"].Name;
                 FloatingAmountEvents ob = FloatingAmountEvents();
                 IDManager.SetID(floatingAmountEventsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 floatingAmountEventsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 floatingAmountEvents = new FloatingAmountEvents(item);
             }
         }
     }
     
 
 }
 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 obligationsNode = xmlNode.SelectSingleNode("obligations");
     
     if (obligationsNode != null)
     {
         if (obligationsNode.Attributes["href"] != null || obligationsNode.Attributes["id"] != null) 
         {
             if (obligationsNode.Attributes["id"] != null) 
             {
                 obligationsIDRef_ = obligationsNode.Attributes["id"].Value;
                 Obligations ob = new Obligations(obligationsNode);
                 IDManager.SetID(obligationsIDRef_, ob);
             }
             else if (obligationsNode.Attributes["href"] != null)
             {
                 obligationsIDRef_ = obligationsNode.Attributes["href"].Value;
             }
             else
             {
                 obligations_ = new Obligations(obligationsNode);
             }
         }
         else
         {
             obligations_ = new Obligations(obligationsNode);
         }
     }
     
 
     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);
         }
     }
     
 
 }
Exemple #3
0
        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 obligationsNode = xmlNode.SelectSingleNode("obligations");

            if (obligationsNode != null)
            {
                if (obligationsNode.Attributes["href"] != null || obligationsNode.Attributes["id"] != null)
                {
                    if (obligationsNode.Attributes["id"] != null)
                    {
                        obligationsIDRef_ = obligationsNode.Attributes["id"].Value;
                        Obligations ob = new Obligations(obligationsNode);
                        IDManager.SetID(obligationsIDRef_, ob);
                    }
                    else if (obligationsNode.Attributes["href"] != null)
                    {
                        obligationsIDRef_ = obligationsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        obligations_ = new Obligations(obligationsNode);
                    }
                }
                else
                {
                    obligations_ = new Obligations(obligationsNode);
                }
            }


            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 CreditCurve(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList referenceEntityNodeList = xmlNode.SelectNodes("referenceEntity");
     if (referenceEntityNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in referenceEntityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 referenceEntityIDRef = item.Attributes["id"].Name;
                 LegalEntity ob = LegalEntity();
                 IDManager.SetID(referenceEntityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 referenceEntityIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 referenceEntity = new LegalEntity(item);
             }
         }
     }
     
 
     XmlNodeList creditEntityReferenceNodeList = xmlNode.SelectNodes("creditEntityReference");
     if (creditEntityReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in creditEntityReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 creditEntityReferenceIDRef = item.Attributes["id"].Name;
                 LegalEntityReference ob = LegalEntityReference();
                 IDManager.SetID(creditEntityReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 creditEntityReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 creditEntityReference = new LegalEntityReference(item);
             }
         }
     }
     
 
     XmlNodeList creditEventsNodeList = xmlNode.SelectNodes("creditEvents");
     if (creditEventsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in creditEventsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 creditEventsIDRef = item.Attributes["id"].Name;
                 CreditEvents ob = CreditEvents();
                 IDManager.SetID(creditEventsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 creditEventsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 creditEvents = new CreditEvents(item);
             }
         }
     }
     
 
     XmlNodeList seniorityNodeList = xmlNode.SelectNodes("seniority");
     if (seniorityNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in seniorityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 seniorityIDRef = item.Attributes["id"].Name;
                 CreditSeniority ob = CreditSeniority();
                 IDManager.SetID(seniorityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 seniorityIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 seniority = new CreditSeniority(item);
             }
         }
     }
     
 
     XmlNodeList securedNodeList = xmlNode.SelectNodes("secured");
     if (securedNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in securedNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 securedIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(securedIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 securedIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 secured = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList obligationCurrencyNodeList = xmlNode.SelectNodes("obligationCurrency");
     if (obligationCurrencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in obligationCurrencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 obligationCurrencyIDRef = item.Attributes["id"].Name;
                 Currency ob = Currency();
                 IDManager.SetID(obligationCurrencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 obligationCurrencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 obligationCurrency = new Currency(item);
             }
         }
     }
     
 
     XmlNodeList obligationsNodeList = xmlNode.SelectNodes("obligations");
     if (obligationsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in obligationsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 obligationsIDRef = item.Attributes["id"].Name;
                 Obligations ob = Obligations();
                 IDManager.SetID(obligationsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 obligationsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 obligations = new Obligations(item);
             }
         }
     }
     
 
     XmlNodeList deliverableObligationsNodeList = xmlNode.SelectNodes("deliverableObligations");
     if (deliverableObligationsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in deliverableObligationsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 deliverableObligationsIDRef = item.Attributes["id"].Name;
                 DeliverableObligations ob = DeliverableObligations();
                 IDManager.SetID(deliverableObligationsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliverableObligationsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliverableObligations = new DeliverableObligations(item);
             }
         }
     }
     
 
 }
        public ProtectionTerms(XmlNode xmlNode)
        {
            XmlNodeList calculationAmountNodeList = xmlNode.SelectNodes("calculationAmount");

            if (calculationAmountNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in calculationAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationAmountIDRef = item.Attributes["id"].Name;
                        Money ob = Money();
                        IDManager.SetID(calculationAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationAmount = new Money(item);
                    }
                }
            }


            XmlNodeList creditEventsNodeList = xmlNode.SelectNodes("creditEvents");

            if (creditEventsNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in creditEventsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        creditEventsIDRef = item.Attributes["id"].Name;
                        CreditEvents ob = CreditEvents();
                        IDManager.SetID(creditEventsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        creditEventsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        creditEvents = new CreditEvents(item);
                    }
                }
            }


            XmlNodeList obligationsNodeList = xmlNode.SelectNodes("obligations");

            if (obligationsNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in obligationsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        obligationsIDRef = item.Attributes["id"].Name;
                        Obligations ob = Obligations();
                        IDManager.SetID(obligationsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        obligationsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        obligations = new Obligations(item);
                    }
                }
            }


            XmlNodeList floatingAmountEventsNodeList = xmlNode.SelectNodes("floatingAmountEvents");

            if (floatingAmountEventsNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in floatingAmountEventsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        floatingAmountEventsIDRef = item.Attributes["id"].Name;
                        FloatingAmountEvents ob = FloatingAmountEvents();
                        IDManager.SetID(floatingAmountEventsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        floatingAmountEventsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        floatingAmountEvents = new FloatingAmountEvents(item);
                    }
                }
            }
        }
        public ProtectionTerms(XmlNode 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;
                        Money ob = new Money(calculationAmountNode);
                        IDManager.SetID(calculationAmountIDRef_, ob);
                    }
                    else if (calculationAmountNode.Attributes["href"] != null)
                    {
                        calculationAmountIDRef_ = calculationAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationAmount_ = new Money(calculationAmountNode);
                    }
                }
                else
                {
                    calculationAmount_ = new Money(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 obligationsNode = xmlNode.SelectSingleNode("obligations");

            if (obligationsNode != null)
            {
                if (obligationsNode.Attributes["href"] != null || obligationsNode.Attributes["id"] != null)
                {
                    if (obligationsNode.Attributes["id"] != null)
                    {
                        obligationsIDRef_ = obligationsNode.Attributes["id"].Value;
                        Obligations ob = new Obligations(obligationsNode);
                        IDManager.SetID(obligationsIDRef_, ob);
                    }
                    else if (obligationsNode.Attributes["href"] != null)
                    {
                        obligationsIDRef_ = obligationsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        obligations_ = new Obligations(obligationsNode);
                    }
                }
                else
                {
                    obligations_ = new Obligations(obligationsNode);
                }
            }


            XmlNode floatingAmountEventsNode = xmlNode.SelectSingleNode("floatingAmountEvents");

            if (floatingAmountEventsNode != null)
            {
                if (floatingAmountEventsNode.Attributes["href"] != null || floatingAmountEventsNode.Attributes["id"] != null)
                {
                    if (floatingAmountEventsNode.Attributes["id"] != null)
                    {
                        floatingAmountEventsIDRef_ = floatingAmountEventsNode.Attributes["id"].Value;
                        FloatingAmountEvents ob = new FloatingAmountEvents(floatingAmountEventsNode);
                        IDManager.SetID(floatingAmountEventsIDRef_, ob);
                    }
                    else if (floatingAmountEventsNode.Attributes["href"] != null)
                    {
                        floatingAmountEventsIDRef_ = floatingAmountEventsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        floatingAmountEvents_ = new FloatingAmountEvents(floatingAmountEventsNode);
                    }
                }
                else
                {
                    floatingAmountEvents_ = new FloatingAmountEvents(floatingAmountEventsNode);
                }
            }
        }
 public CreditCurve(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode referenceEntityNode = xmlNode.SelectSingleNode("referenceEntity");
     
     if (referenceEntityNode != null)
     {
         if (referenceEntityNode.Attributes["href"] != null || referenceEntityNode.Attributes["id"] != null) 
         {
             if (referenceEntityNode.Attributes["id"] != null) 
             {
                 referenceEntityIDRef_ = referenceEntityNode.Attributes["id"].Value;
                 LegalEntity ob = new LegalEntity(referenceEntityNode);
                 IDManager.SetID(referenceEntityIDRef_, ob);
             }
             else if (referenceEntityNode.Attributes["href"] != null)
             {
                 referenceEntityIDRef_ = referenceEntityNode.Attributes["href"].Value;
             }
             else
             {
                 referenceEntity_ = new LegalEntity(referenceEntityNode);
             }
         }
         else
         {
             referenceEntity_ = new LegalEntity(referenceEntityNode);
         }
     }
     
 
     XmlNode creditEntityReferenceNode = xmlNode.SelectSingleNode("creditEntityReference");
     
     if (creditEntityReferenceNode != null)
     {
         if (creditEntityReferenceNode.Attributes["href"] != null || creditEntityReferenceNode.Attributes["id"] != null) 
         {
             if (creditEntityReferenceNode.Attributes["id"] != null) 
             {
                 creditEntityReferenceIDRef_ = creditEntityReferenceNode.Attributes["id"].Value;
                 LegalEntityReference ob = new LegalEntityReference(creditEntityReferenceNode);
                 IDManager.SetID(creditEntityReferenceIDRef_, ob);
             }
             else if (creditEntityReferenceNode.Attributes["href"] != null)
             {
                 creditEntityReferenceIDRef_ = creditEntityReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 creditEntityReference_ = new LegalEntityReference(creditEntityReferenceNode);
             }
         }
         else
         {
             creditEntityReference_ = new LegalEntityReference(creditEntityReferenceNode);
         }
     }
     
 
     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 seniorityNode = xmlNode.SelectSingleNode("seniority");
     
     if (seniorityNode != null)
     {
         if (seniorityNode.Attributes["href"] != null || seniorityNode.Attributes["id"] != null) 
         {
             if (seniorityNode.Attributes["id"] != null) 
             {
                 seniorityIDRef_ = seniorityNode.Attributes["id"].Value;
                 CreditSeniority ob = new CreditSeniority(seniorityNode);
                 IDManager.SetID(seniorityIDRef_, ob);
             }
             else if (seniorityNode.Attributes["href"] != null)
             {
                 seniorityIDRef_ = seniorityNode.Attributes["href"].Value;
             }
             else
             {
                 seniority_ = new CreditSeniority(seniorityNode);
             }
         }
         else
         {
             seniority_ = new CreditSeniority(seniorityNode);
         }
     }
     
 
     XmlNode securedNode = xmlNode.SelectSingleNode("secured");
     
     if (securedNode != null)
     {
         if (securedNode.Attributes["href"] != null || securedNode.Attributes["id"] != null) 
         {
             if (securedNode.Attributes["id"] != null) 
             {
                 securedIDRef_ = securedNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(securedNode);
                 IDManager.SetID(securedIDRef_, ob);
             }
             else if (securedNode.Attributes["href"] != null)
             {
                 securedIDRef_ = securedNode.Attributes["href"].Value;
             }
             else
             {
                 secured_ = new XsdTypeBoolean(securedNode);
             }
         }
         else
         {
             secured_ = new XsdTypeBoolean(securedNode);
         }
     }
     
 
     XmlNode obligationCurrencyNode = xmlNode.SelectSingleNode("obligationCurrency");
     
     if (obligationCurrencyNode != null)
     {
         if (obligationCurrencyNode.Attributes["href"] != null || obligationCurrencyNode.Attributes["id"] != null) 
         {
             if (obligationCurrencyNode.Attributes["id"] != null) 
             {
                 obligationCurrencyIDRef_ = obligationCurrencyNode.Attributes["id"].Value;
                 Currency ob = new Currency(obligationCurrencyNode);
                 IDManager.SetID(obligationCurrencyIDRef_, ob);
             }
             else if (obligationCurrencyNode.Attributes["href"] != null)
             {
                 obligationCurrencyIDRef_ = obligationCurrencyNode.Attributes["href"].Value;
             }
             else
             {
                 obligationCurrency_ = new Currency(obligationCurrencyNode);
             }
         }
         else
         {
             obligationCurrency_ = new Currency(obligationCurrencyNode);
         }
     }
     
 
     XmlNode obligationsNode = xmlNode.SelectSingleNode("obligations");
     
     if (obligationsNode != null)
     {
         if (obligationsNode.Attributes["href"] != null || obligationsNode.Attributes["id"] != null) 
         {
             if (obligationsNode.Attributes["id"] != null) 
             {
                 obligationsIDRef_ = obligationsNode.Attributes["id"].Value;
                 Obligations ob = new Obligations(obligationsNode);
                 IDManager.SetID(obligationsIDRef_, ob);
             }
             else if (obligationsNode.Attributes["href"] != null)
             {
                 obligationsIDRef_ = obligationsNode.Attributes["href"].Value;
             }
             else
             {
                 obligations_ = new Obligations(obligationsNode);
             }
         }
         else
         {
             obligations_ = new Obligations(obligationsNode);
         }
     }
     
 
     XmlNode deliverableObligationsNode = xmlNode.SelectSingleNode("deliverableObligations");
     
     if (deliverableObligationsNode != null)
     {
         if (deliverableObligationsNode.Attributes["href"] != null || deliverableObligationsNode.Attributes["id"] != null) 
         {
             if (deliverableObligationsNode.Attributes["id"] != null) 
             {
                 deliverableObligationsIDRef_ = deliverableObligationsNode.Attributes["id"].Value;
                 DeliverableObligations ob = new DeliverableObligations(deliverableObligationsNode);
                 IDManager.SetID(deliverableObligationsIDRef_, ob);
             }
             else if (deliverableObligationsNode.Attributes["href"] != null)
             {
                 deliverableObligationsIDRef_ = deliverableObligationsNode.Attributes["href"].Value;
             }
             else
             {
                 deliverableObligations_ = new DeliverableObligations(deliverableObligationsNode);
             }
         }
         else
         {
             deliverableObligations_ = new DeliverableObligations(deliverableObligationsNode);
         }
     }
     
 
 }
        public CreditCurve(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode referenceEntityNode = xmlNode.SelectSingleNode("referenceEntity");

            if (referenceEntityNode != null)
            {
                if (referenceEntityNode.Attributes["href"] != null || referenceEntityNode.Attributes["id"] != null)
                {
                    if (referenceEntityNode.Attributes["id"] != null)
                    {
                        referenceEntityIDRef_ = referenceEntityNode.Attributes["id"].Value;
                        LegalEntity ob = new LegalEntity(referenceEntityNode);
                        IDManager.SetID(referenceEntityIDRef_, ob);
                    }
                    else if (referenceEntityNode.Attributes["href"] != null)
                    {
                        referenceEntityIDRef_ = referenceEntityNode.Attributes["href"].Value;
                    }
                    else
                    {
                        referenceEntity_ = new LegalEntity(referenceEntityNode);
                    }
                }
                else
                {
                    referenceEntity_ = new LegalEntity(referenceEntityNode);
                }
            }


            XmlNode creditEntityReferenceNode = xmlNode.SelectSingleNode("creditEntityReference");

            if (creditEntityReferenceNode != null)
            {
                if (creditEntityReferenceNode.Attributes["href"] != null || creditEntityReferenceNode.Attributes["id"] != null)
                {
                    if (creditEntityReferenceNode.Attributes["id"] != null)
                    {
                        creditEntityReferenceIDRef_ = creditEntityReferenceNode.Attributes["id"].Value;
                        LegalEntityReference ob = new LegalEntityReference(creditEntityReferenceNode);
                        IDManager.SetID(creditEntityReferenceIDRef_, ob);
                    }
                    else if (creditEntityReferenceNode.Attributes["href"] != null)
                    {
                        creditEntityReferenceIDRef_ = creditEntityReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        creditEntityReference_ = new LegalEntityReference(creditEntityReferenceNode);
                    }
                }
                else
                {
                    creditEntityReference_ = new LegalEntityReference(creditEntityReferenceNode);
                }
            }


            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 seniorityNode = xmlNode.SelectSingleNode("seniority");

            if (seniorityNode != null)
            {
                if (seniorityNode.Attributes["href"] != null || seniorityNode.Attributes["id"] != null)
                {
                    if (seniorityNode.Attributes["id"] != null)
                    {
                        seniorityIDRef_ = seniorityNode.Attributes["id"].Value;
                        CreditSeniority ob = new CreditSeniority(seniorityNode);
                        IDManager.SetID(seniorityIDRef_, ob);
                    }
                    else if (seniorityNode.Attributes["href"] != null)
                    {
                        seniorityIDRef_ = seniorityNode.Attributes["href"].Value;
                    }
                    else
                    {
                        seniority_ = new CreditSeniority(seniorityNode);
                    }
                }
                else
                {
                    seniority_ = new CreditSeniority(seniorityNode);
                }
            }


            XmlNode securedNode = xmlNode.SelectSingleNode("secured");

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


            XmlNode obligationCurrencyNode = xmlNode.SelectSingleNode("obligationCurrency");

            if (obligationCurrencyNode != null)
            {
                if (obligationCurrencyNode.Attributes["href"] != null || obligationCurrencyNode.Attributes["id"] != null)
                {
                    if (obligationCurrencyNode.Attributes["id"] != null)
                    {
                        obligationCurrencyIDRef_ = obligationCurrencyNode.Attributes["id"].Value;
                        Currency ob = new Currency(obligationCurrencyNode);
                        IDManager.SetID(obligationCurrencyIDRef_, ob);
                    }
                    else if (obligationCurrencyNode.Attributes["href"] != null)
                    {
                        obligationCurrencyIDRef_ = obligationCurrencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        obligationCurrency_ = new Currency(obligationCurrencyNode);
                    }
                }
                else
                {
                    obligationCurrency_ = new Currency(obligationCurrencyNode);
                }
            }


            XmlNode obligationsNode = xmlNode.SelectSingleNode("obligations");

            if (obligationsNode != null)
            {
                if (obligationsNode.Attributes["href"] != null || obligationsNode.Attributes["id"] != null)
                {
                    if (obligationsNode.Attributes["id"] != null)
                    {
                        obligationsIDRef_ = obligationsNode.Attributes["id"].Value;
                        Obligations ob = new Obligations(obligationsNode);
                        IDManager.SetID(obligationsIDRef_, ob);
                    }
                    else if (obligationsNode.Attributes["href"] != null)
                    {
                        obligationsIDRef_ = obligationsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        obligations_ = new Obligations(obligationsNode);
                    }
                }
                else
                {
                    obligations_ = new Obligations(obligationsNode);
                }
            }


            XmlNode deliverableObligationsNode = xmlNode.SelectSingleNode("deliverableObligations");

            if (deliverableObligationsNode != null)
            {
                if (deliverableObligationsNode.Attributes["href"] != null || deliverableObligationsNode.Attributes["id"] != null)
                {
                    if (deliverableObligationsNode.Attributes["id"] != null)
                    {
                        deliverableObligationsIDRef_ = deliverableObligationsNode.Attributes["id"].Value;
                        DeliverableObligations ob = new DeliverableObligations(deliverableObligationsNode);
                        IDManager.SetID(deliverableObligationsIDRef_, ob);
                    }
                    else if (deliverableObligationsNode.Attributes["href"] != null)
                    {
                        deliverableObligationsIDRef_ = deliverableObligationsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliverableObligations_ = new DeliverableObligations(deliverableObligationsNode);
                    }
                }
                else
                {
                    deliverableObligations_ = new DeliverableObligations(deliverableObligationsNode);
                }
            }
        }
 public ProtectionTerms(XmlNode 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;
                 Money ob = new Money(calculationAmountNode);
                 IDManager.SetID(calculationAmountIDRef_, ob);
             }
             else if (calculationAmountNode.Attributes["href"] != null)
             {
                 calculationAmountIDRef_ = calculationAmountNode.Attributes["href"].Value;
             }
             else
             {
                 calculationAmount_ = new Money(calculationAmountNode);
             }
         }
         else
         {
             calculationAmount_ = new Money(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 obligationsNode = xmlNode.SelectSingleNode("obligations");
     
     if (obligationsNode != null)
     {
         if (obligationsNode.Attributes["href"] != null || obligationsNode.Attributes["id"] != null) 
         {
             if (obligationsNode.Attributes["id"] != null) 
             {
                 obligationsIDRef_ = obligationsNode.Attributes["id"].Value;
                 Obligations ob = new Obligations(obligationsNode);
                 IDManager.SetID(obligationsIDRef_, ob);
             }
             else if (obligationsNode.Attributes["href"] != null)
             {
                 obligationsIDRef_ = obligationsNode.Attributes["href"].Value;
             }
             else
             {
                 obligations_ = new Obligations(obligationsNode);
             }
         }
         else
         {
             obligations_ = new Obligations(obligationsNode);
         }
     }
     
 
     XmlNode floatingAmountEventsNode = xmlNode.SelectSingleNode("floatingAmountEvents");
     
     if (floatingAmountEventsNode != null)
     {
         if (floatingAmountEventsNode.Attributes["href"] != null || floatingAmountEventsNode.Attributes["id"] != null) 
         {
             if (floatingAmountEventsNode.Attributes["id"] != null) 
             {
                 floatingAmountEventsIDRef_ = floatingAmountEventsNode.Attributes["id"].Value;
                 FloatingAmountEvents ob = new FloatingAmountEvents(floatingAmountEventsNode);
                 IDManager.SetID(floatingAmountEventsIDRef_, ob);
             }
             else if (floatingAmountEventsNode.Attributes["href"] != null)
             {
                 floatingAmountEventsIDRef_ = floatingAmountEventsNode.Attributes["href"].Value;
             }
             else
             {
                 floatingAmountEvents_ = new FloatingAmountEvents(floatingAmountEventsNode);
             }
         }
         else
         {
             floatingAmountEvents_ = new FloatingAmountEvents(floatingAmountEventsNode);
         }
     }
     
 
 }
        public CreditCurve(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList referenceEntityNodeList = xmlNode.SelectNodes("referenceEntity");

            if (referenceEntityNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in referenceEntityNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        referenceEntityIDRef = item.Attributes["id"].Name;
                        LegalEntity ob = LegalEntity();
                        IDManager.SetID(referenceEntityIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        referenceEntityIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        referenceEntity = new LegalEntity(item);
                    }
                }
            }


            XmlNodeList creditEntityReferenceNodeList = xmlNode.SelectNodes("creditEntityReference");

            if (creditEntityReferenceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in creditEntityReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        creditEntityReferenceIDRef = item.Attributes["id"].Name;
                        LegalEntityReference ob = LegalEntityReference();
                        IDManager.SetID(creditEntityReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        creditEntityReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        creditEntityReference = new LegalEntityReference(item);
                    }
                }
            }


            XmlNodeList creditEventsNodeList = xmlNode.SelectNodes("creditEvents");

            if (creditEventsNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in creditEventsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        creditEventsIDRef = item.Attributes["id"].Name;
                        CreditEvents ob = CreditEvents();
                        IDManager.SetID(creditEventsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        creditEventsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        creditEvents = new CreditEvents(item);
                    }
                }
            }


            XmlNodeList seniorityNodeList = xmlNode.SelectNodes("seniority");

            if (seniorityNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in seniorityNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        seniorityIDRef = item.Attributes["id"].Name;
                        CreditSeniority ob = CreditSeniority();
                        IDManager.SetID(seniorityIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        seniorityIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        seniority = new CreditSeniority(item);
                    }
                }
            }


            XmlNodeList securedNodeList = xmlNode.SelectNodes("secured");

            if (securedNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in securedNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        securedIDRef = item.Attributes["id"].Name;
                        XsdTypeBoolean ob = XsdTypeBoolean();
                        IDManager.SetID(securedIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        securedIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        secured = new XsdTypeBoolean(item);
                    }
                }
            }


            XmlNodeList obligationCurrencyNodeList = xmlNode.SelectNodes("obligationCurrency");

            if (obligationCurrencyNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in obligationCurrencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        obligationCurrencyIDRef = item.Attributes["id"].Name;
                        Currency ob = Currency();
                        IDManager.SetID(obligationCurrencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        obligationCurrencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        obligationCurrency = new Currency(item);
                    }
                }
            }


            XmlNodeList obligationsNodeList = xmlNode.SelectNodes("obligations");

            if (obligationsNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in obligationsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        obligationsIDRef = item.Attributes["id"].Name;
                        Obligations ob = Obligations();
                        IDManager.SetID(obligationsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        obligationsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        obligations = new Obligations(item);
                    }
                }
            }


            XmlNodeList deliverableObligationsNodeList = xmlNode.SelectNodes("deliverableObligations");

            if (deliverableObligationsNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in deliverableObligationsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        deliverableObligationsIDRef = item.Attributes["id"].Name;
                        DeliverableObligations ob = DeliverableObligations();
                        IDManager.SetID(deliverableObligationsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        deliverableObligationsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        deliverableObligations = new DeliverableObligations(item);
                    }
                }
            }
        }