public CommodityPhysicalQuantity(XmlNode xmlNode) : base(xmlNode) { XmlNode physicalQuantityNode = xmlNode.SelectSingleNode("physicalQuantity"); if (physicalQuantityNode != null) { if (physicalQuantityNode.Attributes["href"] != null || physicalQuantityNode.Attributes["id"] != null) { if (physicalQuantityNode.Attributes["id"] != null) { physicalQuantityIDRef_ = physicalQuantityNode.Attributes["id"].Value; CommodityNotionalQuantity ob = new CommodityNotionalQuantity(physicalQuantityNode); IDManager.SetID(physicalQuantityIDRef_, ob); } else if (physicalQuantityNode.Attributes["href"] != null) { physicalQuantityIDRef_ = physicalQuantityNode.Attributes["href"].Value; } else { physicalQuantity_ = new CommodityNotionalQuantity(physicalQuantityNode); } } else { physicalQuantity_ = new CommodityNotionalQuantity(physicalQuantityNode); } } XmlNode physicalQuantityScheduleNode = xmlNode.SelectSingleNode("physicalQuantitySchedule"); if (physicalQuantityScheduleNode != null) { if (physicalQuantityScheduleNode.Attributes["href"] != null || physicalQuantityScheduleNode.Attributes["id"] != null) { if (physicalQuantityScheduleNode.Attributes["id"] != null) { physicalQuantityScheduleIDRef_ = physicalQuantityScheduleNode.Attributes["id"].Value; CommodityPhysicalQuantitySchedule ob = new CommodityPhysicalQuantitySchedule(physicalQuantityScheduleNode); IDManager.SetID(physicalQuantityScheduleIDRef_, ob); } else if (physicalQuantityScheduleNode.Attributes["href"] != null) { physicalQuantityScheduleIDRef_ = physicalQuantityScheduleNode.Attributes["href"].Value; } else { physicalQuantitySchedule_ = new CommodityPhysicalQuantitySchedule(physicalQuantityScheduleNode); } } else { physicalQuantitySchedule_ = new CommodityPhysicalQuantitySchedule(physicalQuantityScheduleNode); } } XmlNode totalPhysicalQuantityNode = xmlNode.SelectSingleNode("totalPhysicalQuantity"); if (totalPhysicalQuantityNode != null) { if (totalPhysicalQuantityNode.Attributes["href"] != null || totalPhysicalQuantityNode.Attributes["id"] != null) { if (totalPhysicalQuantityNode.Attributes["id"] != null) { totalPhysicalQuantityIDRef_ = totalPhysicalQuantityNode.Attributes["id"].Value; UnitQuantity ob = new UnitQuantity(totalPhysicalQuantityNode); IDManager.SetID(totalPhysicalQuantityIDRef_, ob); } else if (totalPhysicalQuantityNode.Attributes["href"] != null) { totalPhysicalQuantityIDRef_ = totalPhysicalQuantityNode.Attributes["href"].Value; } else { totalPhysicalQuantity_ = new UnitQuantity(totalPhysicalQuantityNode); } } else { totalPhysicalQuantity_ = new UnitQuantity(totalPhysicalQuantityNode); } } }
public GasPhysicalQuantity(XmlNode xmlNode) : base(xmlNode) { XmlNodeList physicalQuantityNodeList = xmlNode.SelectNodes("physicalQuantity"); if (physicalQuantityNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in physicalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { physicalQuantityIDRef = item.Attributes["id"].Name; CommodityNotionalQuantity ob = CommodityNotionalQuantity(); IDManager.SetID(physicalQuantityIDRef, ob); } else if (item.Attributes.ToString() == "href") { physicalQuantityIDRef = item.Attributes["href"].Name; } else { physicalQuantity = new CommodityNotionalQuantity(item); } } } XmlNodeList physicalQuantityScheduleNodeList = xmlNode.SelectNodes("physicalQuantitySchedule"); if (physicalQuantityScheduleNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in physicalQuantityScheduleNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { physicalQuantityScheduleIDRef = item.Attributes["id"].Name; CommodityPhysicalQuantitySchedule ob = CommodityPhysicalQuantitySchedule(); IDManager.SetID(physicalQuantityScheduleIDRef, ob); } else if (item.Attributes.ToString() == "href") { physicalQuantityScheduleIDRef = item.Attributes["href"].Name; } else { physicalQuantitySchedule = new CommodityPhysicalQuantitySchedule(item); } } } XmlNodeList totalPhysicalQuantityNodeList = xmlNode.SelectNodes("totalPhysicalQuantity"); if (totalPhysicalQuantityNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in totalPhysicalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { totalPhysicalQuantityIDRef = item.Attributes["id"].Name; UnitQuantity ob = UnitQuantity(); IDManager.SetID(totalPhysicalQuantityIDRef, ob); } else if (item.Attributes.ToString() == "href") { totalPhysicalQuantityIDRef = item.Attributes["href"].Name; } else { totalPhysicalQuantity = new UnitQuantity(item); } } } XmlNodeList minPhysicalQuantityNodeList = xmlNode.SelectNodes("minPhysicalQuantity"); foreach (XmlNode item in minPhysicalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { minPhysicalQuantityIDRef = item.Attributes["id"].Name; List <CommodityNotionalQuantity> ob = new List <CommodityNotionalQuantity>(); ob.Add(new CommodityNotionalQuantity(item)); IDManager.SetID(minPhysicalQuantityIDRef, ob); } else if (item.Attributes.ToString() == "href") { minPhysicalQuantityIDRef = item.Attributes["href"].Name; } else { minPhysicalQuantity.Add(new CommodityNotionalQuantity(item)); } } } XmlNodeList maxPhysicalQuantityNodeList = xmlNode.SelectNodes("maxPhysicalQuantity"); foreach (XmlNode item in maxPhysicalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { maxPhysicalQuantityIDRef = item.Attributes["id"].Name; List <CommodityNotionalQuantity> ob = new List <CommodityNotionalQuantity>(); ob.Add(new CommodityNotionalQuantity(item)); IDManager.SetID(maxPhysicalQuantityIDRef, ob); } else if (item.Attributes.ToString() == "href") { maxPhysicalQuantityIDRef = item.Attributes["href"].Name; } else { maxPhysicalQuantity.Add(new CommodityNotionalQuantity(item)); } } } XmlNodeList electingPartyNodeList = xmlNode.SelectNodes("electingParty"); if (electingPartyNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in electingPartyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { electingPartyIDRef = item.Attributes["id"].Name; PartyReference ob = PartyReference(); IDManager.SetID(electingPartyIDRef, ob); } else if (item.Attributes.ToString() == "href") { electingPartyIDRef = item.Attributes["href"].Name; } else { electingParty = new PartyReference(item); } } } }
public GasPhysicalQuantity(XmlNode xmlNode) : base(xmlNode) { XmlNode physicalQuantityNode = xmlNode.SelectSingleNode("physicalQuantity"); if (physicalQuantityNode != null) { if (physicalQuantityNode.Attributes["href"] != null || physicalQuantityNode.Attributes["id"] != null) { if (physicalQuantityNode.Attributes["id"] != null) { physicalQuantityIDRef_ = physicalQuantityNode.Attributes["id"].Value; CommodityNotionalQuantity ob = new CommodityNotionalQuantity(physicalQuantityNode); IDManager.SetID(physicalQuantityIDRef_, ob); } else if (physicalQuantityNode.Attributes["href"] != null) { physicalQuantityIDRef_ = physicalQuantityNode.Attributes["href"].Value; } else { physicalQuantity_ = new CommodityNotionalQuantity(physicalQuantityNode); } } else { physicalQuantity_ = new CommodityNotionalQuantity(physicalQuantityNode); } } XmlNode physicalQuantityScheduleNode = xmlNode.SelectSingleNode("physicalQuantitySchedule"); if (physicalQuantityScheduleNode != null) { if (physicalQuantityScheduleNode.Attributes["href"] != null || physicalQuantityScheduleNode.Attributes["id"] != null) { if (physicalQuantityScheduleNode.Attributes["id"] != null) { physicalQuantityScheduleIDRef_ = physicalQuantityScheduleNode.Attributes["id"].Value; CommodityPhysicalQuantitySchedule ob = new CommodityPhysicalQuantitySchedule(physicalQuantityScheduleNode); IDManager.SetID(physicalQuantityScheduleIDRef_, ob); } else if (physicalQuantityScheduleNode.Attributes["href"] != null) { physicalQuantityScheduleIDRef_ = physicalQuantityScheduleNode.Attributes["href"].Value; } else { physicalQuantitySchedule_ = new CommodityPhysicalQuantitySchedule(physicalQuantityScheduleNode); } } else { physicalQuantitySchedule_ = new CommodityPhysicalQuantitySchedule(physicalQuantityScheduleNode); } } XmlNode totalPhysicalQuantityNode = xmlNode.SelectSingleNode("totalPhysicalQuantity"); if (totalPhysicalQuantityNode != null) { if (totalPhysicalQuantityNode.Attributes["href"] != null || totalPhysicalQuantityNode.Attributes["id"] != null) { if (totalPhysicalQuantityNode.Attributes["id"] != null) { totalPhysicalQuantityIDRef_ = totalPhysicalQuantityNode.Attributes["id"].Value; UnitQuantity ob = new UnitQuantity(totalPhysicalQuantityNode); IDManager.SetID(totalPhysicalQuantityIDRef_, ob); } else if (totalPhysicalQuantityNode.Attributes["href"] != null) { totalPhysicalQuantityIDRef_ = totalPhysicalQuantityNode.Attributes["href"].Value; } else { totalPhysicalQuantity_ = new UnitQuantity(totalPhysicalQuantityNode); } } else { totalPhysicalQuantity_ = new UnitQuantity(totalPhysicalQuantityNode); } } XmlNodeList minPhysicalQuantityNodeList = xmlNode.SelectNodes("minPhysicalQuantity"); if (minPhysicalQuantityNodeList != null) { this.minPhysicalQuantity_ = new List <CommodityNotionalQuantity>(); foreach (XmlNode item in minPhysicalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { minPhysicalQuantityIDRef_ = item.Attributes["id"].Value; minPhysicalQuantity_.Add(new CommodityNotionalQuantity(item)); IDManager.SetID(minPhysicalQuantityIDRef_, minPhysicalQuantity_[minPhysicalQuantity_.Count - 1]); } else if (item.Attributes["href"] != null) { minPhysicalQuantityIDRef_ = item.Attributes["href"].Value; } else { minPhysicalQuantity_.Add(new CommodityNotionalQuantity(item)); } } else { minPhysicalQuantity_.Add(new CommodityNotionalQuantity(item)); } } } XmlNodeList maxPhysicalQuantityNodeList = xmlNode.SelectNodes("maxPhysicalQuantity"); if (maxPhysicalQuantityNodeList != null) { this.maxPhysicalQuantity_ = new List <CommodityNotionalQuantity>(); foreach (XmlNode item in maxPhysicalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { maxPhysicalQuantityIDRef_ = item.Attributes["id"].Value; maxPhysicalQuantity_.Add(new CommodityNotionalQuantity(item)); IDManager.SetID(maxPhysicalQuantityIDRef_, maxPhysicalQuantity_[maxPhysicalQuantity_.Count - 1]); } else if (item.Attributes["href"] != null) { maxPhysicalQuantityIDRef_ = item.Attributes["href"].Value; } else { maxPhysicalQuantity_.Add(new CommodityNotionalQuantity(item)); } } else { maxPhysicalQuantity_.Add(new CommodityNotionalQuantity(item)); } } } XmlNode electingPartyNode = xmlNode.SelectSingleNode("electingParty"); if (electingPartyNode != null) { if (electingPartyNode.Attributes["href"] != null || electingPartyNode.Attributes["id"] != null) { if (electingPartyNode.Attributes["id"] != null) { electingPartyIDRef_ = electingPartyNode.Attributes["id"].Value; PartyReference ob = new PartyReference(electingPartyNode); IDManager.SetID(electingPartyIDRef_, ob); } else if (electingPartyNode.Attributes["href"] != null) { electingPartyIDRef_ = electingPartyNode.Attributes["href"].Value; } else { electingParty_ = new PartyReference(electingPartyNode); } } else { electingParty_ = new PartyReference(electingPartyNode); } } }
public GasPhysicalQuantity(XmlNode xmlNode) : base(xmlNode) { XmlNode physicalQuantityNode = xmlNode.SelectSingleNode("physicalQuantity"); if (physicalQuantityNode != null) { if (physicalQuantityNode.Attributes["href"] != null || physicalQuantityNode.Attributes["id"] != null) { if (physicalQuantityNode.Attributes["id"] != null) { physicalQuantityIDRef_ = physicalQuantityNode.Attributes["id"].Value; CommodityNotionalQuantity ob = new CommodityNotionalQuantity(physicalQuantityNode); IDManager.SetID(physicalQuantityIDRef_, ob); } else if (physicalQuantityNode.Attributes["href"] != null) { physicalQuantityIDRef_ = physicalQuantityNode.Attributes["href"].Value; } else { physicalQuantity_ = new CommodityNotionalQuantity(physicalQuantityNode); } } else { physicalQuantity_ = new CommodityNotionalQuantity(physicalQuantityNode); } } XmlNode physicalQuantityScheduleNode = xmlNode.SelectSingleNode("physicalQuantitySchedule"); if (physicalQuantityScheduleNode != null) { if (physicalQuantityScheduleNode.Attributes["href"] != null || physicalQuantityScheduleNode.Attributes["id"] != null) { if (physicalQuantityScheduleNode.Attributes["id"] != null) { physicalQuantityScheduleIDRef_ = physicalQuantityScheduleNode.Attributes["id"].Value; CommodityPhysicalQuantitySchedule ob = new CommodityPhysicalQuantitySchedule(physicalQuantityScheduleNode); IDManager.SetID(physicalQuantityScheduleIDRef_, ob); } else if (physicalQuantityScheduleNode.Attributes["href"] != null) { physicalQuantityScheduleIDRef_ = physicalQuantityScheduleNode.Attributes["href"].Value; } else { physicalQuantitySchedule_ = new CommodityPhysicalQuantitySchedule(physicalQuantityScheduleNode); } } else { physicalQuantitySchedule_ = new CommodityPhysicalQuantitySchedule(physicalQuantityScheduleNode); } } XmlNode totalPhysicalQuantityNode = xmlNode.SelectSingleNode("totalPhysicalQuantity"); if (totalPhysicalQuantityNode != null) { if (totalPhysicalQuantityNode.Attributes["href"] != null || totalPhysicalQuantityNode.Attributes["id"] != null) { if (totalPhysicalQuantityNode.Attributes["id"] != null) { totalPhysicalQuantityIDRef_ = totalPhysicalQuantityNode.Attributes["id"].Value; UnitQuantity ob = new UnitQuantity(totalPhysicalQuantityNode); IDManager.SetID(totalPhysicalQuantityIDRef_, ob); } else if (totalPhysicalQuantityNode.Attributes["href"] != null) { totalPhysicalQuantityIDRef_ = totalPhysicalQuantityNode.Attributes["href"].Value; } else { totalPhysicalQuantity_ = new UnitQuantity(totalPhysicalQuantityNode); } } else { totalPhysicalQuantity_ = new UnitQuantity(totalPhysicalQuantityNode); } } XmlNodeList minPhysicalQuantityNodeList = xmlNode.SelectNodes("minPhysicalQuantity"); if (minPhysicalQuantityNodeList != null) { this.minPhysicalQuantity_ = new List<CommodityNotionalQuantity>(); foreach (XmlNode item in minPhysicalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { minPhysicalQuantityIDRef_ = item.Attributes["id"].Value; minPhysicalQuantity_.Add(new CommodityNotionalQuantity(item)); IDManager.SetID(minPhysicalQuantityIDRef_, minPhysicalQuantity_[minPhysicalQuantity_.Count - 1 ]); } else if (item.Attributes["href"] != null) { minPhysicalQuantityIDRef_ = item.Attributes["href"].Value; } else { minPhysicalQuantity_.Add(new CommodityNotionalQuantity(item)); } } else { minPhysicalQuantity_.Add(new CommodityNotionalQuantity(item)); } } } XmlNodeList maxPhysicalQuantityNodeList = xmlNode.SelectNodes("maxPhysicalQuantity"); if (maxPhysicalQuantityNodeList != null) { this.maxPhysicalQuantity_ = new List<CommodityNotionalQuantity>(); foreach (XmlNode item in maxPhysicalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { maxPhysicalQuantityIDRef_ = item.Attributes["id"].Value; maxPhysicalQuantity_.Add(new CommodityNotionalQuantity(item)); IDManager.SetID(maxPhysicalQuantityIDRef_, maxPhysicalQuantity_[maxPhysicalQuantity_.Count - 1 ]); } else if (item.Attributes["href"] != null) { maxPhysicalQuantityIDRef_ = item.Attributes["href"].Value; } else { maxPhysicalQuantity_.Add(new CommodityNotionalQuantity(item)); } } else { maxPhysicalQuantity_.Add(new CommodityNotionalQuantity(item)); } } } XmlNode electingPartyNode = xmlNode.SelectSingleNode("electingParty"); if (electingPartyNode != null) { if (electingPartyNode.Attributes["href"] != null || electingPartyNode.Attributes["id"] != null) { if (electingPartyNode.Attributes["id"] != null) { electingPartyIDRef_ = electingPartyNode.Attributes["id"].Value; PartyReference ob = new PartyReference(electingPartyNode); IDManager.SetID(electingPartyIDRef_, ob); } else if (electingPartyNode.Attributes["href"] != null) { electingPartyIDRef_ = electingPartyNode.Attributes["href"].Value; } else { electingParty_ = new PartyReference(electingPartyNode); } } else { electingParty_ = new PartyReference(electingPartyNode); } } }
public MetalPhysicalLeg(XmlNode xmlNode) : base(xmlNode) { XmlNodeList metalNodeList = xmlNode.SelectNodes("metal"); if (metalNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in metalNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { metalIDRef = item.Attributes["id"].Name; Metal ob = Metal(); IDManager.SetID(metalIDRef, ob); } else if (item.Attributes.ToString() == "href") { metalIDRef = item.Attributes["href"].Name; } else { metal = new Metal(item); } } } XmlNodeList deliveryPeriodsNodeList = xmlNode.SelectNodes("deliveryPeriods"); if (deliveryPeriodsNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in deliveryPeriodsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { deliveryPeriodsIDRef = item.Attributes["id"].Name; CommodityDeliveryPeriods ob = CommodityDeliveryPeriods(); IDManager.SetID(deliveryPeriodsIDRef, ob); } else if (item.Attributes.ToString() == "href") { deliveryPeriodsIDRef = item.Attributes["href"].Name; } else { deliveryPeriods = new CommodityDeliveryPeriods(item); } } } XmlNodeList deliveryConditionsNodeList = xmlNode.SelectNodes("deliveryConditions"); if (deliveryConditionsNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in deliveryConditionsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { deliveryConditionsIDRef = item.Attributes["id"].Name; MetalDelivery ob = MetalDelivery(); IDManager.SetID(deliveryConditionsIDRef, ob); } else if (item.Attributes.ToString() == "href") { deliveryConditionsIDRef = item.Attributes["href"].Name; } else { deliveryConditions = new MetalDelivery(item); } } } XmlNodeList physicalQuantityNodeList = xmlNode.SelectNodes("physicalQuantity"); if (physicalQuantityNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in physicalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { physicalQuantityIDRef = item.Attributes["id"].Name; CommodityNotionalQuantity ob = CommodityNotionalQuantity(); IDManager.SetID(physicalQuantityIDRef, ob); } else if (item.Attributes.ToString() == "href") { physicalQuantityIDRef = item.Attributes["href"].Name; } else { physicalQuantity = new CommodityNotionalQuantity(item); } } } XmlNodeList physicalQuantityScheduleNodeList = xmlNode.SelectNodes("physicalQuantitySchedule"); if (physicalQuantityScheduleNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in physicalQuantityScheduleNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { physicalQuantityScheduleIDRef = item.Attributes["id"].Name; CommodityPhysicalQuantitySchedule ob = CommodityPhysicalQuantitySchedule(); IDManager.SetID(physicalQuantityScheduleIDRef, ob); } else if (item.Attributes.ToString() == "href") { physicalQuantityScheduleIDRef = item.Attributes["href"].Name; } else { physicalQuantitySchedule = new CommodityPhysicalQuantitySchedule(item); } } } XmlNodeList totalPhysicalQuantityNodeList = xmlNode.SelectNodes("totalPhysicalQuantity"); if (totalPhysicalQuantityNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in totalPhysicalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { totalPhysicalQuantityIDRef = item.Attributes["id"].Name; UnitQuantity ob = UnitQuantity(); IDManager.SetID(totalPhysicalQuantityIDRef, ob); } else if (item.Attributes.ToString() == "href") { totalPhysicalQuantityIDRef = item.Attributes["href"].Name; } else { totalPhysicalQuantity = new UnitQuantity(item); } } } XmlNodeList conversionFactorNodeList = xmlNode.SelectNodes("conversionFactor"); if (conversionFactorNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in conversionFactorNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { conversionFactorIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(conversionFactorIDRef, ob); } else if (item.Attributes.ToString() == "href") { conversionFactorIDRef = item.Attributes["href"].Name; } else { conversionFactor = new XsdTypeDecimal(item); } } } }
public GasPhysicalQuantity(XmlNode xmlNode) : base(xmlNode) { XmlNodeList physicalQuantityNodeList = xmlNode.SelectNodes("physicalQuantity"); if (physicalQuantityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in physicalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { physicalQuantityIDRef = item.Attributes["id"].Name; CommodityNotionalQuantity ob = CommodityNotionalQuantity(); IDManager.SetID(physicalQuantityIDRef, ob); } else if (item.Attributes.ToString() == "href") { physicalQuantityIDRef = item.Attributes["href"].Name; } else { physicalQuantity = new CommodityNotionalQuantity(item); } } } XmlNodeList physicalQuantityScheduleNodeList = xmlNode.SelectNodes("physicalQuantitySchedule"); if (physicalQuantityScheduleNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in physicalQuantityScheduleNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { physicalQuantityScheduleIDRef = item.Attributes["id"].Name; CommodityPhysicalQuantitySchedule ob = CommodityPhysicalQuantitySchedule(); IDManager.SetID(physicalQuantityScheduleIDRef, ob); } else if (item.Attributes.ToString() == "href") { physicalQuantityScheduleIDRef = item.Attributes["href"].Name; } else { physicalQuantitySchedule = new CommodityPhysicalQuantitySchedule(item); } } } XmlNodeList totalPhysicalQuantityNodeList = xmlNode.SelectNodes("totalPhysicalQuantity"); if (totalPhysicalQuantityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in totalPhysicalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { totalPhysicalQuantityIDRef = item.Attributes["id"].Name; UnitQuantity ob = UnitQuantity(); IDManager.SetID(totalPhysicalQuantityIDRef, ob); } else if (item.Attributes.ToString() == "href") { totalPhysicalQuantityIDRef = item.Attributes["href"].Name; } else { totalPhysicalQuantity = new UnitQuantity(item); } } } XmlNodeList minPhysicalQuantityNodeList = xmlNode.SelectNodes("minPhysicalQuantity"); foreach (XmlNode item in minPhysicalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { minPhysicalQuantityIDRef = item.Attributes["id"].Name; List<CommodityNotionalQuantity> ob = new List<CommodityNotionalQuantity>(); ob.Add(new CommodityNotionalQuantity(item)); IDManager.SetID(minPhysicalQuantityIDRef, ob); } else if (item.Attributes.ToString() == "href") { minPhysicalQuantityIDRef = item.Attributes["href"].Name; } else { minPhysicalQuantity.Add(new CommodityNotionalQuantity(item)); } } } XmlNodeList maxPhysicalQuantityNodeList = xmlNode.SelectNodes("maxPhysicalQuantity"); foreach (XmlNode item in maxPhysicalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { maxPhysicalQuantityIDRef = item.Attributes["id"].Name; List<CommodityNotionalQuantity> ob = new List<CommodityNotionalQuantity>(); ob.Add(new CommodityNotionalQuantity(item)); IDManager.SetID(maxPhysicalQuantityIDRef, ob); } else if (item.Attributes.ToString() == "href") { maxPhysicalQuantityIDRef = item.Attributes["href"].Name; } else { maxPhysicalQuantity.Add(new CommodityNotionalQuantity(item)); } } } XmlNodeList electingPartyNodeList = xmlNode.SelectNodes("electingParty"); if (electingPartyNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in electingPartyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { electingPartyIDRef = item.Attributes["id"].Name; PartyReference ob = PartyReference(); IDManager.SetID(electingPartyIDRef, ob); } else if (item.Attributes.ToString() == "href") { electingPartyIDRef = item.Attributes["href"].Name; } else { electingParty = new PartyReference(item); } } } }
public MetalPhysicalLeg(XmlNode xmlNode) : base(xmlNode) { XmlNode metalNode = xmlNode.SelectSingleNode("metal"); if (metalNode != null) { if (metalNode.Attributes["href"] != null || metalNode.Attributes["id"] != null) { if (metalNode.Attributes["id"] != null) { metalIDRef_ = metalNode.Attributes["id"].Value; Metal ob = new Metal(metalNode); IDManager.SetID(metalIDRef_, ob); } else if (metalNode.Attributes["href"] != null) { metalIDRef_ = metalNode.Attributes["href"].Value; } else { metal_ = new Metal(metalNode); } } else { metal_ = new Metal(metalNode); } } XmlNode deliveryPeriodsNode = xmlNode.SelectSingleNode("deliveryPeriods"); if (deliveryPeriodsNode != null) { if (deliveryPeriodsNode.Attributes["href"] != null || deliveryPeriodsNode.Attributes["id"] != null) { if (deliveryPeriodsNode.Attributes["id"] != null) { deliveryPeriodsIDRef_ = deliveryPeriodsNode.Attributes["id"].Value; CommodityDeliveryPeriods ob = new CommodityDeliveryPeriods(deliveryPeriodsNode); IDManager.SetID(deliveryPeriodsIDRef_, ob); } else if (deliveryPeriodsNode.Attributes["href"] != null) { deliveryPeriodsIDRef_ = deliveryPeriodsNode.Attributes["href"].Value; } else { deliveryPeriods_ = new CommodityDeliveryPeriods(deliveryPeriodsNode); } } else { deliveryPeriods_ = new CommodityDeliveryPeriods(deliveryPeriodsNode); } } XmlNode deliveryConditionsNode = xmlNode.SelectSingleNode("deliveryConditions"); if (deliveryConditionsNode != null) { if (deliveryConditionsNode.Attributes["href"] != null || deliveryConditionsNode.Attributes["id"] != null) { if (deliveryConditionsNode.Attributes["id"] != null) { deliveryConditionsIDRef_ = deliveryConditionsNode.Attributes["id"].Value; MetalDelivery ob = new MetalDelivery(deliveryConditionsNode); IDManager.SetID(deliveryConditionsIDRef_, ob); } else if (deliveryConditionsNode.Attributes["href"] != null) { deliveryConditionsIDRef_ = deliveryConditionsNode.Attributes["href"].Value; } else { deliveryConditions_ = new MetalDelivery(deliveryConditionsNode); } } else { deliveryConditions_ = new MetalDelivery(deliveryConditionsNode); } } XmlNode physicalQuantityNode = xmlNode.SelectSingleNode("physicalQuantity"); if (physicalQuantityNode != null) { if (physicalQuantityNode.Attributes["href"] != null || physicalQuantityNode.Attributes["id"] != null) { if (physicalQuantityNode.Attributes["id"] != null) { physicalQuantityIDRef_ = physicalQuantityNode.Attributes["id"].Value; CommodityNotionalQuantity ob = new CommodityNotionalQuantity(physicalQuantityNode); IDManager.SetID(physicalQuantityIDRef_, ob); } else if (physicalQuantityNode.Attributes["href"] != null) { physicalQuantityIDRef_ = physicalQuantityNode.Attributes["href"].Value; } else { physicalQuantity_ = new CommodityNotionalQuantity(physicalQuantityNode); } } else { physicalQuantity_ = new CommodityNotionalQuantity(physicalQuantityNode); } } XmlNode physicalQuantityScheduleNode = xmlNode.SelectSingleNode("physicalQuantitySchedule"); if (physicalQuantityScheduleNode != null) { if (physicalQuantityScheduleNode.Attributes["href"] != null || physicalQuantityScheduleNode.Attributes["id"] != null) { if (physicalQuantityScheduleNode.Attributes["id"] != null) { physicalQuantityScheduleIDRef_ = physicalQuantityScheduleNode.Attributes["id"].Value; CommodityPhysicalQuantitySchedule ob = new CommodityPhysicalQuantitySchedule(physicalQuantityScheduleNode); IDManager.SetID(physicalQuantityScheduleIDRef_, ob); } else if (physicalQuantityScheduleNode.Attributes["href"] != null) { physicalQuantityScheduleIDRef_ = physicalQuantityScheduleNode.Attributes["href"].Value; } else { physicalQuantitySchedule_ = new CommodityPhysicalQuantitySchedule(physicalQuantityScheduleNode); } } else { physicalQuantitySchedule_ = new CommodityPhysicalQuantitySchedule(physicalQuantityScheduleNode); } } XmlNode totalPhysicalQuantityNode = xmlNode.SelectSingleNode("totalPhysicalQuantity"); if (totalPhysicalQuantityNode != null) { if (totalPhysicalQuantityNode.Attributes["href"] != null || totalPhysicalQuantityNode.Attributes["id"] != null) { if (totalPhysicalQuantityNode.Attributes["id"] != null) { totalPhysicalQuantityIDRef_ = totalPhysicalQuantityNode.Attributes["id"].Value; UnitQuantity ob = new UnitQuantity(totalPhysicalQuantityNode); IDManager.SetID(totalPhysicalQuantityIDRef_, ob); } else if (totalPhysicalQuantityNode.Attributes["href"] != null) { totalPhysicalQuantityIDRef_ = totalPhysicalQuantityNode.Attributes["href"].Value; } else { totalPhysicalQuantity_ = new UnitQuantity(totalPhysicalQuantityNode); } } else { totalPhysicalQuantity_ = new UnitQuantity(totalPhysicalQuantityNode); } } XmlNode conversionFactorNode = xmlNode.SelectSingleNode("conversionFactor"); if (conversionFactorNode != null) { if (conversionFactorNode.Attributes["href"] != null || conversionFactorNode.Attributes["id"] != null) { if (conversionFactorNode.Attributes["id"] != null) { conversionFactorIDRef_ = conversionFactorNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(conversionFactorNode); IDManager.SetID(conversionFactorIDRef_, ob); } else if (conversionFactorNode.Attributes["href"] != null) { conversionFactorIDRef_ = conversionFactorNode.Attributes["href"].Value; } else { conversionFactor_ = new XsdTypeDecimal(conversionFactorNode); } } else { conversionFactor_ = new XsdTypeDecimal(conversionFactorNode); } } }
public BullionPhysicalLeg(XmlNode xmlNode) : base(xmlNode) { XmlNodeList bullionTypeNodeList = xmlNode.SelectNodes("bullionType"); if (bullionTypeNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in bullionTypeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { bullionTypeIDRef = item.Attributes["id"].Name; BullionTypeEnum ob = BullionTypeEnum(); IDManager.SetID(bullionTypeIDRef, ob); } else if (item.Attributes.ToString() == "href") { bullionTypeIDRef = item.Attributes["href"].Name; } else { bullionType = new BullionTypeEnum(item); } } } XmlNodeList deliveryLocationNodeList = xmlNode.SelectNodes("deliveryLocation"); if (deliveryLocationNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in deliveryLocationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { deliveryLocationIDRef = item.Attributes["id"].Name; BullionDeliveryLocation ob = BullionDeliveryLocation(); IDManager.SetID(deliveryLocationIDRef, ob); } else if (item.Attributes.ToString() == "href") { deliveryLocationIDRef = item.Attributes["href"].Name; } else { deliveryLocation = new BullionDeliveryLocation(item); } } } XmlNodeList physicalQuantityNodeList = xmlNode.SelectNodes("physicalQuantity"); if (physicalQuantityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in physicalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { physicalQuantityIDRef = item.Attributes["id"].Name; CommodityNotionalQuantity ob = CommodityNotionalQuantity(); IDManager.SetID(physicalQuantityIDRef, ob); } else if (item.Attributes.ToString() == "href") { physicalQuantityIDRef = item.Attributes["href"].Name; } else { physicalQuantity = new CommodityNotionalQuantity(item); } } } XmlNodeList physicalQuantityScheduleNodeList = xmlNode.SelectNodes("physicalQuantitySchedule"); if (physicalQuantityScheduleNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in physicalQuantityScheduleNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { physicalQuantityScheduleIDRef = item.Attributes["id"].Name; CommodityPhysicalQuantitySchedule ob = CommodityPhysicalQuantitySchedule(); IDManager.SetID(physicalQuantityScheduleIDRef, ob); } else if (item.Attributes.ToString() == "href") { physicalQuantityScheduleIDRef = item.Attributes["href"].Name; } else { physicalQuantitySchedule = new CommodityPhysicalQuantitySchedule(item); } } } XmlNodeList totalPhysicalQuantityNodeList = xmlNode.SelectNodes("totalPhysicalQuantity"); if (totalPhysicalQuantityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in totalPhysicalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { totalPhysicalQuantityIDRef = item.Attributes["id"].Name; UnitQuantity ob = UnitQuantity(); IDManager.SetID(totalPhysicalQuantityIDRef, ob); } else if (item.Attributes.ToString() == "href") { totalPhysicalQuantityIDRef = item.Attributes["href"].Name; } else { totalPhysicalQuantity = new UnitQuantity(item); } } } XmlNodeList settlementDateNodeList = xmlNode.SelectNodes("settlementDate"); if (settlementDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in settlementDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { settlementDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(settlementDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { settlementDateIDRef = item.Attributes["href"].Name; } else { settlementDate = new AdjustableOrRelativeDate(item); } } } }
public CommodityPhysicalQuantity(XmlNode xmlNode) : base(xmlNode) { XmlNode physicalQuantityNode = xmlNode.SelectSingleNode("physicalQuantity"); if (physicalQuantityNode != null) { if (physicalQuantityNode.Attributes["href"] != null || physicalQuantityNode.Attributes["id"] != null) { if (physicalQuantityNode.Attributes["id"] != null) { physicalQuantityIDRef_ = physicalQuantityNode.Attributes["id"].Value; CommodityNotionalQuantity ob = new CommodityNotionalQuantity(physicalQuantityNode); IDManager.SetID(physicalQuantityIDRef_, ob); } else if (physicalQuantityNode.Attributes["href"] != null) { physicalQuantityIDRef_ = physicalQuantityNode.Attributes["href"].Value; } else { physicalQuantity_ = new CommodityNotionalQuantity(physicalQuantityNode); } } else { physicalQuantity_ = new CommodityNotionalQuantity(physicalQuantityNode); } } XmlNode physicalQuantityScheduleNode = xmlNode.SelectSingleNode("physicalQuantitySchedule"); if (physicalQuantityScheduleNode != null) { if (physicalQuantityScheduleNode.Attributes["href"] != null || physicalQuantityScheduleNode.Attributes["id"] != null) { if (physicalQuantityScheduleNode.Attributes["id"] != null) { physicalQuantityScheduleIDRef_ = physicalQuantityScheduleNode.Attributes["id"].Value; CommodityPhysicalQuantitySchedule ob = new CommodityPhysicalQuantitySchedule(physicalQuantityScheduleNode); IDManager.SetID(physicalQuantityScheduleIDRef_, ob); } else if (physicalQuantityScheduleNode.Attributes["href"] != null) { physicalQuantityScheduleIDRef_ = physicalQuantityScheduleNode.Attributes["href"].Value; } else { physicalQuantitySchedule_ = new CommodityPhysicalQuantitySchedule(physicalQuantityScheduleNode); } } else { physicalQuantitySchedule_ = new CommodityPhysicalQuantitySchedule(physicalQuantityScheduleNode); } } XmlNode totalPhysicalQuantityNode = xmlNode.SelectSingleNode("totalPhysicalQuantity"); if (totalPhysicalQuantityNode != null) { if (totalPhysicalQuantityNode.Attributes["href"] != null || totalPhysicalQuantityNode.Attributes["id"] != null) { if (totalPhysicalQuantityNode.Attributes["id"] != null) { totalPhysicalQuantityIDRef_ = totalPhysicalQuantityNode.Attributes["id"].Value; UnitQuantity ob = new UnitQuantity(totalPhysicalQuantityNode); IDManager.SetID(totalPhysicalQuantityIDRef_, ob); } else if (totalPhysicalQuantityNode.Attributes["href"] != null) { totalPhysicalQuantityIDRef_ = totalPhysicalQuantityNode.Attributes["href"].Value; } else { totalPhysicalQuantity_ = new UnitQuantity(totalPhysicalQuantityNode); } } else { totalPhysicalQuantity_ = new UnitQuantity(totalPhysicalQuantityNode); } } }
public CommodityPhysicalQuantity(XmlNode xmlNode) : base(xmlNode) { XmlNodeList physicalQuantityNodeList = xmlNode.SelectNodes("physicalQuantity"); if (physicalQuantityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in physicalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { physicalQuantityIDRef = item.Attributes["id"].Name; CommodityNotionalQuantity ob = CommodityNotionalQuantity(); IDManager.SetID(physicalQuantityIDRef, ob); } else if (item.Attributes.ToString() == "href") { physicalQuantityIDRef = item.Attributes["href"].Name; } else { physicalQuantity = new CommodityNotionalQuantity(item); } } } XmlNodeList physicalQuantityScheduleNodeList = xmlNode.SelectNodes("physicalQuantitySchedule"); if (physicalQuantityScheduleNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in physicalQuantityScheduleNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { physicalQuantityScheduleIDRef = item.Attributes["id"].Name; CommodityPhysicalQuantitySchedule ob = CommodityPhysicalQuantitySchedule(); IDManager.SetID(physicalQuantityScheduleIDRef, ob); } else if (item.Attributes.ToString() == "href") { physicalQuantityScheduleIDRef = item.Attributes["href"].Name; } else { physicalQuantitySchedule = new CommodityPhysicalQuantitySchedule(item); } } } XmlNodeList totalPhysicalQuantityNodeList = xmlNode.SelectNodes("totalPhysicalQuantity"); if (totalPhysicalQuantityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in totalPhysicalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { totalPhysicalQuantityIDRef = item.Attributes["id"].Name; UnitQuantity ob = UnitQuantity(); IDManager.SetID(totalPhysicalQuantityIDRef, ob); } else if (item.Attributes.ToString() == "href") { totalPhysicalQuantityIDRef = item.Attributes["href"].Name; } else { totalPhysicalQuantity = new UnitQuantity(item); } } } }
public MetalPhysicalLeg(XmlNode xmlNode) : base(xmlNode) { XmlNodeList metalNodeList = xmlNode.SelectNodes("metal"); if (metalNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in metalNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { metalIDRef = item.Attributes["id"].Name; Metal ob = Metal(); IDManager.SetID(metalIDRef, ob); } else if (item.Attributes.ToString() == "href") { metalIDRef = item.Attributes["href"].Name; } else { metal = new Metal(item); } } } XmlNodeList deliveryPeriodsNodeList = xmlNode.SelectNodes("deliveryPeriods"); if (deliveryPeriodsNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in deliveryPeriodsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { deliveryPeriodsIDRef = item.Attributes["id"].Name; CommodityDeliveryPeriods ob = CommodityDeliveryPeriods(); IDManager.SetID(deliveryPeriodsIDRef, ob); } else if (item.Attributes.ToString() == "href") { deliveryPeriodsIDRef = item.Attributes["href"].Name; } else { deliveryPeriods = new CommodityDeliveryPeriods(item); } } } XmlNodeList deliveryConditionsNodeList = xmlNode.SelectNodes("deliveryConditions"); if (deliveryConditionsNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in deliveryConditionsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { deliveryConditionsIDRef = item.Attributes["id"].Name; MetalDelivery ob = MetalDelivery(); IDManager.SetID(deliveryConditionsIDRef, ob); } else if (item.Attributes.ToString() == "href") { deliveryConditionsIDRef = item.Attributes["href"].Name; } else { deliveryConditions = new MetalDelivery(item); } } } XmlNodeList physicalQuantityNodeList = xmlNode.SelectNodes("physicalQuantity"); if (physicalQuantityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in physicalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { physicalQuantityIDRef = item.Attributes["id"].Name; CommodityNotionalQuantity ob = CommodityNotionalQuantity(); IDManager.SetID(physicalQuantityIDRef, ob); } else if (item.Attributes.ToString() == "href") { physicalQuantityIDRef = item.Attributes["href"].Name; } else { physicalQuantity = new CommodityNotionalQuantity(item); } } } XmlNodeList physicalQuantityScheduleNodeList = xmlNode.SelectNodes("physicalQuantitySchedule"); if (physicalQuantityScheduleNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in physicalQuantityScheduleNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { physicalQuantityScheduleIDRef = item.Attributes["id"].Name; CommodityPhysicalQuantitySchedule ob = CommodityPhysicalQuantitySchedule(); IDManager.SetID(physicalQuantityScheduleIDRef, ob); } else if (item.Attributes.ToString() == "href") { physicalQuantityScheduleIDRef = item.Attributes["href"].Name; } else { physicalQuantitySchedule = new CommodityPhysicalQuantitySchedule(item); } } } XmlNodeList totalPhysicalQuantityNodeList = xmlNode.SelectNodes("totalPhysicalQuantity"); if (totalPhysicalQuantityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in totalPhysicalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { totalPhysicalQuantityIDRef = item.Attributes["id"].Name; UnitQuantity ob = UnitQuantity(); IDManager.SetID(totalPhysicalQuantityIDRef, ob); } else if (item.Attributes.ToString() == "href") { totalPhysicalQuantityIDRef = item.Attributes["href"].Name; } else { totalPhysicalQuantity = new UnitQuantity(item); } } } XmlNodeList conversionFactorNodeList = xmlNode.SelectNodes("conversionFactor"); if (conversionFactorNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in conversionFactorNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { conversionFactorIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(conversionFactorIDRef, ob); } else if (item.Attributes.ToString() == "href") { conversionFactorIDRef = item.Attributes["href"].Name; } else { conversionFactor = new XsdTypeDecimal(item); } } } }
public BullionPhysicalLeg(XmlNode xmlNode) : base(xmlNode) { XmlNode bullionTypeNode = xmlNode.SelectSingleNode("bullionType"); if (bullionTypeNode != null) { if (bullionTypeNode.Attributes["href"] != null || bullionTypeNode.Attributes["id"] != null) { if (bullionTypeNode.Attributes["id"] != null) { bullionTypeIDRef_ = bullionTypeNode.Attributes["id"].Value; BullionTypeEnum ob = new BullionTypeEnum(bullionTypeNode); IDManager.SetID(bullionTypeIDRef_, ob); } else if (bullionTypeNode.Attributes["href"] != null) { bullionTypeIDRef_ = bullionTypeNode.Attributes["href"].Value; } else { bullionType_ = new BullionTypeEnum(bullionTypeNode); } } else { bullionType_ = new BullionTypeEnum(bullionTypeNode); } } XmlNode deliveryLocationNode = xmlNode.SelectSingleNode("deliveryLocation"); if (deliveryLocationNode != null) { if (deliveryLocationNode.Attributes["href"] != null || deliveryLocationNode.Attributes["id"] != null) { if (deliveryLocationNode.Attributes["id"] != null) { deliveryLocationIDRef_ = deliveryLocationNode.Attributes["id"].Value; BullionDeliveryLocation ob = new BullionDeliveryLocation(deliveryLocationNode); IDManager.SetID(deliveryLocationIDRef_, ob); } else if (deliveryLocationNode.Attributes["href"] != null) { deliveryLocationIDRef_ = deliveryLocationNode.Attributes["href"].Value; } else { deliveryLocation_ = new BullionDeliveryLocation(deliveryLocationNode); } } else { deliveryLocation_ = new BullionDeliveryLocation(deliveryLocationNode); } } XmlNode physicalQuantityNode = xmlNode.SelectSingleNode("physicalQuantity"); if (physicalQuantityNode != null) { if (physicalQuantityNode.Attributes["href"] != null || physicalQuantityNode.Attributes["id"] != null) { if (physicalQuantityNode.Attributes["id"] != null) { physicalQuantityIDRef_ = physicalQuantityNode.Attributes["id"].Value; CommodityNotionalQuantity ob = new CommodityNotionalQuantity(physicalQuantityNode); IDManager.SetID(physicalQuantityIDRef_, ob); } else if (physicalQuantityNode.Attributes["href"] != null) { physicalQuantityIDRef_ = physicalQuantityNode.Attributes["href"].Value; } else { physicalQuantity_ = new CommodityNotionalQuantity(physicalQuantityNode); } } else { physicalQuantity_ = new CommodityNotionalQuantity(physicalQuantityNode); } } XmlNode physicalQuantityScheduleNode = xmlNode.SelectSingleNode("physicalQuantitySchedule"); if (physicalQuantityScheduleNode != null) { if (physicalQuantityScheduleNode.Attributes["href"] != null || physicalQuantityScheduleNode.Attributes["id"] != null) { if (physicalQuantityScheduleNode.Attributes["id"] != null) { physicalQuantityScheduleIDRef_ = physicalQuantityScheduleNode.Attributes["id"].Value; CommodityPhysicalQuantitySchedule ob = new CommodityPhysicalQuantitySchedule(physicalQuantityScheduleNode); IDManager.SetID(physicalQuantityScheduleIDRef_, ob); } else if (physicalQuantityScheduleNode.Attributes["href"] != null) { physicalQuantityScheduleIDRef_ = physicalQuantityScheduleNode.Attributes["href"].Value; } else { physicalQuantitySchedule_ = new CommodityPhysicalQuantitySchedule(physicalQuantityScheduleNode); } } else { physicalQuantitySchedule_ = new CommodityPhysicalQuantitySchedule(physicalQuantityScheduleNode); } } XmlNode totalPhysicalQuantityNode = xmlNode.SelectSingleNode("totalPhysicalQuantity"); if (totalPhysicalQuantityNode != null) { if (totalPhysicalQuantityNode.Attributes["href"] != null || totalPhysicalQuantityNode.Attributes["id"] != null) { if (totalPhysicalQuantityNode.Attributes["id"] != null) { totalPhysicalQuantityIDRef_ = totalPhysicalQuantityNode.Attributes["id"].Value; UnitQuantity ob = new UnitQuantity(totalPhysicalQuantityNode); IDManager.SetID(totalPhysicalQuantityIDRef_, ob); } else if (totalPhysicalQuantityNode.Attributes["href"] != null) { totalPhysicalQuantityIDRef_ = totalPhysicalQuantityNode.Attributes["href"].Value; } else { totalPhysicalQuantity_ = new UnitQuantity(totalPhysicalQuantityNode); } } else { totalPhysicalQuantity_ = new UnitQuantity(totalPhysicalQuantityNode); } } XmlNode settlementDateNode = xmlNode.SelectSingleNode("settlementDate"); if (settlementDateNode != null) { if (settlementDateNode.Attributes["href"] != null || settlementDateNode.Attributes["id"] != null) { if (settlementDateNode.Attributes["id"] != null) { settlementDateIDRef_ = settlementDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(settlementDateNode); IDManager.SetID(settlementDateIDRef_, ob); } else if (settlementDateNode.Attributes["href"] != null) { settlementDateIDRef_ = settlementDateNode.Attributes["href"].Value; } else { settlementDate_ = new AdjustableOrRelativeDate(settlementDateNode); } } else { settlementDate_ = new AdjustableOrRelativeDate(settlementDateNode); } } }
public BullionPhysicalLeg(XmlNode xmlNode) : base(xmlNode) { XmlNode bullionTypeNode = xmlNode.SelectSingleNode("bullionType"); if (bullionTypeNode != null) { if (bullionTypeNode.Attributes["href"] != null || bullionTypeNode.Attributes["id"] != null) { if (bullionTypeNode.Attributes["id"] != null) { bullionTypeIDRef_ = bullionTypeNode.Attributes["id"].Value; BullionTypeEnum ob = new BullionTypeEnum(bullionTypeNode); IDManager.SetID(bullionTypeIDRef_, ob); } else if (bullionTypeNode.Attributes["href"] != null) { bullionTypeIDRef_ = bullionTypeNode.Attributes["href"].Value; } else { bullionType_ = new BullionTypeEnum(bullionTypeNode); } } else { bullionType_ = new BullionTypeEnum(bullionTypeNode); } } XmlNode deliveryLocationNode = xmlNode.SelectSingleNode("deliveryLocation"); if (deliveryLocationNode != null) { if (deliveryLocationNode.Attributes["href"] != null || deliveryLocationNode.Attributes["id"] != null) { if (deliveryLocationNode.Attributes["id"] != null) { deliveryLocationIDRef_ = deliveryLocationNode.Attributes["id"].Value; BullionDeliveryLocation ob = new BullionDeliveryLocation(deliveryLocationNode); IDManager.SetID(deliveryLocationIDRef_, ob); } else if (deliveryLocationNode.Attributes["href"] != null) { deliveryLocationIDRef_ = deliveryLocationNode.Attributes["href"].Value; } else { deliveryLocation_ = new BullionDeliveryLocation(deliveryLocationNode); } } else { deliveryLocation_ = new BullionDeliveryLocation(deliveryLocationNode); } } XmlNode physicalQuantityNode = xmlNode.SelectSingleNode("physicalQuantity"); if (physicalQuantityNode != null) { if (physicalQuantityNode.Attributes["href"] != null || physicalQuantityNode.Attributes["id"] != null) { if (physicalQuantityNode.Attributes["id"] != null) { physicalQuantityIDRef_ = physicalQuantityNode.Attributes["id"].Value; CommodityNotionalQuantity ob = new CommodityNotionalQuantity(physicalQuantityNode); IDManager.SetID(physicalQuantityIDRef_, ob); } else if (physicalQuantityNode.Attributes["href"] != null) { physicalQuantityIDRef_ = physicalQuantityNode.Attributes["href"].Value; } else { physicalQuantity_ = new CommodityNotionalQuantity(physicalQuantityNode); } } else { physicalQuantity_ = new CommodityNotionalQuantity(physicalQuantityNode); } } XmlNode physicalQuantityScheduleNode = xmlNode.SelectSingleNode("physicalQuantitySchedule"); if (physicalQuantityScheduleNode != null) { if (physicalQuantityScheduleNode.Attributes["href"] != null || physicalQuantityScheduleNode.Attributes["id"] != null) { if (physicalQuantityScheduleNode.Attributes["id"] != null) { physicalQuantityScheduleIDRef_ = physicalQuantityScheduleNode.Attributes["id"].Value; CommodityPhysicalQuantitySchedule ob = new CommodityPhysicalQuantitySchedule(physicalQuantityScheduleNode); IDManager.SetID(physicalQuantityScheduleIDRef_, ob); } else if (physicalQuantityScheduleNode.Attributes["href"] != null) { physicalQuantityScheduleIDRef_ = physicalQuantityScheduleNode.Attributes["href"].Value; } else { physicalQuantitySchedule_ = new CommodityPhysicalQuantitySchedule(physicalQuantityScheduleNode); } } else { physicalQuantitySchedule_ = new CommodityPhysicalQuantitySchedule(physicalQuantityScheduleNode); } } XmlNode totalPhysicalQuantityNode = xmlNode.SelectSingleNode("totalPhysicalQuantity"); if (totalPhysicalQuantityNode != null) { if (totalPhysicalQuantityNode.Attributes["href"] != null || totalPhysicalQuantityNode.Attributes["id"] != null) { if (totalPhysicalQuantityNode.Attributes["id"] != null) { totalPhysicalQuantityIDRef_ = totalPhysicalQuantityNode.Attributes["id"].Value; UnitQuantity ob = new UnitQuantity(totalPhysicalQuantityNode); IDManager.SetID(totalPhysicalQuantityIDRef_, ob); } else if (totalPhysicalQuantityNode.Attributes["href"] != null) { totalPhysicalQuantityIDRef_ = totalPhysicalQuantityNode.Attributes["href"].Value; } else { totalPhysicalQuantity_ = new UnitQuantity(totalPhysicalQuantityNode); } } else { totalPhysicalQuantity_ = new UnitQuantity(totalPhysicalQuantityNode); } } XmlNode settlementDateNode = xmlNode.SelectSingleNode("settlementDate"); if (settlementDateNode != null) { if (settlementDateNode.Attributes["href"] != null || settlementDateNode.Attributes["id"] != null) { if (settlementDateNode.Attributes["id"] != null) { settlementDateIDRef_ = settlementDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(settlementDateNode); IDManager.SetID(settlementDateIDRef_, ob); } else if (settlementDateNode.Attributes["href"] != null) { settlementDateIDRef_ = settlementDateNode.Attributes["href"].Value; } else { settlementDate_ = new AdjustableOrRelativeDate(settlementDateNode); } } else { settlementDate_ = new AdjustableOrRelativeDate(settlementDateNode); } } }
public MetalPhysicalLeg(XmlNode xmlNode) : base(xmlNode) { XmlNode metalNode = xmlNode.SelectSingleNode("metal"); if (metalNode != null) { if (metalNode.Attributes["href"] != null || metalNode.Attributes["id"] != null) { if (metalNode.Attributes["id"] != null) { metalIDRef_ = metalNode.Attributes["id"].Value; Metal ob = new Metal(metalNode); IDManager.SetID(metalIDRef_, ob); } else if (metalNode.Attributes["href"] != null) { metalIDRef_ = metalNode.Attributes["href"].Value; } else { metal_ = new Metal(metalNode); } } else { metal_ = new Metal(metalNode); } } XmlNode deliveryPeriodsNode = xmlNode.SelectSingleNode("deliveryPeriods"); if (deliveryPeriodsNode != null) { if (deliveryPeriodsNode.Attributes["href"] != null || deliveryPeriodsNode.Attributes["id"] != null) { if (deliveryPeriodsNode.Attributes["id"] != null) { deliveryPeriodsIDRef_ = deliveryPeriodsNode.Attributes["id"].Value; CommodityDeliveryPeriods ob = new CommodityDeliveryPeriods(deliveryPeriodsNode); IDManager.SetID(deliveryPeriodsIDRef_, ob); } else if (deliveryPeriodsNode.Attributes["href"] != null) { deliveryPeriodsIDRef_ = deliveryPeriodsNode.Attributes["href"].Value; } else { deliveryPeriods_ = new CommodityDeliveryPeriods(deliveryPeriodsNode); } } else { deliveryPeriods_ = new CommodityDeliveryPeriods(deliveryPeriodsNode); } } XmlNode deliveryConditionsNode = xmlNode.SelectSingleNode("deliveryConditions"); if (deliveryConditionsNode != null) { if (deliveryConditionsNode.Attributes["href"] != null || deliveryConditionsNode.Attributes["id"] != null) { if (deliveryConditionsNode.Attributes["id"] != null) { deliveryConditionsIDRef_ = deliveryConditionsNode.Attributes["id"].Value; MetalDelivery ob = new MetalDelivery(deliveryConditionsNode); IDManager.SetID(deliveryConditionsIDRef_, ob); } else if (deliveryConditionsNode.Attributes["href"] != null) { deliveryConditionsIDRef_ = deliveryConditionsNode.Attributes["href"].Value; } else { deliveryConditions_ = new MetalDelivery(deliveryConditionsNode); } } else { deliveryConditions_ = new MetalDelivery(deliveryConditionsNode); } } XmlNode physicalQuantityNode = xmlNode.SelectSingleNode("physicalQuantity"); if (physicalQuantityNode != null) { if (physicalQuantityNode.Attributes["href"] != null || physicalQuantityNode.Attributes["id"] != null) { if (physicalQuantityNode.Attributes["id"] != null) { physicalQuantityIDRef_ = physicalQuantityNode.Attributes["id"].Value; CommodityNotionalQuantity ob = new CommodityNotionalQuantity(physicalQuantityNode); IDManager.SetID(physicalQuantityIDRef_, ob); } else if (physicalQuantityNode.Attributes["href"] != null) { physicalQuantityIDRef_ = physicalQuantityNode.Attributes["href"].Value; } else { physicalQuantity_ = new CommodityNotionalQuantity(physicalQuantityNode); } } else { physicalQuantity_ = new CommodityNotionalQuantity(physicalQuantityNode); } } XmlNode physicalQuantityScheduleNode = xmlNode.SelectSingleNode("physicalQuantitySchedule"); if (physicalQuantityScheduleNode != null) { if (physicalQuantityScheduleNode.Attributes["href"] != null || physicalQuantityScheduleNode.Attributes["id"] != null) { if (physicalQuantityScheduleNode.Attributes["id"] != null) { physicalQuantityScheduleIDRef_ = physicalQuantityScheduleNode.Attributes["id"].Value; CommodityPhysicalQuantitySchedule ob = new CommodityPhysicalQuantitySchedule(physicalQuantityScheduleNode); IDManager.SetID(physicalQuantityScheduleIDRef_, ob); } else if (physicalQuantityScheduleNode.Attributes["href"] != null) { physicalQuantityScheduleIDRef_ = physicalQuantityScheduleNode.Attributes["href"].Value; } else { physicalQuantitySchedule_ = new CommodityPhysicalQuantitySchedule(physicalQuantityScheduleNode); } } else { physicalQuantitySchedule_ = new CommodityPhysicalQuantitySchedule(physicalQuantityScheduleNode); } } XmlNode totalPhysicalQuantityNode = xmlNode.SelectSingleNode("totalPhysicalQuantity"); if (totalPhysicalQuantityNode != null) { if (totalPhysicalQuantityNode.Attributes["href"] != null || totalPhysicalQuantityNode.Attributes["id"] != null) { if (totalPhysicalQuantityNode.Attributes["id"] != null) { totalPhysicalQuantityIDRef_ = totalPhysicalQuantityNode.Attributes["id"].Value; UnitQuantity ob = new UnitQuantity(totalPhysicalQuantityNode); IDManager.SetID(totalPhysicalQuantityIDRef_, ob); } else if (totalPhysicalQuantityNode.Attributes["href"] != null) { totalPhysicalQuantityIDRef_ = totalPhysicalQuantityNode.Attributes["href"].Value; } else { totalPhysicalQuantity_ = new UnitQuantity(totalPhysicalQuantityNode); } } else { totalPhysicalQuantity_ = new UnitQuantity(totalPhysicalQuantityNode); } } XmlNode conversionFactorNode = xmlNode.SelectSingleNode("conversionFactor"); if (conversionFactorNode != null) { if (conversionFactorNode.Attributes["href"] != null || conversionFactorNode.Attributes["id"] != null) { if (conversionFactorNode.Attributes["id"] != null) { conversionFactorIDRef_ = conversionFactorNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(conversionFactorNode); IDManager.SetID(conversionFactorIDRef_, ob); } else if (conversionFactorNode.Attributes["href"] != null) { conversionFactorIDRef_ = conversionFactorNode.Attributes["href"].Value; } else { conversionFactor_ = new XsdTypeDecimal(conversionFactorNode); } } else { conversionFactor_ = new XsdTypeDecimal(conversionFactorNode); } } }
public BullionPhysicalLeg(XmlNode xmlNode) : base(xmlNode) { XmlNodeList bullionTypeNodeList = xmlNode.SelectNodes("bullionType"); if (bullionTypeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in bullionTypeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { bullionTypeIDRef = item.Attributes["id"].Name; BullionTypeEnum ob = BullionTypeEnum(); IDManager.SetID(bullionTypeIDRef, ob); } else if (item.Attributes.ToString() == "href") { bullionTypeIDRef = item.Attributes["href"].Name; } else { bullionType = new BullionTypeEnum(item); } } } XmlNodeList deliveryLocationNodeList = xmlNode.SelectNodes("deliveryLocation"); if (deliveryLocationNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in deliveryLocationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { deliveryLocationIDRef = item.Attributes["id"].Name; BullionDeliveryLocation ob = BullionDeliveryLocation(); IDManager.SetID(deliveryLocationIDRef, ob); } else if (item.Attributes.ToString() == "href") { deliveryLocationIDRef = item.Attributes["href"].Name; } else { deliveryLocation = new BullionDeliveryLocation(item); } } } XmlNodeList physicalQuantityNodeList = xmlNode.SelectNodes("physicalQuantity"); if (physicalQuantityNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in physicalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { physicalQuantityIDRef = item.Attributes["id"].Name; CommodityNotionalQuantity ob = CommodityNotionalQuantity(); IDManager.SetID(physicalQuantityIDRef, ob); } else if (item.Attributes.ToString() == "href") { physicalQuantityIDRef = item.Attributes["href"].Name; } else { physicalQuantity = new CommodityNotionalQuantity(item); } } } XmlNodeList physicalQuantityScheduleNodeList = xmlNode.SelectNodes("physicalQuantitySchedule"); if (physicalQuantityScheduleNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in physicalQuantityScheduleNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { physicalQuantityScheduleIDRef = item.Attributes["id"].Name; CommodityPhysicalQuantitySchedule ob = CommodityPhysicalQuantitySchedule(); IDManager.SetID(physicalQuantityScheduleIDRef, ob); } else if (item.Attributes.ToString() == "href") { physicalQuantityScheduleIDRef = item.Attributes["href"].Name; } else { physicalQuantitySchedule = new CommodityPhysicalQuantitySchedule(item); } } } XmlNodeList totalPhysicalQuantityNodeList = xmlNode.SelectNodes("totalPhysicalQuantity"); if (totalPhysicalQuantityNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in totalPhysicalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { totalPhysicalQuantityIDRef = item.Attributes["id"].Name; UnitQuantity ob = UnitQuantity(); IDManager.SetID(totalPhysicalQuantityIDRef, ob); } else if (item.Attributes.ToString() == "href") { totalPhysicalQuantityIDRef = item.Attributes["href"].Name; } else { totalPhysicalQuantity = new UnitQuantity(item); } } } XmlNodeList settlementDateNodeList = xmlNode.SelectNodes("settlementDate"); if (settlementDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in settlementDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { settlementDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(settlementDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { settlementDateIDRef = item.Attributes["href"].Name; } else { settlementDate = new AdjustableOrRelativeDate(item); } } } }
public CommodityPhysicalQuantity(XmlNode xmlNode) : base(xmlNode) { XmlNodeList physicalQuantityNodeList = xmlNode.SelectNodes("physicalQuantity"); if (physicalQuantityNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in physicalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { physicalQuantityIDRef = item.Attributes["id"].Name; CommodityNotionalQuantity ob = CommodityNotionalQuantity(); IDManager.SetID(physicalQuantityIDRef, ob); } else if (item.Attributes.ToString() == "href") { physicalQuantityIDRef = item.Attributes["href"].Name; } else { physicalQuantity = new CommodityNotionalQuantity(item); } } } XmlNodeList physicalQuantityScheduleNodeList = xmlNode.SelectNodes("physicalQuantitySchedule"); if (physicalQuantityScheduleNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in physicalQuantityScheduleNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { physicalQuantityScheduleIDRef = item.Attributes["id"].Name; CommodityPhysicalQuantitySchedule ob = CommodityPhysicalQuantitySchedule(); IDManager.SetID(physicalQuantityScheduleIDRef, ob); } else if (item.Attributes.ToString() == "href") { physicalQuantityScheduleIDRef = item.Attributes["href"].Name; } else { physicalQuantitySchedule = new CommodityPhysicalQuantitySchedule(item); } } } XmlNodeList totalPhysicalQuantityNodeList = xmlNode.SelectNodes("totalPhysicalQuantity"); if (totalPhysicalQuantityNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in totalPhysicalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { totalPhysicalQuantityIDRef = item.Attributes["id"].Name; UnitQuantity ob = UnitQuantity(); IDManager.SetID(totalPhysicalQuantityIDRef, ob); } else if (item.Attributes.ToString() == "href") { totalPhysicalQuantityIDRef = item.Attributes["href"].Name; } else { totalPhysicalQuantity = new UnitQuantity(item); } } } }