public CommoditySpread(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode spreadConversionFactorNode = xmlNode.SelectSingleNode("spreadConversionFactor");
     
     if (spreadConversionFactorNode != null)
     {
         if (spreadConversionFactorNode.Attributes["href"] != null || spreadConversionFactorNode.Attributes["id"] != null) 
         {
             if (spreadConversionFactorNode.Attributes["id"] != null) 
             {
                 spreadConversionFactorIDRef_ = spreadConversionFactorNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(spreadConversionFactorNode);
                 IDManager.SetID(spreadConversionFactorIDRef_, ob);
             }
             else if (spreadConversionFactorNode.Attributes["href"] != null)
             {
                 spreadConversionFactorIDRef_ = spreadConversionFactorNode.Attributes["href"].Value;
             }
             else
             {
                 spreadConversionFactor_ = new XsdTypeDecimal(spreadConversionFactorNode);
             }
         }
         else
         {
             spreadConversionFactor_ = new XsdTypeDecimal(spreadConversionFactorNode);
         }
     }
     
 
     XmlNode spreadUnitNode = xmlNode.SelectSingleNode("spreadUnit");
     
     if (spreadUnitNode != null)
     {
         if (spreadUnitNode.Attributes["href"] != null || spreadUnitNode.Attributes["id"] != null) 
         {
             if (spreadUnitNode.Attributes["id"] != null) 
             {
                 spreadUnitIDRef_ = spreadUnitNode.Attributes["id"].Value;
                 QuantityUnit ob = new QuantityUnit(spreadUnitNode);
                 IDManager.SetID(spreadUnitIDRef_, ob);
             }
             else if (spreadUnitNode.Attributes["href"] != null)
             {
                 spreadUnitIDRef_ = spreadUnitNode.Attributes["href"].Value;
             }
             else
             {
                 spreadUnit_ = new QuantityUnit(spreadUnitNode);
             }
         }
         else
         {
             spreadUnit_ = new QuantityUnit(spreadUnitNode);
         }
     }
     
 
 }
 public CommoditySpread(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList spreadConversionFactorNodeList = xmlNode.SelectNodes("spreadConversionFactor");
     if (spreadConversionFactorNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in spreadConversionFactorNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 spreadConversionFactorIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(spreadConversionFactorIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 spreadConversionFactorIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 spreadConversionFactor = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList spreadUnitNodeList = xmlNode.SelectNodes("spreadUnit");
     if (spreadUnitNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in spreadUnitNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 spreadUnitIDRef = item.Attributes["id"].Name;
                 QuantityUnit ob = QuantityUnit();
                 IDManager.SetID(spreadUnitIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 spreadUnitIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 spreadUnit = new QuantityUnit(item);
             }
         }
     }
     
 
 }
 public WeatherIndex(XmlNode xmlNode)
 {
     XmlNode quantityNode = xmlNode.SelectSingleNode("quantity");
     
     if (quantityNode != null)
     {
         if (quantityNode.Attributes["href"] != null || quantityNode.Attributes["id"] != null) 
         {
             if (quantityNode.Attributes["id"] != null) 
             {
                 quantityIDRef_ = quantityNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(quantityNode);
                 IDManager.SetID(quantityIDRef_, ob);
             }
             else if (quantityNode.Attributes["href"] != null)
             {
                 quantityIDRef_ = quantityNode.Attributes["href"].Value;
             }
             else
             {
                 quantity_ = new XsdTypeDecimal(quantityNode);
             }
         }
         else
         {
             quantity_ = new XsdTypeDecimal(quantityNode);
         }
     }
     
 
     XmlNode unitNode = xmlNode.SelectSingleNode("unit");
     
     if (unitNode != null)
     {
         if (unitNode.Attributes["href"] != null || unitNode.Attributes["id"] != null) 
         {
             if (unitNode.Attributes["id"] != null) 
             {
                 unitIDRef_ = unitNode.Attributes["id"].Value;
                 QuantityUnit ob = new QuantityUnit(unitNode);
                 IDManager.SetID(unitIDRef_, ob);
             }
             else if (unitNode.Attributes["href"] != null)
             {
                 unitIDRef_ = unitNode.Attributes["href"].Value;
             }
             else
             {
                 unit_ = new QuantityUnit(unitNode);
             }
         }
         else
         {
             unit_ = new QuantityUnit(unitNode);
         }
     }
     
 
 }
 public UnitQuantity(XmlNode xmlNode)
 {
     XmlNodeList quantityUnitNodeList = xmlNode.SelectNodes("quantityUnit");
     if (quantityUnitNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in quantityUnitNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 quantityUnitIDRef = item.Attributes["id"].Name;
                 QuantityUnit ob = QuantityUnit();
                 IDManager.SetID(quantityUnitIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 quantityUnitIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 quantityUnit = new QuantityUnit(item);
             }
         }
     }
     
 
     XmlNodeList quantityNodeList = xmlNode.SelectNodes("quantity");
     if (quantityNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in quantityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 quantityIDRef = item.Attributes["id"].Name;
                 NonNegativeDecimal ob = NonNegativeDecimal();
                 IDManager.SetID(quantityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 quantityIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 quantity = new NonNegativeDecimal(item);
             }
         }
     }
     
 
 }
 public UnitQuantity(XmlNode xmlNode)
 {
     XmlNode quantityUnitNode = xmlNode.SelectSingleNode("quantityUnit");
     
     if (quantityUnitNode != null)
     {
         if (quantityUnitNode.Attributes["href"] != null || quantityUnitNode.Attributes["id"] != null) 
         {
             if (quantityUnitNode.Attributes["id"] != null) 
             {
                 quantityUnitIDRef_ = quantityUnitNode.Attributes["id"].Value;
                 QuantityUnit ob = new QuantityUnit(quantityUnitNode);
                 IDManager.SetID(quantityUnitIDRef_, ob);
             }
             else if (quantityUnitNode.Attributes["href"] != null)
             {
                 quantityUnitIDRef_ = quantityUnitNode.Attributes["href"].Value;
             }
             else
             {
                 quantityUnit_ = new QuantityUnit(quantityUnitNode);
             }
         }
         else
         {
             quantityUnit_ = new QuantityUnit(quantityUnitNode);
         }
     }
     
 
     XmlNode quantityNode = xmlNode.SelectSingleNode("quantity");
     
     if (quantityNode != null)
     {
         if (quantityNode.Attributes["href"] != null || quantityNode.Attributes["id"] != null) 
         {
             if (quantityNode.Attributes["id"] != null) 
             {
                 quantityIDRef_ = quantityNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(quantityNode);
                 IDManager.SetID(quantityIDRef_, ob);
             }
             else if (quantityNode.Attributes["href"] != null)
             {
                 quantityIDRef_ = quantityNode.Attributes["href"].Value;
             }
             else
             {
                 quantity_ = new NonNegativeDecimal(quantityNode);
             }
         }
         else
         {
             quantity_ = new NonNegativeDecimal(quantityNode);
         }
     }
     
 
 }
        public UnitQuantity(XmlNode xmlNode)
        {
            XmlNodeList quantityUnitNodeList = xmlNode.SelectNodes("quantityUnit");

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

            foreach (XmlNode item in quantityUnitNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        quantityUnitIDRef = item.Attributes["id"].Name;
                        QuantityUnit ob = QuantityUnit();
                        IDManager.SetID(quantityUnitIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        quantityUnitIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        quantityUnit = new QuantityUnit(item);
                    }
                }
            }


            XmlNodeList quantityNodeList = xmlNode.SelectNodes("quantity");

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

            foreach (XmlNode item in quantityNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        quantityIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(quantityIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        quantityIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        quantity = new NonNegativeDecimal(item);
                    }
                }
            }
        }
        public CommoditySpread(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode spreadConversionFactorNode = xmlNode.SelectSingleNode("spreadConversionFactor");

            if (spreadConversionFactorNode != null)
            {
                if (spreadConversionFactorNode.Attributes["href"] != null || spreadConversionFactorNode.Attributes["id"] != null)
                {
                    if (spreadConversionFactorNode.Attributes["id"] != null)
                    {
                        spreadConversionFactorIDRef_ = spreadConversionFactorNode.Attributes["id"].Value;
                        XsdTypeDecimal ob = new XsdTypeDecimal(spreadConversionFactorNode);
                        IDManager.SetID(spreadConversionFactorIDRef_, ob);
                    }
                    else if (spreadConversionFactorNode.Attributes["href"] != null)
                    {
                        spreadConversionFactorIDRef_ = spreadConversionFactorNode.Attributes["href"].Value;
                    }
                    else
                    {
                        spreadConversionFactor_ = new XsdTypeDecimal(spreadConversionFactorNode);
                    }
                }
                else
                {
                    spreadConversionFactor_ = new XsdTypeDecimal(spreadConversionFactorNode);
                }
            }


            XmlNode spreadUnitNode = xmlNode.SelectSingleNode("spreadUnit");

            if (spreadUnitNode != null)
            {
                if (spreadUnitNode.Attributes["href"] != null || spreadUnitNode.Attributes["id"] != null)
                {
                    if (spreadUnitNode.Attributes["id"] != null)
                    {
                        spreadUnitIDRef_ = spreadUnitNode.Attributes["id"].Value;
                        QuantityUnit ob = new QuantityUnit(spreadUnitNode);
                        IDManager.SetID(spreadUnitIDRef_, ob);
                    }
                    else if (spreadUnitNode.Attributes["href"] != null)
                    {
                        spreadUnitIDRef_ = spreadUnitNode.Attributes["href"].Value;
                    }
                    else
                    {
                        spreadUnit_ = new QuantityUnit(spreadUnitNode);
                    }
                }
                else
                {
                    spreadUnit_ = new QuantityUnit(spreadUnitNode);
                }
            }
        }
        public UnitQuantity(XmlNode xmlNode)
        {
            XmlNode quantityUnitNode = xmlNode.SelectSingleNode("quantityUnit");

            if (quantityUnitNode != null)
            {
                if (quantityUnitNode.Attributes["href"] != null || quantityUnitNode.Attributes["id"] != null)
                {
                    if (quantityUnitNode.Attributes["id"] != null)
                    {
                        quantityUnitIDRef_ = quantityUnitNode.Attributes["id"].Value;
                        QuantityUnit ob = new QuantityUnit(quantityUnitNode);
                        IDManager.SetID(quantityUnitIDRef_, ob);
                    }
                    else if (quantityUnitNode.Attributes["href"] != null)
                    {
                        quantityUnitIDRef_ = quantityUnitNode.Attributes["href"].Value;
                    }
                    else
                    {
                        quantityUnit_ = new QuantityUnit(quantityUnitNode);
                    }
                }
                else
                {
                    quantityUnit_ = new QuantityUnit(quantityUnitNode);
                }
            }


            XmlNode quantityNode = xmlNode.SelectSingleNode("quantity");

            if (quantityNode != null)
            {
                if (quantityNode.Attributes["href"] != null || quantityNode.Attributes["id"] != null)
                {
                    if (quantityNode.Attributes["id"] != null)
                    {
                        quantityIDRef_ = quantityNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(quantityNode);
                        IDManager.SetID(quantityIDRef_, ob);
                    }
                    else if (quantityNode.Attributes["href"] != null)
                    {
                        quantityIDRef_ = quantityNode.Attributes["href"].Value;
                    }
                    else
                    {
                        quantity_ = new NonNegativeDecimal(quantityNode);
                    }
                }
                else
                {
                    quantity_ = new NonNegativeDecimal(quantityNode);
                }
            }
        }
        public WeatherIndex(XmlNode xmlNode)
        {
            XmlNode quantityNode = xmlNode.SelectSingleNode("quantity");

            if (quantityNode != null)
            {
                if (quantityNode.Attributes["href"] != null || quantityNode.Attributes["id"] != null)
                {
                    if (quantityNode.Attributes["id"] != null)
                    {
                        quantityIDRef_ = quantityNode.Attributes["id"].Value;
                        XsdTypeDecimal ob = new XsdTypeDecimal(quantityNode);
                        IDManager.SetID(quantityIDRef_, ob);
                    }
                    else if (quantityNode.Attributes["href"] != null)
                    {
                        quantityIDRef_ = quantityNode.Attributes["href"].Value;
                    }
                    else
                    {
                        quantity_ = new XsdTypeDecimal(quantityNode);
                    }
                }
                else
                {
                    quantity_ = new XsdTypeDecimal(quantityNode);
                }
            }


            XmlNode unitNode = xmlNode.SelectSingleNode("unit");

            if (unitNode != null)
            {
                if (unitNode.Attributes["href"] != null || unitNode.Attributes["id"] != null)
                {
                    if (unitNode.Attributes["id"] != null)
                    {
                        unitIDRef_ = unitNode.Attributes["id"].Value;
                        QuantityUnit ob = new QuantityUnit(unitNode);
                        IDManager.SetID(unitIDRef_, ob);
                    }
                    else if (unitNode.Attributes["href"] != null)
                    {
                        unitIDRef_ = unitNode.Attributes["href"].Value;
                    }
                    else
                    {
                        unit_ = new QuantityUnit(unitNode);
                    }
                }
                else
                {
                    unit_ = new QuantityUnit(unitNode);
                }
            }
        }
        public CommodityNotionalQuantity(XmlNode xmlNode)
        {
            XmlNode quantityUnitNode = xmlNode.SelectSingleNode("quantityUnit");

            if (quantityUnitNode != null)
            {
                if (quantityUnitNode.Attributes["href"] != null || quantityUnitNode.Attributes["id"] != null)
                {
                    if (quantityUnitNode.Attributes["id"] != null)
                    {
                        quantityUnitIDRef_ = quantityUnitNode.Attributes["id"].Value;
                        QuantityUnit ob = new QuantityUnit(quantityUnitNode);
                        IDManager.SetID(quantityUnitIDRef_, ob);
                    }
                    else if (quantityUnitNode.Attributes["href"] != null)
                    {
                        quantityUnitIDRef_ = quantityUnitNode.Attributes["href"].Value;
                    }
                    else
                    {
                        quantityUnit_ = new QuantityUnit(quantityUnitNode);
                    }
                }
                else
                {
                    quantityUnit_ = new QuantityUnit(quantityUnitNode);
                }
            }


            XmlNode quantityFrequencyNode = xmlNode.SelectSingleNode("quantityFrequency");

            if (quantityFrequencyNode != null)
            {
                if (quantityFrequencyNode.Attributes["href"] != null || quantityFrequencyNode.Attributes["id"] != null)
                {
                    if (quantityFrequencyNode.Attributes["id"] != null)
                    {
                        quantityFrequencyIDRef_ = quantityFrequencyNode.Attributes["id"].Value;
                        CommodityQuantityFrequency ob = new CommodityQuantityFrequency(quantityFrequencyNode);
                        IDManager.SetID(quantityFrequencyIDRef_, ob);
                    }
                    else if (quantityFrequencyNode.Attributes["href"] != null)
                    {
                        quantityFrequencyIDRef_ = quantityFrequencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        quantityFrequency_ = new CommodityQuantityFrequency(quantityFrequencyNode);
                    }
                }
                else
                {
                    quantityFrequency_ = new CommodityQuantityFrequency(quantityFrequencyNode);
                }
            }


            XmlNode quantityNode = xmlNode.SelectSingleNode("quantity");

            if (quantityNode != null)
            {
                if (quantityNode.Attributes["href"] != null || quantityNode.Attributes["id"] != null)
                {
                    if (quantityNode.Attributes["id"] != null)
                    {
                        quantityIDRef_ = quantityNode.Attributes["id"].Value;
                        XsdTypeDecimal ob = new XsdTypeDecimal(quantityNode);
                        IDManager.SetID(quantityIDRef_, ob);
                    }
                    else if (quantityNode.Attributes["href"] != null)
                    {
                        quantityIDRef_ = quantityNode.Attributes["href"].Value;
                    }
                    else
                    {
                        quantity_ = new XsdTypeDecimal(quantityNode);
                    }
                }
                else
                {
                    quantity_ = new XsdTypeDecimal(quantityNode);
                }
            }
        }
 public FixedPrice(XmlNode xmlNode)
 {
     XmlNode priceNode = xmlNode.SelectSingleNode("price");
     
     if (priceNode != null)
     {
         if (priceNode.Attributes["href"] != null || priceNode.Attributes["id"] != null) 
         {
             if (priceNode.Attributes["id"] != null) 
             {
                 priceIDRef_ = priceNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(priceNode);
                 IDManager.SetID(priceIDRef_, ob);
             }
             else if (priceNode.Attributes["href"] != null)
             {
                 priceIDRef_ = priceNode.Attributes["href"].Value;
             }
             else
             {
                 price_ = new XsdTypeDecimal(priceNode);
             }
         }
         else
         {
             price_ = new XsdTypeDecimal(priceNode);
         }
     }
     
 
     XmlNode priceCurrencyNode = xmlNode.SelectSingleNode("priceCurrency");
     
     if (priceCurrencyNode != null)
     {
         if (priceCurrencyNode.Attributes["href"] != null || priceCurrencyNode.Attributes["id"] != null) 
         {
             if (priceCurrencyNode.Attributes["id"] != null) 
             {
                 priceCurrencyIDRef_ = priceCurrencyNode.Attributes["id"].Value;
                 Currency ob = new Currency(priceCurrencyNode);
                 IDManager.SetID(priceCurrencyIDRef_, ob);
             }
             else if (priceCurrencyNode.Attributes["href"] != null)
             {
                 priceCurrencyIDRef_ = priceCurrencyNode.Attributes["href"].Value;
             }
             else
             {
                 priceCurrency_ = new Currency(priceCurrencyNode);
             }
         }
         else
         {
             priceCurrency_ = new Currency(priceCurrencyNode);
         }
     }
     
 
     XmlNode priceUnitNode = xmlNode.SelectSingleNode("priceUnit");
     
     if (priceUnitNode != null)
     {
         if (priceUnitNode.Attributes["href"] != null || priceUnitNode.Attributes["id"] != null) 
         {
             if (priceUnitNode.Attributes["id"] != null) 
             {
                 priceUnitIDRef_ = priceUnitNode.Attributes["id"].Value;
                 QuantityUnit ob = new QuantityUnit(priceUnitNode);
                 IDManager.SetID(priceUnitIDRef_, ob);
             }
             else if (priceUnitNode.Attributes["href"] != null)
             {
                 priceUnitIDRef_ = priceUnitNode.Attributes["href"].Value;
             }
             else
             {
                 priceUnit_ = new QuantityUnit(priceUnitNode);
             }
         }
         else
         {
             priceUnit_ = new QuantityUnit(priceUnitNode);
         }
     }
     
 
 }
 public AbsoluteTolerance(XmlNode xmlNode)
 {
     XmlNodeList positiveNodeList = xmlNode.SelectNodes("positive");
     if (positiveNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in positiveNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 positiveIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(positiveIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 positiveIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 positive = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList negativeNodeList = xmlNode.SelectNodes("negative");
     if (negativeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in negativeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 negativeIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(negativeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 negativeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 negative = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList unitNodeList = xmlNode.SelectNodes("unit");
     if (unitNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in unitNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 unitIDRef = item.Attributes["id"].Name;
                 QuantityUnit ob = QuantityUnit();
                 IDManager.SetID(unitIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 unitIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 unit = new QuantityUnit(item);
             }
         }
     }
     
 
     XmlNodeList optionOwnerPartyReferenceNodeList = xmlNode.SelectNodes("optionOwnerPartyReference");
     if (optionOwnerPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in optionOwnerPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 optionOwnerPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(optionOwnerPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 optionOwnerPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 optionOwnerPartyReference = new PartyReference(item);
             }
         }
     }
     
 
 }
Exemplo n.º 13
0
        public AbsoluteTolerance(XmlNode xmlNode)
        {
            XmlNode positiveNode = xmlNode.SelectSingleNode("positive");

            if (positiveNode != null)
            {
                if (positiveNode.Attributes["href"] != null || positiveNode.Attributes["id"] != null)
                {
                    if (positiveNode.Attributes["id"] != null)
                    {
                        positiveIDRef_ = positiveNode.Attributes["id"].Value;
                        XsdTypeDecimal ob = new XsdTypeDecimal(positiveNode);
                        IDManager.SetID(positiveIDRef_, ob);
                    }
                    else if (positiveNode.Attributes["href"] != null)
                    {
                        positiveIDRef_ = positiveNode.Attributes["href"].Value;
                    }
                    else
                    {
                        positive_ = new XsdTypeDecimal(positiveNode);
                    }
                }
                else
                {
                    positive_ = new XsdTypeDecimal(positiveNode);
                }
            }


            XmlNode negativeNode = xmlNode.SelectSingleNode("negative");

            if (negativeNode != null)
            {
                if (negativeNode.Attributes["href"] != null || negativeNode.Attributes["id"] != null)
                {
                    if (negativeNode.Attributes["id"] != null)
                    {
                        negativeIDRef_ = negativeNode.Attributes["id"].Value;
                        XsdTypeDecimal ob = new XsdTypeDecimal(negativeNode);
                        IDManager.SetID(negativeIDRef_, ob);
                    }
                    else if (negativeNode.Attributes["href"] != null)
                    {
                        negativeIDRef_ = negativeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        negative_ = new XsdTypeDecimal(negativeNode);
                    }
                }
                else
                {
                    negative_ = new XsdTypeDecimal(negativeNode);
                }
            }


            XmlNode unitNode = xmlNode.SelectSingleNode("unit");

            if (unitNode != null)
            {
                if (unitNode.Attributes["href"] != null || unitNode.Attributes["id"] != null)
                {
                    if (unitNode.Attributes["id"] != null)
                    {
                        unitIDRef_ = unitNode.Attributes["id"].Value;
                        QuantityUnit ob = new QuantityUnit(unitNode);
                        IDManager.SetID(unitIDRef_, ob);
                    }
                    else if (unitNode.Attributes["href"] != null)
                    {
                        unitIDRef_ = unitNode.Attributes["href"].Value;
                    }
                    else
                    {
                        unit_ = new QuantityUnit(unitNode);
                    }
                }
                else
                {
                    unit_ = new QuantityUnit(unitNode);
                }
            }


            XmlNode optionOwnerPartyReferenceNode = xmlNode.SelectSingleNode("optionOwnerPartyReference");

            if (optionOwnerPartyReferenceNode != null)
            {
                if (optionOwnerPartyReferenceNode.Attributes["href"] != null || optionOwnerPartyReferenceNode.Attributes["id"] != null)
                {
                    if (optionOwnerPartyReferenceNode.Attributes["id"] != null)
                    {
                        optionOwnerPartyReferenceIDRef_ = optionOwnerPartyReferenceNode.Attributes["id"].Value;
                        PartyReference ob = new PartyReference(optionOwnerPartyReferenceNode);
                        IDManager.SetID(optionOwnerPartyReferenceIDRef_, ob);
                    }
                    else if (optionOwnerPartyReferenceNode.Attributes["href"] != null)
                    {
                        optionOwnerPartyReferenceIDRef_ = optionOwnerPartyReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        optionOwnerPartyReference_ = new PartyReference(optionOwnerPartyReferenceNode);
                    }
                }
                else
                {
                    optionOwnerPartyReference_ = new PartyReference(optionOwnerPartyReferenceNode);
                }
            }
        }
        public FixedPrice(XmlNode xmlNode)
        {
            XmlNodeList priceNodeList = xmlNode.SelectNodes("price");

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

            foreach (XmlNode item in priceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        priceIDRef = item.Attributes["id"].Name;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(priceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        priceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        price = new XsdTypeDecimal(item);
                    }
                }
            }


            XmlNodeList priceCurrencyNodeList = xmlNode.SelectNodes("priceCurrency");

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

            foreach (XmlNode item in priceCurrencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        priceCurrencyIDRef = item.Attributes["id"].Name;
                        Currency ob = Currency();
                        IDManager.SetID(priceCurrencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        priceCurrencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        priceCurrency = new Currency(item);
                    }
                }
            }


            XmlNodeList priceUnitNodeList = xmlNode.SelectNodes("priceUnit");

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

            foreach (XmlNode item in priceUnitNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        priceUnitIDRef = item.Attributes["id"].Name;
                        QuantityUnit ob = QuantityUnit();
                        IDManager.SetID(priceUnitIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        priceUnitIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        priceUnit = new QuantityUnit(item);
                    }
                }
            }
        }
