public SimpleCreditDefaultSwap(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 termNode = xmlNode.SelectSingleNode("term");
     
     if (termNode != null)
     {
         if (termNode.Attributes["href"] != null || termNode.Attributes["id"] != null) 
         {
             if (termNode.Attributes["id"] != null) 
             {
                 termIDRef_ = termNode.Attributes["id"].Value;
                 Period ob = new Period(termNode);
                 IDManager.SetID(termIDRef_, ob);
             }
             else if (termNode.Attributes["href"] != null)
             {
                 termIDRef_ = termNode.Attributes["href"].Value;
             }
             else
             {
                 term_ = new Period(termNode);
             }
         }
         else
         {
             term_ = new Period(termNode);
         }
     }
     
 
     XmlNode paymentFrequencyNode = xmlNode.SelectSingleNode("paymentFrequency");
     
     if (paymentFrequencyNode != null)
     {
         if (paymentFrequencyNode.Attributes["href"] != null || paymentFrequencyNode.Attributes["id"] != null) 
         {
             if (paymentFrequencyNode.Attributes["id"] != null) 
             {
                 paymentFrequencyIDRef_ = paymentFrequencyNode.Attributes["id"].Value;
                 Period ob = new Period(paymentFrequencyNode);
                 IDManager.SetID(paymentFrequencyIDRef_, ob);
             }
             else if (paymentFrequencyNode.Attributes["href"] != null)
             {
                 paymentFrequencyIDRef_ = paymentFrequencyNode.Attributes["href"].Value;
             }
             else
             {
                 paymentFrequency_ = new Period(paymentFrequencyNode);
             }
         }
         else
         {
             paymentFrequency_ = new Period(paymentFrequencyNode);
         }
     }
     
 
 }
예제 #2
0
        public Loan(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode borrowerNode = xmlNode.SelectSingleNode("borrower");

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


            XmlNode borrowerReferenceNode = xmlNode.SelectSingleNode("borrowerReference");

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


            XmlNode lienNode = xmlNode.SelectSingleNode("lien");

            if (lienNode != null)
            {
                if (lienNode.Attributes["href"] != null || lienNode.Attributes["id"] != null)
                {
                    if (lienNode.Attributes["id"] != null)
                    {
                        lienIDRef_ = lienNode.Attributes["id"].Value;
                        Lien ob = new Lien(lienNode);
                        IDManager.SetID(lienIDRef_, ob);
                    }
                    else if (lienNode.Attributes["href"] != null)
                    {
                        lienIDRef_ = lienNode.Attributes["href"].Value;
                    }
                    else
                    {
                        lien_ = new Lien(lienNode);
                    }
                }
                else
                {
                    lien_ = new Lien(lienNode);
                }
            }


            XmlNode facilityTypeNode = xmlNode.SelectSingleNode("facilityType");

            if (facilityTypeNode != null)
            {
                if (facilityTypeNode.Attributes["href"] != null || facilityTypeNode.Attributes["id"] != null)
                {
                    if (facilityTypeNode.Attributes["id"] != null)
                    {
                        facilityTypeIDRef_ = facilityTypeNode.Attributes["id"].Value;
                        FacilityType ob = new FacilityType(facilityTypeNode);
                        IDManager.SetID(facilityTypeIDRef_, ob);
                    }
                    else if (facilityTypeNode.Attributes["href"] != null)
                    {
                        facilityTypeIDRef_ = facilityTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        facilityType_ = new FacilityType(facilityTypeNode);
                    }
                }
                else
                {
                    facilityType_ = new FacilityType(facilityTypeNode);
                }
            }


            XmlNode maturityNode = xmlNode.SelectSingleNode("maturity");

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


            XmlNode creditAgreementDateNode = xmlNode.SelectSingleNode("creditAgreementDate");

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


            XmlNode trancheNode = xmlNode.SelectSingleNode("tranche");

            if (trancheNode != null)
            {
                if (trancheNode.Attributes["href"] != null || trancheNode.Attributes["id"] != null)
                {
                    if (trancheNode.Attributes["id"] != null)
                    {
                        trancheIDRef_ = trancheNode.Attributes["id"].Value;
                        UnderlyingAssetTranche ob = new UnderlyingAssetTranche(trancheNode);
                        IDManager.SetID(trancheIDRef_, ob);
                    }
                    else if (trancheNode.Attributes["href"] != null)
                    {
                        trancheIDRef_ = trancheNode.Attributes["href"].Value;
                    }
                    else
                    {
                        tranche_ = new UnderlyingAssetTranche(trancheNode);
                    }
                }
                else
                {
                    tranche_ = new UnderlyingAssetTranche(trancheNode);
                }
            }
        }
