コード例 #1
0
        public OilDelivery(XmlNode xmlNode)
        {
            XmlNode pipelineNode = xmlNode.SelectSingleNode("pipeline");

            if (pipelineNode != null)
            {
                if (pipelineNode.Attributes["href"] != null || pipelineNode.Attributes["id"] != null)
                {
                    if (pipelineNode.Attributes["id"] != null)
                    {
                        pipelineIDRef_ = pipelineNode.Attributes["id"].Value;
                        OilPipelineDelivery ob = new OilPipelineDelivery(pipelineNode);
                        IDManager.SetID(pipelineIDRef_, ob);
                    }
                    else if (pipelineNode.Attributes["href"] != null)
                    {
                        pipelineIDRef_ = pipelineNode.Attributes["href"].Value;
                    }
                    else
                    {
                        pipeline_ = new OilPipelineDelivery(pipelineNode);
                    }
                }
                else
                {
                    pipeline_ = new OilPipelineDelivery(pipelineNode);
                }
            }


            XmlNode transferNode = xmlNode.SelectSingleNode("transfer");

            if (transferNode != null)
            {
                if (transferNode.Attributes["href"] != null || transferNode.Attributes["id"] != null)
                {
                    if (transferNode.Attributes["id"] != null)
                    {
                        transferIDRef_ = transferNode.Attributes["id"].Value;
                        OilTransferDelivery ob = new OilTransferDelivery(transferNode);
                        IDManager.SetID(transferIDRef_, ob);
                    }
                    else if (transferNode.Attributes["href"] != null)
                    {
                        transferIDRef_ = transferNode.Attributes["href"].Value;
                    }
                    else
                    {
                        transfer_ = new OilTransferDelivery(transferNode);
                    }
                }
                else
                {
                    transfer_ = new OilTransferDelivery(transferNode);
                }
            }


            XmlNode importerOfRecordNode = xmlNode.SelectSingleNode("importerOfRecord");

            if (importerOfRecordNode != null)
            {
                if (importerOfRecordNode.Attributes["href"] != null || importerOfRecordNode.Attributes["id"] != null)
                {
                    if (importerOfRecordNode.Attributes["id"] != null)
                    {
                        importerOfRecordIDRef_ = importerOfRecordNode.Attributes["id"].Value;
                        PartyReference ob = new PartyReference(importerOfRecordNode);
                        IDManager.SetID(importerOfRecordIDRef_, ob);
                    }
                    else if (importerOfRecordNode.Attributes["href"] != null)
                    {
                        importerOfRecordIDRef_ = importerOfRecordNode.Attributes["href"].Value;
                    }
                    else
                    {
                        importerOfRecord_ = new PartyReference(importerOfRecordNode);
                    }
                }
                else
                {
                    importerOfRecord_ = new PartyReference(importerOfRecordNode);
                }
            }


            XmlNode absoluteToleranceNode = xmlNode.SelectSingleNode("absoluteTolerance");

            if (absoluteToleranceNode != null)
            {
                if (absoluteToleranceNode.Attributes["href"] != null || absoluteToleranceNode.Attributes["id"] != null)
                {
                    if (absoluteToleranceNode.Attributes["id"] != null)
                    {
                        absoluteToleranceIDRef_ = absoluteToleranceNode.Attributes["id"].Value;
                        AbsoluteTolerance ob = new AbsoluteTolerance(absoluteToleranceNode);
                        IDManager.SetID(absoluteToleranceIDRef_, ob);
                    }
                    else if (absoluteToleranceNode.Attributes["href"] != null)
                    {
                        absoluteToleranceIDRef_ = absoluteToleranceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        absoluteTolerance_ = new AbsoluteTolerance(absoluteToleranceNode);
                    }
                }
                else
                {
                    absoluteTolerance_ = new AbsoluteTolerance(absoluteToleranceNode);
                }
            }


            XmlNode percentageToleranceNode = xmlNode.SelectSingleNode("percentageTolerance");

            if (percentageToleranceNode != null)
            {
                if (percentageToleranceNode.Attributes["href"] != null || percentageToleranceNode.Attributes["id"] != null)
                {
                    if (percentageToleranceNode.Attributes["id"] != null)
                    {
                        percentageToleranceIDRef_ = percentageToleranceNode.Attributes["id"].Value;
                        PercentageTolerance ob = new PercentageTolerance(percentageToleranceNode);
                        IDManager.SetID(percentageToleranceIDRef_, ob);
                    }
                    else if (percentageToleranceNode.Attributes["href"] != null)
                    {
                        percentageToleranceIDRef_ = percentageToleranceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        percentageTolerance_ = new PercentageTolerance(percentageToleranceNode);
                    }
                }
                else
                {
                    percentageTolerance_ = new PercentageTolerance(percentageToleranceNode);
                }
            }
        }
