コード例 #1
0
        public EnvironmentalProductComplaincePeriod(XmlNode xmlNode)
        {
            XmlNodeList startYearNodeList = xmlNode.SelectNodes("startYear");

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

            foreach (XmlNode item in startYearNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        startYearIDRef = item.Attributes["id"].Name;
                        XsdTypeGYear ob = XsdTypeGYear();
                        IDManager.SetID(startYearIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        startYearIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        startYear = new XsdTypeGYear(item);
                    }
                }
            }


            XmlNodeList endYearNodeList = xmlNode.SelectNodes("endYear");

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

            foreach (XmlNode item in endYearNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        endYearIDRef = item.Attributes["id"].Name;
                        XsdTypeGYear ob = XsdTypeGYear();
                        IDManager.SetID(endYearIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        endYearIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        endYear = new XsdTypeGYear(item);
                    }
                }
            }
        }
 public EnvironmentalProductComplaincePeriod(XmlNode xmlNode)
 {
     XmlNode startYearNode = xmlNode.SelectSingleNode("startYear");
     
     if (startYearNode != null)
     {
         if (startYearNode.Attributes["href"] != null || startYearNode.Attributes["id"] != null) 
         {
             if (startYearNode.Attributes["id"] != null) 
             {
                 startYearIDRef_ = startYearNode.Attributes["id"].Value;
                 XsdTypeGYear ob = new XsdTypeGYear(startYearNode);
                 IDManager.SetID(startYearIDRef_, ob);
             }
             else if (startYearNode.Attributes["href"] != null)
             {
                 startYearIDRef_ = startYearNode.Attributes["href"].Value;
             }
             else
             {
                 startYear_ = new XsdTypeGYear(startYearNode);
             }
         }
         else
         {
             startYear_ = new XsdTypeGYear(startYearNode);
         }
     }
     
 
     XmlNode endYearNode = xmlNode.SelectSingleNode("endYear");
     
     if (endYearNode != null)
     {
         if (endYearNode.Attributes["href"] != null || endYearNode.Attributes["id"] != null) 
         {
             if (endYearNode.Attributes["id"] != null) 
             {
                 endYearIDRef_ = endYearNode.Attributes["id"].Value;
                 XsdTypeGYear ob = new XsdTypeGYear(endYearNode);
                 IDManager.SetID(endYearIDRef_, ob);
             }
             else if (endYearNode.Attributes["href"] != null)
             {
                 endYearIDRef_ = endYearNode.Attributes["href"].Value;
             }
             else
             {
                 endYear_ = new XsdTypeGYear(endYearNode);
             }
         }
         else
         {
             endYear_ = new XsdTypeGYear(endYearNode);
         }
     }
     
 
 }
コード例 #3
0
        public EnvironmentalProductComplaincePeriod(XmlNode xmlNode)
        {
            XmlNode startYearNode = xmlNode.SelectSingleNode("startYear");

            if (startYearNode != null)
            {
                if (startYearNode.Attributes["href"] != null || startYearNode.Attributes["id"] != null)
                {
                    if (startYearNode.Attributes["id"] != null)
                    {
                        startYearIDRef_ = startYearNode.Attributes["id"].Value;
                        XsdTypeGYear ob = new XsdTypeGYear(startYearNode);
                        IDManager.SetID(startYearIDRef_, ob);
                    }
                    else if (startYearNode.Attributes["href"] != null)
                    {
                        startYearIDRef_ = startYearNode.Attributes["href"].Value;
                    }
                    else
                    {
                        startYear_ = new XsdTypeGYear(startYearNode);
                    }
                }
                else
                {
                    startYear_ = new XsdTypeGYear(startYearNode);
                }
            }


            XmlNode endYearNode = xmlNode.SelectSingleNode("endYear");

            if (endYearNode != null)
            {
                if (endYearNode.Attributes["href"] != null || endYearNode.Attributes["id"] != null)
                {
                    if (endYearNode.Attributes["id"] != null)
                    {
                        endYearIDRef_ = endYearNode.Attributes["id"].Value;
                        XsdTypeGYear ob = new XsdTypeGYear(endYearNode);
                        IDManager.SetID(endYearIDRef_, ob);
                    }
                    else if (endYearNode.Attributes["href"] != null)
                    {
                        endYearIDRef_ = endYearNode.Attributes["href"].Value;
                    }
                    else
                    {
                        endYear_ = new XsdTypeGYear(endYearNode);
                    }
                }
                else
                {
                    endYear_ = new XsdTypeGYear(endYearNode);
                }
            }
        }
コード例 #4
0
        public EnvironmentalProduct(XmlNode xmlNode)
        {
            XmlNodeList productTypeNodeList = xmlNode.SelectNodes("productType");

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

            foreach (XmlNode item in productTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        productTypeIDRef = item.Attributes["id"].Name;
                        EnvironmentalProductTypeEnum ob = EnvironmentalProductTypeEnum();
                        IDManager.SetID(productTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        productTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        productType = new EnvironmentalProductTypeEnum(item);
                    }
                }
            }


            XmlNodeList compliancePeriodNodeList = xmlNode.SelectNodes("compliancePeriod");

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

            foreach (XmlNode item in compliancePeriodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        compliancePeriodIDRef = item.Attributes["id"].Name;
                        EnvironmentalProductComplaincePeriod ob = EnvironmentalProductComplaincePeriod();
                        IDManager.SetID(compliancePeriodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        compliancePeriodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        compliancePeriod = new EnvironmentalProductComplaincePeriod(item);
                    }
                }
            }


            XmlNodeList vintageNodeList = xmlNode.SelectNodes("vintage");

            foreach (XmlNode item in vintageNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        vintageIDRef = item.Attributes["id"].Name;
                        XsdTypeGYear ob = new XsdTypeGYear();
                        ob.Add(new XsdTypeGYear(item));
                        IDManager.SetID(vintageIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        vintageIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        vintage.Add(new XsdTypeGYear(item));
                    }
                }
            }


            XmlNodeList applicableLawNodeList = xmlNode.SelectNodes("applicableLaw");

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

            foreach (XmlNode item in applicableLawNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        applicableLawIDRef = item.Attributes["id"].Name;
                        EnvironmentalProductApplicableLaw ob = EnvironmentalProductApplicableLaw();
                        IDManager.SetID(applicableLawIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        applicableLawIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        applicableLaw = new EnvironmentalProductApplicableLaw(item);
                    }
                }
            }


            XmlNodeList trackingSystemNodeList = xmlNode.SelectNodes("trackingSystem");

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

            foreach (XmlNode item in trackingSystemNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        trackingSystemIDRef = item.Attributes["id"].Name;
                        EnvironmentalTrackingSystem ob = EnvironmentalTrackingSystem();
                        IDManager.SetID(trackingSystemIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        trackingSystemIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        trackingSystem = new EnvironmentalTrackingSystem(item);
                    }
                }
            }
        }