コード例 #1
0
 public WeatherStation(XmlNode xmlNode)
 {
     XmlNodeList weatherStationCityNodeList = xmlNode.SelectNodes("weatherStationCity");
     if (weatherStationCityNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in weatherStationCityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 weatherStationCityIDRef = item.Attributes["id"].Name;
                 BusinessCenter ob = BusinessCenter();
                 IDManager.SetID(weatherStationCityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 weatherStationCityIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 weatherStationCity = new BusinessCenter(item);
             }
         }
     }
     
 
     XmlNodeList weatherStationAirportNodeList = xmlNode.SelectNodes("weatherStationAirport");
     if (weatherStationAirportNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in weatherStationAirportNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 weatherStationAirportIDRef = item.Attributes["id"].Name;
                 WeatherStationAirport ob = WeatherStationAirport();
                 IDManager.SetID(weatherStationAirportIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 weatherStationAirportIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 weatherStationAirport = new WeatherStationAirport(item);
             }
         }
     }
     
 
     XmlNodeList weatherStationWBANNodeList = xmlNode.SelectNodes("weatherStationWBAN");
     if (weatherStationWBANNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in weatherStationWBANNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 weatherStationWBANIDRef = item.Attributes["id"].Name;
                 WeatherStationWBAN ob = WeatherStationWBAN();
                 IDManager.SetID(weatherStationWBANIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 weatherStationWBANIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 weatherStationWBAN = new WeatherStationWBAN(item);
             }
         }
     }
     
 
     XmlNodeList weatherStationWMONodeList = xmlNode.SelectNodes("weatherStationWMO");
     if (weatherStationWMONodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in weatherStationWMONodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 weatherStationWMOIDRef = item.Attributes["id"].Name;
                 WeatherStationWMO ob = WeatherStationWMO();
                 IDManager.SetID(weatherStationWMOIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 weatherStationWMOIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 weatherStationWMO = new WeatherStationWMO(item);
             }
         }
     }
     
 
 }
コード例 #2
0
        public WeatherStation(XmlNode xmlNode)
        {
            XmlNodeList weatherStationCityNodeList = xmlNode.SelectNodes("weatherStationCity");

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

            foreach (XmlNode item in weatherStationCityNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        weatherStationCityIDRef = item.Attributes["id"].Name;
                        BusinessCenter ob = BusinessCenter();
                        IDManager.SetID(weatherStationCityIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        weatherStationCityIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        weatherStationCity = new BusinessCenter(item);
                    }
                }
            }


            XmlNodeList weatherStationAirportNodeList = xmlNode.SelectNodes("weatherStationAirport");

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

            foreach (XmlNode item in weatherStationAirportNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        weatherStationAirportIDRef = item.Attributes["id"].Name;
                        WeatherStationAirport ob = WeatherStationAirport();
                        IDManager.SetID(weatherStationAirportIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        weatherStationAirportIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        weatherStationAirport = new WeatherStationAirport(item);
                    }
                }
            }


            XmlNodeList weatherStationWBANNodeList = xmlNode.SelectNodes("weatherStationWBAN");

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

            foreach (XmlNode item in weatherStationWBANNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        weatherStationWBANIDRef = item.Attributes["id"].Name;
                        WeatherStationWBAN ob = WeatherStationWBAN();
                        IDManager.SetID(weatherStationWBANIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        weatherStationWBANIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        weatherStationWBAN = new WeatherStationWBAN(item);
                    }
                }
            }


            XmlNodeList weatherStationWMONodeList = xmlNode.SelectNodes("weatherStationWMO");

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

            foreach (XmlNode item in weatherStationWMONodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        weatherStationWMOIDRef = item.Attributes["id"].Name;
                        WeatherStationWMO ob = WeatherStationWMO();
                        IDManager.SetID(weatherStationWMOIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        weatherStationWMOIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        weatherStationWMO = new WeatherStationWMO(item);
                    }
                }
            }
        }
