public Monte(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode simulationNumNode = xmlNode.SelectSingleNode("simulationNum");
     
     if (simulationNumNode != null)
     {
         if (simulationNumNode.Attributes["href"] != null || simulationNumNode.Attributes["id"] != null) 
         {
             if (simulationNumNode.Attributes["id"] != null) 
             {
                 simulationNumIDRef_ = simulationNumNode.Attributes["id"].Value;
                 XsdTypeInteger ob = new XsdTypeInteger(simulationNumNode);
                 IDManager.SetID(simulationNumIDRef_, ob);
             }
             else if (simulationNumNode.Attributes["href"] != null)
             {
                 simulationNumIDRef_ = simulationNumNode.Attributes["href"].Value;
             }
             else
             {
                 simulationNum_ = new XsdTypeInteger(simulationNumNode);
             }
         }
         else
         {
             simulationNum_ = new XsdTypeInteger(simulationNumNode);
         }
     }
     
 
 }
Ejemplo n.º 2
0
        public Monte(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode simulationNumNode = xmlNode.SelectSingleNode("simulationNum");

            if (simulationNumNode != null)
            {
                if (simulationNumNode.Attributes["href"] != null || simulationNumNode.Attributes["id"] != null)
                {
                    if (simulationNumNode.Attributes["id"] != null)
                    {
                        simulationNumIDRef_ = simulationNumNode.Attributes["id"].Value;
                        XsdTypeInteger ob = new XsdTypeInteger(simulationNumNode);
                        IDManager.SetID(simulationNumIDRef_, ob);
                    }
                    else if (simulationNumNode.Attributes["href"] != null)
                    {
                        simulationNumIDRef_ = simulationNumNode.Attributes["href"].Value;
                    }
                    else
                    {
                        simulationNum_ = new XsdTypeInteger(simulationNumNode);
                    }
                }
                else
                {
                    simulationNum_ = new XsdTypeInteger(simulationNumNode);
                }
            }
        }
 public Tenor(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode periodMultiplierNode = xmlNode.SelectSingleNode("periodMultiplier");
     
     if (periodMultiplierNode != null)
     {
         if (periodMultiplierNode.Attributes["href"] != null || periodMultiplierNode.Attributes["id"] != null) 
         {
             if (periodMultiplierNode.Attributes["id"] != null) 
             {
                 periodMultiplierIDRef_ = periodMultiplierNode.Attributes["id"].Value;
                 XsdTypeInteger ob = new XsdTypeInteger(periodMultiplierNode);
                 IDManager.SetID(periodMultiplierIDRef_, ob);
             }
             else if (periodMultiplierNode.Attributes["href"] != null)
             {
                 periodMultiplierIDRef_ = periodMultiplierNode.Attributes["href"].Value;
             }
             else
             {
                 periodMultiplier_ = new XsdTypeInteger(periodMultiplierNode);
             }
         }
         else
         {
             periodMultiplier_ = new XsdTypeInteger(periodMultiplierNode);
         }
     }
     
 
     XmlNode periodNode = xmlNode.SelectSingleNode("period");
     
     if (periodNode != null)
     {
         if (periodNode.Attributes["href"] != null || periodNode.Attributes["id"] != null) 
         {
             if (periodNode.Attributes["id"] != null) 
             {
                 periodIDRef_ = periodNode.Attributes["id"].Value;
                 XsdTypeToken ob = new XsdTypeToken(periodNode);
                 IDManager.SetID(periodIDRef_, ob);
             }
             else if (periodNode.Attributes["href"] != null)
             {
                 periodIDRef_ = periodNode.Attributes["href"].Value;
             }
             else
             {
                 period_ = new XsdTypeToken(periodNode);
             }
         }
         else
         {
             period_ = new XsdTypeToken(periodNode);
         }
     }
     
 
 }
        public Period(XmlNode xmlNode)
        {
            XmlNodeList periodMultiplierNodeList = xmlNode.SelectNodes("periodMultiplier");

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

            foreach (XmlNode item in periodMultiplierNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        periodMultiplierIDRef = item.Attributes["id"].Name;
                        XsdTypeInteger ob = XsdTypeInteger();
                        IDManager.SetID(periodMultiplierIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        periodMultiplierIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        periodMultiplier = new XsdTypeInteger(item);
                    }
                }
            }


            XmlNodeList periodNodeList = xmlNode.SelectNodes("period");

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

            foreach (XmlNode item in periodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        periodIDRef = item.Attributes["id"].Name;
                        PeriodEnum ob = PeriodEnum();
                        IDManager.SetID(periodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        periodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        period = new PeriodEnum(item);
                    }
                }
            }
        }
        public Tenor(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode periodMultiplierNode = xmlNode.SelectSingleNode("periodMultiplier");

            if (periodMultiplierNode != null)
            {
                if (periodMultiplierNode.Attributes["href"] != null || periodMultiplierNode.Attributes["id"] != null)
                {
                    if (periodMultiplierNode.Attributes["id"] != null)
                    {
                        periodMultiplierIDRef_ = periodMultiplierNode.Attributes["id"].Value;
                        XsdTypeInteger ob = new XsdTypeInteger(periodMultiplierNode);
                        IDManager.SetID(periodMultiplierIDRef_, ob);
                    }
                    else if (periodMultiplierNode.Attributes["href"] != null)
                    {
                        periodMultiplierIDRef_ = periodMultiplierNode.Attributes["href"].Value;
                    }
                    else
                    {
                        periodMultiplier_ = new XsdTypeInteger(periodMultiplierNode);
                    }
                }
                else
                {
                    periodMultiplier_ = new XsdTypeInteger(periodMultiplierNode);
                }
            }


            XmlNode periodNode = xmlNode.SelectSingleNode("period");

            if (periodNode != null)
            {
                if (periodNode.Attributes["href"] != null || periodNode.Attributes["id"] != null)
                {
                    if (periodNode.Attributes["id"] != null)
                    {
                        periodIDRef_ = periodNode.Attributes["id"].Value;
                        XsdTypeToken ob = new XsdTypeToken(periodNode);
                        IDManager.SetID(periodIDRef_, ob);
                    }
                    else if (periodNode.Attributes["href"] != null)
                    {
                        periodIDRef_ = periodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        period_ = new XsdTypeToken(periodNode);
                    }
                }
                else
                {
                    period_ = new XsdTypeToken(periodNode);
                }
            }
        }
 public CorrelationInfo_para(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode dimensionNode = xmlNode.SelectSingleNode("dimension");
     
     if (dimensionNode != null)
     {
         if (dimensionNode.Attributes["href"] != null || dimensionNode.Attributes["id"] != null) 
         {
             if (dimensionNode.Attributes["id"] != null) 
             {
                 dimensionIDRef_ = dimensionNode.Attributes["id"].Value;
                 XsdTypeInteger ob = new XsdTypeInteger(dimensionNode);
                 IDManager.SetID(dimensionIDRef_, ob);
             }
             else if (dimensionNode.Attributes["href"] != null)
             {
                 dimensionIDRef_ = dimensionNode.Attributes["href"].Value;
             }
             else
             {
                 dimension_ = new XsdTypeInteger(dimensionNode);
             }
         }
         else
         {
             dimension_ = new XsdTypeInteger(dimensionNode);
         }
     }
     
 
     XmlNodeList correlation_paraNodeList = xmlNode.SelectNodes("correlation_para");
     
     if (correlation_paraNodeList != null)
     {
         this.correlation_para_ = new List<Correlation_para>();
         foreach (XmlNode item in correlation_paraNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     correlation_paraIDRef_ = item.Attributes["id"].Value;
                     correlation_para_.Add(new Correlation_para(item));
                     IDManager.SetID(correlation_paraIDRef_, correlation_para_[correlation_para_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     correlation_paraIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 correlation_para_.Add(new Correlation_para(item));
                 }
             }
             else
             {
                 correlation_para_.Add(new Correlation_para(item));
             }
         }
     }
     
 
 }
