public CashSettlementTerms(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode valuationDateNode = xmlNode.SelectSingleNode("valuationDate");
     
     if (valuationDateNode != null)
     {
         if (valuationDateNode.Attributes["href"] != null || valuationDateNode.Attributes["id"] != null) 
         {
             if (valuationDateNode.Attributes["id"] != null) 
             {
                 valuationDateIDRef_ = valuationDateNode.Attributes["id"].Value;
                 ValuationDate ob = new ValuationDate(valuationDateNode);
                 IDManager.SetID(valuationDateIDRef_, ob);
             }
             else if (valuationDateNode.Attributes["href"] != null)
             {
                 valuationDateIDRef_ = valuationDateNode.Attributes["href"].Value;
             }
             else
             {
                 valuationDate_ = new ValuationDate(valuationDateNode);
             }
         }
         else
         {
             valuationDate_ = new ValuationDate(valuationDateNode);
         }
     }
     
 
     XmlNode valuationTimeNode = xmlNode.SelectSingleNode("valuationTime");
     
     if (valuationTimeNode != null)
     {
         if (valuationTimeNode.Attributes["href"] != null || valuationTimeNode.Attributes["id"] != null) 
         {
             if (valuationTimeNode.Attributes["id"] != null) 
             {
                 valuationTimeIDRef_ = valuationTimeNode.Attributes["id"].Value;
                 BusinessCenterTime ob = new BusinessCenterTime(valuationTimeNode);
                 IDManager.SetID(valuationTimeIDRef_, ob);
             }
             else if (valuationTimeNode.Attributes["href"] != null)
             {
                 valuationTimeIDRef_ = valuationTimeNode.Attributes["href"].Value;
             }
             else
             {
                 valuationTime_ = new BusinessCenterTime(valuationTimeNode);
             }
         }
         else
         {
             valuationTime_ = new BusinessCenterTime(valuationTimeNode);
         }
     }
     
 
     XmlNode quotationMethodNode = xmlNode.SelectSingleNode("quotationMethod");
     
     if (quotationMethodNode != null)
     {
         if (quotationMethodNode.Attributes["href"] != null || quotationMethodNode.Attributes["id"] != null) 
         {
             if (quotationMethodNode.Attributes["id"] != null) 
             {
                 quotationMethodIDRef_ = quotationMethodNode.Attributes["id"].Value;
                 QuotationRateTypeEnum ob = new QuotationRateTypeEnum(quotationMethodNode);
                 IDManager.SetID(quotationMethodIDRef_, ob);
             }
             else if (quotationMethodNode.Attributes["href"] != null)
             {
                 quotationMethodIDRef_ = quotationMethodNode.Attributes["href"].Value;
             }
             else
             {
                 quotationMethod_ = new QuotationRateTypeEnum(quotationMethodNode);
             }
         }
         else
         {
             quotationMethod_ = new QuotationRateTypeEnum(quotationMethodNode);
         }
     }
     
 
     XmlNode quotationAmountNode = xmlNode.SelectSingleNode("quotationAmount");
     
     if (quotationAmountNode != null)
     {
         if (quotationAmountNode.Attributes["href"] != null || quotationAmountNode.Attributes["id"] != null) 
         {
             if (quotationAmountNode.Attributes["id"] != null) 
             {
                 quotationAmountIDRef_ = quotationAmountNode.Attributes["id"].Value;
                 Money ob = new Money(quotationAmountNode);
                 IDManager.SetID(quotationAmountIDRef_, ob);
             }
             else if (quotationAmountNode.Attributes["href"] != null)
             {
                 quotationAmountIDRef_ = quotationAmountNode.Attributes["href"].Value;
             }
             else
             {
                 quotationAmount_ = new Money(quotationAmountNode);
             }
         }
         else
         {
             quotationAmount_ = new Money(quotationAmountNode);
         }
     }
     
 
     XmlNode minimumQuotationAmountNode = xmlNode.SelectSingleNode("minimumQuotationAmount");
     
     if (minimumQuotationAmountNode != null)
     {
         if (minimumQuotationAmountNode.Attributes["href"] != null || minimumQuotationAmountNode.Attributes["id"] != null) 
         {
             if (minimumQuotationAmountNode.Attributes["id"] != null) 
             {
                 minimumQuotationAmountIDRef_ = minimumQuotationAmountNode.Attributes["id"].Value;
                 Money ob = new Money(minimumQuotationAmountNode);
                 IDManager.SetID(minimumQuotationAmountIDRef_, ob);
             }
             else if (minimumQuotationAmountNode.Attributes["href"] != null)
             {
                 minimumQuotationAmountIDRef_ = minimumQuotationAmountNode.Attributes["href"].Value;
             }
             else
             {
                 minimumQuotationAmount_ = new Money(minimumQuotationAmountNode);
             }
         }
         else
         {
             minimumQuotationAmount_ = new Money(minimumQuotationAmountNode);
         }
     }
     
 
     XmlNodeList dealerNodeList = xmlNode.SelectNodes("dealer");
     
     if (dealerNodeList != null)
     {
         this.dealer_ = new List<XsdTypeString>();
         foreach (XmlNode item in dealerNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     dealerIDRef_ = item.Attributes["id"].Value;
                     dealer_.Add(new XsdTypeString(item));
                     IDManager.SetID(dealerIDRef_, dealer_[dealer_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     dealerIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 dealer_.Add(new XsdTypeString(item));
                 }
             }
             else
             {
                 dealer_.Add(new XsdTypeString(item));
             }
         }
     }
     
 
     XmlNode cashSettlementBusinessDaysNode = xmlNode.SelectSingleNode("cashSettlementBusinessDays");
     
     if (cashSettlementBusinessDaysNode != null)
     {
         if (cashSettlementBusinessDaysNode.Attributes["href"] != null || cashSettlementBusinessDaysNode.Attributes["id"] != null) 
         {
             if (cashSettlementBusinessDaysNode.Attributes["id"] != null) 
             {
                 cashSettlementBusinessDaysIDRef_ = cashSettlementBusinessDaysNode.Attributes["id"].Value;
                 XsdTypeNonNegativeInteger ob = new XsdTypeNonNegativeInteger(cashSettlementBusinessDaysNode);
                 IDManager.SetID(cashSettlementBusinessDaysIDRef_, ob);
             }
             else if (cashSettlementBusinessDaysNode.Attributes["href"] != null)
             {
                 cashSettlementBusinessDaysIDRef_ = cashSettlementBusinessDaysNode.Attributes["href"].Value;
             }
             else
             {
                 cashSettlementBusinessDays_ = new XsdTypeNonNegativeInteger(cashSettlementBusinessDaysNode);
             }
         }
         else
         {
             cashSettlementBusinessDays_ = new XsdTypeNonNegativeInteger(cashSettlementBusinessDaysNode);
         }
     }
     
 
     XmlNode cashSettlementAmountNode = xmlNode.SelectSingleNode("cashSettlementAmount");
     
     if (cashSettlementAmountNode != null)
     {
         if (cashSettlementAmountNode.Attributes["href"] != null || cashSettlementAmountNode.Attributes["id"] != null) 
         {
             if (cashSettlementAmountNode.Attributes["id"] != null) 
             {
                 cashSettlementAmountIDRef_ = cashSettlementAmountNode.Attributes["id"].Value;
                 Money ob = new Money(cashSettlementAmountNode);
                 IDManager.SetID(cashSettlementAmountIDRef_, ob);
             }
             else if (cashSettlementAmountNode.Attributes["href"] != null)
             {
                 cashSettlementAmountIDRef_ = cashSettlementAmountNode.Attributes["href"].Value;
             }
             else
             {
                 cashSettlementAmount_ = new Money(cashSettlementAmountNode);
             }
         }
         else
         {
             cashSettlementAmount_ = new Money(cashSettlementAmountNode);
         }
     }
     
 
     XmlNode recoveryFactorNode = xmlNode.SelectSingleNode("recoveryFactor");
     
     if (recoveryFactorNode != null)
     {
         if (recoveryFactorNode.Attributes["href"] != null || recoveryFactorNode.Attributes["id"] != null) 
         {
             if (recoveryFactorNode.Attributes["id"] != null) 
             {
                 recoveryFactorIDRef_ = recoveryFactorNode.Attributes["id"].Value;
                 RestrictedPercentage ob = new RestrictedPercentage(recoveryFactorNode);
                 IDManager.SetID(recoveryFactorIDRef_, ob);
             }
             else if (recoveryFactorNode.Attributes["href"] != null)
             {
                 recoveryFactorIDRef_ = recoveryFactorNode.Attributes["href"].Value;
             }
             else
             {
                 recoveryFactor_ = new RestrictedPercentage(recoveryFactorNode);
             }
         }
         else
         {
             recoveryFactor_ = new RestrictedPercentage(recoveryFactorNode);
         }
     }
     
 
     XmlNode fixedSettlementNode = xmlNode.SelectSingleNode("fixedSettlement");
     
     if (fixedSettlementNode != null)
     {
         if (fixedSettlementNode.Attributes["href"] != null || fixedSettlementNode.Attributes["id"] != null) 
         {
             if (fixedSettlementNode.Attributes["id"] != null) 
             {
                 fixedSettlementIDRef_ = fixedSettlementNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(fixedSettlementNode);
                 IDManager.SetID(fixedSettlementIDRef_, ob);
             }
             else if (fixedSettlementNode.Attributes["href"] != null)
             {
                 fixedSettlementIDRef_ = fixedSettlementNode.Attributes["href"].Value;
             }
             else
             {
                 fixedSettlement_ = new XsdTypeBoolean(fixedSettlementNode);
             }
         }
         else
         {
             fixedSettlement_ = new XsdTypeBoolean(fixedSettlementNode);
         }
     }
     
 
     XmlNode accruedInterestNode = xmlNode.SelectSingleNode("accruedInterest");
     
     if (accruedInterestNode != null)
     {
         if (accruedInterestNode.Attributes["href"] != null || accruedInterestNode.Attributes["id"] != null) 
         {
             if (accruedInterestNode.Attributes["id"] != null) 
             {
                 accruedInterestIDRef_ = accruedInterestNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(accruedInterestNode);
                 IDManager.SetID(accruedInterestIDRef_, ob);
             }
             else if (accruedInterestNode.Attributes["href"] != null)
             {
                 accruedInterestIDRef_ = accruedInterestNode.Attributes["href"].Value;
             }
             else
             {
                 accruedInterest_ = new XsdTypeBoolean(accruedInterestNode);
             }
         }
         else
         {
             accruedInterest_ = new XsdTypeBoolean(accruedInterestNode);
         }
     }
     
 
     XmlNode valuationMethodNode = xmlNode.SelectSingleNode("valuationMethod");
     
     if (valuationMethodNode != null)
     {
         if (valuationMethodNode.Attributes["href"] != null || valuationMethodNode.Attributes["id"] != null) 
         {
             if (valuationMethodNode.Attributes["id"] != null) 
             {
                 valuationMethodIDRef_ = valuationMethodNode.Attributes["id"].Value;
                 ValuationMethodEnum ob = new ValuationMethodEnum(valuationMethodNode);
                 IDManager.SetID(valuationMethodIDRef_, ob);
             }
             else if (valuationMethodNode.Attributes["href"] != null)
             {
                 valuationMethodIDRef_ = valuationMethodNode.Attributes["href"].Value;
             }
             else
             {
                 valuationMethod_ = new ValuationMethodEnum(valuationMethodNode);
             }
         }
         else
         {
             valuationMethod_ = new ValuationMethodEnum(valuationMethodNode);
         }
     }
     
 
 }
 public SharedAmericanExercise(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList commencementDateNodeList = xmlNode.SelectNodes("commencementDate");
     if (commencementDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commencementDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commencementDateIDRef = item.Attributes["id"].Name;
                 AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                 IDManager.SetID(commencementDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commencementDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commencementDate = new AdjustableOrRelativeDate(item);
             }
         }
     }
     
 
     XmlNodeList expirationDateNodeList = xmlNode.SelectNodes("expirationDate");
     if (expirationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in expirationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 expirationDateIDRef = item.Attributes["id"].Name;
                 AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                 IDManager.SetID(expirationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 expirationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 expirationDate = new AdjustableOrRelativeDate(item);
             }
         }
     }
     
 
     XmlNodeList latestExerciseTimeNodeList = xmlNode.SelectNodes("latestExerciseTime");
     if (latestExerciseTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in latestExerciseTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 latestExerciseTimeIDRef = item.Attributes["id"].Name;
                 BusinessCenterTime ob = BusinessCenterTime();
                 IDManager.SetID(latestExerciseTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 latestExerciseTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 latestExerciseTime = new BusinessCenterTime(item);
             }
         }
     }
     
 
     XmlNodeList latestExerciseTimeDeterminationNodeList = xmlNode.SelectNodes("latestExerciseTimeDetermination");
     if (latestExerciseTimeDeterminationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in latestExerciseTimeDeterminationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 latestExerciseTimeDeterminationIDRef = item.Attributes["id"].Name;
                 DeterminationMethod ob = DeterminationMethod();
                 IDManager.SetID(latestExerciseTimeDeterminationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 latestExerciseTimeDeterminationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 latestExerciseTimeDetermination = new DeterminationMethod(item);
             }
         }
     }
     
 
 }
 public CommodityAmericanExercise(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode exercisePeriodNode = xmlNode.SelectSingleNode("exercisePeriod");
     
     if (exercisePeriodNode != null)
     {
         if (exercisePeriodNode.Attributes["href"] != null || exercisePeriodNode.Attributes["id"] != null) 
         {
             if (exercisePeriodNode.Attributes["id"] != null) 
             {
                 exercisePeriodIDRef_ = exercisePeriodNode.Attributes["id"].Value;
                 CommodityExercisePeriods ob = new CommodityExercisePeriods(exercisePeriodNode);
                 IDManager.SetID(exercisePeriodIDRef_, ob);
             }
             else if (exercisePeriodNode.Attributes["href"] != null)
             {
                 exercisePeriodIDRef_ = exercisePeriodNode.Attributes["href"].Value;
             }
             else
             {
                 exercisePeriod_ = new CommodityExercisePeriods(exercisePeriodNode);
             }
         }
         else
         {
             exercisePeriod_ = new CommodityExercisePeriods(exercisePeriodNode);
         }
     }
     
 
     XmlNode exerciseFrequencyNode = xmlNode.SelectSingleNode("exerciseFrequency");
     
     if (exerciseFrequencyNode != null)
     {
         if (exerciseFrequencyNode.Attributes["href"] != null || exerciseFrequencyNode.Attributes["id"] != null) 
         {
             if (exerciseFrequencyNode.Attributes["id"] != null) 
             {
                 exerciseFrequencyIDRef_ = exerciseFrequencyNode.Attributes["id"].Value;
                 Frequency ob = new Frequency(exerciseFrequencyNode);
                 IDManager.SetID(exerciseFrequencyIDRef_, ob);
             }
             else if (exerciseFrequencyNode.Attributes["href"] != null)
             {
                 exerciseFrequencyIDRef_ = exerciseFrequencyNode.Attributes["href"].Value;
             }
             else
             {
                 exerciseFrequency_ = new Frequency(exerciseFrequencyNode);
             }
         }
         else
         {
             exerciseFrequency_ = new Frequency(exerciseFrequencyNode);
         }
     }
     
 
     XmlNode latestExerciseTimeNode = xmlNode.SelectSingleNode("latestExerciseTime");
     
     if (latestExerciseTimeNode != null)
     {
         if (latestExerciseTimeNode.Attributes["href"] != null || latestExerciseTimeNode.Attributes["id"] != null) 
         {
             if (latestExerciseTimeNode.Attributes["id"] != null) 
             {
                 latestExerciseTimeIDRef_ = latestExerciseTimeNode.Attributes["id"].Value;
                 BusinessCenterTime ob = new BusinessCenterTime(latestExerciseTimeNode);
                 IDManager.SetID(latestExerciseTimeIDRef_, ob);
             }
             else if (latestExerciseTimeNode.Attributes["href"] != null)
             {
                 latestExerciseTimeIDRef_ = latestExerciseTimeNode.Attributes["href"].Value;
             }
             else
             {
                 latestExerciseTime_ = new BusinessCenterTime(latestExerciseTimeNode);
             }
         }
         else
         {
             latestExerciseTime_ = new BusinessCenterTime(latestExerciseTimeNode);
         }
     }
     
 
     XmlNode latestExerciseTimeDeterminationNode = xmlNode.SelectSingleNode("latestExerciseTimeDetermination");
     
     if (latestExerciseTimeDeterminationNode != null)
     {
         if (latestExerciseTimeDeterminationNode.Attributes["href"] != null || latestExerciseTimeDeterminationNode.Attributes["id"] != null) 
         {
             if (latestExerciseTimeDeterminationNode.Attributes["id"] != null) 
             {
                 latestExerciseTimeDeterminationIDRef_ = latestExerciseTimeDeterminationNode.Attributes["id"].Value;
                 DeterminationMethod ob = new DeterminationMethod(latestExerciseTimeDeterminationNode);
                 IDManager.SetID(latestExerciseTimeDeterminationIDRef_, ob);
             }
             else if (latestExerciseTimeDeterminationNode.Attributes["href"] != null)
             {
                 latestExerciseTimeDeterminationIDRef_ = latestExerciseTimeDeterminationNode.Attributes["href"].Value;
             }
             else
             {
                 latestExerciseTimeDetermination_ = new DeterminationMethod(latestExerciseTimeDeterminationNode);
             }
         }
         else
         {
             latestExerciseTimeDetermination_ = new DeterminationMethod(latestExerciseTimeDeterminationNode);
         }
     }
     
 
     XmlNode expirationTimeNode = xmlNode.SelectSingleNode("expirationTime");
     
     if (expirationTimeNode != null)
     {
         if (expirationTimeNode.Attributes["href"] != null || expirationTimeNode.Attributes["id"] != null) 
         {
             if (expirationTimeNode.Attributes["id"] != null) 
             {
                 expirationTimeIDRef_ = expirationTimeNode.Attributes["id"].Value;
                 BusinessCenterTime ob = new BusinessCenterTime(expirationTimeNode);
                 IDManager.SetID(expirationTimeIDRef_, ob);
             }
             else if (expirationTimeNode.Attributes["href"] != null)
             {
                 expirationTimeIDRef_ = expirationTimeNode.Attributes["href"].Value;
             }
             else
             {
                 expirationTime_ = new BusinessCenterTime(expirationTimeNode);
             }
         }
         else
         {
             expirationTime_ = new BusinessCenterTime(expirationTimeNode);
         }
     }
     
 
     XmlNode multipleExerciseNode = xmlNode.SelectSingleNode("multipleExercise");
     
     if (multipleExerciseNode != null)
     {
         if (multipleExerciseNode.Attributes["href"] != null || multipleExerciseNode.Attributes["id"] != null) 
         {
             if (multipleExerciseNode.Attributes["id"] != null) 
             {
                 multipleExerciseIDRef_ = multipleExerciseNode.Attributes["id"].Value;
                 CommodityMultipleExercise ob = new CommodityMultipleExercise(multipleExerciseNode);
                 IDManager.SetID(multipleExerciseIDRef_, ob);
             }
             else if (multipleExerciseNode.Attributes["href"] != null)
             {
                 multipleExerciseIDRef_ = multipleExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 multipleExercise_ = new CommodityMultipleExercise(multipleExerciseNode);
             }
         }
         else
         {
             multipleExercise_ = new CommodityMultipleExercise(multipleExerciseNode);
         }
     }
     
 
 }
Example #4
0
        public DualCurrencyFeature(XmlNode xmlNode)
        {
            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 fixingDateNode = xmlNode.SelectSingleNode("fixingDate");

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


            XmlNode fixingTimeNode = xmlNode.SelectSingleNode("fixingTime");

            if (fixingTimeNode != null)
            {
                if (fixingTimeNode.Attributes["href"] != null || fixingTimeNode.Attributes["id"] != null)
                {
                    if (fixingTimeNode.Attributes["id"] != null)
                    {
                        fixingTimeIDRef_ = fixingTimeNode.Attributes["id"].Value;
                        BusinessCenterTime ob = new BusinessCenterTime(fixingTimeNode);
                        IDManager.SetID(fixingTimeIDRef_, ob);
                    }
                    else if (fixingTimeNode.Attributes["href"] != null)
                    {
                        fixingTimeIDRef_ = fixingTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fixingTime_ = new BusinessCenterTime(fixingTimeNode);
                    }
                }
                else
                {
                    fixingTime_ = new BusinessCenterTime(fixingTimeNode);
                }
            }


            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;
                        DualCurrencyStrikePrice ob = new DualCurrencyStrikePrice(strikeNode);
                        IDManager.SetID(strikeIDRef_, ob);
                    }
                    else if (strikeNode.Attributes["href"] != null)
                    {
                        strikeIDRef_ = strikeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        strike_ = new DualCurrencyStrikePrice(strikeNode);
                    }
                }
                else
                {
                    strike_ = new DualCurrencyStrikePrice(strikeNode);
                }
            }


            XmlNode spotRateNode = xmlNode.SelectSingleNode("spotRate");

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


            XmlNode interestAtRiskNode = xmlNode.SelectSingleNode("interestAtRisk");

            if (interestAtRiskNode != null)
            {
                if (interestAtRiskNode.Attributes["href"] != null || interestAtRiskNode.Attributes["id"] != null)
                {
                    if (interestAtRiskNode.Attributes["id"] != null)
                    {
                        interestAtRiskIDRef_ = interestAtRiskNode.Attributes["id"].Value;
                        XsdTypeBoolean ob = new XsdTypeBoolean(interestAtRiskNode);
                        IDManager.SetID(interestAtRiskIDRef_, ob);
                    }
                    else if (interestAtRiskNode.Attributes["href"] != null)
                    {
                        interestAtRiskIDRef_ = interestAtRiskNode.Attributes["href"].Value;
                    }
                    else
                    {
                        interestAtRisk_ = new XsdTypeBoolean(interestAtRiskNode);
                    }
                }
                else
                {
                    interestAtRisk_ = new XsdTypeBoolean(interestAtRiskNode);
                }
            }
        }
 public FxAsianFeature(XmlNode xmlNode)
 {
     XmlNodeList primaryRateSourceNodeList = xmlNode.SelectNodes("primaryRateSource");
     if (primaryRateSourceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in primaryRateSourceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 primaryRateSourceIDRef = item.Attributes["id"].Name;
                 InformationSource ob = InformationSource();
                 IDManager.SetID(primaryRateSourceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 primaryRateSourceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 primaryRateSource = new InformationSource(item);
             }
         }
     }
     
 
     XmlNodeList secondaryRateSourceNodeList = xmlNode.SelectNodes("secondaryRateSource");
     if (secondaryRateSourceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in secondaryRateSourceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 secondaryRateSourceIDRef = item.Attributes["id"].Name;
                 InformationSource ob = InformationSource();
                 IDManager.SetID(secondaryRateSourceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 secondaryRateSourceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 secondaryRateSource = new InformationSource(item);
             }
         }
     }
     
 
     XmlNodeList fixingTimeNodeList = xmlNode.SelectNodes("fixingTime");
     if (fixingTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fixingTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fixingTimeIDRef = item.Attributes["id"].Name;
                 BusinessCenterTime ob = BusinessCenterTime();
                 IDManager.SetID(fixingTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixingTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixingTime = new BusinessCenterTime(item);
             }
         }
     }
     
 
     XmlNodeList observationScheduleNodeList = xmlNode.SelectNodes("observationSchedule");
     if (observationScheduleNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in observationScheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 observationScheduleIDRef = item.Attributes["id"].Name;
                 FxAverageRateObservationSchedule ob = FxAverageRateObservationSchedule();
                 IDManager.SetID(observationScheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 observationScheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 observationSchedule = new FxAverageRateObservationSchedule(item);
             }
         }
     }
     
 
     XmlNodeList rateObservationNodeList = xmlNode.SelectNodes("rateObservation");
     
     foreach (XmlNode item in rateObservationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 rateObservationIDRef = item.Attributes["id"].Name;
                 List<FxAverageRateObservation> ob = new List<FxAverageRateObservation>();
                 ob.Add(new FxAverageRateObservation(item));
                 IDManager.SetID(rateObservationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 rateObservationIDRef = item.Attributes["href"].Name;
             }
             else
             {
             rateObservation.Add(new FxAverageRateObservation(item));
             }
         }
     }
     
 
     XmlNodeList rateObservationQuoteBasisNodeList = xmlNode.SelectNodes("rateObservationQuoteBasis");
     if (rateObservationQuoteBasisNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in rateObservationQuoteBasisNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 rateObservationQuoteBasisIDRef = item.Attributes["id"].Name;
                 StrikeQuoteBasisEnum ob = StrikeQuoteBasisEnum();
                 IDManager.SetID(rateObservationQuoteBasisIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 rateObservationQuoteBasisIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 rateObservationQuoteBasis = new StrikeQuoteBasisEnum(item);
             }
         }
     }
     
 
     XmlNodeList payoutFormulaNodeList = xmlNode.SelectNodes("payoutFormula");
     if (payoutFormulaNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in payoutFormulaNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 payoutFormulaIDRef = item.Attributes["id"].Name;
                 XsdTypeString ob = XsdTypeString();
                 IDManager.SetID(payoutFormulaIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 payoutFormulaIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payoutFormula = new XsdTypeString(item);
             }
         }
     }
     
 
     XmlNodeList precisionNodeList = xmlNode.SelectNodes("precision");
     if (precisionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in precisionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 precisionIDRef = item.Attributes["id"].Name;
                 XsdTypeNonNegativeInteger ob = XsdTypeNonNegativeInteger();
                 IDManager.SetID(precisionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 precisionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 precision = new XsdTypeNonNegativeInteger(item);
             }
         }
     }
     
 
 }
 public DualCurrencyFeature(XmlNode xmlNode)
 {
     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 fixingDateNodeList = xmlNode.SelectNodes("fixingDate");
     if (fixingDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fixingDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fixingDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(fixingDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixingDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixingDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList fixingTimeNodeList = xmlNode.SelectNodes("fixingTime");
     if (fixingTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fixingTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fixingTimeIDRef = item.Attributes["id"].Name;
                 BusinessCenterTime ob = BusinessCenterTime();
                 IDManager.SetID(fixingTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixingTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixingTime = new BusinessCenterTime(item);
             }
         }
     }
     
 
     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;
                 DualCurrencyStrikePrice ob = DualCurrencyStrikePrice();
                 IDManager.SetID(strikeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 strikeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 strike = new DualCurrencyStrikePrice(item);
             }
         }
     }
     
 
     XmlNodeList spotRateNodeList = xmlNode.SelectNodes("spotRate");
     if (spotRateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in spotRateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 spotRateIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(spotRateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 spotRateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 spotRate = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList interestAtRiskNodeList = xmlNode.SelectNodes("interestAtRisk");
     if (interestAtRiskNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in interestAtRiskNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 interestAtRiskIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(interestAtRiskIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 interestAtRiskIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 interestAtRisk = new XsdTypeBoolean(item);
             }
         }
     }
     
 
 }
        public SharedAmericanExercise(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode commencementDateNode = xmlNode.SelectSingleNode("commencementDate");

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


            XmlNode expirationDateNode = xmlNode.SelectSingleNode("expirationDate");

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


            XmlNode latestExerciseTimeNode = xmlNode.SelectSingleNode("latestExerciseTime");

            if (latestExerciseTimeNode != null)
            {
                if (latestExerciseTimeNode.Attributes["href"] != null || latestExerciseTimeNode.Attributes["id"] != null)
                {
                    if (latestExerciseTimeNode.Attributes["id"] != null)
                    {
                        latestExerciseTimeIDRef_ = latestExerciseTimeNode.Attributes["id"].Value;
                        BusinessCenterTime ob = new BusinessCenterTime(latestExerciseTimeNode);
                        IDManager.SetID(latestExerciseTimeIDRef_, ob);
                    }
                    else if (latestExerciseTimeNode.Attributes["href"] != null)
                    {
                        latestExerciseTimeIDRef_ = latestExerciseTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        latestExerciseTime_ = new BusinessCenterTime(latestExerciseTimeNode);
                    }
                }
                else
                {
                    latestExerciseTime_ = new BusinessCenterTime(latestExerciseTimeNode);
                }
            }


            XmlNode latestExerciseTimeDeterminationNode = xmlNode.SelectSingleNode("latestExerciseTimeDetermination");

            if (latestExerciseTimeDeterminationNode != null)
            {
                if (latestExerciseTimeDeterminationNode.Attributes["href"] != null || latestExerciseTimeDeterminationNode.Attributes["id"] != null)
                {
                    if (latestExerciseTimeDeterminationNode.Attributes["id"] != null)
                    {
                        latestExerciseTimeDeterminationIDRef_ = latestExerciseTimeDeterminationNode.Attributes["id"].Value;
                        DeterminationMethod ob = new DeterminationMethod(latestExerciseTimeDeterminationNode);
                        IDManager.SetID(latestExerciseTimeDeterminationIDRef_, ob);
                    }
                    else if (latestExerciseTimeDeterminationNode.Attributes["href"] != null)
                    {
                        latestExerciseTimeDeterminationIDRef_ = latestExerciseTimeDeterminationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        latestExerciseTimeDetermination_ = new DeterminationMethod(latestExerciseTimeDeterminationNode);
                    }
                }
                else
                {
                    latestExerciseTimeDetermination_ = new DeterminationMethod(latestExerciseTimeDeterminationNode);
                }
            }
        }
Example #8
0
        public FxSpotRateSource(XmlNode xmlNode)
        {
            XmlNodeList primaryRateSourceNodeList = xmlNode.SelectNodes("primaryRateSource");

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

            foreach (XmlNode item in primaryRateSourceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        primaryRateSourceIDRef = item.Attributes["id"].Name;
                        InformationSource ob = InformationSource();
                        IDManager.SetID(primaryRateSourceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        primaryRateSourceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        primaryRateSource = new InformationSource(item);
                    }
                }
            }


            XmlNodeList secondaryRateSourceNodeList = xmlNode.SelectNodes("secondaryRateSource");

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

            foreach (XmlNode item in secondaryRateSourceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        secondaryRateSourceIDRef = item.Attributes["id"].Name;
                        InformationSource ob = InformationSource();
                        IDManager.SetID(secondaryRateSourceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        secondaryRateSourceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        secondaryRateSource = new InformationSource(item);
                    }
                }
            }


            XmlNodeList fixingTimeNodeList = xmlNode.SelectNodes("fixingTime");

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

            foreach (XmlNode item in fixingTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fixingTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(fixingTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fixingTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fixingTime = new BusinessCenterTime(item);
                    }
                }
            }
        }
