public NonNegativeStep(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList stepValueNodeList = xmlNode.SelectNodes("stepValue");

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

            foreach (XmlNode item in stepValueNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        stepValueIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(stepValueIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        stepValueIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        stepValue = new NonNegativeDecimal(item);
                    }
                }
            }
        }
 public NonNegativeMoney(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode amountNode = xmlNode.SelectSingleNode("amount");
     
     if (amountNode != null)
     {
         if (amountNode.Attributes["href"] != null || amountNode.Attributes["id"] != null) 
         {
             if (amountNode.Attributes["id"] != null) 
             {
                 amountIDRef_ = amountNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(amountNode);
                 IDManager.SetID(amountIDRef_, ob);
             }
             else if (amountNode.Attributes["href"] != null)
             {
                 amountIDRef_ = amountNode.Attributes["href"].Value;
             }
             else
             {
                 amount_ = new NonNegativeDecimal(amountNode);
             }
         }
         else
         {
             amount_ = new NonNegativeDecimal(amountNode);
         }
     }
     
 
 }
Exemple #3
0
        public NonNegativeStep(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode stepValueNode = xmlNode.SelectSingleNode("stepValue");

            if (stepValueNode != null)
            {
                if (stepValueNode.Attributes["href"] != null || stepValueNode.Attributes["id"] != null)
                {
                    if (stepValueNode.Attributes["id"] != null)
                    {
                        stepValueIDRef_ = stepValueNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(stepValueNode);
                        IDManager.SetID(stepValueIDRef_, ob);
                    }
                    else if (stepValueNode.Attributes["href"] != null)
                    {
                        stepValueIDRef_ = stepValueNode.Attributes["href"].Value;
                    }
                    else
                    {
                        stepValue_ = new NonNegativeDecimal(stepValueNode);
                    }
                }
                else
                {
                    stepValue_ = new NonNegativeDecimal(stepValueNode);
                }
            }
        }
        public NonNegativeMoney(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode amountNode = xmlNode.SelectSingleNode("amount");

            if (amountNode != null)
            {
                if (amountNode.Attributes["href"] != null || amountNode.Attributes["id"] != null)
                {
                    if (amountNode.Attributes["id"] != null)
                    {
                        amountIDRef_ = amountNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(amountNode);
                        IDManager.SetID(amountIDRef_, ob);
                    }
                    else if (amountNode.Attributes["href"] != null)
                    {
                        amountIDRef_ = amountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        amount_ = new NonNegativeDecimal(amountNode);
                    }
                }
                else
                {
                    amount_ = new NonNegativeDecimal(amountNode);
                }
            }
        }
 public NonNegativeStep(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode stepValueNode = xmlNode.SelectSingleNode("stepValue");
     
     if (stepValueNode != null)
     {
         if (stepValueNode.Attributes["href"] != null || stepValueNode.Attributes["id"] != null) 
         {
             if (stepValueNode.Attributes["id"] != null) 
             {
                 stepValueIDRef_ = stepValueNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(stepValueNode);
                 IDManager.SetID(stepValueIDRef_, ob);
             }
             else if (stepValueNode.Attributes["href"] != null)
             {
                 stepValueIDRef_ = stepValueNode.Attributes["href"].Value;
             }
             else
             {
                 stepValue_ = new NonNegativeDecimal(stepValueNode);
             }
         }
         else
         {
             stepValue_ = new NonNegativeDecimal(stepValueNode);
         }
     }
     
 
 }
Exemple #6
0
        public NonNegativeMoney(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList amountNodeList = xmlNode.SelectNodes("amount");

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

            foreach (XmlNode item in amountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        amountIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(amountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        amountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        amount = new NonNegativeDecimal(item);
                    }
                }
            }
        }
 public UnitQuantity(XmlNode xmlNode)
 {
     XmlNode quantityUnitNode = xmlNode.SelectSingleNode("quantityUnit");
     
     if (quantityUnitNode != null)
     {
         if (quantityUnitNode.Attributes["href"] != null || quantityUnitNode.Attributes["id"] != null) 
         {
             if (quantityUnitNode.Attributes["id"] != null) 
             {
                 quantityUnitIDRef_ = quantityUnitNode.Attributes["id"].Value;
                 QuantityUnit ob = new QuantityUnit(quantityUnitNode);
                 IDManager.SetID(quantityUnitIDRef_, ob);
             }
             else if (quantityUnitNode.Attributes["href"] != null)
             {
                 quantityUnitIDRef_ = quantityUnitNode.Attributes["href"].Value;
             }
             else
             {
                 quantityUnit_ = new QuantityUnit(quantityUnitNode);
             }
         }
         else
         {
             quantityUnit_ = new QuantityUnit(quantityUnitNode);
         }
     }
     
 
     XmlNode quantityNode = xmlNode.SelectSingleNode("quantity");
     
     if (quantityNode != null)
     {
         if (quantityNode.Attributes["href"] != null || quantityNode.Attributes["id"] != null) 
         {
             if (quantityNode.Attributes["id"] != null) 
             {
                 quantityIDRef_ = quantityNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(quantityNode);
                 IDManager.SetID(quantityIDRef_, ob);
             }
             else if (quantityNode.Attributes["href"] != null)
             {
                 quantityIDRef_ = quantityNode.Attributes["href"].Value;
             }
             else
             {
                 quantity_ = new NonNegativeDecimal(quantityNode);
             }
         }
         else
         {
             quantity_ = new NonNegativeDecimal(quantityNode);
         }
     }
     
 
 }
        public UnitQuantity(XmlNode xmlNode)
        {
            XmlNodeList quantityUnitNodeList = xmlNode.SelectNodes("quantityUnit");

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

            foreach (XmlNode item in quantityUnitNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        quantityUnitIDRef = item.Attributes["id"].Name;
                        QuantityUnit ob = QuantityUnit();
                        IDManager.SetID(quantityUnitIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        quantityUnitIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        quantityUnit = new QuantityUnit(item);
                    }
                }
            }


            XmlNodeList quantityNodeList = xmlNode.SelectNodes("quantity");

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

            foreach (XmlNode item in quantityNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        quantityIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(quantityIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        quantityIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        quantity = new NonNegativeDecimal(item);
                    }
                }
            }
        }
        public UnitQuantity(XmlNode xmlNode)
        {
            XmlNode quantityUnitNode = xmlNode.SelectSingleNode("quantityUnit");

            if (quantityUnitNode != null)
            {
                if (quantityUnitNode.Attributes["href"] != null || quantityUnitNode.Attributes["id"] != null)
                {
                    if (quantityUnitNode.Attributes["id"] != null)
                    {
                        quantityUnitIDRef_ = quantityUnitNode.Attributes["id"].Value;
                        QuantityUnit ob = new QuantityUnit(quantityUnitNode);
                        IDManager.SetID(quantityUnitIDRef_, ob);
                    }
                    else if (quantityUnitNode.Attributes["href"] != null)
                    {
                        quantityUnitIDRef_ = quantityUnitNode.Attributes["href"].Value;
                    }
                    else
                    {
                        quantityUnit_ = new QuantityUnit(quantityUnitNode);
                    }
                }
                else
                {
                    quantityUnit_ = new QuantityUnit(quantityUnitNode);
                }
            }


            XmlNode quantityNode = xmlNode.SelectSingleNode("quantity");

            if (quantityNode != null)
            {
                if (quantityNode.Attributes["href"] != null || quantityNode.Attributes["id"] != null)
                {
                    if (quantityNode.Attributes["id"] != null)
                    {
                        quantityIDRef_ = quantityNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(quantityNode);
                        IDManager.SetID(quantityIDRef_, ob);
                    }
                    else if (quantityNode.Attributes["href"] != null)
                    {
                        quantityIDRef_ = quantityNode.Attributes["href"].Value;
                    }
                    else
                    {
                        quantity_ = new NonNegativeDecimal(quantityNode);
                    }
                }
                else
                {
                    quantity_ = new NonNegativeDecimal(quantityNode);
                }
            }
        }
        public NonNegativeSchedule(XmlNode xmlNode)
        {
            XmlNodeList initialValueNodeList = xmlNode.SelectNodes("initialValue");

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

            foreach (XmlNode item in initialValueNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        initialValueIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(initialValueIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        initialValueIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        initialValue = new NonNegativeDecimal(item);
                    }
                }
            }


            XmlNodeList stepNodeList = xmlNode.SelectNodes("step");

            foreach (XmlNode item in stepNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        stepIDRef = item.Attributes["id"].Name;
                        List <NonNegativeStep> ob = new List <NonNegativeStep>();
                        ob.Add(new NonNegativeStep(item));
                        IDManager.SetID(stepIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        stepIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        step.Add(new NonNegativeStep(item));
                    }
                }
            }
        }
Exemple #11
0
        public EquitySwapTransactionSupplement(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList mutualEarlyTerminationNodeList = xmlNode.SelectNodes("mutualEarlyTermination");

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

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


            XmlNodeList optionalEarlyTerminationNodeList = xmlNode.SelectNodes("optionalEarlyTermination");

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

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


            XmlNodeList breakFundingRecoveryNodeList = xmlNode.SelectNodes("breakFundingRecovery");

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

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


            XmlNodeList breakFeeElectionNodeList = xmlNode.SelectNodes("breakFeeElection");

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

            foreach (XmlNode item in breakFeeElectionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        breakFeeElectionIDRef = item.Attributes["id"].Name;
                        FeeElectionEnum ob = FeeElectionEnum();
                        IDManager.SetID(breakFeeElectionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        breakFeeElectionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        breakFeeElection = new FeeElectionEnum(item);
                    }
                }
            }


            XmlNodeList breakFeeRateNodeList = xmlNode.SelectNodes("breakFeeRate");

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

            foreach (XmlNode item in breakFeeRateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        breakFeeRateIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(breakFeeRateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        breakFeeRateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        breakFeeRate = new NonNegativeDecimal(item);
                    }
                }
            }


            XmlNodeList multipleExchangeIndexAnnexFallbackNodeList = xmlNode.SelectNodes("multipleExchangeIndexAnnexFallback");

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

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


            XmlNodeList componentSecurityIndexAnnexFallbackNodeList = xmlNode.SelectNodes("componentSecurityIndexAnnexFallback");

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

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


            XmlNodeList localJurisdictionNodeList = xmlNode.SelectNodes("localJurisdiction");

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

            foreach (XmlNode item in localJurisdictionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        localJurisdictionIDRef = item.Attributes["id"].Name;
                        CountryCode ob = CountryCode();
                        IDManager.SetID(localJurisdictionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        localJurisdictionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        localJurisdiction = new CountryCode(item);
                    }
                }
            }


            XmlNodeList relevantJurisdictionNodeList = xmlNode.SelectNodes("relevantJurisdiction");

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

            foreach (XmlNode item in relevantJurisdictionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        relevantJurisdictionIDRef = item.Attributes["id"].Name;
                        CountryCode ob = CountryCode();
                        IDManager.SetID(relevantJurisdictionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        relevantJurisdictionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        relevantJurisdiction = new CountryCode(item);
                    }
                }
            }


            XmlNodeList extraordinaryEventsNodeList = xmlNode.SelectNodes("extraordinaryEvents");

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

            foreach (XmlNode item in extraordinaryEventsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        extraordinaryEventsIDRef = item.Attributes["id"].Name;
                        ExtraordinaryEvents ob = ExtraordinaryEvents();
                        IDManager.SetID(extraordinaryEventsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        extraordinaryEventsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        extraordinaryEvents = new ExtraordinaryEvents(item);
                    }
                }
            }
        }
Exemple #12
0
        public MultipleExercise(XmlNode xmlNode)
        {
            XmlNodeList notionalReferenceNodeList = xmlNode.SelectNodes("notionalReference");

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


            XmlNode integralMultipleAmountNode = xmlNode.SelectSingleNode("integralMultipleAmount");

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


            XmlNode minimumNotionalAmountNode = xmlNode.SelectSingleNode("minimumNotionalAmount");

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


            XmlNode minimumNumberOfOptionsNode = xmlNode.SelectSingleNode("minimumNumberOfOptions");

            if (minimumNumberOfOptionsNode != null)
            {
                if (minimumNumberOfOptionsNode.Attributes["href"] != null || minimumNumberOfOptionsNode.Attributes["id"] != null)
                {
                    if (minimumNumberOfOptionsNode.Attributes["id"] != null)
                    {
                        minimumNumberOfOptionsIDRef_ = minimumNumberOfOptionsNode.Attributes["id"].Value;
                        XsdTypeNonNegativeInteger ob = new XsdTypeNonNegativeInteger(minimumNumberOfOptionsNode);
                        IDManager.SetID(minimumNumberOfOptionsIDRef_, ob);
                    }
                    else if (minimumNumberOfOptionsNode.Attributes["href"] != null)
                    {
                        minimumNumberOfOptionsIDRef_ = minimumNumberOfOptionsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        minimumNumberOfOptions_ = new XsdTypeNonNegativeInteger(minimumNumberOfOptionsNode);
                    }
                }
                else
                {
                    minimumNumberOfOptions_ = new XsdTypeNonNegativeInteger(minimumNumberOfOptionsNode);
                }
            }


            XmlNode maximumNotionalAmountNode = xmlNode.SelectSingleNode("maximumNotionalAmount");

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


            XmlNode maximumNumberOfOptionsNode = xmlNode.SelectSingleNode("maximumNumberOfOptions");

            if (maximumNumberOfOptionsNode != null)
            {
                if (maximumNumberOfOptionsNode.Attributes["href"] != null || maximumNumberOfOptionsNode.Attributes["id"] != null)
                {
                    if (maximumNumberOfOptionsNode.Attributes["id"] != null)
                    {
                        maximumNumberOfOptionsIDRef_ = maximumNumberOfOptionsNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(maximumNumberOfOptionsNode);
                        IDManager.SetID(maximumNumberOfOptionsIDRef_, ob);
                    }
                    else if (maximumNumberOfOptionsNode.Attributes["href"] != null)
                    {
                        maximumNumberOfOptionsIDRef_ = maximumNumberOfOptionsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        maximumNumberOfOptions_ = new NonNegativeDecimal(maximumNumberOfOptionsNode);
                    }
                }
                else
                {
                    maximumNumberOfOptions_ = new NonNegativeDecimal(maximumNumberOfOptionsNode);
                }
            }
        }
        public WeightedAveragingObservation(XmlNode xmlNode)
        {
            XmlNode dateTimeNode = xmlNode.SelectSingleNode("dateTime");

            if (dateTimeNode != null)
            {
                if (dateTimeNode.Attributes["href"] != null || dateTimeNode.Attributes["id"] != null)
                {
                    if (dateTimeNode.Attributes["id"] != null)
                    {
                        dateTimeIDRef_ = dateTimeNode.Attributes["id"].Value;
                        XsdTypeDateTime ob = new XsdTypeDateTime(dateTimeNode);
                        IDManager.SetID(dateTimeIDRef_, ob);
                    }
                    else if (dateTimeNode.Attributes["href"] != null)
                    {
                        dateTimeIDRef_ = dateTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dateTime_ = new XsdTypeDateTime(dateTimeNode);
                    }
                }
                else
                {
                    dateTime_ = new XsdTypeDateTime(dateTimeNode);
                }
            }


            XmlNode observationNumberNode = xmlNode.SelectSingleNode("observationNumber");

            if (observationNumberNode != null)
            {
                if (observationNumberNode.Attributes["href"] != null || observationNumberNode.Attributes["id"] != null)
                {
                    if (observationNumberNode.Attributes["id"] != null)
                    {
                        observationNumberIDRef_ = observationNumberNode.Attributes["id"].Value;
                        XsdTypePositiveInteger ob = new XsdTypePositiveInteger(observationNumberNode);
                        IDManager.SetID(observationNumberIDRef_, ob);
                    }
                    else if (observationNumberNode.Attributes["href"] != null)
                    {
                        observationNumberIDRef_ = observationNumberNode.Attributes["href"].Value;
                    }
                    else
                    {
                        observationNumber_ = new XsdTypePositiveInteger(observationNumberNode);
                    }
                }
                else
                {
                    observationNumber_ = new XsdTypePositiveInteger(observationNumberNode);
                }
            }


            XmlNode weightNode = xmlNode.SelectSingleNode("weight");

            if (weightNode != null)
            {
                if (weightNode.Attributes["href"] != null || weightNode.Attributes["id"] != null)
                {
                    if (weightNode.Attributes["id"] != null)
                    {
                        weightIDRef_ = weightNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(weightNode);
                        IDManager.SetID(weightIDRef_, ob);
                    }
                    else if (weightNode.Attributes["href"] != null)
                    {
                        weightIDRef_ = weightNode.Attributes["href"].Value;
                    }
                    else
                    {
                        weight_ = new NonNegativeDecimal(weightNode);
                    }
                }
                else
                {
                    weight_ = new NonNegativeDecimal(weightNode);
                }
            }
        }
        public Variance(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList varianceAmountNodeList = xmlNode.SelectNodes("varianceAmount");

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

            foreach (XmlNode item in varianceAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        varianceAmountIDRef = item.Attributes["id"].Name;
                        NonNegativeMoney ob = NonNegativeMoney();
                        IDManager.SetID(varianceAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        varianceAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        varianceAmount = new NonNegativeMoney(item);
                    }
                }
            }


            XmlNodeList volatilityStrikePriceNodeList = xmlNode.SelectNodes("volatilityStrikePrice");

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

            foreach (XmlNode item in volatilityStrikePriceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        volatilityStrikePriceIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(volatilityStrikePriceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        volatilityStrikePriceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        volatilityStrikePrice = new NonNegativeDecimal(item);
                    }
                }
            }


            XmlNodeList varianceStrikePriceNodeList = xmlNode.SelectNodes("varianceStrikePrice");

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

            foreach (XmlNode item in varianceStrikePriceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        varianceStrikePriceIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(varianceStrikePriceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        varianceStrikePriceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        varianceStrikePrice = new NonNegativeDecimal(item);
                    }
                }
            }


            XmlNodeList varianceCapNodeList = xmlNode.SelectNodes("varianceCap");

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

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


            XmlNodeList unadjustedVarianceCapNodeList = xmlNode.SelectNodes("unadjustedVarianceCap");

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

            foreach (XmlNode item in unadjustedVarianceCapNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        unadjustedVarianceCapIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(unadjustedVarianceCapIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        unadjustedVarianceCapIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        unadjustedVarianceCap = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList boundedVarianceNodeList = xmlNode.SelectNodes("boundedVariance");

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

            foreach (XmlNode item in boundedVarianceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        boundedVarianceIDRef = item.Attributes["id"].Name;
                        BoundedVariance ob = BoundedVariance();
                        IDManager.SetID(boundedVarianceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        boundedVarianceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        boundedVariance = new BoundedVariance(item);
                    }
                }
            }


            XmlNodeList exchangeTradedContractNearestNodeList = xmlNode.SelectNodes("exchangeTradedContractNearest");

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

            foreach (XmlNode item in exchangeTradedContractNearestNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        exchangeTradedContractNearestIDRef = item.Attributes["id"].Name;
                        ExchangeTradedContract ob = ExchangeTradedContract();
                        IDManager.SetID(exchangeTradedContractNearestIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        exchangeTradedContractNearestIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        exchangeTradedContractNearest = new ExchangeTradedContract(item);
                    }
                }
            }


            XmlNodeList vegaNotionalAmountNodeList = xmlNode.SelectNodes("vegaNotionalAmount");

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

            foreach (XmlNode item in vegaNotionalAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        vegaNotionalAmountIDRef = item.Attributes["id"].Name;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(vegaNotionalAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        vegaNotionalAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        vegaNotionalAmount = new XsdTypeDecimal(item);
                    }
                }
            }
        }
        public EquityDerivativeShortFormBase(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList strikeNodeList = xmlNode.SelectNodes("strike");

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

            foreach (XmlNode item in strikeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        strikeIDRef = item.Attributes["id"].Name;
                        EquityStrike ob = EquityStrike();
                        IDManager.SetID(strikeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        strikeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        strike = new EquityStrike(item);
                    }
                }
            }


            XmlNodeList spotPriceNodeList = xmlNode.SelectNodes("spotPrice");

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

            foreach (XmlNode item in spotPriceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        spotPriceIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(spotPriceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        spotPriceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        spotPrice = new NonNegativeDecimal(item);
                    }
                }
            }


            XmlNodeList numberOfOptionsNodeList = xmlNode.SelectNodes("numberOfOptions");

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

            foreach (XmlNode item in numberOfOptionsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        numberOfOptionsIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(numberOfOptionsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        numberOfOptionsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        numberOfOptions = new NonNegativeDecimal(item);
                    }
                }
            }


            XmlNodeList equityPremiumNodeList = xmlNode.SelectNodes("equityPremium");

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

            foreach (XmlNode item in equityPremiumNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        equityPremiumIDRef = item.Attributes["id"].Name;
                        EquityPremium ob = EquityPremium();
                        IDManager.SetID(equityPremiumIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        equityPremiumIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        equityPremium = new EquityPremium(item);
                    }
                }
            }
        }
 public Variance(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode varianceAmountNode = xmlNode.SelectSingleNode("varianceAmount");
     
     if (varianceAmountNode != null)
     {
         if (varianceAmountNode.Attributes["href"] != null || varianceAmountNode.Attributes["id"] != null) 
         {
             if (varianceAmountNode.Attributes["id"] != null) 
             {
                 varianceAmountIDRef_ = varianceAmountNode.Attributes["id"].Value;
                 NonNegativeMoney ob = new NonNegativeMoney(varianceAmountNode);
                 IDManager.SetID(varianceAmountIDRef_, ob);
             }
             else if (varianceAmountNode.Attributes["href"] != null)
             {
                 varianceAmountIDRef_ = varianceAmountNode.Attributes["href"].Value;
             }
             else
             {
                 varianceAmount_ = new NonNegativeMoney(varianceAmountNode);
             }
         }
         else
         {
             varianceAmount_ = new NonNegativeMoney(varianceAmountNode);
         }
     }
     
 
     XmlNode volatilityStrikePriceNode = xmlNode.SelectSingleNode("volatilityStrikePrice");
     
     if (volatilityStrikePriceNode != null)
     {
         if (volatilityStrikePriceNode.Attributes["href"] != null || volatilityStrikePriceNode.Attributes["id"] != null) 
         {
             if (volatilityStrikePriceNode.Attributes["id"] != null) 
             {
                 volatilityStrikePriceIDRef_ = volatilityStrikePriceNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(volatilityStrikePriceNode);
                 IDManager.SetID(volatilityStrikePriceIDRef_, ob);
             }
             else if (volatilityStrikePriceNode.Attributes["href"] != null)
             {
                 volatilityStrikePriceIDRef_ = volatilityStrikePriceNode.Attributes["href"].Value;
             }
             else
             {
                 volatilityStrikePrice_ = new NonNegativeDecimal(volatilityStrikePriceNode);
             }
         }
         else
         {
             volatilityStrikePrice_ = new NonNegativeDecimal(volatilityStrikePriceNode);
         }
     }
     
 
     XmlNode varianceStrikePriceNode = xmlNode.SelectSingleNode("varianceStrikePrice");
     
     if (varianceStrikePriceNode != null)
     {
         if (varianceStrikePriceNode.Attributes["href"] != null || varianceStrikePriceNode.Attributes["id"] != null) 
         {
             if (varianceStrikePriceNode.Attributes["id"] != null) 
             {
                 varianceStrikePriceIDRef_ = varianceStrikePriceNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(varianceStrikePriceNode);
                 IDManager.SetID(varianceStrikePriceIDRef_, ob);
             }
             else if (varianceStrikePriceNode.Attributes["href"] != null)
             {
                 varianceStrikePriceIDRef_ = varianceStrikePriceNode.Attributes["href"].Value;
             }
             else
             {
                 varianceStrikePrice_ = new NonNegativeDecimal(varianceStrikePriceNode);
             }
         }
         else
         {
             varianceStrikePrice_ = new NonNegativeDecimal(varianceStrikePriceNode);
         }
     }
     
 
     XmlNode varianceCapNode = xmlNode.SelectSingleNode("varianceCap");
     
     if (varianceCapNode != null)
     {
         if (varianceCapNode.Attributes["href"] != null || varianceCapNode.Attributes["id"] != null) 
         {
             if (varianceCapNode.Attributes["id"] != null) 
             {
                 varianceCapIDRef_ = varianceCapNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(varianceCapNode);
                 IDManager.SetID(varianceCapIDRef_, ob);
             }
             else if (varianceCapNode.Attributes["href"] != null)
             {
                 varianceCapIDRef_ = varianceCapNode.Attributes["href"].Value;
             }
             else
             {
                 varianceCap_ = new XsdTypeBoolean(varianceCapNode);
             }
         }
         else
         {
             varianceCap_ = new XsdTypeBoolean(varianceCapNode);
         }
     }
     
 
     XmlNode unadjustedVarianceCapNode = xmlNode.SelectSingleNode("unadjustedVarianceCap");
     
     if (unadjustedVarianceCapNode != null)
     {
         if (unadjustedVarianceCapNode.Attributes["href"] != null || unadjustedVarianceCapNode.Attributes["id"] != null) 
         {
             if (unadjustedVarianceCapNode.Attributes["id"] != null) 
             {
                 unadjustedVarianceCapIDRef_ = unadjustedVarianceCapNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(unadjustedVarianceCapNode);
                 IDManager.SetID(unadjustedVarianceCapIDRef_, ob);
             }
             else if (unadjustedVarianceCapNode.Attributes["href"] != null)
             {
                 unadjustedVarianceCapIDRef_ = unadjustedVarianceCapNode.Attributes["href"].Value;
             }
             else
             {
                 unadjustedVarianceCap_ = new PositiveDecimal(unadjustedVarianceCapNode);
             }
         }
         else
         {
             unadjustedVarianceCap_ = new PositiveDecimal(unadjustedVarianceCapNode);
         }
     }
     
 
     XmlNode boundedVarianceNode = xmlNode.SelectSingleNode("boundedVariance");
     
     if (boundedVarianceNode != null)
     {
         if (boundedVarianceNode.Attributes["href"] != null || boundedVarianceNode.Attributes["id"] != null) 
         {
             if (boundedVarianceNode.Attributes["id"] != null) 
             {
                 boundedVarianceIDRef_ = boundedVarianceNode.Attributes["id"].Value;
                 BoundedVariance ob = new BoundedVariance(boundedVarianceNode);
                 IDManager.SetID(boundedVarianceIDRef_, ob);
             }
             else if (boundedVarianceNode.Attributes["href"] != null)
             {
                 boundedVarianceIDRef_ = boundedVarianceNode.Attributes["href"].Value;
             }
             else
             {
                 boundedVariance_ = new BoundedVariance(boundedVarianceNode);
             }
         }
         else
         {
             boundedVariance_ = new BoundedVariance(boundedVarianceNode);
         }
     }
     
 
     XmlNode exchangeTradedContractNearestNode = xmlNode.SelectSingleNode("exchangeTradedContractNearest");
     
     if (exchangeTradedContractNearestNode != null)
     {
         if (exchangeTradedContractNearestNode.Attributes["href"] != null || exchangeTradedContractNearestNode.Attributes["id"] != null) 
         {
             if (exchangeTradedContractNearestNode.Attributes["id"] != null) 
             {
                 exchangeTradedContractNearestIDRef_ = exchangeTradedContractNearestNode.Attributes["id"].Value;
                 ExchangeTradedContract ob = new ExchangeTradedContract(exchangeTradedContractNearestNode);
                 IDManager.SetID(exchangeTradedContractNearestIDRef_, ob);
             }
             else if (exchangeTradedContractNearestNode.Attributes["href"] != null)
             {
                 exchangeTradedContractNearestIDRef_ = exchangeTradedContractNearestNode.Attributes["href"].Value;
             }
             else
             {
                 exchangeTradedContractNearest_ = new ExchangeTradedContract(exchangeTradedContractNearestNode);
             }
         }
         else
         {
             exchangeTradedContractNearest_ = new ExchangeTradedContract(exchangeTradedContractNearestNode);
         }
     }
     
 
     XmlNode vegaNotionalAmountNode = xmlNode.SelectSingleNode("vegaNotionalAmount");
     
     if (vegaNotionalAmountNode != null)
     {
         if (vegaNotionalAmountNode.Attributes["href"] != null || vegaNotionalAmountNode.Attributes["id"] != null) 
         {
             if (vegaNotionalAmountNode.Attributes["id"] != null) 
             {
                 vegaNotionalAmountIDRef_ = vegaNotionalAmountNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(vegaNotionalAmountNode);
                 IDManager.SetID(vegaNotionalAmountIDRef_, ob);
             }
             else if (vegaNotionalAmountNode.Attributes["href"] != null)
             {
                 vegaNotionalAmountIDRef_ = vegaNotionalAmountNode.Attributes["href"].Value;
             }
             else
             {
                 vegaNotionalAmount_ = new XsdTypeDecimal(vegaNotionalAmountNode);
             }
         }
         else
         {
             vegaNotionalAmount_ = new XsdTypeDecimal(vegaNotionalAmountNode);
         }
     }
     
 
 }
