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 ElectricityPhysicalQuantity(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList physicalQuantityNodeList = xmlNode.SelectNodes("physicalQuantity");

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


            XmlNodeList physicalQuantityScheduleNodeList = xmlNode.SelectNodes("physicalQuantitySchedule");

            foreach (XmlNode item in physicalQuantityScheduleNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        physicalQuantityScheduleIDRef = item.Attributes["id"].Name;
                        List <ElectricityPhysicalDeliveryQuantitySchedule> ob = new List <ElectricityPhysicalDeliveryQuantitySchedule>();
                        ob.Add(new ElectricityPhysicalDeliveryQuantitySchedule(item));
                        IDManager.SetID(physicalQuantityScheduleIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        physicalQuantityScheduleIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        physicalQuantitySchedule.Add(new ElectricityPhysicalDeliveryQuantitySchedule(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 EnvironmentalPhysicalLeg(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList numberOfAllowancesNodeList = xmlNode.SelectNodes("numberOfAllowances");

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

            foreach (XmlNode item in numberOfAllowancesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        numberOfAllowancesIDRef = item.Attributes["id"].Name;
                        UnitQuantity ob = UnitQuantity();
                        IDManager.SetID(numberOfAllowancesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        numberOfAllowancesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        numberOfAllowances = new UnitQuantity(item);
                    }
                }
            }


            XmlNodeList environmentalNodeList = xmlNode.SelectNodes("environmental");

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

            foreach (XmlNode item in environmentalNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        environmentalIDRef = item.Attributes["id"].Name;
                        EnvironmentalProduct ob = EnvironmentalProduct();
                        IDManager.SetID(environmentalIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        environmentalIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        environmental = new EnvironmentalProduct(item);
                    }
                }
            }


            XmlNodeList abandonmentOfSchemeNodeList = xmlNode.SelectNodes("abandonmentOfScheme");

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

            foreach (XmlNode item in abandonmentOfSchemeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        abandonmentOfSchemeIDRef = item.Attributes["id"].Name;
                        EnvironmentalAbandonmentOfSchemeEnum ob = EnvironmentalAbandonmentOfSchemeEnum();
                        IDManager.SetID(abandonmentOfSchemeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        abandonmentOfSchemeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        abandonmentOfScheme = new EnvironmentalAbandonmentOfSchemeEnum(item);
                    }
                }
            }


            XmlNodeList deliveryDateNodeList = xmlNode.SelectNodes("deliveryDate");

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

            foreach (XmlNode item in deliveryDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        deliveryDateIDRef = item.Attributes["id"].Name;
                        AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                        IDManager.SetID(deliveryDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        deliveryDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        deliveryDate = new AdjustableOrRelativeDate(item);
                    }
                }
            }


            XmlNodeList paymentDateNodeList = xmlNode.SelectNodes("paymentDate");

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

            foreach (XmlNode item in paymentDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        paymentDateIDRef = item.Attributes["id"].Name;
                        DateOffset ob = DateOffset();
                        IDManager.SetID(paymentDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        paymentDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        paymentDate = new DateOffset(item);
                    }
                }
            }


            XmlNodeList businessCentersReferenceNodeList = xmlNode.SelectNodes("businessCentersReference");

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

            foreach (XmlNode item in businessCentersReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        businessCentersReferenceIDRef = item.Attributes["id"].Name;
                        BusinessCentersReference ob = BusinessCentersReference();
                        IDManager.SetID(businessCentersReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        businessCentersReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        businessCentersReference = new BusinessCentersReference(item);
                    }
                }
            }


            XmlNodeList businessCentersNodeList = xmlNode.SelectNodes("businessCenters");

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

            foreach (XmlNode item in businessCentersNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        businessCentersIDRef = item.Attributes["id"].Name;
                        BusinessCenters ob = BusinessCenters();
                        IDManager.SetID(businessCentersIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        businessCentersIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        businessCenters = new BusinessCenters(item);
                    }
                }
            }


            XmlNodeList failureToDeliverApplicableNodeList = xmlNode.SelectNodes("failureToDeliverApplicable");

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

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


            XmlNodeList eEPParametersNodeList = xmlNode.SelectNodes("eEPParameters");

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

            foreach (XmlNode item in eEPParametersNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        eEPParametersIDRef = item.Attributes["id"].Name;
                        EEPParameters ob = EEPParameters();
                        IDManager.SetID(eEPParametersIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        eEPParametersIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        eEPParameters = new EEPParameters(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);
                }
            }
        }
