public AdjustedRelativeDateOffset(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList relativeDateAdjustmentsNodeList = xmlNode.SelectNodes("relativeDateAdjustments");
     if (relativeDateAdjustmentsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in relativeDateAdjustmentsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 relativeDateAdjustmentsIDRef = item.Attributes["id"].Name;
                 BusinessDayAdjustments ob = BusinessDayAdjustments();
                 IDManager.SetID(relativeDateAdjustmentsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 relativeDateAdjustmentsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 relativeDateAdjustments = new BusinessDayAdjustments(item);
             }
         }
     }
     
 
 }
        public AdjustedRelativeDateOffset(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode relativeDateAdjustmentsNode = xmlNode.SelectSingleNode("relativeDateAdjustments");

            if (relativeDateAdjustmentsNode != null)
            {
                if (relativeDateAdjustmentsNode.Attributes["href"] != null || relativeDateAdjustmentsNode.Attributes["id"] != null)
                {
                    if (relativeDateAdjustmentsNode.Attributes["id"] != null)
                    {
                        relativeDateAdjustmentsIDRef_ = relativeDateAdjustmentsNode.Attributes["id"].Value;
                        BusinessDayAdjustments ob = new BusinessDayAdjustments(relativeDateAdjustmentsNode);
                        IDManager.SetID(relativeDateAdjustmentsIDRef_, ob);
                    }
                    else if (relativeDateAdjustmentsNode.Attributes["href"] != null)
                    {
                        relativeDateAdjustmentsIDRef_ = relativeDateAdjustmentsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        relativeDateAdjustments_ = new BusinessDayAdjustments(relativeDateAdjustmentsNode);
                    }
                }
                else
                {
                    relativeDateAdjustments_ = new BusinessDayAdjustments(relativeDateAdjustmentsNode);
                }
            }
        }
Exemple #3
0
        public AdjustedRelativeDateOffset(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList relativeDateAdjustmentsNodeList = xmlNode.SelectNodes("relativeDateAdjustments");

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

            foreach (XmlNode item in relativeDateAdjustmentsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        relativeDateAdjustmentsIDRef = item.Attributes["id"].Name;
                        BusinessDayAdjustments ob = BusinessDayAdjustments();
                        IDManager.SetID(relativeDateAdjustmentsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        relativeDateAdjustmentsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        relativeDateAdjustments = new BusinessDayAdjustments(item);
                    }
                }
            }
        }
 public AdjustedRelativeDateOffset(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode relativeDateAdjustmentsNode = xmlNode.SelectSingleNode("relativeDateAdjustments");
     
     if (relativeDateAdjustmentsNode != null)
     {
         if (relativeDateAdjustmentsNode.Attributes["href"] != null || relativeDateAdjustmentsNode.Attributes["id"] != null) 
         {
             if (relativeDateAdjustmentsNode.Attributes["id"] != null) 
             {
                 relativeDateAdjustmentsIDRef_ = relativeDateAdjustmentsNode.Attributes["id"].Value;
                 BusinessDayAdjustments ob = new BusinessDayAdjustments(relativeDateAdjustmentsNode);
                 IDManager.SetID(relativeDateAdjustmentsIDRef_, ob);
             }
             else if (relativeDateAdjustmentsNode.Attributes["href"] != null)
             {
                 relativeDateAdjustmentsIDRef_ = relativeDateAdjustmentsNode.Attributes["href"].Value;
             }
             else
             {
                 relativeDateAdjustments_ = new BusinessDayAdjustments(relativeDateAdjustmentsNode);
             }
         }
         else
         {
             relativeDateAdjustments_ = new BusinessDayAdjustments(relativeDateAdjustmentsNode);
         }
     }
     
 
 }