Exemplo n.º 15
0
        public Commodity(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList commodityBaseNodeList = xmlNode.SelectNodes("commodityBase");

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

            foreach (XmlNode item in commodityBaseNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        commodityBaseIDRef = item.Attributes["id"].Name;
                        CommodityBase ob = CommodityBase();
                        IDManager.SetID(commodityBaseIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        commodityBaseIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        commodityBase = new CommodityBase(item);
                    }
                }
            }


            XmlNodeList commodityDetailsNodeList = xmlNode.SelectNodes("commodityDetails");

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

            foreach (XmlNode item in commodityDetailsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        commodityDetailsIDRef = item.Attributes["id"].Name;
                        CommodityDetails ob = CommodityDetails();
                        IDManager.SetID(commodityDetailsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        commodityDetailsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        commodityDetails = new CommodityDetails(item);
                    }
                }
            }


            XmlNodeList unitNodeList = xmlNode.SelectNodes("unit");

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

            foreach (XmlNode item in unitNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        unitIDRef = item.Attributes["id"].Name;
                        QuantityUnit ob = QuantityUnit();
                        IDManager.SetID(unitIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        unitIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        unit = new QuantityUnit(item);
                    }
                }
            }


            XmlNodeList currencyNodeList = xmlNode.SelectNodes("currency");

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

            foreach (XmlNode item in currencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        currencyIDRef = item.Attributes["id"].Name;
                        Currency ob = Currency();
                        IDManager.SetID(currencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        currencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        currency = new Currency(item);
                    }
                }
            }


            XmlNodeList exchangeIdNodeList = xmlNode.SelectNodes("exchangeId");

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

            foreach (XmlNode item in exchangeIdNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        exchangeIdIDRef = item.Attributes["id"].Name;
                        ExchangeId ob = ExchangeId();
                        IDManager.SetID(exchangeIdIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        exchangeIdIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        exchangeId = new ExchangeId(item);
                    }
                }
            }


            XmlNodeList publicationNodeList = xmlNode.SelectNodes("publication");

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

            foreach (XmlNode item in publicationNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        publicationIDRef = item.Attributes["id"].Name;
                        CommodityInformationSource ob = CommodityInformationSource();
                        IDManager.SetID(publicationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        publicationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        publication = new CommodityInformationSource(item);
                    }
                }
            }


            XmlNodeList specifiedPriceNodeList = xmlNode.SelectNodes("specifiedPrice");

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

            foreach (XmlNode item in specifiedPriceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        specifiedPriceIDRef = item.Attributes["id"].Name;
                        SpecifiedPriceEnum ob = SpecifiedPriceEnum();
                        IDManager.SetID(specifiedPriceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        specifiedPriceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        specifiedPrice = new SpecifiedPriceEnum(item);
                    }
                }
            }


            XmlNodeList deliveryDatesNodeList = xmlNode.SelectNodes("deliveryDates");

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

            foreach (XmlNode item in deliveryDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        deliveryDatesIDRef = item.Attributes["id"].Name;
                        DeliveryDatesEnum ob = DeliveryDatesEnum();
                        IDManager.SetID(deliveryDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        deliveryDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        deliveryDates = new DeliveryDatesEnum(item);
                    }
                }
            }


            XmlNodeList deliveryDateNodeList = xmlNode.SelectNodes("deliveryDate");

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

            foreach (XmlNode item in deliveryDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        deliveryDateIDRef = item.Attributes["id"].Name;
                        AdjustableDate ob = AdjustableDate();
                        IDManager.SetID(deliveryDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        deliveryDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        deliveryDate = new AdjustableDate(item);
                    }
                }
            }


            XmlNodeList deliveryDateYearMonthNodeList = xmlNode.SelectNodes("deliveryDateYearMonth");

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

            foreach (XmlNode item in deliveryDateYearMonthNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        deliveryDateYearMonthIDRef = item.Attributes["id"].Name;
                        XsdTypeGYearMonth ob = XsdTypeGYearMonth();
                        IDManager.SetID(deliveryDateYearMonthIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        deliveryDateYearMonthIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        deliveryDateYearMonth = new XsdTypeGYearMonth(item);
                    }
                }
            }


            XmlNodeList deliveryDateRollConventionNodeList = xmlNode.SelectNodes("deliveryDateRollConvention");

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

            foreach (XmlNode item in deliveryDateRollConventionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        deliveryDateRollConventionIDRef = item.Attributes["id"].Name;
                        Offset ob = Offset();
                        IDManager.SetID(deliveryDateRollConventionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        deliveryDateRollConventionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        deliveryDateRollConvention = new Offset(item);
                    }
                }
            }


            XmlNodeList multiplierNodeList = xmlNode.SelectNodes("multiplier");

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

            foreach (XmlNode item in multiplierNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        multiplierIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(multiplierIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        multiplierIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        multiplier = new PositiveDecimal(item);
                    }
                }
            }
        }