Ejemplo n.º 7
0
        public AutoCallConstReturnTrigger(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode dateOrderNode = xmlNode.SelectSingleNode("dateOrder");

            if (dateOrderNode != null)
            {
                if (dateOrderNode.Attributes["href"] != null || dateOrderNode.Attributes["id"] != null)
                {
                    if (dateOrderNode.Attributes["id"] != null)
                    {
                        dateOrderIDRef_ = dateOrderNode.Attributes["id"].Value;
                        XsdTypeInteger ob = new XsdTypeInteger(dateOrderNode);
                        IDManager.SetID(dateOrderIDRef_, ob);
                    }
                    else if (dateOrderNode.Attributes["href"] != null)
                    {
                        dateOrderIDRef_ = dateOrderNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dateOrder_ = new XsdTypeInteger(dateOrderNode);
                    }
                }
                else
                {
                    dateOrder_ = new XsdTypeInteger(dateOrderNode);
                }
            }


            XmlNode fixingDateInfoNode = xmlNode.SelectSingleNode("fixingDateInfo");

            if (fixingDateInfoNode != null)
            {
                if (fixingDateInfoNode.Attributes["href"] != null || fixingDateInfoNode.Attributes["id"] != null)
                {
                    if (fixingDateInfoNode.Attributes["id"] != null)
                    {
                        fixingDateInfoIDRef_ = fixingDateInfoNode.Attributes["id"].Value;
                        FixingDateInfo ob = new FixingDateInfo(fixingDateInfoNode);
                        IDManager.SetID(fixingDateInfoIDRef_, ob);
                    }
                    else if (fixingDateInfoNode.Attributes["href"] != null)
                    {
                        fixingDateInfoIDRef_ = fixingDateInfoNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fixingDateInfo_ = new FixingDateInfo(fixingDateInfoNode);
                    }
                }
                else
                {
                    fixingDateInfo_ = new FixingDateInfo(fixingDateInfoNode);
                }
            }


            XmlNode payoffDateInfoNode = xmlNode.SelectSingleNode("payoffDateInfo");

            if (payoffDateInfoNode != null)
            {
                if (payoffDateInfoNode.Attributes["href"] != null || payoffDateInfoNode.Attributes["id"] != null)
                {
                    if (payoffDateInfoNode.Attributes["id"] != null)
                    {
                        payoffDateInfoIDRef_ = payoffDateInfoNode.Attributes["id"].Value;
                        PayoffDateInfo ob = new PayoffDateInfo(payoffDateInfoNode);
                        IDManager.SetID(payoffDateInfoIDRef_, ob);
                    }
                    else if (payoffDateInfoNode.Attributes["href"] != null)
                    {
                        payoffDateInfoIDRef_ = payoffDateInfoNode.Attributes["href"].Value;
                    }
                    else
                    {
                        payoffDateInfo_ = new PayoffDateInfo(payoffDateInfoNode);
                    }
                }
                else
                {
                    payoffDateInfo_ = new PayoffDateInfo(payoffDateInfoNode);
                }
            }


            XmlNode triggerNode = xmlNode.SelectSingleNode("trigger");

            if (triggerNode != null)
            {
                if (triggerNode.Attributes["href"] != null || triggerNode.Attributes["id"] != null)
                {
                    if (triggerNode.Attributes["id"] != null)
                    {
                        triggerIDRef_ = triggerNode.Attributes["id"].Value;
                        XsdTypeDouble ob = new XsdTypeDouble(triggerNode);
                        IDManager.SetID(triggerIDRef_, ob);
                    }
                    else if (triggerNode.Attributes["href"] != null)
                    {
                        triggerIDRef_ = triggerNode.Attributes["href"].Value;
                    }
                    else
                    {
                        trigger_ = new XsdTypeDouble(triggerNode);
                    }
                }
                else
                {
                    trigger_ = new XsdTypeDouble(triggerNode);
                }
            }


            XmlNode returnNode = xmlNode.SelectSingleNode("return");

            if (returnNode != null)
            {
                if (returnNode.Attributes["href"] != null || returnNode.Attributes["id"] != null)
                {
                    if (returnNode.Attributes["id"] != null)
                    {
                        returnIDRef_ = returnNode.Attributes["id"].Value;
                        XsdTypeDouble ob = new XsdTypeDouble(returnNode);
                        IDManager.SetID(returnIDRef_, ob);
                    }
                    else if (returnNode.Attributes["href"] != null)
                    {
                        returnIDRef_ = returnNode.Attributes["href"].Value;
                    }
                    else
                    {
                        return_ = new XsdTypeDouble(returnNode);
                    }
                }
                else
                {
                    return_ = new XsdTypeDouble(returnNode);
                }
            }


            XmlNode averageDaysNode = xmlNode.SelectSingleNode("averageDays");

            if (averageDaysNode != null)
            {
                if (averageDaysNode.Attributes["href"] != null || averageDaysNode.Attributes["id"] != null)
                {
                    if (averageDaysNode.Attributes["id"] != null)
                    {
                        averageDaysIDRef_ = averageDaysNode.Attributes["id"].Value;
                        XsdTypeInteger ob = new XsdTypeInteger(averageDaysNode);
                        IDManager.SetID(averageDaysIDRef_, ob);
                    }
                    else if (averageDaysNode.Attributes["href"] != null)
                    {
                        averageDaysIDRef_ = averageDaysNode.Attributes["href"].Value;
                    }
                    else
                    {
                        averageDays_ = new XsdTypeInteger(averageDaysNode);
                    }
                }
                else
                {
                    averageDays_ = new XsdTypeInteger(averageDaysNode);
                }
            }


            XmlNode isExpiredNode = xmlNode.SelectSingleNode("isExpired");

            if (isExpiredNode != null)
            {
                if (isExpiredNode.Attributes["href"] != null || isExpiredNode.Attributes["id"] != null)
                {
                    if (isExpiredNode.Attributes["id"] != null)
                    {
                        isExpiredIDRef_ = isExpiredNode.Attributes["id"].Value;
                        XsdTypeBoolean ob = new XsdTypeBoolean(isExpiredNode);
                        IDManager.SetID(isExpiredIDRef_, ob);
                    }
                    else if (isExpiredNode.Attributes["href"] != null)
                    {
                        isExpiredIDRef_ = isExpiredNode.Attributes["href"].Value;
                    }
                    else
                    {
                        isExpired_ = new XsdTypeBoolean(isExpiredNode);
                    }
                }
                else
                {
                    isExpired_ = new XsdTypeBoolean(isExpiredNode);
                }
            }
        }
 public AutoCallConstReturnTrigger(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode dateOrderNode = xmlNode.SelectSingleNode("dateOrder");
     
     if (dateOrderNode != null)
     {
         if (dateOrderNode.Attributes["href"] != null || dateOrderNode.Attributes["id"] != null) 
         {
             if (dateOrderNode.Attributes["id"] != null) 
             {
                 dateOrderIDRef_ = dateOrderNode.Attributes["id"].Value;
                 XsdTypeInteger ob = new XsdTypeInteger(dateOrderNode);
                 IDManager.SetID(dateOrderIDRef_, ob);
             }
             else if (dateOrderNode.Attributes["href"] != null)
             {
                 dateOrderIDRef_ = dateOrderNode.Attributes["href"].Value;
             }
             else
             {
                 dateOrder_ = new XsdTypeInteger(dateOrderNode);
             }
         }
         else
         {
             dateOrder_ = new XsdTypeInteger(dateOrderNode);
         }
     }
     
 
     XmlNode fixingDateInfoNode = xmlNode.SelectSingleNode("fixingDateInfo");
     
     if (fixingDateInfoNode != null)
     {
         if (fixingDateInfoNode.Attributes["href"] != null || fixingDateInfoNode.Attributes["id"] != null) 
         {
             if (fixingDateInfoNode.Attributes["id"] != null) 
             {
                 fixingDateInfoIDRef_ = fixingDateInfoNode.Attributes["id"].Value;
                 FixingDateInfo ob = new FixingDateInfo(fixingDateInfoNode);
                 IDManager.SetID(fixingDateInfoIDRef_, ob);
             }
             else if (fixingDateInfoNode.Attributes["href"] != null)
             {
                 fixingDateInfoIDRef_ = fixingDateInfoNode.Attributes["href"].Value;
             }
             else
             {
                 fixingDateInfo_ = new FixingDateInfo(fixingDateInfoNode);
             }
         }
         else
         {
             fixingDateInfo_ = new FixingDateInfo(fixingDateInfoNode);
         }
     }
     
 
     XmlNode payoffDateInfoNode = xmlNode.SelectSingleNode("payoffDateInfo");
     
     if (payoffDateInfoNode != null)
     {
         if (payoffDateInfoNode.Attributes["href"] != null || payoffDateInfoNode.Attributes["id"] != null) 
         {
             if (payoffDateInfoNode.Attributes["id"] != null) 
             {
                 payoffDateInfoIDRef_ = payoffDateInfoNode.Attributes["id"].Value;
                 PayoffDateInfo ob = new PayoffDateInfo(payoffDateInfoNode);
                 IDManager.SetID(payoffDateInfoIDRef_, ob);
             }
             else if (payoffDateInfoNode.Attributes["href"] != null)
             {
                 payoffDateInfoIDRef_ = payoffDateInfoNode.Attributes["href"].Value;
             }
             else
             {
                 payoffDateInfo_ = new PayoffDateInfo(payoffDateInfoNode);
             }
         }
         else
         {
             payoffDateInfo_ = new PayoffDateInfo(payoffDateInfoNode);
         }
     }
     
 
     XmlNode triggerNode = xmlNode.SelectSingleNode("trigger");
     
     if (triggerNode != null)
     {
         if (triggerNode.Attributes["href"] != null || triggerNode.Attributes["id"] != null) 
         {
             if (triggerNode.Attributes["id"] != null) 
             {
                 triggerIDRef_ = triggerNode.Attributes["id"].Value;
                 XsdTypeDouble ob = new XsdTypeDouble(triggerNode);
                 IDManager.SetID(triggerIDRef_, ob);
             }
             else if (triggerNode.Attributes["href"] != null)
             {
                 triggerIDRef_ = triggerNode.Attributes["href"].Value;
             }
             else
             {
                 trigger_ = new XsdTypeDouble(triggerNode);
             }
         }
         else
         {
             trigger_ = new XsdTypeDouble(triggerNode);
         }
     }
     
 
     XmlNode returnNode = xmlNode.SelectSingleNode("return");
     
     if (returnNode != null)
     {
         if (returnNode.Attributes["href"] != null || returnNode.Attributes["id"] != null) 
         {
             if (returnNode.Attributes["id"] != null) 
             {
                 returnIDRef_ = returnNode.Attributes["id"].Value;
                 XsdTypeDouble ob = new XsdTypeDouble(returnNode);
                 IDManager.SetID(returnIDRef_, ob);
             }
             else if (returnNode.Attributes["href"] != null)
             {
                 returnIDRef_ = returnNode.Attributes["href"].Value;
             }
             else
             {
                 return_ = new XsdTypeDouble(returnNode);
             }
         }
         else
         {
             return_ = new XsdTypeDouble(returnNode);
         }
     }
     
 
     XmlNode averageDaysNode = xmlNode.SelectSingleNode("averageDays");
     
     if (averageDaysNode != null)
     {
         if (averageDaysNode.Attributes["href"] != null || averageDaysNode.Attributes["id"] != null) 
         {
             if (averageDaysNode.Attributes["id"] != null) 
             {
                 averageDaysIDRef_ = averageDaysNode.Attributes["id"].Value;
                 XsdTypeInteger ob = new XsdTypeInteger(averageDaysNode);
                 IDManager.SetID(averageDaysIDRef_, ob);
             }
             else if (averageDaysNode.Attributes["href"] != null)
             {
                 averageDaysIDRef_ = averageDaysNode.Attributes["href"].Value;
             }
             else
             {
                 averageDays_ = new XsdTypeInteger(averageDaysNode);
             }
         }
         else
         {
             averageDays_ = new XsdTypeInteger(averageDaysNode);
         }
     }
     
 
     XmlNode isExpiredNode = xmlNode.SelectSingleNode("isExpired");
     
     if (isExpiredNode != null)
     {
         if (isExpiredNode.Attributes["href"] != null || isExpiredNode.Attributes["id"] != null) 
         {
             if (isExpiredNode.Attributes["id"] != null) 
             {
                 isExpiredIDRef_ = isExpiredNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(isExpiredNode);
                 IDManager.SetID(isExpiredIDRef_, ob);
             }
             else if (isExpiredNode.Attributes["href"] != null)
             {
                 isExpiredIDRef_ = isExpiredNode.Attributes["href"].Value;
             }
             else
             {
                 isExpired_ = new XsdTypeBoolean(isExpiredNode);
             }
         }
         else
         {
             isExpired_ = new XsdTypeBoolean(isExpiredNode);
         }
     }
     
 
 }
