public ForecastRateIndex(XmlNode xmlNode)
 {
     XmlNodeList floatingRateIndexNodeList = xmlNode.SelectNodes("floatingRateIndex");
     if (floatingRateIndexNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in floatingRateIndexNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 floatingRateIndexIDRef = item.Attributes["id"].Name;
                 FloatingRateIndex ob = FloatingRateIndex();
                 IDManager.SetID(floatingRateIndexIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 floatingRateIndexIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 floatingRateIndex = new FloatingRateIndex(item);
             }
         }
     }
     
 
     XmlNodeList indexTenorNodeList = xmlNode.SelectNodes("indexTenor");
     if (indexTenorNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in indexTenorNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 indexTenorIDRef = item.Attributes["id"].Name;
                 Period ob = Period();
                 IDManager.SetID(indexTenorIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 indexTenorIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 indexTenor = new Period(item);
             }
         }
     }
     
 
 }
 public ForecastRateIndex(XmlNode xmlNode)
 {
     XmlNode floatingRateIndexNode = xmlNode.SelectSingleNode("floatingRateIndex");
     
     if (floatingRateIndexNode != null)
     {
         if (floatingRateIndexNode.Attributes["href"] != null || floatingRateIndexNode.Attributes["id"] != null) 
         {
             if (floatingRateIndexNode.Attributes["id"] != null) 
             {
                 floatingRateIndexIDRef_ = floatingRateIndexNode.Attributes["id"].Value;
                 FloatingRateIndex ob = new FloatingRateIndex(floatingRateIndexNode);
                 IDManager.SetID(floatingRateIndexIDRef_, ob);
             }
             else if (floatingRateIndexNode.Attributes["href"] != null)
             {
                 floatingRateIndexIDRef_ = floatingRateIndexNode.Attributes["href"].Value;
             }
             else
             {
                 floatingRateIndex_ = new FloatingRateIndex(floatingRateIndexNode);
             }
         }
         else
         {
             floatingRateIndex_ = new FloatingRateIndex(floatingRateIndexNode);
         }
     }
     
 
     XmlNode indexTenorNode = xmlNode.SelectSingleNode("indexTenor");
     
     if (indexTenorNode != null)
     {
         if (indexTenorNode.Attributes["href"] != null || indexTenorNode.Attributes["id"] != null) 
         {
             if (indexTenorNode.Attributes["id"] != null) 
             {
                 indexTenorIDRef_ = indexTenorNode.Attributes["id"].Value;
                 Period ob = new Period(indexTenorNode);
                 IDManager.SetID(indexTenorIDRef_, ob);
             }
             else if (indexTenorNode.Attributes["href"] != null)
             {
                 indexTenorIDRef_ = indexTenorNode.Attributes["href"].Value;
             }
             else
             {
                 indexTenor_ = new Period(indexTenorNode);
             }
         }
         else
         {
             indexTenor_ = new Period(indexTenorNode);
         }
     }
     
 
 }
Ejemplo n.º 3
0
        public ForecastRateIndex(XmlNode xmlNode)
        {
            XmlNodeList floatingRateIndexNodeList = xmlNode.SelectNodes("floatingRateIndex");

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

            foreach (XmlNode item in floatingRateIndexNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        floatingRateIndexIDRef = item.Attributes["id"].Name;
                        FloatingRateIndex ob = FloatingRateIndex();
                        IDManager.SetID(floatingRateIndexIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        floatingRateIndexIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        floatingRateIndex = new FloatingRateIndex(item);
                    }
                }
            }


            XmlNodeList indexTenorNodeList = xmlNode.SelectNodes("indexTenor");

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

            foreach (XmlNode item in indexTenorNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        indexTenorIDRef = item.Attributes["id"].Name;
                        Period ob = Period();
                        IDManager.SetID(indexTenorIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        indexTenorIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        indexTenor = new Period(item);
                    }
                }
            }
        }
Ejemplo n.º 4
0
        public ForecastRateIndex(XmlNode xmlNode)
        {
            XmlNode floatingRateIndexNode = xmlNode.SelectSingleNode("floatingRateIndex");

            if (floatingRateIndexNode != null)
            {
                if (floatingRateIndexNode.Attributes["href"] != null || floatingRateIndexNode.Attributes["id"] != null)
                {
                    if (floatingRateIndexNode.Attributes["id"] != null)
                    {
                        floatingRateIndexIDRef_ = floatingRateIndexNode.Attributes["id"].Value;
                        FloatingRateIndex ob = new FloatingRateIndex(floatingRateIndexNode);
                        IDManager.SetID(floatingRateIndexIDRef_, ob);
                    }
                    else if (floatingRateIndexNode.Attributes["href"] != null)
                    {
                        floatingRateIndexIDRef_ = floatingRateIndexNode.Attributes["href"].Value;
                    }
                    else
                    {
                        floatingRateIndex_ = new FloatingRateIndex(floatingRateIndexNode);
                    }
                }
                else
                {
                    floatingRateIndex_ = new FloatingRateIndex(floatingRateIndexNode);
                }
            }


            XmlNode indexTenorNode = xmlNode.SelectSingleNode("indexTenor");

            if (indexTenorNode != null)
            {
                if (indexTenorNode.Attributes["href"] != null || indexTenorNode.Attributes["id"] != null)
                {
                    if (indexTenorNode.Attributes["id"] != null)
                    {
                        indexTenorIDRef_ = indexTenorNode.Attributes["id"].Value;
                        Period ob = new Period(indexTenorNode);
                        IDManager.SetID(indexTenorIDRef_, ob);
                    }
                    else if (indexTenorNode.Attributes["href"] != null)
                    {
                        indexTenorIDRef_ = indexTenorNode.Attributes["href"].Value;
                    }
                    else
                    {
                        indexTenor_ = new Period(indexTenorNode);
                    }
                }
                else
                {
                    indexTenor_ = new Period(indexTenorNode);
                }
            }
        }
 public InterestShortFall(XmlNode xmlNode)
 {
     XmlNodeList interestShortfallCapNodeList = xmlNode.SelectNodes("interestShortfallCap");
     if (interestShortfallCapNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in interestShortfallCapNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 interestShortfallCapIDRef = item.Attributes["id"].Name;
                 InterestShortfallCapEnum ob = InterestShortfallCapEnum();
                 IDManager.SetID(interestShortfallCapIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 interestShortfallCapIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 interestShortfallCap = new InterestShortfallCapEnum(item);
             }
         }
     }
     
 
     XmlNodeList compoundingNodeList = xmlNode.SelectNodes("compounding");
     if (compoundingNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in compoundingNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 compoundingIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(compoundingIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 compoundingIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 compounding = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList rateSourceNodeList = xmlNode.SelectNodes("rateSource");
     if (rateSourceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in rateSourceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 rateSourceIDRef = item.Attributes["id"].Name;
                 FloatingRateIndex ob = FloatingRateIndex();
                 IDManager.SetID(rateSourceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 rateSourceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 rateSource = new FloatingRateIndex(item);
             }
         }
     }
     
 
 }
 public FloatingRate(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList floatingRateIndexNodeList = xmlNode.SelectNodes("floatingRateIndex");
     if (floatingRateIndexNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in floatingRateIndexNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 floatingRateIndexIDRef = item.Attributes["id"].Name;
                 FloatingRateIndex ob = FloatingRateIndex();
                 IDManager.SetID(floatingRateIndexIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 floatingRateIndexIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 floatingRateIndex = new FloatingRateIndex(item);
             }
         }
     }
     
 
     XmlNodeList indexTenorNodeList = xmlNode.SelectNodes("indexTenor");
     if (indexTenorNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in indexTenorNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 indexTenorIDRef = item.Attributes["id"].Name;
                 Period ob = Period();
                 IDManager.SetID(indexTenorIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 indexTenorIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 indexTenor = new Period(item);
             }
         }
     }
     
 
     XmlNodeList floatingRateMultiplierScheduleNodeList = xmlNode.SelectNodes("floatingRateMultiplierSchedule");
     if (floatingRateMultiplierScheduleNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in floatingRateMultiplierScheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 floatingRateMultiplierScheduleIDRef = item.Attributes["id"].Name;
                 Schedule ob = Schedule();
                 IDManager.SetID(floatingRateMultiplierScheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 floatingRateMultiplierScheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 floatingRateMultiplierSchedule = new Schedule(item);
             }
         }
     }
     
 
     XmlNodeList spreadScheduleNodeList = xmlNode.SelectNodes("spreadSchedule");
     
     foreach (XmlNode item in spreadScheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 spreadScheduleIDRef = item.Attributes["id"].Name;
                 List<SpreadSchedule> ob = new List<SpreadSchedule>();
                 ob.Add(new SpreadSchedule(item));
                 IDManager.SetID(spreadScheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 spreadScheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
             spreadSchedule.Add(new SpreadSchedule(item));
             }
         }
     }
     
 
     XmlNodeList rateTreatmentNodeList = xmlNode.SelectNodes("rateTreatment");
     if (rateTreatmentNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in rateTreatmentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 rateTreatmentIDRef = item.Attributes["id"].Name;
                 RateTreatmentEnum ob = RateTreatmentEnum();
                 IDManager.SetID(rateTreatmentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 rateTreatmentIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 rateTreatment = new RateTreatmentEnum(item);
             }
         }
     }
     
 
     XmlNodeList capRateScheduleNodeList = xmlNode.SelectNodes("capRateSchedule");
     
     foreach (XmlNode item in capRateScheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 capRateScheduleIDRef = item.Attributes["id"].Name;
                 List<StrikeSchedule> ob = new List<StrikeSchedule>();
                 ob.Add(new StrikeSchedule(item));
                 IDManager.SetID(capRateScheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 capRateScheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
             capRateSchedule.Add(new StrikeSchedule(item));
             }
         }
     }
     
 
     XmlNodeList floorRateScheduleNodeList = xmlNode.SelectNodes("floorRateSchedule");
     
     foreach (XmlNode item in floorRateScheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 floorRateScheduleIDRef = item.Attributes["id"].Name;
                 List<StrikeSchedule> ob = new List<StrikeSchedule>();
                 ob.Add(new StrikeSchedule(item));
                 IDManager.SetID(floorRateScheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 floorRateScheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
             floorRateSchedule.Add(new StrikeSchedule(item));
             }
         }
     }
     
 
 }
        public RateIndex(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode floatingRateIndexNode = xmlNode.SelectSingleNode("floatingRateIndex");

            if (floatingRateIndexNode != null)
            {
                if (floatingRateIndexNode.Attributes["href"] != null || floatingRateIndexNode.Attributes["id"] != null)
                {
                    if (floatingRateIndexNode.Attributes["id"] != null)
                    {
                        floatingRateIndexIDRef_ = floatingRateIndexNode.Attributes["id"].Value;
                        FloatingRateIndex ob = new FloatingRateIndex(floatingRateIndexNode);
                        IDManager.SetID(floatingRateIndexIDRef_, ob);
                    }
                    else if (floatingRateIndexNode.Attributes["href"] != null)
                    {
                        floatingRateIndexIDRef_ = floatingRateIndexNode.Attributes["href"].Value;
                    }
                    else
                    {
                        floatingRateIndex_ = new FloatingRateIndex(floatingRateIndexNode);
                    }
                }
                else
                {
                    floatingRateIndex_ = new FloatingRateIndex(floatingRateIndexNode);
                }
            }


            XmlNode termNode = xmlNode.SelectSingleNode("term");

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


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

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


            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);
                }
            }
        }
        public RateIndex(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList floatingRateIndexNodeList = xmlNode.SelectNodes("floatingRateIndex");

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

            foreach (XmlNode item in floatingRateIndexNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        floatingRateIndexIDRef = item.Attributes["id"].Name;
                        FloatingRateIndex ob = FloatingRateIndex();
                        IDManager.SetID(floatingRateIndexIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        floatingRateIndexIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        floatingRateIndex = new FloatingRateIndex(item);
                    }
                }
            }


            XmlNodeList termNodeList = xmlNode.SelectNodes("term");

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

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


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

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

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


            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.º 9