Exemple #17
0
        public GasProduct(XmlNode xmlNode)
        {
            XmlNodeList typeNodeList = xmlNode.SelectNodes("type");

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

            foreach (XmlNode item in typeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        typeIDRef = item.Attributes["id"].Name;
                        GasProductTypeEnum ob = GasProductTypeEnum();
                        IDManager.SetID(typeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        typeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        type = new GasProductTypeEnum(item);
                    }
                }
            }


            XmlNodeList calorificValueNodeList = xmlNode.SelectNodes("calorificValue");

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

            foreach (XmlNode item in calorificValueNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calorificValueIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(calorificValueIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calorificValueIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calorificValue = new NonNegativeDecimal(item);
                    }
                }
            }


            XmlNodeList qualityNodeList = xmlNode.SelectNodes("quality");

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

            foreach (XmlNode item in qualityNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        qualityIDRef = item.Attributes["id"].Name;
                        GasQuality ob = GasQuality();
                        IDManager.SetID(qualityIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        qualityIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        quality = new GasQuality(item);
                    }
                }
            }
        }
        public FxAverageRateObservation(XmlNode xmlNode)
        {
            XmlNodeList dateNodeList = xmlNode.SelectNodes("date");

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

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


            XmlNodeList averageRateWeightingFactorNodeList = xmlNode.SelectNodes("averageRateWeightingFactor");

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

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


            XmlNodeList rateNodeList = xmlNode.SelectNodes("rate");

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

            foreach (XmlNode item in rateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        rateIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(rateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        rateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        rate = new NonNegativeDecimal(item);
                    }
                }
            }
        }
 public EquitySwapTransactionSupplement(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode mutualEarlyTerminationNode = xmlNode.SelectSingleNode("mutualEarlyTermination");
     
     if (mutualEarlyTerminationNode != null)
     {
         if (mutualEarlyTerminationNode.Attributes["href"] != null || mutualEarlyTerminationNode.Attributes["id"] != null) 
         {
             if (mutualEarlyTerminationNode.Attributes["id"] != null) 
             {
                 mutualEarlyTerminationIDRef_ = mutualEarlyTerminationNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(mutualEarlyTerminationNode);
                 IDManager.SetID(mutualEarlyTerminationIDRef_, ob);
             }
             else if (mutualEarlyTerminationNode.Attributes["href"] != null)
             {
                 mutualEarlyTerminationIDRef_ = mutualEarlyTerminationNode.Attributes["href"].Value;
             }
             else
             {
                 mutualEarlyTermination_ = new XsdTypeBoolean(mutualEarlyTerminationNode);
             }
         }
         else
         {
             mutualEarlyTermination_ = new XsdTypeBoolean(mutualEarlyTerminationNode);
         }
     }
     
 
     XmlNode optionalEarlyTerminationNode = xmlNode.SelectSingleNode("optionalEarlyTermination");
     
     if (optionalEarlyTerminationNode != null)
     {
         if (optionalEarlyTerminationNode.Attributes["href"] != null || optionalEarlyTerminationNode.Attributes["id"] != null) 
         {
             if (optionalEarlyTerminationNode.Attributes["id"] != null) 
             {
                 optionalEarlyTerminationIDRef_ = optionalEarlyTerminationNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(optionalEarlyTerminationNode);
                 IDManager.SetID(optionalEarlyTerminationIDRef_, ob);
             }
             else if (optionalEarlyTerminationNode.Attributes["href"] != null)
             {
                 optionalEarlyTerminationIDRef_ = optionalEarlyTerminationNode.Attributes["href"].Value;
             }
             else
             {
                 optionalEarlyTermination_ = new XsdTypeBoolean(optionalEarlyTerminationNode);
             }
         }
         else
         {
             optionalEarlyTermination_ = new XsdTypeBoolean(optionalEarlyTerminationNode);
         }
     }
     
 
     XmlNode breakFundingRecoveryNode = xmlNode.SelectSingleNode("breakFundingRecovery");
     
     if (breakFundingRecoveryNode != null)
     {
         if (breakFundingRecoveryNode.Attributes["href"] != null || breakFundingRecoveryNode.Attributes["id"] != null) 
         {
             if (breakFundingRecoveryNode.Attributes["id"] != null) 
             {
                 breakFundingRecoveryIDRef_ = breakFundingRecoveryNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(breakFundingRecoveryNode);
                 IDManager.SetID(breakFundingRecoveryIDRef_, ob);
             }
             else if (breakFundingRecoveryNode.Attributes["href"] != null)
             {
                 breakFundingRecoveryIDRef_ = breakFundingRecoveryNode.Attributes["href"].Value;
             }
             else
             {
                 breakFundingRecovery_ = new XsdTypeBoolean(breakFundingRecoveryNode);
             }
         }
         else
         {
             breakFundingRecovery_ = new XsdTypeBoolean(breakFundingRecoveryNode);
         }
     }
     
 
     XmlNode breakFeeElectionNode = xmlNode.SelectSingleNode("breakFeeElection");
     
     if (breakFeeElectionNode != null)
     {
         if (breakFeeElectionNode.Attributes["href"] != null || breakFeeElectionNode.Attributes["id"] != null) 
         {
             if (breakFeeElectionNode.Attributes["id"] != null) 
             {
                 breakFeeElectionIDRef_ = breakFeeElectionNode.Attributes["id"].Value;
                 FeeElectionEnum ob = new FeeElectionEnum(breakFeeElectionNode);
                 IDManager.SetID(breakFeeElectionIDRef_, ob);
             }
             else if (breakFeeElectionNode.Attributes["href"] != null)
             {
                 breakFeeElectionIDRef_ = breakFeeElectionNode.Attributes["href"].Value;
             }
             else
             {
                 breakFeeElection_ = new FeeElectionEnum(breakFeeElectionNode);
             }
         }
         else
         {
             breakFeeElection_ = new FeeElectionEnum(breakFeeElectionNode);
         }
     }
     
 
     XmlNode breakFeeRateNode = xmlNode.SelectSingleNode("breakFeeRate");
     
     if (breakFeeRateNode != null)
     {
         if (breakFeeRateNode.Attributes["href"] != null || breakFeeRateNode.Attributes["id"] != null) 
         {
             if (breakFeeRateNode.Attributes["id"] != null) 
             {
                 breakFeeRateIDRef_ = breakFeeRateNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(breakFeeRateNode);
                 IDManager.SetID(breakFeeRateIDRef_, ob);
             }
             else if (breakFeeRateNode.Attributes["href"] != null)
             {
                 breakFeeRateIDRef_ = breakFeeRateNode.Attributes["href"].Value;
             }
             else
             {
                 breakFeeRate_ = new NonNegativeDecimal(breakFeeRateNode);
             }
         }
         else
         {
             breakFeeRate_ = new NonNegativeDecimal(breakFeeRateNode);
         }
     }
     
 
     XmlNode multipleExchangeIndexAnnexFallbackNode = xmlNode.SelectSingleNode("multipleExchangeIndexAnnexFallback");
     
     if (multipleExchangeIndexAnnexFallbackNode != null)
     {
         if (multipleExchangeIndexAnnexFallbackNode.Attributes["href"] != null || multipleExchangeIndexAnnexFallbackNode.Attributes["id"] != null) 
         {
             if (multipleExchangeIndexAnnexFallbackNode.Attributes["id"] != null) 
             {
                 multipleExchangeIndexAnnexFallbackIDRef_ = multipleExchangeIndexAnnexFallbackNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(multipleExchangeIndexAnnexFallbackNode);
                 IDManager.SetID(multipleExchangeIndexAnnexFallbackIDRef_, ob);
             }
             else if (multipleExchangeIndexAnnexFallbackNode.Attributes["href"] != null)
             {
                 multipleExchangeIndexAnnexFallbackIDRef_ = multipleExchangeIndexAnnexFallbackNode.Attributes["href"].Value;
             }
             else
             {
                 multipleExchangeIndexAnnexFallback_ = new XsdTypeBoolean(multipleExchangeIndexAnnexFallbackNode);
             }
         }
         else
         {
             multipleExchangeIndexAnnexFallback_ = new XsdTypeBoolean(multipleExchangeIndexAnnexFallbackNode);
         }
     }
     
 
     XmlNode componentSecurityIndexAnnexFallbackNode = xmlNode.SelectSingleNode("componentSecurityIndexAnnexFallback");
     
     if (componentSecurityIndexAnnexFallbackNode != null)
     {
         if (componentSecurityIndexAnnexFallbackNode.Attributes["href"] != null || componentSecurityIndexAnnexFallbackNode.Attributes["id"] != null) 
         {
             if (componentSecurityIndexAnnexFallbackNode.Attributes["id"] != null) 
             {
                 componentSecurityIndexAnnexFallbackIDRef_ = componentSecurityIndexAnnexFallbackNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(componentSecurityIndexAnnexFallbackNode);
                 IDManager.SetID(componentSecurityIndexAnnexFallbackIDRef_, ob);
             }
             else if (componentSecurityIndexAnnexFallbackNode.Attributes["href"] != null)
             {
                 componentSecurityIndexAnnexFallbackIDRef_ = componentSecurityIndexAnnexFallbackNode.Attributes["href"].Value;
             }
             else
             {
                 componentSecurityIndexAnnexFallback_ = new XsdTypeBoolean(componentSecurityIndexAnnexFallbackNode);
             }
         }
         else
         {
             componentSecurityIndexAnnexFallback_ = new XsdTypeBoolean(componentSecurityIndexAnnexFallbackNode);
         }
     }
     
 
     XmlNode localJurisdictionNode = xmlNode.SelectSingleNode("localJurisdiction");
     
     if (localJurisdictionNode != null)
     {
         if (localJurisdictionNode.Attributes["href"] != null || localJurisdictionNode.Attributes["id"] != null) 
         {
             if (localJurisdictionNode.Attributes["id"] != null) 
             {
                 localJurisdictionIDRef_ = localJurisdictionNode.Attributes["id"].Value;
                 CountryCode ob = new CountryCode(localJurisdictionNode);
                 IDManager.SetID(localJurisdictionIDRef_, ob);
             }
             else if (localJurisdictionNode.Attributes["href"] != null)
             {
                 localJurisdictionIDRef_ = localJurisdictionNode.Attributes["href"].Value;
             }
             else
             {
                 localJurisdiction_ = new CountryCode(localJurisdictionNode);
             }
         }
         else
         {
             localJurisdiction_ = new CountryCode(localJurisdictionNode);
         }
     }
     
 
     XmlNode relevantJurisdictionNode = xmlNode.SelectSingleNode("relevantJurisdiction");
     
     if (relevantJurisdictionNode != null)
     {
         if (relevantJurisdictionNode.Attributes["href"] != null || relevantJurisdictionNode.Attributes["id"] != null) 
         {
             if (relevantJurisdictionNode.Attributes["id"] != null) 
             {
                 relevantJurisdictionIDRef_ = relevantJurisdictionNode.Attributes["id"].Value;
                 CountryCode ob = new CountryCode(relevantJurisdictionNode);
                 IDManager.SetID(relevantJurisdictionIDRef_, ob);
             }
             else if (relevantJurisdictionNode.Attributes["href"] != null)
             {
                 relevantJurisdictionIDRef_ = relevantJurisdictionNode.Attributes["href"].Value;
             }
             else
             {
                 relevantJurisdiction_ = new CountryCode(relevantJurisdictionNode);
             }
         }
         else
         {
             relevantJurisdiction_ = new CountryCode(relevantJurisdictionNode);
         }
     }
     
 
     XmlNode extraordinaryEventsNode = xmlNode.SelectSingleNode("extraordinaryEvents");
     
     if (extraordinaryEventsNode != null)
     {
         if (extraordinaryEventsNode.Attributes["href"] != null || extraordinaryEventsNode.Attributes["id"] != null) 
         {
             if (extraordinaryEventsNode.Attributes["id"] != null) 
             {
                 extraordinaryEventsIDRef_ = extraordinaryEventsNode.Attributes["id"].Value;
                 ExtraordinaryEvents ob = new ExtraordinaryEvents(extraordinaryEventsNode);
                 IDManager.SetID(extraordinaryEventsIDRef_, ob);
             }
             else if (extraordinaryEventsNode.Attributes["href"] != null)
             {
                 extraordinaryEventsIDRef_ = extraordinaryEventsNode.Attributes["href"].Value;
             }
             else
             {
                 extraordinaryEvents_ = new ExtraordinaryEvents(extraordinaryEventsNode);
             }
         }
         else
         {
             extraordinaryEvents_ = new ExtraordinaryEvents(extraordinaryEventsNode);
         }
     }
     
 
 }
        public EquityPremium(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList payerPartyReferenceNodeList = xmlNode.SelectNodes("payerPartyReference");

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

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


            XmlNodeList payerAccountReferenceNodeList = xmlNode.SelectNodes("payerAccountReference");

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

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


            XmlNodeList receiverPartyReferenceNodeList = xmlNode.SelectNodes("receiverPartyReference");

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

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


            XmlNodeList receiverAccountReferenceNodeList = xmlNode.SelectNodes("receiverAccountReference");

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

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


            XmlNodeList premiumTypeNodeList = xmlNode.SelectNodes("premiumType");

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

            foreach (XmlNode item in premiumTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        premiumTypeIDRef = item.Attributes["id"].Name;
                        PremiumTypeEnum ob = PremiumTypeEnum();
                        IDManager.SetID(premiumTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        premiumTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        premiumType = new PremiumTypeEnum(item);
                    }
                }
            }


            XmlNodeList paymentAmountNodeList = xmlNode.SelectNodes("paymentAmount");

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

            foreach (XmlNode item in paymentAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        paymentAmountIDRef = item.Attributes["id"].Name;
                        NonNegativeMoney ob = NonNegativeMoney();
                        IDManager.SetID(paymentAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        paymentAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        paymentAmount = new NonNegativeMoney(item);
                    }
                }
            }


            XmlNodeList paymentDateNodeList = xmlNode.SelectNodes("paymentDate");

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

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


            XmlNodeList swapPremiumNodeList = xmlNode.SelectNodes("swapPremium");

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

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


            XmlNodeList pricePerOptionNodeList = xmlNode.SelectNodes("pricePerOption");

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

            foreach (XmlNode item in pricePerOptionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        pricePerOptionIDRef = item.Attributes["id"].Name;
                        NonNegativeMoney ob = NonNegativeMoney();
                        IDManager.SetID(pricePerOptionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        pricePerOptionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        pricePerOption = new NonNegativeMoney(item);
                    }
                }
            }


            XmlNodeList percentageOfNotionalNodeList = xmlNode.SelectNodes("percentageOfNotional");

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

            foreach (XmlNode item in percentageOfNotionalNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        percentageOfNotionalIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(percentageOfNotionalIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        percentageOfNotionalIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        percentageOfNotional = new NonNegativeDecimal(item);
                    }
                }
            }
        }
        public EquityMultipleExercise(XmlNode xmlNode)
        {
            XmlNode integralMultipleExerciseNode = xmlNode.SelectSingleNode("integralMultipleExercise");

            if (integralMultipleExerciseNode != null)
            {
                if (integralMultipleExerciseNode.Attributes["href"] != null || integralMultipleExerciseNode.Attributes["id"] != null)
                {
                    if (integralMultipleExerciseNode.Attributes["id"] != null)
                    {
                        integralMultipleExerciseIDRef_ = integralMultipleExerciseNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(integralMultipleExerciseNode);
                        IDManager.SetID(integralMultipleExerciseIDRef_, ob);
                    }
                    else if (integralMultipleExerciseNode.Attributes["href"] != null)
                    {
                        integralMultipleExerciseIDRef_ = integralMultipleExerciseNode.Attributes["href"].Value;
                    }
                    else
                    {
                        integralMultipleExercise_ = new PositiveDecimal(integralMultipleExerciseNode);
                    }
                }
                else
                {
                    integralMultipleExercise_ = new PositiveDecimal(integralMultipleExerciseNode);
                }
            }


            XmlNode minimumNumberOfOptionsNode = xmlNode.SelectSingleNode("minimumNumberOfOptions");

            if (minimumNumberOfOptionsNode != null)
            {
                if (minimumNumberOfOptionsNode.Attributes["href"] != null || minimumNumberOfOptionsNode.Attributes["id"] != null)
                {
                    if (minimumNumberOfOptionsNode.Attributes["id"] != null)
                    {
                        minimumNumberOfOptionsIDRef_ = minimumNumberOfOptionsNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(minimumNumberOfOptionsNode);
                        IDManager.SetID(minimumNumberOfOptionsIDRef_, ob);
                    }
                    else if (minimumNumberOfOptionsNode.Attributes["href"] != null)
                    {
                        minimumNumberOfOptionsIDRef_ = minimumNumberOfOptionsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        minimumNumberOfOptions_ = new NonNegativeDecimal(minimumNumberOfOptionsNode);
                    }
                }
                else
                {
                    minimumNumberOfOptions_ = new NonNegativeDecimal(minimumNumberOfOptionsNode);
                }
            }


            XmlNode maximumNumberOfOptionsNode = xmlNode.SelectSingleNode("maximumNumberOfOptions");

            if (maximumNumberOfOptionsNode != null)
            {
                if (maximumNumberOfOptionsNode.Attributes["href"] != null || maximumNumberOfOptionsNode.Attributes["id"] != null)
                {
                    if (maximumNumberOfOptionsNode.Attributes["id"] != null)
                    {
                        maximumNumberOfOptionsIDRef_ = maximumNumberOfOptionsNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(maximumNumberOfOptionsNode);
                        IDManager.SetID(maximumNumberOfOptionsIDRef_, ob);
                    }
                    else if (maximumNumberOfOptionsNode.Attributes["href"] != null)
                    {
                        maximumNumberOfOptionsIDRef_ = maximumNumberOfOptionsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        maximumNumberOfOptions_ = new NonNegativeDecimal(maximumNumberOfOptionsNode);
                    }
                }
                else
                {
                    maximumNumberOfOptions_ = new NonNegativeDecimal(maximumNumberOfOptionsNode);
                }
            }
        }
 public WeightedAveragingObservation(XmlNode xmlNode)
 {
     XmlNode dateTimeNode = xmlNode.SelectSingleNode("dateTime");
     
     if (dateTimeNode != null)
     {
         if (dateTimeNode.Attributes["href"] != null || dateTimeNode.Attributes["id"] != null) 
         {
             if (dateTimeNode.Attributes["id"] != null) 
             {
                 dateTimeIDRef_ = dateTimeNode.Attributes["id"].Value;
                 XsdTypeDateTime ob = new XsdTypeDateTime(dateTimeNode);
                 IDManager.SetID(dateTimeIDRef_, ob);
             }
             else if (dateTimeNode.Attributes["href"] != null)
             {
                 dateTimeIDRef_ = dateTimeNode.Attributes["href"].Value;
             }
             else
             {
                 dateTime_ = new XsdTypeDateTime(dateTimeNode);
             }
         }
         else
         {
             dateTime_ = new XsdTypeDateTime(dateTimeNode);
         }
     }
     
 
     XmlNode observationNumberNode = xmlNode.SelectSingleNode("observationNumber");
     
     if (observationNumberNode != null)
     {
         if (observationNumberNode.Attributes["href"] != null || observationNumberNode.Attributes["id"] != null) 
         {
             if (observationNumberNode.Attributes["id"] != null) 
             {
                 observationNumberIDRef_ = observationNumberNode.Attributes["id"].Value;
                 XsdTypePositiveInteger ob = new XsdTypePositiveInteger(observationNumberNode);
                 IDManager.SetID(observationNumberIDRef_, ob);
             }
             else if (observationNumberNode.Attributes["href"] != null)
             {
                 observationNumberIDRef_ = observationNumberNode.Attributes["href"].Value;
             }
             else
             {
                 observationNumber_ = new XsdTypePositiveInteger(observationNumberNode);
             }
         }
         else
         {
             observationNumber_ = new XsdTypePositiveInteger(observationNumberNode);
         }
     }
     
 
     XmlNode weightNode = xmlNode.SelectSingleNode("weight");
     
     if (weightNode != null)
     {
         if (weightNode.Attributes["href"] != null || weightNode.Attributes["id"] != null) 
         {
             if (weightNode.Attributes["id"] != null) 
             {
                 weightIDRef_ = weightNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(weightNode);
                 IDManager.SetID(weightIDRef_, ob);
             }
             else if (weightNode.Attributes["href"] != null)
             {
                 weightIDRef_ = weightNode.Attributes["href"].Value;
             }
             else
             {
                 weight_ = new NonNegativeDecimal(weightNode);
             }
         }
         else
         {
             weight_ = new NonNegativeDecimal(weightNode);
         }
     }
     
 
 }
 public DividendConditions(XmlNode xmlNode)
 {
     XmlNode dividendReinvestmentNode = xmlNode.SelectSingleNode("dividendReinvestment");
     
     if (dividendReinvestmentNode != null)
     {
         if (dividendReinvestmentNode.Attributes["href"] != null || dividendReinvestmentNode.Attributes["id"] != null) 
         {
             if (dividendReinvestmentNode.Attributes["id"] != null) 
             {
                 dividendReinvestmentIDRef_ = dividendReinvestmentNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(dividendReinvestmentNode);
                 IDManager.SetID(dividendReinvestmentIDRef_, ob);
             }
             else if (dividendReinvestmentNode.Attributes["href"] != null)
             {
                 dividendReinvestmentIDRef_ = dividendReinvestmentNode.Attributes["href"].Value;
             }
             else
             {
                 dividendReinvestment_ = new XsdTypeBoolean(dividendReinvestmentNode);
             }
         }
         else
         {
             dividendReinvestment_ = new XsdTypeBoolean(dividendReinvestmentNode);
         }
     }
     
 
     XmlNode dividendEntitlementNode = xmlNode.SelectSingleNode("dividendEntitlement");
     
     if (dividendEntitlementNode != null)
     {
         if (dividendEntitlementNode.Attributes["href"] != null || dividendEntitlementNode.Attributes["id"] != null) 
         {
             if (dividendEntitlementNode.Attributes["id"] != null) 
             {
                 dividendEntitlementIDRef_ = dividendEntitlementNode.Attributes["id"].Value;
                 DividendEntitlementEnum ob = new DividendEntitlementEnum(dividendEntitlementNode);
                 IDManager.SetID(dividendEntitlementIDRef_, ob);
             }
             else if (dividendEntitlementNode.Attributes["href"] != null)
             {
                 dividendEntitlementIDRef_ = dividendEntitlementNode.Attributes["href"].Value;
             }
             else
             {
                 dividendEntitlement_ = new DividendEntitlementEnum(dividendEntitlementNode);
             }
         }
         else
         {
             dividendEntitlement_ = new DividendEntitlementEnum(dividendEntitlementNode);
         }
     }
     
 
     XmlNode dividendAmountNode = xmlNode.SelectSingleNode("dividendAmount");
     
     if (dividendAmountNode != null)
     {
         if (dividendAmountNode.Attributes["href"] != null || dividendAmountNode.Attributes["id"] != null) 
         {
             if (dividendAmountNode.Attributes["id"] != null) 
             {
                 dividendAmountIDRef_ = dividendAmountNode.Attributes["id"].Value;
                 DividendAmountTypeEnum ob = new DividendAmountTypeEnum(dividendAmountNode);
                 IDManager.SetID(dividendAmountIDRef_, ob);
             }
             else if (dividendAmountNode.Attributes["href"] != null)
             {
                 dividendAmountIDRef_ = dividendAmountNode.Attributes["href"].Value;
             }
             else
             {
                 dividendAmount_ = new DividendAmountTypeEnum(dividendAmountNode);
             }
         }
         else
         {
             dividendAmount_ = new DividendAmountTypeEnum(dividendAmountNode);
         }
     }
     
 
     XmlNode dividendPaymentDateNode = xmlNode.SelectSingleNode("dividendPaymentDate");
     
     if (dividendPaymentDateNode != null)
     {
         if (dividendPaymentDateNode.Attributes["href"] != null || dividendPaymentDateNode.Attributes["id"] != null) 
         {
             if (dividendPaymentDateNode.Attributes["id"] != null) 
             {
                 dividendPaymentDateIDRef_ = dividendPaymentDateNode.Attributes["id"].Value;
                 DividendPaymentDate ob = new DividendPaymentDate(dividendPaymentDateNode);
                 IDManager.SetID(dividendPaymentDateIDRef_, ob);
             }
             else if (dividendPaymentDateNode.Attributes["href"] != null)
             {
                 dividendPaymentDateIDRef_ = dividendPaymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 dividendPaymentDate_ = new DividendPaymentDate(dividendPaymentDateNode);
             }
         }
         else
         {
             dividendPaymentDate_ = new DividendPaymentDate(dividendPaymentDateNode);
         }
     }
     
 
     XmlNode dividendPeriodEffectiveDateNode = xmlNode.SelectSingleNode("dividendPeriodEffectiveDate");
     
     if (dividendPeriodEffectiveDateNode != null)
     {
         if (dividendPeriodEffectiveDateNode.Attributes["href"] != null || dividendPeriodEffectiveDateNode.Attributes["id"] != null) 
         {
             if (dividendPeriodEffectiveDateNode.Attributes["id"] != null) 
             {
                 dividendPeriodEffectiveDateIDRef_ = dividendPeriodEffectiveDateNode.Attributes["id"].Value;
                 DateReference ob = new DateReference(dividendPeriodEffectiveDateNode);
                 IDManager.SetID(dividendPeriodEffectiveDateIDRef_, ob);
             }
             else if (dividendPeriodEffectiveDateNode.Attributes["href"] != null)
             {
                 dividendPeriodEffectiveDateIDRef_ = dividendPeriodEffectiveDateNode.Attributes["href"].Value;
             }
             else
             {
                 dividendPeriodEffectiveDate_ = new DateReference(dividendPeriodEffectiveDateNode);
             }
         }
         else
         {
             dividendPeriodEffectiveDate_ = new DateReference(dividendPeriodEffectiveDateNode);
         }
     }
     
 
     XmlNode dividendPeriodEndDateNode = xmlNode.SelectSingleNode("dividendPeriodEndDate");
     
     if (dividendPeriodEndDateNode != null)
     {
         if (dividendPeriodEndDateNode.Attributes["href"] != null || dividendPeriodEndDateNode.Attributes["id"] != null) 
         {
             if (dividendPeriodEndDateNode.Attributes["id"] != null) 
             {
                 dividendPeriodEndDateIDRef_ = dividendPeriodEndDateNode.Attributes["id"].Value;
                 DateReference ob = new DateReference(dividendPeriodEndDateNode);
                 IDManager.SetID(dividendPeriodEndDateIDRef_, ob);
             }
             else if (dividendPeriodEndDateNode.Attributes["href"] != null)
             {
                 dividendPeriodEndDateIDRef_ = dividendPeriodEndDateNode.Attributes["href"].Value;
             }
             else
             {
                 dividendPeriodEndDate_ = new DateReference(dividendPeriodEndDateNode);
             }
         }
         else
         {
             dividendPeriodEndDate_ = new DateReference(dividendPeriodEndDateNode);
         }
     }
     
 
     XmlNode dividendPeriodNode = xmlNode.SelectSingleNode("dividendPeriod");
     
     if (dividendPeriodNode != null)
     {
         if (dividendPeriodNode.Attributes["href"] != null || dividendPeriodNode.Attributes["id"] != null) 
         {
             if (dividendPeriodNode.Attributes["id"] != null) 
             {
                 dividendPeriodIDRef_ = dividendPeriodNode.Attributes["id"].Value;
                 DividendPeriodEnum ob = new DividendPeriodEnum(dividendPeriodNode);
                 IDManager.SetID(dividendPeriodIDRef_, ob);
             }
             else if (dividendPeriodNode.Attributes["href"] != null)
             {
                 dividendPeriodIDRef_ = dividendPeriodNode.Attributes["href"].Value;
             }
             else
             {
                 dividendPeriod_ = new DividendPeriodEnum(dividendPeriodNode);
             }
         }
         else
         {
             dividendPeriod_ = new DividendPeriodEnum(dividendPeriodNode);
         }
     }
     
 
     XmlNode extraOrdinaryDividendsNode = xmlNode.SelectSingleNode("extraOrdinaryDividends");
     
     if (extraOrdinaryDividendsNode != null)
     {
         if (extraOrdinaryDividendsNode.Attributes["href"] != null || extraOrdinaryDividendsNode.Attributes["id"] != null) 
         {
             if (extraOrdinaryDividendsNode.Attributes["id"] != null) 
             {
                 extraOrdinaryDividendsIDRef_ = extraOrdinaryDividendsNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(extraOrdinaryDividendsNode);
                 IDManager.SetID(extraOrdinaryDividendsIDRef_, ob);
             }
             else if (extraOrdinaryDividendsNode.Attributes["href"] != null)
             {
                 extraOrdinaryDividendsIDRef_ = extraOrdinaryDividendsNode.Attributes["href"].Value;
             }
             else
             {
                 extraOrdinaryDividends_ = new PartyReference(extraOrdinaryDividendsNode);
             }
         }
         else
         {
             extraOrdinaryDividends_ = new PartyReference(extraOrdinaryDividendsNode);
         }
     }
     
 
     XmlNode excessDividendAmountNode = xmlNode.SelectSingleNode("excessDividendAmount");
     
     if (excessDividendAmountNode != null)
     {
         if (excessDividendAmountNode.Attributes["href"] != null || excessDividendAmountNode.Attributes["id"] != null) 
         {
             if (excessDividendAmountNode.Attributes["id"] != null) 
             {
                 excessDividendAmountIDRef_ = excessDividendAmountNode.Attributes["id"].Value;
                 DividendAmountTypeEnum ob = new DividendAmountTypeEnum(excessDividendAmountNode);
                 IDManager.SetID(excessDividendAmountIDRef_, ob);
             }
             else if (excessDividendAmountNode.Attributes["href"] != null)
             {
                 excessDividendAmountIDRef_ = excessDividendAmountNode.Attributes["href"].Value;
             }
             else
             {
                 excessDividendAmount_ = new DividendAmountTypeEnum(excessDividendAmountNode);
             }
         }
         else
         {
             excessDividendAmount_ = new DividendAmountTypeEnum(excessDividendAmountNode);
         }
     }
     
 
     XmlNode currencyNode = xmlNode.SelectSingleNode("currency");
     
     if (currencyNode != null)
     {
         if (currencyNode.Attributes["href"] != null || currencyNode.Attributes["id"] != null) 
         {
             if (currencyNode.Attributes["id"] != null) 
             {
                 currencyIDRef_ = currencyNode.Attributes["id"].Value;
                 IdentifiedCurrency ob = new IdentifiedCurrency(currencyNode);
                 IDManager.SetID(currencyIDRef_, ob);
             }
             else if (currencyNode.Attributes["href"] != null)
             {
                 currencyIDRef_ = currencyNode.Attributes["href"].Value;
             }
             else
             {
                 currency_ = new IdentifiedCurrency(currencyNode);
             }
         }
         else
         {
             currency_ = new IdentifiedCurrency(currencyNode);
         }
     }
     
 
     XmlNode determinationMethodNode = xmlNode.SelectSingleNode("determinationMethod");
     
     if (determinationMethodNode != null)
     {
         if (determinationMethodNode.Attributes["href"] != null || determinationMethodNode.Attributes["id"] != null) 
         {
             if (determinationMethodNode.Attributes["id"] != null) 
             {
                 determinationMethodIDRef_ = determinationMethodNode.Attributes["id"].Value;
                 DeterminationMethod ob = new DeterminationMethod(determinationMethodNode);
                 IDManager.SetID(determinationMethodIDRef_, ob);
             }
             else if (determinationMethodNode.Attributes["href"] != null)
             {
                 determinationMethodIDRef_ = determinationMethodNode.Attributes["href"].Value;
             }
             else
             {
                 determinationMethod_ = new DeterminationMethod(determinationMethodNode);
             }
         }
         else
         {
             determinationMethod_ = new DeterminationMethod(determinationMethodNode);
         }
     }
     
 
     XmlNode currencyReferenceNode = xmlNode.SelectSingleNode("currencyReference");
     
     if (currencyReferenceNode != null)
     {
         if (currencyReferenceNode.Attributes["href"] != null || currencyReferenceNode.Attributes["id"] != null) 
         {
             if (currencyReferenceNode.Attributes["id"] != null) 
             {
                 currencyReferenceIDRef_ = currencyReferenceNode.Attributes["id"].Value;
                 IdentifiedCurrencyReference ob = new IdentifiedCurrencyReference(currencyReferenceNode);
                 IDManager.SetID(currencyReferenceIDRef_, ob);
             }
             else if (currencyReferenceNode.Attributes["href"] != null)
             {
                 currencyReferenceIDRef_ = currencyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 currencyReference_ = new IdentifiedCurrencyReference(currencyReferenceNode);
             }
         }
         else
         {
             currencyReference_ = new IdentifiedCurrencyReference(currencyReferenceNode);
         }
     }
     
 
     XmlNode dividendFxTriggerDateNode = xmlNode.SelectSingleNode("dividendFxTriggerDate");
     
     if (dividendFxTriggerDateNode != null)
     {
         if (dividendFxTriggerDateNode.Attributes["href"] != null || dividendFxTriggerDateNode.Attributes["id"] != null) 
         {
             if (dividendFxTriggerDateNode.Attributes["id"] != null) 
             {
                 dividendFxTriggerDateIDRef_ = dividendFxTriggerDateNode.Attributes["id"].Value;
                 DividendPaymentDate ob = new DividendPaymentDate(dividendFxTriggerDateNode);
                 IDManager.SetID(dividendFxTriggerDateIDRef_, ob);
             }
             else if (dividendFxTriggerDateNode.Attributes["href"] != null)
             {
                 dividendFxTriggerDateIDRef_ = dividendFxTriggerDateNode.Attributes["href"].Value;
             }
             else
             {
                 dividendFxTriggerDate_ = new DividendPaymentDate(dividendFxTriggerDateNode);
             }
         }
         else
         {
             dividendFxTriggerDate_ = new DividendPaymentDate(dividendFxTriggerDateNode);
         }
     }
     
 
     XmlNode interestAccrualsMethodNode = xmlNode.SelectSingleNode("interestAccrualsMethod");
     
     if (interestAccrualsMethodNode != null)
     {
         if (interestAccrualsMethodNode.Attributes["href"] != null || interestAccrualsMethodNode.Attributes["id"] != null) 
         {
             if (interestAccrualsMethodNode.Attributes["id"] != null) 
             {
                 interestAccrualsMethodIDRef_ = interestAccrualsMethodNode.Attributes["id"].Value;
                 InterestAccrualsCompoundingMethod ob = new InterestAccrualsCompoundingMethod(interestAccrualsMethodNode);
                 IDManager.SetID(interestAccrualsMethodIDRef_, ob);
             }
             else if (interestAccrualsMethodNode.Attributes["href"] != null)
             {
                 interestAccrualsMethodIDRef_ = interestAccrualsMethodNode.Attributes["href"].Value;
             }
             else
             {
                 interestAccrualsMethod_ = new InterestAccrualsCompoundingMethod(interestAccrualsMethodNode);
             }
         }
         else
         {
             interestAccrualsMethod_ = new InterestAccrualsCompoundingMethod(interestAccrualsMethodNode);
         }
     }
     
 
     XmlNode numberOfIndexUnitsNode = xmlNode.SelectSingleNode("numberOfIndexUnits");
     
     if (numberOfIndexUnitsNode != null)
     {
         if (numberOfIndexUnitsNode.Attributes["href"] != null || numberOfIndexUnitsNode.Attributes["id"] != null) 
         {
             if (numberOfIndexUnitsNode.Attributes["id"] != null) 
             {
                 numberOfIndexUnitsIDRef_ = numberOfIndexUnitsNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(numberOfIndexUnitsNode);
                 IDManager.SetID(numberOfIndexUnitsIDRef_, ob);
             }
             else if (numberOfIndexUnitsNode.Attributes["href"] != null)
             {
                 numberOfIndexUnitsIDRef_ = numberOfIndexUnitsNode.Attributes["href"].Value;
             }
             else
             {
                 numberOfIndexUnits_ = new NonNegativeDecimal(numberOfIndexUnitsNode);
             }
         }
         else
         {
             numberOfIndexUnits_ = new NonNegativeDecimal(numberOfIndexUnitsNode);
         }
     }
     
 
     XmlNode declaredCashDividendPercentageNode = xmlNode.SelectSingleNode("declaredCashDividendPercentage");
     
     if (declaredCashDividendPercentageNode != null)
     {
         if (declaredCashDividendPercentageNode.Attributes["href"] != null || declaredCashDividendPercentageNode.Attributes["id"] != null) 
         {
             if (declaredCashDividendPercentageNode.Attributes["id"] != null) 
             {
                 declaredCashDividendPercentageIDRef_ = declaredCashDividendPercentageNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(declaredCashDividendPercentageNode);
                 IDManager.SetID(declaredCashDividendPercentageIDRef_, ob);
             }
             else if (declaredCashDividendPercentageNode.Attributes["href"] != null)
             {
                 declaredCashDividendPercentageIDRef_ = declaredCashDividendPercentageNode.Attributes["href"].Value;
             }
             else
             {
                 declaredCashDividendPercentage_ = new NonNegativeDecimal(declaredCashDividendPercentageNode);
             }
         }
         else
         {
             declaredCashDividendPercentage_ = new NonNegativeDecimal(declaredCashDividendPercentageNode);
         }
     }
     
 
     XmlNode declaredCashEquivalentDividendPercentageNode = xmlNode.SelectSingleNode("declaredCashEquivalentDividendPercentage");
     
     if (declaredCashEquivalentDividendPercentageNode != null)
     {
         if (declaredCashEquivalentDividendPercentageNode.Attributes["href"] != null || declaredCashEquivalentDividendPercentageNode.Attributes["id"] != null) 
         {
             if (declaredCashEquivalentDividendPercentageNode.Attributes["id"] != null) 
             {
                 declaredCashEquivalentDividendPercentageIDRef_ = declaredCashEquivalentDividendPercentageNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(declaredCashEquivalentDividendPercentageNode);
                 IDManager.SetID(declaredCashEquivalentDividendPercentageIDRef_, ob);
             }
             else if (declaredCashEquivalentDividendPercentageNode.Attributes["href"] != null)
             {
                 declaredCashEquivalentDividendPercentageIDRef_ = declaredCashEquivalentDividendPercentageNode.Attributes["href"].Value;
             }
             else
             {
                 declaredCashEquivalentDividendPercentage_ = new NonNegativeDecimal(declaredCashEquivalentDividendPercentageNode);
             }
         }
         else
         {
             declaredCashEquivalentDividendPercentage_ = new NonNegativeDecimal(declaredCashEquivalentDividendPercentageNode);
         }
     }
     
 
     XmlNode nonCashDividendTreatmentNode = xmlNode.SelectSingleNode("nonCashDividendTreatment");
     
     if (nonCashDividendTreatmentNode != null)
     {
         if (nonCashDividendTreatmentNode.Attributes["href"] != null || nonCashDividendTreatmentNode.Attributes["id"] != null) 
         {
             if (nonCashDividendTreatmentNode.Attributes["id"] != null) 
             {
                 nonCashDividendTreatmentIDRef_ = nonCashDividendTreatmentNode.Attributes["id"].Value;
                 NonCashDividendTreatmentEnum ob = new NonCashDividendTreatmentEnum(nonCashDividendTreatmentNode);
                 IDManager.SetID(nonCashDividendTreatmentIDRef_, ob);
             }
             else if (nonCashDividendTreatmentNode.Attributes["href"] != null)
             {
                 nonCashDividendTreatmentIDRef_ = nonCashDividendTreatmentNode.Attributes["href"].Value;
             }
             else
             {
                 nonCashDividendTreatment_ = new NonCashDividendTreatmentEnum(nonCashDividendTreatmentNode);
             }
         }
         else
         {
             nonCashDividendTreatment_ = new NonCashDividendTreatmentEnum(nonCashDividendTreatmentNode);
         }
     }
     
 
     XmlNode dividendCompositionNode = xmlNode.SelectSingleNode("dividendComposition");
     
     if (dividendCompositionNode != null)
     {
         if (dividendCompositionNode.Attributes["href"] != null || dividendCompositionNode.Attributes["id"] != null) 
         {
             if (dividendCompositionNode.Attributes["id"] != null) 
             {
                 dividendCompositionIDRef_ = dividendCompositionNode.Attributes["id"].Value;
                 DividendCompositionEnum ob = new DividendCompositionEnum(dividendCompositionNode);
                 IDManager.SetID(dividendCompositionIDRef_, ob);
             }
             else if (dividendCompositionNode.Attributes["href"] != null)
             {
                 dividendCompositionIDRef_ = dividendCompositionNode.Attributes["href"].Value;
             }
             else
             {
                 dividendComposition_ = new DividendCompositionEnum(dividendCompositionNode);
             }
         }
         else
         {
             dividendComposition_ = new DividendCompositionEnum(dividendCompositionNode);
         }
     }
     
 
     XmlNode specialDividendsNode = xmlNode.SelectSingleNode("specialDividends");
     
     if (specialDividendsNode != null)
     {
         if (specialDividendsNode.Attributes["href"] != null || specialDividendsNode.Attributes["id"] != null) 
         {
             if (specialDividendsNode.Attributes["id"] != null) 
             {
                 specialDividendsIDRef_ = specialDividendsNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(specialDividendsNode);
                 IDManager.SetID(specialDividendsIDRef_, ob);
             }
             else if (specialDividendsNode.Attributes["href"] != null)
             {
                 specialDividendsIDRef_ = specialDividendsNode.Attributes["href"].Value;
             }
             else
             {
                 specialDividends_ = new XsdTypeBoolean(specialDividendsNode);
             }
         }
         else
         {
             specialDividends_ = new XsdTypeBoolean(specialDividendsNode);
         }
     }
     
 
 }