Example #9
0
        public SharedAmericanExercise(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList commencementDateNodeList = xmlNode.SelectNodes("commencementDate");

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

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


            XmlNodeList expirationDateNodeList = xmlNode.SelectNodes("expirationDate");

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

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


            XmlNodeList latestExerciseTimeNodeList = xmlNode.SelectNodes("latestExerciseTime");

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

            foreach (XmlNode item in latestExerciseTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        latestExerciseTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(latestExerciseTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        latestExerciseTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        latestExerciseTime = new BusinessCenterTime(item);
                    }
                }
            }


            XmlNodeList latestExerciseTimeDeterminationNodeList = xmlNode.SelectNodes("latestExerciseTimeDetermination");

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

            foreach (XmlNode item in latestExerciseTimeDeterminationNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        latestExerciseTimeDeterminationIDRef = item.Attributes["id"].Name;
                        DeterminationMethod ob = DeterminationMethod();
                        IDManager.SetID(latestExerciseTimeDeterminationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        latestExerciseTimeDeterminationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        latestExerciseTimeDetermination = new DeterminationMethod(item);
                    }
                }
            }
        }
        public FxAsianFeature(XmlNode xmlNode)
        {
            XmlNodeList primaryRateSourceNodeList = xmlNode.SelectNodes("primaryRateSource");

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

            foreach (XmlNode item in primaryRateSourceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        primaryRateSourceIDRef = item.Attributes["id"].Name;
                        InformationSource ob = InformationSource();
                        IDManager.SetID(primaryRateSourceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        primaryRateSourceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        primaryRateSource = new InformationSource(item);
                    }
                }
            }


            XmlNodeList secondaryRateSourceNodeList = xmlNode.SelectNodes("secondaryRateSource");

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

            foreach (XmlNode item in secondaryRateSourceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        secondaryRateSourceIDRef = item.Attributes["id"].Name;
                        InformationSource ob = InformationSource();
                        IDManager.SetID(secondaryRateSourceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        secondaryRateSourceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        secondaryRateSource = new InformationSource(item);
                    }
                }
            }


            XmlNodeList fixingTimeNodeList = xmlNode.SelectNodes("fixingTime");

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

            foreach (XmlNode item in fixingTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fixingTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(fixingTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fixingTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fixingTime = new BusinessCenterTime(item);
                    }
                }
            }


            XmlNodeList observationScheduleNodeList = xmlNode.SelectNodes("observationSchedule");

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

            foreach (XmlNode item in observationScheduleNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        observationScheduleIDRef = item.Attributes["id"].Name;
                        FxAverageRateObservationSchedule ob = FxAverageRateObservationSchedule();
                        IDManager.SetID(observationScheduleIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        observationScheduleIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        observationSchedule = new FxAverageRateObservationSchedule(item);
                    }
                }
            }


            XmlNodeList rateObservationNodeList = xmlNode.SelectNodes("rateObservation");

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


            XmlNodeList rateObservationQuoteBasisNodeList = xmlNode.SelectNodes("rateObservationQuoteBasis");

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

            foreach (XmlNode item in rateObservationQuoteBasisNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        rateObservationQuoteBasisIDRef = item.Attributes["id"].Name;
                        StrikeQuoteBasisEnum ob = StrikeQuoteBasisEnum();
                        IDManager.SetID(rateObservationQuoteBasisIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        rateObservationQuoteBasisIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        rateObservationQuoteBasis = new StrikeQuoteBasisEnum(item);
                    }
                }
            }


            XmlNodeList payoutFormulaNodeList = xmlNode.SelectNodes("payoutFormula");

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

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


            XmlNodeList precisionNodeList = xmlNode.SelectNodes("precision");

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

            foreach (XmlNode item in precisionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        precisionIDRef = item.Attributes["id"].Name;
                        XsdTypeNonNegativeInteger ob = XsdTypeNonNegativeInteger();
                        IDManager.SetID(precisionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        precisionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        precision = new XsdTypeNonNegativeInteger(item);
                    }
                }
            }
        }
 public CommodityFx(XmlNode xmlNode)
 {
     XmlNode primaryRateSourceNode = xmlNode.SelectSingleNode("primaryRateSource");
     
     if (primaryRateSourceNode != null)
     {
         if (primaryRateSourceNode.Attributes["href"] != null || primaryRateSourceNode.Attributes["id"] != null) 
         {
             if (primaryRateSourceNode.Attributes["id"] != null) 
             {
                 primaryRateSourceIDRef_ = primaryRateSourceNode.Attributes["id"].Value;
                 InformationSource ob = new InformationSource(primaryRateSourceNode);
                 IDManager.SetID(primaryRateSourceIDRef_, ob);
             }
             else if (primaryRateSourceNode.Attributes["href"] != null)
             {
                 primaryRateSourceIDRef_ = primaryRateSourceNode.Attributes["href"].Value;
             }
             else
             {
                 primaryRateSource_ = new InformationSource(primaryRateSourceNode);
             }
         }
         else
         {
             primaryRateSource_ = new InformationSource(primaryRateSourceNode);
         }
     }
     
 
     XmlNode secondaryRateSourceNode = xmlNode.SelectSingleNode("secondaryRateSource");
     
     if (secondaryRateSourceNode != null)
     {
         if (secondaryRateSourceNode.Attributes["href"] != null || secondaryRateSourceNode.Attributes["id"] != null) 
         {
             if (secondaryRateSourceNode.Attributes["id"] != null) 
             {
                 secondaryRateSourceIDRef_ = secondaryRateSourceNode.Attributes["id"].Value;
                 InformationSource ob = new InformationSource(secondaryRateSourceNode);
                 IDManager.SetID(secondaryRateSourceIDRef_, ob);
             }
             else if (secondaryRateSourceNode.Attributes["href"] != null)
             {
                 secondaryRateSourceIDRef_ = secondaryRateSourceNode.Attributes["href"].Value;
             }
             else
             {
                 secondaryRateSource_ = new InformationSource(secondaryRateSourceNode);
             }
         }
         else
         {
             secondaryRateSource_ = new InformationSource(secondaryRateSourceNode);
         }
     }
     
 
     XmlNode fxTypeNode = xmlNode.SelectSingleNode("fxType");
     
     if (fxTypeNode != null)
     {
         if (fxTypeNode.Attributes["href"] != null || fxTypeNode.Attributes["id"] != null) 
         {
             if (fxTypeNode.Attributes["id"] != null) 
             {
                 fxTypeIDRef_ = fxTypeNode.Attributes["id"].Value;
                 CommodityFxType ob = new CommodityFxType(fxTypeNode);
                 IDManager.SetID(fxTypeIDRef_, ob);
             }
             else if (fxTypeNode.Attributes["href"] != null)
             {
                 fxTypeIDRef_ = fxTypeNode.Attributes["href"].Value;
             }
             else
             {
                 fxType_ = new CommodityFxType(fxTypeNode);
             }
         }
         else
         {
             fxType_ = new CommodityFxType(fxTypeNode);
         }
     }
     
 
     XmlNode averagingMethodNode = xmlNode.SelectSingleNode("averagingMethod");
     
     if (averagingMethodNode != null)
     {
         if (averagingMethodNode.Attributes["href"] != null || averagingMethodNode.Attributes["id"] != null) 
         {
             if (averagingMethodNode.Attributes["id"] != null) 
             {
                 averagingMethodIDRef_ = averagingMethodNode.Attributes["id"].Value;
                 AveragingMethodEnum ob = new AveragingMethodEnum(averagingMethodNode);
                 IDManager.SetID(averagingMethodIDRef_, ob);
             }
             else if (averagingMethodNode.Attributes["href"] != null)
             {
                 averagingMethodIDRef_ = averagingMethodNode.Attributes["href"].Value;
             }
             else
             {
                 averagingMethod_ = new AveragingMethodEnum(averagingMethodNode);
             }
         }
         else
         {
             averagingMethod_ = new AveragingMethodEnum(averagingMethodNode);
         }
     }
     
 
     XmlNode fixingTimeNode = xmlNode.SelectSingleNode("fixingTime");
     
     if (fixingTimeNode != null)
     {
         if (fixingTimeNode.Attributes["href"] != null || fixingTimeNode.Attributes["id"] != null) 
         {
             if (fixingTimeNode.Attributes["id"] != null) 
             {
                 fixingTimeIDRef_ = fixingTimeNode.Attributes["id"].Value;
                 BusinessCenterTime ob = new BusinessCenterTime(fixingTimeNode);
                 IDManager.SetID(fixingTimeIDRef_, ob);
             }
             else if (fixingTimeNode.Attributes["href"] != null)
             {
                 fixingTimeIDRef_ = fixingTimeNode.Attributes["href"].Value;
             }
             else
             {
                 fixingTime_ = new BusinessCenterTime(fixingTimeNode);
             }
         }
         else
         {
             fixingTime_ = new BusinessCenterTime(fixingTimeNode);
         }
     }
     
 
     XmlNodeList fxObservationDatesNodeList = xmlNode.SelectNodes("fxObservationDates");
     
     if (fxObservationDatesNodeList != null)
     {
         this.fxObservationDates_ = new List<AdjustableDates>();
         foreach (XmlNode item in fxObservationDatesNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     fxObservationDatesIDRef_ = item.Attributes["id"].Value;
                     fxObservationDates_.Add(new AdjustableDates(item));
                     IDManager.SetID(fxObservationDatesIDRef_, fxObservationDates_[fxObservationDates_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     fxObservationDatesIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 fxObservationDates_.Add(new AdjustableDates(item));
                 }
             }
             else
             {
                 fxObservationDates_.Add(new AdjustableDates(item));
             }
         }
     }
     
 
     XmlNode dayTypeNode = xmlNode.SelectSingleNode("dayType");
     
     if (dayTypeNode != null)
     {
         if (dayTypeNode.Attributes["href"] != null || dayTypeNode.Attributes["id"] != null) 
         {
             if (dayTypeNode.Attributes["id"] != null) 
             {
                 dayTypeIDRef_ = dayTypeNode.Attributes["id"].Value;
                 CommodityDayTypeEnum ob = new CommodityDayTypeEnum(dayTypeNode);
                 IDManager.SetID(dayTypeIDRef_, ob);
             }
             else if (dayTypeNode.Attributes["href"] != null)
             {
                 dayTypeIDRef_ = dayTypeNode.Attributes["href"].Value;
             }
             else
             {
                 dayType_ = new CommodityDayTypeEnum(dayTypeNode);
             }
         }
         else
         {
             dayType_ = new CommodityDayTypeEnum(dayTypeNode);
         }
     }
     
 
     XmlNode dayDistributionNode = xmlNode.SelectSingleNode("dayDistribution");
     
     if (dayDistributionNode != null)
     {
         if (dayDistributionNode.Attributes["href"] != null || dayDistributionNode.Attributes["id"] != null) 
         {
             if (dayDistributionNode.Attributes["id"] != null) 
             {
                 dayDistributionIDRef_ = dayDistributionNode.Attributes["id"].Value;
                 CommodityFrequencyType ob = new CommodityFrequencyType(dayDistributionNode);
                 IDManager.SetID(dayDistributionIDRef_, ob);
             }
             else if (dayDistributionNode.Attributes["href"] != null)
             {
                 dayDistributionIDRef_ = dayDistributionNode.Attributes["href"].Value;
             }
             else
             {
                 dayDistribution_ = new CommodityFrequencyType(dayDistributionNode);
             }
         }
         else
         {
             dayDistribution_ = new CommodityFrequencyType(dayDistributionNode);
         }
     }
     
 
     XmlNode dayCountNode = xmlNode.SelectSingleNode("dayCount");
     
     if (dayCountNode != null)
     {
         if (dayCountNode.Attributes["href"] != null || dayCountNode.Attributes["id"] != null) 
         {
             if (dayCountNode.Attributes["id"] != null) 
             {
                 dayCountIDRef_ = dayCountNode.Attributes["id"].Value;
                 XsdTypePositiveInteger ob = new XsdTypePositiveInteger(dayCountNode);
                 IDManager.SetID(dayCountIDRef_, ob);
             }
             else if (dayCountNode.Attributes["href"] != null)
             {
                 dayCountIDRef_ = dayCountNode.Attributes["href"].Value;
             }
             else
             {
                 dayCount_ = new XsdTypePositiveInteger(dayCountNode);
             }
         }
         else
         {
             dayCount_ = new XsdTypePositiveInteger(dayCountNode);
         }
     }
     
 
     XmlNodeList dayOfWeekNodeList = xmlNode.SelectNodes("dayOfWeek");
     
     if (dayOfWeekNodeList != null)
     {
         this.dayOfWeek_ = new List<DayOfWeekEnum>();
         foreach (XmlNode item in dayOfWeekNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     dayOfWeekIDRef_ = item.Attributes["id"].Value;
                     dayOfWeek_.Add(new DayOfWeekEnum(item));
                     IDManager.SetID(dayOfWeekIDRef_, dayOfWeek_[dayOfWeek_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     dayOfWeekIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 dayOfWeek_.Add(new DayOfWeekEnum(item));
                 }
             }
             else
             {
                 dayOfWeek_.Add(new DayOfWeekEnum(item));
             }
         }
     }
     
 
     XmlNode dayNumberNode = xmlNode.SelectSingleNode("dayNumber");
     
     if (dayNumberNode != null)
     {
         if (dayNumberNode.Attributes["href"] != null || dayNumberNode.Attributes["id"] != null) 
         {
             if (dayNumberNode.Attributes["id"] != null) 
             {
                 dayNumberIDRef_ = dayNumberNode.Attributes["id"].Value;
                 XsdTypeInteger ob = new XsdTypeInteger(dayNumberNode);
                 IDManager.SetID(dayNumberIDRef_, ob);
             }
             else if (dayNumberNode.Attributes["href"] != null)
             {
                 dayNumberIDRef_ = dayNumberNode.Attributes["href"].Value;
             }
             else
             {
                 dayNumber_ = new XsdTypeInteger(dayNumberNode);
             }
         }
         else
         {
             dayNumber_ = new XsdTypeInteger(dayNumberNode);
         }
     }
     
 
     XmlNode lagNode = xmlNode.SelectSingleNode("lag");
     
     if (lagNode != null)
     {
         if (lagNode.Attributes["href"] != null || lagNode.Attributes["id"] != null) 
         {
             if (lagNode.Attributes["id"] != null) 
             {
                 lagIDRef_ = lagNode.Attributes["id"].Value;
                 Lag ob = new Lag(lagNode);
                 IDManager.SetID(lagIDRef_, ob);
             }
             else if (lagNode.Attributes["href"] != null)
             {
                 lagIDRef_ = lagNode.Attributes["href"].Value;
             }
             else
             {
                 lag_ = new Lag(lagNode);
             }
         }
         else
         {
             lag_ = new Lag(lagNode);
         }
     }
     
 
     XmlNode lagReferenceNode = xmlNode.SelectSingleNode("lagReference");
     
     if (lagReferenceNode != null)
     {
         if (lagReferenceNode.Attributes["href"] != null || lagReferenceNode.Attributes["id"] != null) 
         {
             if (lagReferenceNode.Attributes["id"] != null) 
             {
                 lagReferenceIDRef_ = lagReferenceNode.Attributes["id"].Value;
                 LagReference ob = new LagReference(lagReferenceNode);
                 IDManager.SetID(lagReferenceIDRef_, ob);
             }
             else if (lagReferenceNode.Attributes["href"] != null)
             {
                 lagReferenceIDRef_ = lagReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 lagReference_ = new LagReference(lagReferenceNode);
             }
         }
         else
         {
             lagReference_ = new LagReference(lagReferenceNode);
         }
     }
     
 
     XmlNode calculationPeriodsReferenceNode = xmlNode.SelectSingleNode("calculationPeriodsReference");
     
     if (calculationPeriodsReferenceNode != null)
     {
         if (calculationPeriodsReferenceNode.Attributes["href"] != null || calculationPeriodsReferenceNode.Attributes["id"] != null) 
         {
             if (calculationPeriodsReferenceNode.Attributes["id"] != null) 
             {
                 calculationPeriodsReferenceIDRef_ = calculationPeriodsReferenceNode.Attributes["id"].Value;
                 CalculationPeriodsReference ob = new CalculationPeriodsReference(calculationPeriodsReferenceNode);
                 IDManager.SetID(calculationPeriodsReferenceIDRef_, ob);
             }
             else if (calculationPeriodsReferenceNode.Attributes["href"] != null)
             {
                 calculationPeriodsReferenceIDRef_ = calculationPeriodsReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodsReference_ = new CalculationPeriodsReference(calculationPeriodsReferenceNode);
             }
         }
         else
         {
             calculationPeriodsReference_ = new CalculationPeriodsReference(calculationPeriodsReferenceNode);
         }
     }
     
 
     XmlNode calculationPeriodsScheduleReferenceNode = xmlNode.SelectSingleNode("calculationPeriodsScheduleReference");
     
     if (calculationPeriodsScheduleReferenceNode != null)
     {
         if (calculationPeriodsScheduleReferenceNode.Attributes["href"] != null || calculationPeriodsScheduleReferenceNode.Attributes["id"] != null) 
         {
             if (calculationPeriodsScheduleReferenceNode.Attributes["id"] != null) 
             {
                 calculationPeriodsScheduleReferenceIDRef_ = calculationPeriodsScheduleReferenceNode.Attributes["id"].Value;
                 CalculationPeriodsScheduleReference ob = new CalculationPeriodsScheduleReference(calculationPeriodsScheduleReferenceNode);
                 IDManager.SetID(calculationPeriodsScheduleReferenceIDRef_, ob);
             }
             else if (calculationPeriodsScheduleReferenceNode.Attributes["href"] != null)
             {
                 calculationPeriodsScheduleReferenceIDRef_ = calculationPeriodsScheduleReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodsScheduleReference_ = new CalculationPeriodsScheduleReference(calculationPeriodsScheduleReferenceNode);
             }
         }
         else
         {
             calculationPeriodsScheduleReference_ = new CalculationPeriodsScheduleReference(calculationPeriodsScheduleReferenceNode);
         }
     }
     
 
     XmlNode calculationPeriodsDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodsDatesReference");
     
     if (calculationPeriodsDatesReferenceNode != null)
     {
         if (calculationPeriodsDatesReferenceNode.Attributes["href"] != null || calculationPeriodsDatesReferenceNode.Attributes["id"] != null) 
         {
             if (calculationPeriodsDatesReferenceNode.Attributes["id"] != null) 
             {
                 calculationPeriodsDatesReferenceIDRef_ = calculationPeriodsDatesReferenceNode.Attributes["id"].Value;
                 CalculationPeriodsDatesReference ob = new CalculationPeriodsDatesReference(calculationPeriodsDatesReferenceNode);
                 IDManager.SetID(calculationPeriodsDatesReferenceIDRef_, ob);
             }
             else if (calculationPeriodsDatesReferenceNode.Attributes["href"] != null)
             {
                 calculationPeriodsDatesReferenceIDRef_ = calculationPeriodsDatesReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodsDatesReference_ = new CalculationPeriodsDatesReference(calculationPeriodsDatesReferenceNode);
             }
         }
         else
         {
             calculationPeriodsDatesReference_ = new CalculationPeriodsDatesReference(calculationPeriodsDatesReferenceNode);
         }
     }
     
 
 }
 public EquityEuropeanExercise(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList expirationDateNodeList = xmlNode.SelectNodes("expirationDate");
     if (expirationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in expirationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 expirationDateIDRef = item.Attributes["id"].Name;
                 AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                 IDManager.SetID(expirationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 expirationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 expirationDate = new AdjustableOrRelativeDate(item);
             }
         }
     }
     
 
     XmlNodeList equityExpirationTimeTypeNodeList = xmlNode.SelectNodes("equityExpirationTimeType");
     if (equityExpirationTimeTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in equityExpirationTimeTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 equityExpirationTimeTypeIDRef = item.Attributes["id"].Name;
                 TimeTypeEnum ob = TimeTypeEnum();
                 IDManager.SetID(equityExpirationTimeTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 equityExpirationTimeTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 equityExpirationTimeType = new TimeTypeEnum(item);
             }
         }
     }
     
 
     XmlNodeList equityExpirationTimeNodeList = xmlNode.SelectNodes("equityExpirationTime");
     if (equityExpirationTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in equityExpirationTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 equityExpirationTimeIDRef = item.Attributes["id"].Name;
                 BusinessCenterTime ob = BusinessCenterTime();
                 IDManager.SetID(equityExpirationTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 equityExpirationTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 equityExpirationTime = new BusinessCenterTime(item);
             }
         }
     }
     
 
     XmlNodeList expirationTimeDeterminationNodeList = xmlNode.SelectNodes("expirationTimeDetermination");
     if (expirationTimeDeterminationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in expirationTimeDeterminationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 expirationTimeDeterminationIDRef = item.Attributes["id"].Name;
                 DeterminationMethod ob = DeterminationMethod();
                 IDManager.SetID(expirationTimeDeterminationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 expirationTimeDeterminationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 expirationTimeDetermination = new DeterminationMethod(item);
             }
         }
     }
     
 
 }
 public SharedAmericanExercise(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode commencementDateNode = xmlNode.SelectSingleNode("commencementDate");
     
     if (commencementDateNode != null)
     {
         if (commencementDateNode.Attributes["href"] != null || commencementDateNode.Attributes["id"] != null) 
         {
             if (commencementDateNode.Attributes["id"] != null) 
             {
                 commencementDateIDRef_ = commencementDateNode.Attributes["id"].Value;
                 AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(commencementDateNode);
                 IDManager.SetID(commencementDateIDRef_, ob);
             }
             else if (commencementDateNode.Attributes["href"] != null)
             {
                 commencementDateIDRef_ = commencementDateNode.Attributes["href"].Value;
             }
             else
             {
                 commencementDate_ = new AdjustableOrRelativeDate(commencementDateNode);
             }
         }
         else
         {
             commencementDate_ = new AdjustableOrRelativeDate(commencementDateNode);
         }
     }
     
 
     XmlNode expirationDateNode = xmlNode.SelectSingleNode("expirationDate");
     
     if (expirationDateNode != null)
     {
         if (expirationDateNode.Attributes["href"] != null || expirationDateNode.Attributes["id"] != null) 
         {
             if (expirationDateNode.Attributes["id"] != null) 
             {
                 expirationDateIDRef_ = expirationDateNode.Attributes["id"].Value;
                 AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(expirationDateNode);
                 IDManager.SetID(expirationDateIDRef_, ob);
             }
             else if (expirationDateNode.Attributes["href"] != null)
             {
                 expirationDateIDRef_ = expirationDateNode.Attributes["href"].Value;
             }
             else
             {
                 expirationDate_ = new AdjustableOrRelativeDate(expirationDateNode);
             }
         }
         else
         {
             expirationDate_ = new AdjustableOrRelativeDate(expirationDateNode);
         }
     }
     
 
     XmlNode latestExerciseTimeNode = xmlNode.SelectSingleNode("latestExerciseTime");
     
     if (latestExerciseTimeNode != null)
     {
         if (latestExerciseTimeNode.Attributes["href"] != null || latestExerciseTimeNode.Attributes["id"] != null) 
         {
             if (latestExerciseTimeNode.Attributes["id"] != null) 
             {
                 latestExerciseTimeIDRef_ = latestExerciseTimeNode.Attributes["id"].Value;
                 BusinessCenterTime ob = new BusinessCenterTime(latestExerciseTimeNode);
                 IDManager.SetID(latestExerciseTimeIDRef_, ob);
             }
             else if (latestExerciseTimeNode.Attributes["href"] != null)
             {
                 latestExerciseTimeIDRef_ = latestExerciseTimeNode.Attributes["href"].Value;
             }
             else
             {
                 latestExerciseTime_ = new BusinessCenterTime(latestExerciseTimeNode);
             }
         }
         else
         {
             latestExerciseTime_ = new BusinessCenterTime(latestExerciseTimeNode);
         }
     }
     
 
     XmlNode latestExerciseTimeDeterminationNode = xmlNode.SelectSingleNode("latestExerciseTimeDetermination");
     
     if (latestExerciseTimeDeterminationNode != null)
     {
         if (latestExerciseTimeDeterminationNode.Attributes["href"] != null || latestExerciseTimeDeterminationNode.Attributes["id"] != null) 
         {
             if (latestExerciseTimeDeterminationNode.Attributes["id"] != null) 
             {
                 latestExerciseTimeDeterminationIDRef_ = latestExerciseTimeDeterminationNode.Attributes["id"].Value;
                 DeterminationMethod ob = new DeterminationMethod(latestExerciseTimeDeterminationNode);
                 IDManager.SetID(latestExerciseTimeDeterminationIDRef_, ob);
             }
             else if (latestExerciseTimeDeterminationNode.Attributes["href"] != null)
             {
                 latestExerciseTimeDeterminationIDRef_ = latestExerciseTimeDeterminationNode.Attributes["href"].Value;
             }
             else
             {
                 latestExerciseTimeDetermination_ = new DeterminationMethod(latestExerciseTimeDeterminationNode);
             }
         }
         else
         {
             latestExerciseTimeDetermination_ = new DeterminationMethod(latestExerciseTimeDeterminationNode);
         }
     }
     
 
 }
 public EquityEuropeanExercise(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode expirationDateNode = xmlNode.SelectSingleNode("expirationDate");
     
     if (expirationDateNode != null)
     {
         if (expirationDateNode.Attributes["href"] != null || expirationDateNode.Attributes["id"] != null) 
         {
             if (expirationDateNode.Attributes["id"] != null) 
             {
                 expirationDateIDRef_ = expirationDateNode.Attributes["id"].Value;
                 AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(expirationDateNode);
                 IDManager.SetID(expirationDateIDRef_, ob);
             }
             else if (expirationDateNode.Attributes["href"] != null)
             {
                 expirationDateIDRef_ = expirationDateNode.Attributes["href"].Value;
             }
             else
             {
                 expirationDate_ = new AdjustableOrRelativeDate(expirationDateNode);
             }
         }
         else
         {
             expirationDate_ = new AdjustableOrRelativeDate(expirationDateNode);
         }
     }
     
 
     XmlNode equityExpirationTimeTypeNode = xmlNode.SelectSingleNode("equityExpirationTimeType");
     
     if (equityExpirationTimeTypeNode != null)
     {
         if (equityExpirationTimeTypeNode.Attributes["href"] != null || equityExpirationTimeTypeNode.Attributes["id"] != null) 
         {
             if (equityExpirationTimeTypeNode.Attributes["id"] != null) 
             {
                 equityExpirationTimeTypeIDRef_ = equityExpirationTimeTypeNode.Attributes["id"].Value;
                 TimeTypeEnum ob = new TimeTypeEnum(equityExpirationTimeTypeNode);
                 IDManager.SetID(equityExpirationTimeTypeIDRef_, ob);
             }
             else if (equityExpirationTimeTypeNode.Attributes["href"] != null)
             {
                 equityExpirationTimeTypeIDRef_ = equityExpirationTimeTypeNode.Attributes["href"].Value;
             }
             else
             {
                 equityExpirationTimeType_ = new TimeTypeEnum(equityExpirationTimeTypeNode);
             }
         }
         else
         {
             equityExpirationTimeType_ = new TimeTypeEnum(equityExpirationTimeTypeNode);
         }
     }
     
 
     XmlNode equityExpirationTimeNode = xmlNode.SelectSingleNode("equityExpirationTime");
     
     if (equityExpirationTimeNode != null)
     {
         if (equityExpirationTimeNode.Attributes["href"] != null || equityExpirationTimeNode.Attributes["id"] != null) 
         {
             if (equityExpirationTimeNode.Attributes["id"] != null) 
             {
                 equityExpirationTimeIDRef_ = equityExpirationTimeNode.Attributes["id"].Value;
                 BusinessCenterTime ob = new BusinessCenterTime(equityExpirationTimeNode);
                 IDManager.SetID(equityExpirationTimeIDRef_, ob);
             }
             else if (equityExpirationTimeNode.Attributes["href"] != null)
             {
                 equityExpirationTimeIDRef_ = equityExpirationTimeNode.Attributes["href"].Value;
             }
             else
             {
                 equityExpirationTime_ = new BusinessCenterTime(equityExpirationTimeNode);
             }
         }
         else
         {
             equityExpirationTime_ = new BusinessCenterTime(equityExpirationTimeNode);
         }
     }
     
 
     XmlNode expirationTimeDeterminationNode = xmlNode.SelectSingleNode("expirationTimeDetermination");
     
     if (expirationTimeDeterminationNode != null)
     {
         if (expirationTimeDeterminationNode.Attributes["href"] != null || expirationTimeDeterminationNode.Attributes["id"] != null) 
         {
             if (expirationTimeDeterminationNode.Attributes["id"] != null) 
             {
                 expirationTimeDeterminationIDRef_ = expirationTimeDeterminationNode.Attributes["id"].Value;
                 DeterminationMethod ob = new DeterminationMethod(expirationTimeDeterminationNode);
                 IDManager.SetID(expirationTimeDeterminationIDRef_, ob);
             }
             else if (expirationTimeDeterminationNode.Attributes["href"] != null)
             {
                 expirationTimeDeterminationIDRef_ = expirationTimeDeterminationNode.Attributes["href"].Value;
             }
             else
             {
                 expirationTimeDetermination_ = new DeterminationMethod(expirationTimeDeterminationNode);
             }
         }
         else
         {
             expirationTimeDetermination_ = new DeterminationMethod(expirationTimeDeterminationNode);
         }
     }
     
 
 }
 public CommodityEuropeanExercise(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList expirationDateNodeList = xmlNode.SelectNodes("expirationDate");
     if (expirationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in expirationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 expirationDateIDRef = item.Attributes["id"].Name;
                 AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                 IDManager.SetID(expirationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 expirationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 expirationDate = new AdjustableOrRelativeDate(item);
             }
         }
     }
     
 
     XmlNodeList exerciseFrequencyNodeList = xmlNode.SelectNodes("exerciseFrequency");
     if (exerciseFrequencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in exerciseFrequencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 exerciseFrequencyIDRef = item.Attributes["id"].Name;
                 Frequency ob = Frequency();
                 IDManager.SetID(exerciseFrequencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 exerciseFrequencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 exerciseFrequency = new Frequency(item);
             }
         }
     }
     
 
     XmlNodeList expirationTimeNodeList = xmlNode.SelectNodes("expirationTime");
     if (expirationTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in expirationTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 expirationTimeIDRef = item.Attributes["id"].Name;
                 BusinessCenterTime ob = BusinessCenterTime();
                 IDManager.SetID(expirationTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 expirationTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 expirationTime = new BusinessCenterTime(item);
             }
         }
     }
     
 
 }
 public FxAsianFeature(XmlNode xmlNode)
 {
     XmlNode primaryRateSourceNode = xmlNode.SelectSingleNode("primaryRateSource");
     
     if (primaryRateSourceNode != null)
     {
         if (primaryRateSourceNode.Attributes["href"] != null || primaryRateSourceNode.Attributes["id"] != null) 
         {
             if (primaryRateSourceNode.Attributes["id"] != null) 
             {
                 primaryRateSourceIDRef_ = primaryRateSourceNode.Attributes["id"].Value;
                 InformationSource ob = new InformationSource(primaryRateSourceNode);
                 IDManager.SetID(primaryRateSourceIDRef_, ob);
             }
             else if (primaryRateSourceNode.Attributes["href"] != null)
             {
                 primaryRateSourceIDRef_ = primaryRateSourceNode.Attributes["href"].Value;
             }
             else
             {
                 primaryRateSource_ = new InformationSource(primaryRateSourceNode);
             }
         }
         else
         {
             primaryRateSource_ = new InformationSource(primaryRateSourceNode);
         }
     }
     
 
     XmlNode secondaryRateSourceNode = xmlNode.SelectSingleNode("secondaryRateSource");
     
     if (secondaryRateSourceNode != null)
     {
         if (secondaryRateSourceNode.Attributes["href"] != null || secondaryRateSourceNode.Attributes["id"] != null) 
         {
             if (secondaryRateSourceNode.Attributes["id"] != null) 
             {
                 secondaryRateSourceIDRef_ = secondaryRateSourceNode.Attributes["id"].Value;
                 InformationSource ob = new InformationSource(secondaryRateSourceNode);
                 IDManager.SetID(secondaryRateSourceIDRef_, ob);
             }
             else if (secondaryRateSourceNode.Attributes["href"] != null)
             {
                 secondaryRateSourceIDRef_ = secondaryRateSourceNode.Attributes["href"].Value;
             }
             else
             {
                 secondaryRateSource_ = new InformationSource(secondaryRateSourceNode);
             }
         }
         else
         {
             secondaryRateSource_ = new InformationSource(secondaryRateSourceNode);
         }
     }
     
 
     XmlNode fixingTimeNode = xmlNode.SelectSingleNode("fixingTime");
     
     if (fixingTimeNode != null)
     {
         if (fixingTimeNode.Attributes["href"] != null || fixingTimeNode.Attributes["id"] != null) 
         {
             if (fixingTimeNode.Attributes["id"] != null) 
             {
                 fixingTimeIDRef_ = fixingTimeNode.Attributes["id"].Value;
                 BusinessCenterTime ob = new BusinessCenterTime(fixingTimeNode);
                 IDManager.SetID(fixingTimeIDRef_, ob);
             }
             else if (fixingTimeNode.Attributes["href"] != null)
             {
                 fixingTimeIDRef_ = fixingTimeNode.Attributes["href"].Value;
             }
             else
             {
                 fixingTime_ = new BusinessCenterTime(fixingTimeNode);
             }
         }
         else
         {
             fixingTime_ = new BusinessCenterTime(fixingTimeNode);
         }
     }
     
 
     XmlNode observationScheduleNode = xmlNode.SelectSingleNode("observationSchedule");
     
     if (observationScheduleNode != null)
     {
         if (observationScheduleNode.Attributes["href"] != null || observationScheduleNode.Attributes["id"] != null) 
         {
             if (observationScheduleNode.Attributes["id"] != null) 
             {
                 observationScheduleIDRef_ = observationScheduleNode.Attributes["id"].Value;
                 FxAverageRateObservationSchedule ob = new FxAverageRateObservationSchedule(observationScheduleNode);
                 IDManager.SetID(observationScheduleIDRef_, ob);
             }
             else if (observationScheduleNode.Attributes["href"] != null)
             {
                 observationScheduleIDRef_ = observationScheduleNode.Attributes["href"].Value;
             }
             else
             {
                 observationSchedule_ = new FxAverageRateObservationSchedule(observationScheduleNode);
             }
         }
         else
         {
             observationSchedule_ = new FxAverageRateObservationSchedule(observationScheduleNode);
         }
     }
     
 
     XmlNodeList rateObservationNodeList = xmlNode.SelectNodes("rateObservation");
     
     if (rateObservationNodeList != null)
     {
         this.rateObservation_ = new List<FxAverageRateObservation>();
         foreach (XmlNode item in rateObservationNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     rateObservationIDRef_ = item.Attributes["id"].Value;
                     rateObservation_.Add(new FxAverageRateObservation(item));
                     IDManager.SetID(rateObservationIDRef_, rateObservation_[rateObservation_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     rateObservationIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 rateObservation_.Add(new FxAverageRateObservation(item));
                 }
             }
             else
             {
                 rateObservation_.Add(new FxAverageRateObservation(item));
             }
         }
     }
     
 
     XmlNode rateObservationQuoteBasisNode = xmlNode.SelectSingleNode("rateObservationQuoteBasis");
     
     if (rateObservationQuoteBasisNode != null)
     {
         if (rateObservationQuoteBasisNode.Attributes["href"] != null || rateObservationQuoteBasisNode.Attributes["id"] != null) 
         {
             if (rateObservationQuoteBasisNode.Attributes["id"] != null) 
             {
                 rateObservationQuoteBasisIDRef_ = rateObservationQuoteBasisNode.Attributes["id"].Value;
                 StrikeQuoteBasisEnum ob = new StrikeQuoteBasisEnum(rateObservationQuoteBasisNode);
                 IDManager.SetID(rateObservationQuoteBasisIDRef_, ob);
             }
             else if (rateObservationQuoteBasisNode.Attributes["href"] != null)
             {
                 rateObservationQuoteBasisIDRef_ = rateObservationQuoteBasisNode.Attributes["href"].Value;
             }
             else
             {
                 rateObservationQuoteBasis_ = new StrikeQuoteBasisEnum(rateObservationQuoteBasisNode);
             }
         }
         else
         {
             rateObservationQuoteBasis_ = new StrikeQuoteBasisEnum(rateObservationQuoteBasisNode);
         }
     }
     
 
     XmlNode payoutFormulaNode = xmlNode.SelectSingleNode("payoutFormula");
     
     if (payoutFormulaNode != null)
     {
         if (payoutFormulaNode.Attributes["href"] != null || payoutFormulaNode.Attributes["id"] != null) 
         {
             if (payoutFormulaNode.Attributes["id"] != null) 
             {
                 payoutFormulaIDRef_ = payoutFormulaNode.Attributes["id"].Value;
                 XsdTypeString ob = new XsdTypeString(payoutFormulaNode);
                 IDManager.SetID(payoutFormulaIDRef_, ob);
             }
             else if (payoutFormulaNode.Attributes["href"] != null)
             {
                 payoutFormulaIDRef_ = payoutFormulaNode.Attributes["href"].Value;
             }
             else
             {
                 payoutFormula_ = new XsdTypeString(payoutFormulaNode);
             }
         }
         else
         {
             payoutFormula_ = new XsdTypeString(payoutFormulaNode);
         }
     }
     
 
     XmlNode precisionNode = xmlNode.SelectSingleNode("precision");
     
     if (precisionNode != null)
     {
         if (precisionNode.Attributes["href"] != null || precisionNode.Attributes["id"] != null) 
         {
             if (precisionNode.Attributes["id"] != null) 
             {
                 precisionIDRef_ = precisionNode.Attributes["id"].Value;
                 XsdTypeNonNegativeInteger ob = new XsdTypeNonNegativeInteger(precisionNode);
                 IDManager.SetID(precisionIDRef_, ob);
             }
             else if (precisionNode.Attributes["href"] != null)
             {
                 precisionIDRef_ = precisionNode.Attributes["href"].Value;
             }
             else
             {
                 precision_ = new XsdTypeNonNegativeInteger(precisionNode);
             }
         }
         else
         {
             precision_ = new XsdTypeNonNegativeInteger(precisionNode);
         }
     }
     
 
 }
 public CommodityEuropeanExercise(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode expirationDateNode = xmlNode.SelectSingleNode("expirationDate");
     
     if (expirationDateNode != null)
     {
         if (expirationDateNode.Attributes["href"] != null || expirationDateNode.Attributes["id"] != null) 
         {
             if (expirationDateNode.Attributes["id"] != null) 
             {
                 expirationDateIDRef_ = expirationDateNode.Attributes["id"].Value;
                 AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(expirationDateNode);
                 IDManager.SetID(expirationDateIDRef_, ob);
             }
             else if (expirationDateNode.Attributes["href"] != null)
             {
                 expirationDateIDRef_ = expirationDateNode.Attributes["href"].Value;
             }
             else
             {
                 expirationDate_ = new AdjustableOrRelativeDate(expirationDateNode);
             }
         }
         else
         {
             expirationDate_ = new AdjustableOrRelativeDate(expirationDateNode);
         }
     }
     
 
     XmlNode exerciseFrequencyNode = xmlNode.SelectSingleNode("exerciseFrequency");
     
     if (exerciseFrequencyNode != null)
     {
         if (exerciseFrequencyNode.Attributes["href"] != null || exerciseFrequencyNode.Attributes["id"] != null) 
         {
             if (exerciseFrequencyNode.Attributes["id"] != null) 
             {
                 exerciseFrequencyIDRef_ = exerciseFrequencyNode.Attributes["id"].Value;
                 Frequency ob = new Frequency(exerciseFrequencyNode);
                 IDManager.SetID(exerciseFrequencyIDRef_, ob);
             }
             else if (exerciseFrequencyNode.Attributes["href"] != null)
             {
                 exerciseFrequencyIDRef_ = exerciseFrequencyNode.Attributes["href"].Value;
             }
             else
             {
                 exerciseFrequency_ = new Frequency(exerciseFrequencyNode);
             }
         }
         else
         {
             exerciseFrequency_ = new Frequency(exerciseFrequencyNode);
         }
     }
     
 
     XmlNode expirationTimeNode = xmlNode.SelectSingleNode("expirationTime");
     
     if (expirationTimeNode != null)
     {
         if (expirationTimeNode.Attributes["href"] != null || expirationTimeNode.Attributes["id"] != null) 
         {
             if (expirationTimeNode.Attributes["id"] != null) 
             {
                 expirationTimeIDRef_ = expirationTimeNode.Attributes["id"].Value;
                 BusinessCenterTime ob = new BusinessCenterTime(expirationTimeNode);
                 IDManager.SetID(expirationTimeIDRef_, ob);
             }
             else if (expirationTimeNode.Attributes["href"] != null)
             {
                 expirationTimeIDRef_ = expirationTimeNode.Attributes["href"].Value;
             }
             else
             {
                 expirationTime_ = new BusinessCenterTime(expirationTimeNode);
             }
         }
         else
         {
             expirationTime_ = new BusinessCenterTime(expirationTimeNode);
         }
     }
     
 
 }
