public MakeWholeAmount(XmlNode xmlNode) : base(xmlNode) { XmlNode interpolationMethodNode = xmlNode.SelectSingleNode("interpolationMethod"); if (interpolationMethodNode != null) { if (interpolationMethodNode.Attributes["href"] != null || interpolationMethodNode.Attributes["id"] != null) { if (interpolationMethodNode.Attributes["id"] != null) { interpolationMethodIDRef_ = interpolationMethodNode.Attributes["id"].Value; InterpolationMethod ob = new InterpolationMethod(interpolationMethodNode); IDManager.SetID(interpolationMethodIDRef_, ob); } else if (interpolationMethodNode.Attributes["href"] != null) { interpolationMethodIDRef_ = interpolationMethodNode.Attributes["href"].Value; } else { interpolationMethod_ = new InterpolationMethod(interpolationMethodNode); } } else { interpolationMethod_ = new InterpolationMethod(interpolationMethodNode); } } XmlNode earlyCallDateNode = xmlNode.SelectSingleNode("earlyCallDate"); if (earlyCallDateNode != null) { if (earlyCallDateNode.Attributes["href"] != null || earlyCallDateNode.Attributes["id"] != null) { if (earlyCallDateNode.Attributes["id"] != null) { earlyCallDateIDRef_ = earlyCallDateNode.Attributes["id"].Value; IdentifiedDate ob = new IdentifiedDate(earlyCallDateNode); IDManager.SetID(earlyCallDateIDRef_, ob); } else if (earlyCallDateNode.Attributes["href"] != null) { earlyCallDateIDRef_ = earlyCallDateNode.Attributes["href"].Value; } else { earlyCallDate_ = new IdentifiedDate(earlyCallDateNode); } } else { earlyCallDate_ = new IdentifiedDate(earlyCallDateNode); } } }
public MakeWholeAmount(XmlNode xmlNode) : base(xmlNode) { XmlNodeList interpolationMethodNodeList = xmlNode.SelectNodes("interpolationMethod"); if (interpolationMethodNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in interpolationMethodNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { interpolationMethodIDRef = item.Attributes["id"].Name; InterpolationMethod ob = InterpolationMethod(); IDManager.SetID(interpolationMethodIDRef, ob); } else if (item.Attributes.ToString() == "href") { interpolationMethodIDRef = item.Attributes["href"].Name; } else { interpolationMethod = new InterpolationMethod(item); } } } XmlNodeList earlyCallDateNodeList = xmlNode.SelectNodes("earlyCallDate"); if (earlyCallDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in earlyCallDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { earlyCallDateIDRef = item.Attributes["id"].Name; IdentifiedDate ob = IdentifiedDate(); IDManager.SetID(earlyCallDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { earlyCallDateIDRef = item.Attributes["href"].Name; } else { earlyCallDate = new IdentifiedDate(item); } } } }
public MakeWholeAmount(XmlNode xmlNode) : base(xmlNode) { XmlNodeList interpolationMethodNodeList = xmlNode.SelectNodes("interpolationMethod"); if (interpolationMethodNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in interpolationMethodNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { interpolationMethodIDRef = item.Attributes["id"].Name; InterpolationMethod ob = InterpolationMethod(); IDManager.SetID(interpolationMethodIDRef, ob); } else if (item.Attributes.ToString() == "href") { interpolationMethodIDRef = item.Attributes["href"].Name; } else { interpolationMethod = new InterpolationMethod(item); } } } XmlNodeList earlyCallDateNodeList = xmlNode.SelectNodes("earlyCallDate"); if (earlyCallDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in earlyCallDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { earlyCallDateIDRef = item.Attributes["id"].Name; IdentifiedDate ob = IdentifiedDate(); IDManager.SetID(earlyCallDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { earlyCallDateIDRef = item.Attributes["href"].Name; } else { earlyCallDate = new IdentifiedDate(item); } } } }
public TermCurve(XmlNode xmlNode) { XmlNodeList interpolationMethodNodeList = xmlNode.SelectNodes("interpolationMethod"); if (interpolationMethodNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in interpolationMethodNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { interpolationMethodIDRef = item.Attributes["id"].Name; InterpolationMethod ob = InterpolationMethod(); IDManager.SetID(interpolationMethodIDRef, ob); } else if (item.Attributes.ToString() == "href") { interpolationMethodIDRef = item.Attributes["href"].Name; } else { interpolationMethod = new InterpolationMethod(item); } } } XmlNodeList extrapolationPermittedNodeList = xmlNode.SelectNodes("extrapolationPermitted"); if (extrapolationPermittedNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in extrapolationPermittedNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { extrapolationPermittedIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(extrapolationPermittedIDRef, ob); } else if (item.Attributes.ToString() == "href") { extrapolationPermittedIDRef = item.Attributes["href"].Name; } else { extrapolationPermitted = new XsdTypeBoolean(item); } } } XmlNodeList pointNodeList = xmlNode.SelectNodes("point"); foreach (XmlNode item in pointNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { pointIDRef = item.Attributes["id"].Name; List<TermPoint> ob = new List<TermPoint>(); ob.Add(new TermPoint(item)); IDManager.SetID(pointIDRef, ob); } else if (item.Attributes.ToString() == "href") { pointIDRef = item.Attributes["href"].Name; } else { point.Add(new TermPoint(item)); } } } }
public TermCurve(XmlNode xmlNode) { XmlNode interpolationMethodNode = xmlNode.SelectSingleNode("interpolationMethod"); if (interpolationMethodNode != null) { if (interpolationMethodNode.Attributes["href"] != null || interpolationMethodNode.Attributes["id"] != null) { if (interpolationMethodNode.Attributes["id"] != null) { interpolationMethodIDRef_ = interpolationMethodNode.Attributes["id"].Value; InterpolationMethod ob = new InterpolationMethod(interpolationMethodNode); IDManager.SetID(interpolationMethodIDRef_, ob); } else if (interpolationMethodNode.Attributes["href"] != null) { interpolationMethodIDRef_ = interpolationMethodNode.Attributes["href"].Value; } else { interpolationMethod_ = new InterpolationMethod(interpolationMethodNode); } } else { interpolationMethod_ = new InterpolationMethod(interpolationMethodNode); } } XmlNode extrapolationPermittedNode = xmlNode.SelectSingleNode("extrapolationPermitted"); if (extrapolationPermittedNode != null) { if (extrapolationPermittedNode.Attributes["href"] != null || extrapolationPermittedNode.Attributes["id"] != null) { if (extrapolationPermittedNode.Attributes["id"] != null) { extrapolationPermittedIDRef_ = extrapolationPermittedNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(extrapolationPermittedNode); IDManager.SetID(extrapolationPermittedIDRef_, ob); } else if (extrapolationPermittedNode.Attributes["href"] != null) { extrapolationPermittedIDRef_ = extrapolationPermittedNode.Attributes["href"].Value; } else { extrapolationPermitted_ = new XsdTypeBoolean(extrapolationPermittedNode); } } else { extrapolationPermitted_ = new XsdTypeBoolean(extrapolationPermittedNode); } } XmlNodeList pointNodeList = xmlNode.SelectNodes("point"); if (pointNodeList != null) { this.point_ = new List<TermPoint>(); foreach (XmlNode item in pointNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { pointIDRef_ = item.Attributes["id"].Value; point_.Add(new TermPoint(item)); IDManager.SetID(pointIDRef_, point_[point_.Count - 1 ]); } else if (item.Attributes["href"] != null) { pointIDRef_ = item.Attributes["href"].Value; } else { point_.Add(new TermPoint(item)); } } else { point_.Add(new TermPoint(item)); } } } }
public TermCurve(XmlNode xmlNode) { XmlNode interpolationMethodNode = xmlNode.SelectSingleNode("interpolationMethod"); if (interpolationMethodNode != null) { if (interpolationMethodNode.Attributes["href"] != null || interpolationMethodNode.Attributes["id"] != null) { if (interpolationMethodNode.Attributes["id"] != null) { interpolationMethodIDRef_ = interpolationMethodNode.Attributes["id"].Value; InterpolationMethod ob = new InterpolationMethod(interpolationMethodNode); IDManager.SetID(interpolationMethodIDRef_, ob); } else if (interpolationMethodNode.Attributes["href"] != null) { interpolationMethodIDRef_ = interpolationMethodNode.Attributes["href"].Value; } else { interpolationMethod_ = new InterpolationMethod(interpolationMethodNode); } } else { interpolationMethod_ = new InterpolationMethod(interpolationMethodNode); } } XmlNode extrapolationPermittedNode = xmlNode.SelectSingleNode("extrapolationPermitted"); if (extrapolationPermittedNode != null) { if (extrapolationPermittedNode.Attributes["href"] != null || extrapolationPermittedNode.Attributes["id"] != null) { if (extrapolationPermittedNode.Attributes["id"] != null) { extrapolationPermittedIDRef_ = extrapolationPermittedNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(extrapolationPermittedNode); IDManager.SetID(extrapolationPermittedIDRef_, ob); } else if (extrapolationPermittedNode.Attributes["href"] != null) { extrapolationPermittedIDRef_ = extrapolationPermittedNode.Attributes["href"].Value; } else { extrapolationPermitted_ = new XsdTypeBoolean(extrapolationPermittedNode); } } else { extrapolationPermitted_ = new XsdTypeBoolean(extrapolationPermittedNode); } } XmlNodeList pointNodeList = xmlNode.SelectNodes("point"); if (pointNodeList != null) { this.point_ = new List <TermPoint>(); foreach (XmlNode item in pointNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { pointIDRef_ = item.Attributes["id"].Value; point_.Add(new TermPoint(item)); IDManager.SetID(pointIDRef_, point_[point_.Count - 1]); } else if (item.Attributes["href"] != null) { pointIDRef_ = item.Attributes["href"].Value; } else { point_.Add(new TermPoint(item)); } } else { point_.Add(new TermPoint(item)); } } } }
public InterestCalculation(XmlNode xmlNode) : base(xmlNode) { XmlNode dayCountFractionNode = xmlNode.SelectSingleNode("dayCountFraction"); if (dayCountFractionNode != null) { if (dayCountFractionNode.Attributes["href"] != null || dayCountFractionNode.Attributes["id"] != null) { if (dayCountFractionNode.Attributes["id"] != null) { dayCountFractionIDRef_ = dayCountFractionNode.Attributes["id"].Value; DayCountFraction ob = new DayCountFraction(dayCountFractionNode); IDManager.SetID(dayCountFractionIDRef_, ob); } else if (dayCountFractionNode.Attributes["href"] != null) { dayCountFractionIDRef_ = dayCountFractionNode.Attributes["href"].Value; } else { dayCountFraction_ = new DayCountFraction(dayCountFractionNode); } } else { dayCountFraction_ = new DayCountFraction(dayCountFractionNode); } } XmlNode compoundingNode = xmlNode.SelectSingleNode("compounding"); if (compoundingNode != null) { if (compoundingNode.Attributes["href"] != null || compoundingNode.Attributes["id"] != null) { if (compoundingNode.Attributes["id"] != null) { compoundingIDRef_ = compoundingNode.Attributes["id"].Value; Compounding ob = new Compounding(compoundingNode); IDManager.SetID(compoundingIDRef_, ob); } else if (compoundingNode.Attributes["href"] != null) { compoundingIDRef_ = compoundingNode.Attributes["href"].Value; } else { compounding_ = new Compounding(compoundingNode); } } else { compounding_ = new Compounding(compoundingNode); } } XmlNode interpolationMethodNode = xmlNode.SelectSingleNode("interpolationMethod"); if (interpolationMethodNode != null) { if (interpolationMethodNode.Attributes["href"] != null || interpolationMethodNode.Attributes["id"] != null) { if (interpolationMethodNode.Attributes["id"] != null) { interpolationMethodIDRef_ = interpolationMethodNode.Attributes["id"].Value; InterpolationMethod ob = new InterpolationMethod(interpolationMethodNode); IDManager.SetID(interpolationMethodIDRef_, ob); } else if (interpolationMethodNode.Attributes["href"] != null) { interpolationMethodIDRef_ = interpolationMethodNode.Attributes["href"].Value; } else { interpolationMethod_ = new InterpolationMethod(interpolationMethodNode); } } else { interpolationMethod_ = new InterpolationMethod(interpolationMethodNode); } } XmlNode interpolationPeriodNode = xmlNode.SelectSingleNode("interpolationPeriod"); if (interpolationPeriodNode != null) { if (interpolationPeriodNode.Attributes["href"] != null || interpolationPeriodNode.Attributes["id"] != null) { if (interpolationPeriodNode.Attributes["id"] != null) { interpolationPeriodIDRef_ = interpolationPeriodNode.Attributes["id"].Value; InterpolationPeriodEnum ob = new InterpolationPeriodEnum(interpolationPeriodNode); IDManager.SetID(interpolationPeriodIDRef_, ob); } else if (interpolationPeriodNode.Attributes["href"] != null) { interpolationPeriodIDRef_ = interpolationPeriodNode.Attributes["href"].Value; } else { interpolationPeriod_ = new InterpolationPeriodEnum(interpolationPeriodNode); } } else { interpolationPeriod_ = new InterpolationPeriodEnum(interpolationPeriodNode); } } }
public InflationRateCalculation(XmlNode xmlNode) : base(xmlNode) { XmlNodeList inflationLagNodeList = xmlNode.SelectNodes("inflationLag"); if (inflationLagNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in inflationLagNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { inflationLagIDRef = item.Attributes["id"].Name; Offset ob = Offset(); IDManager.SetID(inflationLagIDRef, ob); } else if (item.Attributes.ToString() == "href") { inflationLagIDRef = item.Attributes["href"].Name; } else { inflationLag = new Offset(item); } } } XmlNodeList indexSourceNodeList = xmlNode.SelectNodes("indexSource"); if (indexSourceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in indexSourceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { indexSourceIDRef = item.Attributes["id"].Name; RateSourcePage ob = RateSourcePage(); IDManager.SetID(indexSourceIDRef, ob); } else if (item.Attributes.ToString() == "href") { indexSourceIDRef = item.Attributes["href"].Name; } else { indexSource = new RateSourcePage(item); } } } XmlNodeList mainPublicationNodeList = xmlNode.SelectNodes("mainPublication"); if (mainPublicationNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in mainPublicationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { mainPublicationIDRef = item.Attributes["id"].Name; MainPublication ob = MainPublication(); IDManager.SetID(mainPublicationIDRef, ob); } else if (item.Attributes.ToString() == "href") { mainPublicationIDRef = item.Attributes["href"].Name; } else { mainPublication = new MainPublication(item); } } } XmlNodeList interpolationMethodNodeList = xmlNode.SelectNodes("interpolationMethod"); if (interpolationMethodNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in interpolationMethodNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { interpolationMethodIDRef = item.Attributes["id"].Name; InterpolationMethod ob = InterpolationMethod(); IDManager.SetID(interpolationMethodIDRef, ob); } else if (item.Attributes.ToString() == "href") { interpolationMethodIDRef = item.Attributes["href"].Name; } else { interpolationMethod = new InterpolationMethod(item); } } } XmlNodeList initialIndexLevelNodeList = xmlNode.SelectNodes("initialIndexLevel"); if (initialIndexLevelNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in initialIndexLevelNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { initialIndexLevelIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(initialIndexLevelIDRef, ob); } else if (item.Attributes.ToString() == "href") { initialIndexLevelIDRef = item.Attributes["href"].Name; } else { initialIndexLevel = new XsdTypeDecimal(item); } } } XmlNodeList fallbackBondApplicableNodeList = xmlNode.SelectNodes("fallbackBondApplicable"); if (fallbackBondApplicableNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in fallbackBondApplicableNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { fallbackBondApplicableIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(fallbackBondApplicableIDRef, ob); } else if (item.Attributes.ToString() == "href") { fallbackBondApplicableIDRef = item.Attributes["href"].Name; } else { fallbackBondApplicable = new XsdTypeBoolean(item); } } } }
public InflationRateCalculation(XmlNode xmlNode) : base(xmlNode) { XmlNodeList inflationLagNodeList = xmlNode.SelectNodes("inflationLag"); if (inflationLagNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in inflationLagNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { inflationLagIDRef = item.Attributes["id"].Name; Offset ob = Offset(); IDManager.SetID(inflationLagIDRef, ob); } else if (item.Attributes.ToString() == "href") { inflationLagIDRef = item.Attributes["href"].Name; } else { inflationLag = new Offset(item); } } } XmlNodeList indexSourceNodeList = xmlNode.SelectNodes("indexSource"); if (indexSourceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in indexSourceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { indexSourceIDRef = item.Attributes["id"].Name; RateSourcePage ob = RateSourcePage(); IDManager.SetID(indexSourceIDRef, ob); } else if (item.Attributes.ToString() == "href") { indexSourceIDRef = item.Attributes["href"].Name; } else { indexSource = new RateSourcePage(item); } } } XmlNodeList mainPublicationNodeList = xmlNode.SelectNodes("mainPublication"); if (mainPublicationNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in mainPublicationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { mainPublicationIDRef = item.Attributes["id"].Name; MainPublication ob = MainPublication(); IDManager.SetID(mainPublicationIDRef, ob); } else if (item.Attributes.ToString() == "href") { mainPublicationIDRef = item.Attributes["href"].Name; } else { mainPublication = new MainPublication(item); } } } XmlNodeList interpolationMethodNodeList = xmlNode.SelectNodes("interpolationMethod"); if (interpolationMethodNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in interpolationMethodNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { interpolationMethodIDRef = item.Attributes["id"].Name; InterpolationMethod ob = InterpolationMethod(); IDManager.SetID(interpolationMethodIDRef, ob); } else if (item.Attributes.ToString() == "href") { interpolationMethodIDRef = item.Attributes["href"].Name; } else { interpolationMethod = new InterpolationMethod(item); } } } XmlNodeList initialIndexLevelNodeList = xmlNode.SelectNodes("initialIndexLevel"); if (initialIndexLevelNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in initialIndexLevelNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { initialIndexLevelIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(initialIndexLevelIDRef, ob); } else if (item.Attributes.ToString() == "href") { initialIndexLevelIDRef = item.Attributes["href"].Name; } else { initialIndexLevel = new XsdTypeDecimal(item); } } } XmlNodeList fallbackBondApplicableNodeList = xmlNode.SelectNodes("fallbackBondApplicable"); if (fallbackBondApplicableNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in fallbackBondApplicableNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { fallbackBondApplicableIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(fallbackBondApplicableIDRef, ob); } else if (item.Attributes.ToString() == "href") { fallbackBondApplicableIDRef = item.Attributes["href"].Name; } else { fallbackBondApplicable = new XsdTypeBoolean(item); } } } }
public TermCurve(XmlNode xmlNode) { XmlNodeList interpolationMethodNodeList = xmlNode.SelectNodes("interpolationMethod"); if (interpolationMethodNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in interpolationMethodNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { interpolationMethodIDRef = item.Attributes["id"].Name; InterpolationMethod ob = InterpolationMethod(); IDManager.SetID(interpolationMethodIDRef, ob); } else if (item.Attributes.ToString() == "href") { interpolationMethodIDRef = item.Attributes["href"].Name; } else { interpolationMethod = new InterpolationMethod(item); } } } XmlNodeList extrapolationPermittedNodeList = xmlNode.SelectNodes("extrapolationPermitted"); if (extrapolationPermittedNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in extrapolationPermittedNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { extrapolationPermittedIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(extrapolationPermittedIDRef, ob); } else if (item.Attributes.ToString() == "href") { extrapolationPermittedIDRef = item.Attributes["href"].Name; } else { extrapolationPermitted = new XsdTypeBoolean(item); } } } XmlNodeList pointNodeList = xmlNode.SelectNodes("point"); foreach (XmlNode item in pointNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { pointIDRef = item.Attributes["id"].Name; List <TermPoint> ob = new List <TermPoint>(); ob.Add(new TermPoint(item)); IDManager.SetID(pointIDRef, ob); } else if (item.Attributes.ToString() == "href") { pointIDRef = item.Attributes["href"].Name; } else { point.Add(new TermPoint(item)); } } } }
public InterestCalculation(XmlNode xmlNode) : base(xmlNode) { XmlNodeList dayCountFractionNodeList = xmlNode.SelectNodes("dayCountFraction"); if (dayCountFractionNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in dayCountFractionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { dayCountFractionIDRef = item.Attributes["id"].Name; DayCountFraction ob = DayCountFraction(); IDManager.SetID(dayCountFractionIDRef, ob); } else if (item.Attributes.ToString() == "href") { dayCountFractionIDRef = item.Attributes["href"].Name; } else { dayCountFraction = new DayCountFraction(item); } } } XmlNodeList compoundingNodeList = xmlNode.SelectNodes("compounding"); if (compoundingNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in compoundingNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { compoundingIDRef = item.Attributes["id"].Name; Compounding ob = Compounding(); IDManager.SetID(compoundingIDRef, ob); } else if (item.Attributes.ToString() == "href") { compoundingIDRef = item.Attributes["href"].Name; } else { compounding = new Compounding(item); } } } XmlNodeList interpolationMethodNodeList = xmlNode.SelectNodes("interpolationMethod"); if (interpolationMethodNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in interpolationMethodNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { interpolationMethodIDRef = item.Attributes["id"].Name; InterpolationMethod ob = InterpolationMethod(); IDManager.SetID(interpolationMethodIDRef, ob); } else if (item.Attributes.ToString() == "href") { interpolationMethodIDRef = item.Attributes["href"].Name; } else { interpolationMethod = new InterpolationMethod(item); } } } XmlNodeList interpolationPeriodNodeList = xmlNode.SelectNodes("interpolationPeriod"); if (interpolationPeriodNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in interpolationPeriodNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { interpolationPeriodIDRef = item.Attributes["id"].Name; InterpolationPeriodEnum ob = InterpolationPeriodEnum(); IDManager.SetID(interpolationPeriodIDRef, ob); } else if (item.Attributes.ToString() == "href") { interpolationPeriodIDRef = item.Attributes["href"].Name; } else { interpolationPeriod = new InterpolationPeriodEnum(item); } } } }
public InterestCalculation(XmlNode xmlNode) : base(xmlNode) { XmlNodeList dayCountFractionNodeList = xmlNode.SelectNodes("dayCountFraction"); if (dayCountFractionNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in dayCountFractionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { dayCountFractionIDRef = item.Attributes["id"].Name; DayCountFraction ob = DayCountFraction(); IDManager.SetID(dayCountFractionIDRef, ob); } else if (item.Attributes.ToString() == "href") { dayCountFractionIDRef = item.Attributes["href"].Name; } else { dayCountFraction = new DayCountFraction(item); } } } XmlNodeList compoundingNodeList = xmlNode.SelectNodes("compounding"); if (compoundingNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in compoundingNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { compoundingIDRef = item.Attributes["id"].Name; Compounding ob = Compounding(); IDManager.SetID(compoundingIDRef, ob); } else if (item.Attributes.ToString() == "href") { compoundingIDRef = item.Attributes["href"].Name; } else { compounding = new Compounding(item); } } } XmlNodeList interpolationMethodNodeList = xmlNode.SelectNodes("interpolationMethod"); if (interpolationMethodNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in interpolationMethodNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { interpolationMethodIDRef = item.Attributes["id"].Name; InterpolationMethod ob = InterpolationMethod(); IDManager.SetID(interpolationMethodIDRef, ob); } else if (item.Attributes.ToString() == "href") { interpolationMethodIDRef = item.Attributes["href"].Name; } else { interpolationMethod = new InterpolationMethod(item); } } } XmlNodeList interpolationPeriodNodeList = xmlNode.SelectNodes("interpolationPeriod"); if (interpolationPeriodNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in interpolationPeriodNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { interpolationPeriodIDRef = item.Attributes["id"].Name; InterpolationPeriodEnum ob = InterpolationPeriodEnum(); IDManager.SetID(interpolationPeriodIDRef, ob); } else if (item.Attributes.ToString() == "href") { interpolationPeriodIDRef = item.Attributes["href"].Name; } else { interpolationPeriod = new InterpolationPeriodEnum(item); } } } }
public InflationRateCalculation(XmlNode xmlNode) : base(xmlNode) { XmlNode inflationLagNode = xmlNode.SelectSingleNode("inflationLag"); if (inflationLagNode != null) { if (inflationLagNode.Attributes["href"] != null || inflationLagNode.Attributes["id"] != null) { if (inflationLagNode.Attributes["id"] != null) { inflationLagIDRef_ = inflationLagNode.Attributes["id"].Value; Offset ob = new Offset(inflationLagNode); IDManager.SetID(inflationLagIDRef_, ob); } else if (inflationLagNode.Attributes["href"] != null) { inflationLagIDRef_ = inflationLagNode.Attributes["href"].Value; } else { inflationLag_ = new Offset(inflationLagNode); } } else { inflationLag_ = new Offset(inflationLagNode); } } XmlNode indexSourceNode = xmlNode.SelectSingleNode("indexSource"); if (indexSourceNode != null) { if (indexSourceNode.Attributes["href"] != null || indexSourceNode.Attributes["id"] != null) { if (indexSourceNode.Attributes["id"] != null) { indexSourceIDRef_ = indexSourceNode.Attributes["id"].Value; RateSourcePage ob = new RateSourcePage(indexSourceNode); IDManager.SetID(indexSourceIDRef_, ob); } else if (indexSourceNode.Attributes["href"] != null) { indexSourceIDRef_ = indexSourceNode.Attributes["href"].Value; } else { indexSource_ = new RateSourcePage(indexSourceNode); } } else { indexSource_ = new RateSourcePage(indexSourceNode); } } XmlNode mainPublicationNode = xmlNode.SelectSingleNode("mainPublication"); if (mainPublicationNode != null) { if (mainPublicationNode.Attributes["href"] != null || mainPublicationNode.Attributes["id"] != null) { if (mainPublicationNode.Attributes["id"] != null) { mainPublicationIDRef_ = mainPublicationNode.Attributes["id"].Value; MainPublication ob = new MainPublication(mainPublicationNode); IDManager.SetID(mainPublicationIDRef_, ob); } else if (mainPublicationNode.Attributes["href"] != null) { mainPublicationIDRef_ = mainPublicationNode.Attributes["href"].Value; } else { mainPublication_ = new MainPublication(mainPublicationNode); } } else { mainPublication_ = new MainPublication(mainPublicationNode); } } XmlNode interpolationMethodNode = xmlNode.SelectSingleNode("interpolationMethod"); if (interpolationMethodNode != null) { if (interpolationMethodNode.Attributes["href"] != null || interpolationMethodNode.Attributes["id"] != null) { if (interpolationMethodNode.Attributes["id"] != null) { interpolationMethodIDRef_ = interpolationMethodNode.Attributes["id"].Value; InterpolationMethod ob = new InterpolationMethod(interpolationMethodNode); IDManager.SetID(interpolationMethodIDRef_, ob); } else if (interpolationMethodNode.Attributes["href"] != null) { interpolationMethodIDRef_ = interpolationMethodNode.Attributes["href"].Value; } else { interpolationMethod_ = new InterpolationMethod(interpolationMethodNode); } } else { interpolationMethod_ = new InterpolationMethod(interpolationMethodNode); } } XmlNode initialIndexLevelNode = xmlNode.SelectSingleNode("initialIndexLevel"); if (initialIndexLevelNode != null) { if (initialIndexLevelNode.Attributes["href"] != null || initialIndexLevelNode.Attributes["id"] != null) { if (initialIndexLevelNode.Attributes["id"] != null) { initialIndexLevelIDRef_ = initialIndexLevelNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(initialIndexLevelNode); IDManager.SetID(initialIndexLevelIDRef_, ob); } else if (initialIndexLevelNode.Attributes["href"] != null) { initialIndexLevelIDRef_ = initialIndexLevelNode.Attributes["href"].Value; } else { initialIndexLevel_ = new XsdTypeDecimal(initialIndexLevelNode); } } else { initialIndexLevel_ = new XsdTypeDecimal(initialIndexLevelNode); } } XmlNode fallbackBondApplicableNode = xmlNode.SelectSingleNode("fallbackBondApplicable"); if (fallbackBondApplicableNode != null) { if (fallbackBondApplicableNode.Attributes["href"] != null || fallbackBondApplicableNode.Attributes["id"] != null) { if (fallbackBondApplicableNode.Attributes["id"] != null) { fallbackBondApplicableIDRef_ = fallbackBondApplicableNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(fallbackBondApplicableNode); IDManager.SetID(fallbackBondApplicableIDRef_, ob); } else if (fallbackBondApplicableNode.Attributes["href"] != null) { fallbackBondApplicableIDRef_ = fallbackBondApplicableNode.Attributes["href"].Value; } else { fallbackBondApplicable_ = new XsdTypeBoolean(fallbackBondApplicableNode); } } else { fallbackBondApplicable_ = new XsdTypeBoolean(fallbackBondApplicableNode); } } }