public CoalAttributePercentage(XmlNode xmlNode)
        {
            XmlNodeList standardContentNodeList = xmlNode.SelectNodes("standardContent");

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

            foreach (XmlNode item in standardContentNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        standardContentIDRef = item.Attributes["id"].Name;
                        RestrictedPercentage ob = RestrictedPercentage();
                        IDManager.SetID(standardContentIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        standardContentIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        standardContent = new RestrictedPercentage(item);
                    }
                }
            }


            XmlNodeList rejectionLimitNodeList = xmlNode.SelectNodes("rejectionLimit");

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

            foreach (XmlNode item in rejectionLimitNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        rejectionLimitIDRef = item.Attributes["id"].Name;
                        RestrictedPercentage ob = RestrictedPercentage();
                        IDManager.SetID(rejectionLimitIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        rejectionLimitIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        rejectionLimit = new RestrictedPercentage(item);
                    }
                }
            }
        }
Пример #2
0
        public AverageDailyTradingVolumeLimit(XmlNode xmlNode)
        {
            XmlNodeList limitationPercentageNodeList = xmlNode.SelectNodes("limitationPercentage");

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

            foreach (XmlNode item in limitationPercentageNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        limitationPercentageIDRef = item.Attributes["id"].Name;
                        RestrictedPercentage ob = RestrictedPercentage();
                        IDManager.SetID(limitationPercentageIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        limitationPercentageIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        limitationPercentage = new RestrictedPercentage(item);
                    }
                }
            }


            XmlNodeList limitationPeriodNodeList = xmlNode.SelectNodes("limitationPeriod");

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

            foreach (XmlNode item in limitationPeriodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        limitationPeriodIDRef = item.Attributes["id"].Name;
                        XsdTypeNonNegativeInteger ob = XsdTypeNonNegativeInteger();
                        IDManager.SetID(limitationPeriodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        limitationPeriodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        limitationPeriod = new XsdTypeNonNegativeInteger(item);
                    }
                }
            }
        }
 public AverageDailyTradingVolumeLimit(XmlNode xmlNode)
 {
     XmlNode limitationPercentageNode = xmlNode.SelectSingleNode("limitationPercentage");
     
     if (limitationPercentageNode != null)
     {
         if (limitationPercentageNode.Attributes["href"] != null || limitationPercentageNode.Attributes["id"] != null) 
         {
             if (limitationPercentageNode.Attributes["id"] != null) 
             {
                 limitationPercentageIDRef_ = limitationPercentageNode.Attributes["id"].Value;
                 RestrictedPercentage ob = new RestrictedPercentage(limitationPercentageNode);
                 IDManager.SetID(limitationPercentageIDRef_, ob);
             }
             else if (limitationPercentageNode.Attributes["href"] != null)
             {
                 limitationPercentageIDRef_ = limitationPercentageNode.Attributes["href"].Value;
             }
             else
             {
                 limitationPercentage_ = new RestrictedPercentage(limitationPercentageNode);
             }
         }
         else
         {
             limitationPercentage_ = new RestrictedPercentage(limitationPercentageNode);
         }
     }
     
 
     XmlNode limitationPeriodNode = xmlNode.SelectSingleNode("limitationPeriod");
     
     if (limitationPeriodNode != null)
     {
         if (limitationPeriodNode.Attributes["href"] != null || limitationPeriodNode.Attributes["id"] != null) 
         {
             if (limitationPeriodNode.Attributes["id"] != null) 
             {
                 limitationPeriodIDRef_ = limitationPeriodNode.Attributes["id"].Value;
                 XsdTypeNonNegativeInteger ob = new XsdTypeNonNegativeInteger(limitationPeriodNode);
                 IDManager.SetID(limitationPeriodIDRef_, ob);
             }
             else if (limitationPeriodNode.Attributes["href"] != null)
             {
                 limitationPeriodIDRef_ = limitationPeriodNode.Attributes["href"].Value;
             }
             else
             {
                 limitationPeriod_ = new XsdTypeNonNegativeInteger(limitationPeriodNode);
             }
         }
         else
         {
             limitationPeriod_ = new XsdTypeNonNegativeInteger(limitationPeriodNode);
         }
     }
     
 
 }
 public CoalAttributePercentage(XmlNode xmlNode)
 {
     XmlNode standardContentNode = xmlNode.SelectSingleNode("standardContent");
     
     if (standardContentNode != null)
     {
         if (standardContentNode.Attributes["href"] != null || standardContentNode.Attributes["id"] != null) 
         {
             if (standardContentNode.Attributes["id"] != null) 
             {
                 standardContentIDRef_ = standardContentNode.Attributes["id"].Value;
                 RestrictedPercentage ob = new RestrictedPercentage(standardContentNode);
                 IDManager.SetID(standardContentIDRef_, ob);
             }
             else if (standardContentNode.Attributes["href"] != null)
             {
                 standardContentIDRef_ = standardContentNode.Attributes["href"].Value;
             }
             else
             {
                 standardContent_ = new RestrictedPercentage(standardContentNode);
             }
         }
         else
         {
             standardContent_ = new RestrictedPercentage(standardContentNode);
         }
     }
     
 
     XmlNode rejectionLimitNode = xmlNode.SelectSingleNode("rejectionLimit");
     
     if (rejectionLimitNode != null)
     {
         if (rejectionLimitNode.Attributes["href"] != null || rejectionLimitNode.Attributes["id"] != null) 
         {
             if (rejectionLimitNode.Attributes["id"] != null) 
             {
                 rejectionLimitIDRef_ = rejectionLimitNode.Attributes["id"].Value;
                 RestrictedPercentage ob = new RestrictedPercentage(rejectionLimitNode);
                 IDManager.SetID(rejectionLimitIDRef_, ob);
             }
             else if (rejectionLimitNode.Attributes["href"] != null)
             {
                 rejectionLimitIDRef_ = rejectionLimitNode.Attributes["href"].Value;
             }
             else
             {
                 rejectionLimit_ = new RestrictedPercentage(rejectionLimitNode);
             }
         }
         else
         {
             rejectionLimit_ = new RestrictedPercentage(rejectionLimitNode);
         }
     }
     
 
 }
        public AverageDailyTradingVolumeLimit(XmlNode xmlNode)
        {
            XmlNode limitationPercentageNode = xmlNode.SelectSingleNode("limitationPercentage");

            if (limitationPercentageNode != null)
            {
                if (limitationPercentageNode.Attributes["href"] != null || limitationPercentageNode.Attributes["id"] != null)
                {
                    if (limitationPercentageNode.Attributes["id"] != null)
                    {
                        limitationPercentageIDRef_ = limitationPercentageNode.Attributes["id"].Value;
                        RestrictedPercentage ob = new RestrictedPercentage(limitationPercentageNode);
                        IDManager.SetID(limitationPercentageIDRef_, ob);
                    }
                    else if (limitationPercentageNode.Attributes["href"] != null)
                    {
                        limitationPercentageIDRef_ = limitationPercentageNode.Attributes["href"].Value;
                    }
                    else
                    {
                        limitationPercentage_ = new RestrictedPercentage(limitationPercentageNode);
                    }
                }
                else
                {
                    limitationPercentage_ = new RestrictedPercentage(limitationPercentageNode);
                }
            }


            XmlNode limitationPeriodNode = xmlNode.SelectSingleNode("limitationPeriod");

            if (limitationPeriodNode != null)
            {
                if (limitationPeriodNode.Attributes["href"] != null || limitationPeriodNode.Attributes["id"] != null)
                {
                    if (limitationPeriodNode.Attributes["id"] != null)
                    {
                        limitationPeriodIDRef_ = limitationPeriodNode.Attributes["id"].Value;
                        XsdTypeNonNegativeInteger ob = new XsdTypeNonNegativeInteger(limitationPeriodNode);
                        IDManager.SetID(limitationPeriodIDRef_, ob);
                    }
                    else if (limitationPeriodNode.Attributes["href"] != null)
                    {
                        limitationPeriodIDRef_ = limitationPeriodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        limitationPeriod_ = new XsdTypeNonNegativeInteger(limitationPeriodNode);
                    }
                }
                else
                {
                    limitationPeriod_ = new XsdTypeNonNegativeInteger(limitationPeriodNode);
                }
            }
        }
