public InterestLegCalculationPeriodDates(XmlNode xmlNode)
        {
            XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate");

            if (effectiveDateNode != null)
            {
                if (effectiveDateNode.Attributes["href"] != null || effectiveDateNode.Attributes["id"] != null)
                {
                    if (effectiveDateNode.Attributes["id"] != null)
                    {
                        effectiveDateIDRef_ = effectiveDateNode.Attributes["id"].Value;
                        AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(effectiveDateNode);
                        IDManager.SetID(effectiveDateIDRef_, ob);
                    }
                    else if (effectiveDateNode.Attributes["href"] != null)
                    {
                        effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        effectiveDate_ = new AdjustableOrRelativeDate(effectiveDateNode);
                    }
                }
                else
                {
                    effectiveDate_ = new AdjustableOrRelativeDate(effectiveDateNode);
                }
            }


            XmlNode terminationDateNode = xmlNode.SelectSingleNode("terminationDate");

            if (terminationDateNode != null)
            {
                if (terminationDateNode.Attributes["href"] != null || terminationDateNode.Attributes["id"] != null)
                {
                    if (terminationDateNode.Attributes["id"] != null)
                    {
                        terminationDateIDRef_ = terminationDateNode.Attributes["id"].Value;
                        AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(terminationDateNode);
                        IDManager.SetID(terminationDateIDRef_, ob);
                    }
                    else if (terminationDateNode.Attributes["href"] != null)
                    {
                        terminationDateIDRef_ = terminationDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        terminationDate_ = new AdjustableOrRelativeDate(terminationDateNode);
                    }
                }
                else
                {
                    terminationDate_ = new AdjustableOrRelativeDate(terminationDateNode);
                }
            }


            XmlNode interestLegResetDatesNode = xmlNode.SelectSingleNode("interestLegResetDates");

            if (interestLegResetDatesNode != null)
            {
                if (interestLegResetDatesNode.Attributes["href"] != null || interestLegResetDatesNode.Attributes["id"] != null)
                {
                    if (interestLegResetDatesNode.Attributes["id"] != null)
                    {
                        interestLegResetDatesIDRef_ = interestLegResetDatesNode.Attributes["id"].Value;
                        InterestLegResetDates ob = new InterestLegResetDates(interestLegResetDatesNode);
                        IDManager.SetID(interestLegResetDatesIDRef_, ob);
                    }
                    else if (interestLegResetDatesNode.Attributes["href"] != null)
                    {
                        interestLegResetDatesIDRef_ = interestLegResetDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        interestLegResetDates_ = new InterestLegResetDates(interestLegResetDatesNode);
                    }
                }
                else
                {
                    interestLegResetDates_ = new InterestLegResetDates(interestLegResetDatesNode);
                }
            }


            XmlNode interestLegPaymentDatesNode = xmlNode.SelectSingleNode("interestLegPaymentDates");

            if (interestLegPaymentDatesNode != null)
            {
                if (interestLegPaymentDatesNode.Attributes["href"] != null || interestLegPaymentDatesNode.Attributes["id"] != null)
                {
                    if (interestLegPaymentDatesNode.Attributes["id"] != null)
                    {
                        interestLegPaymentDatesIDRef_ = interestLegPaymentDatesNode.Attributes["id"].Value;
                        AdjustableRelativeOrPeriodicDates2 ob = new AdjustableRelativeOrPeriodicDates2(interestLegPaymentDatesNode);
                        IDManager.SetID(interestLegPaymentDatesIDRef_, ob);
                    }
                    else if (interestLegPaymentDatesNode.Attributes["href"] != null)
                    {
                        interestLegPaymentDatesIDRef_ = interestLegPaymentDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        interestLegPaymentDates_ = new AdjustableRelativeOrPeriodicDates2(interestLegPaymentDatesNode);
                    }
                }
                else
                {
                    interestLegPaymentDates_ = new AdjustableRelativeOrPeriodicDates2(interestLegPaymentDatesNode);
                }
            }
        }