Ejemplo n.º 9
0
        public CommodityPricingDates(XmlNode xmlNode)
        {
            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 lagNode = xmlNode.SelectSingleNode("lag");

            if (lagNode != null)
            {
                if (lagNode.Attributes["href"] != null || lagNode.Attributes["id"] != null)
                {
                    if (lagNode.Attributes["id"] != null)
                    {
                        lagIDRef_ = lagNode.Attributes["id"].Value;
                        Lag ob = new Lag(lagNode);
                        IDManager.SetID(lagIDRef_, ob);
                    }
                    else if (lagNode.Attributes["href"] != null)
                    {
                        lagIDRef_ = lagNode.Attributes["href"].Value;
                    }
                    else
                    {
                        lag_ = new Lag(lagNode);
                    }
                }
                else
                {
                    lag_ = new Lag(lagNode);
                }
            }


            XmlNode dayTypeNode = xmlNode.SelectSingleNode("dayType");

            if (dayTypeNode != null)
            {
                if (dayTypeNode.Attributes["href"] != null || dayTypeNode.Attributes["id"] != null)
                {
                    if (dayTypeNode.Attributes["id"] != null)
                    {
                        dayTypeIDRef_ = dayTypeNode.Attributes["id"].Value;
                        CommodityDayTypeEnum ob = new CommodityDayTypeEnum(dayTypeNode);
                        IDManager.SetID(dayTypeIDRef_, ob);
                    }
                    else if (dayTypeNode.Attributes["href"] != null)
                    {
                        dayTypeIDRef_ = dayTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dayType_ = new CommodityDayTypeEnum(dayTypeNode);
                    }
                }
                else
                {
                    dayType_ = new CommodityDayTypeEnum(dayTypeNode);
                }
            }


            XmlNode dayDistributionNode = xmlNode.SelectSingleNode("dayDistribution");

            if (dayDistributionNode != null)
            {
                if (dayDistributionNode.Attributes["href"] != null || dayDistributionNode.Attributes["id"] != null)
                {
                    if (dayDistributionNode.Attributes["id"] != null)
                    {
                        dayDistributionIDRef_ = dayDistributionNode.Attributes["id"].Value;
                        CommodityFrequencyType ob = new CommodityFrequencyType(dayDistributionNode);
                        IDManager.SetID(dayDistributionIDRef_, ob);
                    }
                    else if (dayDistributionNode.Attributes["href"] != null)
                    {
                        dayDistributionIDRef_ = dayDistributionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dayDistribution_ = new CommodityFrequencyType(dayDistributionNode);
                    }
                }
                else
                {
                    dayDistribution_ = new CommodityFrequencyType(dayDistributionNode);
                }
            }


            XmlNode dayCountNode = xmlNode.SelectSingleNode("dayCount");

            if (dayCountNode != null)
            {
                if (dayCountNode.Attributes["href"] != null || dayCountNode.Attributes["id"] != null)
                {
                    if (dayCountNode.Attributes["id"] != null)
                    {
                        dayCountIDRef_ = dayCountNode.Attributes["id"].Value;
                        XsdTypePositiveInteger ob = new XsdTypePositiveInteger(dayCountNode);
                        IDManager.SetID(dayCountIDRef_, ob);
                    }
                    else if (dayCountNode.Attributes["href"] != null)
                    {
                        dayCountIDRef_ = dayCountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dayCount_ = new XsdTypePositiveInteger(dayCountNode);
                    }
                }
                else
                {
                    dayCount_ = new XsdTypePositiveInteger(dayCountNode);
                }
            }


            XmlNodeList dayOfWeekNodeList = xmlNode.SelectNodes("dayOfWeek");

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


            XmlNode dayNumberNode = xmlNode.SelectSingleNode("dayNumber");

            if (dayNumberNode != null)
            {
                if (dayNumberNode.Attributes["href"] != null || dayNumberNode.Attributes["id"] != null)
                {
                    if (dayNumberNode.Attributes["id"] != null)
                    {
                        dayNumberIDRef_ = dayNumberNode.Attributes["id"].Value;
                        XsdTypeInteger ob = new XsdTypeInteger(dayNumberNode);
                        IDManager.SetID(dayNumberIDRef_, ob);
                    }
                    else if (dayNumberNode.Attributes["href"] != null)
                    {
                        dayNumberIDRef_ = dayNumberNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dayNumber_ = new XsdTypeInteger(dayNumberNode);
                    }
                }
                else
                {
                    dayNumber_ = new XsdTypeInteger(dayNumberNode);
                }
            }


            XmlNode businessCalendarNode = xmlNode.SelectSingleNode("businessCalendar");

            if (businessCalendarNode != null)
            {
                if (businessCalendarNode.Attributes["href"] != null || businessCalendarNode.Attributes["id"] != null)
                {
                    if (businessCalendarNode.Attributes["id"] != null)
                    {
                        businessCalendarIDRef_ = businessCalendarNode.Attributes["id"].Value;
                        CommodityBusinessCalendar ob = new CommodityBusinessCalendar(businessCalendarNode);
                        IDManager.SetID(businessCalendarIDRef_, ob);
                    }
                    else if (businessCalendarNode.Attributes["href"] != null)
                    {
                        businessCalendarIDRef_ = businessCalendarNode.Attributes["href"].Value;
                    }
                    else
                    {
                        businessCalendar_ = new CommodityBusinessCalendar(businessCalendarNode);
                    }
                }
                else
                {
                    businessCalendar_ = new CommodityBusinessCalendar(businessCalendarNode);
                }
            }


            XmlNode calendarSourceNode = xmlNode.SelectSingleNode("calendarSource");

            if (calendarSourceNode != null)
            {
                if (calendarSourceNode.Attributes["href"] != null || calendarSourceNode.Attributes["id"] != null)
                {
                    if (calendarSourceNode.Attributes["id"] != null)
                    {
                        calendarSourceIDRef_ = calendarSourceNode.Attributes["id"].Value;
                        CalendarSourceEnum ob = new CalendarSourceEnum(calendarSourceNode);
                        IDManager.SetID(calendarSourceIDRef_, ob);
                    }
                    else if (calendarSourceNode.Attributes["href"] != null)
                    {
                        calendarSourceIDRef_ = calendarSourceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calendarSource_ = new CalendarSourceEnum(calendarSourceNode);
                    }
                }
                else
                {
                    calendarSource_ = new CalendarSourceEnum(calendarSourceNode);
                }
            }


            XmlNodeList settlementPeriodsNodeList = xmlNode.SelectNodes("settlementPeriods");

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


            XmlNodeList settlementPeriodsReferenceNodeList = xmlNode.SelectNodes("settlementPeriodsReference");

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


            XmlNodeList pricingDatesNodeList = xmlNode.SelectNodes("pricingDates");

            if (pricingDatesNodeList != null)
            {
                this.pricingDates_ = new List <AdjustableDates>();
                foreach (XmlNode item in pricingDatesNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            pricingDatesIDRef_ = item.Attributes["id"].Value;
                            pricingDates_.Add(new AdjustableDates(item));
                            IDManager.SetID(pricingDatesIDRef_, pricingDates_[pricingDates_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            pricingDatesIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            pricingDates_.Add(new AdjustableDates(item));
                        }
                    }
                    else
                    {
                        pricingDates_.Add(new AdjustableDates(item));
                    }
                }
            }
        }
        public CommodityPricingDates(XmlNode xmlNode)
        {
            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 lagNodeList = xmlNode.SelectNodes("lag");

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

            foreach (XmlNode item in lagNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        lagIDRef = item.Attributes["id"].Name;
                        Lag ob = Lag();
                        IDManager.SetID(lagIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        lagIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        lag = new Lag(item);
                    }
                }
            }


            XmlNodeList dayTypeNodeList = xmlNode.SelectNodes("dayType");

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

            foreach (XmlNode item in dayTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dayTypeIDRef = item.Attributes["id"].Name;
                        CommodityDayTypeEnum ob = CommodityDayTypeEnum();
                        IDManager.SetID(dayTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dayTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dayType = new CommodityDayTypeEnum(item);
                    }
                }
            }


            XmlNodeList dayDistributionNodeList = xmlNode.SelectNodes("dayDistribution");

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

            foreach (XmlNode item in dayDistributionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dayDistributionIDRef = item.Attributes["id"].Name;
                        CommodityFrequencyType ob = CommodityFrequencyType();
                        IDManager.SetID(dayDistributionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dayDistributionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dayDistribution = new CommodityFrequencyType(item);
                    }
                }
            }


            XmlNodeList dayCountNodeList = xmlNode.SelectNodes("dayCount");

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

            foreach (XmlNode item in dayCountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dayCountIDRef = item.Attributes["id"].Name;
                        XsdTypePositiveInteger ob = XsdTypePositiveInteger();
                        IDManager.SetID(dayCountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dayCountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dayCount = new XsdTypePositiveInteger(item);
                    }
                }
            }


            XmlNodeList dayOfWeekNodeList = xmlNode.SelectNodes("dayOfWeek");

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


            XmlNodeList dayNumberNodeList = xmlNode.SelectNodes("dayNumber");

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

            foreach (XmlNode item in dayNumberNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dayNumberIDRef = item.Attributes["id"].Name;
                        XsdTypeInteger ob = XsdTypeInteger();
                        IDManager.SetID(dayNumberIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dayNumberIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dayNumber = new XsdTypeInteger(item);
                    }
                }
            }


            XmlNodeList businessCalendarNodeList = xmlNode.SelectNodes("businessCalendar");

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

            foreach (XmlNode item in businessCalendarNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        businessCalendarIDRef = item.Attributes["id"].Name;
                        CommodityBusinessCalendar ob = CommodityBusinessCalendar();
                        IDManager.SetID(businessCalendarIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        businessCalendarIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        businessCalendar = new CommodityBusinessCalendar(item);
                    }
                }
            }


            XmlNodeList calendarSourceNodeList = xmlNode.SelectNodes("calendarSource");

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

            foreach (XmlNode item in calendarSourceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calendarSourceIDRef = item.Attributes["id"].Name;
                        CalendarSourceEnum ob = CalendarSourceEnum();
                        IDManager.SetID(calendarSourceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calendarSourceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calendarSource = new CalendarSourceEnum(item);
                    }
                }
            }


            XmlNodeList settlementPeriodsNodeList = xmlNode.SelectNodes("settlementPeriods");

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


            XmlNodeList settlementPeriodsReferenceNodeList = xmlNode.SelectNodes("settlementPeriodsReference");

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


            XmlNodeList pricingDatesNodeList = xmlNode.SelectNodes("pricingDates");

            foreach (XmlNode item in pricingDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        pricingDatesIDRef = item.Attributes["id"].Name;
                        List <AdjustableDates> ob = new List <AdjustableDates>();
                        ob.Add(new AdjustableDates(item));
                        IDManager.SetID(pricingDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        pricingDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        pricingDates.Add(new AdjustableDates(item));
                    }
                }
            }
        }
        public CountEventCal(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode numNode = xmlNode.SelectSingleNode("num");

            if (numNode != null)
            {
                if (numNode.Attributes["href"] != null || numNode.Attributes["id"] != null)
                {
                    if (numNode.Attributes["id"] != null)
                    {
                        numIDRef_ = numNode.Attributes["id"].Value;
                        XsdTypeInteger ob = new XsdTypeInteger(numNode);
                        IDManager.SetID(numIDRef_, ob);
                    }
                    else if (numNode.Attributes["href"] != null)
                    {
                        numIDRef_ = numNode.Attributes["href"].Value;
                    }
                    else
                    {
                        num_ = new XsdTypeInteger(numNode);
                    }
                }
                else
                {
                    num_ = new XsdTypeInteger(numNode);
                }
            }


            XmlNode eventCalculationListNode = xmlNode.SelectSingleNode("eventCalculationList");

            if (eventCalculationListNode != null)
            {
                if (eventCalculationListNode.Attributes["href"] != null || eventCalculationListNode.Attributes["id"] != null)
                {
                    if (eventCalculationListNode.Attributes["id"] != null)
                    {
                        eventCalculationListIDRef_ = eventCalculationListNode.Attributes["id"].Value;
                        EventCalculationList ob = new EventCalculationList(eventCalculationListNode);
                        IDManager.SetID(eventCalculationListIDRef_, ob);
                    }
                    else if (eventCalculationListNode.Attributes["href"] != null)
                    {
                        eventCalculationListIDRef_ = eventCalculationListNode.Attributes["href"].Value;
                    }
                    else
                    {
                        eventCalculationList_ = new EventCalculationList(eventCalculationListNode);
                    }
                }
                else
                {
                    eventCalculationList_ = new EventCalculationList(eventCalculationListNode);
                }
            }


            XmlNode complementNode = xmlNode.SelectSingleNode("complement");

            if (complementNode != null)
            {
                if (complementNode.Attributes["href"] != null || complementNode.Attributes["id"] != null)
                {
                    if (complementNode.Attributes["id"] != null)
                    {
                        complementIDRef_ = complementNode.Attributes["id"].Value;
                        XsdTypeBoolean ob = new XsdTypeBoolean(complementNode);
                        IDManager.SetID(complementIDRef_, ob);
                    }
                    else if (complementNode.Attributes["href"] != null)
                    {
                        complementIDRef_ = complementNode.Attributes["href"].Value;
                    }
                    else
                    {
                        complement_ = new XsdTypeBoolean(complementNode);
                    }
                }
                else
                {
                    complement_ = new XsdTypeBoolean(complementNode);
                }
            }
        }
 public CountEventCal(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode numNode = xmlNode.SelectSingleNode("num");
     
     if (numNode != null)
     {
         if (numNode.Attributes["href"] != null || numNode.Attributes["id"] != null) 
         {
             if (numNode.Attributes["id"] != null) 
             {
                 numIDRef_ = numNode.Attributes["id"].Value;
                 XsdTypeInteger ob = new XsdTypeInteger(numNode);
                 IDManager.SetID(numIDRef_, ob);
             }
             else if (numNode.Attributes["href"] != null)
             {
                 numIDRef_ = numNode.Attributes["href"].Value;
             }
             else
             {
                 num_ = new XsdTypeInteger(numNode);
             }
         }
         else
         {
             num_ = new XsdTypeInteger(numNode);
         }
     }
     
 
     XmlNode eventCalculationListNode = xmlNode.SelectSingleNode("eventCalculationList");
     
     if (eventCalculationListNode != null)
     {
         if (eventCalculationListNode.Attributes["href"] != null || eventCalculationListNode.Attributes["id"] != null) 
         {
             if (eventCalculationListNode.Attributes["id"] != null) 
             {
                 eventCalculationListIDRef_ = eventCalculationListNode.Attributes["id"].Value;
                 EventCalculationList ob = new EventCalculationList(eventCalculationListNode);
                 IDManager.SetID(eventCalculationListIDRef_, ob);
             }
             else if (eventCalculationListNode.Attributes["href"] != null)
             {
                 eventCalculationListIDRef_ = eventCalculationListNode.Attributes["href"].Value;
             }
             else
             {
                 eventCalculationList_ = new EventCalculationList(eventCalculationListNode);
             }
         }
         else
         {
             eventCalculationList_ = new EventCalculationList(eventCalculationListNode);
         }
     }
     
 
     XmlNode complementNode = xmlNode.SelectSingleNode("complement");
     
     if (complementNode != null)
     {
         if (complementNode.Attributes["href"] != null || complementNode.Attributes["id"] != null) 
         {
             if (complementNode.Attributes["id"] != null) 
             {
                 complementIDRef_ = complementNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(complementNode);
                 IDManager.SetID(complementIDRef_, ob);
             }
             else if (complementNode.Attributes["href"] != null)
             {
                 complementIDRef_ = complementNode.Attributes["href"].Value;
             }
             else
             {
                 complement_ = new XsdTypeBoolean(complementNode);
             }
         }
         else
         {
             complement_ = new XsdTypeBoolean(complementNode);
         }
     }
     
 
 }