コード例 #3
0
 public WeatherStation(XmlNode xmlNode)
 {
     XmlNode weatherStationCityNode = xmlNode.SelectSingleNode("weatherStationCity");
     
     if (weatherStationCityNode != null)
     {
         if (weatherStationCityNode.Attributes["href"] != null || weatherStationCityNode.Attributes["id"] != null) 
         {
             if (weatherStationCityNode.Attributes["id"] != null) 
             {
                 weatherStationCityIDRef_ = weatherStationCityNode.Attributes["id"].Value;
                 BusinessCenter ob = new BusinessCenter(weatherStationCityNode);
                 IDManager.SetID(weatherStationCityIDRef_, ob);
             }
             else if (weatherStationCityNode.Attributes["href"] != null)
             {
                 weatherStationCityIDRef_ = weatherStationCityNode.Attributes["href"].Value;
             }
             else
             {
                 weatherStationCity_ = new BusinessCenter(weatherStationCityNode);
             }
         }
         else
         {
             weatherStationCity_ = new BusinessCenter(weatherStationCityNode);
         }
     }
     
 
     XmlNode weatherStationAirportNode = xmlNode.SelectSingleNode("weatherStationAirport");
     
     if (weatherStationAirportNode != null)
     {
         if (weatherStationAirportNode.Attributes["href"] != null || weatherStationAirportNode.Attributes["id"] != null) 
         {
             if (weatherStationAirportNode.Attributes["id"] != null) 
             {
                 weatherStationAirportIDRef_ = weatherStationAirportNode.Attributes["id"].Value;
                 WeatherStationAirport ob = new WeatherStationAirport(weatherStationAirportNode);
                 IDManager.SetID(weatherStationAirportIDRef_, ob);
             }
             else if (weatherStationAirportNode.Attributes["href"] != null)
             {
                 weatherStationAirportIDRef_ = weatherStationAirportNode.Attributes["href"].Value;
             }
             else
             {
                 weatherStationAirport_ = new WeatherStationAirport(weatherStationAirportNode);
             }
         }
         else
         {
             weatherStationAirport_ = new WeatherStationAirport(weatherStationAirportNode);
         }
     }
     
 
     XmlNode weatherStationWBANNode = xmlNode.SelectSingleNode("weatherStationWBAN");
     
     if (weatherStationWBANNode != null)
     {
         if (weatherStationWBANNode.Attributes["href"] != null || weatherStationWBANNode.Attributes["id"] != null) 
         {
             if (weatherStationWBANNode.Attributes["id"] != null) 
             {
                 weatherStationWBANIDRef_ = weatherStationWBANNode.Attributes["id"].Value;
                 WeatherStationWBAN ob = new WeatherStationWBAN(weatherStationWBANNode);
                 IDManager.SetID(weatherStationWBANIDRef_, ob);
             }
             else if (weatherStationWBANNode.Attributes["href"] != null)
             {
                 weatherStationWBANIDRef_ = weatherStationWBANNode.Attributes["href"].Value;
             }
             else
             {
                 weatherStationWBAN_ = new WeatherStationWBAN(weatherStationWBANNode);
             }
         }
         else
         {
             weatherStationWBAN_ = new WeatherStationWBAN(weatherStationWBANNode);
         }
     }
     
 
     XmlNode weatherStationWMONode = xmlNode.SelectSingleNode("weatherStationWMO");
     
     if (weatherStationWMONode != null)
     {
         if (weatherStationWMONode.Attributes["href"] != null || weatherStationWMONode.Attributes["id"] != null) 
         {
             if (weatherStationWMONode.Attributes["id"] != null) 
             {
                 weatherStationWMOIDRef_ = weatherStationWMONode.Attributes["id"].Value;
                 WeatherStationWMO ob = new WeatherStationWMO(weatherStationWMONode);
                 IDManager.SetID(weatherStationWMOIDRef_, ob);
             }
             else if (weatherStationWMONode.Attributes["href"] != null)
             {
                 weatherStationWMOIDRef_ = weatherStationWMONode.Attributes["href"].Value;
             }
             else
             {
                 weatherStationWMO_ = new WeatherStationWMO(weatherStationWMONode);
             }
         }
         else
         {
             weatherStationWMO_ = new WeatherStationWMO(weatherStationWMONode);
         }
     }
     
 
 }