Example #18
0
        public CommodityAmericanExercise(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode exercisePeriodNode = xmlNode.SelectSingleNode("exercisePeriod");

            if (exercisePeriodNode != null)
            {
                if (exercisePeriodNode.Attributes["href"] != null || exercisePeriodNode.Attributes["id"] != null)
                {
                    if (exercisePeriodNode.Attributes["id"] != null)
                    {
                        exercisePeriodIDRef_ = exercisePeriodNode.Attributes["id"].Value;
                        CommodityExercisePeriods ob = new CommodityExercisePeriods(exercisePeriodNode);
                        IDManager.SetID(exercisePeriodIDRef_, ob);
                    }
                    else if (exercisePeriodNode.Attributes["href"] != null)
                    {
                        exercisePeriodIDRef_ = exercisePeriodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        exercisePeriod_ = new CommodityExercisePeriods(exercisePeriodNode);
                    }
                }
                else
                {
                    exercisePeriod_ = new CommodityExercisePeriods(exercisePeriodNode);
                }
            }


            XmlNode exerciseFrequencyNode = xmlNode.SelectSingleNode("exerciseFrequency");

            if (exerciseFrequencyNode != null)
            {
                if (exerciseFrequencyNode.Attributes["href"] != null || exerciseFrequencyNode.Attributes["id"] != null)
                {
                    if (exerciseFrequencyNode.Attributes["id"] != null)
                    {
                        exerciseFrequencyIDRef_ = exerciseFrequencyNode.Attributes["id"].Value;
                        Frequency ob = new Frequency(exerciseFrequencyNode);
                        IDManager.SetID(exerciseFrequencyIDRef_, ob);
                    }
                    else if (exerciseFrequencyNode.Attributes["href"] != null)
                    {
                        exerciseFrequencyIDRef_ = exerciseFrequencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        exerciseFrequency_ = new Frequency(exerciseFrequencyNode);
                    }
                }
                else
                {
                    exerciseFrequency_ = new Frequency(exerciseFrequencyNode);
                }
            }


            XmlNode latestExerciseTimeNode = xmlNode.SelectSingleNode("latestExerciseTime");

            if (latestExerciseTimeNode != null)
            {
                if (latestExerciseTimeNode.Attributes["href"] != null || latestExerciseTimeNode.Attributes["id"] != null)
                {
                    if (latestExerciseTimeNode.Attributes["id"] != null)
                    {
                        latestExerciseTimeIDRef_ = latestExerciseTimeNode.Attributes["id"].Value;
                        BusinessCenterTime ob = new BusinessCenterTime(latestExerciseTimeNode);
                        IDManager.SetID(latestExerciseTimeIDRef_, ob);
                    }
                    else if (latestExerciseTimeNode.Attributes["href"] != null)
                    {
                        latestExerciseTimeIDRef_ = latestExerciseTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        latestExerciseTime_ = new BusinessCenterTime(latestExerciseTimeNode);
                    }
                }
                else
                {
                    latestExerciseTime_ = new BusinessCenterTime(latestExerciseTimeNode);
                }
            }


            XmlNode latestExerciseTimeDeterminationNode = xmlNode.SelectSingleNode("latestExerciseTimeDetermination");

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


            XmlNode expirationTimeNode = xmlNode.SelectSingleNode("expirationTime");

            if (expirationTimeNode != null)
            {
                if (expirationTimeNode.Attributes["href"] != null || expirationTimeNode.Attributes["id"] != null)
                {
                    if (expirationTimeNode.Attributes["id"] != null)
                    {
                        expirationTimeIDRef_ = expirationTimeNode.Attributes["id"].Value;
                        BusinessCenterTime ob = new BusinessCenterTime(expirationTimeNode);
                        IDManager.SetID(expirationTimeIDRef_, ob);
                    }
                    else if (expirationTimeNode.Attributes["href"] != null)
                    {
                        expirationTimeIDRef_ = expirationTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        expirationTime_ = new BusinessCenterTime(expirationTimeNode);
                    }
                }
                else
                {
                    expirationTime_ = new BusinessCenterTime(expirationTimeNode);
                }
            }


            XmlNode multipleExerciseNode = xmlNode.SelectSingleNode("multipleExercise");

            if (multipleExerciseNode != null)
            {
                if (multipleExerciseNode.Attributes["href"] != null || multipleExerciseNode.Attributes["id"] != null)
                {
                    if (multipleExerciseNode.Attributes["id"] != null)
                    {
                        multipleExerciseIDRef_ = multipleExerciseNode.Attributes["id"].Value;
                        CommodityMultipleExercise ob = new CommodityMultipleExercise(multipleExerciseNode);
                        IDManager.SetID(multipleExerciseIDRef_, ob);
                    }
                    else if (multipleExerciseNode.Attributes["href"] != null)
                    {
                        multipleExerciseIDRef_ = multipleExerciseNode.Attributes["href"].Value;
                    }
                    else
                    {
                        multipleExercise_ = new CommodityMultipleExercise(multipleExerciseNode);
                    }
                }
                else
                {
                    multipleExercise_ = new CommodityMultipleExercise(multipleExerciseNode);
                }
            }
        }
        public CommodityEuropeanExercise(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode expirationDateNode = xmlNode.SelectSingleNode("expirationDate");

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


            XmlNode exerciseFrequencyNode = xmlNode.SelectSingleNode("exerciseFrequency");

            if (exerciseFrequencyNode != null)
            {
                if (exerciseFrequencyNode.Attributes["href"] != null || exerciseFrequencyNode.Attributes["id"] != null)
                {
                    if (exerciseFrequencyNode.Attributes["id"] != null)
                    {
                        exerciseFrequencyIDRef_ = exerciseFrequencyNode.Attributes["id"].Value;
                        Frequency ob = new Frequency(exerciseFrequencyNode);
                        IDManager.SetID(exerciseFrequencyIDRef_, ob);
                    }
                    else if (exerciseFrequencyNode.Attributes["href"] != null)
                    {
                        exerciseFrequencyIDRef_ = exerciseFrequencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        exerciseFrequency_ = new Frequency(exerciseFrequencyNode);
                    }
                }
                else
                {
                    exerciseFrequency_ = new Frequency(exerciseFrequencyNode);
                }
            }


            XmlNode expirationTimeNode = xmlNode.SelectSingleNode("expirationTime");

            if (expirationTimeNode != null)
            {
                if (expirationTimeNode.Attributes["href"] != null || expirationTimeNode.Attributes["id"] != null)
                {
                    if (expirationTimeNode.Attributes["id"] != null)
                    {
                        expirationTimeIDRef_ = expirationTimeNode.Attributes["id"].Value;
                        BusinessCenterTime ob = new BusinessCenterTime(expirationTimeNode);
                        IDManager.SetID(expirationTimeIDRef_, ob);
                    }
                    else if (expirationTimeNode.Attributes["href"] != null)
                    {
                        expirationTimeIDRef_ = expirationTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        expirationTime_ = new BusinessCenterTime(expirationTimeNode);
                    }
                }
                else
                {
                    expirationTime_ = new BusinessCenterTime(expirationTimeNode);
                }
            }
        }
 public FxDigitalAmericanExercise(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList commencementDateNodeList = xmlNode.SelectNodes("commencementDate");
     if (commencementDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commencementDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commencementDateIDRef = item.Attributes["id"].Name;
                 AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                 IDManager.SetID(commencementDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commencementDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commencementDate = new AdjustableOrRelativeDate(item);
             }
         }
     }
     
 
     XmlNodeList expiryDateNodeList = xmlNode.SelectNodes("expiryDate");
     if (expiryDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in expiryDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 expiryDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(expiryDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 expiryDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 expiryDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList expiryTimeNodeList = xmlNode.SelectNodes("expiryTime");
     if (expiryTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in expiryTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 expiryTimeIDRef = item.Attributes["id"].Name;
                 BusinessCenterTime ob = BusinessCenterTime();
                 IDManager.SetID(expiryTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 expiryTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 expiryTime = new BusinessCenterTime(item);
             }
         }
     }
     
 
     XmlNodeList cutNameNodeList = xmlNode.SelectNodes("cutName");
     if (cutNameNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cutNameNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cutNameIDRef = item.Attributes["id"].Name;
                 CutName ob = CutName();
                 IDManager.SetID(cutNameIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cutNameIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cutName = new CutName(item);
             }
         }
     }
     
 
     XmlNodeList latestValueDateNodeList = xmlNode.SelectNodes("latestValueDate");
     if (latestValueDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in latestValueDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 latestValueDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(latestValueDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 latestValueDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 latestValueDate = new XsdTypeDate(item);
             }
         }
     }
     
 
 }
        public EquityEuropeanExercise(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode expirationDateNode = xmlNode.SelectSingleNode("expirationDate");

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


            XmlNode equityExpirationTimeTypeNode = xmlNode.SelectSingleNode("equityExpirationTimeType");

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


            XmlNode equityExpirationTimeNode = xmlNode.SelectSingleNode("equityExpirationTime");

            if (equityExpirationTimeNode != null)
            {
                if (equityExpirationTimeNode.Attributes["href"] != null || equityExpirationTimeNode.Attributes["id"] != null)
                {
                    if (equityExpirationTimeNode.Attributes["id"] != null)
                    {
                        equityExpirationTimeIDRef_ = equityExpirationTimeNode.Attributes["id"].Value;
                        BusinessCenterTime ob = new BusinessCenterTime(equityExpirationTimeNode);
                        IDManager.SetID(equityExpirationTimeIDRef_, ob);
                    }
                    else if (equityExpirationTimeNode.Attributes["href"] != null)
                    {
                        equityExpirationTimeIDRef_ = equityExpirationTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        equityExpirationTime_ = new BusinessCenterTime(equityExpirationTimeNode);
                    }
                }
                else
                {
                    equityExpirationTime_ = new BusinessCenterTime(equityExpirationTimeNode);
                }
            }


            XmlNode expirationTimeDeterminationNode = xmlNode.SelectSingleNode("expirationTimeDetermination");

            if (expirationTimeDeterminationNode != null)
            {
                if (expirationTimeDeterminationNode.Attributes["href"] != null || expirationTimeDeterminationNode.Attributes["id"] != null)
                {
                    if (expirationTimeDeterminationNode.Attributes["id"] != null)
                    {
                        expirationTimeDeterminationIDRef_ = expirationTimeDeterminationNode.Attributes["id"].Value;
                        DeterminationMethod ob = new DeterminationMethod(expirationTimeDeterminationNode);
                        IDManager.SetID(expirationTimeDeterminationIDRef_, ob);
                    }
                    else if (expirationTimeDeterminationNode.Attributes["href"] != null)
                    {
                        expirationTimeDeterminationIDRef_ = expirationTimeDeterminationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        expirationTimeDetermination_ = new DeterminationMethod(expirationTimeDeterminationNode);
                    }
                }
                else
                {
                    expirationTimeDetermination_ = new DeterminationMethod(expirationTimeDeterminationNode);
                }
            }
        }
 public CashSettlement(XmlNode xmlNode)
 {
     XmlNodeList cashSettlementValuationTimeNodeList = xmlNode.SelectNodes("cashSettlementValuationTime");
     if (cashSettlementValuationTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cashSettlementValuationTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cashSettlementValuationTimeIDRef = item.Attributes["id"].Name;
                 BusinessCenterTime ob = BusinessCenterTime();
                 IDManager.SetID(cashSettlementValuationTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cashSettlementValuationTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cashSettlementValuationTime = new BusinessCenterTime(item);
             }
         }
     }
     
 
     XmlNodeList cashSettlementValuationDateNodeList = xmlNode.SelectNodes("cashSettlementValuationDate");
     if (cashSettlementValuationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cashSettlementValuationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cashSettlementValuationDateIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(cashSettlementValuationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cashSettlementValuationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cashSettlementValuationDate = new RelativeDateOffset(item);
             }
         }
     }
     
 
     XmlNodeList cashSettlementPaymentDateNodeList = xmlNode.SelectNodes("cashSettlementPaymentDate");
     if (cashSettlementPaymentDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cashSettlementPaymentDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cashSettlementPaymentDateIDRef = item.Attributes["id"].Name;
                 CashSettlementPaymentDate ob = CashSettlementPaymentDate();
                 IDManager.SetID(cashSettlementPaymentDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cashSettlementPaymentDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cashSettlementPaymentDate = new CashSettlementPaymentDate(item);
             }
         }
     }
     
 
     XmlNodeList cashPriceMethodNodeList = xmlNode.SelectNodes("cashPriceMethod");
     if (cashPriceMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cashPriceMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cashPriceMethodIDRef = item.Attributes["id"].Name;
                 CashPriceMethod ob = CashPriceMethod();
                 IDManager.SetID(cashPriceMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cashPriceMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cashPriceMethod = new CashPriceMethod(item);
             }
         }
     }
     
 
     XmlNodeList cashPriceAlternateMethodNodeList = xmlNode.SelectNodes("cashPriceAlternateMethod");
     if (cashPriceAlternateMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cashPriceAlternateMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cashPriceAlternateMethodIDRef = item.Attributes["id"].Name;
                 CashPriceMethod ob = CashPriceMethod();
                 IDManager.SetID(cashPriceAlternateMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cashPriceAlternateMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cashPriceAlternateMethod = new CashPriceMethod(item);
             }
         }
     }
     
 
     XmlNodeList parYieldCurveAdjustedMethodNodeList = xmlNode.SelectNodes("parYieldCurveAdjustedMethod");
     if (parYieldCurveAdjustedMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in parYieldCurveAdjustedMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 parYieldCurveAdjustedMethodIDRef = item.Attributes["id"].Name;
                 YieldCurveMethod ob = YieldCurveMethod();
                 IDManager.SetID(parYieldCurveAdjustedMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 parYieldCurveAdjustedMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 parYieldCurveAdjustedMethod = new YieldCurveMethod(item);
             }
         }
     }
     
 
     XmlNodeList zeroCouponYieldAdjustedMethodNodeList = xmlNode.SelectNodes("zeroCouponYieldAdjustedMethod");
     if (zeroCouponYieldAdjustedMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in zeroCouponYieldAdjustedMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 zeroCouponYieldAdjustedMethodIDRef = item.Attributes["id"].Name;
                 YieldCurveMethod ob = YieldCurveMethod();
                 IDManager.SetID(zeroCouponYieldAdjustedMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 zeroCouponYieldAdjustedMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 zeroCouponYieldAdjustedMethod = new YieldCurveMethod(item);
             }
         }
     }
     
 
     XmlNodeList parYieldCurveUnadjustedMethodNodeList = xmlNode.SelectNodes("parYieldCurveUnadjustedMethod");
     if (parYieldCurveUnadjustedMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in parYieldCurveUnadjustedMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 parYieldCurveUnadjustedMethodIDRef = item.Attributes["id"].Name;
                 YieldCurveMethod ob = YieldCurveMethod();
                 IDManager.SetID(parYieldCurveUnadjustedMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 parYieldCurveUnadjustedMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 parYieldCurveUnadjustedMethod = new YieldCurveMethod(item);
             }
         }
     }
     
 
     XmlNodeList crossCurrencyMethodNodeList = xmlNode.SelectNodes("crossCurrencyMethod");
     if (crossCurrencyMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in crossCurrencyMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 crossCurrencyMethodIDRef = item.Attributes["id"].Name;
                 CrossCurrencyMethod ob = CrossCurrencyMethod();
                 IDManager.SetID(crossCurrencyMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 crossCurrencyMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 crossCurrencyMethod = new CrossCurrencyMethod(item);
             }
         }
     }
     
 
     XmlNodeList collateralizedCashPriceMethodNodeList = xmlNode.SelectNodes("collateralizedCashPriceMethod");
     if (collateralizedCashPriceMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in collateralizedCashPriceMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 collateralizedCashPriceMethodIDRef = item.Attributes["id"].Name;
                 YieldCurveMethod ob = YieldCurveMethod();
                 IDManager.SetID(collateralizedCashPriceMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 collateralizedCashPriceMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 collateralizedCashPriceMethod = new YieldCurveMethod(item);
             }
         }
     }
     
 
 }
 public EquityValuation(XmlNode xmlNode)
 {
     XmlNode valuationDateNode = xmlNode.SelectSingleNode("valuationDate");
     
     if (valuationDateNode != null)
     {
         if (valuationDateNode.Attributes["href"] != null || valuationDateNode.Attributes["id"] != null) 
         {
             if (valuationDateNode.Attributes["id"] != null) 
             {
                 valuationDateIDRef_ = valuationDateNode.Attributes["id"].Value;
                 AdjustableDateOrRelativeDateSequence ob = new AdjustableDateOrRelativeDateSequence(valuationDateNode);
                 IDManager.SetID(valuationDateIDRef_, ob);
             }
             else if (valuationDateNode.Attributes["href"] != null)
             {
                 valuationDateIDRef_ = valuationDateNode.Attributes["href"].Value;
             }
             else
             {
                 valuationDate_ = new AdjustableDateOrRelativeDateSequence(valuationDateNode);
             }
         }
         else
         {
             valuationDate_ = new AdjustableDateOrRelativeDateSequence(valuationDateNode);
         }
     }
     
 
     XmlNode valuationDatesNode = xmlNode.SelectSingleNode("valuationDates");
     
     if (valuationDatesNode != null)
     {
         if (valuationDatesNode.Attributes["href"] != null || valuationDatesNode.Attributes["id"] != null) 
         {
             if (valuationDatesNode.Attributes["id"] != null) 
             {
                 valuationDatesIDRef_ = valuationDatesNode.Attributes["id"].Value;
                 AdjustableRelativeOrPeriodicDates ob = new AdjustableRelativeOrPeriodicDates(valuationDatesNode);
                 IDManager.SetID(valuationDatesIDRef_, ob);
             }
             else if (valuationDatesNode.Attributes["href"] != null)
             {
                 valuationDatesIDRef_ = valuationDatesNode.Attributes["href"].Value;
             }
             else
             {
                 valuationDates_ = new AdjustableRelativeOrPeriodicDates(valuationDatesNode);
             }
         }
         else
         {
             valuationDates_ = new AdjustableRelativeOrPeriodicDates(valuationDatesNode);
         }
     }
     
 
     XmlNode valuationTimeTypeNode = xmlNode.SelectSingleNode("valuationTimeType");
     
     if (valuationTimeTypeNode != null)
     {
         if (valuationTimeTypeNode.Attributes["href"] != null || valuationTimeTypeNode.Attributes["id"] != null) 
         {
             if (valuationTimeTypeNode.Attributes["id"] != null) 
             {
                 valuationTimeTypeIDRef_ = valuationTimeTypeNode.Attributes["id"].Value;
                 TimeTypeEnum ob = new TimeTypeEnum(valuationTimeTypeNode);
                 IDManager.SetID(valuationTimeTypeIDRef_, ob);
             }
             else if (valuationTimeTypeNode.Attributes["href"] != null)
             {
                 valuationTimeTypeIDRef_ = valuationTimeTypeNode.Attributes["href"].Value;
             }
             else
             {
                 valuationTimeType_ = new TimeTypeEnum(valuationTimeTypeNode);
             }
         }
         else
         {
             valuationTimeType_ = new TimeTypeEnum(valuationTimeTypeNode);
         }
     }
     
 
     XmlNode valuationTimeNode = xmlNode.SelectSingleNode("valuationTime");
     
     if (valuationTimeNode != null)
     {
         if (valuationTimeNode.Attributes["href"] != null || valuationTimeNode.Attributes["id"] != null) 
         {
             if (valuationTimeNode.Attributes["id"] != null) 
             {
                 valuationTimeIDRef_ = valuationTimeNode.Attributes["id"].Value;
                 BusinessCenterTime ob = new BusinessCenterTime(valuationTimeNode);
                 IDManager.SetID(valuationTimeIDRef_, ob);
             }
             else if (valuationTimeNode.Attributes["href"] != null)
             {
                 valuationTimeIDRef_ = valuationTimeNode.Attributes["href"].Value;
             }
             else
             {
                 valuationTime_ = new BusinessCenterTime(valuationTimeNode);
             }
         }
         else
         {
             valuationTime_ = new BusinessCenterTime(valuationTimeNode);
         }
     }
     
 
     XmlNode futuresPriceValuationNode = xmlNode.SelectSingleNode("futuresPriceValuation");
     
     if (futuresPriceValuationNode != null)
     {
         if (futuresPriceValuationNode.Attributes["href"] != null || futuresPriceValuationNode.Attributes["id"] != null) 
         {
             if (futuresPriceValuationNode.Attributes["id"] != null) 
             {
                 futuresPriceValuationIDRef_ = futuresPriceValuationNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(futuresPriceValuationNode);
                 IDManager.SetID(futuresPriceValuationIDRef_, ob);
             }
             else if (futuresPriceValuationNode.Attributes["href"] != null)
             {
                 futuresPriceValuationIDRef_ = futuresPriceValuationNode.Attributes["href"].Value;
             }
             else
             {
                 futuresPriceValuation_ = new XsdTypeBoolean(futuresPriceValuationNode);
             }
         }
         else
         {
             futuresPriceValuation_ = new XsdTypeBoolean(futuresPriceValuationNode);
         }
     }
     
 
     XmlNode optionsPriceValuationNode = xmlNode.SelectSingleNode("optionsPriceValuation");
     
     if (optionsPriceValuationNode != null)
     {
         if (optionsPriceValuationNode.Attributes["href"] != null || optionsPriceValuationNode.Attributes["id"] != null) 
         {
             if (optionsPriceValuationNode.Attributes["id"] != null) 
             {
                 optionsPriceValuationIDRef_ = optionsPriceValuationNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(optionsPriceValuationNode);
                 IDManager.SetID(optionsPriceValuationIDRef_, ob);
             }
             else if (optionsPriceValuationNode.Attributes["href"] != null)
             {
                 optionsPriceValuationIDRef_ = optionsPriceValuationNode.Attributes["href"].Value;
             }
             else
             {
                 optionsPriceValuation_ = new XsdTypeBoolean(optionsPriceValuationNode);
             }
         }
         else
         {
             optionsPriceValuation_ = new XsdTypeBoolean(optionsPriceValuationNode);
         }
     }
     
 
     XmlNode numberOfValuationDatesNode = xmlNode.SelectSingleNode("numberOfValuationDates");
     
     if (numberOfValuationDatesNode != null)
     {
         if (numberOfValuationDatesNode.Attributes["href"] != null || numberOfValuationDatesNode.Attributes["id"] != null) 
         {
             if (numberOfValuationDatesNode.Attributes["id"] != null) 
             {
                 numberOfValuationDatesIDRef_ = numberOfValuationDatesNode.Attributes["id"].Value;
                 XsdTypeNonNegativeInteger ob = new XsdTypeNonNegativeInteger(numberOfValuationDatesNode);
                 IDManager.SetID(numberOfValuationDatesIDRef_, ob);
             }
             else if (numberOfValuationDatesNode.Attributes["href"] != null)
             {
                 numberOfValuationDatesIDRef_ = numberOfValuationDatesNode.Attributes["href"].Value;
             }
             else
             {
                 numberOfValuationDates_ = new XsdTypeNonNegativeInteger(numberOfValuationDatesNode);
             }
         }
         else
         {
             numberOfValuationDates_ = new XsdTypeNonNegativeInteger(numberOfValuationDatesNode);
         }
     }
     
 
     XmlNode dividendValuationDatesNode = xmlNode.SelectSingleNode("dividendValuationDates");
     
     if (dividendValuationDatesNode != null)
     {
         if (dividendValuationDatesNode.Attributes["href"] != null || dividendValuationDatesNode.Attributes["id"] != null) 
         {
             if (dividendValuationDatesNode.Attributes["id"] != null) 
             {
                 dividendValuationDatesIDRef_ = dividendValuationDatesNode.Attributes["id"].Value;
                 AdjustableRelativeOrPeriodicDates ob = new AdjustableRelativeOrPeriodicDates(dividendValuationDatesNode);
                 IDManager.SetID(dividendValuationDatesIDRef_, ob);
             }
             else if (dividendValuationDatesNode.Attributes["href"] != null)
             {
                 dividendValuationDatesIDRef_ = dividendValuationDatesNode.Attributes["href"].Value;
             }
             else
             {
                 dividendValuationDates_ = new AdjustableRelativeOrPeriodicDates(dividendValuationDatesNode);
             }
         }
         else
         {
             dividendValuationDates_ = new AdjustableRelativeOrPeriodicDates(dividendValuationDatesNode);
         }
     }
     
 
     XmlNode fPVFinalPriceElectionFallbackNode = xmlNode.SelectSingleNode("fPVFinalPriceElectionFallback");
     
     if (fPVFinalPriceElectionFallbackNode != null)
     {
         if (fPVFinalPriceElectionFallbackNode.Attributes["href"] != null || fPVFinalPriceElectionFallbackNode.Attributes["id"] != null) 
         {
             if (fPVFinalPriceElectionFallbackNode.Attributes["id"] != null) 
             {
                 fPVFinalPriceElectionFallbackIDRef_ = fPVFinalPriceElectionFallbackNode.Attributes["id"].Value;
                 FPVFinalPriceElectionFallbackEnum ob = new FPVFinalPriceElectionFallbackEnum(fPVFinalPriceElectionFallbackNode);
                 IDManager.SetID(fPVFinalPriceElectionFallbackIDRef_, ob);
             }
             else if (fPVFinalPriceElectionFallbackNode.Attributes["href"] != null)
             {
                 fPVFinalPriceElectionFallbackIDRef_ = fPVFinalPriceElectionFallbackNode.Attributes["href"].Value;
             }
             else
             {
                 fPVFinalPriceElectionFallback_ = new FPVFinalPriceElectionFallbackEnum(fPVFinalPriceElectionFallbackNode);
             }
         }
         else
         {
             fPVFinalPriceElectionFallback_ = new FPVFinalPriceElectionFallbackEnum(fPVFinalPriceElectionFallbackNode);
         }
     }
     
 
 }
        public CommodityFx(XmlNode xmlNode)
        {
            XmlNodeList primaryRateSourceNodeList = xmlNode.SelectNodes("primaryRateSource");

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

            foreach (XmlNode item in primaryRateSourceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        primaryRateSourceIDRef = item.Attributes["id"].Name;
                        InformationSource ob = InformationSource();
                        IDManager.SetID(primaryRateSourceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        primaryRateSourceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        primaryRateSource = new InformationSource(item);
                    }
                }
            }


            XmlNodeList secondaryRateSourceNodeList = xmlNode.SelectNodes("secondaryRateSource");

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

            foreach (XmlNode item in secondaryRateSourceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        secondaryRateSourceIDRef = item.Attributes["id"].Name;
                        InformationSource ob = InformationSource();
                        IDManager.SetID(secondaryRateSourceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        secondaryRateSourceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        secondaryRateSource = new InformationSource(item);
                    }
                }
            }


            XmlNodeList fxTypeNodeList = xmlNode.SelectNodes("fxType");

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

            foreach (XmlNode item in fxTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fxTypeIDRef = item.Attributes["id"].Name;
                        CommodityFxType ob = CommodityFxType();
                        IDManager.SetID(fxTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fxTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fxType = new CommodityFxType(item);
                    }
                }
            }


            XmlNodeList averagingMethodNodeList = xmlNode.SelectNodes("averagingMethod");

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

            foreach (XmlNode item in averagingMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        averagingMethodIDRef = item.Attributes["id"].Name;
                        AveragingMethodEnum ob = AveragingMethodEnum();
                        IDManager.SetID(averagingMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        averagingMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        averagingMethod = new AveragingMethodEnum(item);
                    }
                }
            }


            XmlNodeList fixingTimeNodeList = xmlNode.SelectNodes("fixingTime");

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

            foreach (XmlNode item in fixingTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fixingTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(fixingTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fixingTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fixingTime = new BusinessCenterTime(item);
                    }
                }
            }


            XmlNodeList fxObservationDatesNodeList = xmlNode.SelectNodes("fxObservationDates");

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


            XmlNodeList dayTypeNodeList = xmlNode.SelectNodes("dayType");

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

            foreach (XmlNode item in dayTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dayTypeIDRef = item.Attributes["id"].Name;
                        CommodityDayTypeEnum ob = CommodityDayTypeEnum();
                        IDManager.SetID(dayTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dayTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dayType = new CommodityDayTypeEnum(item);
                    }
                }
            }


            XmlNodeList dayDistributionNodeList = xmlNode.SelectNodes("dayDistribution");

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

            foreach (XmlNode item in dayDistributionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dayDistributionIDRef = item.Attributes["id"].Name;
                        CommodityFrequencyType ob = CommodityFrequencyType();
                        IDManager.SetID(dayDistributionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dayDistributionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dayDistribution = new CommodityFrequencyType(item);
                    }
                }
            }


            XmlNodeList dayCountNodeList = xmlNode.SelectNodes("dayCount");

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

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


            XmlNodeList dayOfWeekNodeList = xmlNode.SelectNodes("dayOfWeek");

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


            XmlNodeList dayNumberNodeList = xmlNode.SelectNodes("dayNumber");

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

            foreach (XmlNode item in dayNumberNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dayNumberIDRef = item.Attributes["id"].Name;
                        XsdTypeInteger ob = XsdTypeInteger();
                        IDManager.SetID(dayNumberIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dayNumberIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dayNumber = new XsdTypeInteger(item);
                    }
                }
            }


            XmlNodeList lagNodeList = xmlNode.SelectNodes("lag");

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

            foreach (XmlNode item in lagNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        lagIDRef = item.Attributes["id"].Name;
                        Lag ob = Lag();
                        IDManager.SetID(lagIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        lagIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        lag = new Lag(item);
                    }
                }
            }


            XmlNodeList lagReferenceNodeList = xmlNode.SelectNodes("lagReference");

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

            foreach (XmlNode item in lagReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        lagReferenceIDRef = item.Attributes["id"].Name;
                        LagReference ob = LagReference();
                        IDManager.SetID(lagReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        lagReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        lagReference = new LagReference(item);
                    }
                }
            }


            XmlNodeList calculationPeriodsReferenceNodeList = xmlNode.SelectNodes("calculationPeriodsReference");

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

            foreach (XmlNode item in calculationPeriodsReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodsReferenceIDRef = item.Attributes["id"].Name;
                        CalculationPeriodsReference ob = CalculationPeriodsReference();
                        IDManager.SetID(calculationPeriodsReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodsReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodsReference = new CalculationPeriodsReference(item);
                    }
                }
            }


            XmlNodeList calculationPeriodsScheduleReferenceNodeList = xmlNode.SelectNodes("calculationPeriodsScheduleReference");

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

            foreach (XmlNode item in calculationPeriodsScheduleReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodsScheduleReferenceIDRef = item.Attributes["id"].Name;
                        CalculationPeriodsScheduleReference ob = CalculationPeriodsScheduleReference();
                        IDManager.SetID(calculationPeriodsScheduleReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodsScheduleReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodsScheduleReference = new CalculationPeriodsScheduleReference(item);
                    }
                }
            }


            XmlNodeList calculationPeriodsDatesReferenceNodeList = xmlNode.SelectNodes("calculationPeriodsDatesReference");

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

            foreach (XmlNode item in calculationPeriodsDatesReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodsDatesReferenceIDRef = item.Attributes["id"].Name;
                        CalculationPeriodsDatesReference ob = CalculationPeriodsDatesReference();
                        IDManager.SetID(calculationPeriodsDatesReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodsDatesReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodsDatesReference = new CalculationPeriodsDatesReference(item);
                    }
                }
            }
        }
 public FxDigitalAmericanExercise(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode commencementDateNode = xmlNode.SelectSingleNode("commencementDate");
     
     if (commencementDateNode != null)
     {
         if (commencementDateNode.Attributes["href"] != null || commencementDateNode.Attributes["id"] != null) 
         {
             if (commencementDateNode.Attributes["id"] != null) 
             {
                 commencementDateIDRef_ = commencementDateNode.Attributes["id"].Value;
                 AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(commencementDateNode);
                 IDManager.SetID(commencementDateIDRef_, ob);
             }
             else if (commencementDateNode.Attributes["href"] != null)
             {
                 commencementDateIDRef_ = commencementDateNode.Attributes["href"].Value;
             }
             else
             {
                 commencementDate_ = new AdjustableOrRelativeDate(commencementDateNode);
             }
         }
         else
         {
             commencementDate_ = new AdjustableOrRelativeDate(commencementDateNode);
         }
     }
     
 
     XmlNode expiryDateNode = xmlNode.SelectSingleNode("expiryDate");
     
     if (expiryDateNode != null)
     {
         if (expiryDateNode.Attributes["href"] != null || expiryDateNode.Attributes["id"] != null) 
         {
             if (expiryDateNode.Attributes["id"] != null) 
             {
                 expiryDateIDRef_ = expiryDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(expiryDateNode);
                 IDManager.SetID(expiryDateIDRef_, ob);
             }
             else if (expiryDateNode.Attributes["href"] != null)
             {
                 expiryDateIDRef_ = expiryDateNode.Attributes["href"].Value;
             }
             else
             {
                 expiryDate_ = new XsdTypeDate(expiryDateNode);
             }
         }
         else
         {
             expiryDate_ = new XsdTypeDate(expiryDateNode);
         }
     }
     
 
     XmlNode expiryTimeNode = xmlNode.SelectSingleNode("expiryTime");
     
     if (expiryTimeNode != null)
     {
         if (expiryTimeNode.Attributes["href"] != null || expiryTimeNode.Attributes["id"] != null) 
         {
             if (expiryTimeNode.Attributes["id"] != null) 
             {
                 expiryTimeIDRef_ = expiryTimeNode.Attributes["id"].Value;
                 BusinessCenterTime ob = new BusinessCenterTime(expiryTimeNode);
                 IDManager.SetID(expiryTimeIDRef_, ob);
             }
             else if (expiryTimeNode.Attributes["href"] != null)
             {
                 expiryTimeIDRef_ = expiryTimeNode.Attributes["href"].Value;
             }
             else
             {
                 expiryTime_ = new BusinessCenterTime(expiryTimeNode);
             }
         }
         else
         {
             expiryTime_ = new BusinessCenterTime(expiryTimeNode);
         }
     }
     
 
     XmlNode cutNameNode = xmlNode.SelectSingleNode("cutName");
     
     if (cutNameNode != null)
     {
         if (cutNameNode.Attributes["href"] != null || cutNameNode.Attributes["id"] != null) 
         {
             if (cutNameNode.Attributes["id"] != null) 
             {
                 cutNameIDRef_ = cutNameNode.Attributes["id"].Value;
                 CutName ob = new CutName(cutNameNode);
                 IDManager.SetID(cutNameIDRef_, ob);
             }
             else if (cutNameNode.Attributes["href"] != null)
             {
                 cutNameIDRef_ = cutNameNode.Attributes["href"].Value;
             }
             else
             {
                 cutName_ = new CutName(cutNameNode);
             }
         }
         else
         {
             cutName_ = new CutName(cutNameNode);
         }
     }
     
 
     XmlNode latestValueDateNode = xmlNode.SelectSingleNode("latestValueDate");
     
     if (latestValueDateNode != null)
     {
         if (latestValueDateNode.Attributes["href"] != null || latestValueDateNode.Attributes["id"] != null) 
         {
             if (latestValueDateNode.Attributes["id"] != null) 
             {
                 latestValueDateIDRef_ = latestValueDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(latestValueDateNode);
                 IDManager.SetID(latestValueDateIDRef_, ob);
             }
             else if (latestValueDateNode.Attributes["href"] != null)
             {
                 latestValueDateIDRef_ = latestValueDateNode.Attributes["href"].Value;
             }
             else
             {
                 latestValueDate_ = new XsdTypeDate(latestValueDateNode);
             }
         }
         else
         {
             latestValueDate_ = new XsdTypeDate(latestValueDateNode);
         }
     }
     
 
 }
