public PaymentDates(XmlNode xmlNode)
 {
     XmlNodeList calculationPeriodDatesReferenceNodeList = xmlNode.SelectNodes("calculationPeriodDatesReference");
     if (calculationPeriodDatesReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodDatesReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodDatesReferenceIDRef = item.Attributes["id"].Name;
                 CalculationPeriodDatesReference ob = CalculationPeriodDatesReference();
                 IDManager.SetID(calculationPeriodDatesReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodDatesReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodDatesReference = new CalculationPeriodDatesReference(item);
             }
         }
     }
     
 
     XmlNodeList resetDatesReferenceNodeList = xmlNode.SelectNodes("resetDatesReference");
     if (resetDatesReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in resetDatesReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 resetDatesReferenceIDRef = item.Attributes["id"].Name;
                 ResetDatesReference ob = ResetDatesReference();
                 IDManager.SetID(resetDatesReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 resetDatesReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 resetDatesReference = new ResetDatesReference(item);
             }
         }
     }
     
 
     XmlNodeList valuationDatesReferenceNodeList = xmlNode.SelectNodes("valuationDatesReference");
     if (valuationDatesReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in valuationDatesReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 valuationDatesReferenceIDRef = item.Attributes["id"].Name;
                 ValuationDatesReference ob = ValuationDatesReference();
                 IDManager.SetID(valuationDatesReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 valuationDatesReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 valuationDatesReference = new ValuationDatesReference(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;
                 Frequency ob = Frequency();
                 IDManager.SetID(paymentFrequencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentFrequencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentFrequency = new Frequency(item);
             }
         }
     }
     
 
     XmlNodeList firstPaymentDateNodeList = xmlNode.SelectNodes("firstPaymentDate");
     if (firstPaymentDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in firstPaymentDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 firstPaymentDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(firstPaymentDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 firstPaymentDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 firstPaymentDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList lastRegularPaymentDateNodeList = xmlNode.SelectNodes("lastRegularPaymentDate");
     if (lastRegularPaymentDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in lastRegularPaymentDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 lastRegularPaymentDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(lastRegularPaymentDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 lastRegularPaymentDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 lastRegularPaymentDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList payRelativeToNodeList = xmlNode.SelectNodes("payRelativeTo");
     if (payRelativeToNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in payRelativeToNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 payRelativeToIDRef = item.Attributes["id"].Name;
                 PayRelativeToEnum ob = PayRelativeToEnum();
                 IDManager.SetID(payRelativeToIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 payRelativeToIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payRelativeTo = new PayRelativeToEnum(item);
             }
         }
     }
     
 
     XmlNodeList paymentDaysOffsetNodeList = xmlNode.SelectNodes("paymentDaysOffset");
     if (paymentDaysOffsetNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentDaysOffsetNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentDaysOffsetIDRef = item.Attributes["id"].Name;
                 Offset ob = Offset();
                 IDManager.SetID(paymentDaysOffsetIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentDaysOffsetIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentDaysOffset = new Offset(item);
             }
         }
     }
     
 
     XmlNodeList paymentDatesAdjustmentsNodeList = xmlNode.SelectNodes("paymentDatesAdjustments");
     if (paymentDatesAdjustmentsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentDatesAdjustmentsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentDatesAdjustmentsIDRef = item.Attributes["id"].Name;
                 BusinessDayAdjustments ob = BusinessDayAdjustments();
                 IDManager.SetID(paymentDatesAdjustmentsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentDatesAdjustmentsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentDatesAdjustments = new BusinessDayAdjustments(item);
             }
         }
     }
     
 
 }
        public ResetDates(XmlNode xmlNode)
        {
            XmlNodeList calculationPeriodDatesReferenceNodeList = xmlNode.SelectNodes("calculationPeriodDatesReference");

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

            foreach (XmlNode item in calculationPeriodDatesReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef = item.Attributes["id"].Name;
                        CalculationPeriodDatesReference ob = CalculationPeriodDatesReference();
                        IDManager.SetID(calculationPeriodDatesReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodDatesReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodDatesReference = new CalculationPeriodDatesReference(item);
                    }
                }
            }


            XmlNodeList resetRelativeToNodeList = xmlNode.SelectNodes("resetRelativeTo");

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

            foreach (XmlNode item in resetRelativeToNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        resetRelativeToIDRef = item.Attributes["id"].Name;
                        ResetRelativeToEnum ob = ResetRelativeToEnum();
                        IDManager.SetID(resetRelativeToIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        resetRelativeToIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        resetRelativeTo = new ResetRelativeToEnum(item);
                    }
                }
            }


            XmlNodeList initialFixingDateNodeList = xmlNode.SelectNodes("initialFixingDate");

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

            foreach (XmlNode item in initialFixingDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        initialFixingDateIDRef = item.Attributes["id"].Name;
                        RelativeDateOffset ob = RelativeDateOffset();
                        IDManager.SetID(initialFixingDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        initialFixingDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        initialFixingDate = new RelativeDateOffset(item);
                    }
                }
            }


            XmlNodeList fixingDatesNodeList = xmlNode.SelectNodes("fixingDates");

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

            foreach (XmlNode item in fixingDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fixingDatesIDRef = item.Attributes["id"].Name;
                        RelativeDateOffset ob = RelativeDateOffset();
                        IDManager.SetID(fixingDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fixingDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fixingDates = new RelativeDateOffset(item);
                    }
                }
            }


            XmlNodeList rateCutOffDaysOffsetNodeList = xmlNode.SelectNodes("rateCutOffDaysOffset");

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

            foreach (XmlNode item in rateCutOffDaysOffsetNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        rateCutOffDaysOffsetIDRef = item.Attributes["id"].Name;
                        Offset ob = Offset();
                        IDManager.SetID(rateCutOffDaysOffsetIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        rateCutOffDaysOffsetIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        rateCutOffDaysOffset = new Offset(item);
                    }
                }
            }


            XmlNodeList resetFrequencyNodeList = xmlNode.SelectNodes("resetFrequency");

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

            foreach (XmlNode item in resetFrequencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        resetFrequencyIDRef = item.Attributes["id"].Name;
                        ResetFrequency ob = ResetFrequency();
                        IDManager.SetID(resetFrequencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        resetFrequencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        resetFrequency = new ResetFrequency(item);
                    }
                }
            }


            XmlNodeList resetDatesAdjustmentsNodeList = xmlNode.SelectNodes("resetDatesAdjustments");

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

            foreach (XmlNode item in resetDatesAdjustmentsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        resetDatesAdjustmentsIDRef = item.Attributes["id"].Name;
                        BusinessDayAdjustments ob = BusinessDayAdjustments();
                        IDManager.SetID(resetDatesAdjustmentsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        resetDatesAdjustmentsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        resetDatesAdjustments = new BusinessDayAdjustments(item);
                    }
                }
            }
        }
