Exemplo n.º 1
0
        public CommodityRelativePaymentDates(XmlNode xmlNode)
        {
            XmlNodeList payRelativeToNodeList = xmlNode.SelectNodes("payRelativeTo");

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

            foreach (XmlNode item in payRelativeToNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        payRelativeToIDRef = item.Attributes["id"].Name;
                        CommodityPayRelativeToEnum ob = CommodityPayRelativeToEnum();
                        IDManager.SetID(payRelativeToIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        payRelativeToIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        payRelativeTo = new CommodityPayRelativeToEnum(item);
                    }
                }
            }


            XmlNodeList payRelativeToEventNodeList = xmlNode.SelectNodes("payRelativeToEvent");

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

            foreach (XmlNode item in payRelativeToEventNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        payRelativeToEventIDRef = item.Attributes["id"].Name;
                        CommodityPayRelativeToEvent ob = CommodityPayRelativeToEvent();
                        IDManager.SetID(payRelativeToEventIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        payRelativeToEventIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        payRelativeToEvent = new CommodityPayRelativeToEvent(item);
                    }
                }
            }


            XmlNodeList calculationPeriodsReferenceNodeList = xmlNode.SelectNodes("calculationPeriodsReference");

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

            foreach (XmlNode item in calculationPeriodsReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodsReferenceIDRef = item.Attributes["id"].Name;
                        CalculationPeriodsReference ob = CalculationPeriodsReference();
                        IDManager.SetID(calculationPeriodsReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodsReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodsReference = new CalculationPeriodsReference(item);
                    }
                }
            }


            XmlNodeList calculationPeriodsScheduleReferenceNodeList = xmlNode.SelectNodes("calculationPeriodsScheduleReference");

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

            foreach (XmlNode item in calculationPeriodsScheduleReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodsScheduleReferenceIDRef = item.Attributes["id"].Name;
                        CalculationPeriodsScheduleReference ob = CalculationPeriodsScheduleReference();
                        IDManager.SetID(calculationPeriodsScheduleReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodsScheduleReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodsScheduleReference = new CalculationPeriodsScheduleReference(item);
                    }
                }
            }


            XmlNodeList calculationPeriodsDatesReferenceNodeList = xmlNode.SelectNodes("calculationPeriodsDatesReference");

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

            foreach (XmlNode item in calculationPeriodsDatesReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodsDatesReferenceIDRef = item.Attributes["id"].Name;
                        CalculationPeriodsDatesReference ob = CalculationPeriodsDatesReference();
                        IDManager.SetID(calculationPeriodsDatesReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodsDatesReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodsDatesReference = new CalculationPeriodsDatesReference(item);
                    }
                }
            }


            XmlNodeList paymentDaysOffsetNodeList = xmlNode.SelectNodes("paymentDaysOffset");

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

            foreach (XmlNode item in paymentDaysOffsetNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        paymentDaysOffsetIDRef = item.Attributes["id"].Name;
                        DateOffset ob = DateOffset();
                        IDManager.SetID(paymentDaysOffsetIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        paymentDaysOffsetIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        paymentDaysOffset = new DateOffset(item);
                    }
                }
            }


            XmlNodeList businessCentersReferenceNodeList = xmlNode.SelectNodes("businessCentersReference");

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

            foreach (XmlNode item in businessCentersReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        businessCentersReferenceIDRef = item.Attributes["id"].Name;
                        BusinessCentersReference ob = BusinessCentersReference();
                        IDManager.SetID(businessCentersReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        businessCentersReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        businessCentersReference = new BusinessCentersReference(item);
                    }
                }
            }


            XmlNodeList businessCentersNodeList = xmlNode.SelectNodes("businessCenters");

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

            foreach (XmlNode item in businessCentersNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        businessCentersIDRef = item.Attributes["id"].Name;
                        BusinessCenters ob = BusinessCenters();
                        IDManager.SetID(businessCentersIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        businessCentersIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        businessCenters = new BusinessCenters(item);
                    }
                }
            }
        }
 public EnvironmentalPhysicalLeg(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode numberOfAllowancesNode = xmlNode.SelectSingleNode("numberOfAllowances");
     
     if (numberOfAllowancesNode != null)
     {
         if (numberOfAllowancesNode.Attributes["href"] != null || numberOfAllowancesNode.Attributes["id"] != null) 
         {
             if (numberOfAllowancesNode.Attributes["id"] != null) 
             {
                 numberOfAllowancesIDRef_ = numberOfAllowancesNode.Attributes["id"].Value;
                 UnitQuantity ob = new UnitQuantity(numberOfAllowancesNode);
                 IDManager.SetID(numberOfAllowancesIDRef_, ob);
             }
             else if (numberOfAllowancesNode.Attributes["href"] != null)
             {
                 numberOfAllowancesIDRef_ = numberOfAllowancesNode.Attributes["href"].Value;
             }
             else
             {
                 numberOfAllowances_ = new UnitQuantity(numberOfAllowancesNode);
             }
         }
         else
         {
             numberOfAllowances_ = new UnitQuantity(numberOfAllowancesNode);
         }
     }
     
 
     XmlNode environmentalNode = xmlNode.SelectSingleNode("environmental");
     
     if (environmentalNode != null)
     {
         if (environmentalNode.Attributes["href"] != null || environmentalNode.Attributes["id"] != null) 
         {
             if (environmentalNode.Attributes["id"] != null) 
             {
                 environmentalIDRef_ = environmentalNode.Attributes["id"].Value;
                 EnvironmentalProduct ob = new EnvironmentalProduct(environmentalNode);
                 IDManager.SetID(environmentalIDRef_, ob);
             }
             else if (environmentalNode.Attributes["href"] != null)
             {
                 environmentalIDRef_ = environmentalNode.Attributes["href"].Value;
             }
             else
             {
                 environmental_ = new EnvironmentalProduct(environmentalNode);
             }
         }
         else
         {
             environmental_ = new EnvironmentalProduct(environmentalNode);
         }
     }
     
 
     XmlNode abandonmentOfSchemeNode = xmlNode.SelectSingleNode("abandonmentOfScheme");
     
     if (abandonmentOfSchemeNode != null)
     {
         if (abandonmentOfSchemeNode.Attributes["href"] != null || abandonmentOfSchemeNode.Attributes["id"] != null) 
         {
             if (abandonmentOfSchemeNode.Attributes["id"] != null) 
             {
                 abandonmentOfSchemeIDRef_ = abandonmentOfSchemeNode.Attributes["id"].Value;
                 EnvironmentalAbandonmentOfSchemeEnum ob = new EnvironmentalAbandonmentOfSchemeEnum(abandonmentOfSchemeNode);
                 IDManager.SetID(abandonmentOfSchemeIDRef_, ob);
             }
             else if (abandonmentOfSchemeNode.Attributes["href"] != null)
             {
                 abandonmentOfSchemeIDRef_ = abandonmentOfSchemeNode.Attributes["href"].Value;
             }
             else
             {
                 abandonmentOfScheme_ = new EnvironmentalAbandonmentOfSchemeEnum(abandonmentOfSchemeNode);
             }
         }
         else
         {
             abandonmentOfScheme_ = new EnvironmentalAbandonmentOfSchemeEnum(abandonmentOfSchemeNode);
         }
     }
     
 
     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;
                 AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(deliveryDateNode);
                 IDManager.SetID(deliveryDateIDRef_, ob);
             }
             else if (deliveryDateNode.Attributes["href"] != null)
             {
                 deliveryDateIDRef_ = deliveryDateNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryDate_ = new AdjustableOrRelativeDate(deliveryDateNode);
             }
         }
         else
         {
             deliveryDate_ = new AdjustableOrRelativeDate(deliveryDateNode);
         }
     }
     
 
     XmlNode paymentDateNode = xmlNode.SelectSingleNode("paymentDate");
     
     if (paymentDateNode != null)
     {
         if (paymentDateNode.Attributes["href"] != null || paymentDateNode.Attributes["id"] != null) 
         {
             if (paymentDateNode.Attributes["id"] != null) 
             {
                 paymentDateIDRef_ = paymentDateNode.Attributes["id"].Value;
                 DateOffset ob = new DateOffset(paymentDateNode);
                 IDManager.SetID(paymentDateIDRef_, ob);
             }
             else if (paymentDateNode.Attributes["href"] != null)
             {
                 paymentDateIDRef_ = paymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 paymentDate_ = new DateOffset(paymentDateNode);
             }
         }
         else
         {
             paymentDate_ = new DateOffset(paymentDateNode);
         }
     }
     
 
     XmlNode businessCentersReferenceNode = xmlNode.SelectSingleNode("businessCentersReference");
     
     if (businessCentersReferenceNode != null)
     {
         if (businessCentersReferenceNode.Attributes["href"] != null || businessCentersReferenceNode.Attributes["id"] != null) 
         {
             if (businessCentersReferenceNode.Attributes["id"] != null) 
             {
                 businessCentersReferenceIDRef_ = businessCentersReferenceNode.Attributes["id"].Value;
                 BusinessCentersReference ob = new BusinessCentersReference(businessCentersReferenceNode);
                 IDManager.SetID(businessCentersReferenceIDRef_, ob);
             }
             else if (businessCentersReferenceNode.Attributes["href"] != null)
             {
                 businessCentersReferenceIDRef_ = businessCentersReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 businessCentersReference_ = new BusinessCentersReference(businessCentersReferenceNode);
             }
         }
         else
         {
             businessCentersReference_ = new BusinessCentersReference(businessCentersReferenceNode);
         }
     }
     
 
     XmlNode businessCentersNode = xmlNode.SelectSingleNode("businessCenters");
     
     if (businessCentersNode != null)
     {
         if (businessCentersNode.Attributes["href"] != null || businessCentersNode.Attributes["id"] != null) 
         {
             if (businessCentersNode.Attributes["id"] != null) 
             {
                 businessCentersIDRef_ = businessCentersNode.Attributes["id"].Value;
                 BusinessCenters ob = new BusinessCenters(businessCentersNode);
                 IDManager.SetID(businessCentersIDRef_, ob);
             }
             else if (businessCentersNode.Attributes["href"] != null)
             {
                 businessCentersIDRef_ = businessCentersNode.Attributes["href"].Value;
             }
             else
             {
                 businessCenters_ = new BusinessCenters(businessCentersNode);
             }
         }
         else
         {
             businessCenters_ = new BusinessCenters(businessCentersNode);
         }
     }
     
 
     XmlNode failureToDeliverApplicableNode = xmlNode.SelectSingleNode("failureToDeliverApplicable");
     
     if (failureToDeliverApplicableNode != null)
     {
         if (failureToDeliverApplicableNode.Attributes["href"] != null || failureToDeliverApplicableNode.Attributes["id"] != null) 
         {
             if (failureToDeliverApplicableNode.Attributes["id"] != null) 
             {
                 failureToDeliverApplicableIDRef_ = failureToDeliverApplicableNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(failureToDeliverApplicableNode);
                 IDManager.SetID(failureToDeliverApplicableIDRef_, ob);
             }
             else if (failureToDeliverApplicableNode.Attributes["href"] != null)
             {
                 failureToDeliverApplicableIDRef_ = failureToDeliverApplicableNode.Attributes["href"].Value;
             }
             else
             {
                 failureToDeliverApplicable_ = new XsdTypeBoolean(failureToDeliverApplicableNode);
             }
         }
         else
         {
             failureToDeliverApplicable_ = new XsdTypeBoolean(failureToDeliverApplicableNode);
         }
     }
     
 
     XmlNode eEPParametersNode = xmlNode.SelectSingleNode("eEPParameters");
     
     if (eEPParametersNode != null)
     {
         if (eEPParametersNode.Attributes["href"] != null || eEPParametersNode.Attributes["id"] != null) 
         {
             if (eEPParametersNode.Attributes["id"] != null) 
             {
                 eEPParametersIDRef_ = eEPParametersNode.Attributes["id"].Value;
                 EEPParameters ob = new EEPParameters(eEPParametersNode);
                 IDManager.SetID(eEPParametersIDRef_, ob);
             }
             else if (eEPParametersNode.Attributes["href"] != null)
             {
                 eEPParametersIDRef_ = eEPParametersNode.Attributes["href"].Value;
             }
             else
             {
                 eEPParameters_ = new EEPParameters(eEPParametersNode);
             }
         }
         else
         {
             eEPParameters_ = new EEPParameters(eEPParametersNode);
         }
     }
     
 
 }
