public InflationRateCalculation(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList inflationLagNodeList = xmlNode.SelectNodes("inflationLag");
     if (inflationLagNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in inflationLagNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 inflationLagIDRef = item.Attributes["id"].Name;
                 Offset ob = Offset();
                 IDManager.SetID(inflationLagIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 inflationLagIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 inflationLag = new Offset(item);
             }
         }
     }
     
 
     XmlNodeList indexSourceNodeList = xmlNode.SelectNodes("indexSource");
     if (indexSourceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in indexSourceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 indexSourceIDRef = item.Attributes["id"].Name;
                 RateSourcePage ob = RateSourcePage();
                 IDManager.SetID(indexSourceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 indexSourceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 indexSource = new RateSourcePage(item);
             }
         }
     }
     
 
     XmlNodeList mainPublicationNodeList = xmlNode.SelectNodes("mainPublication");
     if (mainPublicationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in mainPublicationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 mainPublicationIDRef = item.Attributes["id"].Name;
                 MainPublication ob = MainPublication();
                 IDManager.SetID(mainPublicationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 mainPublicationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 mainPublication = new MainPublication(item);
             }
         }
     }
     
 
     XmlNodeList interpolationMethodNodeList = xmlNode.SelectNodes("interpolationMethod");
     if (interpolationMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in interpolationMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 interpolationMethodIDRef = item.Attributes["id"].Name;
                 InterpolationMethod ob = InterpolationMethod();
                 IDManager.SetID(interpolationMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 interpolationMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 interpolationMethod = new InterpolationMethod(item);
             }
         }
     }
     
 
     XmlNodeList initialIndexLevelNodeList = xmlNode.SelectNodes("initialIndexLevel");
     if (initialIndexLevelNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in initialIndexLevelNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 initialIndexLevelIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(initialIndexLevelIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 initialIndexLevelIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 initialIndexLevel = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList fallbackBondApplicableNodeList = xmlNode.SelectNodes("fallbackBondApplicable");
     if (fallbackBondApplicableNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fallbackBondApplicableNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fallbackBondApplicableIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(fallbackBondApplicableIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fallbackBondApplicableIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fallbackBondApplicable = new XsdTypeBoolean(item);
             }
         }
     }
     
 
 }
        public InflationRateCalculation(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode inflationLagNode = xmlNode.SelectSingleNode("inflationLag");

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


            XmlNode indexSourceNode = xmlNode.SelectSingleNode("indexSource");

            if (indexSourceNode != null)
            {
                if (indexSourceNode.Attributes["href"] != null || indexSourceNode.Attributes["id"] != null)
                {
                    if (indexSourceNode.Attributes["id"] != null)
                    {
                        indexSourceIDRef_ = indexSourceNode.Attributes["id"].Value;
                        RateSourcePage ob = new RateSourcePage(indexSourceNode);
                        IDManager.SetID(indexSourceIDRef_, ob);
                    }
                    else if (indexSourceNode.Attributes["href"] != null)
                    {
                        indexSourceIDRef_ = indexSourceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        indexSource_ = new RateSourcePage(indexSourceNode);
                    }
                }
                else
                {
                    indexSource_ = new RateSourcePage(indexSourceNode);
                }
            }


            XmlNode mainPublicationNode = xmlNode.SelectSingleNode("mainPublication");

            if (mainPublicationNode != null)
            {
                if (mainPublicationNode.Attributes["href"] != null || mainPublicationNode.Attributes["id"] != null)
                {
                    if (mainPublicationNode.Attributes["id"] != null)
                    {
                        mainPublicationIDRef_ = mainPublicationNode.Attributes["id"].Value;
                        MainPublication ob = new MainPublication(mainPublicationNode);
                        IDManager.SetID(mainPublicationIDRef_, ob);
                    }
                    else if (mainPublicationNode.Attributes["href"] != null)
                    {
                        mainPublicationIDRef_ = mainPublicationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        mainPublication_ = new MainPublication(mainPublicationNode);
                    }
                }
                else
                {
                    mainPublication_ = new MainPublication(mainPublicationNode);
                }
            }


            XmlNode interpolationMethodNode = xmlNode.SelectSingleNode("interpolationMethod");

            if (interpolationMethodNode != null)
            {
                if (interpolationMethodNode.Attributes["href"] != null || interpolationMethodNode.Attributes["id"] != null)
                {
                    if (interpolationMethodNode.Attributes["id"] != null)
                    {
                        interpolationMethodIDRef_ = interpolationMethodNode.Attributes["id"].Value;
                        InterpolationMethod ob = new InterpolationMethod(interpolationMethodNode);
                        IDManager.SetID(interpolationMethodIDRef_, ob);
                    }
                    else if (interpolationMethodNode.Attributes["href"] != null)
                    {
                        interpolationMethodIDRef_ = interpolationMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        interpolationMethod_ = new InterpolationMethod(interpolationMethodNode);
                    }
                }
                else
                {
                    interpolationMethod_ = new InterpolationMethod(interpolationMethodNode);
                }
            }


            XmlNode initialIndexLevelNode = xmlNode.SelectSingleNode("initialIndexLevel");

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


            XmlNode fallbackBondApplicableNode = xmlNode.SelectSingleNode("fallbackBondApplicable");

            if (fallbackBondApplicableNode != null)
            {
                if (fallbackBondApplicableNode.Attributes["href"] != null || fallbackBondApplicableNode.Attributes["id"] != null)
                {
                    if (fallbackBondApplicableNode.Attributes["id"] != null)
                    {
                        fallbackBondApplicableIDRef_ = fallbackBondApplicableNode.Attributes["id"].Value;
                        XsdTypeBoolean ob = new XsdTypeBoolean(fallbackBondApplicableNode);
                        IDManager.SetID(fallbackBondApplicableIDRef_, ob);
                    }
                    else if (fallbackBondApplicableNode.Attributes["href"] != null)
                    {
                        fallbackBondApplicableIDRef_ = fallbackBondApplicableNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fallbackBondApplicable_ = new XsdTypeBoolean(fallbackBondApplicableNode);
                    }
                }
                else
                {
                    fallbackBondApplicable_ = new XsdTypeBoolean(fallbackBondApplicableNode);
                }
            }
        }