0
        public SwapCurveValuation(XmlNode xmlNode)
        {
            XmlNodeList floatingRateIndexNodeList = xmlNode.SelectNodes("floatingRateIndex");

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

            foreach (XmlNode item in floatingRateIndexNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        floatingRateIndexIDRef = item.Attributes["id"].Name;
                        FloatingRateIndex ob = FloatingRateIndex();
                        IDManager.SetID(floatingRateIndexIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        floatingRateIndexIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        floatingRateIndex = new FloatingRateIndex(item);
                    }
                }
            }


            XmlNodeList indexTenorNodeList = xmlNode.SelectNodes("indexTenor");

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

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


            XmlNodeList spreadNodeList = xmlNode.SelectNodes("spread");

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

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


            XmlNodeList sideNodeList = xmlNode.SelectNodes("side");

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

            foreach (XmlNode item in sideNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        sideIDRef = item.Attributes["id"].Name;
                        QuotationSideEnum ob = QuotationSideEnum();
                        IDManager.SetID(sideIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        sideIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        side = new QuotationSideEnum(item);
                    }
                }
            }
        }
 public FloatingRate(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode floatingRateIndexNode = xmlNode.SelectSingleNode("floatingRateIndex");
     
     if (floatingRateIndexNode != null)
     {
         if (floatingRateIndexNode.Attributes["href"] != null || floatingRateIndexNode.Attributes["id"] != null) 
         {
             if (floatingRateIndexNode.Attributes["id"] != null) 
             {
                 floatingRateIndexIDRef_ = floatingRateIndexNode.Attributes["id"].Value;
                 FloatingRateIndex ob = new FloatingRateIndex(floatingRateIndexNode);
                 IDManager.SetID(floatingRateIndexIDRef_, ob);
             }
             else if (floatingRateIndexNode.Attributes["href"] != null)
             {
                 floatingRateIndexIDRef_ = floatingRateIndexNode.Attributes["href"].Value;
             }
             else
             {
                 floatingRateIndex_ = new FloatingRateIndex(floatingRateIndexNode);
             }
         }
         else
         {
             floatingRateIndex_ = new FloatingRateIndex(floatingRateIndexNode);
         }
     }
     
 
     XmlNode indexTenorNode = xmlNode.SelectSingleNode("indexTenor");
     
     if (indexTenorNode != null)
     {
         if (indexTenorNode.Attributes["href"] != null || indexTenorNode.Attributes["id"] != null) 
         {
             if (indexTenorNode.Attributes["id"] != null) 
             {
                 indexTenorIDRef_ = indexTenorNode.Attributes["id"].Value;
                 Period ob = new Period(indexTenorNode);
                 IDManager.SetID(indexTenorIDRef_, ob);
             }
             else if (indexTenorNode.Attributes["href"] != null)
             {
                 indexTenorIDRef_ = indexTenorNode.Attributes["href"].Value;
             }
             else
             {
                 indexTenor_ = new Period(indexTenorNode);
             }
         }
         else
         {
             indexTenor_ = new Period(indexTenorNode);
         }
     }
     
 
     XmlNode floatingRateMultiplierScheduleNode = xmlNode.SelectSingleNode("floatingRateMultiplierSchedule");
     
     if (floatingRateMultiplierScheduleNode != null)
     {
         if (floatingRateMultiplierScheduleNode.Attributes["href"] != null || floatingRateMultiplierScheduleNode.Attributes["id"] != null) 
         {
             if (floatingRateMultiplierScheduleNode.Attributes["id"] != null) 
             {
                 floatingRateMultiplierScheduleIDRef_ = floatingRateMultiplierScheduleNode.Attributes["id"].Value;
                 Schedule ob = new Schedule(floatingRateMultiplierScheduleNode);
                 IDManager.SetID(floatingRateMultiplierScheduleIDRef_, ob);
             }
             else if (floatingRateMultiplierScheduleNode.Attributes["href"] != null)
             {
                 floatingRateMultiplierScheduleIDRef_ = floatingRateMultiplierScheduleNode.Attributes["href"].Value;
             }
             else
             {
                 floatingRateMultiplierSchedule_ = new Schedule(floatingRateMultiplierScheduleNode);
             }
         }
         else
         {
             floatingRateMultiplierSchedule_ = new Schedule(floatingRateMultiplierScheduleNode);
         }
     }
     
 
     XmlNodeList spreadScheduleNodeList = xmlNode.SelectNodes("spreadSchedule");
     
     if (spreadScheduleNodeList != null)
     {
         this.spreadSchedule_ = new List<SpreadSchedule>();
         foreach (XmlNode item in spreadScheduleNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     spreadScheduleIDRef_ = item.Attributes["id"].Value;
                     spreadSchedule_.Add(new SpreadSchedule(item));
                     IDManager.SetID(spreadScheduleIDRef_, spreadSchedule_[spreadSchedule_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     spreadScheduleIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 spreadSchedule_.Add(new SpreadSchedule(item));
                 }
             }
             else
             {
                 spreadSchedule_.Add(new SpreadSchedule(item));
             }
         }
     }
     
 
     XmlNode rateTreatmentNode = xmlNode.SelectSingleNode("rateTreatment");
     
     if (rateTreatmentNode != null)
     {
         if (rateTreatmentNode.Attributes["href"] != null || rateTreatmentNode.Attributes["id"] != null) 
         {
             if (rateTreatmentNode.Attributes["id"] != null) 
             {
                 rateTreatmentIDRef_ = rateTreatmentNode.Attributes["id"].Value;
                 RateTreatmentEnum ob = new RateTreatmentEnum(rateTreatmentNode);
                 IDManager.SetID(rateTreatmentIDRef_, ob);
             }
             else if (rateTreatmentNode.Attributes["href"] != null)
             {
                 rateTreatmentIDRef_ = rateTreatmentNode.Attributes["href"].Value;
             }
             else
             {
                 rateTreatment_ = new RateTreatmentEnum(rateTreatmentNode);
             }
         }
         else
         {
             rateTreatment_ = new RateTreatmentEnum(rateTreatmentNode);
         }
     }
     
 
     XmlNodeList capRateScheduleNodeList = xmlNode.SelectNodes("capRateSchedule");
     
     if (capRateScheduleNodeList != null)
     {
         this.capRateSchedule_ = new List<StrikeSchedule>();
         foreach (XmlNode item in capRateScheduleNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     capRateScheduleIDRef_ = item.Attributes["id"].Value;
                     capRateSchedule_.Add(new StrikeSchedule(item));
                     IDManager.SetID(capRateScheduleIDRef_, capRateSchedule_[capRateSchedule_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     capRateScheduleIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 capRateSchedule_.Add(new StrikeSchedule(item));
                 }
             }
             else
             {
                 capRateSchedule_.Add(new StrikeSchedule(item));
             }
         }
     }
     
 
     XmlNodeList floorRateScheduleNodeList = xmlNode.SelectNodes("floorRateSchedule");
     
     if (floorRateScheduleNodeList != null)
     {
         this.floorRateSchedule_ = new List<StrikeSchedule>();
         foreach (XmlNode item in floorRateScheduleNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     floorRateScheduleIDRef_ = item.Attributes["id"].Value;
                     floorRateSchedule_.Add(new StrikeSchedule(item));
                     IDManager.SetID(floorRateScheduleIDRef_, floorRateSchedule_[floorRateSchedule_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     floorRateScheduleIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 floorRateSchedule_.Add(new StrikeSchedule(item));
                 }
             }
             else
             {
                 floorRateSchedule_.Add(new StrikeSchedule(item));
             }
         }
     }
     
 
 }
        public FloatingRate(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList floatingRateIndexNodeList = xmlNode.SelectNodes("floatingRateIndex");

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

            foreach (XmlNode item in floatingRateIndexNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        floatingRateIndexIDRef = item.Attributes["id"].Name;
                        FloatingRateIndex ob = FloatingRateIndex();
                        IDManager.SetID(floatingRateIndexIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        floatingRateIndexIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        floatingRateIndex = new FloatingRateIndex(item);
                    }
                }
            }


            XmlNodeList indexTenorNodeList = xmlNode.SelectNodes("indexTenor");

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

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


            XmlNodeList floatingRateMultiplierScheduleNodeList = xmlNode.SelectNodes("floatingRateMultiplierSchedule");

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

            foreach (XmlNode item in floatingRateMultiplierScheduleNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        floatingRateMultiplierScheduleIDRef = item.Attributes["id"].Name;
                        Schedule ob = Schedule();
                        IDManager.SetID(floatingRateMultiplierScheduleIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        floatingRateMultiplierScheduleIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        floatingRateMultiplierSchedule = new Schedule(item);
                    }
                }
            }


            XmlNodeList spreadScheduleNodeList = xmlNode.SelectNodes("spreadSchedule");

            foreach (XmlNode item in spreadScheduleNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        spreadScheduleIDRef = item.Attributes["id"].Name;
                        List <SpreadSchedule> ob = new List <SpreadSchedule>();
                        ob.Add(new SpreadSchedule(item));
                        IDManager.SetID(spreadScheduleIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        spreadScheduleIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        spreadSchedule.Add(new SpreadSchedule(item));
                    }
                }
            }


            XmlNodeList rateTreatmentNodeList = xmlNode.SelectNodes("rateTreatment");

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

            foreach (XmlNode item in rateTreatmentNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        rateTreatmentIDRef = item.Attributes["id"].Name;
                        RateTreatmentEnum ob = RateTreatmentEnum();
                        IDManager.SetID(rateTreatmentIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        rateTreatmentIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        rateTreatment = new RateTreatmentEnum(item);
                    }
                }
            }


            XmlNodeList capRateScheduleNodeList = xmlNode.SelectNodes("capRateSchedule");

            foreach (XmlNode item in capRateScheduleNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        capRateScheduleIDRef = item.Attributes["id"].Name;
                        List <StrikeSchedule> ob = new List <StrikeSchedule>();
                        ob.Add(new StrikeSchedule(item));
                        IDManager.SetID(capRateScheduleIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        capRateScheduleIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        capRateSchedule.Add(new StrikeSchedule(item));
                    }
                }
            }


            XmlNodeList floorRateScheduleNodeList = xmlNode.SelectNodes("floorRateSchedule");

            foreach (XmlNode item in floorRateScheduleNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        floorRateScheduleIDRef = item.Attributes["id"].Name;
                        List <StrikeSchedule> ob = new List <StrikeSchedule>();
                        ob.Add(new StrikeSchedule(item));
                        IDManager.SetID(floorRateScheduleIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        floorRateScheduleIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        floorRateSchedule.Add(new StrikeSchedule(item));
                    }
                }
            }
        }
