コード例 #1
0
 public CreditEvents(XmlNode xmlNode)
 {
     XmlNode bankruptcyNode = xmlNode.SelectSingleNode("bankruptcy");
     
     if (bankruptcyNode != null)
     {
         if (bankruptcyNode.Attributes["href"] != null || bankruptcyNode.Attributes["id"] != null) 
         {
             if (bankruptcyNode.Attributes["id"] != null) 
             {
                 bankruptcyIDRef_ = bankruptcyNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(bankruptcyNode);
                 IDManager.SetID(bankruptcyIDRef_, ob);
             }
             else if (bankruptcyNode.Attributes["href"] != null)
             {
                 bankruptcyIDRef_ = bankruptcyNode.Attributes["href"].Value;
             }
             else
             {
                 bankruptcy_ = new XsdTypeBoolean(bankruptcyNode);
             }
         }
         else
         {
             bankruptcy_ = new XsdTypeBoolean(bankruptcyNode);
         }
     }
     
 
     XmlNode failureToPayNode = xmlNode.SelectSingleNode("failureToPay");
     
     if (failureToPayNode != null)
     {
         if (failureToPayNode.Attributes["href"] != null || failureToPayNode.Attributes["id"] != null) 
         {
             if (failureToPayNode.Attributes["id"] != null) 
             {
                 failureToPayIDRef_ = failureToPayNode.Attributes["id"].Value;
                 FailureToPay ob = new FailureToPay(failureToPayNode);
                 IDManager.SetID(failureToPayIDRef_, ob);
             }
             else if (failureToPayNode.Attributes["href"] != null)
             {
                 failureToPayIDRef_ = failureToPayNode.Attributes["href"].Value;
             }
             else
             {
                 failureToPay_ = new FailureToPay(failureToPayNode);
             }
         }
         else
         {
             failureToPay_ = new FailureToPay(failureToPayNode);
         }
     }
     
 
     XmlNode failureToPayPrincipalNode = xmlNode.SelectSingleNode("failureToPayPrincipal");
     
     if (failureToPayPrincipalNode != null)
     {
         if (failureToPayPrincipalNode.Attributes["href"] != null || failureToPayPrincipalNode.Attributes["id"] != null) 
         {
             if (failureToPayPrincipalNode.Attributes["id"] != null) 
             {
                 failureToPayPrincipalIDRef_ = failureToPayPrincipalNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(failureToPayPrincipalNode);
                 IDManager.SetID(failureToPayPrincipalIDRef_, ob);
             }
             else if (failureToPayPrincipalNode.Attributes["href"] != null)
             {
                 failureToPayPrincipalIDRef_ = failureToPayPrincipalNode.Attributes["href"].Value;
             }
             else
             {
                 failureToPayPrincipal_ = new XsdTypeBoolean(failureToPayPrincipalNode);
             }
         }
         else
         {
             failureToPayPrincipal_ = new XsdTypeBoolean(failureToPayPrincipalNode);
         }
     }
     
 
     XmlNode failureToPayInterestNode = xmlNode.SelectSingleNode("failureToPayInterest");
     
     if (failureToPayInterestNode != null)
     {
         if (failureToPayInterestNode.Attributes["href"] != null || failureToPayInterestNode.Attributes["id"] != null) 
         {
             if (failureToPayInterestNode.Attributes["id"] != null) 
             {
                 failureToPayInterestIDRef_ = failureToPayInterestNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(failureToPayInterestNode);
                 IDManager.SetID(failureToPayInterestIDRef_, ob);
             }
             else if (failureToPayInterestNode.Attributes["href"] != null)
             {
                 failureToPayInterestIDRef_ = failureToPayInterestNode.Attributes["href"].Value;
             }
             else
             {
                 failureToPayInterest_ = new XsdTypeBoolean(failureToPayInterestNode);
             }
         }
         else
         {
             failureToPayInterest_ = new XsdTypeBoolean(failureToPayInterestNode);
         }
     }
     
 
     XmlNode obligationDefaultNode = xmlNode.SelectSingleNode("obligationDefault");
     
     if (obligationDefaultNode != null)
     {
         if (obligationDefaultNode.Attributes["href"] != null || obligationDefaultNode.Attributes["id"] != null) 
         {
             if (obligationDefaultNode.Attributes["id"] != null) 
             {
                 obligationDefaultIDRef_ = obligationDefaultNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(obligationDefaultNode);
                 IDManager.SetID(obligationDefaultIDRef_, ob);
             }
             else if (obligationDefaultNode.Attributes["href"] != null)
             {
                 obligationDefaultIDRef_ = obligationDefaultNode.Attributes["href"].Value;
             }
             else
             {
                 obligationDefault_ = new XsdTypeBoolean(obligationDefaultNode);
             }
         }
         else
         {
             obligationDefault_ = new XsdTypeBoolean(obligationDefaultNode);
         }
     }
     
 
     XmlNode obligationAccelerationNode = xmlNode.SelectSingleNode("obligationAcceleration");
     
     if (obligationAccelerationNode != null)
     {
         if (obligationAccelerationNode.Attributes["href"] != null || obligationAccelerationNode.Attributes["id"] != null) 
         {
             if (obligationAccelerationNode.Attributes["id"] != null) 
             {
                 obligationAccelerationIDRef_ = obligationAccelerationNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(obligationAccelerationNode);
                 IDManager.SetID(obligationAccelerationIDRef_, ob);
             }
             else if (obligationAccelerationNode.Attributes["href"] != null)
             {
                 obligationAccelerationIDRef_ = obligationAccelerationNode.Attributes["href"].Value;
             }
             else
             {
                 obligationAcceleration_ = new XsdTypeBoolean(obligationAccelerationNode);
             }
         }
         else
         {
             obligationAcceleration_ = new XsdTypeBoolean(obligationAccelerationNode);
         }
     }
     
 
     XmlNode repudiationMoratoriumNode = xmlNode.SelectSingleNode("repudiationMoratorium");
     
     if (repudiationMoratoriumNode != null)
     {
         if (repudiationMoratoriumNode.Attributes["href"] != null || repudiationMoratoriumNode.Attributes["id"] != null) 
         {
             if (repudiationMoratoriumNode.Attributes["id"] != null) 
             {
                 repudiationMoratoriumIDRef_ = repudiationMoratoriumNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(repudiationMoratoriumNode);
                 IDManager.SetID(repudiationMoratoriumIDRef_, ob);
             }
             else if (repudiationMoratoriumNode.Attributes["href"] != null)
             {
                 repudiationMoratoriumIDRef_ = repudiationMoratoriumNode.Attributes["href"].Value;
             }
             else
             {
                 repudiationMoratorium_ = new XsdTypeBoolean(repudiationMoratoriumNode);
             }
         }
         else
         {
             repudiationMoratorium_ = new XsdTypeBoolean(repudiationMoratoriumNode);
         }
     }
     
 
     XmlNode restructuringNode = xmlNode.SelectSingleNode("restructuring");
     
     if (restructuringNode != null)
     {
         if (restructuringNode.Attributes["href"] != null || restructuringNode.Attributes["id"] != null) 
         {
             if (restructuringNode.Attributes["id"] != null) 
             {
                 restructuringIDRef_ = restructuringNode.Attributes["id"].Value;
                 Restructuring ob = new Restructuring(restructuringNode);
                 IDManager.SetID(restructuringIDRef_, ob);
             }
             else if (restructuringNode.Attributes["href"] != null)
             {
                 restructuringIDRef_ = restructuringNode.Attributes["href"].Value;
             }
             else
             {
                 restructuring_ = new Restructuring(restructuringNode);
             }
         }
         else
         {
             restructuring_ = new Restructuring(restructuringNode);
         }
     }
     
 
     XmlNode distressedRatingsDowngradeNode = xmlNode.SelectSingleNode("distressedRatingsDowngrade");
     
     if (distressedRatingsDowngradeNode != null)
     {
         if (distressedRatingsDowngradeNode.Attributes["href"] != null || distressedRatingsDowngradeNode.Attributes["id"] != null) 
         {
             if (distressedRatingsDowngradeNode.Attributes["id"] != null) 
             {
                 distressedRatingsDowngradeIDRef_ = distressedRatingsDowngradeNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(distressedRatingsDowngradeNode);
                 IDManager.SetID(distressedRatingsDowngradeIDRef_, ob);
             }
             else if (distressedRatingsDowngradeNode.Attributes["href"] != null)
             {
                 distressedRatingsDowngradeIDRef_ = distressedRatingsDowngradeNode.Attributes["href"].Value;
             }
             else
             {
                 distressedRatingsDowngrade_ = new XsdTypeBoolean(distressedRatingsDowngradeNode);
             }
         }
         else
         {
             distressedRatingsDowngrade_ = new XsdTypeBoolean(distressedRatingsDowngradeNode);
         }
     }
     
 
     XmlNode maturityExtensionNode = xmlNode.SelectSingleNode("maturityExtension");
     
     if (maturityExtensionNode != null)
     {
         if (maturityExtensionNode.Attributes["href"] != null || maturityExtensionNode.Attributes["id"] != null) 
         {
             if (maturityExtensionNode.Attributes["id"] != null) 
             {
                 maturityExtensionIDRef_ = maturityExtensionNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(maturityExtensionNode);
                 IDManager.SetID(maturityExtensionIDRef_, ob);
             }
             else if (maturityExtensionNode.Attributes["href"] != null)
             {
                 maturityExtensionIDRef_ = maturityExtensionNode.Attributes["href"].Value;
             }
             else
             {
                 maturityExtension_ = new XsdTypeBoolean(maturityExtensionNode);
             }
         }
         else
         {
             maturityExtension_ = new XsdTypeBoolean(maturityExtensionNode);
         }
     }
     
 
     XmlNode writedownNode = xmlNode.SelectSingleNode("writedown");
     
     if (writedownNode != null)
     {
         if (writedownNode.Attributes["href"] != null || writedownNode.Attributes["id"] != null) 
         {
             if (writedownNode.Attributes["id"] != null) 
             {
                 writedownIDRef_ = writedownNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(writedownNode);
                 IDManager.SetID(writedownIDRef_, ob);
             }
             else if (writedownNode.Attributes["href"] != null)
             {
                 writedownIDRef_ = writedownNode.Attributes["href"].Value;
             }
             else
             {
                 writedown_ = new XsdTypeBoolean(writedownNode);
             }
         }
         else
         {
             writedown_ = new XsdTypeBoolean(writedownNode);
         }
     }
     
 
     XmlNode impliedWritedownNode = xmlNode.SelectSingleNode("impliedWritedown");
     
     if (impliedWritedownNode != null)
     {
         if (impliedWritedownNode.Attributes["href"] != null || impliedWritedownNode.Attributes["id"] != null) 
         {
             if (impliedWritedownNode.Attributes["id"] != null) 
             {
                 impliedWritedownIDRef_ = impliedWritedownNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(impliedWritedownNode);
                 IDManager.SetID(impliedWritedownIDRef_, ob);
             }
             else if (impliedWritedownNode.Attributes["href"] != null)
             {
                 impliedWritedownIDRef_ = impliedWritedownNode.Attributes["href"].Value;
             }
             else
             {
                 impliedWritedown_ = new XsdTypeBoolean(impliedWritedownNode);
             }
         }
         else
         {
             impliedWritedown_ = new XsdTypeBoolean(impliedWritedownNode);
         }
     }
     
 
     XmlNode defaultRequirementNode = xmlNode.SelectSingleNode("defaultRequirement");
     
     if (defaultRequirementNode != null)
     {
         if (defaultRequirementNode.Attributes["href"] != null || defaultRequirementNode.Attributes["id"] != null) 
         {
             if (defaultRequirementNode.Attributes["id"] != null) 
             {
                 defaultRequirementIDRef_ = defaultRequirementNode.Attributes["id"].Value;
                 Money ob = new Money(defaultRequirementNode);
                 IDManager.SetID(defaultRequirementIDRef_, ob);
             }
             else if (defaultRequirementNode.Attributes["href"] != null)
             {
                 defaultRequirementIDRef_ = defaultRequirementNode.Attributes["href"].Value;
             }
             else
             {
                 defaultRequirement_ = new Money(defaultRequirementNode);
             }
         }
         else
         {
             defaultRequirement_ = new Money(defaultRequirementNode);
         }
     }
     
 
     XmlNode creditEventNoticeNode = xmlNode.SelectSingleNode("creditEventNotice");
     
     if (creditEventNoticeNode != null)
     {
         if (creditEventNoticeNode.Attributes["href"] != null || creditEventNoticeNode.Attributes["id"] != null) 
         {
             if (creditEventNoticeNode.Attributes["id"] != null) 
             {
                 creditEventNoticeIDRef_ = creditEventNoticeNode.Attributes["id"].Value;
                 CreditEventNotice ob = new CreditEventNotice(creditEventNoticeNode);
                 IDManager.SetID(creditEventNoticeIDRef_, ob);
             }
             else if (creditEventNoticeNode.Attributes["href"] != null)
             {
                 creditEventNoticeIDRef_ = creditEventNoticeNode.Attributes["href"].Value;
             }
             else
             {
                 creditEventNotice_ = new CreditEventNotice(creditEventNoticeNode);
             }
         }
         else
         {
             creditEventNotice_ = new CreditEventNotice(creditEventNoticeNode);
         }
     }
     
 
 }