Example #26
0
        public CommodityAmericanExercise(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList exercisePeriodNodeList = xmlNode.SelectNodes("exercisePeriod");

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

            foreach (XmlNode item in exercisePeriodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        exercisePeriodIDRef = item.Attributes["id"].Name;
                        CommodityExercisePeriods ob = CommodityExercisePeriods();
                        IDManager.SetID(exercisePeriodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        exercisePeriodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        exercisePeriod = new CommodityExercisePeriods(item);
                    }
                }
            }


            XmlNodeList exerciseFrequencyNodeList = xmlNode.SelectNodes("exerciseFrequency");

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

            foreach (XmlNode item in exerciseFrequencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        exerciseFrequencyIDRef = item.Attributes["id"].Name;
                        Frequency ob = Frequency();
                        IDManager.SetID(exerciseFrequencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        exerciseFrequencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        exerciseFrequency = new Frequency(item);
                    }
                }
            }


            XmlNodeList latestExerciseTimeNodeList = xmlNode.SelectNodes("latestExerciseTime");

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

            foreach (XmlNode item in latestExerciseTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        latestExerciseTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(latestExerciseTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        latestExerciseTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        latestExerciseTime = new BusinessCenterTime(item);
                    }
                }
            }


            XmlNodeList latestExerciseTimeDeterminationNodeList = xmlNode.SelectNodes("latestExerciseTimeDetermination");

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

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


            XmlNodeList expirationTimeNodeList = xmlNode.SelectNodes("expirationTime");

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

            foreach (XmlNode item in expirationTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        expirationTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(expirationTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        expirationTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        expirationTime = new BusinessCenterTime(item);
                    }
                }
            }


            XmlNodeList multipleExerciseNodeList = xmlNode.SelectNodes("multipleExercise");

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

            foreach (XmlNode item in multipleExerciseNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        multipleExerciseIDRef = item.Attributes["id"].Name;
                        CommodityMultipleExercise ob = CommodityMultipleExercise();
                        IDManager.SetID(multipleExerciseIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        multipleExerciseIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        multipleExercise = new CommodityMultipleExercise(item);
                    }
                }
            }
        }
 public CommodityAmericanExercise(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList exercisePeriodNodeList = xmlNode.SelectNodes("exercisePeriod");
     if (exercisePeriodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in exercisePeriodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 exercisePeriodIDRef = item.Attributes["id"].Name;
                 CommodityExercisePeriods ob = CommodityExercisePeriods();
                 IDManager.SetID(exercisePeriodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 exercisePeriodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 exercisePeriod = new CommodityExercisePeriods(item);
             }
         }
     }
     
 
     XmlNodeList exerciseFrequencyNodeList = xmlNode.SelectNodes("exerciseFrequency");
     if (exerciseFrequencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in exerciseFrequencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 exerciseFrequencyIDRef = item.Attributes["id"].Name;
                 Frequency ob = Frequency();
                 IDManager.SetID(exerciseFrequencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 exerciseFrequencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 exerciseFrequency = new Frequency(item);
             }
         }
     }
     
 
     XmlNodeList latestExerciseTimeNodeList = xmlNode.SelectNodes("latestExerciseTime");
     if (latestExerciseTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in latestExerciseTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 latestExerciseTimeIDRef = item.Attributes["id"].Name;
                 BusinessCenterTime ob = BusinessCenterTime();
                 IDManager.SetID(latestExerciseTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 latestExerciseTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 latestExerciseTime = new BusinessCenterTime(item);
             }
         }
     }
     
 
     XmlNodeList latestExerciseTimeDeterminationNodeList = xmlNode.SelectNodes("latestExerciseTimeDetermination");
     if (latestExerciseTimeDeterminationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in latestExerciseTimeDeterminationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 latestExerciseTimeDeterminationIDRef = item.Attributes["id"].Name;
                 DeterminationMethod ob = DeterminationMethod();
                 IDManager.SetID(latestExerciseTimeDeterminationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 latestExerciseTimeDeterminationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 latestExerciseTimeDetermination = new DeterminationMethod(item);
             }
         }
     }
     
 
     XmlNodeList expirationTimeNodeList = xmlNode.SelectNodes("expirationTime");
     if (expirationTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in expirationTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 expirationTimeIDRef = item.Attributes["id"].Name;
                 BusinessCenterTime ob = BusinessCenterTime();
                 IDManager.SetID(expirationTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 expirationTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 expirationTime = new BusinessCenterTime(item);
             }
         }
     }
     
 
     XmlNodeList multipleExerciseNodeList = xmlNode.SelectNodes("multipleExercise");
     if (multipleExerciseNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in multipleExerciseNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 multipleExerciseIDRef = item.Attributes["id"].Name;
                 CommodityMultipleExercise ob = CommodityMultipleExercise();
                 IDManager.SetID(multipleExerciseIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 multipleExerciseIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 multipleExercise = new CommodityMultipleExercise(item);
             }
         }
     }
     
 
 }
        public CashSettlementTerms(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList valuationDateNodeList = xmlNode.SelectNodes("valuationDate");

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

            foreach (XmlNode item in valuationDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        valuationDateIDRef = item.Attributes["id"].Name;
                        ValuationDate ob = ValuationDate();
                        IDManager.SetID(valuationDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        valuationDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        valuationDate = new ValuationDate(item);
                    }
                }
            }


            XmlNodeList valuationTimeNodeList = xmlNode.SelectNodes("valuationTime");

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

            foreach (XmlNode item in valuationTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        valuationTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(valuationTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        valuationTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        valuationTime = new BusinessCenterTime(item);
                    }
                }
            }


            XmlNodeList quotationMethodNodeList = xmlNode.SelectNodes("quotationMethod");

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

            foreach (XmlNode item in quotationMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        quotationMethodIDRef = item.Attributes["id"].Name;
                        QuotationRateTypeEnum ob = QuotationRateTypeEnum();
                        IDManager.SetID(quotationMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        quotationMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        quotationMethod = new QuotationRateTypeEnum(item);
                    }
                }
            }


            XmlNodeList quotationAmountNodeList = xmlNode.SelectNodes("quotationAmount");

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

            foreach (XmlNode item in quotationAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        quotationAmountIDRef = item.Attributes["id"].Name;
                        Money ob = Money();
                        IDManager.SetID(quotationAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        quotationAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        quotationAmount = new Money(item);
                    }
                }
            }


            XmlNodeList minimumQuotationAmountNodeList = xmlNode.SelectNodes("minimumQuotationAmount");

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

            foreach (XmlNode item in minimumQuotationAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        minimumQuotationAmountIDRef = item.Attributes["id"].Name;
                        Money ob = Money();
                        IDManager.SetID(minimumQuotationAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        minimumQuotationAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        minimumQuotationAmount = new Money(item);
                    }
                }
            }


            XmlNodeList dealerNodeList = xmlNode.SelectNodes("dealer");

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


            XmlNodeList cashSettlementBusinessDaysNodeList = xmlNode.SelectNodes("cashSettlementBusinessDays");

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

            foreach (XmlNode item in cashSettlementBusinessDaysNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        cashSettlementBusinessDaysIDRef = item.Attributes["id"].Name;
                        XsdTypeNonNegativeInteger ob = XsdTypeNonNegativeInteger();
                        IDManager.SetID(cashSettlementBusinessDaysIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        cashSettlementBusinessDaysIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        cashSettlementBusinessDays = new XsdTypeNonNegativeInteger(item);
                    }
                }
            }


            XmlNodeList cashSettlementAmountNodeList = xmlNode.SelectNodes("cashSettlementAmount");

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

            foreach (XmlNode item in cashSettlementAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        cashSettlementAmountIDRef = item.Attributes["id"].Name;
                        Money ob = Money();
                        IDManager.SetID(cashSettlementAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        cashSettlementAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        cashSettlementAmount = new Money(item);
                    }
                }
            }


            XmlNodeList recoveryFactorNodeList = xmlNode.SelectNodes("recoveryFactor");

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

            foreach (XmlNode item in recoveryFactorNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        recoveryFactorIDRef = item.Attributes["id"].Name;
                        RestrictedPercentage ob = RestrictedPercentage();
                        IDManager.SetID(recoveryFactorIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        recoveryFactorIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        recoveryFactor = new RestrictedPercentage(item);
                    }
                }
            }


            XmlNodeList fixedSettlementNodeList = xmlNode.SelectNodes("fixedSettlement");

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

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


            XmlNodeList accruedInterestNodeList = xmlNode.SelectNodes("accruedInterest");

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

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


            XmlNodeList valuationMethodNodeList = xmlNode.SelectNodes("valuationMethod");

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

            foreach (XmlNode item in valuationMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        valuationMethodIDRef = item.Attributes["id"].Name;
                        ValuationMethodEnum ob = ValuationMethodEnum();
                        IDManager.SetID(valuationMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        valuationMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        valuationMethod = new ValuationMethodEnum(item);
                    }
                }
            }
        }
        public EquityBermudaExercise(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode bermudaExerciseDatesNode = xmlNode.SelectSingleNode("bermudaExerciseDates");

            if (bermudaExerciseDatesNode != null)
            {
                if (bermudaExerciseDatesNode.Attributes["href"] != null || bermudaExerciseDatesNode.Attributes["id"] != null)
                {
                    if (bermudaExerciseDatesNode.Attributes["id"] != null)
                    {
                        bermudaExerciseDatesIDRef_ = bermudaExerciseDatesNode.Attributes["id"].Value;
                        DateList ob = new DateList(bermudaExerciseDatesNode);
                        IDManager.SetID(bermudaExerciseDatesIDRef_, ob);
                    }
                    else if (bermudaExerciseDatesNode.Attributes["href"] != null)
                    {
                        bermudaExerciseDatesIDRef_ = bermudaExerciseDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        bermudaExerciseDates_ = new DateList(bermudaExerciseDatesNode);
                    }
                }
                else
                {
                    bermudaExerciseDates_ = new DateList(bermudaExerciseDatesNode);
                }
            }


            XmlNode latestExerciseTimeTypeNode = xmlNode.SelectSingleNode("latestExerciseTimeType");

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


            XmlNode equityExpirationTimeTypeNode = xmlNode.SelectSingleNode("equityExpirationTimeType");

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


            XmlNode equityExpirationTimeNode = xmlNode.SelectSingleNode("equityExpirationTime");

            if (equityExpirationTimeNode != null)
            {
                if (equityExpirationTimeNode.Attributes["href"] != null || equityExpirationTimeNode.Attributes["id"] != null)
                {
                    if (equityExpirationTimeNode.Attributes["id"] != null)
                    {
                        equityExpirationTimeIDRef_ = equityExpirationTimeNode.Attributes["id"].Value;
                        BusinessCenterTime ob = new BusinessCenterTime(equityExpirationTimeNode);
                        IDManager.SetID(equityExpirationTimeIDRef_, ob);
                    }
                    else if (equityExpirationTimeNode.Attributes["href"] != null)
                    {
                        equityExpirationTimeIDRef_ = equityExpirationTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        equityExpirationTime_ = new BusinessCenterTime(equityExpirationTimeNode);
                    }
                }
                else
                {
                    equityExpirationTime_ = new BusinessCenterTime(equityExpirationTimeNode);
                }
            }


            XmlNode expirationTimeDeterminationNode = xmlNode.SelectSingleNode("expirationTimeDetermination");

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


            XmlNode equityMultipleExerciseNode = xmlNode.SelectSingleNode("equityMultipleExercise");

            if (equityMultipleExerciseNode != null)
            {
                if (equityMultipleExerciseNode.Attributes["href"] != null || equityMultipleExerciseNode.Attributes["id"] != null)
                {
                    if (equityMultipleExerciseNode.Attributes["id"] != null)
                    {
                        equityMultipleExerciseIDRef_ = equityMultipleExerciseNode.Attributes["id"].Value;
                        EquityMultipleExercise ob = new EquityMultipleExercise(equityMultipleExerciseNode);
                        IDManager.SetID(equityMultipleExerciseIDRef_, ob);
                    }
                    else if (equityMultipleExerciseNode.Attributes["href"] != null)
                    {
                        equityMultipleExerciseIDRef_ = equityMultipleExerciseNode.Attributes["href"].Value;
                    }
                    else
                    {
                        equityMultipleExercise_ = new EquityMultipleExercise(equityMultipleExerciseNode);
                    }
                }
                else
                {
                    equityMultipleExercise_ = new EquityMultipleExercise(equityMultipleExerciseNode);
                }
            }
        }
 public EquityValuation(XmlNode xmlNode)
 {
     XmlNodeList valuationDateNodeList = xmlNode.SelectNodes("valuationDate");
     if (valuationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in valuationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 valuationDateIDRef = item.Attributes["id"].Name;
                 AdjustableDateOrRelativeDateSequence ob = AdjustableDateOrRelativeDateSequence();
                 IDManager.SetID(valuationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 valuationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 valuationDate = new AdjustableDateOrRelativeDateSequence(item);
             }
         }
     }
     
 
     XmlNodeList valuationDatesNodeList = xmlNode.SelectNodes("valuationDates");
     if (valuationDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in valuationDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 valuationDatesIDRef = item.Attributes["id"].Name;
                 AdjustableRelativeOrPeriodicDates ob = AdjustableRelativeOrPeriodicDates();
                 IDManager.SetID(valuationDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 valuationDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 valuationDates = new AdjustableRelativeOrPeriodicDates(item);
             }
         }
     }
     
 
     XmlNodeList valuationTimeTypeNodeList = xmlNode.SelectNodes("valuationTimeType");
     if (valuationTimeTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in valuationTimeTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 valuationTimeTypeIDRef = item.Attributes["id"].Name;
                 TimeTypeEnum ob = TimeTypeEnum();
                 IDManager.SetID(valuationTimeTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 valuationTimeTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 valuationTimeType = new TimeTypeEnum(item);
             }
         }
     }
     
 
     XmlNodeList valuationTimeNodeList = xmlNode.SelectNodes("valuationTime");
     if (valuationTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in valuationTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 valuationTimeIDRef = item.Attributes["id"].Name;
                 BusinessCenterTime ob = BusinessCenterTime();
                 IDManager.SetID(valuationTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 valuationTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 valuationTime = new BusinessCenterTime(item);
             }
         }
     }
     
 
     XmlNodeList futuresPriceValuationNodeList = xmlNode.SelectNodes("futuresPriceValuation");
     if (futuresPriceValuationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in futuresPriceValuationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 futuresPriceValuationIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(futuresPriceValuationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 futuresPriceValuationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 futuresPriceValuation = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList optionsPriceValuationNodeList = xmlNode.SelectNodes("optionsPriceValuation");
     if (optionsPriceValuationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in optionsPriceValuationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 optionsPriceValuationIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(optionsPriceValuationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 optionsPriceValuationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 optionsPriceValuation = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList numberOfValuationDatesNodeList = xmlNode.SelectNodes("numberOfValuationDates");
     if (numberOfValuationDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in numberOfValuationDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 numberOfValuationDatesIDRef = item.Attributes["id"].Name;
                 XsdTypeNonNegativeInteger ob = XsdTypeNonNegativeInteger();
                 IDManager.SetID(numberOfValuationDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 numberOfValuationDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 numberOfValuationDates = new XsdTypeNonNegativeInteger(item);
             }
         }
     }
     
 
     XmlNodeList dividendValuationDatesNodeList = xmlNode.SelectNodes("dividendValuationDates");
     if (dividendValuationDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in dividendValuationDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 dividendValuationDatesIDRef = item.Attributes["id"].Name;
                 AdjustableRelativeOrPeriodicDates ob = AdjustableRelativeOrPeriodicDates();
                 IDManager.SetID(dividendValuationDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 dividendValuationDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 dividendValuationDates = new AdjustableRelativeOrPeriodicDates(item);
             }
         }
     }
     
 
     XmlNodeList fPVFinalPriceElectionFallbackNodeList = xmlNode.SelectNodes("fPVFinalPriceElectionFallback");
     if (fPVFinalPriceElectionFallbackNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fPVFinalPriceElectionFallbackNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fPVFinalPriceElectionFallbackIDRef = item.Attributes["id"].Name;
                 FPVFinalPriceElectionFallbackEnum ob = FPVFinalPriceElectionFallbackEnum();
                 IDManager.SetID(fPVFinalPriceElectionFallbackIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fPVFinalPriceElectionFallbackIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fPVFinalPriceElectionFallback = new FPVFinalPriceElectionFallbackEnum(item);
             }
         }
     }
     
 
 }
 public FxSpotRateSource(XmlNode xmlNode)
 {
     XmlNode primaryRateSourceNode = xmlNode.SelectSingleNode("primaryRateSource");
     
     if (primaryRateSourceNode != null)
     {
         if (primaryRateSourceNode.Attributes["href"] != null || primaryRateSourceNode.Attributes["id"] != null) 
         {
             if (primaryRateSourceNode.Attributes["id"] != null) 
             {
                 primaryRateSourceIDRef_ = primaryRateSourceNode.Attributes["id"].Value;
                 InformationSource ob = new InformationSource(primaryRateSourceNode);
                 IDManager.SetID(primaryRateSourceIDRef_, ob);
             }
             else if (primaryRateSourceNode.Attributes["href"] != null)
             {
                 primaryRateSourceIDRef_ = primaryRateSourceNode.Attributes["href"].Value;
             }
             else
             {
                 primaryRateSource_ = new InformationSource(primaryRateSourceNode);
             }
         }
         else
         {
             primaryRateSource_ = new InformationSource(primaryRateSourceNode);
         }
     }
     
 
     XmlNode secondaryRateSourceNode = xmlNode.SelectSingleNode("secondaryRateSource");
     
     if (secondaryRateSourceNode != null)
     {
         if (secondaryRateSourceNode.Attributes["href"] != null || secondaryRateSourceNode.Attributes["id"] != null) 
         {
             if (secondaryRateSourceNode.Attributes["id"] != null) 
             {
                 secondaryRateSourceIDRef_ = secondaryRateSourceNode.Attributes["id"].Value;
                 InformationSource ob = new InformationSource(secondaryRateSourceNode);
                 IDManager.SetID(secondaryRateSourceIDRef_, ob);
             }
             else if (secondaryRateSourceNode.Attributes["href"] != null)
             {
                 secondaryRateSourceIDRef_ = secondaryRateSourceNode.Attributes["href"].Value;
             }
             else
             {
                 secondaryRateSource_ = new InformationSource(secondaryRateSourceNode);
             }
         }
         else
         {
             secondaryRateSource_ = new InformationSource(secondaryRateSourceNode);
         }
     }
     
 
     XmlNode fixingTimeNode = xmlNode.SelectSingleNode("fixingTime");
     
     if (fixingTimeNode != null)
     {
         if (fixingTimeNode.Attributes["href"] != null || fixingTimeNode.Attributes["id"] != null) 
         {
             if (fixingTimeNode.Attributes["id"] != null) 
             {
                 fixingTimeIDRef_ = fixingTimeNode.Attributes["id"].Value;
                 BusinessCenterTime ob = new BusinessCenterTime(fixingTimeNode);
                 IDManager.SetID(fixingTimeIDRef_, ob);
             }
             else if (fixingTimeNode.Attributes["href"] != null)
             {
                 fixingTimeIDRef_ = fixingTimeNode.Attributes["href"].Value;
             }
             else
             {
                 fixingTime_ = new BusinessCenterTime(fixingTimeNode);
             }
         }
         else
         {
             fixingTime_ = new BusinessCenterTime(fixingTimeNode);
         }
     }
     
 
 }
        public FxEuropeanExercise(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList expiryDateNodeList = xmlNode.SelectNodes("expiryDate");

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

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


            XmlNodeList expiryTimeNodeList = xmlNode.SelectNodes("expiryTime");

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

            foreach (XmlNode item in expiryTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        expiryTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(expiryTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        expiryTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        expiryTime = new BusinessCenterTime(item);
                    }
                }
            }


            XmlNodeList cutNameNodeList = xmlNode.SelectNodes("cutName");

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

            foreach (XmlNode item in cutNameNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        cutNameIDRef = item.Attributes["id"].Name;
                        CutName ob = CutName();
                        IDManager.SetID(cutNameIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        cutNameIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        cutName = new CutName(item);
                    }
                }
            }


            XmlNodeList valueDateNodeList = xmlNode.SelectNodes("valueDate");

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

            foreach (XmlNode item in valueDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        valueDateIDRef = item.Attributes["id"].Name;
                        XsdTypeDate ob = XsdTypeDate();
                        IDManager.SetID(valueDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        valueDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        valueDate = new XsdTypeDate(item);
                    }
                }
            }
        }
 public FxEuropeanExercise(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList expiryDateNodeList = xmlNode.SelectNodes("expiryDate");
     if (expiryDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in expiryDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 expiryDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(expiryDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 expiryDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 expiryDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList expiryTimeNodeList = xmlNode.SelectNodes("expiryTime");
     if (expiryTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in expiryTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 expiryTimeIDRef = item.Attributes["id"].Name;
                 BusinessCenterTime ob = BusinessCenterTime();
                 IDManager.SetID(expiryTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 expiryTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 expiryTime = new BusinessCenterTime(item);
             }
         }
     }
     
 
     XmlNodeList cutNameNodeList = xmlNode.SelectNodes("cutName");
     if (cutNameNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cutNameNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cutNameIDRef = item.Attributes["id"].Name;
                 CutName ob = CutName();
                 IDManager.SetID(cutNameIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cutNameIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cutName = new CutName(item);
             }
         }
     }
     
 
     XmlNodeList valueDateNodeList = xmlNode.SelectNodes("valueDate");
     if (valueDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in valueDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 valueDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(valueDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 valueDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 valueDate = new XsdTypeDate(item);
             }
         }
     }
     
 
 }