Example #3
0
        public InflationRateCalculation(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList inflationLagNodeList = xmlNode.SelectNodes("inflationLag");

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

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


            XmlNodeList indexSourceNodeList = xmlNode.SelectNodes("indexSource");

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

            foreach (XmlNode item in indexSourceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        indexSourceIDRef = item.Attributes["id"].Name;
                        RateSourcePage ob = RateSourcePage();
                        IDManager.SetID(indexSourceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        indexSourceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        indexSource = new RateSourcePage(item);
                    }
                }
            }


            XmlNodeList mainPublicationNodeList = xmlNode.SelectNodes("mainPublication");

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

            foreach (XmlNode item in mainPublicationNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        mainPublicationIDRef = item.Attributes["id"].Name;
                        MainPublication ob = MainPublication();
                        IDManager.SetID(mainPublicationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        mainPublicationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        mainPublication = new MainPublication(item);
                    }
                }
            }


            XmlNodeList interpolationMethodNodeList = xmlNode.SelectNodes("interpolationMethod");

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

            foreach (XmlNode item in interpolationMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        interpolationMethodIDRef = item.Attributes["id"].Name;
                        InterpolationMethod ob = InterpolationMethod();
                        IDManager.SetID(interpolationMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        interpolationMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        interpolationMethod = new InterpolationMethod(item);
                    }
                }
            }


            XmlNodeList initialIndexLevelNodeList = xmlNode.SelectNodes("initialIndexLevel");

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

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


            XmlNodeList fallbackBondApplicableNodeList = xmlNode.SelectNodes("fallbackBondApplicable");

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

            foreach (XmlNode item in fallbackBondApplicableNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fallbackBondApplicableIDRef = item.Attributes["id"].Name;
                        XsdTypeBoolean ob = XsdTypeBoolean();
                        IDManager.SetID(fallbackBondApplicableIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fallbackBondApplicableIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fallbackBondApplicable = new XsdTypeBoolean(item);
                    }
                }
            }
        }
 public InflationRateCalculation(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode inflationLagNode = xmlNode.SelectSingleNode("inflationLag");
     
     if (inflationLagNode != null)
     {
         if (inflationLagNode.Attributes["href"] != null || inflationLagNode.Attributes["id"] != null) 
         {
             if (inflationLagNode.Attributes["id"] != null) 
             {
                 inflationLagIDRef_ = inflationLagNode.Attributes["id"].Value;
                 Offset ob = new Offset(inflationLagNode);
                 IDManager.SetID(inflationLagIDRef_, ob);
             }
             else if (inflationLagNode.Attributes["href"] != null)
             {
                 inflationLagIDRef_ = inflationLagNode.Attributes["href"].Value;
             }
             else
             {
                 inflationLag_ = new Offset(inflationLagNode);
             }
         }
         else
         {
             inflationLag_ = new Offset(inflationLagNode);
         }
     }
     
 
     XmlNode indexSourceNode = xmlNode.SelectSingleNode("indexSource");
     
     if (indexSourceNode != null)
     {
         if (indexSourceNode.Attributes["href"] != null || indexSourceNode.Attributes["id"] != null) 
         {
             if (indexSourceNode.Attributes["id"] != null) 
             {
                 indexSourceIDRef_ = indexSourceNode.Attributes["id"].Value;
                 RateSourcePage ob = new RateSourcePage(indexSourceNode);
                 IDManager.SetID(indexSourceIDRef_, ob);
             }
             else if (indexSourceNode.Attributes["href"] != null)
             {
                 indexSourceIDRef_ = indexSourceNode.Attributes["href"].Value;
             }
             else
             {
                 indexSource_ = new RateSourcePage(indexSourceNode);
             }
         }
         else
         {
             indexSource_ = new RateSourcePage(indexSourceNode);
         }
     }
     
 
     XmlNode mainPublicationNode = xmlNode.SelectSingleNode("mainPublication");
     
     if (mainPublicationNode != null)
     {
         if (mainPublicationNode.Attributes["href"] != null || mainPublicationNode.Attributes["id"] != null) 
         {
             if (mainPublicationNode.Attributes["id"] != null) 
             {
                 mainPublicationIDRef_ = mainPublicationNode.Attributes["id"].Value;
                 MainPublication ob = new MainPublication(mainPublicationNode);
                 IDManager.SetID(mainPublicationIDRef_, ob);
             }
             else if (mainPublicationNode.Attributes["href"] != null)
             {
                 mainPublicationIDRef_ = mainPublicationNode.Attributes["href"].Value;
             }
             else
             {
                 mainPublication_ = new MainPublication(mainPublicationNode);
             }
         }
         else
         {
             mainPublication_ = new MainPublication(mainPublicationNode);
         }
     }
     
 
     XmlNode interpolationMethodNode = xmlNode.SelectSingleNode("interpolationMethod");
     
     if (interpolationMethodNode != null)
     {
         if (interpolationMethodNode.Attributes["href"] != null || interpolationMethodNode.Attributes["id"] != null) 
         {
             if (interpolationMethodNode.Attributes["id"] != null) 
             {
                 interpolationMethodIDRef_ = interpolationMethodNode.Attributes["id"].Value;
                 InterpolationMethod ob = new InterpolationMethod(interpolationMethodNode);
                 IDManager.SetID(interpolationMethodIDRef_, ob);
             }
             else if (interpolationMethodNode.Attributes["href"] != null)
             {
                 interpolationMethodIDRef_ = interpolationMethodNode.Attributes["href"].Value;
             }
             else
             {
                 interpolationMethod_ = new InterpolationMethod(interpolationMethodNode);
             }
         }
         else
         {
             interpolationMethod_ = new InterpolationMethod(interpolationMethodNode);
         }
     }
     
 
     XmlNode initialIndexLevelNode = xmlNode.SelectSingleNode("initialIndexLevel");
     
     if (initialIndexLevelNode != null)
     {
         if (initialIndexLevelNode.Attributes["href"] != null || initialIndexLevelNode.Attributes["id"] != null) 
         {
             if (initialIndexLevelNode.Attributes["id"] != null) 
             {
                 initialIndexLevelIDRef_ = initialIndexLevelNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(initialIndexLevelNode);
                 IDManager.SetID(initialIndexLevelIDRef_, ob);
             }
             else if (initialIndexLevelNode.Attributes["href"] != null)
             {
                 initialIndexLevelIDRef_ = initialIndexLevelNode.Attributes["href"].Value;
             }
             else
             {
                 initialIndexLevel_ = new XsdTypeDecimal(initialIndexLevelNode);
             }
         }
         else
         {
             initialIndexLevel_ = new XsdTypeDecimal(initialIndexLevelNode);
         }
     }
     
 
     XmlNode fallbackBondApplicableNode = xmlNode.SelectSingleNode("fallbackBondApplicable");
     
     if (fallbackBondApplicableNode != null)
     {
         if (fallbackBondApplicableNode.Attributes["href"] != null || fallbackBondApplicableNode.Attributes["id"] != null) 
         {
             if (fallbackBondApplicableNode.Attributes["id"] != null) 
             {
                 fallbackBondApplicableIDRef_ = fallbackBondApplicableNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(fallbackBondApplicableNode);
                 IDManager.SetID(fallbackBondApplicableIDRef_, ob);
             }
             else if (fallbackBondApplicableNode.Attributes["href"] != null)
             {
                 fallbackBondApplicableIDRef_ = fallbackBondApplicableNode.Attributes["href"].Value;
             }
             else
             {
                 fallbackBondApplicable_ = new XsdTypeBoolean(fallbackBondApplicableNode);
             }
         }
         else
         {
             fallbackBondApplicable_ = new XsdTypeBoolean(fallbackBondApplicableNode);
         }
     }
     
 
 }