Пример #6
0
        public CoalAttributePercentage(XmlNode xmlNode)
        {
            XmlNode standardContentNode = xmlNode.SelectSingleNode("standardContent");

            if (standardContentNode != null)
            {
                if (standardContentNode.Attributes["href"] != null || standardContentNode.Attributes["id"] != null)
                {
                    if (standardContentNode.Attributes["id"] != null)
                    {
                        standardContentIDRef_ = standardContentNode.Attributes["id"].Value;
                        RestrictedPercentage ob = new RestrictedPercentage(standardContentNode);
                        IDManager.SetID(standardContentIDRef_, ob);
                    }
                    else if (standardContentNode.Attributes["href"] != null)
                    {
                        standardContentIDRef_ = standardContentNode.Attributes["href"].Value;
                    }
                    else
                    {
                        standardContent_ = new RestrictedPercentage(standardContentNode);
                    }
                }
                else
                {
                    standardContent_ = new RestrictedPercentage(standardContentNode);
                }
            }


            XmlNode rejectionLimitNode = xmlNode.SelectSingleNode("rejectionLimit");

            if (rejectionLimitNode != null)
            {
                if (rejectionLimitNode.Attributes["href"] != null || rejectionLimitNode.Attributes["id"] != null)
                {
                    if (rejectionLimitNode.Attributes["id"] != null)
                    {
                        rejectionLimitIDRef_ = rejectionLimitNode.Attributes["id"].Value;
                        RestrictedPercentage ob = new RestrictedPercentage(rejectionLimitNode);
                        IDManager.SetID(rejectionLimitIDRef_, ob);
                    }
                    else if (rejectionLimitNode.Attributes["href"] != null)
                    {
                        rejectionLimitIDRef_ = rejectionLimitNode.Attributes["href"].Value;
                    }
                    else
                    {
                        rejectionLimit_ = new RestrictedPercentage(rejectionLimitNode);
                    }
                }
                else
                {
                    rejectionLimit_ = new RestrictedPercentage(rejectionLimitNode);
                }
            }
        }
 public ConstituentWeight(XmlNode xmlNode)
 {
     XmlNode openUnitsNode = xmlNode.SelectSingleNode("openUnits");
     
     if (openUnitsNode != null)
     {
         if (openUnitsNode.Attributes["href"] != null || openUnitsNode.Attributes["id"] != null) 
         {
             if (openUnitsNode.Attributes["id"] != null) 
             {
                 openUnitsIDRef_ = openUnitsNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(openUnitsNode);
                 IDManager.SetID(openUnitsIDRef_, ob);
             }
             else if (openUnitsNode.Attributes["href"] != null)
             {
                 openUnitsIDRef_ = openUnitsNode.Attributes["href"].Value;
             }
             else
             {
                 openUnits_ = new XsdTypeDecimal(openUnitsNode);
             }
         }
         else
         {
             openUnits_ = new XsdTypeDecimal(openUnitsNode);
         }
     }
     
 
     XmlNode basketPercentageNode = xmlNode.SelectSingleNode("basketPercentage");
     
     if (basketPercentageNode != null)
     {
         if (basketPercentageNode.Attributes["href"] != null || basketPercentageNode.Attributes["id"] != null) 
         {
             if (basketPercentageNode.Attributes["id"] != null) 
             {
                 basketPercentageIDRef_ = basketPercentageNode.Attributes["id"].Value;
                 RestrictedPercentage ob = new RestrictedPercentage(basketPercentageNode);
                 IDManager.SetID(basketPercentageIDRef_, ob);
             }
             else if (basketPercentageNode.Attributes["href"] != null)
             {
                 basketPercentageIDRef_ = basketPercentageNode.Attributes["href"].Value;
             }
             else
             {
                 basketPercentage_ = new RestrictedPercentage(basketPercentageNode);
             }
         }
         else
         {
             basketPercentage_ = new RestrictedPercentage(basketPercentageNode);
         }
     }
     
 
     XmlNode basketAmountNode = xmlNode.SelectSingleNode("basketAmount");
     
     if (basketAmountNode != null)
     {
         if (basketAmountNode.Attributes["href"] != null || basketAmountNode.Attributes["id"] != null) 
         {
             if (basketAmountNode.Attributes["id"] != null) 
             {
                 basketAmountIDRef_ = basketAmountNode.Attributes["id"].Value;
                 Money ob = new Money(basketAmountNode);
                 IDManager.SetID(basketAmountIDRef_, ob);
             }
             else if (basketAmountNode.Attributes["href"] != null)
             {
                 basketAmountIDRef_ = basketAmountNode.Attributes["href"].Value;
             }
             else
             {
                 basketAmount_ = new Money(basketAmountNode);
             }
         }
         else
         {
             basketAmount_ = new Money(basketAmountNode);
         }
     }
     
 
 }
 public PercentageTolerance(XmlNode xmlNode)
 {
     XmlNode postitiveNode = xmlNode.SelectSingleNode("postitive");
     
     if (postitiveNode != null)
     {
         if (postitiveNode.Attributes["href"] != null || postitiveNode.Attributes["id"] != null) 
         {
             if (postitiveNode.Attributes["id"] != null) 
             {
                 postitiveIDRef_ = postitiveNode.Attributes["id"].Value;
                 RestrictedPercentage ob = new RestrictedPercentage(postitiveNode);
                 IDManager.SetID(postitiveIDRef_, ob);
             }
             else if (postitiveNode.Attributes["href"] != null)
             {
                 postitiveIDRef_ = postitiveNode.Attributes["href"].Value;
             }
             else
             {
                 postitive_ = new RestrictedPercentage(postitiveNode);
             }
         }
         else
         {
             postitive_ = new RestrictedPercentage(postitiveNode);
         }
     }
     
 
     XmlNode negativeNode = xmlNode.SelectSingleNode("negative");
     
     if (negativeNode != null)
     {
         if (negativeNode.Attributes["href"] != null || negativeNode.Attributes["id"] != null) 
         {
             if (negativeNode.Attributes["id"] != null) 
             {
                 negativeIDRef_ = negativeNode.Attributes["id"].Value;
                 RestrictedPercentage ob = new RestrictedPercentage(negativeNode);
                 IDManager.SetID(negativeIDRef_, ob);
             }
             else if (negativeNode.Attributes["href"] != null)
             {
                 negativeIDRef_ = negativeNode.Attributes["href"].Value;
             }
             else
             {
                 negative_ = new RestrictedPercentage(negativeNode);
             }
         }
         else
         {
             negative_ = new RestrictedPercentage(negativeNode);
         }
     }
     
 
     XmlNode optionNode = xmlNode.SelectSingleNode("option");
     
     if (optionNode != null)
     {
         if (optionNode.Attributes["href"] != null || optionNode.Attributes["id"] != null) 
         {
             if (optionNode.Attributes["id"] != null) 
             {
                 optionIDRef_ = optionNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(optionNode);
                 IDManager.SetID(optionIDRef_, ob);
             }
             else if (optionNode.Attributes["href"] != null)
             {
                 optionIDRef_ = optionNode.Attributes["href"].Value;
             }
             else
             {
                 option_ = new PartyReference(optionNode);
             }
         }
         else
         {
             option_ = new PartyReference(optionNode);
         }
     }
     
 
 }
        public ConstituentWeight(XmlNode xmlNode)
        {
            XmlNode openUnitsNode = xmlNode.SelectSingleNode("openUnits");

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


            XmlNode basketPercentageNode = xmlNode.SelectSingleNode("basketPercentage");

            if (basketPercentageNode != null)
            {
                if (basketPercentageNode.Attributes["href"] != null || basketPercentageNode.Attributes["id"] != null)
                {
                    if (basketPercentageNode.Attributes["id"] != null)
                    {
                        basketPercentageIDRef_ = basketPercentageNode.Attributes["id"].Value;
                        RestrictedPercentage ob = new RestrictedPercentage(basketPercentageNode);
                        IDManager.SetID(basketPercentageIDRef_, ob);
                    }
                    else if (basketPercentageNode.Attributes["href"] != null)
                    {
                        basketPercentageIDRef_ = basketPercentageNode.Attributes["href"].Value;
                    }
                    else
                    {
                        basketPercentage_ = new RestrictedPercentage(basketPercentageNode);
                    }
                }
                else
                {
                    basketPercentage_ = new RestrictedPercentage(basketPercentageNode);
                }
            }


            XmlNode basketAmountNode = xmlNode.SelectSingleNode("basketAmount");

            if (basketAmountNode != null)
            {
                if (basketAmountNode.Attributes["href"] != null || basketAmountNode.Attributes["id"] != null)
                {
                    if (basketAmountNode.Attributes["id"] != null)
                    {
                        basketAmountIDRef_ = basketAmountNode.Attributes["id"].Value;
                        Money ob = new Money(basketAmountNode);
                        IDManager.SetID(basketAmountIDRef_, ob);
                    }
                    else if (basketAmountNode.Attributes["href"] != null)
                    {
                        basketAmountIDRef_ = basketAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        basketAmount_ = new Money(basketAmountNode);
                    }
                }
                else
                {
                    basketAmount_ = new Money(basketAmountNode);
                }
            }
        }