Example #34
0
        public EquityValuation(XmlNode xmlNode)
        {
            XmlNode valuationDateNode = xmlNode.SelectSingleNode("valuationDate");

            if (valuationDateNode != null)
            {
                if (valuationDateNode.Attributes["href"] != null || valuationDateNode.Attributes["id"] != null)
                {
                    if (valuationDateNode.Attributes["id"] != null)
                    {
                        valuationDateIDRef_ = valuationDateNode.Attributes["id"].Value;
                        AdjustableDateOrRelativeDateSequence ob = new AdjustableDateOrRelativeDateSequence(valuationDateNode);
                        IDManager.SetID(valuationDateIDRef_, ob);
                    }
                    else if (valuationDateNode.Attributes["href"] != null)
                    {
                        valuationDateIDRef_ = valuationDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        valuationDate_ = new AdjustableDateOrRelativeDateSequence(valuationDateNode);
                    }
                }
                else
                {
                    valuationDate_ = new AdjustableDateOrRelativeDateSequence(valuationDateNode);
                }
            }


            XmlNode valuationDatesNode = xmlNode.SelectSingleNode("valuationDates");

            if (valuationDatesNode != null)
            {
                if (valuationDatesNode.Attributes["href"] != null || valuationDatesNode.Attributes["id"] != null)
                {
                    if (valuationDatesNode.Attributes["id"] != null)
                    {
                        valuationDatesIDRef_ = valuationDatesNode.Attributes["id"].Value;
                        AdjustableRelativeOrPeriodicDates ob = new AdjustableRelativeOrPeriodicDates(valuationDatesNode);
                        IDManager.SetID(valuationDatesIDRef_, ob);
                    }
                    else if (valuationDatesNode.Attributes["href"] != null)
                    {
                        valuationDatesIDRef_ = valuationDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        valuationDates_ = new AdjustableRelativeOrPeriodicDates(valuationDatesNode);
                    }
                }
                else
                {
                    valuationDates_ = new AdjustableRelativeOrPeriodicDates(valuationDatesNode);
                }
            }


            XmlNode valuationTimeTypeNode = xmlNode.SelectSingleNode("valuationTimeType");

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


            XmlNode valuationTimeNode = xmlNode.SelectSingleNode("valuationTime");

            if (valuationTimeNode != null)
            {
                if (valuationTimeNode.Attributes["href"] != null || valuationTimeNode.Attributes["id"] != null)
                {
                    if (valuationTimeNode.Attributes["id"] != null)
                    {
                        valuationTimeIDRef_ = valuationTimeNode.Attributes["id"].Value;
                        BusinessCenterTime ob = new BusinessCenterTime(valuationTimeNode);
                        IDManager.SetID(valuationTimeIDRef_, ob);
                    }
                    else if (valuationTimeNode.Attributes["href"] != null)
                    {
                        valuationTimeIDRef_ = valuationTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        valuationTime_ = new BusinessCenterTime(valuationTimeNode);
                    }
                }
                else
                {
                    valuationTime_ = new BusinessCenterTime(valuationTimeNode);
                }
            }


            XmlNode futuresPriceValuationNode = xmlNode.SelectSingleNode("futuresPriceValuation");

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


            XmlNode optionsPriceValuationNode = xmlNode.SelectSingleNode("optionsPriceValuation");

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


            XmlNode numberOfValuationDatesNode = xmlNode.SelectSingleNode("numberOfValuationDates");

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


            XmlNode dividendValuationDatesNode = xmlNode.SelectSingleNode("dividendValuationDates");

            if (dividendValuationDatesNode != null)
            {
                if (dividendValuationDatesNode.Attributes["href"] != null || dividendValuationDatesNode.Attributes["id"] != null)
                {
                    if (dividendValuationDatesNode.Attributes["id"] != null)
                    {
                        dividendValuationDatesIDRef_ = dividendValuationDatesNode.Attributes["id"].Value;
                        AdjustableRelativeOrPeriodicDates ob = new AdjustableRelativeOrPeriodicDates(dividendValuationDatesNode);
                        IDManager.SetID(dividendValuationDatesIDRef_, ob);
                    }
                    else if (dividendValuationDatesNode.Attributes["href"] != null)
                    {
                        dividendValuationDatesIDRef_ = dividendValuationDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dividendValuationDates_ = new AdjustableRelativeOrPeriodicDates(dividendValuationDatesNode);
                    }
                }
                else
                {
                    dividendValuationDates_ = new AdjustableRelativeOrPeriodicDates(dividendValuationDatesNode);
                }
            }


            XmlNode fPVFinalPriceElectionFallbackNode = xmlNode.SelectSingleNode("fPVFinalPriceElectionFallback");

            if (fPVFinalPriceElectionFallbackNode != null)
            {
                if (fPVFinalPriceElectionFallbackNode.Attributes["href"] != null || fPVFinalPriceElectionFallbackNode.Attributes["id"] != null)
                {
                    if (fPVFinalPriceElectionFallbackNode.Attributes["id"] != null)
                    {
                        fPVFinalPriceElectionFallbackIDRef_ = fPVFinalPriceElectionFallbackNode.Attributes["id"].Value;
                        FPVFinalPriceElectionFallbackEnum ob = new FPVFinalPriceElectionFallbackEnum(fPVFinalPriceElectionFallbackNode);
                        IDManager.SetID(fPVFinalPriceElectionFallbackIDRef_, ob);
                    }
                    else if (fPVFinalPriceElectionFallbackNode.Attributes["href"] != null)
                    {
                        fPVFinalPriceElectionFallbackIDRef_ = fPVFinalPriceElectionFallbackNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fPVFinalPriceElectionFallback_ = new FPVFinalPriceElectionFallbackEnum(fPVFinalPriceElectionFallbackNode);
                    }
                }
                else
                {
                    fPVFinalPriceElectionFallback_ = new FPVFinalPriceElectionFallbackEnum(fPVFinalPriceElectionFallbackNode);
                }
            }
        }
Example #35
0
        public CashSettlementTerms(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode valuationDateNode = xmlNode.SelectSingleNode("valuationDate");

            if (valuationDateNode != null)
            {
                if (valuationDateNode.Attributes["href"] != null || valuationDateNode.Attributes["id"] != null)
                {
                    if (valuationDateNode.Attributes["id"] != null)
                    {
                        valuationDateIDRef_ = valuationDateNode.Attributes["id"].Value;
                        ValuationDate ob = new ValuationDate(valuationDateNode);
                        IDManager.SetID(valuationDateIDRef_, ob);
                    }
                    else if (valuationDateNode.Attributes["href"] != null)
                    {
                        valuationDateIDRef_ = valuationDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        valuationDate_ = new ValuationDate(valuationDateNode);
                    }
                }
                else
                {
                    valuationDate_ = new ValuationDate(valuationDateNode);
                }
            }


            XmlNode valuationTimeNode = xmlNode.SelectSingleNode("valuationTime");

            if (valuationTimeNode != null)
            {
                if (valuationTimeNode.Attributes["href"] != null || valuationTimeNode.Attributes["id"] != null)
                {
                    if (valuationTimeNode.Attributes["id"] != null)
                    {
                        valuationTimeIDRef_ = valuationTimeNode.Attributes["id"].Value;
                        BusinessCenterTime ob = new BusinessCenterTime(valuationTimeNode);
                        IDManager.SetID(valuationTimeIDRef_, ob);
                    }
                    else if (valuationTimeNode.Attributes["href"] != null)
                    {
                        valuationTimeIDRef_ = valuationTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        valuationTime_ = new BusinessCenterTime(valuationTimeNode);
                    }
                }
                else
                {
                    valuationTime_ = new BusinessCenterTime(valuationTimeNode);
                }
            }


            XmlNode quotationMethodNode = xmlNode.SelectSingleNode("quotationMethod");

            if (quotationMethodNode != null)
            {
                if (quotationMethodNode.Attributes["href"] != null || quotationMethodNode.Attributes["id"] != null)
                {
                    if (quotationMethodNode.Attributes["id"] != null)
                    {
                        quotationMethodIDRef_ = quotationMethodNode.Attributes["id"].Value;
                        QuotationRateTypeEnum ob = new QuotationRateTypeEnum(quotationMethodNode);
                        IDManager.SetID(quotationMethodIDRef_, ob);
                    }
                    else if (quotationMethodNode.Attributes["href"] != null)
                    {
                        quotationMethodIDRef_ = quotationMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        quotationMethod_ = new QuotationRateTypeEnum(quotationMethodNode);
                    }
                }
                else
                {
                    quotationMethod_ = new QuotationRateTypeEnum(quotationMethodNode);
                }
            }


            XmlNode quotationAmountNode = xmlNode.SelectSingleNode("quotationAmount");

            if (quotationAmountNode != null)
            {
                if (quotationAmountNode.Attributes["href"] != null || quotationAmountNode.Attributes["id"] != null)
                {
                    if (quotationAmountNode.Attributes["id"] != null)
                    {
                        quotationAmountIDRef_ = quotationAmountNode.Attributes["id"].Value;
                        Money ob = new Money(quotationAmountNode);
                        IDManager.SetID(quotationAmountIDRef_, ob);
                    }
                    else if (quotationAmountNode.Attributes["href"] != null)
                    {
                        quotationAmountIDRef_ = quotationAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        quotationAmount_ = new Money(quotationAmountNode);
                    }
                }
                else
                {
                    quotationAmount_ = new Money(quotationAmountNode);
                }
            }


            XmlNode minimumQuotationAmountNode = xmlNode.SelectSingleNode("minimumQuotationAmount");

            if (minimumQuotationAmountNode != null)
            {
                if (minimumQuotationAmountNode.Attributes["href"] != null || minimumQuotationAmountNode.Attributes["id"] != null)
                {
                    if (minimumQuotationAmountNode.Attributes["id"] != null)
                    {
                        minimumQuotationAmountIDRef_ = minimumQuotationAmountNode.Attributes["id"].Value;
                        Money ob = new Money(minimumQuotationAmountNode);
                        IDManager.SetID(minimumQuotationAmountIDRef_, ob);
                    }
                    else if (minimumQuotationAmountNode.Attributes["href"] != null)
                    {
                        minimumQuotationAmountIDRef_ = minimumQuotationAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        minimumQuotationAmount_ = new Money(minimumQuotationAmountNode);
                    }
                }
                else
                {
                    minimumQuotationAmount_ = new Money(minimumQuotationAmountNode);
                }
            }


            XmlNodeList dealerNodeList = xmlNode.SelectNodes("dealer");

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


            XmlNode cashSettlementBusinessDaysNode = xmlNode.SelectSingleNode("cashSettlementBusinessDays");

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


            XmlNode cashSettlementAmountNode = xmlNode.SelectSingleNode("cashSettlementAmount");

            if (cashSettlementAmountNode != null)
            {
                if (cashSettlementAmountNode.Attributes["href"] != null || cashSettlementAmountNode.Attributes["id"] != null)
                {
                    if (cashSettlementAmountNode.Attributes["id"] != null)
                    {
                        cashSettlementAmountIDRef_ = cashSettlementAmountNode.Attributes["id"].Value;
                        Money ob = new Money(cashSettlementAmountNode);
                        IDManager.SetID(cashSettlementAmountIDRef_, ob);
                    }
                    else if (cashSettlementAmountNode.Attributes["href"] != null)
                    {
                        cashSettlementAmountIDRef_ = cashSettlementAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        cashSettlementAmount_ = new Money(cashSettlementAmountNode);
                    }
                }
                else
                {
                    cashSettlementAmount_ = new Money(cashSettlementAmountNode);
                }
            }


            XmlNode recoveryFactorNode = xmlNode.SelectSingleNode("recoveryFactor");

            if (recoveryFactorNode != null)
            {
                if (recoveryFactorNode.Attributes["href"] != null || recoveryFactorNode.Attributes["id"] != null)
                {
                    if (recoveryFactorNode.Attributes["id"] != null)
                    {
                        recoveryFactorIDRef_ = recoveryFactorNode.Attributes["id"].Value;
                        RestrictedPercentage ob = new RestrictedPercentage(recoveryFactorNode);
                        IDManager.SetID(recoveryFactorIDRef_, ob);
                    }
                    else if (recoveryFactorNode.Attributes["href"] != null)
                    {
                        recoveryFactorIDRef_ = recoveryFactorNode.Attributes["href"].Value;
                    }
                    else
                    {
                        recoveryFactor_ = new RestrictedPercentage(recoveryFactorNode);
                    }
                }
                else
                {
                    recoveryFactor_ = new RestrictedPercentage(recoveryFactorNode);
                }
            }


            XmlNode fixedSettlementNode = xmlNode.SelectSingleNode("fixedSettlement");

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


            XmlNode accruedInterestNode = xmlNode.SelectSingleNode("accruedInterest");

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


            XmlNode valuationMethodNode = xmlNode.SelectSingleNode("valuationMethod");

            if (valuationMethodNode != null)
            {
                if (valuationMethodNode.Attributes["href"] != null || valuationMethodNode.Attributes["id"] != null)
                {
                    if (valuationMethodNode.Attributes["id"] != null)
                    {
                        valuationMethodIDRef_ = valuationMethodNode.Attributes["id"].Value;
                        ValuationMethodEnum ob = new ValuationMethodEnum(valuationMethodNode);
                        IDManager.SetID(valuationMethodIDRef_, ob);
                    }
                    else if (valuationMethodNode.Attributes["href"] != null)
                    {
                        valuationMethodIDRef_ = valuationMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        valuationMethod_ = new ValuationMethodEnum(valuationMethodNode);
                    }
                }
                else
                {
                    valuationMethod_ = new ValuationMethodEnum(valuationMethodNode);
                }
            }
        }