示例#5
0
        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);
                    }
                }
            }
        }
示例#6
0
        public ElectricityPhysicalQuantity(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList physicalQuantityNodeList = xmlNode.SelectNodes("physicalQuantity");

            if (physicalQuantityNodeList != null)
            {
                this.physicalQuantity_ = new List <ElectricityPhysicalDeliveryQuantity>();
                foreach (XmlNode item in physicalQuantityNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            physicalQuantityIDRef_ = item.Attributes["id"].Value;
                            physicalQuantity_.Add(new ElectricityPhysicalDeliveryQuantity(item));
                            IDManager.SetID(physicalQuantityIDRef_, physicalQuantity_[physicalQuantity_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            physicalQuantityIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            physicalQuantity_.Add(new ElectricityPhysicalDeliveryQuantity(item));
                        }
                    }
                    else
                    {
                        physicalQuantity_.Add(new ElectricityPhysicalDeliveryQuantity(item));
                    }
                }
            }


            XmlNodeList physicalQuantityScheduleNodeList = xmlNode.SelectNodes("physicalQuantitySchedule");

            if (physicalQuantityScheduleNodeList != null)
            {
                this.physicalQuantitySchedule_ = new List <ElectricityPhysicalDeliveryQuantitySchedule>();
                foreach (XmlNode item in physicalQuantityScheduleNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            physicalQuantityScheduleIDRef_ = item.Attributes["id"].Value;
                            physicalQuantitySchedule_.Add(new ElectricityPhysicalDeliveryQuantitySchedule(item));
                            IDManager.SetID(physicalQuantityScheduleIDRef_, physicalQuantitySchedule_[physicalQuantitySchedule_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            physicalQuantityScheduleIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            physicalQuantitySchedule_.Add(new ElectricityPhysicalDeliveryQuantitySchedule(item));
                        }
                    }
                    else
                    {
                        physicalQuantitySchedule_.Add(new ElectricityPhysicalDeliveryQuantitySchedule(item));
                    }
                }
            }


            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 EnvironmentalPhysicalLeg(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList numberOfAllowancesNodeList = xmlNode.SelectNodes("numberOfAllowances");
     if (numberOfAllowancesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in numberOfAllowancesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 numberOfAllowancesIDRef = item.Attributes["id"].Name;
                 UnitQuantity ob = UnitQuantity();
                 IDManager.SetID(numberOfAllowancesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 numberOfAllowancesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 numberOfAllowances = new UnitQuantity(item);
             }
         }
     }
     
 
     XmlNodeList environmentalNodeList = xmlNode.SelectNodes("environmental");
     if (environmentalNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in environmentalNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 environmentalIDRef = item.Attributes["id"].Name;
                 EnvironmentalProduct ob = EnvironmentalProduct();
                 IDManager.SetID(environmentalIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 environmentalIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 environmental = new EnvironmentalProduct(item);
             }
         }
     }
     
 
     XmlNodeList abandonmentOfSchemeNodeList = xmlNode.SelectNodes("abandonmentOfScheme");
     if (abandonmentOfSchemeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in abandonmentOfSchemeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 abandonmentOfSchemeIDRef = item.Attributes["id"].Name;
                 EnvironmentalAbandonmentOfSchemeEnum ob = EnvironmentalAbandonmentOfSchemeEnum();
                 IDManager.SetID(abandonmentOfSchemeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 abandonmentOfSchemeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 abandonmentOfScheme = new EnvironmentalAbandonmentOfSchemeEnum(item);
             }
         }
     }
     
 
     XmlNodeList deliveryDateNodeList = xmlNode.SelectNodes("deliveryDate");
     if (deliveryDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in deliveryDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 deliveryDateIDRef = item.Attributes["id"].Name;
                 AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                 IDManager.SetID(deliveryDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryDate = new AdjustableOrRelativeDate(item);
             }
         }
     }
     
 
     XmlNodeList paymentDateNodeList = xmlNode.SelectNodes("paymentDate");
     if (paymentDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentDateIDRef = item.Attributes["id"].Name;
                 DateOffset ob = DateOffset();
                 IDManager.SetID(paymentDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentDate = new DateOffset(item);
             }
         }
     }
     
 
     XmlNodeList businessCentersReferenceNodeList = xmlNode.SelectNodes("businessCentersReference");
     if (businessCentersReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in businessCentersReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 businessCentersReferenceIDRef = item.Attributes["id"].Name;
                 BusinessCentersReference ob = BusinessCentersReference();
                 IDManager.SetID(businessCentersReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 businessCentersReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 businessCentersReference = new BusinessCentersReference(item);
             }
         }
     }
     
 
     XmlNodeList businessCentersNodeList = xmlNode.SelectNodes("businessCenters");
     if (businessCentersNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in businessCentersNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 businessCentersIDRef = item.Attributes["id"].Name;
                 BusinessCenters ob = BusinessCenters();
                 IDManager.SetID(businessCentersIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 businessCentersIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 businessCenters = new BusinessCenters(item);
             }
         }
     }
     
 
     XmlNodeList failureToDeliverApplicableNodeList = xmlNode.SelectNodes("failureToDeliverApplicable");
     if (failureToDeliverApplicableNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in failureToDeliverApplicableNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 failureToDeliverApplicableIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(failureToDeliverApplicableIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 failureToDeliverApplicableIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 failureToDeliverApplicable = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList eEPParametersNodeList = xmlNode.SelectNodes("eEPParameters");
     if (eEPParametersNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in eEPParametersNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 eEPParametersIDRef = item.Attributes["id"].Name;
                 EEPParameters ob = EEPParameters();
                 IDManager.SetID(eEPParametersIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 eEPParametersIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 eEPParameters = new EEPParameters(item);
             }
         }
     }
     
 
 }
 public ElectricityPhysicalQuantity(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList physicalQuantityNodeList = xmlNode.SelectNodes("physicalQuantity");
     
     foreach (XmlNode item in physicalQuantityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 physicalQuantityIDRef = item.Attributes["id"].Name;
                 List<ElectricityPhysicalDeliveryQuantity> ob = new List<ElectricityPhysicalDeliveryQuantity>();
                 ob.Add(new ElectricityPhysicalDeliveryQuantity(item));
                 IDManager.SetID(physicalQuantityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 physicalQuantityIDRef = item.Attributes["href"].Name;
             }
             else
             {
             physicalQuantity.Add(new ElectricityPhysicalDeliveryQuantity(item));
             }
         }
     }
     
 
     XmlNodeList physicalQuantityScheduleNodeList = xmlNode.SelectNodes("physicalQuantitySchedule");
     
     foreach (XmlNode item in physicalQuantityScheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 physicalQuantityScheduleIDRef = item.Attributes["id"].Name;
                 List<ElectricityPhysicalDeliveryQuantitySchedule> ob = new List<ElectricityPhysicalDeliveryQuantitySchedule>();
                 ob.Add(new ElectricityPhysicalDeliveryQuantitySchedule(item));
                 IDManager.SetID(physicalQuantityScheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 physicalQuantityScheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
             physicalQuantitySchedule.Add(new ElectricityPhysicalDeliveryQuantitySchedule(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 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 EnvironmentalPhysicalLeg(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode numberOfAllowancesNode = xmlNode.SelectSingleNode("numberOfAllowances");

            if (numberOfAllowancesNode != null)
            {
                if (numberOfAllowancesNode.Attributes["href"] != null || numberOfAllowancesNode.Attributes["id"] != null)
                {
                    if (numberOfAllowancesNode.Attributes["id"] != null)
                    {
                        numberOfAllowancesIDRef_ = numberOfAllowancesNode.Attributes["id"].Value;
                        UnitQuantity ob = new UnitQuantity(numberOfAllowancesNode);
                        IDManager.SetID(numberOfAllowancesIDRef_, ob);
                    }
                    else if (numberOfAllowancesNode.Attributes["href"] != null)
                    {
                        numberOfAllowancesIDRef_ = numberOfAllowancesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        numberOfAllowances_ = new UnitQuantity(numberOfAllowancesNode);
                    }
                }
                else
                {
                    numberOfAllowances_ = new UnitQuantity(numberOfAllowancesNode);
                }
            }


            XmlNode environmentalNode = xmlNode.SelectSingleNode("environmental");

            if (environmentalNode != null)
            {
                if (environmentalNode.Attributes["href"] != null || environmentalNode.Attributes["id"] != null)
                {
                    if (environmentalNode.Attributes["id"] != null)
                    {
                        environmentalIDRef_ = environmentalNode.Attributes["id"].Value;
                        EnvironmentalProduct ob = new EnvironmentalProduct(environmentalNode);
                        IDManager.SetID(environmentalIDRef_, ob);
                    }
                    else if (environmentalNode.Attributes["href"] != null)
                    {
                        environmentalIDRef_ = environmentalNode.Attributes["href"].Value;
                    }
                    else
                    {
                        environmental_ = new EnvironmentalProduct(environmentalNode);
                    }
                }
                else
                {
                    environmental_ = new EnvironmentalProduct(environmentalNode);
                }
            }


            XmlNode abandonmentOfSchemeNode = xmlNode.SelectSingleNode("abandonmentOfScheme");

            if (abandonmentOfSchemeNode != null)
            {
                if (abandonmentOfSchemeNode.Attributes["href"] != null || abandonmentOfSchemeNode.Attributes["id"] != null)
                {
                    if (abandonmentOfSchemeNode.Attributes["id"] != null)
                    {
                        abandonmentOfSchemeIDRef_ = abandonmentOfSchemeNode.Attributes["id"].Value;
                        EnvironmentalAbandonmentOfSchemeEnum ob = new EnvironmentalAbandonmentOfSchemeEnum(abandonmentOfSchemeNode);
                        IDManager.SetID(abandonmentOfSchemeIDRef_, ob);
                    }
                    else if (abandonmentOfSchemeNode.Attributes["href"] != null)
                    {
                        abandonmentOfSchemeIDRef_ = abandonmentOfSchemeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        abandonmentOfScheme_ = new EnvironmentalAbandonmentOfSchemeEnum(abandonmentOfSchemeNode);
                    }
                }
                else
                {
                    abandonmentOfScheme_ = new EnvironmentalAbandonmentOfSchemeEnum(abandonmentOfSchemeNode);
                }
            }


            XmlNode deliveryDateNode = xmlNode.SelectSingleNode("deliveryDate");

            if (deliveryDateNode != null)
            {
                if (deliveryDateNode.Attributes["href"] != null || deliveryDateNode.Attributes["id"] != null)
                {
                    if (deliveryDateNode.Attributes["id"] != null)
                    {
                        deliveryDateIDRef_ = deliveryDateNode.Attributes["id"].Value;
                        AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(deliveryDateNode);
                        IDManager.SetID(deliveryDateIDRef_, ob);
                    }
                    else if (deliveryDateNode.Attributes["href"] != null)
                    {
                        deliveryDateIDRef_ = deliveryDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliveryDate_ = new AdjustableOrRelativeDate(deliveryDateNode);
                    }
                }
                else
                {
                    deliveryDate_ = new AdjustableOrRelativeDate(deliveryDateNode);
                }
            }


            XmlNode paymentDateNode = xmlNode.SelectSingleNode("paymentDate");

            if (paymentDateNode != null)
            {
                if (paymentDateNode.Attributes["href"] != null || paymentDateNode.Attributes["id"] != null)
                {
                    if (paymentDateNode.Attributes["id"] != null)
                    {
                        paymentDateIDRef_ = paymentDateNode.Attributes["id"].Value;
                        DateOffset ob = new DateOffset(paymentDateNode);
                        IDManager.SetID(paymentDateIDRef_, ob);
                    }
                    else if (paymentDateNode.Attributes["href"] != null)
                    {
                        paymentDateIDRef_ = paymentDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        paymentDate_ = new DateOffset(paymentDateNode);
                    }
                }
                else
                {
                    paymentDate_ = new DateOffset(paymentDateNode);
                }
            }


            XmlNode businessCentersReferenceNode = xmlNode.SelectSingleNode("businessCentersReference");

            if (businessCentersReferenceNode != null)
            {
                if (businessCentersReferenceNode.Attributes["href"] != null || businessCentersReferenceNode.Attributes["id"] != null)
                {
                    if (businessCentersReferenceNode.Attributes["id"] != null)
                    {
                        businessCentersReferenceIDRef_ = businessCentersReferenceNode.Attributes["id"].Value;
                        BusinessCentersReference ob = new BusinessCentersReference(businessCentersReferenceNode);
                        IDManager.SetID(businessCentersReferenceIDRef_, ob);
                    }
                    else if (businessCentersReferenceNode.Attributes["href"] != null)
                    {
                        businessCentersReferenceIDRef_ = businessCentersReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        businessCentersReference_ = new BusinessCentersReference(businessCentersReferenceNode);
                    }
                }
                else
                {
                    businessCentersReference_ = new BusinessCentersReference(businessCentersReferenceNode);
                }
            }


            XmlNode businessCentersNode = xmlNode.SelectSingleNode("businessCenters");

            if (businessCentersNode != null)
            {
                if (businessCentersNode.Attributes["href"] != null || businessCentersNode.Attributes["id"] != null)
                {
                    if (businessCentersNode.Attributes["id"] != null)
                    {
                        businessCentersIDRef_ = businessCentersNode.Attributes["id"].Value;
                        BusinessCenters ob = new BusinessCenters(businessCentersNode);
                        IDManager.SetID(businessCentersIDRef_, ob);
                    }
                    else if (businessCentersNode.Attributes["href"] != null)
                    {
                        businessCentersIDRef_ = businessCentersNode.Attributes["href"].Value;
                    }
                    else
                    {
                        businessCenters_ = new BusinessCenters(businessCentersNode);
                    }
                }
                else
                {
                    businessCenters_ = new BusinessCenters(businessCentersNode);
                }
            }


            XmlNode failureToDeliverApplicableNode = xmlNode.SelectSingleNode("failureToDeliverApplicable");

            if (failureToDeliverApplicableNode != null)
            {
                if (failureToDeliverApplicableNode.Attributes["href"] != null || failureToDeliverApplicableNode.Attributes["id"] != null)
                {
                    if (failureToDeliverApplicableNode.Attributes["id"] != null)
                    {
                        failureToDeliverApplicableIDRef_ = failureToDeliverApplicableNode.Attributes["id"].Value;
                        XsdTypeBoolean ob = new XsdTypeBoolean(failureToDeliverApplicableNode);
                        IDManager.SetID(failureToDeliverApplicableIDRef_, ob);
                    }
                    else if (failureToDeliverApplicableNode.Attributes["href"] != null)
                    {
                        failureToDeliverApplicableIDRef_ = failureToDeliverApplicableNode.Attributes["href"].Value;
                    }
                    else
                    {
                        failureToDeliverApplicable_ = new XsdTypeBoolean(failureToDeliverApplicableNode);
                    }
                }
                else
                {
                    failureToDeliverApplicable_ = new XsdTypeBoolean(failureToDeliverApplicableNode);
                }
            }


            XmlNode eEPParametersNode = xmlNode.SelectSingleNode("eEPParameters");

            if (eEPParametersNode != null)
            {
                if (eEPParametersNode.Attributes["href"] != null || eEPParametersNode.Attributes["id"] != null)
                {
                    if (eEPParametersNode.Attributes["id"] != null)
                    {
                        eEPParametersIDRef_ = eEPParametersNode.Attributes["id"].Value;
                        EEPParameters ob = new EEPParameters(eEPParametersNode);
                        IDManager.SetID(eEPParametersIDRef_, ob);
                    }
                    else if (eEPParametersNode.Attributes["href"] != null)
                    {
                        eEPParametersIDRef_ = eEPParametersNode.Attributes["href"].Value;
                    }
                    else
                    {
                        eEPParameters_ = new EEPParameters(eEPParametersNode);
                    }
                }
                else
                {
                    eEPParameters_ = new EEPParameters(eEPParametersNode);
                }
            }
        }
示例#12
0
        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 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 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 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 ElectricityPhysicalQuantity(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList physicalQuantityNodeList = xmlNode.SelectNodes("physicalQuantity");
     
     if (physicalQuantityNodeList != null)
     {
         this.physicalQuantity_ = new List<ElectricityPhysicalDeliveryQuantity>();
         foreach (XmlNode item in physicalQuantityNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     physicalQuantityIDRef_ = item.Attributes["id"].Value;
                     physicalQuantity_.Add(new ElectricityPhysicalDeliveryQuantity(item));
                     IDManager.SetID(physicalQuantityIDRef_, physicalQuantity_[physicalQuantity_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     physicalQuantityIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 physicalQuantity_.Add(new ElectricityPhysicalDeliveryQuantity(item));
                 }
             }
             else
             {
                 physicalQuantity_.Add(new ElectricityPhysicalDeliveryQuantity(item));
             }
         }
     }
     
 
     XmlNodeList physicalQuantityScheduleNodeList = xmlNode.SelectNodes("physicalQuantitySchedule");
     
     if (physicalQuantityScheduleNodeList != null)
     {
         this.physicalQuantitySchedule_ = new List<ElectricityPhysicalDeliveryQuantitySchedule>();
         foreach (XmlNode item in physicalQuantityScheduleNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     physicalQuantityScheduleIDRef_ = item.Attributes["id"].Value;
                     physicalQuantitySchedule_.Add(new ElectricityPhysicalDeliveryQuantitySchedule(item));
                     IDManager.SetID(physicalQuantityScheduleIDRef_, physicalQuantitySchedule_[physicalQuantitySchedule_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     physicalQuantityScheduleIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 physicalQuantitySchedule_.Add(new ElectricityPhysicalDeliveryQuantitySchedule(item));
                 }
             }
             else
             {
                 physicalQuantitySchedule_.Add(new ElectricityPhysicalDeliveryQuantitySchedule(item));
             }
         }
     }
     
 
     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);
         }
     }
     
 
 }
示例#19
0
        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);
                    }
                }
            }
        }