Exemplo n.º 3
0
        public StubCalculationPeriodAmount(XmlNode xmlNode)
        {
            XmlNodeList calculationPeriodDatesReferenceNodeList = xmlNode.SelectNodes("calculationPeriodDatesReference");

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

            foreach (XmlNode item in calculationPeriodDatesReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef = item.Attributes["id"].Name;
                        CalculationPeriodDatesReference ob = CalculationPeriodDatesReference();
                        IDManager.SetID(calculationPeriodDatesReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodDatesReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodDatesReference = new CalculationPeriodDatesReference(item);
                    }
                }
            }


            XmlNodeList initialStubNodeList = xmlNode.SelectNodes("initialStub");

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

            foreach (XmlNode item in initialStubNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        initialStubIDRef = item.Attributes["id"].Name;
                        StubValue ob = StubValue();
                        IDManager.SetID(initialStubIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        initialStubIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        initialStub = new StubValue(item);
                    }
                }
            }


            XmlNodeList finalStubNodeList = xmlNode.SelectNodes("finalStub");

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

            foreach (XmlNode item in finalStubNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        finalStubIDRef = item.Attributes["id"].Name;
                        StubValue ob = StubValue();
                        IDManager.SetID(finalStubIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        finalStubIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        finalStub = new StubValue(item);
                    }
                }
            }
        }
 public StubCalculationPeriodAmount(XmlNode xmlNode)
 {
     XmlNodeList calculationPeriodDatesReferenceNodeList = xmlNode.SelectNodes("calculationPeriodDatesReference");
     if (calculationPeriodDatesReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodDatesReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodDatesReferenceIDRef = item.Attributes["id"].Name;
                 CalculationPeriodDatesReference ob = CalculationPeriodDatesReference();
                 IDManager.SetID(calculationPeriodDatesReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodDatesReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodDatesReference = new CalculationPeriodDatesReference(item);
             }
         }
     }
     
 
     XmlNodeList initialStubNodeList = xmlNode.SelectNodes("initialStub");
     if (initialStubNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in initialStubNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 initialStubIDRef = item.Attributes["id"].Name;
                 StubValue ob = StubValue();
                 IDManager.SetID(initialStubIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 initialStubIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 initialStub = new StubValue(item);
             }
         }
     }
     
 
     XmlNodeList finalStubNodeList = xmlNode.SelectNodes("finalStub");
     if (finalStubNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in finalStubNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 finalStubIDRef = item.Attributes["id"].Name;
                 StubValue ob = StubValue();
                 IDManager.SetID(finalStubIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 finalStubIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 finalStub = new StubValue(item);
             }
         }
     }
     
 
 }
 public ResetDates(XmlNode xmlNode)
 {
     XmlNodeList calculationPeriodDatesReferenceNodeList = xmlNode.SelectNodes("calculationPeriodDatesReference");
     if (calculationPeriodDatesReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodDatesReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodDatesReferenceIDRef = item.Attributes["id"].Name;
                 CalculationPeriodDatesReference ob = CalculationPeriodDatesReference();
                 IDManager.SetID(calculationPeriodDatesReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodDatesReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodDatesReference = new CalculationPeriodDatesReference(item);
             }
         }
     }
     
 
     XmlNodeList resetRelativeToNodeList = xmlNode.SelectNodes("resetRelativeTo");
     if (resetRelativeToNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in resetRelativeToNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 resetRelativeToIDRef = item.Attributes["id"].Name;
                 ResetRelativeToEnum ob = ResetRelativeToEnum();
                 IDManager.SetID(resetRelativeToIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 resetRelativeToIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 resetRelativeTo = new ResetRelativeToEnum(item);
             }
         }
     }
     
 
     XmlNodeList initialFixingDateNodeList = xmlNode.SelectNodes("initialFixingDate");
     if (initialFixingDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in initialFixingDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 initialFixingDateIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(initialFixingDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 initialFixingDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 initialFixingDate = new RelativeDateOffset(item);
             }
         }
     }
     
 
     XmlNodeList fixingDatesNodeList = xmlNode.SelectNodes("fixingDates");
     if (fixingDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fixingDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fixingDatesIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(fixingDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixingDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixingDates = new RelativeDateOffset(item);
             }
         }
     }
     
 
     XmlNodeList rateCutOffDaysOffsetNodeList = xmlNode.SelectNodes("rateCutOffDaysOffset");
     if (rateCutOffDaysOffsetNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in rateCutOffDaysOffsetNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 rateCutOffDaysOffsetIDRef = item.Attributes["id"].Name;
                 Offset ob = Offset();
                 IDManager.SetID(rateCutOffDaysOffsetIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 rateCutOffDaysOffsetIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 rateCutOffDaysOffset = new Offset(item);
             }
         }
     }
     
 
     XmlNodeList resetFrequencyNodeList = xmlNode.SelectNodes("resetFrequency");
     if (resetFrequencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in resetFrequencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 resetFrequencyIDRef = item.Attributes["id"].Name;
                 ResetFrequency ob = ResetFrequency();
                 IDManager.SetID(resetFrequencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 resetFrequencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 resetFrequency = new ResetFrequency(item);
             }
         }
     }
     
 
     XmlNodeList resetDatesAdjustmentsNodeList = xmlNode.SelectNodes("resetDatesAdjustments");
     if (resetDatesAdjustmentsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in resetDatesAdjustmentsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 resetDatesAdjustmentsIDRef = item.Attributes["id"].Name;
                 BusinessDayAdjustments ob = BusinessDayAdjustments();
                 IDManager.SetID(resetDatesAdjustmentsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 resetDatesAdjustmentsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 resetDatesAdjustments = new BusinessDayAdjustments(item);
             }
         }
     }
     
 
 }
 public NotionalStepRule(XmlNode xmlNode)
 {
     XmlNode calculationPeriodDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodDatesReference");
     
     if (calculationPeriodDatesReferenceNode != null)
     {
         if (calculationPeriodDatesReferenceNode.Attributes["href"] != null || calculationPeriodDatesReferenceNode.Attributes["id"] != null) 
         {
             if (calculationPeriodDatesReferenceNode.Attributes["id"] != null) 
             {
                 calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["id"].Value;
                 CalculationPeriodDatesReference ob = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                 IDManager.SetID(calculationPeriodDatesReferenceIDRef_, ob);
             }
             else if (calculationPeriodDatesReferenceNode.Attributes["href"] != null)
             {
                 calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
             }
         }
         else
         {
             calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
         }
     }
     
 
     XmlNode stepFrequencyNode = xmlNode.SelectSingleNode("stepFrequency");
     
     if (stepFrequencyNode != null)
     {
         if (stepFrequencyNode.Attributes["href"] != null || stepFrequencyNode.Attributes["id"] != null) 
         {
             if (stepFrequencyNode.Attributes["id"] != null) 
             {
                 stepFrequencyIDRef_ = stepFrequencyNode.Attributes["id"].Value;
                 Period ob = new Period(stepFrequencyNode);
                 IDManager.SetID(stepFrequencyIDRef_, ob);
             }
             else if (stepFrequencyNode.Attributes["href"] != null)
             {
                 stepFrequencyIDRef_ = stepFrequencyNode.Attributes["href"].Value;
             }
             else
             {
                 stepFrequency_ = new Period(stepFrequencyNode);
             }
         }
         else
         {
             stepFrequency_ = new Period(stepFrequencyNode);
         }
     }
     
 
     XmlNode firstNotionalStepDateNode = xmlNode.SelectSingleNode("firstNotionalStepDate");
     
     if (firstNotionalStepDateNode != null)
     {
         if (firstNotionalStepDateNode.Attributes["href"] != null || firstNotionalStepDateNode.Attributes["id"] != null) 
         {
             if (firstNotionalStepDateNode.Attributes["id"] != null) 
             {
                 firstNotionalStepDateIDRef_ = firstNotionalStepDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(firstNotionalStepDateNode);
                 IDManager.SetID(firstNotionalStepDateIDRef_, ob);
             }
             else if (firstNotionalStepDateNode.Attributes["href"] != null)
             {
                 firstNotionalStepDateIDRef_ = firstNotionalStepDateNode.Attributes["href"].Value;
             }
             else
             {
                 firstNotionalStepDate_ = new XsdTypeDate(firstNotionalStepDateNode);
             }
         }
         else
         {
             firstNotionalStepDate_ = new XsdTypeDate(firstNotionalStepDateNode);
         }
     }
     
 
     XmlNode lastNotionalStepDateNode = xmlNode.SelectSingleNode("lastNotionalStepDate");
     
     if (lastNotionalStepDateNode != null)
     {
         if (lastNotionalStepDateNode.Attributes["href"] != null || lastNotionalStepDateNode.Attributes["id"] != null) 
         {
             if (lastNotionalStepDateNode.Attributes["id"] != null) 
             {
                 lastNotionalStepDateIDRef_ = lastNotionalStepDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(lastNotionalStepDateNode);
                 IDManager.SetID(lastNotionalStepDateIDRef_, ob);
             }
             else if (lastNotionalStepDateNode.Attributes["href"] != null)
             {
                 lastNotionalStepDateIDRef_ = lastNotionalStepDateNode.Attributes["href"].Value;
             }
             else
             {
                 lastNotionalStepDate_ = new XsdTypeDate(lastNotionalStepDateNode);
             }
         }
         else
         {
             lastNotionalStepDate_ = new XsdTypeDate(lastNotionalStepDateNode);
         }
     }
     
 
     XmlNode notionalStepAmountNode = xmlNode.SelectSingleNode("notionalStepAmount");
     
     if (notionalStepAmountNode != null)
     {
         if (notionalStepAmountNode.Attributes["href"] != null || notionalStepAmountNode.Attributes["id"] != null) 
         {
             if (notionalStepAmountNode.Attributes["id"] != null) 
             {
                 notionalStepAmountIDRef_ = notionalStepAmountNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(notionalStepAmountNode);
                 IDManager.SetID(notionalStepAmountIDRef_, ob);
             }
             else if (notionalStepAmountNode.Attributes["href"] != null)
             {
                 notionalStepAmountIDRef_ = notionalStepAmountNode.Attributes["href"].Value;
             }
             else
             {
                 notionalStepAmount_ = new XsdTypeDecimal(notionalStepAmountNode);
             }
         }
         else
         {
             notionalStepAmount_ = new XsdTypeDecimal(notionalStepAmountNode);
         }
     }
     
 
     XmlNode notionalStepRateNode = xmlNode.SelectSingleNode("notionalStepRate");
     
     if (notionalStepRateNode != null)
     {
         if (notionalStepRateNode.Attributes["href"] != null || notionalStepRateNode.Attributes["id"] != null) 
         {
             if (notionalStepRateNode.Attributes["id"] != null) 
             {
                 notionalStepRateIDRef_ = notionalStepRateNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(notionalStepRateNode);
                 IDManager.SetID(notionalStepRateIDRef_, ob);
             }
             else if (notionalStepRateNode.Attributes["href"] != null)
             {
                 notionalStepRateIDRef_ = notionalStepRateNode.Attributes["href"].Value;
             }
             else
             {
                 notionalStepRate_ = new XsdTypeDecimal(notionalStepRateNode);
             }
         }
         else
         {
             notionalStepRate_ = new XsdTypeDecimal(notionalStepRateNode);
         }
     }
     
 
     XmlNode stepRelativeToNode = xmlNode.SelectSingleNode("stepRelativeTo");
     
     if (stepRelativeToNode != null)
     {
         if (stepRelativeToNode.Attributes["href"] != null || stepRelativeToNode.Attributes["id"] != null) 
         {
             if (stepRelativeToNode.Attributes["id"] != null) 
             {
                 stepRelativeToIDRef_ = stepRelativeToNode.Attributes["id"].Value;
                 StepRelativeToEnum ob = new StepRelativeToEnum(stepRelativeToNode);
                 IDManager.SetID(stepRelativeToIDRef_, ob);
             }
             else if (stepRelativeToNode.Attributes["href"] != null)
             {
                 stepRelativeToIDRef_ = stepRelativeToNode.Attributes["href"].Value;
             }
             else
             {
                 stepRelativeTo_ = new StepRelativeToEnum(stepRelativeToNode);
             }
         }
         else
         {
             stepRelativeTo_ = new StepRelativeToEnum(stepRelativeToNode);
         }
     }
     
 
 }
 public StubCalculationPeriodAmount(XmlNode xmlNode)
 {
     XmlNode calculationPeriodDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodDatesReference");
     
     if (calculationPeriodDatesReferenceNode != null)
     {
         if (calculationPeriodDatesReferenceNode.Attributes["href"] != null || calculationPeriodDatesReferenceNode.Attributes["id"] != null) 
         {
             if (calculationPeriodDatesReferenceNode.Attributes["id"] != null) 
             {
                 calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["id"].Value;
                 CalculationPeriodDatesReference ob = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                 IDManager.SetID(calculationPeriodDatesReferenceIDRef_, ob);
             }
             else if (calculationPeriodDatesReferenceNode.Attributes["href"] != null)
             {
                 calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
             }
         }
         else
         {
             calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
         }
     }
     
 
     XmlNode initialStubNode = xmlNode.SelectSingleNode("initialStub");
     
     if (initialStubNode != null)
     {
         if (initialStubNode.Attributes["href"] != null || initialStubNode.Attributes["id"] != null) 
         {
             if (initialStubNode.Attributes["id"] != null) 
             {
                 initialStubIDRef_ = initialStubNode.Attributes["id"].Value;
                 StubValue ob = new StubValue(initialStubNode);
                 IDManager.SetID(initialStubIDRef_, ob);
             }
             else if (initialStubNode.Attributes["href"] != null)
             {
                 initialStubIDRef_ = initialStubNode.Attributes["href"].Value;
             }
             else
             {
                 initialStub_ = new StubValue(initialStubNode);
             }
         }
         else
         {
             initialStub_ = new StubValue(initialStubNode);
         }
     }
     
 
     XmlNode finalStubNode = xmlNode.SelectSingleNode("finalStub");
     
     if (finalStubNode != null)
     {
         if (finalStubNode.Attributes["href"] != null || finalStubNode.Attributes["id"] != null) 
         {
             if (finalStubNode.Attributes["id"] != null) 
             {
                 finalStubIDRef_ = finalStubNode.Attributes["id"].Value;
                 StubValue ob = new StubValue(finalStubNode);
                 IDManager.SetID(finalStubIDRef_, ob);
             }
             else if (finalStubNode.Attributes["href"] != null)
             {
                 finalStubIDRef_ = finalStubNode.Attributes["href"].Value;
             }
             else
             {
                 finalStub_ = new StubValue(finalStubNode);
             }
         }
         else
         {
             finalStub_ = new StubValue(finalStubNode);
         }
     }
     
 
 }