Exemple #24
0
        public FxAverageRateObservation(XmlNode xmlNode)
        {
            XmlNode dateNode = xmlNode.SelectSingleNode("date");

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


            XmlNode averageRateWeightingFactorNode = xmlNode.SelectSingleNode("averageRateWeightingFactor");

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


            XmlNode rateNode = xmlNode.SelectSingleNode("rate");

            if (rateNode != null)
            {
                if (rateNode.Attributes["href"] != null || rateNode.Attributes["id"] != null)
                {
                    if (rateNode.Attributes["id"] != null)
                    {
                        rateIDRef_ = rateNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(rateNode);
                        IDManager.SetID(rateIDRef_, ob);
                    }
                    else if (rateNode.Attributes["href"] != null)
                    {
                        rateIDRef_ = rateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        rate_ = new NonNegativeDecimal(rateNode);
                    }
                }
                else
                {
                    rate_ = new NonNegativeDecimal(rateNode);
                }
            }
        }
        public GasProduct(XmlNode xmlNode)
        {
            XmlNode typeNode = xmlNode.SelectSingleNode("type");

            if (typeNode != null)
            {
                if (typeNode.Attributes["href"] != null || typeNode.Attributes["id"] != null)
                {
                    if (typeNode.Attributes["id"] != null)
                    {
                        typeIDRef_ = typeNode.Attributes["id"].Value;
                        GasProductTypeEnum ob = new GasProductTypeEnum(typeNode);
                        IDManager.SetID(typeIDRef_, ob);
                    }
                    else if (typeNode.Attributes["href"] != null)
                    {
                        typeIDRef_ = typeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        type_ = new GasProductTypeEnum(typeNode);
                    }
                }
                else
                {
                    type_ = new GasProductTypeEnum(typeNode);
                }
            }


            XmlNode calorificValueNode = xmlNode.SelectSingleNode("calorificValue");

            if (calorificValueNode != null)
            {
                if (calorificValueNode.Attributes["href"] != null || calorificValueNode.Attributes["id"] != null)
                {
                    if (calorificValueNode.Attributes["id"] != null)
                    {
                        calorificValueIDRef_ = calorificValueNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(calorificValueNode);
                        IDManager.SetID(calorificValueIDRef_, ob);
                    }
                    else if (calorificValueNode.Attributes["href"] != null)
                    {
                        calorificValueIDRef_ = calorificValueNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calorificValue_ = new NonNegativeDecimal(calorificValueNode);
                    }
                }
                else
                {
                    calorificValue_ = new NonNegativeDecimal(calorificValueNode);
                }
            }


            XmlNode qualityNode = xmlNode.SelectSingleNode("quality");

            if (qualityNode != null)
            {
                if (qualityNode.Attributes["href"] != null || qualityNode.Attributes["id"] != null)
                {
                    if (qualityNode.Attributes["id"] != null)
                    {
                        qualityIDRef_ = qualityNode.Attributes["id"].Value;
                        GasQuality ob = new GasQuality(qualityNode);
                        IDManager.SetID(qualityIDRef_, ob);
                    }
                    else if (qualityNode.Attributes["href"] != null)
                    {
                        qualityIDRef_ = qualityNode.Attributes["href"].Value;
                    }
                    else
                    {
                        quality_ = new GasQuality(qualityNode);
                    }
                }
                else
                {
                    quality_ = new GasQuality(qualityNode);
                }
            }
        }
 public EquityMultipleExercise(XmlNode xmlNode)
 {
     XmlNode integralMultipleExerciseNode = xmlNode.SelectSingleNode("integralMultipleExercise");
     
     if (integralMultipleExerciseNode != null)
     {
         if (integralMultipleExerciseNode.Attributes["href"] != null || integralMultipleExerciseNode.Attributes["id"] != null) 
         {
             if (integralMultipleExerciseNode.Attributes["id"] != null) 
             {
                 integralMultipleExerciseIDRef_ = integralMultipleExerciseNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(integralMultipleExerciseNode);
                 IDManager.SetID(integralMultipleExerciseIDRef_, ob);
             }
             else if (integralMultipleExerciseNode.Attributes["href"] != null)
             {
                 integralMultipleExerciseIDRef_ = integralMultipleExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 integralMultipleExercise_ = new PositiveDecimal(integralMultipleExerciseNode);
             }
         }
         else
         {
             integralMultipleExercise_ = new PositiveDecimal(integralMultipleExerciseNode);
         }
     }
     
 
     XmlNode minimumNumberOfOptionsNode = xmlNode.SelectSingleNode("minimumNumberOfOptions");
     
     if (minimumNumberOfOptionsNode != null)
     {
         if (minimumNumberOfOptionsNode.Attributes["href"] != null || minimumNumberOfOptionsNode.Attributes["id"] != null) 
         {
             if (minimumNumberOfOptionsNode.Attributes["id"] != null) 
             {
                 minimumNumberOfOptionsIDRef_ = minimumNumberOfOptionsNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(minimumNumberOfOptionsNode);
                 IDManager.SetID(minimumNumberOfOptionsIDRef_, ob);
             }
             else if (minimumNumberOfOptionsNode.Attributes["href"] != null)
             {
                 minimumNumberOfOptionsIDRef_ = minimumNumberOfOptionsNode.Attributes["href"].Value;
             }
             else
             {
                 minimumNumberOfOptions_ = new NonNegativeDecimal(minimumNumberOfOptionsNode);
             }
         }
         else
         {
             minimumNumberOfOptions_ = new NonNegativeDecimal(minimumNumberOfOptionsNode);
         }
     }
     
 
     XmlNode maximumNumberOfOptionsNode = xmlNode.SelectSingleNode("maximumNumberOfOptions");
     
     if (maximumNumberOfOptionsNode != null)
     {
         if (maximumNumberOfOptionsNode.Attributes["href"] != null || maximumNumberOfOptionsNode.Attributes["id"] != null) 
         {
             if (maximumNumberOfOptionsNode.Attributes["id"] != null) 
             {
                 maximumNumberOfOptionsIDRef_ = maximumNumberOfOptionsNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(maximumNumberOfOptionsNode);
                 IDManager.SetID(maximumNumberOfOptionsIDRef_, ob);
             }
             else if (maximumNumberOfOptionsNode.Attributes["href"] != null)
             {
                 maximumNumberOfOptionsIDRef_ = maximumNumberOfOptionsNode.Attributes["href"].Value;
             }
             else
             {
                 maximumNumberOfOptions_ = new NonNegativeDecimal(maximumNumberOfOptionsNode);
             }
         }
         else
         {
             maximumNumberOfOptions_ = new NonNegativeDecimal(maximumNumberOfOptionsNode);
         }
     }
     
 
 }
        public DividendLeg(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList declaredCashDividendPercentageNodeList = xmlNode.SelectNodes("declaredCashDividendPercentage");

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

            foreach (XmlNode item in declaredCashDividendPercentageNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        declaredCashDividendPercentageIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(declaredCashDividendPercentageIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        declaredCashDividendPercentageIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        declaredCashDividendPercentage = new NonNegativeDecimal(item);
                    }
                }
            }


            XmlNodeList declaredCashEquivalentDividendPercentageNodeList = xmlNode.SelectNodes("declaredCashEquivalentDividendPercentage");

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

            foreach (XmlNode item in declaredCashEquivalentDividendPercentageNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        declaredCashEquivalentDividendPercentageIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(declaredCashEquivalentDividendPercentageIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        declaredCashEquivalentDividendPercentageIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        declaredCashEquivalentDividendPercentage = new NonNegativeDecimal(item);
                    }
                }
            }


            XmlNodeList dividendPeriodNodeList = xmlNode.SelectNodes("dividendPeriod");

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


            XmlNodeList specialDividendsNodeList = xmlNode.SelectNodes("specialDividends");

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

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


            XmlNodeList materialDividendNodeList = xmlNode.SelectNodes("materialDividend");

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

            foreach (XmlNode item in materialDividendNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        materialDividendIDRef = item.Attributes["id"].Name;
                        XsdTypeBoolean ob = XsdTypeBoolean();
                        IDManager.SetID(materialDividendIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        materialDividendIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        materialDividend = new XsdTypeBoolean(item);
                    }
                }
            }
        }
 public EquityOption(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode strikeNode = xmlNode.SelectSingleNode("strike");
     
     if (strikeNode != null)
     {
         if (strikeNode.Attributes["href"] != null || strikeNode.Attributes["id"] != null) 
         {
             if (strikeNode.Attributes["id"] != null) 
             {
                 strikeIDRef_ = strikeNode.Attributes["id"].Value;
                 EquityStrike ob = new EquityStrike(strikeNode);
                 IDManager.SetID(strikeIDRef_, ob);
             }
             else if (strikeNode.Attributes["href"] != null)
             {
                 strikeIDRef_ = strikeNode.Attributes["href"].Value;
             }
             else
             {
                 strike_ = new EquityStrike(strikeNode);
             }
         }
         else
         {
             strike_ = new EquityStrike(strikeNode);
         }
     }
     
 
     XmlNode spotPriceNode = xmlNode.SelectSingleNode("spotPrice");
     
     if (spotPriceNode != null)
     {
         if (spotPriceNode.Attributes["href"] != null || spotPriceNode.Attributes["id"] != null) 
         {
             if (spotPriceNode.Attributes["id"] != null) 
             {
                 spotPriceIDRef_ = spotPriceNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(spotPriceNode);
                 IDManager.SetID(spotPriceIDRef_, ob);
             }
             else if (spotPriceNode.Attributes["href"] != null)
             {
                 spotPriceIDRef_ = spotPriceNode.Attributes["href"].Value;
             }
             else
             {
                 spotPrice_ = new NonNegativeDecimal(spotPriceNode);
             }
         }
         else
         {
             spotPrice_ = new NonNegativeDecimal(spotPriceNode);
         }
     }
     
 
     XmlNode numberOfOptionsNode = xmlNode.SelectSingleNode("numberOfOptions");
     
     if (numberOfOptionsNode != null)
     {
         if (numberOfOptionsNode.Attributes["href"] != null || numberOfOptionsNode.Attributes["id"] != null) 
         {
             if (numberOfOptionsNode.Attributes["id"] != null) 
             {
                 numberOfOptionsIDRef_ = numberOfOptionsNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(numberOfOptionsNode);
                 IDManager.SetID(numberOfOptionsIDRef_, ob);
             }
             else if (numberOfOptionsNode.Attributes["href"] != null)
             {
                 numberOfOptionsIDRef_ = numberOfOptionsNode.Attributes["href"].Value;
             }
             else
             {
                 numberOfOptions_ = new NonNegativeDecimal(numberOfOptionsNode);
             }
         }
         else
         {
             numberOfOptions_ = new NonNegativeDecimal(numberOfOptionsNode);
         }
     }
     
 
     XmlNode optionEntitlementNode = xmlNode.SelectSingleNode("optionEntitlement");
     
     if (optionEntitlementNode != null)
     {
         if (optionEntitlementNode.Attributes["href"] != null || optionEntitlementNode.Attributes["id"] != null) 
         {
             if (optionEntitlementNode.Attributes["id"] != null) 
             {
                 optionEntitlementIDRef_ = optionEntitlementNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(optionEntitlementNode);
                 IDManager.SetID(optionEntitlementIDRef_, ob);
             }
             else if (optionEntitlementNode.Attributes["href"] != null)
             {
                 optionEntitlementIDRef_ = optionEntitlementNode.Attributes["href"].Value;
             }
             else
             {
                 optionEntitlement_ = new PositiveDecimal(optionEntitlementNode);
             }
         }
         else
         {
             optionEntitlement_ = new PositiveDecimal(optionEntitlementNode);
         }
     }
     
 
     XmlNode equityPremiumNode = xmlNode.SelectSingleNode("equityPremium");
     
     if (equityPremiumNode != null)
     {
         if (equityPremiumNode.Attributes["href"] != null || equityPremiumNode.Attributes["id"] != null) 
         {
             if (equityPremiumNode.Attributes["id"] != null) 
             {
                 equityPremiumIDRef_ = equityPremiumNode.Attributes["id"].Value;
                 EquityPremium ob = new EquityPremium(equityPremiumNode);
                 IDManager.SetID(equityPremiumIDRef_, ob);
             }
             else if (equityPremiumNode.Attributes["href"] != null)
             {
                 equityPremiumIDRef_ = equityPremiumNode.Attributes["href"].Value;
             }
             else
             {
                 equityPremium_ = new EquityPremium(equityPremiumNode);
             }
         }
         else
         {
             equityPremium_ = new EquityPremium(equityPremiumNode);
         }
     }
     
 
 }