示例#20
0
        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 EnvironmentalPhysicalLeg(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode numberOfAllowancesNode = xmlNode.SelectSingleNode("numberOfAllowances");
     
     if (numberOfAllowancesNode != null)
     {
         if (numberOfAllowancesNode.Attributes["href"] != null || numberOfAllowancesNode.Attributes["id"] != null) 
         {
             if (numberOfAllowancesNode.Attributes["id"] != null) 
             {
                 numberOfAllowancesIDRef_ = numberOfAllowancesNode.Attributes["id"].Value;
                 UnitQuantity ob = new UnitQuantity(numberOfAllowancesNode);
                 IDManager.SetID(numberOfAllowancesIDRef_, ob);
             }
             else if (numberOfAllowancesNode.Attributes["href"] != null)
             {
                 numberOfAllowancesIDRef_ = numberOfAllowancesNode.Attributes["href"].Value;
             }
             else
             {
                 numberOfAllowances_ = new UnitQuantity(numberOfAllowancesNode);
             }
         }
         else
         {
             numberOfAllowances_ = new UnitQuantity(numberOfAllowancesNode);
         }
     }
     
 
     XmlNode environmentalNode = xmlNode.SelectSingleNode("environmental");
     
     if (environmentalNode != null)
     {
         if (environmentalNode.Attributes["href"] != null || environmentalNode.Attributes["id"] != null) 
         {
             if (environmentalNode.Attributes["id"] != null) 
             {
                 environmentalIDRef_ = environmentalNode.Attributes["id"].Value;
                 EnvironmentalProduct ob = new EnvironmentalProduct(environmentalNode);
                 IDManager.SetID(environmentalIDRef_, ob);
             }
             else if (environmentalNode.Attributes["href"] != null)
             {
                 environmentalIDRef_ = environmentalNode.Attributes["href"].Value;
             }
             else
             {
                 environmental_ = new EnvironmentalProduct(environmentalNode);
             }
         }
         else
         {
             environmental_ = new EnvironmentalProduct(environmentalNode);
         }
     }
     
 
     XmlNode abandonmentOfSchemeNode = xmlNode.SelectSingleNode("abandonmentOfScheme");
     
     if (abandonmentOfSchemeNode != null)
     {
         if (abandonmentOfSchemeNode.Attributes["href"] != null || abandonmentOfSchemeNode.Attributes["id"] != null) 
         {
             if (abandonmentOfSchemeNode.Attributes["id"] != null) 
             {
                 abandonmentOfSchemeIDRef_ = abandonmentOfSchemeNode.Attributes["id"].Value;
                 EnvironmentalAbandonmentOfSchemeEnum ob = new EnvironmentalAbandonmentOfSchemeEnum(abandonmentOfSchemeNode);
                 IDManager.SetID(abandonmentOfSchemeIDRef_, ob);
             }
             else if (abandonmentOfSchemeNode.Attributes["href"] != null)
             {
                 abandonmentOfSchemeIDRef_ = abandonmentOfSchemeNode.Attributes["href"].Value;
             }
             else
             {
                 abandonmentOfScheme_ = new EnvironmentalAbandonmentOfSchemeEnum(abandonmentOfSchemeNode);
             }
         }
         else
         {
             abandonmentOfScheme_ = new EnvironmentalAbandonmentOfSchemeEnum(abandonmentOfSchemeNode);
         }
     }
     
 
     XmlNode deliveryDateNode = xmlNode.SelectSingleNode("deliveryDate");
     
     if (deliveryDateNode != null)
     {
         if (deliveryDateNode.Attributes["href"] != null || deliveryDateNode.Attributes["id"] != null) 
         {
             if (deliveryDateNode.Attributes["id"] != null) 
             {
                 deliveryDateIDRef_ = deliveryDateNode.Attributes["id"].Value;
                 AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(deliveryDateNode);
                 IDManager.SetID(deliveryDateIDRef_, ob);
             }
             else if (deliveryDateNode.Attributes["href"] != null)
             {
                 deliveryDateIDRef_ = deliveryDateNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryDate_ = new AdjustableOrRelativeDate(deliveryDateNode);
             }
         }
         else
         {
             deliveryDate_ = new AdjustableOrRelativeDate(deliveryDateNode);
         }
     }
     
 
     XmlNode paymentDateNode = xmlNode.SelectSingleNode("paymentDate");
     
     if (paymentDateNode != null)
     {
         if (paymentDateNode.Attributes["href"] != null || paymentDateNode.Attributes["id"] != null) 
         {
             if (paymentDateNode.Attributes["id"] != null) 
             {
                 paymentDateIDRef_ = paymentDateNode.Attributes["id"].Value;
                 DateOffset ob = new DateOffset(paymentDateNode);
                 IDManager.SetID(paymentDateIDRef_, ob);
             }
             else if (paymentDateNode.Attributes["href"] != null)
             {
                 paymentDateIDRef_ = paymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 paymentDate_ = new DateOffset(paymentDateNode);
             }
         }
         else
         {
             paymentDate_ = new DateOffset(paymentDateNode);
         }
     }
     
 
     XmlNode businessCentersReferenceNode = xmlNode.SelectSingleNode("businessCentersReference");
     
     if (businessCentersReferenceNode != null)
     {
         if (businessCentersReferenceNode.Attributes["href"] != null || businessCentersReferenceNode.Attributes["id"] != null) 
         {
             if (businessCentersReferenceNode.Attributes["id"] != null) 
             {
                 businessCentersReferenceIDRef_ = businessCentersReferenceNode.Attributes["id"].Value;
                 BusinessCentersReference ob = new BusinessCentersReference(businessCentersReferenceNode);
                 IDManager.SetID(businessCentersReferenceIDRef_, ob);
             }
             else if (businessCentersReferenceNode.Attributes["href"] != null)
             {
                 businessCentersReferenceIDRef_ = businessCentersReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 businessCentersReference_ = new BusinessCentersReference(businessCentersReferenceNode);
             }
         }
         else
         {
             businessCentersReference_ = new BusinessCentersReference(businessCentersReferenceNode);
         }
     }
     
 
     XmlNode businessCentersNode = xmlNode.SelectSingleNode("businessCenters");
     
     if (businessCentersNode != null)
     {
         if (businessCentersNode.Attributes["href"] != null || businessCentersNode.Attributes["id"] != null) 
         {
             if (businessCentersNode.Attributes["id"] != null) 
             {
                 businessCentersIDRef_ = businessCentersNode.Attributes["id"].Value;
                 BusinessCenters ob = new BusinessCenters(businessCentersNode);
                 IDManager.SetID(businessCentersIDRef_, ob);
             }
             else if (businessCentersNode.Attributes["href"] != null)
             {
                 businessCentersIDRef_ = businessCentersNode.Attributes["href"].Value;
             }
             else
             {
                 businessCenters_ = new BusinessCenters(businessCentersNode);
             }
         }
         else
         {
             businessCenters_ = new BusinessCenters(businessCentersNode);
         }
     }
     
 
     XmlNode failureToDeliverApplicableNode = xmlNode.SelectSingleNode("failureToDeliverApplicable");
     
     if (failureToDeliverApplicableNode != null)
     {
         if (failureToDeliverApplicableNode.Attributes["href"] != null || failureToDeliverApplicableNode.Attributes["id"] != null) 
         {
             if (failureToDeliverApplicableNode.Attributes["id"] != null) 
             {
                 failureToDeliverApplicableIDRef_ = failureToDeliverApplicableNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(failureToDeliverApplicableNode);
                 IDManager.SetID(failureToDeliverApplicableIDRef_, ob);
             }
             else if (failureToDeliverApplicableNode.Attributes["href"] != null)
             {
                 failureToDeliverApplicableIDRef_ = failureToDeliverApplicableNode.Attributes["href"].Value;
             }
             else
             {
                 failureToDeliverApplicable_ = new XsdTypeBoolean(failureToDeliverApplicableNode);
             }
         }
         else
         {
             failureToDeliverApplicable_ = new XsdTypeBoolean(failureToDeliverApplicableNode);
         }
     }
     
 
     XmlNode eEPParametersNode = xmlNode.SelectSingleNode("eEPParameters");
     
     if (eEPParametersNode != null)
     {
         if (eEPParametersNode.Attributes["href"] != null || eEPParametersNode.Attributes["id"] != null) 
         {
             if (eEPParametersNode.Attributes["id"] != null) 
             {
                 eEPParametersIDRef_ = eEPParametersNode.Attributes["id"].Value;
                 EEPParameters ob = new EEPParameters(eEPParametersNode);
                 IDManager.SetID(eEPParametersIDRef_, ob);
             }
             else if (eEPParametersNode.Attributes["href"] != null)
             {
                 eEPParametersIDRef_ = eEPParametersNode.Attributes["href"].Value;
             }
             else
             {
                 eEPParameters_ = new EEPParameters(eEPParametersNode);
             }
         }
         else
         {
             eEPParameters_ = new EEPParameters(eEPParametersNode);
         }
     }
     
 
 }
 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 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);
         }
     }
     
 
 }
示例#24
0
        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);
                    }
                }
            }
        }