Exemple #5
0
        public DividendPeriod(XmlNode xmlNode)
        {
            XmlNodeList unadjustedStartDateNodeList = xmlNode.SelectNodes("unadjustedStartDate");

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

            foreach (XmlNode item in unadjustedStartDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        unadjustedStartDateIDRef = item.Attributes["id"].Name;
                        IdentifiedDate ob = IdentifiedDate();
                        IDManager.SetID(unadjustedStartDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        unadjustedStartDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        unadjustedStartDate = new IdentifiedDate(item);
                    }
                }
            }


            XmlNodeList unadjustedEndDateNodeList = xmlNode.SelectNodes("unadjustedEndDate");

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

            foreach (XmlNode item in unadjustedEndDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        unadjustedEndDateIDRef = item.Attributes["id"].Name;
                        IdentifiedDate ob = IdentifiedDate();
                        IDManager.SetID(unadjustedEndDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        unadjustedEndDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        unadjustedEndDate = new IdentifiedDate(item);
                    }
                }
            }


            XmlNodeList dateAdjustmentsNodeList = xmlNode.SelectNodes("dateAdjustments");

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

            foreach (XmlNode item in dateAdjustmentsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dateAdjustmentsIDRef = item.Attributes["id"].Name;
                        BusinessDayAdjustments ob = BusinessDayAdjustments();
                        IDManager.SetID(dateAdjustmentsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dateAdjustmentsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dateAdjustments = new BusinessDayAdjustments(item);
                    }
                }
            }


            XmlNodeList underlyerReferenceNodeList = xmlNode.SelectNodes("underlyerReference");

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

            foreach (XmlNode item in underlyerReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        underlyerReferenceIDRef = item.Attributes["id"].Name;
                        AssetReference ob = AssetReference();
                        IDManager.SetID(underlyerReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        underlyerReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        underlyerReference = new AssetReference(item);
                    }
                }
            }
        }
 public CalculationPeriodDates(XmlNode xmlNode)
 {
     XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate");
     
     if (effectiveDateNode != null)
     {
         if (effectiveDateNode.Attributes["href"] != null || effectiveDateNode.Attributes["id"] != null) 
         {
             if (effectiveDateNode.Attributes["id"] != null) 
             {
                 effectiveDateIDRef_ = effectiveDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(effectiveDateNode);
                 IDManager.SetID(effectiveDateIDRef_, ob);
             }
             else if (effectiveDateNode.Attributes["href"] != null)
             {
                 effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value;
             }
             else
             {
                 effectiveDate_ = new AdjustableDate(effectiveDateNode);
             }
         }
         else
         {
             effectiveDate_ = new AdjustableDate(effectiveDateNode);
         }
     }
     
 
     XmlNode relativeEffectiveDateNode = xmlNode.SelectSingleNode("relativeEffectiveDate");
     
     if (relativeEffectiveDateNode != null)
     {
         if (relativeEffectiveDateNode.Attributes["href"] != null || relativeEffectiveDateNode.Attributes["id"] != null) 
         {
             if (relativeEffectiveDateNode.Attributes["id"] != null) 
             {
                 relativeEffectiveDateIDRef_ = relativeEffectiveDateNode.Attributes["id"].Value;
                 AdjustedRelativeDateOffset ob = new AdjustedRelativeDateOffset(relativeEffectiveDateNode);
                 IDManager.SetID(relativeEffectiveDateIDRef_, ob);
             }
             else if (relativeEffectiveDateNode.Attributes["href"] != null)
             {
                 relativeEffectiveDateIDRef_ = relativeEffectiveDateNode.Attributes["href"].Value;
             }
             else
             {
                 relativeEffectiveDate_ = new AdjustedRelativeDateOffset(relativeEffectiveDateNode);
             }
         }
         else
         {
             relativeEffectiveDate_ = new AdjustedRelativeDateOffset(relativeEffectiveDateNode);
         }
     }
     
 
     XmlNode terminationDateNode = xmlNode.SelectSingleNode("terminationDate");
     
     if (terminationDateNode != null)
     {
         if (terminationDateNode.Attributes["href"] != null || terminationDateNode.Attributes["id"] != null) 
         {
             if (terminationDateNode.Attributes["id"] != null) 
             {
                 terminationDateIDRef_ = terminationDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(terminationDateNode);
                 IDManager.SetID(terminationDateIDRef_, ob);
             }
             else if (terminationDateNode.Attributes["href"] != null)
             {
                 terminationDateIDRef_ = terminationDateNode.Attributes["href"].Value;
             }
             else
             {
                 terminationDate_ = new AdjustableDate(terminationDateNode);
             }
         }
         else
         {
             terminationDate_ = new AdjustableDate(terminationDateNode);
         }
     }
     
 
     XmlNode relativeTerminationDateNode = xmlNode.SelectSingleNode("relativeTerminationDate");
     
     if (relativeTerminationDateNode != null)
     {
         if (relativeTerminationDateNode.Attributes["href"] != null || relativeTerminationDateNode.Attributes["id"] != null) 
         {
             if (relativeTerminationDateNode.Attributes["id"] != null) 
             {
                 relativeTerminationDateIDRef_ = relativeTerminationDateNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(relativeTerminationDateNode);
                 IDManager.SetID(relativeTerminationDateIDRef_, ob);
             }
             else if (relativeTerminationDateNode.Attributes["href"] != null)
             {
                 relativeTerminationDateIDRef_ = relativeTerminationDateNode.Attributes["href"].Value;
             }
             else
             {
                 relativeTerminationDate_ = new RelativeDateOffset(relativeTerminationDateNode);
             }
         }
         else
         {
             relativeTerminationDate_ = new RelativeDateOffset(relativeTerminationDateNode);
         }
     }
     
 
     XmlNode calculationPeriodDatesAdjustmentsNode = xmlNode.SelectSingleNode("calculationPeriodDatesAdjustments");
     
     if (calculationPeriodDatesAdjustmentsNode != null)
     {
         if (calculationPeriodDatesAdjustmentsNode.Attributes["href"] != null || calculationPeriodDatesAdjustmentsNode.Attributes["id"] != null) 
         {
             if (calculationPeriodDatesAdjustmentsNode.Attributes["id"] != null) 
             {
                 calculationPeriodDatesAdjustmentsIDRef_ = calculationPeriodDatesAdjustmentsNode.Attributes["id"].Value;
                 BusinessDayAdjustments ob = new BusinessDayAdjustments(calculationPeriodDatesAdjustmentsNode);
                 IDManager.SetID(calculationPeriodDatesAdjustmentsIDRef_, ob);
             }
             else if (calculationPeriodDatesAdjustmentsNode.Attributes["href"] != null)
             {
                 calculationPeriodDatesAdjustmentsIDRef_ = calculationPeriodDatesAdjustmentsNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodDatesAdjustments_ = new BusinessDayAdjustments(calculationPeriodDatesAdjustmentsNode);
             }
         }
         else
         {
             calculationPeriodDatesAdjustments_ = new BusinessDayAdjustments(calculationPeriodDatesAdjustmentsNode);
         }
     }
     
 
     XmlNode firstPeriodStartDateNode = xmlNode.SelectSingleNode("firstPeriodStartDate");
     
     if (firstPeriodStartDateNode != null)
     {
         if (firstPeriodStartDateNode.Attributes["href"] != null || firstPeriodStartDateNode.Attributes["id"] != null) 
         {
             if (firstPeriodStartDateNode.Attributes["id"] != null) 
             {
                 firstPeriodStartDateIDRef_ = firstPeriodStartDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(firstPeriodStartDateNode);
                 IDManager.SetID(firstPeriodStartDateIDRef_, ob);
             }
             else if (firstPeriodStartDateNode.Attributes["href"] != null)
             {
                 firstPeriodStartDateIDRef_ = firstPeriodStartDateNode.Attributes["href"].Value;
             }
             else
             {
                 firstPeriodStartDate_ = new AdjustableDate(firstPeriodStartDateNode);
             }
         }
         else
         {
             firstPeriodStartDate_ = new AdjustableDate(firstPeriodStartDateNode);
         }
     }
     
 
     XmlNode firstRegularPeriodStartDateNode = xmlNode.SelectSingleNode("firstRegularPeriodStartDate");
     
     if (firstRegularPeriodStartDateNode != null)
     {
         if (firstRegularPeriodStartDateNode.Attributes["href"] != null || firstRegularPeriodStartDateNode.Attributes["id"] != null) 
         {
             if (firstRegularPeriodStartDateNode.Attributes["id"] != null) 
             {
                 firstRegularPeriodStartDateIDRef_ = firstRegularPeriodStartDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(firstRegularPeriodStartDateNode);
                 IDManager.SetID(firstRegularPeriodStartDateIDRef_, ob);
             }
             else if (firstRegularPeriodStartDateNode.Attributes["href"] != null)
             {
                 firstRegularPeriodStartDateIDRef_ = firstRegularPeriodStartDateNode.Attributes["href"].Value;
             }
             else
             {
                 firstRegularPeriodStartDate_ = new XsdTypeDate(firstRegularPeriodStartDateNode);
             }
         }
         else
         {
             firstRegularPeriodStartDate_ = new XsdTypeDate(firstRegularPeriodStartDateNode);
         }
     }
     
 
     XmlNode firstCompoundingPeriodEndDateNode = xmlNode.SelectSingleNode("firstCompoundingPeriodEndDate");
     
     if (firstCompoundingPeriodEndDateNode != null)
     {
         if (firstCompoundingPeriodEndDateNode.Attributes["href"] != null || firstCompoundingPeriodEndDateNode.Attributes["id"] != null) 
         {
             if (firstCompoundingPeriodEndDateNode.Attributes["id"] != null) 
             {
                 firstCompoundingPeriodEndDateIDRef_ = firstCompoundingPeriodEndDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(firstCompoundingPeriodEndDateNode);
                 IDManager.SetID(firstCompoundingPeriodEndDateIDRef_, ob);
             }
             else if (firstCompoundingPeriodEndDateNode.Attributes["href"] != null)
             {
                 firstCompoundingPeriodEndDateIDRef_ = firstCompoundingPeriodEndDateNode.Attributes["href"].Value;
             }
             else
             {
                 firstCompoundingPeriodEndDate_ = new XsdTypeDate(firstCompoundingPeriodEndDateNode);
             }
         }
         else
         {
             firstCompoundingPeriodEndDate_ = new XsdTypeDate(firstCompoundingPeriodEndDateNode);
         }
     }
     
 
     XmlNode lastRegularPeriodEndDateNode = xmlNode.SelectSingleNode("lastRegularPeriodEndDate");
     
     if (lastRegularPeriodEndDateNode != null)
     {
         if (lastRegularPeriodEndDateNode.Attributes["href"] != null || lastRegularPeriodEndDateNode.Attributes["id"] != null) 
         {
             if (lastRegularPeriodEndDateNode.Attributes["id"] != null) 
             {
                 lastRegularPeriodEndDateIDRef_ = lastRegularPeriodEndDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(lastRegularPeriodEndDateNode);
                 IDManager.SetID(lastRegularPeriodEndDateIDRef_, ob);
             }
             else if (lastRegularPeriodEndDateNode.Attributes["href"] != null)
             {
                 lastRegularPeriodEndDateIDRef_ = lastRegularPeriodEndDateNode.Attributes["href"].Value;
             }
             else
             {
                 lastRegularPeriodEndDate_ = new XsdTypeDate(lastRegularPeriodEndDateNode);
             }
         }
         else
         {
             lastRegularPeriodEndDate_ = new XsdTypeDate(lastRegularPeriodEndDateNode);
         }
     }
     
 
     XmlNode stubPeriodTypeNode = xmlNode.SelectSingleNode("stubPeriodType");
     
     if (stubPeriodTypeNode != null)
     {
         if (stubPeriodTypeNode.Attributes["href"] != null || stubPeriodTypeNode.Attributes["id"] != null) 
         {
             if (stubPeriodTypeNode.Attributes["id"] != null) 
             {
                 stubPeriodTypeIDRef_ = stubPeriodTypeNode.Attributes["id"].Value;
                 StubPeriodTypeEnum ob = new StubPeriodTypeEnum(stubPeriodTypeNode);
                 IDManager.SetID(stubPeriodTypeIDRef_, ob);
             }
             else if (stubPeriodTypeNode.Attributes["href"] != null)
             {
                 stubPeriodTypeIDRef_ = stubPeriodTypeNode.Attributes["href"].Value;
             }
             else
             {
                 stubPeriodType_ = new StubPeriodTypeEnum(stubPeriodTypeNode);
             }
         }
         else
         {
             stubPeriodType_ = new StubPeriodTypeEnum(stubPeriodTypeNode);
         }
     }
     
 
     XmlNode calculationPeriodFrequencyNode = xmlNode.SelectSingleNode("calculationPeriodFrequency");
     
     if (calculationPeriodFrequencyNode != null)
     {
         if (calculationPeriodFrequencyNode.Attributes["href"] != null || calculationPeriodFrequencyNode.Attributes["id"] != null) 
         {
             if (calculationPeriodFrequencyNode.Attributes["id"] != null) 
             {
                 calculationPeriodFrequencyIDRef_ = calculationPeriodFrequencyNode.Attributes["id"].Value;
                 CalculationPeriodFrequency ob = new CalculationPeriodFrequency(calculationPeriodFrequencyNode);
                 IDManager.SetID(calculationPeriodFrequencyIDRef_, ob);
             }
             else if (calculationPeriodFrequencyNode.Attributes["href"] != null)
             {
                 calculationPeriodFrequencyIDRef_ = calculationPeriodFrequencyNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodFrequency_ = new CalculationPeriodFrequency(calculationPeriodFrequencyNode);
             }
         }
         else
         {
             calculationPeriodFrequency_ = new CalculationPeriodFrequency(calculationPeriodFrequencyNode);
         }
     }
     
 
 }
 public DividendPeriod(XmlNode xmlNode)
 {
     XmlNodeList unadjustedStartDateNodeList = xmlNode.SelectNodes("unadjustedStartDate");
     if (unadjustedStartDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in unadjustedStartDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 unadjustedStartDateIDRef = item.Attributes["id"].Name;
                 IdentifiedDate ob = IdentifiedDate();
                 IDManager.SetID(unadjustedStartDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 unadjustedStartDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 unadjustedStartDate = new IdentifiedDate(item);
             }
         }
     }
     
 
     XmlNodeList unadjustedEndDateNodeList = xmlNode.SelectNodes("unadjustedEndDate");
     if (unadjustedEndDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in unadjustedEndDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 unadjustedEndDateIDRef = item.Attributes["id"].Name;
                 IdentifiedDate ob = IdentifiedDate();
                 IDManager.SetID(unadjustedEndDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 unadjustedEndDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 unadjustedEndDate = new IdentifiedDate(item);
             }
         }
     }
     
 
     XmlNodeList dateAdjustmentsNodeList = xmlNode.SelectNodes("dateAdjustments");
     if (dateAdjustmentsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in dateAdjustmentsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 dateAdjustmentsIDRef = item.Attributes["id"].Name;
                 BusinessDayAdjustments ob = BusinessDayAdjustments();
                 IDManager.SetID(dateAdjustmentsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 dateAdjustmentsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 dateAdjustments = new BusinessDayAdjustments(item);
             }
         }
     }
     
 
     XmlNodeList underlyerReferenceNodeList = xmlNode.SelectNodes("underlyerReference");
     if (underlyerReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in underlyerReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 underlyerReferenceIDRef = item.Attributes["id"].Name;
                 AssetReference ob = AssetReference();
                 IDManager.SetID(underlyerReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 underlyerReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 underlyerReference = new AssetReference(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 GeneralTerms(XmlNode xmlNode)
        {
            XmlNodeList effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate");

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

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


            XmlNodeList scheduledTerminationDateNodeList = xmlNode.SelectNodes("scheduledTerminationDate");

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

            foreach (XmlNode item in scheduledTerminationDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        scheduledTerminationDateIDRef = item.Attributes["id"].Name;
                        AdjustableDate2 ob = AdjustableDate2();
                        IDManager.SetID(scheduledTerminationDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        scheduledTerminationDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        scheduledTerminationDate = new AdjustableDate2(item);
                    }
                }
            }


            XmlNodeList buyerPartyReferenceNodeList = xmlNode.SelectNodes("buyerPartyReference");

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

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


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

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

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


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

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

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


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

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

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


            XmlNodeList dateAdjustmentsNodeList = xmlNode.SelectNodes("dateAdjustments");

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

            foreach (XmlNode item in dateAdjustmentsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dateAdjustmentsIDRef = item.Attributes["id"].Name;
                        BusinessDayAdjustments ob = BusinessDayAdjustments();
                        IDManager.SetID(dateAdjustmentsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dateAdjustmentsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dateAdjustments = new BusinessDayAdjustments(item);
                    }
                }
            }


            XmlNodeList referenceInformationNodeList = xmlNode.SelectNodes("referenceInformation");

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

            foreach (XmlNode item in referenceInformationNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        referenceInformationIDRef = item.Attributes["id"].Name;
                        ReferenceInformation ob = ReferenceInformation();
                        IDManager.SetID(referenceInformationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        referenceInformationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        referenceInformation = new ReferenceInformation(item);
                    }
                }
            }


            XmlNodeList indexReferenceInformationNodeList = xmlNode.SelectNodes("indexReferenceInformation");

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

            foreach (XmlNode item in indexReferenceInformationNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        indexReferenceInformationIDRef = item.Attributes["id"].Name;
                        IndexReferenceInformation ob = IndexReferenceInformation();
                        IDManager.SetID(indexReferenceInformationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        indexReferenceInformationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        indexReferenceInformation = new IndexReferenceInformation(item);
                    }
                }
            }


            XmlNodeList basketReferenceInformationNodeList = xmlNode.SelectNodes("basketReferenceInformation");

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

            foreach (XmlNode item in basketReferenceInformationNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        basketReferenceInformationIDRef = item.Attributes["id"].Name;
                        BasketReferenceInformation ob = BasketReferenceInformation();
                        IDManager.SetID(basketReferenceInformationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        basketReferenceInformationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        basketReferenceInformation = new BasketReferenceInformation(item);
                    }
                }
            }


            XmlNodeList additionalTermNodeList = xmlNode.SelectNodes("additionalTerm");

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


            XmlNodeList substitutionNodeList = xmlNode.SelectNodes("substitution");

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

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


            XmlNodeList modifiedEquityDeliveryNodeList = xmlNode.SelectNodes("modifiedEquityDelivery");

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

            foreach (XmlNode item in modifiedEquityDeliveryNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        modifiedEquityDeliveryIDRef = item.Attributes["id"].Name;
                        XsdTypeBoolean ob = XsdTypeBoolean();
                        IDManager.SetID(modifiedEquityDeliveryIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        modifiedEquityDeliveryIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        modifiedEquityDelivery = new XsdTypeBoolean(item);
                    }
                }
            }
        }
        public CalculationPeriodDates(XmlNode xmlNode)
        {
            XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate");

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


            XmlNode relativeEffectiveDateNode = xmlNode.SelectSingleNode("relativeEffectiveDate");

            if (relativeEffectiveDateNode != null)
            {
                if (relativeEffectiveDateNode.Attributes["href"] != null || relativeEffectiveDateNode.Attributes["id"] != null)
                {
                    if (relativeEffectiveDateNode.Attributes["id"] != null)
                    {
                        relativeEffectiveDateIDRef_ = relativeEffectiveDateNode.Attributes["id"].Value;
                        AdjustedRelativeDateOffset ob = new AdjustedRelativeDateOffset(relativeEffectiveDateNode);
                        IDManager.SetID(relativeEffectiveDateIDRef_, ob);
                    }
                    else if (relativeEffectiveDateNode.Attributes["href"] != null)
                    {
                        relativeEffectiveDateIDRef_ = relativeEffectiveDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        relativeEffectiveDate_ = new AdjustedRelativeDateOffset(relativeEffectiveDateNode);
                    }
                }
                else
                {
                    relativeEffectiveDate_ = new AdjustedRelativeDateOffset(relativeEffectiveDateNode);
                }
            }


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

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


            XmlNode relativeTerminationDateNode = xmlNode.SelectSingleNode("relativeTerminationDate");

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


            XmlNode calculationPeriodDatesAdjustmentsNode = xmlNode.SelectSingleNode("calculationPeriodDatesAdjustments");

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


            XmlNode firstPeriodStartDateNode = xmlNode.SelectSingleNode("firstPeriodStartDate");

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


            XmlNode firstRegularPeriodStartDateNode = xmlNode.SelectSingleNode("firstRegularPeriodStartDate");

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


            XmlNode firstCompoundingPeriodEndDateNode = xmlNode.SelectSingleNode("firstCompoundingPeriodEndDate");

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


            XmlNode lastRegularPeriodEndDateNode = xmlNode.SelectSingleNode("lastRegularPeriodEndDate");

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


            XmlNode stubPeriodTypeNode = xmlNode.SelectSingleNode("stubPeriodType");

            if (stubPeriodTypeNode != null)
            {
                if (stubPeriodTypeNode.Attributes["href"] != null || stubPeriodTypeNode.Attributes["id"] != null)
                {
                    if (stubPeriodTypeNode.Attributes["id"] != null)
                    {
                        stubPeriodTypeIDRef_ = stubPeriodTypeNode.Attributes["id"].Value;
                        StubPeriodTypeEnum ob = new StubPeriodTypeEnum(stubPeriodTypeNode);
                        IDManager.SetID(stubPeriodTypeIDRef_, ob);
                    }
                    else if (stubPeriodTypeNode.Attributes["href"] != null)
                    {
                        stubPeriodTypeIDRef_ = stubPeriodTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        stubPeriodType_ = new StubPeriodTypeEnum(stubPeriodTypeNode);
                    }
                }
                else
                {
                    stubPeriodType_ = new StubPeriodTypeEnum(stubPeriodTypeNode);
                }
            }


            XmlNode calculationPeriodFrequencyNode = xmlNode.SelectSingleNode("calculationPeriodFrequency");

            if (calculationPeriodFrequencyNode != null)
            {
                if (calculationPeriodFrequencyNode.Attributes["href"] != null || calculationPeriodFrequencyNode.Attributes["id"] != null)
                {
                    if (calculationPeriodFrequencyNode.Attributes["id"] != null)
                    {
                        calculationPeriodFrequencyIDRef_ = calculationPeriodFrequencyNode.Attributes["id"].Value;
                        CalculationPeriodFrequency ob = new CalculationPeriodFrequency(calculationPeriodFrequencyNode);
                        IDManager.SetID(calculationPeriodFrequencyIDRef_, ob);
                    }
                    else if (calculationPeriodFrequencyNode.Attributes["href"] != null)
                    {
                        calculationPeriodFrequencyIDRef_ = calculationPeriodFrequencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodFrequency_ = new CalculationPeriodFrequency(calculationPeriodFrequencyNode);
                    }
                }
                else
                {
                    calculationPeriodFrequency_ = new CalculationPeriodFrequency(calculationPeriodFrequencyNode);
                }
            }
        }
