public OilTransferDelivery(XmlNode xmlNode)
        {
            XmlNodeList applicableNodeList = xmlNode.SelectNodes("applicable");

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

            foreach (XmlNode item in applicableNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        applicableIDRef = item.Attributes["id"].Name;
                        XsdTypeBoolean ob = XsdTypeBoolean();
                        IDManager.SetID(applicableIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        applicableIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        applicable = new XsdTypeBoolean(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;
                        CommodityDeliveryPoint ob = CommodityDeliveryPoint();
                        IDManager.SetID(deliveryLocationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        deliveryLocationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        deliveryLocation = new CommodityDeliveryPoint(item);
                    }
                }
            }
        }
 public OilTransferDelivery(XmlNode xmlNode)
 {
     XmlNode applicableNode = xmlNode.SelectSingleNode("applicable");
     
     if (applicableNode != null)
     {
         if (applicableNode.Attributes["href"] != null || applicableNode.Attributes["id"] != null) 
         {
             if (applicableNode.Attributes["id"] != null) 
             {
                 applicableIDRef_ = applicableNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(applicableNode);
                 IDManager.SetID(applicableIDRef_, ob);
             }
             else if (applicableNode.Attributes["href"] != null)
             {
                 applicableIDRef_ = applicableNode.Attributes["href"].Value;
             }
             else
             {
                 applicable_ = new XsdTypeBoolean(applicableNode);
             }
         }
         else
         {
             applicable_ = new XsdTypeBoolean(applicableNode);
         }
     }
     
 
     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;
                 CommodityDeliveryPoint ob = new CommodityDeliveryPoint(deliveryLocationNode);
                 IDManager.SetID(deliveryLocationIDRef_, ob);
             }
             else if (deliveryLocationNode.Attributes["href"] != null)
             {
                 deliveryLocationIDRef_ = deliveryLocationNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryLocation_ = new CommodityDeliveryPoint(deliveryLocationNode);
             }
         }
         else
         {
             deliveryLocation_ = new CommodityDeliveryPoint(deliveryLocationNode);
         }
     }
     
 
 }
 public OilTransferDelivery(XmlNode xmlNode)
 {
     XmlNodeList applicableNodeList = xmlNode.SelectNodes("applicable");
     if (applicableNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in applicableNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 applicableIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(applicableIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 applicableIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 applicable = new XsdTypeBoolean(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;
                 CommodityDeliveryPoint ob = CommodityDeliveryPoint();
                 IDManager.SetID(deliveryLocationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryLocationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryLocation = new CommodityDeliveryPoint(item);
             }
         }
     }
     
 
 }
 public ElectricityDeliveryUnitFirm(XmlNode xmlNode)
 {
     XmlNodeList applicableNodeList = xmlNode.SelectNodes("applicable");
     if (applicableNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in applicableNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 applicableIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(applicableIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 applicableIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 applicable = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList generationAssetNodeList = xmlNode.SelectNodes("generationAsset");
     if (generationAssetNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in generationAssetNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 generationAssetIDRef = item.Attributes["id"].Name;
                 CommodityDeliveryPoint ob = CommodityDeliveryPoint();
                 IDManager.SetID(generationAssetIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 generationAssetIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 generationAsset = new CommodityDeliveryPoint(item);
             }
         }
     }
     
 
 }
Exemplo n.º 5
0
        public ElectricityDeliverySystemFirm(XmlNode xmlNode)
        {
            XmlNodeList applicableNodeList = xmlNode.SelectNodes("applicable");

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

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


            XmlNodeList systemNodeList = xmlNode.SelectNodes("system");

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

            foreach (XmlNode item in systemNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        systemIDRef = item.Attributes["id"].Name;
                        CommodityDeliveryPoint ob = CommodityDeliveryPoint();
                        IDManager.SetID(systemIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        systemIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        system = new CommodityDeliveryPoint(item);
                    }
                }
            }
        }
 public ElectricityDeliveryUnitFirm(XmlNode xmlNode)
 {
     XmlNode applicableNode = xmlNode.SelectSingleNode("applicable");
     
     if (applicableNode != null)
     {
         if (applicableNode.Attributes["href"] != null || applicableNode.Attributes["id"] != null) 
         {
             if (applicableNode.Attributes["id"] != null) 
             {
                 applicableIDRef_ = applicableNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(applicableNode);
                 IDManager.SetID(applicableIDRef_, ob);
             }
             else if (applicableNode.Attributes["href"] != null)
             {
                 applicableIDRef_ = applicableNode.Attributes["href"].Value;
             }
             else
             {
                 applicable_ = new XsdTypeBoolean(applicableNode);
             }
         }
         else
         {
             applicable_ = new XsdTypeBoolean(applicableNode);
         }
     }
     
 
     XmlNode generationAssetNode = xmlNode.SelectSingleNode("generationAsset");
     
     if (generationAssetNode != null)
     {
         if (generationAssetNode.Attributes["href"] != null || generationAssetNode.Attributes["id"] != null) 
         {
             if (generationAssetNode.Attributes["id"] != null) 
             {
                 generationAssetIDRef_ = generationAssetNode.Attributes["id"].Value;
                 CommodityDeliveryPoint ob = new CommodityDeliveryPoint(generationAssetNode);
                 IDManager.SetID(generationAssetIDRef_, ob);
             }
             else if (generationAssetNode.Attributes["href"] != null)
             {
                 generationAssetIDRef_ = generationAssetNode.Attributes["href"].Value;
             }
             else
             {
                 generationAsset_ = new CommodityDeliveryPoint(generationAssetNode);
             }
         }
         else
         {
             generationAsset_ = new CommodityDeliveryPoint(generationAssetNode);
         }
     }
     
 
 }
 public ElectricityDeliverySystemFirm(XmlNode xmlNode)
 {
     XmlNode applicableNode = xmlNode.SelectSingleNode("applicable");
     
     if (applicableNode != null)
     {
         if (applicableNode.Attributes["href"] != null || applicableNode.Attributes["id"] != null) 
         {
             if (applicableNode.Attributes["id"] != null) 
             {
                 applicableIDRef_ = applicableNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(applicableNode);
                 IDManager.SetID(applicableIDRef_, ob);
             }
             else if (applicableNode.Attributes["href"] != null)
             {
                 applicableIDRef_ = applicableNode.Attributes["href"].Value;
             }
             else
             {
                 applicable_ = new XsdTypeBoolean(applicableNode);
             }
         }
         else
         {
             applicable_ = new XsdTypeBoolean(applicableNode);
         }
     }
     
 
     XmlNode systemNode = xmlNode.SelectSingleNode("system");
     
     if (systemNode != null)
     {
         if (systemNode.Attributes["href"] != null || systemNode.Attributes["id"] != null) 
         {
             if (systemNode.Attributes["id"] != null) 
             {
                 systemIDRef_ = systemNode.Attributes["id"].Value;
                 CommodityDeliveryPoint ob = new CommodityDeliveryPoint(systemNode);
                 IDManager.SetID(systemIDRef_, ob);
             }
             else if (systemNode.Attributes["href"] != null)
             {
                 systemIDRef_ = systemNode.Attributes["href"].Value;
             }
             else
             {
                 system_ = new CommodityDeliveryPoint(systemNode);
             }
         }
         else
         {
             system_ = new CommodityDeliveryPoint(systemNode);
         }
     }
     
 
 }
Exemplo n.º 8
0
        public ElectricityDeliverySystemFirm(XmlNode xmlNode)
        {
            XmlNode applicableNode = xmlNode.SelectSingleNode("applicable");

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


            XmlNode systemNode = xmlNode.SelectSingleNode("system");

            if (systemNode != null)
            {
                if (systemNode.Attributes["href"] != null || systemNode.Attributes["id"] != null)
                {
                    if (systemNode.Attributes["id"] != null)
                    {
                        systemIDRef_ = systemNode.Attributes["id"].Value;
                        CommodityDeliveryPoint ob = new CommodityDeliveryPoint(systemNode);
                        IDManager.SetID(systemIDRef_, ob);
                    }
                    else if (systemNode.Attributes["href"] != null)
                    {
                        systemIDRef_ = systemNode.Attributes["href"].Value;
                    }
                    else
                    {
                        system_ = new CommodityDeliveryPoint(systemNode);
                    }
                }
                else
                {
                    system_ = new CommodityDeliveryPoint(systemNode);
                }
            }
        }
        public ElectricityDeliveryUnitFirm(XmlNode xmlNode)
        {
            XmlNode applicableNode = xmlNode.SelectSingleNode("applicable");

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


            XmlNode generationAssetNode = xmlNode.SelectSingleNode("generationAsset");

            if (generationAssetNode != null)
            {
                if (generationAssetNode.Attributes["href"] != null || generationAssetNode.Attributes["id"] != null)
                {
                    if (generationAssetNode.Attributes["id"] != null)
                    {
                        generationAssetIDRef_ = generationAssetNode.Attributes["id"].Value;
                        CommodityDeliveryPoint ob = new CommodityDeliveryPoint(generationAssetNode);
                        IDManager.SetID(generationAssetIDRef_, ob);
                    }
                    else if (generationAssetNode.Attributes["href"] != null)
                    {
                        generationAssetIDRef_ = generationAssetNode.Attributes["href"].Value;
                    }
                    else
                    {
                        generationAsset_ = new CommodityDeliveryPoint(generationAssetNode);
                    }
                }
                else
                {
                    generationAsset_ = new CommodityDeliveryPoint(generationAssetNode);
                }
            }
        }
Exemplo n.º 10
0
        public OilTransferDelivery(XmlNode xmlNode)
        {
            XmlNode applicableNode = xmlNode.SelectSingleNode("applicable");

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


            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;
                        CommodityDeliveryPoint ob = new CommodityDeliveryPoint(deliveryLocationNode);
                        IDManager.SetID(deliveryLocationIDRef_, ob);
                    }
                    else if (deliveryLocationNode.Attributes["href"] != null)
                    {
                        deliveryLocationIDRef_ = deliveryLocationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliveryLocation_ = new CommodityDeliveryPoint(deliveryLocationNode);
                    }
                }
                else
                {
                    deliveryLocation_ = new CommodityDeliveryPoint(deliveryLocationNode);
                }
            }
        }
        public OilPipelineDelivery(XmlNode xmlNode)
        {
            XmlNodeList pipelineNameNodeList = xmlNode.SelectNodes("pipelineName");

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

            foreach (XmlNode item in pipelineNameNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        pipelineNameIDRef = item.Attributes["id"].Name;
                        CommodityPipeline ob = CommodityPipeline();
                        IDManager.SetID(pipelineNameIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        pipelineNameIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        pipelineName = new CommodityPipeline(item);
                    }
                }
            }


            XmlNodeList withdrawalPointNodeList = xmlNode.SelectNodes("withdrawalPoint");

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

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


            XmlNodeList entryPointNodeList = xmlNode.SelectNodes("entryPoint");

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

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


            XmlNodeList deliverableByBargeNodeList = xmlNode.SelectNodes("deliverableByBarge");

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

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


            XmlNodeList riskNodeList = xmlNode.SelectNodes("risk");

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

            foreach (XmlNode item in riskNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        riskIDRef = item.Attributes["id"].Name;
                        CommodityDeliveryRisk ob = CommodityDeliveryRisk();
                        IDManager.SetID(riskIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        riskIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        risk = new CommodityDeliveryRisk(item);
                    }
                }
            }


            XmlNodeList cycleNodeList = xmlNode.SelectNodes("cycle");

            foreach (XmlNode item in cycleNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        cycleIDRef = item.Attributes["id"].Name;
                        List <CommodityPipelineCycle> ob = new List <CommodityPipelineCycle>();
                        ob.Add(new CommodityPipelineCycle(item));
                        IDManager.SetID(cycleIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        cycleIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        cycle.Add(new CommodityPipelineCycle(item));
                    }
                }
            }
        }
 public GasDelivery(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;
                 GasDeliveryPoint ob = GasDeliveryPoint();
                 IDManager.SetID(deliveryPointIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryPointIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryPoint = new GasDeliveryPoint(item);
             }
         }
     }
     
 
     XmlNodeList entryPointNodeList = xmlNode.SelectNodes("entryPoint");
     if (entryPointNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in entryPointNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 entryPointIDRef = item.Attributes["id"].Name;
                 CommodityDeliveryPoint ob = CommodityDeliveryPoint();
                 IDManager.SetID(entryPointIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 entryPointIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 entryPoint = new CommodityDeliveryPoint(item);
             }
         }
     }
     
 
     XmlNodeList withdrawalPointNodeList = xmlNode.SelectNodes("withdrawalPoint");
     if (withdrawalPointNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in withdrawalPointNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 withdrawalPointIDRef = item.Attributes["id"].Name;
                 CommodityDeliveryPoint ob = CommodityDeliveryPoint();
                 IDManager.SetID(withdrawalPointIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 withdrawalPointIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 withdrawalPoint = new CommodityDeliveryPoint(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;
                 DeliveryTypeEnum ob = DeliveryTypeEnum();
                 IDManager.SetID(deliveryTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryType = new DeliveryTypeEnum(item);
             }
         }
     }
     
 
     XmlNodeList buyerHubNodeList = xmlNode.SelectNodes("buyerHub");
     if (buyerHubNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in buyerHubNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 buyerHubIDRef = item.Attributes["id"].Name;
                 CommodityHub ob = CommodityHub();
                 IDManager.SetID(buyerHubIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 buyerHubIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 buyerHub = new CommodityHub(item);
             }
         }
     }
     
 
     XmlNodeList sellerHubNodeList = xmlNode.SelectNodes("sellerHub");
     if (sellerHubNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in sellerHubNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 sellerHubIDRef = item.Attributes["id"].Name;
                 CommodityHub ob = CommodityHub();
                 IDManager.SetID(sellerHubIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 sellerHubIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 sellerHub = new CommodityHub(item);
             }
         }
     }
     
 
 }