コード例 #2
0
        public CreditEvents(XmlNode xmlNode)
        {
            XmlNode bankruptcyNode = xmlNode.SelectSingleNode("bankruptcy");

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


            XmlNode failureToPayNode = xmlNode.SelectSingleNode("failureToPay");

            if (failureToPayNode != null)
            {
                if (failureToPayNode.Attributes["href"] != null || failureToPayNode.Attributes["id"] != null)
                {
                    if (failureToPayNode.Attributes["id"] != null)
                    {
                        failureToPayIDRef_ = failureToPayNode.Attributes["id"].Value;
                        FailureToPay ob = new FailureToPay(failureToPayNode);
                        IDManager.SetID(failureToPayIDRef_, ob);
                    }
                    else if (failureToPayNode.Attributes["href"] != null)
                    {
                        failureToPayIDRef_ = failureToPayNode.Attributes["href"].Value;
                    }
                    else
                    {
                        failureToPay_ = new FailureToPay(failureToPayNode);
                    }
                }
                else
                {
                    failureToPay_ = new FailureToPay(failureToPayNode);
                }
            }


            XmlNode failureToPayPrincipalNode = xmlNode.SelectSingleNode("failureToPayPrincipal");

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


            XmlNode failureToPayInterestNode = xmlNode.SelectSingleNode("failureToPayInterest");

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


            XmlNode obligationDefaultNode = xmlNode.SelectSingleNode("obligationDefault");

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


            XmlNode obligationAccelerationNode = xmlNode.SelectSingleNode("obligationAcceleration");

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


            XmlNode repudiationMoratoriumNode = xmlNode.SelectSingleNode("repudiationMoratorium");

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


            XmlNode restructuringNode = xmlNode.SelectSingleNode("restructuring");

            if (restructuringNode != null)
            {
                if (restructuringNode.Attributes["href"] != null || restructuringNode.Attributes["id"] != null)
                {
                    if (restructuringNode.Attributes["id"] != null)
                    {
                        restructuringIDRef_ = restructuringNode.Attributes["id"].Value;
                        Restructuring ob = new Restructuring(restructuringNode);
                        IDManager.SetID(restructuringIDRef_, ob);
                    }
                    else if (restructuringNode.Attributes["href"] != null)
                    {
                        restructuringIDRef_ = restructuringNode.Attributes["href"].Value;
                    }
                    else
                    {
                        restructuring_ = new Restructuring(restructuringNode);
                    }
                }
                else
                {
                    restructuring_ = new Restructuring(restructuringNode);
                }
            }


            XmlNode distressedRatingsDowngradeNode = xmlNode.SelectSingleNode("distressedRatingsDowngrade");

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


            XmlNode maturityExtensionNode = xmlNode.SelectSingleNode("maturityExtension");

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


            XmlNode writedownNode = xmlNode.SelectSingleNode("writedown");

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


            XmlNode impliedWritedownNode = xmlNode.SelectSingleNode("impliedWritedown");

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


            XmlNode defaultRequirementNode = xmlNode.SelectSingleNode("defaultRequirement");

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


            XmlNode creditEventNoticeNode = xmlNode.SelectSingleNode("creditEventNotice");

            if (creditEventNoticeNode != null)
            {
                if (creditEventNoticeNode.Attributes["href"] != null || creditEventNoticeNode.Attributes["id"] != null)
                {
                    if (creditEventNoticeNode.Attributes["id"] != null)
                    {
                        creditEventNoticeIDRef_ = creditEventNoticeNode.Attributes["id"].Value;
                        CreditEventNotice ob = new CreditEventNotice(creditEventNoticeNode);
                        IDManager.SetID(creditEventNoticeIDRef_, ob);
                    }
                    else if (creditEventNoticeNode.Attributes["href"] != null)
                    {
                        creditEventNoticeIDRef_ = creditEventNoticeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        creditEventNotice_ = new CreditEventNotice(creditEventNoticeNode);
                    }
                }
                else
                {
                    creditEventNotice_ = new CreditEventNotice(creditEventNoticeNode);
                }
            }
        }