Exemple #11
0
        public DividendPeriod(XmlNode xmlNode)
        {
            XmlNode unadjustedStartDateNode = xmlNode.SelectSingleNode("unadjustedStartDate");

            if (unadjustedStartDateNode != null)
            {
                if (unadjustedStartDateNode.Attributes["href"] != null || unadjustedStartDateNode.Attributes["id"] != null)
                {
                    if (unadjustedStartDateNode.Attributes["id"] != null)
                    {
                        unadjustedStartDateIDRef_ = unadjustedStartDateNode.Attributes["id"].Value;
                        IdentifiedDate ob = new IdentifiedDate(unadjustedStartDateNode);
                        IDManager.SetID(unadjustedStartDateIDRef_, ob);
                    }
                    else if (unadjustedStartDateNode.Attributes["href"] != null)
                    {
                        unadjustedStartDateIDRef_ = unadjustedStartDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        unadjustedStartDate_ = new IdentifiedDate(unadjustedStartDateNode);
                    }
                }
                else
                {
                    unadjustedStartDate_ = new IdentifiedDate(unadjustedStartDateNode);
                }
            }


            XmlNode unadjustedEndDateNode = xmlNode.SelectSingleNode("unadjustedEndDate");

            if (unadjustedEndDateNode != null)
            {
                if (unadjustedEndDateNode.Attributes["href"] != null || unadjustedEndDateNode.Attributes["id"] != null)
                {
                    if (unadjustedEndDateNode.Attributes["id"] != null)
                    {
                        unadjustedEndDateIDRef_ = unadjustedEndDateNode.Attributes["id"].Value;
                        IdentifiedDate ob = new IdentifiedDate(unadjustedEndDateNode);
                        IDManager.SetID(unadjustedEndDateIDRef_, ob);
                    }
                    else if (unadjustedEndDateNode.Attributes["href"] != null)
                    {
                        unadjustedEndDateIDRef_ = unadjustedEndDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        unadjustedEndDate_ = new IdentifiedDate(unadjustedEndDateNode);
                    }
                }
                else
                {
                    unadjustedEndDate_ = new IdentifiedDate(unadjustedEndDateNode);
                }
            }


            XmlNode dateAdjustmentsNode = xmlNode.SelectSingleNode("dateAdjustments");

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


            XmlNode underlyerReferenceNode = xmlNode.SelectSingleNode("underlyerReference");

            if (underlyerReferenceNode != null)
            {
                if (underlyerReferenceNode.Attributes["href"] != null || underlyerReferenceNode.Attributes["id"] != null)
                {
                    if (underlyerReferenceNode.Attributes["id"] != null)
                    {
                        underlyerReferenceIDRef_ = underlyerReferenceNode.Attributes["id"].Value;
                        AssetReference ob = new AssetReference(underlyerReferenceNode);
                        IDManager.SetID(underlyerReferenceIDRef_, ob);
                    }
                    else if (underlyerReferenceNode.Attributes["href"] != null)
                    {
                        underlyerReferenceIDRef_ = underlyerReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        underlyerReference_ = new AssetReference(underlyerReferenceNode);
                    }
                }
                else
                {
                    underlyerReference_ = new AssetReference(underlyerReferenceNode);
                }
            }
        }
        public AdjustableDates(XmlNode xmlNode)
        {
            XmlNodeList unadjustedDateNodeList = xmlNode.SelectNodes("unadjustedDate");

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


            XmlNode dateAdjustmentsNode = xmlNode.SelectSingleNode("dateAdjustments");

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


            XmlNodeList adjustedDateNodeList = xmlNode.SelectNodes("adjustedDate");

            if (adjustedDateNodeList != null)
            {
                this.adjustedDate_ = new List <IdentifiedDate>();
                foreach (XmlNode item in adjustedDateNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            adjustedDateIDRef_ = item.Attributes["id"].Value;
                            adjustedDate_.Add(new IdentifiedDate(item));
                            IDManager.SetID(adjustedDateIDRef_, adjustedDate_[adjustedDate_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            adjustedDateIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            adjustedDate_.Add(new IdentifiedDate(item));
                        }
                    }
                    else
                    {
                        adjustedDate_.Add(new IdentifiedDate(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 AdjustableDate2(XmlNode xmlNode)
 {
     XmlNode unadjustedDateNode = xmlNode.SelectSingleNode("unadjustedDate");
     
     if (unadjustedDateNode != null)
     {
         if (unadjustedDateNode.Attributes["href"] != null || unadjustedDateNode.Attributes["id"] != null) 
         {
             if (unadjustedDateNode.Attributes["id"] != null) 
             {
                 unadjustedDateIDRef_ = unadjustedDateNode.Attributes["id"].Value;
                 IdentifiedDate ob = new IdentifiedDate(unadjustedDateNode);
                 IDManager.SetID(unadjustedDateIDRef_, ob);
             }
             else if (unadjustedDateNode.Attributes["href"] != null)
             {
                 unadjustedDateIDRef_ = unadjustedDateNode.Attributes["href"].Value;
             }
             else
             {
                 unadjustedDate_ = new IdentifiedDate(unadjustedDateNode);
             }
         }
         else
         {
             unadjustedDate_ = new IdentifiedDate(unadjustedDateNode);
         }
     }
     
 
     XmlNode dateAdjustmentsNode = xmlNode.SelectSingleNode("dateAdjustments");
     
     if (dateAdjustmentsNode != null)
     {
         if (dateAdjustmentsNode.Attributes["href"] != null || dateAdjustmentsNode.Attributes["id"] != null) 
         {
             if (dateAdjustmentsNode.Attributes["id"] != null) 
             {
                 dateAdjustmentsIDRef_ = dateAdjustmentsNode.Attributes["id"].Value;
                 BusinessDayAdjustments ob = new BusinessDayAdjustments(dateAdjustmentsNode);
                 IDManager.SetID(dateAdjustmentsIDRef_, ob);
             }
             else if (dateAdjustmentsNode.Attributes["href"] != null)
             {
                 dateAdjustmentsIDRef_ = dateAdjustmentsNode.Attributes["href"].Value;
             }
             else
             {
                 dateAdjustments_ = new BusinessDayAdjustments(dateAdjustmentsNode);
             }
         }
         else
         {
             dateAdjustments_ = new BusinessDayAdjustments(dateAdjustmentsNode);
         }
     }
     
 
     XmlNode dateAdjustmentsReferenceNode = xmlNode.SelectSingleNode("dateAdjustmentsReference");
     
     if (dateAdjustmentsReferenceNode != null)
     {
         if (dateAdjustmentsReferenceNode.Attributes["href"] != null || dateAdjustmentsReferenceNode.Attributes["id"] != null) 
         {
             if (dateAdjustmentsReferenceNode.Attributes["id"] != null) 
             {
                 dateAdjustmentsReferenceIDRef_ = dateAdjustmentsReferenceNode.Attributes["id"].Value;
                 BusinessDayAdjustmentsReference ob = new BusinessDayAdjustmentsReference(dateAdjustmentsReferenceNode);
                 IDManager.SetID(dateAdjustmentsReferenceIDRef_, ob);
             }
             else if (dateAdjustmentsReferenceNode.Attributes["href"] != null)
             {
                 dateAdjustmentsReferenceIDRef_ = dateAdjustmentsReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 dateAdjustmentsReference_ = new BusinessDayAdjustmentsReference(dateAdjustmentsReferenceNode);
             }
         }
         else
         {
             dateAdjustmentsReference_ = new BusinessDayAdjustmentsReference(dateAdjustmentsReferenceNode);
         }
     }
     
 
     XmlNode adjustedDateNode = xmlNode.SelectSingleNode("adjustedDate");
     
     if (adjustedDateNode != null)
     {
         if (adjustedDateNode.Attributes["href"] != null || adjustedDateNode.Attributes["id"] != null) 
         {
             if (adjustedDateNode.Attributes["id"] != null) 
             {
                 adjustedDateIDRef_ = adjustedDateNode.Attributes["id"].Value;
                 IdentifiedDate ob = new IdentifiedDate(adjustedDateNode);
                 IDManager.SetID(adjustedDateIDRef_, ob);
             }
             else if (adjustedDateNode.Attributes["href"] != null)
             {
                 adjustedDateIDRef_ = adjustedDateNode.Attributes["href"].Value;
             }
             else
             {
                 adjustedDate_ = new IdentifiedDate(adjustedDateNode);
             }
         }
         else
         {
             adjustedDate_ = new IdentifiedDate(adjustedDateNode);
         }
     }
     
 
 }
 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 PeriodicDates(XmlNode xmlNode)
 {
     XmlNodeList calculationStartDateNodeList = xmlNode.SelectNodes("calculationStartDate");
     if (calculationStartDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationStartDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationStartDateIDRef = item.Attributes["id"].Name;
                 AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                 IDManager.SetID(calculationStartDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationStartDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationStartDate = new AdjustableOrRelativeDate(item);
             }
         }
     }
     
 
     XmlNodeList calculationEndDateNodeList = xmlNode.SelectNodes("calculationEndDate");
     if (calculationEndDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationEndDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationEndDateIDRef = item.Attributes["id"].Name;
                 AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                 IDManager.SetID(calculationEndDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationEndDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationEndDate = new AdjustableOrRelativeDate(item);
             }
         }
     }
     
 
     XmlNodeList calculationPeriodFrequencyNodeList = xmlNode.SelectNodes("calculationPeriodFrequency");
     if (calculationPeriodFrequencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodFrequencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodFrequencyIDRef = item.Attributes["id"].Name;
                 CalculationPeriodFrequency ob = CalculationPeriodFrequency();
                 IDManager.SetID(calculationPeriodFrequencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodFrequencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodFrequency = new CalculationPeriodFrequency(item);
             }
         }
     }
     
 
     XmlNodeList calculationPeriodDatesAdjustmentsNodeList = xmlNode.SelectNodes("calculationPeriodDatesAdjustments");
     if (calculationPeriodDatesAdjustmentsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodDatesAdjustmentsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodDatesAdjustmentsIDRef = item.Attributes["id"].Name;
                 BusinessDayAdjustments ob = BusinessDayAdjustments();
                 IDManager.SetID(calculationPeriodDatesAdjustmentsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodDatesAdjustmentsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodDatesAdjustments = new BusinessDayAdjustments(item);
             }
         }
     }
     
 
 }
        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);
                }
            }
        }
