Ejemplo n.º 1
0
        public DerivativeCalculationProcedure(XmlNode xmlNode)
        {
            XmlNode methodNode = xmlNode.SelectSingleNode("method");

            if (methodNode != null)
            {
                if (methodNode.Attributes["href"] != null || methodNode.Attributes["id"] != null)
                {
                    if (methodNode.Attributes["id"] != null)
                    {
                        methodIDRef_ = methodNode.Attributes["id"].Value;
                        DerivativeCalculationMethod ob = new DerivativeCalculationMethod(methodNode);
                        IDManager.SetID(methodIDRef_, ob);
                    }
                    else if (methodNode.Attributes["href"] != null)
                    {
                        methodIDRef_ = methodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        method_ = new DerivativeCalculationMethod(methodNode);
                    }
                }
                else
                {
                    method_ = new DerivativeCalculationMethod(methodNode);
                }
            }


            XmlNode perturbationAmountNode = xmlNode.SelectSingleNode("perturbationAmount");

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


            XmlNode averagedNode = xmlNode.SelectSingleNode("averaged");

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


            XmlNode perturbationTypeNode = xmlNode.SelectSingleNode("perturbationType");

            if (perturbationTypeNode != null)
            {
                if (perturbationTypeNode.Attributes["href"] != null || perturbationTypeNode.Attributes["id"] != null)
                {
                    if (perturbationTypeNode.Attributes["id"] != null)
                    {
                        perturbationTypeIDRef_ = perturbationTypeNode.Attributes["id"].Value;
                        PerturbationType ob = new PerturbationType(perturbationTypeNode);
                        IDManager.SetID(perturbationTypeIDRef_, ob);
                    }
                    else if (perturbationTypeNode.Attributes["href"] != null)
                    {
                        perturbationTypeIDRef_ = perturbationTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        perturbationType_ = new PerturbationType(perturbationTypeNode);
                    }
                }
                else
                {
                    perturbationType_ = new PerturbationType(perturbationTypeNode);
                }
            }


            XmlNode derivativeFormulaNode = xmlNode.SelectSingleNode("derivativeFormula");

            if (derivativeFormulaNode != null)
            {
                if (derivativeFormulaNode.Attributes["href"] != null || derivativeFormulaNode.Attributes["id"] != null)
                {
                    if (derivativeFormulaNode.Attributes["id"] != null)
                    {
                        derivativeFormulaIDRef_ = derivativeFormulaNode.Attributes["id"].Value;
                        XsdTypeString ob = new XsdTypeString(derivativeFormulaNode);
                        IDManager.SetID(derivativeFormulaIDRef_, ob);
                    }
                    else if (derivativeFormulaNode.Attributes["href"] != null)
                    {
                        derivativeFormulaIDRef_ = derivativeFormulaNode.Attributes["href"].Value;
                    }
                    else
                    {
                        derivativeFormula_ = new XsdTypeString(derivativeFormulaNode);
                    }
                }
                else
                {
                    derivativeFormula_ = new XsdTypeString(derivativeFormulaNode);
                }
            }


            XmlNode replacementMarketInputNode = xmlNode.SelectSingleNode("replacementMarketInput");

            if (replacementMarketInputNode != null)
            {
                if (replacementMarketInputNode.Attributes["href"] != null || replacementMarketInputNode.Attributes["id"] != null)
                {
                    if (replacementMarketInputNode.Attributes["id"] != null)
                    {
                        replacementMarketInputIDRef_ = replacementMarketInputNode.Attributes["id"].Value;
                        PricingStructureReference ob = new PricingStructureReference(replacementMarketInputNode);
                        IDManager.SetID(replacementMarketInputIDRef_, ob);
                    }
                    else if (replacementMarketInputNode.Attributes["href"] != null)
                    {
                        replacementMarketInputIDRef_ = replacementMarketInputNode.Attributes["href"].Value;
                    }
                    else
                    {
                        replacementMarketInput_ = new PricingStructureReference(replacementMarketInputNode);
                    }
                }
                else
                {
                    replacementMarketInput_ = new PricingStructureReference(replacementMarketInputNode);
                }
            }
        }
 public DerivativeCalculationProcedure(XmlNode xmlNode)
 {
     XmlNode methodNode = xmlNode.SelectSingleNode("method");
     
     if (methodNode != null)
     {
         if (methodNode.Attributes["href"] != null || methodNode.Attributes["id"] != null) 
         {
             if (methodNode.Attributes["id"] != null) 
             {
                 methodIDRef_ = methodNode.Attributes["id"].Value;
                 DerivativeCalculationMethod ob = new DerivativeCalculationMethod(methodNode);
                 IDManager.SetID(methodIDRef_, ob);
             }
             else if (methodNode.Attributes["href"] != null)
             {
                 methodIDRef_ = methodNode.Attributes["href"].Value;
             }
             else
             {
                 method_ = new DerivativeCalculationMethod(methodNode);
             }
         }
         else
         {
             method_ = new DerivativeCalculationMethod(methodNode);
         }
     }
     
 
     XmlNode perturbationAmountNode = xmlNode.SelectSingleNode("perturbationAmount");
     
     if (perturbationAmountNode != null)
     {
         if (perturbationAmountNode.Attributes["href"] != null || perturbationAmountNode.Attributes["id"] != null) 
         {
             if (perturbationAmountNode.Attributes["id"] != null) 
             {
                 perturbationAmountIDRef_ = perturbationAmountNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(perturbationAmountNode);
                 IDManager.SetID(perturbationAmountIDRef_, ob);
             }
             else if (perturbationAmountNode.Attributes["href"] != null)
             {
                 perturbationAmountIDRef_ = perturbationAmountNode.Attributes["href"].Value;
             }
             else
             {
                 perturbationAmount_ = new XsdTypeDecimal(perturbationAmountNode);
             }
         }
         else
         {
             perturbationAmount_ = new XsdTypeDecimal(perturbationAmountNode);
         }
     }
     
 
     XmlNode averagedNode = xmlNode.SelectSingleNode("averaged");
     
     if (averagedNode != null)
     {
         if (averagedNode.Attributes["href"] != null || averagedNode.Attributes["id"] != null) 
         {
             if (averagedNode.Attributes["id"] != null) 
             {
                 averagedIDRef_ = averagedNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(averagedNode);
                 IDManager.SetID(averagedIDRef_, ob);
             }
             else if (averagedNode.Attributes["href"] != null)
             {
                 averagedIDRef_ = averagedNode.Attributes["href"].Value;
             }
             else
             {
                 averaged_ = new XsdTypeBoolean(averagedNode);
             }
         }
         else
         {
             averaged_ = new XsdTypeBoolean(averagedNode);
         }
     }
     
 
     XmlNode perturbationTypeNode = xmlNode.SelectSingleNode("perturbationType");
     
     if (perturbationTypeNode != null)
     {
         if (perturbationTypeNode.Attributes["href"] != null || perturbationTypeNode.Attributes["id"] != null) 
         {
             if (perturbationTypeNode.Attributes["id"] != null) 
             {
                 perturbationTypeIDRef_ = perturbationTypeNode.Attributes["id"].Value;
                 PerturbationType ob = new PerturbationType(perturbationTypeNode);
                 IDManager.SetID(perturbationTypeIDRef_, ob);
             }
             else if (perturbationTypeNode.Attributes["href"] != null)
             {
                 perturbationTypeIDRef_ = perturbationTypeNode.Attributes["href"].Value;
             }
             else
             {
                 perturbationType_ = new PerturbationType(perturbationTypeNode);
             }
         }
         else
         {
             perturbationType_ = new PerturbationType(perturbationTypeNode);
         }
     }
     
 
     XmlNode derivativeFormulaNode = xmlNode.SelectSingleNode("derivativeFormula");
     
     if (derivativeFormulaNode != null)
     {
         if (derivativeFormulaNode.Attributes["href"] != null || derivativeFormulaNode.Attributes["id"] != null) 
         {
             if (derivativeFormulaNode.Attributes["id"] != null) 
             {
                 derivativeFormulaIDRef_ = derivativeFormulaNode.Attributes["id"].Value;
                 XsdTypeString ob = new XsdTypeString(derivativeFormulaNode);
                 IDManager.SetID(derivativeFormulaIDRef_, ob);
             }
             else if (derivativeFormulaNode.Attributes["href"] != null)
             {
                 derivativeFormulaIDRef_ = derivativeFormulaNode.Attributes["href"].Value;
             }
             else
             {
                 derivativeFormula_ = new XsdTypeString(derivativeFormulaNode);
             }
         }
         else
         {
             derivativeFormula_ = new XsdTypeString(derivativeFormulaNode);
         }
     }
     
 
     XmlNode replacementMarketInputNode = xmlNode.SelectSingleNode("replacementMarketInput");
     
     if (replacementMarketInputNode != null)
     {
         if (replacementMarketInputNode.Attributes["href"] != null || replacementMarketInputNode.Attributes["id"] != null) 
         {
             if (replacementMarketInputNode.Attributes["id"] != null) 
             {
                 replacementMarketInputIDRef_ = replacementMarketInputNode.Attributes["id"].Value;
                 PricingStructureReference ob = new PricingStructureReference(replacementMarketInputNode);
                 IDManager.SetID(replacementMarketInputIDRef_, ob);
             }
             else if (replacementMarketInputNode.Attributes["href"] != null)
             {
                 replacementMarketInputIDRef_ = replacementMarketInputNode.Attributes["href"].Value;
             }
             else
             {
                 replacementMarketInput_ = new PricingStructureReference(replacementMarketInputNode);
             }
         }
         else
         {
             replacementMarketInput_ = new PricingStructureReference(replacementMarketInputNode);
         }
     }
     
 
 }
 public DerivativeCalculationProcedure(XmlNode xmlNode)
 {
     XmlNodeList methodNodeList = xmlNode.SelectNodes("method");
     if (methodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in methodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 methodIDRef = item.Attributes["id"].Name;
                 DerivativeCalculationMethod ob = DerivativeCalculationMethod();
                 IDManager.SetID(methodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 methodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 method = new DerivativeCalculationMethod(item);
             }
         }
     }
     
 
     XmlNodeList perturbationAmountNodeList = xmlNode.SelectNodes("perturbationAmount");
     if (perturbationAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in perturbationAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 perturbationAmountIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(perturbationAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 perturbationAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 perturbationAmount = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList averagedNodeList = xmlNode.SelectNodes("averaged");
     if (averagedNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in averagedNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 averagedIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(averagedIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 averagedIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 averaged = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList perturbationTypeNodeList = xmlNode.SelectNodes("perturbationType");
     if (perturbationTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in perturbationTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 perturbationTypeIDRef = item.Attributes["id"].Name;
                 PerturbationType ob = PerturbationType();
                 IDManager.SetID(perturbationTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 perturbationTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 perturbationType = new PerturbationType(item);
             }
         }
     }
     
 
     XmlNodeList derivativeFormulaNodeList = xmlNode.SelectNodes("derivativeFormula");
     if (derivativeFormulaNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in derivativeFormulaNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 derivativeFormulaIDRef = item.Attributes["id"].Name;
                 XsdTypeString ob = XsdTypeString();
                 IDManager.SetID(derivativeFormulaIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 derivativeFormulaIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 derivativeFormula = new XsdTypeString(item);
             }
         }
     }
     
 
     XmlNodeList replacementMarketInputNodeList = xmlNode.SelectNodes("replacementMarketInput");
     if (replacementMarketInputNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in replacementMarketInputNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 replacementMarketInputIDRef = item.Attributes["id"].Name;
                 PricingStructureReference ob = PricingStructureReference();
                 IDManager.SetID(replacementMarketInputIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 replacementMarketInputIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 replacementMarketInput = new PricingStructureReference(item);
             }
         }
     }
     
 
 }
