public ElectricityDelivery(XmlNode xmlNode)
        {
            XmlNode deliveryPointNode = xmlNode.SelectSingleNode("deliveryPoint");

            if (deliveryPointNode != null)
            {
                if (deliveryPointNode.Attributes["href"] != null || deliveryPointNode.Attributes["id"] != null)
                {
                    if (deliveryPointNode.Attributes["id"] != null)
                    {
                        deliveryPointIDRef_ = deliveryPointNode.Attributes["id"].Value;
                        ElectricityDeliveryPoint ob = new ElectricityDeliveryPoint(deliveryPointNode);
                        IDManager.SetID(deliveryPointIDRef_, ob);
                    }
                    else if (deliveryPointNode.Attributes["href"] != null)
                    {
                        deliveryPointIDRef_ = deliveryPointNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliveryPoint_ = new ElectricityDeliveryPoint(deliveryPointNode);
                    }
                }
                else
                {
                    deliveryPoint_ = new ElectricityDeliveryPoint(deliveryPointNode);
                }
            }


            XmlNode deliveryTypeNode = xmlNode.SelectSingleNode("deliveryType");

            if (deliveryTypeNode != null)
            {
                if (deliveryTypeNode.Attributes["href"] != null || deliveryTypeNode.Attributes["id"] != null)
                {
                    if (deliveryTypeNode.Attributes["id"] != null)
                    {
                        deliveryTypeIDRef_ = deliveryTypeNode.Attributes["id"].Value;
                        ElectricityDeliveryType ob = new ElectricityDeliveryType(deliveryTypeNode);
                        IDManager.SetID(deliveryTypeIDRef_, ob);
                    }
                    else if (deliveryTypeNode.Attributes["href"] != null)
                    {
                        deliveryTypeIDRef_ = deliveryTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliveryType_ = new ElectricityDeliveryType(deliveryTypeNode);
                    }
                }
                else
                {
                    deliveryType_ = new ElectricityDeliveryType(deliveryTypeNode);
                }
            }


            XmlNode transmissionContingencyNode = xmlNode.SelectSingleNode("transmissionContingency");

            if (transmissionContingencyNode != null)
            {
                if (transmissionContingencyNode.Attributes["href"] != null || transmissionContingencyNode.Attributes["id"] != null)
                {
                    if (transmissionContingencyNode.Attributes["id"] != null)
                    {
                        transmissionContingencyIDRef_ = transmissionContingencyNode.Attributes["id"].Value;
                        ElectricityTransmissionContingency ob = new ElectricityTransmissionContingency(transmissionContingencyNode);
                        IDManager.SetID(transmissionContingencyIDRef_, ob);
                    }
                    else if (transmissionContingencyNode.Attributes["href"] != null)
                    {
                        transmissionContingencyIDRef_ = transmissionContingencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        transmissionContingency_ = new ElectricityTransmissionContingency(transmissionContingencyNode);
                    }
                }
                else
                {
                    transmissionContingency_ = new ElectricityTransmissionContingency(transmissionContingencyNode);
                }
            }


            XmlNode deliveryZoneNode = xmlNode.SelectSingleNode("deliveryZone");

            if (deliveryZoneNode != null)
            {
                if (deliveryZoneNode.Attributes["href"] != null || deliveryZoneNode.Attributes["id"] != null)
                {
                    if (deliveryZoneNode.Attributes["id"] != null)
                    {
                        deliveryZoneIDRef_ = deliveryZoneNode.Attributes["id"].Value;
                        CommodityDeliveryPoint ob = new CommodityDeliveryPoint(deliveryZoneNode);
                        IDManager.SetID(deliveryZoneIDRef_, ob);
                    }
                    else if (deliveryZoneNode.Attributes["href"] != null)
                    {
                        deliveryZoneIDRef_ = deliveryZoneNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliveryZone_ = new CommodityDeliveryPoint(deliveryZoneNode);
                    }
                }
                else
                {
                    deliveryZone_ = new CommodityDeliveryPoint(deliveryZoneNode);
                }
            }


            XmlNode electingPartyReferenceNode = xmlNode.SelectSingleNode("electingPartyReference");

            if (electingPartyReferenceNode != null)
            {
                if (electingPartyReferenceNode.Attributes["href"] != null || electingPartyReferenceNode.Attributes["id"] != null)
                {
                    if (electingPartyReferenceNode.Attributes["id"] != null)
                    {
                        electingPartyReferenceIDRef_ = electingPartyReferenceNode.Attributes["id"].Value;
                        PartyReference ob = new PartyReference(electingPartyReferenceNode);
                        IDManager.SetID(electingPartyReferenceIDRef_, ob);
                    }
                    else if (electingPartyReferenceNode.Attributes["href"] != null)
                    {
                        electingPartyReferenceIDRef_ = electingPartyReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        electingPartyReference_ = new PartyReference(electingPartyReferenceNode);
                    }
                }
                else
                {
                    electingPartyReference_ = new PartyReference(electingPartyReferenceNode);
                }
            }
        }
 public ElectricityDelivery(XmlNode xmlNode)
 {
     XmlNodeList deliveryPointNodeList = xmlNode.SelectNodes("deliveryPoint");
     if (deliveryPointNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in deliveryPointNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 deliveryPointIDRef = item.Attributes["id"].Name;
                 ElectricityDeliveryPoint ob = ElectricityDeliveryPoint();
                 IDManager.SetID(deliveryPointIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryPointIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryPoint = new ElectricityDeliveryPoint(item);
             }
         }
     }
     
 
     XmlNodeList deliveryTypeNodeList = xmlNode.SelectNodes("deliveryType");
     if (deliveryTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in deliveryTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 deliveryTypeIDRef = item.Attributes["id"].Name;
                 ElectricityDeliveryType ob = ElectricityDeliveryType();
                 IDManager.SetID(deliveryTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryType = new ElectricityDeliveryType(item);
             }
         }
     }
     
 
     XmlNodeList transmissionContingencyNodeList = xmlNode.SelectNodes("transmissionContingency");
     if (transmissionContingencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in transmissionContingencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 transmissionContingencyIDRef = item.Attributes["id"].Name;
                 ElectricityTransmissionContingency ob = ElectricityTransmissionContingency();
                 IDManager.SetID(transmissionContingencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 transmissionContingencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 transmissionContingency = new ElectricityTransmissionContingency(item);
             }
         }
     }
     
 
     XmlNodeList deliveryZoneNodeList = xmlNode.SelectNodes("deliveryZone");
     if (deliveryZoneNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in deliveryZoneNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 deliveryZoneIDRef = item.Attributes["id"].Name;
                 CommodityDeliveryPoint ob = CommodityDeliveryPoint();
                 IDManager.SetID(deliveryZoneIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryZoneIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryZone = new CommodityDeliveryPoint(item);
             }
         }
     }
     
 
     XmlNodeList electingPartyReferenceNodeList = xmlNode.SelectNodes("electingPartyReference");
     if (electingPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in electingPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 electingPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(electingPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 electingPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 electingPartyReference = new PartyReference(item);
             }
         }
     }
     
 
 }