Exemplo n.º 13
0
        public GasDelivery(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;
                        GasDeliveryPoint ob = GasDeliveryPoint();
                        IDManager.SetID(deliveryPointIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        deliveryPointIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        deliveryPoint = new GasDeliveryPoint(item);
                    }
                }
            }


            XmlNodeList entryPointNodeList = xmlNode.SelectNodes("entryPoint");

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

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


            XmlNodeList withdrawalPointNodeList = xmlNode.SelectNodes("withdrawalPoint");

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

            foreach (XmlNode item in withdrawalPointNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        withdrawalPointIDRef = item.Attributes["id"].Name;
                        CommodityDeliveryPoint ob = CommodityDeliveryPoint();
                        IDManager.SetID(withdrawalPointIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        withdrawalPointIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        withdrawalPoint = new CommodityDeliveryPoint(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;
                        DeliveryTypeEnum ob = DeliveryTypeEnum();
                        IDManager.SetID(deliveryTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        deliveryTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        deliveryType = new DeliveryTypeEnum(item);
                    }
                }
            }


            XmlNodeList buyerHubNodeList = xmlNode.SelectNodes("buyerHub");

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

            foreach (XmlNode item in buyerHubNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        buyerHubIDRef = item.Attributes["id"].Name;
                        CommodityHub ob = CommodityHub();
                        IDManager.SetID(buyerHubIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        buyerHubIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        buyerHub = new CommodityHub(item);
                    }
                }
            }


            XmlNodeList sellerHubNodeList = xmlNode.SelectNodes("sellerHub");

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

            foreach (XmlNode item in sellerHubNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        sellerHubIDRef = item.Attributes["id"].Name;
                        CommodityHub ob = CommodityHub();
                        IDManager.SetID(sellerHubIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        sellerHubIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        sellerHub = new CommodityHub(item);
                    }
                }
            }
        }
 public OilPipelineDelivery(XmlNode xmlNode)
 {
     XmlNodeList pipelineNameNodeList = xmlNode.SelectNodes("pipelineName");
     if (pipelineNameNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in pipelineNameNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 pipelineNameIDRef = item.Attributes["id"].Name;
                 CommodityPipeline ob = CommodityPipeline();
                 IDManager.SetID(pipelineNameIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 pipelineNameIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 pipelineName = new CommodityPipeline(item);
             }
         }
     }
     
 
     XmlNodeList withdrawalPointNodeList = xmlNode.SelectNodes("withdrawalPoint");
     if (withdrawalPointNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in withdrawalPointNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 withdrawalPointIDRef = item.Attributes["id"].Name;
                 CommodityDeliveryPoint ob = CommodityDeliveryPoint();
                 IDManager.SetID(withdrawalPointIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 withdrawalPointIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 withdrawalPoint = new CommodityDeliveryPoint(item);
             }
         }
     }
     
 
     XmlNodeList entryPointNodeList = xmlNode.SelectNodes("entryPoint");
     if (entryPointNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in entryPointNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 entryPointIDRef = item.Attributes["id"].Name;
                 CommodityDeliveryPoint ob = CommodityDeliveryPoint();
                 IDManager.SetID(entryPointIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 entryPointIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 entryPoint = new CommodityDeliveryPoint(item);
             }
         }
     }
     
 
     XmlNodeList deliverableByBargeNodeList = xmlNode.SelectNodes("deliverableByBarge");
     if (deliverableByBargeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in deliverableByBargeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 deliverableByBargeIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(deliverableByBargeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliverableByBargeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliverableByBarge = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList riskNodeList = xmlNode.SelectNodes("risk");
     if (riskNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in riskNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 riskIDRef = item.Attributes["id"].Name;
                 CommodityDeliveryRisk ob = CommodityDeliveryRisk();
                 IDManager.SetID(riskIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 riskIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 risk = new CommodityDeliveryRisk(item);
             }
         }
     }
     
 
     XmlNodeList cycleNodeList = xmlNode.SelectNodes("cycle");
     
     foreach (XmlNode item in cycleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cycleIDRef = item.Attributes["id"].Name;
                 List<CommodityPipelineCycle> ob = new List<CommodityPipelineCycle>();
                 ob.Add(new CommodityPipelineCycle(item));
                 IDManager.SetID(cycleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cycleIDRef = item.Attributes["href"].Name;
             }
             else
             {
             cycle.Add(new CommodityPipelineCycle(item));
             }
         }
     }
     
 
 }
 public MetalDelivery(XmlNode xmlNode)
 {
     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;
                 CommodityDeliveryPoint ob = CommodityDeliveryPoint();
                 IDManager.SetID(deliveryLocationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryLocationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryLocation = new CommodityDeliveryPoint(item);
             }
         }
     }
     
 
     XmlNodeList riskNodeList = xmlNode.SelectNodes("risk");
     if (riskNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in riskNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 riskIDRef = item.Attributes["id"].Name;
                 CommodityDeliveryRisk ob = CommodityDeliveryRisk();
                 IDManager.SetID(riskIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 riskIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 risk = new CommodityDeliveryRisk(item);
             }
         }
     }
     
 
     XmlNodeList totalQuantityToleranceNodeList = xmlNode.SelectNodes("totalQuantityTolerance");
     if (totalQuantityToleranceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in totalQuantityToleranceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 totalQuantityToleranceIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(totalQuantityToleranceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 totalQuantityToleranceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 totalQuantityTolerance = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList periodQuantityToleranceNodeList = xmlNode.SelectNodes("periodQuantityTolerance");
     if (periodQuantityToleranceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in periodQuantityToleranceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 periodQuantityToleranceIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(periodQuantityToleranceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 periodQuantityToleranceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 periodQuantityTolerance = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList titleNodeList = xmlNode.SelectNodes("title");
     if (titleNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in titleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 titleIDRef = item.Attributes["id"].Name;
                 MetalTitleEnum ob = MetalTitleEnum();
                 IDManager.SetID(titleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 titleIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 title = new MetalTitleEnum(item);
             }
         }
     }
     
 
 }
 public OilPipelineDelivery(XmlNode xmlNode)
 {
     XmlNode pipelineNameNode = xmlNode.SelectSingleNode("pipelineName");
     
     if (pipelineNameNode != null)
     {
         if (pipelineNameNode.Attributes["href"] != null || pipelineNameNode.Attributes["id"] != null) 
         {
             if (pipelineNameNode.Attributes["id"] != null) 
             {
                 pipelineNameIDRef_ = pipelineNameNode.Attributes["id"].Value;
                 CommodityPipeline ob = new CommodityPipeline(pipelineNameNode);
                 IDManager.SetID(pipelineNameIDRef_, ob);
             }
             else if (pipelineNameNode.Attributes["href"] != null)
             {
                 pipelineNameIDRef_ = pipelineNameNode.Attributes["href"].Value;
             }
             else
             {
                 pipelineName_ = new CommodityPipeline(pipelineNameNode);
             }
         }
         else
         {
             pipelineName_ = new CommodityPipeline(pipelineNameNode);
         }
     }
     
 
     XmlNode withdrawalPointNode = xmlNode.SelectSingleNode("withdrawalPoint");
     
     if (withdrawalPointNode != null)
     {
         if (withdrawalPointNode.Attributes["href"] != null || withdrawalPointNode.Attributes["id"] != null) 
         {
             if (withdrawalPointNode.Attributes["id"] != null) 
             {
                 withdrawalPointIDRef_ = withdrawalPointNode.Attributes["id"].Value;
                 CommodityDeliveryPoint ob = new CommodityDeliveryPoint(withdrawalPointNode);
                 IDManager.SetID(withdrawalPointIDRef_, ob);
             }
             else if (withdrawalPointNode.Attributes["href"] != null)
             {
                 withdrawalPointIDRef_ = withdrawalPointNode.Attributes["href"].Value;
             }
             else
             {
                 withdrawalPoint_ = new CommodityDeliveryPoint(withdrawalPointNode);
             }
         }
         else
         {
             withdrawalPoint_ = new CommodityDeliveryPoint(withdrawalPointNode);
         }
     }
     
 
     XmlNode entryPointNode = xmlNode.SelectSingleNode("entryPoint");
     
     if (entryPointNode != null)
     {
         if (entryPointNode.Attributes["href"] != null || entryPointNode.Attributes["id"] != null) 
         {
             if (entryPointNode.Attributes["id"] != null) 
             {
                 entryPointIDRef_ = entryPointNode.Attributes["id"].Value;
                 CommodityDeliveryPoint ob = new CommodityDeliveryPoint(entryPointNode);
                 IDManager.SetID(entryPointIDRef_, ob);
             }
             else if (entryPointNode.Attributes["href"] != null)
             {
                 entryPointIDRef_ = entryPointNode.Attributes["href"].Value;
             }
             else
             {
                 entryPoint_ = new CommodityDeliveryPoint(entryPointNode);
             }
         }
         else
         {
             entryPoint_ = new CommodityDeliveryPoint(entryPointNode);
         }
     }
     
 
     XmlNode deliverableByBargeNode = xmlNode.SelectSingleNode("deliverableByBarge");
     
     if (deliverableByBargeNode != null)
     {
         if (deliverableByBargeNode.Attributes["href"] != null || deliverableByBargeNode.Attributes["id"] != null) 
         {
             if (deliverableByBargeNode.Attributes["id"] != null) 
             {
                 deliverableByBargeIDRef_ = deliverableByBargeNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(deliverableByBargeNode);
                 IDManager.SetID(deliverableByBargeIDRef_, ob);
             }
             else if (deliverableByBargeNode.Attributes["href"] != null)
             {
                 deliverableByBargeIDRef_ = deliverableByBargeNode.Attributes["href"].Value;
             }
             else
             {
                 deliverableByBarge_ = new XsdTypeBoolean(deliverableByBargeNode);
             }
         }
         else
         {
             deliverableByBarge_ = new XsdTypeBoolean(deliverableByBargeNode);
         }
     }
     
 
     XmlNode riskNode = xmlNode.SelectSingleNode("risk");
     
     if (riskNode != null)
     {
         if (riskNode.Attributes["href"] != null || riskNode.Attributes["id"] != null) 
         {
             if (riskNode.Attributes["id"] != null) 
             {
                 riskIDRef_ = riskNode.Attributes["id"].Value;
                 CommodityDeliveryRisk ob = new CommodityDeliveryRisk(riskNode);
                 IDManager.SetID(riskIDRef_, ob);
             }
             else if (riskNode.Attributes["href"] != null)
             {
                 riskIDRef_ = riskNode.Attributes["href"].Value;
             }
             else
             {
                 risk_ = new CommodityDeliveryRisk(riskNode);
             }
         }
         else
         {
             risk_ = new CommodityDeliveryRisk(riskNode);
         }
     }
     
 
     XmlNodeList cycleNodeList = xmlNode.SelectNodes("cycle");
     
     if (cycleNodeList != null)
     {
         this.cycle_ = new List<CommodityPipelineCycle>();
         foreach (XmlNode item in cycleNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     cycleIDRef_ = item.Attributes["id"].Value;
                     cycle_.Add(new CommodityPipelineCycle(item));
                     IDManager.SetID(cycleIDRef_, cycle_[cycle_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     cycleIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 cycle_.Add(new CommodityPipelineCycle(item));
                 }
             }
             else
             {
                 cycle_.Add(new CommodityPipelineCycle(item));
             }
         }
     }
     
 
 }
Exemplo n.º 17
0
        public MetalDelivery(XmlNode xmlNode)
        {
            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;
                        CommodityDeliveryPoint ob = CommodityDeliveryPoint();
                        IDManager.SetID(deliveryLocationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        deliveryLocationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        deliveryLocation = new CommodityDeliveryPoint(item);
                    }
                }
            }


            XmlNodeList riskNodeList = xmlNode.SelectNodes("risk");

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

            foreach (XmlNode item in riskNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        riskIDRef = item.Attributes["id"].Name;
                        CommodityDeliveryRisk ob = CommodityDeliveryRisk();
                        IDManager.SetID(riskIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        riskIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        risk = new CommodityDeliveryRisk(item);
                    }
                }
            }


            XmlNodeList totalQuantityToleranceNodeList = xmlNode.SelectNodes("totalQuantityTolerance");

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

            foreach (XmlNode item in totalQuantityToleranceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        totalQuantityToleranceIDRef = item.Attributes["id"].Name;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(totalQuantityToleranceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        totalQuantityToleranceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        totalQuantityTolerance = new XsdTypeDecimal(item);
                    }
                }
            }


            XmlNodeList periodQuantityToleranceNodeList = xmlNode.SelectNodes("periodQuantityTolerance");

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

            foreach (XmlNode item in periodQuantityToleranceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        periodQuantityToleranceIDRef = item.Attributes["id"].Name;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(periodQuantityToleranceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        periodQuantityToleranceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        periodQuantityTolerance = new XsdTypeDecimal(item);
                    }
                }
            }


            XmlNodeList titleNodeList = xmlNode.SelectNodes("title");

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

            foreach (XmlNode item in titleNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        titleIDRef = item.Attributes["id"].Name;
                        MetalTitleEnum ob = MetalTitleEnum();
                        IDManager.SetID(titleIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        titleIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        title = new MetalTitleEnum(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);
                }
            }
        }
