Ejemplo n.º 1
0
 public Bond(XmlNode xmlNode)
 : base(xmlNode)
 {
     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 parValueNodeList = xmlNode.SelectNodes("parValue");
     if (parValueNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in parValueNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 parValueIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(parValueIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 parValueIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 parValue = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList faceAmountNodeList = xmlNode.SelectNodes("faceAmount");
     if (faceAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in faceAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 faceAmountIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(faceAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 faceAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 faceAmount = new XsdTypeDecimal(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);
             }
         }
     }
     
 
 }
Ejemplo n.º 2
0
        public Bond(XmlNode xmlNode)
            : base(xmlNode)
        {
            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 parValueNode = xmlNode.SelectSingleNode("parValue");

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


            XmlNode faceAmountNode = xmlNode.SelectSingleNode("faceAmount");

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


            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);
                }
            }
        }
Ejemplo n.º 3
0
 public Bond(XmlNode xmlNode)
 : base(xmlNode)
 {
     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 parValueNode = xmlNode.SelectSingleNode("parValue");
     
     if (parValueNode != null)
     {
         if (parValueNode.Attributes["href"] != null || parValueNode.Attributes["id"] != null) 
         {
             if (parValueNode.Attributes["id"] != null) 
             {
                 parValueIDRef_ = parValueNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(parValueNode);
                 IDManager.SetID(parValueIDRef_, ob);
             }
             else if (parValueNode.Attributes["href"] != null)
             {
                 parValueIDRef_ = parValueNode.Attributes["href"].Value;
             }
             else
             {
                 parValue_ = new XsdTypeDecimal(parValueNode);
             }
         }
         else
         {
             parValue_ = new XsdTypeDecimal(parValueNode);
         }
     }
     
 
     XmlNode faceAmountNode = xmlNode.SelectSingleNode("faceAmount");
     
     if (faceAmountNode != null)
     {
         if (faceAmountNode.Attributes["href"] != null || faceAmountNode.Attributes["id"] != null) 
         {
             if (faceAmountNode.Attributes["id"] != null) 
             {
                 faceAmountIDRef_ = faceAmountNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(faceAmountNode);
                 IDManager.SetID(faceAmountIDRef_, ob);
             }
             else if (faceAmountNode.Attributes["href"] != null)
             {
                 faceAmountIDRef_ = faceAmountNode.Attributes["href"].Value;
             }
             else
             {
                 faceAmount_ = new XsdTypeDecimal(faceAmountNode);
             }
         }
         else
         {
             faceAmount_ = new XsdTypeDecimal(faceAmountNode);
         }
     }
     
 
     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);
         }
     }
     
 
 }
Ejemplo n.º 4
0
        public Bond(XmlNode xmlNode)
            : base(xmlNode)
        {
            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 parValueNodeList = xmlNode.SelectNodes("parValue");

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

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


            XmlNodeList faceAmountNodeList = xmlNode.SelectNodes("faceAmount");

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

            foreach (XmlNode item in faceAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        faceAmountIDRef = item.Attributes["id"].Name;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(faceAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        faceAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        faceAmount = new XsdTypeDecimal(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);
                    }
                }
            }
        }
Ejemplo n.º 5
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);
                    }
                }
            }
        }
 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 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);
         }
     }
     
 
 }