Exemplo n.º 3
0
        public CommodityRelativeExpirationDates(XmlNode xmlNode)
        {
            XmlNode expireRelativeToEventNode = xmlNode.SelectSingleNode("expireRelativeToEvent");

            if (expireRelativeToEventNode != null)
            {
                if (expireRelativeToEventNode.Attributes["href"] != null || expireRelativeToEventNode.Attributes["id"] != null)
                {
                    if (expireRelativeToEventNode.Attributes["id"] != null)
                    {
                        expireRelativeToEventIDRef_ = expireRelativeToEventNode.Attributes["id"].Value;
                        CommodityExpireRelativeToEvent ob = new CommodityExpireRelativeToEvent(expireRelativeToEventNode);
                        IDManager.SetID(expireRelativeToEventIDRef_, ob);
                    }
                    else if (expireRelativeToEventNode.Attributes["href"] != null)
                    {
                        expireRelativeToEventIDRef_ = expireRelativeToEventNode.Attributes["href"].Value;
                    }
                    else
                    {
                        expireRelativeToEvent_ = new CommodityExpireRelativeToEvent(expireRelativeToEventNode);
                    }
                }
                else
                {
                    expireRelativeToEvent_ = new CommodityExpireRelativeToEvent(expireRelativeToEventNode);
                }
            }


            XmlNode expirationDateOffsetNode = xmlNode.SelectSingleNode("expirationDateOffset");

            if (expirationDateOffsetNode != null)
            {
                if (expirationDateOffsetNode.Attributes["href"] != null || expirationDateOffsetNode.Attributes["id"] != null)
                {
                    if (expirationDateOffsetNode.Attributes["id"] != null)
                    {
                        expirationDateOffsetIDRef_ = expirationDateOffsetNode.Attributes["id"].Value;
                        DateOffset ob = new DateOffset(expirationDateOffsetNode);
                        IDManager.SetID(expirationDateOffsetIDRef_, ob);
                    }
                    else if (expirationDateOffsetNode.Attributes["href"] != null)
                    {
                        expirationDateOffsetIDRef_ = expirationDateOffsetNode.Attributes["href"].Value;
                    }
                    else
                    {
                        expirationDateOffset_ = new DateOffset(expirationDateOffsetNode);
                    }
                }
                else
                {
                    expirationDateOffset_ = new DateOffset(expirationDateOffsetNode);
                }
            }


            XmlNode businessCentersReferenceNode = xmlNode.SelectSingleNode("businessCentersReference");

            if (businessCentersReferenceNode != null)
            {
                if (businessCentersReferenceNode.Attributes["href"] != null || businessCentersReferenceNode.Attributes["id"] != null)
                {
                    if (businessCentersReferenceNode.Attributes["id"] != null)
                    {
                        businessCentersReferenceIDRef_ = businessCentersReferenceNode.Attributes["id"].Value;
                        BusinessCentersReference ob = new BusinessCentersReference(businessCentersReferenceNode);
                        IDManager.SetID(businessCentersReferenceIDRef_, ob);
                    }
                    else if (businessCentersReferenceNode.Attributes["href"] != null)
                    {
                        businessCentersReferenceIDRef_ = businessCentersReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        businessCentersReference_ = new BusinessCentersReference(businessCentersReferenceNode);
                    }
                }
                else
                {
                    businessCentersReference_ = new BusinessCentersReference(businessCentersReferenceNode);
                }
            }


            XmlNode businessCentersNode = xmlNode.SelectSingleNode("businessCenters");

            if (businessCentersNode != null)
            {
                if (businessCentersNode.Attributes["href"] != null || businessCentersNode.Attributes["id"] != null)
                {
                    if (businessCentersNode.Attributes["id"] != null)
                    {
                        businessCentersIDRef_ = businessCentersNode.Attributes["id"].Value;
                        BusinessCenters ob = new BusinessCenters(businessCentersNode);
                        IDManager.SetID(businessCentersIDRef_, ob);
                    }
                    else if (businessCentersNode.Attributes["href"] != null)
                    {
                        businessCentersIDRef_ = businessCentersNode.Attributes["href"].Value;
                    }
                    else
                    {
                        businessCenters_ = new BusinessCenters(businessCentersNode);
                    }
                }
                else
                {
                    businessCenters_ = new BusinessCenters(businessCentersNode);
                }
            }
        }
 public CommodityRelativePaymentDates(XmlNode xmlNode)
 {
     XmlNode payRelativeToNode = xmlNode.SelectSingleNode("payRelativeTo");
     
     if (payRelativeToNode != null)
     {
         if (payRelativeToNode.Attributes["href"] != null || payRelativeToNode.Attributes["id"] != null) 
         {
             if (payRelativeToNode.Attributes["id"] != null) 
             {
                 payRelativeToIDRef_ = payRelativeToNode.Attributes["id"].Value;
                 CommodityPayRelativeToEnum ob = new CommodityPayRelativeToEnum(payRelativeToNode);
                 IDManager.SetID(payRelativeToIDRef_, ob);
             }
             else if (payRelativeToNode.Attributes["href"] != null)
             {
                 payRelativeToIDRef_ = payRelativeToNode.Attributes["href"].Value;
             }
             else
             {
                 payRelativeTo_ = new CommodityPayRelativeToEnum(payRelativeToNode);
             }
         }
         else
         {
             payRelativeTo_ = new CommodityPayRelativeToEnum(payRelativeToNode);
         }
     }
     
 
     XmlNode payRelativeToEventNode = xmlNode.SelectSingleNode("payRelativeToEvent");
     
     if (payRelativeToEventNode != null)
     {
         if (payRelativeToEventNode.Attributes["href"] != null || payRelativeToEventNode.Attributes["id"] != null) 
         {
             if (payRelativeToEventNode.Attributes["id"] != null) 
             {
                 payRelativeToEventIDRef_ = payRelativeToEventNode.Attributes["id"].Value;
                 CommodityPayRelativeToEvent ob = new CommodityPayRelativeToEvent(payRelativeToEventNode);
                 IDManager.SetID(payRelativeToEventIDRef_, ob);
             }
             else if (payRelativeToEventNode.Attributes["href"] != null)
             {
                 payRelativeToEventIDRef_ = payRelativeToEventNode.Attributes["href"].Value;
             }
             else
             {
                 payRelativeToEvent_ = new CommodityPayRelativeToEvent(payRelativeToEventNode);
             }
         }
         else
         {
             payRelativeToEvent_ = new CommodityPayRelativeToEvent(payRelativeToEventNode);
         }
     }
     
 
     XmlNode calculationPeriodsReferenceNode = xmlNode.SelectSingleNode("calculationPeriodsReference");
     
     if (calculationPeriodsReferenceNode != null)
     {
         if (calculationPeriodsReferenceNode.Attributes["href"] != null || calculationPeriodsReferenceNode.Attributes["id"] != null) 
         {
             if (calculationPeriodsReferenceNode.Attributes["id"] != null) 
             {
                 calculationPeriodsReferenceIDRef_ = calculationPeriodsReferenceNode.Attributes["id"].Value;
                 CalculationPeriodsReference ob = new CalculationPeriodsReference(calculationPeriodsReferenceNode);
                 IDManager.SetID(calculationPeriodsReferenceIDRef_, ob);
             }
             else if (calculationPeriodsReferenceNode.Attributes["href"] != null)
             {
                 calculationPeriodsReferenceIDRef_ = calculationPeriodsReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodsReference_ = new CalculationPeriodsReference(calculationPeriodsReferenceNode);
             }
         }
         else
         {
             calculationPeriodsReference_ = new CalculationPeriodsReference(calculationPeriodsReferenceNode);
         }
     }
     
 
     XmlNode calculationPeriodsScheduleReferenceNode = xmlNode.SelectSingleNode("calculationPeriodsScheduleReference");
     
     if (calculationPeriodsScheduleReferenceNode != null)
     {
         if (calculationPeriodsScheduleReferenceNode.Attributes["href"] != null || calculationPeriodsScheduleReferenceNode.Attributes["id"] != null) 
         {
             if (calculationPeriodsScheduleReferenceNode.Attributes["id"] != null) 
             {
                 calculationPeriodsScheduleReferenceIDRef_ = calculationPeriodsScheduleReferenceNode.Attributes["id"].Value;
                 CalculationPeriodsScheduleReference ob = new CalculationPeriodsScheduleReference(calculationPeriodsScheduleReferenceNode);
                 IDManager.SetID(calculationPeriodsScheduleReferenceIDRef_, ob);
             }
             else if (calculationPeriodsScheduleReferenceNode.Attributes["href"] != null)
             {
                 calculationPeriodsScheduleReferenceIDRef_ = calculationPeriodsScheduleReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodsScheduleReference_ = new CalculationPeriodsScheduleReference(calculationPeriodsScheduleReferenceNode);
             }
         }
         else
         {
             calculationPeriodsScheduleReference_ = new CalculationPeriodsScheduleReference(calculationPeriodsScheduleReferenceNode);
         }
     }
     
 
     XmlNode calculationPeriodsDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodsDatesReference");
     
     if (calculationPeriodsDatesReferenceNode != null)
     {
         if (calculationPeriodsDatesReferenceNode.Attributes["href"] != null || calculationPeriodsDatesReferenceNode.Attributes["id"] != null) 
         {
             if (calculationPeriodsDatesReferenceNode.Attributes["id"] != null) 
             {
                 calculationPeriodsDatesReferenceIDRef_ = calculationPeriodsDatesReferenceNode.Attributes["id"].Value;
                 CalculationPeriodsDatesReference ob = new CalculationPeriodsDatesReference(calculationPeriodsDatesReferenceNode);
                 IDManager.SetID(calculationPeriodsDatesReferenceIDRef_, ob);
             }
             else if (calculationPeriodsDatesReferenceNode.Attributes["href"] != null)
             {
                 calculationPeriodsDatesReferenceIDRef_ = calculationPeriodsDatesReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodsDatesReference_ = new CalculationPeriodsDatesReference(calculationPeriodsDatesReferenceNode);
             }
         }
         else
         {
             calculationPeriodsDatesReference_ = new CalculationPeriodsDatesReference(calculationPeriodsDatesReferenceNode);
         }
     }
     
 
     XmlNode paymentDaysOffsetNode = xmlNode.SelectSingleNode("paymentDaysOffset");
     
     if (paymentDaysOffsetNode != null)
     {
         if (paymentDaysOffsetNode.Attributes["href"] != null || paymentDaysOffsetNode.Attributes["id"] != null) 
         {
             if (paymentDaysOffsetNode.Attributes["id"] != null) 
             {
                 paymentDaysOffsetIDRef_ = paymentDaysOffsetNode.Attributes["id"].Value;
                 DateOffset ob = new DateOffset(paymentDaysOffsetNode);
                 IDManager.SetID(paymentDaysOffsetIDRef_, ob);
             }
             else if (paymentDaysOffsetNode.Attributes["href"] != null)
             {
                 paymentDaysOffsetIDRef_ = paymentDaysOffsetNode.Attributes["href"].Value;
             }
             else
             {
                 paymentDaysOffset_ = new DateOffset(paymentDaysOffsetNode);
             }
         }
         else
         {
             paymentDaysOffset_ = new DateOffset(paymentDaysOffsetNode);
         }
     }
     
 
     XmlNode businessCentersReferenceNode = xmlNode.SelectSingleNode("businessCentersReference");
     
     if (businessCentersReferenceNode != null)
     {
         if (businessCentersReferenceNode.Attributes["href"] != null || businessCentersReferenceNode.Attributes["id"] != null) 
         {
             if (businessCentersReferenceNode.Attributes["id"] != null) 
             {
                 businessCentersReferenceIDRef_ = businessCentersReferenceNode.Attributes["id"].Value;
                 BusinessCentersReference ob = new BusinessCentersReference(businessCentersReferenceNode);
                 IDManager.SetID(businessCentersReferenceIDRef_, ob);
             }
             else if (businessCentersReferenceNode.Attributes["href"] != null)
             {
                 businessCentersReferenceIDRef_ = businessCentersReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 businessCentersReference_ = new BusinessCentersReference(businessCentersReferenceNode);
             }
         }
         else
         {
             businessCentersReference_ = new BusinessCentersReference(businessCentersReferenceNode);
         }
     }
     
 
     XmlNode businessCentersNode = xmlNode.SelectSingleNode("businessCenters");
     
     if (businessCentersNode != null)
     {
         if (businessCentersNode.Attributes["href"] != null || businessCentersNode.Attributes["id"] != null) 
         {
             if (businessCentersNode.Attributes["id"] != null) 
             {
                 businessCentersIDRef_ = businessCentersNode.Attributes["id"].Value;
                 BusinessCenters ob = new BusinessCenters(businessCentersNode);
                 IDManager.SetID(businessCentersIDRef_, ob);
             }
             else if (businessCentersNode.Attributes["href"] != null)
             {
                 businessCentersIDRef_ = businessCentersNode.Attributes["href"].Value;
             }
             else
             {
                 businessCenters_ = new BusinessCenters(businessCentersNode);
             }
         }
         else
         {
             businessCenters_ = new BusinessCenters(businessCentersNode);
         }
     }
     
 
 }
 public EnvironmentalPhysicalLeg(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList numberOfAllowancesNodeList = xmlNode.SelectNodes("numberOfAllowances");
     if (numberOfAllowancesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in numberOfAllowancesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 numberOfAllowancesIDRef = item.Attributes["id"].Name;
                 UnitQuantity ob = UnitQuantity();
                 IDManager.SetID(numberOfAllowancesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 numberOfAllowancesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 numberOfAllowances = new UnitQuantity(item);
             }
         }
     }
     
 
     XmlNodeList environmentalNodeList = xmlNode.SelectNodes("environmental");
     if (environmentalNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in environmentalNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 environmentalIDRef = item.Attributes["id"].Name;
                 EnvironmentalProduct ob = EnvironmentalProduct();
                 IDManager.SetID(environmentalIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 environmentalIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 environmental = new EnvironmentalProduct(item);
             }
         }
     }
     
 
     XmlNodeList abandonmentOfSchemeNodeList = xmlNode.SelectNodes("abandonmentOfScheme");
     if (abandonmentOfSchemeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in abandonmentOfSchemeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 abandonmentOfSchemeIDRef = item.Attributes["id"].Name;
                 EnvironmentalAbandonmentOfSchemeEnum ob = EnvironmentalAbandonmentOfSchemeEnum();
                 IDManager.SetID(abandonmentOfSchemeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 abandonmentOfSchemeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 abandonmentOfScheme = new EnvironmentalAbandonmentOfSchemeEnum(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;
                 AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                 IDManager.SetID(deliveryDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryDate = new AdjustableOrRelativeDate(item);
             }
         }
     }
     
 
     XmlNodeList paymentDateNodeList = xmlNode.SelectNodes("paymentDate");
     if (paymentDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentDateIDRef = item.Attributes["id"].Name;
                 DateOffset ob = DateOffset();
                 IDManager.SetID(paymentDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentDate = new DateOffset(item);
             }
         }
     }
     
 
     XmlNodeList businessCentersReferenceNodeList = xmlNode.SelectNodes("businessCentersReference");
     if (businessCentersReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in businessCentersReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 businessCentersReferenceIDRef = item.Attributes["id"].Name;
                 BusinessCentersReference ob = BusinessCentersReference();
                 IDManager.SetID(businessCentersReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 businessCentersReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 businessCentersReference = new BusinessCentersReference(item);
             }
         }
     }
     
 
     XmlNodeList businessCentersNodeList = xmlNode.SelectNodes("businessCenters");
     if (businessCentersNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in businessCentersNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 businessCentersIDRef = item.Attributes["id"].Name;
                 BusinessCenters ob = BusinessCenters();
                 IDManager.SetID(businessCentersIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 businessCentersIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 businessCenters = new BusinessCenters(item);
             }
         }
     }
     
 
     XmlNodeList failureToDeliverApplicableNodeList = xmlNode.SelectNodes("failureToDeliverApplicable");
     if (failureToDeliverApplicableNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in failureToDeliverApplicableNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 failureToDeliverApplicableIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(failureToDeliverApplicableIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 failureToDeliverApplicableIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 failureToDeliverApplicable = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList eEPParametersNodeList = xmlNode.SelectNodes("eEPParameters");
     if (eEPParametersNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in eEPParametersNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 eEPParametersIDRef = item.Attributes["id"].Name;
                 EEPParameters ob = EEPParameters();
                 IDManager.SetID(eEPParametersIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 eEPParametersIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 eEPParameters = new EEPParameters(item);
             }
         }
     }
     
 
 }
 public CommodityRelativeExpirationDates(XmlNode xmlNode)
 {
     XmlNodeList expireRelativeToEventNodeList = xmlNode.SelectNodes("expireRelativeToEvent");
     if (expireRelativeToEventNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in expireRelativeToEventNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 expireRelativeToEventIDRef = item.Attributes["id"].Name;
                 CommodityExpireRelativeToEvent ob = CommodityExpireRelativeToEvent();
                 IDManager.SetID(expireRelativeToEventIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 expireRelativeToEventIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 expireRelativeToEvent = new CommodityExpireRelativeToEvent(item);
             }
         }
     }
     
 
     XmlNodeList expirationDateOffsetNodeList = xmlNode.SelectNodes("expirationDateOffset");
     if (expirationDateOffsetNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in expirationDateOffsetNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 expirationDateOffsetIDRef = item.Attributes["id"].Name;
                 DateOffset ob = DateOffset();
                 IDManager.SetID(expirationDateOffsetIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 expirationDateOffsetIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 expirationDateOffset = new DateOffset(item);
             }
         }
     }
     
 
     XmlNodeList businessCentersReferenceNodeList = xmlNode.SelectNodes("businessCentersReference");
     if (businessCentersReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in businessCentersReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 businessCentersReferenceIDRef = item.Attributes["id"].Name;
                 BusinessCentersReference ob = BusinessCentersReference();
                 IDManager.SetID(businessCentersReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 businessCentersReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 businessCentersReference = new BusinessCentersReference(item);
             }
         }
     }
     
 
     XmlNodeList businessCentersNodeList = xmlNode.SelectNodes("businessCenters");
     if (businessCentersNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in businessCentersNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 businessCentersIDRef = item.Attributes["id"].Name;
                 BusinessCenters ob = BusinessCenters();
                 IDManager.SetID(businessCentersIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 businessCentersIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 businessCenters = new BusinessCenters(item);
             }
         }
     }
     
 
 }
        public EnvironmentalPhysicalLeg(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList numberOfAllowancesNodeList = xmlNode.SelectNodes("numberOfAllowances");

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

            foreach (XmlNode item in numberOfAllowancesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        numberOfAllowancesIDRef = item.Attributes["id"].Name;
                        UnitQuantity ob = UnitQuantity();
                        IDManager.SetID(numberOfAllowancesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        numberOfAllowancesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        numberOfAllowances = new UnitQuantity(item);
                    }
                }
            }


            XmlNodeList environmentalNodeList = xmlNode.SelectNodes("environmental");

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

            foreach (XmlNode item in environmentalNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        environmentalIDRef = item.Attributes["id"].Name;
                        EnvironmentalProduct ob = EnvironmentalProduct();
                        IDManager.SetID(environmentalIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        environmentalIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        environmental = new EnvironmentalProduct(item);
                    }
                }
            }


            XmlNodeList abandonmentOfSchemeNodeList = xmlNode.SelectNodes("abandonmentOfScheme");

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

            foreach (XmlNode item in abandonmentOfSchemeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        abandonmentOfSchemeIDRef = item.Attributes["id"].Name;
                        EnvironmentalAbandonmentOfSchemeEnum ob = EnvironmentalAbandonmentOfSchemeEnum();
                        IDManager.SetID(abandonmentOfSchemeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        abandonmentOfSchemeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        abandonmentOfScheme = new EnvironmentalAbandonmentOfSchemeEnum(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;
                        AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                        IDManager.SetID(deliveryDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        deliveryDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        deliveryDate = new AdjustableOrRelativeDate(item);
                    }
                }
            }


            XmlNodeList paymentDateNodeList = xmlNode.SelectNodes("paymentDate");

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

            foreach (XmlNode item in paymentDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        paymentDateIDRef = item.Attributes["id"].Name;
                        DateOffset ob = DateOffset();
                        IDManager.SetID(paymentDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        paymentDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        paymentDate = new DateOffset(item);
                    }
                }
            }


            XmlNodeList businessCentersReferenceNodeList = xmlNode.SelectNodes("businessCentersReference");

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

            foreach (XmlNode item in businessCentersReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        businessCentersReferenceIDRef = item.Attributes["id"].Name;
                        BusinessCentersReference ob = BusinessCentersReference();
                        IDManager.SetID(businessCentersReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        businessCentersReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        businessCentersReference = new BusinessCentersReference(item);
                    }
                }
            }


            XmlNodeList businessCentersNodeList = xmlNode.SelectNodes("businessCenters");

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

            foreach (XmlNode item in businessCentersNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        businessCentersIDRef = item.Attributes["id"].Name;
                        BusinessCenters ob = BusinessCenters();
                        IDManager.SetID(businessCentersIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        businessCentersIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        businessCenters = new BusinessCenters(item);
                    }
                }
            }


            XmlNodeList failureToDeliverApplicableNodeList = xmlNode.SelectNodes("failureToDeliverApplicable");

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

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


            XmlNodeList eEPParametersNodeList = xmlNode.SelectNodes("eEPParameters");

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

            foreach (XmlNode item in eEPParametersNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        eEPParametersIDRef = item.Attributes["id"].Name;
                        EEPParameters ob = EEPParameters();
                        IDManager.SetID(eEPParametersIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        eEPParametersIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        eEPParameters = new EEPParameters(item);
                    }
                }
            }
        }
 public CommodityRelativePaymentDates(XmlNode xmlNode)
 {
     XmlNodeList payRelativeToNodeList = xmlNode.SelectNodes("payRelativeTo");
     if (payRelativeToNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in payRelativeToNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 payRelativeToIDRef = item.Attributes["id"].Name;
                 CommodityPayRelativeToEnum ob = CommodityPayRelativeToEnum();
                 IDManager.SetID(payRelativeToIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 payRelativeToIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payRelativeTo = new CommodityPayRelativeToEnum(item);
             }
         }
     }
     
 
     XmlNodeList payRelativeToEventNodeList = xmlNode.SelectNodes("payRelativeToEvent");
     if (payRelativeToEventNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in payRelativeToEventNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 payRelativeToEventIDRef = item.Attributes["id"].Name;
                 CommodityPayRelativeToEvent ob = CommodityPayRelativeToEvent();
                 IDManager.SetID(payRelativeToEventIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 payRelativeToEventIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payRelativeToEvent = new CommodityPayRelativeToEvent(item);
             }
         }
     }
     
 
     XmlNodeList calculationPeriodsReferenceNodeList = xmlNode.SelectNodes("calculationPeriodsReference");
     if (calculationPeriodsReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodsReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodsReferenceIDRef = item.Attributes["id"].Name;
                 CalculationPeriodsReference ob = CalculationPeriodsReference();
                 IDManager.SetID(calculationPeriodsReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodsReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodsReference = new CalculationPeriodsReference(item);
             }
         }
     }
     
 
     XmlNodeList calculationPeriodsScheduleReferenceNodeList = xmlNode.SelectNodes("calculationPeriodsScheduleReference");
     if (calculationPeriodsScheduleReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodsScheduleReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodsScheduleReferenceIDRef = item.Attributes["id"].Name;
                 CalculationPeriodsScheduleReference ob = CalculationPeriodsScheduleReference();
                 IDManager.SetID(calculationPeriodsScheduleReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodsScheduleReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodsScheduleReference = new CalculationPeriodsScheduleReference(item);
             }
         }
     }
     
 
     XmlNodeList calculationPeriodsDatesReferenceNodeList = xmlNode.SelectNodes("calculationPeriodsDatesReference");
     if (calculationPeriodsDatesReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodsDatesReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodsDatesReferenceIDRef = item.Attributes["id"].Name;
                 CalculationPeriodsDatesReference ob = CalculationPeriodsDatesReference();
                 IDManager.SetID(calculationPeriodsDatesReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodsDatesReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodsDatesReference = new CalculationPeriodsDatesReference(item);
             }
         }
     }
     
 
     XmlNodeList paymentDaysOffsetNodeList = xmlNode.SelectNodes("paymentDaysOffset");
     if (paymentDaysOffsetNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentDaysOffsetNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentDaysOffsetIDRef = item.Attributes["id"].Name;
                 DateOffset ob = DateOffset();
                 IDManager.SetID(paymentDaysOffsetIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentDaysOffsetIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentDaysOffset = new DateOffset(item);
             }
         }
     }
     
 
     XmlNodeList businessCentersReferenceNodeList = xmlNode.SelectNodes("businessCentersReference");
     if (businessCentersReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in businessCentersReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 businessCentersReferenceIDRef = item.Attributes["id"].Name;
                 BusinessCentersReference ob = BusinessCentersReference();
                 IDManager.SetID(businessCentersReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 businessCentersReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 businessCentersReference = new BusinessCentersReference(item);
             }
         }
     }
     
 
     XmlNodeList businessCentersNodeList = xmlNode.SelectNodes("businessCenters");
     if (businessCentersNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in businessCentersNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 businessCentersIDRef = item.Attributes["id"].Name;
                 BusinessCenters ob = BusinessCenters();
                 IDManager.SetID(businessCentersIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 businessCentersIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 businessCenters = new BusinessCenters(item);
             }
         }
     }
     
 
 }