예제 #3
0
        public ReferenceObligation(XmlNode xmlNode)
        {
            XmlNodeList bondNodeList = xmlNode.SelectNodes("bond");

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

            foreach (XmlNode item in bondNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        bondIDRef = item.Attributes["id"].Name;
                        Bond ob = Bond();
                        IDManager.SetID(bondIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        bondIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        bond = new Bond(item);
                    }
                }
            }


            XmlNodeList convertibleBondNodeList = xmlNode.SelectNodes("convertibleBond");

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

            foreach (XmlNode item in convertibleBondNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        convertibleBondIDRef = item.Attributes["id"].Name;
                        ConvertibleBond ob = ConvertibleBond();
                        IDManager.SetID(convertibleBondIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        convertibleBondIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        convertibleBond = new ConvertibleBond(item);
                    }
                }
            }


            XmlNodeList mortgageNodeList = xmlNode.SelectNodes("mortgage");

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

            foreach (XmlNode item in mortgageNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        mortgageIDRef = item.Attributes["id"].Name;
                        Mortgage ob = Mortgage();
                        IDManager.SetID(mortgageIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        mortgageIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        mortgage = new Mortgage(item);
                    }
                }
            }


            XmlNodeList loanNodeList = xmlNode.SelectNodes("loan");

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

            foreach (XmlNode item in loanNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        loanIDRef = item.Attributes["id"].Name;
                        Loan ob = Loan();
                        IDManager.SetID(loanIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        loanIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        loan = new Loan(item);
                    }
                }
            }


            XmlNodeList primaryObligorNodeList = xmlNode.SelectNodes("primaryObligor");

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

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


            XmlNodeList primaryObligorReferenceNodeList = xmlNode.SelectNodes("primaryObligorReference");

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

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


            XmlNodeList guarantorNodeList = xmlNode.SelectNodes("guarantor");

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

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


            XmlNodeList guarantorReferenceNodeList = xmlNode.SelectNodes("guarantorReference");

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

            foreach (XmlNode item in guarantorReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        guarantorReferenceIDRef = item.Attributes["id"].Name;
                        LegalEntityReference ob = LegalEntityReference();
                        IDManager.SetID(guarantorReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        guarantorReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        guarantorReference = new LegalEntityReference(item);
                    }
                }
            }
        }
 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 ReferenceObligation(XmlNode xmlNode)
 {
     XmlNode bondNode = xmlNode.SelectSingleNode("bond");
     
     if (bondNode != null)
     {
         if (bondNode.Attributes["href"] != null || bondNode.Attributes["id"] != null) 
         {
             if (bondNode.Attributes["id"] != null) 
             {
                 bondIDRef_ = bondNode.Attributes["id"].Value;
                 Bond ob = new Bond(bondNode);
                 IDManager.SetID(bondIDRef_, ob);
             }
             else if (bondNode.Attributes["href"] != null)
             {
                 bondIDRef_ = bondNode.Attributes["href"].Value;
             }
             else
             {
                 bond_ = new Bond(bondNode);
             }
         }
         else
         {
             bond_ = new Bond(bondNode);
         }
     }
     
 
     XmlNode convertibleBondNode = xmlNode.SelectSingleNode("convertibleBond");
     
     if (convertibleBondNode != null)
     {
         if (convertibleBondNode.Attributes["href"] != null || convertibleBondNode.Attributes["id"] != null) 
         {
             if (convertibleBondNode.Attributes["id"] != null) 
             {
                 convertibleBondIDRef_ = convertibleBondNode.Attributes["id"].Value;
                 ConvertibleBond ob = new ConvertibleBond(convertibleBondNode);
                 IDManager.SetID(convertibleBondIDRef_, ob);
             }
             else if (convertibleBondNode.Attributes["href"] != null)
             {
                 convertibleBondIDRef_ = convertibleBondNode.Attributes["href"].Value;
             }
             else
             {
                 convertibleBond_ = new ConvertibleBond(convertibleBondNode);
             }
         }
         else
         {
             convertibleBond_ = new ConvertibleBond(convertibleBondNode);
         }
     }
     
 
     XmlNode mortgageNode = xmlNode.SelectSingleNode("mortgage");
     
     if (mortgageNode != null)
     {
         if (mortgageNode.Attributes["href"] != null || mortgageNode.Attributes["id"] != null) 
         {
             if (mortgageNode.Attributes["id"] != null) 
             {
                 mortgageIDRef_ = mortgageNode.Attributes["id"].Value;
                 Mortgage ob = new Mortgage(mortgageNode);
                 IDManager.SetID(mortgageIDRef_, ob);
             }
             else if (mortgageNode.Attributes["href"] != null)
             {
                 mortgageIDRef_ = mortgageNode.Attributes["href"].Value;
             }
             else
             {
                 mortgage_ = new Mortgage(mortgageNode);
             }
         }
         else
         {
             mortgage_ = new Mortgage(mortgageNode);
         }
     }
     
 
     XmlNode loanNode = xmlNode.SelectSingleNode("loan");
     
     if (loanNode != null)
     {
         if (loanNode.Attributes["href"] != null || loanNode.Attributes["id"] != null) 
         {
             if (loanNode.Attributes["id"] != null) 
             {
                 loanIDRef_ = loanNode.Attributes["id"].Value;
                 Loan ob = new Loan(loanNode);
                 IDManager.SetID(loanIDRef_, ob);
             }
             else if (loanNode.Attributes["href"] != null)
             {
                 loanIDRef_ = loanNode.Attributes["href"].Value;
             }
             else
             {
                 loan_ = new Loan(loanNode);
             }
         }
         else
         {
             loan_ = new Loan(loanNode);
         }
     }
     
 
     XmlNode primaryObligorNode = xmlNode.SelectSingleNode("primaryObligor");
     
     if (primaryObligorNode != null)
     {
         if (primaryObligorNode.Attributes["href"] != null || primaryObligorNode.Attributes["id"] != null) 
         {
             if (primaryObligorNode.Attributes["id"] != null) 
             {
                 primaryObligorIDRef_ = primaryObligorNode.Attributes["id"].Value;
                 LegalEntity ob = new LegalEntity(primaryObligorNode);
                 IDManager.SetID(primaryObligorIDRef_, ob);
             }
             else if (primaryObligorNode.Attributes["href"] != null)
             {
                 primaryObligorIDRef_ = primaryObligorNode.Attributes["href"].Value;
             }
             else
             {
                 primaryObligor_ = new LegalEntity(primaryObligorNode);
             }
         }
         else
         {
             primaryObligor_ = new LegalEntity(primaryObligorNode);
         }
     }
     
 
     XmlNode primaryObligorReferenceNode = xmlNode.SelectSingleNode("primaryObligorReference");
     
     if (primaryObligorReferenceNode != null)
     {
         if (primaryObligorReferenceNode.Attributes["href"] != null || primaryObligorReferenceNode.Attributes["id"] != null) 
         {
             if (primaryObligorReferenceNode.Attributes["id"] != null) 
             {
                 primaryObligorReferenceIDRef_ = primaryObligorReferenceNode.Attributes["id"].Value;
                 LegalEntityReference ob = new LegalEntityReference(primaryObligorReferenceNode);
                 IDManager.SetID(primaryObligorReferenceIDRef_, ob);
             }
             else if (primaryObligorReferenceNode.Attributes["href"] != null)
             {
                 primaryObligorReferenceIDRef_ = primaryObligorReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 primaryObligorReference_ = new LegalEntityReference(primaryObligorReferenceNode);
             }
         }
         else
         {
             primaryObligorReference_ = new LegalEntityReference(primaryObligorReferenceNode);
         }
     }
     
 
     XmlNode guarantorNode = xmlNode.SelectSingleNode("guarantor");
     
     if (guarantorNode != null)
     {
         if (guarantorNode.Attributes["href"] != null || guarantorNode.Attributes["id"] != null) 
         {
             if (guarantorNode.Attributes["id"] != null) 
             {
                 guarantorIDRef_ = guarantorNode.Attributes["id"].Value;
                 LegalEntity ob = new LegalEntity(guarantorNode);
                 IDManager.SetID(guarantorIDRef_, ob);
             }
             else if (guarantorNode.Attributes["href"] != null)
             {
                 guarantorIDRef_ = guarantorNode.Attributes["href"].Value;
             }
             else
             {
                 guarantor_ = new LegalEntity(guarantorNode);
             }
         }
         else
         {
             guarantor_ = new LegalEntity(guarantorNode);
         }
     }
     
 
     XmlNode guarantorReferenceNode = xmlNode.SelectSingleNode("guarantorReference");
     
     if (guarantorReferenceNode != null)
     {
         if (guarantorReferenceNode.Attributes["href"] != null || guarantorReferenceNode.Attributes["id"] != null) 
         {
             if (guarantorReferenceNode.Attributes["id"] != null) 
             {
                 guarantorReferenceIDRef_ = guarantorReferenceNode.Attributes["id"].Value;
                 LegalEntityReference ob = new LegalEntityReference(guarantorReferenceNode);
                 IDManager.SetID(guarantorReferenceIDRef_, ob);
             }
             else if (guarantorReferenceNode.Attributes["href"] != null)
             {
                 guarantorReferenceIDRef_ = guarantorReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 guarantorReference_ = new LegalEntityReference(guarantorReferenceNode);
             }
         }
         else
         {
             guarantorReference_ = new LegalEntityReference(guarantorReferenceNode);
         }
     }
     
 
 }