Пример #10
0
        public AdditionalDisruptionEvents(XmlNode xmlNode)
        {
            XmlNodeList changeInLawNodeList = xmlNode.SelectNodes("changeInLaw");

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

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


            XmlNodeList failureToDeliverNodeList = xmlNode.SelectNodes("failureToDeliver");

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

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


            XmlNodeList insolvencyFilingNodeList = xmlNode.SelectNodes("insolvencyFiling");

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

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


            XmlNodeList hedgingDisruptionNodeList = xmlNode.SelectNodes("hedgingDisruption");

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

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


            XmlNodeList lossOfStockBorrowNodeList = xmlNode.SelectNodes("lossOfStockBorrow");

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

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


            XmlNodeList maximumStockLoanRateNodeList = xmlNode.SelectNodes("maximumStockLoanRate");

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

            foreach (XmlNode item in maximumStockLoanRateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        maximumStockLoanRateIDRef = item.Attributes["id"].Name;
                        RestrictedPercentage ob = RestrictedPercentage();
                        IDManager.SetID(maximumStockLoanRateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        maximumStockLoanRateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        maximumStockLoanRate = new RestrictedPercentage(item);
                    }
                }
            }


            XmlNodeList increasedCostOfStockBorrowNodeList = xmlNode.SelectNodes("increasedCostOfStockBorrow");

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

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


            XmlNodeList initialStockLoanRateNodeList = xmlNode.SelectNodes("initialStockLoanRate");

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

            foreach (XmlNode item in initialStockLoanRateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        initialStockLoanRateIDRef = item.Attributes["id"].Name;
                        RestrictedPercentage ob = RestrictedPercentage();
                        IDManager.SetID(initialStockLoanRateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        initialStockLoanRateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        initialStockLoanRate = new RestrictedPercentage(item);
                    }
                }
            }


            XmlNodeList increasedCostOfHedgingNodeList = xmlNode.SelectNodes("increasedCostOfHedging");

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

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


            XmlNodeList determiningPartyReferenceNodeList = xmlNode.SelectNodes("determiningPartyReference");

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

            foreach (XmlNode item in determiningPartyReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        determiningPartyReferenceIDRef = item.Attributes["id"].Name;
                        PartyReference ob = PartyReference();
                        IDManager.SetID(determiningPartyReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        determiningPartyReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        determiningPartyReference = new PartyReference(item);
                    }
                }
            }


            XmlNodeList foreignOwnershipEventNodeList = xmlNode.SelectNodes("foreignOwnershipEvent");

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

            foreach (XmlNode item in foreignOwnershipEventNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        foreignOwnershipEventIDRef = item.Attributes["id"].Name;
                        XsdTypeBoolean ob = XsdTypeBoolean();
                        IDManager.SetID(foreignOwnershipEventIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        foreignOwnershipEventIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        foreignOwnershipEvent = new XsdTypeBoolean(item);
                    }
                }
            }
        }
