コード例 #1
0
 public TradeNovationContent(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList newTradeIdentifierNodeList = xmlNode.SelectNodes("newTradeIdentifier");
     
     foreach (XmlNode item in newTradeIdentifierNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 newTradeIdentifierIDRef = item.Attributes["id"].Name;
                 List<PartyTradeIdentifier> ob = new List<PartyTradeIdentifier>();
                 ob.Add(new PartyTradeIdentifier(item));
                 IDManager.SetID(newTradeIdentifierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 newTradeIdentifierIDRef = item.Attributes["href"].Name;
             }
             else
             {
             newTradeIdentifier.Add(new PartyTradeIdentifier(item));
             }
         }
     }
     
 
     XmlNodeList newTradeNodeList = xmlNode.SelectNodes("newTrade");
     if (newTradeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in newTradeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 newTradeIDRef = item.Attributes["id"].Name;
                 Trade ob = Trade();
                 IDManager.SetID(newTradeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 newTradeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 newTrade = new Trade(item);
             }
         }
     }
     
 
     XmlNodeList oldTradeIdentifierNodeList = xmlNode.SelectNodes("oldTradeIdentifier");
     
     foreach (XmlNode item in oldTradeIdentifierNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 oldTradeIdentifierIDRef = item.Attributes["id"].Name;
                 List<PartyTradeIdentifier> ob = new List<PartyTradeIdentifier>();
                 ob.Add(new PartyTradeIdentifier(item));
                 IDManager.SetID(oldTradeIdentifierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 oldTradeIdentifierIDRef = item.Attributes["href"].Name;
             }
             else
             {
             oldTradeIdentifier.Add(new PartyTradeIdentifier(item));
             }
         }
     }
     
 
     XmlNodeList oldTradeNodeList = xmlNode.SelectNodes("oldTrade");
     if (oldTradeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in oldTradeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 oldTradeIDRef = item.Attributes["id"].Name;
                 Trade ob = Trade();
                 IDManager.SetID(oldTradeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 oldTradeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 oldTrade = new Trade(item);
             }
         }
     }
     
 
     XmlNodeList feeTradeIdentifierNodeList = xmlNode.SelectNodes("feeTradeIdentifier");
     if (feeTradeIdentifierNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in feeTradeIdentifierNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 feeTradeIdentifierIDRef = item.Attributes["id"].Name;
                 PartyTradeIdentifier ob = PartyTradeIdentifier();
                 IDManager.SetID(feeTradeIdentifierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 feeTradeIdentifierIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 feeTradeIdentifier = new PartyTradeIdentifier(item);
             }
         }
     }
     
 
     XmlNodeList feeTradeNodeList = xmlNode.SelectNodes("feeTrade");
     if (feeTradeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in feeTradeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 feeTradeIDRef = item.Attributes["id"].Name;
                 Trade ob = Trade();
                 IDManager.SetID(feeTradeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 feeTradeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 feeTrade = new Trade(item);
             }
         }
     }
     
 
     XmlNodeList transferorNodeList = xmlNode.SelectNodes("transferor");
     if (transferorNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in transferorNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 transferorIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(transferorIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 transferorIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 transferor = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList transferorAccountNodeList = xmlNode.SelectNodes("transferorAccount");
     if (transferorAccountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in transferorAccountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 transferorAccountIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(transferorAccountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 transferorAccountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 transferorAccount = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList transfereeNodeList = xmlNode.SelectNodes("transferee");
     if (transfereeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in transfereeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 transfereeIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(transfereeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 transfereeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 transferee = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList otherTransfereeNodeList = xmlNode.SelectNodes("otherTransferee");
     if (otherTransfereeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in otherTransfereeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 otherTransfereeIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(otherTransfereeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 otherTransfereeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 otherTransferee = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList transfereeAccountNodeList = xmlNode.SelectNodes("transfereeAccount");
     if (transfereeAccountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in transfereeAccountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 transfereeAccountIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(transfereeAccountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 transfereeAccountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 transfereeAccount = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList otherTransfereeAccountNodeList = xmlNode.SelectNodes("otherTransfereeAccount");
     if (otherTransfereeAccountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in otherTransfereeAccountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 otherTransfereeAccountIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(otherTransfereeAccountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 otherTransfereeAccountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 otherTransfereeAccount = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList remainingPartyNodeList = xmlNode.SelectNodes("remainingParty");
     if (remainingPartyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in remainingPartyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 remainingPartyIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(remainingPartyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 remainingPartyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 remainingParty = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList remainingPartyAccountNodeList = xmlNode.SelectNodes("remainingPartyAccount");
     if (remainingPartyAccountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in remainingPartyAccountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 remainingPartyAccountIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(remainingPartyAccountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 remainingPartyAccountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 remainingPartyAccount = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList otherRemainingPartyNodeList = xmlNode.SelectNodes("otherRemainingParty");
     if (otherRemainingPartyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in otherRemainingPartyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 otherRemainingPartyIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(otherRemainingPartyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 otherRemainingPartyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 otherRemainingParty = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList otherRemainingPartyAccountNodeList = xmlNode.SelectNodes("otherRemainingPartyAccount");
     if (otherRemainingPartyAccountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in otherRemainingPartyAccountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 otherRemainingPartyAccountIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(otherRemainingPartyAccountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 otherRemainingPartyAccountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 otherRemainingPartyAccount = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList novationDateNodeList = xmlNode.SelectNodes("novationDate");
     if (novationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in novationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 novationDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(novationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 novationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 novationDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList executionDateTimeNodeList = xmlNode.SelectNodes("executionDateTime");
     if (executionDateTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in executionDateTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 executionDateTimeIDRef = item.Attributes["id"].Name;
                 ExecutionDateTime ob = ExecutionDateTime();
                 IDManager.SetID(executionDateTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 executionDateTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 executionDateTime = new ExecutionDateTime(item);
             }
         }
     }
     
 
     XmlNodeList novationTradeDateNodeList = xmlNode.SelectNodes("novationTradeDate");
     if (novationTradeDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in novationTradeDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 novationTradeDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(novationTradeDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 novationTradeDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 novationTradeDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList novatedAmountNodeList = xmlNode.SelectNodes("novatedAmount");
     
     foreach (XmlNode item in novatedAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 novatedAmountIDRef = item.Attributes["id"].Name;
                 List<Money> ob = new List<Money>();
                 ob.Add(new Money(item));
                 IDManager.SetID(novatedAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 novatedAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
             novatedAmount.Add(new Money(item));
             }
         }
     }
     
 
     XmlNodeList remainingAmountNodeList = xmlNode.SelectNodes("remainingAmount");
     
     foreach (XmlNode item in remainingAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 remainingAmountIDRef = item.Attributes["id"].Name;
                 List<Money> ob = new List<Money>();
                 ob.Add(new Money(item));
                 IDManager.SetID(remainingAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 remainingAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
             remainingAmount.Add(new Money(item));
             }
         }
     }
     
 
     XmlNodeList novatedNumberOfOptionsNodeList = xmlNode.SelectNodes("novatedNumberOfOptions");
     if (novatedNumberOfOptionsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in novatedNumberOfOptionsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 novatedNumberOfOptionsIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(novatedNumberOfOptionsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 novatedNumberOfOptionsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 novatedNumberOfOptions = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList remainingNumberOfOptionsNodeList = xmlNode.SelectNodes("remainingNumberOfOptions");
     if (remainingNumberOfOptionsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in remainingNumberOfOptionsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 remainingNumberOfOptionsIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(remainingNumberOfOptionsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 remainingNumberOfOptionsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 remainingNumberOfOptions = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList novatedNumberOfUnitsNodeList = xmlNode.SelectNodes("novatedNumberOfUnits");
     if (novatedNumberOfUnitsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in novatedNumberOfUnitsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 novatedNumberOfUnitsIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(novatedNumberOfUnitsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 novatedNumberOfUnitsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 novatedNumberOfUnits = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList remainingNumberOfUnitsNodeList = xmlNode.SelectNodes("remainingNumberOfUnits");
     if (remainingNumberOfUnitsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in remainingNumberOfUnitsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 remainingNumberOfUnitsIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(remainingNumberOfUnitsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 remainingNumberOfUnitsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 remainingNumberOfUnits = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList fullFirstCalculationPeriodNodeList = xmlNode.SelectNodes("fullFirstCalculationPeriod");
     if (fullFirstCalculationPeriodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fullFirstCalculationPeriodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fullFirstCalculationPeriodIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(fullFirstCalculationPeriodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fullFirstCalculationPeriodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fullFirstCalculationPeriod = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList firstPeriodStartDateNodeList = xmlNode.SelectNodes("firstPeriodStartDate");
     
     foreach (XmlNode item in firstPeriodStartDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 firstPeriodStartDateIDRef = item.Attributes["id"].Name;
                 List<FirstPeriodStartDate> ob = new List<FirstPeriodStartDate>();
                 ob.Add(new FirstPeriodStartDate(item));
                 IDManager.SetID(firstPeriodStartDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 firstPeriodStartDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
             firstPeriodStartDate.Add(new FirstPeriodStartDate(item));
             }
         }
     }
     
 
     XmlNodeList nonRelianceNodeList = xmlNode.SelectNodes("nonReliance");
     if (nonRelianceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in nonRelianceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 nonRelianceIDRef = item.Attributes["id"].Name;
                 Empty ob = Empty();
                 IDManager.SetID(nonRelianceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 nonRelianceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 nonReliance = new Empty(item);
             }
         }
     }
     
 
     XmlNodeList creditDerivativesNoticesNodeList = xmlNode.SelectNodes("creditDerivativesNotices");
     if (creditDerivativesNoticesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in creditDerivativesNoticesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 creditDerivativesNoticesIDRef = item.Attributes["id"].Name;
                 CreditDerivativesNotices ob = CreditDerivativesNotices();
                 IDManager.SetID(creditDerivativesNoticesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 creditDerivativesNoticesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 creditDerivativesNotices = new CreditDerivativesNotices(item);
             }
         }
     }
     
 
     XmlNodeList contractualDefinitionsNodeList = xmlNode.SelectNodes("contractualDefinitions");
     
     foreach (XmlNode item in contractualDefinitionsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 contractualDefinitionsIDRef = item.Attributes["id"].Name;
                 List<ContractualDefinitions> ob = new List<ContractualDefinitions>();
                 ob.Add(new ContractualDefinitions(item));
                 IDManager.SetID(contractualDefinitionsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 contractualDefinitionsIDRef = item.Attributes["href"].Name;
             }
             else
             {
             contractualDefinitions.Add(new ContractualDefinitions(item));
             }
         }
     }
     
 
     XmlNodeList contractualTermsSupplementNodeList = xmlNode.SelectNodes("contractualTermsSupplement");
     
     foreach (XmlNode item in contractualTermsSupplementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 contractualTermsSupplementIDRef = item.Attributes["id"].Name;
                 List<ContractualTermsSupplement> ob = new List<ContractualTermsSupplement>();
                 ob.Add(new ContractualTermsSupplement(item));
                 IDManager.SetID(contractualTermsSupplementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 contractualTermsSupplementIDRef = item.Attributes["href"].Name;
             }
             else
             {
             contractualTermsSupplement.Add(new ContractualTermsSupplement(item));
             }
         }
     }
     
 
     XmlNodeList paymentNodeList = xmlNode.SelectNodes("payment");
     if (paymentNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentIDRef = item.Attributes["id"].Name;
                 Payment ob = Payment();
                 IDManager.SetID(paymentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payment = new Payment(item);
             }
         }
     }
     
 
 }
コード例 #2
0
 public TradeNovationContent(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList newTradeIdentifierNodeList = xmlNode.SelectNodes("newTradeIdentifier");
     
     if (newTradeIdentifierNodeList != null)
     {
         this.newTradeIdentifier_ = new List<PartyTradeIdentifier>();
         foreach (XmlNode item in newTradeIdentifierNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     newTradeIdentifierIDRef_ = item.Attributes["id"].Value;
                     newTradeIdentifier_.Add(new PartyTradeIdentifier(item));
                     IDManager.SetID(newTradeIdentifierIDRef_, newTradeIdentifier_[newTradeIdentifier_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     newTradeIdentifierIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 newTradeIdentifier_.Add(new PartyTradeIdentifier(item));
                 }
             }
             else
             {
                 newTradeIdentifier_.Add(new PartyTradeIdentifier(item));
             }
         }
     }
     
 
     XmlNode newTradeNode = xmlNode.SelectSingleNode("newTrade");
     
     if (newTradeNode != null)
     {
         if (newTradeNode.Attributes["href"] != null || newTradeNode.Attributes["id"] != null) 
         {
             if (newTradeNode.Attributes["id"] != null) 
             {
                 newTradeIDRef_ = newTradeNode.Attributes["id"].Value;
                 Trade ob = new Trade(newTradeNode);
                 IDManager.SetID(newTradeIDRef_, ob);
             }
             else if (newTradeNode.Attributes["href"] != null)
             {
                 newTradeIDRef_ = newTradeNode.Attributes["href"].Value;
             }
             else
             {
                 newTrade_ = new Trade(newTradeNode);
             }
         }
         else
         {
             newTrade_ = new Trade(newTradeNode);
         }
     }
     
 
     XmlNodeList oldTradeIdentifierNodeList = xmlNode.SelectNodes("oldTradeIdentifier");
     
     if (oldTradeIdentifierNodeList != null)
     {
         this.oldTradeIdentifier_ = new List<PartyTradeIdentifier>();
         foreach (XmlNode item in oldTradeIdentifierNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     oldTradeIdentifierIDRef_ = item.Attributes["id"].Value;
                     oldTradeIdentifier_.Add(new PartyTradeIdentifier(item));
                     IDManager.SetID(oldTradeIdentifierIDRef_, oldTradeIdentifier_[oldTradeIdentifier_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     oldTradeIdentifierIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 oldTradeIdentifier_.Add(new PartyTradeIdentifier(item));
                 }
             }
             else
             {
                 oldTradeIdentifier_.Add(new PartyTradeIdentifier(item));
             }
         }
     }
     
 
     XmlNode oldTradeNode = xmlNode.SelectSingleNode("oldTrade");
     
     if (oldTradeNode != null)
     {
         if (oldTradeNode.Attributes["href"] != null || oldTradeNode.Attributes["id"] != null) 
         {
             if (oldTradeNode.Attributes["id"] != null) 
             {
                 oldTradeIDRef_ = oldTradeNode.Attributes["id"].Value;
                 Trade ob = new Trade(oldTradeNode);
                 IDManager.SetID(oldTradeIDRef_, ob);
             }
             else if (oldTradeNode.Attributes["href"] != null)
             {
                 oldTradeIDRef_ = oldTradeNode.Attributes["href"].Value;
             }
             else
             {
                 oldTrade_ = new Trade(oldTradeNode);
             }
         }
         else
         {
             oldTrade_ = new Trade(oldTradeNode);
         }
     }
     
 
     XmlNode feeTradeIdentifierNode = xmlNode.SelectSingleNode("feeTradeIdentifier");
     
     if (feeTradeIdentifierNode != null)
     {
         if (feeTradeIdentifierNode.Attributes["href"] != null || feeTradeIdentifierNode.Attributes["id"] != null) 
         {
             if (feeTradeIdentifierNode.Attributes["id"] != null) 
             {
                 feeTradeIdentifierIDRef_ = feeTradeIdentifierNode.Attributes["id"].Value;
                 PartyTradeIdentifier ob = new PartyTradeIdentifier(feeTradeIdentifierNode);
                 IDManager.SetID(feeTradeIdentifierIDRef_, ob);
             }
             else if (feeTradeIdentifierNode.Attributes["href"] != null)
             {
                 feeTradeIdentifierIDRef_ = feeTradeIdentifierNode.Attributes["href"].Value;
             }
             else
             {
                 feeTradeIdentifier_ = new PartyTradeIdentifier(feeTradeIdentifierNode);
             }
         }
         else
         {
             feeTradeIdentifier_ = new PartyTradeIdentifier(feeTradeIdentifierNode);
         }
     }
     
 
     XmlNode feeTradeNode = xmlNode.SelectSingleNode("feeTrade");
     
     if (feeTradeNode != null)
     {
         if (feeTradeNode.Attributes["href"] != null || feeTradeNode.Attributes["id"] != null) 
         {
             if (feeTradeNode.Attributes["id"] != null) 
             {
                 feeTradeIDRef_ = feeTradeNode.Attributes["id"].Value;
                 Trade ob = new Trade(feeTradeNode);
                 IDManager.SetID(feeTradeIDRef_, ob);
             }
             else if (feeTradeNode.Attributes["href"] != null)
             {
                 feeTradeIDRef_ = feeTradeNode.Attributes["href"].Value;
             }
             else
             {
                 feeTrade_ = new Trade(feeTradeNode);
             }
         }
         else
         {
             feeTrade_ = new Trade(feeTradeNode);
         }
     }
     
 
     XmlNode transferorNode = xmlNode.SelectSingleNode("transferor");
     
     if (transferorNode != null)
     {
         if (transferorNode.Attributes["href"] != null || transferorNode.Attributes["id"] != null) 
         {
             if (transferorNode.Attributes["id"] != null) 
             {
                 transferorIDRef_ = transferorNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(transferorNode);
                 IDManager.SetID(transferorIDRef_, ob);
             }
             else if (transferorNode.Attributes["href"] != null)
             {
                 transferorIDRef_ = transferorNode.Attributes["href"].Value;
             }
             else
             {
                 transferor_ = new PartyReference(transferorNode);
             }
         }
         else
         {
             transferor_ = new PartyReference(transferorNode);
         }
     }
     
 
     XmlNode transferorAccountNode = xmlNode.SelectSingleNode("transferorAccount");
     
     if (transferorAccountNode != null)
     {
         if (transferorAccountNode.Attributes["href"] != null || transferorAccountNode.Attributes["id"] != null) 
         {
             if (transferorAccountNode.Attributes["id"] != null) 
             {
                 transferorAccountIDRef_ = transferorAccountNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(transferorAccountNode);
                 IDManager.SetID(transferorAccountIDRef_, ob);
             }
             else if (transferorAccountNode.Attributes["href"] != null)
             {
                 transferorAccountIDRef_ = transferorAccountNode.Attributes["href"].Value;
             }
             else
             {
                 transferorAccount_ = new AccountReference(transferorAccountNode);
             }
         }
         else
         {
             transferorAccount_ = new AccountReference(transferorAccountNode);
         }
     }
     
 
     XmlNode transfereeNode = xmlNode.SelectSingleNode("transferee");
     
     if (transfereeNode != null)
     {
         if (transfereeNode.Attributes["href"] != null || transfereeNode.Attributes["id"] != null) 
         {
             if (transfereeNode.Attributes["id"] != null) 
             {
                 transfereeIDRef_ = transfereeNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(transfereeNode);
                 IDManager.SetID(transfereeIDRef_, ob);
             }
             else if (transfereeNode.Attributes["href"] != null)
             {
                 transfereeIDRef_ = transfereeNode.Attributes["href"].Value;
             }
             else
             {
                 transferee_ = new PartyReference(transfereeNode);
             }
         }
         else
         {
             transferee_ = new PartyReference(transfereeNode);
         }
     }
     
 
     XmlNode otherTransfereeNode = xmlNode.SelectSingleNode("otherTransferee");
     
     if (otherTransfereeNode != null)
     {
         if (otherTransfereeNode.Attributes["href"] != null || otherTransfereeNode.Attributes["id"] != null) 
         {
             if (otherTransfereeNode.Attributes["id"] != null) 
             {
                 otherTransfereeIDRef_ = otherTransfereeNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(otherTransfereeNode);
                 IDManager.SetID(otherTransfereeIDRef_, ob);
             }
             else if (otherTransfereeNode.Attributes["href"] != null)
             {
                 otherTransfereeIDRef_ = otherTransfereeNode.Attributes["href"].Value;
             }
             else
             {
                 otherTransferee_ = new PartyReference(otherTransfereeNode);
             }
         }
         else
         {
             otherTransferee_ = new PartyReference(otherTransfereeNode);
         }
     }
     
 
     XmlNode transfereeAccountNode = xmlNode.SelectSingleNode("transfereeAccount");
     
     if (transfereeAccountNode != null)
     {
         if (transfereeAccountNode.Attributes["href"] != null || transfereeAccountNode.Attributes["id"] != null) 
         {
             if (transfereeAccountNode.Attributes["id"] != null) 
             {
                 transfereeAccountIDRef_ = transfereeAccountNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(transfereeAccountNode);
                 IDManager.SetID(transfereeAccountIDRef_, ob);
             }
             else if (transfereeAccountNode.Attributes["href"] != null)
             {
                 transfereeAccountIDRef_ = transfereeAccountNode.Attributes["href"].Value;
             }
             else
             {
                 transfereeAccount_ = new AccountReference(transfereeAccountNode);
             }
         }
         else
         {
             transfereeAccount_ = new AccountReference(transfereeAccountNode);
         }
     }
     
 
     XmlNode otherTransfereeAccountNode = xmlNode.SelectSingleNode("otherTransfereeAccount");
     
     if (otherTransfereeAccountNode != null)
     {
         if (otherTransfereeAccountNode.Attributes["href"] != null || otherTransfereeAccountNode.Attributes["id"] != null) 
         {
             if (otherTransfereeAccountNode.Attributes["id"] != null) 
             {
                 otherTransfereeAccountIDRef_ = otherTransfereeAccountNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(otherTransfereeAccountNode);
                 IDManager.SetID(otherTransfereeAccountIDRef_, ob);
             }
             else if (otherTransfereeAccountNode.Attributes["href"] != null)
             {
                 otherTransfereeAccountIDRef_ = otherTransfereeAccountNode.Attributes["href"].Value;
             }
             else
             {
                 otherTransfereeAccount_ = new AccountReference(otherTransfereeAccountNode);
             }
         }
         else
         {
             otherTransfereeAccount_ = new AccountReference(otherTransfereeAccountNode);
         }
     }
     
 
     XmlNode remainingPartyNode = xmlNode.SelectSingleNode("remainingParty");
     
     if (remainingPartyNode != null)
     {
         if (remainingPartyNode.Attributes["href"] != null || remainingPartyNode.Attributes["id"] != null) 
         {
             if (remainingPartyNode.Attributes["id"] != null) 
             {
                 remainingPartyIDRef_ = remainingPartyNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(remainingPartyNode);
                 IDManager.SetID(remainingPartyIDRef_, ob);
             }
             else if (remainingPartyNode.Attributes["href"] != null)
             {
                 remainingPartyIDRef_ = remainingPartyNode.Attributes["href"].Value;
             }
             else
             {
                 remainingParty_ = new PartyReference(remainingPartyNode);
             }
         }
         else
         {
             remainingParty_ = new PartyReference(remainingPartyNode);
         }
     }
     
 
     XmlNode remainingPartyAccountNode = xmlNode.SelectSingleNode("remainingPartyAccount");
     
     if (remainingPartyAccountNode != null)
     {
         if (remainingPartyAccountNode.Attributes["href"] != null || remainingPartyAccountNode.Attributes["id"] != null) 
         {
             if (remainingPartyAccountNode.Attributes["id"] != null) 
             {
                 remainingPartyAccountIDRef_ = remainingPartyAccountNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(remainingPartyAccountNode);
                 IDManager.SetID(remainingPartyAccountIDRef_, ob);
             }
             else if (remainingPartyAccountNode.Attributes["href"] != null)
             {
                 remainingPartyAccountIDRef_ = remainingPartyAccountNode.Attributes["href"].Value;
             }
             else
             {
                 remainingPartyAccount_ = new AccountReference(remainingPartyAccountNode);
             }
         }
         else
         {
             remainingPartyAccount_ = new AccountReference(remainingPartyAccountNode);
         }
     }
     
 
     XmlNode otherRemainingPartyNode = xmlNode.SelectSingleNode("otherRemainingParty");
     
     if (otherRemainingPartyNode != null)
     {
         if (otherRemainingPartyNode.Attributes["href"] != null || otherRemainingPartyNode.Attributes["id"] != null) 
         {
             if (otherRemainingPartyNode.Attributes["id"] != null) 
             {
                 otherRemainingPartyIDRef_ = otherRemainingPartyNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(otherRemainingPartyNode);
                 IDManager.SetID(otherRemainingPartyIDRef_, ob);
             }
             else if (otherRemainingPartyNode.Attributes["href"] != null)
             {
                 otherRemainingPartyIDRef_ = otherRemainingPartyNode.Attributes["href"].Value;
             }
             else
             {
                 otherRemainingParty_ = new PartyReference(otherRemainingPartyNode);
             }
         }
         else
         {
             otherRemainingParty_ = new PartyReference(otherRemainingPartyNode);
         }
     }
     
 
     XmlNode otherRemainingPartyAccountNode = xmlNode.SelectSingleNode("otherRemainingPartyAccount");
     
     if (otherRemainingPartyAccountNode != null)
     {
         if (otherRemainingPartyAccountNode.Attributes["href"] != null || otherRemainingPartyAccountNode.Attributes["id"] != null) 
         {
             if (otherRemainingPartyAccountNode.Attributes["id"] != null) 
             {
                 otherRemainingPartyAccountIDRef_ = otherRemainingPartyAccountNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(otherRemainingPartyAccountNode);
                 IDManager.SetID(otherRemainingPartyAccountIDRef_, ob);
             }
             else if (otherRemainingPartyAccountNode.Attributes["href"] != null)
             {
                 otherRemainingPartyAccountIDRef_ = otherRemainingPartyAccountNode.Attributes["href"].Value;
             }
             else
             {
                 otherRemainingPartyAccount_ = new AccountReference(otherRemainingPartyAccountNode);
             }
         }
         else
         {
             otherRemainingPartyAccount_ = new AccountReference(otherRemainingPartyAccountNode);
         }
     }
     
 
     XmlNode novationDateNode = xmlNode.SelectSingleNode("novationDate");
     
     if (novationDateNode != null)
     {
         if (novationDateNode.Attributes["href"] != null || novationDateNode.Attributes["id"] != null) 
         {
             if (novationDateNode.Attributes["id"] != null) 
             {
                 novationDateIDRef_ = novationDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(novationDateNode);
                 IDManager.SetID(novationDateIDRef_, ob);
             }
             else if (novationDateNode.Attributes["href"] != null)
             {
                 novationDateIDRef_ = novationDateNode.Attributes["href"].Value;
             }
             else
             {
                 novationDate_ = new XsdTypeDate(novationDateNode);
             }
         }
         else
         {
             novationDate_ = new XsdTypeDate(novationDateNode);
         }
     }
     
 
     XmlNode executionDateTimeNode = xmlNode.SelectSingleNode("executionDateTime");
     
     if (executionDateTimeNode != null)
     {
         if (executionDateTimeNode.Attributes["href"] != null || executionDateTimeNode.Attributes["id"] != null) 
         {
             if (executionDateTimeNode.Attributes["id"] != null) 
             {
                 executionDateTimeIDRef_ = executionDateTimeNode.Attributes["id"].Value;
                 ExecutionDateTime ob = new ExecutionDateTime(executionDateTimeNode);
                 IDManager.SetID(executionDateTimeIDRef_, ob);
             }
             else if (executionDateTimeNode.Attributes["href"] != null)
             {
                 executionDateTimeIDRef_ = executionDateTimeNode.Attributes["href"].Value;
             }
             else
             {
                 executionDateTime_ = new ExecutionDateTime(executionDateTimeNode);
             }
         }
         else
         {
             executionDateTime_ = new ExecutionDateTime(executionDateTimeNode);
         }
     }
     
 
     XmlNode novationTradeDateNode = xmlNode.SelectSingleNode("novationTradeDate");
     
     if (novationTradeDateNode != null)
     {
         if (novationTradeDateNode.Attributes["href"] != null || novationTradeDateNode.Attributes["id"] != null) 
         {
             if (novationTradeDateNode.Attributes["id"] != null) 
             {
                 novationTradeDateIDRef_ = novationTradeDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(novationTradeDateNode);
                 IDManager.SetID(novationTradeDateIDRef_, ob);
             }
             else if (novationTradeDateNode.Attributes["href"] != null)
             {
                 novationTradeDateIDRef_ = novationTradeDateNode.Attributes["href"].Value;
             }
             else
             {
                 novationTradeDate_ = new XsdTypeDate(novationTradeDateNode);
             }
         }
         else
         {
             novationTradeDate_ = new XsdTypeDate(novationTradeDateNode);
         }
     }
     
 
     XmlNodeList novatedAmountNodeList = xmlNode.SelectNodes("novatedAmount");
     
     if (novatedAmountNodeList != null)
     {
         this.novatedAmount_ = new List<Money>();
         foreach (XmlNode item in novatedAmountNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     novatedAmountIDRef_ = item.Attributes["id"].Value;
                     novatedAmount_.Add(new Money(item));
                     IDManager.SetID(novatedAmountIDRef_, novatedAmount_[novatedAmount_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     novatedAmountIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 novatedAmount_.Add(new Money(item));
                 }
             }
             else
             {
                 novatedAmount_.Add(new Money(item));
             }
         }
     }
     
 
     XmlNodeList remainingAmountNodeList = xmlNode.SelectNodes("remainingAmount");
     
     if (remainingAmountNodeList != null)
     {
         this.remainingAmount_ = new List<Money>();
         foreach (XmlNode item in remainingAmountNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     remainingAmountIDRef_ = item.Attributes["id"].Value;
                     remainingAmount_.Add(new Money(item));
                     IDManager.SetID(remainingAmountIDRef_, remainingAmount_[remainingAmount_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     remainingAmountIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 remainingAmount_.Add(new Money(item));
                 }
             }
             else
             {
                 remainingAmount_.Add(new Money(item));
             }
         }
     }
     
 
     XmlNode novatedNumberOfOptionsNode = xmlNode.SelectSingleNode("novatedNumberOfOptions");
     
     if (novatedNumberOfOptionsNode != null)
     {
         if (novatedNumberOfOptionsNode.Attributes["href"] != null || novatedNumberOfOptionsNode.Attributes["id"] != null) 
         {
             if (novatedNumberOfOptionsNode.Attributes["id"] != null) 
             {
                 novatedNumberOfOptionsIDRef_ = novatedNumberOfOptionsNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(novatedNumberOfOptionsNode);
                 IDManager.SetID(novatedNumberOfOptionsIDRef_, ob);
             }
             else if (novatedNumberOfOptionsNode.Attributes["href"] != null)
             {
                 novatedNumberOfOptionsIDRef_ = novatedNumberOfOptionsNode.Attributes["href"].Value;
             }
             else
             {
                 novatedNumberOfOptions_ = new XsdTypeDecimal(novatedNumberOfOptionsNode);
             }
         }
         else
         {
             novatedNumberOfOptions_ = new XsdTypeDecimal(novatedNumberOfOptionsNode);
         }
     }
     
 
     XmlNode remainingNumberOfOptionsNode = xmlNode.SelectSingleNode("remainingNumberOfOptions");
     
     if (remainingNumberOfOptionsNode != null)
     {
         if (remainingNumberOfOptionsNode.Attributes["href"] != null || remainingNumberOfOptionsNode.Attributes["id"] != null) 
         {
             if (remainingNumberOfOptionsNode.Attributes["id"] != null) 
             {
                 remainingNumberOfOptionsIDRef_ = remainingNumberOfOptionsNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(remainingNumberOfOptionsNode);
                 IDManager.SetID(remainingNumberOfOptionsIDRef_, ob);
             }
             else if (remainingNumberOfOptionsNode.Attributes["href"] != null)
             {
                 remainingNumberOfOptionsIDRef_ = remainingNumberOfOptionsNode.Attributes["href"].Value;
             }
             else
             {
                 remainingNumberOfOptions_ = new XsdTypeDecimal(remainingNumberOfOptionsNode);
             }
         }
         else
         {
             remainingNumberOfOptions_ = new XsdTypeDecimal(remainingNumberOfOptionsNode);
         }
     }
     
 
     XmlNode novatedNumberOfUnitsNode = xmlNode.SelectSingleNode("novatedNumberOfUnits");
     
     if (novatedNumberOfUnitsNode != null)
     {
         if (novatedNumberOfUnitsNode.Attributes["href"] != null || novatedNumberOfUnitsNode.Attributes["id"] != null) 
         {
             if (novatedNumberOfUnitsNode.Attributes["id"] != null) 
             {
                 novatedNumberOfUnitsIDRef_ = novatedNumberOfUnitsNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(novatedNumberOfUnitsNode);
                 IDManager.SetID(novatedNumberOfUnitsIDRef_, ob);
             }
             else if (novatedNumberOfUnitsNode.Attributes["href"] != null)
             {
                 novatedNumberOfUnitsIDRef_ = novatedNumberOfUnitsNode.Attributes["href"].Value;
             }
             else
             {
                 novatedNumberOfUnits_ = new XsdTypeDecimal(novatedNumberOfUnitsNode);
             }
         }
         else
         {
             novatedNumberOfUnits_ = new XsdTypeDecimal(novatedNumberOfUnitsNode);
         }
     }
     
 
     XmlNode remainingNumberOfUnitsNode = xmlNode.SelectSingleNode("remainingNumberOfUnits");
     
     if (remainingNumberOfUnitsNode != null)
     {
         if (remainingNumberOfUnitsNode.Attributes["href"] != null || remainingNumberOfUnitsNode.Attributes["id"] != null) 
         {
             if (remainingNumberOfUnitsNode.Attributes["id"] != null) 
             {
                 remainingNumberOfUnitsIDRef_ = remainingNumberOfUnitsNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(remainingNumberOfUnitsNode);
                 IDManager.SetID(remainingNumberOfUnitsIDRef_, ob);
             }
             else if (remainingNumberOfUnitsNode.Attributes["href"] != null)
             {
                 remainingNumberOfUnitsIDRef_ = remainingNumberOfUnitsNode.Attributes["href"].Value;
             }
             else
             {
                 remainingNumberOfUnits_ = new XsdTypeDecimal(remainingNumberOfUnitsNode);
             }
         }
         else
         {
             remainingNumberOfUnits_ = new XsdTypeDecimal(remainingNumberOfUnitsNode);
         }
     }
     
 
     XmlNode fullFirstCalculationPeriodNode = xmlNode.SelectSingleNode("fullFirstCalculationPeriod");
     
     if (fullFirstCalculationPeriodNode != null)
     {
         if (fullFirstCalculationPeriodNode.Attributes["href"] != null || fullFirstCalculationPeriodNode.Attributes["id"] != null) 
         {
             if (fullFirstCalculationPeriodNode.Attributes["id"] != null) 
             {
                 fullFirstCalculationPeriodIDRef_ = fullFirstCalculationPeriodNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(fullFirstCalculationPeriodNode);
                 IDManager.SetID(fullFirstCalculationPeriodIDRef_, ob);
             }
             else if (fullFirstCalculationPeriodNode.Attributes["href"] != null)
             {
                 fullFirstCalculationPeriodIDRef_ = fullFirstCalculationPeriodNode.Attributes["href"].Value;
             }
             else
             {
                 fullFirstCalculationPeriod_ = new XsdTypeBoolean(fullFirstCalculationPeriodNode);
             }
         }
         else
         {
             fullFirstCalculationPeriod_ = new XsdTypeBoolean(fullFirstCalculationPeriodNode);
         }
     }
     
 
     XmlNodeList firstPeriodStartDateNodeList = xmlNode.SelectNodes("firstPeriodStartDate");
     
     if (firstPeriodStartDateNodeList != null)
     {
         this.firstPeriodStartDate_ = new List<FirstPeriodStartDate>();
         foreach (XmlNode item in firstPeriodStartDateNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     firstPeriodStartDateIDRef_ = item.Attributes["id"].Value;
                     firstPeriodStartDate_.Add(new FirstPeriodStartDate(item));
                     IDManager.SetID(firstPeriodStartDateIDRef_, firstPeriodStartDate_[firstPeriodStartDate_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     firstPeriodStartDateIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 firstPeriodStartDate_.Add(new FirstPeriodStartDate(item));
                 }
             }
             else
             {
                 firstPeriodStartDate_.Add(new FirstPeriodStartDate(item));
             }
         }
     }
     
 
     XmlNode nonRelianceNode = xmlNode.SelectSingleNode("nonReliance");
     
     if (nonRelianceNode != null)
     {
         if (nonRelianceNode.Attributes["href"] != null || nonRelianceNode.Attributes["id"] != null) 
         {
             if (nonRelianceNode.Attributes["id"] != null) 
             {
                 nonRelianceIDRef_ = nonRelianceNode.Attributes["id"].Value;
                 Empty ob = new Empty(nonRelianceNode);
                 IDManager.SetID(nonRelianceIDRef_, ob);
             }
             else if (nonRelianceNode.Attributes["href"] != null)
             {
                 nonRelianceIDRef_ = nonRelianceNode.Attributes["href"].Value;
             }
             else
             {
                 nonReliance_ = new Empty(nonRelianceNode);
             }
         }
         else
         {
             nonReliance_ = new Empty(nonRelianceNode);
         }
     }
     
 
     XmlNode creditDerivativesNoticesNode = xmlNode.SelectSingleNode("creditDerivativesNotices");
     
     if (creditDerivativesNoticesNode != null)
     {
         if (creditDerivativesNoticesNode.Attributes["href"] != null || creditDerivativesNoticesNode.Attributes["id"] != null) 
         {
             if (creditDerivativesNoticesNode.Attributes["id"] != null) 
             {
                 creditDerivativesNoticesIDRef_ = creditDerivativesNoticesNode.Attributes["id"].Value;
                 CreditDerivativesNotices ob = new CreditDerivativesNotices(creditDerivativesNoticesNode);
                 IDManager.SetID(creditDerivativesNoticesIDRef_, ob);
             }
             else if (creditDerivativesNoticesNode.Attributes["href"] != null)
             {
                 creditDerivativesNoticesIDRef_ = creditDerivativesNoticesNode.Attributes["href"].Value;
             }
             else
             {
                 creditDerivativesNotices_ = new CreditDerivativesNotices(creditDerivativesNoticesNode);
             }
         }
         else
         {
             creditDerivativesNotices_ = new CreditDerivativesNotices(creditDerivativesNoticesNode);
         }
     }
     
 
     XmlNodeList contractualDefinitionsNodeList = xmlNode.SelectNodes("contractualDefinitions");
     
     if (contractualDefinitionsNodeList != null)
     {
         this.contractualDefinitions_ = new List<ContractualDefinitions>();
         foreach (XmlNode item in contractualDefinitionsNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     contractualDefinitionsIDRef_ = item.Attributes["id"].Value;
                     contractualDefinitions_.Add(new ContractualDefinitions(item));
                     IDManager.SetID(contractualDefinitionsIDRef_, contractualDefinitions_[contractualDefinitions_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     contractualDefinitionsIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 contractualDefinitions_.Add(new ContractualDefinitions(item));
                 }
             }
             else
             {
                 contractualDefinitions_.Add(new ContractualDefinitions(item));
             }
         }
     }
     
 
     XmlNodeList contractualTermsSupplementNodeList = xmlNode.SelectNodes("contractualTermsSupplement");
     
     if (contractualTermsSupplementNodeList != null)
     {
         this.contractualTermsSupplement_ = new List<ContractualTermsSupplement>();
         foreach (XmlNode item in contractualTermsSupplementNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     contractualTermsSupplementIDRef_ = item.Attributes["id"].Value;
                     contractualTermsSupplement_.Add(new ContractualTermsSupplement(item));
                     IDManager.SetID(contractualTermsSupplementIDRef_, contractualTermsSupplement_[contractualTermsSupplement_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     contractualTermsSupplementIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 contractualTermsSupplement_.Add(new ContractualTermsSupplement(item));
                 }
             }
             else
             {
                 contractualTermsSupplement_.Add(new ContractualTermsSupplement(item));
             }
         }
     }
     
 
     XmlNode paymentNode = xmlNode.SelectSingleNode("payment");
     
     if (paymentNode != null)
     {
         if (paymentNode.Attributes["href"] != null || paymentNode.Attributes["id"] != null) 
         {
             if (paymentNode.Attributes["id"] != null) 
             {
                 paymentIDRef_ = paymentNode.Attributes["id"].Value;
                 Payment ob = new Payment(paymentNode);
                 IDManager.SetID(paymentIDRef_, ob);
             }
             else if (paymentNode.Attributes["href"] != null)
             {
                 paymentIDRef_ = paymentNode.Attributes["href"].Value;
             }
             else
             {
                 payment_ = new Payment(paymentNode);
             }
         }
         else
         {
             payment_ = new Payment(paymentNode);
         }
     }
     
 
 }