コード例 #1
0
 public Strategy(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList strategyComponentIdentifierNodeList = xmlNode.SelectNodes("strategyComponentIdentifier");
     
     if (strategyComponentIdentifierNodeList != null)
     {
         this.strategyComponentIdentifier_ = new List<StrategyComponentIdentification>();
         foreach (XmlNode item in strategyComponentIdentifierNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     strategyComponentIdentifierIDRef_ = item.Attributes["id"].Value;
                     strategyComponentIdentifier_.Add(new StrategyComponentIdentification(item));
                     IDManager.SetID(strategyComponentIdentifierIDRef_, strategyComponentIdentifier_[strategyComponentIdentifier_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     strategyComponentIdentifierIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 strategyComponentIdentifier_.Add(new StrategyComponentIdentification(item));
                 }
             }
             else
             {
                 strategyComponentIdentifier_.Add(new StrategyComponentIdentification(item));
             }
         }
     }
     
 
     XmlNode premiumProductReferenceNode = xmlNode.SelectSingleNode("premiumProductReference");
     
     if (premiumProductReferenceNode != null)
     {
         if (premiumProductReferenceNode.Attributes["href"] != null || premiumProductReferenceNode.Attributes["id"] != null) 
         {
             if (premiumProductReferenceNode.Attributes["id"] != null) 
             {
                 premiumProductReferenceIDRef_ = premiumProductReferenceNode.Attributes["id"].Value;
                 ProductReference ob = new ProductReference(premiumProductReferenceNode);
                 IDManager.SetID(premiumProductReferenceIDRef_, ob);
             }
             else if (premiumProductReferenceNode.Attributes["href"] != null)
             {
                 premiumProductReferenceIDRef_ = premiumProductReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 premiumProductReference_ = new ProductReference(premiumProductReferenceNode);
             }
         }
         else
         {
             premiumProductReference_ = new ProductReference(premiumProductReferenceNode);
         }
     }
     
 
     XmlNode productNode = xmlNode.SelectSingleNode("product");
     
     if (productNode != null)
     {
         if (productNode.Attributes["href"] != null || productNode.Attributes["id"] != null) 
         {
             if (productNode.Attributes["id"] != null) 
             {
                 productIDRef_ = productNode.Attributes["id"].Value;
                 Product ob = new Product(productNode);
                 IDManager.SetID(productIDRef_, ob);
             }
             else if (productNode.Attributes["href"] != null)
             {
                 productIDRef_ = productNode.Attributes["href"].Value;
             }
             else
             {
                 product_ = new Product(productNode);
             }
         }
         else
         {
             product_ = new Product(productNode);
         }
     }
     
 
     XmlNode forwardNode = xmlNode.SelectSingleNode("forward");
     
     if (forwardNode != null)
     {
         if (forwardNode.Attributes["href"] != null || forwardNode.Attributes["id"] != null) 
         {
             if (forwardNode.Attributes["id"] != null) 
             {
                 forwardIDRef_ = forwardNode.Attributes["id"].Value;
                 ForwardSale ob = new ForwardSale(forwardNode);
                 IDManager.SetID(forwardIDRef_, ob);
             }
             else if (forwardNode.Attributes["href"] != null)
             {
                 forwardIDRef_ = forwardNode.Attributes["href"].Value;
             }
             else
             {
                 forward_ = new ForwardSale(forwardNode);
             }
         }
         else
         {
             forward_ = new ForwardSale(forwardNode);
         }
     }
     
 
     XmlNode bondOptionNode = xmlNode.SelectSingleNode("bondOption");
     
     if (bondOptionNode != null)
     {
         if (bondOptionNode.Attributes["href"] != null || bondOptionNode.Attributes["id"] != null) 
         {
             if (bondOptionNode.Attributes["id"] != null) 
             {
                 bondOptionIDRef_ = bondOptionNode.Attributes["id"].Value;
                 BondOption ob = new BondOption(bondOptionNode);
                 IDManager.SetID(bondOptionIDRef_, ob);
             }
             else if (bondOptionNode.Attributes["href"] != null)
             {
                 bondOptionIDRef_ = bondOptionNode.Attributes["href"].Value;
             }
             else
             {
                 bondOption_ = new BondOption(bondOptionNode);
             }
         }
         else
         {
             bondOption_ = new BondOption(bondOptionNode);
         }
     }
     
 
     XmlNode creditDefaultSwapNode = xmlNode.SelectSingleNode("creditDefaultSwap");
     
     if (creditDefaultSwapNode != null)
     {
         if (creditDefaultSwapNode.Attributes["href"] != null || creditDefaultSwapNode.Attributes["id"] != null) 
         {
             if (creditDefaultSwapNode.Attributes["id"] != null) 
             {
                 creditDefaultSwapIDRef_ = creditDefaultSwapNode.Attributes["id"].Value;
                 CreditDefaultSwap ob = new CreditDefaultSwap(creditDefaultSwapNode);
                 IDManager.SetID(creditDefaultSwapIDRef_, ob);
             }
             else if (creditDefaultSwapNode.Attributes["href"] != null)
             {
                 creditDefaultSwapIDRef_ = creditDefaultSwapNode.Attributes["href"].Value;
             }
             else
             {
                 creditDefaultSwap_ = new CreditDefaultSwap(creditDefaultSwapNode);
             }
         }
         else
         {
             creditDefaultSwap_ = new CreditDefaultSwap(creditDefaultSwapNode);
         }
     }
     
 
     XmlNode creditDefaultSwapOptionNode = xmlNode.SelectSingleNode("creditDefaultSwapOption");
     
     if (creditDefaultSwapOptionNode != null)
     {
         if (creditDefaultSwapOptionNode.Attributes["href"] != null || creditDefaultSwapOptionNode.Attributes["id"] != null) 
         {
             if (creditDefaultSwapOptionNode.Attributes["id"] != null) 
             {
                 creditDefaultSwapOptionIDRef_ = creditDefaultSwapOptionNode.Attributes["id"].Value;
                 CreditDefaultSwapOption ob = new CreditDefaultSwapOption(creditDefaultSwapOptionNode);
                 IDManager.SetID(creditDefaultSwapOptionIDRef_, ob);
             }
             else if (creditDefaultSwapOptionNode.Attributes["href"] != null)
             {
                 creditDefaultSwapOptionIDRef_ = creditDefaultSwapOptionNode.Attributes["href"].Value;
             }
             else
             {
                 creditDefaultSwapOption_ = new CreditDefaultSwapOption(creditDefaultSwapOptionNode);
             }
         }
         else
         {
             creditDefaultSwapOption_ = new CreditDefaultSwapOption(creditDefaultSwapOptionNode);
         }
     }
     
 
     XmlNode commodityForwardNode = xmlNode.SelectSingleNode("commodityForward");
     
     if (commodityForwardNode != null)
     {
         if (commodityForwardNode.Attributes["href"] != null || commodityForwardNode.Attributes["id"] != null) 
         {
             if (commodityForwardNode.Attributes["id"] != null) 
             {
                 commodityForwardIDRef_ = commodityForwardNode.Attributes["id"].Value;
                 CommodityForward ob = new CommodityForward(commodityForwardNode);
                 IDManager.SetID(commodityForwardIDRef_, ob);
             }
             else if (commodityForwardNode.Attributes["href"] != null)
             {
                 commodityForwardIDRef_ = commodityForwardNode.Attributes["href"].Value;
             }
             else
             {
                 commodityForward_ = new CommodityForward(commodityForwardNode);
             }
         }
         else
         {
             commodityForward_ = new CommodityForward(commodityForwardNode);
         }
     }
     
 
     XmlNode commodityOptionNode = xmlNode.SelectSingleNode("commodityOption");
     
     if (commodityOptionNode != null)
     {
         if (commodityOptionNode.Attributes["href"] != null || commodityOptionNode.Attributes["id"] != null) 
         {
             if (commodityOptionNode.Attributes["id"] != null) 
             {
                 commodityOptionIDRef_ = commodityOptionNode.Attributes["id"].Value;
                 CommodityOption ob = new CommodityOption(commodityOptionNode);
                 IDManager.SetID(commodityOptionIDRef_, ob);
             }
             else if (commodityOptionNode.Attributes["href"] != null)
             {
                 commodityOptionIDRef_ = commodityOptionNode.Attributes["href"].Value;
             }
             else
             {
                 commodityOption_ = new CommodityOption(commodityOptionNode);
             }
         }
         else
         {
             commodityOption_ = new CommodityOption(commodityOptionNode);
         }
     }
     
 
     XmlNode commoditySwapNode = xmlNode.SelectSingleNode("commoditySwap");
     
     if (commoditySwapNode != null)
     {
         if (commoditySwapNode.Attributes["href"] != null || commoditySwapNode.Attributes["id"] != null) 
         {
             if (commoditySwapNode.Attributes["id"] != null) 
             {
                 commoditySwapIDRef_ = commoditySwapNode.Attributes["id"].Value;
                 CommoditySwap ob = new CommoditySwap(commoditySwapNode);
                 IDManager.SetID(commoditySwapIDRef_, ob);
             }
             else if (commoditySwapNode.Attributes["href"] != null)
             {
                 commoditySwapIDRef_ = commoditySwapNode.Attributes["href"].Value;
             }
             else
             {
                 commoditySwap_ = new CommoditySwap(commoditySwapNode);
             }
         }
         else
         {
             commoditySwap_ = new CommoditySwap(commoditySwapNode);
         }
     }
     
 
     XmlNode commoditySwaptionNode = xmlNode.SelectSingleNode("commoditySwaption");
     
     if (commoditySwaptionNode != null)
     {
         if (commoditySwaptionNode.Attributes["href"] != null || commoditySwaptionNode.Attributes["id"] != null) 
         {
             if (commoditySwaptionNode.Attributes["id"] != null) 
             {
                 commoditySwaptionIDRef_ = commoditySwaptionNode.Attributes["id"].Value;
                 CommoditySwaption ob = new CommoditySwaption(commoditySwaptionNode);
                 IDManager.SetID(commoditySwaptionIDRef_, ob);
             }
             else if (commoditySwaptionNode.Attributes["href"] != null)
             {
                 commoditySwaptionIDRef_ = commoditySwaptionNode.Attributes["href"].Value;
             }
             else
             {
                 commoditySwaption_ = new CommoditySwaption(commoditySwaptionNode);
             }
         }
         else
         {
             commoditySwaption_ = new CommoditySwaption(commoditySwaptionNode);
         }
     }
     
 
     XmlNode correlationSwapNode = xmlNode.SelectSingleNode("correlationSwap");
     
     if (correlationSwapNode != null)
     {
         if (correlationSwapNode.Attributes["href"] != null || correlationSwapNode.Attributes["id"] != null) 
         {
             if (correlationSwapNode.Attributes["id"] != null) 
             {
                 correlationSwapIDRef_ = correlationSwapNode.Attributes["id"].Value;
                 CorrelationSwap ob = new CorrelationSwap(correlationSwapNode);
                 IDManager.SetID(correlationSwapIDRef_, ob);
             }
             else if (correlationSwapNode.Attributes["href"] != null)
             {
                 correlationSwapIDRef_ = correlationSwapNode.Attributes["href"].Value;
             }
             else
             {
                 correlationSwap_ = new CorrelationSwap(correlationSwapNode);
             }
         }
         else
         {
             correlationSwap_ = new CorrelationSwap(correlationSwapNode);
         }
     }
     
 
     XmlNode dividendSwapOptionTransactionSupplementNode = xmlNode.SelectSingleNode("dividendSwapOptionTransactionSupplement");
     
     if (dividendSwapOptionTransactionSupplementNode != null)
     {
         if (dividendSwapOptionTransactionSupplementNode.Attributes["href"] != null || dividendSwapOptionTransactionSupplementNode.Attributes["id"] != null) 
         {
             if (dividendSwapOptionTransactionSupplementNode.Attributes["id"] != null) 
             {
                 dividendSwapOptionTransactionSupplementIDRef_ = dividendSwapOptionTransactionSupplementNode.Attributes["id"].Value;
                 DividendSwapOptionTransactionSupplement ob = new DividendSwapOptionTransactionSupplement(dividendSwapOptionTransactionSupplementNode);
                 IDManager.SetID(dividendSwapOptionTransactionSupplementIDRef_, ob);
             }
             else if (dividendSwapOptionTransactionSupplementNode.Attributes["href"] != null)
             {
                 dividendSwapOptionTransactionSupplementIDRef_ = dividendSwapOptionTransactionSupplementNode.Attributes["href"].Value;
             }
             else
             {
                 dividendSwapOptionTransactionSupplement_ = new DividendSwapOptionTransactionSupplement(dividendSwapOptionTransactionSupplementNode);
             }
         }
         else
         {
             dividendSwapOptionTransactionSupplement_ = new DividendSwapOptionTransactionSupplement(dividendSwapOptionTransactionSupplementNode);
         }
     }
     
 
     XmlNode dividendSwapTransactionSupplementNode = xmlNode.SelectSingleNode("dividendSwapTransactionSupplement");
     
     if (dividendSwapTransactionSupplementNode != null)
     {
         if (dividendSwapTransactionSupplementNode.Attributes["href"] != null || dividendSwapTransactionSupplementNode.Attributes["id"] != null) 
         {
             if (dividendSwapTransactionSupplementNode.Attributes["id"] != null) 
             {
                 dividendSwapTransactionSupplementIDRef_ = dividendSwapTransactionSupplementNode.Attributes["id"].Value;
                 DividendSwapTransactionSupplement ob = new DividendSwapTransactionSupplement(dividendSwapTransactionSupplementNode);
                 IDManager.SetID(dividendSwapTransactionSupplementIDRef_, ob);
             }
             else if (dividendSwapTransactionSupplementNode.Attributes["href"] != null)
             {
                 dividendSwapTransactionSupplementIDRef_ = dividendSwapTransactionSupplementNode.Attributes["href"].Value;
             }
             else
             {
                 dividendSwapTransactionSupplement_ = new DividendSwapTransactionSupplement(dividendSwapTransactionSupplementNode);
             }
         }
         else
         {
             dividendSwapTransactionSupplement_ = new DividendSwapTransactionSupplement(dividendSwapTransactionSupplementNode);
         }
     }
     
 
     XmlNode instrumentTradeDetailsNode = xmlNode.SelectSingleNode("instrumentTradeDetails");
     
     if (instrumentTradeDetailsNode != null)
     {
         if (instrumentTradeDetailsNode.Attributes["href"] != null || instrumentTradeDetailsNode.Attributes["id"] != null) 
         {
             if (instrumentTradeDetailsNode.Attributes["id"] != null) 
             {
                 instrumentTradeDetailsIDRef_ = instrumentTradeDetailsNode.Attributes["id"].Value;
                 InstrumentTradeDetails ob = new InstrumentTradeDetails(instrumentTradeDetailsNode);
                 IDManager.SetID(instrumentTradeDetailsIDRef_, ob);
             }
             else if (instrumentTradeDetailsNode.Attributes["href"] != null)
             {
                 instrumentTradeDetailsIDRef_ = instrumentTradeDetailsNode.Attributes["href"].Value;
             }
             else
             {
                 instrumentTradeDetails_ = new InstrumentTradeDetails(instrumentTradeDetailsNode);
             }
         }
         else
         {
             instrumentTradeDetails_ = new InstrumentTradeDetails(instrumentTradeDetailsNode);
         }
     }
     
 
     XmlNode strategyNode = xmlNode.SelectSingleNode("strategy");
     
     if (strategyNode != null)
     {
         if (strategyNode.Attributes["href"] != null || strategyNode.Attributes["id"] != null) 
         {
             if (strategyNode.Attributes["id"] != null) 
             {
                 strategyIDRef_ = strategyNode.Attributes["id"].Value;
                 Strategy ob = new Strategy(strategyNode);
                 IDManager.SetID(strategyIDRef_, ob);
             }
             else if (strategyNode.Attributes["href"] != null)
             {
                 strategyIDRef_ = strategyNode.Attributes["href"].Value;
             }
             else
             {
                 strategy_ = new Strategy(strategyNode);
             }
         }
         else
         {
             strategy_ = new Strategy(strategyNode);
         }
     }
     
 
     XmlNode returnSwapNode = xmlNode.SelectSingleNode("returnSwap");
     
     if (returnSwapNode != null)
     {
         if (returnSwapNode.Attributes["href"] != null || returnSwapNode.Attributes["id"] != null) 
         {
             if (returnSwapNode.Attributes["id"] != null) 
             {
                 returnSwapIDRef_ = returnSwapNode.Attributes["id"].Value;
                 ReturnSwap ob = new ReturnSwap(returnSwapNode);
                 IDManager.SetID(returnSwapIDRef_, ob);
             }
             else if (returnSwapNode.Attributes["href"] != null)
             {
                 returnSwapIDRef_ = returnSwapNode.Attributes["href"].Value;
             }
             else
             {
                 returnSwap_ = new ReturnSwap(returnSwapNode);
             }
         }
         else
         {
             returnSwap_ = new ReturnSwap(returnSwapNode);
         }
     }
     
 
     XmlNode brokerEquityOptionNode = xmlNode.SelectSingleNode("brokerEquityOption");
     
     if (brokerEquityOptionNode != null)
     {
         if (brokerEquityOptionNode.Attributes["href"] != null || brokerEquityOptionNode.Attributes["id"] != null) 
         {
             if (brokerEquityOptionNode.Attributes["id"] != null) 
             {
                 brokerEquityOptionIDRef_ = brokerEquityOptionNode.Attributes["id"].Value;
                 BrokerEquityOption ob = new BrokerEquityOption(brokerEquityOptionNode);
                 IDManager.SetID(brokerEquityOptionIDRef_, ob);
             }
             else if (brokerEquityOptionNode.Attributes["href"] != null)
             {
                 brokerEquityOptionIDRef_ = brokerEquityOptionNode.Attributes["href"].Value;
             }
             else
             {
                 brokerEquityOption_ = new BrokerEquityOption(brokerEquityOptionNode);
             }
         }
         else
         {
             brokerEquityOption_ = new BrokerEquityOption(brokerEquityOptionNode);
         }
     }
     
 
     XmlNode equityForwardNode = xmlNode.SelectSingleNode("equityForward");
     
     if (equityForwardNode != null)
     {
         if (equityForwardNode.Attributes["href"] != null || equityForwardNode.Attributes["id"] != null) 
         {
             if (equityForwardNode.Attributes["id"] != null) 
             {
                 equityForwardIDRef_ = equityForwardNode.Attributes["id"].Value;
                 EquityForward ob = new EquityForward(equityForwardNode);
                 IDManager.SetID(equityForwardIDRef_, ob);
             }
             else if (equityForwardNode.Attributes["href"] != null)
             {
                 equityForwardIDRef_ = equityForwardNode.Attributes["href"].Value;
             }
             else
             {
                 equityForward_ = new EquityForward(equityForwardNode);
             }
         }
         else
         {
             equityForward_ = new EquityForward(equityForwardNode);
         }
     }
     
 
     XmlNode equityOptionNode = xmlNode.SelectSingleNode("equityOption");
     
     if (equityOptionNode != null)
     {
         if (equityOptionNode.Attributes["href"] != null || equityOptionNode.Attributes["id"] != null) 
         {
             if (equityOptionNode.Attributes["id"] != null) 
             {
                 equityOptionIDRef_ = equityOptionNode.Attributes["id"].Value;
                 EquityOption ob = new EquityOption(equityOptionNode);
                 IDManager.SetID(equityOptionIDRef_, ob);
             }
             else if (equityOptionNode.Attributes["href"] != null)
             {
                 equityOptionIDRef_ = equityOptionNode.Attributes["href"].Value;
             }
             else
             {
                 equityOption_ = new EquityOption(equityOptionNode);
             }
         }
         else
         {
             equityOption_ = new EquityOption(equityOptionNode);
         }
     }
     
 
     XmlNode equityOptionTransactionSupplementNode = xmlNode.SelectSingleNode("equityOptionTransactionSupplement");
     
     if (equityOptionTransactionSupplementNode != null)
     {
         if (equityOptionTransactionSupplementNode.Attributes["href"] != null || equityOptionTransactionSupplementNode.Attributes["id"] != null) 
         {
             if (equityOptionTransactionSupplementNode.Attributes["id"] != null) 
             {
                 equityOptionTransactionSupplementIDRef_ = equityOptionTransactionSupplementNode.Attributes["id"].Value;
                 EquityOptionTransactionSupplement ob = new EquityOptionTransactionSupplement(equityOptionTransactionSupplementNode);
                 IDManager.SetID(equityOptionTransactionSupplementIDRef_, ob);
             }
             else if (equityOptionTransactionSupplementNode.Attributes["href"] != null)
             {
                 equityOptionTransactionSupplementIDRef_ = equityOptionTransactionSupplementNode.Attributes["href"].Value;
             }
             else
             {
                 equityOptionTransactionSupplement_ = new EquityOptionTransactionSupplement(equityOptionTransactionSupplementNode);
             }
         }
         else
         {
             equityOptionTransactionSupplement_ = new EquityOptionTransactionSupplement(equityOptionTransactionSupplementNode);
         }
     }
     
 
     XmlNode fxSingleLegNode = xmlNode.SelectSingleNode("fxSingleLeg");
     
     if (fxSingleLegNode != null)
     {
         if (fxSingleLegNode.Attributes["href"] != null || fxSingleLegNode.Attributes["id"] != null) 
         {
             if (fxSingleLegNode.Attributes["id"] != null) 
             {
                 fxSingleLegIDRef_ = fxSingleLegNode.Attributes["id"].Value;
                 FxSingleLeg ob = new FxSingleLeg(fxSingleLegNode);
                 IDManager.SetID(fxSingleLegIDRef_, ob);
             }
             else if (fxSingleLegNode.Attributes["href"] != null)
             {
                 fxSingleLegIDRef_ = fxSingleLegNode.Attributes["href"].Value;
             }
             else
             {
                 fxSingleLeg_ = new FxSingleLeg(fxSingleLegNode);
             }
         }
         else
         {
             fxSingleLeg_ = new FxSingleLeg(fxSingleLegNode);
         }
     }
     
 
     XmlNode fxSwapNode = xmlNode.SelectSingleNode("fxSwap");
     
     if (fxSwapNode != null)
     {
         if (fxSwapNode.Attributes["href"] != null || fxSwapNode.Attributes["id"] != null) 
         {
             if (fxSwapNode.Attributes["id"] != null) 
             {
                 fxSwapIDRef_ = fxSwapNode.Attributes["id"].Value;
                 FxSwap ob = new FxSwap(fxSwapNode);
                 IDManager.SetID(fxSwapIDRef_, ob);
             }
             else if (fxSwapNode.Attributes["href"] != null)
             {
                 fxSwapIDRef_ = fxSwapNode.Attributes["href"].Value;
             }
             else
             {
                 fxSwap_ = new FxSwap(fxSwapNode);
             }
         }
         else
         {
             fxSwap_ = new FxSwap(fxSwapNode);
         }
     }
     
 
     XmlNode fxOptionNode = xmlNode.SelectSingleNode("fxOption");
     
     if (fxOptionNode != null)
     {
         if (fxOptionNode.Attributes["href"] != null || fxOptionNode.Attributes["id"] != null) 
         {
             if (fxOptionNode.Attributes["id"] != null) 
             {
                 fxOptionIDRef_ = fxOptionNode.Attributes["id"].Value;
                 FxOption ob = new FxOption(fxOptionNode);
                 IDManager.SetID(fxOptionIDRef_, ob);
             }
             else if (fxOptionNode.Attributes["href"] != null)
             {
                 fxOptionIDRef_ = fxOptionNode.Attributes["href"].Value;
             }
             else
             {
                 fxOption_ = new FxOption(fxOptionNode);
             }
         }
         else
         {
             fxOption_ = new FxOption(fxOptionNode);
         }
     }
     
 
     XmlNode fxDigitalOptionNode = xmlNode.SelectSingleNode("fxDigitalOption");
     
     if (fxDigitalOptionNode != null)
     {
         if (fxDigitalOptionNode.Attributes["href"] != null || fxDigitalOptionNode.Attributes["id"] != null) 
         {
             if (fxDigitalOptionNode.Attributes["id"] != null) 
             {
                 fxDigitalOptionIDRef_ = fxDigitalOptionNode.Attributes["id"].Value;
                 FxDigitalOption ob = new FxDigitalOption(fxDigitalOptionNode);
                 IDManager.SetID(fxDigitalOptionIDRef_, ob);
             }
             else if (fxDigitalOptionNode.Attributes["href"] != null)
             {
                 fxDigitalOptionIDRef_ = fxDigitalOptionNode.Attributes["href"].Value;
             }
             else
             {
                 fxDigitalOption_ = new FxDigitalOption(fxDigitalOptionNode);
             }
         }
         else
         {
             fxDigitalOption_ = new FxDigitalOption(fxDigitalOptionNode);
         }
     }
     
 
     XmlNode termDepositNode = xmlNode.SelectSingleNode("termDeposit");
     
     if (termDepositNode != null)
     {
         if (termDepositNode.Attributes["href"] != null || termDepositNode.Attributes["id"] != null) 
         {
             if (termDepositNode.Attributes["id"] != null) 
             {
                 termDepositIDRef_ = termDepositNode.Attributes["id"].Value;
                 TermDeposit ob = new TermDeposit(termDepositNode);
                 IDManager.SetID(termDepositIDRef_, ob);
             }
             else if (termDepositNode.Attributes["href"] != null)
             {
                 termDepositIDRef_ = termDepositNode.Attributes["href"].Value;
             }
             else
             {
                 termDeposit_ = new TermDeposit(termDepositNode);
             }
         }
         else
         {
             termDeposit_ = new TermDeposit(termDepositNode);
         }
     }
     
 
     XmlNode genericProductNode = xmlNode.SelectSingleNode("genericProduct");
     
     if (genericProductNode != null)
     {
         if (genericProductNode.Attributes["href"] != null || genericProductNode.Attributes["id"] != null) 
         {
             if (genericProductNode.Attributes["id"] != null) 
             {
                 genericProductIDRef_ = genericProductNode.Attributes["id"].Value;
                 GenericProduct ob = new GenericProduct(genericProductNode);
                 IDManager.SetID(genericProductIDRef_, ob);
             }
             else if (genericProductNode.Attributes["href"] != null)
             {
                 genericProductIDRef_ = genericProductNode.Attributes["href"].Value;
             }
             else
             {
                 genericProduct_ = new GenericProduct(genericProductNode);
             }
         }
         else
         {
             genericProduct_ = new GenericProduct(genericProductNode);
         }
     }
     
 
     XmlNode nonSchemaProductNode = xmlNode.SelectSingleNode("nonSchemaProduct");
     
     if (nonSchemaProductNode != null)
     {
         if (nonSchemaProductNode.Attributes["href"] != null || nonSchemaProductNode.Attributes["id"] != null) 
         {
             if (nonSchemaProductNode.Attributes["id"] != null) 
             {
                 nonSchemaProductIDRef_ = nonSchemaProductNode.Attributes["id"].Value;
                 GenericProduct ob = new GenericProduct(nonSchemaProductNode);
                 IDManager.SetID(nonSchemaProductIDRef_, ob);
             }
             else if (nonSchemaProductNode.Attributes["href"] != null)
             {
                 nonSchemaProductIDRef_ = nonSchemaProductNode.Attributes["href"].Value;
             }
             else
             {
                 nonSchemaProduct_ = new GenericProduct(nonSchemaProductNode);
             }
         }
         else
         {
             nonSchemaProduct_ = new GenericProduct(nonSchemaProductNode);
         }
     }
     
 
     XmlNode bulletPaymentNode = xmlNode.SelectSingleNode("bulletPayment");
     
     if (bulletPaymentNode != null)
     {
         if (bulletPaymentNode.Attributes["href"] != null || bulletPaymentNode.Attributes["id"] != null) 
         {
             if (bulletPaymentNode.Attributes["id"] != null) 
             {
                 bulletPaymentIDRef_ = bulletPaymentNode.Attributes["id"].Value;
                 BulletPayment ob = new BulletPayment(bulletPaymentNode);
                 IDManager.SetID(bulletPaymentIDRef_, ob);
             }
             else if (bulletPaymentNode.Attributes["href"] != null)
             {
                 bulletPaymentIDRef_ = bulletPaymentNode.Attributes["href"].Value;
             }
             else
             {
                 bulletPayment_ = new BulletPayment(bulletPaymentNode);
             }
         }
         else
         {
             bulletPayment_ = new BulletPayment(bulletPaymentNode);
         }
     }
     
 
     XmlNode capFloorNode = xmlNode.SelectSingleNode("capFloor");
     
     if (capFloorNode != null)
     {
         if (capFloorNode.Attributes["href"] != null || capFloorNode.Attributes["id"] != null) 
         {
             if (capFloorNode.Attributes["id"] != null) 
             {
                 capFloorIDRef_ = capFloorNode.Attributes["id"].Value;
                 CapFloor ob = new CapFloor(capFloorNode);
                 IDManager.SetID(capFloorIDRef_, ob);
             }
             else if (capFloorNode.Attributes["href"] != null)
             {
                 capFloorIDRef_ = capFloorNode.Attributes["href"].Value;
             }
             else
             {
                 capFloor_ = new CapFloor(capFloorNode);
             }
         }
         else
         {
             capFloor_ = new CapFloor(capFloorNode);
         }
     }
     
 
     XmlNode fraNode = xmlNode.SelectSingleNode("fra");
     
     if (fraNode != null)
     {
         if (fraNode.Attributes["href"] != null || fraNode.Attributes["id"] != null) 
         {
             if (fraNode.Attributes["id"] != null) 
             {
                 fraIDRef_ = fraNode.Attributes["id"].Value;
                 Fra ob = new Fra(fraNode);
                 IDManager.SetID(fraIDRef_, ob);
             }
             else if (fraNode.Attributes["href"] != null)
             {
                 fraIDRef_ = fraNode.Attributes["href"].Value;
             }
             else
             {
                 fra_ = new Fra(fraNode);
             }
         }
         else
         {
             fra_ = new Fra(fraNode);
         }
     }
     
 
     XmlNode swapNode = xmlNode.SelectSingleNode("swap");
     
     if (swapNode != null)
     {
         if (swapNode.Attributes["href"] != null || swapNode.Attributes["id"] != null) 
         {
             if (swapNode.Attributes["id"] != null) 
             {
                 swapIDRef_ = swapNode.Attributes["id"].Value;
                 Swap ob = new Swap(swapNode);
                 IDManager.SetID(swapIDRef_, ob);
             }
             else if (swapNode.Attributes["href"] != null)
             {
                 swapIDRef_ = swapNode.Attributes["href"].Value;
             }
             else
             {
                 swap_ = new Swap(swapNode);
             }
         }
         else
         {
             swap_ = new Swap(swapNode);
         }
     }
     
 
     XmlNode swaptionNode = xmlNode.SelectSingleNode("swaption");
     
     if (swaptionNode != null)
     {
         if (swaptionNode.Attributes["href"] != null || swaptionNode.Attributes["id"] != null) 
         {
             if (swaptionNode.Attributes["id"] != null) 
             {
                 swaptionIDRef_ = swaptionNode.Attributes["id"].Value;
                 Swaption ob = new Swaption(swaptionNode);
                 IDManager.SetID(swaptionIDRef_, ob);
             }
             else if (swaptionNode.Attributes["href"] != null)
             {
                 swaptionIDRef_ = swaptionNode.Attributes["href"].Value;
             }
             else
             {
                 swaption_ = new Swaption(swaptionNode);
             }
         }
         else
         {
             swaption_ = new Swaption(swaptionNode);
         }
     }
     
 
     XmlNode equitySwapTransactionSupplementNode = xmlNode.SelectSingleNode("equitySwapTransactionSupplement");
     
     if (equitySwapTransactionSupplementNode != null)
     {
         if (equitySwapTransactionSupplementNode.Attributes["href"] != null || equitySwapTransactionSupplementNode.Attributes["id"] != null) 
         {
             if (equitySwapTransactionSupplementNode.Attributes["id"] != null) 
             {
                 equitySwapTransactionSupplementIDRef_ = equitySwapTransactionSupplementNode.Attributes["id"].Value;
                 EquitySwapTransactionSupplement ob = new EquitySwapTransactionSupplement(equitySwapTransactionSupplementNode);
                 IDManager.SetID(equitySwapTransactionSupplementIDRef_, ob);
             }
             else if (equitySwapTransactionSupplementNode.Attributes["href"] != null)
             {
                 equitySwapTransactionSupplementIDRef_ = equitySwapTransactionSupplementNode.Attributes["href"].Value;
             }
             else
             {
                 equitySwapTransactionSupplement_ = new EquitySwapTransactionSupplement(equitySwapTransactionSupplementNode);
             }
         }
         else
         {
             equitySwapTransactionSupplement_ = new EquitySwapTransactionSupplement(equitySwapTransactionSupplementNode);
         }
     }
     
 
     XmlNode standardProductNode = xmlNode.SelectSingleNode("standardProduct");
     
     if (standardProductNode != null)
     {
         if (standardProductNode.Attributes["href"] != null || standardProductNode.Attributes["id"] != null) 
         {
             if (standardProductNode.Attributes["id"] != null) 
             {
                 standardProductIDRef_ = standardProductNode.Attributes["id"].Value;
                 StandardProduct ob = new StandardProduct(standardProductNode);
                 IDManager.SetID(standardProductIDRef_, ob);
             }
             else if (standardProductNode.Attributes["href"] != null)
             {
                 standardProductIDRef_ = standardProductNode.Attributes["href"].Value;
             }
             else
             {
                 standardProduct_ = new StandardProduct(standardProductNode);
             }
         }
         else
         {
             standardProduct_ = new StandardProduct(standardProductNode);
         }
     }
     
 
     XmlNode varianceOptionTransactionSupplementNode = xmlNode.SelectSingleNode("varianceOptionTransactionSupplement");
     
     if (varianceOptionTransactionSupplementNode != null)
     {
         if (varianceOptionTransactionSupplementNode.Attributes["href"] != null || varianceOptionTransactionSupplementNode.Attributes["id"] != null) 
         {
             if (varianceOptionTransactionSupplementNode.Attributes["id"] != null) 
             {
                 varianceOptionTransactionSupplementIDRef_ = varianceOptionTransactionSupplementNode.Attributes["id"].Value;
                 VarianceOptionTransactionSupplement ob = new VarianceOptionTransactionSupplement(varianceOptionTransactionSupplementNode);
                 IDManager.SetID(varianceOptionTransactionSupplementIDRef_, ob);
             }
             else if (varianceOptionTransactionSupplementNode.Attributes["href"] != null)
             {
                 varianceOptionTransactionSupplementIDRef_ = varianceOptionTransactionSupplementNode.Attributes["href"].Value;
             }
             else
             {
                 varianceOptionTransactionSupplement_ = new VarianceOptionTransactionSupplement(varianceOptionTransactionSupplementNode);
             }
         }
         else
         {
             varianceOptionTransactionSupplement_ = new VarianceOptionTransactionSupplement(varianceOptionTransactionSupplementNode);
         }
     }
     
 
     XmlNode varianceSwapNode = xmlNode.SelectSingleNode("varianceSwap");
     
     if (varianceSwapNode != null)
     {
         if (varianceSwapNode.Attributes["href"] != null || varianceSwapNode.Attributes["id"] != null) 
         {
             if (varianceSwapNode.Attributes["id"] != null) 
             {
                 varianceSwapIDRef_ = varianceSwapNode.Attributes["id"].Value;
                 VarianceSwap ob = new VarianceSwap(varianceSwapNode);
                 IDManager.SetID(varianceSwapIDRef_, ob);
             }
             else if (varianceSwapNode.Attributes["href"] != null)
             {
                 varianceSwapIDRef_ = varianceSwapNode.Attributes["href"].Value;
             }
             else
             {
                 varianceSwap_ = new VarianceSwap(varianceSwapNode);
             }
         }
         else
         {
             varianceSwap_ = new VarianceSwap(varianceSwapNode);
         }
     }
     
 
     XmlNode varianceSwapTransactionSupplementNode = xmlNode.SelectSingleNode("varianceSwapTransactionSupplement");
     
     if (varianceSwapTransactionSupplementNode != null)
     {
         if (varianceSwapTransactionSupplementNode.Attributes["href"] != null || varianceSwapTransactionSupplementNode.Attributes["id"] != null) 
         {
             if (varianceSwapTransactionSupplementNode.Attributes["id"] != null) 
             {
                 varianceSwapTransactionSupplementIDRef_ = varianceSwapTransactionSupplementNode.Attributes["id"].Value;
                 VarianceSwapTransactionSupplement ob = new VarianceSwapTransactionSupplement(varianceSwapTransactionSupplementNode);
                 IDManager.SetID(varianceSwapTransactionSupplementIDRef_, ob);
             }
             else if (varianceSwapTransactionSupplementNode.Attributes["href"] != null)
             {
                 varianceSwapTransactionSupplementIDRef_ = varianceSwapTransactionSupplementNode.Attributes["href"].Value;
             }
             else
             {
                 varianceSwapTransactionSupplement_ = new VarianceSwapTransactionSupplement(varianceSwapTransactionSupplementNode);
             }
         }
         else
         {
             varianceSwapTransactionSupplement_ = new VarianceSwapTransactionSupplement(varianceSwapTransactionSupplementNode);
         }
     }
     
 
 }