コード例 #4
0
        public WeatherStation(XmlNode xmlNode)
        {
            XmlNode weatherStationCityNode = xmlNode.SelectSingleNode("weatherStationCity");

            if (weatherStationCityNode != null)
            {
                if (weatherStationCityNode.Attributes["href"] != null || weatherStationCityNode.Attributes["id"] != null)
                {
                    if (weatherStationCityNode.Attributes["id"] != null)
                    {
                        weatherStationCityIDRef_ = weatherStationCityNode.Attributes["id"].Value;
                        BusinessCenter ob = new BusinessCenter(weatherStationCityNode);
                        IDManager.SetID(weatherStationCityIDRef_, ob);
                    }
                    else if (weatherStationCityNode.Attributes["href"] != null)
                    {
                        weatherStationCityIDRef_ = weatherStationCityNode.Attributes["href"].Value;
                    }
                    else
                    {
                        weatherStationCity_ = new BusinessCenter(weatherStationCityNode);
                    }
                }
                else
                {
                    weatherStationCity_ = new BusinessCenter(weatherStationCityNode);
                }
            }


            XmlNode weatherStationAirportNode = xmlNode.SelectSingleNode("weatherStationAirport");

            if (weatherStationAirportNode != null)
            {
                if (weatherStationAirportNode.Attributes["href"] != null || weatherStationAirportNode.Attributes["id"] != null)
                {
                    if (weatherStationAirportNode.Attributes["id"] != null)
                    {
                        weatherStationAirportIDRef_ = weatherStationAirportNode.Attributes["id"].Value;
                        WeatherStationAirport ob = new WeatherStationAirport(weatherStationAirportNode);
                        IDManager.SetID(weatherStationAirportIDRef_, ob);
                    }
                    else if (weatherStationAirportNode.Attributes["href"] != null)
                    {
                        weatherStationAirportIDRef_ = weatherStationAirportNode.Attributes["href"].Value;
                    }
                    else
                    {
                        weatherStationAirport_ = new WeatherStationAirport(weatherStationAirportNode);
                    }
                }
                else
                {
                    weatherStationAirport_ = new WeatherStationAirport(weatherStationAirportNode);
                }
            }


            XmlNode weatherStationWBANNode = xmlNode.SelectSingleNode("weatherStationWBAN");

            if (weatherStationWBANNode != null)
            {
                if (weatherStationWBANNode.Attributes["href"] != null || weatherStationWBANNode.Attributes["id"] != null)
                {
                    if (weatherStationWBANNode.Attributes["id"] != null)
                    {
                        weatherStationWBANIDRef_ = weatherStationWBANNode.Attributes["id"].Value;
                        WeatherStationWBAN ob = new WeatherStationWBAN(weatherStationWBANNode);
                        IDManager.SetID(weatherStationWBANIDRef_, ob);
                    }
                    else if (weatherStationWBANNode.Attributes["href"] != null)
                    {
                        weatherStationWBANIDRef_ = weatherStationWBANNode.Attributes["href"].Value;
                    }
                    else
                    {
                        weatherStationWBAN_ = new WeatherStationWBAN(weatherStationWBANNode);
                    }
                }
                else
                {
                    weatherStationWBAN_ = new WeatherStationWBAN(weatherStationWBANNode);
                }
            }


            XmlNode weatherStationWMONode = xmlNode.SelectSingleNode("weatherStationWMO");

            if (weatherStationWMONode != null)
            {
                if (weatherStationWMONode.Attributes["href"] != null || weatherStationWMONode.Attributes["id"] != null)
                {
                    if (weatherStationWMONode.Attributes["id"] != null)
                    {
                        weatherStationWMOIDRef_ = weatherStationWMONode.Attributes["id"].Value;
                        WeatherStationWMO ob = new WeatherStationWMO(weatherStationWMONode);
                        IDManager.SetID(weatherStationWMOIDRef_, ob);
                    }
                    else if (weatherStationWMONode.Attributes["href"] != null)
                    {
                        weatherStationWMOIDRef_ = weatherStationWMONode.Attributes["href"].Value;
                    }
                    else
                    {
                        weatherStationWMO_ = new WeatherStationWMO(weatherStationWMONode);
                    }
                }
                else
                {
                    weatherStationWMO_ = new WeatherStationWMO(weatherStationWMONode);
                }
            }
        }