Example #36
0
        public CommodityFx(XmlNode xmlNode)
        {
            XmlNode primaryRateSourceNode = xmlNode.SelectSingleNode("primaryRateSource");

            if (primaryRateSourceNode != null)
            {
                if (primaryRateSourceNode.Attributes["href"] != null || primaryRateSourceNode.Attributes["id"] != null)
                {
                    if (primaryRateSourceNode.Attributes["id"] != null)
                    {
                        primaryRateSourceIDRef_ = primaryRateSourceNode.Attributes["id"].Value;
                        InformationSource ob = new InformationSource(primaryRateSourceNode);
                        IDManager.SetID(primaryRateSourceIDRef_, ob);
                    }
                    else if (primaryRateSourceNode.Attributes["href"] != null)
                    {
                        primaryRateSourceIDRef_ = primaryRateSourceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        primaryRateSource_ = new InformationSource(primaryRateSourceNode);
                    }
                }
                else
                {
                    primaryRateSource_ = new InformationSource(primaryRateSourceNode);
                }
            }


            XmlNode secondaryRateSourceNode = xmlNode.SelectSingleNode("secondaryRateSource");

            if (secondaryRateSourceNode != null)
            {
                if (secondaryRateSourceNode.Attributes["href"] != null || secondaryRateSourceNode.Attributes["id"] != null)
                {
                    if (secondaryRateSourceNode.Attributes["id"] != null)
                    {
                        secondaryRateSourceIDRef_ = secondaryRateSourceNode.Attributes["id"].Value;
                        InformationSource ob = new InformationSource(secondaryRateSourceNode);
                        IDManager.SetID(secondaryRateSourceIDRef_, ob);
                    }
                    else if (secondaryRateSourceNode.Attributes["href"] != null)
                    {
                        secondaryRateSourceIDRef_ = secondaryRateSourceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        secondaryRateSource_ = new InformationSource(secondaryRateSourceNode);
                    }
                }
                else
                {
                    secondaryRateSource_ = new InformationSource(secondaryRateSourceNode);
                }
            }


            XmlNode fxTypeNode = xmlNode.SelectSingleNode("fxType");

            if (fxTypeNode != null)
            {
                if (fxTypeNode.Attributes["href"] != null || fxTypeNode.Attributes["id"] != null)
                {
                    if (fxTypeNode.Attributes["id"] != null)
                    {
                        fxTypeIDRef_ = fxTypeNode.Attributes["id"].Value;
                        CommodityFxType ob = new CommodityFxType(fxTypeNode);
                        IDManager.SetID(fxTypeIDRef_, ob);
                    }
                    else if (fxTypeNode.Attributes["href"] != null)
                    {
                        fxTypeIDRef_ = fxTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fxType_ = new CommodityFxType(fxTypeNode);
                    }
                }
                else
                {
                    fxType_ = new CommodityFxType(fxTypeNode);
                }
            }


            XmlNode averagingMethodNode = xmlNode.SelectSingleNode("averagingMethod");

            if (averagingMethodNode != null)
            {
                if (averagingMethodNode.Attributes["href"] != null || averagingMethodNode.Attributes["id"] != null)
                {
                    if (averagingMethodNode.Attributes["id"] != null)
                    {
                        averagingMethodIDRef_ = averagingMethodNode.Attributes["id"].Value;
                        AveragingMethodEnum ob = new AveragingMethodEnum(averagingMethodNode);
                        IDManager.SetID(averagingMethodIDRef_, ob);
                    }
                    else if (averagingMethodNode.Attributes["href"] != null)
                    {
                        averagingMethodIDRef_ = averagingMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        averagingMethod_ = new AveragingMethodEnum(averagingMethodNode);
                    }
                }
                else
                {
                    averagingMethod_ = new AveragingMethodEnum(averagingMethodNode);
                }
            }


            XmlNode fixingTimeNode = xmlNode.SelectSingleNode("fixingTime");

            if (fixingTimeNode != null)
            {
                if (fixingTimeNode.Attributes["href"] != null || fixingTimeNode.Attributes["id"] != null)
                {
                    if (fixingTimeNode.Attributes["id"] != null)
                    {
                        fixingTimeIDRef_ = fixingTimeNode.Attributes["id"].Value;
                        BusinessCenterTime ob = new BusinessCenterTime(fixingTimeNode);
                        IDManager.SetID(fixingTimeIDRef_, ob);
                    }
                    else if (fixingTimeNode.Attributes["href"] != null)
                    {
                        fixingTimeIDRef_ = fixingTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fixingTime_ = new BusinessCenterTime(fixingTimeNode);
                    }
                }
                else
                {
                    fixingTime_ = new BusinessCenterTime(fixingTimeNode);
                }
            }


            XmlNodeList fxObservationDatesNodeList = xmlNode.SelectNodes("fxObservationDates");

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


            XmlNode dayTypeNode = xmlNode.SelectSingleNode("dayType");

            if (dayTypeNode != null)
            {
                if (dayTypeNode.Attributes["href"] != null || dayTypeNode.Attributes["id"] != null)
                {
                    if (dayTypeNode.Attributes["id"] != null)
                    {
                        dayTypeIDRef_ = dayTypeNode.Attributes["id"].Value;
                        CommodityDayTypeEnum ob = new CommodityDayTypeEnum(dayTypeNode);
                        IDManager.SetID(dayTypeIDRef_, ob);
                    }
                    else if (dayTypeNode.Attributes["href"] != null)
                    {
                        dayTypeIDRef_ = dayTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dayType_ = new CommodityDayTypeEnum(dayTypeNode);
                    }
                }
                else
                {
                    dayType_ = new CommodityDayTypeEnum(dayTypeNode);
                }
            }


            XmlNode dayDistributionNode = xmlNode.SelectSingleNode("dayDistribution");

            if (dayDistributionNode != null)
            {
                if (dayDistributionNode.Attributes["href"] != null || dayDistributionNode.Attributes["id"] != null)
                {
                    if (dayDistributionNode.Attributes["id"] != null)
                    {
                        dayDistributionIDRef_ = dayDistributionNode.Attributes["id"].Value;
                        CommodityFrequencyType ob = new CommodityFrequencyType(dayDistributionNode);
                        IDManager.SetID(dayDistributionIDRef_, ob);
                    }
                    else if (dayDistributionNode.Attributes["href"] != null)
                    {
                        dayDistributionIDRef_ = dayDistributionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dayDistribution_ = new CommodityFrequencyType(dayDistributionNode);
                    }
                }
                else
                {
                    dayDistribution_ = new CommodityFrequencyType(dayDistributionNode);
                }
            }


            XmlNode dayCountNode = xmlNode.SelectSingleNode("dayCount");

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


            XmlNodeList dayOfWeekNodeList = xmlNode.SelectNodes("dayOfWeek");

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


            XmlNode dayNumberNode = xmlNode.SelectSingleNode("dayNumber");

            if (dayNumberNode != null)
            {
                if (dayNumberNode.Attributes["href"] != null || dayNumberNode.Attributes["id"] != null)
                {
                    if (dayNumberNode.Attributes["id"] != null)
                    {
                        dayNumberIDRef_ = dayNumberNode.Attributes["id"].Value;
                        XsdTypeInteger ob = new XsdTypeInteger(dayNumberNode);
                        IDManager.SetID(dayNumberIDRef_, ob);
                    }
                    else if (dayNumberNode.Attributes["href"] != null)
                    {
                        dayNumberIDRef_ = dayNumberNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dayNumber_ = new XsdTypeInteger(dayNumberNode);
                    }
                }
                else
                {
                    dayNumber_ = new XsdTypeInteger(dayNumberNode);
                }
            }


            XmlNode lagNode = xmlNode.SelectSingleNode("lag");

            if (lagNode != null)
            {
                if (lagNode.Attributes["href"] != null || lagNode.Attributes["id"] != null)
                {
                    if (lagNode.Attributes["id"] != null)
                    {
                        lagIDRef_ = lagNode.Attributes["id"].Value;
                        Lag ob = new Lag(lagNode);
                        IDManager.SetID(lagIDRef_, ob);
                    }
                    else if (lagNode.Attributes["href"] != null)
                    {
                        lagIDRef_ = lagNode.Attributes["href"].Value;
                    }
                    else
                    {
                        lag_ = new Lag(lagNode);
                    }
                }
                else
                {
                    lag_ = new Lag(lagNode);
                }
            }


            XmlNode lagReferenceNode = xmlNode.SelectSingleNode("lagReference");

            if (lagReferenceNode != null)
            {
                if (lagReferenceNode.Attributes["href"] != null || lagReferenceNode.Attributes["id"] != null)
                {
                    if (lagReferenceNode.Attributes["id"] != null)
                    {
                        lagReferenceIDRef_ = lagReferenceNode.Attributes["id"].Value;
                        LagReference ob = new LagReference(lagReferenceNode);
                        IDManager.SetID(lagReferenceIDRef_, ob);
                    }
                    else if (lagReferenceNode.Attributes["href"] != null)
                    {
                        lagReferenceIDRef_ = lagReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        lagReference_ = new LagReference(lagReferenceNode);
                    }
                }
                else
                {
                    lagReference_ = new LagReference(lagReferenceNode);
                }
            }


            XmlNode calculationPeriodsReferenceNode = xmlNode.SelectSingleNode("calculationPeriodsReference");

            if (calculationPeriodsReferenceNode != null)
            {
                if (calculationPeriodsReferenceNode.Attributes["href"] != null || calculationPeriodsReferenceNode.Attributes["id"] != null)
                {
                    if (calculationPeriodsReferenceNode.Attributes["id"] != null)
                    {
                        calculationPeriodsReferenceIDRef_ = calculationPeriodsReferenceNode.Attributes["id"].Value;
                        CalculationPeriodsReference ob = new CalculationPeriodsReference(calculationPeriodsReferenceNode);
                        IDManager.SetID(calculationPeriodsReferenceIDRef_, ob);
                    }
                    else if (calculationPeriodsReferenceNode.Attributes["href"] != null)
                    {
                        calculationPeriodsReferenceIDRef_ = calculationPeriodsReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodsReference_ = new CalculationPeriodsReference(calculationPeriodsReferenceNode);
                    }
                }
                else
                {
                    calculationPeriodsReference_ = new CalculationPeriodsReference(calculationPeriodsReferenceNode);
                }
            }


            XmlNode calculationPeriodsScheduleReferenceNode = xmlNode.SelectSingleNode("calculationPeriodsScheduleReference");

            if (calculationPeriodsScheduleReferenceNode != null)
            {
                if (calculationPeriodsScheduleReferenceNode.Attributes["href"] != null || calculationPeriodsScheduleReferenceNode.Attributes["id"] != null)
                {
                    if (calculationPeriodsScheduleReferenceNode.Attributes["id"] != null)
                    {
                        calculationPeriodsScheduleReferenceIDRef_ = calculationPeriodsScheduleReferenceNode.Attributes["id"].Value;
                        CalculationPeriodsScheduleReference ob = new CalculationPeriodsScheduleReference(calculationPeriodsScheduleReferenceNode);
                        IDManager.SetID(calculationPeriodsScheduleReferenceIDRef_, ob);
                    }
                    else if (calculationPeriodsScheduleReferenceNode.Attributes["href"] != null)
                    {
                        calculationPeriodsScheduleReferenceIDRef_ = calculationPeriodsScheduleReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodsScheduleReference_ = new CalculationPeriodsScheduleReference(calculationPeriodsScheduleReferenceNode);
                    }
                }
                else
                {
                    calculationPeriodsScheduleReference_ = new CalculationPeriodsScheduleReference(calculationPeriodsScheduleReferenceNode);
                }
            }


            XmlNode calculationPeriodsDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodsDatesReference");

            if (calculationPeriodsDatesReferenceNode != null)
            {
                if (calculationPeriodsDatesReferenceNode.Attributes["href"] != null || calculationPeriodsDatesReferenceNode.Attributes["id"] != null)
                {
                    if (calculationPeriodsDatesReferenceNode.Attributes["id"] != null)
                    {
                        calculationPeriodsDatesReferenceIDRef_ = calculationPeriodsDatesReferenceNode.Attributes["id"].Value;
                        CalculationPeriodsDatesReference ob = new CalculationPeriodsDatesReference(calculationPeriodsDatesReferenceNode);
                        IDManager.SetID(calculationPeriodsDatesReferenceIDRef_, ob);
                    }
                    else if (calculationPeriodsDatesReferenceNode.Attributes["href"] != null)
                    {
                        calculationPeriodsDatesReferenceIDRef_ = calculationPeriodsDatesReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodsDatesReference_ = new CalculationPeriodsDatesReference(calculationPeriodsDatesReferenceNode);
                    }
                }
                else
                {
                    calculationPeriodsDatesReference_ = new CalculationPeriodsDatesReference(calculationPeriodsDatesReferenceNode);
                }
            }
        }
 public CashSettlementTerms(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList valuationDateNodeList = xmlNode.SelectNodes("valuationDate");
     if (valuationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in valuationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 valuationDateIDRef = item.Attributes["id"].Name;
                 ValuationDate ob = ValuationDate();
                 IDManager.SetID(valuationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 valuationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 valuationDate = new ValuationDate(item);
             }
         }
     }
     
 
     XmlNodeList valuationTimeNodeList = xmlNode.SelectNodes("valuationTime");
     if (valuationTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in valuationTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 valuationTimeIDRef = item.Attributes["id"].Name;
                 BusinessCenterTime ob = BusinessCenterTime();
                 IDManager.SetID(valuationTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 valuationTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 valuationTime = new BusinessCenterTime(item);
             }
         }
     }
     
 
     XmlNodeList quotationMethodNodeList = xmlNode.SelectNodes("quotationMethod");
     if (quotationMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in quotationMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 quotationMethodIDRef = item.Attributes["id"].Name;
                 QuotationRateTypeEnum ob = QuotationRateTypeEnum();
                 IDManager.SetID(quotationMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 quotationMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 quotationMethod = new QuotationRateTypeEnum(item);
             }
         }
     }
     
 
     XmlNodeList quotationAmountNodeList = xmlNode.SelectNodes("quotationAmount");
     if (quotationAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in quotationAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 quotationAmountIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(quotationAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 quotationAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 quotationAmount = new Money(item);
             }
         }
     }
     
 
     XmlNodeList minimumQuotationAmountNodeList = xmlNode.SelectNodes("minimumQuotationAmount");
     if (minimumQuotationAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in minimumQuotationAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 minimumQuotationAmountIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(minimumQuotationAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 minimumQuotationAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 minimumQuotationAmount = new Money(item);
             }
         }
     }
     
 
     XmlNodeList dealerNodeList = xmlNode.SelectNodes("dealer");
     
     foreach (XmlNode item in dealerNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 dealerIDRef = item.Attributes["id"].Name;
                 XsdTypeString ob = new XsdTypeString();
                 ob.Add(new XsdTypeString(item));
                 IDManager.SetID(dealerIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 dealerIDRef = item.Attributes["href"].Name;
             }
             else
             {
             dealer.Add(new XsdTypeString(item));
             }
         }
     }
     
 
     XmlNodeList cashSettlementBusinessDaysNodeList = xmlNode.SelectNodes("cashSettlementBusinessDays");
     if (cashSettlementBusinessDaysNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cashSettlementBusinessDaysNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cashSettlementBusinessDaysIDRef = item.Attributes["id"].Name;
                 XsdTypeNonNegativeInteger ob = XsdTypeNonNegativeInteger();
                 IDManager.SetID(cashSettlementBusinessDaysIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cashSettlementBusinessDaysIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cashSettlementBusinessDays = new XsdTypeNonNegativeInteger(item);
             }
         }
     }
     
 
     XmlNodeList cashSettlementAmountNodeList = xmlNode.SelectNodes("cashSettlementAmount");
     if (cashSettlementAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cashSettlementAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cashSettlementAmountIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(cashSettlementAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cashSettlementAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cashSettlementAmount = new Money(item);
             }
         }
     }
     
 
     XmlNodeList recoveryFactorNodeList = xmlNode.SelectNodes("recoveryFactor");
     if (recoveryFactorNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in recoveryFactorNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 recoveryFactorIDRef = item.Attributes["id"].Name;
                 RestrictedPercentage ob = RestrictedPercentage();
                 IDManager.SetID(recoveryFactorIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 recoveryFactorIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 recoveryFactor = new RestrictedPercentage(item);
             }
         }
     }
     
 
     XmlNodeList fixedSettlementNodeList = xmlNode.SelectNodes("fixedSettlement");
     if (fixedSettlementNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fixedSettlementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fixedSettlementIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(fixedSettlementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixedSettlementIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixedSettlement = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList accruedInterestNodeList = xmlNode.SelectNodes("accruedInterest");
     if (accruedInterestNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in accruedInterestNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 accruedInterestIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(accruedInterestIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 accruedInterestIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 accruedInterest = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList valuationMethodNodeList = xmlNode.SelectNodes("valuationMethod");
     if (valuationMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in valuationMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 valuationMethodIDRef = item.Attributes["id"].Name;
                 ValuationMethodEnum ob = ValuationMethodEnum();
                 IDManager.SetID(valuationMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 valuationMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 valuationMethod = new ValuationMethodEnum(item);
             }
         }
     }
     
 
 }
 public EquityBermudaExercise(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList bermudaExerciseDatesNodeList = xmlNode.SelectNodes("bermudaExerciseDates");
     if (bermudaExerciseDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in bermudaExerciseDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 bermudaExerciseDatesIDRef = item.Attributes["id"].Name;
                 DateList ob = DateList();
                 IDManager.SetID(bermudaExerciseDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 bermudaExerciseDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 bermudaExerciseDates = new DateList(item);
             }
         }
     }
     
 
     XmlNodeList latestExerciseTimeTypeNodeList = xmlNode.SelectNodes("latestExerciseTimeType");
     if (latestExerciseTimeTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in latestExerciseTimeTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 latestExerciseTimeTypeIDRef = item.Attributes["id"].Name;
                 TimeTypeEnum ob = TimeTypeEnum();
                 IDManager.SetID(latestExerciseTimeTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 latestExerciseTimeTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 latestExerciseTimeType = new TimeTypeEnum(item);
             }
         }
     }
     
 
     XmlNodeList equityExpirationTimeTypeNodeList = xmlNode.SelectNodes("equityExpirationTimeType");
     if (equityExpirationTimeTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in equityExpirationTimeTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 equityExpirationTimeTypeIDRef = item.Attributes["id"].Name;
                 TimeTypeEnum ob = TimeTypeEnum();
                 IDManager.SetID(equityExpirationTimeTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 equityExpirationTimeTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 equityExpirationTimeType = new TimeTypeEnum(item);
             }
         }
     }
     
 
     XmlNodeList equityExpirationTimeNodeList = xmlNode.SelectNodes("equityExpirationTime");
     if (equityExpirationTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in equityExpirationTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 equityExpirationTimeIDRef = item.Attributes["id"].Name;
                 BusinessCenterTime ob = BusinessCenterTime();
                 IDManager.SetID(equityExpirationTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 equityExpirationTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 equityExpirationTime = new BusinessCenterTime(item);
             }
         }
     }
     
 
     XmlNodeList expirationTimeDeterminationNodeList = xmlNode.SelectNodes("expirationTimeDetermination");
     if (expirationTimeDeterminationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in expirationTimeDeterminationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 expirationTimeDeterminationIDRef = item.Attributes["id"].Name;
                 DeterminationMethod ob = DeterminationMethod();
                 IDManager.SetID(expirationTimeDeterminationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 expirationTimeDeterminationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 expirationTimeDetermination = new DeterminationMethod(item);
             }
         }
     }
     
 
     XmlNodeList equityMultipleExerciseNodeList = xmlNode.SelectNodes("equityMultipleExercise");
     if (equityMultipleExerciseNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in equityMultipleExerciseNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 equityMultipleExerciseIDRef = item.Attributes["id"].Name;
                 EquityMultipleExercise ob = EquityMultipleExercise();
                 IDManager.SetID(equityMultipleExerciseIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 equityMultipleExerciseIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 equityMultipleExercise = new EquityMultipleExercise(item);
             }
         }
     }
     
 
 }
 public BermudaExercise(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList bermudaExerciseDatesNodeList = xmlNode.SelectNodes("bermudaExerciseDates");
     if (bermudaExerciseDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in bermudaExerciseDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 bermudaExerciseDatesIDRef = item.Attributes["id"].Name;
                 AdjustableOrRelativeDates ob = AdjustableOrRelativeDates();
                 IDManager.SetID(bermudaExerciseDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 bermudaExerciseDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 bermudaExerciseDates = new AdjustableOrRelativeDates(item);
             }
         }
     }
     
 
     XmlNodeList relevantUnderlyingDateNodeList = xmlNode.SelectNodes("relevantUnderlyingDate");
     if (relevantUnderlyingDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in relevantUnderlyingDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 relevantUnderlyingDateIDRef = item.Attributes["id"].Name;
                 AdjustableOrRelativeDates ob = AdjustableOrRelativeDates();
                 IDManager.SetID(relevantUnderlyingDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 relevantUnderlyingDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 relevantUnderlyingDate = new AdjustableOrRelativeDates(item);
             }
         }
     }
     
 
     XmlNodeList earliestExerciseTimeNodeList = xmlNode.SelectNodes("earliestExerciseTime");
     if (earliestExerciseTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in earliestExerciseTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 earliestExerciseTimeIDRef = item.Attributes["id"].Name;
                 BusinessCenterTime ob = BusinessCenterTime();
                 IDManager.SetID(earliestExerciseTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 earliestExerciseTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 earliestExerciseTime = new BusinessCenterTime(item);
             }
         }
     }
     
 
     XmlNodeList latestExerciseTimeNodeList = xmlNode.SelectNodes("latestExerciseTime");
     if (latestExerciseTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in latestExerciseTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 latestExerciseTimeIDRef = item.Attributes["id"].Name;
                 BusinessCenterTime ob = BusinessCenterTime();
                 IDManager.SetID(latestExerciseTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 latestExerciseTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 latestExerciseTime = new BusinessCenterTime(item);
             }
         }
     }
     
 
     XmlNodeList expirationTimeNodeList = xmlNode.SelectNodes("expirationTime");
     if (expirationTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in expirationTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 expirationTimeIDRef = item.Attributes["id"].Name;
                 BusinessCenterTime ob = BusinessCenterTime();
                 IDManager.SetID(expirationTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 expirationTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 expirationTime = new BusinessCenterTime(item);
             }
         }
     }
     
 
     XmlNodeList multipleExerciseNodeList = xmlNode.SelectNodes("multipleExercise");
     if (multipleExerciseNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in multipleExerciseNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 multipleExerciseIDRef = item.Attributes["id"].Name;
                 MultipleExercise ob = MultipleExercise();
                 IDManager.SetID(multipleExerciseIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 multipleExerciseIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 multipleExercise = new MultipleExercise(item);
             }
         }
     }
     
 
     XmlNodeList exerciseFeeScheduleNodeList = xmlNode.SelectNodes("exerciseFeeSchedule");
     if (exerciseFeeScheduleNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in exerciseFeeScheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 exerciseFeeScheduleIDRef = item.Attributes["id"].Name;
                 ExerciseFeeSchedule ob = ExerciseFeeSchedule();
                 IDManager.SetID(exerciseFeeScheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 exerciseFeeScheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 exerciseFeeSchedule = new ExerciseFeeSchedule(item);
             }
         }
     }
     
 
 }
        public CashSettlement(XmlNode xmlNode)
        {
            XmlNode cashSettlementValuationTimeNode = xmlNode.SelectSingleNode("cashSettlementValuationTime");

            if (cashSettlementValuationTimeNode != null)
            {
                if (cashSettlementValuationTimeNode.Attributes["href"] != null || cashSettlementValuationTimeNode.Attributes["id"] != null)
                {
                    if (cashSettlementValuationTimeNode.Attributes["id"] != null)
                    {
                        cashSettlementValuationTimeIDRef_ = cashSettlementValuationTimeNode.Attributes["id"].Value;
                        BusinessCenterTime ob = new BusinessCenterTime(cashSettlementValuationTimeNode);
                        IDManager.SetID(cashSettlementValuationTimeIDRef_, ob);
                    }
                    else if (cashSettlementValuationTimeNode.Attributes["href"] != null)
                    {
                        cashSettlementValuationTimeIDRef_ = cashSettlementValuationTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        cashSettlementValuationTime_ = new BusinessCenterTime(cashSettlementValuationTimeNode);
                    }
                }
                else
                {
                    cashSettlementValuationTime_ = new BusinessCenterTime(cashSettlementValuationTimeNode);
                }
            }


            XmlNode cashSettlementValuationDateNode = xmlNode.SelectSingleNode("cashSettlementValuationDate");

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


            XmlNode cashSettlementPaymentDateNode = xmlNode.SelectSingleNode("cashSettlementPaymentDate");

            if (cashSettlementPaymentDateNode != null)
            {
                if (cashSettlementPaymentDateNode.Attributes["href"] != null || cashSettlementPaymentDateNode.Attributes["id"] != null)
                {
                    if (cashSettlementPaymentDateNode.Attributes["id"] != null)
                    {
                        cashSettlementPaymentDateIDRef_ = cashSettlementPaymentDateNode.Attributes["id"].Value;
                        CashSettlementPaymentDate ob = new CashSettlementPaymentDate(cashSettlementPaymentDateNode);
                        IDManager.SetID(cashSettlementPaymentDateIDRef_, ob);
                    }
                    else if (cashSettlementPaymentDateNode.Attributes["href"] != null)
                    {
                        cashSettlementPaymentDateIDRef_ = cashSettlementPaymentDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        cashSettlementPaymentDate_ = new CashSettlementPaymentDate(cashSettlementPaymentDateNode);
                    }
                }
                else
                {
                    cashSettlementPaymentDate_ = new CashSettlementPaymentDate(cashSettlementPaymentDateNode);
                }
            }


            XmlNode cashPriceMethodNode = xmlNode.SelectSingleNode("cashPriceMethod");

            if (cashPriceMethodNode != null)
            {
                if (cashPriceMethodNode.Attributes["href"] != null || cashPriceMethodNode.Attributes["id"] != null)
                {
                    if (cashPriceMethodNode.Attributes["id"] != null)
                    {
                        cashPriceMethodIDRef_ = cashPriceMethodNode.Attributes["id"].Value;
                        CashPriceMethod ob = new CashPriceMethod(cashPriceMethodNode);
                        IDManager.SetID(cashPriceMethodIDRef_, ob);
                    }
                    else if (cashPriceMethodNode.Attributes["href"] != null)
                    {
                        cashPriceMethodIDRef_ = cashPriceMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        cashPriceMethod_ = new CashPriceMethod(cashPriceMethodNode);
                    }
                }
                else
                {
                    cashPriceMethod_ = new CashPriceMethod(cashPriceMethodNode);
                }
            }


            XmlNode cashPriceAlternateMethodNode = xmlNode.SelectSingleNode("cashPriceAlternateMethod");

            if (cashPriceAlternateMethodNode != null)
            {
                if (cashPriceAlternateMethodNode.Attributes["href"] != null || cashPriceAlternateMethodNode.Attributes["id"] != null)
                {
                    if (cashPriceAlternateMethodNode.Attributes["id"] != null)
                    {
                        cashPriceAlternateMethodIDRef_ = cashPriceAlternateMethodNode.Attributes["id"].Value;
                        CashPriceMethod ob = new CashPriceMethod(cashPriceAlternateMethodNode);
                        IDManager.SetID(cashPriceAlternateMethodIDRef_, ob);
                    }
                    else if (cashPriceAlternateMethodNode.Attributes["href"] != null)
                    {
                        cashPriceAlternateMethodIDRef_ = cashPriceAlternateMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        cashPriceAlternateMethod_ = new CashPriceMethod(cashPriceAlternateMethodNode);
                    }
                }
                else
                {
                    cashPriceAlternateMethod_ = new CashPriceMethod(cashPriceAlternateMethodNode);
                }
            }


            XmlNode parYieldCurveAdjustedMethodNode = xmlNode.SelectSingleNode("parYieldCurveAdjustedMethod");

            if (parYieldCurveAdjustedMethodNode != null)
            {
                if (parYieldCurveAdjustedMethodNode.Attributes["href"] != null || parYieldCurveAdjustedMethodNode.Attributes["id"] != null)
                {
                    if (parYieldCurveAdjustedMethodNode.Attributes["id"] != null)
                    {
                        parYieldCurveAdjustedMethodIDRef_ = parYieldCurveAdjustedMethodNode.Attributes["id"].Value;
                        YieldCurveMethod ob = new YieldCurveMethod(parYieldCurveAdjustedMethodNode);
                        IDManager.SetID(parYieldCurveAdjustedMethodIDRef_, ob);
                    }
                    else if (parYieldCurveAdjustedMethodNode.Attributes["href"] != null)
                    {
                        parYieldCurveAdjustedMethodIDRef_ = parYieldCurveAdjustedMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        parYieldCurveAdjustedMethod_ = new YieldCurveMethod(parYieldCurveAdjustedMethodNode);
                    }
                }
                else
                {
                    parYieldCurveAdjustedMethod_ = new YieldCurveMethod(parYieldCurveAdjustedMethodNode);
                }
            }


            XmlNode zeroCouponYieldAdjustedMethodNode = xmlNode.SelectSingleNode("zeroCouponYieldAdjustedMethod");

            if (zeroCouponYieldAdjustedMethodNode != null)
            {
                if (zeroCouponYieldAdjustedMethodNode.Attributes["href"] != null || zeroCouponYieldAdjustedMethodNode.Attributes["id"] != null)
                {
                    if (zeroCouponYieldAdjustedMethodNode.Attributes["id"] != null)
                    {
                        zeroCouponYieldAdjustedMethodIDRef_ = zeroCouponYieldAdjustedMethodNode.Attributes["id"].Value;
                        YieldCurveMethod ob = new YieldCurveMethod(zeroCouponYieldAdjustedMethodNode);
                        IDManager.SetID(zeroCouponYieldAdjustedMethodIDRef_, ob);
                    }
                    else if (zeroCouponYieldAdjustedMethodNode.Attributes["href"] != null)
                    {
                        zeroCouponYieldAdjustedMethodIDRef_ = zeroCouponYieldAdjustedMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        zeroCouponYieldAdjustedMethod_ = new YieldCurveMethod(zeroCouponYieldAdjustedMethodNode);
                    }
                }
                else
                {
                    zeroCouponYieldAdjustedMethod_ = new YieldCurveMethod(zeroCouponYieldAdjustedMethodNode);
                }
            }


            XmlNode parYieldCurveUnadjustedMethodNode = xmlNode.SelectSingleNode("parYieldCurveUnadjustedMethod");

            if (parYieldCurveUnadjustedMethodNode != null)
            {
                if (parYieldCurveUnadjustedMethodNode.Attributes["href"] != null || parYieldCurveUnadjustedMethodNode.Attributes["id"] != null)
                {
                    if (parYieldCurveUnadjustedMethodNode.Attributes["id"] != null)
                    {
                        parYieldCurveUnadjustedMethodIDRef_ = parYieldCurveUnadjustedMethodNode.Attributes["id"].Value;
                        YieldCurveMethod ob = new YieldCurveMethod(parYieldCurveUnadjustedMethodNode);
                        IDManager.SetID(parYieldCurveUnadjustedMethodIDRef_, ob);
                    }
                    else if (parYieldCurveUnadjustedMethodNode.Attributes["href"] != null)
                    {
                        parYieldCurveUnadjustedMethodIDRef_ = parYieldCurveUnadjustedMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        parYieldCurveUnadjustedMethod_ = new YieldCurveMethod(parYieldCurveUnadjustedMethodNode);
                    }
                }
                else
                {
                    parYieldCurveUnadjustedMethod_ = new YieldCurveMethod(parYieldCurveUnadjustedMethodNode);
                }
            }


            XmlNode crossCurrencyMethodNode = xmlNode.SelectSingleNode("crossCurrencyMethod");

            if (crossCurrencyMethodNode != null)
            {
                if (crossCurrencyMethodNode.Attributes["href"] != null || crossCurrencyMethodNode.Attributes["id"] != null)
                {
                    if (crossCurrencyMethodNode.Attributes["id"] != null)
                    {
                        crossCurrencyMethodIDRef_ = crossCurrencyMethodNode.Attributes["id"].Value;
                        CrossCurrencyMethod ob = new CrossCurrencyMethod(crossCurrencyMethodNode);
                        IDManager.SetID(crossCurrencyMethodIDRef_, ob);
                    }
                    else if (crossCurrencyMethodNode.Attributes["href"] != null)
                    {
                        crossCurrencyMethodIDRef_ = crossCurrencyMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        crossCurrencyMethod_ = new CrossCurrencyMethod(crossCurrencyMethodNode);
                    }
                }
                else
                {
                    crossCurrencyMethod_ = new CrossCurrencyMethod(crossCurrencyMethodNode);
                }
            }


            XmlNode collateralizedCashPriceMethodNode = xmlNode.SelectSingleNode("collateralizedCashPriceMethod");

            if (collateralizedCashPriceMethodNode != null)
            {
                if (collateralizedCashPriceMethodNode.Attributes["href"] != null || collateralizedCashPriceMethodNode.Attributes["id"] != null)
                {
                    if (collateralizedCashPriceMethodNode.Attributes["id"] != null)
                    {
                        collateralizedCashPriceMethodIDRef_ = collateralizedCashPriceMethodNode.Attributes["id"].Value;
                        YieldCurveMethod ob = new YieldCurveMethod(collateralizedCashPriceMethodNode);
                        IDManager.SetID(collateralizedCashPriceMethodIDRef_, ob);
                    }
                    else if (collateralizedCashPriceMethodNode.Attributes["href"] != null)
                    {
                        collateralizedCashPriceMethodIDRef_ = collateralizedCashPriceMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        collateralizedCashPriceMethod_ = new YieldCurveMethod(collateralizedCashPriceMethodNode);
                    }
                }
                else
                {
                    collateralizedCashPriceMethod_ = new YieldCurveMethod(collateralizedCashPriceMethodNode);
                }
            }
        }
Example #41
0
        public FxAsianFeature(XmlNode xmlNode)
        {
            XmlNode primaryRateSourceNode = xmlNode.SelectSingleNode("primaryRateSource");

            if (primaryRateSourceNode != null)
            {
                if (primaryRateSourceNode.Attributes["href"] != null || primaryRateSourceNode.Attributes["id"] != null)
                {
                    if (primaryRateSourceNode.Attributes["id"] != null)
                    {
                        primaryRateSourceIDRef_ = primaryRateSourceNode.Attributes["id"].Value;
                        InformationSource ob = new InformationSource(primaryRateSourceNode);
                        IDManager.SetID(primaryRateSourceIDRef_, ob);
                    }
                    else if (primaryRateSourceNode.Attributes["href"] != null)
                    {
                        primaryRateSourceIDRef_ = primaryRateSourceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        primaryRateSource_ = new InformationSource(primaryRateSourceNode);
                    }
                }
                else
                {
                    primaryRateSource_ = new InformationSource(primaryRateSourceNode);
                }
            }


            XmlNode secondaryRateSourceNode = xmlNode.SelectSingleNode("secondaryRateSource");

            if (secondaryRateSourceNode != null)
            {
                if (secondaryRateSourceNode.Attributes["href"] != null || secondaryRateSourceNode.Attributes["id"] != null)
                {
                    if (secondaryRateSourceNode.Attributes["id"] != null)
                    {
                        secondaryRateSourceIDRef_ = secondaryRateSourceNode.Attributes["id"].Value;
                        InformationSource ob = new InformationSource(secondaryRateSourceNode);
                        IDManager.SetID(secondaryRateSourceIDRef_, ob);
                    }
                    else if (secondaryRateSourceNode.Attributes["href"] != null)
                    {
                        secondaryRateSourceIDRef_ = secondaryRateSourceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        secondaryRateSource_ = new InformationSource(secondaryRateSourceNode);
                    }
                }
                else
                {
                    secondaryRateSource_ = new InformationSource(secondaryRateSourceNode);
                }
            }


            XmlNode fixingTimeNode = xmlNode.SelectSingleNode("fixingTime");

            if (fixingTimeNode != null)
            {
                if (fixingTimeNode.Attributes["href"] != null || fixingTimeNode.Attributes["id"] != null)
                {
                    if (fixingTimeNode.Attributes["id"] != null)
                    {
                        fixingTimeIDRef_ = fixingTimeNode.Attributes["id"].Value;
                        BusinessCenterTime ob = new BusinessCenterTime(fixingTimeNode);
                        IDManager.SetID(fixingTimeIDRef_, ob);
                    }
                    else if (fixingTimeNode.Attributes["href"] != null)
                    {
                        fixingTimeIDRef_ = fixingTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fixingTime_ = new BusinessCenterTime(fixingTimeNode);
                    }
                }
                else
                {
                    fixingTime_ = new BusinessCenterTime(fixingTimeNode);
                }
            }


            XmlNode observationScheduleNode = xmlNode.SelectSingleNode("observationSchedule");

            if (observationScheduleNode != null)
            {
                if (observationScheduleNode.Attributes["href"] != null || observationScheduleNode.Attributes["id"] != null)
                {
                    if (observationScheduleNode.Attributes["id"] != null)
                    {
                        observationScheduleIDRef_ = observationScheduleNode.Attributes["id"].Value;
                        FxAverageRateObservationSchedule ob = new FxAverageRateObservationSchedule(observationScheduleNode);
                        IDManager.SetID(observationScheduleIDRef_, ob);
                    }
                    else if (observationScheduleNode.Attributes["href"] != null)
                    {
                        observationScheduleIDRef_ = observationScheduleNode.Attributes["href"].Value;
                    }
                    else
                    {
                        observationSchedule_ = new FxAverageRateObservationSchedule(observationScheduleNode);
                    }
                }
                else
                {
                    observationSchedule_ = new FxAverageRateObservationSchedule(observationScheduleNode);
                }
            }


            XmlNodeList rateObservationNodeList = xmlNode.SelectNodes("rateObservation");

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


            XmlNode rateObservationQuoteBasisNode = xmlNode.SelectSingleNode("rateObservationQuoteBasis");

            if (rateObservationQuoteBasisNode != null)
            {
                if (rateObservationQuoteBasisNode.Attributes["href"] != null || rateObservationQuoteBasisNode.Attributes["id"] != null)
                {
                    if (rateObservationQuoteBasisNode.Attributes["id"] != null)
                    {
                        rateObservationQuoteBasisIDRef_ = rateObservationQuoteBasisNode.Attributes["id"].Value;
                        StrikeQuoteBasisEnum ob = new StrikeQuoteBasisEnum(rateObservationQuoteBasisNode);
                        IDManager.SetID(rateObservationQuoteBasisIDRef_, ob);
                    }
                    else if (rateObservationQuoteBasisNode.Attributes["href"] != null)
                    {
                        rateObservationQuoteBasisIDRef_ = rateObservationQuoteBasisNode.Attributes["href"].Value;
                    }
                    else
                    {
                        rateObservationQuoteBasis_ = new StrikeQuoteBasisEnum(rateObservationQuoteBasisNode);
                    }
                }
                else
                {
                    rateObservationQuoteBasis_ = new StrikeQuoteBasisEnum(rateObservationQuoteBasisNode);
                }
            }


            XmlNode payoutFormulaNode = xmlNode.SelectSingleNode("payoutFormula");

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


            XmlNode precisionNode = xmlNode.SelectSingleNode("precision");

            if (precisionNode != null)
            {
                if (precisionNode.Attributes["href"] != null || precisionNode.Attributes["id"] != null)
                {
                    if (precisionNode.Attributes["id"] != null)
                    {
                        precisionIDRef_ = precisionNode.Attributes["id"].Value;
                        XsdTypeNonNegativeInteger ob = new XsdTypeNonNegativeInteger(precisionNode);
                        IDManager.SetID(precisionIDRef_, ob);
                    }
                    else if (precisionNode.Attributes["href"] != null)
                    {
                        precisionIDRef_ = precisionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        precision_ = new XsdTypeNonNegativeInteger(precisionNode);
                    }
                }
                else
                {
                    precision_ = new XsdTypeNonNegativeInteger(precisionNode);
                }
            }
        }
        public CashSettlement(XmlNode xmlNode)
        {
            XmlNodeList cashSettlementValuationTimeNodeList = xmlNode.SelectNodes("cashSettlementValuationTime");

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

            foreach (XmlNode item in cashSettlementValuationTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        cashSettlementValuationTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(cashSettlementValuationTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        cashSettlementValuationTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        cashSettlementValuationTime = new BusinessCenterTime(item);
                    }
                }
            }


            XmlNodeList cashSettlementValuationDateNodeList = xmlNode.SelectNodes("cashSettlementValuationDate");

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

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


            XmlNodeList cashSettlementPaymentDateNodeList = xmlNode.SelectNodes("cashSettlementPaymentDate");

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

            foreach (XmlNode item in cashSettlementPaymentDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        cashSettlementPaymentDateIDRef = item.Attributes["id"].Name;
                        CashSettlementPaymentDate ob = CashSettlementPaymentDate();
                        IDManager.SetID(cashSettlementPaymentDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        cashSettlementPaymentDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        cashSettlementPaymentDate = new CashSettlementPaymentDate(item);
                    }
                }
            }


            XmlNodeList cashPriceMethodNodeList = xmlNode.SelectNodes("cashPriceMethod");

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

            foreach (XmlNode item in cashPriceMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        cashPriceMethodIDRef = item.Attributes["id"].Name;
                        CashPriceMethod ob = CashPriceMethod();
                        IDManager.SetID(cashPriceMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        cashPriceMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        cashPriceMethod = new CashPriceMethod(item);
                    }
                }
            }


            XmlNodeList cashPriceAlternateMethodNodeList = xmlNode.SelectNodes("cashPriceAlternateMethod");

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

            foreach (XmlNode item in cashPriceAlternateMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        cashPriceAlternateMethodIDRef = item.Attributes["id"].Name;
                        CashPriceMethod ob = CashPriceMethod();
                        IDManager.SetID(cashPriceAlternateMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        cashPriceAlternateMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        cashPriceAlternateMethod = new CashPriceMethod(item);
                    }
                }
            }


            XmlNodeList parYieldCurveAdjustedMethodNodeList = xmlNode.SelectNodes("parYieldCurveAdjustedMethod");

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

            foreach (XmlNode item in parYieldCurveAdjustedMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        parYieldCurveAdjustedMethodIDRef = item.Attributes["id"].Name;
                        YieldCurveMethod ob = YieldCurveMethod();
                        IDManager.SetID(parYieldCurveAdjustedMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        parYieldCurveAdjustedMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        parYieldCurveAdjustedMethod = new YieldCurveMethod(item);
                    }
                }
            }


            XmlNodeList zeroCouponYieldAdjustedMethodNodeList = xmlNode.SelectNodes("zeroCouponYieldAdjustedMethod");

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

            foreach (XmlNode item in zeroCouponYieldAdjustedMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        zeroCouponYieldAdjustedMethodIDRef = item.Attributes["id"].Name;
                        YieldCurveMethod ob = YieldCurveMethod();
                        IDManager.SetID(zeroCouponYieldAdjustedMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        zeroCouponYieldAdjustedMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        zeroCouponYieldAdjustedMethod = new YieldCurveMethod(item);
                    }
                }
            }


            XmlNodeList parYieldCurveUnadjustedMethodNodeList = xmlNode.SelectNodes("parYieldCurveUnadjustedMethod");

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

            foreach (XmlNode item in parYieldCurveUnadjustedMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        parYieldCurveUnadjustedMethodIDRef = item.Attributes["id"].Name;
                        YieldCurveMethod ob = YieldCurveMethod();
                        IDManager.SetID(parYieldCurveUnadjustedMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        parYieldCurveUnadjustedMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        parYieldCurveUnadjustedMethod = new YieldCurveMethod(item);
                    }
                }
            }


            XmlNodeList crossCurrencyMethodNodeList = xmlNode.SelectNodes("crossCurrencyMethod");

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

            foreach (XmlNode item in crossCurrencyMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        crossCurrencyMethodIDRef = item.Attributes["id"].Name;
                        CrossCurrencyMethod ob = CrossCurrencyMethod();
                        IDManager.SetID(crossCurrencyMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        crossCurrencyMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        crossCurrencyMethod = new CrossCurrencyMethod(item);
                    }
                }
            }


            XmlNodeList collateralizedCashPriceMethodNodeList = xmlNode.SelectNodes("collateralizedCashPriceMethod");

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

            foreach (XmlNode item in collateralizedCashPriceMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        collateralizedCashPriceMethodIDRef = item.Attributes["id"].Name;
                        YieldCurveMethod ob = YieldCurveMethod();
                        IDManager.SetID(collateralizedCashPriceMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        collateralizedCashPriceMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        collateralizedCashPriceMethod = new YieldCurveMethod(item);
                    }
                }
            }
        }
 public AmericanExercise(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode commencementDateNode = xmlNode.SelectSingleNode("commencementDate");
     
     if (commencementDateNode != null)
     {
         if (commencementDateNode.Attributes["href"] != null || commencementDateNode.Attributes["id"] != null) 
         {
             if (commencementDateNode.Attributes["id"] != null) 
             {
                 commencementDateIDRef_ = commencementDateNode.Attributes["id"].Value;
                 AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(commencementDateNode);
                 IDManager.SetID(commencementDateIDRef_, ob);
             }
             else if (commencementDateNode.Attributes["href"] != null)
             {
                 commencementDateIDRef_ = commencementDateNode.Attributes["href"].Value;
             }
             else
             {
                 commencementDate_ = new AdjustableOrRelativeDate(commencementDateNode);
             }
         }
         else
         {
             commencementDate_ = new AdjustableOrRelativeDate(commencementDateNode);
         }
     }
     
 
     XmlNode expirationDateNode = xmlNode.SelectSingleNode("expirationDate");
     
     if (expirationDateNode != null)
     {
         if (expirationDateNode.Attributes["href"] != null || expirationDateNode.Attributes["id"] != null) 
         {
             if (expirationDateNode.Attributes["id"] != null) 
             {
                 expirationDateIDRef_ = expirationDateNode.Attributes["id"].Value;
                 AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(expirationDateNode);
                 IDManager.SetID(expirationDateIDRef_, ob);
             }
             else if (expirationDateNode.Attributes["href"] != null)
             {
                 expirationDateIDRef_ = expirationDateNode.Attributes["href"].Value;
             }
             else
             {
                 expirationDate_ = new AdjustableOrRelativeDate(expirationDateNode);
             }
         }
         else
         {
             expirationDate_ = new AdjustableOrRelativeDate(expirationDateNode);
         }
     }
     
 
     XmlNode relevantUnderlyingDateNode = xmlNode.SelectSingleNode("relevantUnderlyingDate");
     
     if (relevantUnderlyingDateNode != null)
     {
         if (relevantUnderlyingDateNode.Attributes["href"] != null || relevantUnderlyingDateNode.Attributes["id"] != null) 
         {
             if (relevantUnderlyingDateNode.Attributes["id"] != null) 
             {
                 relevantUnderlyingDateIDRef_ = relevantUnderlyingDateNode.Attributes["id"].Value;
                 AdjustableOrRelativeDates ob = new AdjustableOrRelativeDates(relevantUnderlyingDateNode);
                 IDManager.SetID(relevantUnderlyingDateIDRef_, ob);
             }
             else if (relevantUnderlyingDateNode.Attributes["href"] != null)
             {
                 relevantUnderlyingDateIDRef_ = relevantUnderlyingDateNode.Attributes["href"].Value;
             }
             else
             {
                 relevantUnderlyingDate_ = new AdjustableOrRelativeDates(relevantUnderlyingDateNode);
             }
         }
         else
         {
             relevantUnderlyingDate_ = new AdjustableOrRelativeDates(relevantUnderlyingDateNode);
         }
     }
     
 
     XmlNode earliestExerciseTimeNode = xmlNode.SelectSingleNode("earliestExerciseTime");
     
     if (earliestExerciseTimeNode != null)
     {
         if (earliestExerciseTimeNode.Attributes["href"] != null || earliestExerciseTimeNode.Attributes["id"] != null) 
         {
             if (earliestExerciseTimeNode.Attributes["id"] != null) 
             {
                 earliestExerciseTimeIDRef_ = earliestExerciseTimeNode.Attributes["id"].Value;
                 BusinessCenterTime ob = new BusinessCenterTime(earliestExerciseTimeNode);
                 IDManager.SetID(earliestExerciseTimeIDRef_, ob);
             }
             else if (earliestExerciseTimeNode.Attributes["href"] != null)
             {
                 earliestExerciseTimeIDRef_ = earliestExerciseTimeNode.Attributes["href"].Value;
             }
             else
             {
                 earliestExerciseTime_ = new BusinessCenterTime(earliestExerciseTimeNode);
             }
         }
         else
         {
             earliestExerciseTime_ = new BusinessCenterTime(earliestExerciseTimeNode);
         }
     }
     
 
     XmlNode latestExerciseTimeNode = xmlNode.SelectSingleNode("latestExerciseTime");
     
     if (latestExerciseTimeNode != null)
     {
         if (latestExerciseTimeNode.Attributes["href"] != null || latestExerciseTimeNode.Attributes["id"] != null) 
         {
             if (latestExerciseTimeNode.Attributes["id"] != null) 
             {
                 latestExerciseTimeIDRef_ = latestExerciseTimeNode.Attributes["id"].Value;
                 BusinessCenterTime ob = new BusinessCenterTime(latestExerciseTimeNode);
                 IDManager.SetID(latestExerciseTimeIDRef_, ob);
             }
             else if (latestExerciseTimeNode.Attributes["href"] != null)
             {
                 latestExerciseTimeIDRef_ = latestExerciseTimeNode.Attributes["href"].Value;
             }
             else
             {
                 latestExerciseTime_ = new BusinessCenterTime(latestExerciseTimeNode);
             }
         }
         else
         {
             latestExerciseTime_ = new BusinessCenterTime(latestExerciseTimeNode);
         }
     }
     
 
     XmlNode expirationTimeNode = xmlNode.SelectSingleNode("expirationTime");
     
     if (expirationTimeNode != null)
     {
         if (expirationTimeNode.Attributes["href"] != null || expirationTimeNode.Attributes["id"] != null) 
         {
             if (expirationTimeNode.Attributes["id"] != null) 
             {
                 expirationTimeIDRef_ = expirationTimeNode.Attributes["id"].Value;
                 BusinessCenterTime ob = new BusinessCenterTime(expirationTimeNode);
                 IDManager.SetID(expirationTimeIDRef_, ob);
             }
             else if (expirationTimeNode.Attributes["href"] != null)
             {
                 expirationTimeIDRef_ = expirationTimeNode.Attributes["href"].Value;
             }
             else
             {
                 expirationTime_ = new BusinessCenterTime(expirationTimeNode);
             }
         }
         else
         {
             expirationTime_ = new BusinessCenterTime(expirationTimeNode);
         }
     }
     
 
     XmlNode multipleExerciseNode = xmlNode.SelectSingleNode("multipleExercise");
     
     if (multipleExerciseNode != null)
     {
         if (multipleExerciseNode.Attributes["href"] != null || multipleExerciseNode.Attributes["id"] != null) 
         {
             if (multipleExerciseNode.Attributes["id"] != null) 
             {
                 multipleExerciseIDRef_ = multipleExerciseNode.Attributes["id"].Value;
                 MultipleExercise ob = new MultipleExercise(multipleExerciseNode);
                 IDManager.SetID(multipleExerciseIDRef_, ob);
             }
             else if (multipleExerciseNode.Attributes["href"] != null)
             {
                 multipleExerciseIDRef_ = multipleExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 multipleExercise_ = new MultipleExercise(multipleExerciseNode);
             }
         }
         else
         {
             multipleExercise_ = new MultipleExercise(multipleExerciseNode);
         }
     }
     
 
     XmlNode exerciseFeeScheduleNode = xmlNode.SelectSingleNode("exerciseFeeSchedule");
     
     if (exerciseFeeScheduleNode != null)
     {
         if (exerciseFeeScheduleNode.Attributes["href"] != null || exerciseFeeScheduleNode.Attributes["id"] != null) 
         {
             if (exerciseFeeScheduleNode.Attributes["id"] != null) 
             {
                 exerciseFeeScheduleIDRef_ = exerciseFeeScheduleNode.Attributes["id"].Value;
                 ExerciseFeeSchedule ob = new ExerciseFeeSchedule(exerciseFeeScheduleNode);
                 IDManager.SetID(exerciseFeeScheduleIDRef_, ob);
             }
             else if (exerciseFeeScheduleNode.Attributes["href"] != null)
             {
                 exerciseFeeScheduleIDRef_ = exerciseFeeScheduleNode.Attributes["href"].Value;
             }
             else
             {
                 exerciseFeeSchedule_ = new ExerciseFeeSchedule(exerciseFeeScheduleNode);
             }
         }
         else
         {
             exerciseFeeSchedule_ = new ExerciseFeeSchedule(exerciseFeeScheduleNode);
         }
     }
     
 
 }