Ejemplo n.º 13
0
        public CorrelationInfo_para(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode dimensionNode = xmlNode.SelectSingleNode("dimension");

            if (dimensionNode != null)
            {
                if (dimensionNode.Attributes["href"] != null || dimensionNode.Attributes["id"] != null)
                {
                    if (dimensionNode.Attributes["id"] != null)
                    {
                        dimensionIDRef_ = dimensionNode.Attributes["id"].Value;
                        XsdTypeInteger ob = new XsdTypeInteger(dimensionNode);
                        IDManager.SetID(dimensionIDRef_, ob);
                    }
                    else if (dimensionNode.Attributes["href"] != null)
                    {
                        dimensionIDRef_ = dimensionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dimension_ = new XsdTypeInteger(dimensionNode);
                    }
                }
                else
                {
                    dimension_ = new XsdTypeInteger(dimensionNode);
                }
            }


            XmlNodeList correlation_paraNodeList = xmlNode.SelectNodes("correlation_para");

            if (correlation_paraNodeList != null)
            {
                this.correlation_para_ = new List <Correlation_para>();
                foreach (XmlNode item in correlation_paraNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            correlation_paraIDRef_ = item.Attributes["id"].Value;
                            correlation_para_.Add(new Correlation_para(item));
                            IDManager.SetID(correlation_paraIDRef_, correlation_para_[correlation_para_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            correlation_paraIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            correlation_para_.Add(new Correlation_para(item));
                        }
                    }
                    else
                    {
                        correlation_para_.Add(new Correlation_para(item));
                    }
                }
            }
        }
        public CommodityFx(XmlNode xmlNode)
        {
            XmlNodeList primaryRateSourceNodeList = xmlNode.SelectNodes("primaryRateSource");

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

            foreach (XmlNode item in primaryRateSourceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        primaryRateSourceIDRef = item.Attributes["id"].Name;
                        InformationSource ob = InformationSource();
                        IDManager.SetID(primaryRateSourceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        primaryRateSourceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        primaryRateSource = new InformationSource(item);
                    }
                }
            }


            XmlNodeList secondaryRateSourceNodeList = xmlNode.SelectNodes("secondaryRateSource");

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

            foreach (XmlNode item in secondaryRateSourceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        secondaryRateSourceIDRef = item.Attributes["id"].Name;
                        InformationSource ob = InformationSource();
                        IDManager.SetID(secondaryRateSourceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        secondaryRateSourceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        secondaryRateSource = new InformationSource(item);
                    }
                }
            }


            XmlNodeList fxTypeNodeList = xmlNode.SelectNodes("fxType");

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

            foreach (XmlNode item in fxTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fxTypeIDRef = item.Attributes["id"].Name;
                        CommodityFxType ob = CommodityFxType();
                        IDManager.SetID(fxTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fxTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fxType = new CommodityFxType(item);
                    }
                }
            }


            XmlNodeList averagingMethodNodeList = xmlNode.SelectNodes("averagingMethod");

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

            foreach (XmlNode item in averagingMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        averagingMethodIDRef = item.Attributes["id"].Name;
                        AveragingMethodEnum ob = AveragingMethodEnum();
                        IDManager.SetID(averagingMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        averagingMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        averagingMethod = new AveragingMethodEnum(item);
                    }
                }
            }


            XmlNodeList fixingTimeNodeList = xmlNode.SelectNodes("fixingTime");

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

            foreach (XmlNode item in fixingTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fixingTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(fixingTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fixingTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fixingTime = new BusinessCenterTime(item);
                    }
                }
            }


            XmlNodeList fxObservationDatesNodeList = xmlNode.SelectNodes("fxObservationDates");

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


            XmlNodeList dayTypeNodeList = xmlNode.SelectNodes("dayType");

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

            foreach (XmlNode item in dayTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dayTypeIDRef = item.Attributes["id"].Name;
                        CommodityDayTypeEnum ob = CommodityDayTypeEnum();
                        IDManager.SetID(dayTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dayTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dayType = new CommodityDayTypeEnum(item);
                    }
                }
            }


            XmlNodeList dayDistributionNodeList = xmlNode.SelectNodes("dayDistribution");

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

            foreach (XmlNode item in dayDistributionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dayDistributionIDRef = item.Attributes["id"].Name;
                        CommodityFrequencyType ob = CommodityFrequencyType();
                        IDManager.SetID(dayDistributionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dayDistributionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dayDistribution = new CommodityFrequencyType(item);
                    }
                }
            }


            XmlNodeList dayCountNodeList = xmlNode.SelectNodes("dayCount");

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

            foreach (XmlNode item in dayCountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dayCountIDRef = item.Attributes["id"].Name;
                        XsdTypePositiveInteger ob = XsdTypePositiveInteger();
                        IDManager.SetID(dayCountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dayCountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dayCount = new XsdTypePositiveInteger(item);
                    }
                }
            }


            XmlNodeList dayOfWeekNodeList = xmlNode.SelectNodes("dayOfWeek");

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


            XmlNodeList dayNumberNodeList = xmlNode.SelectNodes("dayNumber");

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

            foreach (XmlNode item in dayNumberNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dayNumberIDRef = item.Attributes["id"].Name;
                        XsdTypeInteger ob = XsdTypeInteger();
                        IDManager.SetID(dayNumberIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dayNumberIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dayNumber = new XsdTypeInteger(item);
                    }
                }
            }


            XmlNodeList lagNodeList = xmlNode.SelectNodes("lag");

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

            foreach (XmlNode item in lagNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        lagIDRef = item.Attributes["id"].Name;
                        Lag ob = Lag();
                        IDManager.SetID(lagIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        lagIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        lag = new Lag(item);
                    }
                }
            }


            XmlNodeList lagReferenceNodeList = xmlNode.SelectNodes("lagReference");

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

            foreach (XmlNode item in lagReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        lagReferenceIDRef = item.Attributes["id"].Name;
                        LagReference ob = LagReference();
                        IDManager.SetID(lagReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        lagReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        lagReference = new LagReference(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);
                    }
                }
            }
        }
Ejemplo n.º 15
0
        public FixingDays(XmlNode xmlNode)
        {
            XmlNodeList daysNodeList = xmlNode.SelectNodes("days");

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

            foreach (XmlNode item in daysNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        daysIDRef = item.Attributes["id"].Name;
                        XsdTypeInteger ob = XsdTypeInteger();
                        IDManager.SetID(daysIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        daysIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        days = new XsdTypeInteger(item);
                    }
                }
            }


            XmlNodeList monthsNodeList = xmlNode.SelectNodes("months");

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

            foreach (XmlNode item in monthsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        monthsIDRef = item.Attributes["id"].Name;
                        XsdTypeInteger ob = XsdTypeInteger();
                        IDManager.SetID(monthsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        monthsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        months = new XsdTypeInteger(item);
                    }
                }
            }


            XmlNodeList yearsNodeList = xmlNode.SelectNodes("years");

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

            foreach (XmlNode item in yearsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        yearsIDRef = item.Attributes["id"].Name;
                        XsdTypeInteger ob = XsdTypeInteger();
                        IDManager.SetID(yearsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        yearsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        years = new XsdTypeInteger(item);
                    }
                }
            }
        }
 public CalculationPeriodFrequency(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode periodMultiplierNode = xmlNode.SelectSingleNode("periodMultiplier");
     
     if (periodMultiplierNode != null)
     {
         if (periodMultiplierNode.Attributes["href"] != null || periodMultiplierNode.Attributes["id"] != null) 
         {
             if (periodMultiplierNode.Attributes["id"] != null) 
             {
                 periodMultiplierIDRef_ = periodMultiplierNode.Attributes["id"].Value;
                 XsdTypeInteger ob = new XsdTypeInteger(periodMultiplierNode);
                 IDManager.SetID(periodMultiplierIDRef_, ob);
             }
             else if (periodMultiplierNode.Attributes["href"] != null)
             {
                 periodMultiplierIDRef_ = periodMultiplierNode.Attributes["href"].Value;
             }
             else
             {
                 periodMultiplier_ = new XsdTypeInteger(periodMultiplierNode);
             }
         }
         else
         {
             periodMultiplier_ = new XsdTypeInteger(periodMultiplierNode);
         }
     }
     
 
     XmlNode periodNode = xmlNode.SelectSingleNode("period");
     
     if (periodNode != null)
     {
         if (periodNode.Attributes["href"] != null || periodNode.Attributes["id"] != null) 
         {
             if (periodNode.Attributes["id"] != null) 
             {
                 periodIDRef_ = periodNode.Attributes["id"].Value;
                 XsdTypeToken ob = new XsdTypeToken(periodNode);
                 IDManager.SetID(periodIDRef_, ob);
             }
             else if (periodNode.Attributes["href"] != null)
             {
                 periodIDRef_ = periodNode.Attributes["href"].Value;
             }
             else
             {
                 period_ = new XsdTypeToken(periodNode);
             }
         }
         else
         {
             period_ = new XsdTypeToken(periodNode);
         }
     }
     
 
     XmlNode rollConventionNode = xmlNode.SelectSingleNode("rollConvention");
     
     if (rollConventionNode != null)
     {
         if (rollConventionNode.Attributes["href"] != null || rollConventionNode.Attributes["id"] != null) 
         {
             if (rollConventionNode.Attributes["id"] != null) 
             {
                 rollConventionIDRef_ = rollConventionNode.Attributes["id"].Value;
                 XsdTypeInteger ob = new XsdTypeInteger(rollConventionNode);
                 IDManager.SetID(rollConventionIDRef_, ob);
             }
             else if (rollConventionNode.Attributes["href"] != null)
             {
                 rollConventionIDRef_ = rollConventionNode.Attributes["href"].Value;
             }
             else
             {
                 rollConvention_ = new XsdTypeInteger(rollConventionNode);
             }
         }
         else
         {
             rollConvention_ = new XsdTypeInteger(rollConventionNode);
         }
     }
     
 
 }