Exemplo n.º 16
0
        public FixedPrice(XmlNode xmlNode)
        {
            XmlNode priceNode = xmlNode.SelectSingleNode("price");

            if (priceNode != null)
            {
                if (priceNode.Attributes["href"] != null || priceNode.Attributes["id"] != null)
                {
                    if (priceNode.Attributes["id"] != null)
                    {
                        priceIDRef_ = priceNode.Attributes["id"].Value;
                        XsdTypeDecimal ob = new XsdTypeDecimal(priceNode);
                        IDManager.SetID(priceIDRef_, ob);
                    }
                    else if (priceNode.Attributes["href"] != null)
                    {
                        priceIDRef_ = priceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        price_ = new XsdTypeDecimal(priceNode);
                    }
                }
                else
                {
                    price_ = new XsdTypeDecimal(priceNode);
                }
            }


            XmlNode priceCurrencyNode = xmlNode.SelectSingleNode("priceCurrency");

            if (priceCurrencyNode != null)
            {
                if (priceCurrencyNode.Attributes["href"] != null || priceCurrencyNode.Attributes["id"] != null)
                {
                    if (priceCurrencyNode.Attributes["id"] != null)
                    {
                        priceCurrencyIDRef_ = priceCurrencyNode.Attributes["id"].Value;
                        Currency ob = new Currency(priceCurrencyNode);
                        IDManager.SetID(priceCurrencyIDRef_, ob);
                    }
                    else if (priceCurrencyNode.Attributes["href"] != null)
                    {
                        priceCurrencyIDRef_ = priceCurrencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        priceCurrency_ = new Currency(priceCurrencyNode);
                    }
                }
                else
                {
                    priceCurrency_ = new Currency(priceCurrencyNode);
                }
            }


            XmlNode priceUnitNode = xmlNode.SelectSingleNode("priceUnit");

            if (priceUnitNode != null)
            {
                if (priceUnitNode.Attributes["href"] != null || priceUnitNode.Attributes["id"] != null)
                {
                    if (priceUnitNode.Attributes["id"] != null)
                    {
                        priceUnitIDRef_ = priceUnitNode.Attributes["id"].Value;
                        QuantityUnit ob = new QuantityUnit(priceUnitNode);
                        IDManager.SetID(priceUnitIDRef_, ob);
                    }
                    else if (priceUnitNode.Attributes["href"] != null)
                    {
                        priceUnitIDRef_ = priceUnitNode.Attributes["href"].Value;
                    }
                    else
                    {
                        priceUnit_ = new QuantityUnit(priceUnitNode);
                    }
                }
                else
                {
                    priceUnit_ = new QuantityUnit(priceUnitNode);
                }
            }
        }
 public CommodityNotionalQuantity(XmlNode xmlNode)
 {
     XmlNodeList quantityUnitNodeList = xmlNode.SelectNodes("quantityUnit");
     if (quantityUnitNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in quantityUnitNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 quantityUnitIDRef = item.Attributes["id"].Name;
                 QuantityUnit ob = QuantityUnit();
                 IDManager.SetID(quantityUnitIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 quantityUnitIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 quantityUnit = new QuantityUnit(item);
             }
         }
     }
     
 
     XmlNodeList quantityFrequencyNodeList = xmlNode.SelectNodes("quantityFrequency");
     if (quantityFrequencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in quantityFrequencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 quantityFrequencyIDRef = item.Attributes["id"].Name;
                 CommodityQuantityFrequency ob = CommodityQuantityFrequency();
                 IDManager.SetID(quantityFrequencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 quantityFrequencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 quantityFrequency = new CommodityQuantityFrequency(item);
             }
         }
     }
     
 
     XmlNodeList quantityNodeList = xmlNode.SelectNodes("quantity");
     if (quantityNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in quantityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 quantityIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(quantityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 quantityIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 quantity = new XsdTypeDecimal(item);
             }
         }
     }
     
 
 }
 public Commodity(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode commodityBaseNode = xmlNode.SelectSingleNode("commodityBase");
     
     if (commodityBaseNode != null)
     {
         if (commodityBaseNode.Attributes["href"] != null || commodityBaseNode.Attributes["id"] != null) 
         {
             if (commodityBaseNode.Attributes["id"] != null) 
             {
                 commodityBaseIDRef_ = commodityBaseNode.Attributes["id"].Value;
                 CommodityBase ob = new CommodityBase(commodityBaseNode);
                 IDManager.SetID(commodityBaseIDRef_, ob);
             }
             else if (commodityBaseNode.Attributes["href"] != null)
             {
                 commodityBaseIDRef_ = commodityBaseNode.Attributes["href"].Value;
             }
             else
             {
                 commodityBase_ = new CommodityBase(commodityBaseNode);
             }
         }
         else
         {
             commodityBase_ = new CommodityBase(commodityBaseNode);
         }
     }
     
 
     XmlNode commodityDetailsNode = xmlNode.SelectSingleNode("commodityDetails");
     
     if (commodityDetailsNode != null)
     {
         if (commodityDetailsNode.Attributes["href"] != null || commodityDetailsNode.Attributes["id"] != null) 
         {
             if (commodityDetailsNode.Attributes["id"] != null) 
             {
                 commodityDetailsIDRef_ = commodityDetailsNode.Attributes["id"].Value;
                 CommodityDetails ob = new CommodityDetails(commodityDetailsNode);
                 IDManager.SetID(commodityDetailsIDRef_, ob);
             }
             else if (commodityDetailsNode.Attributes["href"] != null)
             {
                 commodityDetailsIDRef_ = commodityDetailsNode.Attributes["href"].Value;
             }
             else
             {
                 commodityDetails_ = new CommodityDetails(commodityDetailsNode);
             }
         }
         else
         {
             commodityDetails_ = new CommodityDetails(commodityDetailsNode);
         }
     }
     
 
     XmlNode unitNode = xmlNode.SelectSingleNode("unit");
     
     if (unitNode != null)
     {
         if (unitNode.Attributes["href"] != null || unitNode.Attributes["id"] != null) 
         {
             if (unitNode.Attributes["id"] != null) 
             {
                 unitIDRef_ = unitNode.Attributes["id"].Value;
                 QuantityUnit ob = new QuantityUnit(unitNode);
                 IDManager.SetID(unitIDRef_, ob);
             }
             else if (unitNode.Attributes["href"] != null)
             {
                 unitIDRef_ = unitNode.Attributes["href"].Value;
             }
             else
             {
                 unit_ = new QuantityUnit(unitNode);
             }
         }
         else
         {
             unit_ = new QuantityUnit(unitNode);
         }
     }
     
 
     XmlNode currencyNode = xmlNode.SelectSingleNode("currency");
     
     if (currencyNode != null)
     {
         if (currencyNode.Attributes["href"] != null || currencyNode.Attributes["id"] != null) 
         {
             if (currencyNode.Attributes["id"] != null) 
             {
                 currencyIDRef_ = currencyNode.Attributes["id"].Value;
                 Currency ob = new Currency(currencyNode);
                 IDManager.SetID(currencyIDRef_, ob);
             }
             else if (currencyNode.Attributes["href"] != null)
             {
                 currencyIDRef_ = currencyNode.Attributes["href"].Value;
             }
             else
             {
                 currency_ = new Currency(currencyNode);
             }
         }
         else
         {
             currency_ = new Currency(currencyNode);
         }
     }
     
 
     XmlNode exchangeIdNode = xmlNode.SelectSingleNode("exchangeId");
     
     if (exchangeIdNode != null)
     {
         if (exchangeIdNode.Attributes["href"] != null || exchangeIdNode.Attributes["id"] != null) 
         {
             if (exchangeIdNode.Attributes["id"] != null) 
             {
                 exchangeIdIDRef_ = exchangeIdNode.Attributes["id"].Value;
                 ExchangeId ob = new ExchangeId(exchangeIdNode);
                 IDManager.SetID(exchangeIdIDRef_, ob);
             }
             else if (exchangeIdNode.Attributes["href"] != null)
             {
                 exchangeIdIDRef_ = exchangeIdNode.Attributes["href"].Value;
             }
             else
             {
                 exchangeId_ = new ExchangeId(exchangeIdNode);
             }
         }
         else
         {
             exchangeId_ = new ExchangeId(exchangeIdNode);
         }
     }
     
 
     XmlNode publicationNode = xmlNode.SelectSingleNode("publication");
     
     if (publicationNode != null)
     {
         if (publicationNode.Attributes["href"] != null || publicationNode.Attributes["id"] != null) 
         {
             if (publicationNode.Attributes["id"] != null) 
             {
                 publicationIDRef_ = publicationNode.Attributes["id"].Value;
                 CommodityInformationSource ob = new CommodityInformationSource(publicationNode);
                 IDManager.SetID(publicationIDRef_, ob);
             }
             else if (publicationNode.Attributes["href"] != null)
             {
                 publicationIDRef_ = publicationNode.Attributes["href"].Value;
             }
             else
             {
                 publication_ = new CommodityInformationSource(publicationNode);
             }
         }
         else
         {
             publication_ = new CommodityInformationSource(publicationNode);
         }
     }
     
 
     XmlNode specifiedPriceNode = xmlNode.SelectSingleNode("specifiedPrice");
     
     if (specifiedPriceNode != null)
     {
         if (specifiedPriceNode.Attributes["href"] != null || specifiedPriceNode.Attributes["id"] != null) 
         {
             if (specifiedPriceNode.Attributes["id"] != null) 
             {
                 specifiedPriceIDRef_ = specifiedPriceNode.Attributes["id"].Value;
                 SpecifiedPriceEnum ob = new SpecifiedPriceEnum(specifiedPriceNode);
                 IDManager.SetID(specifiedPriceIDRef_, ob);
             }
             else if (specifiedPriceNode.Attributes["href"] != null)
             {
                 specifiedPriceIDRef_ = specifiedPriceNode.Attributes["href"].Value;
             }
             else
             {
                 specifiedPrice_ = new SpecifiedPriceEnum(specifiedPriceNode);
             }
         }
         else
         {
             specifiedPrice_ = new SpecifiedPriceEnum(specifiedPriceNode);
         }
     }
     
 
     XmlNode deliveryDatesNode = xmlNode.SelectSingleNode("deliveryDates");
     
     if (deliveryDatesNode != null)
     {
         if (deliveryDatesNode.Attributes["href"] != null || deliveryDatesNode.Attributes["id"] != null) 
         {
             if (deliveryDatesNode.Attributes["id"] != null) 
             {
                 deliveryDatesIDRef_ = deliveryDatesNode.Attributes["id"].Value;
                 DeliveryDatesEnum ob = new DeliveryDatesEnum(deliveryDatesNode);
                 IDManager.SetID(deliveryDatesIDRef_, ob);
             }
             else if (deliveryDatesNode.Attributes["href"] != null)
             {
                 deliveryDatesIDRef_ = deliveryDatesNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryDates_ = new DeliveryDatesEnum(deliveryDatesNode);
             }
         }
         else
         {
             deliveryDates_ = new DeliveryDatesEnum(deliveryDatesNode);
         }
     }
     
 
     XmlNode deliveryDateNode = xmlNode.SelectSingleNode("deliveryDate");
     
     if (deliveryDateNode != null)
     {
         if (deliveryDateNode.Attributes["href"] != null || deliveryDateNode.Attributes["id"] != null) 
         {
             if (deliveryDateNode.Attributes["id"] != null) 
             {
                 deliveryDateIDRef_ = deliveryDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(deliveryDateNode);
                 IDManager.SetID(deliveryDateIDRef_, ob);
             }
             else if (deliveryDateNode.Attributes["href"] != null)
             {
                 deliveryDateIDRef_ = deliveryDateNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryDate_ = new AdjustableDate(deliveryDateNode);
             }
         }
         else
         {
             deliveryDate_ = new AdjustableDate(deliveryDateNode);
         }
     }
     
 
     XmlNode deliveryDateYearMonthNode = xmlNode.SelectSingleNode("deliveryDateYearMonth");
     
     if (deliveryDateYearMonthNode != null)
     {
         if (deliveryDateYearMonthNode.Attributes["href"] != null || deliveryDateYearMonthNode.Attributes["id"] != null) 
         {
             if (deliveryDateYearMonthNode.Attributes["id"] != null) 
             {
                 deliveryDateYearMonthIDRef_ = deliveryDateYearMonthNode.Attributes["id"].Value;
                 XsdTypeGYearMonth ob = new XsdTypeGYearMonth(deliveryDateYearMonthNode);
                 IDManager.SetID(deliveryDateYearMonthIDRef_, ob);
             }
             else if (deliveryDateYearMonthNode.Attributes["href"] != null)
             {
                 deliveryDateYearMonthIDRef_ = deliveryDateYearMonthNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryDateYearMonth_ = new XsdTypeGYearMonth(deliveryDateYearMonthNode);
             }
         }
         else
         {
             deliveryDateYearMonth_ = new XsdTypeGYearMonth(deliveryDateYearMonthNode);
         }
     }
     
 
     XmlNode deliveryDateRollConventionNode = xmlNode.SelectSingleNode("deliveryDateRollConvention");
     
     if (deliveryDateRollConventionNode != null)
     {
         if (deliveryDateRollConventionNode.Attributes["href"] != null || deliveryDateRollConventionNode.Attributes["id"] != null) 
         {
             if (deliveryDateRollConventionNode.Attributes["id"] != null) 
             {
                 deliveryDateRollConventionIDRef_ = deliveryDateRollConventionNode.Attributes["id"].Value;
                 Offset ob = new Offset(deliveryDateRollConventionNode);
                 IDManager.SetID(deliveryDateRollConventionIDRef_, ob);
             }
             else if (deliveryDateRollConventionNode.Attributes["href"] != null)
             {
                 deliveryDateRollConventionIDRef_ = deliveryDateRollConventionNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryDateRollConvention_ = new Offset(deliveryDateRollConventionNode);
             }
         }
         else
         {
             deliveryDateRollConvention_ = new Offset(deliveryDateRollConventionNode);
         }
     }
     
 
     XmlNode multiplierNode = xmlNode.SelectSingleNode("multiplier");
     
     if (multiplierNode != null)
     {
         if (multiplierNode.Attributes["href"] != null || multiplierNode.Attributes["id"] != null) 
         {
             if (multiplierNode.Attributes["id"] != null) 
             {
                 multiplierIDRef_ = multiplierNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(multiplierNode);
                 IDManager.SetID(multiplierIDRef_, ob);
             }
             else if (multiplierNode.Attributes["href"] != null)
             {
                 multiplierIDRef_ = multiplierNode.Attributes["href"].Value;
             }
             else
             {
                 multiplier_ = new PositiveDecimal(multiplierNode);
             }
         }
         else
         {
             multiplier_ = new PositiveDecimal(multiplierNode);
         }
     }
     
 
 }
        public CommodityNotionalQuantity(XmlNode xmlNode)
        {
            XmlNodeList quantityUnitNodeList = xmlNode.SelectNodes("quantityUnit");

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

            foreach (XmlNode item in quantityUnitNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        quantityUnitIDRef = item.Attributes["id"].Name;
                        QuantityUnit ob = QuantityUnit();
                        IDManager.SetID(quantityUnitIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        quantityUnitIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        quantityUnit = new QuantityUnit(item);
                    }
                }
            }


            XmlNodeList quantityFrequencyNodeList = xmlNode.SelectNodes("quantityFrequency");

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

            foreach (XmlNode item in quantityFrequencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        quantityFrequencyIDRef = item.Attributes["id"].Name;
                        CommodityQuantityFrequency ob = CommodityQuantityFrequency();
                        IDManager.SetID(quantityFrequencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        quantityFrequencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        quantityFrequency = new CommodityQuantityFrequency(item);
                    }
                }
            }


            XmlNodeList quantityNodeList = xmlNode.SelectNodes("quantity");

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

            foreach (XmlNode item in quantityNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        quantityIDRef = item.Attributes["id"].Name;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(quantityIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        quantityIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        quantity = new XsdTypeDecimal(item);
                    }
                }
            }
        }
        public Commodity(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode commodityBaseNode = xmlNode.SelectSingleNode("commodityBase");

            if (commodityBaseNode != null)
            {
                if (commodityBaseNode.Attributes["href"] != null || commodityBaseNode.Attributes["id"] != null)
                {
                    if (commodityBaseNode.Attributes["id"] != null)
                    {
                        commodityBaseIDRef_ = commodityBaseNode.Attributes["id"].Value;
                        CommodityBase ob = new CommodityBase(commodityBaseNode);
                        IDManager.SetID(commodityBaseIDRef_, ob);
                    }
                    else if (commodityBaseNode.Attributes["href"] != null)
                    {
                        commodityBaseIDRef_ = commodityBaseNode.Attributes["href"].Value;
                    }
                    else
                    {
                        commodityBase_ = new CommodityBase(commodityBaseNode);
                    }
                }
                else
                {
                    commodityBase_ = new CommodityBase(commodityBaseNode);
                }
            }


            XmlNode commodityDetailsNode = xmlNode.SelectSingleNode("commodityDetails");

            if (commodityDetailsNode != null)
            {
                if (commodityDetailsNode.Attributes["href"] != null || commodityDetailsNode.Attributes["id"] != null)
                {
                    if (commodityDetailsNode.Attributes["id"] != null)
                    {
                        commodityDetailsIDRef_ = commodityDetailsNode.Attributes["id"].Value;
                        CommodityDetails ob = new CommodityDetails(commodityDetailsNode);
                        IDManager.SetID(commodityDetailsIDRef_, ob);
                    }
                    else if (commodityDetailsNode.Attributes["href"] != null)
                    {
                        commodityDetailsIDRef_ = commodityDetailsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        commodityDetails_ = new CommodityDetails(commodityDetailsNode);
                    }
                }
                else
                {
                    commodityDetails_ = new CommodityDetails(commodityDetailsNode);
                }
            }


            XmlNode unitNode = xmlNode.SelectSingleNode("unit");

            if (unitNode != null)
            {
                if (unitNode.Attributes["href"] != null || unitNode.Attributes["id"] != null)
                {
                    if (unitNode.Attributes["id"] != null)
                    {
                        unitIDRef_ = unitNode.Attributes["id"].Value;
                        QuantityUnit ob = new QuantityUnit(unitNode);
                        IDManager.SetID(unitIDRef_, ob);
                    }
                    else if (unitNode.Attributes["href"] != null)
                    {
                        unitIDRef_ = unitNode.Attributes["href"].Value;
                    }
                    else
                    {
                        unit_ = new QuantityUnit(unitNode);
                    }
                }
                else
                {
                    unit_ = new QuantityUnit(unitNode);
                }
            }


            XmlNode currencyNode = xmlNode.SelectSingleNode("currency");

            if (currencyNode != null)
            {
                if (currencyNode.Attributes["href"] != null || currencyNode.Attributes["id"] != null)
                {
                    if (currencyNode.Attributes["id"] != null)
                    {
                        currencyIDRef_ = currencyNode.Attributes["id"].Value;
                        Currency ob = new Currency(currencyNode);
                        IDManager.SetID(currencyIDRef_, ob);
                    }
                    else if (currencyNode.Attributes["href"] != null)
                    {
                        currencyIDRef_ = currencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        currency_ = new Currency(currencyNode);
                    }
                }
                else
                {
                    currency_ = new Currency(currencyNode);
                }
            }


            XmlNode exchangeIdNode = xmlNode.SelectSingleNode("exchangeId");

            if (exchangeIdNode != null)
            {
                if (exchangeIdNode.Attributes["href"] != null || exchangeIdNode.Attributes["id"] != null)
                {
                    if (exchangeIdNode.Attributes["id"] != null)
                    {
                        exchangeIdIDRef_ = exchangeIdNode.Attributes["id"].Value;
                        ExchangeId ob = new ExchangeId(exchangeIdNode);
                        IDManager.SetID(exchangeIdIDRef_, ob);
                    }
                    else if (exchangeIdNode.Attributes["href"] != null)
                    {
                        exchangeIdIDRef_ = exchangeIdNode.Attributes["href"].Value;
                    }
                    else
                    {
                        exchangeId_ = new ExchangeId(exchangeIdNode);
                    }
                }
                else
                {
                    exchangeId_ = new ExchangeId(exchangeIdNode);
                }
            }


            XmlNode publicationNode = xmlNode.SelectSingleNode("publication");

            if (publicationNode != null)
            {
                if (publicationNode.Attributes["href"] != null || publicationNode.Attributes["id"] != null)
                {
                    if (publicationNode.Attributes["id"] != null)
                    {
                        publicationIDRef_ = publicationNode.Attributes["id"].Value;
                        CommodityInformationSource ob = new CommodityInformationSource(publicationNode);
                        IDManager.SetID(publicationIDRef_, ob);
                    }
                    else if (publicationNode.Attributes["href"] != null)
                    {
                        publicationIDRef_ = publicationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        publication_ = new CommodityInformationSource(publicationNode);
                    }
                }
                else
                {
                    publication_ = new CommodityInformationSource(publicationNode);
                }
            }


            XmlNode specifiedPriceNode = xmlNode.SelectSingleNode("specifiedPrice");

            if (specifiedPriceNode != null)
            {
                if (specifiedPriceNode.Attributes["href"] != null || specifiedPriceNode.Attributes["id"] != null)
                {
                    if (specifiedPriceNode.Attributes["id"] != null)
                    {
                        specifiedPriceIDRef_ = specifiedPriceNode.Attributes["id"].Value;
                        SpecifiedPriceEnum ob = new SpecifiedPriceEnum(specifiedPriceNode);
                        IDManager.SetID(specifiedPriceIDRef_, ob);
                    }
                    else if (specifiedPriceNode.Attributes["href"] != null)
                    {
                        specifiedPriceIDRef_ = specifiedPriceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        specifiedPrice_ = new SpecifiedPriceEnum(specifiedPriceNode);
                    }
                }
                else
                {
                    specifiedPrice_ = new SpecifiedPriceEnum(specifiedPriceNode);
                }
            }


            XmlNode deliveryDatesNode = xmlNode.SelectSingleNode("deliveryDates");

            if (deliveryDatesNode != null)
            {
                if (deliveryDatesNode.Attributes["href"] != null || deliveryDatesNode.Attributes["id"] != null)
                {
                    if (deliveryDatesNode.Attributes["id"] != null)
                    {
                        deliveryDatesIDRef_ = deliveryDatesNode.Attributes["id"].Value;
                        DeliveryDatesEnum ob = new DeliveryDatesEnum(deliveryDatesNode);
                        IDManager.SetID(deliveryDatesIDRef_, ob);
                    }
                    else if (deliveryDatesNode.Attributes["href"] != null)
                    {
                        deliveryDatesIDRef_ = deliveryDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliveryDates_ = new DeliveryDatesEnum(deliveryDatesNode);
                    }
                }
                else
                {
                    deliveryDates_ = new DeliveryDatesEnum(deliveryDatesNode);
                }
            }


            XmlNode deliveryDateNode = xmlNode.SelectSingleNode("deliveryDate");

            if (deliveryDateNode != null)
            {
                if (deliveryDateNode.Attributes["href"] != null || deliveryDateNode.Attributes["id"] != null)
                {
                    if (deliveryDateNode.Attributes["id"] != null)
                    {
                        deliveryDateIDRef_ = deliveryDateNode.Attributes["id"].Value;
                        AdjustableDate ob = new AdjustableDate(deliveryDateNode);
                        IDManager.SetID(deliveryDateIDRef_, ob);
                    }
                    else if (deliveryDateNode.Attributes["href"] != null)
                    {
                        deliveryDateIDRef_ = deliveryDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliveryDate_ = new AdjustableDate(deliveryDateNode);
                    }
                }
                else
                {
                    deliveryDate_ = new AdjustableDate(deliveryDateNode);
                }
            }


            XmlNode deliveryDateYearMonthNode = xmlNode.SelectSingleNode("deliveryDateYearMonth");

            if (deliveryDateYearMonthNode != null)
            {
                if (deliveryDateYearMonthNode.Attributes["href"] != null || deliveryDateYearMonthNode.Attributes["id"] != null)
                {
                    if (deliveryDateYearMonthNode.Attributes["id"] != null)
                    {
                        deliveryDateYearMonthIDRef_ = deliveryDateYearMonthNode.Attributes["id"].Value;
                        XsdTypeGYearMonth ob = new XsdTypeGYearMonth(deliveryDateYearMonthNode);
                        IDManager.SetID(deliveryDateYearMonthIDRef_, ob);
                    }
                    else if (deliveryDateYearMonthNode.Attributes["href"] != null)
                    {
                        deliveryDateYearMonthIDRef_ = deliveryDateYearMonthNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliveryDateYearMonth_ = new XsdTypeGYearMonth(deliveryDateYearMonthNode);
                    }
                }
                else
                {
                    deliveryDateYearMonth_ = new XsdTypeGYearMonth(deliveryDateYearMonthNode);
                }
            }


            XmlNode deliveryDateRollConventionNode = xmlNode.SelectSingleNode("deliveryDateRollConvention");

            if (deliveryDateRollConventionNode != null)
            {
                if (deliveryDateRollConventionNode.Attributes["href"] != null || deliveryDateRollConventionNode.Attributes["id"] != null)
                {
                    if (deliveryDateRollConventionNode.Attributes["id"] != null)
                    {
                        deliveryDateRollConventionIDRef_ = deliveryDateRollConventionNode.Attributes["id"].Value;
                        Offset ob = new Offset(deliveryDateRollConventionNode);
                        IDManager.SetID(deliveryDateRollConventionIDRef_, ob);
                    }
                    else if (deliveryDateRollConventionNode.Attributes["href"] != null)
                    {
                        deliveryDateRollConventionIDRef_ = deliveryDateRollConventionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliveryDateRollConvention_ = new Offset(deliveryDateRollConventionNode);
                    }
                }
                else
                {
                    deliveryDateRollConvention_ = new Offset(deliveryDateRollConventionNode);
                }
            }


            XmlNode multiplierNode = xmlNode.SelectSingleNode("multiplier");

            if (multiplierNode != null)
            {
                if (multiplierNode.Attributes["href"] != null || multiplierNode.Attributes["id"] != null)
                {
                    if (multiplierNode.Attributes["id"] != null)
                    {
                        multiplierIDRef_ = multiplierNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(multiplierNode);
                        IDManager.SetID(multiplierIDRef_, ob);
                    }
                    else if (multiplierNode.Attributes["href"] != null)
                    {
                        multiplierIDRef_ = multiplierNode.Attributes["href"].Value;
                    }
                    else
                    {
                        multiplier_ = new PositiveDecimal(multiplierNode);
                    }
                }
                else
                {
                    multiplier_ = new PositiveDecimal(multiplierNode);
                }
            }
        }