Exemple #29
0
        public DividendConditions(XmlNode xmlNode)
        {
            XmlNode dividendReinvestmentNode = xmlNode.SelectSingleNode("dividendReinvestment");

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


            XmlNode dividendEntitlementNode = xmlNode.SelectSingleNode("dividendEntitlement");

            if (dividendEntitlementNode != null)
            {
                if (dividendEntitlementNode.Attributes["href"] != null || dividendEntitlementNode.Attributes["id"] != null)
                {
                    if (dividendEntitlementNode.Attributes["id"] != null)
                    {
                        dividendEntitlementIDRef_ = dividendEntitlementNode.Attributes["id"].Value;
                        DividendEntitlementEnum ob = new DividendEntitlementEnum(dividendEntitlementNode);
                        IDManager.SetID(dividendEntitlementIDRef_, ob);
                    }
                    else if (dividendEntitlementNode.Attributes["href"] != null)
                    {
                        dividendEntitlementIDRef_ = dividendEntitlementNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dividendEntitlement_ = new DividendEntitlementEnum(dividendEntitlementNode);
                    }
                }
                else
                {
                    dividendEntitlement_ = new DividendEntitlementEnum(dividendEntitlementNode);
                }
            }


            XmlNode dividendAmountNode = xmlNode.SelectSingleNode("dividendAmount");

            if (dividendAmountNode != null)
            {
                if (dividendAmountNode.Attributes["href"] != null || dividendAmountNode.Attributes["id"] != null)
                {
                    if (dividendAmountNode.Attributes["id"] != null)
                    {
                        dividendAmountIDRef_ = dividendAmountNode.Attributes["id"].Value;
                        DividendAmountTypeEnum ob = new DividendAmountTypeEnum(dividendAmountNode);
                        IDManager.SetID(dividendAmountIDRef_, ob);
                    }
                    else if (dividendAmountNode.Attributes["href"] != null)
                    {
                        dividendAmountIDRef_ = dividendAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dividendAmount_ = new DividendAmountTypeEnum(dividendAmountNode);
                    }
                }
                else
                {
                    dividendAmount_ = new DividendAmountTypeEnum(dividendAmountNode);
                }
            }


            XmlNode dividendPaymentDateNode = xmlNode.SelectSingleNode("dividendPaymentDate");

            if (dividendPaymentDateNode != null)
            {
                if (dividendPaymentDateNode.Attributes["href"] != null || dividendPaymentDateNode.Attributes["id"] != null)
                {
                    if (dividendPaymentDateNode.Attributes["id"] != null)
                    {
                        dividendPaymentDateIDRef_ = dividendPaymentDateNode.Attributes["id"].Value;
                        DividendPaymentDate ob = new DividendPaymentDate(dividendPaymentDateNode);
                        IDManager.SetID(dividendPaymentDateIDRef_, ob);
                    }
                    else if (dividendPaymentDateNode.Attributes["href"] != null)
                    {
                        dividendPaymentDateIDRef_ = dividendPaymentDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dividendPaymentDate_ = new DividendPaymentDate(dividendPaymentDateNode);
                    }
                }
                else
                {
                    dividendPaymentDate_ = new DividendPaymentDate(dividendPaymentDateNode);
                }
            }


            XmlNode dividendPeriodEffectiveDateNode = xmlNode.SelectSingleNode("dividendPeriodEffectiveDate");

            if (dividendPeriodEffectiveDateNode != null)
            {
                if (dividendPeriodEffectiveDateNode.Attributes["href"] != null || dividendPeriodEffectiveDateNode.Attributes["id"] != null)
                {
                    if (dividendPeriodEffectiveDateNode.Attributes["id"] != null)
                    {
                        dividendPeriodEffectiveDateIDRef_ = dividendPeriodEffectiveDateNode.Attributes["id"].Value;
                        DateReference ob = new DateReference(dividendPeriodEffectiveDateNode);
                        IDManager.SetID(dividendPeriodEffectiveDateIDRef_, ob);
                    }
                    else if (dividendPeriodEffectiveDateNode.Attributes["href"] != null)
                    {
                        dividendPeriodEffectiveDateIDRef_ = dividendPeriodEffectiveDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dividendPeriodEffectiveDate_ = new DateReference(dividendPeriodEffectiveDateNode);
                    }
                }
                else
                {
                    dividendPeriodEffectiveDate_ = new DateReference(dividendPeriodEffectiveDateNode);
                }
            }


            XmlNode dividendPeriodEndDateNode = xmlNode.SelectSingleNode("dividendPeriodEndDate");

            if (dividendPeriodEndDateNode != null)
            {
                if (dividendPeriodEndDateNode.Attributes["href"] != null || dividendPeriodEndDateNode.Attributes["id"] != null)
                {
                    if (dividendPeriodEndDateNode.Attributes["id"] != null)
                    {
                        dividendPeriodEndDateIDRef_ = dividendPeriodEndDateNode.Attributes["id"].Value;
                        DateReference ob = new DateReference(dividendPeriodEndDateNode);
                        IDManager.SetID(dividendPeriodEndDateIDRef_, ob);
                    }
                    else if (dividendPeriodEndDateNode.Attributes["href"] != null)
                    {
                        dividendPeriodEndDateIDRef_ = dividendPeriodEndDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dividendPeriodEndDate_ = new DateReference(dividendPeriodEndDateNode);
                    }
                }
                else
                {
                    dividendPeriodEndDate_ = new DateReference(dividendPeriodEndDateNode);
                }
            }


            XmlNode dividendPeriodNode = xmlNode.SelectSingleNode("dividendPeriod");

            if (dividendPeriodNode != null)
            {
                if (dividendPeriodNode.Attributes["href"] != null || dividendPeriodNode.Attributes["id"] != null)
                {
                    if (dividendPeriodNode.Attributes["id"] != null)
                    {
                        dividendPeriodIDRef_ = dividendPeriodNode.Attributes["id"].Value;
                        DividendPeriodEnum ob = new DividendPeriodEnum(dividendPeriodNode);
                        IDManager.SetID(dividendPeriodIDRef_, ob);
                    }
                    else if (dividendPeriodNode.Attributes["href"] != null)
                    {
                        dividendPeriodIDRef_ = dividendPeriodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dividendPeriod_ = new DividendPeriodEnum(dividendPeriodNode);
                    }
                }
                else
                {
                    dividendPeriod_ = new DividendPeriodEnum(dividendPeriodNode);
                }
            }


            XmlNode extraOrdinaryDividendsNode = xmlNode.SelectSingleNode("extraOrdinaryDividends");

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


            XmlNode excessDividendAmountNode = xmlNode.SelectSingleNode("excessDividendAmount");

            if (excessDividendAmountNode != null)
            {
                if (excessDividendAmountNode.Attributes["href"] != null || excessDividendAmountNode.Attributes["id"] != null)
                {
                    if (excessDividendAmountNode.Attributes["id"] != null)
                    {
                        excessDividendAmountIDRef_ = excessDividendAmountNode.Attributes["id"].Value;
                        DividendAmountTypeEnum ob = new DividendAmountTypeEnum(excessDividendAmountNode);
                        IDManager.SetID(excessDividendAmountIDRef_, ob);
                    }
                    else if (excessDividendAmountNode.Attributes["href"] != null)
                    {
                        excessDividendAmountIDRef_ = excessDividendAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        excessDividendAmount_ = new DividendAmountTypeEnum(excessDividendAmountNode);
                    }
                }
                else
                {
                    excessDividendAmount_ = new DividendAmountTypeEnum(excessDividendAmountNode);
                }
            }


            XmlNode currencyNode = xmlNode.SelectSingleNode("currency");

            if (currencyNode != null)
            {
                if (currencyNode.Attributes["href"] != null || currencyNode.Attributes["id"] != null)
                {
                    if (currencyNode.Attributes["id"] != null)
                    {
                        currencyIDRef_ = currencyNode.Attributes["id"].Value;
                        IdentifiedCurrency ob = new IdentifiedCurrency(currencyNode);
                        IDManager.SetID(currencyIDRef_, ob);
                    }
                    else if (currencyNode.Attributes["href"] != null)
                    {
                        currencyIDRef_ = currencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        currency_ = new IdentifiedCurrency(currencyNode);
                    }
                }
                else
                {
                    currency_ = new IdentifiedCurrency(currencyNode);
                }
            }


            XmlNode determinationMethodNode = xmlNode.SelectSingleNode("determinationMethod");

            if (determinationMethodNode != null)
            {
                if (determinationMethodNode.Attributes["href"] != null || determinationMethodNode.Attributes["id"] != null)
                {
                    if (determinationMethodNode.Attributes["id"] != null)
                    {
                        determinationMethodIDRef_ = determinationMethodNode.Attributes["id"].Value;
                        DeterminationMethod ob = new DeterminationMethod(determinationMethodNode);
                        IDManager.SetID(determinationMethodIDRef_, ob);
                    }
                    else if (determinationMethodNode.Attributes["href"] != null)
                    {
                        determinationMethodIDRef_ = determinationMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        determinationMethod_ = new DeterminationMethod(determinationMethodNode);
                    }
                }
                else
                {
                    determinationMethod_ = new DeterminationMethod(determinationMethodNode);
                }
            }


            XmlNode currencyReferenceNode = xmlNode.SelectSingleNode("currencyReference");

            if (currencyReferenceNode != null)
            {
                if (currencyReferenceNode.Attributes["href"] != null || currencyReferenceNode.Attributes["id"] != null)
                {
                    if (currencyReferenceNode.Attributes["id"] != null)
                    {
                        currencyReferenceIDRef_ = currencyReferenceNode.Attributes["id"].Value;
                        IdentifiedCurrencyReference ob = new IdentifiedCurrencyReference(currencyReferenceNode);
                        IDManager.SetID(currencyReferenceIDRef_, ob);
                    }
                    else if (currencyReferenceNode.Attributes["href"] != null)
                    {
                        currencyReferenceIDRef_ = currencyReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        currencyReference_ = new IdentifiedCurrencyReference(currencyReferenceNode);
                    }
                }
                else
                {
                    currencyReference_ = new IdentifiedCurrencyReference(currencyReferenceNode);
                }
            }


            XmlNode dividendFxTriggerDateNode = xmlNode.SelectSingleNode("dividendFxTriggerDate");

            if (dividendFxTriggerDateNode != null)
            {
                if (dividendFxTriggerDateNode.Attributes["href"] != null || dividendFxTriggerDateNode.Attributes["id"] != null)
                {
                    if (dividendFxTriggerDateNode.Attributes["id"] != null)
                    {
                        dividendFxTriggerDateIDRef_ = dividendFxTriggerDateNode.Attributes["id"].Value;
                        DividendPaymentDate ob = new DividendPaymentDate(dividendFxTriggerDateNode);
                        IDManager.SetID(dividendFxTriggerDateIDRef_, ob);
                    }
                    else if (dividendFxTriggerDateNode.Attributes["href"] != null)
                    {
                        dividendFxTriggerDateIDRef_ = dividendFxTriggerDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dividendFxTriggerDate_ = new DividendPaymentDate(dividendFxTriggerDateNode);
                    }
                }
                else
                {
                    dividendFxTriggerDate_ = new DividendPaymentDate(dividendFxTriggerDateNode);
                }
            }


            XmlNode interestAccrualsMethodNode = xmlNode.SelectSingleNode("interestAccrualsMethod");

            if (interestAccrualsMethodNode != null)
            {
                if (interestAccrualsMethodNode.Attributes["href"] != null || interestAccrualsMethodNode.Attributes["id"] != null)
                {
                    if (interestAccrualsMethodNode.Attributes["id"] != null)
                    {
                        interestAccrualsMethodIDRef_ = interestAccrualsMethodNode.Attributes["id"].Value;
                        InterestAccrualsCompoundingMethod ob = new InterestAccrualsCompoundingMethod(interestAccrualsMethodNode);
                        IDManager.SetID(interestAccrualsMethodIDRef_, ob);
                    }
                    else if (interestAccrualsMethodNode.Attributes["href"] != null)
                    {
                        interestAccrualsMethodIDRef_ = interestAccrualsMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        interestAccrualsMethod_ = new InterestAccrualsCompoundingMethod(interestAccrualsMethodNode);
                    }
                }
                else
                {
                    interestAccrualsMethod_ = new InterestAccrualsCompoundingMethod(interestAccrualsMethodNode);
                }
            }


            XmlNode numberOfIndexUnitsNode = xmlNode.SelectSingleNode("numberOfIndexUnits");

            if (numberOfIndexUnitsNode != null)
            {
                if (numberOfIndexUnitsNode.Attributes["href"] != null || numberOfIndexUnitsNode.Attributes["id"] != null)
                {
                    if (numberOfIndexUnitsNode.Attributes["id"] != null)
                    {
                        numberOfIndexUnitsIDRef_ = numberOfIndexUnitsNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(numberOfIndexUnitsNode);
                        IDManager.SetID(numberOfIndexUnitsIDRef_, ob);
                    }
                    else if (numberOfIndexUnitsNode.Attributes["href"] != null)
                    {
                        numberOfIndexUnitsIDRef_ = numberOfIndexUnitsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        numberOfIndexUnits_ = new NonNegativeDecimal(numberOfIndexUnitsNode);
                    }
                }
                else
                {
                    numberOfIndexUnits_ = new NonNegativeDecimal(numberOfIndexUnitsNode);
                }
            }


            XmlNode declaredCashDividendPercentageNode = xmlNode.SelectSingleNode("declaredCashDividendPercentage");

            if (declaredCashDividendPercentageNode != null)
            {
                if (declaredCashDividendPercentageNode.Attributes["href"] != null || declaredCashDividendPercentageNode.Attributes["id"] != null)
                {
                    if (declaredCashDividendPercentageNode.Attributes["id"] != null)
                    {
                        declaredCashDividendPercentageIDRef_ = declaredCashDividendPercentageNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(declaredCashDividendPercentageNode);
                        IDManager.SetID(declaredCashDividendPercentageIDRef_, ob);
                    }
                    else if (declaredCashDividendPercentageNode.Attributes["href"] != null)
                    {
                        declaredCashDividendPercentageIDRef_ = declaredCashDividendPercentageNode.Attributes["href"].Value;
                    }
                    else
                    {
                        declaredCashDividendPercentage_ = new NonNegativeDecimal(declaredCashDividendPercentageNode);
                    }
                }
                else
                {
                    declaredCashDividendPercentage_ = new NonNegativeDecimal(declaredCashDividendPercentageNode);
                }
            }


            XmlNode declaredCashEquivalentDividendPercentageNode = xmlNode.SelectSingleNode("declaredCashEquivalentDividendPercentage");

            if (declaredCashEquivalentDividendPercentageNode != null)
            {
                if (declaredCashEquivalentDividendPercentageNode.Attributes["href"] != null || declaredCashEquivalentDividendPercentageNode.Attributes["id"] != null)
                {
                    if (declaredCashEquivalentDividendPercentageNode.Attributes["id"] != null)
                    {
                        declaredCashEquivalentDividendPercentageIDRef_ = declaredCashEquivalentDividendPercentageNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(declaredCashEquivalentDividendPercentageNode);
                        IDManager.SetID(declaredCashEquivalentDividendPercentageIDRef_, ob);
                    }
                    else if (declaredCashEquivalentDividendPercentageNode.Attributes["href"] != null)
                    {
                        declaredCashEquivalentDividendPercentageIDRef_ = declaredCashEquivalentDividendPercentageNode.Attributes["href"].Value;
                    }
                    else
                    {
                        declaredCashEquivalentDividendPercentage_ = new NonNegativeDecimal(declaredCashEquivalentDividendPercentageNode);
                    }
                }
                else
                {
                    declaredCashEquivalentDividendPercentage_ = new NonNegativeDecimal(declaredCashEquivalentDividendPercentageNode);
                }
            }


            XmlNode nonCashDividendTreatmentNode = xmlNode.SelectSingleNode("nonCashDividendTreatment");

            if (nonCashDividendTreatmentNode != null)
            {
                if (nonCashDividendTreatmentNode.Attributes["href"] != null || nonCashDividendTreatmentNode.Attributes["id"] != null)
                {
                    if (nonCashDividendTreatmentNode.Attributes["id"] != null)
                    {
                        nonCashDividendTreatmentIDRef_ = nonCashDividendTreatmentNode.Attributes["id"].Value;
                        NonCashDividendTreatmentEnum ob = new NonCashDividendTreatmentEnum(nonCashDividendTreatmentNode);
                        IDManager.SetID(nonCashDividendTreatmentIDRef_, ob);
                    }
                    else if (nonCashDividendTreatmentNode.Attributes["href"] != null)
                    {
                        nonCashDividendTreatmentIDRef_ = nonCashDividendTreatmentNode.Attributes["href"].Value;
                    }
                    else
                    {
                        nonCashDividendTreatment_ = new NonCashDividendTreatmentEnum(nonCashDividendTreatmentNode);
                    }
                }
                else
                {
                    nonCashDividendTreatment_ = new NonCashDividendTreatmentEnum(nonCashDividendTreatmentNode);
                }
            }


            XmlNode dividendCompositionNode = xmlNode.SelectSingleNode("dividendComposition");

            if (dividendCompositionNode != null)
            {
                if (dividendCompositionNode.Attributes["href"] != null || dividendCompositionNode.Attributes["id"] != null)
                {
                    if (dividendCompositionNode.Attributes["id"] != null)
                    {
                        dividendCompositionIDRef_ = dividendCompositionNode.Attributes["id"].Value;
                        DividendCompositionEnum ob = new DividendCompositionEnum(dividendCompositionNode);
                        IDManager.SetID(dividendCompositionIDRef_, ob);
                    }
                    else if (dividendCompositionNode.Attributes["href"] != null)
                    {
                        dividendCompositionIDRef_ = dividendCompositionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dividendComposition_ = new DividendCompositionEnum(dividendCompositionNode);
                    }
                }
                else
                {
                    dividendComposition_ = new DividendCompositionEnum(dividendCompositionNode);
                }
            }


            XmlNode specialDividendsNode = xmlNode.SelectSingleNode("specialDividends");

            if (specialDividendsNode != null)
            {
                if (specialDividendsNode.Attributes["href"] != null || specialDividendsNode.Attributes["id"] != null)
                {
                    if (specialDividendsNode.Attributes["id"] != null)
                    {
                        specialDividendsIDRef_ = specialDividendsNode.Attributes["id"].Value;
                        XsdTypeBoolean ob = new XsdTypeBoolean(specialDividendsNode);
                        IDManager.SetID(specialDividendsIDRef_, ob);
                    }
                    else if (specialDividendsNode.Attributes["href"] != null)
                    {
                        specialDividendsIDRef_ = specialDividendsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        specialDividends_ = new XsdTypeBoolean(specialDividendsNode);
                    }
                }
                else
                {
                    specialDividends_ = new XsdTypeBoolean(specialDividendsNode);
                }
            }
        }
        public WeightedAveragingObservation(XmlNode xmlNode)
        {
            XmlNodeList dateTimeNodeList = xmlNode.SelectNodes("dateTime");

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

            foreach (XmlNode item in dateTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dateTimeIDRef = item.Attributes["id"].Name;
                        XsdTypeDateTime ob = XsdTypeDateTime();
                        IDManager.SetID(dateTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dateTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dateTime = new XsdTypeDateTime(item);
                    }
                }
            }


            XmlNodeList observationNumberNodeList = xmlNode.SelectNodes("observationNumber");

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

            foreach (XmlNode item in observationNumberNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        observationNumberIDRef = item.Attributes["id"].Name;
                        XsdTypePositiveInteger ob = XsdTypePositiveInteger();
                        IDManager.SetID(observationNumberIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        observationNumberIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        observationNumber = new XsdTypePositiveInteger(item);
                    }
                }
            }


            XmlNodeList weightNodeList = xmlNode.SelectNodes("weight");

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

            foreach (XmlNode item in weightNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        weightIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(weightIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        weightIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        weight = new NonNegativeDecimal(item);
                    }
                }
            }
        }
 public NonNegativeSchedule(XmlNode xmlNode)
 {
     XmlNode initialValueNode = xmlNode.SelectSingleNode("initialValue");
     
     if (initialValueNode != null)
     {
         if (initialValueNode.Attributes["href"] != null || initialValueNode.Attributes["id"] != null) 
         {
             if (initialValueNode.Attributes["id"] != null) 
             {
                 initialValueIDRef_ = initialValueNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(initialValueNode);
                 IDManager.SetID(initialValueIDRef_, ob);
             }
             else if (initialValueNode.Attributes["href"] != null)
             {
                 initialValueIDRef_ = initialValueNode.Attributes["href"].Value;
             }
             else
             {
                 initialValue_ = new NonNegativeDecimal(initialValueNode);
             }
         }
         else
         {
             initialValue_ = new NonNegativeDecimal(initialValueNode);
         }
     }
     
 
     XmlNodeList stepNodeList = xmlNode.SelectNodes("step");
     
     if (stepNodeList != null)
     {
         this.step_ = new List<NonNegativeStep>();
         foreach (XmlNode item in stepNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     stepIDRef_ = item.Attributes["id"].Value;
                     step_.Add(new NonNegativeStep(item));
                     IDManager.SetID(stepIDRef_, step_[step_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     stepIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 step_.Add(new NonNegativeStep(item));
                 }
             }
             else
             {
                 step_.Add(new NonNegativeStep(item));
             }
         }
     }
     
 
 }