예제 #6
0
        public Mortgage(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList insurerNodeList = xmlNode.SelectNodes("insurer");

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

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


            XmlNodeList insurerReferenceNodeList = xmlNode.SelectNodes("insurerReference");

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

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


            XmlNodeList issuerNameNodeList = xmlNode.SelectNodes("issuerName");

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

            foreach (XmlNode item in issuerNameNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        issuerNameIDRef = item.Attributes["id"].Name;
                        XsdTypeString ob = XsdTypeString();
                        IDManager.SetID(issuerNameIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        issuerNameIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        issuerName = new XsdTypeString(item);
                    }
                }
            }


            XmlNodeList issuerPartyReferenceNodeList = xmlNode.SelectNodes("issuerPartyReference");

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

            foreach (XmlNode item in issuerPartyReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        issuerPartyReferenceIDRef = item.Attributes["id"].Name;
                        PartyReference ob = PartyReference();
                        IDManager.SetID(issuerPartyReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        issuerPartyReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        issuerPartyReference = new PartyReference(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 couponTypeNodeList = xmlNode.SelectNodes("couponType");

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

            foreach (XmlNode item in couponTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        couponTypeIDRef = item.Attributes["id"].Name;
                        CouponType ob = CouponType();
                        IDManager.SetID(couponTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        couponTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        couponType = new CouponType(item);
                    }
                }
            }


            XmlNodeList couponRateNodeList = xmlNode.SelectNodes("couponRate");

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

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


            XmlNodeList maturityNodeList = xmlNode.SelectNodes("maturity");

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

            foreach (XmlNode item in maturityNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        maturityIDRef = item.Attributes["id"].Name;
                        XsdTypeDate ob = XsdTypeDate();
                        IDManager.SetID(maturityIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        maturityIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        maturity = new XsdTypeDate(item);
                    }
                }
            }


            XmlNodeList paymentFrequencyNodeList = xmlNode.SelectNodes("paymentFrequency");

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

            foreach (XmlNode item in paymentFrequencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        paymentFrequencyIDRef = item.Attributes["id"].Name;
                        Period ob = Period();
                        IDManager.SetID(paymentFrequencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        paymentFrequencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        paymentFrequency = new Period(item);
                    }
                }
            }


            XmlNodeList dayCountFractionNodeList = xmlNode.SelectNodes("dayCountFraction");

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

            foreach (XmlNode item in dayCountFractionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dayCountFractionIDRef = item.Attributes["id"].Name;
                        DayCountFraction ob = DayCountFraction();
                        IDManager.SetID(dayCountFractionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dayCountFractionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dayCountFraction = new DayCountFraction(item);
                    }
                }
            }


            XmlNodeList originalPrincipalAmountNodeList = xmlNode.SelectNodes("originalPrincipalAmount");

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

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


            XmlNodeList poolNodeList = xmlNode.SelectNodes("pool");

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

            foreach (XmlNode item in poolNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        poolIDRef = item.Attributes["id"].Name;
                        AssetPool ob = AssetPool();
                        IDManager.SetID(poolIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        poolIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        pool = new AssetPool(item);
                    }
                }
            }


            XmlNodeList sectorNodeList = xmlNode.SelectNodes("sector");

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

            foreach (XmlNode item in sectorNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        sectorIDRef = item.Attributes["id"].Name;
                        MortgageSector ob = MortgageSector();
                        IDManager.SetID(sectorIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        sectorIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        sector = new MortgageSector(item);
                    }
                }
            }


            XmlNodeList trancheNodeList = xmlNode.SelectNodes("tranche");

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

            foreach (XmlNode item in trancheNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        trancheIDRef = item.Attributes["id"].Name;
                        XsdTypeToken ob = XsdTypeToken();
                        IDManager.SetID(trancheIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        trancheIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        tranche = new XsdTypeToken(item);
                    }
                }
            }
        }