コード例 #3
0
        public CreditEvents(XmlNode xmlNode)
        {
            XmlNodeList bankruptcyNodeList = xmlNode.SelectNodes("bankruptcy");

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

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


            XmlNodeList failureToPayNodeList = xmlNode.SelectNodes("failureToPay");

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

            foreach (XmlNode item in failureToPayNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        failureToPayIDRef = item.Attributes["id"].Name;
                        FailureToPay ob = FailureToPay();
                        IDManager.SetID(failureToPayIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        failureToPayIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        failureToPay = new FailureToPay(item);
                    }
                }
            }


            XmlNodeList failureToPayPrincipalNodeList = xmlNode.SelectNodes("failureToPayPrincipal");

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

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


            XmlNodeList failureToPayInterestNodeList = xmlNode.SelectNodes("failureToPayInterest");

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

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


            XmlNodeList obligationDefaultNodeList = xmlNode.SelectNodes("obligationDefault");

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

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


            XmlNodeList obligationAccelerationNodeList = xmlNode.SelectNodes("obligationAcceleration");

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

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


            XmlNodeList repudiationMoratoriumNodeList = xmlNode.SelectNodes("repudiationMoratorium");

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

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


            XmlNodeList restructuringNodeList = xmlNode.SelectNodes("restructuring");

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

            foreach (XmlNode item in restructuringNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        restructuringIDRef = item.Attributes["id"].Name;
                        Restructuring ob = Restructuring();
                        IDManager.SetID(restructuringIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        restructuringIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        restructuring = new Restructuring(item);
                    }
                }
            }


            XmlNodeList distressedRatingsDowngradeNodeList = xmlNode.SelectNodes("distressedRatingsDowngrade");

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

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


            XmlNodeList maturityExtensionNodeList = xmlNode.SelectNodes("maturityExtension");

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

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


            XmlNodeList writedownNodeList = xmlNode.SelectNodes("writedown");

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

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


            XmlNodeList impliedWritedownNodeList = xmlNode.SelectNodes("impliedWritedown");

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

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


            XmlNodeList defaultRequirementNodeList = xmlNode.SelectNodes("defaultRequirement");

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

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


            XmlNodeList creditEventNoticeNodeList = xmlNode.SelectNodes("creditEventNotice");

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

            foreach (XmlNode item in creditEventNoticeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        creditEventNoticeIDRef = item.Attributes["id"].Name;
                        CreditEventNotice ob = CreditEventNotice();
                        IDManager.SetID(creditEventNoticeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        creditEventNoticeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        creditEventNotice = new CreditEventNotice(item);
                    }
                }
            }
        }