コード例 #1
0
 public CoalDelivery(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;
                 CoalDeliveryPoint ob = new CoalDeliveryPoint(deliveryPointNode);
                 IDManager.SetID(deliveryPointIDRef_, ob);
             }
             else if (deliveryPointNode.Attributes["href"] != null)
             {
                 deliveryPointIDRef_ = deliveryPointNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryPoint_ = new CoalDeliveryPoint(deliveryPointNode);
             }
         }
         else
         {
             deliveryPoint_ = new CoalDeliveryPoint(deliveryPointNode);
         }
     }
     
 
     XmlNode deliveryAtSourceNode = xmlNode.SelectSingleNode("deliveryAtSource");
     
     if (deliveryAtSourceNode != null)
     {
         if (deliveryAtSourceNode.Attributes["href"] != null || deliveryAtSourceNode.Attributes["id"] != null) 
         {
             if (deliveryAtSourceNode.Attributes["id"] != null) 
             {
                 deliveryAtSourceIDRef_ = deliveryAtSourceNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(deliveryAtSourceNode);
                 IDManager.SetID(deliveryAtSourceIDRef_, ob);
             }
             else if (deliveryAtSourceNode.Attributes["href"] != null)
             {
                 deliveryAtSourceIDRef_ = deliveryAtSourceNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryAtSource_ = new XsdTypeBoolean(deliveryAtSourceNode);
             }
         }
         else
         {
             deliveryAtSource_ = new XsdTypeBoolean(deliveryAtSourceNode);
         }
     }
     
 
     XmlNode quantityVariationAdjustmentNode = xmlNode.SelectSingleNode("quantityVariationAdjustment");
     
     if (quantityVariationAdjustmentNode != null)
     {
         if (quantityVariationAdjustmentNode.Attributes["href"] != null || quantityVariationAdjustmentNode.Attributes["id"] != null) 
         {
             if (quantityVariationAdjustmentNode.Attributes["id"] != null) 
             {
                 quantityVariationAdjustmentIDRef_ = quantityVariationAdjustmentNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(quantityVariationAdjustmentNode);
                 IDManager.SetID(quantityVariationAdjustmentIDRef_, ob);
             }
             else if (quantityVariationAdjustmentNode.Attributes["href"] != null)
             {
                 quantityVariationAdjustmentIDRef_ = quantityVariationAdjustmentNode.Attributes["href"].Value;
             }
             else
             {
                 quantityVariationAdjustment_ = new XsdTypeBoolean(quantityVariationAdjustmentNode);
             }
         }
         else
         {
             quantityVariationAdjustment_ = new XsdTypeBoolean(quantityVariationAdjustmentNode);
         }
     }
     
 
     XmlNode transportationEquipmentNode = xmlNode.SelectSingleNode("transportationEquipment");
     
     if (transportationEquipmentNode != null)
     {
         if (transportationEquipmentNode.Attributes["href"] != null || transportationEquipmentNode.Attributes["id"] != null) 
         {
             if (transportationEquipmentNode.Attributes["id"] != null) 
             {
                 transportationEquipmentIDRef_ = transportationEquipmentNode.Attributes["id"].Value;
                 CoalTransportationEquipment ob = new CoalTransportationEquipment(transportationEquipmentNode);
                 IDManager.SetID(transportationEquipmentIDRef_, ob);
             }
             else if (transportationEquipmentNode.Attributes["href"] != null)
             {
                 transportationEquipmentIDRef_ = transportationEquipmentNode.Attributes["href"].Value;
             }
             else
             {
                 transportationEquipment_ = new CoalTransportationEquipment(transportationEquipmentNode);
             }
         }
         else
         {
             transportationEquipment_ = new CoalTransportationEquipment(transportationEquipmentNode);
         }
     }
     
 
     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);
         }
     }
     
 
 }