예제 #7
0
        public Mortgage(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode insurerNode = xmlNode.SelectSingleNode("insurer");

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


            XmlNode insurerReferenceNode = xmlNode.SelectSingleNode("insurerReference");

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


            XmlNode issuerNameNode = xmlNode.SelectSingleNode("issuerName");

            if (issuerNameNode != null)
            {
                if (issuerNameNode.Attributes["href"] != null || issuerNameNode.Attributes["id"] != null)
                {
                    if (issuerNameNode.Attributes["id"] != null)
                    {
                        issuerNameIDRef_ = issuerNameNode.Attributes["id"].Value;
                        XsdTypeString ob = new XsdTypeString(issuerNameNode);
                        IDManager.SetID(issuerNameIDRef_, ob);
                    }
                    else if (issuerNameNode.Attributes["href"] != null)
                    {
                        issuerNameIDRef_ = issuerNameNode.Attributes["href"].Value;
                    }
                    else
                    {
                        issuerName_ = new XsdTypeString(issuerNameNode);
                    }
                }
                else
                {
                    issuerName_ = new XsdTypeString(issuerNameNode);
                }
            }


            XmlNode issuerPartyReferenceNode = xmlNode.SelectSingleNode("issuerPartyReference");

            if (issuerPartyReferenceNode != null)
            {
                if (issuerPartyReferenceNode.Attributes["href"] != null || issuerPartyReferenceNode.Attributes["id"] != null)
                {
                    if (issuerPartyReferenceNode.Attributes["id"] != null)
                    {
                        issuerPartyReferenceIDRef_ = issuerPartyReferenceNode.Attributes["id"].Value;
                        PartyReference ob = new PartyReference(issuerPartyReferenceNode);
                        IDManager.SetID(issuerPartyReferenceIDRef_, ob);
                    }
                    else if (issuerPartyReferenceNode.Attributes["href"] != null)
                    {
                        issuerPartyReferenceIDRef_ = issuerPartyReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        issuerPartyReference_ = new PartyReference(issuerPartyReferenceNode);
                    }
                }
                else
                {
                    issuerPartyReference_ = new PartyReference(issuerPartyReferenceNode);
                }
            }


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

            if (couponTypeNode != null)
            {
                if (couponTypeNode.Attributes["href"] != null || couponTypeNode.Attributes["id"] != null)
                {
                    if (couponTypeNode.Attributes["id"] != null)
                    {
                        couponTypeIDRef_ = couponTypeNode.Attributes["id"].Value;
                        CouponType ob = new CouponType(couponTypeNode);
                        IDManager.SetID(couponTypeIDRef_, ob);
                    }
                    else if (couponTypeNode.Attributes["href"] != null)
                    {
                        couponTypeIDRef_ = couponTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        couponType_ = new CouponType(couponTypeNode);
                    }
                }
                else
                {
                    couponType_ = new CouponType(couponTypeNode);
                }
            }


            XmlNode couponRateNode = xmlNode.SelectSingleNode("couponRate");

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


            XmlNode maturityNode = xmlNode.SelectSingleNode("maturity");

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


            XmlNode paymentFrequencyNode = xmlNode.SelectSingleNode("paymentFrequency");

            if (paymentFrequencyNode != null)
            {
                if (paymentFrequencyNode.Attributes["href"] != null || paymentFrequencyNode.Attributes["id"] != null)
                {
                    if (paymentFrequencyNode.Attributes["id"] != null)
                    {
                        paymentFrequencyIDRef_ = paymentFrequencyNode.Attributes["id"].Value;
                        Period ob = new Period(paymentFrequencyNode);
                        IDManager.SetID(paymentFrequencyIDRef_, ob);
                    }
                    else if (paymentFrequencyNode.Attributes["href"] != null)
                    {
                        paymentFrequencyIDRef_ = paymentFrequencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        paymentFrequency_ = new Period(paymentFrequencyNode);
                    }
                }
                else
                {
                    paymentFrequency_ = new Period(paymentFrequencyNode);
                }
            }


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

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


            XmlNode originalPrincipalAmountNode = xmlNode.SelectSingleNode("originalPrincipalAmount");

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


            XmlNode poolNode = xmlNode.SelectSingleNode("pool");

            if (poolNode != null)
            {
                if (poolNode.Attributes["href"] != null || poolNode.Attributes["id"] != null)
                {
                    if (poolNode.Attributes["id"] != null)
                    {
                        poolIDRef_ = poolNode.Attributes["id"].Value;
                        AssetPool ob = new AssetPool(poolNode);
                        IDManager.SetID(poolIDRef_, ob);
                    }
                    else if (poolNode.Attributes["href"] != null)
                    {
                        poolIDRef_ = poolNode.Attributes["href"].Value;
                    }
                    else
                    {
                        pool_ = new AssetPool(poolNode);
                    }
                }
                else
                {
                    pool_ = new AssetPool(poolNode);
                }
            }


            XmlNode sectorNode = xmlNode.SelectSingleNode("sector");

            if (sectorNode != null)
            {
                if (sectorNode.Attributes["href"] != null || sectorNode.Attributes["id"] != null)
                {
                    if (sectorNode.Attributes["id"] != null)
                    {
                        sectorIDRef_ = sectorNode.Attributes["id"].Value;
                        MortgageSector ob = new MortgageSector(sectorNode);
                        IDManager.SetID(sectorIDRef_, ob);
                    }
                    else if (sectorNode.Attributes["href"] != null)
                    {
                        sectorIDRef_ = sectorNode.Attributes["href"].Value;
                    }
                    else
                    {
                        sector_ = new MortgageSector(sectorNode);
                    }
                }
                else
                {
                    sector_ = new MortgageSector(sectorNode);
                }
            }


            XmlNode trancheNode = xmlNode.SelectSingleNode("tranche");

            if (trancheNode != null)
            {
                if (trancheNode.Attributes["href"] != null || trancheNode.Attributes["id"] != null)
                {
                    if (trancheNode.Attributes["id"] != null)
                    {
                        trancheIDRef_ = trancheNode.Attributes["id"].Value;
                        XsdTypeToken ob = new XsdTypeToken(trancheNode);
                        IDManager.SetID(trancheIDRef_, ob);
                    }
                    else if (trancheNode.Attributes["href"] != null)
                    {
                        trancheIDRef_ = trancheNode.Attributes["href"].Value;
                    }
                    else
                    {
                        tranche_ = new XsdTypeToken(trancheNode);
                    }
                }
                else
                {
                    tranche_ = new XsdTypeToken(trancheNode);
                }
            }
        }
 public ReferenceObligation(XmlNode xmlNode)
 {
     XmlNodeList bondNodeList = xmlNode.SelectNodes("bond");
     if (bondNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in bondNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 bondIDRef = item.Attributes["id"].Name;
                 Bond ob = Bond();
                 IDManager.SetID(bondIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 bondIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 bond = new Bond(item);
             }
         }
     }
     
 
     XmlNodeList convertibleBondNodeList = xmlNode.SelectNodes("convertibleBond");
     if (convertibleBondNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in convertibleBondNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 convertibleBondIDRef = item.Attributes["id"].Name;
                 ConvertibleBond ob = ConvertibleBond();
                 IDManager.SetID(convertibleBondIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 convertibleBondIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 convertibleBond = new ConvertibleBond(item);
             }
         }
     }
     
 
     XmlNodeList mortgageNodeList = xmlNode.SelectNodes("mortgage");
     if (mortgageNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in mortgageNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 mortgageIDRef = item.Attributes["id"].Name;
                 Mortgage ob = Mortgage();
                 IDManager.SetID(mortgageIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 mortgageIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 mortgage = new Mortgage(item);
             }
         }
     }
     
 
     XmlNodeList loanNodeList = xmlNode.SelectNodes("loan");
     if (loanNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in loanNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 loanIDRef = item.Attributes["id"].Name;
                 Loan ob = Loan();
                 IDManager.SetID(loanIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 loanIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 loan = new Loan(item);
             }
         }
     }
     
 
     XmlNodeList primaryObligorNodeList = xmlNode.SelectNodes("primaryObligor");
     if (primaryObligorNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in primaryObligorNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 primaryObligorIDRef = item.Attributes["id"].Name;
                 LegalEntity ob = LegalEntity();
                 IDManager.SetID(primaryObligorIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 primaryObligorIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 primaryObligor = new LegalEntity(item);
             }
         }
     }
     
 
     XmlNodeList primaryObligorReferenceNodeList = xmlNode.SelectNodes("primaryObligorReference");
     if (primaryObligorReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in primaryObligorReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 primaryObligorReferenceIDRef = item.Attributes["id"].Name;
                 LegalEntityReference ob = LegalEntityReference();
                 IDManager.SetID(primaryObligorReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 primaryObligorReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 primaryObligorReference = new LegalEntityReference(item);
             }
         }
     }
     
 
     XmlNodeList guarantorNodeList = xmlNode.SelectNodes("guarantor");
     if (guarantorNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in guarantorNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 guarantorIDRef = item.Attributes["id"].Name;
                 LegalEntity ob = LegalEntity();
                 IDManager.SetID(guarantorIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 guarantorIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 guarantor = new LegalEntity(item);
             }
         }
     }
     
 
     XmlNodeList guarantorReferenceNodeList = xmlNode.SelectNodes("guarantorReference");
     if (guarantorReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in guarantorReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 guarantorReferenceIDRef = item.Attributes["id"].Name;
                 LegalEntityReference ob = LegalEntityReference();
                 IDManager.SetID(guarantorReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 guarantorReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 guarantorReference = new LegalEntityReference(item);
             }
         }
     }
     
 
 }
 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);
         }
     }
     
 
 }
