Beispiel #1
0
        public ElectricityPhysicalLeg(XmlNode xmlNode)
            : base(xmlNode)
        {
            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);
                }
            }


            XmlNodeList settlementPeriodsNodeList = xmlNode.SelectNodes("settlementPeriods");

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


            XmlNode settlementPeriodsScheduleNode = xmlNode.SelectSingleNode("settlementPeriodsSchedule");

            if (settlementPeriodsScheduleNode != null)
            {
                if (settlementPeriodsScheduleNode.Attributes["href"] != null || settlementPeriodsScheduleNode.Attributes["id"] != null)
                {
                    if (settlementPeriodsScheduleNode.Attributes["id"] != null)
                    {
                        settlementPeriodsScheduleIDRef_ = settlementPeriodsScheduleNode.Attributes["id"].Value;
                        SettlementPeriodsSchedule ob = new SettlementPeriodsSchedule(settlementPeriodsScheduleNode);
                        IDManager.SetID(settlementPeriodsScheduleIDRef_, ob);
                    }
                    else if (settlementPeriodsScheduleNode.Attributes["href"] != null)
                    {
                        settlementPeriodsScheduleIDRef_ = settlementPeriodsScheduleNode.Attributes["href"].Value;
                    }
                    else
                    {
                        settlementPeriodsSchedule_ = new SettlementPeriodsSchedule(settlementPeriodsScheduleNode);
                    }
                }
                else
                {
                    settlementPeriodsSchedule_ = new SettlementPeriodsSchedule(settlementPeriodsScheduleNode);
                }
            }


            XmlNode loadTypeNode = xmlNode.SelectSingleNode("loadType");

            if (loadTypeNode != null)
            {
                if (loadTypeNode.Attributes["href"] != null || loadTypeNode.Attributes["id"] != null)
                {
                    if (loadTypeNode.Attributes["id"] != null)
                    {
                        loadTypeIDRef_ = loadTypeNode.Attributes["id"].Value;
                        LoadTypeEnum ob = new LoadTypeEnum(loadTypeNode);
                        IDManager.SetID(loadTypeIDRef_, ob);
                    }
                    else if (loadTypeNode.Attributes["href"] != null)
                    {
                        loadTypeIDRef_ = loadTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        loadType_ = new LoadTypeEnum(loadTypeNode);
                    }
                }
                else
                {
                    loadType_ = new LoadTypeEnum(loadTypeNode);
                }
            }


            XmlNode electricityNode = xmlNode.SelectSingleNode("electricity");

            if (electricityNode != null)
            {
                if (electricityNode.Attributes["href"] != null || electricityNode.Attributes["id"] != null)
                {
                    if (electricityNode.Attributes["id"] != null)
                    {
                        electricityIDRef_ = electricityNode.Attributes["id"].Value;
                        ElectricityProduct ob = new ElectricityProduct(electricityNode);
                        IDManager.SetID(electricityIDRef_, ob);
                    }
                    else if (electricityNode.Attributes["href"] != null)
                    {
                        electricityIDRef_ = electricityNode.Attributes["href"].Value;
                    }
                    else
                    {
                        electricity_ = new ElectricityProduct(electricityNode);
                    }
                }
                else
                {
                    electricity_ = new ElectricityProduct(electricityNode);
                }
            }


            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;
                        ElectricityDelivery ob = new ElectricityDelivery(deliveryConditionsNode);
                        IDManager.SetID(deliveryConditionsIDRef_, ob);
                    }
                    else if (deliveryConditionsNode.Attributes["href"] != null)
                    {
                        deliveryConditionsIDRef_ = deliveryConditionsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliveryConditions_ = new ElectricityDelivery(deliveryConditionsNode);
                    }
                }
                else
                {
                    deliveryConditions_ = new ElectricityDelivery(deliveryConditionsNode);
                }
            }


            XmlNode deliveryQuantityNode = xmlNode.SelectSingleNode("deliveryQuantity");

            if (deliveryQuantityNode != null)
            {
                if (deliveryQuantityNode.Attributes["href"] != null || deliveryQuantityNode.Attributes["id"] != null)
                {
                    if (deliveryQuantityNode.Attributes["id"] != null)
                    {
                        deliveryQuantityIDRef_ = deliveryQuantityNode.Attributes["id"].Value;
                        ElectricityPhysicalQuantity ob = new ElectricityPhysicalQuantity(deliveryQuantityNode);
                        IDManager.SetID(deliveryQuantityIDRef_, ob);
                    }
                    else if (deliveryQuantityNode.Attributes["href"] != null)
                    {
                        deliveryQuantityIDRef_ = deliveryQuantityNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliveryQuantity_ = new ElectricityPhysicalQuantity(deliveryQuantityNode);
                    }
                }
                else
                {
                    deliveryQuantity_ = new ElectricityPhysicalQuantity(deliveryQuantityNode);
                }
            }
        }
 public ElectricityPhysicalLeg(XmlNode xmlNode)
 : base(xmlNode)
 {
     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 settlementPeriodsNodeList = xmlNode.SelectNodes("settlementPeriods");
     
     foreach (XmlNode item in settlementPeriodsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 settlementPeriodsIDRef = item.Attributes["id"].Name;
                 List<SettlementPeriods> ob = new List<SettlementPeriods>();
                 ob.Add(new SettlementPeriods(item));
                 IDManager.SetID(settlementPeriodsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 settlementPeriodsIDRef = item.Attributes["href"].Name;
             }
             else
             {
             settlementPeriods.Add(new SettlementPeriods(item));
             }
         }
     }
     
 
     XmlNodeList settlementPeriodsScheduleNodeList = xmlNode.SelectNodes("settlementPeriodsSchedule");
     if (settlementPeriodsScheduleNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in settlementPeriodsScheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 settlementPeriodsScheduleIDRef = item.Attributes["id"].Name;
                 SettlementPeriodsSchedule ob = SettlementPeriodsSchedule();
                 IDManager.SetID(settlementPeriodsScheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 settlementPeriodsScheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 settlementPeriodsSchedule = new SettlementPeriodsSchedule(item);
             }
         }
     }
     
 
     XmlNodeList loadTypeNodeList = xmlNode.SelectNodes("loadType");
     if (loadTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in loadTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 loadTypeIDRef = item.Attributes["id"].Name;
                 LoadTypeEnum ob = LoadTypeEnum();
                 IDManager.SetID(loadTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 loadTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 loadType = new LoadTypeEnum(item);
             }
         }
     }
     
 
     XmlNodeList electricityNodeList = xmlNode.SelectNodes("electricity");
     if (electricityNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in electricityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 electricityIDRef = item.Attributes["id"].Name;
                 ElectricityProduct ob = ElectricityProduct();
                 IDManager.SetID(electricityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 electricityIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 electricity = new ElectricityProduct(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;
                 ElectricityDelivery ob = ElectricityDelivery();
                 IDManager.SetID(deliveryConditionsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryConditionsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryConditions = new ElectricityDelivery(item);
             }
         }
     }
     
 
     XmlNodeList deliveryQuantityNodeList = xmlNode.SelectNodes("deliveryQuantity");
     if (deliveryQuantityNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in deliveryQuantityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 deliveryQuantityIDRef = item.Attributes["id"].Name;
                 ElectricityPhysicalQuantity ob = ElectricityPhysicalQuantity();
                 IDManager.SetID(deliveryQuantityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryQuantityIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryQuantity = new ElectricityPhysicalQuantity(item);
             }
         }
     }
     
 
 }
 public ElectricityPhysicalLeg(XmlNode xmlNode)
 : base(xmlNode)
 {
     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);
         }
     }
     
 
     XmlNodeList settlementPeriodsNodeList = xmlNode.SelectNodes("settlementPeriods");
     
     if (settlementPeriodsNodeList != null)
     {
         this.settlementPeriods_ = new List<SettlementPeriods>();
         foreach (XmlNode item in settlementPeriodsNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     settlementPeriodsIDRef_ = item.Attributes["id"].Value;
                     settlementPeriods_.Add(new SettlementPeriods(item));
                     IDManager.SetID(settlementPeriodsIDRef_, settlementPeriods_[settlementPeriods_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     settlementPeriodsIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 settlementPeriods_.Add(new SettlementPeriods(item));
                 }
             }
             else
             {
                 settlementPeriods_.Add(new SettlementPeriods(item));
             }
         }
     }
     
 
     XmlNode settlementPeriodsScheduleNode = xmlNode.SelectSingleNode("settlementPeriodsSchedule");
     
     if (settlementPeriodsScheduleNode != null)
     {
         if (settlementPeriodsScheduleNode.Attributes["href"] != null || settlementPeriodsScheduleNode.Attributes["id"] != null) 
         {
             if (settlementPeriodsScheduleNode.Attributes["id"] != null) 
             {
                 settlementPeriodsScheduleIDRef_ = settlementPeriodsScheduleNode.Attributes["id"].Value;
                 SettlementPeriodsSchedule ob = new SettlementPeriodsSchedule(settlementPeriodsScheduleNode);
                 IDManager.SetID(settlementPeriodsScheduleIDRef_, ob);
             }
             else if (settlementPeriodsScheduleNode.Attributes["href"] != null)
             {
                 settlementPeriodsScheduleIDRef_ = settlementPeriodsScheduleNode.Attributes["href"].Value;
             }
             else
             {
                 settlementPeriodsSchedule_ = new SettlementPeriodsSchedule(settlementPeriodsScheduleNode);
             }
         }
         else
         {
             settlementPeriodsSchedule_ = new SettlementPeriodsSchedule(settlementPeriodsScheduleNode);
         }
     }
     
 
     XmlNode loadTypeNode = xmlNode.SelectSingleNode("loadType");
     
     if (loadTypeNode != null)
     {
         if (loadTypeNode.Attributes["href"] != null || loadTypeNode.Attributes["id"] != null) 
         {
             if (loadTypeNode.Attributes["id"] != null) 
             {
                 loadTypeIDRef_ = loadTypeNode.Attributes["id"].Value;
                 LoadTypeEnum ob = new LoadTypeEnum(loadTypeNode);
                 IDManager.SetID(loadTypeIDRef_, ob);
             }
             else if (loadTypeNode.Attributes["href"] != null)
             {
                 loadTypeIDRef_ = loadTypeNode.Attributes["href"].Value;
             }
             else
             {
                 loadType_ = new LoadTypeEnum(loadTypeNode);
             }
         }
         else
         {
             loadType_ = new LoadTypeEnum(loadTypeNode);
         }
     }
     
 
     XmlNode electricityNode = xmlNode.SelectSingleNode("electricity");
     
     if (electricityNode != null)
     {
         if (electricityNode.Attributes["href"] != null || electricityNode.Attributes["id"] != null) 
         {
             if (electricityNode.Attributes["id"] != null) 
             {
                 electricityIDRef_ = electricityNode.Attributes["id"].Value;
                 ElectricityProduct ob = new ElectricityProduct(electricityNode);
                 IDManager.SetID(electricityIDRef_, ob);
             }
             else if (electricityNode.Attributes["href"] != null)
             {
                 electricityIDRef_ = electricityNode.Attributes["href"].Value;
             }
             else
             {
                 electricity_ = new ElectricityProduct(electricityNode);
             }
         }
         else
         {
             electricity_ = new ElectricityProduct(electricityNode);
         }
     }
     
 
     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;
                 ElectricityDelivery ob = new ElectricityDelivery(deliveryConditionsNode);
                 IDManager.SetID(deliveryConditionsIDRef_, ob);
             }
             else if (deliveryConditionsNode.Attributes["href"] != null)
             {
                 deliveryConditionsIDRef_ = deliveryConditionsNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryConditions_ = new ElectricityDelivery(deliveryConditionsNode);
             }
         }
         else
         {
             deliveryConditions_ = new ElectricityDelivery(deliveryConditionsNode);
         }
     }
     
 
     XmlNode deliveryQuantityNode = xmlNode.SelectSingleNode("deliveryQuantity");
     
     if (deliveryQuantityNode != null)
     {
         if (deliveryQuantityNode.Attributes["href"] != null || deliveryQuantityNode.Attributes["id"] != null) 
         {
             if (deliveryQuantityNode.Attributes["id"] != null) 
             {
                 deliveryQuantityIDRef_ = deliveryQuantityNode.Attributes["id"].Value;
                 ElectricityPhysicalQuantity ob = new ElectricityPhysicalQuantity(deliveryQuantityNode);
                 IDManager.SetID(deliveryQuantityIDRef_, ob);
             }
             else if (deliveryQuantityNode.Attributes["href"] != null)
             {
                 deliveryQuantityIDRef_ = deliveryQuantityNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryQuantity_ = new ElectricityPhysicalQuantity(deliveryQuantityNode);
             }
         }
         else
         {
             deliveryQuantity_ = new ElectricityPhysicalQuantity(deliveryQuantityNode);
         }
     }
     
 
 }