Exemple #32
0
        public Variance(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode varianceAmountNode = xmlNode.SelectSingleNode("varianceAmount");

            if (varianceAmountNode != null)
            {
                if (varianceAmountNode.Attributes["href"] != null || varianceAmountNode.Attributes["id"] != null)
                {
                    if (varianceAmountNode.Attributes["id"] != null)
                    {
                        varianceAmountIDRef_ = varianceAmountNode.Attributes["id"].Value;
                        NonNegativeMoney ob = new NonNegativeMoney(varianceAmountNode);
                        IDManager.SetID(varianceAmountIDRef_, ob);
                    }
                    else if (varianceAmountNode.Attributes["href"] != null)
                    {
                        varianceAmountIDRef_ = varianceAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        varianceAmount_ = new NonNegativeMoney(varianceAmountNode);
                    }
                }
                else
                {
                    varianceAmount_ = new NonNegativeMoney(varianceAmountNode);
                }
            }


            XmlNode volatilityStrikePriceNode = xmlNode.SelectSingleNode("volatilityStrikePrice");

            if (volatilityStrikePriceNode != null)
            {
                if (volatilityStrikePriceNode.Attributes["href"] != null || volatilityStrikePriceNode.Attributes["id"] != null)
                {
                    if (volatilityStrikePriceNode.Attributes["id"] != null)
                    {
                        volatilityStrikePriceIDRef_ = volatilityStrikePriceNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(volatilityStrikePriceNode);
                        IDManager.SetID(volatilityStrikePriceIDRef_, ob);
                    }
                    else if (volatilityStrikePriceNode.Attributes["href"] != null)
                    {
                        volatilityStrikePriceIDRef_ = volatilityStrikePriceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        volatilityStrikePrice_ = new NonNegativeDecimal(volatilityStrikePriceNode);
                    }
                }
                else
                {
                    volatilityStrikePrice_ = new NonNegativeDecimal(volatilityStrikePriceNode);
                }
            }


            XmlNode varianceStrikePriceNode = xmlNode.SelectSingleNode("varianceStrikePrice");

            if (varianceStrikePriceNode != null)
            {
                if (varianceStrikePriceNode.Attributes["href"] != null || varianceStrikePriceNode.Attributes["id"] != null)
                {
                    if (varianceStrikePriceNode.Attributes["id"] != null)
                    {
                        varianceStrikePriceIDRef_ = varianceStrikePriceNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(varianceStrikePriceNode);
                        IDManager.SetID(varianceStrikePriceIDRef_, ob);
                    }
                    else if (varianceStrikePriceNode.Attributes["href"] != null)
                    {
                        varianceStrikePriceIDRef_ = varianceStrikePriceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        varianceStrikePrice_ = new NonNegativeDecimal(varianceStrikePriceNode);
                    }
                }
                else
                {
                    varianceStrikePrice_ = new NonNegativeDecimal(varianceStrikePriceNode);
                }
            }


            XmlNode varianceCapNode = xmlNode.SelectSingleNode("varianceCap");

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


            XmlNode unadjustedVarianceCapNode = xmlNode.SelectSingleNode("unadjustedVarianceCap");

            if (unadjustedVarianceCapNode != null)
            {
                if (unadjustedVarianceCapNode.Attributes["href"] != null || unadjustedVarianceCapNode.Attributes["id"] != null)
                {
                    if (unadjustedVarianceCapNode.Attributes["id"] != null)
                    {
                        unadjustedVarianceCapIDRef_ = unadjustedVarianceCapNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(unadjustedVarianceCapNode);
                        IDManager.SetID(unadjustedVarianceCapIDRef_, ob);
                    }
                    else if (unadjustedVarianceCapNode.Attributes["href"] != null)
                    {
                        unadjustedVarianceCapIDRef_ = unadjustedVarianceCapNode.Attributes["href"].Value;
                    }
                    else
                    {
                        unadjustedVarianceCap_ = new PositiveDecimal(unadjustedVarianceCapNode);
                    }
                }
                else
                {
                    unadjustedVarianceCap_ = new PositiveDecimal(unadjustedVarianceCapNode);
                }
            }


            XmlNode boundedVarianceNode = xmlNode.SelectSingleNode("boundedVariance");

            if (boundedVarianceNode != null)
            {
                if (boundedVarianceNode.Attributes["href"] != null || boundedVarianceNode.Attributes["id"] != null)
                {
                    if (boundedVarianceNode.Attributes["id"] != null)
                    {
                        boundedVarianceIDRef_ = boundedVarianceNode.Attributes["id"].Value;
                        BoundedVariance ob = new BoundedVariance(boundedVarianceNode);
                        IDManager.SetID(boundedVarianceIDRef_, ob);
                    }
                    else if (boundedVarianceNode.Attributes["href"] != null)
                    {
                        boundedVarianceIDRef_ = boundedVarianceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        boundedVariance_ = new BoundedVariance(boundedVarianceNode);
                    }
                }
                else
                {
                    boundedVariance_ = new BoundedVariance(boundedVarianceNode);
                }
            }


            XmlNode exchangeTradedContractNearestNode = xmlNode.SelectSingleNode("exchangeTradedContractNearest");

            if (exchangeTradedContractNearestNode != null)
            {
                if (exchangeTradedContractNearestNode.Attributes["href"] != null || exchangeTradedContractNearestNode.Attributes["id"] != null)
                {
                    if (exchangeTradedContractNearestNode.Attributes["id"] != null)
                    {
                        exchangeTradedContractNearestIDRef_ = exchangeTradedContractNearestNode.Attributes["id"].Value;
                        ExchangeTradedContract ob = new ExchangeTradedContract(exchangeTradedContractNearestNode);
                        IDManager.SetID(exchangeTradedContractNearestIDRef_, ob);
                    }
                    else if (exchangeTradedContractNearestNode.Attributes["href"] != null)
                    {
                        exchangeTradedContractNearestIDRef_ = exchangeTradedContractNearestNode.Attributes["href"].Value;
                    }
                    else
                    {
                        exchangeTradedContractNearest_ = new ExchangeTradedContract(exchangeTradedContractNearestNode);
                    }
                }
                else
                {
                    exchangeTradedContractNearest_ = new ExchangeTradedContract(exchangeTradedContractNearestNode);
                }
            }


            XmlNode vegaNotionalAmountNode = xmlNode.SelectSingleNode("vegaNotionalAmount");

            if (vegaNotionalAmountNode != null)
            {
                if (vegaNotionalAmountNode.Attributes["href"] != null || vegaNotionalAmountNode.Attributes["id"] != null)
                {
                    if (vegaNotionalAmountNode.Attributes["id"] != null)
                    {
                        vegaNotionalAmountIDRef_ = vegaNotionalAmountNode.Attributes["id"].Value;
                        XsdTypeDecimal ob = new XsdTypeDecimal(vegaNotionalAmountNode);
                        IDManager.SetID(vegaNotionalAmountIDRef_, ob);
                    }
                    else if (vegaNotionalAmountNode.Attributes["href"] != null)
                    {
                        vegaNotionalAmountIDRef_ = vegaNotionalAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        vegaNotionalAmount_ = new XsdTypeDecimal(vegaNotionalAmountNode);
                    }
                }
                else
                {
                    vegaNotionalAmount_ = new XsdTypeDecimal(vegaNotionalAmountNode);
                }
            }
        }
        public EquityMultipleExercise(XmlNode xmlNode)
        {
            XmlNodeList integralMultipleExerciseNodeList = xmlNode.SelectNodes("integralMultipleExercise");

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

            foreach (XmlNode item in integralMultipleExerciseNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        integralMultipleExerciseIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(integralMultipleExerciseIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        integralMultipleExerciseIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        integralMultipleExercise = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList minimumNumberOfOptionsNodeList = xmlNode.SelectNodes("minimumNumberOfOptions");

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

            foreach (XmlNode item in minimumNumberOfOptionsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        minimumNumberOfOptionsIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(minimumNumberOfOptionsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        minimumNumberOfOptionsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        minimumNumberOfOptions = new NonNegativeDecimal(item);
                    }
                }
            }


            XmlNodeList maximumNumberOfOptionsNodeList = xmlNode.SelectNodes("maximumNumberOfOptions");

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

            foreach (XmlNode item in maximumNumberOfOptionsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        maximumNumberOfOptionsIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(maximumNumberOfOptionsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        maximumNumberOfOptionsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        maximumNumberOfOptions = new NonNegativeDecimal(item);
                    }
                }
            }
        }
        public EquitySwapTransactionSupplement(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode mutualEarlyTerminationNode = xmlNode.SelectSingleNode("mutualEarlyTermination");

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


            XmlNode optionalEarlyTerminationNode = xmlNode.SelectSingleNode("optionalEarlyTermination");

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


            XmlNode breakFundingRecoveryNode = xmlNode.SelectSingleNode("breakFundingRecovery");

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


            XmlNode breakFeeElectionNode = xmlNode.SelectSingleNode("breakFeeElection");

            if (breakFeeElectionNode != null)
            {
                if (breakFeeElectionNode.Attributes["href"] != null || breakFeeElectionNode.Attributes["id"] != null)
                {
                    if (breakFeeElectionNode.Attributes["id"] != null)
                    {
                        breakFeeElectionIDRef_ = breakFeeElectionNode.Attributes["id"].Value;
                        FeeElectionEnum ob = new FeeElectionEnum(breakFeeElectionNode);
                        IDManager.SetID(breakFeeElectionIDRef_, ob);
                    }
                    else if (breakFeeElectionNode.Attributes["href"] != null)
                    {
                        breakFeeElectionIDRef_ = breakFeeElectionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        breakFeeElection_ = new FeeElectionEnum(breakFeeElectionNode);
                    }
                }
                else
                {
                    breakFeeElection_ = new FeeElectionEnum(breakFeeElectionNode);
                }
            }


            XmlNode breakFeeRateNode = xmlNode.SelectSingleNode("breakFeeRate");

            if (breakFeeRateNode != null)
            {
                if (breakFeeRateNode.Attributes["href"] != null || breakFeeRateNode.Attributes["id"] != null)
                {
                    if (breakFeeRateNode.Attributes["id"] != null)
                    {
                        breakFeeRateIDRef_ = breakFeeRateNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(breakFeeRateNode);
                        IDManager.SetID(breakFeeRateIDRef_, ob);
                    }
                    else if (breakFeeRateNode.Attributes["href"] != null)
                    {
                        breakFeeRateIDRef_ = breakFeeRateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        breakFeeRate_ = new NonNegativeDecimal(breakFeeRateNode);
                    }
                }
                else
                {
                    breakFeeRate_ = new NonNegativeDecimal(breakFeeRateNode);
                }
            }


            XmlNode multipleExchangeIndexAnnexFallbackNode = xmlNode.SelectSingleNode("multipleExchangeIndexAnnexFallback");

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


            XmlNode componentSecurityIndexAnnexFallbackNode = xmlNode.SelectSingleNode("componentSecurityIndexAnnexFallback");

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


            XmlNode localJurisdictionNode = xmlNode.SelectSingleNode("localJurisdiction");

            if (localJurisdictionNode != null)
            {
                if (localJurisdictionNode.Attributes["href"] != null || localJurisdictionNode.Attributes["id"] != null)
                {
                    if (localJurisdictionNode.Attributes["id"] != null)
                    {
                        localJurisdictionIDRef_ = localJurisdictionNode.Attributes["id"].Value;
                        CountryCode ob = new CountryCode(localJurisdictionNode);
                        IDManager.SetID(localJurisdictionIDRef_, ob);
                    }
                    else if (localJurisdictionNode.Attributes["href"] != null)
                    {
                        localJurisdictionIDRef_ = localJurisdictionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        localJurisdiction_ = new CountryCode(localJurisdictionNode);
                    }
                }
                else
                {
                    localJurisdiction_ = new CountryCode(localJurisdictionNode);
                }
            }


            XmlNode relevantJurisdictionNode = xmlNode.SelectSingleNode("relevantJurisdiction");

            if (relevantJurisdictionNode != null)
            {
                if (relevantJurisdictionNode.Attributes["href"] != null || relevantJurisdictionNode.Attributes["id"] != null)
                {
                    if (relevantJurisdictionNode.Attributes["id"] != null)
                    {
                        relevantJurisdictionIDRef_ = relevantJurisdictionNode.Attributes["id"].Value;
                        CountryCode ob = new CountryCode(relevantJurisdictionNode);
                        IDManager.SetID(relevantJurisdictionIDRef_, ob);
                    }
                    else if (relevantJurisdictionNode.Attributes["href"] != null)
                    {
                        relevantJurisdictionIDRef_ = relevantJurisdictionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        relevantJurisdiction_ = new CountryCode(relevantJurisdictionNode);
                    }
                }
                else
                {
                    relevantJurisdiction_ = new CountryCode(relevantJurisdictionNode);
                }
            }


            XmlNode extraordinaryEventsNode = xmlNode.SelectSingleNode("extraordinaryEvents");

            if (extraordinaryEventsNode != null)
            {
                if (extraordinaryEventsNode.Attributes["href"] != null || extraordinaryEventsNode.Attributes["id"] != null)
                {
                    if (extraordinaryEventsNode.Attributes["id"] != null)
                    {
                        extraordinaryEventsIDRef_ = extraordinaryEventsNode.Attributes["id"].Value;
                        ExtraordinaryEvents ob = new ExtraordinaryEvents(extraordinaryEventsNode);
                        IDManager.SetID(extraordinaryEventsIDRef_, ob);
                    }
                    else if (extraordinaryEventsNode.Attributes["href"] != null)
                    {
                        extraordinaryEventsIDRef_ = extraordinaryEventsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        extraordinaryEvents_ = new ExtraordinaryEvents(extraordinaryEventsNode);
                    }
                }
                else
                {
                    extraordinaryEvents_ = new ExtraordinaryEvents(extraordinaryEventsNode);
                }
            }
        }
 public GasProduct(XmlNode xmlNode)
 {
     XmlNode typeNode = xmlNode.SelectSingleNode("type");
     
     if (typeNode != null)
     {
         if (typeNode.Attributes["href"] != null || typeNode.Attributes["id"] != null) 
         {
             if (typeNode.Attributes["id"] != null) 
             {
                 typeIDRef_ = typeNode.Attributes["id"].Value;
                 GasProductTypeEnum ob = new GasProductTypeEnum(typeNode);
                 IDManager.SetID(typeIDRef_, ob);
             }
             else if (typeNode.Attributes["href"] != null)
             {
                 typeIDRef_ = typeNode.Attributes["href"].Value;
             }
             else
             {
                 type_ = new GasProductTypeEnum(typeNode);
             }
         }
         else
         {
             type_ = new GasProductTypeEnum(typeNode);
         }
     }
     
 
     XmlNode calorificValueNode = xmlNode.SelectSingleNode("calorificValue");
     
     if (calorificValueNode != null)
     {
         if (calorificValueNode.Attributes["href"] != null || calorificValueNode.Attributes["id"] != null) 
         {
             if (calorificValueNode.Attributes["id"] != null) 
             {
                 calorificValueIDRef_ = calorificValueNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(calorificValueNode);
                 IDManager.SetID(calorificValueIDRef_, ob);
             }
             else if (calorificValueNode.Attributes["href"] != null)
             {
                 calorificValueIDRef_ = calorificValueNode.Attributes["href"].Value;
             }
             else
             {
                 calorificValue_ = new NonNegativeDecimal(calorificValueNode);
             }
         }
         else
         {
             calorificValue_ = new NonNegativeDecimal(calorificValueNode);
         }
     }
     
 
     XmlNode qualityNode = xmlNode.SelectSingleNode("quality");
     
     if (qualityNode != null)
     {
         if (qualityNode.Attributes["href"] != null || qualityNode.Attributes["id"] != null) 
         {
             if (qualityNode.Attributes["id"] != null) 
             {
                 qualityIDRef_ = qualityNode.Attributes["id"].Value;
                 GasQuality ob = new GasQuality(qualityNode);
                 IDManager.SetID(qualityIDRef_, ob);
             }
             else if (qualityNode.Attributes["href"] != null)
             {
                 qualityIDRef_ = qualityNode.Attributes["href"].Value;
             }
             else
             {
                 quality_ = new GasQuality(qualityNode);
             }
         }
         else
         {
             quality_ = new GasQuality(qualityNode);
         }
     }
     
 
 }
        public EquityPremium(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode payerPartyReferenceNode = xmlNode.SelectSingleNode("payerPartyReference");

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


            XmlNode payerAccountReferenceNode = xmlNode.SelectSingleNode("payerAccountReference");

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


            XmlNode receiverPartyReferenceNode = xmlNode.SelectSingleNode("receiverPartyReference");

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


            XmlNode receiverAccountReferenceNode = xmlNode.SelectSingleNode("receiverAccountReference");

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


            XmlNode premiumTypeNode = xmlNode.SelectSingleNode("premiumType");

            if (premiumTypeNode != null)
            {
                if (premiumTypeNode.Attributes["href"] != null || premiumTypeNode.Attributes["id"] != null)
                {
                    if (premiumTypeNode.Attributes["id"] != null)
                    {
                        premiumTypeIDRef_ = premiumTypeNode.Attributes["id"].Value;
                        PremiumTypeEnum ob = new PremiumTypeEnum(premiumTypeNode);
                        IDManager.SetID(premiumTypeIDRef_, ob);
                    }
                    else if (premiumTypeNode.Attributes["href"] != null)
                    {
                        premiumTypeIDRef_ = premiumTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        premiumType_ = new PremiumTypeEnum(premiumTypeNode);
                    }
                }
                else
                {
                    premiumType_ = new PremiumTypeEnum(premiumTypeNode);
                }
            }


            XmlNode paymentAmountNode = xmlNode.SelectSingleNode("paymentAmount");

            if (paymentAmountNode != null)
            {
                if (paymentAmountNode.Attributes["href"] != null || paymentAmountNode.Attributes["id"] != null)
                {
                    if (paymentAmountNode.Attributes["id"] != null)
                    {
                        paymentAmountIDRef_ = paymentAmountNode.Attributes["id"].Value;
                        NonNegativeMoney ob = new NonNegativeMoney(paymentAmountNode);
                        IDManager.SetID(paymentAmountIDRef_, ob);
                    }
                    else if (paymentAmountNode.Attributes["href"] != null)
                    {
                        paymentAmountIDRef_ = paymentAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        paymentAmount_ = new NonNegativeMoney(paymentAmountNode);
                    }
                }
                else
                {
                    paymentAmount_ = new NonNegativeMoney(paymentAmountNode);
                }
            }


            XmlNode paymentDateNode = xmlNode.SelectSingleNode("paymentDate");

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


            XmlNode swapPremiumNode = xmlNode.SelectSingleNode("swapPremium");

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


            XmlNode pricePerOptionNode = xmlNode.SelectSingleNode("pricePerOption");

            if (pricePerOptionNode != null)
            {
                if (pricePerOptionNode.Attributes["href"] != null || pricePerOptionNode.Attributes["id"] != null)
                {
                    if (pricePerOptionNode.Attributes["id"] != null)
                    {
                        pricePerOptionIDRef_ = pricePerOptionNode.Attributes["id"].Value;
                        NonNegativeMoney ob = new NonNegativeMoney(pricePerOptionNode);
                        IDManager.SetID(pricePerOptionIDRef_, ob);
                    }
                    else if (pricePerOptionNode.Attributes["href"] != null)
                    {
                        pricePerOptionIDRef_ = pricePerOptionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        pricePerOption_ = new NonNegativeMoney(pricePerOptionNode);
                    }
                }
                else
                {
                    pricePerOption_ = new NonNegativeMoney(pricePerOptionNode);
                }
            }


            XmlNode percentageOfNotionalNode = xmlNode.SelectSingleNode("percentageOfNotional");

            if (percentageOfNotionalNode != null)
            {
                if (percentageOfNotionalNode.Attributes["href"] != null || percentageOfNotionalNode.Attributes["id"] != null)
                {
                    if (percentageOfNotionalNode.Attributes["id"] != null)
                    {
                        percentageOfNotionalIDRef_ = percentageOfNotionalNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(percentageOfNotionalNode);
                        IDManager.SetID(percentageOfNotionalIDRef_, ob);
                    }
                    else if (percentageOfNotionalNode.Attributes["href"] != null)
                    {
                        percentageOfNotionalIDRef_ = percentageOfNotionalNode.Attributes["href"].Value;
                    }
                    else
                    {
                        percentageOfNotional_ = new NonNegativeDecimal(percentageOfNotionalNode);
                    }
                }
                else
                {
                    percentageOfNotional_ = new NonNegativeDecimal(percentageOfNotionalNode);
                }
            }
        }