Exemplo n.º 2
0
        public InterestLegCalculationPeriodDates(XmlNode xmlNode)
        {
            XmlNodeList effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate");

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

            foreach (XmlNode item in effectiveDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        effectiveDateIDRef = item.Attributes["id"].Name;
                        AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                        IDManager.SetID(effectiveDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        effectiveDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        effectiveDate = new AdjustableOrRelativeDate(item);
                    }
                }
            }


            XmlNodeList terminationDateNodeList = xmlNode.SelectNodes("terminationDate");

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

            foreach (XmlNode item in terminationDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        terminationDateIDRef = item.Attributes["id"].Name;
                        AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                        IDManager.SetID(terminationDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        terminationDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        terminationDate = new AdjustableOrRelativeDate(item);
                    }
                }
            }


            XmlNodeList interestLegResetDatesNodeList = xmlNode.SelectNodes("interestLegResetDates");

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

            foreach (XmlNode item in interestLegResetDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        interestLegResetDatesIDRef = item.Attributes["id"].Name;
                        InterestLegResetDates ob = InterestLegResetDates();
                        IDManager.SetID(interestLegResetDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        interestLegResetDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        interestLegResetDates = new InterestLegResetDates(item);
                    }
                }
            }


            XmlNodeList interestLegPaymentDatesNodeList = xmlNode.SelectNodes("interestLegPaymentDates");

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

            foreach (XmlNode item in interestLegPaymentDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        interestLegPaymentDatesIDRef = item.Attributes["id"].Name;
                        AdjustableRelativeOrPeriodicDates2 ob = AdjustableRelativeOrPeriodicDates2();
                        IDManager.SetID(interestLegPaymentDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        interestLegPaymentDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        interestLegPaymentDates = new AdjustableRelativeOrPeriodicDates2(item);
                    }
                }
            }
        }
 public InterestLegCalculationPeriodDates(XmlNode xmlNode)
 {
     XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate");
     
     if (effectiveDateNode != null)
     {
         if (effectiveDateNode.Attributes["href"] != null || effectiveDateNode.Attributes["id"] != null) 
         {
             if (effectiveDateNode.Attributes["id"] != null) 
             {
                 effectiveDateIDRef_ = effectiveDateNode.Attributes["id"].Value;
                 AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(effectiveDateNode);
                 IDManager.SetID(effectiveDateIDRef_, ob);
             }
             else if (effectiveDateNode.Attributes["href"] != null)
             {
                 effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value;
             }
             else
             {
                 effectiveDate_ = new AdjustableOrRelativeDate(effectiveDateNode);
             }
         }
         else
         {
             effectiveDate_ = new AdjustableOrRelativeDate(effectiveDateNode);
         }
     }
     
 
     XmlNode terminationDateNode = xmlNode.SelectSingleNode("terminationDate");
     
     if (terminationDateNode != null)
     {
         if (terminationDateNode.Attributes["href"] != null || terminationDateNode.Attributes["id"] != null) 
         {
             if (terminationDateNode.Attributes["id"] != null) 
             {
                 terminationDateIDRef_ = terminationDateNode.Attributes["id"].Value;
                 AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(terminationDateNode);
                 IDManager.SetID(terminationDateIDRef_, ob);
             }
             else if (terminationDateNode.Attributes["href"] != null)
             {
                 terminationDateIDRef_ = terminationDateNode.Attributes["href"].Value;
             }
             else
             {
                 terminationDate_ = new AdjustableOrRelativeDate(terminationDateNode);
             }
         }
         else
         {
             terminationDate_ = new AdjustableOrRelativeDate(terminationDateNode);
         }
     }
     
 
     XmlNode interestLegResetDatesNode = xmlNode.SelectSingleNode("interestLegResetDates");
     
     if (interestLegResetDatesNode != null)
     {
         if (interestLegResetDatesNode.Attributes["href"] != null || interestLegResetDatesNode.Attributes["id"] != null) 
         {
             if (interestLegResetDatesNode.Attributes["id"] != null) 
             {
                 interestLegResetDatesIDRef_ = interestLegResetDatesNode.Attributes["id"].Value;
                 InterestLegResetDates ob = new InterestLegResetDates(interestLegResetDatesNode);
                 IDManager.SetID(interestLegResetDatesIDRef_, ob);
             }
             else if (interestLegResetDatesNode.Attributes["href"] != null)
             {
                 interestLegResetDatesIDRef_ = interestLegResetDatesNode.Attributes["href"].Value;
             }
             else
             {
                 interestLegResetDates_ = new InterestLegResetDates(interestLegResetDatesNode);
             }
         }
         else
         {
             interestLegResetDates_ = new InterestLegResetDates(interestLegResetDatesNode);
         }
     }
     
 
     XmlNode interestLegPaymentDatesNode = xmlNode.SelectSingleNode("interestLegPaymentDates");
     
     if (interestLegPaymentDatesNode != null)
     {
         if (interestLegPaymentDatesNode.Attributes["href"] != null || interestLegPaymentDatesNode.Attributes["id"] != null) 
         {
             if (interestLegPaymentDatesNode.Attributes["id"] != null) 
             {
                 interestLegPaymentDatesIDRef_ = interestLegPaymentDatesNode.Attributes["id"].Value;
                 AdjustableRelativeOrPeriodicDates2 ob = new AdjustableRelativeOrPeriodicDates2(interestLegPaymentDatesNode);
                 IDManager.SetID(interestLegPaymentDatesIDRef_, ob);
             }
             else if (interestLegPaymentDatesNode.Attributes["href"] != null)
             {
                 interestLegPaymentDatesIDRef_ = interestLegPaymentDatesNode.Attributes["href"].Value;
             }
             else
             {
                 interestLegPaymentDates_ = new AdjustableRelativeOrPeriodicDates2(interestLegPaymentDatesNode);
             }
         }
         else
         {
             interestLegPaymentDates_ = new AdjustableRelativeOrPeriodicDates2(interestLegPaymentDatesNode);
         }
     }
     
 
 }
 public InterestLegCalculationPeriodDates(XmlNode xmlNode)
 {
     XmlNodeList effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate");
     if (effectiveDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in effectiveDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 effectiveDateIDRef = item.Attributes["id"].Name;
                 AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                 IDManager.SetID(effectiveDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 effectiveDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 effectiveDate = new AdjustableOrRelativeDate(item);
             }
         }
     }
     
 
     XmlNodeList terminationDateNodeList = xmlNode.SelectNodes("terminationDate");
     if (terminationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in terminationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 terminationDateIDRef = item.Attributes["id"].Name;
                 AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                 IDManager.SetID(terminationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 terminationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 terminationDate = new AdjustableOrRelativeDate(item);
             }
         }
     }
     
 
     XmlNodeList interestLegResetDatesNodeList = xmlNode.SelectNodes("interestLegResetDates");
     if (interestLegResetDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in interestLegResetDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 interestLegResetDatesIDRef = item.Attributes["id"].Name;
                 InterestLegResetDates ob = InterestLegResetDates();
                 IDManager.SetID(interestLegResetDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 interestLegResetDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 interestLegResetDates = new InterestLegResetDates(item);
             }
         }
     }
     
 
     XmlNodeList interestLegPaymentDatesNodeList = xmlNode.SelectNodes("interestLegPaymentDates");
     if (interestLegPaymentDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in interestLegPaymentDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 interestLegPaymentDatesIDRef = item.Attributes["id"].Name;
                 AdjustableRelativeOrPeriodicDates2 ob = AdjustableRelativeOrPeriodicDates2();
                 IDManager.SetID(interestLegPaymentDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 interestLegPaymentDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 interestLegPaymentDates = new AdjustableRelativeOrPeriodicDates2(item);
             }
         }
     }
     
 
 }