public VanillaFloatingRatePayoff_A(XmlNode xmlNode) : base(xmlNode) { XmlNode dayCounterNode = xmlNode.SelectSingleNode("dayCounter"); if (dayCounterNode != null) { if (dayCounterNode.Attributes["href"] != null || dayCounterNode.Attributes["id"] != null) { if (dayCounterNode.Attributes["id"] != null) { dayCounterIDRef_ = dayCounterNode.Attributes["id"].Value; XsdTypeToken ob = new XsdTypeToken(dayCounterNode); IDManager.SetID(dayCounterIDRef_, ob); } else if (dayCounterNode.Attributes["href"] != null) { dayCounterIDRef_ = dayCounterNode.Attributes["href"].Value; } else { dayCounter_ = new XsdTypeToken(dayCounterNode); } } else { dayCounter_ = new XsdTypeToken(dayCounterNode); } } XmlNode calculationStartDateNode = xmlNode.SelectSingleNode("calculationStartDate"); if (calculationStartDateNode != null) { if (calculationStartDateNode.Attributes["href"] != null || calculationStartDateNode.Attributes["id"] != null) { if (calculationStartDateNode.Attributes["id"] != null) { calculationStartDateIDRef_ = calculationStartDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(calculationStartDateNode); IDManager.SetID(calculationStartDateIDRef_, ob); } else if (calculationStartDateNode.Attributes["href"] != null) { calculationStartDateIDRef_ = calculationStartDateNode.Attributes["href"].Value; } else { calculationStartDate_ = new XsdTypeDate(calculationStartDateNode); } } else { calculationStartDate_ = new XsdTypeDate(calculationStartDateNode); } } XmlNode calculationEndDateNode = xmlNode.SelectSingleNode("calculationEndDate"); if (calculationEndDateNode != null) { if (calculationEndDateNode.Attributes["href"] != null || calculationEndDateNode.Attributes["id"] != null) { if (calculationEndDateNode.Attributes["id"] != null) { calculationEndDateIDRef_ = calculationEndDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(calculationEndDateNode); IDManager.SetID(calculationEndDateIDRef_, ob); } else if (calculationEndDateNode.Attributes["href"] != null) { calculationEndDateIDRef_ = calculationEndDateNode.Attributes["href"].Value; } else { calculationEndDate_ = new XsdTypeDate(calculationEndDateNode); } } else { calculationEndDate_ = new XsdTypeDate(calculationEndDateNode); } } XmlNode gearingNode = xmlNode.SelectSingleNode("gearing"); if (gearingNode != null) { if (gearingNode.Attributes["href"] != null || gearingNode.Attributes["id"] != null) { if (gearingNode.Attributes["id"] != null) { gearingIDRef_ = gearingNode.Attributes["id"].Value; XsdTypeDouble ob = new XsdTypeDouble(gearingNode); IDManager.SetID(gearingIDRef_, ob); } else if (gearingNode.Attributes["href"] != null) { gearingIDRef_ = gearingNode.Attributes["href"].Value; } else { gearing_ = new XsdTypeDouble(gearingNode); } } else { gearing_ = new XsdTypeDouble(gearingNode); } } XmlNode spreadNode = xmlNode.SelectSingleNode("spread"); if (spreadNode != null) { if (spreadNode.Attributes["href"] != null || spreadNode.Attributes["id"] != null) { if (spreadNode.Attributes["id"] != null) { spreadIDRef_ = spreadNode.Attributes["id"].Value; XsdTypeDouble ob = new XsdTypeDouble(spreadNode); IDManager.SetID(spreadIDRef_, ob); } else if (spreadNode.Attributes["href"] != null) { spreadIDRef_ = spreadNode.Attributes["href"].Value; } else { spread_ = new XsdTypeDouble(spreadNode); } } else { spread_ = new XsdTypeDouble(spreadNode); } } XmlNode referenceStrNode = xmlNode.SelectSingleNode("referenceStr"); if (referenceStrNode != null) { if (referenceStrNode.Attributes["href"] != null || referenceStrNode.Attributes["id"] != null) { if (referenceStrNode.Attributes["id"] != null) { referenceStrIDRef_ = referenceStrNode.Attributes["id"].Value; XsdTypeToken ob = new XsdTypeToken(referenceStrNode); IDManager.SetID(referenceStrIDRef_, ob); } else if (referenceStrNode.Attributes["href"] != null) { referenceStrIDRef_ = referenceStrNode.Attributes["href"].Value; } else { referenceStr_ = new XsdTypeToken(referenceStrNode); } } else { referenceStr_ = new XsdTypeToken(referenceStrNode); } } XmlNode payoffDateNode = xmlNode.SelectSingleNode("payoffDate"); if (payoffDateNode != null) { if (payoffDateNode.Attributes["href"] != null || payoffDateNode.Attributes["id"] != null) { if (payoffDateNode.Attributes["id"] != null) { payoffDateIDRef_ = payoffDateNode.Attributes["id"].Value; XsdTypeToken ob = new XsdTypeToken(payoffDateNode); IDManager.SetID(payoffDateIDRef_, ob); } else if (payoffDateNode.Attributes["href"] != null) { payoffDateIDRef_ = payoffDateNode.Attributes["href"].Value; } else { payoffDate_ = new XsdTypeToken(payoffDateNode); } } else { payoffDate_ = new XsdTypeToken(payoffDateNode); } } XmlNode capFloorOptionNode = xmlNode.SelectSingleNode("capFloorOption"); if (capFloorOptionNode != null) { if (capFloorOptionNode.Attributes["href"] != null || capFloorOptionNode.Attributes["id"] != null) { if (capFloorOptionNode.Attributes["id"] != null) { capFloorOptionIDRef_ = capFloorOptionNode.Attributes["id"].Value; CapFloorOption ob = new CapFloorOption(capFloorOptionNode); IDManager.SetID(capFloorOptionIDRef_, ob); } else if (capFloorOptionNode.Attributes["href"] != null) { capFloorOptionIDRef_ = capFloorOptionNode.Attributes["href"].Value; } else { capFloorOption_ = new CapFloorOption(capFloorOptionNode); } } else { capFloorOption_ = new CapFloorOption(capFloorOptionNode); } } }
public VanillaFloatingRatePayoff_A(XmlNode xmlNode) : base(xmlNode) { XmlNode dayCounterNode = xmlNode.SelectSingleNode("dayCounter"); if (dayCounterNode != null) { if (dayCounterNode.Attributes["href"] != null || dayCounterNode.Attributes["id"] != null) { if (dayCounterNode.Attributes["id"] != null) { dayCounterIDRef_ = dayCounterNode.Attributes["id"].Value; XsdTypeToken ob = new XsdTypeToken(dayCounterNode); IDManager.SetID(dayCounterIDRef_, ob); } else if (dayCounterNode.Attributes["href"] != null) { dayCounterIDRef_ = dayCounterNode.Attributes["href"].Value; } else { dayCounter_ = new XsdTypeToken(dayCounterNode); } } else { dayCounter_ = new XsdTypeToken(dayCounterNode); } } XmlNode calculationStartDateNode = xmlNode.SelectSingleNode("calculationStartDate"); if (calculationStartDateNode != null) { if (calculationStartDateNode.Attributes["href"] != null || calculationStartDateNode.Attributes["id"] != null) { if (calculationStartDateNode.Attributes["id"] != null) { calculationStartDateIDRef_ = calculationStartDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(calculationStartDateNode); IDManager.SetID(calculationStartDateIDRef_, ob); } else if (calculationStartDateNode.Attributes["href"] != null) { calculationStartDateIDRef_ = calculationStartDateNode.Attributes["href"].Value; } else { calculationStartDate_ = new XsdTypeDate(calculationStartDateNode); } } else { calculationStartDate_ = new XsdTypeDate(calculationStartDateNode); } } XmlNode calculationEndDateNode = xmlNode.SelectSingleNode("calculationEndDate"); if (calculationEndDateNode != null) { if (calculationEndDateNode.Attributes["href"] != null || calculationEndDateNode.Attributes["id"] != null) { if (calculationEndDateNode.Attributes["id"] != null) { calculationEndDateIDRef_ = calculationEndDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(calculationEndDateNode); IDManager.SetID(calculationEndDateIDRef_, ob); } else if (calculationEndDateNode.Attributes["href"] != null) { calculationEndDateIDRef_ = calculationEndDateNode.Attributes["href"].Value; } else { calculationEndDate_ = new XsdTypeDate(calculationEndDateNode); } } else { calculationEndDate_ = new XsdTypeDate(calculationEndDateNode); } } XmlNode gearingNode = xmlNode.SelectSingleNode("gearing"); if (gearingNode != null) { if (gearingNode.Attributes["href"] != null || gearingNode.Attributes["id"] != null) { if (gearingNode.Attributes["id"] != null) { gearingIDRef_ = gearingNode.Attributes["id"].Value; XsdTypeDouble ob = new XsdTypeDouble(gearingNode); IDManager.SetID(gearingIDRef_, ob); } else if (gearingNode.Attributes["href"] != null) { gearingIDRef_ = gearingNode.Attributes["href"].Value; } else { gearing_ = new XsdTypeDouble(gearingNode); } } else { gearing_ = new XsdTypeDouble(gearingNode); } } XmlNode spreadNode = xmlNode.SelectSingleNode("spread"); if (spreadNode != null) { if (spreadNode.Attributes["href"] != null || spreadNode.Attributes["id"] != null) { if (spreadNode.Attributes["id"] != null) { spreadIDRef_ = spreadNode.Attributes["id"].Value; XsdTypeDouble ob = new XsdTypeDouble(spreadNode); IDManager.SetID(spreadIDRef_, ob); } else if (spreadNode.Attributes["href"] != null) { spreadIDRef_ = spreadNode.Attributes["href"].Value; } else { spread_ = new XsdTypeDouble(spreadNode); } } else { spread_ = new XsdTypeDouble(spreadNode); } } XmlNode referenceStrNode = xmlNode.SelectSingleNode("referenceStr"); if (referenceStrNode != null) { if (referenceStrNode.Attributes["href"] != null || referenceStrNode.Attributes["id"] != null) { if (referenceStrNode.Attributes["id"] != null) { referenceStrIDRef_ = referenceStrNode.Attributes["id"].Value; XsdTypeToken ob = new XsdTypeToken(referenceStrNode); IDManager.SetID(referenceStrIDRef_, ob); } else if (referenceStrNode.Attributes["href"] != null) { referenceStrIDRef_ = referenceStrNode.Attributes["href"].Value; } else { referenceStr_ = new XsdTypeToken(referenceStrNode); } } else { referenceStr_ = new XsdTypeToken(referenceStrNode); } } XmlNode payoffDateNode = xmlNode.SelectSingleNode("payoffDate"); if (payoffDateNode != null) { if (payoffDateNode.Attributes["href"] != null || payoffDateNode.Attributes["id"] != null) { if (payoffDateNode.Attributes["id"] != null) { payoffDateIDRef_ = payoffDateNode.Attributes["id"].Value; XsdTypeToken ob = new XsdTypeToken(payoffDateNode); IDManager.SetID(payoffDateIDRef_, ob); } else if (payoffDateNode.Attributes["href"] != null) { payoffDateIDRef_ = payoffDateNode.Attributes["href"].Value; } else { payoffDate_ = new XsdTypeToken(payoffDateNode); } } else { payoffDate_ = new XsdTypeToken(payoffDateNode); } } XmlNode capFloorOptionNode = xmlNode.SelectSingleNode("capFloorOption"); if (capFloorOptionNode != null) { if (capFloorOptionNode.Attributes["href"] != null || capFloorOptionNode.Attributes["id"] != null) { if (capFloorOptionNode.Attributes["id"] != null) { capFloorOptionIDRef_ = capFloorOptionNode.Attributes["id"].Value; CapFloorOption ob = new CapFloorOption(capFloorOptionNode); IDManager.SetID(capFloorOptionIDRef_, ob); } else if (capFloorOptionNode.Attributes["href"] != null) { capFloorOptionIDRef_ = capFloorOptionNode.Attributes["href"].Value; } else { capFloorOption_ = new CapFloorOption(capFloorOptionNode); } } else { capFloorOption_ = new CapFloorOption(capFloorOptionNode); } } }