コード例 #2
0
        public OilDelivery(XmlNode xmlNode)
        {
            XmlNodeList pipelineNodeList = xmlNode.SelectNodes("pipeline");

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

            foreach (XmlNode item in pipelineNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        pipelineIDRef = item.Attributes["id"].Name;
                        OilPipelineDelivery ob = OilPipelineDelivery();
                        IDManager.SetID(pipelineIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        pipelineIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        pipeline = new OilPipelineDelivery(item);
                    }
                }
            }


            XmlNodeList transferNodeList = xmlNode.SelectNodes("transfer");

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

            foreach (XmlNode item in transferNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        transferIDRef = item.Attributes["id"].Name;
                        OilTransferDelivery ob = OilTransferDelivery();
                        IDManager.SetID(transferIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        transferIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        transfer = new OilTransferDelivery(item);
                    }
                }
            }


            XmlNodeList importerOfRecordNodeList = xmlNode.SelectNodes("importerOfRecord");

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

            foreach (XmlNode item in importerOfRecordNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        importerOfRecordIDRef = item.Attributes["id"].Name;
                        PartyReference ob = PartyReference();
                        IDManager.SetID(importerOfRecordIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        importerOfRecordIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        importerOfRecord = new PartyReference(item);
                    }
                }
            }


            XmlNodeList absoluteToleranceNodeList = xmlNode.SelectNodes("absoluteTolerance");

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

            foreach (XmlNode item in absoluteToleranceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        absoluteToleranceIDRef = item.Attributes["id"].Name;
                        AbsoluteTolerance ob = AbsoluteTolerance();
                        IDManager.SetID(absoluteToleranceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        absoluteToleranceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        absoluteTolerance = new AbsoluteTolerance(item);
                    }
                }
            }


            XmlNodeList percentageToleranceNodeList = xmlNode.SelectNodes("percentageTolerance");

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

            foreach (XmlNode item in percentageToleranceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        percentageToleranceIDRef = item.Attributes["id"].Name;
                        PercentageTolerance ob = PercentageTolerance();
                        IDManager.SetID(percentageToleranceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        percentageToleranceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        percentageTolerance = new PercentageTolerance(item);
                    }
                }
            }
        }