Ejemplo n.º 8
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 CreditCurve(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode referenceEntityNode = xmlNode.SelectSingleNode("referenceEntity");
     
     if (referenceEntityNode != null)
     {
         if (referenceEntityNode.Attributes["href"] != null || referenceEntityNode.Attributes["id"] != null) 
         {
             if (referenceEntityNode.Attributes["id"] != null) 
             {
                 referenceEntityIDRef_ = referenceEntityNode.Attributes["id"].Value;
                 LegalEntity ob = new LegalEntity(referenceEntityNode);
                 IDManager.SetID(referenceEntityIDRef_, ob);
             }
             else if (referenceEntityNode.Attributes["href"] != null)
             {
                 referenceEntityIDRef_ = referenceEntityNode.Attributes["href"].Value;
             }
             else
             {
                 referenceEntity_ = new LegalEntity(referenceEntityNode);
             }
         }
         else
         {
             referenceEntity_ = new LegalEntity(referenceEntityNode);
         }
     }
     
 
     XmlNode creditEntityReferenceNode = xmlNode.SelectSingleNode("creditEntityReference");
     
     if (creditEntityReferenceNode != null)
     {
         if (creditEntityReferenceNode.Attributes["href"] != null || creditEntityReferenceNode.Attributes["id"] != null) 
         {
             if (creditEntityReferenceNode.Attributes["id"] != null) 
             {
                 creditEntityReferenceIDRef_ = creditEntityReferenceNode.Attributes["id"].Value;
                 LegalEntityReference ob = new LegalEntityReference(creditEntityReferenceNode);
                 IDManager.SetID(creditEntityReferenceIDRef_, ob);
             }
             else if (creditEntityReferenceNode.Attributes["href"] != null)
             {
                 creditEntityReferenceIDRef_ = creditEntityReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 creditEntityReference_ = new LegalEntityReference(creditEntityReferenceNode);
             }
         }
         else
         {
             creditEntityReference_ = new LegalEntityReference(creditEntityReferenceNode);
         }
     }
     
 
     XmlNode creditEventsNode = xmlNode.SelectSingleNode("creditEvents");
     
     if (creditEventsNode != null)
     {
         if (creditEventsNode.Attributes["href"] != null || creditEventsNode.Attributes["id"] != null) 
         {
             if (creditEventsNode.Attributes["id"] != null) 
             {
                 creditEventsIDRef_ = creditEventsNode.Attributes["id"].Value;
                 CreditEvents ob = new CreditEvents(creditEventsNode);
                 IDManager.SetID(creditEventsIDRef_, ob);
             }
             else if (creditEventsNode.Attributes["href"] != null)
             {
                 creditEventsIDRef_ = creditEventsNode.Attributes["href"].Value;
             }
             else
             {
                 creditEvents_ = new CreditEvents(creditEventsNode);
             }
         }
         else
         {
             creditEvents_ = new CreditEvents(creditEventsNode);
         }
     }
     
 
     XmlNode seniorityNode = xmlNode.SelectSingleNode("seniority");
     
     if (seniorityNode != null)
     {
         if (seniorityNode.Attributes["href"] != null || seniorityNode.Attributes["id"] != null) 
         {
             if (seniorityNode.Attributes["id"] != null) 
             {
                 seniorityIDRef_ = seniorityNode.Attributes["id"].Value;
                 CreditSeniority ob = new CreditSeniority(seniorityNode);
                 IDManager.SetID(seniorityIDRef_, ob);
             }
             else if (seniorityNode.Attributes["href"] != null)
             {
                 seniorityIDRef_ = seniorityNode.Attributes["href"].Value;
             }
             else
             {
                 seniority_ = new CreditSeniority(seniorityNode);
             }
         }
         else
         {
             seniority_ = new CreditSeniority(seniorityNode);
         }
     }
     
 
     XmlNode securedNode = xmlNode.SelectSingleNode("secured");
     
     if (securedNode != null)
     {
         if (securedNode.Attributes["href"] != null || securedNode.Attributes["id"] != null) 
         {
             if (securedNode.Attributes["id"] != null) 
             {
                 securedIDRef_ = securedNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(securedNode);
                 IDManager.SetID(securedIDRef_, ob);
             }
             else if (securedNode.Attributes["href"] != null)
             {
                 securedIDRef_ = securedNode.Attributes["href"].Value;
             }
             else
             {
                 secured_ = new XsdTypeBoolean(securedNode);
             }
         }
         else
         {
             secured_ = new XsdTypeBoolean(securedNode);
         }
     }
     
 
     XmlNode obligationCurrencyNode = xmlNode.SelectSingleNode("obligationCurrency");
     
     if (obligationCurrencyNode != null)
     {
         if (obligationCurrencyNode.Attributes["href"] != null || obligationCurrencyNode.Attributes["id"] != null) 
         {
             if (obligationCurrencyNode.Attributes["id"] != null) 
             {
                 obligationCurrencyIDRef_ = obligationCurrencyNode.Attributes["id"].Value;
                 Currency ob = new Currency(obligationCurrencyNode);
                 IDManager.SetID(obligationCurrencyIDRef_, ob);
             }
             else if (obligationCurrencyNode.Attributes["href"] != null)
             {
                 obligationCurrencyIDRef_ = obligationCurrencyNode.Attributes["href"].Value;
             }
             else
             {
                 obligationCurrency_ = new Currency(obligationCurrencyNode);
             }
         }
         else
         {
             obligationCurrency_ = new Currency(obligationCurrencyNode);
         }
     }
     
 
     XmlNode obligationsNode = xmlNode.SelectSingleNode("obligations");
     
     if (obligationsNode != null)
     {
         if (obligationsNode.Attributes["href"] != null || obligationsNode.Attributes["id"] != null) 
         {
             if (obligationsNode.Attributes["id"] != null) 
             {
                 obligationsIDRef_ = obligationsNode.Attributes["id"].Value;
                 Obligations ob = new Obligations(obligationsNode);
                 IDManager.SetID(obligationsIDRef_, ob);
             }
             else if (obligationsNode.Attributes["href"] != null)
             {
                 obligationsIDRef_ = obligationsNode.Attributes["href"].Value;
             }
             else
             {
                 obligations_ = new Obligations(obligationsNode);
             }
         }
         else
         {
             obligations_ = new Obligations(obligationsNode);
         }
     }
     
 
     XmlNode deliverableObligationsNode = xmlNode.SelectSingleNode("deliverableObligations");
     
     if (deliverableObligationsNode != null)
     {
         if (deliverableObligationsNode.Attributes["href"] != null || deliverableObligationsNode.Attributes["id"] != null) 
         {
             if (deliverableObligationsNode.Attributes["id"] != null) 
             {
                 deliverableObligationsIDRef_ = deliverableObligationsNode.Attributes["id"].Value;
                 DeliverableObligations ob = new DeliverableObligations(deliverableObligationsNode);
                 IDManager.SetID(deliverableObligationsIDRef_, ob);
             }
             else if (deliverableObligationsNode.Attributes["href"] != null)
             {
                 deliverableObligationsIDRef_ = deliverableObligationsNode.Attributes["href"].Value;
             }
             else
             {
                 deliverableObligations_ = new DeliverableObligations(deliverableObligationsNode);
             }
         }
         else
         {
             deliverableObligations_ = new DeliverableObligations(deliverableObligationsNode);
         }
     }
     
 
 }
        public CreditCurve(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode referenceEntityNode = xmlNode.SelectSingleNode("referenceEntity");

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


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

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


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

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


            XmlNode seniorityNode = xmlNode.SelectSingleNode("seniority");

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


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

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


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

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


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

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


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

            if (deliverableObligationsNode != null)
            {
                if (deliverableObligationsNode.Attributes["href"] != null || deliverableObligationsNode.Attributes["id"] != null)
                {
                    if (deliverableObligationsNode.Attributes["id"] != null)
                    {
                        deliverableObligationsIDRef_ = deliverableObligationsNode.Attributes["id"].Value;
                        DeliverableObligations ob = new DeliverableObligations(deliverableObligationsNode);
                        IDManager.SetID(deliverableObligationsIDRef_, ob);
                    }
                    else if (deliverableObligationsNode.Attributes["href"] != null)
                    {
                        deliverableObligationsIDRef_ = deliverableObligationsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliverableObligations_ = new DeliverableObligations(deliverableObligationsNode);
                    }
                }
                else
                {
                    deliverableObligations_ = new DeliverableObligations(deliverableObligationsNode);
                }
            }
        }
        public 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);
                    }
                }
            }
        }