Example #1
0
        public CoalProduct(XmlNode xmlNode)
        {
            XmlNode typeNode = xmlNode.SelectSingleNode("type");

            if (typeNode != null)
            {
                if (typeNode.Attributes["href"] != null || typeNode.Attributes["id"] != null)
                {
                    if (typeNode.Attributes["id"] != null)
                    {
                        typeIDRef_ = typeNode.Attributes["id"].Value;
                        CoalProductType ob = new CoalProductType(typeNode);
                        IDManager.SetID(typeIDRef_, ob);
                    }
                    else if (typeNode.Attributes["href"] != null)
                    {
                        typeIDRef_ = typeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        type_ = new CoalProductType(typeNode);
                    }
                }
                else
                {
                    type_ = new CoalProductType(typeNode);
                }
            }


            XmlNode coalProductSpecificationsNode = xmlNode.SelectSingleNode("coalProductSpecifications");

            if (coalProductSpecificationsNode != null)
            {
                if (coalProductSpecificationsNode.Attributes["href"] != null || coalProductSpecificationsNode.Attributes["id"] != null)
                {
                    if (coalProductSpecificationsNode.Attributes["id"] != null)
                    {
                        coalProductSpecificationsIDRef_ = coalProductSpecificationsNode.Attributes["id"].Value;
                        CoalProductSpecifications ob = new CoalProductSpecifications(coalProductSpecificationsNode);
                        IDManager.SetID(coalProductSpecificationsIDRef_, ob);
                    }
                    else if (coalProductSpecificationsNode.Attributes["href"] != null)
                    {
                        coalProductSpecificationsIDRef_ = coalProductSpecificationsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        coalProductSpecifications_ = new CoalProductSpecifications(coalProductSpecificationsNode);
                    }
                }
                else
                {
                    coalProductSpecifications_ = new CoalProductSpecifications(coalProductSpecificationsNode);
                }
            }


            XmlNodeList sourceNodeList = xmlNode.SelectNodes("source");

            if (sourceNodeList != null)
            {
                this.source_ = new List <CoalProductSource>();
                foreach (XmlNode item in sourceNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            sourceIDRef_ = item.Attributes["id"].Value;
                            source_.Add(new CoalProductSource(item));
                            IDManager.SetID(sourceIDRef_, source_[source_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            sourceIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            source_.Add(new CoalProductSource(item));
                        }
                    }
                    else
                    {
                        source_.Add(new CoalProductSource(item));
                    }
                }
            }


            XmlNode sCoTASpecificationsNode = xmlNode.SelectSingleNode("sCoTASpecifications");

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


            XmlNode btuQualityAdjustmentNode = xmlNode.SelectSingleNode("btuQualityAdjustment");

            if (btuQualityAdjustmentNode != null)
            {
                if (btuQualityAdjustmentNode.Attributes["href"] != null || btuQualityAdjustmentNode.Attributes["id"] != null)
                {
                    if (btuQualityAdjustmentNode.Attributes["id"] != null)
                    {
                        btuQualityAdjustmentIDRef_ = btuQualityAdjustmentNode.Attributes["id"].Value;
                        CoalQualityAdjustments ob = new CoalQualityAdjustments(btuQualityAdjustmentNode);
                        IDManager.SetID(btuQualityAdjustmentIDRef_, ob);
                    }
                    else if (btuQualityAdjustmentNode.Attributes["href"] != null)
                    {
                        btuQualityAdjustmentIDRef_ = btuQualityAdjustmentNode.Attributes["href"].Value;
                    }
                    else
                    {
                        btuQualityAdjustment_ = new CoalQualityAdjustments(btuQualityAdjustmentNode);
                    }
                }
                else
                {
                    btuQualityAdjustment_ = new CoalQualityAdjustments(btuQualityAdjustmentNode);
                }
            }


            XmlNode so2QualityAdjustmentNode = xmlNode.SelectSingleNode("so2QualityAdjustment");

            if (so2QualityAdjustmentNode != null)
            {
                if (so2QualityAdjustmentNode.Attributes["href"] != null || so2QualityAdjustmentNode.Attributes["id"] != null)
                {
                    if (so2QualityAdjustmentNode.Attributes["id"] != null)
                    {
                        so2QualityAdjustmentIDRef_ = so2QualityAdjustmentNode.Attributes["id"].Value;
                        CoalQualityAdjustments ob = new CoalQualityAdjustments(so2QualityAdjustmentNode);
                        IDManager.SetID(so2QualityAdjustmentIDRef_, ob);
                    }
                    else if (so2QualityAdjustmentNode.Attributes["href"] != null)
                    {
                        so2QualityAdjustmentIDRef_ = so2QualityAdjustmentNode.Attributes["href"].Value;
                    }
                    else
                    {
                        so2QualityAdjustment_ = new CoalQualityAdjustments(so2QualityAdjustmentNode);
                    }
                }
                else
                {
                    so2QualityAdjustment_ = new CoalQualityAdjustments(so2QualityAdjustmentNode);
                }
            }
        }
 public CoalProduct(XmlNode xmlNode)
 {
     XmlNodeList typeNodeList = xmlNode.SelectNodes("type");
     if (typeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in typeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 typeIDRef = item.Attributes["id"].Name;
                 CoalProductType ob = CoalProductType();
                 IDManager.SetID(typeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 typeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 type = new CoalProductType(item);
             }
         }
     }
     
 
     XmlNodeList coalProductSpecificationsNodeList = xmlNode.SelectNodes("coalProductSpecifications");
     if (coalProductSpecificationsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in coalProductSpecificationsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 coalProductSpecificationsIDRef = item.Attributes["id"].Name;
                 CoalProductSpecifications ob = CoalProductSpecifications();
                 IDManager.SetID(coalProductSpecificationsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 coalProductSpecificationsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 coalProductSpecifications = new CoalProductSpecifications(item);
             }
         }
     }
     
 
     XmlNodeList sourceNodeList = xmlNode.SelectNodes("source");
     
     foreach (XmlNode item in sourceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 sourceIDRef = item.Attributes["id"].Name;
                 List<CoalProductSource> ob = new List<CoalProductSource>();
                 ob.Add(new CoalProductSource(item));
                 IDManager.SetID(sourceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 sourceIDRef = item.Attributes["href"].Name;
             }
             else
             {
             source.Add(new CoalProductSource(item));
             }
         }
     }
     
 
     XmlNodeList sCoTASpecificationsNodeList = xmlNode.SelectNodes("sCoTASpecifications");
     if (sCoTASpecificationsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in sCoTASpecificationsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 sCoTASpecificationsIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(sCoTASpecificationsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 sCoTASpecificationsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 sCoTASpecifications = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList btuQualityAdjustmentNodeList = xmlNode.SelectNodes("btuQualityAdjustment");
     if (btuQualityAdjustmentNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in btuQualityAdjustmentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 btuQualityAdjustmentIDRef = item.Attributes["id"].Name;
                 CoalQualityAdjustments ob = CoalQualityAdjustments();
                 IDManager.SetID(btuQualityAdjustmentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 btuQualityAdjustmentIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 btuQualityAdjustment = new CoalQualityAdjustments(item);
             }
         }
     }
     
 
     XmlNodeList so2QualityAdjustmentNodeList = xmlNode.SelectNodes("so2QualityAdjustment");
     if (so2QualityAdjustmentNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in so2QualityAdjustmentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 so2QualityAdjustmentIDRef = item.Attributes["id"].Name;
                 CoalQualityAdjustments ob = CoalQualityAdjustments();
                 IDManager.SetID(so2QualityAdjustmentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 so2QualityAdjustmentIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 so2QualityAdjustment = new CoalQualityAdjustments(item);
             }
         }
     }
     
 
 }
 public CoalProduct(XmlNode xmlNode)
 {
     XmlNode typeNode = xmlNode.SelectSingleNode("type");
     
     if (typeNode != null)
     {
         if (typeNode.Attributes["href"] != null || typeNode.Attributes["id"] != null) 
         {
             if (typeNode.Attributes["id"] != null) 
             {
                 typeIDRef_ = typeNode.Attributes["id"].Value;
                 CoalProductType ob = new CoalProductType(typeNode);
                 IDManager.SetID(typeIDRef_, ob);
             }
             else if (typeNode.Attributes["href"] != null)
             {
                 typeIDRef_ = typeNode.Attributes["href"].Value;
             }
             else
             {
                 type_ = new CoalProductType(typeNode);
             }
         }
         else
         {
             type_ = new CoalProductType(typeNode);
         }
     }
     
 
     XmlNode coalProductSpecificationsNode = xmlNode.SelectSingleNode("coalProductSpecifications");
     
     if (coalProductSpecificationsNode != null)
     {
         if (coalProductSpecificationsNode.Attributes["href"] != null || coalProductSpecificationsNode.Attributes["id"] != null) 
         {
             if (coalProductSpecificationsNode.Attributes["id"] != null) 
             {
                 coalProductSpecificationsIDRef_ = coalProductSpecificationsNode.Attributes["id"].Value;
                 CoalProductSpecifications ob = new CoalProductSpecifications(coalProductSpecificationsNode);
                 IDManager.SetID(coalProductSpecificationsIDRef_, ob);
             }
             else if (coalProductSpecificationsNode.Attributes["href"] != null)
             {
                 coalProductSpecificationsIDRef_ = coalProductSpecificationsNode.Attributes["href"].Value;
             }
             else
             {
                 coalProductSpecifications_ = new CoalProductSpecifications(coalProductSpecificationsNode);
             }
         }
         else
         {
             coalProductSpecifications_ = new CoalProductSpecifications(coalProductSpecificationsNode);
         }
     }
     
 
     XmlNodeList sourceNodeList = xmlNode.SelectNodes("source");
     
     if (sourceNodeList != null)
     {
         this.source_ = new List<CoalProductSource>();
         foreach (XmlNode item in sourceNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     sourceIDRef_ = item.Attributes["id"].Value;
                     source_.Add(new CoalProductSource(item));
                     IDManager.SetID(sourceIDRef_, source_[source_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     sourceIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 source_.Add(new CoalProductSource(item));
                 }
             }
             else
             {
                 source_.Add(new CoalProductSource(item));
             }
         }
     }
     
 
     XmlNode sCoTASpecificationsNode = xmlNode.SelectSingleNode("sCoTASpecifications");
     
     if (sCoTASpecificationsNode != null)
     {
         if (sCoTASpecificationsNode.Attributes["href"] != null || sCoTASpecificationsNode.Attributes["id"] != null) 
         {
             if (sCoTASpecificationsNode.Attributes["id"] != null) 
             {
                 sCoTASpecificationsIDRef_ = sCoTASpecificationsNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(sCoTASpecificationsNode);
                 IDManager.SetID(sCoTASpecificationsIDRef_, ob);
             }
             else if (sCoTASpecificationsNode.Attributes["href"] != null)
             {
                 sCoTASpecificationsIDRef_ = sCoTASpecificationsNode.Attributes["href"].Value;
             }
             else
             {
                 sCoTASpecifications_ = new XsdTypeBoolean(sCoTASpecificationsNode);
             }
         }
         else
         {
             sCoTASpecifications_ = new XsdTypeBoolean(sCoTASpecificationsNode);
         }
     }
     
 
     XmlNode btuQualityAdjustmentNode = xmlNode.SelectSingleNode("btuQualityAdjustment");
     
     if (btuQualityAdjustmentNode != null)
     {
         if (btuQualityAdjustmentNode.Attributes["href"] != null || btuQualityAdjustmentNode.Attributes["id"] != null) 
         {
             if (btuQualityAdjustmentNode.Attributes["id"] != null) 
             {
                 btuQualityAdjustmentIDRef_ = btuQualityAdjustmentNode.Attributes["id"].Value;
                 CoalQualityAdjustments ob = new CoalQualityAdjustments(btuQualityAdjustmentNode);
                 IDManager.SetID(btuQualityAdjustmentIDRef_, ob);
             }
             else if (btuQualityAdjustmentNode.Attributes["href"] != null)
             {
                 btuQualityAdjustmentIDRef_ = btuQualityAdjustmentNode.Attributes["href"].Value;
             }
             else
             {
                 btuQualityAdjustment_ = new CoalQualityAdjustments(btuQualityAdjustmentNode);
             }
         }
         else
         {
             btuQualityAdjustment_ = new CoalQualityAdjustments(btuQualityAdjustmentNode);
         }
     }
     
 
     XmlNode so2QualityAdjustmentNode = xmlNode.SelectSingleNode("so2QualityAdjustment");
     
     if (so2QualityAdjustmentNode != null)
     {
         if (so2QualityAdjustmentNode.Attributes["href"] != null || so2QualityAdjustmentNode.Attributes["id"] != null) 
         {
             if (so2QualityAdjustmentNode.Attributes["id"] != null) 
             {
                 so2QualityAdjustmentIDRef_ = so2QualityAdjustmentNode.Attributes["id"].Value;
                 CoalQualityAdjustments ob = new CoalQualityAdjustments(so2QualityAdjustmentNode);
                 IDManager.SetID(so2QualityAdjustmentIDRef_, ob);
             }
             else if (so2QualityAdjustmentNode.Attributes["href"] != null)
             {
                 so2QualityAdjustmentIDRef_ = so2QualityAdjustmentNode.Attributes["href"].Value;
             }
             else
             {
                 so2QualityAdjustment_ = new CoalQualityAdjustments(so2QualityAdjustmentNode);
             }
         }
         else
         {
             so2QualityAdjustment_ = new CoalQualityAdjustments(so2QualityAdjustmentNode);
         }
     }
     
 
 }
        public CoalProduct(XmlNode xmlNode)
        {
            XmlNodeList typeNodeList = xmlNode.SelectNodes("type");

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

            foreach (XmlNode item in typeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        typeIDRef = item.Attributes["id"].Name;
                        CoalProductType ob = CoalProductType();
                        IDManager.SetID(typeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        typeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        type = new CoalProductType(item);
                    }
                }
            }


            XmlNodeList coalProductSpecificationsNodeList = xmlNode.SelectNodes("coalProductSpecifications");

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

            foreach (XmlNode item in coalProductSpecificationsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        coalProductSpecificationsIDRef = item.Attributes["id"].Name;
                        CoalProductSpecifications ob = CoalProductSpecifications();
                        IDManager.SetID(coalProductSpecificationsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        coalProductSpecificationsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        coalProductSpecifications = new CoalProductSpecifications(item);
                    }
                }
            }


            XmlNodeList sourceNodeList = xmlNode.SelectNodes("source");

            foreach (XmlNode item in sourceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        sourceIDRef = item.Attributes["id"].Name;
                        List <CoalProductSource> ob = new List <CoalProductSource>();
                        ob.Add(new CoalProductSource(item));
                        IDManager.SetID(sourceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        sourceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        source.Add(new CoalProductSource(item));
                    }
                }
            }


            XmlNodeList sCoTASpecificationsNodeList = xmlNode.SelectNodes("sCoTASpecifications");

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

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


            XmlNodeList btuQualityAdjustmentNodeList = xmlNode.SelectNodes("btuQualityAdjustment");

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

            foreach (XmlNode item in btuQualityAdjustmentNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        btuQualityAdjustmentIDRef = item.Attributes["id"].Name;
                        CoalQualityAdjustments ob = CoalQualityAdjustments();
                        IDManager.SetID(btuQualityAdjustmentIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        btuQualityAdjustmentIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        btuQualityAdjustment = new CoalQualityAdjustments(item);
                    }
                }
            }


            XmlNodeList so2QualityAdjustmentNodeList = xmlNode.SelectNodes("so2QualityAdjustment");

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

            foreach (XmlNode item in so2QualityAdjustmentNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        so2QualityAdjustmentIDRef = item.Attributes["id"].Name;
                        CoalQualityAdjustments ob = CoalQualityAdjustments();
                        IDManager.SetID(so2QualityAdjustmentIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        so2QualityAdjustmentIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        so2QualityAdjustment = new CoalQualityAdjustments(item);
                    }
                }
            }
        }