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 Trigger(XmlNode xmlNode)
 {
     XmlNodeList levelNodeList = xmlNode.SelectNodes("level");
     if (levelNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in levelNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 levelIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(levelIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 levelIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 level = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList levelPercentageNodeList = xmlNode.SelectNodes("levelPercentage");
     if (levelPercentageNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in levelPercentageNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 levelPercentageIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(levelPercentageIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 levelPercentageIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 levelPercentage = new XsdTypeDecimal(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 creditEventsReferenceNodeList = xmlNode.SelectNodes("creditEventsReference");
     if (creditEventsReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in creditEventsReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 creditEventsReferenceIDRef = item.Attributes["id"].Name;
                 CreditEventsReference ob = CreditEventsReference();
                 IDManager.SetID(creditEventsReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 creditEventsReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 creditEventsReference = new CreditEventsReference(item);
             }
         }
     }
     
 
     XmlNodeList triggerTypeNodeList = xmlNode.SelectNodes("triggerType");
     if (triggerTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in triggerTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 triggerTypeIDRef = item.Attributes["id"].Name;
                 TriggerTypeEnum ob = TriggerTypeEnum();
                 IDManager.SetID(triggerTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 triggerTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 triggerType = new TriggerTypeEnum(item);
             }
         }
     }
     
 
     XmlNodeList triggerTimeTypeNodeList = xmlNode.SelectNodes("triggerTimeType");
     if (triggerTimeTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in triggerTimeTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 triggerTimeTypeIDRef = item.Attributes["id"].Name;
                 TriggerTimeTypeEnum ob = TriggerTimeTypeEnum();
                 IDManager.SetID(triggerTimeTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 triggerTimeTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 triggerTimeType = new TriggerTimeTypeEnum(item);
             }
         }
     }
     
 
 }
        public Trigger(XmlNode xmlNode)
        {
            XmlNodeList levelNodeList = xmlNode.SelectNodes("level");

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

            foreach (XmlNode item in levelNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        levelIDRef = item.Attributes["id"].Name;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(levelIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        levelIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        level = new XsdTypeDecimal(item);
                    }
                }
            }


            XmlNodeList levelPercentageNodeList = xmlNode.SelectNodes("levelPercentage");

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

            foreach (XmlNode item in levelPercentageNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        levelPercentageIDRef = item.Attributes["id"].Name;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(levelPercentageIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        levelPercentageIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        levelPercentage = new XsdTypeDecimal(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 creditEventsReferenceNodeList = xmlNode.SelectNodes("creditEventsReference");

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

            foreach (XmlNode item in creditEventsReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        creditEventsReferenceIDRef = item.Attributes["id"].Name;
                        CreditEventsReference ob = CreditEventsReference();
                        IDManager.SetID(creditEventsReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        creditEventsReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        creditEventsReference = new CreditEventsReference(item);
                    }
                }
            }


            XmlNodeList triggerTypeNodeList = xmlNode.SelectNodes("triggerType");

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

            foreach (XmlNode item in triggerTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        triggerTypeIDRef = item.Attributes["id"].Name;
                        TriggerTypeEnum ob = TriggerTypeEnum();
                        IDManager.SetID(triggerTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        triggerTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        triggerType = new TriggerTypeEnum(item);
                    }
                }
            }


            XmlNodeList triggerTimeTypeNodeList = xmlNode.SelectNodes("triggerTimeType");

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

            foreach (XmlNode item in triggerTimeTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        triggerTimeTypeIDRef = item.Attributes["id"].Name;
                        TriggerTimeTypeEnum ob = TriggerTimeTypeEnum();
                        IDManager.SetID(triggerTimeTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        triggerTimeTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        triggerTimeType = new TriggerTimeTypeEnum(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);
         }
     }
     
 
 }
Beispiel #5
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 Trigger(XmlNode xmlNode)
 {
     XmlNode levelNode = xmlNode.SelectSingleNode("level");
     
     if (levelNode != null)
     {
         if (levelNode.Attributes["href"] != null || levelNode.Attributes["id"] != null) 
         {
             if (levelNode.Attributes["id"] != null) 
             {
                 levelIDRef_ = levelNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(levelNode);
                 IDManager.SetID(levelIDRef_, ob);
             }
             else if (levelNode.Attributes["href"] != null)
             {
                 levelIDRef_ = levelNode.Attributes["href"].Value;
             }
             else
             {
                 level_ = new XsdTypeDecimal(levelNode);
             }
         }
         else
         {
             level_ = new XsdTypeDecimal(levelNode);
         }
     }
     
 
     XmlNode levelPercentageNode = xmlNode.SelectSingleNode("levelPercentage");
     
     if (levelPercentageNode != null)
     {
         if (levelPercentageNode.Attributes["href"] != null || levelPercentageNode.Attributes["id"] != null) 
         {
             if (levelPercentageNode.Attributes["id"] != null) 
             {
                 levelPercentageIDRef_ = levelPercentageNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(levelPercentageNode);
                 IDManager.SetID(levelPercentageIDRef_, ob);
             }
             else if (levelPercentageNode.Attributes["href"] != null)
             {
                 levelPercentageIDRef_ = levelPercentageNode.Attributes["href"].Value;
             }
             else
             {
                 levelPercentage_ = new XsdTypeDecimal(levelPercentageNode);
             }
         }
         else
         {
             levelPercentage_ = new XsdTypeDecimal(levelPercentageNode);
         }
     }
     
 
     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 creditEventsReferenceNode = xmlNode.SelectSingleNode("creditEventsReference");
     
     if (creditEventsReferenceNode != null)
     {
         if (creditEventsReferenceNode.Attributes["href"] != null || creditEventsReferenceNode.Attributes["id"] != null) 
         {
             if (creditEventsReferenceNode.Attributes["id"] != null) 
             {
                 creditEventsReferenceIDRef_ = creditEventsReferenceNode.Attributes["id"].Value;
                 CreditEventsReference ob = new CreditEventsReference(creditEventsReferenceNode);
                 IDManager.SetID(creditEventsReferenceIDRef_, ob);
             }
             else if (creditEventsReferenceNode.Attributes["href"] != null)
             {
                 creditEventsReferenceIDRef_ = creditEventsReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 creditEventsReference_ = new CreditEventsReference(creditEventsReferenceNode);
             }
         }
         else
         {
             creditEventsReference_ = new CreditEventsReference(creditEventsReferenceNode);
         }
     }
     
 
     XmlNode triggerTypeNode = xmlNode.SelectSingleNode("triggerType");
     
     if (triggerTypeNode != null)
     {
         if (triggerTypeNode.Attributes["href"] != null || triggerTypeNode.Attributes["id"] != null) 
         {
             if (triggerTypeNode.Attributes["id"] != null) 
             {
                 triggerTypeIDRef_ = triggerTypeNode.Attributes["id"].Value;
                 TriggerTypeEnum ob = new TriggerTypeEnum(triggerTypeNode);
                 IDManager.SetID(triggerTypeIDRef_, ob);
             }
             else if (triggerTypeNode.Attributes["href"] != null)
             {
                 triggerTypeIDRef_ = triggerTypeNode.Attributes["href"].Value;
             }
             else
             {
                 triggerType_ = new TriggerTypeEnum(triggerTypeNode);
             }
         }
         else
         {
             triggerType_ = new TriggerTypeEnum(triggerTypeNode);
         }
     }
     
 
     XmlNode triggerTimeTypeNode = xmlNode.SelectSingleNode("triggerTimeType");
     
     if (triggerTimeTypeNode != null)
     {
         if (triggerTimeTypeNode.Attributes["href"] != null || triggerTimeTypeNode.Attributes["id"] != null) 
         {
             if (triggerTimeTypeNode.Attributes["id"] != null) 
             {
                 triggerTimeTypeIDRef_ = triggerTimeTypeNode.Attributes["id"].Value;
                 TriggerTimeTypeEnum ob = new TriggerTimeTypeEnum(triggerTimeTypeNode);
                 IDManager.SetID(triggerTimeTypeIDRef_, ob);
             }
             else if (triggerTimeTypeNode.Attributes["href"] != null)
             {
                 triggerTimeTypeIDRef_ = triggerTimeTypeNode.Attributes["href"].Value;
             }
             else
             {
                 triggerTimeType_ = new TriggerTimeTypeEnum(triggerTimeTypeNode);
             }
         }
         else
         {
             triggerTimeType_ = new TriggerTimeTypeEnum(triggerTimeTypeNode);
         }
     }
     
 
 }
Beispiel #10
0
        public Trigger(XmlNode xmlNode)
        {
            XmlNode levelNode = xmlNode.SelectSingleNode("level");

            if (levelNode != null)
            {
                if (levelNode.Attributes["href"] != null || levelNode.Attributes["id"] != null)
                {
                    if (levelNode.Attributes["id"] != null)
                    {
                        levelIDRef_ = levelNode.Attributes["id"].Value;
                        XsdTypeDecimal ob = new XsdTypeDecimal(levelNode);
                        IDManager.SetID(levelIDRef_, ob);
                    }
                    else if (levelNode.Attributes["href"] != null)
                    {
                        levelIDRef_ = levelNode.Attributes["href"].Value;
                    }
                    else
                    {
                        level_ = new XsdTypeDecimal(levelNode);
                    }
                }
                else
                {
                    level_ = new XsdTypeDecimal(levelNode);
                }
            }


            XmlNode levelPercentageNode = xmlNode.SelectSingleNode("levelPercentage");

            if (levelPercentageNode != null)
            {
                if (levelPercentageNode.Attributes["href"] != null || levelPercentageNode.Attributes["id"] != null)
                {
                    if (levelPercentageNode.Attributes["id"] != null)
                    {
                        levelPercentageIDRef_ = levelPercentageNode.Attributes["id"].Value;
                        XsdTypeDecimal ob = new XsdTypeDecimal(levelPercentageNode);
                        IDManager.SetID(levelPercentageIDRef_, ob);
                    }
                    else if (levelPercentageNode.Attributes["href"] != null)
                    {
                        levelPercentageIDRef_ = levelPercentageNode.Attributes["href"].Value;
                    }
                    else
                    {
                        levelPercentage_ = new XsdTypeDecimal(levelPercentageNode);
                    }
                }
                else
                {
                    levelPercentage_ = new XsdTypeDecimal(levelPercentageNode);
                }
            }


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

            if (creditEventsReferenceNode != null)
            {
                if (creditEventsReferenceNode.Attributes["href"] != null || creditEventsReferenceNode.Attributes["id"] != null)
                {
                    if (creditEventsReferenceNode.Attributes["id"] != null)
                    {
                        creditEventsReferenceIDRef_ = creditEventsReferenceNode.Attributes["id"].Value;
                        CreditEventsReference ob = new CreditEventsReference(creditEventsReferenceNode);
                        IDManager.SetID(creditEventsReferenceIDRef_, ob);
                    }
                    else if (creditEventsReferenceNode.Attributes["href"] != null)
                    {
                        creditEventsReferenceIDRef_ = creditEventsReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        creditEventsReference_ = new CreditEventsReference(creditEventsReferenceNode);
                    }
                }
                else
                {
                    creditEventsReference_ = new CreditEventsReference(creditEventsReferenceNode);
                }
            }


            XmlNode triggerTypeNode = xmlNode.SelectSingleNode("triggerType");

            if (triggerTypeNode != null)
            {
                if (triggerTypeNode.Attributes["href"] != null || triggerTypeNode.Attributes["id"] != null)
                {
                    if (triggerTypeNode.Attributes["id"] != null)
                    {
                        triggerTypeIDRef_ = triggerTypeNode.Attributes["id"].Value;
                        TriggerTypeEnum ob = new TriggerTypeEnum(triggerTypeNode);
                        IDManager.SetID(triggerTypeIDRef_, ob);
                    }
                    else if (triggerTypeNode.Attributes["href"] != null)
                    {
                        triggerTypeIDRef_ = triggerTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        triggerType_ = new TriggerTypeEnum(triggerTypeNode);
                    }
                }
                else
                {
                    triggerType_ = new TriggerTypeEnum(triggerTypeNode);
                }
            }


            XmlNode triggerTimeTypeNode = xmlNode.SelectSingleNode("triggerTimeType");

            if (triggerTimeTypeNode != null)
            {
                if (triggerTimeTypeNode.Attributes["href"] != null || triggerTimeTypeNode.Attributes["id"] != null)
                {
                    if (triggerTimeTypeNode.Attributes["id"] != null)
                    {
                        triggerTimeTypeIDRef_ = triggerTimeTypeNode.Attributes["id"].Value;
                        TriggerTimeTypeEnum ob = new TriggerTimeTypeEnum(triggerTimeTypeNode);
                        IDManager.SetID(triggerTimeTypeIDRef_, ob);
                    }
                    else if (triggerTimeTypeNode.Attributes["href"] != null)
                    {
                        triggerTimeTypeIDRef_ = triggerTimeTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        triggerTimeType_ = new TriggerTimeTypeEnum(triggerTimeTypeNode);
                    }
                }
                else
                {
                    triggerTimeType_ = new TriggerTimeTypeEnum(triggerTimeTypeNode);
                }
            }
        }
 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);
                    }
                }
            }
        }