Exemplo n.º 21
0
        public AbsoluteTolerance(XmlNode xmlNode)
        {
            XmlNodeList positiveNodeList = xmlNode.SelectNodes("positive");

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

            foreach (XmlNode item in positiveNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        positiveIDRef = item.Attributes["id"].Name;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(positiveIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        positiveIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        positive = new XsdTypeDecimal(item);
                    }
                }
            }


            XmlNodeList negativeNodeList = xmlNode.SelectNodes("negative");

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

            foreach (XmlNode item in negativeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        negativeIDRef = item.Attributes["id"].Name;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(negativeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        negativeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        negative = new XsdTypeDecimal(item);
                    }
                }
            }


            XmlNodeList unitNodeList = xmlNode.SelectNodes("unit");

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

            foreach (XmlNode item in unitNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        unitIDRef = item.Attributes["id"].Name;
                        QuantityUnit ob = QuantityUnit();
                        IDManager.SetID(unitIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        unitIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        unit = new QuantityUnit(item);
                    }
                }
            }


            XmlNodeList optionOwnerPartyReferenceNodeList = xmlNode.SelectNodes("optionOwnerPartyReference");

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

            foreach (XmlNode item in optionOwnerPartyReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        optionOwnerPartyReferenceIDRef = item.Attributes["id"].Name;
                        PartyReference ob = PartyReference();
                        IDManager.SetID(optionOwnerPartyReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        optionOwnerPartyReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        optionOwnerPartyReference = new PartyReference(item);
                    }
                }
            }
        }
 public AbsoluteTolerance(XmlNode xmlNode)
 {
     XmlNode positiveNode = xmlNode.SelectSingleNode("positive");
     
     if (positiveNode != null)
     {
         if (positiveNode.Attributes["href"] != null || positiveNode.Attributes["id"] != null) 
         {
             if (positiveNode.Attributes["id"] != null) 
             {
                 positiveIDRef_ = positiveNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(positiveNode);
                 IDManager.SetID(positiveIDRef_, ob);
             }
             else if (positiveNode.Attributes["href"] != null)
             {
                 positiveIDRef_ = positiveNode.Attributes["href"].Value;
             }
             else
             {
                 positive_ = new XsdTypeDecimal(positiveNode);
             }
         }
         else
         {
             positive_ = new XsdTypeDecimal(positiveNode);
         }
     }
     
 
     XmlNode negativeNode = xmlNode.SelectSingleNode("negative");
     
     if (negativeNode != null)
     {
         if (negativeNode.Attributes["href"] != null || negativeNode.Attributes["id"] != null) 
         {
             if (negativeNode.Attributes["id"] != null) 
             {
                 negativeIDRef_ = negativeNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(negativeNode);
                 IDManager.SetID(negativeIDRef_, ob);
             }
             else if (negativeNode.Attributes["href"] != null)
             {
                 negativeIDRef_ = negativeNode.Attributes["href"].Value;
             }
             else
             {
                 negative_ = new XsdTypeDecimal(negativeNode);
             }
         }
         else
         {
             negative_ = new XsdTypeDecimal(negativeNode);
         }
     }
     
 
     XmlNode unitNode = xmlNode.SelectSingleNode("unit");
     
     if (unitNode != null)
     {
         if (unitNode.Attributes["href"] != null || unitNode.Attributes["id"] != null) 
         {
             if (unitNode.Attributes["id"] != null) 
             {
                 unitIDRef_ = unitNode.Attributes["id"].Value;
                 QuantityUnit ob = new QuantityUnit(unitNode);
                 IDManager.SetID(unitIDRef_, ob);
             }
             else if (unitNode.Attributes["href"] != null)
             {
                 unitIDRef_ = unitNode.Attributes["href"].Value;
             }
             else
             {
                 unit_ = new QuantityUnit(unitNode);
             }
         }
         else
         {
             unit_ = new QuantityUnit(unitNode);
         }
     }
     
 
     XmlNode optionOwnerPartyReferenceNode = xmlNode.SelectSingleNode("optionOwnerPartyReference");
     
     if (optionOwnerPartyReferenceNode != null)
     {
         if (optionOwnerPartyReferenceNode.Attributes["href"] != null || optionOwnerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (optionOwnerPartyReferenceNode.Attributes["id"] != null) 
             {
                 optionOwnerPartyReferenceIDRef_ = optionOwnerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(optionOwnerPartyReferenceNode);
                 IDManager.SetID(optionOwnerPartyReferenceIDRef_, ob);
             }
             else if (optionOwnerPartyReferenceNode.Attributes["href"] != null)
             {
                 optionOwnerPartyReferenceIDRef_ = optionOwnerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 optionOwnerPartyReference_ = new PartyReference(optionOwnerPartyReferenceNode);
             }
         }
         else
         {
             optionOwnerPartyReference_ = new PartyReference(optionOwnerPartyReferenceNode);
         }
     }
     
 
 }
 public CommodityNotionalQuantity(XmlNode xmlNode)
 {
     XmlNode quantityUnitNode = xmlNode.SelectSingleNode("quantityUnit");
     
     if (quantityUnitNode != null)
     {
         if (quantityUnitNode.Attributes["href"] != null || quantityUnitNode.Attributes["id"] != null) 
         {
             if (quantityUnitNode.Attributes["id"] != null) 
             {
                 quantityUnitIDRef_ = quantityUnitNode.Attributes["id"].Value;
                 QuantityUnit ob = new QuantityUnit(quantityUnitNode);
                 IDManager.SetID(quantityUnitIDRef_, ob);
             }
             else if (quantityUnitNode.Attributes["href"] != null)
             {
                 quantityUnitIDRef_ = quantityUnitNode.Attributes["href"].Value;
             }
             else
             {
                 quantityUnit_ = new QuantityUnit(quantityUnitNode);
             }
         }
         else
         {
             quantityUnit_ = new QuantityUnit(quantityUnitNode);
         }
     }
     
 
     XmlNode quantityFrequencyNode = xmlNode.SelectSingleNode("quantityFrequency");
     
     if (quantityFrequencyNode != null)
     {
         if (quantityFrequencyNode.Attributes["href"] != null || quantityFrequencyNode.Attributes["id"] != null) 
         {
             if (quantityFrequencyNode.Attributes["id"] != null) 
             {
                 quantityFrequencyIDRef_ = quantityFrequencyNode.Attributes["id"].Value;
                 CommodityQuantityFrequency ob = new CommodityQuantityFrequency(quantityFrequencyNode);
                 IDManager.SetID(quantityFrequencyIDRef_, ob);
             }
             else if (quantityFrequencyNode.Attributes["href"] != null)
             {
                 quantityFrequencyIDRef_ = quantityFrequencyNode.Attributes["href"].Value;
             }
             else
             {
                 quantityFrequency_ = new CommodityQuantityFrequency(quantityFrequencyNode);
             }
         }
         else
         {
             quantityFrequency_ = new CommodityQuantityFrequency(quantityFrequencyNode);
         }
     }
     
 
     XmlNode quantityNode = xmlNode.SelectSingleNode("quantity");
     
     if (quantityNode != null)
     {
         if (quantityNode.Attributes["href"] != null || quantityNode.Attributes["id"] != null) 
         {
             if (quantityNode.Attributes["id"] != null) 
             {
                 quantityIDRef_ = quantityNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(quantityNode);
                 IDManager.SetID(quantityIDRef_, ob);
             }
             else if (quantityNode.Attributes["href"] != null)
             {
                 quantityIDRef_ = quantityNode.Attributes["href"].Value;
             }
             else
             {
                 quantity_ = new XsdTypeDecimal(quantityNode);
             }
         }
         else
         {
             quantity_ = new XsdTypeDecimal(quantityNode);
         }
     }
     
 
 }
 public FixedPrice(XmlNode xmlNode)
 {
     XmlNodeList priceNodeList = xmlNode.SelectNodes("price");
     if (priceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in priceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 priceIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(priceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 priceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 price = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList priceCurrencyNodeList = xmlNode.SelectNodes("priceCurrency");
     if (priceCurrencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in priceCurrencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 priceCurrencyIDRef = item.Attributes["id"].Name;
                 Currency ob = Currency();
                 IDManager.SetID(priceCurrencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 priceCurrencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 priceCurrency = new Currency(item);
             }
         }
     }
     
 
     XmlNodeList priceUnitNodeList = xmlNode.SelectNodes("priceUnit");
     if (priceUnitNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in priceUnitNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 priceUnitIDRef = item.Attributes["id"].Name;
                 QuantityUnit ob = QuantityUnit();
                 IDManager.SetID(priceUnitIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 priceUnitIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 priceUnit = new QuantityUnit(item);
             }
         }
     }
     
 
 }
 public Commodity(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList commodityBaseNodeList = xmlNode.SelectNodes("commodityBase");
     if (commodityBaseNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commodityBaseNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commodityBaseIDRef = item.Attributes["id"].Name;
                 CommodityBase ob = CommodityBase();
                 IDManager.SetID(commodityBaseIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commodityBaseIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commodityBase = new CommodityBase(item);
             }
         }
     }
     
 
     XmlNodeList commodityDetailsNodeList = xmlNode.SelectNodes("commodityDetails");
     if (commodityDetailsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commodityDetailsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commodityDetailsIDRef = item.Attributes["id"].Name;
                 CommodityDetails ob = CommodityDetails();
                 IDManager.SetID(commodityDetailsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commodityDetailsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commodityDetails = new CommodityDetails(item);
             }
         }
     }
     
 
     XmlNodeList unitNodeList = xmlNode.SelectNodes("unit");
     if (unitNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in unitNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 unitIDRef = item.Attributes["id"].Name;
                 QuantityUnit ob = QuantityUnit();
                 IDManager.SetID(unitIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 unitIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 unit = new QuantityUnit(item);
             }
         }
     }
     
 
     XmlNodeList currencyNodeList = xmlNode.SelectNodes("currency");
     if (currencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in currencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 currencyIDRef = item.Attributes["id"].Name;
                 Currency ob = Currency();
                 IDManager.SetID(currencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 currencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 currency = new Currency(item);
             }
         }
     }
     
 
     XmlNodeList exchangeIdNodeList = xmlNode.SelectNodes("exchangeId");
     if (exchangeIdNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in exchangeIdNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 exchangeIdIDRef = item.Attributes["id"].Name;
                 ExchangeId ob = ExchangeId();
                 IDManager.SetID(exchangeIdIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 exchangeIdIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 exchangeId = new ExchangeId(item);
             }
         }
     }
     
 
     XmlNodeList publicationNodeList = xmlNode.SelectNodes("publication");
     if (publicationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in publicationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 publicationIDRef = item.Attributes["id"].Name;
                 CommodityInformationSource ob = CommodityInformationSource();
                 IDManager.SetID(publicationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 publicationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 publication = new CommodityInformationSource(item);
             }
         }
     }
     
 
     XmlNodeList specifiedPriceNodeList = xmlNode.SelectNodes("specifiedPrice");
     if (specifiedPriceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in specifiedPriceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 specifiedPriceIDRef = item.Attributes["id"].Name;
                 SpecifiedPriceEnum ob = SpecifiedPriceEnum();
                 IDManager.SetID(specifiedPriceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 specifiedPriceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 specifiedPrice = new SpecifiedPriceEnum(item);
             }
         }
     }
     
 
     XmlNodeList deliveryDatesNodeList = xmlNode.SelectNodes("deliveryDates");
     if (deliveryDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in deliveryDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 deliveryDatesIDRef = item.Attributes["id"].Name;
                 DeliveryDatesEnum ob = DeliveryDatesEnum();
                 IDManager.SetID(deliveryDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryDates = new DeliveryDatesEnum(item);
             }
         }
     }
     
 
     XmlNodeList deliveryDateNodeList = xmlNode.SelectNodes("deliveryDate");
     if (deliveryDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in deliveryDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 deliveryDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate ob = AdjustableDate();
                 IDManager.SetID(deliveryDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryDate = new AdjustableDate(item);
             }
         }
     }
     
 
     XmlNodeList deliveryDateYearMonthNodeList = xmlNode.SelectNodes("deliveryDateYearMonth");
     if (deliveryDateYearMonthNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in deliveryDateYearMonthNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 deliveryDateYearMonthIDRef = item.Attributes["id"].Name;
                 XsdTypeGYearMonth ob = XsdTypeGYearMonth();
                 IDManager.SetID(deliveryDateYearMonthIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryDateYearMonthIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryDateYearMonth = new XsdTypeGYearMonth(item);
             }
         }
     }
     
 
     XmlNodeList deliveryDateRollConventionNodeList = xmlNode.SelectNodes("deliveryDateRollConvention");
     if (deliveryDateRollConventionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in deliveryDateRollConventionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 deliveryDateRollConventionIDRef = item.Attributes["id"].Name;
                 Offset ob = Offset();
                 IDManager.SetID(deliveryDateRollConventionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryDateRollConventionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryDateRollConvention = new Offset(item);
             }
         }
     }
     
 
     XmlNodeList multiplierNodeList = xmlNode.SelectNodes("multiplier");
     if (multiplierNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in multiplierNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 multiplierIDRef = item.Attributes["id"].Name;
                 PositiveDecimal ob = PositiveDecimal();
                 IDManager.SetID(multiplierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 multiplierIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 multiplier = new PositiveDecimal(item);
             }
         }
     }
     
 
 }