public FxAverageRateObservationSchedule(XmlNode xmlNode) { XmlNode startDateNode = xmlNode.SelectSingleNode("startDate"); if (startDateNode != null) { if (startDateNode.Attributes["href"] != null || startDateNode.Attributes["id"] != null) { if (startDateNode.Attributes["id"] != null) { startDateIDRef_ = startDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(startDateNode); IDManager.SetID(startDateIDRef_, ob); } else if (startDateNode.Attributes["href"] != null) { startDateIDRef_ = startDateNode.Attributes["href"].Value; } else { startDate_ = new XsdTypeDate(startDateNode); } } else { startDate_ = new XsdTypeDate(startDateNode); } } XmlNode endDateNode = xmlNode.SelectSingleNode("endDate"); if (endDateNode != null) { if (endDateNode.Attributes["href"] != null || endDateNode.Attributes["id"] != null) { if (endDateNode.Attributes["id"] != null) { endDateIDRef_ = endDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(endDateNode); IDManager.SetID(endDateIDRef_, ob); } else if (endDateNode.Attributes["href"] != null) { endDateIDRef_ = endDateNode.Attributes["href"].Value; } else { endDate_ = new XsdTypeDate(endDateNode); } } else { endDate_ = new XsdTypeDate(endDateNode); } } XmlNode calculationPeriodFrequencyNode = xmlNode.SelectSingleNode("calculationPeriodFrequency"); if (calculationPeriodFrequencyNode != null) { if (calculationPeriodFrequencyNode.Attributes["href"] != null || calculationPeriodFrequencyNode.Attributes["id"] != null) { if (calculationPeriodFrequencyNode.Attributes["id"] != null) { calculationPeriodFrequencyIDRef_ = calculationPeriodFrequencyNode.Attributes["id"].Value; CalculationPeriodFrequency ob = new CalculationPeriodFrequency(calculationPeriodFrequencyNode); IDManager.SetID(calculationPeriodFrequencyIDRef_, ob); } else if (calculationPeriodFrequencyNode.Attributes["href"] != null) { calculationPeriodFrequencyIDRef_ = calculationPeriodFrequencyNode.Attributes["href"].Value; } else { calculationPeriodFrequency_ = new CalculationPeriodFrequency(calculationPeriodFrequencyNode); } } else { calculationPeriodFrequency_ = new CalculationPeriodFrequency(calculationPeriodFrequencyNode); } } }
public PeriodicDates(XmlNode xmlNode) { XmlNodeList calculationStartDateNodeList = xmlNode.SelectNodes("calculationStartDate"); if (calculationStartDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in calculationStartDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationStartDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(calculationStartDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationStartDateIDRef = item.Attributes["href"].Name; } else { calculationStartDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList calculationEndDateNodeList = xmlNode.SelectNodes("calculationEndDate"); if (calculationEndDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in calculationEndDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationEndDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(calculationEndDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationEndDateIDRef = item.Attributes["href"].Name; } else { calculationEndDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList calculationPeriodFrequencyNodeList = xmlNode.SelectNodes("calculationPeriodFrequency"); if (calculationPeriodFrequencyNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in calculationPeriodFrequencyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationPeriodFrequencyIDRef = item.Attributes["id"].Name; CalculationPeriodFrequency ob = CalculationPeriodFrequency(); IDManager.SetID(calculationPeriodFrequencyIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationPeriodFrequencyIDRef = item.Attributes["href"].Name; } else { calculationPeriodFrequency = new CalculationPeriodFrequency(item); } } } XmlNodeList calculationPeriodDatesAdjustmentsNodeList = xmlNode.SelectNodes("calculationPeriodDatesAdjustments"); if (calculationPeriodDatesAdjustmentsNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in calculationPeriodDatesAdjustmentsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationPeriodDatesAdjustmentsIDRef = item.Attributes["id"].Name; BusinessDayAdjustments ob = BusinessDayAdjustments(); IDManager.SetID(calculationPeriodDatesAdjustmentsIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationPeriodDatesAdjustmentsIDRef = item.Attributes["href"].Name; } else { calculationPeriodDatesAdjustments = new BusinessDayAdjustments(item); } } } }
public PeriodicDates(XmlNode xmlNode) { XmlNodeList calculationStartDateNodeList = xmlNode.SelectNodes("calculationStartDate"); if (calculationStartDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in calculationStartDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationStartDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(calculationStartDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationStartDateIDRef = item.Attributes["href"].Name; } else { calculationStartDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList calculationEndDateNodeList = xmlNode.SelectNodes("calculationEndDate"); if (calculationEndDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in calculationEndDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationEndDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(calculationEndDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationEndDateIDRef = item.Attributes["href"].Name; } else { calculationEndDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList calculationPeriodFrequencyNodeList = xmlNode.SelectNodes("calculationPeriodFrequency"); if (calculationPeriodFrequencyNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in calculationPeriodFrequencyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationPeriodFrequencyIDRef = item.Attributes["id"].Name; CalculationPeriodFrequency ob = CalculationPeriodFrequency(); IDManager.SetID(calculationPeriodFrequencyIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationPeriodFrequencyIDRef = item.Attributes["href"].Name; } else { calculationPeriodFrequency = new CalculationPeriodFrequency(item); } } } XmlNodeList calculationPeriodDatesAdjustmentsNodeList = xmlNode.SelectNodes("calculationPeriodDatesAdjustments"); if (calculationPeriodDatesAdjustmentsNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in calculationPeriodDatesAdjustmentsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationPeriodDatesAdjustmentsIDRef = item.Attributes["id"].Name; BusinessDayAdjustments ob = BusinessDayAdjustments(); IDManager.SetID(calculationPeriodDatesAdjustmentsIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationPeriodDatesAdjustmentsIDRef = item.Attributes["href"].Name; } else { calculationPeriodDatesAdjustments = new BusinessDayAdjustments(item); } } } }
public CalculationPeriodDates(XmlNode xmlNode) { XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate"); if (effectiveDateNode != null) { if (effectiveDateNode.Attributes["href"] != null || effectiveDateNode.Attributes["id"] != null) { if (effectiveDateNode.Attributes["id"] != null) { effectiveDateIDRef_ = effectiveDateNode.Attributes["id"].Value; AdjustableDate ob = new AdjustableDate(effectiveDateNode); IDManager.SetID(effectiveDateIDRef_, ob); } else if (effectiveDateNode.Attributes["href"] != null) { effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value; } else { effectiveDate_ = new AdjustableDate(effectiveDateNode); } } else { effectiveDate_ = new AdjustableDate(effectiveDateNode); } } XmlNode relativeEffectiveDateNode = xmlNode.SelectSingleNode("relativeEffectiveDate"); if (relativeEffectiveDateNode != null) { if (relativeEffectiveDateNode.Attributes["href"] != null || relativeEffectiveDateNode.Attributes["id"] != null) { if (relativeEffectiveDateNode.Attributes["id"] != null) { relativeEffectiveDateIDRef_ = relativeEffectiveDateNode.Attributes["id"].Value; AdjustedRelativeDateOffset ob = new AdjustedRelativeDateOffset(relativeEffectiveDateNode); IDManager.SetID(relativeEffectiveDateIDRef_, ob); } else if (relativeEffectiveDateNode.Attributes["href"] != null) { relativeEffectiveDateIDRef_ = relativeEffectiveDateNode.Attributes["href"].Value; } else { relativeEffectiveDate_ = new AdjustedRelativeDateOffset(relativeEffectiveDateNode); } } else { relativeEffectiveDate_ = new AdjustedRelativeDateOffset(relativeEffectiveDateNode); } } XmlNode terminationDateNode = xmlNode.SelectSingleNode("terminationDate"); if (terminationDateNode != null) { if (terminationDateNode.Attributes["href"] != null || terminationDateNode.Attributes["id"] != null) { if (terminationDateNode.Attributes["id"] != null) { terminationDateIDRef_ = terminationDateNode.Attributes["id"].Value; AdjustableDate ob = new AdjustableDate(terminationDateNode); IDManager.SetID(terminationDateIDRef_, ob); } else if (terminationDateNode.Attributes["href"] != null) { terminationDateIDRef_ = terminationDateNode.Attributes["href"].Value; } else { terminationDate_ = new AdjustableDate(terminationDateNode); } } else { terminationDate_ = new AdjustableDate(terminationDateNode); } } XmlNode relativeTerminationDateNode = xmlNode.SelectSingleNode("relativeTerminationDate"); if (relativeTerminationDateNode != null) { if (relativeTerminationDateNode.Attributes["href"] != null || relativeTerminationDateNode.Attributes["id"] != null) { if (relativeTerminationDateNode.Attributes["id"] != null) { relativeTerminationDateIDRef_ = relativeTerminationDateNode.Attributes["id"].Value; RelativeDateOffset ob = new RelativeDateOffset(relativeTerminationDateNode); IDManager.SetID(relativeTerminationDateIDRef_, ob); } else if (relativeTerminationDateNode.Attributes["href"] != null) { relativeTerminationDateIDRef_ = relativeTerminationDateNode.Attributes["href"].Value; } else { relativeTerminationDate_ = new RelativeDateOffset(relativeTerminationDateNode); } } else { relativeTerminationDate_ = new RelativeDateOffset(relativeTerminationDateNode); } } XmlNode calculationPeriodDatesAdjustmentsNode = xmlNode.SelectSingleNode("calculationPeriodDatesAdjustments"); if (calculationPeriodDatesAdjustmentsNode != null) { if (calculationPeriodDatesAdjustmentsNode.Attributes["href"] != null || calculationPeriodDatesAdjustmentsNode.Attributes["id"] != null) { if (calculationPeriodDatesAdjustmentsNode.Attributes["id"] != null) { calculationPeriodDatesAdjustmentsIDRef_ = calculationPeriodDatesAdjustmentsNode.Attributes["id"].Value; BusinessDayAdjustments ob = new BusinessDayAdjustments(calculationPeriodDatesAdjustmentsNode); IDManager.SetID(calculationPeriodDatesAdjustmentsIDRef_, ob); } else if (calculationPeriodDatesAdjustmentsNode.Attributes["href"] != null) { calculationPeriodDatesAdjustmentsIDRef_ = calculationPeriodDatesAdjustmentsNode.Attributes["href"].Value; } else { calculationPeriodDatesAdjustments_ = new BusinessDayAdjustments(calculationPeriodDatesAdjustmentsNode); } } else { calculationPeriodDatesAdjustments_ = new BusinessDayAdjustments(calculationPeriodDatesAdjustmentsNode); } } XmlNode firstPeriodStartDateNode = xmlNode.SelectSingleNode("firstPeriodStartDate"); if (firstPeriodStartDateNode != null) { if (firstPeriodStartDateNode.Attributes["href"] != null || firstPeriodStartDateNode.Attributes["id"] != null) { if (firstPeriodStartDateNode.Attributes["id"] != null) { firstPeriodStartDateIDRef_ = firstPeriodStartDateNode.Attributes["id"].Value; AdjustableDate ob = new AdjustableDate(firstPeriodStartDateNode); IDManager.SetID(firstPeriodStartDateIDRef_, ob); } else if (firstPeriodStartDateNode.Attributes["href"] != null) { firstPeriodStartDateIDRef_ = firstPeriodStartDateNode.Attributes["href"].Value; } else { firstPeriodStartDate_ = new AdjustableDate(firstPeriodStartDateNode); } } else { firstPeriodStartDate_ = new AdjustableDate(firstPeriodStartDateNode); } } XmlNode firstRegularPeriodStartDateNode = xmlNode.SelectSingleNode("firstRegularPeriodStartDate"); if (firstRegularPeriodStartDateNode != null) { if (firstRegularPeriodStartDateNode.Attributes["href"] != null || firstRegularPeriodStartDateNode.Attributes["id"] != null) { if (firstRegularPeriodStartDateNode.Attributes["id"] != null) { firstRegularPeriodStartDateIDRef_ = firstRegularPeriodStartDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(firstRegularPeriodStartDateNode); IDManager.SetID(firstRegularPeriodStartDateIDRef_, ob); } else if (firstRegularPeriodStartDateNode.Attributes["href"] != null) { firstRegularPeriodStartDateIDRef_ = firstRegularPeriodStartDateNode.Attributes["href"].Value; } else { firstRegularPeriodStartDate_ = new XsdTypeDate(firstRegularPeriodStartDateNode); } } else { firstRegularPeriodStartDate_ = new XsdTypeDate(firstRegularPeriodStartDateNode); } } XmlNode firstCompoundingPeriodEndDateNode = xmlNode.SelectSingleNode("firstCompoundingPeriodEndDate"); if (firstCompoundingPeriodEndDateNode != null) { if (firstCompoundingPeriodEndDateNode.Attributes["href"] != null || firstCompoundingPeriodEndDateNode.Attributes["id"] != null) { if (firstCompoundingPeriodEndDateNode.Attributes["id"] != null) { firstCompoundingPeriodEndDateIDRef_ = firstCompoundingPeriodEndDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(firstCompoundingPeriodEndDateNode); IDManager.SetID(firstCompoundingPeriodEndDateIDRef_, ob); } else if (firstCompoundingPeriodEndDateNode.Attributes["href"] != null) { firstCompoundingPeriodEndDateIDRef_ = firstCompoundingPeriodEndDateNode.Attributes["href"].Value; } else { firstCompoundingPeriodEndDate_ = new XsdTypeDate(firstCompoundingPeriodEndDateNode); } } else { firstCompoundingPeriodEndDate_ = new XsdTypeDate(firstCompoundingPeriodEndDateNode); } } XmlNode lastRegularPeriodEndDateNode = xmlNode.SelectSingleNode("lastRegularPeriodEndDate"); if (lastRegularPeriodEndDateNode != null) { if (lastRegularPeriodEndDateNode.Attributes["href"] != null || lastRegularPeriodEndDateNode.Attributes["id"] != null) { if (lastRegularPeriodEndDateNode.Attributes["id"] != null) { lastRegularPeriodEndDateIDRef_ = lastRegularPeriodEndDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(lastRegularPeriodEndDateNode); IDManager.SetID(lastRegularPeriodEndDateIDRef_, ob); } else if (lastRegularPeriodEndDateNode.Attributes["href"] != null) { lastRegularPeriodEndDateIDRef_ = lastRegularPeriodEndDateNode.Attributes["href"].Value; } else { lastRegularPeriodEndDate_ = new XsdTypeDate(lastRegularPeriodEndDateNode); } } else { lastRegularPeriodEndDate_ = new XsdTypeDate(lastRegularPeriodEndDateNode); } } XmlNode stubPeriodTypeNode = xmlNode.SelectSingleNode("stubPeriodType"); if (stubPeriodTypeNode != null) { if (stubPeriodTypeNode.Attributes["href"] != null || stubPeriodTypeNode.Attributes["id"] != null) { if (stubPeriodTypeNode.Attributes["id"] != null) { stubPeriodTypeIDRef_ = stubPeriodTypeNode.Attributes["id"].Value; StubPeriodTypeEnum ob = new StubPeriodTypeEnum(stubPeriodTypeNode); IDManager.SetID(stubPeriodTypeIDRef_, ob); } else if (stubPeriodTypeNode.Attributes["href"] != null) { stubPeriodTypeIDRef_ = stubPeriodTypeNode.Attributes["href"].Value; } else { stubPeriodType_ = new StubPeriodTypeEnum(stubPeriodTypeNode); } } else { stubPeriodType_ = new StubPeriodTypeEnum(stubPeriodTypeNode); } } XmlNode calculationPeriodFrequencyNode = xmlNode.SelectSingleNode("calculationPeriodFrequency"); if (calculationPeriodFrequencyNode != null) { if (calculationPeriodFrequencyNode.Attributes["href"] != null || calculationPeriodFrequencyNode.Attributes["id"] != null) { if (calculationPeriodFrequencyNode.Attributes["id"] != null) { calculationPeriodFrequencyIDRef_ = calculationPeriodFrequencyNode.Attributes["id"].Value; CalculationPeriodFrequency ob = new CalculationPeriodFrequency(calculationPeriodFrequencyNode); IDManager.SetID(calculationPeriodFrequencyIDRef_, ob); } else if (calculationPeriodFrequencyNode.Attributes["href"] != null) { calculationPeriodFrequencyIDRef_ = calculationPeriodFrequencyNode.Attributes["href"].Value; } else { calculationPeriodFrequency_ = new CalculationPeriodFrequency(calculationPeriodFrequencyNode); } } else { calculationPeriodFrequency_ = new CalculationPeriodFrequency(calculationPeriodFrequencyNode); } } }
public AveragingSchedule(XmlNode xmlNode) { XmlNode startDateNode = xmlNode.SelectSingleNode("startDate"); if (startDateNode != null) { if (startDateNode.Attributes["href"] != null || startDateNode.Attributes["id"] != null) { if (startDateNode.Attributes["id"] != null) { startDateIDRef_ = startDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(startDateNode); IDManager.SetID(startDateIDRef_, ob); } else if (startDateNode.Attributes["href"] != null) { startDateIDRef_ = startDateNode.Attributes["href"].Value; } else { startDate_ = new XsdTypeDate(startDateNode); } } else { startDate_ = new XsdTypeDate(startDateNode); } } XmlNode endDateNode = xmlNode.SelectSingleNode("endDate"); if (endDateNode != null) { if (endDateNode.Attributes["href"] != null || endDateNode.Attributes["id"] != null) { if (endDateNode.Attributes["id"] != null) { endDateIDRef_ = endDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(endDateNode); IDManager.SetID(endDateIDRef_, ob); } else if (endDateNode.Attributes["href"] != null) { endDateIDRef_ = endDateNode.Attributes["href"].Value; } else { endDate_ = new XsdTypeDate(endDateNode); } } else { endDate_ = new XsdTypeDate(endDateNode); } } XmlNode averagingPeriodFrequencyNode = xmlNode.SelectSingleNode("averagingPeriodFrequency"); if (averagingPeriodFrequencyNode != null) { if (averagingPeriodFrequencyNode.Attributes["href"] != null || averagingPeriodFrequencyNode.Attributes["id"] != null) { if (averagingPeriodFrequencyNode.Attributes["id"] != null) { averagingPeriodFrequencyIDRef_ = averagingPeriodFrequencyNode.Attributes["id"].Value; CalculationPeriodFrequency ob = new CalculationPeriodFrequency(averagingPeriodFrequencyNode); IDManager.SetID(averagingPeriodFrequencyIDRef_, ob); } else if (averagingPeriodFrequencyNode.Attributes["href"] != null) { averagingPeriodFrequencyIDRef_ = averagingPeriodFrequencyNode.Attributes["href"].Value; } else { averagingPeriodFrequency_ = new CalculationPeriodFrequency(averagingPeriodFrequencyNode); } } else { averagingPeriodFrequency_ = new CalculationPeriodFrequency(averagingPeriodFrequencyNode); } } }
public CalculationPeriodDates(XmlNode xmlNode) { XmlNodeList effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate"); if (effectiveDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in effectiveDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { effectiveDateIDRef = item.Attributes["id"].Name; AdjustableDate ob = AdjustableDate(); IDManager.SetID(effectiveDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { effectiveDateIDRef = item.Attributes["href"].Name; } else { effectiveDate = new AdjustableDate(item); } } } XmlNodeList relativeEffectiveDateNodeList = xmlNode.SelectNodes("relativeEffectiveDate"); if (relativeEffectiveDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in relativeEffectiveDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { relativeEffectiveDateIDRef = item.Attributes["id"].Name; AdjustedRelativeDateOffset ob = AdjustedRelativeDateOffset(); IDManager.SetID(relativeEffectiveDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { relativeEffectiveDateIDRef = item.Attributes["href"].Name; } else { relativeEffectiveDate = new AdjustedRelativeDateOffset(item); } } } XmlNodeList terminationDateNodeList = xmlNode.SelectNodes("terminationDate"); if (terminationDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in terminationDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { terminationDateIDRef = item.Attributes["id"].Name; AdjustableDate ob = AdjustableDate(); IDManager.SetID(terminationDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { terminationDateIDRef = item.Attributes["href"].Name; } else { terminationDate = new AdjustableDate(item); } } } XmlNodeList relativeTerminationDateNodeList = xmlNode.SelectNodes("relativeTerminationDate"); if (relativeTerminationDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in relativeTerminationDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { relativeTerminationDateIDRef = item.Attributes["id"].Name; RelativeDateOffset ob = RelativeDateOffset(); IDManager.SetID(relativeTerminationDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { relativeTerminationDateIDRef = item.Attributes["href"].Name; } else { relativeTerminationDate = new RelativeDateOffset(item); } } } XmlNodeList calculationPeriodDatesAdjustmentsNodeList = xmlNode.SelectNodes("calculationPeriodDatesAdjustments"); if (calculationPeriodDatesAdjustmentsNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in calculationPeriodDatesAdjustmentsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationPeriodDatesAdjustmentsIDRef = item.Attributes["id"].Name; BusinessDayAdjustments ob = BusinessDayAdjustments(); IDManager.SetID(calculationPeriodDatesAdjustmentsIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationPeriodDatesAdjustmentsIDRef = item.Attributes["href"].Name; } else { calculationPeriodDatesAdjustments = new BusinessDayAdjustments(item); } } } XmlNodeList firstPeriodStartDateNodeList = xmlNode.SelectNodes("firstPeriodStartDate"); if (firstPeriodStartDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in firstPeriodStartDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { firstPeriodStartDateIDRef = item.Attributes["id"].Name; AdjustableDate ob = AdjustableDate(); IDManager.SetID(firstPeriodStartDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { firstPeriodStartDateIDRef = item.Attributes["href"].Name; } else { firstPeriodStartDate = new AdjustableDate(item); } } } XmlNodeList firstRegularPeriodStartDateNodeList = xmlNode.SelectNodes("firstRegularPeriodStartDate"); if (firstRegularPeriodStartDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in firstRegularPeriodStartDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { firstRegularPeriodStartDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(firstRegularPeriodStartDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { firstRegularPeriodStartDateIDRef = item.Attributes["href"].Name; } else { firstRegularPeriodStartDate = new XsdTypeDate(item); } } } XmlNodeList firstCompoundingPeriodEndDateNodeList = xmlNode.SelectNodes("firstCompoundingPeriodEndDate"); if (firstCompoundingPeriodEndDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in firstCompoundingPeriodEndDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { firstCompoundingPeriodEndDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(firstCompoundingPeriodEndDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { firstCompoundingPeriodEndDateIDRef = item.Attributes["href"].Name; } else { firstCompoundingPeriodEndDate = new XsdTypeDate(item); } } } XmlNodeList lastRegularPeriodEndDateNodeList = xmlNode.SelectNodes("lastRegularPeriodEndDate"); if (lastRegularPeriodEndDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in lastRegularPeriodEndDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { lastRegularPeriodEndDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(lastRegularPeriodEndDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { lastRegularPeriodEndDateIDRef = item.Attributes["href"].Name; } else { lastRegularPeriodEndDate = new XsdTypeDate(item); } } } XmlNodeList stubPeriodTypeNodeList = xmlNode.SelectNodes("stubPeriodType"); if (stubPeriodTypeNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in stubPeriodTypeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { stubPeriodTypeIDRef = item.Attributes["id"].Name; StubPeriodTypeEnum ob = StubPeriodTypeEnum(); IDManager.SetID(stubPeriodTypeIDRef, ob); } else if (item.Attributes.ToString() == "href") { stubPeriodTypeIDRef = item.Attributes["href"].Name; } else { stubPeriodType = new StubPeriodTypeEnum(item); } } } XmlNodeList calculationPeriodFrequencyNodeList = xmlNode.SelectNodes("calculationPeriodFrequency"); if (calculationPeriodFrequencyNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in calculationPeriodFrequencyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationPeriodFrequencyIDRef = item.Attributes["id"].Name; CalculationPeriodFrequency ob = CalculationPeriodFrequency(); IDManager.SetID(calculationPeriodFrequencyIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationPeriodFrequencyIDRef = item.Attributes["href"].Name; } else { calculationPeriodFrequency = new CalculationPeriodFrequency(item); } } } }
public AveragingSchedule(XmlNode xmlNode) { XmlNodeList startDateNodeList = xmlNode.SelectNodes("startDate"); if (startDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in startDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { startDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(startDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { startDateIDRef = item.Attributes["href"].Name; } else { startDate = new XsdTypeDate(item); } } } XmlNodeList endDateNodeList = xmlNode.SelectNodes("endDate"); if (endDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in endDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { endDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(endDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { endDateIDRef = item.Attributes["href"].Name; } else { endDate = new XsdTypeDate(item); } } } XmlNodeList averagingPeriodFrequencyNodeList = xmlNode.SelectNodes("averagingPeriodFrequency"); if (averagingPeriodFrequencyNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in averagingPeriodFrequencyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { averagingPeriodFrequencyIDRef = item.Attributes["id"].Name; CalculationPeriodFrequency ob = CalculationPeriodFrequency(); IDManager.SetID(averagingPeriodFrequencyIDRef, ob); } else if (item.Attributes.ToString() == "href") { averagingPeriodFrequencyIDRef = item.Attributes["href"].Name; } else { averagingPeriodFrequency = new CalculationPeriodFrequency(item); } } } }
public PeriodicDates(XmlNode xmlNode) { 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; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(calculationStartDateNode); IDManager.SetID(calculationStartDateIDRef_, ob); } else if (calculationStartDateNode.Attributes["href"] != null) { calculationStartDateIDRef_ = calculationStartDateNode.Attributes["href"].Value; } else { calculationStartDate_ = new AdjustableOrRelativeDate(calculationStartDateNode); } } else { calculationStartDate_ = new AdjustableOrRelativeDate(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; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(calculationEndDateNode); IDManager.SetID(calculationEndDateIDRef_, ob); } else if (calculationEndDateNode.Attributes["href"] != null) { calculationEndDateIDRef_ = calculationEndDateNode.Attributes["href"].Value; } else { calculationEndDate_ = new AdjustableOrRelativeDate(calculationEndDateNode); } } else { calculationEndDate_ = new AdjustableOrRelativeDate(calculationEndDateNode); } } XmlNode calculationPeriodFrequencyNode = xmlNode.SelectSingleNode("calculationPeriodFrequency"); if (calculationPeriodFrequencyNode != null) { if (calculationPeriodFrequencyNode.Attributes["href"] != null || calculationPeriodFrequencyNode.Attributes["id"] != null) { if (calculationPeriodFrequencyNode.Attributes["id"] != null) { calculationPeriodFrequencyIDRef_ = calculationPeriodFrequencyNode.Attributes["id"].Value; CalculationPeriodFrequency ob = new CalculationPeriodFrequency(calculationPeriodFrequencyNode); IDManager.SetID(calculationPeriodFrequencyIDRef_, ob); } else if (calculationPeriodFrequencyNode.Attributes["href"] != null) { calculationPeriodFrequencyIDRef_ = calculationPeriodFrequencyNode.Attributes["href"].Value; } else { calculationPeriodFrequency_ = new CalculationPeriodFrequency(calculationPeriodFrequencyNode); } } else { calculationPeriodFrequency_ = new CalculationPeriodFrequency(calculationPeriodFrequencyNode); } } XmlNode calculationPeriodDatesAdjustmentsNode = xmlNode.SelectSingleNode("calculationPeriodDatesAdjustments"); if (calculationPeriodDatesAdjustmentsNode != null) { if (calculationPeriodDatesAdjustmentsNode.Attributes["href"] != null || calculationPeriodDatesAdjustmentsNode.Attributes["id"] != null) { if (calculationPeriodDatesAdjustmentsNode.Attributes["id"] != null) { calculationPeriodDatesAdjustmentsIDRef_ = calculationPeriodDatesAdjustmentsNode.Attributes["id"].Value; BusinessDayAdjustments ob = new BusinessDayAdjustments(calculationPeriodDatesAdjustmentsNode); IDManager.SetID(calculationPeriodDatesAdjustmentsIDRef_, ob); } else if (calculationPeriodDatesAdjustmentsNode.Attributes["href"] != null) { calculationPeriodDatesAdjustmentsIDRef_ = calculationPeriodDatesAdjustmentsNode.Attributes["href"].Value; } else { calculationPeriodDatesAdjustments_ = new BusinessDayAdjustments(calculationPeriodDatesAdjustmentsNode); } } else { calculationPeriodDatesAdjustments_ = new BusinessDayAdjustments(calculationPeriodDatesAdjustmentsNode); } } }
public AveragingSchedule(XmlNode xmlNode) { XmlNodeList startDateNodeList = xmlNode.SelectNodes("startDate"); if (startDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in startDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { startDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(startDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { startDateIDRef = item.Attributes["href"].Name; } else { startDate = new XsdTypeDate(item); } } } XmlNodeList endDateNodeList = xmlNode.SelectNodes("endDate"); if (endDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in endDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { endDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(endDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { endDateIDRef = item.Attributes["href"].Name; } else { endDate = new XsdTypeDate(item); } } } XmlNodeList averagingPeriodFrequencyNodeList = xmlNode.SelectNodes("averagingPeriodFrequency"); if (averagingPeriodFrequencyNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in averagingPeriodFrequencyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { averagingPeriodFrequencyIDRef = item.Attributes["id"].Name; CalculationPeriodFrequency ob = CalculationPeriodFrequency(); IDManager.SetID(averagingPeriodFrequencyIDRef, ob); } else if (item.Attributes.ToString() == "href") { averagingPeriodFrequencyIDRef = item.Attributes["href"].Name; } else { averagingPeriodFrequency = new CalculationPeriodFrequency(item); } } } }
public CalculationPeriodDates(XmlNode xmlNode) { XmlNodeList effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate"); if (effectiveDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in effectiveDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { effectiveDateIDRef = item.Attributes["id"].Name; AdjustableDate ob = AdjustableDate(); IDManager.SetID(effectiveDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { effectiveDateIDRef = item.Attributes["href"].Name; } else { effectiveDate = new AdjustableDate(item); } } } XmlNodeList relativeEffectiveDateNodeList = xmlNode.SelectNodes("relativeEffectiveDate"); if (relativeEffectiveDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in relativeEffectiveDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { relativeEffectiveDateIDRef = item.Attributes["id"].Name; AdjustedRelativeDateOffset ob = AdjustedRelativeDateOffset(); IDManager.SetID(relativeEffectiveDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { relativeEffectiveDateIDRef = item.Attributes["href"].Name; } else { relativeEffectiveDate = new AdjustedRelativeDateOffset(item); } } } XmlNodeList terminationDateNodeList = xmlNode.SelectNodes("terminationDate"); if (terminationDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in terminationDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { terminationDateIDRef = item.Attributes["id"].Name; AdjustableDate ob = AdjustableDate(); IDManager.SetID(terminationDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { terminationDateIDRef = item.Attributes["href"].Name; } else { terminationDate = new AdjustableDate(item); } } } XmlNodeList relativeTerminationDateNodeList = xmlNode.SelectNodes("relativeTerminationDate"); if (relativeTerminationDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in relativeTerminationDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { relativeTerminationDateIDRef = item.Attributes["id"].Name; RelativeDateOffset ob = RelativeDateOffset(); IDManager.SetID(relativeTerminationDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { relativeTerminationDateIDRef = item.Attributes["href"].Name; } else { relativeTerminationDate = new RelativeDateOffset(item); } } } XmlNodeList calculationPeriodDatesAdjustmentsNodeList = xmlNode.SelectNodes("calculationPeriodDatesAdjustments"); if (calculationPeriodDatesAdjustmentsNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in calculationPeriodDatesAdjustmentsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationPeriodDatesAdjustmentsIDRef = item.Attributes["id"].Name; BusinessDayAdjustments ob = BusinessDayAdjustments(); IDManager.SetID(calculationPeriodDatesAdjustmentsIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationPeriodDatesAdjustmentsIDRef = item.Attributes["href"].Name; } else { calculationPeriodDatesAdjustments = new BusinessDayAdjustments(item); } } } XmlNodeList firstPeriodStartDateNodeList = xmlNode.SelectNodes("firstPeriodStartDate"); if (firstPeriodStartDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in firstPeriodStartDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { firstPeriodStartDateIDRef = item.Attributes["id"].Name; AdjustableDate ob = AdjustableDate(); IDManager.SetID(firstPeriodStartDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { firstPeriodStartDateIDRef = item.Attributes["href"].Name; } else { firstPeriodStartDate = new AdjustableDate(item); } } } XmlNodeList firstRegularPeriodStartDateNodeList = xmlNode.SelectNodes("firstRegularPeriodStartDate"); if (firstRegularPeriodStartDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in firstRegularPeriodStartDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { firstRegularPeriodStartDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(firstRegularPeriodStartDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { firstRegularPeriodStartDateIDRef = item.Attributes["href"].Name; } else { firstRegularPeriodStartDate = new XsdTypeDate(item); } } } XmlNodeList firstCompoundingPeriodEndDateNodeList = xmlNode.SelectNodes("firstCompoundingPeriodEndDate"); if (firstCompoundingPeriodEndDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in firstCompoundingPeriodEndDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { firstCompoundingPeriodEndDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(firstCompoundingPeriodEndDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { firstCompoundingPeriodEndDateIDRef = item.Attributes["href"].Name; } else { firstCompoundingPeriodEndDate = new XsdTypeDate(item); } } } XmlNodeList lastRegularPeriodEndDateNodeList = xmlNode.SelectNodes("lastRegularPeriodEndDate"); if (lastRegularPeriodEndDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in lastRegularPeriodEndDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { lastRegularPeriodEndDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(lastRegularPeriodEndDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { lastRegularPeriodEndDateIDRef = item.Attributes["href"].Name; } else { lastRegularPeriodEndDate = new XsdTypeDate(item); } } } XmlNodeList stubPeriodTypeNodeList = xmlNode.SelectNodes("stubPeriodType"); if (stubPeriodTypeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in stubPeriodTypeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { stubPeriodTypeIDRef = item.Attributes["id"].Name; StubPeriodTypeEnum ob = StubPeriodTypeEnum(); IDManager.SetID(stubPeriodTypeIDRef, ob); } else if (item.Attributes.ToString() == "href") { stubPeriodTypeIDRef = item.Attributes["href"].Name; } else { stubPeriodType = new StubPeriodTypeEnum(item); } } } XmlNodeList calculationPeriodFrequencyNodeList = xmlNode.SelectNodes("calculationPeriodFrequency"); if (calculationPeriodFrequencyNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in calculationPeriodFrequencyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationPeriodFrequencyIDRef = item.Attributes["id"].Name; CalculationPeriodFrequency ob = CalculationPeriodFrequency(); IDManager.SetID(calculationPeriodFrequencyIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationPeriodFrequencyIDRef = item.Attributes["href"].Name; } else { calculationPeriodFrequency = new CalculationPeriodFrequency(item); } } } }