Exemplo n.º 19
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 OilPipelineDelivery(XmlNode xmlNode)
        {
            XmlNode pipelineNameNode = xmlNode.SelectSingleNode("pipelineName");

            if (pipelineNameNode != null)
            {
                if (pipelineNameNode.Attributes["href"] != null || pipelineNameNode.Attributes["id"] != null)
                {
                    if (pipelineNameNode.Attributes["id"] != null)
                    {
                        pipelineNameIDRef_ = pipelineNameNode.Attributes["id"].Value;
                        CommodityPipeline ob = new CommodityPipeline(pipelineNameNode);
                        IDManager.SetID(pipelineNameIDRef_, ob);
                    }
                    else if (pipelineNameNode.Attributes["href"] != null)
                    {
                        pipelineNameIDRef_ = pipelineNameNode.Attributes["href"].Value;
                    }
                    else
                    {
                        pipelineName_ = new CommodityPipeline(pipelineNameNode);
                    }
                }
                else
                {
                    pipelineName_ = new CommodityPipeline(pipelineNameNode);
                }
            }


            XmlNode withdrawalPointNode = xmlNode.SelectSingleNode("withdrawalPoint");

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


            XmlNode entryPointNode = xmlNode.SelectSingleNode("entryPoint");

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


            XmlNode deliverableByBargeNode = xmlNode.SelectSingleNode("deliverableByBarge");

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


            XmlNode riskNode = xmlNode.SelectSingleNode("risk");

            if (riskNode != null)
            {
                if (riskNode.Attributes["href"] != null || riskNode.Attributes["id"] != null)
                {
                    if (riskNode.Attributes["id"] != null)
                    {
                        riskIDRef_ = riskNode.Attributes["id"].Value;
                        CommodityDeliveryRisk ob = new CommodityDeliveryRisk(riskNode);
                        IDManager.SetID(riskIDRef_, ob);
                    }
                    else if (riskNode.Attributes["href"] != null)
                    {
                        riskIDRef_ = riskNode.Attributes["href"].Value;
                    }
                    else
                    {
                        risk_ = new CommodityDeliveryRisk(riskNode);
                    }
                }
                else
                {
                    risk_ = new CommodityDeliveryRisk(riskNode);
                }
            }


            XmlNodeList cycleNodeList = xmlNode.SelectNodes("cycle");

            if (cycleNodeList != null)
            {
                this.cycle_ = new List <CommodityPipelineCycle>();
                foreach (XmlNode item in cycleNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            cycleIDRef_ = item.Attributes["id"].Value;
                            cycle_.Add(new CommodityPipelineCycle(item));
                            IDManager.SetID(cycleIDRef_, cycle_[cycle_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            cycleIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            cycle_.Add(new CommodityPipelineCycle(item));
                        }
                    }
                    else
                    {
                        cycle_.Add(new CommodityPipelineCycle(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);
         }
     }
     
 
 }
 public GasDelivery(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;
                 GasDeliveryPoint ob = new GasDeliveryPoint(deliveryPointNode);
                 IDManager.SetID(deliveryPointIDRef_, ob);
             }
             else if (deliveryPointNode.Attributes["href"] != null)
             {
                 deliveryPointIDRef_ = deliveryPointNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryPoint_ = new GasDeliveryPoint(deliveryPointNode);
             }
         }
         else
         {
             deliveryPoint_ = new GasDeliveryPoint(deliveryPointNode);
         }
     }
     
 
     XmlNode entryPointNode = xmlNode.SelectSingleNode("entryPoint");
     
     if (entryPointNode != null)
     {
         if (entryPointNode.Attributes["href"] != null || entryPointNode.Attributes["id"] != null) 
         {
             if (entryPointNode.Attributes["id"] != null) 
             {
                 entryPointIDRef_ = entryPointNode.Attributes["id"].Value;
                 CommodityDeliveryPoint ob = new CommodityDeliveryPoint(entryPointNode);
                 IDManager.SetID(entryPointIDRef_, ob);
             }
             else if (entryPointNode.Attributes["href"] != null)
             {
                 entryPointIDRef_ = entryPointNode.Attributes["href"].Value;
             }
             else
             {
                 entryPoint_ = new CommodityDeliveryPoint(entryPointNode);
             }
         }
         else
         {
             entryPoint_ = new CommodityDeliveryPoint(entryPointNode);
         }
     }
     
 
     XmlNode withdrawalPointNode = xmlNode.SelectSingleNode("withdrawalPoint");
     
     if (withdrawalPointNode != null)
     {
         if (withdrawalPointNode.Attributes["href"] != null || withdrawalPointNode.Attributes["id"] != null) 
         {
             if (withdrawalPointNode.Attributes["id"] != null) 
             {
                 withdrawalPointIDRef_ = withdrawalPointNode.Attributes["id"].Value;
                 CommodityDeliveryPoint ob = new CommodityDeliveryPoint(withdrawalPointNode);
                 IDManager.SetID(withdrawalPointIDRef_, ob);
             }
             else if (withdrawalPointNode.Attributes["href"] != null)
             {
                 withdrawalPointIDRef_ = withdrawalPointNode.Attributes["href"].Value;
             }
             else
             {
                 withdrawalPoint_ = new CommodityDeliveryPoint(withdrawalPointNode);
             }
         }
         else
         {
             withdrawalPoint_ = new CommodityDeliveryPoint(withdrawalPointNode);
         }
     }
     
 
     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;
                 DeliveryTypeEnum ob = new DeliveryTypeEnum(deliveryTypeNode);
                 IDManager.SetID(deliveryTypeIDRef_, ob);
             }
             else if (deliveryTypeNode.Attributes["href"] != null)
             {
                 deliveryTypeIDRef_ = deliveryTypeNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryType_ = new DeliveryTypeEnum(deliveryTypeNode);
             }
         }
         else
         {
             deliveryType_ = new DeliveryTypeEnum(deliveryTypeNode);
         }
     }
     
 
     XmlNode buyerHubNode = xmlNode.SelectSingleNode("buyerHub");
     
     if (buyerHubNode != null)
     {
         if (buyerHubNode.Attributes["href"] != null || buyerHubNode.Attributes["id"] != null) 
         {
             if (buyerHubNode.Attributes["id"] != null) 
             {
                 buyerHubIDRef_ = buyerHubNode.Attributes["id"].Value;
                 CommodityHub ob = new CommodityHub(buyerHubNode);
                 IDManager.SetID(buyerHubIDRef_, ob);
             }
             else if (buyerHubNode.Attributes["href"] != null)
             {
                 buyerHubIDRef_ = buyerHubNode.Attributes["href"].Value;
             }
             else
             {
                 buyerHub_ = new CommodityHub(buyerHubNode);
             }
         }
         else
         {
             buyerHub_ = new CommodityHub(buyerHubNode);
         }
     }
     
 
     XmlNode sellerHubNode = xmlNode.SelectSingleNode("sellerHub");
     
     if (sellerHubNode != null)
     {
         if (sellerHubNode.Attributes["href"] != null || sellerHubNode.Attributes["id"] != null) 
         {
             if (sellerHubNode.Attributes["id"] != null) 
             {
                 sellerHubIDRef_ = sellerHubNode.Attributes["id"].Value;
                 CommodityHub ob = new CommodityHub(sellerHubNode);
                 IDManager.SetID(sellerHubIDRef_, ob);
             }
             else if (sellerHubNode.Attributes["href"] != null)
             {
                 sellerHubIDRef_ = sellerHubNode.Attributes["href"].Value;
             }
             else
             {
                 sellerHub_ = new CommodityHub(sellerHubNode);
             }
         }
         else
         {
             sellerHub_ = new CommodityHub(sellerHubNode);
         }
     }
     
 
 }
 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);
             }
         }
     }
     
 
 }