Ejemplo n.º 17
0
        public SimpleRangeConstReturnTrigger(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode dateOrderNode = xmlNode.SelectSingleNode("dateOrder");

            if (dateOrderNode != null)
            {
                if (dateOrderNode.Attributes["href"] != null || dateOrderNode.Attributes["id"] != null)
                {
                    if (dateOrderNode.Attributes["id"] != null)
                    {
                        dateOrderIDRef_ = dateOrderNode.Attributes["id"].Value;
                        XsdTypeInteger ob = new XsdTypeInteger(dateOrderNode);
                        IDManager.SetID(dateOrderIDRef_, ob);
                    }
                    else if (dateOrderNode.Attributes["href"] != null)
                    {
                        dateOrderIDRef_ = dateOrderNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dateOrder_ = new XsdTypeInteger(dateOrderNode);
                    }
                }
                else
                {
                    dateOrder_ = new XsdTypeInteger(dateOrderNode);
                }
            }


            XmlNode simpleRangeEventCalNode = xmlNode.SelectSingleNode("simpleRangeEventCal");

            if (simpleRangeEventCalNode != null)
            {
                if (simpleRangeEventCalNode.Attributes["href"] != null || simpleRangeEventCalNode.Attributes["id"] != null)
                {
                    if (simpleRangeEventCalNode.Attributes["id"] != null)
                    {
                        simpleRangeEventCalIDRef_ = simpleRangeEventCalNode.Attributes["id"].Value;
                        SimpleRangeEventCal ob = new SimpleRangeEventCal(simpleRangeEventCalNode);
                        IDManager.SetID(simpleRangeEventCalIDRef_, ob);
                    }
                    else if (simpleRangeEventCalNode.Attributes["href"] != null)
                    {
                        simpleRangeEventCalIDRef_ = simpleRangeEventCalNode.Attributes["href"].Value;
                    }
                    else
                    {
                        simpleRangeEventCal_ = new SimpleRangeEventCal(simpleRangeEventCalNode);
                    }
                }
                else
                {
                    simpleRangeEventCal_ = new SimpleRangeEventCal(simpleRangeEventCalNode);
                }
            }


            XmlNode payoffDateInfoNode = xmlNode.SelectSingleNode("payoffDateInfo");

            if (payoffDateInfoNode != null)
            {
                if (payoffDateInfoNode.Attributes["href"] != null || payoffDateInfoNode.Attributes["id"] != null)
                {
                    if (payoffDateInfoNode.Attributes["id"] != null)
                    {
                        payoffDateInfoIDRef_ = payoffDateInfoNode.Attributes["id"].Value;
                        PayoffDateInfo ob = new PayoffDateInfo(payoffDateInfoNode);
                        IDManager.SetID(payoffDateInfoIDRef_, ob);
                    }
                    else if (payoffDateInfoNode.Attributes["href"] != null)
                    {
                        payoffDateInfoIDRef_ = payoffDateInfoNode.Attributes["href"].Value;
                    }
                    else
                    {
                        payoffDateInfo_ = new PayoffDateInfo(payoffDateInfoNode);
                    }
                }
                else
                {
                    payoffDateInfo_ = new PayoffDateInfo(payoffDateInfoNode);
                }
            }


            XmlNode constReturnNode = xmlNode.SelectSingleNode("constReturn");

            if (constReturnNode != null)
            {
                if (constReturnNode.Attributes["href"] != null || constReturnNode.Attributes["id"] != null)
                {
                    if (constReturnNode.Attributes["id"] != null)
                    {
                        constReturnIDRef_ = constReturnNode.Attributes["id"].Value;
                        XsdTypeDouble ob = new XsdTypeDouble(constReturnNode);
                        IDManager.SetID(constReturnIDRef_, ob);
                    }
                    else if (constReturnNode.Attributes["href"] != null)
                    {
                        constReturnIDRef_ = constReturnNode.Attributes["href"].Value;
                    }
                    else
                    {
                        constReturn_ = new XsdTypeDouble(constReturnNode);
                    }
                }
                else
                {
                    constReturn_ = new XsdTypeDouble(constReturnNode);
                }
            }


            XmlNode averageDaysNode = xmlNode.SelectSingleNode("averageDays");

            if (averageDaysNode != null)
            {
                if (averageDaysNode.Attributes["href"] != null || averageDaysNode.Attributes["id"] != null)
                {
                    if (averageDaysNode.Attributes["id"] != null)
                    {
                        averageDaysIDRef_ = averageDaysNode.Attributes["id"].Value;
                        XsdTypeInteger ob = new XsdTypeInteger(averageDaysNode);
                        IDManager.SetID(averageDaysIDRef_, ob);
                    }
                    else if (averageDaysNode.Attributes["href"] != null)
                    {
                        averageDaysIDRef_ = averageDaysNode.Attributes["href"].Value;
                    }
                    else
                    {
                        averageDays_ = new XsdTypeInteger(averageDaysNode);
                    }
                }
                else
                {
                    averageDays_ = new XsdTypeInteger(averageDaysNode);
                }
            }


            XmlNode isExpiredNode = xmlNode.SelectSingleNode("isExpired");

            if (isExpiredNode != null)
            {
                if (isExpiredNode.Attributes["href"] != null || isExpiredNode.Attributes["id"] != null)
                {
                    if (isExpiredNode.Attributes["id"] != null)
                    {
                        isExpiredIDRef_ = isExpiredNode.Attributes["id"].Value;
                        XsdTypeBoolean ob = new XsdTypeBoolean(isExpiredNode);
                        IDManager.SetID(isExpiredIDRef_, ob);
                    }
                    else if (isExpiredNode.Attributes["href"] != null)
                    {
                        isExpiredIDRef_ = isExpiredNode.Attributes["href"].Value;
                    }
                    else
                    {
                        isExpired_ = new XsdTypeBoolean(isExpiredNode);
                    }
                }
                else
                {
                    isExpired_ = new XsdTypeBoolean(isExpiredNode);
                }
            }
        }
 public CommodityFx(XmlNode xmlNode)
 {
     XmlNode primaryRateSourceNode = xmlNode.SelectSingleNode("primaryRateSource");
     
     if (primaryRateSourceNode != null)
     {
         if (primaryRateSourceNode.Attributes["href"] != null || primaryRateSourceNode.Attributes["id"] != null) 
         {
             if (primaryRateSourceNode.Attributes["id"] != null) 
             {
                 primaryRateSourceIDRef_ = primaryRateSourceNode.Attributes["id"].Value;
                 InformationSource ob = new InformationSource(primaryRateSourceNode);
                 IDManager.SetID(primaryRateSourceIDRef_, ob);
             }
             else if (primaryRateSourceNode.Attributes["href"] != null)
             {
                 primaryRateSourceIDRef_ = primaryRateSourceNode.Attributes["href"].Value;
             }
             else
             {
                 primaryRateSource_ = new InformationSource(primaryRateSourceNode);
             }
         }
         else
         {
             primaryRateSource_ = new InformationSource(primaryRateSourceNode);
         }
     }
     
 
     XmlNode secondaryRateSourceNode = xmlNode.SelectSingleNode("secondaryRateSource");
     
     if (secondaryRateSourceNode != null)
     {
         if (secondaryRateSourceNode.Attributes["href"] != null || secondaryRateSourceNode.Attributes["id"] != null) 
         {
             if (secondaryRateSourceNode.Attributes["id"] != null) 
             {
                 secondaryRateSourceIDRef_ = secondaryRateSourceNode.Attributes["id"].Value;
                 InformationSource ob = new InformationSource(secondaryRateSourceNode);
                 IDManager.SetID(secondaryRateSourceIDRef_, ob);
             }
             else if (secondaryRateSourceNode.Attributes["href"] != null)
             {
                 secondaryRateSourceIDRef_ = secondaryRateSourceNode.Attributes["href"].Value;
             }
             else
             {
                 secondaryRateSource_ = new InformationSource(secondaryRateSourceNode);
             }
         }
         else
         {
             secondaryRateSource_ = new InformationSource(secondaryRateSourceNode);
         }
     }
     
 
     XmlNode fxTypeNode = xmlNode.SelectSingleNode("fxType");
     
     if (fxTypeNode != null)
     {
         if (fxTypeNode.Attributes["href"] != null || fxTypeNode.Attributes["id"] != null) 
         {
             if (fxTypeNode.Attributes["id"] != null) 
             {
                 fxTypeIDRef_ = fxTypeNode.Attributes["id"].Value;
                 CommodityFxType ob = new CommodityFxType(fxTypeNode);
                 IDManager.SetID(fxTypeIDRef_, ob);
             }
             else if (fxTypeNode.Attributes["href"] != null)
             {
                 fxTypeIDRef_ = fxTypeNode.Attributes["href"].Value;
             }
             else
             {
                 fxType_ = new CommodityFxType(fxTypeNode);
             }
         }
         else
         {
             fxType_ = new CommodityFxType(fxTypeNode);
         }
     }
     
 
     XmlNode averagingMethodNode = xmlNode.SelectSingleNode("averagingMethod");
     
     if (averagingMethodNode != null)
     {
         if (averagingMethodNode.Attributes["href"] != null || averagingMethodNode.Attributes["id"] != null) 
         {
             if (averagingMethodNode.Attributes["id"] != null) 
             {
                 averagingMethodIDRef_ = averagingMethodNode.Attributes["id"].Value;
                 AveragingMethodEnum ob = new AveragingMethodEnum(averagingMethodNode);
                 IDManager.SetID(averagingMethodIDRef_, ob);
             }
             else if (averagingMethodNode.Attributes["href"] != null)
             {
                 averagingMethodIDRef_ = averagingMethodNode.Attributes["href"].Value;
             }
             else
             {
                 averagingMethod_ = new AveragingMethodEnum(averagingMethodNode);
             }
         }
         else
         {
             averagingMethod_ = new AveragingMethodEnum(averagingMethodNode);
         }
     }
     
 
     XmlNode fixingTimeNode = xmlNode.SelectSingleNode("fixingTime");
     
     if (fixingTimeNode != null)
     {
         if (fixingTimeNode.Attributes["href"] != null || fixingTimeNode.Attributes["id"] != null) 
         {
             if (fixingTimeNode.Attributes["id"] != null) 
             {
                 fixingTimeIDRef_ = fixingTimeNode.Attributes["id"].Value;
                 BusinessCenterTime ob = new BusinessCenterTime(fixingTimeNode);
                 IDManager.SetID(fixingTimeIDRef_, ob);
             }
             else if (fixingTimeNode.Attributes["href"] != null)
             {
                 fixingTimeIDRef_ = fixingTimeNode.Attributes["href"].Value;
             }
             else
             {
                 fixingTime_ = new BusinessCenterTime(fixingTimeNode);
             }
         }
         else
         {
             fixingTime_ = new BusinessCenterTime(fixingTimeNode);
         }
     }
     
 
     XmlNodeList fxObservationDatesNodeList = xmlNode.SelectNodes("fxObservationDates");
     
     if (fxObservationDatesNodeList != null)
     {
         this.fxObservationDates_ = new List<AdjustableDates>();
         foreach (XmlNode item in fxObservationDatesNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     fxObservationDatesIDRef_ = item.Attributes["id"].Value;
                     fxObservationDates_.Add(new AdjustableDates(item));
                     IDManager.SetID(fxObservationDatesIDRef_, fxObservationDates_[fxObservationDates_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     fxObservationDatesIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 fxObservationDates_.Add(new AdjustableDates(item));
                 }
             }
             else
             {
                 fxObservationDates_.Add(new AdjustableDates(item));
             }
         }
     }
     
 
     XmlNode dayTypeNode = xmlNode.SelectSingleNode("dayType");
     
     if (dayTypeNode != null)
     {
         if (dayTypeNode.Attributes["href"] != null || dayTypeNode.Attributes["id"] != null) 
         {
             if (dayTypeNode.Attributes["id"] != null) 
             {
                 dayTypeIDRef_ = dayTypeNode.Attributes["id"].Value;
                 CommodityDayTypeEnum ob = new CommodityDayTypeEnum(dayTypeNode);
                 IDManager.SetID(dayTypeIDRef_, ob);
             }
             else if (dayTypeNode.Attributes["href"] != null)
             {
                 dayTypeIDRef_ = dayTypeNode.Attributes["href"].Value;
             }
             else
             {
                 dayType_ = new CommodityDayTypeEnum(dayTypeNode);
             }
         }
         else
         {
             dayType_ = new CommodityDayTypeEnum(dayTypeNode);
         }
     }
     
 
     XmlNode dayDistributionNode = xmlNode.SelectSingleNode("dayDistribution");
     
     if (dayDistributionNode != null)
     {
         if (dayDistributionNode.Attributes["href"] != null || dayDistributionNode.Attributes["id"] != null) 
         {
             if (dayDistributionNode.Attributes["id"] != null) 
             {
                 dayDistributionIDRef_ = dayDistributionNode.Attributes["id"].Value;
                 CommodityFrequencyType ob = new CommodityFrequencyType(dayDistributionNode);
                 IDManager.SetID(dayDistributionIDRef_, ob);
             }
             else if (dayDistributionNode.Attributes["href"] != null)
             {
                 dayDistributionIDRef_ = dayDistributionNode.Attributes["href"].Value;
             }
             else
             {
                 dayDistribution_ = new CommodityFrequencyType(dayDistributionNode);
             }
         }
         else
         {
             dayDistribution_ = new CommodityFrequencyType(dayDistributionNode);
         }
     }
     
 
     XmlNode dayCountNode = xmlNode.SelectSingleNode("dayCount");
     
     if (dayCountNode != null)
     {
         if (dayCountNode.Attributes["href"] != null || dayCountNode.Attributes["id"] != null) 
         {
             if (dayCountNode.Attributes["id"] != null) 
             {
                 dayCountIDRef_ = dayCountNode.Attributes["id"].Value;
                 XsdTypePositiveInteger ob = new XsdTypePositiveInteger(dayCountNode);
                 IDManager.SetID(dayCountIDRef_, ob);
             }
             else if (dayCountNode.Attributes["href"] != null)
             {
                 dayCountIDRef_ = dayCountNode.Attributes["href"].Value;
             }
             else
             {
                 dayCount_ = new XsdTypePositiveInteger(dayCountNode);
             }
         }
         else
         {
             dayCount_ = new XsdTypePositiveInteger(dayCountNode);
         }
     }
     
 
     XmlNodeList dayOfWeekNodeList = xmlNode.SelectNodes("dayOfWeek");
     
     if (dayOfWeekNodeList != null)
     {
         this.dayOfWeek_ = new List<DayOfWeekEnum>();
         foreach (XmlNode item in dayOfWeekNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     dayOfWeekIDRef_ = item.Attributes["id"].Value;
                     dayOfWeek_.Add(new DayOfWeekEnum(item));
                     IDManager.SetID(dayOfWeekIDRef_, dayOfWeek_[dayOfWeek_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     dayOfWeekIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 dayOfWeek_.Add(new DayOfWeekEnum(item));
                 }
             }
             else
             {
                 dayOfWeek_.Add(new DayOfWeekEnum(item));
             }
         }
     }
     
 
     XmlNode dayNumberNode = xmlNode.SelectSingleNode("dayNumber");
     
     if (dayNumberNode != null)
     {
         if (dayNumberNode.Attributes["href"] != null || dayNumberNode.Attributes["id"] != null) 
         {
             if (dayNumberNode.Attributes["id"] != null) 
             {
                 dayNumberIDRef_ = dayNumberNode.Attributes["id"].Value;
                 XsdTypeInteger ob = new XsdTypeInteger(dayNumberNode);
                 IDManager.SetID(dayNumberIDRef_, ob);
             }
             else if (dayNumberNode.Attributes["href"] != null)
             {
                 dayNumberIDRef_ = dayNumberNode.Attributes["href"].Value;
             }
             else
             {
                 dayNumber_ = new XsdTypeInteger(dayNumberNode);
             }
         }
         else
         {
             dayNumber_ = new XsdTypeInteger(dayNumberNode);
         }
     }
     
 
     XmlNode lagNode = xmlNode.SelectSingleNode("lag");
     
     if (lagNode != null)
     {
         if (lagNode.Attributes["href"] != null || lagNode.Attributes["id"] != null) 
         {
             if (lagNode.Attributes["id"] != null) 
             {
                 lagIDRef_ = lagNode.Attributes["id"].Value;
                 Lag ob = new Lag(lagNode);
                 IDManager.SetID(lagIDRef_, ob);
             }
             else if (lagNode.Attributes["href"] != null)
             {
                 lagIDRef_ = lagNode.Attributes["href"].Value;
             }
             else
             {
                 lag_ = new Lag(lagNode);
             }
         }
         else
         {
             lag_ = new Lag(lagNode);
         }
     }
     
 
     XmlNode lagReferenceNode = xmlNode.SelectSingleNode("lagReference");
     
     if (lagReferenceNode != null)
     {
         if (lagReferenceNode.Attributes["href"] != null || lagReferenceNode.Attributes["id"] != null) 
         {
             if (lagReferenceNode.Attributes["id"] != null) 
             {
                 lagReferenceIDRef_ = lagReferenceNode.Attributes["id"].Value;
                 LagReference ob = new LagReference(lagReferenceNode);
                 IDManager.SetID(lagReferenceIDRef_, ob);
             }
             else if (lagReferenceNode.Attributes["href"] != null)
             {
                 lagReferenceIDRef_ = lagReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 lagReference_ = new LagReference(lagReferenceNode);
             }
         }
         else
         {
             lagReference_ = new LagReference(lagReferenceNode);
         }
     }
     
 
     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);
         }
     }
     
 
 }