Exemplo n.º 8
0
        public PaymentDates(XmlNode xmlNode)
        {
            XmlNodeList calculationPeriodDatesReferenceNodeList = xmlNode.SelectNodes("calculationPeriodDatesReference");

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

            foreach (XmlNode item in calculationPeriodDatesReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef = item.Attributes["id"].Name;
                        CalculationPeriodDatesReference ob = CalculationPeriodDatesReference();
                        IDManager.SetID(calculationPeriodDatesReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodDatesReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodDatesReference = new CalculationPeriodDatesReference(item);
                    }
                }
            }


            XmlNodeList resetDatesReferenceNodeList = xmlNode.SelectNodes("resetDatesReference");

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

            foreach (XmlNode item in resetDatesReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        resetDatesReferenceIDRef = item.Attributes["id"].Name;
                        ResetDatesReference ob = ResetDatesReference();
                        IDManager.SetID(resetDatesReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        resetDatesReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        resetDatesReference = new ResetDatesReference(item);
                    }
                }
            }


            XmlNodeList valuationDatesReferenceNodeList = xmlNode.SelectNodes("valuationDatesReference");

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

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


            XmlNodeList firstPaymentDateNodeList = xmlNode.SelectNodes("firstPaymentDate");

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

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


            XmlNodeList lastRegularPaymentDateNodeList = xmlNode.SelectNodes("lastRegularPaymentDate");

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

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


            XmlNodeList payRelativeToNodeList = xmlNode.SelectNodes("payRelativeTo");

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

            foreach (XmlNode item in payRelativeToNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        payRelativeToIDRef = item.Attributes["id"].Name;
                        PayRelativeToEnum ob = PayRelativeToEnum();
                        IDManager.SetID(payRelativeToIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        payRelativeToIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        payRelativeTo = new PayRelativeToEnum(item);
                    }
                }
            }


            XmlNodeList paymentDaysOffsetNodeList = xmlNode.SelectNodes("paymentDaysOffset");

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

            foreach (XmlNode item in paymentDaysOffsetNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        paymentDaysOffsetIDRef = item.Attributes["id"].Name;
                        Offset ob = Offset();
                        IDManager.SetID(paymentDaysOffsetIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        paymentDaysOffsetIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        paymentDaysOffset = new Offset(item);
                    }
                }
            }


            XmlNodeList paymentDatesAdjustmentsNodeList = xmlNode.SelectNodes("paymentDatesAdjustments");

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

            foreach (XmlNode item in paymentDatesAdjustmentsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        paymentDatesAdjustmentsIDRef = item.Attributes["id"].Name;
                        BusinessDayAdjustments ob = BusinessDayAdjustments();
                        IDManager.SetID(paymentDatesAdjustmentsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        paymentDatesAdjustmentsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        paymentDatesAdjustments = new BusinessDayAdjustments(item);
                    }
                }
            }
        }
 public ResetDates(XmlNode xmlNode)
 {
     XmlNode calculationPeriodDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodDatesReference");
     
     if (calculationPeriodDatesReferenceNode != null)
     {
         if (calculationPeriodDatesReferenceNode.Attributes["href"] != null || calculationPeriodDatesReferenceNode.Attributes["id"] != null) 
         {
             if (calculationPeriodDatesReferenceNode.Attributes["id"] != null) 
             {
                 calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["id"].Value;
                 CalculationPeriodDatesReference ob = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                 IDManager.SetID(calculationPeriodDatesReferenceIDRef_, ob);
             }
             else if (calculationPeriodDatesReferenceNode.Attributes["href"] != null)
             {
                 calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
             }
         }
         else
         {
             calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
         }
     }
     
 
     XmlNode resetRelativeToNode = xmlNode.SelectSingleNode("resetRelativeTo");
     
     if (resetRelativeToNode != null)
     {
         if (resetRelativeToNode.Attributes["href"] != null || resetRelativeToNode.Attributes["id"] != null) 
         {
             if (resetRelativeToNode.Attributes["id"] != null) 
             {
                 resetRelativeToIDRef_ = resetRelativeToNode.Attributes["id"].Value;
                 ResetRelativeToEnum ob = new ResetRelativeToEnum(resetRelativeToNode);
                 IDManager.SetID(resetRelativeToIDRef_, ob);
             }
             else if (resetRelativeToNode.Attributes["href"] != null)
             {
                 resetRelativeToIDRef_ = resetRelativeToNode.Attributes["href"].Value;
             }
             else
             {
                 resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
             }
         }
         else
         {
             resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
         }
     }
     
 
     XmlNode initialFixingDateNode = xmlNode.SelectSingleNode("initialFixingDate");
     
     if (initialFixingDateNode != null)
     {
         if (initialFixingDateNode.Attributes["href"] != null || initialFixingDateNode.Attributes["id"] != null) 
         {
             if (initialFixingDateNode.Attributes["id"] != null) 
             {
                 initialFixingDateIDRef_ = initialFixingDateNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(initialFixingDateNode);
                 IDManager.SetID(initialFixingDateIDRef_, ob);
             }
             else if (initialFixingDateNode.Attributes["href"] != null)
             {
                 initialFixingDateIDRef_ = initialFixingDateNode.Attributes["href"].Value;
             }
             else
             {
                 initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
             }
         }
         else
         {
             initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
         }
     }
     
 
     XmlNode fixingDatesNode = xmlNode.SelectSingleNode("fixingDates");
     
     if (fixingDatesNode != null)
     {
         if (fixingDatesNode.Attributes["href"] != null || fixingDatesNode.Attributes["id"] != null) 
         {
             if (fixingDatesNode.Attributes["id"] != null) 
             {
                 fixingDatesIDRef_ = fixingDatesNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(fixingDatesNode);
                 IDManager.SetID(fixingDatesIDRef_, ob);
             }
             else if (fixingDatesNode.Attributes["href"] != null)
             {
                 fixingDatesIDRef_ = fixingDatesNode.Attributes["href"].Value;
             }
             else
             {
                 fixingDates_ = new RelativeDateOffset(fixingDatesNode);
             }
         }
         else
         {
             fixingDates_ = new RelativeDateOffset(fixingDatesNode);
         }
     }
     
 
     XmlNode rateCutOffDaysOffsetNode = xmlNode.SelectSingleNode("rateCutOffDaysOffset");
     
     if (rateCutOffDaysOffsetNode != null)
     {
         if (rateCutOffDaysOffsetNode.Attributes["href"] != null || rateCutOffDaysOffsetNode.Attributes["id"] != null) 
         {
             if (rateCutOffDaysOffsetNode.Attributes["id"] != null) 
             {
                 rateCutOffDaysOffsetIDRef_ = rateCutOffDaysOffsetNode.Attributes["id"].Value;
                 Offset ob = new Offset(rateCutOffDaysOffsetNode);
                 IDManager.SetID(rateCutOffDaysOffsetIDRef_, ob);
             }
             else if (rateCutOffDaysOffsetNode.Attributes["href"] != null)
             {
                 rateCutOffDaysOffsetIDRef_ = rateCutOffDaysOffsetNode.Attributes["href"].Value;
             }
             else
             {
                 rateCutOffDaysOffset_ = new Offset(rateCutOffDaysOffsetNode);
             }
         }
         else
         {
             rateCutOffDaysOffset_ = new Offset(rateCutOffDaysOffsetNode);
         }
     }
     
 
     XmlNode resetFrequencyNode = xmlNode.SelectSingleNode("resetFrequency");
     
     if (resetFrequencyNode != null)
     {
         if (resetFrequencyNode.Attributes["href"] != null || resetFrequencyNode.Attributes["id"] != null) 
         {
             if (resetFrequencyNode.Attributes["id"] != null) 
             {
                 resetFrequencyIDRef_ = resetFrequencyNode.Attributes["id"].Value;
                 ResetFrequency ob = new ResetFrequency(resetFrequencyNode);
                 IDManager.SetID(resetFrequencyIDRef_, ob);
             }
             else if (resetFrequencyNode.Attributes["href"] != null)
             {
                 resetFrequencyIDRef_ = resetFrequencyNode.Attributes["href"].Value;
             }
             else
             {
                 resetFrequency_ = new ResetFrequency(resetFrequencyNode);
             }
         }
         else
         {
             resetFrequency_ = new ResetFrequency(resetFrequencyNode);
         }
     }
     
 
     XmlNode resetDatesAdjustmentsNode = xmlNode.SelectSingleNode("resetDatesAdjustments");
     
     if (resetDatesAdjustmentsNode != null)
     {
         if (resetDatesAdjustmentsNode.Attributes["href"] != null || resetDatesAdjustmentsNode.Attributes["id"] != null) 
         {
             if (resetDatesAdjustmentsNode.Attributes["id"] != null) 
             {
                 resetDatesAdjustmentsIDRef_ = resetDatesAdjustmentsNode.Attributes["id"].Value;
                 BusinessDayAdjustments ob = new BusinessDayAdjustments(resetDatesAdjustmentsNode);
                 IDManager.SetID(resetDatesAdjustmentsIDRef_, ob);
             }
             else if (resetDatesAdjustmentsNode.Attributes["href"] != null)
             {
                 resetDatesAdjustmentsIDRef_ = resetDatesAdjustmentsNode.Attributes["href"].Value;
             }
             else
             {
                 resetDatesAdjustments_ = new BusinessDayAdjustments(resetDatesAdjustmentsNode);
             }
         }
         else
         {
             resetDatesAdjustments_ = new BusinessDayAdjustments(resetDatesAdjustmentsNode);
         }
     }
     
 
 }