コード例 #2
0
        public CoalDelivery(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;
                        CoalDeliveryPoint ob = CoalDeliveryPoint();
                        IDManager.SetID(deliveryPointIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        deliveryPointIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        deliveryPoint = new CoalDeliveryPoint(item);
                    }
                }
            }


            XmlNodeList deliveryAtSourceNodeList = xmlNode.SelectNodes("deliveryAtSource");

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

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


            XmlNodeList quantityVariationAdjustmentNodeList = xmlNode.SelectNodes("quantityVariationAdjustment");

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

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


            XmlNodeList transportationEquipmentNodeList = xmlNode.SelectNodes("transportationEquipment");

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

            foreach (XmlNode item in transportationEquipmentNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        transportationEquipmentIDRef = item.Attributes["id"].Name;
                        CoalTransportationEquipment ob = CoalTransportationEquipment();
                        IDManager.SetID(transportationEquipmentIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        transportationEquipmentIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        transportationEquipment = new CoalTransportationEquipment(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);
                    }
                }
            }
        }
コード例 #3
0
        public CoalDelivery(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;
                        CoalDeliveryPoint ob = new CoalDeliveryPoint(deliveryPointNode);
                        IDManager.SetID(deliveryPointIDRef_, ob);
                    }
                    else if (deliveryPointNode.Attributes["href"] != null)
                    {
                        deliveryPointIDRef_ = deliveryPointNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliveryPoint_ = new CoalDeliveryPoint(deliveryPointNode);
                    }
                }
                else
                {
                    deliveryPoint_ = new CoalDeliveryPoint(deliveryPointNode);
                }
            }


            XmlNode deliveryAtSourceNode = xmlNode.SelectSingleNode("deliveryAtSource");

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


            XmlNode quantityVariationAdjustmentNode = xmlNode.SelectSingleNode("quantityVariationAdjustment");

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


            XmlNode transportationEquipmentNode = xmlNode.SelectSingleNode("transportationEquipment");

            if (transportationEquipmentNode != null)
            {
                if (transportationEquipmentNode.Attributes["href"] != null || transportationEquipmentNode.Attributes["id"] != null)
                {
                    if (transportationEquipmentNode.Attributes["id"] != null)
                    {
                        transportationEquipmentIDRef_ = transportationEquipmentNode.Attributes["id"].Value;
                        CoalTransportationEquipment ob = new CoalTransportationEquipment(transportationEquipmentNode);
                        IDManager.SetID(transportationEquipmentIDRef_, ob);
                    }
                    else if (transportationEquipmentNode.Attributes["href"] != null)
                    {
                        transportationEquipmentIDRef_ = transportationEquipmentNode.Attributes["href"].Value;
                    }
                    else
                    {
                        transportationEquipment_ = new CoalTransportationEquipment(transportationEquipmentNode);
                    }
                }
                else
                {
                    transportationEquipment_ = new CoalTransportationEquipment(transportationEquipmentNode);
                }
            }


            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);
                }
            }
        }
コード例 #4
0
 public CoalDelivery(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;
                 CoalDeliveryPoint ob = CoalDeliveryPoint();
                 IDManager.SetID(deliveryPointIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryPointIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryPoint = new CoalDeliveryPoint(item);
             }
         }
     }
     
 
     XmlNodeList deliveryAtSourceNodeList = xmlNode.SelectNodes("deliveryAtSource");
     if (deliveryAtSourceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in deliveryAtSourceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 deliveryAtSourceIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(deliveryAtSourceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryAtSourceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryAtSource = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList quantityVariationAdjustmentNodeList = xmlNode.SelectNodes("quantityVariationAdjustment");
     if (quantityVariationAdjustmentNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in quantityVariationAdjustmentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 quantityVariationAdjustmentIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(quantityVariationAdjustmentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 quantityVariationAdjustmentIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 quantityVariationAdjustment = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList transportationEquipmentNodeList = xmlNode.SelectNodes("transportationEquipment");
     if (transportationEquipmentNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in transportationEquipmentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 transportationEquipmentIDRef = item.Attributes["id"].Name;
                 CoalTransportationEquipment ob = CoalTransportationEquipment();
                 IDManager.SetID(transportationEquipmentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 transportationEquipmentIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 transportationEquipment = new CoalTransportationEquipment(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);
             }
         }
     }
     
 
 }