Exemplo n.º 24
0
        public GasDelivery(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;
                        GasDeliveryPoint ob = new GasDeliveryPoint(deliveryPointNode);
                        IDManager.SetID(deliveryPointIDRef_, ob);
                    }
                    else if (deliveryPointNode.Attributes["href"] != null)
                    {
                        deliveryPointIDRef_ = deliveryPointNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliveryPoint_ = new GasDeliveryPoint(deliveryPointNode);
                    }
                }
                else
                {
                    deliveryPoint_ = new GasDeliveryPoint(deliveryPointNode);
                }
            }


            XmlNode entryPointNode = xmlNode.SelectSingleNode("entryPoint");

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


            XmlNode withdrawalPointNode = xmlNode.SelectSingleNode("withdrawalPoint");

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


            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;
                        DeliveryTypeEnum ob = new DeliveryTypeEnum(deliveryTypeNode);
                        IDManager.SetID(deliveryTypeIDRef_, ob);
                    }
                    else if (deliveryTypeNode.Attributes["href"] != null)
                    {
                        deliveryTypeIDRef_ = deliveryTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliveryType_ = new DeliveryTypeEnum(deliveryTypeNode);
                    }
                }
                else
                {
                    deliveryType_ = new DeliveryTypeEnum(deliveryTypeNode);
                }
            }


            XmlNode buyerHubNode = xmlNode.SelectSingleNode("buyerHub");

            if (buyerHubNode != null)
            {
                if (buyerHubNode.Attributes["href"] != null || buyerHubNode.Attributes["id"] != null)
                {
                    if (buyerHubNode.Attributes["id"] != null)
                    {
                        buyerHubIDRef_ = buyerHubNode.Attributes["id"].Value;
                        CommodityHub ob = new CommodityHub(buyerHubNode);
                        IDManager.SetID(buyerHubIDRef_, ob);
                    }
                    else if (buyerHubNode.Attributes["href"] != null)
                    {
                        buyerHubIDRef_ = buyerHubNode.Attributes["href"].Value;
                    }
                    else
                    {
                        buyerHub_ = new CommodityHub(buyerHubNode);
                    }
                }
                else
                {
                    buyerHub_ = new CommodityHub(buyerHubNode);
                }
            }


            XmlNode sellerHubNode = xmlNode.SelectSingleNode("sellerHub");

            if (sellerHubNode != null)
            {
                if (sellerHubNode.Attributes["href"] != null || sellerHubNode.Attributes["id"] != null)
                {
                    if (sellerHubNode.Attributes["id"] != null)
                    {
                        sellerHubIDRef_ = sellerHubNode.Attributes["id"].Value;
                        CommodityHub ob = new CommodityHub(sellerHubNode);
                        IDManager.SetID(sellerHubIDRef_, ob);
                    }
                    else if (sellerHubNode.Attributes["href"] != null)
                    {
                        sellerHubIDRef_ = sellerHubNode.Attributes["href"].Value;
                    }
                    else
                    {
                        sellerHub_ = new CommodityHub(sellerHubNode);
                    }
                }
                else
                {
                    sellerHub_ = new CommodityHub(sellerHubNode);
                }
            }
        }
        public MetalDelivery(XmlNode xmlNode)
        {
            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;
                        CommodityDeliveryPoint ob = new CommodityDeliveryPoint(deliveryLocationNode);
                        IDManager.SetID(deliveryLocationIDRef_, ob);
                    }
                    else if (deliveryLocationNode.Attributes["href"] != null)
                    {
                        deliveryLocationIDRef_ = deliveryLocationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliveryLocation_ = new CommodityDeliveryPoint(deliveryLocationNode);
                    }
                }
                else
                {
                    deliveryLocation_ = new CommodityDeliveryPoint(deliveryLocationNode);
                }
            }


            XmlNode riskNode = xmlNode.SelectSingleNode("risk");

            if (riskNode != null)
            {
                if (riskNode.Attributes["href"] != null || riskNode.Attributes["id"] != null)
                {
                    if (riskNode.Attributes["id"] != null)
                    {
                        riskIDRef_ = riskNode.Attributes["id"].Value;
                        CommodityDeliveryRisk ob = new CommodityDeliveryRisk(riskNode);
                        IDManager.SetID(riskIDRef_, ob);
                    }
                    else if (riskNode.Attributes["href"] != null)
                    {
                        riskIDRef_ = riskNode.Attributes["href"].Value;
                    }
                    else
                    {
                        risk_ = new CommodityDeliveryRisk(riskNode);
                    }
                }
                else
                {
                    risk_ = new CommodityDeliveryRisk(riskNode);
                }
            }


            XmlNode totalQuantityToleranceNode = xmlNode.SelectSingleNode("totalQuantityTolerance");

            if (totalQuantityToleranceNode != null)
            {
                if (totalQuantityToleranceNode.Attributes["href"] != null || totalQuantityToleranceNode.Attributes["id"] != null)
                {
                    if (totalQuantityToleranceNode.Attributes["id"] != null)
                    {
                        totalQuantityToleranceIDRef_ = totalQuantityToleranceNode.Attributes["id"].Value;
                        XsdTypeDecimal ob = new XsdTypeDecimal(totalQuantityToleranceNode);
                        IDManager.SetID(totalQuantityToleranceIDRef_, ob);
                    }
                    else if (totalQuantityToleranceNode.Attributes["href"] != null)
                    {
                        totalQuantityToleranceIDRef_ = totalQuantityToleranceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        totalQuantityTolerance_ = new XsdTypeDecimal(totalQuantityToleranceNode);
                    }
                }
                else
                {
                    totalQuantityTolerance_ = new XsdTypeDecimal(totalQuantityToleranceNode);
                }
            }


            XmlNode periodQuantityToleranceNode = xmlNode.SelectSingleNode("periodQuantityTolerance");

            if (periodQuantityToleranceNode != null)
            {
                if (periodQuantityToleranceNode.Attributes["href"] != null || periodQuantityToleranceNode.Attributes["id"] != null)
                {
                    if (periodQuantityToleranceNode.Attributes["id"] != null)
                    {
                        periodQuantityToleranceIDRef_ = periodQuantityToleranceNode.Attributes["id"].Value;
                        XsdTypeDecimal ob = new XsdTypeDecimal(periodQuantityToleranceNode);
                        IDManager.SetID(periodQuantityToleranceIDRef_, ob);
                    }
                    else if (periodQuantityToleranceNode.Attributes["href"] != null)
                    {
                        periodQuantityToleranceIDRef_ = periodQuantityToleranceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        periodQuantityTolerance_ = new XsdTypeDecimal(periodQuantityToleranceNode);
                    }
                }
                else
                {
                    periodQuantityTolerance_ = new XsdTypeDecimal(periodQuantityToleranceNode);
                }
            }


            XmlNode titleNode = xmlNode.SelectSingleNode("title");

            if (titleNode != null)
            {
                if (titleNode.Attributes["href"] != null || titleNode.Attributes["id"] != null)
                {
                    if (titleNode.Attributes["id"] != null)
                    {
                        titleIDRef_ = titleNode.Attributes["id"].Value;
                        MetalTitleEnum ob = new MetalTitleEnum(titleNode);
                        IDManager.SetID(titleIDRef_, ob);
                    }
                    else if (titleNode.Attributes["href"] != null)
                    {
                        titleIDRef_ = titleNode.Attributes["href"].Value;
                    }
                    else
                    {
                        title_ = new MetalTitleEnum(titleNode);
                    }
                }
                else
                {
                    title_ = new MetalTitleEnum(titleNode);
                }
            }
        }