コード例 #2
0
        public Swaption(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList buyerPartyReferenceNodeList = xmlNode.SelectNodes("buyerPartyReference");

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

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


            XmlNodeList buyerAccountReferenceNodeList = xmlNode.SelectNodes("buyerAccountReference");

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

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


            XmlNodeList sellerPartyReferenceNodeList = xmlNode.SelectNodes("sellerPartyReference");

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

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


            XmlNodeList sellerAccountReferenceNodeList = xmlNode.SelectNodes("sellerAccountReference");

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

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


            XmlNodeList premiumNodeList = xmlNode.SelectNodes("premium");

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


            XmlNodeList exerciseNodeList = xmlNode.SelectNodes("exercise");

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

            foreach (XmlNode item in exerciseNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        exerciseIDRef = item.Attributes["id"].Name;
                        Exercise ob = Exercise();
                        IDManager.SetID(exerciseIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        exerciseIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        exercise = new Exercise(item);
                    }
                }
            }


            XmlNodeList americanExerciseNodeList = xmlNode.SelectNodes("americanExercise");

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

            foreach (XmlNode item in americanExerciseNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        americanExerciseIDRef = item.Attributes["id"].Name;
                        AmericanExercise ob = AmericanExercise();
                        IDManager.SetID(americanExerciseIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        americanExerciseIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        americanExercise = new AmericanExercise(item);
                    }
                }
            }


            XmlNodeList bermudaExerciseNodeList = xmlNode.SelectNodes("bermudaExercise");

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

            foreach (XmlNode item in bermudaExerciseNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        bermudaExerciseIDRef = item.Attributes["id"].Name;
                        BermudaExercise ob = BermudaExercise();
                        IDManager.SetID(bermudaExerciseIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        bermudaExerciseIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        bermudaExercise = new BermudaExercise(item);
                    }
                }
            }


            XmlNodeList europeanExerciseNodeList = xmlNode.SelectNodes("europeanExercise");

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

            foreach (XmlNode item in europeanExerciseNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        europeanExerciseIDRef = item.Attributes["id"].Name;
                        EuropeanExercise ob = EuropeanExercise();
                        IDManager.SetID(europeanExerciseIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        europeanExerciseIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        europeanExercise = new EuropeanExercise(item);
                    }
                }
            }


            XmlNodeList exerciseProcedureNodeList = xmlNode.SelectNodes("exerciseProcedure");

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

            foreach (XmlNode item in exerciseProcedureNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        exerciseProcedureIDRef = item.Attributes["id"].Name;
                        ExerciseProcedure ob = ExerciseProcedure();
                        IDManager.SetID(exerciseProcedureIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        exerciseProcedureIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        exerciseProcedure = new ExerciseProcedure(item);
                    }
                }
            }


            XmlNodeList calculationAgentNodeList = xmlNode.SelectNodes("calculationAgent");

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

            foreach (XmlNode item in calculationAgentNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationAgentIDRef = item.Attributes["id"].Name;
                        CalculationAgent ob = CalculationAgent();
                        IDManager.SetID(calculationAgentIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationAgentIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationAgent = new CalculationAgent(item);
                    }
                }
            }


            XmlNodeList cashSettlementNodeList = xmlNode.SelectNodes("cashSettlement");

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

            foreach (XmlNode item in cashSettlementNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        cashSettlementIDRef = item.Attributes["id"].Name;
                        CashSettlement ob = CashSettlement();
                        IDManager.SetID(cashSettlementIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        cashSettlementIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        cashSettlement = new CashSettlement(item);
                    }
                }
            }


            XmlNodeList physicalSettlementNodeList = xmlNode.SelectNodes("physicalSettlement");

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

            foreach (XmlNode item in physicalSettlementNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        physicalSettlementIDRef = item.Attributes["id"].Name;
                        SwaptionPhysicalSettlement ob = SwaptionPhysicalSettlement();
                        IDManager.SetID(physicalSettlementIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        physicalSettlementIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        physicalSettlement = new SwaptionPhysicalSettlement(item);
                    }
                }
            }


            XmlNodeList swaptionStraddleNodeList = xmlNode.SelectNodes("swaptionStraddle");

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

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


            XmlNodeList swaptionAdjustedDatesNodeList = xmlNode.SelectNodes("swaptionAdjustedDates");

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

            foreach (XmlNode item in swaptionAdjustedDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        swaptionAdjustedDatesIDRef = item.Attributes["id"].Name;
                        SwaptionAdjustedDates ob = SwaptionAdjustedDates();
                        IDManager.SetID(swaptionAdjustedDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        swaptionAdjustedDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        swaptionAdjustedDates = new SwaptionAdjustedDates(item);
                    }
                }
            }


            XmlNodeList swapNodeList = xmlNode.SelectNodes("swap");

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

            foreach (XmlNode item in swapNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        swapIDRef = item.Attributes["id"].Name;
                        Swap ob = Swap();
                        IDManager.SetID(swapIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        swapIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        swap = new Swap(item);
                    }
                }
            }
        }