Ejemplo n.º 19
0
        public FixingDays(XmlNode xmlNode)
        {
            XmlNode daysNode = xmlNode.SelectSingleNode("days");

            if (daysNode != null)
            {
                if (daysNode.Attributes["href"] != null || daysNode.Attributes["id"] != null)
                {
                    if (daysNode.Attributes["id"] != null)
                    {
                        daysIDRef_ = daysNode.Attributes["id"].Value;
                        XsdTypeInteger ob = new XsdTypeInteger(daysNode);
                        IDManager.SetID(daysIDRef_, ob);
                    }
                    else if (daysNode.Attributes["href"] != null)
                    {
                        daysIDRef_ = daysNode.Attributes["href"].Value;
                    }
                    else
                    {
                        days_ = new XsdTypeInteger(daysNode);
                    }
                }
                else
                {
                    days_ = new XsdTypeInteger(daysNode);
                }
            }


            XmlNode monthsNode = xmlNode.SelectSingleNode("months");

            if (monthsNode != null)
            {
                if (monthsNode.Attributes["href"] != null || monthsNode.Attributes["id"] != null)
                {
                    if (monthsNode.Attributes["id"] != null)
                    {
                        monthsIDRef_ = monthsNode.Attributes["id"].Value;
                        XsdTypeInteger ob = new XsdTypeInteger(monthsNode);
                        IDManager.SetID(monthsIDRef_, ob);
                    }
                    else if (monthsNode.Attributes["href"] != null)
                    {
                        monthsIDRef_ = monthsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        months_ = new XsdTypeInteger(monthsNode);
                    }
                }
                else
                {
                    months_ = new XsdTypeInteger(monthsNode);
                }
            }


            XmlNode yearsNode = xmlNode.SelectSingleNode("years");

            if (yearsNode != null)
            {
                if (yearsNode.Attributes["href"] != null || yearsNode.Attributes["id"] != null)
                {
                    if (yearsNode.Attributes["id"] != null)
                    {
                        yearsIDRef_ = yearsNode.Attributes["id"].Value;
                        XsdTypeInteger ob = new XsdTypeInteger(yearsNode);
                        IDManager.SetID(yearsIDRef_, ob);
                    }
                    else if (yearsNode.Attributes["href"] != null)
                    {
                        yearsIDRef_ = yearsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        years_ = new XsdTypeInteger(yearsNode);
                    }
                }
                else
                {
                    years_ = new XsdTypeInteger(yearsNode);
                }
            }
        }