Exemplo n.º 9
0
        public CommodityRelativeExpirationDates(XmlNode xmlNode)
        {
            XmlNodeList expireRelativeToEventNodeList = xmlNode.SelectNodes("expireRelativeToEvent");

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

            foreach (XmlNode item in expireRelativeToEventNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        expireRelativeToEventIDRef = item.Attributes["id"].Name;
                        CommodityExpireRelativeToEvent ob = CommodityExpireRelativeToEvent();
                        IDManager.SetID(expireRelativeToEventIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        expireRelativeToEventIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        expireRelativeToEvent = new CommodityExpireRelativeToEvent(item);
                    }
                }
            }


            XmlNodeList expirationDateOffsetNodeList = xmlNode.SelectNodes("expirationDateOffset");

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

            foreach (XmlNode item in expirationDateOffsetNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        expirationDateOffsetIDRef = item.Attributes["id"].Name;
                        DateOffset ob = DateOffset();
                        IDManager.SetID(expirationDateOffsetIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        expirationDateOffsetIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        expirationDateOffset = new DateOffset(item);
                    }
                }
            }


            XmlNodeList businessCentersReferenceNodeList = xmlNode.SelectNodes("businessCentersReference");

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

            foreach (XmlNode item in businessCentersReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        businessCentersReferenceIDRef = item.Attributes["id"].Name;
                        BusinessCentersReference ob = BusinessCentersReference();
                        IDManager.SetID(businessCentersReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        businessCentersReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        businessCentersReference = new BusinessCentersReference(item);
                    }
                }
            }


            XmlNodeList businessCentersNodeList = xmlNode.SelectNodes("businessCenters");

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

            foreach (XmlNode item in businessCentersNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        businessCentersIDRef = item.Attributes["id"].Name;
                        BusinessCenters ob = BusinessCenters();
                        IDManager.SetID(businessCentersIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        businessCentersIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        businessCenters = new BusinessCenters(item);
                    }
                }
            }
        }
        public EnvironmentalPhysicalLeg(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode numberOfAllowancesNode = xmlNode.SelectSingleNode("numberOfAllowances");

            if (numberOfAllowancesNode != null)
            {
                if (numberOfAllowancesNode.Attributes["href"] != null || numberOfAllowancesNode.Attributes["id"] != null)
                {
                    if (numberOfAllowancesNode.Attributes["id"] != null)
                    {
                        numberOfAllowancesIDRef_ = numberOfAllowancesNode.Attributes["id"].Value;
                        UnitQuantity ob = new UnitQuantity(numberOfAllowancesNode);
                        IDManager.SetID(numberOfAllowancesIDRef_, ob);
                    }
                    else if (numberOfAllowancesNode.Attributes["href"] != null)
                    {
                        numberOfAllowancesIDRef_ = numberOfAllowancesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        numberOfAllowances_ = new UnitQuantity(numberOfAllowancesNode);
                    }
                }
                else
                {
                    numberOfAllowances_ = new UnitQuantity(numberOfAllowancesNode);
                }
            }


            XmlNode environmentalNode = xmlNode.SelectSingleNode("environmental");

            if (environmentalNode != null)
            {
                if (environmentalNode.Attributes["href"] != null || environmentalNode.Attributes["id"] != null)
                {
                    if (environmentalNode.Attributes["id"] != null)
                    {
                        environmentalIDRef_ = environmentalNode.Attributes["id"].Value;
                        EnvironmentalProduct ob = new EnvironmentalProduct(environmentalNode);
                        IDManager.SetID(environmentalIDRef_, ob);
                    }
                    else if (environmentalNode.Attributes["href"] != null)
                    {
                        environmentalIDRef_ = environmentalNode.Attributes["href"].Value;
                    }
                    else
                    {
                        environmental_ = new EnvironmentalProduct(environmentalNode);
                    }
                }
                else
                {
                    environmental_ = new EnvironmentalProduct(environmentalNode);
                }
            }


            XmlNode abandonmentOfSchemeNode = xmlNode.SelectSingleNode("abandonmentOfScheme");

            if (abandonmentOfSchemeNode != null)
            {
                if (abandonmentOfSchemeNode.Attributes["href"] != null || abandonmentOfSchemeNode.Attributes["id"] != null)
                {
                    if (abandonmentOfSchemeNode.Attributes["id"] != null)
                    {
                        abandonmentOfSchemeIDRef_ = abandonmentOfSchemeNode.Attributes["id"].Value;
                        EnvironmentalAbandonmentOfSchemeEnum ob = new EnvironmentalAbandonmentOfSchemeEnum(abandonmentOfSchemeNode);
                        IDManager.SetID(abandonmentOfSchemeIDRef_, ob);
                    }
                    else if (abandonmentOfSchemeNode.Attributes["href"] != null)
                    {
                        abandonmentOfSchemeIDRef_ = abandonmentOfSchemeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        abandonmentOfScheme_ = new EnvironmentalAbandonmentOfSchemeEnum(abandonmentOfSchemeNode);
                    }
                }
                else
                {
                    abandonmentOfScheme_ = new EnvironmentalAbandonmentOfSchemeEnum(abandonmentOfSchemeNode);
                }
            }


            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;
                        AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(deliveryDateNode);
                        IDManager.SetID(deliveryDateIDRef_, ob);
                    }
                    else if (deliveryDateNode.Attributes["href"] != null)
                    {
                        deliveryDateIDRef_ = deliveryDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliveryDate_ = new AdjustableOrRelativeDate(deliveryDateNode);
                    }
                }
                else
                {
                    deliveryDate_ = new AdjustableOrRelativeDate(deliveryDateNode);
                }
            }


            XmlNode paymentDateNode = xmlNode.SelectSingleNode("paymentDate");

            if (paymentDateNode != null)
            {
                if (paymentDateNode.Attributes["href"] != null || paymentDateNode.Attributes["id"] != null)
                {
                    if (paymentDateNode.Attributes["id"] != null)
                    {
                        paymentDateIDRef_ = paymentDateNode.Attributes["id"].Value;
                        DateOffset ob = new DateOffset(paymentDateNode);
                        IDManager.SetID(paymentDateIDRef_, ob);
                    }
                    else if (paymentDateNode.Attributes["href"] != null)
                    {
                        paymentDateIDRef_ = paymentDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        paymentDate_ = new DateOffset(paymentDateNode);
                    }
                }
                else
                {
                    paymentDate_ = new DateOffset(paymentDateNode);
                }
            }


            XmlNode businessCentersReferenceNode = xmlNode.SelectSingleNode("businessCentersReference");

            if (businessCentersReferenceNode != null)
            {
                if (businessCentersReferenceNode.Attributes["href"] != null || businessCentersReferenceNode.Attributes["id"] != null)
                {
                    if (businessCentersReferenceNode.Attributes["id"] != null)
                    {
                        businessCentersReferenceIDRef_ = businessCentersReferenceNode.Attributes["id"].Value;
                        BusinessCentersReference ob = new BusinessCentersReference(businessCentersReferenceNode);
                        IDManager.SetID(businessCentersReferenceIDRef_, ob);
                    }
                    else if (businessCentersReferenceNode.Attributes["href"] != null)
                    {
                        businessCentersReferenceIDRef_ = businessCentersReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        businessCentersReference_ = new BusinessCentersReference(businessCentersReferenceNode);
                    }
                }
                else
                {
                    businessCentersReference_ = new BusinessCentersReference(businessCentersReferenceNode);
                }
            }


            XmlNode businessCentersNode = xmlNode.SelectSingleNode("businessCenters");

            if (businessCentersNode != null)
            {
                if (businessCentersNode.Attributes["href"] != null || businessCentersNode.Attributes["id"] != null)
                {
                    if (businessCentersNode.Attributes["id"] != null)
                    {
                        businessCentersIDRef_ = businessCentersNode.Attributes["id"].Value;
                        BusinessCenters ob = new BusinessCenters(businessCentersNode);
                        IDManager.SetID(businessCentersIDRef_, ob);
                    }
                    else if (businessCentersNode.Attributes["href"] != null)
                    {
                        businessCentersIDRef_ = businessCentersNode.Attributes["href"].Value;
                    }
                    else
                    {
                        businessCenters_ = new BusinessCenters(businessCentersNode);
                    }
                }
                else
                {
                    businessCenters_ = new BusinessCenters(businessCentersNode);
                }
            }


            XmlNode failureToDeliverApplicableNode = xmlNode.SelectSingleNode("failureToDeliverApplicable");

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


            XmlNode eEPParametersNode = xmlNode.SelectSingleNode("eEPParameters");

            if (eEPParametersNode != null)
            {
                if (eEPParametersNode.Attributes["href"] != null || eEPParametersNode.Attributes["id"] != null)
                {
                    if (eEPParametersNode.Attributes["id"] != null)
                    {
                        eEPParametersIDRef_ = eEPParametersNode.Attributes["id"].Value;
                        EEPParameters ob = new EEPParameters(eEPParametersNode);
                        IDManager.SetID(eEPParametersIDRef_, ob);
                    }
                    else if (eEPParametersNode.Attributes["href"] != null)
                    {
                        eEPParametersIDRef_ = eEPParametersNode.Attributes["href"].Value;
                    }
                    else
                    {
                        eEPParameters_ = new EEPParameters(eEPParametersNode);
                    }
                }
                else
                {
                    eEPParameters_ = new EEPParameters(eEPParametersNode);
                }
            }
        }