Пример #11
0
        public CashSettlementTerms(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode valuationDateNode = xmlNode.SelectSingleNode("valuationDate");

            if (valuationDateNode != null)
            {
                if (valuationDateNode.Attributes["href"] != null || valuationDateNode.Attributes["id"] != null)
                {
                    if (valuationDateNode.Attributes["id"] != null)
                    {
                        valuationDateIDRef_ = valuationDateNode.Attributes["id"].Value;
                        ValuationDate ob = new ValuationDate(valuationDateNode);
                        IDManager.SetID(valuationDateIDRef_, ob);
                    }
                    else if (valuationDateNode.Attributes["href"] != null)
                    {
                        valuationDateIDRef_ = valuationDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        valuationDate_ = new ValuationDate(valuationDateNode);
                    }
                }
                else
                {
                    valuationDate_ = new ValuationDate(valuationDateNode);
                }
            }


            XmlNode valuationTimeNode = xmlNode.SelectSingleNode("valuationTime");

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


            XmlNode quotationMethodNode = xmlNode.SelectSingleNode("quotationMethod");

            if (quotationMethodNode != null)
            {
                if (quotationMethodNode.Attributes["href"] != null || quotationMethodNode.Attributes["id"] != null)
                {
                    if (quotationMethodNode.Attributes["id"] != null)
                    {
                        quotationMethodIDRef_ = quotationMethodNode.Attributes["id"].Value;
                        QuotationRateTypeEnum ob = new QuotationRateTypeEnum(quotationMethodNode);
                        IDManager.SetID(quotationMethodIDRef_, ob);
                    }
                    else if (quotationMethodNode.Attributes["href"] != null)
                    {
                        quotationMethodIDRef_ = quotationMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        quotationMethod_ = new QuotationRateTypeEnum(quotationMethodNode);
                    }
                }
                else
                {
                    quotationMethod_ = new QuotationRateTypeEnum(quotationMethodNode);
                }
            }


            XmlNode quotationAmountNode = xmlNode.SelectSingleNode("quotationAmount");

            if (quotationAmountNode != null)
            {
                if (quotationAmountNode.Attributes["href"] != null || quotationAmountNode.Attributes["id"] != null)
                {
                    if (quotationAmountNode.Attributes["id"] != null)
                    {
                        quotationAmountIDRef_ = quotationAmountNode.Attributes["id"].Value;
                        Money ob = new Money(quotationAmountNode);
                        IDManager.SetID(quotationAmountIDRef_, ob);
                    }
                    else if (quotationAmountNode.Attributes["href"] != null)
                    {
                        quotationAmountIDRef_ = quotationAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        quotationAmount_ = new Money(quotationAmountNode);
                    }
                }
                else
                {
                    quotationAmount_ = new Money(quotationAmountNode);
                }
            }


            XmlNode minimumQuotationAmountNode = xmlNode.SelectSingleNode("minimumQuotationAmount");

            if (minimumQuotationAmountNode != null)
            {
                if (minimumQuotationAmountNode.Attributes["href"] != null || minimumQuotationAmountNode.Attributes["id"] != null)
                {
                    if (minimumQuotationAmountNode.Attributes["id"] != null)
                    {
                        minimumQuotationAmountIDRef_ = minimumQuotationAmountNode.Attributes["id"].Value;
                        Money ob = new Money(minimumQuotationAmountNode);
                        IDManager.SetID(minimumQuotationAmountIDRef_, ob);
                    }
                    else if (minimumQuotationAmountNode.Attributes["href"] != null)
                    {
                        minimumQuotationAmountIDRef_ = minimumQuotationAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        minimumQuotationAmount_ = new Money(minimumQuotationAmountNode);
                    }
                }
                else
                {
                    minimumQuotationAmount_ = new Money(minimumQuotationAmountNode);
                }
            }


            XmlNodeList dealerNodeList = xmlNode.SelectNodes("dealer");

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


            XmlNode cashSettlementBusinessDaysNode = xmlNode.SelectSingleNode("cashSettlementBusinessDays");

            if (cashSettlementBusinessDaysNode != null)
            {
                if (cashSettlementBusinessDaysNode.Attributes["href"] != null || cashSettlementBusinessDaysNode.Attributes["id"] != null)
                {
                    if (cashSettlementBusinessDaysNode.Attributes["id"] != null)
                    {
                        cashSettlementBusinessDaysIDRef_ = cashSettlementBusinessDaysNode.Attributes["id"].Value;
                        XsdTypeNonNegativeInteger ob = new XsdTypeNonNegativeInteger(cashSettlementBusinessDaysNode);
                        IDManager.SetID(cashSettlementBusinessDaysIDRef_, ob);
                    }
                    else if (cashSettlementBusinessDaysNode.Attributes["href"] != null)
                    {
                        cashSettlementBusinessDaysIDRef_ = cashSettlementBusinessDaysNode.Attributes["href"].Value;
                    }
                    else
                    {
                        cashSettlementBusinessDays_ = new XsdTypeNonNegativeInteger(cashSettlementBusinessDaysNode);
                    }
                }
                else
                {
                    cashSettlementBusinessDays_ = new XsdTypeNonNegativeInteger(cashSettlementBusinessDaysNode);
                }
            }


            XmlNode cashSettlementAmountNode = xmlNode.SelectSingleNode("cashSettlementAmount");

            if (cashSettlementAmountNode != null)
            {
                if (cashSettlementAmountNode.Attributes["href"] != null || cashSettlementAmountNode.Attributes["id"] != null)
                {
                    if (cashSettlementAmountNode.Attributes["id"] != null)
                    {
                        cashSettlementAmountIDRef_ = cashSettlementAmountNode.Attributes["id"].Value;
                        Money ob = new Money(cashSettlementAmountNode);
                        IDManager.SetID(cashSettlementAmountIDRef_, ob);
                    }
                    else if (cashSettlementAmountNode.Attributes["href"] != null)
                    {
                        cashSettlementAmountIDRef_ = cashSettlementAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        cashSettlementAmount_ = new Money(cashSettlementAmountNode);
                    }
                }
                else
                {
                    cashSettlementAmount_ = new Money(cashSettlementAmountNode);
                }
            }


            XmlNode recoveryFactorNode = xmlNode.SelectSingleNode("recoveryFactor");

            if (recoveryFactorNode != null)
            {
                if (recoveryFactorNode.Attributes["href"] != null || recoveryFactorNode.Attributes["id"] != null)
                {
                    if (recoveryFactorNode.Attributes["id"] != null)
                    {
                        recoveryFactorIDRef_ = recoveryFactorNode.Attributes["id"].Value;
                        RestrictedPercentage ob = new RestrictedPercentage(recoveryFactorNode);
                        IDManager.SetID(recoveryFactorIDRef_, ob);
                    }
                    else if (recoveryFactorNode.Attributes["href"] != null)
                    {
                        recoveryFactorIDRef_ = recoveryFactorNode.Attributes["href"].Value;
                    }
                    else
                    {
                        recoveryFactor_ = new RestrictedPercentage(recoveryFactorNode);
                    }
                }
                else
                {
                    recoveryFactor_ = new RestrictedPercentage(recoveryFactorNode);
                }
            }


            XmlNode fixedSettlementNode = xmlNode.SelectSingleNode("fixedSettlement");

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


            XmlNode accruedInterestNode = xmlNode.SelectSingleNode("accruedInterest");

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


            XmlNode valuationMethodNode = xmlNode.SelectSingleNode("valuationMethod");

            if (valuationMethodNode != null)
            {
                if (valuationMethodNode.Attributes["href"] != null || valuationMethodNode.Attributes["id"] != null)
                {
                    if (valuationMethodNode.Attributes["id"] != null)
                    {
                        valuationMethodIDRef_ = valuationMethodNode.Attributes["id"].Value;
                        ValuationMethodEnum ob = new ValuationMethodEnum(valuationMethodNode);
                        IDManager.SetID(valuationMethodIDRef_, ob);
                    }
                    else if (valuationMethodNode.Attributes["href"] != null)
                    {
                        valuationMethodIDRef_ = valuationMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        valuationMethod_ = new ValuationMethodEnum(valuationMethodNode);
                    }
                }
                else
                {
                    valuationMethod_ = new ValuationMethodEnum(valuationMethodNode);
                }
            }
        }
        public CashSettlementTerms(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList valuationDateNodeList = xmlNode.SelectNodes("valuationDate");

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

            foreach (XmlNode item in valuationDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        valuationDateIDRef = item.Attributes["id"].Name;
                        ValuationDate ob = ValuationDate();
                        IDManager.SetID(valuationDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        valuationDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        valuationDate = new ValuationDate(item);
                    }
                }
            }


            XmlNodeList valuationTimeNodeList = xmlNode.SelectNodes("valuationTime");

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

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


            XmlNodeList quotationMethodNodeList = xmlNode.SelectNodes("quotationMethod");

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

            foreach (XmlNode item in quotationMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        quotationMethodIDRef = item.Attributes["id"].Name;
                        QuotationRateTypeEnum ob = QuotationRateTypeEnum();
                        IDManager.SetID(quotationMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        quotationMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        quotationMethod = new QuotationRateTypeEnum(item);
                    }
                }
            }


            XmlNodeList quotationAmountNodeList = xmlNode.SelectNodes("quotationAmount");

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

            foreach (XmlNode item in quotationAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        quotationAmountIDRef = item.Attributes["id"].Name;
                        Money ob = Money();
                        IDManager.SetID(quotationAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        quotationAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        quotationAmount = new Money(item);
                    }
                }
            }


            XmlNodeList minimumQuotationAmountNodeList = xmlNode.SelectNodes("minimumQuotationAmount");

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

            foreach (XmlNode item in minimumQuotationAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        minimumQuotationAmountIDRef = item.Attributes["id"].Name;
                        Money ob = Money();
                        IDManager.SetID(minimumQuotationAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        minimumQuotationAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        minimumQuotationAmount = new Money(item);
                    }
                }
            }


            XmlNodeList dealerNodeList = xmlNode.SelectNodes("dealer");

            foreach (XmlNode item in dealerNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dealerIDRef = item.Attributes["id"].Name;
                        XsdTypeString ob = new XsdTypeString();
                        ob.Add(new XsdTypeString(item));
                        IDManager.SetID(dealerIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dealerIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dealer.Add(new XsdTypeString(item));
                    }
                }
            }


            XmlNodeList cashSettlementBusinessDaysNodeList = xmlNode.SelectNodes("cashSettlementBusinessDays");

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

            foreach (XmlNode item in cashSettlementBusinessDaysNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        cashSettlementBusinessDaysIDRef = item.Attributes["id"].Name;
                        XsdTypeNonNegativeInteger ob = XsdTypeNonNegativeInteger();
                        IDManager.SetID(cashSettlementBusinessDaysIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        cashSettlementBusinessDaysIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        cashSettlementBusinessDays = new XsdTypeNonNegativeInteger(item);
                    }
                }
            }


            XmlNodeList cashSettlementAmountNodeList = xmlNode.SelectNodes("cashSettlementAmount");

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

            foreach (XmlNode item in cashSettlementAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        cashSettlementAmountIDRef = item.Attributes["id"].Name;
                        Money ob = Money();
                        IDManager.SetID(cashSettlementAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        cashSettlementAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        cashSettlementAmount = new Money(item);
                    }
                }
            }


            XmlNodeList recoveryFactorNodeList = xmlNode.SelectNodes("recoveryFactor");

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

            foreach (XmlNode item in recoveryFactorNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        recoveryFactorIDRef = item.Attributes["id"].Name;
                        RestrictedPercentage ob = RestrictedPercentage();
                        IDManager.SetID(recoveryFactorIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        recoveryFactorIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        recoveryFactor = new RestrictedPercentage(item);
                    }
                }
            }


            XmlNodeList fixedSettlementNodeList = xmlNode.SelectNodes("fixedSettlement");

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

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


            XmlNodeList accruedInterestNodeList = xmlNode.SelectNodes("accruedInterest");

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

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


            XmlNodeList valuationMethodNodeList = xmlNode.SelectNodes("valuationMethod");

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

            foreach (XmlNode item in valuationMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        valuationMethodIDRef = item.Attributes["id"].Name;
                        ValuationMethodEnum ob = ValuationMethodEnum();
                        IDManager.SetID(valuationMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        valuationMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        valuationMethod = new ValuationMethodEnum(item);
                    }
                }
            }
        }
        public PercentageTolerance(XmlNode xmlNode)
        {
            XmlNodeList postitiveNodeList = xmlNode.SelectNodes("postitive");

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

            foreach (XmlNode item in postitiveNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        postitiveIDRef = item.Attributes["id"].Name;
                        RestrictedPercentage ob = RestrictedPercentage();
                        IDManager.SetID(postitiveIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        postitiveIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        postitive = new RestrictedPercentage(item);
                    }
                }
            }


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

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

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


            XmlNodeList optionNodeList = xmlNode.SelectNodes("option");

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

            foreach (XmlNode item in optionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        optionIDRef = item.Attributes["id"].Name;
                        PartyReference ob = PartyReference();
                        IDManager.SetID(optionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        optionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        option = new PartyReference(item);
                    }
                }
            }
        }
        public ConstituentWeight(XmlNode xmlNode)
        {
            XmlNodeList openUnitsNodeList = xmlNode.SelectNodes("openUnits");

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

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


            XmlNodeList basketPercentageNodeList = xmlNode.SelectNodes("basketPercentage");

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

            foreach (XmlNode item in basketPercentageNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        basketPercentageIDRef = item.Attributes["id"].Name;
                        RestrictedPercentage ob = RestrictedPercentage();
                        IDManager.SetID(basketPercentageIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        basketPercentageIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        basketPercentage = new RestrictedPercentage(item);
                    }
                }
            }


            XmlNodeList basketAmountNodeList = xmlNode.SelectNodes("basketAmount");

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

            foreach (XmlNode item in basketAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        basketAmountIDRef = item.Attributes["id"].Name;
                        Money ob = Money();
                        IDManager.SetID(basketAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        basketAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        basketAmount = new Money(item);
                    }
                }
            }
        }
 public AdditionalDisruptionEvents(XmlNode xmlNode)
 {
     XmlNode changeInLawNode = xmlNode.SelectSingleNode("changeInLaw");
     
     if (changeInLawNode != null)
     {
         if (changeInLawNode.Attributes["href"] != null || changeInLawNode.Attributes["id"] != null) 
         {
             if (changeInLawNode.Attributes["id"] != null) 
             {
                 changeInLawIDRef_ = changeInLawNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(changeInLawNode);
                 IDManager.SetID(changeInLawIDRef_, ob);
             }
             else if (changeInLawNode.Attributes["href"] != null)
             {
                 changeInLawIDRef_ = changeInLawNode.Attributes["href"].Value;
             }
             else
             {
                 changeInLaw_ = new XsdTypeBoolean(changeInLawNode);
             }
         }
         else
         {
             changeInLaw_ = new XsdTypeBoolean(changeInLawNode);
         }
     }
     
 
     XmlNode failureToDeliverNode = xmlNode.SelectSingleNode("failureToDeliver");
     
     if (failureToDeliverNode != null)
     {
         if (failureToDeliverNode.Attributes["href"] != null || failureToDeliverNode.Attributes["id"] != null) 
         {
             if (failureToDeliverNode.Attributes["id"] != null) 
             {
                 failureToDeliverIDRef_ = failureToDeliverNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(failureToDeliverNode);
                 IDManager.SetID(failureToDeliverIDRef_, ob);
             }
             else if (failureToDeliverNode.Attributes["href"] != null)
             {
                 failureToDeliverIDRef_ = failureToDeliverNode.Attributes["href"].Value;
             }
             else
             {
                 failureToDeliver_ = new XsdTypeBoolean(failureToDeliverNode);
             }
         }
         else
         {
             failureToDeliver_ = new XsdTypeBoolean(failureToDeliverNode);
         }
     }
     
 
     XmlNode insolvencyFilingNode = xmlNode.SelectSingleNode("insolvencyFiling");
     
     if (insolvencyFilingNode != null)
     {
         if (insolvencyFilingNode.Attributes["href"] != null || insolvencyFilingNode.Attributes["id"] != null) 
         {
             if (insolvencyFilingNode.Attributes["id"] != null) 
             {
                 insolvencyFilingIDRef_ = insolvencyFilingNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(insolvencyFilingNode);
                 IDManager.SetID(insolvencyFilingIDRef_, ob);
             }
             else if (insolvencyFilingNode.Attributes["href"] != null)
             {
                 insolvencyFilingIDRef_ = insolvencyFilingNode.Attributes["href"].Value;
             }
             else
             {
                 insolvencyFiling_ = new XsdTypeBoolean(insolvencyFilingNode);
             }
         }
         else
         {
             insolvencyFiling_ = new XsdTypeBoolean(insolvencyFilingNode);
         }
     }
     
 
     XmlNode hedgingDisruptionNode = xmlNode.SelectSingleNode("hedgingDisruption");
     
     if (hedgingDisruptionNode != null)
     {
         if (hedgingDisruptionNode.Attributes["href"] != null || hedgingDisruptionNode.Attributes["id"] != null) 
         {
             if (hedgingDisruptionNode.Attributes["id"] != null) 
             {
                 hedgingDisruptionIDRef_ = hedgingDisruptionNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(hedgingDisruptionNode);
                 IDManager.SetID(hedgingDisruptionIDRef_, ob);
             }
             else if (hedgingDisruptionNode.Attributes["href"] != null)
             {
                 hedgingDisruptionIDRef_ = hedgingDisruptionNode.Attributes["href"].Value;
             }
             else
             {
                 hedgingDisruption_ = new XsdTypeBoolean(hedgingDisruptionNode);
             }
         }
         else
         {
             hedgingDisruption_ = new XsdTypeBoolean(hedgingDisruptionNode);
         }
     }
     
 
     XmlNode lossOfStockBorrowNode = xmlNode.SelectSingleNode("lossOfStockBorrow");
     
     if (lossOfStockBorrowNode != null)
     {
         if (lossOfStockBorrowNode.Attributes["href"] != null || lossOfStockBorrowNode.Attributes["id"] != null) 
         {
             if (lossOfStockBorrowNode.Attributes["id"] != null) 
             {
                 lossOfStockBorrowIDRef_ = lossOfStockBorrowNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(lossOfStockBorrowNode);
                 IDManager.SetID(lossOfStockBorrowIDRef_, ob);
             }
             else if (lossOfStockBorrowNode.Attributes["href"] != null)
             {
                 lossOfStockBorrowIDRef_ = lossOfStockBorrowNode.Attributes["href"].Value;
             }
             else
             {
                 lossOfStockBorrow_ = new XsdTypeBoolean(lossOfStockBorrowNode);
             }
         }
         else
         {
             lossOfStockBorrow_ = new XsdTypeBoolean(lossOfStockBorrowNode);
         }
     }
     
 
     XmlNode maximumStockLoanRateNode = xmlNode.SelectSingleNode("maximumStockLoanRate");
     
     if (maximumStockLoanRateNode != null)
     {
         if (maximumStockLoanRateNode.Attributes["href"] != null || maximumStockLoanRateNode.Attributes["id"] != null) 
         {
             if (maximumStockLoanRateNode.Attributes["id"] != null) 
             {
                 maximumStockLoanRateIDRef_ = maximumStockLoanRateNode.Attributes["id"].Value;
                 RestrictedPercentage ob = new RestrictedPercentage(maximumStockLoanRateNode);
                 IDManager.SetID(maximumStockLoanRateIDRef_, ob);
             }
             else if (maximumStockLoanRateNode.Attributes["href"] != null)
             {
                 maximumStockLoanRateIDRef_ = maximumStockLoanRateNode.Attributes["href"].Value;
             }
             else
             {
                 maximumStockLoanRate_ = new RestrictedPercentage(maximumStockLoanRateNode);
             }
         }
         else
         {
             maximumStockLoanRate_ = new RestrictedPercentage(maximumStockLoanRateNode);
         }
     }
     
 
     XmlNode increasedCostOfStockBorrowNode = xmlNode.SelectSingleNode("increasedCostOfStockBorrow");
     
     if (increasedCostOfStockBorrowNode != null)
     {
         if (increasedCostOfStockBorrowNode.Attributes["href"] != null || increasedCostOfStockBorrowNode.Attributes["id"] != null) 
         {
             if (increasedCostOfStockBorrowNode.Attributes["id"] != null) 
             {
                 increasedCostOfStockBorrowIDRef_ = increasedCostOfStockBorrowNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(increasedCostOfStockBorrowNode);
                 IDManager.SetID(increasedCostOfStockBorrowIDRef_, ob);
             }
             else if (increasedCostOfStockBorrowNode.Attributes["href"] != null)
             {
                 increasedCostOfStockBorrowIDRef_ = increasedCostOfStockBorrowNode.Attributes["href"].Value;
             }
             else
             {
                 increasedCostOfStockBorrow_ = new XsdTypeBoolean(increasedCostOfStockBorrowNode);
             }
         }
         else
         {
             increasedCostOfStockBorrow_ = new XsdTypeBoolean(increasedCostOfStockBorrowNode);
         }
     }
     
 
     XmlNode initialStockLoanRateNode = xmlNode.SelectSingleNode("initialStockLoanRate");
     
     if (initialStockLoanRateNode != null)
     {
         if (initialStockLoanRateNode.Attributes["href"] != null || initialStockLoanRateNode.Attributes["id"] != null) 
         {
             if (initialStockLoanRateNode.Attributes["id"] != null) 
             {
                 initialStockLoanRateIDRef_ = initialStockLoanRateNode.Attributes["id"].Value;
                 RestrictedPercentage ob = new RestrictedPercentage(initialStockLoanRateNode);
                 IDManager.SetID(initialStockLoanRateIDRef_, ob);
             }
             else if (initialStockLoanRateNode.Attributes["href"] != null)
             {
                 initialStockLoanRateIDRef_ = initialStockLoanRateNode.Attributes["href"].Value;
             }
             else
             {
                 initialStockLoanRate_ = new RestrictedPercentage(initialStockLoanRateNode);
             }
         }
         else
         {
             initialStockLoanRate_ = new RestrictedPercentage(initialStockLoanRateNode);
         }
     }
     
 
     XmlNode increasedCostOfHedgingNode = xmlNode.SelectSingleNode("increasedCostOfHedging");
     
     if (increasedCostOfHedgingNode != null)
     {
         if (increasedCostOfHedgingNode.Attributes["href"] != null || increasedCostOfHedgingNode.Attributes["id"] != null) 
         {
             if (increasedCostOfHedgingNode.Attributes["id"] != null) 
             {
                 increasedCostOfHedgingIDRef_ = increasedCostOfHedgingNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(increasedCostOfHedgingNode);
                 IDManager.SetID(increasedCostOfHedgingIDRef_, ob);
             }
             else if (increasedCostOfHedgingNode.Attributes["href"] != null)
             {
                 increasedCostOfHedgingIDRef_ = increasedCostOfHedgingNode.Attributes["href"].Value;
             }
             else
             {
                 increasedCostOfHedging_ = new XsdTypeBoolean(increasedCostOfHedgingNode);
             }
         }
         else
         {
             increasedCostOfHedging_ = new XsdTypeBoolean(increasedCostOfHedgingNode);
         }
     }
     
 
     XmlNode determiningPartyReferenceNode = xmlNode.SelectSingleNode("determiningPartyReference");
     
     if (determiningPartyReferenceNode != null)
     {
         if (determiningPartyReferenceNode.Attributes["href"] != null || determiningPartyReferenceNode.Attributes["id"] != null) 
         {
             if (determiningPartyReferenceNode.Attributes["id"] != null) 
             {
                 determiningPartyReferenceIDRef_ = determiningPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(determiningPartyReferenceNode);
                 IDManager.SetID(determiningPartyReferenceIDRef_, ob);
             }
             else if (determiningPartyReferenceNode.Attributes["href"] != null)
             {
                 determiningPartyReferenceIDRef_ = determiningPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 determiningPartyReference_ = new PartyReference(determiningPartyReferenceNode);
             }
         }
         else
         {
             determiningPartyReference_ = new PartyReference(determiningPartyReferenceNode);
         }
     }
     
 
     XmlNode foreignOwnershipEventNode = xmlNode.SelectSingleNode("foreignOwnershipEvent");
     
     if (foreignOwnershipEventNode != null)
     {
         if (foreignOwnershipEventNode.Attributes["href"] != null || foreignOwnershipEventNode.Attributes["id"] != null) 
         {
             if (foreignOwnershipEventNode.Attributes["id"] != null) 
             {
                 foreignOwnershipEventIDRef_ = foreignOwnershipEventNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(foreignOwnershipEventNode);
                 IDManager.SetID(foreignOwnershipEventIDRef_, ob);
             }
             else if (foreignOwnershipEventNode.Attributes["href"] != null)
             {
                 foreignOwnershipEventIDRef_ = foreignOwnershipEventNode.Attributes["href"].Value;
             }
             else
             {
                 foreignOwnershipEvent_ = new XsdTypeBoolean(foreignOwnershipEventNode);
             }
         }
         else
         {
             foreignOwnershipEvent_ = new XsdTypeBoolean(foreignOwnershipEventNode);
         }
     }
     
 
 }
        public PercentageTolerance(XmlNode xmlNode)
        {
            XmlNode postitiveNode = xmlNode.SelectSingleNode("postitive");

            if (postitiveNode != null)
            {
                if (postitiveNode.Attributes["href"] != null || postitiveNode.Attributes["id"] != null)
                {
                    if (postitiveNode.Attributes["id"] != null)
                    {
                        postitiveIDRef_ = postitiveNode.Attributes["id"].Value;
                        RestrictedPercentage ob = new RestrictedPercentage(postitiveNode);
                        IDManager.SetID(postitiveIDRef_, ob);
                    }
                    else if (postitiveNode.Attributes["href"] != null)
                    {
                        postitiveIDRef_ = postitiveNode.Attributes["href"].Value;
                    }
                    else
                    {
                        postitive_ = new RestrictedPercentage(postitiveNode);
                    }
                }
                else
                {
                    postitive_ = new RestrictedPercentage(postitiveNode);
                }
            }


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

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


            XmlNode optionNode = xmlNode.SelectSingleNode("option");

            if (optionNode != null)
            {
                if (optionNode.Attributes["href"] != null || optionNode.Attributes["id"] != null)
                {
                    if (optionNode.Attributes["id"] != null)
                    {
                        optionIDRef_ = optionNode.Attributes["id"].Value;
                        PartyReference ob = new PartyReference(optionNode);
                        IDManager.SetID(optionIDRef_, ob);
                    }
                    else if (optionNode.Attributes["href"] != null)
                    {
                        optionIDRef_ = optionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        option_ = new PartyReference(optionNode);
                    }
                }
                else
                {
                    option_ = new PartyReference(optionNode);
                }
            }
        }
        public AdditionalDisruptionEvents(XmlNode xmlNode)
        {
            XmlNode changeInLawNode = xmlNode.SelectSingleNode("changeInLaw");

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


            XmlNode failureToDeliverNode = xmlNode.SelectSingleNode("failureToDeliver");

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


            XmlNode insolvencyFilingNode = xmlNode.SelectSingleNode("insolvencyFiling");

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


            XmlNode hedgingDisruptionNode = xmlNode.SelectSingleNode("hedgingDisruption");

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


            XmlNode lossOfStockBorrowNode = xmlNode.SelectSingleNode("lossOfStockBorrow");

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


            XmlNode maximumStockLoanRateNode = xmlNode.SelectSingleNode("maximumStockLoanRate");

            if (maximumStockLoanRateNode != null)
            {
                if (maximumStockLoanRateNode.Attributes["href"] != null || maximumStockLoanRateNode.Attributes["id"] != null)
                {
                    if (maximumStockLoanRateNode.Attributes["id"] != null)
                    {
                        maximumStockLoanRateIDRef_ = maximumStockLoanRateNode.Attributes["id"].Value;
                        RestrictedPercentage ob = new RestrictedPercentage(maximumStockLoanRateNode);
                        IDManager.SetID(maximumStockLoanRateIDRef_, ob);
                    }
                    else if (maximumStockLoanRateNode.Attributes["href"] != null)
                    {
                        maximumStockLoanRateIDRef_ = maximumStockLoanRateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        maximumStockLoanRate_ = new RestrictedPercentage(maximumStockLoanRateNode);
                    }
                }
                else
                {
                    maximumStockLoanRate_ = new RestrictedPercentage(maximumStockLoanRateNode);
                }
            }


            XmlNode increasedCostOfStockBorrowNode = xmlNode.SelectSingleNode("increasedCostOfStockBorrow");

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


            XmlNode initialStockLoanRateNode = xmlNode.SelectSingleNode("initialStockLoanRate");

            if (initialStockLoanRateNode != null)
            {
                if (initialStockLoanRateNode.Attributes["href"] != null || initialStockLoanRateNode.Attributes["id"] != null)
                {
                    if (initialStockLoanRateNode.Attributes["id"] != null)
                    {
                        initialStockLoanRateIDRef_ = initialStockLoanRateNode.Attributes["id"].Value;
                        RestrictedPercentage ob = new RestrictedPercentage(initialStockLoanRateNode);
                        IDManager.SetID(initialStockLoanRateIDRef_, ob);
                    }
                    else if (initialStockLoanRateNode.Attributes["href"] != null)
                    {
                        initialStockLoanRateIDRef_ = initialStockLoanRateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        initialStockLoanRate_ = new RestrictedPercentage(initialStockLoanRateNode);
                    }
                }
                else
                {
                    initialStockLoanRate_ = new RestrictedPercentage(initialStockLoanRateNode);
                }
            }


            XmlNode increasedCostOfHedgingNode = xmlNode.SelectSingleNode("increasedCostOfHedging");

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


            XmlNode determiningPartyReferenceNode = xmlNode.SelectSingleNode("determiningPartyReference");

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


            XmlNode foreignOwnershipEventNode = xmlNode.SelectSingleNode("foreignOwnershipEvent");

            if (foreignOwnershipEventNode != null)
            {
                if (foreignOwnershipEventNode.Attributes["href"] != null || foreignOwnershipEventNode.Attributes["id"] != null)
                {
                    if (foreignOwnershipEventNode.Attributes["id"] != null)
                    {
                        foreignOwnershipEventIDRef_ = foreignOwnershipEventNode.Attributes["id"].Value;
                        XsdTypeBoolean ob = new XsdTypeBoolean(foreignOwnershipEventNode);
                        IDManager.SetID(foreignOwnershipEventIDRef_, ob);
                    }
                    else if (foreignOwnershipEventNode.Attributes["href"] != null)
                    {
                        foreignOwnershipEventIDRef_ = foreignOwnershipEventNode.Attributes["href"].Value;
                    }
                    else
                    {
                        foreignOwnershipEvent_ = new XsdTypeBoolean(foreignOwnershipEventNode);
                    }
                }
                else
                {
                    foreignOwnershipEvent_ = new XsdTypeBoolean(foreignOwnershipEventNode);
                }
            }
        }
 public CashSettlementTerms(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode valuationDateNode = xmlNode.SelectSingleNode("valuationDate");
     
     if (valuationDateNode != null)
     {
         if (valuationDateNode.Attributes["href"] != null || valuationDateNode.Attributes["id"] != null) 
         {
             if (valuationDateNode.Attributes["id"] != null) 
             {
                 valuationDateIDRef_ = valuationDateNode.Attributes["id"].Value;
                 ValuationDate ob = new ValuationDate(valuationDateNode);
                 IDManager.SetID(valuationDateIDRef_, ob);
             }
             else if (valuationDateNode.Attributes["href"] != null)
             {
                 valuationDateIDRef_ = valuationDateNode.Attributes["href"].Value;
             }
             else
             {
                 valuationDate_ = new ValuationDate(valuationDateNode);
             }
         }
         else
         {
             valuationDate_ = new ValuationDate(valuationDateNode);
         }
     }
     
 
     XmlNode valuationTimeNode = xmlNode.SelectSingleNode("valuationTime");
     
     if (valuationTimeNode != null)
     {
         if (valuationTimeNode.Attributes["href"] != null || valuationTimeNode.Attributes["id"] != null) 
         {
             if (valuationTimeNode.Attributes["id"] != null) 
             {
                 valuationTimeIDRef_ = valuationTimeNode.Attributes["id"].Value;
                 BusinessCenterTime ob = new BusinessCenterTime(valuationTimeNode);
                 IDManager.SetID(valuationTimeIDRef_, ob);
             }
             else if (valuationTimeNode.Attributes["href"] != null)
             {
                 valuationTimeIDRef_ = valuationTimeNode.Attributes["href"].Value;
             }
             else
             {
                 valuationTime_ = new BusinessCenterTime(valuationTimeNode);
             }
         }
         else
         {
             valuationTime_ = new BusinessCenterTime(valuationTimeNode);
         }
     }
     
 
     XmlNode quotationMethodNode = xmlNode.SelectSingleNode("quotationMethod");
     
     if (quotationMethodNode != null)
     {
         if (quotationMethodNode.Attributes["href"] != null || quotationMethodNode.Attributes["id"] != null) 
         {
             if (quotationMethodNode.Attributes["id"] != null) 
             {
                 quotationMethodIDRef_ = quotationMethodNode.Attributes["id"].Value;
                 QuotationRateTypeEnum ob = new QuotationRateTypeEnum(quotationMethodNode);
                 IDManager.SetID(quotationMethodIDRef_, ob);
             }
             else if (quotationMethodNode.Attributes["href"] != null)
             {
                 quotationMethodIDRef_ = quotationMethodNode.Attributes["href"].Value;
             }
             else
             {
                 quotationMethod_ = new QuotationRateTypeEnum(quotationMethodNode);
             }
         }
         else
         {
             quotationMethod_ = new QuotationRateTypeEnum(quotationMethodNode);
         }
     }
     
 
     XmlNode quotationAmountNode = xmlNode.SelectSingleNode("quotationAmount");
     
     if (quotationAmountNode != null)
     {
         if (quotationAmountNode.Attributes["href"] != null || quotationAmountNode.Attributes["id"] != null) 
         {
             if (quotationAmountNode.Attributes["id"] != null) 
             {
                 quotationAmountIDRef_ = quotationAmountNode.Attributes["id"].Value;
                 Money ob = new Money(quotationAmountNode);
                 IDManager.SetID(quotationAmountIDRef_, ob);
             }
             else if (quotationAmountNode.Attributes["href"] != null)
             {
                 quotationAmountIDRef_ = quotationAmountNode.Attributes["href"].Value;
             }
             else
             {
                 quotationAmount_ = new Money(quotationAmountNode);
             }
         }
         else
         {
             quotationAmount_ = new Money(quotationAmountNode);
         }
     }
     
 
     XmlNode minimumQuotationAmountNode = xmlNode.SelectSingleNode("minimumQuotationAmount");
     
     if (minimumQuotationAmountNode != null)
     {
         if (minimumQuotationAmountNode.Attributes["href"] != null || minimumQuotationAmountNode.Attributes["id"] != null) 
         {
             if (minimumQuotationAmountNode.Attributes["id"] != null) 
             {
                 minimumQuotationAmountIDRef_ = minimumQuotationAmountNode.Attributes["id"].Value;
                 Money ob = new Money(minimumQuotationAmountNode);
                 IDManager.SetID(minimumQuotationAmountIDRef_, ob);
             }
             else if (minimumQuotationAmountNode.Attributes["href"] != null)
             {
                 minimumQuotationAmountIDRef_ = minimumQuotationAmountNode.Attributes["href"].Value;
             }
             else
             {
                 minimumQuotationAmount_ = new Money(minimumQuotationAmountNode);
             }
         }
         else
         {
             minimumQuotationAmount_ = new Money(minimumQuotationAmountNode);
         }
     }
     
 
     XmlNodeList dealerNodeList = xmlNode.SelectNodes("dealer");
     
     if (dealerNodeList != null)
     {
         this.dealer_ = new List<XsdTypeString>();
         foreach (XmlNode item in dealerNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     dealerIDRef_ = item.Attributes["id"].Value;
                     dealer_.Add(new XsdTypeString(item));
                     IDManager.SetID(dealerIDRef_, dealer_[dealer_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     dealerIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 dealer_.Add(new XsdTypeString(item));
                 }
             }
             else
             {
                 dealer_.Add(new XsdTypeString(item));
             }
         }
     }
     
 
     XmlNode cashSettlementBusinessDaysNode = xmlNode.SelectSingleNode("cashSettlementBusinessDays");
     
     if (cashSettlementBusinessDaysNode != null)
     {
         if (cashSettlementBusinessDaysNode.Attributes["href"] != null || cashSettlementBusinessDaysNode.Attributes["id"] != null) 
         {
             if (cashSettlementBusinessDaysNode.Attributes["id"] != null) 
             {
                 cashSettlementBusinessDaysIDRef_ = cashSettlementBusinessDaysNode.Attributes["id"].Value;
                 XsdTypeNonNegativeInteger ob = new XsdTypeNonNegativeInteger(cashSettlementBusinessDaysNode);
                 IDManager.SetID(cashSettlementBusinessDaysIDRef_, ob);
             }
             else if (cashSettlementBusinessDaysNode.Attributes["href"] != null)
             {
                 cashSettlementBusinessDaysIDRef_ = cashSettlementBusinessDaysNode.Attributes["href"].Value;
             }
             else
             {
                 cashSettlementBusinessDays_ = new XsdTypeNonNegativeInteger(cashSettlementBusinessDaysNode);
             }
         }
         else
         {
             cashSettlementBusinessDays_ = new XsdTypeNonNegativeInteger(cashSettlementBusinessDaysNode);
         }
     }
     
 
     XmlNode cashSettlementAmountNode = xmlNode.SelectSingleNode("cashSettlementAmount");
     
     if (cashSettlementAmountNode != null)
     {
         if (cashSettlementAmountNode.Attributes["href"] != null || cashSettlementAmountNode.Attributes["id"] != null) 
         {
             if (cashSettlementAmountNode.Attributes["id"] != null) 
             {
                 cashSettlementAmountIDRef_ = cashSettlementAmountNode.Attributes["id"].Value;
                 Money ob = new Money(cashSettlementAmountNode);
                 IDManager.SetID(cashSettlementAmountIDRef_, ob);
             }
             else if (cashSettlementAmountNode.Attributes["href"] != null)
             {
                 cashSettlementAmountIDRef_ = cashSettlementAmountNode.Attributes["href"].Value;
             }
             else
             {
                 cashSettlementAmount_ = new Money(cashSettlementAmountNode);
             }
         }
         else
         {
             cashSettlementAmount_ = new Money(cashSettlementAmountNode);
         }
     }
     
 
     XmlNode recoveryFactorNode = xmlNode.SelectSingleNode("recoveryFactor");
     
     if (recoveryFactorNode != null)
     {
         if (recoveryFactorNode.Attributes["href"] != null || recoveryFactorNode.Attributes["id"] != null) 
         {
             if (recoveryFactorNode.Attributes["id"] != null) 
             {
                 recoveryFactorIDRef_ = recoveryFactorNode.Attributes["id"].Value;
                 RestrictedPercentage ob = new RestrictedPercentage(recoveryFactorNode);
                 IDManager.SetID(recoveryFactorIDRef_, ob);
             }
             else if (recoveryFactorNode.Attributes["href"] != null)
             {
                 recoveryFactorIDRef_ = recoveryFactorNode.Attributes["href"].Value;
             }
             else
             {
                 recoveryFactor_ = new RestrictedPercentage(recoveryFactorNode);
             }
         }
         else
         {
             recoveryFactor_ = new RestrictedPercentage(recoveryFactorNode);
         }
     }
     
 
     XmlNode fixedSettlementNode = xmlNode.SelectSingleNode("fixedSettlement");
     
     if (fixedSettlementNode != null)
     {
         if (fixedSettlementNode.Attributes["href"] != null || fixedSettlementNode.Attributes["id"] != null) 
         {
             if (fixedSettlementNode.Attributes["id"] != null) 
             {
                 fixedSettlementIDRef_ = fixedSettlementNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(fixedSettlementNode);
                 IDManager.SetID(fixedSettlementIDRef_, ob);
             }
             else if (fixedSettlementNode.Attributes["href"] != null)
             {
                 fixedSettlementIDRef_ = fixedSettlementNode.Attributes["href"].Value;
             }
             else
             {
                 fixedSettlement_ = new XsdTypeBoolean(fixedSettlementNode);
             }
         }
         else
         {
             fixedSettlement_ = new XsdTypeBoolean(fixedSettlementNode);
         }
     }
     
 
     XmlNode accruedInterestNode = xmlNode.SelectSingleNode("accruedInterest");
     
     if (accruedInterestNode != null)
     {
         if (accruedInterestNode.Attributes["href"] != null || accruedInterestNode.Attributes["id"] != null) 
         {
             if (accruedInterestNode.Attributes["id"] != null) 
             {
                 accruedInterestIDRef_ = accruedInterestNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(accruedInterestNode);
                 IDManager.SetID(accruedInterestIDRef_, ob);
             }
             else if (accruedInterestNode.Attributes["href"] != null)
             {
                 accruedInterestIDRef_ = accruedInterestNode.Attributes["href"].Value;
             }
             else
             {
                 accruedInterest_ = new XsdTypeBoolean(accruedInterestNode);
             }
         }
         else
         {
             accruedInterest_ = new XsdTypeBoolean(accruedInterestNode);
         }
     }
     
 
     XmlNode valuationMethodNode = xmlNode.SelectSingleNode("valuationMethod");
     
     if (valuationMethodNode != null)
     {
         if (valuationMethodNode.Attributes["href"] != null || valuationMethodNode.Attributes["id"] != null) 
         {
             if (valuationMethodNode.Attributes["id"] != null) 
             {
                 valuationMethodIDRef_ = valuationMethodNode.Attributes["id"].Value;
                 ValuationMethodEnum ob = new ValuationMethodEnum(valuationMethodNode);
                 IDManager.SetID(valuationMethodIDRef_, ob);
             }
             else if (valuationMethodNode.Attributes["href"] != null)
             {
                 valuationMethodIDRef_ = valuationMethodNode.Attributes["href"].Value;
             }
             else
             {
                 valuationMethod_ = new ValuationMethodEnum(valuationMethodNode);
             }
         }
         else
         {
             valuationMethod_ = new ValuationMethodEnum(valuationMethodNode);
         }
     }
     
 
 }