Exemple #18
0
        public AdjustableDates(XmlNode xmlNode)
        {
            XmlNodeList unadjustedDateNodeList = xmlNode.SelectNodes("unadjustedDate");

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


            XmlNodeList dateAdjustmentsNodeList = xmlNode.SelectNodes("dateAdjustments");

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

            foreach (XmlNode item in dateAdjustmentsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dateAdjustmentsIDRef = item.Attributes["id"].Name;
                        BusinessDayAdjustments ob = BusinessDayAdjustments();
                        IDManager.SetID(dateAdjustmentsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dateAdjustmentsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dateAdjustments = new BusinessDayAdjustments(item);
                    }
                }
            }


            XmlNodeList adjustedDateNodeList = xmlNode.SelectNodes("adjustedDate");

            foreach (XmlNode item in adjustedDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        adjustedDateIDRef = item.Attributes["id"].Name;
                        List <IdentifiedDate> ob = new List <IdentifiedDate>();
                        ob.Add(new IdentifiedDate(item));
                        IDManager.SetID(adjustedDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        adjustedDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        adjustedDate.Add(new IdentifiedDate(item));
                    }
                }
            }
        }
Exemple #19
0
        public AdjustableDate2(XmlNode xmlNode)
        {
            XmlNode unadjustedDateNode = xmlNode.SelectSingleNode("unadjustedDate");

            if (unadjustedDateNode != null)
            {
                if (unadjustedDateNode.Attributes["href"] != null || unadjustedDateNode.Attributes["id"] != null)
                {
                    if (unadjustedDateNode.Attributes["id"] != null)
                    {
                        unadjustedDateIDRef_ = unadjustedDateNode.Attributes["id"].Value;
                        IdentifiedDate ob = new IdentifiedDate(unadjustedDateNode);
                        IDManager.SetID(unadjustedDateIDRef_, ob);
                    }
                    else if (unadjustedDateNode.Attributes["href"] != null)
                    {
                        unadjustedDateIDRef_ = unadjustedDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        unadjustedDate_ = new IdentifiedDate(unadjustedDateNode);
                    }
                }
                else
                {
                    unadjustedDate_ = new IdentifiedDate(unadjustedDateNode);
                }
            }


            XmlNode dateAdjustmentsNode = xmlNode.SelectSingleNode("dateAdjustments");

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


            XmlNode dateAdjustmentsReferenceNode = xmlNode.SelectSingleNode("dateAdjustmentsReference");

            if (dateAdjustmentsReferenceNode != null)
            {
                if (dateAdjustmentsReferenceNode.Attributes["href"] != null || dateAdjustmentsReferenceNode.Attributes["id"] != null)
                {
                    if (dateAdjustmentsReferenceNode.Attributes["id"] != null)
                    {
                        dateAdjustmentsReferenceIDRef_ = dateAdjustmentsReferenceNode.Attributes["id"].Value;
                        BusinessDayAdjustmentsReference ob = new BusinessDayAdjustmentsReference(dateAdjustmentsReferenceNode);
                        IDManager.SetID(dateAdjustmentsReferenceIDRef_, ob);
                    }
                    else if (dateAdjustmentsReferenceNode.Attributes["href"] != null)
                    {
                        dateAdjustmentsReferenceIDRef_ = dateAdjustmentsReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dateAdjustmentsReference_ = new BusinessDayAdjustmentsReference(dateAdjustmentsReferenceNode);
                    }
                }
                else
                {
                    dateAdjustmentsReference_ = new BusinessDayAdjustmentsReference(dateAdjustmentsReferenceNode);
                }
            }


            XmlNode adjustedDateNode = xmlNode.SelectSingleNode("adjustedDate");

            if (adjustedDateNode != null)
            {
                if (adjustedDateNode.Attributes["href"] != null || adjustedDateNode.Attributes["id"] != null)
                {
                    if (adjustedDateNode.Attributes["id"] != null)
                    {
                        adjustedDateIDRef_ = adjustedDateNode.Attributes["id"].Value;
                        IdentifiedDate ob = new IdentifiedDate(adjustedDateNode);
                        IDManager.SetID(adjustedDateIDRef_, ob);
                    }
                    else if (adjustedDateNode.Attributes["href"] != null)
                    {
                        adjustedDateIDRef_ = adjustedDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        adjustedDate_ = new IdentifiedDate(adjustedDateNode);
                    }
                }
                else
                {
                    adjustedDate_ = new IdentifiedDate(adjustedDateNode);
                }
            }
        }
 public AdjustableDates(XmlNode xmlNode)
 {
     XmlNodeList unadjustedDateNodeList = xmlNode.SelectNodes("unadjustedDate");
     
     if (unadjustedDateNodeList != null)
     {
         this.unadjustedDate_ = new List<IdentifiedDate>();
         foreach (XmlNode item in unadjustedDateNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     unadjustedDateIDRef_ = item.Attributes["id"].Value;
                     unadjustedDate_.Add(new IdentifiedDate(item));
                     IDManager.SetID(unadjustedDateIDRef_, unadjustedDate_[unadjustedDate_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     unadjustedDateIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 unadjustedDate_.Add(new IdentifiedDate(item));
                 }
             }
             else
             {
                 unadjustedDate_.Add(new IdentifiedDate(item));
             }
         }
     }
     
 
     XmlNode dateAdjustmentsNode = xmlNode.SelectSingleNode("dateAdjustments");
     
     if (dateAdjustmentsNode != null)
     {
         if (dateAdjustmentsNode.Attributes["href"] != null || dateAdjustmentsNode.Attributes["id"] != null) 
         {
             if (dateAdjustmentsNode.Attributes["id"] != null) 
             {
                 dateAdjustmentsIDRef_ = dateAdjustmentsNode.Attributes["id"].Value;
                 BusinessDayAdjustments ob = new BusinessDayAdjustments(dateAdjustmentsNode);
                 IDManager.SetID(dateAdjustmentsIDRef_, ob);
             }
             else if (dateAdjustmentsNode.Attributes["href"] != null)
             {
                 dateAdjustmentsIDRef_ = dateAdjustmentsNode.Attributes["href"].Value;
             }
             else
             {
                 dateAdjustments_ = new BusinessDayAdjustments(dateAdjustmentsNode);
             }
         }
         else
         {
             dateAdjustments_ = new BusinessDayAdjustments(dateAdjustmentsNode);
         }
     }
     
 
     XmlNodeList adjustedDateNodeList = xmlNode.SelectNodes("adjustedDate");
     
     if (adjustedDateNodeList != null)
     {
         this.adjustedDate_ = new List<IdentifiedDate>();
         foreach (XmlNode item in adjustedDateNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     adjustedDateIDRef_ = item.Attributes["id"].Value;
                     adjustedDate_.Add(new IdentifiedDate(item));
                     IDManager.SetID(adjustedDateIDRef_, adjustedDate_[adjustedDate_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     adjustedDateIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 adjustedDate_.Add(new IdentifiedDate(item));
                 }
             }
             else
             {
                 adjustedDate_.Add(new IdentifiedDate(item));
             }
         }
     }
     
 
 }
        public CalculationPeriodDates(XmlNode xmlNode)
        {
            XmlNodeList effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate");

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

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


            XmlNodeList relativeEffectiveDateNodeList = xmlNode.SelectNodes("relativeEffectiveDate");

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

            foreach (XmlNode item in relativeEffectiveDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        relativeEffectiveDateIDRef = item.Attributes["id"].Name;
                        AdjustedRelativeDateOffset ob = AdjustedRelativeDateOffset();
                        IDManager.SetID(relativeEffectiveDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        relativeEffectiveDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        relativeEffectiveDate = new AdjustedRelativeDateOffset(item);
                    }
                }
            }


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

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

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


            XmlNodeList relativeTerminationDateNodeList = xmlNode.SelectNodes("relativeTerminationDate");

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

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


            XmlNodeList calculationPeriodDatesAdjustmentsNodeList = xmlNode.SelectNodes("calculationPeriodDatesAdjustments");

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

            foreach (XmlNode item in calculationPeriodDatesAdjustmentsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodDatesAdjustmentsIDRef = item.Attributes["id"].Name;
                        BusinessDayAdjustments ob = BusinessDayAdjustments();
                        IDManager.SetID(calculationPeriodDatesAdjustmentsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodDatesAdjustmentsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodDatesAdjustments = new BusinessDayAdjustments(item);
                    }
                }
            }


            XmlNodeList firstPeriodStartDateNodeList = xmlNode.SelectNodes("firstPeriodStartDate");

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

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


            XmlNodeList firstRegularPeriodStartDateNodeList = xmlNode.SelectNodes("firstRegularPeriodStartDate");

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

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


            XmlNodeList firstCompoundingPeriodEndDateNodeList = xmlNode.SelectNodes("firstCompoundingPeriodEndDate");

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

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


            XmlNodeList lastRegularPeriodEndDateNodeList = xmlNode.SelectNodes("lastRegularPeriodEndDate");

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

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


            XmlNodeList stubPeriodTypeNodeList = xmlNode.SelectNodes("stubPeriodType");

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

            foreach (XmlNode item in stubPeriodTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        stubPeriodTypeIDRef = item.Attributes["id"].Name;
                        StubPeriodTypeEnum ob = StubPeriodTypeEnum();
                        IDManager.SetID(stubPeriodTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        stubPeriodTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        stubPeriodType = new StubPeriodTypeEnum(item);
                    }
                }
            }


            XmlNodeList calculationPeriodFrequencyNodeList = xmlNode.SelectNodes("calculationPeriodFrequency");

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

            foreach (XmlNode item in calculationPeriodFrequencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodFrequencyIDRef = item.Attributes["id"].Name;
                        CalculationPeriodFrequency ob = CalculationPeriodFrequency();
                        IDManager.SetID(calculationPeriodFrequencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodFrequencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodFrequency = new CalculationPeriodFrequency(item);
                    }
                }
            }
        }
 public PeriodicDates(XmlNode xmlNode)
 {
     XmlNode calculationStartDateNode = xmlNode.SelectSingleNode("calculationStartDate");
     
     if (calculationStartDateNode != null)
     {
         if (calculationStartDateNode.Attributes["href"] != null || calculationStartDateNode.Attributes["id"] != null) 
         {
             if (calculationStartDateNode.Attributes["id"] != null) 
             {
                 calculationStartDateIDRef_ = calculationStartDateNode.Attributes["id"].Value;
                 AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(calculationStartDateNode);
                 IDManager.SetID(calculationStartDateIDRef_, ob);
             }
             else if (calculationStartDateNode.Attributes["href"] != null)
             {
                 calculationStartDateIDRef_ = calculationStartDateNode.Attributes["href"].Value;
             }
             else
             {
                 calculationStartDate_ = new AdjustableOrRelativeDate(calculationStartDateNode);
             }
         }
         else
         {
             calculationStartDate_ = new AdjustableOrRelativeDate(calculationStartDateNode);
         }
     }
     
 
     XmlNode calculationEndDateNode = xmlNode.SelectSingleNode("calculationEndDate");
     
     if (calculationEndDateNode != null)
     {
         if (calculationEndDateNode.Attributes["href"] != null || calculationEndDateNode.Attributes["id"] != null) 
         {
             if (calculationEndDateNode.Attributes["id"] != null) 
             {
                 calculationEndDateIDRef_ = calculationEndDateNode.Attributes["id"].Value;
                 AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(calculationEndDateNode);
                 IDManager.SetID(calculationEndDateIDRef_, ob);
             }
             else if (calculationEndDateNode.Attributes["href"] != null)
             {
                 calculationEndDateIDRef_ = calculationEndDateNode.Attributes["href"].Value;
             }
             else
             {
                 calculationEndDate_ = new AdjustableOrRelativeDate(calculationEndDateNode);
             }
         }
         else
         {
             calculationEndDate_ = new AdjustableOrRelativeDate(calculationEndDateNode);
         }
     }
     
 
     XmlNode calculationPeriodFrequencyNode = xmlNode.SelectSingleNode("calculationPeriodFrequency");
     
     if (calculationPeriodFrequencyNode != null)
     {
         if (calculationPeriodFrequencyNode.Attributes["href"] != null || calculationPeriodFrequencyNode.Attributes["id"] != null) 
         {
             if (calculationPeriodFrequencyNode.Attributes["id"] != null) 
             {
                 calculationPeriodFrequencyIDRef_ = calculationPeriodFrequencyNode.Attributes["id"].Value;
                 CalculationPeriodFrequency ob = new CalculationPeriodFrequency(calculationPeriodFrequencyNode);
                 IDManager.SetID(calculationPeriodFrequencyIDRef_, ob);
             }
             else if (calculationPeriodFrequencyNode.Attributes["href"] != null)
             {
                 calculationPeriodFrequencyIDRef_ = calculationPeriodFrequencyNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodFrequency_ = new CalculationPeriodFrequency(calculationPeriodFrequencyNode);
             }
         }
         else
         {
             calculationPeriodFrequency_ = new CalculationPeriodFrequency(calculationPeriodFrequencyNode);
         }
     }
     
 
     XmlNode calculationPeriodDatesAdjustmentsNode = xmlNode.SelectSingleNode("calculationPeriodDatesAdjustments");
     
     if (calculationPeriodDatesAdjustmentsNode != null)
     {
         if (calculationPeriodDatesAdjustmentsNode.Attributes["href"] != null || calculationPeriodDatesAdjustmentsNode.Attributes["id"] != null) 
         {
             if (calculationPeriodDatesAdjustmentsNode.Attributes["id"] != null) 
             {
                 calculationPeriodDatesAdjustmentsIDRef_ = calculationPeriodDatesAdjustmentsNode.Attributes["id"].Value;
                 BusinessDayAdjustments ob = new BusinessDayAdjustments(calculationPeriodDatesAdjustmentsNode);
                 IDManager.SetID(calculationPeriodDatesAdjustmentsIDRef_, ob);
             }
             else if (calculationPeriodDatesAdjustmentsNode.Attributes["href"] != null)
             {
                 calculationPeriodDatesAdjustmentsIDRef_ = calculationPeriodDatesAdjustmentsNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodDatesAdjustments_ = new BusinessDayAdjustments(calculationPeriodDatesAdjustmentsNode);
             }
         }
         else
         {
             calculationPeriodDatesAdjustments_ = new BusinessDayAdjustments(calculationPeriodDatesAdjustmentsNode);
         }
     }
     
 
 }
 public CalculationPeriodDates(XmlNode xmlNode)
 {
     XmlNodeList effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate");
     if (effectiveDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in effectiveDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 effectiveDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate ob = AdjustableDate();
                 IDManager.SetID(effectiveDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 effectiveDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 effectiveDate = new AdjustableDate(item);
             }
         }
     }
     
 
     XmlNodeList relativeEffectiveDateNodeList = xmlNode.SelectNodes("relativeEffectiveDate");
     if (relativeEffectiveDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in relativeEffectiveDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 relativeEffectiveDateIDRef = item.Attributes["id"].Name;
                 AdjustedRelativeDateOffset ob = AdjustedRelativeDateOffset();
                 IDManager.SetID(relativeEffectiveDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 relativeEffectiveDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 relativeEffectiveDate = new AdjustedRelativeDateOffset(item);
             }
         }
     }
     
 
     XmlNodeList terminationDateNodeList = xmlNode.SelectNodes("terminationDate");
     if (terminationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in terminationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 terminationDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate ob = AdjustableDate();
                 IDManager.SetID(terminationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 terminationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 terminationDate = new AdjustableDate(item);
             }
         }
     }
     
 
     XmlNodeList relativeTerminationDateNodeList = xmlNode.SelectNodes("relativeTerminationDate");
     if (relativeTerminationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in relativeTerminationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 relativeTerminationDateIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(relativeTerminationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 relativeTerminationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 relativeTerminationDate = new RelativeDateOffset(item);
             }
         }
     }
     
 
     XmlNodeList calculationPeriodDatesAdjustmentsNodeList = xmlNode.SelectNodes("calculationPeriodDatesAdjustments");
     if (calculationPeriodDatesAdjustmentsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodDatesAdjustmentsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodDatesAdjustmentsIDRef = item.Attributes["id"].Name;
                 BusinessDayAdjustments ob = BusinessDayAdjustments();
                 IDManager.SetID(calculationPeriodDatesAdjustmentsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodDatesAdjustmentsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodDatesAdjustments = new BusinessDayAdjustments(item);
             }
         }
     }
     
 
     XmlNodeList firstPeriodStartDateNodeList = xmlNode.SelectNodes("firstPeriodStartDate");
     if (firstPeriodStartDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in firstPeriodStartDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 firstPeriodStartDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate ob = AdjustableDate();
                 IDManager.SetID(firstPeriodStartDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 firstPeriodStartDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 firstPeriodStartDate = new AdjustableDate(item);
             }
         }
     }
     
 
     XmlNodeList firstRegularPeriodStartDateNodeList = xmlNode.SelectNodes("firstRegularPeriodStartDate");
     if (firstRegularPeriodStartDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in firstRegularPeriodStartDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 firstRegularPeriodStartDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(firstRegularPeriodStartDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 firstRegularPeriodStartDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 firstRegularPeriodStartDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList firstCompoundingPeriodEndDateNodeList = xmlNode.SelectNodes("firstCompoundingPeriodEndDate");
     if (firstCompoundingPeriodEndDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in firstCompoundingPeriodEndDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 firstCompoundingPeriodEndDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(firstCompoundingPeriodEndDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 firstCompoundingPeriodEndDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 firstCompoundingPeriodEndDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList lastRegularPeriodEndDateNodeList = xmlNode.SelectNodes("lastRegularPeriodEndDate");
     if (lastRegularPeriodEndDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in lastRegularPeriodEndDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 lastRegularPeriodEndDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(lastRegularPeriodEndDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 lastRegularPeriodEndDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 lastRegularPeriodEndDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList stubPeriodTypeNodeList = xmlNode.SelectNodes("stubPeriodType");
     if (stubPeriodTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in stubPeriodTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 stubPeriodTypeIDRef = item.Attributes["id"].Name;
                 StubPeriodTypeEnum ob = StubPeriodTypeEnum();
                 IDManager.SetID(stubPeriodTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 stubPeriodTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 stubPeriodType = new StubPeriodTypeEnum(item);
             }
         }
     }
     
 
     XmlNodeList calculationPeriodFrequencyNodeList = xmlNode.SelectNodes("calculationPeriodFrequency");
     if (calculationPeriodFrequencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodFrequencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodFrequencyIDRef = item.Attributes["id"].Name;
                 CalculationPeriodFrequency ob = CalculationPeriodFrequency();
                 IDManager.SetID(calculationPeriodFrequencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodFrequencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodFrequency = new CalculationPeriodFrequency(item);
             }
         }
     }
     
 
 }
 public GeneralTerms(XmlNode xmlNode)
 {
     XmlNodeList effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate");
     if (effectiveDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in effectiveDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 effectiveDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate2 ob = AdjustableDate2();
                 IDManager.SetID(effectiveDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 effectiveDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 effectiveDate = new AdjustableDate2(item);
             }
         }
     }
     
 
     XmlNodeList scheduledTerminationDateNodeList = xmlNode.SelectNodes("scheduledTerminationDate");
     if (scheduledTerminationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in scheduledTerminationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 scheduledTerminationDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate2 ob = AdjustableDate2();
                 IDManager.SetID(scheduledTerminationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 scheduledTerminationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 scheduledTerminationDate = new AdjustableDate2(item);
             }
         }
     }
     
 
     XmlNodeList buyerPartyReferenceNodeList = xmlNode.SelectNodes("buyerPartyReference");
     if (buyerPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in buyerPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 buyerPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(buyerPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 buyerPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 buyerPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList buyerAccountReferenceNodeList = xmlNode.SelectNodes("buyerAccountReference");
     if (buyerAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in buyerAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 buyerAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(buyerAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 buyerAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 buyerAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList sellerPartyReferenceNodeList = xmlNode.SelectNodes("sellerPartyReference");
     if (sellerPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in sellerPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 sellerPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(sellerPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 sellerPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 sellerPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList sellerAccountReferenceNodeList = xmlNode.SelectNodes("sellerAccountReference");
     if (sellerAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in sellerAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 sellerAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(sellerAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 sellerAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 sellerAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList dateAdjustmentsNodeList = xmlNode.SelectNodes("dateAdjustments");
     if (dateAdjustmentsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in dateAdjustmentsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 dateAdjustmentsIDRef = item.Attributes["id"].Name;
                 BusinessDayAdjustments ob = BusinessDayAdjustments();
                 IDManager.SetID(dateAdjustmentsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 dateAdjustmentsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 dateAdjustments = new BusinessDayAdjustments(item);
             }
         }
     }
     
 
     XmlNodeList referenceInformationNodeList = xmlNode.SelectNodes("referenceInformation");
     if (referenceInformationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in referenceInformationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 referenceInformationIDRef = item.Attributes["id"].Name;
                 ReferenceInformation ob = ReferenceInformation();
                 IDManager.SetID(referenceInformationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 referenceInformationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 referenceInformation = new ReferenceInformation(item);
             }
         }
     }
     
 
     XmlNodeList indexReferenceInformationNodeList = xmlNode.SelectNodes("indexReferenceInformation");
     if (indexReferenceInformationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in indexReferenceInformationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 indexReferenceInformationIDRef = item.Attributes["id"].Name;
                 IndexReferenceInformation ob = IndexReferenceInformation();
                 IDManager.SetID(indexReferenceInformationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 indexReferenceInformationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 indexReferenceInformation = new IndexReferenceInformation(item);
             }
         }
     }
     
 
     XmlNodeList basketReferenceInformationNodeList = xmlNode.SelectNodes("basketReferenceInformation");
     if (basketReferenceInformationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in basketReferenceInformationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 basketReferenceInformationIDRef = item.Attributes["id"].Name;
                 BasketReferenceInformation ob = BasketReferenceInformation();
                 IDManager.SetID(basketReferenceInformationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 basketReferenceInformationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 basketReferenceInformation = new BasketReferenceInformation(item);
             }
         }
     }
     
 
     XmlNodeList additionalTermNodeList = xmlNode.SelectNodes("additionalTerm");
     
     foreach (XmlNode item in additionalTermNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 additionalTermIDRef = item.Attributes["id"].Name;
                 List<AdditionalTerm> ob = new List<AdditionalTerm>();
                 ob.Add(new AdditionalTerm(item));
                 IDManager.SetID(additionalTermIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 additionalTermIDRef = item.Attributes["href"].Name;
             }
             else
             {
             additionalTerm.Add(new AdditionalTerm(item));
             }
         }
     }
     
 
     XmlNodeList substitutionNodeList = xmlNode.SelectNodes("substitution");
     if (substitutionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in substitutionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 substitutionIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(substitutionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 substitutionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 substitution = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList modifiedEquityDeliveryNodeList = xmlNode.SelectNodes("modifiedEquityDelivery");
     if (modifiedEquityDeliveryNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in modifiedEquityDeliveryNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 modifiedEquityDeliveryIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(modifiedEquityDeliveryIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 modifiedEquityDeliveryIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 modifiedEquityDelivery = new XsdTypeBoolean(item);
             }
         }
     }
     
 
 }
 public GeneralTerms(XmlNode xmlNode)
 {
     XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate");
     
     if (effectiveDateNode != null)
     {
         if (effectiveDateNode.Attributes["href"] != null || effectiveDateNode.Attributes["id"] != null) 
         {
             if (effectiveDateNode.Attributes["id"] != null) 
             {
                 effectiveDateIDRef_ = effectiveDateNode.Attributes["id"].Value;
                 AdjustableDate2 ob = new AdjustableDate2(effectiveDateNode);
                 IDManager.SetID(effectiveDateIDRef_, ob);
             }
             else if (effectiveDateNode.Attributes["href"] != null)
             {
                 effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value;
             }
             else
             {
                 effectiveDate_ = new AdjustableDate2(effectiveDateNode);
             }
         }
         else
         {
             effectiveDate_ = new AdjustableDate2(effectiveDateNode);
         }
     }
     
 
     XmlNode scheduledTerminationDateNode = xmlNode.SelectSingleNode("scheduledTerminationDate");
     
     if (scheduledTerminationDateNode != null)
     {
         if (scheduledTerminationDateNode.Attributes["href"] != null || scheduledTerminationDateNode.Attributes["id"] != null) 
         {
             if (scheduledTerminationDateNode.Attributes["id"] != null) 
             {
                 scheduledTerminationDateIDRef_ = scheduledTerminationDateNode.Attributes["id"].Value;
                 AdjustableDate2 ob = new AdjustableDate2(scheduledTerminationDateNode);
                 IDManager.SetID(scheduledTerminationDateIDRef_, ob);
             }
             else if (scheduledTerminationDateNode.Attributes["href"] != null)
             {
                 scheduledTerminationDateIDRef_ = scheduledTerminationDateNode.Attributes["href"].Value;
             }
             else
             {
                 scheduledTerminationDate_ = new AdjustableDate2(scheduledTerminationDateNode);
             }
         }
         else
         {
             scheduledTerminationDate_ = new AdjustableDate2(scheduledTerminationDateNode);
         }
     }
     
 
     XmlNode buyerPartyReferenceNode = xmlNode.SelectSingleNode("buyerPartyReference");
     
     if (buyerPartyReferenceNode != null)
     {
         if (buyerPartyReferenceNode.Attributes["href"] != null || buyerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (buyerPartyReferenceNode.Attributes["id"] != null) 
             {
                 buyerPartyReferenceIDRef_ = buyerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(buyerPartyReferenceNode);
                 IDManager.SetID(buyerPartyReferenceIDRef_, ob);
             }
             else if (buyerPartyReferenceNode.Attributes["href"] != null)
             {
                 buyerPartyReferenceIDRef_ = buyerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 buyerPartyReference_ = new PartyReference(buyerPartyReferenceNode);
             }
         }
         else
         {
             buyerPartyReference_ = new PartyReference(buyerPartyReferenceNode);
         }
     }
     
 
     XmlNode buyerAccountReferenceNode = xmlNode.SelectSingleNode("buyerAccountReference");
     
     if (buyerAccountReferenceNode != null)
     {
         if (buyerAccountReferenceNode.Attributes["href"] != null || buyerAccountReferenceNode.Attributes["id"] != null) 
         {
             if (buyerAccountReferenceNode.Attributes["id"] != null) 
             {
                 buyerAccountReferenceIDRef_ = buyerAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(buyerAccountReferenceNode);
                 IDManager.SetID(buyerAccountReferenceIDRef_, ob);
             }
             else if (buyerAccountReferenceNode.Attributes["href"] != null)
             {
                 buyerAccountReferenceIDRef_ = buyerAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 buyerAccountReference_ = new AccountReference(buyerAccountReferenceNode);
             }
         }
         else
         {
             buyerAccountReference_ = new AccountReference(buyerAccountReferenceNode);
         }
     }
     
 
     XmlNode sellerPartyReferenceNode = xmlNode.SelectSingleNode("sellerPartyReference");
     
     if (sellerPartyReferenceNode != null)
     {
         if (sellerPartyReferenceNode.Attributes["href"] != null || sellerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (sellerPartyReferenceNode.Attributes["id"] != null) 
             {
                 sellerPartyReferenceIDRef_ = sellerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(sellerPartyReferenceNode);
                 IDManager.SetID(sellerPartyReferenceIDRef_, ob);
             }
             else if (sellerPartyReferenceNode.Attributes["href"] != null)
             {
                 sellerPartyReferenceIDRef_ = sellerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 sellerPartyReference_ = new PartyReference(sellerPartyReferenceNode);
             }
         }
         else
         {
             sellerPartyReference_ = new PartyReference(sellerPartyReferenceNode);
         }
     }
     
 
     XmlNode sellerAccountReferenceNode = xmlNode.SelectSingleNode("sellerAccountReference");
     
     if (sellerAccountReferenceNode != null)
     {
         if (sellerAccountReferenceNode.Attributes["href"] != null || sellerAccountReferenceNode.Attributes["id"] != null) 
         {
             if (sellerAccountReferenceNode.Attributes["id"] != null) 
             {
                 sellerAccountReferenceIDRef_ = sellerAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(sellerAccountReferenceNode);
                 IDManager.SetID(sellerAccountReferenceIDRef_, ob);
             }
             else if (sellerAccountReferenceNode.Attributes["href"] != null)
             {
                 sellerAccountReferenceIDRef_ = sellerAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 sellerAccountReference_ = new AccountReference(sellerAccountReferenceNode);
             }
         }
         else
         {
             sellerAccountReference_ = new AccountReference(sellerAccountReferenceNode);
         }
     }
     
 
     XmlNode dateAdjustmentsNode = xmlNode.SelectSingleNode("dateAdjustments");
     
     if (dateAdjustmentsNode != null)
     {
         if (dateAdjustmentsNode.Attributes["href"] != null || dateAdjustmentsNode.Attributes["id"] != null) 
         {
             if (dateAdjustmentsNode.Attributes["id"] != null) 
             {
                 dateAdjustmentsIDRef_ = dateAdjustmentsNode.Attributes["id"].Value;
                 BusinessDayAdjustments ob = new BusinessDayAdjustments(dateAdjustmentsNode);
                 IDManager.SetID(dateAdjustmentsIDRef_, ob);
             }
             else if (dateAdjustmentsNode.Attributes["href"] != null)
             {
                 dateAdjustmentsIDRef_ = dateAdjustmentsNode.Attributes["href"].Value;
             }
             else
             {
                 dateAdjustments_ = new BusinessDayAdjustments(dateAdjustmentsNode);
             }
         }
         else
         {
             dateAdjustments_ = new BusinessDayAdjustments(dateAdjustmentsNode);
         }
     }
     
 
     XmlNode referenceInformationNode = xmlNode.SelectSingleNode("referenceInformation");
     
     if (referenceInformationNode != null)
     {
         if (referenceInformationNode.Attributes["href"] != null || referenceInformationNode.Attributes["id"] != null) 
         {
             if (referenceInformationNode.Attributes["id"] != null) 
             {
                 referenceInformationIDRef_ = referenceInformationNode.Attributes["id"].Value;
                 ReferenceInformation ob = new ReferenceInformation(referenceInformationNode);
                 IDManager.SetID(referenceInformationIDRef_, ob);
             }
             else if (referenceInformationNode.Attributes["href"] != null)
             {
                 referenceInformationIDRef_ = referenceInformationNode.Attributes["href"].Value;
             }
             else
             {
                 referenceInformation_ = new ReferenceInformation(referenceInformationNode);
             }
         }
         else
         {
             referenceInformation_ = new ReferenceInformation(referenceInformationNode);
         }
     }
     
 
     XmlNode indexReferenceInformationNode = xmlNode.SelectSingleNode("indexReferenceInformation");
     
     if (indexReferenceInformationNode != null)
     {
         if (indexReferenceInformationNode.Attributes["href"] != null || indexReferenceInformationNode.Attributes["id"] != null) 
         {
             if (indexReferenceInformationNode.Attributes["id"] != null) 
             {
                 indexReferenceInformationIDRef_ = indexReferenceInformationNode.Attributes["id"].Value;
                 IndexReferenceInformation ob = new IndexReferenceInformation(indexReferenceInformationNode);
                 IDManager.SetID(indexReferenceInformationIDRef_, ob);
             }
             else if (indexReferenceInformationNode.Attributes["href"] != null)
             {
                 indexReferenceInformationIDRef_ = indexReferenceInformationNode.Attributes["href"].Value;
             }
             else
             {
                 indexReferenceInformation_ = new IndexReferenceInformation(indexReferenceInformationNode);
             }
         }
         else
         {
             indexReferenceInformation_ = new IndexReferenceInformation(indexReferenceInformationNode);
         }
     }
     
 
     XmlNode basketReferenceInformationNode = xmlNode.SelectSingleNode("basketReferenceInformation");
     
     if (basketReferenceInformationNode != null)
     {
         if (basketReferenceInformationNode.Attributes["href"] != null || basketReferenceInformationNode.Attributes["id"] != null) 
         {
             if (basketReferenceInformationNode.Attributes["id"] != null) 
             {
                 basketReferenceInformationIDRef_ = basketReferenceInformationNode.Attributes["id"].Value;
                 BasketReferenceInformation ob = new BasketReferenceInformation(basketReferenceInformationNode);
                 IDManager.SetID(basketReferenceInformationIDRef_, ob);
             }
             else if (basketReferenceInformationNode.Attributes["href"] != null)
             {
                 basketReferenceInformationIDRef_ = basketReferenceInformationNode.Attributes["href"].Value;
             }
             else
             {
                 basketReferenceInformation_ = new BasketReferenceInformation(basketReferenceInformationNode);
             }
         }
         else
         {
             basketReferenceInformation_ = new BasketReferenceInformation(basketReferenceInformationNode);
         }
     }
     
 
     XmlNodeList additionalTermNodeList = xmlNode.SelectNodes("additionalTerm");
     
     if (additionalTermNodeList != null)
     {
         this.additionalTerm_ = new List<AdditionalTerm>();
         foreach (XmlNode item in additionalTermNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     additionalTermIDRef_ = item.Attributes["id"].Value;
                     additionalTerm_.Add(new AdditionalTerm(item));
                     IDManager.SetID(additionalTermIDRef_, additionalTerm_[additionalTerm_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     additionalTermIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 additionalTerm_.Add(new AdditionalTerm(item));
                 }
             }
             else
             {
                 additionalTerm_.Add(new AdditionalTerm(item));
             }
         }
     }
     
 
     XmlNode substitutionNode = xmlNode.SelectSingleNode("substitution");
     
     if (substitutionNode != null)
     {
         if (substitutionNode.Attributes["href"] != null || substitutionNode.Attributes["id"] != null) 
         {
             if (substitutionNode.Attributes["id"] != null) 
             {
                 substitutionIDRef_ = substitutionNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(substitutionNode);
                 IDManager.SetID(substitutionIDRef_, ob);
             }
             else if (substitutionNode.Attributes["href"] != null)
             {
                 substitutionIDRef_ = substitutionNode.Attributes["href"].Value;
             }
             else
             {
                 substitution_ = new XsdTypeBoolean(substitutionNode);
             }
         }
         else
         {
             substitution_ = new XsdTypeBoolean(substitutionNode);
         }
     }
     
 
     XmlNode modifiedEquityDeliveryNode = xmlNode.SelectSingleNode("modifiedEquityDelivery");
     
     if (modifiedEquityDeliveryNode != null)
     {
         if (modifiedEquityDeliveryNode.Attributes["href"] != null || modifiedEquityDeliveryNode.Attributes["id"] != null) 
         {
             if (modifiedEquityDeliveryNode.Attributes["id"] != null) 
             {
                 modifiedEquityDeliveryIDRef_ = modifiedEquityDeliveryNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(modifiedEquityDeliveryNode);
                 IDManager.SetID(modifiedEquityDeliveryIDRef_, ob);
             }
             else if (modifiedEquityDeliveryNode.Attributes["href"] != null)
             {
                 modifiedEquityDeliveryIDRef_ = modifiedEquityDeliveryNode.Attributes["href"].Value;
             }
             else
             {
                 modifiedEquityDelivery_ = new XsdTypeBoolean(modifiedEquityDeliveryNode);
             }
         }
         else
         {
             modifiedEquityDelivery_ = new XsdTypeBoolean(modifiedEquityDeliveryNode);
         }
     }
     
 
 }
 public DividendPeriod(XmlNode xmlNode)
 {
     XmlNode unadjustedStartDateNode = xmlNode.SelectSingleNode("unadjustedStartDate");
     
     if (unadjustedStartDateNode != null)
     {
         if (unadjustedStartDateNode.Attributes["href"] != null || unadjustedStartDateNode.Attributes["id"] != null) 
         {
             if (unadjustedStartDateNode.Attributes["id"] != null) 
             {
                 unadjustedStartDateIDRef_ = unadjustedStartDateNode.Attributes["id"].Value;
                 IdentifiedDate ob = new IdentifiedDate(unadjustedStartDateNode);
                 IDManager.SetID(unadjustedStartDateIDRef_, ob);
             }
             else if (unadjustedStartDateNode.Attributes["href"] != null)
             {
                 unadjustedStartDateIDRef_ = unadjustedStartDateNode.Attributes["href"].Value;
             }
             else
             {
                 unadjustedStartDate_ = new IdentifiedDate(unadjustedStartDateNode);
             }
         }
         else
         {
             unadjustedStartDate_ = new IdentifiedDate(unadjustedStartDateNode);
         }
     }
     
 
     XmlNode unadjustedEndDateNode = xmlNode.SelectSingleNode("unadjustedEndDate");
     
     if (unadjustedEndDateNode != null)
     {
         if (unadjustedEndDateNode.Attributes["href"] != null || unadjustedEndDateNode.Attributes["id"] != null) 
         {
             if (unadjustedEndDateNode.Attributes["id"] != null) 
             {
                 unadjustedEndDateIDRef_ = unadjustedEndDateNode.Attributes["id"].Value;
                 IdentifiedDate ob = new IdentifiedDate(unadjustedEndDateNode);
                 IDManager.SetID(unadjustedEndDateIDRef_, ob);
             }
             else if (unadjustedEndDateNode.Attributes["href"] != null)
             {
                 unadjustedEndDateIDRef_ = unadjustedEndDateNode.Attributes["href"].Value;
             }
             else
             {
                 unadjustedEndDate_ = new IdentifiedDate(unadjustedEndDateNode);
             }
         }
         else
         {
             unadjustedEndDate_ = new IdentifiedDate(unadjustedEndDateNode);
         }
     }
     
 
     XmlNode dateAdjustmentsNode = xmlNode.SelectSingleNode("dateAdjustments");
     
     if (dateAdjustmentsNode != null)
     {
         if (dateAdjustmentsNode.Attributes["href"] != null || dateAdjustmentsNode.Attributes["id"] != null) 
         {
             if (dateAdjustmentsNode.Attributes["id"] != null) 
             {
                 dateAdjustmentsIDRef_ = dateAdjustmentsNode.Attributes["id"].Value;
                 BusinessDayAdjustments ob = new BusinessDayAdjustments(dateAdjustmentsNode);
                 IDManager.SetID(dateAdjustmentsIDRef_, ob);
             }
             else if (dateAdjustmentsNode.Attributes["href"] != null)
             {
                 dateAdjustmentsIDRef_ = dateAdjustmentsNode.Attributes["href"].Value;
             }
             else
             {
                 dateAdjustments_ = new BusinessDayAdjustments(dateAdjustmentsNode);
             }
         }
         else
         {
             dateAdjustments_ = new BusinessDayAdjustments(dateAdjustmentsNode);
         }
     }
     
 
     XmlNode underlyerReferenceNode = xmlNode.SelectSingleNode("underlyerReference");
     
     if (underlyerReferenceNode != null)
     {
         if (underlyerReferenceNode.Attributes["href"] != null || underlyerReferenceNode.Attributes["id"] != null) 
         {
             if (underlyerReferenceNode.Attributes["id"] != null) 
             {
                 underlyerReferenceIDRef_ = underlyerReferenceNode.Attributes["id"].Value;
                 AssetReference ob = new AssetReference(underlyerReferenceNode);
                 IDManager.SetID(underlyerReferenceIDRef_, ob);
             }
             else if (underlyerReferenceNode.Attributes["href"] != null)
             {
                 underlyerReferenceIDRef_ = underlyerReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 underlyerReference_ = new AssetReference(underlyerReferenceNode);
             }
         }
         else
         {
             underlyerReference_ = new AssetReference(underlyerReferenceNode);
         }
     }
     
 
 }
        public GeneralTerms(XmlNode xmlNode)
        {
            XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate");

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


            XmlNode scheduledTerminationDateNode = xmlNode.SelectSingleNode("scheduledTerminationDate");

            if (scheduledTerminationDateNode != null)
            {
                if (scheduledTerminationDateNode.Attributes["href"] != null || scheduledTerminationDateNode.Attributes["id"] != null)
                {
                    if (scheduledTerminationDateNode.Attributes["id"] != null)
                    {
                        scheduledTerminationDateIDRef_ = scheduledTerminationDateNode.Attributes["id"].Value;
                        AdjustableDate2 ob = new AdjustableDate2(scheduledTerminationDateNode);
                        IDManager.SetID(scheduledTerminationDateIDRef_, ob);
                    }
                    else if (scheduledTerminationDateNode.Attributes["href"] != null)
                    {
                        scheduledTerminationDateIDRef_ = scheduledTerminationDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        scheduledTerminationDate_ = new AdjustableDate2(scheduledTerminationDateNode);
                    }
                }
                else
                {
                    scheduledTerminationDate_ = new AdjustableDate2(scheduledTerminationDateNode);
                }
            }


            XmlNode buyerPartyReferenceNode = xmlNode.SelectSingleNode("buyerPartyReference");

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


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

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


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

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


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

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


            XmlNode dateAdjustmentsNode = xmlNode.SelectSingleNode("dateAdjustments");

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


            XmlNode referenceInformationNode = xmlNode.SelectSingleNode("referenceInformation");

            if (referenceInformationNode != null)
            {
                if (referenceInformationNode.Attributes["href"] != null || referenceInformationNode.Attributes["id"] != null)
                {
                    if (referenceInformationNode.Attributes["id"] != null)
                    {
                        referenceInformationIDRef_ = referenceInformationNode.Attributes["id"].Value;
                        ReferenceInformation ob = new ReferenceInformation(referenceInformationNode);
                        IDManager.SetID(referenceInformationIDRef_, ob);
                    }
                    else if (referenceInformationNode.Attributes["href"] != null)
                    {
                        referenceInformationIDRef_ = referenceInformationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        referenceInformation_ = new ReferenceInformation(referenceInformationNode);
                    }
                }
                else
                {
                    referenceInformation_ = new ReferenceInformation(referenceInformationNode);
                }
            }


            XmlNode indexReferenceInformationNode = xmlNode.SelectSingleNode("indexReferenceInformation");

            if (indexReferenceInformationNode != null)
            {
                if (indexReferenceInformationNode.Attributes["href"] != null || indexReferenceInformationNode.Attributes["id"] != null)
                {
                    if (indexReferenceInformationNode.Attributes["id"] != null)
                    {
                        indexReferenceInformationIDRef_ = indexReferenceInformationNode.Attributes["id"].Value;
                        IndexReferenceInformation ob = new IndexReferenceInformation(indexReferenceInformationNode);
                        IDManager.SetID(indexReferenceInformationIDRef_, ob);
                    }
                    else if (indexReferenceInformationNode.Attributes["href"] != null)
                    {
                        indexReferenceInformationIDRef_ = indexReferenceInformationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        indexReferenceInformation_ = new IndexReferenceInformation(indexReferenceInformationNode);
                    }
                }
                else
                {
                    indexReferenceInformation_ = new IndexReferenceInformation(indexReferenceInformationNode);
                }
            }


            XmlNode basketReferenceInformationNode = xmlNode.SelectSingleNode("basketReferenceInformation");

            if (basketReferenceInformationNode != null)
            {
                if (basketReferenceInformationNode.Attributes["href"] != null || basketReferenceInformationNode.Attributes["id"] != null)
                {
                    if (basketReferenceInformationNode.Attributes["id"] != null)
                    {
                        basketReferenceInformationIDRef_ = basketReferenceInformationNode.Attributes["id"].Value;
                        BasketReferenceInformation ob = new BasketReferenceInformation(basketReferenceInformationNode);
                        IDManager.SetID(basketReferenceInformationIDRef_, ob);
                    }
                    else if (basketReferenceInformationNode.Attributes["href"] != null)
                    {
                        basketReferenceInformationIDRef_ = basketReferenceInformationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        basketReferenceInformation_ = new BasketReferenceInformation(basketReferenceInformationNode);
                    }
                }
                else
                {
                    basketReferenceInformation_ = new BasketReferenceInformation(basketReferenceInformationNode);
                }
            }


            XmlNodeList additionalTermNodeList = xmlNode.SelectNodes("additionalTerm");

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


            XmlNode substitutionNode = xmlNode.SelectSingleNode("substitution");

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


            XmlNode modifiedEquityDeliveryNode = xmlNode.SelectSingleNode("modifiedEquityDelivery");

            if (modifiedEquityDeliveryNode != null)
            {
                if (modifiedEquityDeliveryNode.Attributes["href"] != null || modifiedEquityDeliveryNode.Attributes["id"] != null)
                {
                    if (modifiedEquityDeliveryNode.Attributes["id"] != null)
                    {
                        modifiedEquityDeliveryIDRef_ = modifiedEquityDeliveryNode.Attributes["id"].Value;
                        XsdTypeBoolean ob = new XsdTypeBoolean(modifiedEquityDeliveryNode);
                        IDManager.SetID(modifiedEquityDeliveryIDRef_, ob);
                    }
                    else if (modifiedEquityDeliveryNode.Attributes["href"] != null)
                    {
                        modifiedEquityDeliveryIDRef_ = modifiedEquityDeliveryNode.Attributes["href"].Value;
                    }
                    else
                    {
                        modifiedEquityDelivery_ = new XsdTypeBoolean(modifiedEquityDeliveryNode);
                    }
                }
                else
                {
                    modifiedEquityDelivery_ = new XsdTypeBoolean(modifiedEquityDeliveryNode);
                }
            }
        }
Exemple #28
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)
        {
            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 AdjustableDates(XmlNode xmlNode)
 {
     XmlNodeList unadjustedDateNodeList = xmlNode.SelectNodes("unadjustedDate");
     
     foreach (XmlNode item in unadjustedDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 unadjustedDateIDRef = item.Attributes["id"].Name;
                 List<IdentifiedDate> ob = new List<IdentifiedDate>();
                 ob.Add(new IdentifiedDate(item));
                 IDManager.SetID(unadjustedDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 unadjustedDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
             unadjustedDate.Add(new IdentifiedDate(item));
             }
         }
     }
     
 
     XmlNodeList dateAdjustmentsNodeList = xmlNode.SelectNodes("dateAdjustments");
     if (dateAdjustmentsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in dateAdjustmentsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 dateAdjustmentsIDRef = item.Attributes["id"].Name;
                 BusinessDayAdjustments ob = BusinessDayAdjustments();
                 IDManager.SetID(dateAdjustmentsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 dateAdjustmentsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 dateAdjustments = new BusinessDayAdjustments(item);
             }
         }
     }
     
 
     XmlNodeList adjustedDateNodeList = xmlNode.SelectNodes("adjustedDate");
     
     foreach (XmlNode item in adjustedDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 adjustedDateIDRef = item.Attributes["id"].Name;
                 List<IdentifiedDate> ob = new List<IdentifiedDate>();
                 ob.Add(new IdentifiedDate(item));
                 IDManager.SetID(adjustedDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 adjustedDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
             adjustedDate.Add(new IdentifiedDate(item));
             }
         }
     }
     
 
 }
        public PeriodicDates(XmlNode xmlNode)
        {
            XmlNodeList calculationStartDateNodeList = xmlNode.SelectNodes("calculationStartDate");

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

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


            XmlNodeList calculationEndDateNodeList = xmlNode.SelectNodes("calculationEndDate");

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

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


            XmlNodeList calculationPeriodFrequencyNodeList = xmlNode.SelectNodes("calculationPeriodFrequency");

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

            foreach (XmlNode item in calculationPeriodFrequencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodFrequencyIDRef = item.Attributes["id"].Name;
                        CalculationPeriodFrequency ob = CalculationPeriodFrequency();
                        IDManager.SetID(calculationPeriodFrequencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodFrequencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodFrequency = new CalculationPeriodFrequency(item);
                    }
                }
            }


            XmlNodeList calculationPeriodDatesAdjustmentsNodeList = xmlNode.SelectNodes("calculationPeriodDatesAdjustments");

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

            foreach (XmlNode item in calculationPeriodDatesAdjustmentsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodDatesAdjustmentsIDRef = item.Attributes["id"].Name;
                        BusinessDayAdjustments ob = BusinessDayAdjustments();
                        IDManager.SetID(calculationPeriodDatesAdjustmentsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodDatesAdjustmentsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodDatesAdjustments = 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);
         }
     }
     
 
 }
 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 PeriodicDates(XmlNode xmlNode)
        {
            XmlNode calculationStartDateNode = xmlNode.SelectSingleNode("calculationStartDate");

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


            XmlNode calculationEndDateNode = xmlNode.SelectSingleNode("calculationEndDate");

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


            XmlNode calculationPeriodFrequencyNode = xmlNode.SelectSingleNode("calculationPeriodFrequency");

            if (calculationPeriodFrequencyNode != null)
            {
                if (calculationPeriodFrequencyNode.Attributes["href"] != null || calculationPeriodFrequencyNode.Attributes["id"] != null)
                {
                    if (calculationPeriodFrequencyNode.Attributes["id"] != null)
                    {
                        calculationPeriodFrequencyIDRef_ = calculationPeriodFrequencyNode.Attributes["id"].Value;
                        CalculationPeriodFrequency ob = new CalculationPeriodFrequency(calculationPeriodFrequencyNode);
                        IDManager.SetID(calculationPeriodFrequencyIDRef_, ob);
                    }
                    else if (calculationPeriodFrequencyNode.Attributes["href"] != null)
                    {
                        calculationPeriodFrequencyIDRef_ = calculationPeriodFrequencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodFrequency_ = new CalculationPeriodFrequency(calculationPeriodFrequencyNode);
                    }
                }
                else
                {
                    calculationPeriodFrequency_ = new CalculationPeriodFrequency(calculationPeriodFrequencyNode);
                }
            }


            XmlNode calculationPeriodDatesAdjustmentsNode = xmlNode.SelectSingleNode("calculationPeriodDatesAdjustments");

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