Esempio n. 3
0
        public ElectricityDelivery(XmlNode xmlNode)
        {
            XmlNodeList deliveryPointNodeList = xmlNode.SelectNodes("deliveryPoint");

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

            foreach (XmlNode item in deliveryPointNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        deliveryPointIDRef = item.Attributes["id"].Name;
                        ElectricityDeliveryPoint ob = ElectricityDeliveryPoint();
                        IDManager.SetID(deliveryPointIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        deliveryPointIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        deliveryPoint = new ElectricityDeliveryPoint(item);
                    }
                }
            }


            XmlNodeList deliveryTypeNodeList = xmlNode.SelectNodes("deliveryType");

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

            foreach (XmlNode item in deliveryTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        deliveryTypeIDRef = item.Attributes["id"].Name;
                        ElectricityDeliveryType ob = ElectricityDeliveryType();
                        IDManager.SetID(deliveryTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        deliveryTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        deliveryType = new ElectricityDeliveryType(item);
                    }
                }
            }


            XmlNodeList transmissionContingencyNodeList = xmlNode.SelectNodes("transmissionContingency");

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

            foreach (XmlNode item in transmissionContingencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        transmissionContingencyIDRef = item.Attributes["id"].Name;
                        ElectricityTransmissionContingency ob = ElectricityTransmissionContingency();
                        IDManager.SetID(transmissionContingencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        transmissionContingencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        transmissionContingency = new ElectricityTransmissionContingency(item);
                    }
                }
            }


            XmlNodeList deliveryZoneNodeList = xmlNode.SelectNodes("deliveryZone");

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

            foreach (XmlNode item in deliveryZoneNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        deliveryZoneIDRef = item.Attributes["id"].Name;
                        CommodityDeliveryPoint ob = CommodityDeliveryPoint();
                        IDManager.SetID(deliveryZoneIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        deliveryZoneIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        deliveryZone = new CommodityDeliveryPoint(item);
                    }
                }
            }


            XmlNodeList electingPartyReferenceNodeList = xmlNode.SelectNodes("electingPartyReference");

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

            foreach (XmlNode item in electingPartyReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        electingPartyReferenceIDRef = item.Attributes["id"].Name;
                        PartyReference ob = PartyReference();
                        IDManager.SetID(electingPartyReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        electingPartyReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        electingPartyReference = new PartyReference(item);
                    }
                }
            }
        }
 public ElectricityDelivery(XmlNode xmlNode)
 {
     XmlNode deliveryPointNode = xmlNode.SelectSingleNode("deliveryPoint");
     
     if (deliveryPointNode != null)
     {
         if (deliveryPointNode.Attributes["href"] != null || deliveryPointNode.Attributes["id"] != null) 
         {
             if (deliveryPointNode.Attributes["id"] != null) 
             {
                 deliveryPointIDRef_ = deliveryPointNode.Attributes["id"].Value;
                 ElectricityDeliveryPoint ob = new ElectricityDeliveryPoint(deliveryPointNode);
                 IDManager.SetID(deliveryPointIDRef_, ob);
             }
             else if (deliveryPointNode.Attributes["href"] != null)
             {
                 deliveryPointIDRef_ = deliveryPointNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryPoint_ = new ElectricityDeliveryPoint(deliveryPointNode);
             }
         }
         else
         {
             deliveryPoint_ = new ElectricityDeliveryPoint(deliveryPointNode);
         }
     }
     
 
     XmlNode deliveryTypeNode = xmlNode.SelectSingleNode("deliveryType");
     
     if (deliveryTypeNode != null)
     {
         if (deliveryTypeNode.Attributes["href"] != null || deliveryTypeNode.Attributes["id"] != null) 
         {
             if (deliveryTypeNode.Attributes["id"] != null) 
             {
                 deliveryTypeIDRef_ = deliveryTypeNode.Attributes["id"].Value;
                 ElectricityDeliveryType ob = new ElectricityDeliveryType(deliveryTypeNode);
                 IDManager.SetID(deliveryTypeIDRef_, ob);
             }
             else if (deliveryTypeNode.Attributes["href"] != null)
             {
                 deliveryTypeIDRef_ = deliveryTypeNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryType_ = new ElectricityDeliveryType(deliveryTypeNode);
             }
         }
         else
         {
             deliveryType_ = new ElectricityDeliveryType(deliveryTypeNode);
         }
     }
     
 
     XmlNode transmissionContingencyNode = xmlNode.SelectSingleNode("transmissionContingency");
     
     if (transmissionContingencyNode != null)
     {
         if (transmissionContingencyNode.Attributes["href"] != null || transmissionContingencyNode.Attributes["id"] != null) 
         {
             if (transmissionContingencyNode.Attributes["id"] != null) 
             {
                 transmissionContingencyIDRef_ = transmissionContingencyNode.Attributes["id"].Value;
                 ElectricityTransmissionContingency ob = new ElectricityTransmissionContingency(transmissionContingencyNode);
                 IDManager.SetID(transmissionContingencyIDRef_, ob);
             }
             else if (transmissionContingencyNode.Attributes["href"] != null)
             {
                 transmissionContingencyIDRef_ = transmissionContingencyNode.Attributes["href"].Value;
             }
             else
             {
                 transmissionContingency_ = new ElectricityTransmissionContingency(transmissionContingencyNode);
             }
         }
         else
         {
             transmissionContingency_ = new ElectricityTransmissionContingency(transmissionContingencyNode);
         }
     }
     
 
     XmlNode deliveryZoneNode = xmlNode.SelectSingleNode("deliveryZone");
     
     if (deliveryZoneNode != null)
     {
         if (deliveryZoneNode.Attributes["href"] != null || deliveryZoneNode.Attributes["id"] != null) 
         {
             if (deliveryZoneNode.Attributes["id"] != null) 
             {
                 deliveryZoneIDRef_ = deliveryZoneNode.Attributes["id"].Value;
                 CommodityDeliveryPoint ob = new CommodityDeliveryPoint(deliveryZoneNode);
                 IDManager.SetID(deliveryZoneIDRef_, ob);
             }
             else if (deliveryZoneNode.Attributes["href"] != null)
             {
                 deliveryZoneIDRef_ = deliveryZoneNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryZone_ = new CommodityDeliveryPoint(deliveryZoneNode);
             }
         }
         else
         {
             deliveryZone_ = new CommodityDeliveryPoint(deliveryZoneNode);
         }
     }
     
 
     XmlNode electingPartyReferenceNode = xmlNode.SelectSingleNode("electingPartyReference");
     
     if (electingPartyReferenceNode != null)
     {
         if (electingPartyReferenceNode.Attributes["href"] != null || electingPartyReferenceNode.Attributes["id"] != null) 
         {
             if (electingPartyReferenceNode.Attributes["id"] != null) 
             {
                 electingPartyReferenceIDRef_ = electingPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(electingPartyReferenceNode);
                 IDManager.SetID(electingPartyReferenceIDRef_, ob);
             }
             else if (electingPartyReferenceNode.Attributes["href"] != null)
             {
                 electingPartyReferenceIDRef_ = electingPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 electingPartyReference_ = new PartyReference(electingPartyReferenceNode);
             }
         }
         else
         {
             electingPartyReference_ = new PartyReference(electingPartyReferenceNode);
         }
     }
     
 
 }