Exemplo n.º 11
0
        public CommodityRelativePaymentDates(XmlNode xmlNode)
        {
            XmlNode payRelativeToNode = xmlNode.SelectSingleNode("payRelativeTo");

            if (payRelativeToNode != null)
            {
                if (payRelativeToNode.Attributes["href"] != null || payRelativeToNode.Attributes["id"] != null)
                {
                    if (payRelativeToNode.Attributes["id"] != null)
                    {
                        payRelativeToIDRef_ = payRelativeToNode.Attributes["id"].Value;
                        CommodityPayRelativeToEnum ob = new CommodityPayRelativeToEnum(payRelativeToNode);
                        IDManager.SetID(payRelativeToIDRef_, ob);
                    }
                    else if (payRelativeToNode.Attributes["href"] != null)
                    {
                        payRelativeToIDRef_ = payRelativeToNode.Attributes["href"].Value;
                    }
                    else
                    {
                        payRelativeTo_ = new CommodityPayRelativeToEnum(payRelativeToNode);
                    }
                }
                else
                {
                    payRelativeTo_ = new CommodityPayRelativeToEnum(payRelativeToNode);
                }
            }


            XmlNode payRelativeToEventNode = xmlNode.SelectSingleNode("payRelativeToEvent");

            if (payRelativeToEventNode != null)
            {
                if (payRelativeToEventNode.Attributes["href"] != null || payRelativeToEventNode.Attributes["id"] != null)
                {
                    if (payRelativeToEventNode.Attributes["id"] != null)
                    {
                        payRelativeToEventIDRef_ = payRelativeToEventNode.Attributes["id"].Value;
                        CommodityPayRelativeToEvent ob = new CommodityPayRelativeToEvent(payRelativeToEventNode);
                        IDManager.SetID(payRelativeToEventIDRef_, ob);
                    }
                    else if (payRelativeToEventNode.Attributes["href"] != null)
                    {
                        payRelativeToEventIDRef_ = payRelativeToEventNode.Attributes["href"].Value;
                    }
                    else
                    {
                        payRelativeToEvent_ = new CommodityPayRelativeToEvent(payRelativeToEventNode);
                    }
                }
                else
                {
                    payRelativeToEvent_ = new CommodityPayRelativeToEvent(payRelativeToEventNode);
                }
            }


            XmlNode calculationPeriodsReferenceNode = xmlNode.SelectSingleNode("calculationPeriodsReference");

            if (calculationPeriodsReferenceNode != null)
            {
                if (calculationPeriodsReferenceNode.Attributes["href"] != null || calculationPeriodsReferenceNode.Attributes["id"] != null)
                {
                    if (calculationPeriodsReferenceNode.Attributes["id"] != null)
                    {
                        calculationPeriodsReferenceIDRef_ = calculationPeriodsReferenceNode.Attributes["id"].Value;
                        CalculationPeriodsReference ob = new CalculationPeriodsReference(calculationPeriodsReferenceNode);
                        IDManager.SetID(calculationPeriodsReferenceIDRef_, ob);
                    }
                    else if (calculationPeriodsReferenceNode.Attributes["href"] != null)
                    {
                        calculationPeriodsReferenceIDRef_ = calculationPeriodsReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodsReference_ = new CalculationPeriodsReference(calculationPeriodsReferenceNode);
                    }
                }
                else
                {
                    calculationPeriodsReference_ = new CalculationPeriodsReference(calculationPeriodsReferenceNode);
                }
            }


            XmlNode calculationPeriodsScheduleReferenceNode = xmlNode.SelectSingleNode("calculationPeriodsScheduleReference");

            if (calculationPeriodsScheduleReferenceNode != null)
            {
                if (calculationPeriodsScheduleReferenceNode.Attributes["href"] != null || calculationPeriodsScheduleReferenceNode.Attributes["id"] != null)
                {
                    if (calculationPeriodsScheduleReferenceNode.Attributes["id"] != null)
                    {
                        calculationPeriodsScheduleReferenceIDRef_ = calculationPeriodsScheduleReferenceNode.Attributes["id"].Value;
                        CalculationPeriodsScheduleReference ob = new CalculationPeriodsScheduleReference(calculationPeriodsScheduleReferenceNode);
                        IDManager.SetID(calculationPeriodsScheduleReferenceIDRef_, ob);
                    }
                    else if (calculationPeriodsScheduleReferenceNode.Attributes["href"] != null)
                    {
                        calculationPeriodsScheduleReferenceIDRef_ = calculationPeriodsScheduleReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodsScheduleReference_ = new CalculationPeriodsScheduleReference(calculationPeriodsScheduleReferenceNode);
                    }
                }
                else
                {
                    calculationPeriodsScheduleReference_ = new CalculationPeriodsScheduleReference(calculationPeriodsScheduleReferenceNode);
                }
            }


            XmlNode calculationPeriodsDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodsDatesReference");

            if (calculationPeriodsDatesReferenceNode != null)
            {
                if (calculationPeriodsDatesReferenceNode.Attributes["href"] != null || calculationPeriodsDatesReferenceNode.Attributes["id"] != null)
                {
                    if (calculationPeriodsDatesReferenceNode.Attributes["id"] != null)
                    {
                        calculationPeriodsDatesReferenceIDRef_ = calculationPeriodsDatesReferenceNode.Attributes["id"].Value;
                        CalculationPeriodsDatesReference ob = new CalculationPeriodsDatesReference(calculationPeriodsDatesReferenceNode);
                        IDManager.SetID(calculationPeriodsDatesReferenceIDRef_, ob);
                    }
                    else if (calculationPeriodsDatesReferenceNode.Attributes["href"] != null)
                    {
                        calculationPeriodsDatesReferenceIDRef_ = calculationPeriodsDatesReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodsDatesReference_ = new CalculationPeriodsDatesReference(calculationPeriodsDatesReferenceNode);
                    }
                }
                else
                {
                    calculationPeriodsDatesReference_ = new CalculationPeriodsDatesReference(calculationPeriodsDatesReferenceNode);
                }
            }


            XmlNode paymentDaysOffsetNode = xmlNode.SelectSingleNode("paymentDaysOffset");

            if (paymentDaysOffsetNode != null)
            {
                if (paymentDaysOffsetNode.Attributes["href"] != null || paymentDaysOffsetNode.Attributes["id"] != null)
                {
                    if (paymentDaysOffsetNode.Attributes["id"] != null)
                    {
                        paymentDaysOffsetIDRef_ = paymentDaysOffsetNode.Attributes["id"].Value;
                        DateOffset ob = new DateOffset(paymentDaysOffsetNode);
                        IDManager.SetID(paymentDaysOffsetIDRef_, ob);
                    }
                    else if (paymentDaysOffsetNode.Attributes["href"] != null)
                    {
                        paymentDaysOffsetIDRef_ = paymentDaysOffsetNode.Attributes["href"].Value;
                    }
                    else
                    {
                        paymentDaysOffset_ = new DateOffset(paymentDaysOffsetNode);
                    }
                }
                else
                {
                    paymentDaysOffset_ = new DateOffset(paymentDaysOffsetNode);
                }
            }


            XmlNode businessCentersReferenceNode = xmlNode.SelectSingleNode("businessCentersReference");

            if (businessCentersReferenceNode != null)
            {
                if (businessCentersReferenceNode.Attributes["href"] != null || businessCentersReferenceNode.Attributes["id"] != null)
                {
                    if (businessCentersReferenceNode.Attributes["id"] != null)
                    {
                        businessCentersReferenceIDRef_ = businessCentersReferenceNode.Attributes["id"].Value;
                        BusinessCentersReference ob = new BusinessCentersReference(businessCentersReferenceNode);
                        IDManager.SetID(businessCentersReferenceIDRef_, ob);
                    }
                    else if (businessCentersReferenceNode.Attributes["href"] != null)
                    {
                        businessCentersReferenceIDRef_ = businessCentersReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        businessCentersReference_ = new BusinessCentersReference(businessCentersReferenceNode);
                    }
                }
                else
                {
                    businessCentersReference_ = new BusinessCentersReference(businessCentersReferenceNode);
                }
            }


            XmlNode businessCentersNode = xmlNode.SelectSingleNode("businessCenters");

            if (businessCentersNode != null)
            {
                if (businessCentersNode.Attributes["href"] != null || businessCentersNode.Attributes["id"] != null)
                {
                    if (businessCentersNode.Attributes["id"] != null)
                    {
                        businessCentersIDRef_ = businessCentersNode.Attributes["id"].Value;
                        BusinessCenters ob = new BusinessCenters(businessCentersNode);
                        IDManager.SetID(businessCentersIDRef_, ob);
                    }
                    else if (businessCentersNode.Attributes["href"] != null)
                    {
                        businessCentersIDRef_ = businessCentersNode.Attributes["href"].Value;
                    }
                    else
                    {
                        businessCenters_ = new BusinessCenters(businessCentersNode);
                    }
                }
                else
                {
                    businessCenters_ = new BusinessCenters(businessCentersNode);
                }
            }
        }
 public CommodityRelativeExpirationDates(XmlNode xmlNode)
 {
     XmlNode expireRelativeToEventNode = xmlNode.SelectSingleNode("expireRelativeToEvent");
     
     if (expireRelativeToEventNode != null)
     {
         if (expireRelativeToEventNode.Attributes["href"] != null || expireRelativeToEventNode.Attributes["id"] != null) 
         {
             if (expireRelativeToEventNode.Attributes["id"] != null) 
             {
                 expireRelativeToEventIDRef_ = expireRelativeToEventNode.Attributes["id"].Value;
                 CommodityExpireRelativeToEvent ob = new CommodityExpireRelativeToEvent(expireRelativeToEventNode);
                 IDManager.SetID(expireRelativeToEventIDRef_, ob);
             }
             else if (expireRelativeToEventNode.Attributes["href"] != null)
             {
                 expireRelativeToEventIDRef_ = expireRelativeToEventNode.Attributes["href"].Value;
             }
             else
             {
                 expireRelativeToEvent_ = new CommodityExpireRelativeToEvent(expireRelativeToEventNode);
             }
         }
         else
         {
             expireRelativeToEvent_ = new CommodityExpireRelativeToEvent(expireRelativeToEventNode);
         }
     }
     
 
     XmlNode expirationDateOffsetNode = xmlNode.SelectSingleNode("expirationDateOffset");
     
     if (expirationDateOffsetNode != null)
     {
         if (expirationDateOffsetNode.Attributes["href"] != null || expirationDateOffsetNode.Attributes["id"] != null) 
         {
             if (expirationDateOffsetNode.Attributes["id"] != null) 
             {
                 expirationDateOffsetIDRef_ = expirationDateOffsetNode.Attributes["id"].Value;
                 DateOffset ob = new DateOffset(expirationDateOffsetNode);
                 IDManager.SetID(expirationDateOffsetIDRef_, ob);
             }
             else if (expirationDateOffsetNode.Attributes["href"] != null)
             {
                 expirationDateOffsetIDRef_ = expirationDateOffsetNode.Attributes["href"].Value;
             }
             else
             {
                 expirationDateOffset_ = new DateOffset(expirationDateOffsetNode);
             }
         }
         else
         {
             expirationDateOffset_ = new DateOffset(expirationDateOffsetNode);
         }
     }
     
 
     XmlNode businessCentersReferenceNode = xmlNode.SelectSingleNode("businessCentersReference");
     
     if (businessCentersReferenceNode != null)
     {
         if (businessCentersReferenceNode.Attributes["href"] != null || businessCentersReferenceNode.Attributes["id"] != null) 
         {
             if (businessCentersReferenceNode.Attributes["id"] != null) 
             {
                 businessCentersReferenceIDRef_ = businessCentersReferenceNode.Attributes["id"].Value;
                 BusinessCentersReference ob = new BusinessCentersReference(businessCentersReferenceNode);
                 IDManager.SetID(businessCentersReferenceIDRef_, ob);
             }
             else if (businessCentersReferenceNode.Attributes["href"] != null)
             {
                 businessCentersReferenceIDRef_ = businessCentersReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 businessCentersReference_ = new BusinessCentersReference(businessCentersReferenceNode);
             }
         }
         else
         {
             businessCentersReference_ = new BusinessCentersReference(businessCentersReferenceNode);
         }
     }
     
 
     XmlNode businessCentersNode = xmlNode.SelectSingleNode("businessCenters");
     
     if (businessCentersNode != null)
     {
         if (businessCentersNode.Attributes["href"] != null || businessCentersNode.Attributes["id"] != null) 
         {
             if (businessCentersNode.Attributes["id"] != null) 
             {
                 businessCentersIDRef_ = businessCentersNode.Attributes["id"].Value;
                 BusinessCenters ob = new BusinessCenters(businessCentersNode);
                 IDManager.SetID(businessCentersIDRef_, ob);
             }
             else if (businessCentersNode.Attributes["href"] != null)
             {
                 businessCentersIDRef_ = businessCentersNode.Attributes["href"].Value;
             }
             else
             {
                 businessCenters_ = new BusinessCenters(businessCentersNode);
             }
         }
         else
         {
             businessCenters_ = new BusinessCenters(businessCentersNode);
         }
     }
     
 
 }