Ejemplo n.º 12
0
 public Fra(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode buyerPartyReferenceNode = xmlNode.SelectSingleNode("buyerPartyReference");
     
     if (buyerPartyReferenceNode != null)
     {
         if (buyerPartyReferenceNode.Attributes["href"] != null || buyerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (buyerPartyReferenceNode.Attributes["id"] != null) 
             {
                 buyerPartyReferenceIDRef_ = buyerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(buyerPartyReferenceNode);
                 IDManager.SetID(buyerPartyReferenceIDRef_, ob);
             }
             else if (buyerPartyReferenceNode.Attributes["href"] != null)
             {
                 buyerPartyReferenceIDRef_ = buyerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 buyerPartyReference_ = new PartyReference(buyerPartyReferenceNode);
             }
         }
         else
         {
             buyerPartyReference_ = new PartyReference(buyerPartyReferenceNode);
         }
     }
     
 
     XmlNode buyerAccountReferenceNode = xmlNode.SelectSingleNode("buyerAccountReference");
     
     if (buyerAccountReferenceNode != null)
     {
         if (buyerAccountReferenceNode.Attributes["href"] != null || buyerAccountReferenceNode.Attributes["id"] != null) 
         {
             if (buyerAccountReferenceNode.Attributes["id"] != null) 
             {
                 buyerAccountReferenceIDRef_ = buyerAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(buyerAccountReferenceNode);
                 IDManager.SetID(buyerAccountReferenceIDRef_, ob);
             }
             else if (buyerAccountReferenceNode.Attributes["href"] != null)
             {
                 buyerAccountReferenceIDRef_ = buyerAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 buyerAccountReference_ = new AccountReference(buyerAccountReferenceNode);
             }
         }
         else
         {
             buyerAccountReference_ = new AccountReference(buyerAccountReferenceNode);
         }
     }
     
 
     XmlNode sellerPartyReferenceNode = xmlNode.SelectSingleNode("sellerPartyReference");
     
     if (sellerPartyReferenceNode != null)
     {
         if (sellerPartyReferenceNode.Attributes["href"] != null || sellerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (sellerPartyReferenceNode.Attributes["id"] != null) 
             {
                 sellerPartyReferenceIDRef_ = sellerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(sellerPartyReferenceNode);
                 IDManager.SetID(sellerPartyReferenceIDRef_, ob);
             }
             else if (sellerPartyReferenceNode.Attributes["href"] != null)
             {
                 sellerPartyReferenceIDRef_ = sellerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 sellerPartyReference_ = new PartyReference(sellerPartyReferenceNode);
             }
         }
         else
         {
             sellerPartyReference_ = new PartyReference(sellerPartyReferenceNode);
         }
     }
     
 
     XmlNode sellerAccountReferenceNode = xmlNode.SelectSingleNode("sellerAccountReference");
     
     if (sellerAccountReferenceNode != null)
     {
         if (sellerAccountReferenceNode.Attributes["href"] != null || sellerAccountReferenceNode.Attributes["id"] != null) 
         {
             if (sellerAccountReferenceNode.Attributes["id"] != null) 
             {
                 sellerAccountReferenceIDRef_ = sellerAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(sellerAccountReferenceNode);
                 IDManager.SetID(sellerAccountReferenceIDRef_, ob);
             }
             else if (sellerAccountReferenceNode.Attributes["href"] != null)
             {
                 sellerAccountReferenceIDRef_ = sellerAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 sellerAccountReference_ = new AccountReference(sellerAccountReferenceNode);
             }
         }
         else
         {
             sellerAccountReference_ = new AccountReference(sellerAccountReferenceNode);
         }
     }
     
 
     XmlNode adjustedEffectiveDateNode = xmlNode.SelectSingleNode("adjustedEffectiveDate");
     
     if (adjustedEffectiveDateNode != null)
     {
         if (adjustedEffectiveDateNode.Attributes["href"] != null || adjustedEffectiveDateNode.Attributes["id"] != null) 
         {
             if (adjustedEffectiveDateNode.Attributes["id"] != null) 
             {
                 adjustedEffectiveDateIDRef_ = adjustedEffectiveDateNode.Attributes["id"].Value;
                 RequiredIdentifierDate ob = new RequiredIdentifierDate(adjustedEffectiveDateNode);
                 IDManager.SetID(adjustedEffectiveDateIDRef_, ob);
             }
             else if (adjustedEffectiveDateNode.Attributes["href"] != null)
             {
                 adjustedEffectiveDateIDRef_ = adjustedEffectiveDateNode.Attributes["href"].Value;
             }
             else
             {
                 adjustedEffectiveDate_ = new RequiredIdentifierDate(adjustedEffectiveDateNode);
             }
         }
         else
         {
             adjustedEffectiveDate_ = new RequiredIdentifierDate(adjustedEffectiveDateNode);
         }
     }
     
 
     XmlNode adjustedTerminationDateNode = xmlNode.SelectSingleNode("adjustedTerminationDate");
     
     if (adjustedTerminationDateNode != null)
     {
         if (adjustedTerminationDateNode.Attributes["href"] != null || adjustedTerminationDateNode.Attributes["id"] != null) 
         {
             if (adjustedTerminationDateNode.Attributes["id"] != null) 
             {
                 adjustedTerminationDateIDRef_ = adjustedTerminationDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(adjustedTerminationDateNode);
                 IDManager.SetID(adjustedTerminationDateIDRef_, ob);
             }
             else if (adjustedTerminationDateNode.Attributes["href"] != null)
             {
                 adjustedTerminationDateIDRef_ = adjustedTerminationDateNode.Attributes["href"].Value;
             }
             else
             {
                 adjustedTerminationDate_ = new XsdTypeDate(adjustedTerminationDateNode);
             }
         }
         else
         {
             adjustedTerminationDate_ = new XsdTypeDate(adjustedTerminationDateNode);
         }
     }
     
 
     XmlNode paymentDateNode = xmlNode.SelectSingleNode("paymentDate");
     
     if (paymentDateNode != null)
     {
         if (paymentDateNode.Attributes["href"] != null || paymentDateNode.Attributes["id"] != null) 
         {
             if (paymentDateNode.Attributes["id"] != null) 
             {
                 paymentDateIDRef_ = paymentDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(paymentDateNode);
                 IDManager.SetID(paymentDateIDRef_, ob);
             }
             else if (paymentDateNode.Attributes["href"] != null)
             {
                 paymentDateIDRef_ = paymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 paymentDate_ = new AdjustableDate(paymentDateNode);
             }
         }
         else
         {
             paymentDate_ = new AdjustableDate(paymentDateNode);
         }
     }
     
 
     XmlNode fixingDateOffsetNode = xmlNode.SelectSingleNode("fixingDateOffset");
     
     if (fixingDateOffsetNode != null)
     {
         if (fixingDateOffsetNode.Attributes["href"] != null || fixingDateOffsetNode.Attributes["id"] != null) 
         {
             if (fixingDateOffsetNode.Attributes["id"] != null) 
             {
                 fixingDateOffsetIDRef_ = fixingDateOffsetNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(fixingDateOffsetNode);
                 IDManager.SetID(fixingDateOffsetIDRef_, ob);
             }
             else if (fixingDateOffsetNode.Attributes["href"] != null)
             {
                 fixingDateOffsetIDRef_ = fixingDateOffsetNode.Attributes["href"].Value;
             }
             else
             {
                 fixingDateOffset_ = new RelativeDateOffset(fixingDateOffsetNode);
             }
         }
         else
         {
             fixingDateOffset_ = new RelativeDateOffset(fixingDateOffsetNode);
         }
     }
     
 
     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 calculationPeriodNumberOfDaysNode = xmlNode.SelectSingleNode("calculationPeriodNumberOfDays");
     
     if (calculationPeriodNumberOfDaysNode != null)
     {
         if (calculationPeriodNumberOfDaysNode.Attributes["href"] != null || calculationPeriodNumberOfDaysNode.Attributes["id"] != null) 
         {
             if (calculationPeriodNumberOfDaysNode.Attributes["id"] != null) 
             {
                 calculationPeriodNumberOfDaysIDRef_ = calculationPeriodNumberOfDaysNode.Attributes["id"].Value;
                 XsdTypePositiveInteger ob = new XsdTypePositiveInteger(calculationPeriodNumberOfDaysNode);
                 IDManager.SetID(calculationPeriodNumberOfDaysIDRef_, ob);
             }
             else if (calculationPeriodNumberOfDaysNode.Attributes["href"] != null)
             {
                 calculationPeriodNumberOfDaysIDRef_ = calculationPeriodNumberOfDaysNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodNumberOfDays_ = new XsdTypePositiveInteger(calculationPeriodNumberOfDaysNode);
             }
         }
         else
         {
             calculationPeriodNumberOfDays_ = new XsdTypePositiveInteger(calculationPeriodNumberOfDaysNode);
         }
     }
     
 
     XmlNode notionalNode = xmlNode.SelectSingleNode("notional");
     
     if (notionalNode != null)
     {
         if (notionalNode.Attributes["href"] != null || notionalNode.Attributes["id"] != null) 
         {
             if (notionalNode.Attributes["id"] != null) 
             {
                 notionalIDRef_ = notionalNode.Attributes["id"].Value;
                 Money ob = new Money(notionalNode);
                 IDManager.SetID(notionalIDRef_, ob);
             }
             else if (notionalNode.Attributes["href"] != null)
             {
                 notionalIDRef_ = notionalNode.Attributes["href"].Value;
             }
             else
             {
                 notional_ = new Money(notionalNode);
             }
         }
         else
         {
             notional_ = new Money(notionalNode);
         }
     }
     
 
     XmlNode fixedRateNode = xmlNode.SelectSingleNode("fixedRate");
     
     if (fixedRateNode != null)
     {
         if (fixedRateNode.Attributes["href"] != null || fixedRateNode.Attributes["id"] != null) 
         {
             if (fixedRateNode.Attributes["id"] != null) 
             {
                 fixedRateIDRef_ = fixedRateNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(fixedRateNode);
                 IDManager.SetID(fixedRateIDRef_, ob);
             }
             else if (fixedRateNode.Attributes["href"] != null)
             {
                 fixedRateIDRef_ = fixedRateNode.Attributes["href"].Value;
             }
             else
             {
                 fixedRate_ = new XsdTypeDecimal(fixedRateNode);
             }
         }
         else
         {
             fixedRate_ = new XsdTypeDecimal(fixedRateNode);
         }
     }
     
 
     XmlNode floatingRateIndexNode = xmlNode.SelectSingleNode("floatingRateIndex");
     
     if (floatingRateIndexNode != null)
     {
         if (floatingRateIndexNode.Attributes["href"] != null || floatingRateIndexNode.Attributes["id"] != null) 
         {
             if (floatingRateIndexNode.Attributes["id"] != null) 
             {
                 floatingRateIndexIDRef_ = floatingRateIndexNode.Attributes["id"].Value;
                 FloatingRateIndex ob = new FloatingRateIndex(floatingRateIndexNode);
                 IDManager.SetID(floatingRateIndexIDRef_, ob);
             }
             else if (floatingRateIndexNode.Attributes["href"] != null)
             {
                 floatingRateIndexIDRef_ = floatingRateIndexNode.Attributes["href"].Value;
             }
             else
             {
                 floatingRateIndex_ = new FloatingRateIndex(floatingRateIndexNode);
             }
         }
         else
         {
             floatingRateIndex_ = new FloatingRateIndex(floatingRateIndexNode);
         }
     }
     
 
     XmlNodeList indexTenorNodeList = xmlNode.SelectNodes("indexTenor");
     
     if (indexTenorNodeList != null)
     {
         this.indexTenor_ = new List<Period>();
         foreach (XmlNode item in indexTenorNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     indexTenorIDRef_ = item.Attributes["id"].Value;
                     indexTenor_.Add(new Period(item));
                     IDManager.SetID(indexTenorIDRef_, indexTenor_[indexTenor_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     indexTenorIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 indexTenor_.Add(new Period(item));
                 }
             }
             else
             {
                 indexTenor_.Add(new Period(item));
             }
         }
     }
     
 
     XmlNode fraDiscountingNode = xmlNode.SelectSingleNode("fraDiscounting");
     
     if (fraDiscountingNode != null)
     {
         if (fraDiscountingNode.Attributes["href"] != null || fraDiscountingNode.Attributes["id"] != null) 
         {
             if (fraDiscountingNode.Attributes["id"] != null) 
             {
                 fraDiscountingIDRef_ = fraDiscountingNode.Attributes["id"].Value;
                 FraDiscountingEnum ob = new FraDiscountingEnum(fraDiscountingNode);
                 IDManager.SetID(fraDiscountingIDRef_, ob);
             }
             else if (fraDiscountingNode.Attributes["href"] != null)
             {
                 fraDiscountingIDRef_ = fraDiscountingNode.Attributes["href"].Value;
             }
             else
             {
                 fraDiscounting_ = new FraDiscountingEnum(fraDiscountingNode);
             }
         }
         else
         {
             fraDiscounting_ = new FraDiscountingEnum(fraDiscountingNode);
         }
     }
     
 
 }