Ejemplo n.º 20
0
        public CommodityFx(XmlNode xmlNode)
        {
            XmlNode primaryRateSourceNode = xmlNode.SelectSingleNode("primaryRateSource");

            if (primaryRateSourceNode != null)
            {
                if (primaryRateSourceNode.Attributes["href"] != null || primaryRateSourceNode.Attributes["id"] != null)
                {
                    if (primaryRateSourceNode.Attributes["id"] != null)
                    {
                        primaryRateSourceIDRef_ = primaryRateSourceNode.Attributes["id"].Value;
                        InformationSource ob = new InformationSource(primaryRateSourceNode);
                        IDManager.SetID(primaryRateSourceIDRef_, ob);
                    }
                    else if (primaryRateSourceNode.Attributes["href"] != null)
                    {
                        primaryRateSourceIDRef_ = primaryRateSourceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        primaryRateSource_ = new InformationSource(primaryRateSourceNode);
                    }
                }
                else
                {
                    primaryRateSource_ = new InformationSource(primaryRateSourceNode);
                }
            }


            XmlNode secondaryRateSourceNode = xmlNode.SelectSingleNode("secondaryRateSource");

            if (secondaryRateSourceNode != null)
            {
                if (secondaryRateSourceNode.Attributes["href"] != null || secondaryRateSourceNode.Attributes["id"] != null)
                {
                    if (secondaryRateSourceNode.Attributes["id"] != null)
                    {
                        secondaryRateSourceIDRef_ = secondaryRateSourceNode.Attributes["id"].Value;
                        InformationSource ob = new InformationSource(secondaryRateSourceNode);
                        IDManager.SetID(secondaryRateSourceIDRef_, ob);
                    }
                    else if (secondaryRateSourceNode.Attributes["href"] != null)
                    {
                        secondaryRateSourceIDRef_ = secondaryRateSourceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        secondaryRateSource_ = new InformationSource(secondaryRateSourceNode);
                    }
                }
                else
                {
                    secondaryRateSource_ = new InformationSource(secondaryRateSourceNode);
                }
            }


            XmlNode fxTypeNode = xmlNode.SelectSingleNode("fxType");

            if (fxTypeNode != null)
            {
                if (fxTypeNode.Attributes["href"] != null || fxTypeNode.Attributes["id"] != null)
                {
                    if (fxTypeNode.Attributes["id"] != null)
                    {
                        fxTypeIDRef_ = fxTypeNode.Attributes["id"].Value;
                        CommodityFxType ob = new CommodityFxType(fxTypeNode);
                        IDManager.SetID(fxTypeIDRef_, ob);
                    }
                    else if (fxTypeNode.Attributes["href"] != null)
                    {
                        fxTypeIDRef_ = fxTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fxType_ = new CommodityFxType(fxTypeNode);
                    }
                }
                else
                {
                    fxType_ = new CommodityFxType(fxTypeNode);
                }
            }


            XmlNode averagingMethodNode = xmlNode.SelectSingleNode("averagingMethod");

            if (averagingMethodNode != null)
            {
                if (averagingMethodNode.Attributes["href"] != null || averagingMethodNode.Attributes["id"] != null)
                {
                    if (averagingMethodNode.Attributes["id"] != null)
                    {
                        averagingMethodIDRef_ = averagingMethodNode.Attributes["id"].Value;
                        AveragingMethodEnum ob = new AveragingMethodEnum(averagingMethodNode);
                        IDManager.SetID(averagingMethodIDRef_, ob);
                    }
                    else if (averagingMethodNode.Attributes["href"] != null)
                    {
                        averagingMethodIDRef_ = averagingMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        averagingMethod_ = new AveragingMethodEnum(averagingMethodNode);
                    }
                }
                else
                {
                    averagingMethod_ = new AveragingMethodEnum(averagingMethodNode);
                }
            }


            XmlNode fixingTimeNode = xmlNode.SelectSingleNode("fixingTime");

            if (fixingTimeNode != null)
            {
                if (fixingTimeNode.Attributes["href"] != null || fixingTimeNode.Attributes["id"] != null)
                {
                    if (fixingTimeNode.Attributes["id"] != null)
                    {
                        fixingTimeIDRef_ = fixingTimeNode.Attributes["id"].Value;
                        BusinessCenterTime ob = new BusinessCenterTime(fixingTimeNode);
                        IDManager.SetID(fixingTimeIDRef_, ob);
                    }
                    else if (fixingTimeNode.Attributes["href"] != null)
                    {
                        fixingTimeIDRef_ = fixingTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fixingTime_ = new BusinessCenterTime(fixingTimeNode);
                    }
                }
                else
                {
                    fixingTime_ = new BusinessCenterTime(fixingTimeNode);
                }
            }


            XmlNodeList fxObservationDatesNodeList = xmlNode.SelectNodes("fxObservationDates");

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


            XmlNode dayTypeNode = xmlNode.SelectSingleNode("dayType");

            if (dayTypeNode != null)
            {
                if (dayTypeNode.Attributes["href"] != null || dayTypeNode.Attributes["id"] != null)
                {
                    if (dayTypeNode.Attributes["id"] != null)
                    {
                        dayTypeIDRef_ = dayTypeNode.Attributes["id"].Value;
                        CommodityDayTypeEnum ob = new CommodityDayTypeEnum(dayTypeNode);
                        IDManager.SetID(dayTypeIDRef_, ob);
                    }
                    else if (dayTypeNode.Attributes["href"] != null)
                    {
                        dayTypeIDRef_ = dayTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dayType_ = new CommodityDayTypeEnum(dayTypeNode);
                    }
                }
                else
                {
                    dayType_ = new CommodityDayTypeEnum(dayTypeNode);
                }
            }


            XmlNode dayDistributionNode = xmlNode.SelectSingleNode("dayDistribution");

            if (dayDistributionNode != null)
            {
                if (dayDistributionNode.Attributes["href"] != null || dayDistributionNode.Attributes["id"] != null)
                {
                    if (dayDistributionNode.Attributes["id"] != null)
                    {
                        dayDistributionIDRef_ = dayDistributionNode.Attributes["id"].Value;
                        CommodityFrequencyType ob = new CommodityFrequencyType(dayDistributionNode);
                        IDManager.SetID(dayDistributionIDRef_, ob);
                    }
                    else if (dayDistributionNode.Attributes["href"] != null)
                    {
                        dayDistributionIDRef_ = dayDistributionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dayDistribution_ = new CommodityFrequencyType(dayDistributionNode);
                    }
                }
                else
                {
                    dayDistribution_ = new CommodityFrequencyType(dayDistributionNode);
                }
            }


            XmlNode dayCountNode = xmlNode.SelectSingleNode("dayCount");

            if (dayCountNode != null)
            {
                if (dayCountNode.Attributes["href"] != null || dayCountNode.Attributes["id"] != null)
                {
                    if (dayCountNode.Attributes["id"] != null)
                    {
                        dayCountIDRef_ = dayCountNode.Attributes["id"].Value;
                        XsdTypePositiveInteger ob = new XsdTypePositiveInteger(dayCountNode);
                        IDManager.SetID(dayCountIDRef_, ob);
                    }
                    else if (dayCountNode.Attributes["href"] != null)
                    {
                        dayCountIDRef_ = dayCountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dayCount_ = new XsdTypePositiveInteger(dayCountNode);
                    }
                }
                else
                {
                    dayCount_ = new XsdTypePositiveInteger(dayCountNode);
                }
            }


            XmlNodeList dayOfWeekNodeList = xmlNode.SelectNodes("dayOfWeek");

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


            XmlNode dayNumberNode = xmlNode.SelectSingleNode("dayNumber");

            if (dayNumberNode != null)
            {
                if (dayNumberNode.Attributes["href"] != null || dayNumberNode.Attributes["id"] != null)
                {
                    if (dayNumberNode.Attributes["id"] != null)
                    {
                        dayNumberIDRef_ = dayNumberNode.Attributes["id"].Value;
                        XsdTypeInteger ob = new XsdTypeInteger(dayNumberNode);
                        IDManager.SetID(dayNumberIDRef_, ob);
                    }
                    else if (dayNumberNode.Attributes["href"] != null)
                    {
                        dayNumberIDRef_ = dayNumberNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dayNumber_ = new XsdTypeInteger(dayNumberNode);
                    }
                }
                else
                {
                    dayNumber_ = new XsdTypeInteger(dayNumberNode);
                }
            }


            XmlNode lagNode = xmlNode.SelectSingleNode("lag");

            if (lagNode != null)
            {
                if (lagNode.Attributes["href"] != null || lagNode.Attributes["id"] != null)
                {
                    if (lagNode.Attributes["id"] != null)
                    {
                        lagIDRef_ = lagNode.Attributes["id"].Value;
                        Lag ob = new Lag(lagNode);
                        IDManager.SetID(lagIDRef_, ob);
                    }
                    else if (lagNode.Attributes["href"] != null)
                    {
                        lagIDRef_ = lagNode.Attributes["href"].Value;
                    }
                    else
                    {
                        lag_ = new Lag(lagNode);
                    }
                }
                else
                {
                    lag_ = new Lag(lagNode);
                }
            }


            XmlNode lagReferenceNode = xmlNode.SelectSingleNode("lagReference");

            if (lagReferenceNode != null)
            {
                if (lagReferenceNode.Attributes["href"] != null || lagReferenceNode.Attributes["id"] != null)
                {
                    if (lagReferenceNode.Attributes["id"] != null)
                    {
                        lagReferenceIDRef_ = lagReferenceNode.Attributes["id"].Value;
                        LagReference ob = new LagReference(lagReferenceNode);
                        IDManager.SetID(lagReferenceIDRef_, ob);
                    }
                    else if (lagReferenceNode.Attributes["href"] != null)
                    {
                        lagReferenceIDRef_ = lagReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        lagReference_ = new LagReference(lagReferenceNode);
                    }
                }
                else
                {
                    lagReference_ = new LagReference(lagReferenceNode);
                }
            }


            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);
                }
            }
        }
 public SimpleRangeConstReturnTrigger(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode dateOrderNode = xmlNode.SelectSingleNode("dateOrder");
     
     if (dateOrderNode != null)
     {
         if (dateOrderNode.Attributes["href"] != null || dateOrderNode.Attributes["id"] != null) 
         {
             if (dateOrderNode.Attributes["id"] != null) 
             {
                 dateOrderIDRef_ = dateOrderNode.Attributes["id"].Value;
                 XsdTypeInteger ob = new XsdTypeInteger(dateOrderNode);
                 IDManager.SetID(dateOrderIDRef_, ob);
             }
             else if (dateOrderNode.Attributes["href"] != null)
             {
                 dateOrderIDRef_ = dateOrderNode.Attributes["href"].Value;
             }
             else
             {
                 dateOrder_ = new XsdTypeInteger(dateOrderNode);
             }
         }
         else
         {
             dateOrder_ = new XsdTypeInteger(dateOrderNode);
         }
     }
     
 
     XmlNode simpleRangeEventCalNode = xmlNode.SelectSingleNode("simpleRangeEventCal");
     
     if (simpleRangeEventCalNode != null)
     {
         if (simpleRangeEventCalNode.Attributes["href"] != null || simpleRangeEventCalNode.Attributes["id"] != null) 
         {
             if (simpleRangeEventCalNode.Attributes["id"] != null) 
             {
                 simpleRangeEventCalIDRef_ = simpleRangeEventCalNode.Attributes["id"].Value;
                 SimpleRangeEventCal ob = new SimpleRangeEventCal(simpleRangeEventCalNode);
                 IDManager.SetID(simpleRangeEventCalIDRef_, ob);
             }
             else if (simpleRangeEventCalNode.Attributes["href"] != null)
             {
                 simpleRangeEventCalIDRef_ = simpleRangeEventCalNode.Attributes["href"].Value;
             }
             else
             {
                 simpleRangeEventCal_ = new SimpleRangeEventCal(simpleRangeEventCalNode);
             }
         }
         else
         {
             simpleRangeEventCal_ = new SimpleRangeEventCal(simpleRangeEventCalNode);
         }
     }
     
 
     XmlNode payoffDateInfoNode = xmlNode.SelectSingleNode("payoffDateInfo");
     
     if (payoffDateInfoNode != null)
     {
         if (payoffDateInfoNode.Attributes["href"] != null || payoffDateInfoNode.Attributes["id"] != null) 
         {
             if (payoffDateInfoNode.Attributes["id"] != null) 
             {
                 payoffDateInfoIDRef_ = payoffDateInfoNode.Attributes["id"].Value;
                 PayoffDateInfo ob = new PayoffDateInfo(payoffDateInfoNode);
                 IDManager.SetID(payoffDateInfoIDRef_, ob);
             }
             else if (payoffDateInfoNode.Attributes["href"] != null)
             {
                 payoffDateInfoIDRef_ = payoffDateInfoNode.Attributes["href"].Value;
             }
             else
             {
                 payoffDateInfo_ = new PayoffDateInfo(payoffDateInfoNode);
             }
         }
         else
         {
             payoffDateInfo_ = new PayoffDateInfo(payoffDateInfoNode);
         }
     }
     
 
     XmlNode constReturnNode = xmlNode.SelectSingleNode("constReturn");
     
     if (constReturnNode != null)
     {
         if (constReturnNode.Attributes["href"] != null || constReturnNode.Attributes["id"] != null) 
         {
             if (constReturnNode.Attributes["id"] != null) 
             {
                 constReturnIDRef_ = constReturnNode.Attributes["id"].Value;
                 XsdTypeDouble ob = new XsdTypeDouble(constReturnNode);
                 IDManager.SetID(constReturnIDRef_, ob);
             }
             else if (constReturnNode.Attributes["href"] != null)
             {
                 constReturnIDRef_ = constReturnNode.Attributes["href"].Value;
             }
             else
             {
                 constReturn_ = new XsdTypeDouble(constReturnNode);
             }
         }
         else
         {
             constReturn_ = new XsdTypeDouble(constReturnNode);
         }
     }
     
 
     XmlNode averageDaysNode = xmlNode.SelectSingleNode("averageDays");
     
     if (averageDaysNode != null)
     {
         if (averageDaysNode.Attributes["href"] != null || averageDaysNode.Attributes["id"] != null) 
         {
             if (averageDaysNode.Attributes["id"] != null) 
             {
                 averageDaysIDRef_ = averageDaysNode.Attributes["id"].Value;
                 XsdTypeInteger ob = new XsdTypeInteger(averageDaysNode);
                 IDManager.SetID(averageDaysIDRef_, ob);
             }
             else if (averageDaysNode.Attributes["href"] != null)
             {
                 averageDaysIDRef_ = averageDaysNode.Attributes["href"].Value;
             }
             else
             {
                 averageDays_ = new XsdTypeInteger(averageDaysNode);
             }
         }
         else
         {
             averageDays_ = new XsdTypeInteger(averageDaysNode);
         }
     }
     
 
     XmlNode isExpiredNode = xmlNode.SelectSingleNode("isExpired");
     
     if (isExpiredNode != null)
     {
         if (isExpiredNode.Attributes["href"] != null || isExpiredNode.Attributes["id"] != null) 
         {
             if (isExpiredNode.Attributes["id"] != null) 
             {
                 isExpiredIDRef_ = isExpiredNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(isExpiredNode);
                 IDManager.SetID(isExpiredIDRef_, ob);
             }
             else if (isExpiredNode.Attributes["href"] != null)
             {
                 isExpiredIDRef_ = isExpiredNode.Attributes["href"].Value;
             }
             else
             {
                 isExpired_ = new XsdTypeBoolean(isExpiredNode);
             }
         }
         else
         {
             isExpired_ = new XsdTypeBoolean(isExpiredNode);
         }
     }
     
 
 }
 public CommodityPricingDates(XmlNode xmlNode)
 {
     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 lagNode = xmlNode.SelectSingleNode("lag");
     
     if (lagNode != null)
     {
         if (lagNode.Attributes["href"] != null || lagNode.Attributes["id"] != null) 
         {
             if (lagNode.Attributes["id"] != null) 
             {
                 lagIDRef_ = lagNode.Attributes["id"].Value;
                 Lag ob = new Lag(lagNode);
                 IDManager.SetID(lagIDRef_, ob);
             }
             else if (lagNode.Attributes["href"] != null)
             {
                 lagIDRef_ = lagNode.Attributes["href"].Value;
             }
             else
             {
                 lag_ = new Lag(lagNode);
             }
         }
         else
         {
             lag_ = new Lag(lagNode);
         }
     }
     
 
     XmlNode dayTypeNode = xmlNode.SelectSingleNode("dayType");
     
     if (dayTypeNode != null)
     {
         if (dayTypeNode.Attributes["href"] != null || dayTypeNode.Attributes["id"] != null) 
         {
             if (dayTypeNode.Attributes["id"] != null) 
             {
                 dayTypeIDRef_ = dayTypeNode.Attributes["id"].Value;
                 CommodityDayTypeEnum ob = new CommodityDayTypeEnum(dayTypeNode);
                 IDManager.SetID(dayTypeIDRef_, ob);
             }
             else if (dayTypeNode.Attributes["href"] != null)
             {
                 dayTypeIDRef_ = dayTypeNode.Attributes["href"].Value;
             }
             else
             {
                 dayType_ = new CommodityDayTypeEnum(dayTypeNode);
             }
         }
         else
         {
             dayType_ = new CommodityDayTypeEnum(dayTypeNode);
         }
     }
     
 
     XmlNode dayDistributionNode = xmlNode.SelectSingleNode("dayDistribution");
     
     if (dayDistributionNode != null)
     {
         if (dayDistributionNode.Attributes["href"] != null || dayDistributionNode.Attributes["id"] != null) 
         {
             if (dayDistributionNode.Attributes["id"] != null) 
             {
                 dayDistributionIDRef_ = dayDistributionNode.Attributes["id"].Value;
                 CommodityFrequencyType ob = new CommodityFrequencyType(dayDistributionNode);
                 IDManager.SetID(dayDistributionIDRef_, ob);
             }
             else if (dayDistributionNode.Attributes["href"] != null)
             {
                 dayDistributionIDRef_ = dayDistributionNode.Attributes["href"].Value;
             }
             else
             {
                 dayDistribution_ = new CommodityFrequencyType(dayDistributionNode);
             }
         }
         else
         {
             dayDistribution_ = new CommodityFrequencyType(dayDistributionNode);
         }
     }
     
 
     XmlNode dayCountNode = xmlNode.SelectSingleNode("dayCount");
     
     if (dayCountNode != null)
     {
         if (dayCountNode.Attributes["href"] != null || dayCountNode.Attributes["id"] != null) 
         {
             if (dayCountNode.Attributes["id"] != null) 
             {
                 dayCountIDRef_ = dayCountNode.Attributes["id"].Value;
                 XsdTypePositiveInteger ob = new XsdTypePositiveInteger(dayCountNode);
                 IDManager.SetID(dayCountIDRef_, ob);
             }
             else if (dayCountNode.Attributes["href"] != null)
             {
                 dayCountIDRef_ = dayCountNode.Attributes["href"].Value;
             }
             else
             {
                 dayCount_ = new XsdTypePositiveInteger(dayCountNode);
             }
         }
         else
         {
             dayCount_ = new XsdTypePositiveInteger(dayCountNode);
         }
     }
     
 
     XmlNodeList dayOfWeekNodeList = xmlNode.SelectNodes("dayOfWeek");
     
     if (dayOfWeekNodeList != null)
     {
         this.dayOfWeek_ = new List<DayOfWeekEnum>();
         foreach (XmlNode item in dayOfWeekNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     dayOfWeekIDRef_ = item.Attributes["id"].Value;
                     dayOfWeek_.Add(new DayOfWeekEnum(item));
                     IDManager.SetID(dayOfWeekIDRef_, dayOfWeek_[dayOfWeek_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     dayOfWeekIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 dayOfWeek_.Add(new DayOfWeekEnum(item));
                 }
             }
             else
             {
                 dayOfWeek_.Add(new DayOfWeekEnum(item));
             }
         }
     }
     
 
     XmlNode dayNumberNode = xmlNode.SelectSingleNode("dayNumber");
     
     if (dayNumberNode != null)
     {
         if (dayNumberNode.Attributes["href"] != null || dayNumberNode.Attributes["id"] != null) 
         {
             if (dayNumberNode.Attributes["id"] != null) 
             {
                 dayNumberIDRef_ = dayNumberNode.Attributes["id"].Value;
                 XsdTypeInteger ob = new XsdTypeInteger(dayNumberNode);
                 IDManager.SetID(dayNumberIDRef_, ob);
             }
             else if (dayNumberNode.Attributes["href"] != null)
             {
                 dayNumberIDRef_ = dayNumberNode.Attributes["href"].Value;
             }
             else
             {
                 dayNumber_ = new XsdTypeInteger(dayNumberNode);
             }
         }
         else
         {
             dayNumber_ = new XsdTypeInteger(dayNumberNode);
         }
     }
     
 
     XmlNode businessCalendarNode = xmlNode.SelectSingleNode("businessCalendar");
     
     if (businessCalendarNode != null)
     {
         if (businessCalendarNode.Attributes["href"] != null || businessCalendarNode.Attributes["id"] != null) 
         {
             if (businessCalendarNode.Attributes["id"] != null) 
             {
                 businessCalendarIDRef_ = businessCalendarNode.Attributes["id"].Value;
                 CommodityBusinessCalendar ob = new CommodityBusinessCalendar(businessCalendarNode);
                 IDManager.SetID(businessCalendarIDRef_, ob);
             }
             else if (businessCalendarNode.Attributes["href"] != null)
             {
                 businessCalendarIDRef_ = businessCalendarNode.Attributes["href"].Value;
             }
             else
             {
                 businessCalendar_ = new CommodityBusinessCalendar(businessCalendarNode);
             }
         }
         else
         {
             businessCalendar_ = new CommodityBusinessCalendar(businessCalendarNode);
         }
     }
     
 
     XmlNode calendarSourceNode = xmlNode.SelectSingleNode("calendarSource");
     
     if (calendarSourceNode != null)
     {
         if (calendarSourceNode.Attributes["href"] != null || calendarSourceNode.Attributes["id"] != null) 
         {
             if (calendarSourceNode.Attributes["id"] != null) 
             {
                 calendarSourceIDRef_ = calendarSourceNode.Attributes["id"].Value;
                 CalendarSourceEnum ob = new CalendarSourceEnum(calendarSourceNode);
                 IDManager.SetID(calendarSourceIDRef_, ob);
             }
             else if (calendarSourceNode.Attributes["href"] != null)
             {
                 calendarSourceIDRef_ = calendarSourceNode.Attributes["href"].Value;
             }
             else
             {
                 calendarSource_ = new CalendarSourceEnum(calendarSourceNode);
             }
         }
         else
         {
             calendarSource_ = new CalendarSourceEnum(calendarSourceNode);
         }
     }
     
 
     XmlNodeList settlementPeriodsNodeList = xmlNode.SelectNodes("settlementPeriods");
     
     if (settlementPeriodsNodeList != null)
     {
         this.settlementPeriods_ = new List<SettlementPeriods>();
         foreach (XmlNode item in settlementPeriodsNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     settlementPeriodsIDRef_ = item.Attributes["id"].Value;
                     settlementPeriods_.Add(new SettlementPeriods(item));
                     IDManager.SetID(settlementPeriodsIDRef_, settlementPeriods_[settlementPeriods_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     settlementPeriodsIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 settlementPeriods_.Add(new SettlementPeriods(item));
                 }
             }
             else
             {
                 settlementPeriods_.Add(new SettlementPeriods(item));
             }
         }
     }
     
 
     XmlNodeList settlementPeriodsReferenceNodeList = xmlNode.SelectNodes("settlementPeriodsReference");
     
     if (settlementPeriodsReferenceNodeList != null)
     {
         this.settlementPeriodsReference_ = new List<SettlementPeriodsReference>();
         foreach (XmlNode item in settlementPeriodsReferenceNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     settlementPeriodsReferenceIDRef_ = item.Attributes["id"].Value;
                     settlementPeriodsReference_.Add(new SettlementPeriodsReference(item));
                     IDManager.SetID(settlementPeriodsReferenceIDRef_, settlementPeriodsReference_[settlementPeriodsReference_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     settlementPeriodsReferenceIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 settlementPeriodsReference_.Add(new SettlementPeriodsReference(item));
                 }
             }
             else
             {
                 settlementPeriodsReference_.Add(new SettlementPeriodsReference(item));
             }
         }
     }
     
 
     XmlNodeList pricingDatesNodeList = xmlNode.SelectNodes("pricingDates");
     
     if (pricingDatesNodeList != null)
     {
         this.pricingDates_ = new List<AdjustableDates>();
         foreach (XmlNode item in pricingDatesNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     pricingDatesIDRef_ = item.Attributes["id"].Value;
                     pricingDates_.Add(new AdjustableDates(item));
                     IDManager.SetID(pricingDatesIDRef_, pricingDates_[pricingDates_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     pricingDatesIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 pricingDates_.Add(new AdjustableDates(item));
                 }
             }
             else
             {
                 pricingDates_.Add(new AdjustableDates(item));
             }
         }
     }
     
 
 }
        public CalculationPeriodFrequency(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode periodMultiplierNode = xmlNode.SelectSingleNode("periodMultiplier");

            if (periodMultiplierNode != null)
            {
                if (periodMultiplierNode.Attributes["href"] != null || periodMultiplierNode.Attributes["id"] != null)
                {
                    if (periodMultiplierNode.Attributes["id"] != null)
                    {
                        periodMultiplierIDRef_ = periodMultiplierNode.Attributes["id"].Value;
                        XsdTypeInteger ob = new XsdTypeInteger(periodMultiplierNode);
                        IDManager.SetID(periodMultiplierIDRef_, ob);
                    }
                    else if (periodMultiplierNode.Attributes["href"] != null)
                    {
                        periodMultiplierIDRef_ = periodMultiplierNode.Attributes["href"].Value;
                    }
                    else
                    {
                        periodMultiplier_ = new XsdTypeInteger(periodMultiplierNode);
                    }
                }
                else
                {
                    periodMultiplier_ = new XsdTypeInteger(periodMultiplierNode);
                }
            }


            XmlNode periodNode = xmlNode.SelectSingleNode("period");

            if (periodNode != null)
            {
                if (periodNode.Attributes["href"] != null || periodNode.Attributes["id"] != null)
                {
                    if (periodNode.Attributes["id"] != null)
                    {
                        periodIDRef_ = periodNode.Attributes["id"].Value;
                        XsdTypeToken ob = new XsdTypeToken(periodNode);
                        IDManager.SetID(periodIDRef_, ob);
                    }
                    else if (periodNode.Attributes["href"] != null)
                    {
                        periodIDRef_ = periodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        period_ = new XsdTypeToken(periodNode);
                    }
                }
                else
                {
                    period_ = new XsdTypeToken(periodNode);
                }
            }


            XmlNode rollConventionNode = xmlNode.SelectSingleNode("rollConvention");

            if (rollConventionNode != null)
            {
                if (rollConventionNode.Attributes["href"] != null || rollConventionNode.Attributes["id"] != null)
                {
                    if (rollConventionNode.Attributes["id"] != null)
                    {
                        rollConventionIDRef_ = rollConventionNode.Attributes["id"].Value;
                        XsdTypeInteger ob = new XsdTypeInteger(rollConventionNode);
                        IDManager.SetID(rollConventionIDRef_, ob);
                    }
                    else if (rollConventionNode.Attributes["href"] != null)
                    {
                        rollConventionIDRef_ = rollConventionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        rollConvention_ = new XsdTypeInteger(rollConventionNode);
                    }
                }
                else
                {
                    rollConvention_ = new XsdTypeInteger(rollConventionNode);
                }
            }
        }
 public FixingDays(XmlNode xmlNode)
 {
     XmlNode daysNode = xmlNode.SelectSingleNode("days");
     
     if (daysNode != null)
     {
         if (daysNode.Attributes["href"] != null || daysNode.Attributes["id"] != null) 
         {
             if (daysNode.Attributes["id"] != null) 
             {
                 daysIDRef_ = daysNode.Attributes["id"].Value;
                 XsdTypeInteger ob = new XsdTypeInteger(daysNode);
                 IDManager.SetID(daysIDRef_, ob);
             }
             else if (daysNode.Attributes["href"] != null)
             {
                 daysIDRef_ = daysNode.Attributes["href"].Value;
             }
             else
             {
                 days_ = new XsdTypeInteger(daysNode);
             }
         }
         else
         {
             days_ = new XsdTypeInteger(daysNode);
         }
     }
     
 
     XmlNode monthsNode = xmlNode.SelectSingleNode("months");
     
     if (monthsNode != null)
     {
         if (monthsNode.Attributes["href"] != null || monthsNode.Attributes["id"] != null) 
         {
             if (monthsNode.Attributes["id"] != null) 
             {
                 monthsIDRef_ = monthsNode.Attributes["id"].Value;
                 XsdTypeInteger ob = new XsdTypeInteger(monthsNode);
                 IDManager.SetID(monthsIDRef_, ob);
             }
             else if (monthsNode.Attributes["href"] != null)
             {
                 monthsIDRef_ = monthsNode.Attributes["href"].Value;
             }
             else
             {
                 months_ = new XsdTypeInteger(monthsNode);
             }
         }
         else
         {
             months_ = new XsdTypeInteger(monthsNode);
         }
     }
     
 
     XmlNode yearsNode = xmlNode.SelectSingleNode("years");
     
     if (yearsNode != null)
     {
         if (yearsNode.Attributes["href"] != null || yearsNode.Attributes["id"] != null) 
         {
             if (yearsNode.Attributes["id"] != null) 
             {
                 yearsIDRef_ = yearsNode.Attributes["id"].Value;
                 XsdTypeInteger ob = new XsdTypeInteger(yearsNode);
                 IDManager.SetID(yearsIDRef_, ob);
             }
             else if (yearsNode.Attributes["href"] != null)
             {
                 yearsIDRef_ = yearsNode.Attributes["href"].Value;
             }
             else
             {
                 years_ = new XsdTypeInteger(yearsNode);
             }
         }
         else
         {
             years_ = new XsdTypeInteger(yearsNode);
         }
     }
     
 
 }