public StartingDate(XmlNode xmlNode)
 {
     XmlNode dateRelativeToNode = xmlNode.SelectSingleNode("dateRelativeTo");
     
     if (dateRelativeToNode != null)
     {
         if (dateRelativeToNode.Attributes["href"] != null || dateRelativeToNode.Attributes["id"] != null) 
         {
             if (dateRelativeToNode.Attributes["id"] != null) 
             {
                 dateRelativeToIDRef_ = dateRelativeToNode.Attributes["id"].Value;
                 DateReference ob = new DateReference(dateRelativeToNode);
                 IDManager.SetID(dateRelativeToIDRef_, ob);
             }
             else if (dateRelativeToNode.Attributes["href"] != null)
             {
                 dateRelativeToIDRef_ = dateRelativeToNode.Attributes["href"].Value;
             }
             else
             {
                 dateRelativeTo_ = new DateReference(dateRelativeToNode);
             }
         }
         else
         {
             dateRelativeTo_ = new DateReference(dateRelativeToNode);
         }
     }
     
 
     XmlNode adjustableDateNode = xmlNode.SelectSingleNode("adjustableDate");
     
     if (adjustableDateNode != null)
     {
         if (adjustableDateNode.Attributes["href"] != null || adjustableDateNode.Attributes["id"] != null) 
         {
             if (adjustableDateNode.Attributes["id"] != null) 
             {
                 adjustableDateIDRef_ = adjustableDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(adjustableDateNode);
                 IDManager.SetID(adjustableDateIDRef_, ob);
             }
             else if (adjustableDateNode.Attributes["href"] != null)
             {
                 adjustableDateIDRef_ = adjustableDateNode.Attributes["href"].Value;
             }
             else
             {
                 adjustableDate_ = new AdjustableDate(adjustableDateNode);
             }
         }
         else
         {
             adjustableDate_ = new AdjustableDate(adjustableDateNode);
         }
     }
     
 
 }
 public EquityOptionTermination(XmlNode xmlNode)
 {
     XmlNode settlementAmountPaymentDateNode = xmlNode.SelectSingleNode("settlementAmountPaymentDate");
     
     if (settlementAmountPaymentDateNode != null)
     {
         if (settlementAmountPaymentDateNode.Attributes["href"] != null || settlementAmountPaymentDateNode.Attributes["id"] != null) 
         {
             if (settlementAmountPaymentDateNode.Attributes["id"] != null) 
             {
                 settlementAmountPaymentDateIDRef_ = settlementAmountPaymentDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(settlementAmountPaymentDateNode);
                 IDManager.SetID(settlementAmountPaymentDateIDRef_, ob);
             }
             else if (settlementAmountPaymentDateNode.Attributes["href"] != null)
             {
                 settlementAmountPaymentDateIDRef_ = settlementAmountPaymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 settlementAmountPaymentDate_ = new AdjustableDate(settlementAmountPaymentDateNode);
             }
         }
         else
         {
             settlementAmountPaymentDate_ = new AdjustableDate(settlementAmountPaymentDateNode);
         }
     }
     
 
     XmlNode settlementAmountNode = xmlNode.SelectSingleNode("settlementAmount");
     
     if (settlementAmountNode != null)
     {
         if (settlementAmountNode.Attributes["href"] != null || settlementAmountNode.Attributes["id"] != null) 
         {
             if (settlementAmountNode.Attributes["id"] != null) 
             {
                 settlementAmountIDRef_ = settlementAmountNode.Attributes["id"].Value;
                 NonNegativeMoney ob = new NonNegativeMoney(settlementAmountNode);
                 IDManager.SetID(settlementAmountIDRef_, ob);
             }
             else if (settlementAmountNode.Attributes["href"] != null)
             {
                 settlementAmountIDRef_ = settlementAmountNode.Attributes["href"].Value;
             }
             else
             {
                 settlementAmount_ = new NonNegativeMoney(settlementAmountNode);
             }
         }
         else
         {
             settlementAmount_ = new NonNegativeMoney(settlementAmountNode);
         }
     }
     
 
 }
 public EquityOptionTermination(XmlNode xmlNode)
 {
     XmlNodeList settlementAmountPaymentDateNodeList = xmlNode.SelectNodes("settlementAmountPaymentDate");
     if (settlementAmountPaymentDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in settlementAmountPaymentDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 settlementAmountPaymentDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate ob = AdjustableDate();
                 IDManager.SetID(settlementAmountPaymentDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 settlementAmountPaymentDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 settlementAmountPaymentDate = new AdjustableDate(item);
             }
         }
     }
     
 
     XmlNodeList settlementAmountNodeList = xmlNode.SelectNodes("settlementAmount");
     if (settlementAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in settlementAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 settlementAmountIDRef = item.Attributes["id"].Name;
                 NonNegativeMoney ob = NonNegativeMoney();
                 IDManager.SetID(settlementAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 settlementAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 settlementAmount = new NonNegativeMoney(item);
             }
         }
     }
     
 
 }
 public StartingDate(XmlNode xmlNode)
 {
     XmlNodeList dateRelativeToNodeList = xmlNode.SelectNodes("dateRelativeTo");
     if (dateRelativeToNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in dateRelativeToNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 dateRelativeToIDRef = item.Attributes["id"].Name;
                 DateReference ob = DateReference();
                 IDManager.SetID(dateRelativeToIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 dateRelativeToIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 dateRelativeTo = new DateReference(item);
             }
         }
     }
     
 
     XmlNodeList adjustableDateNodeList = xmlNode.SelectNodes("adjustableDate");
     if (adjustableDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in adjustableDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 adjustableDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate ob = AdjustableDate();
                 IDManager.SetID(adjustableDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 adjustableDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 adjustableDate = new AdjustableDate(item);
             }
         }
     }
     
 
 }
 public AdjustableOrRelativeDate(XmlNode xmlNode)
 {
     XmlNodeList adjustableDateNodeList = xmlNode.SelectNodes("adjustableDate");
     if (adjustableDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in adjustableDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 adjustableDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate ob = AdjustableDate();
                 IDManager.SetID(adjustableDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 adjustableDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 adjustableDate = new AdjustableDate(item);
             }
         }
     }
     
 
     XmlNodeList relativeDateNodeList = xmlNode.SelectNodes("relativeDate");
     if (relativeDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in relativeDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 relativeDateIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(relativeDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 relativeDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 relativeDate = new RelativeDateOffset(item);
             }
         }
     }
     
 
 }
 public AdjustableOrRelativeDate(XmlNode xmlNode)
 {
     XmlNode adjustableDateNode = xmlNode.SelectSingleNode("adjustableDate");
     
     if (adjustableDateNode != null)
     {
         if (adjustableDateNode.Attributes["href"] != null || adjustableDateNode.Attributes["id"] != null) 
         {
             if (adjustableDateNode.Attributes["id"] != null) 
             {
                 adjustableDateIDRef_ = adjustableDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(adjustableDateNode);
                 IDManager.SetID(adjustableDateIDRef_, ob);
             }
             else if (adjustableDateNode.Attributes["href"] != null)
             {
                 adjustableDateIDRef_ = adjustableDateNode.Attributes["href"].Value;
             }
             else
             {
                 adjustableDate_ = new AdjustableDate(adjustableDateNode);
             }
         }
         else
         {
             adjustableDate_ = new AdjustableDate(adjustableDateNode);
         }
     }
     
 
     XmlNode relativeDateNode = xmlNode.SelectSingleNode("relativeDate");
     
     if (relativeDateNode != null)
     {
         if (relativeDateNode.Attributes["href"] != null || relativeDateNode.Attributes["id"] != null) 
         {
             if (relativeDateNode.Attributes["id"] != null) 
             {
                 relativeDateIDRef_ = relativeDateNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(relativeDateNode);
                 IDManager.SetID(relativeDateIDRef_, ob);
             }
             else if (relativeDateNode.Attributes["href"] != null)
             {
                 relativeDateIDRef_ = relativeDateNode.Attributes["href"].Value;
             }
             else
             {
                 relativeDate_ = new RelativeDateOffset(relativeDateNode);
             }
         }
         else
         {
             relativeDate_ = new RelativeDateOffset(relativeDateNode);
         }
     }
     
 
 }
 public CalculationPeriodDates(XmlNode xmlNode)
 {
     XmlNodeList effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate");
     if (effectiveDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in effectiveDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 effectiveDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate ob = AdjustableDate();
                 IDManager.SetID(effectiveDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 effectiveDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 effectiveDate = new AdjustableDate(item);
             }
         }
     }
     
 
     XmlNodeList relativeEffectiveDateNodeList = xmlNode.SelectNodes("relativeEffectiveDate");
     if (relativeEffectiveDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in relativeEffectiveDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 relativeEffectiveDateIDRef = item.Attributes["id"].Name;
                 AdjustedRelativeDateOffset ob = AdjustedRelativeDateOffset();
                 IDManager.SetID(relativeEffectiveDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 relativeEffectiveDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 relativeEffectiveDate = new AdjustedRelativeDateOffset(item);
             }
         }
     }
     
 
     XmlNodeList terminationDateNodeList = xmlNode.SelectNodes("terminationDate");
     if (terminationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in terminationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 terminationDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate ob = AdjustableDate();
                 IDManager.SetID(terminationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 terminationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 terminationDate = new AdjustableDate(item);
             }
         }
     }
     
 
     XmlNodeList relativeTerminationDateNodeList = xmlNode.SelectNodes("relativeTerminationDate");
     if (relativeTerminationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in relativeTerminationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 relativeTerminationDateIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(relativeTerminationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 relativeTerminationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 relativeTerminationDate = new RelativeDateOffset(item);
             }
         }
     }
     
 
     XmlNodeList calculationPeriodDatesAdjustmentsNodeList = xmlNode.SelectNodes("calculationPeriodDatesAdjustments");
     if (calculationPeriodDatesAdjustmentsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodDatesAdjustmentsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodDatesAdjustmentsIDRef = item.Attributes["id"].Name;
                 BusinessDayAdjustments ob = BusinessDayAdjustments();
                 IDManager.SetID(calculationPeriodDatesAdjustmentsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodDatesAdjustmentsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodDatesAdjustments = new BusinessDayAdjustments(item);
             }
         }
     }
     
 
     XmlNodeList firstPeriodStartDateNodeList = xmlNode.SelectNodes("firstPeriodStartDate");
     if (firstPeriodStartDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in firstPeriodStartDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 firstPeriodStartDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate ob = AdjustableDate();
                 IDManager.SetID(firstPeriodStartDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 firstPeriodStartDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 firstPeriodStartDate = new AdjustableDate(item);
             }
         }
     }
     
 
     XmlNodeList firstRegularPeriodStartDateNodeList = xmlNode.SelectNodes("firstRegularPeriodStartDate");
     if (firstRegularPeriodStartDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in firstRegularPeriodStartDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 firstRegularPeriodStartDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(firstRegularPeriodStartDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 firstRegularPeriodStartDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 firstRegularPeriodStartDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList firstCompoundingPeriodEndDateNodeList = xmlNode.SelectNodes("firstCompoundingPeriodEndDate");
     if (firstCompoundingPeriodEndDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in firstCompoundingPeriodEndDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 firstCompoundingPeriodEndDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(firstCompoundingPeriodEndDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 firstCompoundingPeriodEndDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 firstCompoundingPeriodEndDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList lastRegularPeriodEndDateNodeList = xmlNode.SelectNodes("lastRegularPeriodEndDate");
     if (lastRegularPeriodEndDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in lastRegularPeriodEndDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 lastRegularPeriodEndDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(lastRegularPeriodEndDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 lastRegularPeriodEndDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 lastRegularPeriodEndDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList stubPeriodTypeNodeList = xmlNode.SelectNodes("stubPeriodType");
     if (stubPeriodTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in stubPeriodTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 stubPeriodTypeIDRef = item.Attributes["id"].Name;
                 StubPeriodTypeEnum ob = StubPeriodTypeEnum();
                 IDManager.SetID(stubPeriodTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 stubPeriodTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 stubPeriodType = new StubPeriodTypeEnum(item);
             }
         }
     }
     
 
     XmlNodeList calculationPeriodFrequencyNodeList = xmlNode.SelectNodes("calculationPeriodFrequency");
     if (calculationPeriodFrequencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodFrequencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodFrequencyIDRef = item.Attributes["id"].Name;
                 CalculationPeriodFrequency ob = CalculationPeriodFrequency();
                 IDManager.SetID(calculationPeriodFrequencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodFrequencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodFrequency = new CalculationPeriodFrequency(item);
             }
         }
     }
     
 
 }
 public MandatoryEarlyTermination(XmlNode xmlNode)
 {
     XmlNodeList mandatoryEarlyTerminationDateNodeList = xmlNode.SelectNodes("mandatoryEarlyTerminationDate");
     if (mandatoryEarlyTerminationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in mandatoryEarlyTerminationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 mandatoryEarlyTerminationDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate ob = AdjustableDate();
                 IDManager.SetID(mandatoryEarlyTerminationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 mandatoryEarlyTerminationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 mandatoryEarlyTerminationDate = new AdjustableDate(item);
             }
         }
     }
     
 
     XmlNodeList calculationAgentNodeList = xmlNode.SelectNodes("calculationAgent");
     if (calculationAgentNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationAgentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationAgentIDRef = item.Attributes["id"].Name;
                 CalculationAgent ob = CalculationAgent();
                 IDManager.SetID(calculationAgentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationAgentIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationAgent = new CalculationAgent(item);
             }
         }
     }
     
 
     XmlNodeList cashSettlementNodeList = xmlNode.SelectNodes("cashSettlement");
     if (cashSettlementNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cashSettlementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cashSettlementIDRef = item.Attributes["id"].Name;
                 CashSettlement ob = CashSettlement();
                 IDManager.SetID(cashSettlementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cashSettlementIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cashSettlement = new CashSettlement(item);
             }
         }
     }
     
 
     XmlNodeList mandatoryEarlyTerminationAdjustedDatesNodeList = xmlNode.SelectNodes("mandatoryEarlyTerminationAdjustedDates");
     if (mandatoryEarlyTerminationAdjustedDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in mandatoryEarlyTerminationAdjustedDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 mandatoryEarlyTerminationAdjustedDatesIDRef = item.Attributes["id"].Name;
                 MandatoryEarlyTerminationAdjustedDates ob = MandatoryEarlyTerminationAdjustedDates();
                 IDManager.SetID(mandatoryEarlyTerminationAdjustedDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 mandatoryEarlyTerminationAdjustedDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 mandatoryEarlyTerminationAdjustedDates = new MandatoryEarlyTerminationAdjustedDates(item);
             }
         }
     }
     
 
 }
 public Commodity(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList commodityBaseNodeList = xmlNode.SelectNodes("commodityBase");
     if (commodityBaseNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commodityBaseNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commodityBaseIDRef = item.Attributes["id"].Name;
                 CommodityBase ob = CommodityBase();
                 IDManager.SetID(commodityBaseIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commodityBaseIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commodityBase = new CommodityBase(item);
             }
         }
     }
     
 
     XmlNodeList commodityDetailsNodeList = xmlNode.SelectNodes("commodityDetails");
     if (commodityDetailsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commodityDetailsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commodityDetailsIDRef = item.Attributes["id"].Name;
                 CommodityDetails ob = CommodityDetails();
                 IDManager.SetID(commodityDetailsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commodityDetailsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commodityDetails = new CommodityDetails(item);
             }
         }
     }
     
 
     XmlNodeList unitNodeList = xmlNode.SelectNodes("unit");
     if (unitNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in unitNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 unitIDRef = item.Attributes["id"].Name;
                 QuantityUnit ob = QuantityUnit();
                 IDManager.SetID(unitIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 unitIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 unit = new QuantityUnit(item);
             }
         }
     }
     
 
     XmlNodeList currencyNodeList = xmlNode.SelectNodes("currency");
     if (currencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in currencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 currencyIDRef = item.Attributes["id"].Name;
                 Currency ob = Currency();
                 IDManager.SetID(currencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 currencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 currency = new Currency(item);
             }
         }
     }
     
 
     XmlNodeList exchangeIdNodeList = xmlNode.SelectNodes("exchangeId");
     if (exchangeIdNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in exchangeIdNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 exchangeIdIDRef = item.Attributes["id"].Name;
                 ExchangeId ob = ExchangeId();
                 IDManager.SetID(exchangeIdIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 exchangeIdIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 exchangeId = new ExchangeId(item);
             }
         }
     }
     
 
     XmlNodeList publicationNodeList = xmlNode.SelectNodes("publication");
     if (publicationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in publicationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 publicationIDRef = item.Attributes["id"].Name;
                 CommodityInformationSource ob = CommodityInformationSource();
                 IDManager.SetID(publicationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 publicationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 publication = new CommodityInformationSource(item);
             }
         }
     }
     
 
     XmlNodeList specifiedPriceNodeList = xmlNode.SelectNodes("specifiedPrice");
     if (specifiedPriceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in specifiedPriceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 specifiedPriceIDRef = item.Attributes["id"].Name;
                 SpecifiedPriceEnum ob = SpecifiedPriceEnum();
                 IDManager.SetID(specifiedPriceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 specifiedPriceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 specifiedPrice = new SpecifiedPriceEnum(item);
             }
         }
     }
     
 
     XmlNodeList deliveryDatesNodeList = xmlNode.SelectNodes("deliveryDates");
     if (deliveryDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in deliveryDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 deliveryDatesIDRef = item.Attributes["id"].Name;
                 DeliveryDatesEnum ob = DeliveryDatesEnum();
                 IDManager.SetID(deliveryDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryDates = new DeliveryDatesEnum(item);
             }
         }
     }
     
 
     XmlNodeList deliveryDateNodeList = xmlNode.SelectNodes("deliveryDate");
     if (deliveryDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in deliveryDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 deliveryDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate ob = AdjustableDate();
                 IDManager.SetID(deliveryDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryDate = new AdjustableDate(item);
             }
         }
     }
     
 
     XmlNodeList deliveryDateYearMonthNodeList = xmlNode.SelectNodes("deliveryDateYearMonth");
     if (deliveryDateYearMonthNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in deliveryDateYearMonthNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 deliveryDateYearMonthIDRef = item.Attributes["id"].Name;
                 XsdTypeGYearMonth ob = XsdTypeGYearMonth();
                 IDManager.SetID(deliveryDateYearMonthIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryDateYearMonthIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryDateYearMonth = new XsdTypeGYearMonth(item);
             }
         }
     }
     
 
     XmlNodeList deliveryDateRollConventionNodeList = xmlNode.SelectNodes("deliveryDateRollConvention");
     if (deliveryDateRollConventionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in deliveryDateRollConventionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 deliveryDateRollConventionIDRef = item.Attributes["id"].Name;
                 Offset ob = Offset();
                 IDManager.SetID(deliveryDateRollConventionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryDateRollConventionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryDateRollConvention = new Offset(item);
             }
         }
     }
     
 
     XmlNodeList multiplierNodeList = xmlNode.SelectNodes("multiplier");
     if (multiplierNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in multiplierNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 multiplierIDRef = item.Attributes["id"].Name;
                 PositiveDecimal ob = PositiveDecimal();
                 IDManager.SetID(multiplierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 multiplierIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 multiplier = new PositiveDecimal(item);
             }
         }
     }
     
 
 }
 public PrePayment(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode payerPartyReferenceNode = xmlNode.SelectSingleNode("payerPartyReference");
     
     if (payerPartyReferenceNode != null)
     {
         if (payerPartyReferenceNode.Attributes["href"] != null || payerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (payerPartyReferenceNode.Attributes["id"] != null) 
             {
                 payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(payerPartyReferenceNode);
                 IDManager.SetID(payerPartyReferenceIDRef_, ob);
             }
             else if (payerPartyReferenceNode.Attributes["href"] != null)
             {
                 payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
             }
         }
         else
         {
             payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
         }
     }
     
 
     XmlNode payerAccountReferenceNode = xmlNode.SelectSingleNode("payerAccountReference");
     
     if (payerAccountReferenceNode != null)
     {
         if (payerAccountReferenceNode.Attributes["href"] != null || payerAccountReferenceNode.Attributes["id"] != null) 
         {
             if (payerAccountReferenceNode.Attributes["id"] != null) 
             {
                 payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(payerAccountReferenceNode);
                 IDManager.SetID(payerAccountReferenceIDRef_, ob);
             }
             else if (payerAccountReferenceNode.Attributes["href"] != null)
             {
                 payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
             }
         }
         else
         {
             payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
         }
     }
     
 
     XmlNode receiverPartyReferenceNode = xmlNode.SelectSingleNode("receiverPartyReference");
     
     if (receiverPartyReferenceNode != null)
     {
         if (receiverPartyReferenceNode.Attributes["href"] != null || receiverPartyReferenceNode.Attributes["id"] != null) 
         {
             if (receiverPartyReferenceNode.Attributes["id"] != null) 
             {
                 receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(receiverPartyReferenceNode);
                 IDManager.SetID(receiverPartyReferenceIDRef_, ob);
             }
             else if (receiverPartyReferenceNode.Attributes["href"] != null)
             {
                 receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
             }
         }
         else
         {
             receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
         }
     }
     
 
     XmlNode receiverAccountReferenceNode = xmlNode.SelectSingleNode("receiverAccountReference");
     
     if (receiverAccountReferenceNode != null)
     {
         if (receiverAccountReferenceNode.Attributes["href"] != null || receiverAccountReferenceNode.Attributes["id"] != null) 
         {
             if (receiverAccountReferenceNode.Attributes["id"] != null) 
             {
                 receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(receiverAccountReferenceNode);
                 IDManager.SetID(receiverAccountReferenceIDRef_, ob);
             }
             else if (receiverAccountReferenceNode.Attributes["href"] != null)
             {
                 receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
             }
         }
         else
         {
             receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
         }
     }
     
 
     XmlNode prePaymentNode = xmlNode.SelectSingleNode("prePayment");
     
     if (prePaymentNode != null)
     {
         if (prePaymentNode.Attributes["href"] != null || prePaymentNode.Attributes["id"] != null) 
         {
             if (prePaymentNode.Attributes["id"] != null) 
             {
                 prePaymentIDRef_ = prePaymentNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(prePaymentNode);
                 IDManager.SetID(prePaymentIDRef_, ob);
             }
             else if (prePaymentNode.Attributes["href"] != null)
             {
                 prePaymentIDRef_ = prePaymentNode.Attributes["href"].Value;
             }
             else
             {
                 prePayment_ = new XsdTypeBoolean(prePaymentNode);
             }
         }
         else
         {
             prePayment_ = new XsdTypeBoolean(prePaymentNode);
         }
     }
     
 
     XmlNode prePaymentAmountNode = xmlNode.SelectSingleNode("prePaymentAmount");
     
     if (prePaymentAmountNode != null)
     {
         if (prePaymentAmountNode.Attributes["href"] != null || prePaymentAmountNode.Attributes["id"] != null) 
         {
             if (prePaymentAmountNode.Attributes["id"] != null) 
             {
                 prePaymentAmountIDRef_ = prePaymentAmountNode.Attributes["id"].Value;
                 NonNegativeMoney ob = new NonNegativeMoney(prePaymentAmountNode);
                 IDManager.SetID(prePaymentAmountIDRef_, ob);
             }
             else if (prePaymentAmountNode.Attributes["href"] != null)
             {
                 prePaymentAmountIDRef_ = prePaymentAmountNode.Attributes["href"].Value;
             }
             else
             {
                 prePaymentAmount_ = new NonNegativeMoney(prePaymentAmountNode);
             }
         }
         else
         {
             prePaymentAmount_ = new NonNegativeMoney(prePaymentAmountNode);
         }
     }
     
 
     XmlNode prePaymentDateNode = xmlNode.SelectSingleNode("prePaymentDate");
     
     if (prePaymentDateNode != null)
     {
         if (prePaymentDateNode.Attributes["href"] != null || prePaymentDateNode.Attributes["id"] != null) 
         {
             if (prePaymentDateNode.Attributes["id"] != null) 
             {
                 prePaymentDateIDRef_ = prePaymentDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(prePaymentDateNode);
                 IDManager.SetID(prePaymentDateIDRef_, ob);
             }
             else if (prePaymentDateNode.Attributes["href"] != null)
             {
                 prePaymentDateIDRef_ = prePaymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 prePaymentDate_ = new AdjustableDate(prePaymentDateNode);
             }
         }
         else
         {
             prePaymentDate_ = new AdjustableDate(prePaymentDateNode);
         }
     }
     
 
 }
 public PrePayment(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList payerPartyReferenceNodeList = xmlNode.SelectNodes("payerPartyReference");
     if (payerPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in payerPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 payerPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(payerPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 payerPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payerPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList payerAccountReferenceNodeList = xmlNode.SelectNodes("payerAccountReference");
     if (payerAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in payerAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 payerAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(payerAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 payerAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payerAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList receiverPartyReferenceNodeList = xmlNode.SelectNodes("receiverPartyReference");
     if (receiverPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in receiverPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 receiverPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(receiverPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 receiverPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 receiverPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList receiverAccountReferenceNodeList = xmlNode.SelectNodes("receiverAccountReference");
     if (receiverAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in receiverAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 receiverAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(receiverAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 receiverAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 receiverAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList prePaymentNodeList = xmlNode.SelectNodes("prePayment");
     if (prePaymentNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in prePaymentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 prePaymentIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(prePaymentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 prePaymentIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 prePayment = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList prePaymentAmountNodeList = xmlNode.SelectNodes("prePaymentAmount");
     if (prePaymentAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in prePaymentAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 prePaymentAmountIDRef = item.Attributes["id"].Name;
                 NonNegativeMoney ob = NonNegativeMoney();
                 IDManager.SetID(prePaymentAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 prePaymentAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 prePaymentAmount = new NonNegativeMoney(item);
             }
         }
     }
     
 
     XmlNodeList prePaymentDateNodeList = xmlNode.SelectNodes("prePaymentDate");
     if (prePaymentDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in prePaymentDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 prePaymentDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate ob = AdjustableDate();
                 IDManager.SetID(prePaymentDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 prePaymentDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 prePaymentDate = new AdjustableDate(item);
             }
         }
     }
     
 
 }
 public DividendPaymentDate(XmlNode xmlNode)
 {
     XmlNodeList dividendDateReferenceNodeList = xmlNode.SelectNodes("dividendDateReference");
     if (dividendDateReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in dividendDateReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 dividendDateReferenceIDRef = item.Attributes["id"].Name;
                 DividendDateReferenceEnum ob = DividendDateReferenceEnum();
                 IDManager.SetID(dividendDateReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 dividendDateReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 dividendDateReference = new DividendDateReferenceEnum(item);
             }
         }
     }
     
 
     XmlNodeList paymentDateOffsetNodeList = xmlNode.SelectNodes("paymentDateOffset");
     if (paymentDateOffsetNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentDateOffsetNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentDateOffsetIDRef = item.Attributes["id"].Name;
                 Offset ob = Offset();
                 IDManager.SetID(paymentDateOffsetIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentDateOffsetIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentDateOffset = new Offset(item);
             }
         }
     }
     
 
     XmlNodeList adjustableDateNodeList = xmlNode.SelectNodes("adjustableDate");
     if (adjustableDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in adjustableDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 adjustableDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate ob = AdjustableDate();
                 IDManager.SetID(adjustableDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 adjustableDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 adjustableDate = new AdjustableDate(item);
             }
         }
     }
     
 
 }
 public MandatoryEarlyTermination(XmlNode xmlNode)
 {
     XmlNode mandatoryEarlyTerminationDateNode = xmlNode.SelectSingleNode("mandatoryEarlyTerminationDate");
     
     if (mandatoryEarlyTerminationDateNode != null)
     {
         if (mandatoryEarlyTerminationDateNode.Attributes["href"] != null || mandatoryEarlyTerminationDateNode.Attributes["id"] != null) 
         {
             if (mandatoryEarlyTerminationDateNode.Attributes["id"] != null) 
             {
                 mandatoryEarlyTerminationDateIDRef_ = mandatoryEarlyTerminationDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(mandatoryEarlyTerminationDateNode);
                 IDManager.SetID(mandatoryEarlyTerminationDateIDRef_, ob);
             }
             else if (mandatoryEarlyTerminationDateNode.Attributes["href"] != null)
             {
                 mandatoryEarlyTerminationDateIDRef_ = mandatoryEarlyTerminationDateNode.Attributes["href"].Value;
             }
             else
             {
                 mandatoryEarlyTerminationDate_ = new AdjustableDate(mandatoryEarlyTerminationDateNode);
             }
         }
         else
         {
             mandatoryEarlyTerminationDate_ = new AdjustableDate(mandatoryEarlyTerminationDateNode);
         }
     }
     
 
     XmlNode calculationAgentNode = xmlNode.SelectSingleNode("calculationAgent");
     
     if (calculationAgentNode != null)
     {
         if (calculationAgentNode.Attributes["href"] != null || calculationAgentNode.Attributes["id"] != null) 
         {
             if (calculationAgentNode.Attributes["id"] != null) 
             {
                 calculationAgentIDRef_ = calculationAgentNode.Attributes["id"].Value;
                 CalculationAgent ob = new CalculationAgent(calculationAgentNode);
                 IDManager.SetID(calculationAgentIDRef_, ob);
             }
             else if (calculationAgentNode.Attributes["href"] != null)
             {
                 calculationAgentIDRef_ = calculationAgentNode.Attributes["href"].Value;
             }
             else
             {
                 calculationAgent_ = new CalculationAgent(calculationAgentNode);
             }
         }
         else
         {
             calculationAgent_ = new CalculationAgent(calculationAgentNode);
         }
     }
     
 
     XmlNode cashSettlementNode = xmlNode.SelectSingleNode("cashSettlement");
     
     if (cashSettlementNode != null)
     {
         if (cashSettlementNode.Attributes["href"] != null || cashSettlementNode.Attributes["id"] != null) 
         {
             if (cashSettlementNode.Attributes["id"] != null) 
             {
                 cashSettlementIDRef_ = cashSettlementNode.Attributes["id"].Value;
                 CashSettlement ob = new CashSettlement(cashSettlementNode);
                 IDManager.SetID(cashSettlementIDRef_, ob);
             }
             else if (cashSettlementNode.Attributes["href"] != null)
             {
                 cashSettlementIDRef_ = cashSettlementNode.Attributes["href"].Value;
             }
             else
             {
                 cashSettlement_ = new CashSettlement(cashSettlementNode);
             }
         }
         else
         {
             cashSettlement_ = new CashSettlement(cashSettlementNode);
         }
     }
     
 
     XmlNode mandatoryEarlyTerminationAdjustedDatesNode = xmlNode.SelectSingleNode("mandatoryEarlyTerminationAdjustedDates");
     
     if (mandatoryEarlyTerminationAdjustedDatesNode != null)
     {
         if (mandatoryEarlyTerminationAdjustedDatesNode.Attributes["href"] != null || mandatoryEarlyTerminationAdjustedDatesNode.Attributes["id"] != null) 
         {
             if (mandatoryEarlyTerminationAdjustedDatesNode.Attributes["id"] != null) 
             {
                 mandatoryEarlyTerminationAdjustedDatesIDRef_ = mandatoryEarlyTerminationAdjustedDatesNode.Attributes["id"].Value;
                 MandatoryEarlyTerminationAdjustedDates ob = new MandatoryEarlyTerminationAdjustedDates(mandatoryEarlyTerminationAdjustedDatesNode);
                 IDManager.SetID(mandatoryEarlyTerminationAdjustedDatesIDRef_, ob);
             }
             else if (mandatoryEarlyTerminationAdjustedDatesNode.Attributes["href"] != null)
             {
                 mandatoryEarlyTerminationAdjustedDatesIDRef_ = mandatoryEarlyTerminationAdjustedDatesNode.Attributes["href"].Value;
             }
             else
             {
                 mandatoryEarlyTerminationAdjustedDates_ = new MandatoryEarlyTerminationAdjustedDates(mandatoryEarlyTerminationAdjustedDatesNode);
             }
         }
         else
         {
             mandatoryEarlyTerminationAdjustedDates_ = new MandatoryEarlyTerminationAdjustedDates(mandatoryEarlyTerminationAdjustedDatesNode);
         }
     }
     
 
 }
 public EquityPremium(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList payerPartyReferenceNodeList = xmlNode.SelectNodes("payerPartyReference");
     if (payerPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in payerPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 payerPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(payerPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 payerPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payerPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList payerAccountReferenceNodeList = xmlNode.SelectNodes("payerAccountReference");
     if (payerAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in payerAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 payerAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(payerAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 payerAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payerAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList receiverPartyReferenceNodeList = xmlNode.SelectNodes("receiverPartyReference");
     if (receiverPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in receiverPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 receiverPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(receiverPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 receiverPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 receiverPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList receiverAccountReferenceNodeList = xmlNode.SelectNodes("receiverAccountReference");
     if (receiverAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in receiverAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 receiverAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(receiverAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 receiverAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 receiverAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList premiumTypeNodeList = xmlNode.SelectNodes("premiumType");
     if (premiumTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in premiumTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 premiumTypeIDRef = item.Attributes["id"].Name;
                 PremiumTypeEnum ob = PremiumTypeEnum();
                 IDManager.SetID(premiumTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 premiumTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 premiumType = new PremiumTypeEnum(item);
             }
         }
     }
     
 
     XmlNodeList paymentAmountNodeList = xmlNode.SelectNodes("paymentAmount");
     if (paymentAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentAmountIDRef = item.Attributes["id"].Name;
                 NonNegativeMoney ob = NonNegativeMoney();
                 IDManager.SetID(paymentAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentAmount = new NonNegativeMoney(item);
             }
         }
     }
     
 
     XmlNodeList paymentDateNodeList = xmlNode.SelectNodes("paymentDate");
     if (paymentDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate ob = AdjustableDate();
                 IDManager.SetID(paymentDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentDate = new AdjustableDate(item);
             }
         }
     }
     
 
     XmlNodeList swapPremiumNodeList = xmlNode.SelectNodes("swapPremium");
     if (swapPremiumNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in swapPremiumNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 swapPremiumIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(swapPremiumIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 swapPremiumIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 swapPremium = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList pricePerOptionNodeList = xmlNode.SelectNodes("pricePerOption");
     if (pricePerOptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in pricePerOptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 pricePerOptionIDRef = item.Attributes["id"].Name;
                 NonNegativeMoney ob = NonNegativeMoney();
                 IDManager.SetID(pricePerOptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 pricePerOptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 pricePerOption = new NonNegativeMoney(item);
             }
         }
     }
     
 
     XmlNodeList percentageOfNotionalNodeList = xmlNode.SelectNodes("percentageOfNotional");
     if (percentageOfNotionalNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in percentageOfNotionalNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 percentageOfNotionalIDRef = item.Attributes["id"].Name;
                 NonNegativeDecimal ob = NonNegativeDecimal();
                 IDManager.SetID(percentageOfNotionalIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 percentageOfNotionalIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 percentageOfNotional = new NonNegativeDecimal(item);
             }
         }
     }
     
 
 }
 public AveragePriceLeg(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList payerPartyReferenceNodeList = xmlNode.SelectNodes("payerPartyReference");
     if (payerPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in payerPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 payerPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(payerPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 payerPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payerPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList payerAccountReferenceNodeList = xmlNode.SelectNodes("payerAccountReference");
     if (payerAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in payerAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 payerAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(payerAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 payerAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payerAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList receiverPartyReferenceNodeList = xmlNode.SelectNodes("receiverPartyReference");
     if (receiverPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in receiverPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 receiverPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(receiverPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 receiverPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 receiverPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList receiverAccountReferenceNodeList = xmlNode.SelectNodes("receiverAccountReference");
     if (receiverAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in receiverAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 receiverAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(receiverAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 receiverAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 receiverAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList calculationDatesNodeList = xmlNode.SelectNodes("calculationDates");
     if (calculationDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationDatesIDRef = item.Attributes["id"].Name;
                 AdjustableDates ob = AdjustableDates();
                 IDManager.SetID(calculationDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationDates = new AdjustableDates(item);
             }
         }
     }
     
 
     XmlNodeList calculationPeriodsNodeList = xmlNode.SelectNodes("calculationPeriods");
     if (calculationPeriodsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodsIDRef = item.Attributes["id"].Name;
                 AdjustableDates ob = AdjustableDates();
                 IDManager.SetID(calculationPeriodsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriods = new AdjustableDates(item);
             }
         }
     }
     
 
     XmlNodeList calculationPeriodsScheduleNodeList = xmlNode.SelectNodes("calculationPeriodsSchedule");
     if (calculationPeriodsScheduleNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodsScheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodsScheduleIDRef = item.Attributes["id"].Name;
                 CommodityCalculationPeriodsSchedule ob = CommodityCalculationPeriodsSchedule();
                 IDManager.SetID(calculationPeriodsScheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodsScheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodsSchedule = new CommodityCalculationPeriodsSchedule(item);
             }
         }
     }
     
 
     XmlNodeList calculationPeriodsReferenceNodeList = xmlNode.SelectNodes("calculationPeriodsReference");
     if (calculationPeriodsReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodsReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodsReferenceIDRef = item.Attributes["id"].Name;
                 CalculationPeriodsReference ob = CalculationPeriodsReference();
                 IDManager.SetID(calculationPeriodsReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodsReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodsReference = new CalculationPeriodsReference(item);
             }
         }
     }
     
 
     XmlNodeList calculationPeriodsScheduleReferenceNodeList = xmlNode.SelectNodes("calculationPeriodsScheduleReference");
     if (calculationPeriodsScheduleReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodsScheduleReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodsScheduleReferenceIDRef = item.Attributes["id"].Name;
                 CalculationPeriodsScheduleReference ob = CalculationPeriodsScheduleReference();
                 IDManager.SetID(calculationPeriodsScheduleReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodsScheduleReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodsScheduleReference = new CalculationPeriodsScheduleReference(item);
             }
         }
     }
     
 
     XmlNodeList calculationPeriodsDatesReferenceNodeList = xmlNode.SelectNodes("calculationPeriodsDatesReference");
     if (calculationPeriodsDatesReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodsDatesReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodsDatesReferenceIDRef = item.Attributes["id"].Name;
                 CalculationPeriodsDatesReference ob = CalculationPeriodsDatesReference();
                 IDManager.SetID(calculationPeriodsDatesReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodsDatesReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodsDatesReference = new CalculationPeriodsDatesReference(item);
             }
         }
     }
     
 
     XmlNodeList commodityNodeList = xmlNode.SelectNodes("commodity");
     if (commodityNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commodityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commodityIDRef = item.Attributes["id"].Name;
                 Commodity ob = Commodity();
                 IDManager.SetID(commodityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commodityIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commodity = new Commodity(item);
             }
         }
     }
     
 
     XmlNodeList quantityReferenceNodeList = xmlNode.SelectNodes("quantityReference");
     if (quantityReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in quantityReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 quantityReferenceIDRef = item.Attributes["id"].Name;
                 QuantityReference ob = QuantityReference();
                 IDManager.SetID(quantityReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 quantityReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 quantityReference = new QuantityReference(item);
             }
         }
     }
     
 
     XmlNodeList pricingStartDateNodeList = xmlNode.SelectNodes("pricingStartDate");
     if (pricingStartDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in pricingStartDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 pricingStartDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate ob = AdjustableDate();
                 IDManager.SetID(pricingStartDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 pricingStartDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 pricingStartDate = new AdjustableDate(item);
             }
         }
     }
     
 
     XmlNodeList calculationNodeList = xmlNode.SelectNodes("calculation");
     if (calculationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationIDRef = item.Attributes["id"].Name;
                 FloatingLegCalculation ob = FloatingLegCalculation();
                 IDManager.SetID(calculationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculation = new FloatingLegCalculation(item);
             }
         }
     }
     
 
     XmlNodeList relativePaymentDatesNodeList = xmlNode.SelectNodes("relativePaymentDates");
     if (relativePaymentDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in relativePaymentDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 relativePaymentDatesIDRef = item.Attributes["id"].Name;
                 CommodityRelativePaymentDates ob = CommodityRelativePaymentDates();
                 IDManager.SetID(relativePaymentDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 relativePaymentDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 relativePaymentDates = new CommodityRelativePaymentDates(item);
             }
         }
     }
     
 
     XmlNodeList paymentDatesNodeList = xmlNode.SelectNodes("paymentDates");
     if (paymentDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentDatesIDRef = item.Attributes["id"].Name;
                 AdjustableDatesOrRelativeDateOffset ob = AdjustableDatesOrRelativeDateOffset();
                 IDManager.SetID(paymentDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentDates = new AdjustableDatesOrRelativeDateOffset(item);
             }
         }
     }
     
 
     XmlNodeList masterAgreementPaymentDatesNodeList = xmlNode.SelectNodes("masterAgreementPaymentDates");
     if (masterAgreementPaymentDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in masterAgreementPaymentDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 masterAgreementPaymentDatesIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(masterAgreementPaymentDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 masterAgreementPaymentDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 masterAgreementPaymentDates = new XsdTypeBoolean(item);
             }
         }
     }
     
 
 }
 public Commodity(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode commodityBaseNode = xmlNode.SelectSingleNode("commodityBase");
     
     if (commodityBaseNode != null)
     {
         if (commodityBaseNode.Attributes["href"] != null || commodityBaseNode.Attributes["id"] != null) 
         {
             if (commodityBaseNode.Attributes["id"] != null) 
             {
                 commodityBaseIDRef_ = commodityBaseNode.Attributes["id"].Value;
                 CommodityBase ob = new CommodityBase(commodityBaseNode);
                 IDManager.SetID(commodityBaseIDRef_, ob);
             }
             else if (commodityBaseNode.Attributes["href"] != null)
             {
                 commodityBaseIDRef_ = commodityBaseNode.Attributes["href"].Value;
             }
             else
             {
                 commodityBase_ = new CommodityBase(commodityBaseNode);
             }
         }
         else
         {
             commodityBase_ = new CommodityBase(commodityBaseNode);
         }
     }
     
 
     XmlNode commodityDetailsNode = xmlNode.SelectSingleNode("commodityDetails");
     
     if (commodityDetailsNode != null)
     {
         if (commodityDetailsNode.Attributes["href"] != null || commodityDetailsNode.Attributes["id"] != null) 
         {
             if (commodityDetailsNode.Attributes["id"] != null) 
             {
                 commodityDetailsIDRef_ = commodityDetailsNode.Attributes["id"].Value;
                 CommodityDetails ob = new CommodityDetails(commodityDetailsNode);
                 IDManager.SetID(commodityDetailsIDRef_, ob);
             }
             else if (commodityDetailsNode.Attributes["href"] != null)
             {
                 commodityDetailsIDRef_ = commodityDetailsNode.Attributes["href"].Value;
             }
             else
             {
                 commodityDetails_ = new CommodityDetails(commodityDetailsNode);
             }
         }
         else
         {
             commodityDetails_ = new CommodityDetails(commodityDetailsNode);
         }
     }
     
 
     XmlNode unitNode = xmlNode.SelectSingleNode("unit");
     
     if (unitNode != null)
     {
         if (unitNode.Attributes["href"] != null || unitNode.Attributes["id"] != null) 
         {
             if (unitNode.Attributes["id"] != null) 
             {
                 unitIDRef_ = unitNode.Attributes["id"].Value;
                 QuantityUnit ob = new QuantityUnit(unitNode);
                 IDManager.SetID(unitIDRef_, ob);
             }
             else if (unitNode.Attributes["href"] != null)
             {
                 unitIDRef_ = unitNode.Attributes["href"].Value;
             }
             else
             {
                 unit_ = new QuantityUnit(unitNode);
             }
         }
         else
         {
             unit_ = new QuantityUnit(unitNode);
         }
     }
     
 
     XmlNode currencyNode = xmlNode.SelectSingleNode("currency");
     
     if (currencyNode != null)
     {
         if (currencyNode.Attributes["href"] != null || currencyNode.Attributes["id"] != null) 
         {
             if (currencyNode.Attributes["id"] != null) 
             {
                 currencyIDRef_ = currencyNode.Attributes["id"].Value;
                 Currency ob = new Currency(currencyNode);
                 IDManager.SetID(currencyIDRef_, ob);
             }
             else if (currencyNode.Attributes["href"] != null)
             {
                 currencyIDRef_ = currencyNode.Attributes["href"].Value;
             }
             else
             {
                 currency_ = new Currency(currencyNode);
             }
         }
         else
         {
             currency_ = new Currency(currencyNode);
         }
     }
     
 
     XmlNode exchangeIdNode = xmlNode.SelectSingleNode("exchangeId");
     
     if (exchangeIdNode != null)
     {
         if (exchangeIdNode.Attributes["href"] != null || exchangeIdNode.Attributes["id"] != null) 
         {
             if (exchangeIdNode.Attributes["id"] != null) 
             {
                 exchangeIdIDRef_ = exchangeIdNode.Attributes["id"].Value;
                 ExchangeId ob = new ExchangeId(exchangeIdNode);
                 IDManager.SetID(exchangeIdIDRef_, ob);
             }
             else if (exchangeIdNode.Attributes["href"] != null)
             {
                 exchangeIdIDRef_ = exchangeIdNode.Attributes["href"].Value;
             }
             else
             {
                 exchangeId_ = new ExchangeId(exchangeIdNode);
             }
         }
         else
         {
             exchangeId_ = new ExchangeId(exchangeIdNode);
         }
     }
     
 
     XmlNode publicationNode = xmlNode.SelectSingleNode("publication");
     
     if (publicationNode != null)
     {
         if (publicationNode.Attributes["href"] != null || publicationNode.Attributes["id"] != null) 
         {
             if (publicationNode.Attributes["id"] != null) 
             {
                 publicationIDRef_ = publicationNode.Attributes["id"].Value;
                 CommodityInformationSource ob = new CommodityInformationSource(publicationNode);
                 IDManager.SetID(publicationIDRef_, ob);
             }
             else if (publicationNode.Attributes["href"] != null)
             {
                 publicationIDRef_ = publicationNode.Attributes["href"].Value;
             }
             else
             {
                 publication_ = new CommodityInformationSource(publicationNode);
             }
         }
         else
         {
             publication_ = new CommodityInformationSource(publicationNode);
         }
     }
     
 
     XmlNode specifiedPriceNode = xmlNode.SelectSingleNode("specifiedPrice");
     
     if (specifiedPriceNode != null)
     {
         if (specifiedPriceNode.Attributes["href"] != null || specifiedPriceNode.Attributes["id"] != null) 
         {
             if (specifiedPriceNode.Attributes["id"] != null) 
             {
                 specifiedPriceIDRef_ = specifiedPriceNode.Attributes["id"].Value;
                 SpecifiedPriceEnum ob = new SpecifiedPriceEnum(specifiedPriceNode);
                 IDManager.SetID(specifiedPriceIDRef_, ob);
             }
             else if (specifiedPriceNode.Attributes["href"] != null)
             {
                 specifiedPriceIDRef_ = specifiedPriceNode.Attributes["href"].Value;
             }
             else
             {
                 specifiedPrice_ = new SpecifiedPriceEnum(specifiedPriceNode);
             }
         }
         else
         {
             specifiedPrice_ = new SpecifiedPriceEnum(specifiedPriceNode);
         }
     }
     
 
     XmlNode deliveryDatesNode = xmlNode.SelectSingleNode("deliveryDates");
     
     if (deliveryDatesNode != null)
     {
         if (deliveryDatesNode.Attributes["href"] != null || deliveryDatesNode.Attributes["id"] != null) 
         {
             if (deliveryDatesNode.Attributes["id"] != null) 
             {
                 deliveryDatesIDRef_ = deliveryDatesNode.Attributes["id"].Value;
                 DeliveryDatesEnum ob = new DeliveryDatesEnum(deliveryDatesNode);
                 IDManager.SetID(deliveryDatesIDRef_, ob);
             }
             else if (deliveryDatesNode.Attributes["href"] != null)
             {
                 deliveryDatesIDRef_ = deliveryDatesNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryDates_ = new DeliveryDatesEnum(deliveryDatesNode);
             }
         }
         else
         {
             deliveryDates_ = new DeliveryDatesEnum(deliveryDatesNode);
         }
     }
     
 
     XmlNode deliveryDateNode = xmlNode.SelectSingleNode("deliveryDate");
     
     if (deliveryDateNode != null)
     {
         if (deliveryDateNode.Attributes["href"] != null || deliveryDateNode.Attributes["id"] != null) 
         {
             if (deliveryDateNode.Attributes["id"] != null) 
             {
                 deliveryDateIDRef_ = deliveryDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(deliveryDateNode);
                 IDManager.SetID(deliveryDateIDRef_, ob);
             }
             else if (deliveryDateNode.Attributes["href"] != null)
             {
                 deliveryDateIDRef_ = deliveryDateNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryDate_ = new AdjustableDate(deliveryDateNode);
             }
         }
         else
         {
             deliveryDate_ = new AdjustableDate(deliveryDateNode);
         }
     }
     
 
     XmlNode deliveryDateYearMonthNode = xmlNode.SelectSingleNode("deliveryDateYearMonth");
     
     if (deliveryDateYearMonthNode != null)
     {
         if (deliveryDateYearMonthNode.Attributes["href"] != null || deliveryDateYearMonthNode.Attributes["id"] != null) 
         {
             if (deliveryDateYearMonthNode.Attributes["id"] != null) 
             {
                 deliveryDateYearMonthIDRef_ = deliveryDateYearMonthNode.Attributes["id"].Value;
                 XsdTypeGYearMonth ob = new XsdTypeGYearMonth(deliveryDateYearMonthNode);
                 IDManager.SetID(deliveryDateYearMonthIDRef_, ob);
             }
             else if (deliveryDateYearMonthNode.Attributes["href"] != null)
             {
                 deliveryDateYearMonthIDRef_ = deliveryDateYearMonthNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryDateYearMonth_ = new XsdTypeGYearMonth(deliveryDateYearMonthNode);
             }
         }
         else
         {
             deliveryDateYearMonth_ = new XsdTypeGYearMonth(deliveryDateYearMonthNode);
         }
     }
     
 
     XmlNode deliveryDateRollConventionNode = xmlNode.SelectSingleNode("deliveryDateRollConvention");
     
     if (deliveryDateRollConventionNode != null)
     {
         if (deliveryDateRollConventionNode.Attributes["href"] != null || deliveryDateRollConventionNode.Attributes["id"] != null) 
         {
             if (deliveryDateRollConventionNode.Attributes["id"] != null) 
             {
                 deliveryDateRollConventionIDRef_ = deliveryDateRollConventionNode.Attributes["id"].Value;
                 Offset ob = new Offset(deliveryDateRollConventionNode);
                 IDManager.SetID(deliveryDateRollConventionIDRef_, ob);
             }
             else if (deliveryDateRollConventionNode.Attributes["href"] != null)
             {
                 deliveryDateRollConventionIDRef_ = deliveryDateRollConventionNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryDateRollConvention_ = new Offset(deliveryDateRollConventionNode);
             }
         }
         else
         {
             deliveryDateRollConvention_ = new Offset(deliveryDateRollConventionNode);
         }
     }
     
 
     XmlNode multiplierNode = xmlNode.SelectSingleNode("multiplier");
     
     if (multiplierNode != null)
     {
         if (multiplierNode.Attributes["href"] != null || multiplierNode.Attributes["id"] != null) 
         {
             if (multiplierNode.Attributes["id"] != null) 
             {
                 multiplierIDRef_ = multiplierNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(multiplierNode);
                 IDManager.SetID(multiplierIDRef_, ob);
             }
             else if (multiplierNode.Attributes["href"] != null)
             {
                 multiplierIDRef_ = multiplierNode.Attributes["href"].Value;
             }
             else
             {
                 multiplier_ = new PositiveDecimal(multiplierNode);
             }
         }
         else
         {
             multiplier_ = new PositiveDecimal(multiplierNode);
         }
     }
     
 
 }
 public AveragePriceLeg(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode payerPartyReferenceNode = xmlNode.SelectSingleNode("payerPartyReference");
     
     if (payerPartyReferenceNode != null)
     {
         if (payerPartyReferenceNode.Attributes["href"] != null || payerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (payerPartyReferenceNode.Attributes["id"] != null) 
             {
                 payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(payerPartyReferenceNode);
                 IDManager.SetID(payerPartyReferenceIDRef_, ob);
             }
             else if (payerPartyReferenceNode.Attributes["href"] != null)
             {
                 payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
             }
         }
         else
         {
             payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
         }
     }
     
 
     XmlNode payerAccountReferenceNode = xmlNode.SelectSingleNode("payerAccountReference");
     
     if (payerAccountReferenceNode != null)
     {
         if (payerAccountReferenceNode.Attributes["href"] != null || payerAccountReferenceNode.Attributes["id"] != null) 
         {
             if (payerAccountReferenceNode.Attributes["id"] != null) 
             {
                 payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(payerAccountReferenceNode);
                 IDManager.SetID(payerAccountReferenceIDRef_, ob);
             }
             else if (payerAccountReferenceNode.Attributes["href"] != null)
             {
                 payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
             }
         }
         else
         {
             payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
         }
     }
     
 
     XmlNode receiverPartyReferenceNode = xmlNode.SelectSingleNode("receiverPartyReference");
     
     if (receiverPartyReferenceNode != null)
     {
         if (receiverPartyReferenceNode.Attributes["href"] != null || receiverPartyReferenceNode.Attributes["id"] != null) 
         {
             if (receiverPartyReferenceNode.Attributes["id"] != null) 
             {
                 receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(receiverPartyReferenceNode);
                 IDManager.SetID(receiverPartyReferenceIDRef_, ob);
             }
             else if (receiverPartyReferenceNode.Attributes["href"] != null)
             {
                 receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
             }
         }
         else
         {
             receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
         }
     }
     
 
     XmlNode receiverAccountReferenceNode = xmlNode.SelectSingleNode("receiverAccountReference");
     
     if (receiverAccountReferenceNode != null)
     {
         if (receiverAccountReferenceNode.Attributes["href"] != null || receiverAccountReferenceNode.Attributes["id"] != null) 
         {
             if (receiverAccountReferenceNode.Attributes["id"] != null) 
             {
                 receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(receiverAccountReferenceNode);
                 IDManager.SetID(receiverAccountReferenceIDRef_, ob);
             }
             else if (receiverAccountReferenceNode.Attributes["href"] != null)
             {
                 receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
             }
         }
         else
         {
             receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
         }
     }
     
 
     XmlNode calculationDatesNode = xmlNode.SelectSingleNode("calculationDates");
     
     if (calculationDatesNode != null)
     {
         if (calculationDatesNode.Attributes["href"] != null || calculationDatesNode.Attributes["id"] != null) 
         {
             if (calculationDatesNode.Attributes["id"] != null) 
             {
                 calculationDatesIDRef_ = calculationDatesNode.Attributes["id"].Value;
                 AdjustableDates ob = new AdjustableDates(calculationDatesNode);
                 IDManager.SetID(calculationDatesIDRef_, ob);
             }
             else if (calculationDatesNode.Attributes["href"] != null)
             {
                 calculationDatesIDRef_ = calculationDatesNode.Attributes["href"].Value;
             }
             else
             {
                 calculationDates_ = new AdjustableDates(calculationDatesNode);
             }
         }
         else
         {
             calculationDates_ = new AdjustableDates(calculationDatesNode);
         }
     }
     
 
     XmlNode calculationPeriodsNode = xmlNode.SelectSingleNode("calculationPeriods");
     
     if (calculationPeriodsNode != null)
     {
         if (calculationPeriodsNode.Attributes["href"] != null || calculationPeriodsNode.Attributes["id"] != null) 
         {
             if (calculationPeriodsNode.Attributes["id"] != null) 
             {
                 calculationPeriodsIDRef_ = calculationPeriodsNode.Attributes["id"].Value;
                 AdjustableDates ob = new AdjustableDates(calculationPeriodsNode);
                 IDManager.SetID(calculationPeriodsIDRef_, ob);
             }
             else if (calculationPeriodsNode.Attributes["href"] != null)
             {
                 calculationPeriodsIDRef_ = calculationPeriodsNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriods_ = new AdjustableDates(calculationPeriodsNode);
             }
         }
         else
         {
             calculationPeriods_ = new AdjustableDates(calculationPeriodsNode);
         }
     }
     
 
     XmlNode calculationPeriodsScheduleNode = xmlNode.SelectSingleNode("calculationPeriodsSchedule");
     
     if (calculationPeriodsScheduleNode != null)
     {
         if (calculationPeriodsScheduleNode.Attributes["href"] != null || calculationPeriodsScheduleNode.Attributes["id"] != null) 
         {
             if (calculationPeriodsScheduleNode.Attributes["id"] != null) 
             {
                 calculationPeriodsScheduleIDRef_ = calculationPeriodsScheduleNode.Attributes["id"].Value;
                 CommodityCalculationPeriodsSchedule ob = new CommodityCalculationPeriodsSchedule(calculationPeriodsScheduleNode);
                 IDManager.SetID(calculationPeriodsScheduleIDRef_, ob);
             }
             else if (calculationPeriodsScheduleNode.Attributes["href"] != null)
             {
                 calculationPeriodsScheduleIDRef_ = calculationPeriodsScheduleNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodsSchedule_ = new CommodityCalculationPeriodsSchedule(calculationPeriodsScheduleNode);
             }
         }
         else
         {
             calculationPeriodsSchedule_ = new CommodityCalculationPeriodsSchedule(calculationPeriodsScheduleNode);
         }
     }
     
 
     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 commodityNode = xmlNode.SelectSingleNode("commodity");
     
     if (commodityNode != null)
     {
         if (commodityNode.Attributes["href"] != null || commodityNode.Attributes["id"] != null) 
         {
             if (commodityNode.Attributes["id"] != null) 
             {
                 commodityIDRef_ = commodityNode.Attributes["id"].Value;
                 Commodity ob = new Commodity(commodityNode);
                 IDManager.SetID(commodityIDRef_, ob);
             }
             else if (commodityNode.Attributes["href"] != null)
             {
                 commodityIDRef_ = commodityNode.Attributes["href"].Value;
             }
             else
             {
                 commodity_ = new Commodity(commodityNode);
             }
         }
         else
         {
             commodity_ = new Commodity(commodityNode);
         }
     }
     
 
     XmlNode quantityReferenceNode = xmlNode.SelectSingleNode("quantityReference");
     
     if (quantityReferenceNode != null)
     {
         if (quantityReferenceNode.Attributes["href"] != null || quantityReferenceNode.Attributes["id"] != null) 
         {
             if (quantityReferenceNode.Attributes["id"] != null) 
             {
                 quantityReferenceIDRef_ = quantityReferenceNode.Attributes["id"].Value;
                 QuantityReference ob = new QuantityReference(quantityReferenceNode);
                 IDManager.SetID(quantityReferenceIDRef_, ob);
             }
             else if (quantityReferenceNode.Attributes["href"] != null)
             {
                 quantityReferenceIDRef_ = quantityReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 quantityReference_ = new QuantityReference(quantityReferenceNode);
             }
         }
         else
         {
             quantityReference_ = new QuantityReference(quantityReferenceNode);
         }
     }
     
 
     XmlNode pricingStartDateNode = xmlNode.SelectSingleNode("pricingStartDate");
     
     if (pricingStartDateNode != null)
     {
         if (pricingStartDateNode.Attributes["href"] != null || pricingStartDateNode.Attributes["id"] != null) 
         {
             if (pricingStartDateNode.Attributes["id"] != null) 
             {
                 pricingStartDateIDRef_ = pricingStartDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(pricingStartDateNode);
                 IDManager.SetID(pricingStartDateIDRef_, ob);
             }
             else if (pricingStartDateNode.Attributes["href"] != null)
             {
                 pricingStartDateIDRef_ = pricingStartDateNode.Attributes["href"].Value;
             }
             else
             {
                 pricingStartDate_ = new AdjustableDate(pricingStartDateNode);
             }
         }
         else
         {
             pricingStartDate_ = new AdjustableDate(pricingStartDateNode);
         }
     }
     
 
     XmlNode calculationNode = xmlNode.SelectSingleNode("calculation");
     
     if (calculationNode != null)
     {
         if (calculationNode.Attributes["href"] != null || calculationNode.Attributes["id"] != null) 
         {
             if (calculationNode.Attributes["id"] != null) 
             {
                 calculationIDRef_ = calculationNode.Attributes["id"].Value;
                 FloatingLegCalculation ob = new FloatingLegCalculation(calculationNode);
                 IDManager.SetID(calculationIDRef_, ob);
             }
             else if (calculationNode.Attributes["href"] != null)
             {
                 calculationIDRef_ = calculationNode.Attributes["href"].Value;
             }
             else
             {
                 calculation_ = new FloatingLegCalculation(calculationNode);
             }
         }
         else
         {
             calculation_ = new FloatingLegCalculation(calculationNode);
         }
     }
     
 
     XmlNode relativePaymentDatesNode = xmlNode.SelectSingleNode("relativePaymentDates");
     
     if (relativePaymentDatesNode != null)
     {
         if (relativePaymentDatesNode.Attributes["href"] != null || relativePaymentDatesNode.Attributes["id"] != null) 
         {
             if (relativePaymentDatesNode.Attributes["id"] != null) 
             {
                 relativePaymentDatesIDRef_ = relativePaymentDatesNode.Attributes["id"].Value;
                 CommodityRelativePaymentDates ob = new CommodityRelativePaymentDates(relativePaymentDatesNode);
                 IDManager.SetID(relativePaymentDatesIDRef_, ob);
             }
             else if (relativePaymentDatesNode.Attributes["href"] != null)
             {
                 relativePaymentDatesIDRef_ = relativePaymentDatesNode.Attributes["href"].Value;
             }
             else
             {
                 relativePaymentDates_ = new CommodityRelativePaymentDates(relativePaymentDatesNode);
             }
         }
         else
         {
             relativePaymentDates_ = new CommodityRelativePaymentDates(relativePaymentDatesNode);
         }
     }
     
 
     XmlNode paymentDatesNode = xmlNode.SelectSingleNode("paymentDates");
     
     if (paymentDatesNode != null)
     {
         if (paymentDatesNode.Attributes["href"] != null || paymentDatesNode.Attributes["id"] != null) 
         {
             if (paymentDatesNode.Attributes["id"] != null) 
             {
                 paymentDatesIDRef_ = paymentDatesNode.Attributes["id"].Value;
                 AdjustableDatesOrRelativeDateOffset ob = new AdjustableDatesOrRelativeDateOffset(paymentDatesNode);
                 IDManager.SetID(paymentDatesIDRef_, ob);
             }
             else if (paymentDatesNode.Attributes["href"] != null)
             {
                 paymentDatesIDRef_ = paymentDatesNode.Attributes["href"].Value;
             }
             else
             {
                 paymentDates_ = new AdjustableDatesOrRelativeDateOffset(paymentDatesNode);
             }
         }
         else
         {
             paymentDates_ = new AdjustableDatesOrRelativeDateOffset(paymentDatesNode);
         }
     }
     
 
     XmlNode masterAgreementPaymentDatesNode = xmlNode.SelectSingleNode("masterAgreementPaymentDates");
     
     if (masterAgreementPaymentDatesNode != null)
     {
         if (masterAgreementPaymentDatesNode.Attributes["href"] != null || masterAgreementPaymentDatesNode.Attributes["id"] != null) 
         {
             if (masterAgreementPaymentDatesNode.Attributes["id"] != null) 
             {
                 masterAgreementPaymentDatesIDRef_ = masterAgreementPaymentDatesNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(masterAgreementPaymentDatesNode);
                 IDManager.SetID(masterAgreementPaymentDatesIDRef_, ob);
             }
             else if (masterAgreementPaymentDatesNode.Attributes["href"] != null)
             {
                 masterAgreementPaymentDatesIDRef_ = masterAgreementPaymentDatesNode.Attributes["href"].Value;
             }
             else
             {
                 masterAgreementPaymentDates_ = new XsdTypeBoolean(masterAgreementPaymentDatesNode);
             }
         }
         else
         {
             masterAgreementPaymentDates_ = new XsdTypeBoolean(masterAgreementPaymentDatesNode);
         }
     }
     
 
 }
Пример #18
0
 public Fra(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode buyerPartyReferenceNode = xmlNode.SelectSingleNode("buyerPartyReference");
     
     if (buyerPartyReferenceNode != null)
     {
         if (buyerPartyReferenceNode.Attributes["href"] != null || buyerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (buyerPartyReferenceNode.Attributes["id"] != null) 
             {
                 buyerPartyReferenceIDRef_ = buyerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(buyerPartyReferenceNode);
                 IDManager.SetID(buyerPartyReferenceIDRef_, ob);
             }
             else if (buyerPartyReferenceNode.Attributes["href"] != null)
             {
                 buyerPartyReferenceIDRef_ = buyerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 buyerPartyReference_ = new PartyReference(buyerPartyReferenceNode);
             }
         }
         else
         {
             buyerPartyReference_ = new PartyReference(buyerPartyReferenceNode);
         }
     }
     
 
     XmlNode buyerAccountReferenceNode = xmlNode.SelectSingleNode("buyerAccountReference");
     
     if (buyerAccountReferenceNode != null)
     {
         if (buyerAccountReferenceNode.Attributes["href"] != null || buyerAccountReferenceNode.Attributes["id"] != null) 
         {
             if (buyerAccountReferenceNode.Attributes["id"] != null) 
             {
                 buyerAccountReferenceIDRef_ = buyerAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(buyerAccountReferenceNode);
                 IDManager.SetID(buyerAccountReferenceIDRef_, ob);
             }
             else if (buyerAccountReferenceNode.Attributes["href"] != null)
             {
                 buyerAccountReferenceIDRef_ = buyerAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 buyerAccountReference_ = new AccountReference(buyerAccountReferenceNode);
             }
         }
         else
         {
             buyerAccountReference_ = new AccountReference(buyerAccountReferenceNode);
         }
     }
     
 
     XmlNode sellerPartyReferenceNode = xmlNode.SelectSingleNode("sellerPartyReference");
     
     if (sellerPartyReferenceNode != null)
     {
         if (sellerPartyReferenceNode.Attributes["href"] != null || sellerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (sellerPartyReferenceNode.Attributes["id"] != null) 
             {
                 sellerPartyReferenceIDRef_ = sellerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(sellerPartyReferenceNode);
                 IDManager.SetID(sellerPartyReferenceIDRef_, ob);
             }
             else if (sellerPartyReferenceNode.Attributes["href"] != null)
             {
                 sellerPartyReferenceIDRef_ = sellerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 sellerPartyReference_ = new PartyReference(sellerPartyReferenceNode);
             }
         }
         else
         {
             sellerPartyReference_ = new PartyReference(sellerPartyReferenceNode);
         }
     }
     
 
     XmlNode sellerAccountReferenceNode = xmlNode.SelectSingleNode("sellerAccountReference");
     
     if (sellerAccountReferenceNode != null)
     {
         if (sellerAccountReferenceNode.Attributes["href"] != null || sellerAccountReferenceNode.Attributes["id"] != null) 
         {
             if (sellerAccountReferenceNode.Attributes["id"] != null) 
             {
                 sellerAccountReferenceIDRef_ = sellerAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(sellerAccountReferenceNode);
                 IDManager.SetID(sellerAccountReferenceIDRef_, ob);
             }
             else if (sellerAccountReferenceNode.Attributes["href"] != null)
             {
                 sellerAccountReferenceIDRef_ = sellerAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 sellerAccountReference_ = new AccountReference(sellerAccountReferenceNode);
             }
         }
         else
         {
             sellerAccountReference_ = new AccountReference(sellerAccountReferenceNode);
         }
     }
     
 
     XmlNode adjustedEffectiveDateNode = xmlNode.SelectSingleNode("adjustedEffectiveDate");
     
     if (adjustedEffectiveDateNode != null)
     {
         if (adjustedEffectiveDateNode.Attributes["href"] != null || adjustedEffectiveDateNode.Attributes["id"] != null) 
         {
             if (adjustedEffectiveDateNode.Attributes["id"] != null) 
             {
                 adjustedEffectiveDateIDRef_ = adjustedEffectiveDateNode.Attributes["id"].Value;
                 RequiredIdentifierDate ob = new RequiredIdentifierDate(adjustedEffectiveDateNode);
                 IDManager.SetID(adjustedEffectiveDateIDRef_, ob);
             }
             else if (adjustedEffectiveDateNode.Attributes["href"] != null)
             {
                 adjustedEffectiveDateIDRef_ = adjustedEffectiveDateNode.Attributes["href"].Value;
             }
             else
             {
                 adjustedEffectiveDate_ = new RequiredIdentifierDate(adjustedEffectiveDateNode);
             }
         }
         else
         {
             adjustedEffectiveDate_ = new RequiredIdentifierDate(adjustedEffectiveDateNode);
         }
     }
     
 
     XmlNode adjustedTerminationDateNode = xmlNode.SelectSingleNode("adjustedTerminationDate");
     
     if (adjustedTerminationDateNode != null)
     {
         if (adjustedTerminationDateNode.Attributes["href"] != null || adjustedTerminationDateNode.Attributes["id"] != null) 
         {
             if (adjustedTerminationDateNode.Attributes["id"] != null) 
             {
                 adjustedTerminationDateIDRef_ = adjustedTerminationDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(adjustedTerminationDateNode);
                 IDManager.SetID(adjustedTerminationDateIDRef_, ob);
             }
             else if (adjustedTerminationDateNode.Attributes["href"] != null)
             {
                 adjustedTerminationDateIDRef_ = adjustedTerminationDateNode.Attributes["href"].Value;
             }
             else
             {
                 adjustedTerminationDate_ = new XsdTypeDate(adjustedTerminationDateNode);
             }
         }
         else
         {
             adjustedTerminationDate_ = new XsdTypeDate(adjustedTerminationDateNode);
         }
     }
     
 
     XmlNode paymentDateNode = xmlNode.SelectSingleNode("paymentDate");
     
     if (paymentDateNode != null)
     {
         if (paymentDateNode.Attributes["href"] != null || paymentDateNode.Attributes["id"] != null) 
         {
             if (paymentDateNode.Attributes["id"] != null) 
             {
                 paymentDateIDRef_ = paymentDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(paymentDateNode);
                 IDManager.SetID(paymentDateIDRef_, ob);
             }
             else if (paymentDateNode.Attributes["href"] != null)
             {
                 paymentDateIDRef_ = paymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 paymentDate_ = new AdjustableDate(paymentDateNode);
             }
         }
         else
         {
             paymentDate_ = new AdjustableDate(paymentDateNode);
         }
     }
     
 
     XmlNode fixingDateOffsetNode = xmlNode.SelectSingleNode("fixingDateOffset");
     
     if (fixingDateOffsetNode != null)
     {
         if (fixingDateOffsetNode.Attributes["href"] != null || fixingDateOffsetNode.Attributes["id"] != null) 
         {
             if (fixingDateOffsetNode.Attributes["id"] != null) 
             {
                 fixingDateOffsetIDRef_ = fixingDateOffsetNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(fixingDateOffsetNode);
                 IDManager.SetID(fixingDateOffsetIDRef_, ob);
             }
             else if (fixingDateOffsetNode.Attributes["href"] != null)
             {
                 fixingDateOffsetIDRef_ = fixingDateOffsetNode.Attributes["href"].Value;
             }
             else
             {
                 fixingDateOffset_ = new RelativeDateOffset(fixingDateOffsetNode);
             }
         }
         else
         {
             fixingDateOffset_ = new RelativeDateOffset(fixingDateOffsetNode);
         }
     }
     
 
     XmlNode dayCountFractionNode = xmlNode.SelectSingleNode("dayCountFraction");
     
     if (dayCountFractionNode != null)
     {
         if (dayCountFractionNode.Attributes["href"] != null || dayCountFractionNode.Attributes["id"] != null) 
         {
             if (dayCountFractionNode.Attributes["id"] != null) 
             {
                 dayCountFractionIDRef_ = dayCountFractionNode.Attributes["id"].Value;
                 DayCountFraction ob = new DayCountFraction(dayCountFractionNode);
                 IDManager.SetID(dayCountFractionIDRef_, ob);
             }
             else if (dayCountFractionNode.Attributes["href"] != null)
             {
                 dayCountFractionIDRef_ = dayCountFractionNode.Attributes["href"].Value;
             }
             else
             {
                 dayCountFraction_ = new DayCountFraction(dayCountFractionNode);
             }
         }
         else
         {
             dayCountFraction_ = new DayCountFraction(dayCountFractionNode);
         }
     }
     
 
     XmlNode calculationPeriodNumberOfDaysNode = xmlNode.SelectSingleNode("calculationPeriodNumberOfDays");
     
     if (calculationPeriodNumberOfDaysNode != null)
     {
         if (calculationPeriodNumberOfDaysNode.Attributes["href"] != null || calculationPeriodNumberOfDaysNode.Attributes["id"] != null) 
         {
             if (calculationPeriodNumberOfDaysNode.Attributes["id"] != null) 
             {
                 calculationPeriodNumberOfDaysIDRef_ = calculationPeriodNumberOfDaysNode.Attributes["id"].Value;
                 XsdTypePositiveInteger ob = new XsdTypePositiveInteger(calculationPeriodNumberOfDaysNode);
                 IDManager.SetID(calculationPeriodNumberOfDaysIDRef_, ob);
             }
             else if (calculationPeriodNumberOfDaysNode.Attributes["href"] != null)
             {
                 calculationPeriodNumberOfDaysIDRef_ = calculationPeriodNumberOfDaysNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodNumberOfDays_ = new XsdTypePositiveInteger(calculationPeriodNumberOfDaysNode);
             }
         }
         else
         {
             calculationPeriodNumberOfDays_ = new XsdTypePositiveInteger(calculationPeriodNumberOfDaysNode);
         }
     }
     
 
     XmlNode notionalNode = xmlNode.SelectSingleNode("notional");
     
     if (notionalNode != null)
     {
         if (notionalNode.Attributes["href"] != null || notionalNode.Attributes["id"] != null) 
         {
             if (notionalNode.Attributes["id"] != null) 
             {
                 notionalIDRef_ = notionalNode.Attributes["id"].Value;
                 Money ob = new Money(notionalNode);
                 IDManager.SetID(notionalIDRef_, ob);
             }
             else if (notionalNode.Attributes["href"] != null)
             {
                 notionalIDRef_ = notionalNode.Attributes["href"].Value;
             }
             else
             {
                 notional_ = new Money(notionalNode);
             }
         }
         else
         {
             notional_ = new Money(notionalNode);
         }
     }
     
 
     XmlNode fixedRateNode = xmlNode.SelectSingleNode("fixedRate");
     
     if (fixedRateNode != null)
     {
         if (fixedRateNode.Attributes["href"] != null || fixedRateNode.Attributes["id"] != null) 
         {
             if (fixedRateNode.Attributes["id"] != null) 
             {
                 fixedRateIDRef_ = fixedRateNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(fixedRateNode);
                 IDManager.SetID(fixedRateIDRef_, ob);
             }
             else if (fixedRateNode.Attributes["href"] != null)
             {
                 fixedRateIDRef_ = fixedRateNode.Attributes["href"].Value;
             }
             else
             {
                 fixedRate_ = new XsdTypeDecimal(fixedRateNode);
             }
         }
         else
         {
             fixedRate_ = new XsdTypeDecimal(fixedRateNode);
         }
     }
     
 
     XmlNode floatingRateIndexNode = xmlNode.SelectSingleNode("floatingRateIndex");
     
     if (floatingRateIndexNode != null)
     {
         if (floatingRateIndexNode.Attributes["href"] != null || floatingRateIndexNode.Attributes["id"] != null) 
         {
             if (floatingRateIndexNode.Attributes["id"] != null) 
             {
                 floatingRateIndexIDRef_ = floatingRateIndexNode.Attributes["id"].Value;
                 FloatingRateIndex ob = new FloatingRateIndex(floatingRateIndexNode);
                 IDManager.SetID(floatingRateIndexIDRef_, ob);
             }
             else if (floatingRateIndexNode.Attributes["href"] != null)
             {
                 floatingRateIndexIDRef_ = floatingRateIndexNode.Attributes["href"].Value;
             }
             else
             {
                 floatingRateIndex_ = new FloatingRateIndex(floatingRateIndexNode);
             }
         }
         else
         {
             floatingRateIndex_ = new FloatingRateIndex(floatingRateIndexNode);
         }
     }
     
 
     XmlNodeList indexTenorNodeList = xmlNode.SelectNodes("indexTenor");
     
     if (indexTenorNodeList != null)
     {
         this.indexTenor_ = new List<Period>();
         foreach (XmlNode item in indexTenorNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     indexTenorIDRef_ = item.Attributes["id"].Value;
                     indexTenor_.Add(new Period(item));
                     IDManager.SetID(indexTenorIDRef_, indexTenor_[indexTenor_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     indexTenorIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 indexTenor_.Add(new Period(item));
                 }
             }
             else
             {
                 indexTenor_.Add(new Period(item));
             }
         }
     }
     
 
     XmlNode fraDiscountingNode = xmlNode.SelectSingleNode("fraDiscounting");
     
     if (fraDiscountingNode != null)
     {
         if (fraDiscountingNode.Attributes["href"] != null || fraDiscountingNode.Attributes["id"] != null) 
         {
             if (fraDiscountingNode.Attributes["id"] != null) 
             {
                 fraDiscountingIDRef_ = fraDiscountingNode.Attributes["id"].Value;
                 FraDiscountingEnum ob = new FraDiscountingEnum(fraDiscountingNode);
                 IDManager.SetID(fraDiscountingIDRef_, ob);
             }
             else if (fraDiscountingNode.Attributes["href"] != null)
             {
                 fraDiscountingIDRef_ = fraDiscountingNode.Attributes["href"].Value;
             }
             else
             {
                 fraDiscounting_ = new FraDiscountingEnum(fraDiscountingNode);
             }
         }
         else
         {
             fraDiscounting_ = new FraDiscountingEnum(fraDiscountingNode);
         }
     }
     
 
 }
 public DividendPaymentDate(XmlNode xmlNode)
 {
     XmlNode dividendDateReferenceNode = xmlNode.SelectSingleNode("dividendDateReference");
     
     if (dividendDateReferenceNode != null)
     {
         if (dividendDateReferenceNode.Attributes["href"] != null || dividendDateReferenceNode.Attributes["id"] != null) 
         {
             if (dividendDateReferenceNode.Attributes["id"] != null) 
             {
                 dividendDateReferenceIDRef_ = dividendDateReferenceNode.Attributes["id"].Value;
                 DividendDateReferenceEnum ob = new DividendDateReferenceEnum(dividendDateReferenceNode);
                 IDManager.SetID(dividendDateReferenceIDRef_, ob);
             }
             else if (dividendDateReferenceNode.Attributes["href"] != null)
             {
                 dividendDateReferenceIDRef_ = dividendDateReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 dividendDateReference_ = new DividendDateReferenceEnum(dividendDateReferenceNode);
             }
         }
         else
         {
             dividendDateReference_ = new DividendDateReferenceEnum(dividendDateReferenceNode);
         }
     }
     
 
     XmlNode paymentDateOffsetNode = xmlNode.SelectSingleNode("paymentDateOffset");
     
     if (paymentDateOffsetNode != null)
     {
         if (paymentDateOffsetNode.Attributes["href"] != null || paymentDateOffsetNode.Attributes["id"] != null) 
         {
             if (paymentDateOffsetNode.Attributes["id"] != null) 
             {
                 paymentDateOffsetIDRef_ = paymentDateOffsetNode.Attributes["id"].Value;
                 Offset ob = new Offset(paymentDateOffsetNode);
                 IDManager.SetID(paymentDateOffsetIDRef_, ob);
             }
             else if (paymentDateOffsetNode.Attributes["href"] != null)
             {
                 paymentDateOffsetIDRef_ = paymentDateOffsetNode.Attributes["href"].Value;
             }
             else
             {
                 paymentDateOffset_ = new Offset(paymentDateOffsetNode);
             }
         }
         else
         {
             paymentDateOffset_ = new Offset(paymentDateOffsetNode);
         }
     }
     
 
     XmlNode adjustableDateNode = xmlNode.SelectSingleNode("adjustableDate");
     
     if (adjustableDateNode != null)
     {
         if (adjustableDateNode.Attributes["href"] != null || adjustableDateNode.Attributes["id"] != null) 
         {
             if (adjustableDateNode.Attributes["id"] != null) 
             {
                 adjustableDateIDRef_ = adjustableDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(adjustableDateNode);
                 IDManager.SetID(adjustableDateIDRef_, ob);
             }
             else if (adjustableDateNode.Attributes["href"] != null)
             {
                 adjustableDateIDRef_ = adjustableDateNode.Attributes["href"].Value;
             }
             else
             {
                 adjustableDate_ = new AdjustableDate(adjustableDateNode);
             }
         }
         else
         {
             adjustableDate_ = new AdjustableDate(adjustableDateNode);
         }
     }
     
 
 }
 public CalculationPeriodDates(XmlNode xmlNode)
 {
     XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate");
     
     if (effectiveDateNode != null)
     {
         if (effectiveDateNode.Attributes["href"] != null || effectiveDateNode.Attributes["id"] != null) 
         {
             if (effectiveDateNode.Attributes["id"] != null) 
             {
                 effectiveDateIDRef_ = effectiveDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(effectiveDateNode);
                 IDManager.SetID(effectiveDateIDRef_, ob);
             }
             else if (effectiveDateNode.Attributes["href"] != null)
             {
                 effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value;
             }
             else
             {
                 effectiveDate_ = new AdjustableDate(effectiveDateNode);
             }
         }
         else
         {
             effectiveDate_ = new AdjustableDate(effectiveDateNode);
         }
     }
     
 
     XmlNode relativeEffectiveDateNode = xmlNode.SelectSingleNode("relativeEffectiveDate");
     
     if (relativeEffectiveDateNode != null)
     {
         if (relativeEffectiveDateNode.Attributes["href"] != null || relativeEffectiveDateNode.Attributes["id"] != null) 
         {
             if (relativeEffectiveDateNode.Attributes["id"] != null) 
             {
                 relativeEffectiveDateIDRef_ = relativeEffectiveDateNode.Attributes["id"].Value;
                 AdjustedRelativeDateOffset ob = new AdjustedRelativeDateOffset(relativeEffectiveDateNode);
                 IDManager.SetID(relativeEffectiveDateIDRef_, ob);
             }
             else if (relativeEffectiveDateNode.Attributes["href"] != null)
             {
                 relativeEffectiveDateIDRef_ = relativeEffectiveDateNode.Attributes["href"].Value;
             }
             else
             {
                 relativeEffectiveDate_ = new AdjustedRelativeDateOffset(relativeEffectiveDateNode);
             }
         }
         else
         {
             relativeEffectiveDate_ = new AdjustedRelativeDateOffset(relativeEffectiveDateNode);
         }
     }
     
 
     XmlNode terminationDateNode = xmlNode.SelectSingleNode("terminationDate");
     
     if (terminationDateNode != null)
     {
         if (terminationDateNode.Attributes["href"] != null || terminationDateNode.Attributes["id"] != null) 
         {
             if (terminationDateNode.Attributes["id"] != null) 
             {
                 terminationDateIDRef_ = terminationDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(terminationDateNode);
                 IDManager.SetID(terminationDateIDRef_, ob);
             }
             else if (terminationDateNode.Attributes["href"] != null)
             {
                 terminationDateIDRef_ = terminationDateNode.Attributes["href"].Value;
             }
             else
             {
                 terminationDate_ = new AdjustableDate(terminationDateNode);
             }
         }
         else
         {
             terminationDate_ = new AdjustableDate(terminationDateNode);
         }
     }
     
 
     XmlNode relativeTerminationDateNode = xmlNode.SelectSingleNode("relativeTerminationDate");
     
     if (relativeTerminationDateNode != null)
     {
         if (relativeTerminationDateNode.Attributes["href"] != null || relativeTerminationDateNode.Attributes["id"] != null) 
         {
             if (relativeTerminationDateNode.Attributes["id"] != null) 
             {
                 relativeTerminationDateIDRef_ = relativeTerminationDateNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(relativeTerminationDateNode);
                 IDManager.SetID(relativeTerminationDateIDRef_, ob);
             }
             else if (relativeTerminationDateNode.Attributes["href"] != null)
             {
                 relativeTerminationDateIDRef_ = relativeTerminationDateNode.Attributes["href"].Value;
             }
             else
             {
                 relativeTerminationDate_ = new RelativeDateOffset(relativeTerminationDateNode);
             }
         }
         else
         {
             relativeTerminationDate_ = new RelativeDateOffset(relativeTerminationDateNode);
         }
     }
     
 
     XmlNode calculationPeriodDatesAdjustmentsNode = xmlNode.SelectSingleNode("calculationPeriodDatesAdjustments");
     
     if (calculationPeriodDatesAdjustmentsNode != null)
     {
         if (calculationPeriodDatesAdjustmentsNode.Attributes["href"] != null || calculationPeriodDatesAdjustmentsNode.Attributes["id"] != null) 
         {
             if (calculationPeriodDatesAdjustmentsNode.Attributes["id"] != null) 
             {
                 calculationPeriodDatesAdjustmentsIDRef_ = calculationPeriodDatesAdjustmentsNode.Attributes["id"].Value;
                 BusinessDayAdjustments ob = new BusinessDayAdjustments(calculationPeriodDatesAdjustmentsNode);
                 IDManager.SetID(calculationPeriodDatesAdjustmentsIDRef_, ob);
             }
             else if (calculationPeriodDatesAdjustmentsNode.Attributes["href"] != null)
             {
                 calculationPeriodDatesAdjustmentsIDRef_ = calculationPeriodDatesAdjustmentsNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodDatesAdjustments_ = new BusinessDayAdjustments(calculationPeriodDatesAdjustmentsNode);
             }
         }
         else
         {
             calculationPeriodDatesAdjustments_ = new BusinessDayAdjustments(calculationPeriodDatesAdjustmentsNode);
         }
     }
     
 
     XmlNode firstPeriodStartDateNode = xmlNode.SelectSingleNode("firstPeriodStartDate");
     
     if (firstPeriodStartDateNode != null)
     {
         if (firstPeriodStartDateNode.Attributes["href"] != null || firstPeriodStartDateNode.Attributes["id"] != null) 
         {
             if (firstPeriodStartDateNode.Attributes["id"] != null) 
             {
                 firstPeriodStartDateIDRef_ = firstPeriodStartDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(firstPeriodStartDateNode);
                 IDManager.SetID(firstPeriodStartDateIDRef_, ob);
             }
             else if (firstPeriodStartDateNode.Attributes["href"] != null)
             {
                 firstPeriodStartDateIDRef_ = firstPeriodStartDateNode.Attributes["href"].Value;
             }
             else
             {
                 firstPeriodStartDate_ = new AdjustableDate(firstPeriodStartDateNode);
             }
         }
         else
         {
             firstPeriodStartDate_ = new AdjustableDate(firstPeriodStartDateNode);
         }
     }
     
 
     XmlNode firstRegularPeriodStartDateNode = xmlNode.SelectSingleNode("firstRegularPeriodStartDate");
     
     if (firstRegularPeriodStartDateNode != null)
     {
         if (firstRegularPeriodStartDateNode.Attributes["href"] != null || firstRegularPeriodStartDateNode.Attributes["id"] != null) 
         {
             if (firstRegularPeriodStartDateNode.Attributes["id"] != null) 
             {
                 firstRegularPeriodStartDateIDRef_ = firstRegularPeriodStartDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(firstRegularPeriodStartDateNode);
                 IDManager.SetID(firstRegularPeriodStartDateIDRef_, ob);
             }
             else if (firstRegularPeriodStartDateNode.Attributes["href"] != null)
             {
                 firstRegularPeriodStartDateIDRef_ = firstRegularPeriodStartDateNode.Attributes["href"].Value;
             }
             else
             {
                 firstRegularPeriodStartDate_ = new XsdTypeDate(firstRegularPeriodStartDateNode);
             }
         }
         else
         {
             firstRegularPeriodStartDate_ = new XsdTypeDate(firstRegularPeriodStartDateNode);
         }
     }
     
 
     XmlNode firstCompoundingPeriodEndDateNode = xmlNode.SelectSingleNode("firstCompoundingPeriodEndDate");
     
     if (firstCompoundingPeriodEndDateNode != null)
     {
         if (firstCompoundingPeriodEndDateNode.Attributes["href"] != null || firstCompoundingPeriodEndDateNode.Attributes["id"] != null) 
         {
             if (firstCompoundingPeriodEndDateNode.Attributes["id"] != null) 
             {
                 firstCompoundingPeriodEndDateIDRef_ = firstCompoundingPeriodEndDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(firstCompoundingPeriodEndDateNode);
                 IDManager.SetID(firstCompoundingPeriodEndDateIDRef_, ob);
             }
             else if (firstCompoundingPeriodEndDateNode.Attributes["href"] != null)
             {
                 firstCompoundingPeriodEndDateIDRef_ = firstCompoundingPeriodEndDateNode.Attributes["href"].Value;
             }
             else
             {
                 firstCompoundingPeriodEndDate_ = new XsdTypeDate(firstCompoundingPeriodEndDateNode);
             }
         }
         else
         {
             firstCompoundingPeriodEndDate_ = new XsdTypeDate(firstCompoundingPeriodEndDateNode);
         }
     }
     
 
     XmlNode lastRegularPeriodEndDateNode = xmlNode.SelectSingleNode("lastRegularPeriodEndDate");
     
     if (lastRegularPeriodEndDateNode != null)
     {
         if (lastRegularPeriodEndDateNode.Attributes["href"] != null || lastRegularPeriodEndDateNode.Attributes["id"] != null) 
         {
             if (lastRegularPeriodEndDateNode.Attributes["id"] != null) 
             {
                 lastRegularPeriodEndDateIDRef_ = lastRegularPeriodEndDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(lastRegularPeriodEndDateNode);
                 IDManager.SetID(lastRegularPeriodEndDateIDRef_, ob);
             }
             else if (lastRegularPeriodEndDateNode.Attributes["href"] != null)
             {
                 lastRegularPeriodEndDateIDRef_ = lastRegularPeriodEndDateNode.Attributes["href"].Value;
             }
             else
             {
                 lastRegularPeriodEndDate_ = new XsdTypeDate(lastRegularPeriodEndDateNode);
             }
         }
         else
         {
             lastRegularPeriodEndDate_ = new XsdTypeDate(lastRegularPeriodEndDateNode);
         }
     }
     
 
     XmlNode stubPeriodTypeNode = xmlNode.SelectSingleNode("stubPeriodType");
     
     if (stubPeriodTypeNode != null)
     {
         if (stubPeriodTypeNode.Attributes["href"] != null || stubPeriodTypeNode.Attributes["id"] != null) 
         {
             if (stubPeriodTypeNode.Attributes["id"] != null) 
             {
                 stubPeriodTypeIDRef_ = stubPeriodTypeNode.Attributes["id"].Value;
                 StubPeriodTypeEnum ob = new StubPeriodTypeEnum(stubPeriodTypeNode);
                 IDManager.SetID(stubPeriodTypeIDRef_, ob);
             }
             else if (stubPeriodTypeNode.Attributes["href"] != null)
             {
                 stubPeriodTypeIDRef_ = stubPeriodTypeNode.Attributes["href"].Value;
             }
             else
             {
                 stubPeriodType_ = new StubPeriodTypeEnum(stubPeriodTypeNode);
             }
         }
         else
         {
             stubPeriodType_ = new StubPeriodTypeEnum(stubPeriodTypeNode);
         }
     }
     
 
     XmlNode calculationPeriodFrequencyNode = xmlNode.SelectSingleNode("calculationPeriodFrequency");
     
     if (calculationPeriodFrequencyNode != null)
     {
         if (calculationPeriodFrequencyNode.Attributes["href"] != null || calculationPeriodFrequencyNode.Attributes["id"] != null) 
         {
             if (calculationPeriodFrequencyNode.Attributes["id"] != null) 
             {
                 calculationPeriodFrequencyIDRef_ = calculationPeriodFrequencyNode.Attributes["id"].Value;
                 CalculationPeriodFrequency ob = new CalculationPeriodFrequency(calculationPeriodFrequencyNode);
                 IDManager.SetID(calculationPeriodFrequencyIDRef_, ob);
             }
             else if (calculationPeriodFrequencyNode.Attributes["href"] != null)
             {
                 calculationPeriodFrequencyIDRef_ = calculationPeriodFrequencyNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodFrequency_ = new CalculationPeriodFrequency(calculationPeriodFrequencyNode);
             }
         }
         else
         {
             calculationPeriodFrequency_ = new CalculationPeriodFrequency(calculationPeriodFrequencyNode);
         }
     }
     
 
 }
Пример #21
0
 public Fra(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList buyerPartyReferenceNodeList = xmlNode.SelectNodes("buyerPartyReference");
     if (buyerPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in buyerPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 buyerPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(buyerPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 buyerPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 buyerPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList buyerAccountReferenceNodeList = xmlNode.SelectNodes("buyerAccountReference");
     if (buyerAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in buyerAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 buyerAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(buyerAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 buyerAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 buyerAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList sellerPartyReferenceNodeList = xmlNode.SelectNodes("sellerPartyReference");
     if (sellerPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in sellerPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 sellerPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(sellerPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 sellerPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 sellerPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList sellerAccountReferenceNodeList = xmlNode.SelectNodes("sellerAccountReference");
     if (sellerAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in sellerAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 sellerAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(sellerAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 sellerAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 sellerAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList adjustedEffectiveDateNodeList = xmlNode.SelectNodes("adjustedEffectiveDate");
     if (adjustedEffectiveDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in adjustedEffectiveDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 adjustedEffectiveDateIDRef = item.Attributes["id"].Name;
                 RequiredIdentifierDate ob = RequiredIdentifierDate();
                 IDManager.SetID(adjustedEffectiveDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 adjustedEffectiveDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 adjustedEffectiveDate = new RequiredIdentifierDate(item);
             }
         }
     }
     
 
     XmlNodeList adjustedTerminationDateNodeList = xmlNode.SelectNodes("adjustedTerminationDate");
     if (adjustedTerminationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in adjustedTerminationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 adjustedTerminationDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(adjustedTerminationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 adjustedTerminationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 adjustedTerminationDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList paymentDateNodeList = xmlNode.SelectNodes("paymentDate");
     if (paymentDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate ob = AdjustableDate();
                 IDManager.SetID(paymentDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentDate = new AdjustableDate(item);
             }
         }
     }
     
 
     XmlNodeList fixingDateOffsetNodeList = xmlNode.SelectNodes("fixingDateOffset");
     if (fixingDateOffsetNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fixingDateOffsetNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fixingDateOffsetIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(fixingDateOffsetIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixingDateOffsetIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixingDateOffset = new RelativeDateOffset(item);
             }
         }
     }
     
 
     XmlNodeList dayCountFractionNodeList = xmlNode.SelectNodes("dayCountFraction");
     if (dayCountFractionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in dayCountFractionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 dayCountFractionIDRef = item.Attributes["id"].Name;
                 DayCountFraction ob = DayCountFraction();
                 IDManager.SetID(dayCountFractionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 dayCountFractionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 dayCountFraction = new DayCountFraction(item);
             }
         }
     }
     
 
     XmlNodeList calculationPeriodNumberOfDaysNodeList = xmlNode.SelectNodes("calculationPeriodNumberOfDays");
     if (calculationPeriodNumberOfDaysNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodNumberOfDaysNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodNumberOfDaysIDRef = item.Attributes["id"].Name;
                 XsdTypePositiveInteger ob = XsdTypePositiveInteger();
                 IDManager.SetID(calculationPeriodNumberOfDaysIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodNumberOfDaysIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodNumberOfDays = new XsdTypePositiveInteger(item);
             }
         }
     }
     
 
     XmlNodeList notionalNodeList = xmlNode.SelectNodes("notional");
     if (notionalNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in notionalNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 notionalIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(notionalIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 notionalIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 notional = new Money(item);
             }
         }
     }
     
 
     XmlNodeList fixedRateNodeList = xmlNode.SelectNodes("fixedRate");
     if (fixedRateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fixedRateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fixedRateIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(fixedRateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixedRateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixedRate = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList floatingRateIndexNodeList = xmlNode.SelectNodes("floatingRateIndex");
     if (floatingRateIndexNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in floatingRateIndexNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 floatingRateIndexIDRef = item.Attributes["id"].Name;
                 FloatingRateIndex ob = FloatingRateIndex();
                 IDManager.SetID(floatingRateIndexIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 floatingRateIndexIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 floatingRateIndex = new FloatingRateIndex(item);
             }
         }
     }
     
 
     XmlNodeList indexTenorNodeList = xmlNode.SelectNodes("indexTenor");
     
     foreach (XmlNode item in indexTenorNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 indexTenorIDRef = item.Attributes["id"].Name;
                 List<Period> ob = new List<Period>();
                 ob.Add(new Period(item));
                 IDManager.SetID(indexTenorIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 indexTenorIDRef = item.Attributes["href"].Name;
             }
             else
             {
             indexTenor.Add(new Period(item));
             }
         }
     }
     
 
     XmlNodeList fraDiscountingNodeList = xmlNode.SelectNodes("fraDiscounting");
     if (fraDiscountingNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fraDiscountingNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fraDiscountingIDRef = item.Attributes["id"].Name;
                 FraDiscountingEnum ob = FraDiscountingEnum();
                 IDManager.SetID(fraDiscountingIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fraDiscountingIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fraDiscounting = new FraDiscountingEnum(item);
             }
         }
     }
     
 
 }
 public EquityPremium(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode payerPartyReferenceNode = xmlNode.SelectSingleNode("payerPartyReference");
     
     if (payerPartyReferenceNode != null)
     {
         if (payerPartyReferenceNode.Attributes["href"] != null || payerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (payerPartyReferenceNode.Attributes["id"] != null) 
             {
                 payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(payerPartyReferenceNode);
                 IDManager.SetID(payerPartyReferenceIDRef_, ob);
             }
             else if (payerPartyReferenceNode.Attributes["href"] != null)
             {
                 payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
             }
         }
         else
         {
             payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
         }
     }
     
 
     XmlNode payerAccountReferenceNode = xmlNode.SelectSingleNode("payerAccountReference");
     
     if (payerAccountReferenceNode != null)
     {
         if (payerAccountReferenceNode.Attributes["href"] != null || payerAccountReferenceNode.Attributes["id"] != null) 
         {
             if (payerAccountReferenceNode.Attributes["id"] != null) 
             {
                 payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(payerAccountReferenceNode);
                 IDManager.SetID(payerAccountReferenceIDRef_, ob);
             }
             else if (payerAccountReferenceNode.Attributes["href"] != null)
             {
                 payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
             }
         }
         else
         {
             payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
         }
     }
     
 
     XmlNode receiverPartyReferenceNode = xmlNode.SelectSingleNode("receiverPartyReference");
     
     if (receiverPartyReferenceNode != null)
     {
         if (receiverPartyReferenceNode.Attributes["href"] != null || receiverPartyReferenceNode.Attributes["id"] != null) 
         {
             if (receiverPartyReferenceNode.Attributes["id"] != null) 
             {
                 receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(receiverPartyReferenceNode);
                 IDManager.SetID(receiverPartyReferenceIDRef_, ob);
             }
             else if (receiverPartyReferenceNode.Attributes["href"] != null)
             {
                 receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
             }
         }
         else
         {
             receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
         }
     }
     
 
     XmlNode receiverAccountReferenceNode = xmlNode.SelectSingleNode("receiverAccountReference");
     
     if (receiverAccountReferenceNode != null)
     {
         if (receiverAccountReferenceNode.Attributes["href"] != null || receiverAccountReferenceNode.Attributes["id"] != null) 
         {
             if (receiverAccountReferenceNode.Attributes["id"] != null) 
             {
                 receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(receiverAccountReferenceNode);
                 IDManager.SetID(receiverAccountReferenceIDRef_, ob);
             }
             else if (receiverAccountReferenceNode.Attributes["href"] != null)
             {
                 receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
             }
         }
         else
         {
             receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
         }
     }
     
 
     XmlNode premiumTypeNode = xmlNode.SelectSingleNode("premiumType");
     
     if (premiumTypeNode != null)
     {
         if (premiumTypeNode.Attributes["href"] != null || premiumTypeNode.Attributes["id"] != null) 
         {
             if (premiumTypeNode.Attributes["id"] != null) 
             {
                 premiumTypeIDRef_ = premiumTypeNode.Attributes["id"].Value;
                 PremiumTypeEnum ob = new PremiumTypeEnum(premiumTypeNode);
                 IDManager.SetID(premiumTypeIDRef_, ob);
             }
             else if (premiumTypeNode.Attributes["href"] != null)
             {
                 premiumTypeIDRef_ = premiumTypeNode.Attributes["href"].Value;
             }
             else
             {
                 premiumType_ = new PremiumTypeEnum(premiumTypeNode);
             }
         }
         else
         {
             premiumType_ = new PremiumTypeEnum(premiumTypeNode);
         }
     }
     
 
     XmlNode paymentAmountNode = xmlNode.SelectSingleNode("paymentAmount");
     
     if (paymentAmountNode != null)
     {
         if (paymentAmountNode.Attributes["href"] != null || paymentAmountNode.Attributes["id"] != null) 
         {
             if (paymentAmountNode.Attributes["id"] != null) 
             {
                 paymentAmountIDRef_ = paymentAmountNode.Attributes["id"].Value;
                 NonNegativeMoney ob = new NonNegativeMoney(paymentAmountNode);
                 IDManager.SetID(paymentAmountIDRef_, ob);
             }
             else if (paymentAmountNode.Attributes["href"] != null)
             {
                 paymentAmountIDRef_ = paymentAmountNode.Attributes["href"].Value;
             }
             else
             {
                 paymentAmount_ = new NonNegativeMoney(paymentAmountNode);
             }
         }
         else
         {
             paymentAmount_ = new NonNegativeMoney(paymentAmountNode);
         }
     }
     
 
     XmlNode paymentDateNode = xmlNode.SelectSingleNode("paymentDate");
     
     if (paymentDateNode != null)
     {
         if (paymentDateNode.Attributes["href"] != null || paymentDateNode.Attributes["id"] != null) 
         {
             if (paymentDateNode.Attributes["id"] != null) 
             {
                 paymentDateIDRef_ = paymentDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(paymentDateNode);
                 IDManager.SetID(paymentDateIDRef_, ob);
             }
             else if (paymentDateNode.Attributes["href"] != null)
             {
                 paymentDateIDRef_ = paymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 paymentDate_ = new AdjustableDate(paymentDateNode);
             }
         }
         else
         {
             paymentDate_ = new AdjustableDate(paymentDateNode);
         }
     }
     
 
     XmlNode swapPremiumNode = xmlNode.SelectSingleNode("swapPremium");
     
     if (swapPremiumNode != null)
     {
         if (swapPremiumNode.Attributes["href"] != null || swapPremiumNode.Attributes["id"] != null) 
         {
             if (swapPremiumNode.Attributes["id"] != null) 
             {
                 swapPremiumIDRef_ = swapPremiumNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(swapPremiumNode);
                 IDManager.SetID(swapPremiumIDRef_, ob);
             }
             else if (swapPremiumNode.Attributes["href"] != null)
             {
                 swapPremiumIDRef_ = swapPremiumNode.Attributes["href"].Value;
             }
             else
             {
                 swapPremium_ = new XsdTypeBoolean(swapPremiumNode);
             }
         }
         else
         {
             swapPremium_ = new XsdTypeBoolean(swapPremiumNode);
         }
     }
     
 
     XmlNode pricePerOptionNode = xmlNode.SelectSingleNode("pricePerOption");
     
     if (pricePerOptionNode != null)
     {
         if (pricePerOptionNode.Attributes["href"] != null || pricePerOptionNode.Attributes["id"] != null) 
         {
             if (pricePerOptionNode.Attributes["id"] != null) 
             {
                 pricePerOptionIDRef_ = pricePerOptionNode.Attributes["id"].Value;
                 NonNegativeMoney ob = new NonNegativeMoney(pricePerOptionNode);
                 IDManager.SetID(pricePerOptionIDRef_, ob);
             }
             else if (pricePerOptionNode.Attributes["href"] != null)
             {
                 pricePerOptionIDRef_ = pricePerOptionNode.Attributes["href"].Value;
             }
             else
             {
                 pricePerOption_ = new NonNegativeMoney(pricePerOptionNode);
             }
         }
         else
         {
             pricePerOption_ = new NonNegativeMoney(pricePerOptionNode);
         }
     }
     
 
     XmlNode percentageOfNotionalNode = xmlNode.SelectSingleNode("percentageOfNotional");
     
     if (percentageOfNotionalNode != null)
     {
         if (percentageOfNotionalNode.Attributes["href"] != null || percentageOfNotionalNode.Attributes["id"] != null) 
         {
             if (percentageOfNotionalNode.Attributes["id"] != null) 
             {
                 percentageOfNotionalIDRef_ = percentageOfNotionalNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(percentageOfNotionalNode);
                 IDManager.SetID(percentageOfNotionalIDRef_, ob);
             }
             else if (percentageOfNotionalNode.Attributes["href"] != null)
             {
                 percentageOfNotionalIDRef_ = percentageOfNotionalNode.Attributes["href"].Value;
             }
             else
             {
                 percentageOfNotional_ = new NonNegativeDecimal(percentageOfNotionalNode);
             }
         }
         else
         {
             percentageOfNotional_ = new NonNegativeDecimal(percentageOfNotionalNode);
         }
     }
     
 
 }
Пример #23
0
        public PrePayment(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode payerPartyReferenceNode = xmlNode.SelectSingleNode("payerPartyReference");

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


            XmlNode payerAccountReferenceNode = xmlNode.SelectSingleNode("payerAccountReference");

            if (payerAccountReferenceNode != null)
            {
                if (payerAccountReferenceNode.Attributes["href"] != null || payerAccountReferenceNode.Attributes["id"] != null)
                {
                    if (payerAccountReferenceNode.Attributes["id"] != null)
                    {
                        payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["id"].Value;
                        AccountReference ob = new AccountReference(payerAccountReferenceNode);
                        IDManager.SetID(payerAccountReferenceIDRef_, ob);
                    }
                    else if (payerAccountReferenceNode.Attributes["href"] != null)
                    {
                        payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
                    }
                }
                else
                {
                    payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
                }
            }


            XmlNode receiverPartyReferenceNode = xmlNode.SelectSingleNode("receiverPartyReference");

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


            XmlNode receiverAccountReferenceNode = xmlNode.SelectSingleNode("receiverAccountReference");

            if (receiverAccountReferenceNode != null)
            {
                if (receiverAccountReferenceNode.Attributes["href"] != null || receiverAccountReferenceNode.Attributes["id"] != null)
                {
                    if (receiverAccountReferenceNode.Attributes["id"] != null)
                    {
                        receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["id"].Value;
                        AccountReference ob = new AccountReference(receiverAccountReferenceNode);
                        IDManager.SetID(receiverAccountReferenceIDRef_, ob);
                    }
                    else if (receiverAccountReferenceNode.Attributes["href"] != null)
                    {
                        receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
                    }
                }
                else
                {
                    receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
                }
            }


            XmlNode prePaymentNode = xmlNode.SelectSingleNode("prePayment");

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


            XmlNode prePaymentAmountNode = xmlNode.SelectSingleNode("prePaymentAmount");

            if (prePaymentAmountNode != null)
            {
                if (prePaymentAmountNode.Attributes["href"] != null || prePaymentAmountNode.Attributes["id"] != null)
                {
                    if (prePaymentAmountNode.Attributes["id"] != null)
                    {
                        prePaymentAmountIDRef_ = prePaymentAmountNode.Attributes["id"].Value;
                        NonNegativeMoney ob = new NonNegativeMoney(prePaymentAmountNode);
                        IDManager.SetID(prePaymentAmountIDRef_, ob);
                    }
                    else if (prePaymentAmountNode.Attributes["href"] != null)
                    {
                        prePaymentAmountIDRef_ = prePaymentAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        prePaymentAmount_ = new NonNegativeMoney(prePaymentAmountNode);
                    }
                }
                else
                {
                    prePaymentAmount_ = new NonNegativeMoney(prePaymentAmountNode);
                }
            }


            XmlNode prePaymentDateNode = xmlNode.SelectSingleNode("prePaymentDate");

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