Exemplo n.º 10
0
        public NotionalStepRule(XmlNode xmlNode)
        {
            XmlNodeList calculationPeriodDatesReferenceNodeList = xmlNode.SelectNodes("calculationPeriodDatesReference");

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

            foreach (XmlNode item in calculationPeriodDatesReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef = item.Attributes["id"].Name;
                        CalculationPeriodDatesReference ob = CalculationPeriodDatesReference();
                        IDManager.SetID(calculationPeriodDatesReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodDatesReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodDatesReference = new CalculationPeriodDatesReference(item);
                    }
                }
            }


            XmlNodeList stepFrequencyNodeList = xmlNode.SelectNodes("stepFrequency");

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

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


            XmlNodeList firstNotionalStepDateNodeList = xmlNode.SelectNodes("firstNotionalStepDate");

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

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


            XmlNodeList lastNotionalStepDateNodeList = xmlNode.SelectNodes("lastNotionalStepDate");

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

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


            XmlNodeList notionalStepAmountNodeList = xmlNode.SelectNodes("notionalStepAmount");

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

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


            XmlNodeList notionalStepRateNodeList = xmlNode.SelectNodes("notionalStepRate");

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

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


            XmlNodeList stepRelativeToNodeList = xmlNode.SelectNodes("stepRelativeTo");

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

            foreach (XmlNode item in stepRelativeToNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        stepRelativeToIDRef = item.Attributes["id"].Name;
                        StepRelativeToEnum ob = StepRelativeToEnum();
                        IDManager.SetID(stepRelativeToIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        stepRelativeToIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        stepRelativeTo = new StepRelativeToEnum(item);
                    }
                }
            }
        }