Ejemplo n.º 4
0
        public DerivativeCalculationProcedure(XmlNode xmlNode)
        {
            XmlNodeList methodNodeList = xmlNode.SelectNodes("method");

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

            foreach (XmlNode item in methodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        methodIDRef = item.Attributes["id"].Name;
                        DerivativeCalculationMethod ob = DerivativeCalculationMethod();
                        IDManager.SetID(methodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        methodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        method = new DerivativeCalculationMethod(item);
                    }
                }
            }


            XmlNodeList perturbationAmountNodeList = xmlNode.SelectNodes("perturbationAmount");

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

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


            XmlNodeList averagedNodeList = xmlNode.SelectNodes("averaged");

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

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


            XmlNodeList perturbationTypeNodeList = xmlNode.SelectNodes("perturbationType");

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

            foreach (XmlNode item in perturbationTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        perturbationTypeIDRef = item.Attributes["id"].Name;
                        PerturbationType ob = PerturbationType();
                        IDManager.SetID(perturbationTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        perturbationTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        perturbationType = new PerturbationType(item);
                    }
                }
            }


            XmlNodeList derivativeFormulaNodeList = xmlNode.SelectNodes("derivativeFormula");

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

            foreach (XmlNode item in derivativeFormulaNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        derivativeFormulaIDRef = item.Attributes["id"].Name;
                        XsdTypeString ob = XsdTypeString();
                        IDManager.SetID(derivativeFormulaIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        derivativeFormulaIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        derivativeFormula = new XsdTypeString(item);
                    }
                }
            }


            XmlNodeList replacementMarketInputNodeList = xmlNode.SelectNodes("replacementMarketInput");

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

            foreach (XmlNode item in replacementMarketInputNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        replacementMarketInputIDRef = item.Attributes["id"].Name;
                        PricingStructureReference ob = PricingStructureReference();
                        IDManager.SetID(replacementMarketInputIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        replacementMarketInputIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        replacementMarketInput = new PricingStructureReference(item);
                    }
                }
            }
        }