Example #44
0
        public FxEuropeanExercise(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode expiryDateNode = xmlNode.SelectSingleNode("expiryDate");

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


            XmlNode expiryTimeNode = xmlNode.SelectSingleNode("expiryTime");

            if (expiryTimeNode != null)
            {
                if (expiryTimeNode.Attributes["href"] != null || expiryTimeNode.Attributes["id"] != null)
                {
                    if (expiryTimeNode.Attributes["id"] != null)
                    {
                        expiryTimeIDRef_ = expiryTimeNode.Attributes["id"].Value;
                        BusinessCenterTime ob = new BusinessCenterTime(expiryTimeNode);
                        IDManager.SetID(expiryTimeIDRef_, ob);
                    }
                    else if (expiryTimeNode.Attributes["href"] != null)
                    {
                        expiryTimeIDRef_ = expiryTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        expiryTime_ = new BusinessCenterTime(expiryTimeNode);
                    }
                }
                else
                {
                    expiryTime_ = new BusinessCenterTime(expiryTimeNode);
                }
            }


            XmlNode cutNameNode = xmlNode.SelectSingleNode("cutName");

            if (cutNameNode != null)
            {
                if (cutNameNode.Attributes["href"] != null || cutNameNode.Attributes["id"] != null)
                {
                    if (cutNameNode.Attributes["id"] != null)
                    {
                        cutNameIDRef_ = cutNameNode.Attributes["id"].Value;
                        CutName ob = new CutName(cutNameNode);
                        IDManager.SetID(cutNameIDRef_, ob);
                    }
                    else if (cutNameNode.Attributes["href"] != null)
                    {
                        cutNameIDRef_ = cutNameNode.Attributes["href"].Value;
                    }
                    else
                    {
                        cutName_ = new CutName(cutNameNode);
                    }
                }
                else
                {
                    cutName_ = new CutName(cutNameNode);
                }
            }


            XmlNode valueDateNode = xmlNode.SelectSingleNode("valueDate");

            if (valueDateNode != null)
            {
                if (valueDateNode.Attributes["href"] != null || valueDateNode.Attributes["id"] != null)
                {
                    if (valueDateNode.Attributes["id"] != null)
                    {
                        valueDateIDRef_ = valueDateNode.Attributes["id"].Value;
                        XsdTypeDate ob = new XsdTypeDate(valueDateNode);
                        IDManager.SetID(valueDateIDRef_, ob);
                    }
                    else if (valueDateNode.Attributes["href"] != null)
                    {
                        valueDateIDRef_ = valueDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        valueDate_ = new XsdTypeDate(valueDateNode);
                    }
                }
                else
                {
                    valueDate_ = new XsdTypeDate(valueDateNode);
                }
            }
        }
 public DualCurrencyFeature(XmlNode xmlNode)
 {
     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 fixingDateNode = xmlNode.SelectSingleNode("fixingDate");
     
     if (fixingDateNode != null)
     {
         if (fixingDateNode.Attributes["href"] != null || fixingDateNode.Attributes["id"] != null) 
         {
             if (fixingDateNode.Attributes["id"] != null) 
             {
                 fixingDateIDRef_ = fixingDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(fixingDateNode);
                 IDManager.SetID(fixingDateIDRef_, ob);
             }
             else if (fixingDateNode.Attributes["href"] != null)
             {
                 fixingDateIDRef_ = fixingDateNode.Attributes["href"].Value;
             }
             else
             {
                 fixingDate_ = new XsdTypeDate(fixingDateNode);
             }
         }
         else
         {
             fixingDate_ = new XsdTypeDate(fixingDateNode);
         }
     }
     
 
     XmlNode fixingTimeNode = xmlNode.SelectSingleNode("fixingTime");
     
     if (fixingTimeNode != null)
     {
         if (fixingTimeNode.Attributes["href"] != null || fixingTimeNode.Attributes["id"] != null) 
         {
             if (fixingTimeNode.Attributes["id"] != null) 
             {
                 fixingTimeIDRef_ = fixingTimeNode.Attributes["id"].Value;
                 BusinessCenterTime ob = new BusinessCenterTime(fixingTimeNode);
                 IDManager.SetID(fixingTimeIDRef_, ob);
             }
             else if (fixingTimeNode.Attributes["href"] != null)
             {
                 fixingTimeIDRef_ = fixingTimeNode.Attributes["href"].Value;
             }
             else
             {
                 fixingTime_ = new BusinessCenterTime(fixingTimeNode);
             }
         }
         else
         {
             fixingTime_ = new BusinessCenterTime(fixingTimeNode);
         }
     }
     
 
     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;
                 DualCurrencyStrikePrice ob = new DualCurrencyStrikePrice(strikeNode);
                 IDManager.SetID(strikeIDRef_, ob);
             }
             else if (strikeNode.Attributes["href"] != null)
             {
                 strikeIDRef_ = strikeNode.Attributes["href"].Value;
             }
             else
             {
                 strike_ = new DualCurrencyStrikePrice(strikeNode);
             }
         }
         else
         {
             strike_ = new DualCurrencyStrikePrice(strikeNode);
         }
     }
     
 
     XmlNode spotRateNode = xmlNode.SelectSingleNode("spotRate");
     
     if (spotRateNode != null)
     {
         if (spotRateNode.Attributes["href"] != null || spotRateNode.Attributes["id"] != null) 
         {
             if (spotRateNode.Attributes["id"] != null) 
             {
                 spotRateIDRef_ = spotRateNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(spotRateNode);
                 IDManager.SetID(spotRateIDRef_, ob);
             }
             else if (spotRateNode.Attributes["href"] != null)
             {
                 spotRateIDRef_ = spotRateNode.Attributes["href"].Value;
             }
             else
             {
                 spotRate_ = new XsdTypeDecimal(spotRateNode);
             }
         }
         else
         {
             spotRate_ = new XsdTypeDecimal(spotRateNode);
         }
     }
     
 
     XmlNode interestAtRiskNode = xmlNode.SelectSingleNode("interestAtRisk");
     
     if (interestAtRiskNode != null)
     {
         if (interestAtRiskNode.Attributes["href"] != null || interestAtRiskNode.Attributes["id"] != null) 
         {
             if (interestAtRiskNode.Attributes["id"] != null) 
             {
                 interestAtRiskIDRef_ = interestAtRiskNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(interestAtRiskNode);
                 IDManager.SetID(interestAtRiskIDRef_, ob);
             }
             else if (interestAtRiskNode.Attributes["href"] != null)
             {
                 interestAtRiskIDRef_ = interestAtRiskNode.Attributes["href"].Value;
             }
             else
             {
                 interestAtRisk_ = new XsdTypeBoolean(interestAtRiskNode);
             }
         }
         else
         {
             interestAtRisk_ = new XsdTypeBoolean(interestAtRiskNode);
         }
     }
     
 
 }
        public DualCurrencyFeature(XmlNode xmlNode)
        {
            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 fixingDateNodeList = xmlNode.SelectNodes("fixingDate");

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

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


            XmlNodeList fixingTimeNodeList = xmlNode.SelectNodes("fixingTime");

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

            foreach (XmlNode item in fixingTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fixingTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(fixingTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fixingTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fixingTime = new BusinessCenterTime(item);
                    }
                }
            }


            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;
                        DualCurrencyStrikePrice ob = DualCurrencyStrikePrice();
                        IDManager.SetID(strikeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        strikeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        strike = new DualCurrencyStrikePrice(item);
                    }
                }
            }


            XmlNodeList spotRateNodeList = xmlNode.SelectNodes("spotRate");

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

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


            XmlNodeList interestAtRiskNodeList = xmlNode.SelectNodes("interestAtRisk");

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

            foreach (XmlNode item in interestAtRiskNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        interestAtRiskIDRef = item.Attributes["id"].Name;
                        XsdTypeBoolean ob = XsdTypeBoolean();
                        IDManager.SetID(interestAtRiskIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        interestAtRiskIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        interestAtRisk = new XsdTypeBoolean(item);
                    }
                }
            }
        }
        public BermudaExercise(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList bermudaExerciseDatesNodeList = xmlNode.SelectNodes("bermudaExerciseDates");

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

            foreach (XmlNode item in bermudaExerciseDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        bermudaExerciseDatesIDRef = item.Attributes["id"].Name;
                        AdjustableOrRelativeDates ob = AdjustableOrRelativeDates();
                        IDManager.SetID(bermudaExerciseDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        bermudaExerciseDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        bermudaExerciseDates = new AdjustableOrRelativeDates(item);
                    }
                }
            }


            XmlNodeList relevantUnderlyingDateNodeList = xmlNode.SelectNodes("relevantUnderlyingDate");

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

            foreach (XmlNode item in relevantUnderlyingDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        relevantUnderlyingDateIDRef = item.Attributes["id"].Name;
                        AdjustableOrRelativeDates ob = AdjustableOrRelativeDates();
                        IDManager.SetID(relevantUnderlyingDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        relevantUnderlyingDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        relevantUnderlyingDate = new AdjustableOrRelativeDates(item);
                    }
                }
            }


            XmlNodeList earliestExerciseTimeNodeList = xmlNode.SelectNodes("earliestExerciseTime");

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

            foreach (XmlNode item in earliestExerciseTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        earliestExerciseTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(earliestExerciseTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        earliestExerciseTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        earliestExerciseTime = new BusinessCenterTime(item);
                    }
                }
            }


            XmlNodeList latestExerciseTimeNodeList = xmlNode.SelectNodes("latestExerciseTime");

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

            foreach (XmlNode item in latestExerciseTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        latestExerciseTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(latestExerciseTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        latestExerciseTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        latestExerciseTime = new BusinessCenterTime(item);
                    }
                }
            }


            XmlNodeList expirationTimeNodeList = xmlNode.SelectNodes("expirationTime");

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

            foreach (XmlNode item in expirationTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        expirationTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(expirationTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        expirationTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        expirationTime = new BusinessCenterTime(item);
                    }
                }
            }


            XmlNodeList multipleExerciseNodeList = xmlNode.SelectNodes("multipleExercise");

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

            foreach (XmlNode item in multipleExerciseNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        multipleExerciseIDRef = item.Attributes["id"].Name;
                        MultipleExercise ob = MultipleExercise();
                        IDManager.SetID(multipleExerciseIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        multipleExerciseIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        multipleExercise = new MultipleExercise(item);
                    }
                }
            }


            XmlNodeList exerciseFeeScheduleNodeList = xmlNode.SelectNodes("exerciseFeeSchedule");

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

            foreach (XmlNode item in exerciseFeeScheduleNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        exerciseFeeScheduleIDRef = item.Attributes["id"].Name;
                        ExerciseFeeSchedule ob = ExerciseFeeSchedule();
                        IDManager.SetID(exerciseFeeScheduleIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        exerciseFeeScheduleIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        exerciseFeeSchedule = new ExerciseFeeSchedule(item);
                    }
                }
            }
        }
Example #48
0
        public EuropeanExercise(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList expirationDateNodeList = xmlNode.SelectNodes("expirationDate");

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

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


            XmlNodeList relevantUnderlyingDateNodeList = xmlNode.SelectNodes("relevantUnderlyingDate");

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

            foreach (XmlNode item in relevantUnderlyingDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        relevantUnderlyingDateIDRef = item.Attributes["id"].Name;
                        AdjustableOrRelativeDates ob = AdjustableOrRelativeDates();
                        IDManager.SetID(relevantUnderlyingDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        relevantUnderlyingDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        relevantUnderlyingDate = new AdjustableOrRelativeDates(item);
                    }
                }
            }


            XmlNodeList earliestExerciseTimeNodeList = xmlNode.SelectNodes("earliestExerciseTime");

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

            foreach (XmlNode item in earliestExerciseTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        earliestExerciseTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(earliestExerciseTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        earliestExerciseTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        earliestExerciseTime = new BusinessCenterTime(item);
                    }
                }
            }


            XmlNodeList expirationTimeNodeList = xmlNode.SelectNodes("expirationTime");

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

            foreach (XmlNode item in expirationTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        expirationTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(expirationTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        expirationTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        expirationTime = new BusinessCenterTime(item);
                    }
                }
            }


            XmlNodeList partialExerciseNodeList = xmlNode.SelectNodes("partialExercise");

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

            foreach (XmlNode item in partialExerciseNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        partialExerciseIDRef = item.Attributes["id"].Name;
                        PartialExercise ob = PartialExercise();
                        IDManager.SetID(partialExerciseIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        partialExerciseIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        partialExercise = new PartialExercise(item);
                    }
                }
            }


            XmlNodeList exerciseFeeNodeList = xmlNode.SelectNodes("exerciseFee");

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

            foreach (XmlNode item in exerciseFeeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        exerciseFeeIDRef = item.Attributes["id"].Name;
                        ExerciseFee ob = ExerciseFee();
                        IDManager.SetID(exerciseFeeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        exerciseFeeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        exerciseFee = new ExerciseFee(item);
                    }
                }
            }
        }
Example #49
0
        public CommodityEuropeanExercise(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList expirationDateNodeList = xmlNode.SelectNodes("expirationDate");

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

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


            XmlNodeList exerciseFrequencyNodeList = xmlNode.SelectNodes("exerciseFrequency");

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

            foreach (XmlNode item in exerciseFrequencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        exerciseFrequencyIDRef = item.Attributes["id"].Name;
                        Frequency ob = Frequency();
                        IDManager.SetID(exerciseFrequencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        exerciseFrequencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        exerciseFrequency = new Frequency(item);
                    }
                }
            }


            XmlNodeList expirationTimeNodeList = xmlNode.SelectNodes("expirationTime");

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

            foreach (XmlNode item in expirationTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        expirationTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(expirationTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        expirationTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        expirationTime = new BusinessCenterTime(item);
                    }
                }
            }
        }