Exemple #37
0
        public FeaturePayment(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode payerPartyReferenceNode = xmlNode.SelectSingleNode("payerPartyReference");

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


            XmlNode payerAccountReferenceNode = xmlNode.SelectSingleNode("payerAccountReference");

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


            XmlNode receiverPartyReferenceNode = xmlNode.SelectSingleNode("receiverPartyReference");

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


            XmlNode receiverAccountReferenceNode = xmlNode.SelectSingleNode("receiverAccountReference");

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


            XmlNode levelPercentageNode = xmlNode.SelectSingleNode("levelPercentage");

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


            XmlNode amountNode = xmlNode.SelectSingleNode("amount");

            if (amountNode != null)
            {
                if (amountNode.Attributes["href"] != null || amountNode.Attributes["id"] != null)
                {
                    if (amountNode.Attributes["id"] != null)
                    {
                        amountIDRef_ = amountNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(amountNode);
                        IDManager.SetID(amountIDRef_, ob);
                    }
                    else if (amountNode.Attributes["href"] != null)
                    {
                        amountIDRef_ = amountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        amount_ = new NonNegativeDecimal(amountNode);
                    }
                }
                else
                {
                    amount_ = new NonNegativeDecimal(amountNode);
                }
            }


            XmlNode timeNode = xmlNode.SelectSingleNode("time");

            if (timeNode != null)
            {
                if (timeNode.Attributes["href"] != null || timeNode.Attributes["id"] != null)
                {
                    if (timeNode.Attributes["id"] != null)
                    {
                        timeIDRef_ = timeNode.Attributes["id"].Value;
                        TimeTypeEnum ob = new TimeTypeEnum(timeNode);
                        IDManager.SetID(timeIDRef_, ob);
                    }
                    else if (timeNode.Attributes["href"] != null)
                    {
                        timeIDRef_ = timeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        time_ = new TimeTypeEnum(timeNode);
                    }
                }
                else
                {
                    time_ = new TimeTypeEnum(timeNode);
                }
            }


            XmlNode currencyNode = xmlNode.SelectSingleNode("currency");

            if (currencyNode != null)
            {
                if (currencyNode.Attributes["href"] != null || currencyNode.Attributes["id"] != null)
                {
                    if (currencyNode.Attributes["id"] != null)
                    {
                        currencyIDRef_ = currencyNode.Attributes["id"].Value;
                        Currency ob = new Currency(currencyNode);
                        IDManager.SetID(currencyIDRef_, ob);
                    }
                    else if (currencyNode.Attributes["href"] != null)
                    {
                        currencyIDRef_ = currencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        currency_ = new Currency(currencyNode);
                    }
                }
                else
                {
                    currency_ = new Currency(currencyNode);
                }
            }


            XmlNode featurePaymentDateNode = xmlNode.SelectSingleNode("featurePaymentDate");

            if (featurePaymentDateNode != null)
            {
                if (featurePaymentDateNode.Attributes["href"] != null || featurePaymentDateNode.Attributes["id"] != null)
                {
                    if (featurePaymentDateNode.Attributes["id"] != null)
                    {
                        featurePaymentDateIDRef_ = featurePaymentDateNode.Attributes["id"].Value;
                        AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(featurePaymentDateNode);
                        IDManager.SetID(featurePaymentDateIDRef_, ob);
                    }
                    else if (featurePaymentDateNode.Attributes["href"] != null)
                    {
                        featurePaymentDateIDRef_ = featurePaymentDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        featurePaymentDate_ = new AdjustableOrRelativeDate(featurePaymentDateNode);
                    }
                }
                else
                {
                    featurePaymentDate_ = new AdjustableOrRelativeDate(featurePaymentDateNode);
                }
            }
        }
        public BoundedVariance(XmlNode xmlNode)
        {
            XmlNode realisedVarianceMethodNode = xmlNode.SelectSingleNode("realisedVarianceMethod");

            if (realisedVarianceMethodNode != null)
            {
                if (realisedVarianceMethodNode.Attributes["href"] != null || realisedVarianceMethodNode.Attributes["id"] != null)
                {
                    if (realisedVarianceMethodNode.Attributes["id"] != null)
                    {
                        realisedVarianceMethodIDRef_ = realisedVarianceMethodNode.Attributes["id"].Value;
                        RealisedVarianceMethodEnum ob = new RealisedVarianceMethodEnum(realisedVarianceMethodNode);
                        IDManager.SetID(realisedVarianceMethodIDRef_, ob);
                    }
                    else if (realisedVarianceMethodNode.Attributes["href"] != null)
                    {
                        realisedVarianceMethodIDRef_ = realisedVarianceMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        realisedVarianceMethod_ = new RealisedVarianceMethodEnum(realisedVarianceMethodNode);
                    }
                }
                else
                {
                    realisedVarianceMethod_ = new RealisedVarianceMethodEnum(realisedVarianceMethodNode);
                }
            }


            XmlNode daysInRangeAdjustmentNode = xmlNode.SelectSingleNode("daysInRangeAdjustment");

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


            XmlNode upperBarrierNode = xmlNode.SelectSingleNode("upperBarrier");

            if (upperBarrierNode != null)
            {
                if (upperBarrierNode.Attributes["href"] != null || upperBarrierNode.Attributes["id"] != null)
                {
                    if (upperBarrierNode.Attributes["id"] != null)
                    {
                        upperBarrierIDRef_ = upperBarrierNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(upperBarrierNode);
                        IDManager.SetID(upperBarrierIDRef_, ob);
                    }
                    else if (upperBarrierNode.Attributes["href"] != null)
                    {
                        upperBarrierIDRef_ = upperBarrierNode.Attributes["href"].Value;
                    }
                    else
                    {
                        upperBarrier_ = new NonNegativeDecimal(upperBarrierNode);
                    }
                }
                else
                {
                    upperBarrier_ = new NonNegativeDecimal(upperBarrierNode);
                }
            }


            XmlNode lowerBarrierNode = xmlNode.SelectSingleNode("lowerBarrier");

            if (lowerBarrierNode != null)
            {
                if (lowerBarrierNode.Attributes["href"] != null || lowerBarrierNode.Attributes["id"] != null)
                {
                    if (lowerBarrierNode.Attributes["id"] != null)
                    {
                        lowerBarrierIDRef_ = lowerBarrierNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(lowerBarrierNode);
                        IDManager.SetID(lowerBarrierIDRef_, ob);
                    }
                    else if (lowerBarrierNode.Attributes["href"] != null)
                    {
                        lowerBarrierIDRef_ = lowerBarrierNode.Attributes["href"].Value;
                    }
                    else
                    {
                        lowerBarrier_ = new NonNegativeDecimal(lowerBarrierNode);
                    }
                }
                else
                {
                    lowerBarrier_ = new NonNegativeDecimal(lowerBarrierNode);
                }
            }
        }
 public EquityPremium(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode payerPartyReferenceNode = xmlNode.SelectSingleNode("payerPartyReference");
     
     if (payerPartyReferenceNode != null)
     {
         if (payerPartyReferenceNode.Attributes["href"] != null || payerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (payerPartyReferenceNode.Attributes["id"] != null) 
             {
                 payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(payerPartyReferenceNode);
                 IDManager.SetID(payerPartyReferenceIDRef_, ob);
             }
             else if (payerPartyReferenceNode.Attributes["href"] != null)
             {
                 payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
             }
         }
         else
         {
             payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
         }
     }
     
 
     XmlNode payerAccountReferenceNode = xmlNode.SelectSingleNode("payerAccountReference");
     
     if (payerAccountReferenceNode != null)
     {
         if (payerAccountReferenceNode.Attributes["href"] != null || payerAccountReferenceNode.Attributes["id"] != null) 
         {
             if (payerAccountReferenceNode.Attributes["id"] != null) 
             {
                 payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(payerAccountReferenceNode);
                 IDManager.SetID(payerAccountReferenceIDRef_, ob);
             }
             else if (payerAccountReferenceNode.Attributes["href"] != null)
             {
                 payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
             }
         }
         else
         {
             payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
         }
     }
     
 
     XmlNode receiverPartyReferenceNode = xmlNode.SelectSingleNode("receiverPartyReference");
     
     if (receiverPartyReferenceNode != null)
     {
         if (receiverPartyReferenceNode.Attributes["href"] != null || receiverPartyReferenceNode.Attributes["id"] != null) 
         {
             if (receiverPartyReferenceNode.Attributes["id"] != null) 
             {
                 receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(receiverPartyReferenceNode);
                 IDManager.SetID(receiverPartyReferenceIDRef_, ob);
             }
             else if (receiverPartyReferenceNode.Attributes["href"] != null)
             {
                 receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
             }
         }
         else
         {
             receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
         }
     }
     
 
     XmlNode receiverAccountReferenceNode = xmlNode.SelectSingleNode("receiverAccountReference");
     
     if (receiverAccountReferenceNode != null)
     {
         if (receiverAccountReferenceNode.Attributes["href"] != null || receiverAccountReferenceNode.Attributes["id"] != null) 
         {
             if (receiverAccountReferenceNode.Attributes["id"] != null) 
             {
                 receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(receiverAccountReferenceNode);
                 IDManager.SetID(receiverAccountReferenceIDRef_, ob);
             }
             else if (receiverAccountReferenceNode.Attributes["href"] != null)
             {
                 receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
             }
         }
         else
         {
             receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
         }
     }
     
 
     XmlNode premiumTypeNode = xmlNode.SelectSingleNode("premiumType");
     
     if (premiumTypeNode != null)
     {
         if (premiumTypeNode.Attributes["href"] != null || premiumTypeNode.Attributes["id"] != null) 
         {
             if (premiumTypeNode.Attributes["id"] != null) 
             {
                 premiumTypeIDRef_ = premiumTypeNode.Attributes["id"].Value;
                 PremiumTypeEnum ob = new PremiumTypeEnum(premiumTypeNode);
                 IDManager.SetID(premiumTypeIDRef_, ob);
             }
             else if (premiumTypeNode.Attributes["href"] != null)
             {
                 premiumTypeIDRef_ = premiumTypeNode.Attributes["href"].Value;
             }
             else
             {
                 premiumType_ = new PremiumTypeEnum(premiumTypeNode);
             }
         }
         else
         {
             premiumType_ = new PremiumTypeEnum(premiumTypeNode);
         }
     }
     
 
     XmlNode paymentAmountNode = xmlNode.SelectSingleNode("paymentAmount");
     
     if (paymentAmountNode != null)
     {
         if (paymentAmountNode.Attributes["href"] != null || paymentAmountNode.Attributes["id"] != null) 
         {
             if (paymentAmountNode.Attributes["id"] != null) 
             {
                 paymentAmountIDRef_ = paymentAmountNode.Attributes["id"].Value;
                 NonNegativeMoney ob = new NonNegativeMoney(paymentAmountNode);
                 IDManager.SetID(paymentAmountIDRef_, ob);
             }
             else if (paymentAmountNode.Attributes["href"] != null)
             {
                 paymentAmountIDRef_ = paymentAmountNode.Attributes["href"].Value;
             }
             else
             {
                 paymentAmount_ = new NonNegativeMoney(paymentAmountNode);
             }
         }
         else
         {
             paymentAmount_ = new NonNegativeMoney(paymentAmountNode);
         }
     }
     
 
     XmlNode paymentDateNode = xmlNode.SelectSingleNode("paymentDate");
     
     if (paymentDateNode != null)
     {
         if (paymentDateNode.Attributes["href"] != null || paymentDateNode.Attributes["id"] != null) 
         {
             if (paymentDateNode.Attributes["id"] != null) 
             {
                 paymentDateIDRef_ = paymentDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(paymentDateNode);
                 IDManager.SetID(paymentDateIDRef_, ob);
             }
             else if (paymentDateNode.Attributes["href"] != null)
             {
                 paymentDateIDRef_ = paymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 paymentDate_ = new AdjustableDate(paymentDateNode);
             }
         }
         else
         {
             paymentDate_ = new AdjustableDate(paymentDateNode);
         }
     }
     
 
     XmlNode swapPremiumNode = xmlNode.SelectSingleNode("swapPremium");
     
     if (swapPremiumNode != null)
     {
         if (swapPremiumNode.Attributes["href"] != null || swapPremiumNode.Attributes["id"] != null) 
         {
             if (swapPremiumNode.Attributes["id"] != null) 
             {
                 swapPremiumIDRef_ = swapPremiumNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(swapPremiumNode);
                 IDManager.SetID(swapPremiumIDRef_, ob);
             }
             else if (swapPremiumNode.Attributes["href"] != null)
             {
                 swapPremiumIDRef_ = swapPremiumNode.Attributes["href"].Value;
             }
             else
             {
                 swapPremium_ = new XsdTypeBoolean(swapPremiumNode);
             }
         }
         else
         {
             swapPremium_ = new XsdTypeBoolean(swapPremiumNode);
         }
     }
     
 
     XmlNode pricePerOptionNode = xmlNode.SelectSingleNode("pricePerOption");
     
     if (pricePerOptionNode != null)
     {
         if (pricePerOptionNode.Attributes["href"] != null || pricePerOptionNode.Attributes["id"] != null) 
         {
             if (pricePerOptionNode.Attributes["id"] != null) 
             {
                 pricePerOptionIDRef_ = pricePerOptionNode.Attributes["id"].Value;
                 NonNegativeMoney ob = new NonNegativeMoney(pricePerOptionNode);
                 IDManager.SetID(pricePerOptionIDRef_, ob);
             }
             else if (pricePerOptionNode.Attributes["href"] != null)
             {
                 pricePerOptionIDRef_ = pricePerOptionNode.Attributes["href"].Value;
             }
             else
             {
                 pricePerOption_ = new NonNegativeMoney(pricePerOptionNode);
             }
         }
         else
         {
             pricePerOption_ = new NonNegativeMoney(pricePerOptionNode);
         }
     }
     
 
     XmlNode percentageOfNotionalNode = xmlNode.SelectSingleNode("percentageOfNotional");
     
     if (percentageOfNotionalNode != null)
     {
         if (percentageOfNotionalNode.Attributes["href"] != null || percentageOfNotionalNode.Attributes["id"] != null) 
         {
             if (percentageOfNotionalNode.Attributes["id"] != null) 
             {
                 percentageOfNotionalIDRef_ = percentageOfNotionalNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(percentageOfNotionalNode);
                 IDManager.SetID(percentageOfNotionalIDRef_, ob);
             }
             else if (percentageOfNotionalNode.Attributes["href"] != null)
             {
                 percentageOfNotionalIDRef_ = percentageOfNotionalNode.Attributes["href"].Value;
             }
             else
             {
                 percentageOfNotional_ = new NonNegativeDecimal(percentageOfNotionalNode);
             }
         }
         else
         {
             percentageOfNotional_ = new NonNegativeDecimal(percentageOfNotionalNode);
         }
     }
     
 
 }