예제 #10
0
 public Loan(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList borrowerNodeList = xmlNode.SelectNodes("borrower");
     if (borrowerNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in borrowerNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 borrowerIDRef = item.Attributes["id"].Name;
                 LegalEntity ob = LegalEntity();
                 IDManager.SetID(borrowerIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 borrowerIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 borrower = new LegalEntity(item);
             }
         }
     }
     
 
     XmlNodeList borrowerReferenceNodeList = xmlNode.SelectNodes("borrowerReference");
     if (borrowerReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in borrowerReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 borrowerReferenceIDRef = item.Attributes["id"].Name;
                 LegalEntityReference ob = LegalEntityReference();
                 IDManager.SetID(borrowerReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 borrowerReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 borrowerReference = new LegalEntityReference(item);
             }
         }
     }
     
 
     XmlNodeList lienNodeList = xmlNode.SelectNodes("lien");
     if (lienNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in lienNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 lienIDRef = item.Attributes["id"].Name;
                 Lien ob = Lien();
                 IDManager.SetID(lienIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 lienIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 lien = new Lien(item);
             }
         }
     }
     
 
     XmlNodeList facilityTypeNodeList = xmlNode.SelectNodes("facilityType");
     if (facilityTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in facilityTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 facilityTypeIDRef = item.Attributes["id"].Name;
                 FacilityType ob = FacilityType();
                 IDManager.SetID(facilityTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 facilityTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 facilityType = new FacilityType(item);
             }
         }
     }
     
 
     XmlNodeList maturityNodeList = xmlNode.SelectNodes("maturity");
     if (maturityNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in maturityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 maturityIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(maturityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 maturityIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 maturity = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList creditAgreementDateNodeList = xmlNode.SelectNodes("creditAgreementDate");
     if (creditAgreementDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in creditAgreementDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 creditAgreementDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(creditAgreementDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 creditAgreementDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 creditAgreementDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList trancheNodeList = xmlNode.SelectNodes("tranche");
     if (trancheNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in trancheNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 trancheIDRef = item.Attributes["id"].Name;
                 UnderlyingAssetTranche ob = UnderlyingAssetTranche();
                 IDManager.SetID(trancheIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 trancheIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 tranche = new UnderlyingAssetTranche(item);
             }
         }
     }
     
 
 }
예제 #11
0
        public ReferenceObligation(XmlNode xmlNode)
        {
            XmlNode bondNode = xmlNode.SelectSingleNode("bond");

            if (bondNode != null)
            {
                if (bondNode.Attributes["href"] != null || bondNode.Attributes["id"] != null)
                {
                    if (bondNode.Attributes["id"] != null)
                    {
                        bondIDRef_ = bondNode.Attributes["id"].Value;
                        Bond ob = new Bond(bondNode);
                        IDManager.SetID(bondIDRef_, ob);
                    }
                    else if (bondNode.Attributes["href"] != null)
                    {
                        bondIDRef_ = bondNode.Attributes["href"].Value;
                    }
                    else
                    {
                        bond_ = new Bond(bondNode);
                    }
                }
                else
                {
                    bond_ = new Bond(bondNode);
                }
            }


            XmlNode convertibleBondNode = xmlNode.SelectSingleNode("convertibleBond");

            if (convertibleBondNode != null)
            {
                if (convertibleBondNode.Attributes["href"] != null || convertibleBondNode.Attributes["id"] != null)
                {
                    if (convertibleBondNode.Attributes["id"] != null)
                    {
                        convertibleBondIDRef_ = convertibleBondNode.Attributes["id"].Value;
                        ConvertibleBond ob = new ConvertibleBond(convertibleBondNode);
                        IDManager.SetID(convertibleBondIDRef_, ob);
                    }
                    else if (convertibleBondNode.Attributes["href"] != null)
                    {
                        convertibleBondIDRef_ = convertibleBondNode.Attributes["href"].Value;
                    }
                    else
                    {
                        convertibleBond_ = new ConvertibleBond(convertibleBondNode);
                    }
                }
                else
                {
                    convertibleBond_ = new ConvertibleBond(convertibleBondNode);
                }
            }


            XmlNode mortgageNode = xmlNode.SelectSingleNode("mortgage");

            if (mortgageNode != null)
            {
                if (mortgageNode.Attributes["href"] != null || mortgageNode.Attributes["id"] != null)
                {
                    if (mortgageNode.Attributes["id"] != null)
                    {
                        mortgageIDRef_ = mortgageNode.Attributes["id"].Value;
                        Mortgage ob = new Mortgage(mortgageNode);
                        IDManager.SetID(mortgageIDRef_, ob);
                    }
                    else if (mortgageNode.Attributes["href"] != null)
                    {
                        mortgageIDRef_ = mortgageNode.Attributes["href"].Value;
                    }
                    else
                    {
                        mortgage_ = new Mortgage(mortgageNode);
                    }
                }
                else
                {
                    mortgage_ = new Mortgage(mortgageNode);
                }
            }


            XmlNode loanNode = xmlNode.SelectSingleNode("loan");

            if (loanNode != null)
            {
                if (loanNode.Attributes["href"] != null || loanNode.Attributes["id"] != null)
                {
                    if (loanNode.Attributes["id"] != null)
                    {
                        loanIDRef_ = loanNode.Attributes["id"].Value;
                        Loan ob = new Loan(loanNode);
                        IDManager.SetID(loanIDRef_, ob);
                    }
                    else if (loanNode.Attributes["href"] != null)
                    {
                        loanIDRef_ = loanNode.Attributes["href"].Value;
                    }
                    else
                    {
                        loan_ = new Loan(loanNode);
                    }
                }
                else
                {
                    loan_ = new Loan(loanNode);
                }
            }


            XmlNode primaryObligorNode = xmlNode.SelectSingleNode("primaryObligor");

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


            XmlNode primaryObligorReferenceNode = xmlNode.SelectSingleNode("primaryObligorReference");

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


            XmlNode guarantorNode = xmlNode.SelectSingleNode("guarantor");

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


            XmlNode guarantorReferenceNode = xmlNode.SelectSingleNode("guarantorReference");

            if (guarantorReferenceNode != null)
            {
                if (guarantorReferenceNode.Attributes["href"] != null || guarantorReferenceNode.Attributes["id"] != null)
                {
                    if (guarantorReferenceNode.Attributes["id"] != null)
                    {
                        guarantorReferenceIDRef_ = guarantorReferenceNode.Attributes["id"].Value;
                        LegalEntityReference ob = new LegalEntityReference(guarantorReferenceNode);
                        IDManager.SetID(guarantorReferenceIDRef_, ob);
                    }
                    else if (guarantorReferenceNode.Attributes["href"] != null)
                    {
                        guarantorReferenceIDRef_ = guarantorReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        guarantorReference_ = new LegalEntityReference(guarantorReferenceNode);
                    }
                }
                else
                {
                    guarantorReference_ = new LegalEntityReference(guarantorReferenceNode);
                }
            }
        }
예제 #12
0
        public SimpleCreditDefaultSwap(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 termNode = xmlNode.SelectSingleNode("term");

            if (termNode != null)
            {
                if (termNode.Attributes["href"] != null || termNode.Attributes["id"] != null)
                {
                    if (termNode.Attributes["id"] != null)
                    {
                        termIDRef_ = termNode.Attributes["id"].Value;
                        Period ob = new Period(termNode);
                        IDManager.SetID(termIDRef_, ob);
                    }
                    else if (termNode.Attributes["href"] != null)
                    {
                        termIDRef_ = termNode.Attributes["href"].Value;
                    }
                    else
                    {
                        term_ = new Period(termNode);
                    }
                }
                else
                {
                    term_ = new Period(termNode);
                }
            }


            XmlNode paymentFrequencyNode = xmlNode.SelectSingleNode("paymentFrequency");

            if (paymentFrequencyNode != null)
            {
                if (paymentFrequencyNode.Attributes["href"] != null || paymentFrequencyNode.Attributes["id"] != null)
                {
                    if (paymentFrequencyNode.Attributes["id"] != null)
                    {
                        paymentFrequencyIDRef_ = paymentFrequencyNode.Attributes["id"].Value;
                        Period ob = new Period(paymentFrequencyNode);
                        IDManager.SetID(paymentFrequencyIDRef_, ob);
                    }
                    else if (paymentFrequencyNode.Attributes["href"] != null)
                    {
                        paymentFrequencyIDRef_ = paymentFrequencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        paymentFrequency_ = new Period(paymentFrequencyNode);
                    }
                }
                else
                {
                    paymentFrequency_ = new Period(paymentFrequencyNode);
                }
            }
        }
        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);
                }
            }
        }