コード例 #3
0
 public OilDelivery(XmlNode xmlNode)
 {
     XmlNode pipelineNode = xmlNode.SelectSingleNode("pipeline");
     
     if (pipelineNode != null)
     {
         if (pipelineNode.Attributes["href"] != null || pipelineNode.Attributes["id"] != null) 
         {
             if (pipelineNode.Attributes["id"] != null) 
             {
                 pipelineIDRef_ = pipelineNode.Attributes["id"].Value;
                 OilPipelineDelivery ob = new OilPipelineDelivery(pipelineNode);
                 IDManager.SetID(pipelineIDRef_, ob);
             }
             else if (pipelineNode.Attributes["href"] != null)
             {
                 pipelineIDRef_ = pipelineNode.Attributes["href"].Value;
             }
             else
             {
                 pipeline_ = new OilPipelineDelivery(pipelineNode);
             }
         }
         else
         {
             pipeline_ = new OilPipelineDelivery(pipelineNode);
         }
     }
     
 
     XmlNode transferNode = xmlNode.SelectSingleNode("transfer");
     
     if (transferNode != null)
     {
         if (transferNode.Attributes["href"] != null || transferNode.Attributes["id"] != null) 
         {
             if (transferNode.Attributes["id"] != null) 
             {
                 transferIDRef_ = transferNode.Attributes["id"].Value;
                 OilTransferDelivery ob = new OilTransferDelivery(transferNode);
                 IDManager.SetID(transferIDRef_, ob);
             }
             else if (transferNode.Attributes["href"] != null)
             {
                 transferIDRef_ = transferNode.Attributes["href"].Value;
             }
             else
             {
                 transfer_ = new OilTransferDelivery(transferNode);
             }
         }
         else
         {
             transfer_ = new OilTransferDelivery(transferNode);
         }
     }
     
 
     XmlNode importerOfRecordNode = xmlNode.SelectSingleNode("importerOfRecord");
     
     if (importerOfRecordNode != null)
     {
         if (importerOfRecordNode.Attributes["href"] != null || importerOfRecordNode.Attributes["id"] != null) 
         {
             if (importerOfRecordNode.Attributes["id"] != null) 
             {
                 importerOfRecordIDRef_ = importerOfRecordNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(importerOfRecordNode);
                 IDManager.SetID(importerOfRecordIDRef_, ob);
             }
             else if (importerOfRecordNode.Attributes["href"] != null)
             {
                 importerOfRecordIDRef_ = importerOfRecordNode.Attributes["href"].Value;
             }
             else
             {
                 importerOfRecord_ = new PartyReference(importerOfRecordNode);
             }
         }
         else
         {
             importerOfRecord_ = new PartyReference(importerOfRecordNode);
         }
     }
     
 
     XmlNode absoluteToleranceNode = xmlNode.SelectSingleNode("absoluteTolerance");
     
     if (absoluteToleranceNode != null)
     {
         if (absoluteToleranceNode.Attributes["href"] != null || absoluteToleranceNode.Attributes["id"] != null) 
         {
             if (absoluteToleranceNode.Attributes["id"] != null) 
             {
                 absoluteToleranceIDRef_ = absoluteToleranceNode.Attributes["id"].Value;
                 AbsoluteTolerance ob = new AbsoluteTolerance(absoluteToleranceNode);
                 IDManager.SetID(absoluteToleranceIDRef_, ob);
             }
             else if (absoluteToleranceNode.Attributes["href"] != null)
             {
                 absoluteToleranceIDRef_ = absoluteToleranceNode.Attributes["href"].Value;
             }
             else
             {
                 absoluteTolerance_ = new AbsoluteTolerance(absoluteToleranceNode);
             }
         }
         else
         {
             absoluteTolerance_ = new AbsoluteTolerance(absoluteToleranceNode);
         }
     }
     
 
     XmlNode percentageToleranceNode = xmlNode.SelectSingleNode("percentageTolerance");
     
     if (percentageToleranceNode != null)
     {
         if (percentageToleranceNode.Attributes["href"] != null || percentageToleranceNode.Attributes["id"] != null) 
         {
             if (percentageToleranceNode.Attributes["id"] != null) 
             {
                 percentageToleranceIDRef_ = percentageToleranceNode.Attributes["id"].Value;
                 PercentageTolerance ob = new PercentageTolerance(percentageToleranceNode);
                 IDManager.SetID(percentageToleranceIDRef_, ob);
             }
             else if (percentageToleranceNode.Attributes["href"] != null)
             {
                 percentageToleranceIDRef_ = percentageToleranceNode.Attributes["href"].Value;
             }
             else
             {
                 percentageTolerance_ = new PercentageTolerance(percentageToleranceNode);
             }
         }
         else
         {
             percentageTolerance_ = new PercentageTolerance(percentageToleranceNode);
         }
     }
     
 
 }
コード例 #4
0
 public OilDelivery(XmlNode xmlNode)
 {
     XmlNodeList pipelineNodeList = xmlNode.SelectNodes("pipeline");
     if (pipelineNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in pipelineNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 pipelineIDRef = item.Attributes["id"].Name;
                 OilPipelineDelivery ob = OilPipelineDelivery();
                 IDManager.SetID(pipelineIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 pipelineIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 pipeline = new OilPipelineDelivery(item);
             }
         }
     }
     
 
     XmlNodeList transferNodeList = xmlNode.SelectNodes("transfer");
     if (transferNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in transferNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 transferIDRef = item.Attributes["id"].Name;
                 OilTransferDelivery ob = OilTransferDelivery();
                 IDManager.SetID(transferIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 transferIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 transfer = new OilTransferDelivery(item);
             }
         }
     }
     
 
     XmlNodeList importerOfRecordNodeList = xmlNode.SelectNodes("importerOfRecord");
     if (importerOfRecordNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in importerOfRecordNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 importerOfRecordIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(importerOfRecordIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 importerOfRecordIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 importerOfRecord = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList absoluteToleranceNodeList = xmlNode.SelectNodes("absoluteTolerance");
     if (absoluteToleranceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in absoluteToleranceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 absoluteToleranceIDRef = item.Attributes["id"].Name;
                 AbsoluteTolerance ob = AbsoluteTolerance();
                 IDManager.SetID(absoluteToleranceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 absoluteToleranceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 absoluteTolerance = new AbsoluteTolerance(item);
             }
         }
     }
     
 
     XmlNodeList percentageToleranceNodeList = xmlNode.SelectNodes("percentageTolerance");
     if (percentageToleranceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in percentageToleranceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 percentageToleranceIDRef = item.Attributes["id"].Name;
                 PercentageTolerance ob = PercentageTolerance();
                 IDManager.SetID(percentageToleranceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 percentageToleranceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 percentageTolerance = new PercentageTolerance(item);
             }
         }
     }
     
 
 }