Exemple #40
0
        public FeaturePayment(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList payerPartyReferenceNodeList = xmlNode.SelectNodes("payerPartyReference");

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

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


            XmlNodeList payerAccountReferenceNodeList = xmlNode.SelectNodes("payerAccountReference");

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

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


            XmlNodeList receiverPartyReferenceNodeList = xmlNode.SelectNodes("receiverPartyReference");

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

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


            XmlNodeList receiverAccountReferenceNodeList = xmlNode.SelectNodes("receiverAccountReference");

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

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


            XmlNodeList levelPercentageNodeList = xmlNode.SelectNodes("levelPercentage");

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

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


            XmlNodeList amountNodeList = xmlNode.SelectNodes("amount");

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

            foreach (XmlNode item in amountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        amountIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(amountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        amountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        amount = new NonNegativeDecimal(item);
                    }
                }
            }


            XmlNodeList timeNodeList = xmlNode.SelectNodes("time");

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

            foreach (XmlNode item in timeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        timeIDRef = item.Attributes["id"].Name;
                        TimeTypeEnum ob = TimeTypeEnum();
                        IDManager.SetID(timeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        timeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        time = new TimeTypeEnum(item);
                    }
                }
            }


            XmlNodeList currencyNodeList = xmlNode.SelectNodes("currency");

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

            foreach (XmlNode item in currencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        currencyIDRef = item.Attributes["id"].Name;
                        Currency ob = Currency();
                        IDManager.SetID(currencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        currencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        currency = new Currency(item);
                    }
                }
            }


            XmlNodeList featurePaymentDateNodeList = xmlNode.SelectNodes("featurePaymentDate");

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

            foreach (XmlNode item in featurePaymentDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        featurePaymentDateIDRef = item.Attributes["id"].Name;
                        AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                        IDManager.SetID(featurePaymentDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        featurePaymentDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        featurePaymentDate = new AdjustableOrRelativeDate(item);
                    }
                }
            }
        }
 public MultipleExercise(XmlNode xmlNode)
 {
     XmlNodeList notionalReferenceNodeList = xmlNode.SelectNodes("notionalReference");
     
     if (notionalReferenceNodeList != null)
     {
         this.notionalReference_ = new List<NotionalReference>();
         foreach (XmlNode item in notionalReferenceNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     notionalReferenceIDRef_ = item.Attributes["id"].Value;
                     notionalReference_.Add(new NotionalReference(item));
                     IDManager.SetID(notionalReferenceIDRef_, notionalReference_[notionalReference_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     notionalReferenceIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 notionalReference_.Add(new NotionalReference(item));
                 }
             }
             else
             {
                 notionalReference_.Add(new NotionalReference(item));
             }
         }
     }
     
 
     XmlNode integralMultipleAmountNode = xmlNode.SelectSingleNode("integralMultipleAmount");
     
     if (integralMultipleAmountNode != null)
     {
         if (integralMultipleAmountNode.Attributes["href"] != null || integralMultipleAmountNode.Attributes["id"] != null) 
         {
             if (integralMultipleAmountNode.Attributes["id"] != null) 
             {
                 integralMultipleAmountIDRef_ = integralMultipleAmountNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(integralMultipleAmountNode);
                 IDManager.SetID(integralMultipleAmountIDRef_, ob);
             }
             else if (integralMultipleAmountNode.Attributes["href"] != null)
             {
                 integralMultipleAmountIDRef_ = integralMultipleAmountNode.Attributes["href"].Value;
             }
             else
             {
                 integralMultipleAmount_ = new XsdTypeDecimal(integralMultipleAmountNode);
             }
         }
         else
         {
             integralMultipleAmount_ = new XsdTypeDecimal(integralMultipleAmountNode);
         }
     }
     
 
     XmlNode minimumNotionalAmountNode = xmlNode.SelectSingleNode("minimumNotionalAmount");
     
     if (minimumNotionalAmountNode != null)
     {
         if (minimumNotionalAmountNode.Attributes["href"] != null || minimumNotionalAmountNode.Attributes["id"] != null) 
         {
             if (minimumNotionalAmountNode.Attributes["id"] != null) 
             {
                 minimumNotionalAmountIDRef_ = minimumNotionalAmountNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(minimumNotionalAmountNode);
                 IDManager.SetID(minimumNotionalAmountIDRef_, ob);
             }
             else if (minimumNotionalAmountNode.Attributes["href"] != null)
             {
                 minimumNotionalAmountIDRef_ = minimumNotionalAmountNode.Attributes["href"].Value;
             }
             else
             {
                 minimumNotionalAmount_ = new XsdTypeDecimal(minimumNotionalAmountNode);
             }
         }
         else
         {
             minimumNotionalAmount_ = new XsdTypeDecimal(minimumNotionalAmountNode);
         }
     }
     
 
     XmlNode minimumNumberOfOptionsNode = xmlNode.SelectSingleNode("minimumNumberOfOptions");
     
     if (minimumNumberOfOptionsNode != null)
     {
         if (minimumNumberOfOptionsNode.Attributes["href"] != null || minimumNumberOfOptionsNode.Attributes["id"] != null) 
         {
             if (minimumNumberOfOptionsNode.Attributes["id"] != null) 
             {
                 minimumNumberOfOptionsIDRef_ = minimumNumberOfOptionsNode.Attributes["id"].Value;
                 XsdTypeNonNegativeInteger ob = new XsdTypeNonNegativeInteger(minimumNumberOfOptionsNode);
                 IDManager.SetID(minimumNumberOfOptionsIDRef_, ob);
             }
             else if (minimumNumberOfOptionsNode.Attributes["href"] != null)
             {
                 minimumNumberOfOptionsIDRef_ = minimumNumberOfOptionsNode.Attributes["href"].Value;
             }
             else
             {
                 minimumNumberOfOptions_ = new XsdTypeNonNegativeInteger(minimumNumberOfOptionsNode);
             }
         }
         else
         {
             minimumNumberOfOptions_ = new XsdTypeNonNegativeInteger(minimumNumberOfOptionsNode);
         }
     }
     
 
     XmlNode maximumNotionalAmountNode = xmlNode.SelectSingleNode("maximumNotionalAmount");
     
     if (maximumNotionalAmountNode != null)
     {
         if (maximumNotionalAmountNode.Attributes["href"] != null || maximumNotionalAmountNode.Attributes["id"] != null) 
         {
             if (maximumNotionalAmountNode.Attributes["id"] != null) 
             {
                 maximumNotionalAmountIDRef_ = maximumNotionalAmountNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(maximumNotionalAmountNode);
                 IDManager.SetID(maximumNotionalAmountIDRef_, ob);
             }
             else if (maximumNotionalAmountNode.Attributes["href"] != null)
             {
                 maximumNotionalAmountIDRef_ = maximumNotionalAmountNode.Attributes["href"].Value;
             }
             else
             {
                 maximumNotionalAmount_ = new XsdTypeDecimal(maximumNotionalAmountNode);
             }
         }
         else
         {
             maximumNotionalAmount_ = new XsdTypeDecimal(maximumNotionalAmountNode);
         }
     }
     
 
     XmlNode maximumNumberOfOptionsNode = xmlNode.SelectSingleNode("maximumNumberOfOptions");
     
     if (maximumNumberOfOptionsNode != null)
     {
         if (maximumNumberOfOptionsNode.Attributes["href"] != null || maximumNumberOfOptionsNode.Attributes["id"] != null) 
         {
             if (maximumNumberOfOptionsNode.Attributes["id"] != null) 
             {
                 maximumNumberOfOptionsIDRef_ = maximumNumberOfOptionsNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(maximumNumberOfOptionsNode);
                 IDManager.SetID(maximumNumberOfOptionsIDRef_, ob);
             }
             else if (maximumNumberOfOptionsNode.Attributes["href"] != null)
             {
                 maximumNumberOfOptionsIDRef_ = maximumNumberOfOptionsNode.Attributes["href"].Value;
             }
             else
             {
                 maximumNumberOfOptions_ = new NonNegativeDecimal(maximumNumberOfOptionsNode);
             }
         }
         else
         {
             maximumNumberOfOptions_ = new NonNegativeDecimal(maximumNumberOfOptionsNode);
         }
     }
     
 
 }
