public FinalCalculationPeriodDateAdjustment(XmlNode xmlNode)
 {
     XmlNode relevantUnderlyingDateReferenceNode = xmlNode.SelectSingleNode("relevantUnderlyingDateReference");
     
     if (relevantUnderlyingDateReferenceNode != null)
     {
         if (relevantUnderlyingDateReferenceNode.Attributes["href"] != null || relevantUnderlyingDateReferenceNode.Attributes["id"] != null) 
         {
             if (relevantUnderlyingDateReferenceNode.Attributes["id"] != null) 
             {
                 relevantUnderlyingDateReferenceIDRef_ = relevantUnderlyingDateReferenceNode.Attributes["id"].Value;
                 RelevantUnderlyingDateReference ob = new RelevantUnderlyingDateReference(relevantUnderlyingDateReferenceNode);
                 IDManager.SetID(relevantUnderlyingDateReferenceIDRef_, ob);
             }
             else if (relevantUnderlyingDateReferenceNode.Attributes["href"] != null)
             {
                 relevantUnderlyingDateReferenceIDRef_ = relevantUnderlyingDateReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 relevantUnderlyingDateReference_ = new RelevantUnderlyingDateReference(relevantUnderlyingDateReferenceNode);
             }
         }
         else
         {
             relevantUnderlyingDateReference_ = new RelevantUnderlyingDateReference(relevantUnderlyingDateReferenceNode);
         }
     }
     
 
     XmlNode swapStreamReferenceNode = xmlNode.SelectSingleNode("swapStreamReference");
     
     if (swapStreamReferenceNode != null)
     {
         if (swapStreamReferenceNode.Attributes["href"] != null || swapStreamReferenceNode.Attributes["id"] != null) 
         {
             if (swapStreamReferenceNode.Attributes["id"] != null) 
             {
                 swapStreamReferenceIDRef_ = swapStreamReferenceNode.Attributes["id"].Value;
                 InterestRateStreamReference ob = new InterestRateStreamReference(swapStreamReferenceNode);
                 IDManager.SetID(swapStreamReferenceIDRef_, ob);
             }
             else if (swapStreamReferenceNode.Attributes["href"] != null)
             {
                 swapStreamReferenceIDRef_ = swapStreamReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 swapStreamReference_ = new InterestRateStreamReference(swapStreamReferenceNode);
             }
         }
         else
         {
             swapStreamReference_ = new InterestRateStreamReference(swapStreamReferenceNode);
         }
     }
     
 
     XmlNode businessDayConventionNode = xmlNode.SelectSingleNode("businessDayConvention");
     
     if (businessDayConventionNode != null)
     {
         if (businessDayConventionNode.Attributes["href"] != null || businessDayConventionNode.Attributes["id"] != null) 
         {
             if (businessDayConventionNode.Attributes["id"] != null) 
             {
                 businessDayConventionIDRef_ = businessDayConventionNode.Attributes["id"].Value;
                 BusinessDayConventionEnum ob = new BusinessDayConventionEnum(businessDayConventionNode);
                 IDManager.SetID(businessDayConventionIDRef_, ob);
             }
             else if (businessDayConventionNode.Attributes["href"] != null)
             {
                 businessDayConventionIDRef_ = businessDayConventionNode.Attributes["href"].Value;
             }
             else
             {
                 businessDayConvention_ = new BusinessDayConventionEnum(businessDayConventionNode);
             }
         }
         else
         {
             businessDayConvention_ = new BusinessDayConventionEnum(businessDayConventionNode);
         }
     }
     
 
 }
        public FinalCalculationPeriodDateAdjustment(XmlNode xmlNode)
        {
            XmlNode relevantUnderlyingDateReferenceNode = xmlNode.SelectSingleNode("relevantUnderlyingDateReference");

            if (relevantUnderlyingDateReferenceNode != null)
            {
                if (relevantUnderlyingDateReferenceNode.Attributes["href"] != null || relevantUnderlyingDateReferenceNode.Attributes["id"] != null)
                {
                    if (relevantUnderlyingDateReferenceNode.Attributes["id"] != null)
                    {
                        relevantUnderlyingDateReferenceIDRef_ = relevantUnderlyingDateReferenceNode.Attributes["id"].Value;
                        RelevantUnderlyingDateReference ob = new RelevantUnderlyingDateReference(relevantUnderlyingDateReferenceNode);
                        IDManager.SetID(relevantUnderlyingDateReferenceIDRef_, ob);
                    }
                    else if (relevantUnderlyingDateReferenceNode.Attributes["href"] != null)
                    {
                        relevantUnderlyingDateReferenceIDRef_ = relevantUnderlyingDateReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        relevantUnderlyingDateReference_ = new RelevantUnderlyingDateReference(relevantUnderlyingDateReferenceNode);
                    }
                }
                else
                {
                    relevantUnderlyingDateReference_ = new RelevantUnderlyingDateReference(relevantUnderlyingDateReferenceNode);
                }
            }


            XmlNode swapStreamReferenceNode = xmlNode.SelectSingleNode("swapStreamReference");

            if (swapStreamReferenceNode != null)
            {
                if (swapStreamReferenceNode.Attributes["href"] != null || swapStreamReferenceNode.Attributes["id"] != null)
                {
                    if (swapStreamReferenceNode.Attributes["id"] != null)
                    {
                        swapStreamReferenceIDRef_ = swapStreamReferenceNode.Attributes["id"].Value;
                        InterestRateStreamReference ob = new InterestRateStreamReference(swapStreamReferenceNode);
                        IDManager.SetID(swapStreamReferenceIDRef_, ob);
                    }
                    else if (swapStreamReferenceNode.Attributes["href"] != null)
                    {
                        swapStreamReferenceIDRef_ = swapStreamReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        swapStreamReference_ = new InterestRateStreamReference(swapStreamReferenceNode);
                    }
                }
                else
                {
                    swapStreamReference_ = new InterestRateStreamReference(swapStreamReferenceNode);
                }
            }


            XmlNode businessDayConventionNode = xmlNode.SelectSingleNode("businessDayConvention");

            if (businessDayConventionNode != null)
            {
                if (businessDayConventionNode.Attributes["href"] != null || businessDayConventionNode.Attributes["id"] != null)
                {
                    if (businessDayConventionNode.Attributes["id"] != null)
                    {
                        businessDayConventionIDRef_ = businessDayConventionNode.Attributes["id"].Value;
                        BusinessDayConventionEnum ob = new BusinessDayConventionEnum(businessDayConventionNode);
                        IDManager.SetID(businessDayConventionIDRef_, ob);
                    }
                    else if (businessDayConventionNode.Attributes["href"] != null)
                    {
                        businessDayConventionIDRef_ = businessDayConventionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        businessDayConvention_ = new BusinessDayConventionEnum(businessDayConventionNode);
                    }
                }
                else
                {
                    businessDayConvention_ = new BusinessDayConventionEnum(businessDayConventionNode);
                }
            }
        }
 public FinalCalculationPeriodDateAdjustment(XmlNode xmlNode)
 {
     XmlNodeList relevantUnderlyingDateReferenceNodeList = xmlNode.SelectNodes("relevantUnderlyingDateReference");
     if (relevantUnderlyingDateReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in relevantUnderlyingDateReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 relevantUnderlyingDateReferenceIDRef = item.Attributes["id"].Name;
                 RelevantUnderlyingDateReference ob = RelevantUnderlyingDateReference();
                 IDManager.SetID(relevantUnderlyingDateReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 relevantUnderlyingDateReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 relevantUnderlyingDateReference = new RelevantUnderlyingDateReference(item);
             }
         }
     }
     
 
     XmlNodeList swapStreamReferenceNodeList = xmlNode.SelectNodes("swapStreamReference");
     if (swapStreamReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in swapStreamReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 swapStreamReferenceIDRef = item.Attributes["id"].Name;
                 InterestRateStreamReference ob = InterestRateStreamReference();
                 IDManager.SetID(swapStreamReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 swapStreamReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 swapStreamReference = new InterestRateStreamReference(item);
             }
         }
     }
     
 
     XmlNodeList businessDayConventionNodeList = xmlNode.SelectNodes("businessDayConvention");
     if (businessDayConventionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in businessDayConventionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 businessDayConventionIDRef = item.Attributes["id"].Name;
                 BusinessDayConventionEnum ob = BusinessDayConventionEnum();
                 IDManager.SetID(businessDayConventionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 businessDayConventionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 businessDayConvention = new BusinessDayConventionEnum(item);
             }
         }
     }
     
 
 }
        public FinalCalculationPeriodDateAdjustment(XmlNode xmlNode)
        {
            XmlNodeList relevantUnderlyingDateReferenceNodeList = xmlNode.SelectNodes("relevantUnderlyingDateReference");

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

            foreach (XmlNode item in relevantUnderlyingDateReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        relevantUnderlyingDateReferenceIDRef = item.Attributes["id"].Name;
                        RelevantUnderlyingDateReference ob = RelevantUnderlyingDateReference();
                        IDManager.SetID(relevantUnderlyingDateReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        relevantUnderlyingDateReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        relevantUnderlyingDateReference = new RelevantUnderlyingDateReference(item);
                    }
                }
            }


            XmlNodeList swapStreamReferenceNodeList = xmlNode.SelectNodes("swapStreamReference");

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

            foreach (XmlNode item in swapStreamReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        swapStreamReferenceIDRef = item.Attributes["id"].Name;
                        InterestRateStreamReference ob = InterestRateStreamReference();
                        IDManager.SetID(swapStreamReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        swapStreamReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        swapStreamReference = new InterestRateStreamReference(item);
                    }
                }
            }


            XmlNodeList businessDayConventionNodeList = xmlNode.SelectNodes("businessDayConvention");

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

            foreach (XmlNode item in businessDayConventionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        businessDayConventionIDRef = item.Attributes["id"].Name;
                        BusinessDayConventionEnum ob = BusinessDayConventionEnum();
                        IDManager.SetID(businessDayConventionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        businessDayConventionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        businessDayConvention = new BusinessDayConventionEnum(item);
                    }
                }
            }
        }