コード例 #3
0
 public Trade(XmlNode xmlNode)
 {
     XmlNode tradeHeaderNode = xmlNode.SelectSingleNode("tradeHeader");
     
     if (tradeHeaderNode != null)
     {
         if (tradeHeaderNode.Attributes["href"] != null || tradeHeaderNode.Attributes["id"] != null) 
         {
             if (tradeHeaderNode.Attributes["id"] != null) 
             {
                 tradeHeaderIDRef_ = tradeHeaderNode.Attributes["id"].Value;
                 TradeHeader ob = new TradeHeader(tradeHeaderNode);
                 IDManager.SetID(tradeHeaderIDRef_, ob);
             }
             else if (tradeHeaderNode.Attributes["href"] != null)
             {
                 tradeHeaderIDRef_ = tradeHeaderNode.Attributes["href"].Value;
             }
             else
             {
                 tradeHeader_ = new TradeHeader(tradeHeaderNode);
             }
         }
         else
         {
             tradeHeader_ = new TradeHeader(tradeHeaderNode);
         }
     }
     
 
     XmlNode productNode = xmlNode.SelectSingleNode("product");
     
     if (productNode != null)
     {
         if (productNode.Attributes["href"] != null || productNode.Attributes["id"] != null) 
         {
             if (productNode.Attributes["id"] != null) 
             {
                 productIDRef_ = productNode.Attributes["id"].Value;
                 Product ob = new Product(productNode);
                 IDManager.SetID(productIDRef_, ob);
             }
             else if (productNode.Attributes["href"] != null)
             {
                 productIDRef_ = productNode.Attributes["href"].Value;
             }
             else
             {
                 product_ = new Product(productNode);
             }
         }
         else
         {
             product_ = new Product(productNode);
         }
     }
     
 
     XmlNode forwardNode = xmlNode.SelectSingleNode("forward");
     
     if (forwardNode != null)
     {
         if (forwardNode.Attributes["href"] != null || forwardNode.Attributes["id"] != null) 
         {
             if (forwardNode.Attributes["id"] != null) 
             {
                 forwardIDRef_ = forwardNode.Attributes["id"].Value;
                 ForwardSale ob = new ForwardSale(forwardNode);
                 IDManager.SetID(forwardIDRef_, ob);
             }
             else if (forwardNode.Attributes["href"] != null)
             {
                 forwardIDRef_ = forwardNode.Attributes["href"].Value;
             }
             else
             {
                 forward_ = new ForwardSale(forwardNode);
             }
         }
         else
         {
             forward_ = new ForwardSale(forwardNode);
         }
     }
     
 
     XmlNode bondOptionNode = xmlNode.SelectSingleNode("bondOption");
     
     if (bondOptionNode != null)
     {
         if (bondOptionNode.Attributes["href"] != null || bondOptionNode.Attributes["id"] != null) 
         {
             if (bondOptionNode.Attributes["id"] != null) 
             {
                 bondOptionIDRef_ = bondOptionNode.Attributes["id"].Value;
                 BondOption ob = new BondOption(bondOptionNode);
                 IDManager.SetID(bondOptionIDRef_, ob);
             }
             else if (bondOptionNode.Attributes["href"] != null)
             {
                 bondOptionIDRef_ = bondOptionNode.Attributes["href"].Value;
             }
             else
             {
                 bondOption_ = new BondOption(bondOptionNode);
             }
         }
         else
         {
             bondOption_ = new BondOption(bondOptionNode);
         }
     }
     
 
     XmlNode creditDefaultSwapNode = xmlNode.SelectSingleNode("creditDefaultSwap");
     
     if (creditDefaultSwapNode != null)
     {
         if (creditDefaultSwapNode.Attributes["href"] != null || creditDefaultSwapNode.Attributes["id"] != null) 
         {
             if (creditDefaultSwapNode.Attributes["id"] != null) 
             {
                 creditDefaultSwapIDRef_ = creditDefaultSwapNode.Attributes["id"].Value;
                 CreditDefaultSwap ob = new CreditDefaultSwap(creditDefaultSwapNode);
                 IDManager.SetID(creditDefaultSwapIDRef_, ob);
             }
             else if (creditDefaultSwapNode.Attributes["href"] != null)
             {
                 creditDefaultSwapIDRef_ = creditDefaultSwapNode.Attributes["href"].Value;
             }
             else
             {
                 creditDefaultSwap_ = new CreditDefaultSwap(creditDefaultSwapNode);
             }
         }
         else
         {
             creditDefaultSwap_ = new CreditDefaultSwap(creditDefaultSwapNode);
         }
     }
     
 
     XmlNode creditDefaultSwapOptionNode = xmlNode.SelectSingleNode("creditDefaultSwapOption");
     
     if (creditDefaultSwapOptionNode != null)
     {
         if (creditDefaultSwapOptionNode.Attributes["href"] != null || creditDefaultSwapOptionNode.Attributes["id"] != null) 
         {
             if (creditDefaultSwapOptionNode.Attributes["id"] != null) 
             {
                 creditDefaultSwapOptionIDRef_ = creditDefaultSwapOptionNode.Attributes["id"].Value;
                 CreditDefaultSwapOption ob = new CreditDefaultSwapOption(creditDefaultSwapOptionNode);
                 IDManager.SetID(creditDefaultSwapOptionIDRef_, ob);
             }
             else if (creditDefaultSwapOptionNode.Attributes["href"] != null)
             {
                 creditDefaultSwapOptionIDRef_ = creditDefaultSwapOptionNode.Attributes["href"].Value;
             }
             else
             {
                 creditDefaultSwapOption_ = new CreditDefaultSwapOption(creditDefaultSwapOptionNode);
             }
         }
         else
         {
             creditDefaultSwapOption_ = new CreditDefaultSwapOption(creditDefaultSwapOptionNode);
         }
     }
     
 
     XmlNode commodityForwardNode = xmlNode.SelectSingleNode("commodityForward");
     
     if (commodityForwardNode != null)
     {
         if (commodityForwardNode.Attributes["href"] != null || commodityForwardNode.Attributes["id"] != null) 
         {
             if (commodityForwardNode.Attributes["id"] != null) 
             {
                 commodityForwardIDRef_ = commodityForwardNode.Attributes["id"].Value;
                 CommodityForward ob = new CommodityForward(commodityForwardNode);
                 IDManager.SetID(commodityForwardIDRef_, ob);
             }
             else if (commodityForwardNode.Attributes["href"] != null)
             {
                 commodityForwardIDRef_ = commodityForwardNode.Attributes["href"].Value;
             }
             else
             {
                 commodityForward_ = new CommodityForward(commodityForwardNode);
             }
         }
         else
         {
             commodityForward_ = new CommodityForward(commodityForwardNode);
         }
     }
     
 
     XmlNode commodityOptionNode = xmlNode.SelectSingleNode("commodityOption");
     
     if (commodityOptionNode != null)
     {
         if (commodityOptionNode.Attributes["href"] != null || commodityOptionNode.Attributes["id"] != null) 
         {
             if (commodityOptionNode.Attributes["id"] != null) 
             {
                 commodityOptionIDRef_ = commodityOptionNode.Attributes["id"].Value;
                 CommodityOption ob = new CommodityOption(commodityOptionNode);
                 IDManager.SetID(commodityOptionIDRef_, ob);
             }
             else if (commodityOptionNode.Attributes["href"] != null)
             {
                 commodityOptionIDRef_ = commodityOptionNode.Attributes["href"].Value;
             }
             else
             {
                 commodityOption_ = new CommodityOption(commodityOptionNode);
             }
         }
         else
         {
             commodityOption_ = new CommodityOption(commodityOptionNode);
         }
     }
     
 
     XmlNode commoditySwapNode = xmlNode.SelectSingleNode("commoditySwap");
     
     if (commoditySwapNode != null)
     {
         if (commoditySwapNode.Attributes["href"] != null || commoditySwapNode.Attributes["id"] != null) 
         {
             if (commoditySwapNode.Attributes["id"] != null) 
             {
                 commoditySwapIDRef_ = commoditySwapNode.Attributes["id"].Value;
                 CommoditySwap ob = new CommoditySwap(commoditySwapNode);
                 IDManager.SetID(commoditySwapIDRef_, ob);
             }
             else if (commoditySwapNode.Attributes["href"] != null)
             {
                 commoditySwapIDRef_ = commoditySwapNode.Attributes["href"].Value;
             }
             else
             {
                 commoditySwap_ = new CommoditySwap(commoditySwapNode);
             }
         }
         else
         {
             commoditySwap_ = new CommoditySwap(commoditySwapNode);
         }
     }
     
 
     XmlNode commoditySwaptionNode = xmlNode.SelectSingleNode("commoditySwaption");
     
     if (commoditySwaptionNode != null)
     {
         if (commoditySwaptionNode.Attributes["href"] != null || commoditySwaptionNode.Attributes["id"] != null) 
         {
             if (commoditySwaptionNode.Attributes["id"] != null) 
             {
                 commoditySwaptionIDRef_ = commoditySwaptionNode.Attributes["id"].Value;
                 CommoditySwaption ob = new CommoditySwaption(commoditySwaptionNode);
                 IDManager.SetID(commoditySwaptionIDRef_, ob);
             }
             else if (commoditySwaptionNode.Attributes["href"] != null)
             {
                 commoditySwaptionIDRef_ = commoditySwaptionNode.Attributes["href"].Value;
             }
             else
             {
                 commoditySwaption_ = new CommoditySwaption(commoditySwaptionNode);
             }
         }
         else
         {
             commoditySwaption_ = new CommoditySwaption(commoditySwaptionNode);
         }
     }
     
 
     XmlNode correlationSwapNode = xmlNode.SelectSingleNode("correlationSwap");
     
     if (correlationSwapNode != null)
     {
         if (correlationSwapNode.Attributes["href"] != null || correlationSwapNode.Attributes["id"] != null) 
         {
             if (correlationSwapNode.Attributes["id"] != null) 
             {
                 correlationSwapIDRef_ = correlationSwapNode.Attributes["id"].Value;
                 CorrelationSwap ob = new CorrelationSwap(correlationSwapNode);
                 IDManager.SetID(correlationSwapIDRef_, ob);
             }
             else if (correlationSwapNode.Attributes["href"] != null)
             {
                 correlationSwapIDRef_ = correlationSwapNode.Attributes["href"].Value;
             }
             else
             {
                 correlationSwap_ = new CorrelationSwap(correlationSwapNode);
             }
         }
         else
         {
             correlationSwap_ = new CorrelationSwap(correlationSwapNode);
         }
     }
     
 
     XmlNode dividendSwapOptionTransactionSupplementNode = xmlNode.SelectSingleNode("dividendSwapOptionTransactionSupplement");
     
     if (dividendSwapOptionTransactionSupplementNode != null)
     {
         if (dividendSwapOptionTransactionSupplementNode.Attributes["href"] != null || dividendSwapOptionTransactionSupplementNode.Attributes["id"] != null) 
         {
             if (dividendSwapOptionTransactionSupplementNode.Attributes["id"] != null) 
             {
                 dividendSwapOptionTransactionSupplementIDRef_ = dividendSwapOptionTransactionSupplementNode.Attributes["id"].Value;
                 DividendSwapOptionTransactionSupplement ob = new DividendSwapOptionTransactionSupplement(dividendSwapOptionTransactionSupplementNode);
                 IDManager.SetID(dividendSwapOptionTransactionSupplementIDRef_, ob);
             }
             else if (dividendSwapOptionTransactionSupplementNode.Attributes["href"] != null)
             {
                 dividendSwapOptionTransactionSupplementIDRef_ = dividendSwapOptionTransactionSupplementNode.Attributes["href"].Value;
             }
             else
             {
                 dividendSwapOptionTransactionSupplement_ = new DividendSwapOptionTransactionSupplement(dividendSwapOptionTransactionSupplementNode);
             }
         }
         else
         {
             dividendSwapOptionTransactionSupplement_ = new DividendSwapOptionTransactionSupplement(dividendSwapOptionTransactionSupplementNode);
         }
     }
     
 
     XmlNode dividendSwapTransactionSupplementNode = xmlNode.SelectSingleNode("dividendSwapTransactionSupplement");
     
     if (dividendSwapTransactionSupplementNode != null)
     {
         if (dividendSwapTransactionSupplementNode.Attributes["href"] != null || dividendSwapTransactionSupplementNode.Attributes["id"] != null) 
         {
             if (dividendSwapTransactionSupplementNode.Attributes["id"] != null) 
             {
                 dividendSwapTransactionSupplementIDRef_ = dividendSwapTransactionSupplementNode.Attributes["id"].Value;
                 DividendSwapTransactionSupplement ob = new DividendSwapTransactionSupplement(dividendSwapTransactionSupplementNode);
                 IDManager.SetID(dividendSwapTransactionSupplementIDRef_, ob);
             }
             else if (dividendSwapTransactionSupplementNode.Attributes["href"] != null)
             {
                 dividendSwapTransactionSupplementIDRef_ = dividendSwapTransactionSupplementNode.Attributes["href"].Value;
             }
             else
             {
                 dividendSwapTransactionSupplement_ = new DividendSwapTransactionSupplement(dividendSwapTransactionSupplementNode);
             }
         }
         else
         {
             dividendSwapTransactionSupplement_ = new DividendSwapTransactionSupplement(dividendSwapTransactionSupplementNode);
         }
     }
     
 
     XmlNode instrumentTradeDetailsNode = xmlNode.SelectSingleNode("instrumentTradeDetails");
     
     if (instrumentTradeDetailsNode != null)
     {
         if (instrumentTradeDetailsNode.Attributes["href"] != null || instrumentTradeDetailsNode.Attributes["id"] != null) 
         {
             if (instrumentTradeDetailsNode.Attributes["id"] != null) 
             {
                 instrumentTradeDetailsIDRef_ = instrumentTradeDetailsNode.Attributes["id"].Value;
                 InstrumentTradeDetails ob = new InstrumentTradeDetails(instrumentTradeDetailsNode);
                 IDManager.SetID(instrumentTradeDetailsIDRef_, ob);
             }
             else if (instrumentTradeDetailsNode.Attributes["href"] != null)
             {
                 instrumentTradeDetailsIDRef_ = instrumentTradeDetailsNode.Attributes["href"].Value;
             }
             else
             {
                 instrumentTradeDetails_ = new InstrumentTradeDetails(instrumentTradeDetailsNode);
             }
         }
         else
         {
             instrumentTradeDetails_ = new InstrumentTradeDetails(instrumentTradeDetailsNode);
         }
     }
     
 
     XmlNode strategyNode = xmlNode.SelectSingleNode("strategy");
     
     if (strategyNode != null)
     {
         if (strategyNode.Attributes["href"] != null || strategyNode.Attributes["id"] != null) 
         {
             if (strategyNode.Attributes["id"] != null) 
             {
                 strategyIDRef_ = strategyNode.Attributes["id"].Value;
                 Strategy ob = new Strategy(strategyNode);
                 IDManager.SetID(strategyIDRef_, ob);
             }
             else if (strategyNode.Attributes["href"] != null)
             {
                 strategyIDRef_ = strategyNode.Attributes["href"].Value;
             }
             else
             {
                 strategy_ = new Strategy(strategyNode);
             }
         }
         else
         {
             strategy_ = new Strategy(strategyNode);
         }
     }
     
 
     XmlNode returnSwapNode = xmlNode.SelectSingleNode("returnSwap");
     
     if (returnSwapNode != null)
     {
         if (returnSwapNode.Attributes["href"] != null || returnSwapNode.Attributes["id"] != null) 
         {
             if (returnSwapNode.Attributes["id"] != null) 
             {
                 returnSwapIDRef_ = returnSwapNode.Attributes["id"].Value;
                 ReturnSwap ob = new ReturnSwap(returnSwapNode);
                 IDManager.SetID(returnSwapIDRef_, ob);
             }
             else if (returnSwapNode.Attributes["href"] != null)
             {
                 returnSwapIDRef_ = returnSwapNode.Attributes["href"].Value;
             }
             else
             {
                 returnSwap_ = new ReturnSwap(returnSwapNode);
             }
         }
         else
         {
             returnSwap_ = new ReturnSwap(returnSwapNode);
         }
     }
     
 
     XmlNode brokerEquityOptionNode = xmlNode.SelectSingleNode("brokerEquityOption");
     
     if (brokerEquityOptionNode != null)
     {
         if (brokerEquityOptionNode.Attributes["href"] != null || brokerEquityOptionNode.Attributes["id"] != null) 
         {
             if (brokerEquityOptionNode.Attributes["id"] != null) 
             {
                 brokerEquityOptionIDRef_ = brokerEquityOptionNode.Attributes["id"].Value;
                 BrokerEquityOption ob = new BrokerEquityOption(brokerEquityOptionNode);
                 IDManager.SetID(brokerEquityOptionIDRef_, ob);
             }
             else if (brokerEquityOptionNode.Attributes["href"] != null)
             {
                 brokerEquityOptionIDRef_ = brokerEquityOptionNode.Attributes["href"].Value;
             }
             else
             {
                 brokerEquityOption_ = new BrokerEquityOption(brokerEquityOptionNode);
             }
         }
         else
         {
             brokerEquityOption_ = new BrokerEquityOption(brokerEquityOptionNode);
         }
     }
     
 
     XmlNode equityForwardNode = xmlNode.SelectSingleNode("equityForward");
     
     if (equityForwardNode != null)
     {
         if (equityForwardNode.Attributes["href"] != null || equityForwardNode.Attributes["id"] != null) 
         {
             if (equityForwardNode.Attributes["id"] != null) 
             {
                 equityForwardIDRef_ = equityForwardNode.Attributes["id"].Value;
                 EquityForward ob = new EquityForward(equityForwardNode);
                 IDManager.SetID(equityForwardIDRef_, ob);
             }
             else if (equityForwardNode.Attributes["href"] != null)
             {
                 equityForwardIDRef_ = equityForwardNode.Attributes["href"].Value;
             }
             else
             {
                 equityForward_ = new EquityForward(equityForwardNode);
             }
         }
         else
         {
             equityForward_ = new EquityForward(equityForwardNode);
         }
     }
     
 
     XmlNode equityOptionNode = xmlNode.SelectSingleNode("equityOption");
     
     if (equityOptionNode != null)
     {
         if (equityOptionNode.Attributes["href"] != null || equityOptionNode.Attributes["id"] != null) 
         {
             if (equityOptionNode.Attributes["id"] != null) 
             {
                 equityOptionIDRef_ = equityOptionNode.Attributes["id"].Value;
                 EquityOption ob = new EquityOption(equityOptionNode);
                 IDManager.SetID(equityOptionIDRef_, ob);
             }
             else if (equityOptionNode.Attributes["href"] != null)
             {
                 equityOptionIDRef_ = equityOptionNode.Attributes["href"].Value;
             }
             else
             {
                 equityOption_ = new EquityOption(equityOptionNode);
             }
         }
         else
         {
             equityOption_ = new EquityOption(equityOptionNode);
         }
     }
     
 
     XmlNode equityOptionTransactionSupplementNode = xmlNode.SelectSingleNode("equityOptionTransactionSupplement");
     
     if (equityOptionTransactionSupplementNode != null)
     {
         if (equityOptionTransactionSupplementNode.Attributes["href"] != null || equityOptionTransactionSupplementNode.Attributes["id"] != null) 
         {
             if (equityOptionTransactionSupplementNode.Attributes["id"] != null) 
             {
                 equityOptionTransactionSupplementIDRef_ = equityOptionTransactionSupplementNode.Attributes["id"].Value;
                 EquityOptionTransactionSupplement ob = new EquityOptionTransactionSupplement(equityOptionTransactionSupplementNode);
                 IDManager.SetID(equityOptionTransactionSupplementIDRef_, ob);
             }
             else if (equityOptionTransactionSupplementNode.Attributes["href"] != null)
             {
                 equityOptionTransactionSupplementIDRef_ = equityOptionTransactionSupplementNode.Attributes["href"].Value;
             }
             else
             {
                 equityOptionTransactionSupplement_ = new EquityOptionTransactionSupplement(equityOptionTransactionSupplementNode);
             }
         }
         else
         {
             equityOptionTransactionSupplement_ = new EquityOptionTransactionSupplement(equityOptionTransactionSupplementNode);
         }
     }
     
 
     XmlNode fxSingleLegNode = xmlNode.SelectSingleNode("fxSingleLeg");
     
     if (fxSingleLegNode != null)
     {
         if (fxSingleLegNode.Attributes["href"] != null || fxSingleLegNode.Attributes["id"] != null) 
         {
             if (fxSingleLegNode.Attributes["id"] != null) 
             {
                 fxSingleLegIDRef_ = fxSingleLegNode.Attributes["id"].Value;
                 FxSingleLeg ob = new FxSingleLeg(fxSingleLegNode);
                 IDManager.SetID(fxSingleLegIDRef_, ob);
             }
             else if (fxSingleLegNode.Attributes["href"] != null)
             {
                 fxSingleLegIDRef_ = fxSingleLegNode.Attributes["href"].Value;
             }
             else
             {
                 fxSingleLeg_ = new FxSingleLeg(fxSingleLegNode);
             }
         }
         else
         {
             fxSingleLeg_ = new FxSingleLeg(fxSingleLegNode);
         }
     }
     
 
     XmlNode fxSwapNode = xmlNode.SelectSingleNode("fxSwap");
     
     if (fxSwapNode != null)
     {
         if (fxSwapNode.Attributes["href"] != null || fxSwapNode.Attributes["id"] != null) 
         {
             if (fxSwapNode.Attributes["id"] != null) 
             {
                 fxSwapIDRef_ = fxSwapNode.Attributes["id"].Value;
                 FxSwap ob = new FxSwap(fxSwapNode);
                 IDManager.SetID(fxSwapIDRef_, ob);
             }
             else if (fxSwapNode.Attributes["href"] != null)
             {
                 fxSwapIDRef_ = fxSwapNode.Attributes["href"].Value;
             }
             else
             {
                 fxSwap_ = new FxSwap(fxSwapNode);
             }
         }
         else
         {
             fxSwap_ = new FxSwap(fxSwapNode);
         }
     }
     
 
     XmlNode fxOptionNode = xmlNode.SelectSingleNode("fxOption");
     
     if (fxOptionNode != null)
     {
         if (fxOptionNode.Attributes["href"] != null || fxOptionNode.Attributes["id"] != null) 
         {
             if (fxOptionNode.Attributes["id"] != null) 
             {
                 fxOptionIDRef_ = fxOptionNode.Attributes["id"].Value;
                 FxOption ob = new FxOption(fxOptionNode);
                 IDManager.SetID(fxOptionIDRef_, ob);
             }
             else if (fxOptionNode.Attributes["href"] != null)
             {
                 fxOptionIDRef_ = fxOptionNode.Attributes["href"].Value;
             }
             else
             {
                 fxOption_ = new FxOption(fxOptionNode);
             }
         }
         else
         {
             fxOption_ = new FxOption(fxOptionNode);
         }
     }
     
 
     XmlNode fxDigitalOptionNode = xmlNode.SelectSingleNode("fxDigitalOption");
     
     if (fxDigitalOptionNode != null)
     {
         if (fxDigitalOptionNode.Attributes["href"] != null || fxDigitalOptionNode.Attributes["id"] != null) 
         {
             if (fxDigitalOptionNode.Attributes["id"] != null) 
             {
                 fxDigitalOptionIDRef_ = fxDigitalOptionNode.Attributes["id"].Value;
                 FxDigitalOption ob = new FxDigitalOption(fxDigitalOptionNode);
                 IDManager.SetID(fxDigitalOptionIDRef_, ob);
             }
             else if (fxDigitalOptionNode.Attributes["href"] != null)
             {
                 fxDigitalOptionIDRef_ = fxDigitalOptionNode.Attributes["href"].Value;
             }
             else
             {
                 fxDigitalOption_ = new FxDigitalOption(fxDigitalOptionNode);
             }
         }
         else
         {
             fxDigitalOption_ = new FxDigitalOption(fxDigitalOptionNode);
         }
     }
     
 
     XmlNode termDepositNode = xmlNode.SelectSingleNode("termDeposit");
     
     if (termDepositNode != null)
     {
         if (termDepositNode.Attributes["href"] != null || termDepositNode.Attributes["id"] != null) 
         {
             if (termDepositNode.Attributes["id"] != null) 
             {
                 termDepositIDRef_ = termDepositNode.Attributes["id"].Value;
                 TermDeposit ob = new TermDeposit(termDepositNode);
                 IDManager.SetID(termDepositIDRef_, ob);
             }
             else if (termDepositNode.Attributes["href"] != null)
             {
                 termDepositIDRef_ = termDepositNode.Attributes["href"].Value;
             }
             else
             {
                 termDeposit_ = new TermDeposit(termDepositNode);
             }
         }
         else
         {
             termDeposit_ = new TermDeposit(termDepositNode);
         }
     }
     
 
     XmlNode genericProductNode = xmlNode.SelectSingleNode("genericProduct");
     
     if (genericProductNode != null)
     {
         if (genericProductNode.Attributes["href"] != null || genericProductNode.Attributes["id"] != null) 
         {
             if (genericProductNode.Attributes["id"] != null) 
             {
                 genericProductIDRef_ = genericProductNode.Attributes["id"].Value;
                 GenericProduct ob = new GenericProduct(genericProductNode);
                 IDManager.SetID(genericProductIDRef_, ob);
             }
             else if (genericProductNode.Attributes["href"] != null)
             {
                 genericProductIDRef_ = genericProductNode.Attributes["href"].Value;
             }
             else
             {
                 genericProduct_ = new GenericProduct(genericProductNode);
             }
         }
         else
         {
             genericProduct_ = new GenericProduct(genericProductNode);
         }
     }
     
 
     XmlNode nonSchemaProductNode = xmlNode.SelectSingleNode("nonSchemaProduct");
     
     if (nonSchemaProductNode != null)
     {
         if (nonSchemaProductNode.Attributes["href"] != null || nonSchemaProductNode.Attributes["id"] != null) 
         {
             if (nonSchemaProductNode.Attributes["id"] != null) 
             {
                 nonSchemaProductIDRef_ = nonSchemaProductNode.Attributes["id"].Value;
                 GenericProduct ob = new GenericProduct(nonSchemaProductNode);
                 IDManager.SetID(nonSchemaProductIDRef_, ob);
             }
             else if (nonSchemaProductNode.Attributes["href"] != null)
             {
                 nonSchemaProductIDRef_ = nonSchemaProductNode.Attributes["href"].Value;
             }
             else
             {
                 nonSchemaProduct_ = new GenericProduct(nonSchemaProductNode);
             }
         }
         else
         {
             nonSchemaProduct_ = new GenericProduct(nonSchemaProductNode);
         }
     }
     
 
     XmlNode bulletPaymentNode = xmlNode.SelectSingleNode("bulletPayment");
     
     if (bulletPaymentNode != null)
     {
         if (bulletPaymentNode.Attributes["href"] != null || bulletPaymentNode.Attributes["id"] != null) 
         {
             if (bulletPaymentNode.Attributes["id"] != null) 
             {
                 bulletPaymentIDRef_ = bulletPaymentNode.Attributes["id"].Value;
                 BulletPayment ob = new BulletPayment(bulletPaymentNode);
                 IDManager.SetID(bulletPaymentIDRef_, ob);
             }
             else if (bulletPaymentNode.Attributes["href"] != null)
             {
                 bulletPaymentIDRef_ = bulletPaymentNode.Attributes["href"].Value;
             }
             else
             {
                 bulletPayment_ = new BulletPayment(bulletPaymentNode);
             }
         }
         else
         {
             bulletPayment_ = new BulletPayment(bulletPaymentNode);
         }
     }
     
 
     XmlNode capFloorNode = xmlNode.SelectSingleNode("capFloor");
     
     if (capFloorNode != null)
     {
         if (capFloorNode.Attributes["href"] != null || capFloorNode.Attributes["id"] != null) 
         {
             if (capFloorNode.Attributes["id"] != null) 
             {
                 capFloorIDRef_ = capFloorNode.Attributes["id"].Value;
                 CapFloor ob = new CapFloor(capFloorNode);
                 IDManager.SetID(capFloorIDRef_, ob);
             }
             else if (capFloorNode.Attributes["href"] != null)
             {
                 capFloorIDRef_ = capFloorNode.Attributes["href"].Value;
             }
             else
             {
                 capFloor_ = new CapFloor(capFloorNode);
             }
         }
         else
         {
             capFloor_ = new CapFloor(capFloorNode);
         }
     }
     
 
     XmlNode fraNode = xmlNode.SelectSingleNode("fra");
     
     if (fraNode != null)
     {
         if (fraNode.Attributes["href"] != null || fraNode.Attributes["id"] != null) 
         {
             if (fraNode.Attributes["id"] != null) 
             {
                 fraIDRef_ = fraNode.Attributes["id"].Value;
                 Fra ob = new Fra(fraNode);
                 IDManager.SetID(fraIDRef_, ob);
             }
             else if (fraNode.Attributes["href"] != null)
             {
                 fraIDRef_ = fraNode.Attributes["href"].Value;
             }
             else
             {
                 fra_ = new Fra(fraNode);
             }
         }
         else
         {
             fra_ = new Fra(fraNode);
         }
     }
     
 
     XmlNode swapNode = xmlNode.SelectSingleNode("swap");
     
     if (swapNode != null)
     {
         if (swapNode.Attributes["href"] != null || swapNode.Attributes["id"] != null) 
         {
             if (swapNode.Attributes["id"] != null) 
             {
                 swapIDRef_ = swapNode.Attributes["id"].Value;
                 Swap ob = new Swap(swapNode);
                 IDManager.SetID(swapIDRef_, ob);
             }
             else if (swapNode.Attributes["href"] != null)
             {
                 swapIDRef_ = swapNode.Attributes["href"].Value;
             }
             else
             {
                 swap_ = new Swap(swapNode);
             }
         }
         else
         {
             swap_ = new Swap(swapNode);
         }
     }
     
 
     XmlNode swaptionNode = xmlNode.SelectSingleNode("swaption");
     
     if (swaptionNode != null)
     {
         if (swaptionNode.Attributes["href"] != null || swaptionNode.Attributes["id"] != null) 
         {
             if (swaptionNode.Attributes["id"] != null) 
             {
                 swaptionIDRef_ = swaptionNode.Attributes["id"].Value;
                 Swaption ob = new Swaption(swaptionNode);
                 IDManager.SetID(swaptionIDRef_, ob);
             }
             else if (swaptionNode.Attributes["href"] != null)
             {
                 swaptionIDRef_ = swaptionNode.Attributes["href"].Value;
             }
             else
             {
                 swaption_ = new Swaption(swaptionNode);
             }
         }
         else
         {
             swaption_ = new Swaption(swaptionNode);
         }
     }
     
 
     XmlNode equitySwapTransactionSupplementNode = xmlNode.SelectSingleNode("equitySwapTransactionSupplement");
     
     if (equitySwapTransactionSupplementNode != null)
     {
         if (equitySwapTransactionSupplementNode.Attributes["href"] != null || equitySwapTransactionSupplementNode.Attributes["id"] != null) 
         {
             if (equitySwapTransactionSupplementNode.Attributes["id"] != null) 
             {
                 equitySwapTransactionSupplementIDRef_ = equitySwapTransactionSupplementNode.Attributes["id"].Value;
                 EquitySwapTransactionSupplement ob = new EquitySwapTransactionSupplement(equitySwapTransactionSupplementNode);
                 IDManager.SetID(equitySwapTransactionSupplementIDRef_, ob);
             }
             else if (equitySwapTransactionSupplementNode.Attributes["href"] != null)
             {
                 equitySwapTransactionSupplementIDRef_ = equitySwapTransactionSupplementNode.Attributes["href"].Value;
             }
             else
             {
                 equitySwapTransactionSupplement_ = new EquitySwapTransactionSupplement(equitySwapTransactionSupplementNode);
             }
         }
         else
         {
             equitySwapTransactionSupplement_ = new EquitySwapTransactionSupplement(equitySwapTransactionSupplementNode);
         }
     }
     
 
     XmlNode standardProductNode = xmlNode.SelectSingleNode("standardProduct");
     
     if (standardProductNode != null)
     {
         if (standardProductNode.Attributes["href"] != null || standardProductNode.Attributes["id"] != null) 
         {
             if (standardProductNode.Attributes["id"] != null) 
             {
                 standardProductIDRef_ = standardProductNode.Attributes["id"].Value;
                 StandardProduct ob = new StandardProduct(standardProductNode);
                 IDManager.SetID(standardProductIDRef_, ob);
             }
             else if (standardProductNode.Attributes["href"] != null)
             {
                 standardProductIDRef_ = standardProductNode.Attributes["href"].Value;
             }
             else
             {
                 standardProduct_ = new StandardProduct(standardProductNode);
             }
         }
         else
         {
             standardProduct_ = new StandardProduct(standardProductNode);
         }
     }
     
 
     XmlNode varianceOptionTransactionSupplementNode = xmlNode.SelectSingleNode("varianceOptionTransactionSupplement");
     
     if (varianceOptionTransactionSupplementNode != null)
     {
         if (varianceOptionTransactionSupplementNode.Attributes["href"] != null || varianceOptionTransactionSupplementNode.Attributes["id"] != null) 
         {
             if (varianceOptionTransactionSupplementNode.Attributes["id"] != null) 
             {
                 varianceOptionTransactionSupplementIDRef_ = varianceOptionTransactionSupplementNode.Attributes["id"].Value;
                 VarianceOptionTransactionSupplement ob = new VarianceOptionTransactionSupplement(varianceOptionTransactionSupplementNode);
                 IDManager.SetID(varianceOptionTransactionSupplementIDRef_, ob);
             }
             else if (varianceOptionTransactionSupplementNode.Attributes["href"] != null)
             {
                 varianceOptionTransactionSupplementIDRef_ = varianceOptionTransactionSupplementNode.Attributes["href"].Value;
             }
             else
             {
                 varianceOptionTransactionSupplement_ = new VarianceOptionTransactionSupplement(varianceOptionTransactionSupplementNode);
             }
         }
         else
         {
             varianceOptionTransactionSupplement_ = new VarianceOptionTransactionSupplement(varianceOptionTransactionSupplementNode);
         }
     }
     
 
     XmlNode varianceSwapNode = xmlNode.SelectSingleNode("varianceSwap");
     
     if (varianceSwapNode != null)
     {
         if (varianceSwapNode.Attributes["href"] != null || varianceSwapNode.Attributes["id"] != null) 
         {
             if (varianceSwapNode.Attributes["id"] != null) 
             {
                 varianceSwapIDRef_ = varianceSwapNode.Attributes["id"].Value;
                 VarianceSwap ob = new VarianceSwap(varianceSwapNode);
                 IDManager.SetID(varianceSwapIDRef_, ob);
             }
             else if (varianceSwapNode.Attributes["href"] != null)
             {
                 varianceSwapIDRef_ = varianceSwapNode.Attributes["href"].Value;
             }
             else
             {
                 varianceSwap_ = new VarianceSwap(varianceSwapNode);
             }
         }
         else
         {
             varianceSwap_ = new VarianceSwap(varianceSwapNode);
         }
     }
     
 
     XmlNode varianceSwapTransactionSupplementNode = xmlNode.SelectSingleNode("varianceSwapTransactionSupplement");
     
     if (varianceSwapTransactionSupplementNode != null)
     {
         if (varianceSwapTransactionSupplementNode.Attributes["href"] != null || varianceSwapTransactionSupplementNode.Attributes["id"] != null) 
         {
             if (varianceSwapTransactionSupplementNode.Attributes["id"] != null) 
             {
                 varianceSwapTransactionSupplementIDRef_ = varianceSwapTransactionSupplementNode.Attributes["id"].Value;
                 VarianceSwapTransactionSupplement ob = new VarianceSwapTransactionSupplement(varianceSwapTransactionSupplementNode);
                 IDManager.SetID(varianceSwapTransactionSupplementIDRef_, ob);
             }
             else if (varianceSwapTransactionSupplementNode.Attributes["href"] != null)
             {
                 varianceSwapTransactionSupplementIDRef_ = varianceSwapTransactionSupplementNode.Attributes["href"].Value;
             }
             else
             {
                 varianceSwapTransactionSupplement_ = new VarianceSwapTransactionSupplement(varianceSwapTransactionSupplementNode);
             }
         }
         else
         {
             varianceSwapTransactionSupplement_ = new VarianceSwapTransactionSupplement(varianceSwapTransactionSupplementNode);
         }
     }
     
 
     XmlNodeList otherPartyPaymentNodeList = xmlNode.SelectNodes("otherPartyPayment");
     
     if (otherPartyPaymentNodeList != null)
     {
         this.otherPartyPayment_ = new List<Payment>();
         foreach (XmlNode item in otherPartyPaymentNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     otherPartyPaymentIDRef_ = item.Attributes["id"].Value;
                     otherPartyPayment_.Add(new Payment(item));
                     IDManager.SetID(otherPartyPaymentIDRef_, otherPartyPayment_[otherPartyPayment_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     otherPartyPaymentIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 otherPartyPayment_.Add(new Payment(item));
                 }
             }
             else
             {
                 otherPartyPayment_.Add(new Payment(item));
             }
         }
     }
     
 
     XmlNodeList brokerPartyReferenceNodeList = xmlNode.SelectNodes("brokerPartyReference");
     
     if (brokerPartyReferenceNodeList != null)
     {
         this.brokerPartyReference_ = new List<PartyReference>();
         foreach (XmlNode item in brokerPartyReferenceNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     brokerPartyReferenceIDRef_ = item.Attributes["id"].Value;
                     brokerPartyReference_.Add(new PartyReference(item));
                     IDManager.SetID(brokerPartyReferenceIDRef_, brokerPartyReference_[brokerPartyReference_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     brokerPartyReferenceIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 brokerPartyReference_.Add(new PartyReference(item));
                 }
             }
             else
             {
                 brokerPartyReference_.Add(new PartyReference(item));
             }
         }
     }
     
 
     XmlNode calculationAgentNode = xmlNode.SelectSingleNode("calculationAgent");
     
     if (calculationAgentNode != null)
     {
         if (calculationAgentNode.Attributes["href"] != null || calculationAgentNode.Attributes["id"] != null) 
         {
             if (calculationAgentNode.Attributes["id"] != null) 
             {
                 calculationAgentIDRef_ = calculationAgentNode.Attributes["id"].Value;
                 CalculationAgent ob = new CalculationAgent(calculationAgentNode);
                 IDManager.SetID(calculationAgentIDRef_, ob);
             }
             else if (calculationAgentNode.Attributes["href"] != null)
             {
                 calculationAgentIDRef_ = calculationAgentNode.Attributes["href"].Value;
             }
             else
             {
                 calculationAgent_ = new CalculationAgent(calculationAgentNode);
             }
         }
         else
         {
             calculationAgent_ = new CalculationAgent(calculationAgentNode);
         }
     }
     
 
     XmlNode calculationAgentBusinessCenterNode = xmlNode.SelectSingleNode("calculationAgentBusinessCenter");
     
     if (calculationAgentBusinessCenterNode != null)
     {
         if (calculationAgentBusinessCenterNode.Attributes["href"] != null || calculationAgentBusinessCenterNode.Attributes["id"] != null) 
         {
             if (calculationAgentBusinessCenterNode.Attributes["id"] != null) 
             {
                 calculationAgentBusinessCenterIDRef_ = calculationAgentBusinessCenterNode.Attributes["id"].Value;
                 BusinessCenter ob = new BusinessCenter(calculationAgentBusinessCenterNode);
                 IDManager.SetID(calculationAgentBusinessCenterIDRef_, ob);
             }
             else if (calculationAgentBusinessCenterNode.Attributes["href"] != null)
             {
                 calculationAgentBusinessCenterIDRef_ = calculationAgentBusinessCenterNode.Attributes["href"].Value;
             }
             else
             {
                 calculationAgentBusinessCenter_ = new BusinessCenter(calculationAgentBusinessCenterNode);
             }
         }
         else
         {
             calculationAgentBusinessCenter_ = new BusinessCenter(calculationAgentBusinessCenterNode);
         }
     }
     
 
     XmlNodeList determiningPartyNodeList = xmlNode.SelectNodes("determiningParty");
     
     if (determiningPartyNodeList != null)
     {
         this.determiningParty_ = new List<PartyReference>();
         foreach (XmlNode item in determiningPartyNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     determiningPartyIDRef_ = item.Attributes["id"].Value;
                     determiningParty_.Add(new PartyReference(item));
                     IDManager.SetID(determiningPartyIDRef_, determiningParty_[determiningParty_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     determiningPartyIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 determiningParty_.Add(new PartyReference(item));
                 }
             }
             else
             {
                 determiningParty_.Add(new PartyReference(item));
             }
         }
     }
     
 
     XmlNodeList hedgingPartyNodeList = xmlNode.SelectNodes("hedgingParty");
     
     if (hedgingPartyNodeList != null)
     {
         this.hedgingParty_ = new List<PartyReference>();
         foreach (XmlNode item in hedgingPartyNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     hedgingPartyIDRef_ = item.Attributes["id"].Value;
                     hedgingParty_.Add(new PartyReference(item));
                     IDManager.SetID(hedgingPartyIDRef_, hedgingParty_[hedgingParty_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     hedgingPartyIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 hedgingParty_.Add(new PartyReference(item));
                 }
             }
             else
             {
                 hedgingParty_.Add(new PartyReference(item));
             }
         }
     }
     
 
     XmlNode collateralNode = xmlNode.SelectSingleNode("collateral");
     
     if (collateralNode != null)
     {
         if (collateralNode.Attributes["href"] != null || collateralNode.Attributes["id"] != null) 
         {
             if (collateralNode.Attributes["id"] != null) 
             {
                 collateralIDRef_ = collateralNode.Attributes["id"].Value;
                 Collateral ob = new Collateral(collateralNode);
                 IDManager.SetID(collateralIDRef_, ob);
             }
             else if (collateralNode.Attributes["href"] != null)
             {
                 collateralIDRef_ = collateralNode.Attributes["href"].Value;
             }
             else
             {
                 collateral_ = new Collateral(collateralNode);
             }
         }
         else
         {
             collateral_ = new Collateral(collateralNode);
         }
     }
     
 
     XmlNode documentationNode = xmlNode.SelectSingleNode("documentation");
     
     if (documentationNode != null)
     {
         if (documentationNode.Attributes["href"] != null || documentationNode.Attributes["id"] != null) 
         {
             if (documentationNode.Attributes["id"] != null) 
             {
                 documentationIDRef_ = documentationNode.Attributes["id"].Value;
                 Documentation ob = new Documentation(documentationNode);
                 IDManager.SetID(documentationIDRef_, ob);
             }
             else if (documentationNode.Attributes["href"] != null)
             {
                 documentationIDRef_ = documentationNode.Attributes["href"].Value;
             }
             else
             {
                 documentation_ = new Documentation(documentationNode);
             }
         }
         else
         {
             documentation_ = new Documentation(documentationNode);
         }
     }
     
 
     XmlNode governingLawNode = xmlNode.SelectSingleNode("governingLaw");
     
     if (governingLawNode != null)
     {
         if (governingLawNode.Attributes["href"] != null || governingLawNode.Attributes["id"] != null) 
         {
             if (governingLawNode.Attributes["id"] != null) 
             {
                 governingLawIDRef_ = governingLawNode.Attributes["id"].Value;
                 GoverningLaw ob = new GoverningLaw(governingLawNode);
                 IDManager.SetID(governingLawIDRef_, ob);
             }
             else if (governingLawNode.Attributes["href"] != null)
             {
                 governingLawIDRef_ = governingLawNode.Attributes["href"].Value;
             }
             else
             {
                 governingLaw_ = new GoverningLaw(governingLawNode);
             }
         }
         else
         {
             governingLaw_ = new GoverningLaw(governingLawNode);
         }
     }
     
 
     XmlNode allocationsNode = xmlNode.SelectSingleNode("allocations");
     
     if (allocationsNode != null)
     {
         if (allocationsNode.Attributes["href"] != null || allocationsNode.Attributes["id"] != null) 
         {
             if (allocationsNode.Attributes["id"] != null) 
             {
                 allocationsIDRef_ = allocationsNode.Attributes["id"].Value;
                 Allocations ob = new Allocations(allocationsNode);
                 IDManager.SetID(allocationsIDRef_, ob);
             }
             else if (allocationsNode.Attributes["href"] != null)
             {
                 allocationsIDRef_ = allocationsNode.Attributes["href"].Value;
             }
             else
             {
                 allocations_ = new Allocations(allocationsNode);
             }
         }
         else
         {
             allocations_ = new Allocations(allocationsNode);
         }
     }
     
 
 }