Ejemplo n.º 13
0
        public Fra(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode buyerPartyReferenceNode = xmlNode.SelectSingleNode("buyerPartyReference");

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


            XmlNode buyerAccountReferenceNode = xmlNode.SelectSingleNode("buyerAccountReference");

            if (buyerAccountReferenceNode != null)
            {
                if (buyerAccountReferenceNode.Attributes["href"] != null || buyerAccountReferenceNode.Attributes["id"] != null)
                {
                    if (buyerAccountReferenceNode.Attributes["id"] != null)
                    {
                        buyerAccountReferenceIDRef_ = buyerAccountReferenceNode.Attributes["id"].Value;
                        AccountReference ob = new AccountReference(buyerAccountReferenceNode);
                        IDManager.SetID(buyerAccountReferenceIDRef_, ob);
                    }
                    else if (buyerAccountReferenceNode.Attributes["href"] != null)
                    {
                        buyerAccountReferenceIDRef_ = buyerAccountReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        buyerAccountReference_ = new AccountReference(buyerAccountReferenceNode);
                    }
                }
                else
                {
                    buyerAccountReference_ = new AccountReference(buyerAccountReferenceNode);
                }
            }


            XmlNode sellerPartyReferenceNode = xmlNode.SelectSingleNode("sellerPartyReference");

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


            XmlNode sellerAccountReferenceNode = xmlNode.SelectSingleNode("sellerAccountReference");

            if (sellerAccountReferenceNode != null)
            {
                if (sellerAccountReferenceNode.Attributes["href"] != null || sellerAccountReferenceNode.Attributes["id"] != null)
                {
                    if (sellerAccountReferenceNode.Attributes["id"] != null)
                    {
                        sellerAccountReferenceIDRef_ = sellerAccountReferenceNode.Attributes["id"].Value;
                        AccountReference ob = new AccountReference(sellerAccountReferenceNode);
                        IDManager.SetID(sellerAccountReferenceIDRef_, ob);
                    }
                    else if (sellerAccountReferenceNode.Attributes["href"] != null)
                    {
                        sellerAccountReferenceIDRef_ = sellerAccountReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        sellerAccountReference_ = new AccountReference(sellerAccountReferenceNode);
                    }
                }
                else
                {
                    sellerAccountReference_ = new AccountReference(sellerAccountReferenceNode);
                }
            }


            XmlNode adjustedEffectiveDateNode = xmlNode.SelectSingleNode("adjustedEffectiveDate");

            if (adjustedEffectiveDateNode != null)
            {
                if (adjustedEffectiveDateNode.Attributes["href"] != null || adjustedEffectiveDateNode.Attributes["id"] != null)
                {
                    if (adjustedEffectiveDateNode.Attributes["id"] != null)
                    {
                        adjustedEffectiveDateIDRef_ = adjustedEffectiveDateNode.Attributes["id"].Value;
                        RequiredIdentifierDate ob = new RequiredIdentifierDate(adjustedEffectiveDateNode);
                        IDManager.SetID(adjustedEffectiveDateIDRef_, ob);
                    }
                    else if (adjustedEffectiveDateNode.Attributes["href"] != null)
                    {
                        adjustedEffectiveDateIDRef_ = adjustedEffectiveDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        adjustedEffectiveDate_ = new RequiredIdentifierDate(adjustedEffectiveDateNode);
                    }
                }
                else
                {
                    adjustedEffectiveDate_ = new RequiredIdentifierDate(adjustedEffectiveDateNode);
                }
            }


            XmlNode adjustedTerminationDateNode = xmlNode.SelectSingleNode("adjustedTerminationDate");

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


            XmlNode paymentDateNode = xmlNode.SelectSingleNode("paymentDate");

            if (paymentDateNode != null)
            {
                if (paymentDateNode.Attributes["href"] != null || paymentDateNode.Attributes["id"] != null)
                {
                    if (paymentDateNode.Attributes["id"] != null)
                    {
                        paymentDateIDRef_ = paymentDateNode.Attributes["id"].Value;
                        AdjustableDate ob = new AdjustableDate(paymentDateNode);
                        IDManager.SetID(paymentDateIDRef_, ob);
                    }
                    else if (paymentDateNode.Attributes["href"] != null)
                    {
                        paymentDateIDRef_ = paymentDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        paymentDate_ = new AdjustableDate(paymentDateNode);
                    }
                }
                else
                {
                    paymentDate_ = new AdjustableDate(paymentDateNode);
                }
            }


            XmlNode fixingDateOffsetNode = xmlNode.SelectSingleNode("fixingDateOffset");

            if (fixingDateOffsetNode != null)
            {
                if (fixingDateOffsetNode.Attributes["href"] != null || fixingDateOffsetNode.Attributes["id"] != null)
                {
                    if (fixingDateOffsetNode.Attributes["id"] != null)
                    {
                        fixingDateOffsetIDRef_ = fixingDateOffsetNode.Attributes["id"].Value;
                        RelativeDateOffset ob = new RelativeDateOffset(fixingDateOffsetNode);
                        IDManager.SetID(fixingDateOffsetIDRef_, ob);
                    }
                    else if (fixingDateOffsetNode.Attributes["href"] != null)
                    {
                        fixingDateOffsetIDRef_ = fixingDateOffsetNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fixingDateOffset_ = new RelativeDateOffset(fixingDateOffsetNode);
                    }
                }
                else
                {
                    fixingDateOffset_ = new RelativeDateOffset(fixingDateOffsetNode);
                }
            }


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

            if (calculationPeriodNumberOfDaysNode != null)
            {
                if (calculationPeriodNumberOfDaysNode.Attributes["href"] != null || calculationPeriodNumberOfDaysNode.Attributes["id"] != null)
                {
                    if (calculationPeriodNumberOfDaysNode.Attributes["id"] != null)
                    {
                        calculationPeriodNumberOfDaysIDRef_ = calculationPeriodNumberOfDaysNode.Attributes["id"].Value;
                        XsdTypePositiveInteger ob = new XsdTypePositiveInteger(calculationPeriodNumberOfDaysNode);
                        IDManager.SetID(calculationPeriodNumberOfDaysIDRef_, ob);
                    }
                    else if (calculationPeriodNumberOfDaysNode.Attributes["href"] != null)
                    {
                        calculationPeriodNumberOfDaysIDRef_ = calculationPeriodNumberOfDaysNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodNumberOfDays_ = new XsdTypePositiveInteger(calculationPeriodNumberOfDaysNode);
                    }
                }
                else
                {
                    calculationPeriodNumberOfDays_ = new XsdTypePositiveInteger(calculationPeriodNumberOfDaysNode);
                }
            }


            XmlNode notionalNode = xmlNode.SelectSingleNode("notional");

            if (notionalNode != null)
            {
                if (notionalNode.Attributes["href"] != null || notionalNode.Attributes["id"] != null)
                {
                    if (notionalNode.Attributes["id"] != null)
                    {
                        notionalIDRef_ = notionalNode.Attributes["id"].Value;
                        Money ob = new Money(notionalNode);
                        IDManager.SetID(notionalIDRef_, ob);
                    }
                    else if (notionalNode.Attributes["href"] != null)
                    {
                        notionalIDRef_ = notionalNode.Attributes["href"].Value;
                    }
                    else
                    {
                        notional_ = new Money(notionalNode);
                    }
                }
                else
                {
                    notional_ = new Money(notionalNode);
                }
            }


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

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


            XmlNode floatingRateIndexNode = xmlNode.SelectSingleNode("floatingRateIndex");

            if (floatingRateIndexNode != null)
            {
                if (floatingRateIndexNode.Attributes["href"] != null || floatingRateIndexNode.Attributes["id"] != null)
                {
                    if (floatingRateIndexNode.Attributes["id"] != null)
                    {
                        floatingRateIndexIDRef_ = floatingRateIndexNode.Attributes["id"].Value;
                        FloatingRateIndex ob = new FloatingRateIndex(floatingRateIndexNode);
                        IDManager.SetID(floatingRateIndexIDRef_, ob);
                    }
                    else if (floatingRateIndexNode.Attributes["href"] != null)
                    {
                        floatingRateIndexIDRef_ = floatingRateIndexNode.Attributes["href"].Value;
                    }
                    else
                    {
                        floatingRateIndex_ = new FloatingRateIndex(floatingRateIndexNode);
                    }
                }
                else
                {
                    floatingRateIndex_ = new FloatingRateIndex(floatingRateIndexNode);
                }
            }


            XmlNodeList indexTenorNodeList = xmlNode.SelectNodes("indexTenor");

            if (indexTenorNodeList != null)
            {
                this.indexTenor_ = new List <Period>();
                foreach (XmlNode item in indexTenorNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            indexTenorIDRef_ = item.Attributes["id"].Value;
                            indexTenor_.Add(new Period(item));
                            IDManager.SetID(indexTenorIDRef_, indexTenor_[indexTenor_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            indexTenorIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            indexTenor_.Add(new Period(item));
                        }
                    }
                    else
                    {
                        indexTenor_.Add(new Period(item));
                    }
                }
            }


            XmlNode fraDiscountingNode = xmlNode.SelectSingleNode("fraDiscounting");

            if (fraDiscountingNode != null)
            {
                if (fraDiscountingNode.Attributes["href"] != null || fraDiscountingNode.Attributes["id"] != null)
                {
                    if (fraDiscountingNode.Attributes["id"] != null)
                    {
                        fraDiscountingIDRef_ = fraDiscountingNode.Attributes["id"].Value;
                        FraDiscountingEnum ob = new FraDiscountingEnum(fraDiscountingNode);
                        IDManager.SetID(fraDiscountingIDRef_, ob);
                    }
                    else if (fraDiscountingNode.Attributes["href"] != null)
                    {
                        fraDiscountingIDRef_ = fraDiscountingNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fraDiscounting_ = new FraDiscountingEnum(fraDiscountingNode);
                    }
                }
                else
                {
                    fraDiscounting_ = new FraDiscountingEnum(fraDiscountingNode);
                }
            }
        }
 public InterestShortFall(XmlNode xmlNode)
 {
     XmlNode interestShortfallCapNode = xmlNode.SelectSingleNode("interestShortfallCap");
     
     if (interestShortfallCapNode != null)
     {
         if (interestShortfallCapNode.Attributes["href"] != null || interestShortfallCapNode.Attributes["id"] != null) 
         {
             if (interestShortfallCapNode.Attributes["id"] != null) 
             {
                 interestShortfallCapIDRef_ = interestShortfallCapNode.Attributes["id"].Value;
                 InterestShortfallCapEnum ob = new InterestShortfallCapEnum(interestShortfallCapNode);
                 IDManager.SetID(interestShortfallCapIDRef_, ob);
             }
             else if (interestShortfallCapNode.Attributes["href"] != null)
             {
                 interestShortfallCapIDRef_ = interestShortfallCapNode.Attributes["href"].Value;
             }
             else
             {
                 interestShortfallCap_ = new InterestShortfallCapEnum(interestShortfallCapNode);
             }
         }
         else
         {
             interestShortfallCap_ = new InterestShortfallCapEnum(interestShortfallCapNode);
         }
     }
     
 
     XmlNode compoundingNode = xmlNode.SelectSingleNode("compounding");
     
     if (compoundingNode != null)
     {
         if (compoundingNode.Attributes["href"] != null || compoundingNode.Attributes["id"] != null) 
         {
             if (compoundingNode.Attributes["id"] != null) 
             {
                 compoundingIDRef_ = compoundingNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(compoundingNode);
                 IDManager.SetID(compoundingIDRef_, ob);
             }
             else if (compoundingNode.Attributes["href"] != null)
             {
                 compoundingIDRef_ = compoundingNode.Attributes["href"].Value;
             }
             else
             {
                 compounding_ = new XsdTypeBoolean(compoundingNode);
             }
         }
         else
         {
             compounding_ = new XsdTypeBoolean(compoundingNode);
         }
     }
     
 
     XmlNode rateSourceNode = xmlNode.SelectSingleNode("rateSource");
     
     if (rateSourceNode != null)
     {
         if (rateSourceNode.Attributes["href"] != null || rateSourceNode.Attributes["id"] != null) 
         {
             if (rateSourceNode.Attributes["id"] != null) 
             {
                 rateSourceIDRef_ = rateSourceNode.Attributes["id"].Value;
                 FloatingRateIndex ob = new FloatingRateIndex(rateSourceNode);
                 IDManager.SetID(rateSourceIDRef_, ob);
             }
             else if (rateSourceNode.Attributes["href"] != null)
             {
                 rateSourceIDRef_ = rateSourceNode.Attributes["href"].Value;
             }
             else
             {
                 rateSource_ = new FloatingRateIndex(rateSourceNode);
             }
         }
         else
         {
             rateSource_ = new FloatingRateIndex(rateSourceNode);
         }
     }
     
 
 }
 public SwapCurveValuation(XmlNode xmlNode)
 {
     XmlNode floatingRateIndexNode = xmlNode.SelectSingleNode("floatingRateIndex");
     
     if (floatingRateIndexNode != null)
     {
         if (floatingRateIndexNode.Attributes["href"] != null || floatingRateIndexNode.Attributes["id"] != null) 
         {
             if (floatingRateIndexNode.Attributes["id"] != null) 
             {
                 floatingRateIndexIDRef_ = floatingRateIndexNode.Attributes["id"].Value;
                 FloatingRateIndex ob = new FloatingRateIndex(floatingRateIndexNode);
                 IDManager.SetID(floatingRateIndexIDRef_, ob);
             }
             else if (floatingRateIndexNode.Attributes["href"] != null)
             {
                 floatingRateIndexIDRef_ = floatingRateIndexNode.Attributes["href"].Value;
             }
             else
             {
                 floatingRateIndex_ = new FloatingRateIndex(floatingRateIndexNode);
             }
         }
         else
         {
             floatingRateIndex_ = new FloatingRateIndex(floatingRateIndexNode);
         }
     }
     
 
     XmlNode indexTenorNode = xmlNode.SelectSingleNode("indexTenor");
     
     if (indexTenorNode != null)
     {
         if (indexTenorNode.Attributes["href"] != null || indexTenorNode.Attributes["id"] != null) 
         {
             if (indexTenorNode.Attributes["id"] != null) 
             {
                 indexTenorIDRef_ = indexTenorNode.Attributes["id"].Value;
                 Period ob = new Period(indexTenorNode);
                 IDManager.SetID(indexTenorIDRef_, ob);
             }
             else if (indexTenorNode.Attributes["href"] != null)
             {
                 indexTenorIDRef_ = indexTenorNode.Attributes["href"].Value;
             }
             else
             {
                 indexTenor_ = new Period(indexTenorNode);
             }
         }
         else
         {
             indexTenor_ = new Period(indexTenorNode);
         }
     }
     
 
     XmlNode spreadNode = xmlNode.SelectSingleNode("spread");
     
     if (spreadNode != null)
     {
         if (spreadNode.Attributes["href"] != null || spreadNode.Attributes["id"] != null) 
         {
             if (spreadNode.Attributes["id"] != null) 
             {
                 spreadIDRef_ = spreadNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(spreadNode);
                 IDManager.SetID(spreadIDRef_, ob);
             }
             else if (spreadNode.Attributes["href"] != null)
             {
                 spreadIDRef_ = spreadNode.Attributes["href"].Value;
             }
             else
             {
                 spread_ = new XsdTypeDecimal(spreadNode);
             }
         }
         else
         {
             spread_ = new XsdTypeDecimal(spreadNode);
         }
     }
     
 
     XmlNode sideNode = xmlNode.SelectSingleNode("side");
     
     if (sideNode != null)
     {
         if (sideNode.Attributes["href"] != null || sideNode.Attributes["id"] != null) 
         {
             if (sideNode.Attributes["id"] != null) 
             {
                 sideIDRef_ = sideNode.Attributes["id"].Value;
                 QuotationSideEnum ob = new QuotationSideEnum(sideNode);
                 IDManager.SetID(sideIDRef_, ob);
             }
             else if (sideNode.Attributes["href"] != null)
             {
                 sideIDRef_ = sideNode.Attributes["href"].Value;
             }
             else
             {
                 side_ = new QuotationSideEnum(sideNode);
             }
         }
         else
         {
             side_ = new QuotationSideEnum(sideNode);
         }
     }
     
 
 }
 public RateIndex(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode floatingRateIndexNode = xmlNode.SelectSingleNode("floatingRateIndex");
     
     if (floatingRateIndexNode != null)
     {
         if (floatingRateIndexNode.Attributes["href"] != null || floatingRateIndexNode.Attributes["id"] != null) 
         {
             if (floatingRateIndexNode.Attributes["id"] != null) 
             {
                 floatingRateIndexIDRef_ = floatingRateIndexNode.Attributes["id"].Value;
                 FloatingRateIndex ob = new FloatingRateIndex(floatingRateIndexNode);
                 IDManager.SetID(floatingRateIndexIDRef_, ob);
             }
             else if (floatingRateIndexNode.Attributes["href"] != null)
             {
                 floatingRateIndexIDRef_ = floatingRateIndexNode.Attributes["href"].Value;
             }
             else
             {
                 floatingRateIndex_ = new FloatingRateIndex(floatingRateIndexNode);
             }
         }
         else
         {
             floatingRateIndex_ = new FloatingRateIndex(floatingRateIndexNode);
         }
     }
     
 
     XmlNode termNode = xmlNode.SelectSingleNode("term");
     
     if (termNode != null)
     {
         if (termNode.Attributes["href"] != null || termNode.Attributes["id"] != null) 
         {
             if (termNode.Attributes["id"] != null) 
             {
                 termIDRef_ = termNode.Attributes["id"].Value;
                 Period ob = new Period(termNode);
                 IDManager.SetID(termIDRef_, ob);
             }
             else if (termNode.Attributes["href"] != null)
             {
                 termIDRef_ = termNode.Attributes["href"].Value;
             }
             else
             {
                 term_ = new Period(termNode);
             }
         }
         else
         {
             term_ = new Period(termNode);
         }
     }
     
 
     XmlNode paymentFrequencyNode = xmlNode.SelectSingleNode("paymentFrequency");
     
     if (paymentFrequencyNode != null)
     {
         if (paymentFrequencyNode.Attributes["href"] != null || paymentFrequencyNode.Attributes["id"] != null) 
         {
             if (paymentFrequencyNode.Attributes["id"] != null) 
             {
                 paymentFrequencyIDRef_ = paymentFrequencyNode.Attributes["id"].Value;
                 Period ob = new Period(paymentFrequencyNode);
                 IDManager.SetID(paymentFrequencyIDRef_, ob);
             }
             else if (paymentFrequencyNode.Attributes["href"] != null)
             {
                 paymentFrequencyIDRef_ = paymentFrequencyNode.Attributes["href"].Value;
             }
             else
             {
                 paymentFrequency_ = new Period(paymentFrequencyNode);
             }
         }
         else
         {
             paymentFrequency_ = new Period(paymentFrequencyNode);
         }
     }
     
 
     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.º 17
0
        public Fra(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList buyerPartyReferenceNodeList = xmlNode.SelectNodes("buyerPartyReference");

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

            foreach (XmlNode item in buyerPartyReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        buyerPartyReferenceIDRef = item.Attributes["id"].Name;
                        PartyReference ob = PartyReference();
                        IDManager.SetID(buyerPartyReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        buyerPartyReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        buyerPartyReference = new PartyReference(item);
                    }
                }
            }


            XmlNodeList buyerAccountReferenceNodeList = xmlNode.SelectNodes("buyerAccountReference");

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

            foreach (XmlNode item in buyerAccountReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        buyerAccountReferenceIDRef = item.Attributes["id"].Name;
                        AccountReference ob = AccountReference();
                        IDManager.SetID(buyerAccountReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        buyerAccountReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        buyerAccountReference = new AccountReference(item);
                    }
                }
            }


            XmlNodeList sellerPartyReferenceNodeList = xmlNode.SelectNodes("sellerPartyReference");

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

            foreach (XmlNode item in sellerPartyReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        sellerPartyReferenceIDRef = item.Attributes["id"].Name;
                        PartyReference ob = PartyReference();
                        IDManager.SetID(sellerPartyReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        sellerPartyReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        sellerPartyReference = new PartyReference(item);
                    }
                }
            }


            XmlNodeList sellerAccountReferenceNodeList = xmlNode.SelectNodes("sellerAccountReference");

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

            foreach (XmlNode item in sellerAccountReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        sellerAccountReferenceIDRef = item.Attributes["id"].Name;
                        AccountReference ob = AccountReference();
                        IDManager.SetID(sellerAccountReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        sellerAccountReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        sellerAccountReference = new AccountReference(item);
                    }
                }
            }


            XmlNodeList adjustedEffectiveDateNodeList = xmlNode.SelectNodes("adjustedEffectiveDate");

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

            foreach (XmlNode item in adjustedEffectiveDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        adjustedEffectiveDateIDRef = item.Attributes["id"].Name;
                        RequiredIdentifierDate ob = RequiredIdentifierDate();
                        IDManager.SetID(adjustedEffectiveDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        adjustedEffectiveDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        adjustedEffectiveDate = new RequiredIdentifierDate(item);
                    }
                }
            }


            XmlNodeList adjustedTerminationDateNodeList = xmlNode.SelectNodes("adjustedTerminationDate");

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

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


            XmlNodeList paymentDateNodeList = xmlNode.SelectNodes("paymentDate");

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

            foreach (XmlNode item in paymentDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        paymentDateIDRef = item.Attributes["id"].Name;
                        AdjustableDate ob = AdjustableDate();
                        IDManager.SetID(paymentDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        paymentDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        paymentDate = new AdjustableDate(item);
                    }
                }
            }


            XmlNodeList fixingDateOffsetNodeList = xmlNode.SelectNodes("fixingDateOffset");

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

            foreach (XmlNode item in fixingDateOffsetNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fixingDateOffsetIDRef = item.Attributes["id"].Name;
                        RelativeDateOffset ob = RelativeDateOffset();
                        IDManager.SetID(fixingDateOffsetIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fixingDateOffsetIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fixingDateOffset = new RelativeDateOffset(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 calculationPeriodNumberOfDaysNodeList = xmlNode.SelectNodes("calculationPeriodNumberOfDays");

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

            foreach (XmlNode item in calculationPeriodNumberOfDaysNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodNumberOfDaysIDRef = item.Attributes["id"].Name;
                        XsdTypePositiveInteger ob = XsdTypePositiveInteger();
                        IDManager.SetID(calculationPeriodNumberOfDaysIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodNumberOfDaysIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodNumberOfDays = new XsdTypePositiveInteger(item);
                    }
                }
            }


            XmlNodeList notionalNodeList = xmlNode.SelectNodes("notional");

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

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


            XmlNodeList fixedRateNodeList = xmlNode.SelectNodes("fixedRate");

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

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


            XmlNodeList floatingRateIndexNodeList = xmlNode.SelectNodes("floatingRateIndex");

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

            foreach (XmlNode item in floatingRateIndexNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        floatingRateIndexIDRef = item.Attributes["id"].Name;
                        FloatingRateIndex ob = FloatingRateIndex();
                        IDManager.SetID(floatingRateIndexIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        floatingRateIndexIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        floatingRateIndex = new FloatingRateIndex(item);
                    }
                }
            }


            XmlNodeList indexTenorNodeList = xmlNode.SelectNodes("indexTenor");

            foreach (XmlNode item in indexTenorNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        indexTenorIDRef = item.Attributes["id"].Name;
                        List <Period> ob = new List <Period>();
                        ob.Add(new Period(item));
                        IDManager.SetID(indexTenorIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        indexTenorIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        indexTenor.Add(new Period(item));
                    }
                }
            }


            XmlNodeList fraDiscountingNodeList = xmlNode.SelectNodes("fraDiscounting");

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

            foreach (XmlNode item in fraDiscountingNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fraDiscountingIDRef = item.Attributes["id"].Name;
                        FraDiscountingEnum ob = FraDiscountingEnum();
                        IDManager.SetID(fraDiscountingIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fraDiscountingIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fraDiscounting = new FraDiscountingEnum(item);
                    }
                }
            }
        }
        public InterestShortFall(XmlNode xmlNode)
        {
            XmlNode interestShortfallCapNode = xmlNode.SelectSingleNode("interestShortfallCap");

            if (interestShortfallCapNode != null)
            {
                if (interestShortfallCapNode.Attributes["href"] != null || interestShortfallCapNode.Attributes["id"] != null)
                {
                    if (interestShortfallCapNode.Attributes["id"] != null)
                    {
                        interestShortfallCapIDRef_ = interestShortfallCapNode.Attributes["id"].Value;
                        InterestShortfallCapEnum ob = new InterestShortfallCapEnum(interestShortfallCapNode);
                        IDManager.SetID(interestShortfallCapIDRef_, ob);
                    }
                    else if (interestShortfallCapNode.Attributes["href"] != null)
                    {
                        interestShortfallCapIDRef_ = interestShortfallCapNode.Attributes["href"].Value;
                    }
                    else
                    {
                        interestShortfallCap_ = new InterestShortfallCapEnum(interestShortfallCapNode);
                    }
                }
                else
                {
                    interestShortfallCap_ = new InterestShortfallCapEnum(interestShortfallCapNode);
                }
            }


            XmlNode compoundingNode = xmlNode.SelectSingleNode("compounding");

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


            XmlNode rateSourceNode = xmlNode.SelectSingleNode("rateSource");

            if (rateSourceNode != null)
            {
                if (rateSourceNode.Attributes["href"] != null || rateSourceNode.Attributes["id"] != null)
                {
                    if (rateSourceNode.Attributes["id"] != null)
                    {
                        rateSourceIDRef_ = rateSourceNode.Attributes["id"].Value;
                        FloatingRateIndex ob = new FloatingRateIndex(rateSourceNode);
                        IDManager.SetID(rateSourceIDRef_, ob);
                    }
                    else if (rateSourceNode.Attributes["href"] != null)
                    {
                        rateSourceIDRef_ = rateSourceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        rateSource_ = new FloatingRateIndex(rateSourceNode);
                    }
                }
                else
                {
                    rateSource_ = new FloatingRateIndex(rateSourceNode);
                }
            }
        }
 public RateIndex(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList floatingRateIndexNodeList = xmlNode.SelectNodes("floatingRateIndex");
     if (floatingRateIndexNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in floatingRateIndexNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 floatingRateIndexIDRef = item.Attributes["id"].Name;
                 FloatingRateIndex ob = FloatingRateIndex();
                 IDManager.SetID(floatingRateIndexIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 floatingRateIndexIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 floatingRateIndex = new FloatingRateIndex(item);
             }
         }
     }
     
 
     XmlNodeList termNodeList = xmlNode.SelectNodes("term");
     if (termNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in termNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 termIDRef = item.Attributes["id"].Name;
                 Period ob = Period();
                 IDManager.SetID(termIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 termIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 term = new Period(item);
             }
         }
     }
     
 
     XmlNodeList paymentFrequencyNodeList = xmlNode.SelectNodes("paymentFrequency");
     if (paymentFrequencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentFrequencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentFrequencyIDRef = item.Attributes["id"].Name;
                 Period ob = Period();
                 IDManager.SetID(paymentFrequencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentFrequencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentFrequency = new Period(item);
             }
         }
     }
     
 
     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.º 20
