コード例 #1
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);
                }
            }
        }
コード例 #2
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);
             }
         }
     }
     
 
 }
コード例 #3
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);
         }
     }
     
 
 }
コード例 #4
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);
                    }
                }
            }
        }