コード例 #4
0
 public Swaption(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode buyerPartyReferenceNode = xmlNode.SelectSingleNode("buyerPartyReference");
     
     if (buyerPartyReferenceNode != null)
     {
         if (buyerPartyReferenceNode.Attributes["href"] != null || buyerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (buyerPartyReferenceNode.Attributes["id"] != null) 
             {
                 buyerPartyReferenceIDRef_ = buyerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(buyerPartyReferenceNode);
                 IDManager.SetID(buyerPartyReferenceIDRef_, ob);
             }
             else if (buyerPartyReferenceNode.Attributes["href"] != null)
             {
                 buyerPartyReferenceIDRef_ = buyerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 buyerPartyReference_ = new PartyReference(buyerPartyReferenceNode);
             }
         }
         else
         {
             buyerPartyReference_ = new PartyReference(buyerPartyReferenceNode);
         }
     }
     
 
     XmlNode buyerAccountReferenceNode = xmlNode.SelectSingleNode("buyerAccountReference");
     
     if (buyerAccountReferenceNode != null)
     {
         if (buyerAccountReferenceNode.Attributes["href"] != null || buyerAccountReferenceNode.Attributes["id"] != null) 
         {
             if (buyerAccountReferenceNode.Attributes["id"] != null) 
             {
                 buyerAccountReferenceIDRef_ = buyerAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(buyerAccountReferenceNode);
                 IDManager.SetID(buyerAccountReferenceIDRef_, ob);
             }
             else if (buyerAccountReferenceNode.Attributes["href"] != null)
             {
                 buyerAccountReferenceIDRef_ = buyerAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 buyerAccountReference_ = new AccountReference(buyerAccountReferenceNode);
             }
         }
         else
         {
             buyerAccountReference_ = new AccountReference(buyerAccountReferenceNode);
         }
     }
     
 
     XmlNode sellerPartyReferenceNode = xmlNode.SelectSingleNode("sellerPartyReference");
     
     if (sellerPartyReferenceNode != null)
     {
         if (sellerPartyReferenceNode.Attributes["href"] != null || sellerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (sellerPartyReferenceNode.Attributes["id"] != null) 
             {
                 sellerPartyReferenceIDRef_ = sellerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(sellerPartyReferenceNode);
                 IDManager.SetID(sellerPartyReferenceIDRef_, ob);
             }
             else if (sellerPartyReferenceNode.Attributes["href"] != null)
             {
                 sellerPartyReferenceIDRef_ = sellerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 sellerPartyReference_ = new PartyReference(sellerPartyReferenceNode);
             }
         }
         else
         {
             sellerPartyReference_ = new PartyReference(sellerPartyReferenceNode);
         }
     }
     
 
     XmlNode sellerAccountReferenceNode = xmlNode.SelectSingleNode("sellerAccountReference");
     
     if (sellerAccountReferenceNode != null)
     {
         if (sellerAccountReferenceNode.Attributes["href"] != null || sellerAccountReferenceNode.Attributes["id"] != null) 
         {
             if (sellerAccountReferenceNode.Attributes["id"] != null) 
             {
                 sellerAccountReferenceIDRef_ = sellerAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(sellerAccountReferenceNode);
                 IDManager.SetID(sellerAccountReferenceIDRef_, ob);
             }
             else if (sellerAccountReferenceNode.Attributes["href"] != null)
             {
                 sellerAccountReferenceIDRef_ = sellerAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 sellerAccountReference_ = new AccountReference(sellerAccountReferenceNode);
             }
         }
         else
         {
             sellerAccountReference_ = new AccountReference(sellerAccountReferenceNode);
         }
     }
     
 
     XmlNodeList premiumNodeList = xmlNode.SelectNodes("premium");
     
     if (premiumNodeList != null)
     {
         this.premium_ = new List<Payment>();
         foreach (XmlNode item in premiumNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     premiumIDRef_ = item.Attributes["id"].Value;
                     premium_.Add(new Payment(item));
                     IDManager.SetID(premiumIDRef_, premium_[premium_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     premiumIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 premium_.Add(new Payment(item));
                 }
             }
             else
             {
                 premium_.Add(new Payment(item));
             }
         }
     }
     
 
     XmlNode exerciseNode = xmlNode.SelectSingleNode("exercise");
     
     if (exerciseNode != null)
     {
         if (exerciseNode.Attributes["href"] != null || exerciseNode.Attributes["id"] != null) 
         {
             if (exerciseNode.Attributes["id"] != null) 
             {
                 exerciseIDRef_ = exerciseNode.Attributes["id"].Value;
                 Exercise ob = new Exercise(exerciseNode);
                 IDManager.SetID(exerciseIDRef_, ob);
             }
             else if (exerciseNode.Attributes["href"] != null)
             {
                 exerciseIDRef_ = exerciseNode.Attributes["href"].Value;
             }
             else
             {
                 exercise_ = new Exercise(exerciseNode);
             }
         }
         else
         {
             exercise_ = new Exercise(exerciseNode);
         }
     }
     
 
     XmlNode americanExerciseNode = xmlNode.SelectSingleNode("americanExercise");
     
     if (americanExerciseNode != null)
     {
         if (americanExerciseNode.Attributes["href"] != null || americanExerciseNode.Attributes["id"] != null) 
         {
             if (americanExerciseNode.Attributes["id"] != null) 
             {
                 americanExerciseIDRef_ = americanExerciseNode.Attributes["id"].Value;
                 AmericanExercise ob = new AmericanExercise(americanExerciseNode);
                 IDManager.SetID(americanExerciseIDRef_, ob);
             }
             else if (americanExerciseNode.Attributes["href"] != null)
             {
                 americanExerciseIDRef_ = americanExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 americanExercise_ = new AmericanExercise(americanExerciseNode);
             }
         }
         else
         {
             americanExercise_ = new AmericanExercise(americanExerciseNode);
         }
     }
     
 
     XmlNode bermudaExerciseNode = xmlNode.SelectSingleNode("bermudaExercise");
     
     if (bermudaExerciseNode != null)
     {
         if (bermudaExerciseNode.Attributes["href"] != null || bermudaExerciseNode.Attributes["id"] != null) 
         {
             if (bermudaExerciseNode.Attributes["id"] != null) 
             {
                 bermudaExerciseIDRef_ = bermudaExerciseNode.Attributes["id"].Value;
                 BermudaExercise ob = new BermudaExercise(bermudaExerciseNode);
                 IDManager.SetID(bermudaExerciseIDRef_, ob);
             }
             else if (bermudaExerciseNode.Attributes["href"] != null)
             {
                 bermudaExerciseIDRef_ = bermudaExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 bermudaExercise_ = new BermudaExercise(bermudaExerciseNode);
             }
         }
         else
         {
             bermudaExercise_ = new BermudaExercise(bermudaExerciseNode);
         }
     }
     
 
     XmlNode europeanExerciseNode = xmlNode.SelectSingleNode("europeanExercise");
     
     if (europeanExerciseNode != null)
     {
         if (europeanExerciseNode.Attributes["href"] != null || europeanExerciseNode.Attributes["id"] != null) 
         {
             if (europeanExerciseNode.Attributes["id"] != null) 
             {
                 europeanExerciseIDRef_ = europeanExerciseNode.Attributes["id"].Value;
                 EuropeanExercise ob = new EuropeanExercise(europeanExerciseNode);
                 IDManager.SetID(europeanExerciseIDRef_, ob);
             }
             else if (europeanExerciseNode.Attributes["href"] != null)
             {
                 europeanExerciseIDRef_ = europeanExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 europeanExercise_ = new EuropeanExercise(europeanExerciseNode);
             }
         }
         else
         {
             europeanExercise_ = new EuropeanExercise(europeanExerciseNode);
         }
     }
     
 
     XmlNode exerciseProcedureNode = xmlNode.SelectSingleNode("exerciseProcedure");
     
     if (exerciseProcedureNode != null)
     {
         if (exerciseProcedureNode.Attributes["href"] != null || exerciseProcedureNode.Attributes["id"] != null) 
         {
             if (exerciseProcedureNode.Attributes["id"] != null) 
             {
                 exerciseProcedureIDRef_ = exerciseProcedureNode.Attributes["id"].Value;
                 ExerciseProcedure ob = new ExerciseProcedure(exerciseProcedureNode);
                 IDManager.SetID(exerciseProcedureIDRef_, ob);
             }
             else if (exerciseProcedureNode.Attributes["href"] != null)
             {
                 exerciseProcedureIDRef_ = exerciseProcedureNode.Attributes["href"].Value;
             }
             else
             {
                 exerciseProcedure_ = new ExerciseProcedure(exerciseProcedureNode);
             }
         }
         else
         {
             exerciseProcedure_ = new ExerciseProcedure(exerciseProcedureNode);
         }
     }
     
 
     XmlNode calculationAgentNode = xmlNode.SelectSingleNode("calculationAgent");
     
     if (calculationAgentNode != null)
     {
         if (calculationAgentNode.Attributes["href"] != null || calculationAgentNode.Attributes["id"] != null) 
         {
             if (calculationAgentNode.Attributes["id"] != null) 
             {
                 calculationAgentIDRef_ = calculationAgentNode.Attributes["id"].Value;
                 CalculationAgent ob = new CalculationAgent(calculationAgentNode);
                 IDManager.SetID(calculationAgentIDRef_, ob);
             }
             else if (calculationAgentNode.Attributes["href"] != null)
             {
                 calculationAgentIDRef_ = calculationAgentNode.Attributes["href"].Value;
             }
             else
             {
                 calculationAgent_ = new CalculationAgent(calculationAgentNode);
             }
         }
         else
         {
             calculationAgent_ = new CalculationAgent(calculationAgentNode);
         }
     }
     
 
     XmlNode cashSettlementNode = xmlNode.SelectSingleNode("cashSettlement");
     
     if (cashSettlementNode != null)
     {
         if (cashSettlementNode.Attributes["href"] != null || cashSettlementNode.Attributes["id"] != null) 
         {
             if (cashSettlementNode.Attributes["id"] != null) 
             {
                 cashSettlementIDRef_ = cashSettlementNode.Attributes["id"].Value;
                 CashSettlement ob = new CashSettlement(cashSettlementNode);
                 IDManager.SetID(cashSettlementIDRef_, ob);
             }
             else if (cashSettlementNode.Attributes["href"] != null)
             {
                 cashSettlementIDRef_ = cashSettlementNode.Attributes["href"].Value;
             }
             else
             {
                 cashSettlement_ = new CashSettlement(cashSettlementNode);
             }
         }
         else
         {
             cashSettlement_ = new CashSettlement(cashSettlementNode);
         }
     }
     
 
     XmlNode physicalSettlementNode = xmlNode.SelectSingleNode("physicalSettlement");
     
     if (physicalSettlementNode != null)
     {
         if (physicalSettlementNode.Attributes["href"] != null || physicalSettlementNode.Attributes["id"] != null) 
         {
             if (physicalSettlementNode.Attributes["id"] != null) 
             {
                 physicalSettlementIDRef_ = physicalSettlementNode.Attributes["id"].Value;
                 SwaptionPhysicalSettlement ob = new SwaptionPhysicalSettlement(physicalSettlementNode);
                 IDManager.SetID(physicalSettlementIDRef_, ob);
             }
             else if (physicalSettlementNode.Attributes["href"] != null)
             {
                 physicalSettlementIDRef_ = physicalSettlementNode.Attributes["href"].Value;
             }
             else
             {
                 physicalSettlement_ = new SwaptionPhysicalSettlement(physicalSettlementNode);
             }
         }
         else
         {
             physicalSettlement_ = new SwaptionPhysicalSettlement(physicalSettlementNode);
         }
     }
     
 
     XmlNode swaptionStraddleNode = xmlNode.SelectSingleNode("swaptionStraddle");
     
     if (swaptionStraddleNode != null)
     {
         if (swaptionStraddleNode.Attributes["href"] != null || swaptionStraddleNode.Attributes["id"] != null) 
         {
             if (swaptionStraddleNode.Attributes["id"] != null) 
             {
                 swaptionStraddleIDRef_ = swaptionStraddleNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(swaptionStraddleNode);
                 IDManager.SetID(swaptionStraddleIDRef_, ob);
             }
             else if (swaptionStraddleNode.Attributes["href"] != null)
             {
                 swaptionStraddleIDRef_ = swaptionStraddleNode.Attributes["href"].Value;
             }
             else
             {
                 swaptionStraddle_ = new XsdTypeBoolean(swaptionStraddleNode);
             }
         }
         else
         {
             swaptionStraddle_ = new XsdTypeBoolean(swaptionStraddleNode);
         }
     }
     
 
     XmlNode swaptionAdjustedDatesNode = xmlNode.SelectSingleNode("swaptionAdjustedDates");
     
     if (swaptionAdjustedDatesNode != null)
     {
         if (swaptionAdjustedDatesNode.Attributes["href"] != null || swaptionAdjustedDatesNode.Attributes["id"] != null) 
         {
             if (swaptionAdjustedDatesNode.Attributes["id"] != null) 
             {
                 swaptionAdjustedDatesIDRef_ = swaptionAdjustedDatesNode.Attributes["id"].Value;
                 SwaptionAdjustedDates ob = new SwaptionAdjustedDates(swaptionAdjustedDatesNode);
                 IDManager.SetID(swaptionAdjustedDatesIDRef_, ob);
             }
             else if (swaptionAdjustedDatesNode.Attributes["href"] != null)
             {
                 swaptionAdjustedDatesIDRef_ = swaptionAdjustedDatesNode.Attributes["href"].Value;
             }
             else
             {
                 swaptionAdjustedDates_ = new SwaptionAdjustedDates(swaptionAdjustedDatesNode);
             }
         }
         else
         {
             swaptionAdjustedDates_ = new SwaptionAdjustedDates(swaptionAdjustedDatesNode);
         }
     }
     
 
     XmlNode swapNode = xmlNode.SelectSingleNode("swap");
     
     if (swapNode != null)
     {
         if (swapNode.Attributes["href"] != null || swapNode.Attributes["id"] != null) 
         {
             if (swapNode.Attributes["id"] != null) 
             {
                 swapIDRef_ = swapNode.Attributes["id"].Value;
                 Swap ob = new Swap(swapNode);
                 IDManager.SetID(swapIDRef_, ob);
             }
             else if (swapNode.Attributes["href"] != null)
             {
                 swapIDRef_ = swapNode.Attributes["href"].Value;
             }
             else
             {
                 swap_ = new Swap(swapNode);
             }
         }
         else
         {
             swap_ = new Swap(swapNode);
         }
     }
     
 
 }