Exemple #42
0
        public DividendConditions(XmlNode xmlNode)
        {
            XmlNodeList dividendReinvestmentNodeList = xmlNode.SelectNodes("dividendReinvestment");

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

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


            XmlNodeList dividendEntitlementNodeList = xmlNode.SelectNodes("dividendEntitlement");

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

            foreach (XmlNode item in dividendEntitlementNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dividendEntitlementIDRef = item.Attributes["id"].Name;
                        DividendEntitlementEnum ob = DividendEntitlementEnum();
                        IDManager.SetID(dividendEntitlementIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dividendEntitlementIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dividendEntitlement = new DividendEntitlementEnum(item);
                    }
                }
            }


            XmlNodeList dividendAmountNodeList = xmlNode.SelectNodes("dividendAmount");

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

            foreach (XmlNode item in dividendAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dividendAmountIDRef = item.Attributes["id"].Name;
                        DividendAmountTypeEnum ob = DividendAmountTypeEnum();
                        IDManager.SetID(dividendAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dividendAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dividendAmount = new DividendAmountTypeEnum(item);
                    }
                }
            }


            XmlNodeList dividendPaymentDateNodeList = xmlNode.SelectNodes("dividendPaymentDate");

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

            foreach (XmlNode item in dividendPaymentDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dividendPaymentDateIDRef = item.Attributes["id"].Name;
                        DividendPaymentDate ob = DividendPaymentDate();
                        IDManager.SetID(dividendPaymentDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dividendPaymentDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dividendPaymentDate = new DividendPaymentDate(item);
                    }
                }
            }


            XmlNodeList dividendPeriodEffectiveDateNodeList = xmlNode.SelectNodes("dividendPeriodEffectiveDate");

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

            foreach (XmlNode item in dividendPeriodEffectiveDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dividendPeriodEffectiveDateIDRef = item.Attributes["id"].Name;
                        DateReference ob = DateReference();
                        IDManager.SetID(dividendPeriodEffectiveDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dividendPeriodEffectiveDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dividendPeriodEffectiveDate = new DateReference(item);
                    }
                }
            }


            XmlNodeList dividendPeriodEndDateNodeList = xmlNode.SelectNodes("dividendPeriodEndDate");

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

            foreach (XmlNode item in dividendPeriodEndDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dividendPeriodEndDateIDRef = item.Attributes["id"].Name;
                        DateReference ob = DateReference();
                        IDManager.SetID(dividendPeriodEndDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dividendPeriodEndDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dividendPeriodEndDate = new DateReference(item);
                    }
                }
            }


            XmlNodeList dividendPeriodNodeList = xmlNode.SelectNodes("dividendPeriod");

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

            foreach (XmlNode item in dividendPeriodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dividendPeriodIDRef = item.Attributes["id"].Name;
                        DividendPeriodEnum ob = DividendPeriodEnum();
                        IDManager.SetID(dividendPeriodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dividendPeriodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dividendPeriod = new DividendPeriodEnum(item);
                    }
                }
            }


            XmlNodeList extraOrdinaryDividendsNodeList = xmlNode.SelectNodes("extraOrdinaryDividends");

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

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


            XmlNodeList excessDividendAmountNodeList = xmlNode.SelectNodes("excessDividendAmount");

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

            foreach (XmlNode item in excessDividendAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        excessDividendAmountIDRef = item.Attributes["id"].Name;
                        DividendAmountTypeEnum ob = DividendAmountTypeEnum();
                        IDManager.SetID(excessDividendAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        excessDividendAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        excessDividendAmount = new DividendAmountTypeEnum(item);
                    }
                }
            }


            XmlNodeList currencyNodeList = xmlNode.SelectNodes("currency");

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

            foreach (XmlNode item in currencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        currencyIDRef = item.Attributes["id"].Name;
                        IdentifiedCurrency ob = IdentifiedCurrency();
                        IDManager.SetID(currencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        currencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        currency = new IdentifiedCurrency(item);
                    }
                }
            }


            XmlNodeList determinationMethodNodeList = xmlNode.SelectNodes("determinationMethod");

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

            foreach (XmlNode item in determinationMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        determinationMethodIDRef = item.Attributes["id"].Name;
                        DeterminationMethod ob = DeterminationMethod();
                        IDManager.SetID(determinationMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        determinationMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        determinationMethod = new DeterminationMethod(item);
                    }
                }
            }


            XmlNodeList currencyReferenceNodeList = xmlNode.SelectNodes("currencyReference");

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

            foreach (XmlNode item in currencyReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        currencyReferenceIDRef = item.Attributes["id"].Name;
                        IdentifiedCurrencyReference ob = IdentifiedCurrencyReference();
                        IDManager.SetID(currencyReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        currencyReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        currencyReference = new IdentifiedCurrencyReference(item);
                    }
                }
            }


            XmlNodeList dividendFxTriggerDateNodeList = xmlNode.SelectNodes("dividendFxTriggerDate");

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

            foreach (XmlNode item in dividendFxTriggerDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dividendFxTriggerDateIDRef = item.Attributes["id"].Name;
                        DividendPaymentDate ob = DividendPaymentDate();
                        IDManager.SetID(dividendFxTriggerDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dividendFxTriggerDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dividendFxTriggerDate = new DividendPaymentDate(item);
                    }
                }
            }


            XmlNodeList interestAccrualsMethodNodeList = xmlNode.SelectNodes("interestAccrualsMethod");

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

            foreach (XmlNode item in interestAccrualsMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        interestAccrualsMethodIDRef = item.Attributes["id"].Name;
                        InterestAccrualsCompoundingMethod ob = InterestAccrualsCompoundingMethod();
                        IDManager.SetID(interestAccrualsMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        interestAccrualsMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        interestAccrualsMethod = new InterestAccrualsCompoundingMethod(item);
                    }
                }
            }


            XmlNodeList numberOfIndexUnitsNodeList = xmlNode.SelectNodes("numberOfIndexUnits");

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

            foreach (XmlNode item in numberOfIndexUnitsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        numberOfIndexUnitsIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(numberOfIndexUnitsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        numberOfIndexUnitsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        numberOfIndexUnits = new NonNegativeDecimal(item);
                    }
                }
            }


            XmlNodeList declaredCashDividendPercentageNodeList = xmlNode.SelectNodes("declaredCashDividendPercentage");

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

            foreach (XmlNode item in declaredCashDividendPercentageNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        declaredCashDividendPercentageIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(declaredCashDividendPercentageIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        declaredCashDividendPercentageIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        declaredCashDividendPercentage = new NonNegativeDecimal(item);
                    }
                }
            }


            XmlNodeList declaredCashEquivalentDividendPercentageNodeList = xmlNode.SelectNodes("declaredCashEquivalentDividendPercentage");

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

            foreach (XmlNode item in declaredCashEquivalentDividendPercentageNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        declaredCashEquivalentDividendPercentageIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(declaredCashEquivalentDividendPercentageIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        declaredCashEquivalentDividendPercentageIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        declaredCashEquivalentDividendPercentage = new NonNegativeDecimal(item);
                    }
                }
            }


            XmlNodeList nonCashDividendTreatmentNodeList = xmlNode.SelectNodes("nonCashDividendTreatment");

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

            foreach (XmlNode item in nonCashDividendTreatmentNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        nonCashDividendTreatmentIDRef = item.Attributes["id"].Name;
                        NonCashDividendTreatmentEnum ob = NonCashDividendTreatmentEnum();
                        IDManager.SetID(nonCashDividendTreatmentIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        nonCashDividendTreatmentIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        nonCashDividendTreatment = new NonCashDividendTreatmentEnum(item);
                    }
                }
            }


            XmlNodeList dividendCompositionNodeList = xmlNode.SelectNodes("dividendComposition");

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

            foreach (XmlNode item in dividendCompositionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dividendCompositionIDRef = item.Attributes["id"].Name;
                        DividendCompositionEnum ob = DividendCompositionEnum();
                        IDManager.SetID(dividendCompositionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dividendCompositionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dividendComposition = new DividendCompositionEnum(item);
                    }
                }
            }


            XmlNodeList specialDividendsNodeList = xmlNode.SelectNodes("specialDividends");

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

            foreach (XmlNode item in specialDividendsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        specialDividendsIDRef = item.Attributes["id"].Name;
                        XsdTypeBoolean ob = XsdTypeBoolean();
                        IDManager.SetID(specialDividendsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        specialDividendsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        specialDividends = new XsdTypeBoolean(item);
                    }
                }
            }
        }
 public FxAverageRateObservation(XmlNode xmlNode)
 {
     XmlNode dateNode = xmlNode.SelectSingleNode("date");
     
     if (dateNode != null)
     {
         if (dateNode.Attributes["href"] != null || dateNode.Attributes["id"] != null) 
         {
             if (dateNode.Attributes["id"] != null) 
             {
                 dateIDRef_ = dateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(dateNode);
                 IDManager.SetID(dateIDRef_, ob);
             }
             else if (dateNode.Attributes["href"] != null)
             {
                 dateIDRef_ = dateNode.Attributes["href"].Value;
             }
             else
             {
                 date_ = new XsdTypeDate(dateNode);
             }
         }
         else
         {
             date_ = new XsdTypeDate(dateNode);
         }
     }
     
 
     XmlNode averageRateWeightingFactorNode = xmlNode.SelectSingleNode("averageRateWeightingFactor");
     
     if (averageRateWeightingFactorNode != null)
     {
         if (averageRateWeightingFactorNode.Attributes["href"] != null || averageRateWeightingFactorNode.Attributes["id"] != null) 
         {
             if (averageRateWeightingFactorNode.Attributes["id"] != null) 
             {
                 averageRateWeightingFactorIDRef_ = averageRateWeightingFactorNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(averageRateWeightingFactorNode);
                 IDManager.SetID(averageRateWeightingFactorIDRef_, ob);
             }
             else if (averageRateWeightingFactorNode.Attributes["href"] != null)
             {
                 averageRateWeightingFactorIDRef_ = averageRateWeightingFactorNode.Attributes["href"].Value;
             }
             else
             {
                 averageRateWeightingFactor_ = new XsdTypeDecimal(averageRateWeightingFactorNode);
             }
         }
         else
         {
             averageRateWeightingFactor_ = new XsdTypeDecimal(averageRateWeightingFactorNode);
         }
     }
     
 
     XmlNode rateNode = xmlNode.SelectSingleNode("rate");
     
     if (rateNode != null)
     {
         if (rateNode.Attributes["href"] != null || rateNode.Attributes["id"] != null) 
         {
             if (rateNode.Attributes["id"] != null) 
             {
                 rateIDRef_ = rateNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(rateNode);
                 IDManager.SetID(rateIDRef_, ob);
             }
             else if (rateNode.Attributes["href"] != null)
             {
                 rateIDRef_ = rateNode.Attributes["href"].Value;
             }
             else
             {
                 rate_ = new NonNegativeDecimal(rateNode);
             }
         }
         else
         {
             rate_ = new NonNegativeDecimal(rateNode);
         }
     }
     
 
 }
        public NonNegativeSchedule(XmlNode xmlNode)
        {
            XmlNode initialValueNode = xmlNode.SelectSingleNode("initialValue");

            if (initialValueNode != null)
            {
                if (initialValueNode.Attributes["href"] != null || initialValueNode.Attributes["id"] != null)
                {
                    if (initialValueNode.Attributes["id"] != null)
                    {
                        initialValueIDRef_ = initialValueNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(initialValueNode);
                        IDManager.SetID(initialValueIDRef_, ob);
                    }
                    else if (initialValueNode.Attributes["href"] != null)
                    {
                        initialValueIDRef_ = initialValueNode.Attributes["href"].Value;
                    }
                    else
                    {
                        initialValue_ = new NonNegativeDecimal(initialValueNode);
                    }
                }
                else
                {
                    initialValue_ = new NonNegativeDecimal(initialValueNode);
                }
            }


            XmlNodeList stepNodeList = xmlNode.SelectNodes("step");

            if (stepNodeList != null)
            {
                this.step_ = new List <NonNegativeStep>();
                foreach (XmlNode item in stepNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            stepIDRef_ = item.Attributes["id"].Value;
                            step_.Add(new NonNegativeStep(item));
                            IDManager.SetID(stepIDRef_, step_[step_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            stepIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            step_.Add(new NonNegativeStep(item));
                        }
                    }
                    else
                    {
                        step_.Add(new NonNegativeStep(item));
                    }
                }
            }
        }
 public FeaturePayment(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode payerPartyReferenceNode = xmlNode.SelectSingleNode("payerPartyReference");
     
     if (payerPartyReferenceNode != null)
     {
         if (payerPartyReferenceNode.Attributes["href"] != null || payerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (payerPartyReferenceNode.Attributes["id"] != null) 
             {
                 payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(payerPartyReferenceNode);
                 IDManager.SetID(payerPartyReferenceIDRef_, ob);
             }
             else if (payerPartyReferenceNode.Attributes["href"] != null)
             {
                 payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
             }
         }
         else
         {
             payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
         }
     }
     
 
     XmlNode payerAccountReferenceNode = xmlNode.SelectSingleNode("payerAccountReference");
     
     if (payerAccountReferenceNode != null)
     {
         if (payerAccountReferenceNode.Attributes["href"] != null || payerAccountReferenceNode.Attributes["id"] != null) 
         {
             if (payerAccountReferenceNode.Attributes["id"] != null) 
             {
                 payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(payerAccountReferenceNode);
                 IDManager.SetID(payerAccountReferenceIDRef_, ob);
             }
             else if (payerAccountReferenceNode.Attributes["href"] != null)
             {
                 payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
             }
         }
         else
         {
             payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
         }
     }
     
 
     XmlNode receiverPartyReferenceNode = xmlNode.SelectSingleNode("receiverPartyReference");
     
     if (receiverPartyReferenceNode != null)
     {
         if (receiverPartyReferenceNode.Attributes["href"] != null || receiverPartyReferenceNode.Attributes["id"] != null) 
         {
             if (receiverPartyReferenceNode.Attributes["id"] != null) 
             {
                 receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(receiverPartyReferenceNode);
                 IDManager.SetID(receiverPartyReferenceIDRef_, ob);
             }
             else if (receiverPartyReferenceNode.Attributes["href"] != null)
             {
                 receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
             }
         }
         else
         {
             receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
         }
     }
     
 
     XmlNode receiverAccountReferenceNode = xmlNode.SelectSingleNode("receiverAccountReference");
     
     if (receiverAccountReferenceNode != null)
     {
         if (receiverAccountReferenceNode.Attributes["href"] != null || receiverAccountReferenceNode.Attributes["id"] != null) 
         {
             if (receiverAccountReferenceNode.Attributes["id"] != null) 
             {
                 receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(receiverAccountReferenceNode);
                 IDManager.SetID(receiverAccountReferenceIDRef_, ob);
             }
             else if (receiverAccountReferenceNode.Attributes["href"] != null)
             {
                 receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
             }
         }
         else
         {
             receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
         }
     }
     
 
     XmlNode levelPercentageNode = xmlNode.SelectSingleNode("levelPercentage");
     
     if (levelPercentageNode != null)
     {
         if (levelPercentageNode.Attributes["href"] != null || levelPercentageNode.Attributes["id"] != null) 
         {
             if (levelPercentageNode.Attributes["id"] != null) 
             {
                 levelPercentageIDRef_ = levelPercentageNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(levelPercentageNode);
                 IDManager.SetID(levelPercentageIDRef_, ob);
             }
             else if (levelPercentageNode.Attributes["href"] != null)
             {
                 levelPercentageIDRef_ = levelPercentageNode.Attributes["href"].Value;
             }
             else
             {
                 levelPercentage_ = new XsdTypeDecimal(levelPercentageNode);
             }
         }
         else
         {
             levelPercentage_ = new XsdTypeDecimal(levelPercentageNode);
         }
     }
     
 
     XmlNode amountNode = xmlNode.SelectSingleNode("amount");
     
     if (amountNode != null)
     {
         if (amountNode.Attributes["href"] != null || amountNode.Attributes["id"] != null) 
         {
             if (amountNode.Attributes["id"] != null) 
             {
                 amountIDRef_ = amountNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(amountNode);
                 IDManager.SetID(amountIDRef_, ob);
             }
             else if (amountNode.Attributes["href"] != null)
             {
                 amountIDRef_ = amountNode.Attributes["href"].Value;
             }
             else
             {
                 amount_ = new NonNegativeDecimal(amountNode);
             }
         }
         else
         {
             amount_ = new NonNegativeDecimal(amountNode);
         }
     }
     
 
     XmlNode timeNode = xmlNode.SelectSingleNode("time");
     
     if (timeNode != null)
     {
         if (timeNode.Attributes["href"] != null || timeNode.Attributes["id"] != null) 
         {
             if (timeNode.Attributes["id"] != null) 
             {
                 timeIDRef_ = timeNode.Attributes["id"].Value;
                 TimeTypeEnum ob = new TimeTypeEnum(timeNode);
                 IDManager.SetID(timeIDRef_, ob);
             }
             else if (timeNode.Attributes["href"] != null)
             {
                 timeIDRef_ = timeNode.Attributes["href"].Value;
             }
             else
             {
                 time_ = new TimeTypeEnum(timeNode);
             }
         }
         else
         {
             time_ = new TimeTypeEnum(timeNode);
         }
     }
     
 
     XmlNode currencyNode = xmlNode.SelectSingleNode("currency");
     
     if (currencyNode != null)
     {
         if (currencyNode.Attributes["href"] != null || currencyNode.Attributes["id"] != null) 
         {
             if (currencyNode.Attributes["id"] != null) 
             {
                 currencyIDRef_ = currencyNode.Attributes["id"].Value;
                 Currency ob = new Currency(currencyNode);
                 IDManager.SetID(currencyIDRef_, ob);
             }
             else if (currencyNode.Attributes["href"] != null)
             {
                 currencyIDRef_ = currencyNode.Attributes["href"].Value;
             }
             else
             {
                 currency_ = new Currency(currencyNode);
             }
         }
         else
         {
             currency_ = new Currency(currencyNode);
         }
     }
     
 
     XmlNode featurePaymentDateNode = xmlNode.SelectSingleNode("featurePaymentDate");
     
     if (featurePaymentDateNode != null)
     {
         if (featurePaymentDateNode.Attributes["href"] != null || featurePaymentDateNode.Attributes["id"] != null) 
         {
             if (featurePaymentDateNode.Attributes["id"] != null) 
             {
                 featurePaymentDateIDRef_ = featurePaymentDateNode.Attributes["id"].Value;
                 AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(featurePaymentDateNode);
                 IDManager.SetID(featurePaymentDateIDRef_, ob);
             }
             else if (featurePaymentDateNode.Attributes["href"] != null)
             {
                 featurePaymentDateIDRef_ = featurePaymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 featurePaymentDate_ = new AdjustableOrRelativeDate(featurePaymentDateNode);
             }
         }
         else
         {
             featurePaymentDate_ = new AdjustableOrRelativeDate(featurePaymentDateNode);
         }
     }
     
 
 }
 public DividendLeg(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode declaredCashDividendPercentageNode = xmlNode.SelectSingleNode("declaredCashDividendPercentage");
     
     if (declaredCashDividendPercentageNode != null)
     {
         if (declaredCashDividendPercentageNode.Attributes["href"] != null || declaredCashDividendPercentageNode.Attributes["id"] != null) 
         {
             if (declaredCashDividendPercentageNode.Attributes["id"] != null) 
             {
                 declaredCashDividendPercentageIDRef_ = declaredCashDividendPercentageNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(declaredCashDividendPercentageNode);
                 IDManager.SetID(declaredCashDividendPercentageIDRef_, ob);
             }
             else if (declaredCashDividendPercentageNode.Attributes["href"] != null)
             {
                 declaredCashDividendPercentageIDRef_ = declaredCashDividendPercentageNode.Attributes["href"].Value;
             }
             else
             {
                 declaredCashDividendPercentage_ = new NonNegativeDecimal(declaredCashDividendPercentageNode);
             }
         }
         else
         {
             declaredCashDividendPercentage_ = new NonNegativeDecimal(declaredCashDividendPercentageNode);
         }
     }
     
 
     XmlNode declaredCashEquivalentDividendPercentageNode = xmlNode.SelectSingleNode("declaredCashEquivalentDividendPercentage");
     
     if (declaredCashEquivalentDividendPercentageNode != null)
     {
         if (declaredCashEquivalentDividendPercentageNode.Attributes["href"] != null || declaredCashEquivalentDividendPercentageNode.Attributes["id"] != null) 
         {
             if (declaredCashEquivalentDividendPercentageNode.Attributes["id"] != null) 
             {
                 declaredCashEquivalentDividendPercentageIDRef_ = declaredCashEquivalentDividendPercentageNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(declaredCashEquivalentDividendPercentageNode);
                 IDManager.SetID(declaredCashEquivalentDividendPercentageIDRef_, ob);
             }
             else if (declaredCashEquivalentDividendPercentageNode.Attributes["href"] != null)
             {
                 declaredCashEquivalentDividendPercentageIDRef_ = declaredCashEquivalentDividendPercentageNode.Attributes["href"].Value;
             }
             else
             {
                 declaredCashEquivalentDividendPercentage_ = new NonNegativeDecimal(declaredCashEquivalentDividendPercentageNode);
             }
         }
         else
         {
             declaredCashEquivalentDividendPercentage_ = new NonNegativeDecimal(declaredCashEquivalentDividendPercentageNode);
         }
     }
     
 
     XmlNodeList dividendPeriodNodeList = xmlNode.SelectNodes("dividendPeriod");
     
     if (dividendPeriodNodeList != null)
     {
         this.dividendPeriod_ = new List<DividendPeriodPayment>();
         foreach (XmlNode item in dividendPeriodNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     dividendPeriodIDRef_ = item.Attributes["id"].Value;
                     dividendPeriod_.Add(new DividendPeriodPayment(item));
                     IDManager.SetID(dividendPeriodIDRef_, dividendPeriod_[dividendPeriod_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     dividendPeriodIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 dividendPeriod_.Add(new DividendPeriodPayment(item));
                 }
             }
             else
             {
                 dividendPeriod_.Add(new DividendPeriodPayment(item));
             }
         }
     }
     
 
     XmlNode specialDividendsNode = xmlNode.SelectSingleNode("specialDividends");
     
     if (specialDividendsNode != null)
     {
         if (specialDividendsNode.Attributes["href"] != null || specialDividendsNode.Attributes["id"] != null) 
         {
             if (specialDividendsNode.Attributes["id"] != null) 
             {
                 specialDividendsIDRef_ = specialDividendsNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(specialDividendsNode);
                 IDManager.SetID(specialDividendsIDRef_, ob);
             }
             else if (specialDividendsNode.Attributes["href"] != null)
             {
                 specialDividendsIDRef_ = specialDividendsNode.Attributes["href"].Value;
             }
             else
             {
                 specialDividends_ = new XsdTypeBoolean(specialDividendsNode);
             }
         }
         else
         {
             specialDividends_ = new XsdTypeBoolean(specialDividendsNode);
         }
     }
     
 
     XmlNode materialDividendNode = xmlNode.SelectSingleNode("materialDividend");
     
     if (materialDividendNode != null)
     {
         if (materialDividendNode.Attributes["href"] != null || materialDividendNode.Attributes["id"] != null) 
         {
             if (materialDividendNode.Attributes["id"] != null) 
             {
                 materialDividendIDRef_ = materialDividendNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(materialDividendNode);
                 IDManager.SetID(materialDividendIDRef_, ob);
             }
             else if (materialDividendNode.Attributes["href"] != null)
             {
                 materialDividendIDRef_ = materialDividendNode.Attributes["href"].Value;
             }
             else
             {
                 materialDividend_ = new XsdTypeBoolean(materialDividendNode);
             }
         }
         else
         {
             materialDividend_ = new XsdTypeBoolean(materialDividendNode);
         }
     }
     
 
 }
 public BoundedVariance(XmlNode xmlNode)
 {
     XmlNode realisedVarianceMethodNode = xmlNode.SelectSingleNode("realisedVarianceMethod");
     
     if (realisedVarianceMethodNode != null)
     {
         if (realisedVarianceMethodNode.Attributes["href"] != null || realisedVarianceMethodNode.Attributes["id"] != null) 
         {
             if (realisedVarianceMethodNode.Attributes["id"] != null) 
             {
                 realisedVarianceMethodIDRef_ = realisedVarianceMethodNode.Attributes["id"].Value;
                 RealisedVarianceMethodEnum ob = new RealisedVarianceMethodEnum(realisedVarianceMethodNode);
                 IDManager.SetID(realisedVarianceMethodIDRef_, ob);
             }
             else if (realisedVarianceMethodNode.Attributes["href"] != null)
             {
                 realisedVarianceMethodIDRef_ = realisedVarianceMethodNode.Attributes["href"].Value;
             }
             else
             {
                 realisedVarianceMethod_ = new RealisedVarianceMethodEnum(realisedVarianceMethodNode);
             }
         }
         else
         {
             realisedVarianceMethod_ = new RealisedVarianceMethodEnum(realisedVarianceMethodNode);
         }
     }
     
 
     XmlNode daysInRangeAdjustmentNode = xmlNode.SelectSingleNode("daysInRangeAdjustment");
     
     if (daysInRangeAdjustmentNode != null)
     {
         if (daysInRangeAdjustmentNode.Attributes["href"] != null || daysInRangeAdjustmentNode.Attributes["id"] != null) 
         {
             if (daysInRangeAdjustmentNode.Attributes["id"] != null) 
             {
                 daysInRangeAdjustmentIDRef_ = daysInRangeAdjustmentNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(daysInRangeAdjustmentNode);
                 IDManager.SetID(daysInRangeAdjustmentIDRef_, ob);
             }
             else if (daysInRangeAdjustmentNode.Attributes["href"] != null)
             {
                 daysInRangeAdjustmentIDRef_ = daysInRangeAdjustmentNode.Attributes["href"].Value;
             }
             else
             {
                 daysInRangeAdjustment_ = new XsdTypeBoolean(daysInRangeAdjustmentNode);
             }
         }
         else
         {
             daysInRangeAdjustment_ = new XsdTypeBoolean(daysInRangeAdjustmentNode);
         }
     }
     
 
     XmlNode upperBarrierNode = xmlNode.SelectSingleNode("upperBarrier");
     
     if (upperBarrierNode != null)
     {
         if (upperBarrierNode.Attributes["href"] != null || upperBarrierNode.Attributes["id"] != null) 
         {
             if (upperBarrierNode.Attributes["id"] != null) 
             {
                 upperBarrierIDRef_ = upperBarrierNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(upperBarrierNode);
                 IDManager.SetID(upperBarrierIDRef_, ob);
             }
             else if (upperBarrierNode.Attributes["href"] != null)
             {
                 upperBarrierIDRef_ = upperBarrierNode.Attributes["href"].Value;
             }
             else
             {
                 upperBarrier_ = new NonNegativeDecimal(upperBarrierNode);
             }
         }
         else
         {
             upperBarrier_ = new NonNegativeDecimal(upperBarrierNode);
         }
     }
     
 
     XmlNode lowerBarrierNode = xmlNode.SelectSingleNode("lowerBarrier");
     
     if (lowerBarrierNode != null)
     {
         if (lowerBarrierNode.Attributes["href"] != null || lowerBarrierNode.Attributes["id"] != null) 
         {
             if (lowerBarrierNode.Attributes["id"] != null) 
             {
                 lowerBarrierIDRef_ = lowerBarrierNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(lowerBarrierNode);
                 IDManager.SetID(lowerBarrierIDRef_, ob);
             }
             else if (lowerBarrierNode.Attributes["href"] != null)
             {
                 lowerBarrierIDRef_ = lowerBarrierNode.Attributes["href"].Value;
             }
             else
             {
                 lowerBarrier_ = new NonNegativeDecimal(lowerBarrierNode);
             }
         }
         else
         {
             lowerBarrier_ = new NonNegativeDecimal(lowerBarrierNode);
         }
     }
     
 
 }