Exemplo n.º 11
0
        public StubCalculationPeriodAmount(XmlNode xmlNode)
        {
            XmlNode calculationPeriodDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodDatesReference");

            if (calculationPeriodDatesReferenceNode != null)
            {
                if (calculationPeriodDatesReferenceNode.Attributes["href"] != null || calculationPeriodDatesReferenceNode.Attributes["id"] != null)
                {
                    if (calculationPeriodDatesReferenceNode.Attributes["id"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["id"].Value;
                        CalculationPeriodDatesReference ob = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                        IDManager.SetID(calculationPeriodDatesReferenceIDRef_, ob);
                    }
                    else if (calculationPeriodDatesReferenceNode.Attributes["href"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                    }
                }
                else
                {
                    calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                }
            }


            XmlNode initialStubNode = xmlNode.SelectSingleNode("initialStub");

            if (initialStubNode != null)
            {
                if (initialStubNode.Attributes["href"] != null || initialStubNode.Attributes["id"] != null)
                {
                    if (initialStubNode.Attributes["id"] != null)
                    {
                        initialStubIDRef_ = initialStubNode.Attributes["id"].Value;
                        StubValue ob = new StubValue(initialStubNode);
                        IDManager.SetID(initialStubIDRef_, ob);
                    }
                    else if (initialStubNode.Attributes["href"] != null)
                    {
                        initialStubIDRef_ = initialStubNode.Attributes["href"].Value;
                    }
                    else
                    {
                        initialStub_ = new StubValue(initialStubNode);
                    }
                }
                else
                {
                    initialStub_ = new StubValue(initialStubNode);
                }
            }


            XmlNode finalStubNode = xmlNode.SelectSingleNode("finalStub");

            if (finalStubNode != null)
            {
                if (finalStubNode.Attributes["href"] != null || finalStubNode.Attributes["id"] != null)
                {
                    if (finalStubNode.Attributes["id"] != null)
                    {
                        finalStubIDRef_ = finalStubNode.Attributes["id"].Value;
                        StubValue ob = new StubValue(finalStubNode);
                        IDManager.SetID(finalStubIDRef_, ob);
                    }
                    else if (finalStubNode.Attributes["href"] != null)
                    {
                        finalStubIDRef_ = finalStubNode.Attributes["href"].Value;
                    }
                    else
                    {
                        finalStub_ = new StubValue(finalStubNode);
                    }
                }
                else
                {
                    finalStub_ = new StubValue(finalStubNode);
                }
            }
        }
 public NotionalStepRule(XmlNode xmlNode)
 {
     XmlNodeList calculationPeriodDatesReferenceNodeList = xmlNode.SelectNodes("calculationPeriodDatesReference");
     if (calculationPeriodDatesReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodDatesReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodDatesReferenceIDRef = item.Attributes["id"].Name;
                 CalculationPeriodDatesReference ob = CalculationPeriodDatesReference();
                 IDManager.SetID(calculationPeriodDatesReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodDatesReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodDatesReference = new CalculationPeriodDatesReference(item);
             }
         }
     }
     
 
     XmlNodeList stepFrequencyNodeList = xmlNode.SelectNodes("stepFrequency");
     if (stepFrequencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in stepFrequencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 stepFrequencyIDRef = item.Attributes["id"].Name;
                 Period ob = Period();
                 IDManager.SetID(stepFrequencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 stepFrequencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 stepFrequency = new Period(item);
             }
         }
     }
     
 
     XmlNodeList firstNotionalStepDateNodeList = xmlNode.SelectNodes("firstNotionalStepDate");
     if (firstNotionalStepDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in firstNotionalStepDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 firstNotionalStepDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(firstNotionalStepDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 firstNotionalStepDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 firstNotionalStepDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList lastNotionalStepDateNodeList = xmlNode.SelectNodes("lastNotionalStepDate");
     if (lastNotionalStepDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in lastNotionalStepDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 lastNotionalStepDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(lastNotionalStepDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 lastNotionalStepDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 lastNotionalStepDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList notionalStepAmountNodeList = xmlNode.SelectNodes("notionalStepAmount");
     if (notionalStepAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in notionalStepAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 notionalStepAmountIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(notionalStepAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 notionalStepAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 notionalStepAmount = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList notionalStepRateNodeList = xmlNode.SelectNodes("notionalStepRate");
     if (notionalStepRateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in notionalStepRateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 notionalStepRateIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(notionalStepRateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 notionalStepRateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 notionalStepRate = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList stepRelativeToNodeList = xmlNode.SelectNodes("stepRelativeTo");
     if (stepRelativeToNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in stepRelativeToNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 stepRelativeToIDRef = item.Attributes["id"].Name;
                 StepRelativeToEnum ob = StepRelativeToEnum();
                 IDManager.SetID(stepRelativeToIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 stepRelativeToIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 stepRelativeTo = new StepRelativeToEnum(item);
             }
         }
     }
     
 
 }
        public ResetDates(XmlNode xmlNode)
        {
            XmlNode calculationPeriodDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodDatesReference");

            if (calculationPeriodDatesReferenceNode != null)
            {
                if (calculationPeriodDatesReferenceNode.Attributes["href"] != null || calculationPeriodDatesReferenceNode.Attributes["id"] != null)
                {
                    if (calculationPeriodDatesReferenceNode.Attributes["id"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["id"].Value;
                        CalculationPeriodDatesReference ob = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                        IDManager.SetID(calculationPeriodDatesReferenceIDRef_, ob);
                    }
                    else if (calculationPeriodDatesReferenceNode.Attributes["href"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                    }
                }
                else
                {
                    calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                }
            }


            XmlNode resetRelativeToNode = xmlNode.SelectSingleNode("resetRelativeTo");

            if (resetRelativeToNode != null)
            {
                if (resetRelativeToNode.Attributes["href"] != null || resetRelativeToNode.Attributes["id"] != null)
                {
                    if (resetRelativeToNode.Attributes["id"] != null)
                    {
                        resetRelativeToIDRef_ = resetRelativeToNode.Attributes["id"].Value;
                        ResetRelativeToEnum ob = new ResetRelativeToEnum(resetRelativeToNode);
                        IDManager.SetID(resetRelativeToIDRef_, ob);
                    }
                    else if (resetRelativeToNode.Attributes["href"] != null)
                    {
                        resetRelativeToIDRef_ = resetRelativeToNode.Attributes["href"].Value;
                    }
                    else
                    {
                        resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
                    }
                }
                else
                {
                    resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
                }
            }


            XmlNode initialFixingDateNode = xmlNode.SelectSingleNode("initialFixingDate");

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


            XmlNode fixingDatesNode = xmlNode.SelectSingleNode("fixingDates");

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


            XmlNode rateCutOffDaysOffsetNode = xmlNode.SelectSingleNode("rateCutOffDaysOffset");

            if (rateCutOffDaysOffsetNode != null)
            {
                if (rateCutOffDaysOffsetNode.Attributes["href"] != null || rateCutOffDaysOffsetNode.Attributes["id"] != null)
                {
                    if (rateCutOffDaysOffsetNode.Attributes["id"] != null)
                    {
                        rateCutOffDaysOffsetIDRef_ = rateCutOffDaysOffsetNode.Attributes["id"].Value;
                        Offset ob = new Offset(rateCutOffDaysOffsetNode);
                        IDManager.SetID(rateCutOffDaysOffsetIDRef_, ob);
                    }
                    else if (rateCutOffDaysOffsetNode.Attributes["href"] != null)
                    {
                        rateCutOffDaysOffsetIDRef_ = rateCutOffDaysOffsetNode.Attributes["href"].Value;
                    }
                    else
                    {
                        rateCutOffDaysOffset_ = new Offset(rateCutOffDaysOffsetNode);
                    }
                }
                else
                {
                    rateCutOffDaysOffset_ = new Offset(rateCutOffDaysOffsetNode);
                }
            }


            XmlNode resetFrequencyNode = xmlNode.SelectSingleNode("resetFrequency");

            if (resetFrequencyNode != null)
            {
                if (resetFrequencyNode.Attributes["href"] != null || resetFrequencyNode.Attributes["id"] != null)
                {
                    if (resetFrequencyNode.Attributes["id"] != null)
                    {
                        resetFrequencyIDRef_ = resetFrequencyNode.Attributes["id"].Value;
                        ResetFrequency ob = new ResetFrequency(resetFrequencyNode);
                        IDManager.SetID(resetFrequencyIDRef_, ob);
                    }
                    else if (resetFrequencyNode.Attributes["href"] != null)
                    {
                        resetFrequencyIDRef_ = resetFrequencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        resetFrequency_ = new ResetFrequency(resetFrequencyNode);
                    }
                }
                else
                {
                    resetFrequency_ = new ResetFrequency(resetFrequencyNode);
                }
            }


            XmlNode resetDatesAdjustmentsNode = xmlNode.SelectSingleNode("resetDatesAdjustments");

            if (resetDatesAdjustmentsNode != null)
            {
                if (resetDatesAdjustmentsNode.Attributes["href"] != null || resetDatesAdjustmentsNode.Attributes["id"] != null)
                {
                    if (resetDatesAdjustmentsNode.Attributes["id"] != null)
                    {
                        resetDatesAdjustmentsIDRef_ = resetDatesAdjustmentsNode.Attributes["id"].Value;
                        BusinessDayAdjustments ob = new BusinessDayAdjustments(resetDatesAdjustmentsNode);
                        IDManager.SetID(resetDatesAdjustmentsIDRef_, ob);
                    }
                    else if (resetDatesAdjustmentsNode.Attributes["href"] != null)
                    {
                        resetDatesAdjustmentsIDRef_ = resetDatesAdjustmentsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        resetDatesAdjustments_ = new BusinessDayAdjustments(resetDatesAdjustmentsNode);
                    }
                }
                else
                {
                    resetDatesAdjustments_ = new BusinessDayAdjustments(resetDatesAdjustmentsNode);
                }
            }
        }
 public PaymentDates(XmlNode xmlNode)
 {
     XmlNode calculationPeriodDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodDatesReference");
     
     if (calculationPeriodDatesReferenceNode != null)
     {
         if (calculationPeriodDatesReferenceNode.Attributes["href"] != null || calculationPeriodDatesReferenceNode.Attributes["id"] != null) 
         {
             if (calculationPeriodDatesReferenceNode.Attributes["id"] != null) 
             {
                 calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["id"].Value;
                 CalculationPeriodDatesReference ob = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                 IDManager.SetID(calculationPeriodDatesReferenceIDRef_, ob);
             }
             else if (calculationPeriodDatesReferenceNode.Attributes["href"] != null)
             {
                 calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
             }
         }
         else
         {
             calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
         }
     }
     
 
     XmlNode resetDatesReferenceNode = xmlNode.SelectSingleNode("resetDatesReference");
     
     if (resetDatesReferenceNode != null)
     {
         if (resetDatesReferenceNode.Attributes["href"] != null || resetDatesReferenceNode.Attributes["id"] != null) 
         {
             if (resetDatesReferenceNode.Attributes["id"] != null) 
             {
                 resetDatesReferenceIDRef_ = resetDatesReferenceNode.Attributes["id"].Value;
                 ResetDatesReference ob = new ResetDatesReference(resetDatesReferenceNode);
                 IDManager.SetID(resetDatesReferenceIDRef_, ob);
             }
             else if (resetDatesReferenceNode.Attributes["href"] != null)
             {
                 resetDatesReferenceIDRef_ = resetDatesReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 resetDatesReference_ = new ResetDatesReference(resetDatesReferenceNode);
             }
         }
         else
         {
             resetDatesReference_ = new ResetDatesReference(resetDatesReferenceNode);
         }
     }
     
 
     XmlNode valuationDatesReferenceNode = xmlNode.SelectSingleNode("valuationDatesReference");
     
     if (valuationDatesReferenceNode != null)
     {
         if (valuationDatesReferenceNode.Attributes["href"] != null || valuationDatesReferenceNode.Attributes["id"] != null) 
         {
             if (valuationDatesReferenceNode.Attributes["id"] != null) 
             {
                 valuationDatesReferenceIDRef_ = valuationDatesReferenceNode.Attributes["id"].Value;
                 ValuationDatesReference ob = new ValuationDatesReference(valuationDatesReferenceNode);
                 IDManager.SetID(valuationDatesReferenceIDRef_, ob);
             }
             else if (valuationDatesReferenceNode.Attributes["href"] != null)
             {
                 valuationDatesReferenceIDRef_ = valuationDatesReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 valuationDatesReference_ = new ValuationDatesReference(valuationDatesReferenceNode);
             }
         }
         else
         {
             valuationDatesReference_ = new ValuationDatesReference(valuationDatesReferenceNode);
         }
     }
     
 
     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;
                 Frequency ob = new Frequency(paymentFrequencyNode);
                 IDManager.SetID(paymentFrequencyIDRef_, ob);
             }
             else if (paymentFrequencyNode.Attributes["href"] != null)
             {
                 paymentFrequencyIDRef_ = paymentFrequencyNode.Attributes["href"].Value;
             }
             else
             {
                 paymentFrequency_ = new Frequency(paymentFrequencyNode);
             }
         }
         else
         {
             paymentFrequency_ = new Frequency(paymentFrequencyNode);
         }
     }
     
 
     XmlNode firstPaymentDateNode = xmlNode.SelectSingleNode("firstPaymentDate");
     
     if (firstPaymentDateNode != null)
     {
         if (firstPaymentDateNode.Attributes["href"] != null || firstPaymentDateNode.Attributes["id"] != null) 
         {
             if (firstPaymentDateNode.Attributes["id"] != null) 
             {
                 firstPaymentDateIDRef_ = firstPaymentDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(firstPaymentDateNode);
                 IDManager.SetID(firstPaymentDateIDRef_, ob);
             }
             else if (firstPaymentDateNode.Attributes["href"] != null)
             {
                 firstPaymentDateIDRef_ = firstPaymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 firstPaymentDate_ = new XsdTypeDate(firstPaymentDateNode);
             }
         }
         else
         {
             firstPaymentDate_ = new XsdTypeDate(firstPaymentDateNode);
         }
     }
     
 
     XmlNode lastRegularPaymentDateNode = xmlNode.SelectSingleNode("lastRegularPaymentDate");
     
     if (lastRegularPaymentDateNode != null)
     {
         if (lastRegularPaymentDateNode.Attributes["href"] != null || lastRegularPaymentDateNode.Attributes["id"] != null) 
         {
             if (lastRegularPaymentDateNode.Attributes["id"] != null) 
             {
                 lastRegularPaymentDateIDRef_ = lastRegularPaymentDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(lastRegularPaymentDateNode);
                 IDManager.SetID(lastRegularPaymentDateIDRef_, ob);
             }
             else if (lastRegularPaymentDateNode.Attributes["href"] != null)
             {
                 lastRegularPaymentDateIDRef_ = lastRegularPaymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 lastRegularPaymentDate_ = new XsdTypeDate(lastRegularPaymentDateNode);
             }
         }
         else
         {
             lastRegularPaymentDate_ = new XsdTypeDate(lastRegularPaymentDateNode);
         }
     }
     
 
     XmlNode payRelativeToNode = xmlNode.SelectSingleNode("payRelativeTo");
     
     if (payRelativeToNode != null)
     {
         if (payRelativeToNode.Attributes["href"] != null || payRelativeToNode.Attributes["id"] != null) 
         {
             if (payRelativeToNode.Attributes["id"] != null) 
             {
                 payRelativeToIDRef_ = payRelativeToNode.Attributes["id"].Value;
                 PayRelativeToEnum ob = new PayRelativeToEnum(payRelativeToNode);
                 IDManager.SetID(payRelativeToIDRef_, ob);
             }
             else if (payRelativeToNode.Attributes["href"] != null)
             {
                 payRelativeToIDRef_ = payRelativeToNode.Attributes["href"].Value;
             }
             else
             {
                 payRelativeTo_ = new PayRelativeToEnum(payRelativeToNode);
             }
         }
         else
         {
             payRelativeTo_ = new PayRelativeToEnum(payRelativeToNode);
         }
     }
     
 
     XmlNode paymentDaysOffsetNode = xmlNode.SelectSingleNode("paymentDaysOffset");
     
     if (paymentDaysOffsetNode != null)
     {
         if (paymentDaysOffsetNode.Attributes["href"] != null || paymentDaysOffsetNode.Attributes["id"] != null) 
         {
             if (paymentDaysOffsetNode.Attributes["id"] != null) 
             {
                 paymentDaysOffsetIDRef_ = paymentDaysOffsetNode.Attributes["id"].Value;
                 Offset ob = new Offset(paymentDaysOffsetNode);
                 IDManager.SetID(paymentDaysOffsetIDRef_, ob);
             }
             else if (paymentDaysOffsetNode.Attributes["href"] != null)
             {
                 paymentDaysOffsetIDRef_ = paymentDaysOffsetNode.Attributes["href"].Value;
             }
             else
             {
                 paymentDaysOffset_ = new Offset(paymentDaysOffsetNode);
             }
         }
         else
         {
             paymentDaysOffset_ = new Offset(paymentDaysOffsetNode);
         }
     }
     
 
     XmlNode paymentDatesAdjustmentsNode = xmlNode.SelectSingleNode("paymentDatesAdjustments");
     
     if (paymentDatesAdjustmentsNode != null)
     {
         if (paymentDatesAdjustmentsNode.Attributes["href"] != null || paymentDatesAdjustmentsNode.Attributes["id"] != null) 
         {
             if (paymentDatesAdjustmentsNode.Attributes["id"] != null) 
             {
                 paymentDatesAdjustmentsIDRef_ = paymentDatesAdjustmentsNode.Attributes["id"].Value;
                 BusinessDayAdjustments ob = new BusinessDayAdjustments(paymentDatesAdjustmentsNode);
                 IDManager.SetID(paymentDatesAdjustmentsIDRef_, ob);
             }
             else if (paymentDatesAdjustmentsNode.Attributes["href"] != null)
             {
                 paymentDatesAdjustmentsIDRef_ = paymentDatesAdjustmentsNode.Attributes["href"].Value;
             }
             else
             {
                 paymentDatesAdjustments_ = new BusinessDayAdjustments(paymentDatesAdjustmentsNode);
             }
         }
         else
         {
             paymentDatesAdjustments_ = new BusinessDayAdjustments(paymentDatesAdjustmentsNode);
         }
     }
     
 
 }
        public NotionalStepRule(XmlNode xmlNode)
        {
            XmlNode calculationPeriodDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodDatesReference");

            if (calculationPeriodDatesReferenceNode != null)
            {
                if (calculationPeriodDatesReferenceNode.Attributes["href"] != null || calculationPeriodDatesReferenceNode.Attributes["id"] != null)
                {
                    if (calculationPeriodDatesReferenceNode.Attributes["id"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["id"].Value;
                        CalculationPeriodDatesReference ob = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                        IDManager.SetID(calculationPeriodDatesReferenceIDRef_, ob);
                    }
                    else if (calculationPeriodDatesReferenceNode.Attributes["href"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                    }
                }
                else
                {
                    calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                }
            }


            XmlNode stepFrequencyNode = xmlNode.SelectSingleNode("stepFrequency");

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


            XmlNode firstNotionalStepDateNode = xmlNode.SelectSingleNode("firstNotionalStepDate");

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


            XmlNode lastNotionalStepDateNode = xmlNode.SelectSingleNode("lastNotionalStepDate");

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


            XmlNode notionalStepAmountNode = xmlNode.SelectSingleNode("notionalStepAmount");

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


            XmlNode notionalStepRateNode = xmlNode.SelectSingleNode("notionalStepRate");

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


            XmlNode stepRelativeToNode = xmlNode.SelectSingleNode("stepRelativeTo");

            if (stepRelativeToNode != null)
            {
                if (stepRelativeToNode.Attributes["href"] != null || stepRelativeToNode.Attributes["id"] != null)
                {
                    if (stepRelativeToNode.Attributes["id"] != null)
                    {
                        stepRelativeToIDRef_ = stepRelativeToNode.Attributes["id"].Value;
                        StepRelativeToEnum ob = new StepRelativeToEnum(stepRelativeToNode);
                        IDManager.SetID(stepRelativeToIDRef_, ob);
                    }
                    else if (stepRelativeToNode.Attributes["href"] != null)
                    {
                        stepRelativeToIDRef_ = stepRelativeToNode.Attributes["href"].Value;
                    }
                    else
                    {
                        stepRelativeTo_ = new StepRelativeToEnum(stepRelativeToNode);
                    }
                }
                else
                {
                    stepRelativeTo_ = new StepRelativeToEnum(stepRelativeToNode);
                }
            }
        }
        public PaymentDates(XmlNode xmlNode)
        {
            XmlNode calculationPeriodDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodDatesReference");

            if (calculationPeriodDatesReferenceNode != null)
            {
                if (calculationPeriodDatesReferenceNode.Attributes["href"] != null || calculationPeriodDatesReferenceNode.Attributes["id"] != null)
                {
                    if (calculationPeriodDatesReferenceNode.Attributes["id"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["id"].Value;
                        CalculationPeriodDatesReference ob = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                        IDManager.SetID(calculationPeriodDatesReferenceIDRef_, ob);
                    }
                    else if (calculationPeriodDatesReferenceNode.Attributes["href"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                    }
                }
                else
                {
                    calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                }
            }


            XmlNode resetDatesReferenceNode = xmlNode.SelectSingleNode("resetDatesReference");

            if (resetDatesReferenceNode != null)
            {
                if (resetDatesReferenceNode.Attributes["href"] != null || resetDatesReferenceNode.Attributes["id"] != null)
                {
                    if (resetDatesReferenceNode.Attributes["id"] != null)
                    {
                        resetDatesReferenceIDRef_ = resetDatesReferenceNode.Attributes["id"].Value;
                        ResetDatesReference ob = new ResetDatesReference(resetDatesReferenceNode);
                        IDManager.SetID(resetDatesReferenceIDRef_, ob);
                    }
                    else if (resetDatesReferenceNode.Attributes["href"] != null)
                    {
                        resetDatesReferenceIDRef_ = resetDatesReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        resetDatesReference_ = new ResetDatesReference(resetDatesReferenceNode);
                    }
                }
                else
                {
                    resetDatesReference_ = new ResetDatesReference(resetDatesReferenceNode);
                }
            }


            XmlNode valuationDatesReferenceNode = xmlNode.SelectSingleNode("valuationDatesReference");

            if (valuationDatesReferenceNode != null)
            {
                if (valuationDatesReferenceNode.Attributes["href"] != null || valuationDatesReferenceNode.Attributes["id"] != null)
                {
                    if (valuationDatesReferenceNode.Attributes["id"] != null)
                    {
                        valuationDatesReferenceIDRef_ = valuationDatesReferenceNode.Attributes["id"].Value;
                        ValuationDatesReference ob = new ValuationDatesReference(valuationDatesReferenceNode);
                        IDManager.SetID(valuationDatesReferenceIDRef_, ob);
                    }
                    else if (valuationDatesReferenceNode.Attributes["href"] != null)
                    {
                        valuationDatesReferenceIDRef_ = valuationDatesReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        valuationDatesReference_ = new ValuationDatesReference(valuationDatesReferenceNode);
                    }
                }
                else
                {
                    valuationDatesReference_ = new ValuationDatesReference(valuationDatesReferenceNode);
                }
            }


            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;
                        Frequency ob = new Frequency(paymentFrequencyNode);
                        IDManager.SetID(paymentFrequencyIDRef_, ob);
                    }
                    else if (paymentFrequencyNode.Attributes["href"] != null)
                    {
                        paymentFrequencyIDRef_ = paymentFrequencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        paymentFrequency_ = new Frequency(paymentFrequencyNode);
                    }
                }
                else
                {
                    paymentFrequency_ = new Frequency(paymentFrequencyNode);
                }
            }


            XmlNode firstPaymentDateNode = xmlNode.SelectSingleNode("firstPaymentDate");

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


            XmlNode lastRegularPaymentDateNode = xmlNode.SelectSingleNode("lastRegularPaymentDate");

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


            XmlNode payRelativeToNode = xmlNode.SelectSingleNode("payRelativeTo");

            if (payRelativeToNode != null)
            {
                if (payRelativeToNode.Attributes["href"] != null || payRelativeToNode.Attributes["id"] != null)
                {
                    if (payRelativeToNode.Attributes["id"] != null)
                    {
                        payRelativeToIDRef_ = payRelativeToNode.Attributes["id"].Value;
                        PayRelativeToEnum ob = new PayRelativeToEnum(payRelativeToNode);
                        IDManager.SetID(payRelativeToIDRef_, ob);
                    }
                    else if (payRelativeToNode.Attributes["href"] != null)
                    {
                        payRelativeToIDRef_ = payRelativeToNode.Attributes["href"].Value;
                    }
                    else
                    {
                        payRelativeTo_ = new PayRelativeToEnum(payRelativeToNode);
                    }
                }
                else
                {
                    payRelativeTo_ = new PayRelativeToEnum(payRelativeToNode);
                }
            }


            XmlNode paymentDaysOffsetNode = xmlNode.SelectSingleNode("paymentDaysOffset");

            if (paymentDaysOffsetNode != null)
            {
                if (paymentDaysOffsetNode.Attributes["href"] != null || paymentDaysOffsetNode.Attributes["id"] != null)
                {
                    if (paymentDaysOffsetNode.Attributes["id"] != null)
                    {
                        paymentDaysOffsetIDRef_ = paymentDaysOffsetNode.Attributes["id"].Value;
                        Offset ob = new Offset(paymentDaysOffsetNode);
                        IDManager.SetID(paymentDaysOffsetIDRef_, ob);
                    }
                    else if (paymentDaysOffsetNode.Attributes["href"] != null)
                    {
                        paymentDaysOffsetIDRef_ = paymentDaysOffsetNode.Attributes["href"].Value;
                    }
                    else
                    {
                        paymentDaysOffset_ = new Offset(paymentDaysOffsetNode);
                    }
                }
                else
                {
                    paymentDaysOffset_ = new Offset(paymentDaysOffsetNode);
                }
            }


            XmlNode paymentDatesAdjustmentsNode = xmlNode.SelectSingleNode("paymentDatesAdjustments");

            if (paymentDatesAdjustmentsNode != null)
            {
                if (paymentDatesAdjustmentsNode.Attributes["href"] != null || paymentDatesAdjustmentsNode.Attributes["id"] != null)
                {
                    if (paymentDatesAdjustmentsNode.Attributes["id"] != null)
                    {
                        paymentDatesAdjustmentsIDRef_ = paymentDatesAdjustmentsNode.Attributes["id"].Value;
                        BusinessDayAdjustments ob = new BusinessDayAdjustments(paymentDatesAdjustmentsNode);
                        IDManager.SetID(paymentDatesAdjustmentsIDRef_, ob);
                    }
                    else if (paymentDatesAdjustmentsNode.Attributes["href"] != null)
                    {
                        paymentDatesAdjustmentsIDRef_ = paymentDatesAdjustmentsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        paymentDatesAdjustments_ = new BusinessDayAdjustments(paymentDatesAdjustmentsNode);
                    }
                }
                else
                {
                    paymentDatesAdjustments_ = new BusinessDayAdjustments(paymentDatesAdjustmentsNode);
                }
            }
        }