예제 #14
0
        public Loan(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList borrowerNodeList = xmlNode.SelectNodes("borrower");

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

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


            XmlNodeList borrowerReferenceNodeList = xmlNode.SelectNodes("borrowerReference");

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

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


            XmlNodeList lienNodeList = xmlNode.SelectNodes("lien");

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

            foreach (XmlNode item in lienNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        lienIDRef = item.Attributes["id"].Name;
                        Lien ob = Lien();
                        IDManager.SetID(lienIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        lienIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        lien = new Lien(item);
                    }
                }
            }


            XmlNodeList facilityTypeNodeList = xmlNode.SelectNodes("facilityType");

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

            foreach (XmlNode item in facilityTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        facilityTypeIDRef = item.Attributes["id"].Name;
                        FacilityType ob = FacilityType();
                        IDManager.SetID(facilityTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        facilityTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        facilityType = new FacilityType(item);
                    }
                }
            }


            XmlNodeList maturityNodeList = xmlNode.SelectNodes("maturity");

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

            foreach (XmlNode item in maturityNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        maturityIDRef = item.Attributes["id"].Name;
                        XsdTypeDate ob = XsdTypeDate();
                        IDManager.SetID(maturityIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        maturityIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        maturity = new XsdTypeDate(item);
                    }
                }
            }


            XmlNodeList creditAgreementDateNodeList = xmlNode.SelectNodes("creditAgreementDate");

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

            foreach (XmlNode item in creditAgreementDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        creditAgreementDateIDRef = item.Attributes["id"].Name;
                        XsdTypeDate ob = XsdTypeDate();
                        IDManager.SetID(creditAgreementDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        creditAgreementDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        creditAgreementDate = new XsdTypeDate(item);
                    }
                }
            }


            XmlNodeList trancheNodeList = xmlNode.SelectNodes("tranche");

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

            foreach (XmlNode item in trancheNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        trancheIDRef = item.Attributes["id"].Name;
                        UnderlyingAssetTranche ob = UnderlyingAssetTranche();
                        IDManager.SetID(trancheIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        trancheIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        tranche = new UnderlyingAssetTranche(item);
                    }
                }
            }
        }
 public SimpleCreditDefaultSwap(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 termNodeList = xmlNode.SelectNodes("term");
     if (termNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in termNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 termIDRef = item.Attributes["id"].Name;
                 Period ob = Period();
                 IDManager.SetID(termIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 termIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 term = new Period(item);
             }
         }
     }
     
 
     XmlNodeList paymentFrequencyNodeList = xmlNode.SelectNodes("paymentFrequency");
     if (paymentFrequencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentFrequencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentFrequencyIDRef = item.Attributes["id"].Name;
                 Period ob = Period();
                 IDManager.SetID(paymentFrequencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentFrequencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentFrequency = new Period(item);
             }
         }
     }
     
 
 }