Beispiel #4
0
        public ElectricityPhysicalLeg(XmlNode xmlNode)
            : base(xmlNode)
        {
            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 settlementPeriodsNodeList = xmlNode.SelectNodes("settlementPeriods");

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


            XmlNodeList settlementPeriodsScheduleNodeList = xmlNode.SelectNodes("settlementPeriodsSchedule");

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

            foreach (XmlNode item in settlementPeriodsScheduleNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        settlementPeriodsScheduleIDRef = item.Attributes["id"].Name;
                        SettlementPeriodsSchedule ob = SettlementPeriodsSchedule();
                        IDManager.SetID(settlementPeriodsScheduleIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        settlementPeriodsScheduleIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        settlementPeriodsSchedule = new SettlementPeriodsSchedule(item);
                    }
                }
            }


            XmlNodeList loadTypeNodeList = xmlNode.SelectNodes("loadType");

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

            foreach (XmlNode item in loadTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        loadTypeIDRef = item.Attributes["id"].Name;
                        LoadTypeEnum ob = LoadTypeEnum();
                        IDManager.SetID(loadTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        loadTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        loadType = new LoadTypeEnum(item);
                    }
                }
            }


            XmlNodeList electricityNodeList = xmlNode.SelectNodes("electricity");

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

            foreach (XmlNode item in electricityNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        electricityIDRef = item.Attributes["id"].Name;
                        ElectricityProduct ob = ElectricityProduct();
                        IDManager.SetID(electricityIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        electricityIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        electricity = new ElectricityProduct(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;
                        ElectricityDelivery ob = ElectricityDelivery();
                        IDManager.SetID(deliveryConditionsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        deliveryConditionsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        deliveryConditions = new ElectricityDelivery(item);
                    }
                }
            }


            XmlNodeList deliveryQuantityNodeList = xmlNode.SelectNodes("deliveryQuantity");

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

            foreach (XmlNode item in deliveryQuantityNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        deliveryQuantityIDRef = item.Attributes["id"].Name;
                        ElectricityPhysicalQuantity ob = ElectricityPhysicalQuantity();
                        IDManager.SetID(deliveryQuantityIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        deliveryQuantityIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        deliveryQuantity = new ElectricityPhysicalQuantity(item);
                    }
                }
            }
        }