Example #50
0
        public EquityEuropeanExercise(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList expirationDateNodeList = xmlNode.SelectNodes("expirationDate");

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

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


            XmlNodeList equityExpirationTimeTypeNodeList = xmlNode.SelectNodes("equityExpirationTimeType");

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

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


            XmlNodeList equityExpirationTimeNodeList = xmlNode.SelectNodes("equityExpirationTime");

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

            foreach (XmlNode item in equityExpirationTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        equityExpirationTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(equityExpirationTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        equityExpirationTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        equityExpirationTime = new BusinessCenterTime(item);
                    }
                }
            }


            XmlNodeList expirationTimeDeterminationNodeList = xmlNode.SelectNodes("expirationTimeDetermination");

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

            foreach (XmlNode item in expirationTimeDeterminationNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        expirationTimeDeterminationIDRef = item.Attributes["id"].Name;
                        DeterminationMethod ob = DeterminationMethod();
                        IDManager.SetID(expirationTimeDeterminationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        expirationTimeDeterminationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        expirationTimeDetermination = new DeterminationMethod(item);
                    }
                }
            }
        }
 public CashSettlement(XmlNode xmlNode)
 {
     XmlNode cashSettlementValuationTimeNode = xmlNode.SelectSingleNode("cashSettlementValuationTime");
     
     if (cashSettlementValuationTimeNode != null)
     {
         if (cashSettlementValuationTimeNode.Attributes["href"] != null || cashSettlementValuationTimeNode.Attributes["id"] != null) 
         {
             if (cashSettlementValuationTimeNode.Attributes["id"] != null) 
             {
                 cashSettlementValuationTimeIDRef_ = cashSettlementValuationTimeNode.Attributes["id"].Value;
                 BusinessCenterTime ob = new BusinessCenterTime(cashSettlementValuationTimeNode);
                 IDManager.SetID(cashSettlementValuationTimeIDRef_, ob);
             }
             else if (cashSettlementValuationTimeNode.Attributes["href"] != null)
             {
                 cashSettlementValuationTimeIDRef_ = cashSettlementValuationTimeNode.Attributes["href"].Value;
             }
             else
             {
                 cashSettlementValuationTime_ = new BusinessCenterTime(cashSettlementValuationTimeNode);
             }
         }
         else
         {
             cashSettlementValuationTime_ = new BusinessCenterTime(cashSettlementValuationTimeNode);
         }
     }
     
 
     XmlNode cashSettlementValuationDateNode = xmlNode.SelectSingleNode("cashSettlementValuationDate");
     
     if (cashSettlementValuationDateNode != null)
     {
         if (cashSettlementValuationDateNode.Attributes["href"] != null || cashSettlementValuationDateNode.Attributes["id"] != null) 
         {
             if (cashSettlementValuationDateNode.Attributes["id"] != null) 
             {
                 cashSettlementValuationDateIDRef_ = cashSettlementValuationDateNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(cashSettlementValuationDateNode);
                 IDManager.SetID(cashSettlementValuationDateIDRef_, ob);
             }
             else if (cashSettlementValuationDateNode.Attributes["href"] != null)
             {
                 cashSettlementValuationDateIDRef_ = cashSettlementValuationDateNode.Attributes["href"].Value;
             }
             else
             {
                 cashSettlementValuationDate_ = new RelativeDateOffset(cashSettlementValuationDateNode);
             }
         }
         else
         {
             cashSettlementValuationDate_ = new RelativeDateOffset(cashSettlementValuationDateNode);
         }
     }
     
 
     XmlNode cashSettlementPaymentDateNode = xmlNode.SelectSingleNode("cashSettlementPaymentDate");
     
     if (cashSettlementPaymentDateNode != null)
     {
         if (cashSettlementPaymentDateNode.Attributes["href"] != null || cashSettlementPaymentDateNode.Attributes["id"] != null) 
         {
             if (cashSettlementPaymentDateNode.Attributes["id"] != null) 
             {
                 cashSettlementPaymentDateIDRef_ = cashSettlementPaymentDateNode.Attributes["id"].Value;
                 CashSettlementPaymentDate ob = new CashSettlementPaymentDate(cashSettlementPaymentDateNode);
                 IDManager.SetID(cashSettlementPaymentDateIDRef_, ob);
             }
             else if (cashSettlementPaymentDateNode.Attributes["href"] != null)
             {
                 cashSettlementPaymentDateIDRef_ = cashSettlementPaymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 cashSettlementPaymentDate_ = new CashSettlementPaymentDate(cashSettlementPaymentDateNode);
             }
         }
         else
         {
             cashSettlementPaymentDate_ = new CashSettlementPaymentDate(cashSettlementPaymentDateNode);
         }
     }
     
 
     XmlNode cashPriceMethodNode = xmlNode.SelectSingleNode("cashPriceMethod");
     
     if (cashPriceMethodNode != null)
     {
         if (cashPriceMethodNode.Attributes["href"] != null || cashPriceMethodNode.Attributes["id"] != null) 
         {
             if (cashPriceMethodNode.Attributes["id"] != null) 
             {
                 cashPriceMethodIDRef_ = cashPriceMethodNode.Attributes["id"].Value;
                 CashPriceMethod ob = new CashPriceMethod(cashPriceMethodNode);
                 IDManager.SetID(cashPriceMethodIDRef_, ob);
             }
             else if (cashPriceMethodNode.Attributes["href"] != null)
             {
                 cashPriceMethodIDRef_ = cashPriceMethodNode.Attributes["href"].Value;
             }
             else
             {
                 cashPriceMethod_ = new CashPriceMethod(cashPriceMethodNode);
             }
         }
         else
         {
             cashPriceMethod_ = new CashPriceMethod(cashPriceMethodNode);
         }
     }
     
 
     XmlNode cashPriceAlternateMethodNode = xmlNode.SelectSingleNode("cashPriceAlternateMethod");
     
     if (cashPriceAlternateMethodNode != null)
     {
         if (cashPriceAlternateMethodNode.Attributes["href"] != null || cashPriceAlternateMethodNode.Attributes["id"] != null) 
         {
             if (cashPriceAlternateMethodNode.Attributes["id"] != null) 
             {
                 cashPriceAlternateMethodIDRef_ = cashPriceAlternateMethodNode.Attributes["id"].Value;
                 CashPriceMethod ob = new CashPriceMethod(cashPriceAlternateMethodNode);
                 IDManager.SetID(cashPriceAlternateMethodIDRef_, ob);
             }
             else if (cashPriceAlternateMethodNode.Attributes["href"] != null)
             {
                 cashPriceAlternateMethodIDRef_ = cashPriceAlternateMethodNode.Attributes["href"].Value;
             }
             else
             {
                 cashPriceAlternateMethod_ = new CashPriceMethod(cashPriceAlternateMethodNode);
             }
         }
         else
         {
             cashPriceAlternateMethod_ = new CashPriceMethod(cashPriceAlternateMethodNode);
         }
     }
     
 
     XmlNode parYieldCurveAdjustedMethodNode = xmlNode.SelectSingleNode("parYieldCurveAdjustedMethod");
     
     if (parYieldCurveAdjustedMethodNode != null)
     {
         if (parYieldCurveAdjustedMethodNode.Attributes["href"] != null || parYieldCurveAdjustedMethodNode.Attributes["id"] != null) 
         {
             if (parYieldCurveAdjustedMethodNode.Attributes["id"] != null) 
             {
                 parYieldCurveAdjustedMethodIDRef_ = parYieldCurveAdjustedMethodNode.Attributes["id"].Value;
                 YieldCurveMethod ob = new YieldCurveMethod(parYieldCurveAdjustedMethodNode);
                 IDManager.SetID(parYieldCurveAdjustedMethodIDRef_, ob);
             }
             else if (parYieldCurveAdjustedMethodNode.Attributes["href"] != null)
             {
                 parYieldCurveAdjustedMethodIDRef_ = parYieldCurveAdjustedMethodNode.Attributes["href"].Value;
             }
             else
             {
                 parYieldCurveAdjustedMethod_ = new YieldCurveMethod(parYieldCurveAdjustedMethodNode);
             }
         }
         else
         {
             parYieldCurveAdjustedMethod_ = new YieldCurveMethod(parYieldCurveAdjustedMethodNode);
         }
     }
     
 
     XmlNode zeroCouponYieldAdjustedMethodNode = xmlNode.SelectSingleNode("zeroCouponYieldAdjustedMethod");
     
     if (zeroCouponYieldAdjustedMethodNode != null)
     {
         if (zeroCouponYieldAdjustedMethodNode.Attributes["href"] != null || zeroCouponYieldAdjustedMethodNode.Attributes["id"] != null) 
         {
             if (zeroCouponYieldAdjustedMethodNode.Attributes["id"] != null) 
             {
                 zeroCouponYieldAdjustedMethodIDRef_ = zeroCouponYieldAdjustedMethodNode.Attributes["id"].Value;
                 YieldCurveMethod ob = new YieldCurveMethod(zeroCouponYieldAdjustedMethodNode);
                 IDManager.SetID(zeroCouponYieldAdjustedMethodIDRef_, ob);
             }
             else if (zeroCouponYieldAdjustedMethodNode.Attributes["href"] != null)
             {
                 zeroCouponYieldAdjustedMethodIDRef_ = zeroCouponYieldAdjustedMethodNode.Attributes["href"].Value;
             }
             else
             {
                 zeroCouponYieldAdjustedMethod_ = new YieldCurveMethod(zeroCouponYieldAdjustedMethodNode);
             }
         }
         else
         {
             zeroCouponYieldAdjustedMethod_ = new YieldCurveMethod(zeroCouponYieldAdjustedMethodNode);
         }
     }
     
 
     XmlNode parYieldCurveUnadjustedMethodNode = xmlNode.SelectSingleNode("parYieldCurveUnadjustedMethod");
     
     if (parYieldCurveUnadjustedMethodNode != null)
     {
         if (parYieldCurveUnadjustedMethodNode.Attributes["href"] != null || parYieldCurveUnadjustedMethodNode.Attributes["id"] != null) 
         {
             if (parYieldCurveUnadjustedMethodNode.Attributes["id"] != null) 
             {
                 parYieldCurveUnadjustedMethodIDRef_ = parYieldCurveUnadjustedMethodNode.Attributes["id"].Value;
                 YieldCurveMethod ob = new YieldCurveMethod(parYieldCurveUnadjustedMethodNode);
                 IDManager.SetID(parYieldCurveUnadjustedMethodIDRef_, ob);
             }
             else if (parYieldCurveUnadjustedMethodNode.Attributes["href"] != null)
             {
                 parYieldCurveUnadjustedMethodIDRef_ = parYieldCurveUnadjustedMethodNode.Attributes["href"].Value;
             }
             else
             {
                 parYieldCurveUnadjustedMethod_ = new YieldCurveMethod(parYieldCurveUnadjustedMethodNode);
             }
         }
         else
         {
             parYieldCurveUnadjustedMethod_ = new YieldCurveMethod(parYieldCurveUnadjustedMethodNode);
         }
     }
     
 
     XmlNode crossCurrencyMethodNode = xmlNode.SelectSingleNode("crossCurrencyMethod");
     
     if (crossCurrencyMethodNode != null)
     {
         if (crossCurrencyMethodNode.Attributes["href"] != null || crossCurrencyMethodNode.Attributes["id"] != null) 
         {
             if (crossCurrencyMethodNode.Attributes["id"] != null) 
             {
                 crossCurrencyMethodIDRef_ = crossCurrencyMethodNode.Attributes["id"].Value;
                 CrossCurrencyMethod ob = new CrossCurrencyMethod(crossCurrencyMethodNode);
                 IDManager.SetID(crossCurrencyMethodIDRef_, ob);
             }
             else if (crossCurrencyMethodNode.Attributes["href"] != null)
             {
                 crossCurrencyMethodIDRef_ = crossCurrencyMethodNode.Attributes["href"].Value;
             }
             else
             {
                 crossCurrencyMethod_ = new CrossCurrencyMethod(crossCurrencyMethodNode);
             }
         }
         else
         {
             crossCurrencyMethod_ = new CrossCurrencyMethod(crossCurrencyMethodNode);
         }
     }
     
 
     XmlNode collateralizedCashPriceMethodNode = xmlNode.SelectSingleNode("collateralizedCashPriceMethod");
     
     if (collateralizedCashPriceMethodNode != null)
     {
         if (collateralizedCashPriceMethodNode.Attributes["href"] != null || collateralizedCashPriceMethodNode.Attributes["id"] != null) 
         {
             if (collateralizedCashPriceMethodNode.Attributes["id"] != null) 
             {
                 collateralizedCashPriceMethodIDRef_ = collateralizedCashPriceMethodNode.Attributes["id"].Value;
                 YieldCurveMethod ob = new YieldCurveMethod(collateralizedCashPriceMethodNode);
                 IDManager.SetID(collateralizedCashPriceMethodIDRef_, ob);
             }
             else if (collateralizedCashPriceMethodNode.Attributes["href"] != null)
             {
                 collateralizedCashPriceMethodIDRef_ = collateralizedCashPriceMethodNode.Attributes["href"].Value;
             }
             else
             {
                 collateralizedCashPriceMethod_ = new YieldCurveMethod(collateralizedCashPriceMethodNode);
             }
         }
         else
         {
             collateralizedCashPriceMethod_ = new YieldCurveMethod(collateralizedCashPriceMethodNode);
         }
     }
     
 
 }
 public FxSpotRateSource(XmlNode xmlNode)
 {
     XmlNodeList primaryRateSourceNodeList = xmlNode.SelectNodes("primaryRateSource");
     if (primaryRateSourceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in primaryRateSourceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 primaryRateSourceIDRef = item.Attributes["id"].Name;
                 InformationSource ob = InformationSource();
                 IDManager.SetID(primaryRateSourceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 primaryRateSourceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 primaryRateSource = new InformationSource(item);
             }
         }
     }
     
 
     XmlNodeList secondaryRateSourceNodeList = xmlNode.SelectNodes("secondaryRateSource");
     if (secondaryRateSourceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in secondaryRateSourceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 secondaryRateSourceIDRef = item.Attributes["id"].Name;
                 InformationSource ob = InformationSource();
                 IDManager.SetID(secondaryRateSourceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 secondaryRateSourceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 secondaryRateSource = new InformationSource(item);
             }
         }
     }
     
 
     XmlNodeList fixingTimeNodeList = xmlNode.SelectNodes("fixingTime");
     if (fixingTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fixingTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fixingTimeIDRef = item.Attributes["id"].Name;
                 BusinessCenterTime ob = BusinessCenterTime();
                 IDManager.SetID(fixingTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixingTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixingTime = new BusinessCenterTime(item);
             }
         }
     }
     
 
 }
        public FxDigitalAmericanExercise(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode commencementDateNode = xmlNode.SelectSingleNode("commencementDate");

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


            XmlNode expiryDateNode = xmlNode.SelectSingleNode("expiryDate");

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


            XmlNode expiryTimeNode = xmlNode.SelectSingleNode("expiryTime");

            if (expiryTimeNode != null)
            {
                if (expiryTimeNode.Attributes["href"] != null || expiryTimeNode.Attributes["id"] != null)
                {
                    if (expiryTimeNode.Attributes["id"] != null)
                    {
                        expiryTimeIDRef_ = expiryTimeNode.Attributes["id"].Value;
                        BusinessCenterTime ob = new BusinessCenterTime(expiryTimeNode);
                        IDManager.SetID(expiryTimeIDRef_, ob);
                    }
                    else if (expiryTimeNode.Attributes["href"] != null)
                    {
                        expiryTimeIDRef_ = expiryTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        expiryTime_ = new BusinessCenterTime(expiryTimeNode);
                    }
                }
                else
                {
                    expiryTime_ = new BusinessCenterTime(expiryTimeNode);
                }
            }


            XmlNode cutNameNode = xmlNode.SelectSingleNode("cutName");

            if (cutNameNode != null)
            {
                if (cutNameNode.Attributes["href"] != null || cutNameNode.Attributes["id"] != null)
                {
                    if (cutNameNode.Attributes["id"] != null)
                    {
                        cutNameIDRef_ = cutNameNode.Attributes["id"].Value;
                        CutName ob = new CutName(cutNameNode);
                        IDManager.SetID(cutNameIDRef_, ob);
                    }
                    else if (cutNameNode.Attributes["href"] != null)
                    {
                        cutNameIDRef_ = cutNameNode.Attributes["href"].Value;
                    }
                    else
                    {
                        cutName_ = new CutName(cutNameNode);
                    }
                }
                else
                {
                    cutName_ = new CutName(cutNameNode);
                }
            }


            XmlNode latestValueDateNode = xmlNode.SelectSingleNode("latestValueDate");

            if (latestValueDateNode != null)
            {
                if (latestValueDateNode.Attributes["href"] != null || latestValueDateNode.Attributes["id"] != null)
                {
                    if (latestValueDateNode.Attributes["id"] != null)
                    {
                        latestValueDateIDRef_ = latestValueDateNode.Attributes["id"].Value;
                        XsdTypeDate ob = new XsdTypeDate(latestValueDateNode);
                        IDManager.SetID(latestValueDateIDRef_, ob);
                    }
                    else if (latestValueDateNode.Attributes["href"] != null)
                    {
                        latestValueDateIDRef_ = latestValueDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        latestValueDate_ = new XsdTypeDate(latestValueDateNode);
                    }
                }
                else
                {
                    latestValueDate_ = new XsdTypeDate(latestValueDateNode);
                }
            }
        }
 public EuropeanExercise(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList expirationDateNodeList = xmlNode.SelectNodes("expirationDate");
     if (expirationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in expirationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 expirationDateIDRef = item.Attributes["id"].Name;
                 AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                 IDManager.SetID(expirationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 expirationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 expirationDate = new AdjustableOrRelativeDate(item);
             }
         }
     }
     
 
     XmlNodeList relevantUnderlyingDateNodeList = xmlNode.SelectNodes("relevantUnderlyingDate");
     if (relevantUnderlyingDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in relevantUnderlyingDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 relevantUnderlyingDateIDRef = item.Attributes["id"].Name;
                 AdjustableOrRelativeDates ob = AdjustableOrRelativeDates();
                 IDManager.SetID(relevantUnderlyingDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 relevantUnderlyingDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 relevantUnderlyingDate = new AdjustableOrRelativeDates(item);
             }
         }
     }
     
 
     XmlNodeList earliestExerciseTimeNodeList = xmlNode.SelectNodes("earliestExerciseTime");
     if (earliestExerciseTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in earliestExerciseTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 earliestExerciseTimeIDRef = item.Attributes["id"].Name;
                 BusinessCenterTime ob = BusinessCenterTime();
                 IDManager.SetID(earliestExerciseTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 earliestExerciseTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 earliestExerciseTime = new BusinessCenterTime(item);
             }
         }
     }
     
 
     XmlNodeList expirationTimeNodeList = xmlNode.SelectNodes("expirationTime");
     if (expirationTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in expirationTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 expirationTimeIDRef = item.Attributes["id"].Name;
                 BusinessCenterTime ob = BusinessCenterTime();
                 IDManager.SetID(expirationTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 expirationTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 expirationTime = new BusinessCenterTime(item);
             }
         }
     }
     
 
     XmlNodeList partialExerciseNodeList = xmlNode.SelectNodes("partialExercise");
     if (partialExerciseNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in partialExerciseNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 partialExerciseIDRef = item.Attributes["id"].Name;
                 PartialExercise ob = PartialExercise();
                 IDManager.SetID(partialExerciseIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 partialExerciseIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 partialExercise = new PartialExercise(item);
             }
         }
     }
     
 
     XmlNodeList exerciseFeeNodeList = xmlNode.SelectNodes("exerciseFee");
     if (exerciseFeeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in exerciseFeeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 exerciseFeeIDRef = item.Attributes["id"].Name;
                 ExerciseFee ob = ExerciseFee();
                 IDManager.SetID(exerciseFeeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 exerciseFeeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 exerciseFee = new ExerciseFee(item);
             }
         }
     }
     
 
 }
 public EquityAmericanExercise(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode latestExerciseTimeTypeNode = xmlNode.SelectSingleNode("latestExerciseTimeType");
     
     if (latestExerciseTimeTypeNode != null)
     {
         if (latestExerciseTimeTypeNode.Attributes["href"] != null || latestExerciseTimeTypeNode.Attributes["id"] != null) 
         {
             if (latestExerciseTimeTypeNode.Attributes["id"] != null) 
             {
                 latestExerciseTimeTypeIDRef_ = latestExerciseTimeTypeNode.Attributes["id"].Value;
                 TimeTypeEnum ob = new TimeTypeEnum(latestExerciseTimeTypeNode);
                 IDManager.SetID(latestExerciseTimeTypeIDRef_, ob);
             }
             else if (latestExerciseTimeTypeNode.Attributes["href"] != null)
             {
                 latestExerciseTimeTypeIDRef_ = latestExerciseTimeTypeNode.Attributes["href"].Value;
             }
             else
             {
                 latestExerciseTimeType_ = new TimeTypeEnum(latestExerciseTimeTypeNode);
             }
         }
         else
         {
             latestExerciseTimeType_ = new TimeTypeEnum(latestExerciseTimeTypeNode);
         }
     }
     
 
     XmlNode equityExpirationTimeTypeNode = xmlNode.SelectSingleNode("equityExpirationTimeType");
     
     if (equityExpirationTimeTypeNode != null)
     {
         if (equityExpirationTimeTypeNode.Attributes["href"] != null || equityExpirationTimeTypeNode.Attributes["id"] != null) 
         {
             if (equityExpirationTimeTypeNode.Attributes["id"] != null) 
             {
                 equityExpirationTimeTypeIDRef_ = equityExpirationTimeTypeNode.Attributes["id"].Value;
                 TimeTypeEnum ob = new TimeTypeEnum(equityExpirationTimeTypeNode);
                 IDManager.SetID(equityExpirationTimeTypeIDRef_, ob);
             }
             else if (equityExpirationTimeTypeNode.Attributes["href"] != null)
             {
                 equityExpirationTimeTypeIDRef_ = equityExpirationTimeTypeNode.Attributes["href"].Value;
             }
             else
             {
                 equityExpirationTimeType_ = new TimeTypeEnum(equityExpirationTimeTypeNode);
             }
         }
         else
         {
             equityExpirationTimeType_ = new TimeTypeEnum(equityExpirationTimeTypeNode);
         }
     }
     
 
     XmlNode equityExpirationTimeNode = xmlNode.SelectSingleNode("equityExpirationTime");
     
     if (equityExpirationTimeNode != null)
     {
         if (equityExpirationTimeNode.Attributes["href"] != null || equityExpirationTimeNode.Attributes["id"] != null) 
         {
             if (equityExpirationTimeNode.Attributes["id"] != null) 
             {
                 equityExpirationTimeIDRef_ = equityExpirationTimeNode.Attributes["id"].Value;
                 BusinessCenterTime ob = new BusinessCenterTime(equityExpirationTimeNode);
                 IDManager.SetID(equityExpirationTimeIDRef_, ob);
             }
             else if (equityExpirationTimeNode.Attributes["href"] != null)
             {
                 equityExpirationTimeIDRef_ = equityExpirationTimeNode.Attributes["href"].Value;
             }
             else
             {
                 equityExpirationTime_ = new BusinessCenterTime(equityExpirationTimeNode);
             }
         }
         else
         {
             equityExpirationTime_ = new BusinessCenterTime(equityExpirationTimeNode);
         }
     }
     
 
     XmlNode expirationTimeDeterminationNode = xmlNode.SelectSingleNode("expirationTimeDetermination");
     
     if (expirationTimeDeterminationNode != null)
     {
         if (expirationTimeDeterminationNode.Attributes["href"] != null || expirationTimeDeterminationNode.Attributes["id"] != null) 
         {
             if (expirationTimeDeterminationNode.Attributes["id"] != null) 
             {
                 expirationTimeDeterminationIDRef_ = expirationTimeDeterminationNode.Attributes["id"].Value;
                 DeterminationMethod ob = new DeterminationMethod(expirationTimeDeterminationNode);
                 IDManager.SetID(expirationTimeDeterminationIDRef_, ob);
             }
             else if (expirationTimeDeterminationNode.Attributes["href"] != null)
             {
                 expirationTimeDeterminationIDRef_ = expirationTimeDeterminationNode.Attributes["href"].Value;
             }
             else
             {
                 expirationTimeDetermination_ = new DeterminationMethod(expirationTimeDeterminationNode);
             }
         }
         else
         {
             expirationTimeDetermination_ = new DeterminationMethod(expirationTimeDeterminationNode);
         }
     }
     
 
     XmlNode equityMultipleExerciseNode = xmlNode.SelectSingleNode("equityMultipleExercise");
     
     if (equityMultipleExerciseNode != null)
     {
         if (equityMultipleExerciseNode.Attributes["href"] != null || equityMultipleExerciseNode.Attributes["id"] != null) 
         {
             if (equityMultipleExerciseNode.Attributes["id"] != null) 
             {
                 equityMultipleExerciseIDRef_ = equityMultipleExerciseNode.Attributes["id"].Value;
                 EquityMultipleExercise ob = new EquityMultipleExercise(equityMultipleExerciseNode);
                 IDManager.SetID(equityMultipleExerciseIDRef_, ob);
             }
             else if (equityMultipleExerciseNode.Attributes["href"] != null)
             {
                 equityMultipleExerciseIDRef_ = equityMultipleExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 equityMultipleExercise_ = new EquityMultipleExercise(equityMultipleExerciseNode);
             }
         }
         else
         {
             equityMultipleExercise_ = new EquityMultipleExercise(equityMultipleExerciseNode);
         }
     }
     
 
 }
        public EquityAmericanExercise(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList latestExerciseTimeTypeNodeList = xmlNode.SelectNodes("latestExerciseTimeType");

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

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


            XmlNodeList equityExpirationTimeTypeNodeList = xmlNode.SelectNodes("equityExpirationTimeType");

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

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


            XmlNodeList equityExpirationTimeNodeList = xmlNode.SelectNodes("equityExpirationTime");

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

            foreach (XmlNode item in equityExpirationTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        equityExpirationTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(equityExpirationTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        equityExpirationTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        equityExpirationTime = new BusinessCenterTime(item);
                    }
                }
            }


            XmlNodeList expirationTimeDeterminationNodeList = xmlNode.SelectNodes("expirationTimeDetermination");

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

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


            XmlNodeList equityMultipleExerciseNodeList = xmlNode.SelectNodes("equityMultipleExercise");

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

            foreach (XmlNode item in equityMultipleExerciseNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        equityMultipleExerciseIDRef = item.Attributes["id"].Name;
                        EquityMultipleExercise ob = EquityMultipleExercise();
                        IDManager.SetID(equityMultipleExerciseIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        equityMultipleExerciseIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        equityMultipleExercise = new EquityMultipleExercise(item);
                    }
                }
            }
        }
Example #57
0
        public BermudaExercise(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode bermudaExerciseDatesNode = xmlNode.SelectSingleNode("bermudaExerciseDates");

            if (bermudaExerciseDatesNode != null)
            {
                if (bermudaExerciseDatesNode.Attributes["href"] != null || bermudaExerciseDatesNode.Attributes["id"] != null)
                {
                    if (bermudaExerciseDatesNode.Attributes["id"] != null)
                    {
                        bermudaExerciseDatesIDRef_ = bermudaExerciseDatesNode.Attributes["id"].Value;
                        AdjustableOrRelativeDates ob = new AdjustableOrRelativeDates(bermudaExerciseDatesNode);
                        IDManager.SetID(bermudaExerciseDatesIDRef_, ob);
                    }
                    else if (bermudaExerciseDatesNode.Attributes["href"] != null)
                    {
                        bermudaExerciseDatesIDRef_ = bermudaExerciseDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        bermudaExerciseDates_ = new AdjustableOrRelativeDates(bermudaExerciseDatesNode);
                    }
                }
                else
                {
                    bermudaExerciseDates_ = new AdjustableOrRelativeDates(bermudaExerciseDatesNode);
                }
            }


            XmlNode relevantUnderlyingDateNode = xmlNode.SelectSingleNode("relevantUnderlyingDate");

            if (relevantUnderlyingDateNode != null)
            {
                if (relevantUnderlyingDateNode.Attributes["href"] != null || relevantUnderlyingDateNode.Attributes["id"] != null)
                {
                    if (relevantUnderlyingDateNode.Attributes["id"] != null)
                    {
                        relevantUnderlyingDateIDRef_ = relevantUnderlyingDateNode.Attributes["id"].Value;
                        AdjustableOrRelativeDates ob = new AdjustableOrRelativeDates(relevantUnderlyingDateNode);
                        IDManager.SetID(relevantUnderlyingDateIDRef_, ob);
                    }
                    else if (relevantUnderlyingDateNode.Attributes["href"] != null)
                    {
                        relevantUnderlyingDateIDRef_ = relevantUnderlyingDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        relevantUnderlyingDate_ = new AdjustableOrRelativeDates(relevantUnderlyingDateNode);
                    }
                }
                else
                {
                    relevantUnderlyingDate_ = new AdjustableOrRelativeDates(relevantUnderlyingDateNode);
                }
            }


            XmlNode earliestExerciseTimeNode = xmlNode.SelectSingleNode("earliestExerciseTime");

            if (earliestExerciseTimeNode != null)
            {
                if (earliestExerciseTimeNode.Attributes["href"] != null || earliestExerciseTimeNode.Attributes["id"] != null)
                {
                    if (earliestExerciseTimeNode.Attributes["id"] != null)
                    {
                        earliestExerciseTimeIDRef_ = earliestExerciseTimeNode.Attributes["id"].Value;
                        BusinessCenterTime ob = new BusinessCenterTime(earliestExerciseTimeNode);
                        IDManager.SetID(earliestExerciseTimeIDRef_, ob);
                    }
                    else if (earliestExerciseTimeNode.Attributes["href"] != null)
                    {
                        earliestExerciseTimeIDRef_ = earliestExerciseTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        earliestExerciseTime_ = new BusinessCenterTime(earliestExerciseTimeNode);
                    }
                }
                else
                {
                    earliestExerciseTime_ = new BusinessCenterTime(earliestExerciseTimeNode);
                }
            }


            XmlNode latestExerciseTimeNode = xmlNode.SelectSingleNode("latestExerciseTime");

            if (latestExerciseTimeNode != null)
            {
                if (latestExerciseTimeNode.Attributes["href"] != null || latestExerciseTimeNode.Attributes["id"] != null)
                {
                    if (latestExerciseTimeNode.Attributes["id"] != null)
                    {
                        latestExerciseTimeIDRef_ = latestExerciseTimeNode.Attributes["id"].Value;
                        BusinessCenterTime ob = new BusinessCenterTime(latestExerciseTimeNode);
                        IDManager.SetID(latestExerciseTimeIDRef_, ob);
                    }
                    else if (latestExerciseTimeNode.Attributes["href"] != null)
                    {
                        latestExerciseTimeIDRef_ = latestExerciseTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        latestExerciseTime_ = new BusinessCenterTime(latestExerciseTimeNode);
                    }
                }
                else
                {
                    latestExerciseTime_ = new BusinessCenterTime(latestExerciseTimeNode);
                }
            }


            XmlNode expirationTimeNode = xmlNode.SelectSingleNode("expirationTime");

            if (expirationTimeNode != null)
            {
                if (expirationTimeNode.Attributes["href"] != null || expirationTimeNode.Attributes["id"] != null)
                {
                    if (expirationTimeNode.Attributes["id"] != null)
                    {
                        expirationTimeIDRef_ = expirationTimeNode.Attributes["id"].Value;
                        BusinessCenterTime ob = new BusinessCenterTime(expirationTimeNode);
                        IDManager.SetID(expirationTimeIDRef_, ob);
                    }
                    else if (expirationTimeNode.Attributes["href"] != null)
                    {
                        expirationTimeIDRef_ = expirationTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        expirationTime_ = new BusinessCenterTime(expirationTimeNode);
                    }
                }
                else
                {
                    expirationTime_ = new BusinessCenterTime(expirationTimeNode);
                }
            }


            XmlNode multipleExerciseNode = xmlNode.SelectSingleNode("multipleExercise");

            if (multipleExerciseNode != null)
            {
                if (multipleExerciseNode.Attributes["href"] != null || multipleExerciseNode.Attributes["id"] != null)
                {
                    if (multipleExerciseNode.Attributes["id"] != null)
                    {
                        multipleExerciseIDRef_ = multipleExerciseNode.Attributes["id"].Value;
                        MultipleExercise ob = new MultipleExercise(multipleExerciseNode);
                        IDManager.SetID(multipleExerciseIDRef_, ob);
                    }
                    else if (multipleExerciseNode.Attributes["href"] != null)
                    {
                        multipleExerciseIDRef_ = multipleExerciseNode.Attributes["href"].Value;
                    }
                    else
                    {
                        multipleExercise_ = new MultipleExercise(multipleExerciseNode);
                    }
                }
                else
                {
                    multipleExercise_ = new MultipleExercise(multipleExerciseNode);
                }
            }


            XmlNode exerciseFeeScheduleNode = xmlNode.SelectSingleNode("exerciseFeeSchedule");

            if (exerciseFeeScheduleNode != null)
            {
                if (exerciseFeeScheduleNode.Attributes["href"] != null || exerciseFeeScheduleNode.Attributes["id"] != null)
                {
                    if (exerciseFeeScheduleNode.Attributes["id"] != null)
                    {
                        exerciseFeeScheduleIDRef_ = exerciseFeeScheduleNode.Attributes["id"].Value;
                        ExerciseFeeSchedule ob = new ExerciseFeeSchedule(exerciseFeeScheduleNode);
                        IDManager.SetID(exerciseFeeScheduleIDRef_, ob);
                    }
                    else if (exerciseFeeScheduleNode.Attributes["href"] != null)
                    {
                        exerciseFeeScheduleIDRef_ = exerciseFeeScheduleNode.Attributes["href"].Value;
                    }
                    else
                    {
                        exerciseFeeSchedule_ = new ExerciseFeeSchedule(exerciseFeeScheduleNode);
                    }
                }
                else
                {
                    exerciseFeeSchedule_ = new ExerciseFeeSchedule(exerciseFeeScheduleNode);
                }
            }
        }
        public EquityValuation(XmlNode xmlNode)
        {
            XmlNodeList valuationDateNodeList = xmlNode.SelectNodes("valuationDate");

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

            foreach (XmlNode item in valuationDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        valuationDateIDRef = item.Attributes["id"].Name;
                        AdjustableDateOrRelativeDateSequence ob = AdjustableDateOrRelativeDateSequence();
                        IDManager.SetID(valuationDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        valuationDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        valuationDate = new AdjustableDateOrRelativeDateSequence(item);
                    }
                }
            }


            XmlNodeList valuationDatesNodeList = xmlNode.SelectNodes("valuationDates");

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

            foreach (XmlNode item in valuationDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        valuationDatesIDRef = item.Attributes["id"].Name;
                        AdjustableRelativeOrPeriodicDates ob = AdjustableRelativeOrPeriodicDates();
                        IDManager.SetID(valuationDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        valuationDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        valuationDates = new AdjustableRelativeOrPeriodicDates(item);
                    }
                }
            }


            XmlNodeList valuationTimeTypeNodeList = xmlNode.SelectNodes("valuationTimeType");

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

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


            XmlNodeList valuationTimeNodeList = xmlNode.SelectNodes("valuationTime");

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

            foreach (XmlNode item in valuationTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        valuationTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(valuationTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        valuationTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        valuationTime = new BusinessCenterTime(item);
                    }
                }
            }


            XmlNodeList futuresPriceValuationNodeList = xmlNode.SelectNodes("futuresPriceValuation");

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

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


            XmlNodeList optionsPriceValuationNodeList = xmlNode.SelectNodes("optionsPriceValuation");

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

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


            XmlNodeList numberOfValuationDatesNodeList = xmlNode.SelectNodes("numberOfValuationDates");

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

            foreach (XmlNode item in numberOfValuationDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        numberOfValuationDatesIDRef = item.Attributes["id"].Name;
                        XsdTypeNonNegativeInteger ob = XsdTypeNonNegativeInteger();
                        IDManager.SetID(numberOfValuationDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        numberOfValuationDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        numberOfValuationDates = new XsdTypeNonNegativeInteger(item);
                    }
                }
            }


            XmlNodeList dividendValuationDatesNodeList = xmlNode.SelectNodes("dividendValuationDates");

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

            foreach (XmlNode item in dividendValuationDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dividendValuationDatesIDRef = item.Attributes["id"].Name;
                        AdjustableRelativeOrPeriodicDates ob = AdjustableRelativeOrPeriodicDates();
                        IDManager.SetID(dividendValuationDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dividendValuationDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dividendValuationDates = new AdjustableRelativeOrPeriodicDates(item);
                    }
                }
            }


            XmlNodeList fPVFinalPriceElectionFallbackNodeList = xmlNode.SelectNodes("fPVFinalPriceElectionFallback");

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

            foreach (XmlNode item in fPVFinalPriceElectionFallbackNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fPVFinalPriceElectionFallbackIDRef = item.Attributes["id"].Name;
                        FPVFinalPriceElectionFallbackEnum ob = FPVFinalPriceElectionFallbackEnum();
                        IDManager.SetID(fPVFinalPriceElectionFallbackIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fPVFinalPriceElectionFallbackIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fPVFinalPriceElectionFallback = new FPVFinalPriceElectionFallbackEnum(item);
                    }
                }
            }
        }
        public FxDigitalAmericanExercise(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList commencementDateNodeList = xmlNode.SelectNodes("commencementDate");

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

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


            XmlNodeList expiryDateNodeList = xmlNode.SelectNodes("expiryDate");

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

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


            XmlNodeList expiryTimeNodeList = xmlNode.SelectNodes("expiryTime");

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

            foreach (XmlNode item in expiryTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        expiryTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(expiryTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        expiryTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        expiryTime = new BusinessCenterTime(item);
                    }
                }
            }


            XmlNodeList cutNameNodeList = xmlNode.SelectNodes("cutName");

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

            foreach (XmlNode item in cutNameNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        cutNameIDRef = item.Attributes["id"].Name;
                        CutName ob = CutName();
                        IDManager.SetID(cutNameIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        cutNameIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        cutName = new CutName(item);
                    }
                }
            }


            XmlNodeList latestValueDateNodeList = xmlNode.SelectNodes("latestValueDate");

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

            foreach (XmlNode item in latestValueDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        latestValueDateIDRef = item.Attributes["id"].Name;
                        XsdTypeDate ob = XsdTypeDate();
                        IDManager.SetID(latestValueDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        latestValueDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        latestValueDate = new XsdTypeDate(item);
                    }
                }
            }
        }
 public FxEuropeanExercise(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode expiryDateNode = xmlNode.SelectSingleNode("expiryDate");
     
     if (expiryDateNode != null)
     {
         if (expiryDateNode.Attributes["href"] != null || expiryDateNode.Attributes["id"] != null) 
         {
             if (expiryDateNode.Attributes["id"] != null) 
             {
                 expiryDateIDRef_ = expiryDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(expiryDateNode);
                 IDManager.SetID(expiryDateIDRef_, ob);
             }
             else if (expiryDateNode.Attributes["href"] != null)
             {
                 expiryDateIDRef_ = expiryDateNode.Attributes["href"].Value;
             }
             else
             {
                 expiryDate_ = new XsdTypeDate(expiryDateNode);
             }
         }
         else
         {
             expiryDate_ = new XsdTypeDate(expiryDateNode);
         }
     }
     
 
     XmlNode expiryTimeNode = xmlNode.SelectSingleNode("expiryTime");
     
     if (expiryTimeNode != null)
     {
         if (expiryTimeNode.Attributes["href"] != null || expiryTimeNode.Attributes["id"] != null) 
         {
             if (expiryTimeNode.Attributes["id"] != null) 
             {
                 expiryTimeIDRef_ = expiryTimeNode.Attributes["id"].Value;
                 BusinessCenterTime ob = new BusinessCenterTime(expiryTimeNode);
                 IDManager.SetID(expiryTimeIDRef_, ob);
             }
             else if (expiryTimeNode.Attributes["href"] != null)
             {
                 expiryTimeIDRef_ = expiryTimeNode.Attributes["href"].Value;
             }
             else
             {
                 expiryTime_ = new BusinessCenterTime(expiryTimeNode);
             }
         }
         else
         {
             expiryTime_ = new BusinessCenterTime(expiryTimeNode);
         }
     }
     
 
     XmlNode cutNameNode = xmlNode.SelectSingleNode("cutName");
     
     if (cutNameNode != null)
     {
         if (cutNameNode.Attributes["href"] != null || cutNameNode.Attributes["id"] != null) 
         {
             if (cutNameNode.Attributes["id"] != null) 
             {
                 cutNameIDRef_ = cutNameNode.Attributes["id"].Value;
                 CutName ob = new CutName(cutNameNode);
                 IDManager.SetID(cutNameIDRef_, ob);
             }
             else if (cutNameNode.Attributes["href"] != null)
             {
                 cutNameIDRef_ = cutNameNode.Attributes["href"].Value;
             }
             else
             {
                 cutName_ = new CutName(cutNameNode);
             }
         }
         else
         {
             cutName_ = new CutName(cutNameNode);
         }
     }
     
 
     XmlNode valueDateNode = xmlNode.SelectSingleNode("valueDate");
     
     if (valueDateNode != null)
     {
         if (valueDateNode.Attributes["href"] != null || valueDateNode.Attributes["id"] != null) 
         {
             if (valueDateNode.Attributes["id"] != null) 
             {
                 valueDateIDRef_ = valueDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(valueDateNode);
                 IDManager.SetID(valueDateIDRef_, ob);
             }
             else if (valueDateNode.Attributes["href"] != null)
             {
                 valueDateIDRef_ = valueDateNode.Attributes["href"].Value;
             }
             else
             {
                 valueDate_ = new XsdTypeDate(valueDateNode);
             }
         }
         else
         {
             valueDate_ = new XsdTypeDate(valueDateNode);
         }
     }
     
 
 }