예제 #16
0
 public Loan(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode borrowerNode = xmlNode.SelectSingleNode("borrower");
     
     if (borrowerNode != null)
     {
         if (borrowerNode.Attributes["href"] != null || borrowerNode.Attributes["id"] != null) 
         {
             if (borrowerNode.Attributes["id"] != null) 
             {
                 borrowerIDRef_ = borrowerNode.Attributes["id"].Value;
                 LegalEntity ob = new LegalEntity(borrowerNode);
                 IDManager.SetID(borrowerIDRef_, ob);
             }
             else if (borrowerNode.Attributes["href"] != null)
             {
                 borrowerIDRef_ = borrowerNode.Attributes["href"].Value;
             }
             else
             {
                 borrower_ = new LegalEntity(borrowerNode);
             }
         }
         else
         {
             borrower_ = new LegalEntity(borrowerNode);
         }
     }
     
 
     XmlNode borrowerReferenceNode = xmlNode.SelectSingleNode("borrowerReference");
     
     if (borrowerReferenceNode != null)
     {
         if (borrowerReferenceNode.Attributes["href"] != null || borrowerReferenceNode.Attributes["id"] != null) 
         {
             if (borrowerReferenceNode.Attributes["id"] != null) 
             {
                 borrowerReferenceIDRef_ = borrowerReferenceNode.Attributes["id"].Value;
                 LegalEntityReference ob = new LegalEntityReference(borrowerReferenceNode);
                 IDManager.SetID(borrowerReferenceIDRef_, ob);
             }
             else if (borrowerReferenceNode.Attributes["href"] != null)
             {
                 borrowerReferenceIDRef_ = borrowerReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 borrowerReference_ = new LegalEntityReference(borrowerReferenceNode);
             }
         }
         else
         {
             borrowerReference_ = new LegalEntityReference(borrowerReferenceNode);
         }
     }
     
 
     XmlNode lienNode = xmlNode.SelectSingleNode("lien");
     
     if (lienNode != null)
     {
         if (lienNode.Attributes["href"] != null || lienNode.Attributes["id"] != null) 
         {
             if (lienNode.Attributes["id"] != null) 
             {
                 lienIDRef_ = lienNode.Attributes["id"].Value;
                 Lien ob = new Lien(lienNode);
                 IDManager.SetID(lienIDRef_, ob);
             }
             else if (lienNode.Attributes["href"] != null)
             {
                 lienIDRef_ = lienNode.Attributes["href"].Value;
             }
             else
             {
                 lien_ = new Lien(lienNode);
             }
         }
         else
         {
             lien_ = new Lien(lienNode);
         }
     }
     
 
     XmlNode facilityTypeNode = xmlNode.SelectSingleNode("facilityType");
     
     if (facilityTypeNode != null)
     {
         if (facilityTypeNode.Attributes["href"] != null || facilityTypeNode.Attributes["id"] != null) 
         {
             if (facilityTypeNode.Attributes["id"] != null) 
             {
                 facilityTypeIDRef_ = facilityTypeNode.Attributes["id"].Value;
                 FacilityType ob = new FacilityType(facilityTypeNode);
                 IDManager.SetID(facilityTypeIDRef_, ob);
             }
             else if (facilityTypeNode.Attributes["href"] != null)
             {
                 facilityTypeIDRef_ = facilityTypeNode.Attributes["href"].Value;
             }
             else
             {
                 facilityType_ = new FacilityType(facilityTypeNode);
             }
         }
         else
         {
             facilityType_ = new FacilityType(facilityTypeNode);
         }
     }
     
 
     XmlNode maturityNode = xmlNode.SelectSingleNode("maturity");
     
     if (maturityNode != null)
     {
         if (maturityNode.Attributes["href"] != null || maturityNode.Attributes["id"] != null) 
         {
             if (maturityNode.Attributes["id"] != null) 
             {
                 maturityIDRef_ = maturityNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(maturityNode);
                 IDManager.SetID(maturityIDRef_, ob);
             }
             else if (maturityNode.Attributes["href"] != null)
             {
                 maturityIDRef_ = maturityNode.Attributes["href"].Value;
             }
             else
             {
                 maturity_ = new XsdTypeDate(maturityNode);
             }
         }
         else
         {
             maturity_ = new XsdTypeDate(maturityNode);
         }
     }
     
 
     XmlNode creditAgreementDateNode = xmlNode.SelectSingleNode("creditAgreementDate");
     
     if (creditAgreementDateNode != null)
     {
         if (creditAgreementDateNode.Attributes["href"] != null || creditAgreementDateNode.Attributes["id"] != null) 
         {
             if (creditAgreementDateNode.Attributes["id"] != null) 
             {
                 creditAgreementDateIDRef_ = creditAgreementDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(creditAgreementDateNode);
                 IDManager.SetID(creditAgreementDateIDRef_, ob);
             }
             else if (creditAgreementDateNode.Attributes["href"] != null)
             {
                 creditAgreementDateIDRef_ = creditAgreementDateNode.Attributes["href"].Value;
             }
             else
             {
                 creditAgreementDate_ = new XsdTypeDate(creditAgreementDateNode);
             }
         }
         else
         {
             creditAgreementDate_ = new XsdTypeDate(creditAgreementDateNode);
         }
     }
     
 
     XmlNode trancheNode = xmlNode.SelectSingleNode("tranche");
     
     if (trancheNode != null)
     {
         if (trancheNode.Attributes["href"] != null || trancheNode.Attributes["id"] != null) 
         {
             if (trancheNode.Attributes["id"] != null) 
             {
                 trancheIDRef_ = trancheNode.Attributes["id"].Value;
                 UnderlyingAssetTranche ob = new UnderlyingAssetTranche(trancheNode);
                 IDManager.SetID(trancheIDRef_, ob);
             }
             else if (trancheNode.Attributes["href"] != null)
             {
                 trancheIDRef_ = trancheNode.Attributes["href"].Value;
             }
             else
             {
                 tranche_ = new UnderlyingAssetTranche(trancheNode);
             }
         }
         else
         {
             tranche_ = new UnderlyingAssetTranche(trancheNode);
         }
     }
     
 
 }
 public Mortgage(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode insurerNode = xmlNode.SelectSingleNode("insurer");
     
     if (insurerNode != null)
     {
         if (insurerNode.Attributes["href"] != null || insurerNode.Attributes["id"] != null) 
         {
             if (insurerNode.Attributes["id"] != null) 
             {
                 insurerIDRef_ = insurerNode.Attributes["id"].Value;
                 LegalEntity ob = new LegalEntity(insurerNode);
                 IDManager.SetID(insurerIDRef_, ob);
             }
             else if (insurerNode.Attributes["href"] != null)
             {
                 insurerIDRef_ = insurerNode.Attributes["href"].Value;
             }
             else
             {
                 insurer_ = new LegalEntity(insurerNode);
             }
         }
         else
         {
             insurer_ = new LegalEntity(insurerNode);
         }
     }
     
 
     XmlNode insurerReferenceNode = xmlNode.SelectSingleNode("insurerReference");
     
     if (insurerReferenceNode != null)
     {
         if (insurerReferenceNode.Attributes["href"] != null || insurerReferenceNode.Attributes["id"] != null) 
         {
             if (insurerReferenceNode.Attributes["id"] != null) 
             {
                 insurerReferenceIDRef_ = insurerReferenceNode.Attributes["id"].Value;
                 LegalEntityReference ob = new LegalEntityReference(insurerReferenceNode);
                 IDManager.SetID(insurerReferenceIDRef_, ob);
             }
             else if (insurerReferenceNode.Attributes["href"] != null)
             {
                 insurerReferenceIDRef_ = insurerReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 insurerReference_ = new LegalEntityReference(insurerReferenceNode);
             }
         }
         else
         {
             insurerReference_ = new LegalEntityReference(insurerReferenceNode);
         }
     }
     
 
     XmlNode issuerNameNode = xmlNode.SelectSingleNode("issuerName");
     
     if (issuerNameNode != null)
     {
         if (issuerNameNode.Attributes["href"] != null || issuerNameNode.Attributes["id"] != null) 
         {
             if (issuerNameNode.Attributes["id"] != null) 
             {
                 issuerNameIDRef_ = issuerNameNode.Attributes["id"].Value;
                 XsdTypeString ob = new XsdTypeString(issuerNameNode);
                 IDManager.SetID(issuerNameIDRef_, ob);
             }
             else if (issuerNameNode.Attributes["href"] != null)
             {
                 issuerNameIDRef_ = issuerNameNode.Attributes["href"].Value;
             }
             else
             {
                 issuerName_ = new XsdTypeString(issuerNameNode);
             }
         }
         else
         {
             issuerName_ = new XsdTypeString(issuerNameNode);
         }
     }
     
 
     XmlNode issuerPartyReferenceNode = xmlNode.SelectSingleNode("issuerPartyReference");
     
     if (issuerPartyReferenceNode != null)
     {
         if (issuerPartyReferenceNode.Attributes["href"] != null || issuerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (issuerPartyReferenceNode.Attributes["id"] != null) 
             {
                 issuerPartyReferenceIDRef_ = issuerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(issuerPartyReferenceNode);
                 IDManager.SetID(issuerPartyReferenceIDRef_, ob);
             }
             else if (issuerPartyReferenceNode.Attributes["href"] != null)
             {
                 issuerPartyReferenceIDRef_ = issuerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 issuerPartyReference_ = new PartyReference(issuerPartyReferenceNode);
             }
         }
         else
         {
             issuerPartyReference_ = new PartyReference(issuerPartyReferenceNode);
         }
     }
     
 
     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 couponTypeNode = xmlNode.SelectSingleNode("couponType");
     
     if (couponTypeNode != null)
     {
         if (couponTypeNode.Attributes["href"] != null || couponTypeNode.Attributes["id"] != null) 
         {
             if (couponTypeNode.Attributes["id"] != null) 
             {
                 couponTypeIDRef_ = couponTypeNode.Attributes["id"].Value;
                 CouponType ob = new CouponType(couponTypeNode);
                 IDManager.SetID(couponTypeIDRef_, ob);
             }
             else if (couponTypeNode.Attributes["href"] != null)
             {
                 couponTypeIDRef_ = couponTypeNode.Attributes["href"].Value;
             }
             else
             {
                 couponType_ = new CouponType(couponTypeNode);
             }
         }
         else
         {
             couponType_ = new CouponType(couponTypeNode);
         }
     }
     
 
     XmlNode couponRateNode = xmlNode.SelectSingleNode("couponRate");
     
     if (couponRateNode != null)
     {
         if (couponRateNode.Attributes["href"] != null || couponRateNode.Attributes["id"] != null) 
         {
             if (couponRateNode.Attributes["id"] != null) 
             {
                 couponRateIDRef_ = couponRateNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(couponRateNode);
                 IDManager.SetID(couponRateIDRef_, ob);
             }
             else if (couponRateNode.Attributes["href"] != null)
             {
                 couponRateIDRef_ = couponRateNode.Attributes["href"].Value;
             }
             else
             {
                 couponRate_ = new XsdTypeDecimal(couponRateNode);
             }
         }
         else
         {
             couponRate_ = new XsdTypeDecimal(couponRateNode);
         }
     }
     
 
     XmlNode maturityNode = xmlNode.SelectSingleNode("maturity");
     
     if (maturityNode != null)
     {
         if (maturityNode.Attributes["href"] != null || maturityNode.Attributes["id"] != null) 
         {
             if (maturityNode.Attributes["id"] != null) 
             {
                 maturityIDRef_ = maturityNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(maturityNode);
                 IDManager.SetID(maturityIDRef_, ob);
             }
             else if (maturityNode.Attributes["href"] != null)
             {
                 maturityIDRef_ = maturityNode.Attributes["href"].Value;
             }
             else
             {
                 maturity_ = new XsdTypeDate(maturityNode);
             }
         }
         else
         {
             maturity_ = new XsdTypeDate(maturityNode);
         }
     }
     
 
     XmlNode paymentFrequencyNode = xmlNode.SelectSingleNode("paymentFrequency");
     
     if (paymentFrequencyNode != null)
     {
         if (paymentFrequencyNode.Attributes["href"] != null || paymentFrequencyNode.Attributes["id"] != null) 
         {
             if (paymentFrequencyNode.Attributes["id"] != null) 
             {
                 paymentFrequencyIDRef_ = paymentFrequencyNode.Attributes["id"].Value;
                 Period ob = new Period(paymentFrequencyNode);
                 IDManager.SetID(paymentFrequencyIDRef_, ob);
             }
             else if (paymentFrequencyNode.Attributes["href"] != null)
             {
                 paymentFrequencyIDRef_ = paymentFrequencyNode.Attributes["href"].Value;
             }
             else
             {
                 paymentFrequency_ = new Period(paymentFrequencyNode);
             }
         }
         else
         {
             paymentFrequency_ = new Period(paymentFrequencyNode);
         }
     }
     
 
     XmlNode dayCountFractionNode = xmlNode.SelectSingleNode("dayCountFraction");
     
     if (dayCountFractionNode != null)
     {
         if (dayCountFractionNode.Attributes["href"] != null || dayCountFractionNode.Attributes["id"] != null) 
         {
             if (dayCountFractionNode.Attributes["id"] != null) 
             {
                 dayCountFractionIDRef_ = dayCountFractionNode.Attributes["id"].Value;
                 DayCountFraction ob = new DayCountFraction(dayCountFractionNode);
                 IDManager.SetID(dayCountFractionIDRef_, ob);
             }
             else if (dayCountFractionNode.Attributes["href"] != null)
             {
                 dayCountFractionIDRef_ = dayCountFractionNode.Attributes["href"].Value;
             }
             else
             {
                 dayCountFraction_ = new DayCountFraction(dayCountFractionNode);
             }
         }
         else
         {
             dayCountFraction_ = new DayCountFraction(dayCountFractionNode);
         }
     }
     
 
     XmlNode originalPrincipalAmountNode = xmlNode.SelectSingleNode("originalPrincipalAmount");
     
     if (originalPrincipalAmountNode != null)
     {
         if (originalPrincipalAmountNode.Attributes["href"] != null || originalPrincipalAmountNode.Attributes["id"] != null) 
         {
             if (originalPrincipalAmountNode.Attributes["id"] != null) 
             {
                 originalPrincipalAmountIDRef_ = originalPrincipalAmountNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(originalPrincipalAmountNode);
                 IDManager.SetID(originalPrincipalAmountIDRef_, ob);
             }
             else if (originalPrincipalAmountNode.Attributes["href"] != null)
             {
                 originalPrincipalAmountIDRef_ = originalPrincipalAmountNode.Attributes["href"].Value;
             }
             else
             {
                 originalPrincipalAmount_ = new XsdTypeDecimal(originalPrincipalAmountNode);
             }
         }
         else
         {
             originalPrincipalAmount_ = new XsdTypeDecimal(originalPrincipalAmountNode);
         }
     }
     
 
     XmlNode poolNode = xmlNode.SelectSingleNode("pool");
     
     if (poolNode != null)
     {
         if (poolNode.Attributes["href"] != null || poolNode.Attributes["id"] != null) 
         {
             if (poolNode.Attributes["id"] != null) 
             {
                 poolIDRef_ = poolNode.Attributes["id"].Value;
                 AssetPool ob = new AssetPool(poolNode);
                 IDManager.SetID(poolIDRef_, ob);
             }
             else if (poolNode.Attributes["href"] != null)
             {
                 poolIDRef_ = poolNode.Attributes["href"].Value;
             }
             else
             {
                 pool_ = new AssetPool(poolNode);
             }
         }
         else
         {
             pool_ = new AssetPool(poolNode);
         }
     }
     
 
     XmlNode sectorNode = xmlNode.SelectSingleNode("sector");
     
     if (sectorNode != null)
     {
         if (sectorNode.Attributes["href"] != null || sectorNode.Attributes["id"] != null) 
         {
             if (sectorNode.Attributes["id"] != null) 
             {
                 sectorIDRef_ = sectorNode.Attributes["id"].Value;
                 MortgageSector ob = new MortgageSector(sectorNode);
                 IDManager.SetID(sectorIDRef_, ob);
             }
             else if (sectorNode.Attributes["href"] != null)
             {
                 sectorIDRef_ = sectorNode.Attributes["href"].Value;
             }
             else
             {
                 sector_ = new MortgageSector(sectorNode);
             }
         }
         else
         {
             sector_ = new MortgageSector(sectorNode);
         }
     }
     
 
     XmlNode trancheNode = xmlNode.SelectSingleNode("tranche");
     
     if (trancheNode != null)
     {
         if (trancheNode.Attributes["href"] != null || trancheNode.Attributes["id"] != null) 
         {
             if (trancheNode.Attributes["id"] != null) 
             {
                 trancheIDRef_ = trancheNode.Attributes["id"].Value;
                 XsdTypeToken ob = new XsdTypeToken(trancheNode);
                 IDManager.SetID(trancheIDRef_, ob);
             }
             else if (trancheNode.Attributes["href"] != null)
             {
                 trancheIDRef_ = trancheNode.Attributes["href"].Value;
             }
             else
             {
                 tranche_ = new XsdTypeToken(trancheNode);
             }
         }
         else
         {
             tranche_ = new XsdTypeToken(trancheNode);
         }
     }
     
 
 }
예제 #18
0
        public SimpleCreditDefaultSwap(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 termNodeList = xmlNode.SelectNodes("term");

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

            foreach (XmlNode item in termNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        termIDRef = item.Attributes["id"].Name;
                        Period ob = Period();
                        IDManager.SetID(termIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        termIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        term = new Period(item);
                    }
                }
            }


            XmlNodeList paymentFrequencyNodeList = xmlNode.SelectNodes("paymentFrequency");

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

            foreach (XmlNode item in paymentFrequencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        paymentFrequencyIDRef = item.Attributes["id"].Name;
                        Period ob = Period();
                        IDManager.SetID(paymentFrequencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        paymentFrequencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        paymentFrequency = new Period(item);
                    }
                }
            }
        }
        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);
                    }
                }
            }
        }