0
 public Fra(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList buyerPartyReferenceNodeList = xmlNode.SelectNodes("buyerPartyReference");
     if (buyerPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in buyerPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 buyerPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(buyerPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 buyerPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 buyerPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList buyerAccountReferenceNodeList = xmlNode.SelectNodes("buyerAccountReference");
     if (buyerAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in buyerAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 buyerAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(buyerAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 buyerAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 buyerAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList sellerPartyReferenceNodeList = xmlNode.SelectNodes("sellerPartyReference");
     if (sellerPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in sellerPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 sellerPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(sellerPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 sellerPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 sellerPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList sellerAccountReferenceNodeList = xmlNode.SelectNodes("sellerAccountReference");
     if (sellerAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in sellerAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 sellerAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(sellerAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 sellerAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 sellerAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList adjustedEffectiveDateNodeList = xmlNode.SelectNodes("adjustedEffectiveDate");
     if (adjustedEffectiveDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in adjustedEffectiveDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 adjustedEffectiveDateIDRef = item.Attributes["id"].Name;
                 RequiredIdentifierDate ob = RequiredIdentifierDate();
                 IDManager.SetID(adjustedEffectiveDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 adjustedEffectiveDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 adjustedEffectiveDate = new RequiredIdentifierDate(item);
             }
         }
     }
     
 
     XmlNodeList adjustedTerminationDateNodeList = xmlNode.SelectNodes("adjustedTerminationDate");
     if (adjustedTerminationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in adjustedTerminationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 adjustedTerminationDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(adjustedTerminationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 adjustedTerminationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 adjustedTerminationDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList paymentDateNodeList = xmlNode.SelectNodes("paymentDate");
     if (paymentDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate ob = AdjustableDate();
                 IDManager.SetID(paymentDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentDate = new AdjustableDate(item);
             }
         }
     }
     
 
     XmlNodeList fixingDateOffsetNodeList = xmlNode.SelectNodes("fixingDateOffset");
     if (fixingDateOffsetNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fixingDateOffsetNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fixingDateOffsetIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(fixingDateOffsetIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixingDateOffsetIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixingDateOffset = new RelativeDateOffset(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 calculationPeriodNumberOfDaysNodeList = xmlNode.SelectNodes("calculationPeriodNumberOfDays");
     if (calculationPeriodNumberOfDaysNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodNumberOfDaysNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodNumberOfDaysIDRef = item.Attributes["id"].Name;
                 XsdTypePositiveInteger ob = XsdTypePositiveInteger();
                 IDManager.SetID(calculationPeriodNumberOfDaysIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodNumberOfDaysIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodNumberOfDays = new XsdTypePositiveInteger(item);
             }
         }
     }
     
 
     XmlNodeList notionalNodeList = xmlNode.SelectNodes("notional");
     if (notionalNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in notionalNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 notionalIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(notionalIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 notionalIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 notional = new Money(item);
             }
         }
     }
     
 
     XmlNodeList fixedRateNodeList = xmlNode.SelectNodes("fixedRate");
     if (fixedRateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fixedRateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fixedRateIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(fixedRateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixedRateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixedRate = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList floatingRateIndexNodeList = xmlNode.SelectNodes("floatingRateIndex");
     if (floatingRateIndexNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in floatingRateIndexNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 floatingRateIndexIDRef = item.Attributes["id"].Name;
                 FloatingRateIndex ob = FloatingRateIndex();
                 IDManager.SetID(floatingRateIndexIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 floatingRateIndexIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 floatingRateIndex = new FloatingRateIndex(item);
             }
         }
     }
     
 
     XmlNodeList indexTenorNodeList = xmlNode.SelectNodes("indexTenor");
     
     foreach (XmlNode item in indexTenorNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 indexTenorIDRef = item.Attributes["id"].Name;
                 List<Period> ob = new List<Period>();
                 ob.Add(new Period(item));
                 IDManager.SetID(indexTenorIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 indexTenorIDRef = item.Attributes["href"].Name;
             }
             else
             {
             indexTenor.Add(new Period(item));
             }
         }
     }
     
 
     XmlNodeList fraDiscountingNodeList = xmlNode.SelectNodes("fraDiscounting");
     if (fraDiscountingNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fraDiscountingNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fraDiscountingIDRef = item.Attributes["id"].Name;
                 FraDiscountingEnum ob = FraDiscountingEnum();
                 IDManager.SetID(fraDiscountingIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fraDiscountingIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fraDiscounting = new FraDiscountingEnum(item);
             }
         }
     }
     
 
 }
 public SwapCurveValuation(XmlNode xmlNode)
 {
     XmlNodeList floatingRateIndexNodeList = xmlNode.SelectNodes("floatingRateIndex");
     if (floatingRateIndexNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in floatingRateIndexNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 floatingRateIndexIDRef = item.Attributes["id"].Name;
                 FloatingRateIndex ob = FloatingRateIndex();
                 IDManager.SetID(floatingRateIndexIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 floatingRateIndexIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 floatingRateIndex = new FloatingRateIndex(item);
             }
         }
     }
     
 
     XmlNodeList indexTenorNodeList = xmlNode.SelectNodes("indexTenor");
     if (indexTenorNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in indexTenorNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 indexTenorIDRef = item.Attributes["id"].Name;
                 Period ob = Period();
                 IDManager.SetID(indexTenorIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 indexTenorIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 indexTenor = new Period(item);
             }
         }
     }
     
 
     XmlNodeList spreadNodeList = xmlNode.SelectNodes("spread");
     if (spreadNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in spreadNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 spreadIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(spreadIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 spreadIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 spread = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList sideNodeList = xmlNode.SelectNodes("side");
     if (sideNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in sideNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 sideIDRef = item.Attributes["id"].Name;
                 QuotationSideEnum ob = QuotationSideEnum();
                 IDManager.SetID(sideIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 sideIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 side = new QuotationSideEnum(item);
             }
         }
     }
     
 
 }
Ejemplo n.º 22
0
        public InterestShortFall(XmlNode xmlNode)
        {
            XmlNodeList interestShortfallCapNodeList = xmlNode.SelectNodes("interestShortfallCap");

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

            foreach (XmlNode item in interestShortfallCapNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        interestShortfallCapIDRef = item.Attributes["id"].Name;
                        InterestShortfallCapEnum ob = InterestShortfallCapEnum();
                        IDManager.SetID(interestShortfallCapIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        interestShortfallCapIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        interestShortfallCap = new InterestShortfallCapEnum(item);
                    }
                }
            }


            XmlNodeList compoundingNodeList = xmlNode.SelectNodes("compounding");

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

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


            XmlNodeList rateSourceNodeList = xmlNode.SelectNodes("rateSource");

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

            foreach (XmlNode item in rateSourceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        rateSourceIDRef = item.Attributes["id"].Name;
                        FloatingRateIndex ob = FloatingRateIndex();
                        IDManager.SetID(rateSourceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        rateSourceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        rateSource = new FloatingRateIndex(item);
                    }
                }
            }
        }
Ejemplo n.º 23
0
        public SwapCurveValuation(XmlNode xmlNode)
        {
            XmlNode floatingRateIndexNode = xmlNode.SelectSingleNode("floatingRateIndex");

            if (floatingRateIndexNode != null)
            {
                if (floatingRateIndexNode.Attributes["href"] != null || floatingRateIndexNode.Attributes["id"] != null)
                {
                    if (floatingRateIndexNode.Attributes["id"] != null)
                    {
                        floatingRateIndexIDRef_ = floatingRateIndexNode.Attributes["id"].Value;
                        FloatingRateIndex ob = new FloatingRateIndex(floatingRateIndexNode);
                        IDManager.SetID(floatingRateIndexIDRef_, ob);
                    }
                    else if (floatingRateIndexNode.Attributes["href"] != null)
                    {
                        floatingRateIndexIDRef_ = floatingRateIndexNode.Attributes["href"].Value;
                    }
                    else
                    {
                        floatingRateIndex_ = new FloatingRateIndex(floatingRateIndexNode);
                    }
                }
                else
                {
                    floatingRateIndex_ = new FloatingRateIndex(floatingRateIndexNode);
                }
            }


            XmlNode indexTenorNode = xmlNode.SelectSingleNode("indexTenor");

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


            XmlNode spreadNode = xmlNode.SelectSingleNode("spread");

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


            XmlNode sideNode = xmlNode.SelectSingleNode("side");

            if (sideNode != null)
            {
                if (sideNode.Attributes["href"] != null || sideNode.Attributes["id"] != null)
                {
                    if (sideNode.Attributes["id"] != null)
                    {
                        sideIDRef_ = sideNode.Attributes["id"].Value;
                        QuotationSideEnum ob = new QuotationSideEnum(sideNode);
                        IDManager.SetID(sideIDRef_, ob);
                    }
                    else if (sideNode.Attributes["href"] != null)
                    {
                        sideIDRef_ = sideNode.Attributes["href"].Value;
                    }
                    else
                    {
                        side_ = new QuotationSideEnum(sideNode);
                    }
                }
                else
                {
                    side_ = new QuotationSideEnum(sideNode);
                }
            }
        }
        public FloatingRate(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode floatingRateIndexNode = xmlNode.SelectSingleNode("floatingRateIndex");

            if (floatingRateIndexNode != null)
            {
                if (floatingRateIndexNode.Attributes["href"] != null || floatingRateIndexNode.Attributes["id"] != null)
                {
                    if (floatingRateIndexNode.Attributes["id"] != null)
                    {
                        floatingRateIndexIDRef_ = floatingRateIndexNode.Attributes["id"].Value;
                        FloatingRateIndex ob = new FloatingRateIndex(floatingRateIndexNode);
                        IDManager.SetID(floatingRateIndexIDRef_, ob);
                    }
                    else if (floatingRateIndexNode.Attributes["href"] != null)
                    {
                        floatingRateIndexIDRef_ = floatingRateIndexNode.Attributes["href"].Value;
                    }
                    else
                    {
                        floatingRateIndex_ = new FloatingRateIndex(floatingRateIndexNode);
                    }
                }
                else
                {
                    floatingRateIndex_ = new FloatingRateIndex(floatingRateIndexNode);
                }
            }


            XmlNode indexTenorNode = xmlNode.SelectSingleNode("indexTenor");

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


            XmlNode floatingRateMultiplierScheduleNode = xmlNode.SelectSingleNode("floatingRateMultiplierSchedule");

            if (floatingRateMultiplierScheduleNode != null)
            {
                if (floatingRateMultiplierScheduleNode.Attributes["href"] != null || floatingRateMultiplierScheduleNode.Attributes["id"] != null)
                {
                    if (floatingRateMultiplierScheduleNode.Attributes["id"] != null)
                    {
                        floatingRateMultiplierScheduleIDRef_ = floatingRateMultiplierScheduleNode.Attributes["id"].Value;
                        Schedule ob = new Schedule(floatingRateMultiplierScheduleNode);
                        IDManager.SetID(floatingRateMultiplierScheduleIDRef_, ob);
                    }
                    else if (floatingRateMultiplierScheduleNode.Attributes["href"] != null)
                    {
                        floatingRateMultiplierScheduleIDRef_ = floatingRateMultiplierScheduleNode.Attributes["href"].Value;
                    }
                    else
                    {
                        floatingRateMultiplierSchedule_ = new Schedule(floatingRateMultiplierScheduleNode);
                    }
                }
                else
                {
                    floatingRateMultiplierSchedule_ = new Schedule(floatingRateMultiplierScheduleNode);
                }
            }


            XmlNodeList spreadScheduleNodeList = xmlNode.SelectNodes("spreadSchedule");

            if (spreadScheduleNodeList != null)
            {
                this.spreadSchedule_ = new List <SpreadSchedule>();
                foreach (XmlNode item in spreadScheduleNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            spreadScheduleIDRef_ = item.Attributes["id"].Value;
                            spreadSchedule_.Add(new SpreadSchedule(item));
                            IDManager.SetID(spreadScheduleIDRef_, spreadSchedule_[spreadSchedule_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            spreadScheduleIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            spreadSchedule_.Add(new SpreadSchedule(item));
                        }
                    }
                    else
                    {
                        spreadSchedule_.Add(new SpreadSchedule(item));
                    }
                }
            }


            XmlNode rateTreatmentNode = xmlNode.SelectSingleNode("rateTreatment");

            if (rateTreatmentNode != null)
            {
                if (rateTreatmentNode.Attributes["href"] != null || rateTreatmentNode.Attributes["id"] != null)
                {
                    if (rateTreatmentNode.Attributes["id"] != null)
                    {
                        rateTreatmentIDRef_ = rateTreatmentNode.Attributes["id"].Value;
                        RateTreatmentEnum ob = new RateTreatmentEnum(rateTreatmentNode);
                        IDManager.SetID(rateTreatmentIDRef_, ob);
                    }
                    else if (rateTreatmentNode.Attributes["href"] != null)
                    {
                        rateTreatmentIDRef_ = rateTreatmentNode.Attributes["href"].Value;
                    }
                    else
                    {
                        rateTreatment_ = new RateTreatmentEnum(rateTreatmentNode);
                    }
                }
                else
                {
                    rateTreatment_ = new RateTreatmentEnum(rateTreatmentNode);
                }
            }


            XmlNodeList capRateScheduleNodeList = xmlNode.SelectNodes("capRateSchedule");

            if (capRateScheduleNodeList != null)
            {
                this.capRateSchedule_ = new List <StrikeSchedule>();
                foreach (XmlNode item in capRateScheduleNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            capRateScheduleIDRef_ = item.Attributes["id"].Value;
                            capRateSchedule_.Add(new StrikeSchedule(item));
                            IDManager.SetID(capRateScheduleIDRef_, capRateSchedule_[capRateSchedule_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            capRateScheduleIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            capRateSchedule_.Add(new StrikeSchedule(item));
                        }
                    }
                    else
                    {
                        capRateSchedule_.Add(new StrikeSchedule(item));
                    }
                }
            }


            XmlNodeList floorRateScheduleNodeList = xmlNode.SelectNodes("floorRateSchedule");

            if (floorRateScheduleNodeList != null)
            {
                this.floorRateSchedule_ = new List <StrikeSchedule>();
                foreach (XmlNode item in floorRateScheduleNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            floorRateScheduleIDRef_ = item.Attributes["id"].Value;
                            floorRateSchedule_.Add(new StrikeSchedule(item));
                            IDManager.SetID(floorRateScheduleIDRef_, floorRateSchedule_[floorRateSchedule_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            floorRateScheduleIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            floorRateSchedule_.Add(new StrikeSchedule(item));
                        }
                    }
                    else
                    {
                        floorRateSchedule_.Add(new StrikeSchedule(item));
                    }
                }
            }
        }