Beispiel #1
0
        public EventTrigger(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode typeNode = xmlNode.SelectSingleNode("type");

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


            XmlNode eventDateNode = xmlNode.SelectSingleNode("eventDate");

            if (eventDateNode != null)
            {
                if (eventDateNode.Attributes["href"] != null || eventDateNode.Attributes["id"] != null)
                {
                    if (eventDateNode.Attributes["id"] != null)
                    {
                        eventDateIDRef_ = eventDateNode.Attributes["id"].Value;
                        XsdTypeDate ob = new XsdTypeDate(eventDateNode);
                        IDManager.SetID(eventDateIDRef_, ob);
                    }
                    else if (eventDateNode.Attributes["href"] != null)
                    {
                        eventDateIDRef_ = eventDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        eventDate_ = new XsdTypeDate(eventDateNode);
                    }
                }
                else
                {
                    eventDate_ = new XsdTypeDate(eventDateNode);
                }
            }


            XmlNode autoTerminationTriggerNode = xmlNode.SelectSingleNode("autoTerminationTrigger");

            if (autoTerminationTriggerNode != null)
            {
                if (autoTerminationTriggerNode.Attributes["href"] != null || autoTerminationTriggerNode.Attributes["id"] != null)
                {
                    if (autoTerminationTriggerNode.Attributes["id"] != null)
                    {
                        autoTerminationTriggerIDRef_ = autoTerminationTriggerNode.Attributes["id"].Value;
                        AutoTerminationTrigger ob = new AutoTerminationTrigger(autoTerminationTriggerNode);
                        IDManager.SetID(autoTerminationTriggerIDRef_, ob);
                    }
                    else if (autoTerminationTriggerNode.Attributes["href"] != null)
                    {
                        autoTerminationTriggerIDRef_ = autoTerminationTriggerNode.Attributes["href"].Value;
                    }
                    else
                    {
                        autoTerminationTrigger_ = new AutoTerminationTrigger(autoTerminationTriggerNode);
                    }
                }
                else
                {
                    autoTerminationTrigger_ = new AutoTerminationTrigger(autoTerminationTriggerNode);
                }
            }


            XmlNode preEventCalculationNode = xmlNode.SelectSingleNode("preEventCalculation");

            if (preEventCalculationNode != null)
            {
                if (preEventCalculationNode.Attributes["href"] != null || preEventCalculationNode.Attributes["id"] != null)
                {
                    if (preEventCalculationNode.Attributes["id"] != null)
                    {
                        preEventCalculationIDRef_ = preEventCalculationNode.Attributes["id"].Value;
                        PreEventCalculation ob = new PreEventCalculation(preEventCalculationNode);
                        IDManager.SetID(preEventCalculationIDRef_, ob);
                    }
                    else if (preEventCalculationNode.Attributes["href"] != null)
                    {
                        preEventCalculationIDRef_ = preEventCalculationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        preEventCalculation_ = new PreEventCalculation(preEventCalculationNode);
                    }
                }
                else
                {
                    preEventCalculation_ = new PreEventCalculation(preEventCalculationNode);
                }
            }


            XmlNode preConditionEventNode = xmlNode.SelectSingleNode("preConditionEvent");

            if (preConditionEventNode != null)
            {
                if (preConditionEventNode.Attributes["href"] != null || preConditionEventNode.Attributes["id"] != null)
                {
                    if (preConditionEventNode.Attributes["id"] != null)
                    {
                        preConditionEventIDRef_ = preConditionEventNode.Attributes["id"].Value;
                        PreConditionEvent ob = new PreConditionEvent(preConditionEventNode);
                        IDManager.SetID(preConditionEventIDRef_, ob);
                    }
                    else if (preConditionEventNode.Attributes["href"] != null)
                    {
                        preConditionEventIDRef_ = preConditionEventNode.Attributes["href"].Value;
                    }
                    else
                    {
                        preConditionEvent_ = new PreConditionEvent(preConditionEventNode);
                    }
                }
                else
                {
                    preConditionEvent_ = new PreConditionEvent(preConditionEventNode);
                }
            }


            XmlNode autoCallConstReturnTriggerNode = xmlNode.SelectSingleNode("autoCallConstReturnTrigger");

            if (autoCallConstReturnTriggerNode != null)
            {
                if (autoCallConstReturnTriggerNode.Attributes["href"] != null || autoCallConstReturnTriggerNode.Attributes["id"] != null)
                {
                    if (autoCallConstReturnTriggerNode.Attributes["id"] != null)
                    {
                        autoCallConstReturnTriggerIDRef_ = autoCallConstReturnTriggerNode.Attributes["id"].Value;
                        AutoCallConstReturnTrigger ob = new AutoCallConstReturnTrigger(autoCallConstReturnTriggerNode);
                        IDManager.SetID(autoCallConstReturnTriggerIDRef_, ob);
                    }
                    else if (autoCallConstReturnTriggerNode.Attributes["href"] != null)
                    {
                        autoCallConstReturnTriggerIDRef_ = autoCallConstReturnTriggerNode.Attributes["href"].Value;
                    }
                    else
                    {
                        autoCallConstReturnTrigger_ = new AutoCallConstReturnTrigger(autoCallConstReturnTriggerNode);
                    }
                }
                else
                {
                    autoCallConstReturnTrigger_ = new AutoCallConstReturnTrigger(autoCallConstReturnTriggerNode);
                }
            }


            XmlNode simpleRangeConstReturnTriggerNode = xmlNode.SelectSingleNode("simpleRangeConstReturnTrigger");

            if (simpleRangeConstReturnTriggerNode != null)
            {
                if (simpleRangeConstReturnTriggerNode.Attributes["href"] != null || simpleRangeConstReturnTriggerNode.Attributes["id"] != null)
                {
                    if (simpleRangeConstReturnTriggerNode.Attributes["id"] != null)
                    {
                        simpleRangeConstReturnTriggerIDRef_ = simpleRangeConstReturnTriggerNode.Attributes["id"].Value;
                        SimpleRangeConstReturnTrigger ob = new SimpleRangeConstReturnTrigger(simpleRangeConstReturnTriggerNode);
                        IDManager.SetID(simpleRangeConstReturnTriggerIDRef_, ob);
                    }
                    else if (simpleRangeConstReturnTriggerNode.Attributes["href"] != null)
                    {
                        simpleRangeConstReturnTriggerIDRef_ = simpleRangeConstReturnTriggerNode.Attributes["href"].Value;
                    }
                    else
                    {
                        simpleRangeConstReturnTrigger_ = new SimpleRangeConstReturnTrigger(simpleRangeConstReturnTriggerNode);
                    }
                }
                else
                {
                    simpleRangeConstReturnTrigger_ = new SimpleRangeConstReturnTrigger(simpleRangeConstReturnTriggerNode);
                }
            }


            XmlNode simpleRangeRateTriggerNode = xmlNode.SelectSingleNode("simpleRangeRateTrigger");

            if (simpleRangeRateTriggerNode != null)
            {
                if (simpleRangeRateTriggerNode.Attributes["href"] != null || simpleRangeRateTriggerNode.Attributes["id"] != null)
                {
                    if (simpleRangeRateTriggerNode.Attributes["id"] != null)
                    {
                        simpleRangeRateTriggerIDRef_ = simpleRangeRateTriggerNode.Attributes["id"].Value;
                        SimpleRangeRateTrigger ob = new SimpleRangeRateTrigger(simpleRangeRateTriggerNode);
                        IDManager.SetID(simpleRangeRateTriggerIDRef_, ob);
                    }
                    else if (simpleRangeRateTriggerNode.Attributes["href"] != null)
                    {
                        simpleRangeRateTriggerIDRef_ = simpleRangeRateTriggerNode.Attributes["href"].Value;
                    }
                    else
                    {
                        simpleRangeRateTrigger_ = new SimpleRangeRateTrigger(simpleRangeRateTriggerNode);
                    }
                }
                else
                {
                    simpleRangeRateTrigger_ = new SimpleRangeRateTrigger(simpleRangeRateTriggerNode);
                }
            }


            XmlNode simpleRangeAccrualRateTriggerNode = xmlNode.SelectSingleNode("simpleRangeAccrualRateTrigger");

            if (simpleRangeAccrualRateTriggerNode != null)
            {
                if (simpleRangeAccrualRateTriggerNode.Attributes["href"] != null || simpleRangeAccrualRateTriggerNode.Attributes["id"] != null)
                {
                    if (simpleRangeAccrualRateTriggerNode.Attributes["id"] != null)
                    {
                        simpleRangeAccrualRateTriggerIDRef_ = simpleRangeAccrualRateTriggerNode.Attributes["id"].Value;
                        SimpleRangeAccrualRateTrigger ob = new SimpleRangeAccrualRateTrigger(simpleRangeAccrualRateTriggerNode);
                        IDManager.SetID(simpleRangeAccrualRateTriggerIDRef_, ob);
                    }
                    else if (simpleRangeAccrualRateTriggerNode.Attributes["href"] != null)
                    {
                        simpleRangeAccrualRateTriggerIDRef_ = simpleRangeAccrualRateTriggerNode.Attributes["href"].Value;
                    }
                    else
                    {
                        simpleRangeAccrualRateTrigger_ = new SimpleRangeAccrualRateTrigger(simpleRangeAccrualRateTriggerNode);
                    }
                }
                else
                {
                    simpleRangeAccrualRateTrigger_ = new SimpleRangeAccrualRateTrigger(simpleRangeAccrualRateTriggerNode);
                }
            }


            XmlNode fixedRateTriggerNode = xmlNode.SelectSingleNode("fixedRateTrigger");

            if (fixedRateTriggerNode != null)
            {
                if (fixedRateTriggerNode.Attributes["href"] != null || fixedRateTriggerNode.Attributes["id"] != null)
                {
                    if (fixedRateTriggerNode.Attributes["id"] != null)
                    {
                        fixedRateTriggerIDRef_ = fixedRateTriggerNode.Attributes["id"].Value;
                        FixedRateTrigger ob = new FixedRateTrigger(fixedRateTriggerNode);
                        IDManager.SetID(fixedRateTriggerIDRef_, ob);
                    }
                    else if (fixedRateTriggerNode.Attributes["href"] != null)
                    {
                        fixedRateTriggerIDRef_ = fixedRateTriggerNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fixedRateTrigger_ = new FixedRateTrigger(fixedRateTriggerNode);
                    }
                }
                else
                {
                    fixedRateTrigger_ = new FixedRateTrigger(fixedRateTriggerNode);
                }
            }


            XmlNode vanillaRateTriggerNode = xmlNode.SelectSingleNode("vanillaRateTrigger");

            if (vanillaRateTriggerNode != null)
            {
                if (vanillaRateTriggerNode.Attributes["href"] != null || vanillaRateTriggerNode.Attributes["id"] != null)
                {
                    if (vanillaRateTriggerNode.Attributes["id"] != null)
                    {
                        vanillaRateTriggerIDRef_ = vanillaRateTriggerNode.Attributes["id"].Value;
                        VanillaRateTrigger ob = new VanillaRateTrigger(vanillaRateTriggerNode);
                        IDManager.SetID(vanillaRateTriggerIDRef_, ob);
                    }
                    else if (vanillaRateTriggerNode.Attributes["href"] != null)
                    {
                        vanillaRateTriggerIDRef_ = vanillaRateTriggerNode.Attributes["href"].Value;
                    }
                    else
                    {
                        vanillaRateTrigger_ = new VanillaRateTrigger(vanillaRateTriggerNode);
                    }
                }
                else
                {
                    vanillaRateTrigger_ = new VanillaRateTrigger(vanillaRateTriggerNode);
                }
            }


            XmlNode redemptionNotionalTriggerNode = xmlNode.SelectSingleNode("redemptionNotionalTrigger");

            if (redemptionNotionalTriggerNode != null)
            {
                if (redemptionNotionalTriggerNode.Attributes["href"] != null || redemptionNotionalTriggerNode.Attributes["id"] != null)
                {
                    if (redemptionNotionalTriggerNode.Attributes["id"] != null)
                    {
                        redemptionNotionalTriggerIDRef_ = redemptionNotionalTriggerNode.Attributes["id"].Value;
                        RedemptionNotionalTrigger ob = new RedemptionNotionalTrigger(redemptionNotionalTriggerNode);
                        IDManager.SetID(redemptionNotionalTriggerIDRef_, ob);
                    }
                    else if (redemptionNotionalTriggerNode.Attributes["href"] != null)
                    {
                        redemptionNotionalTriggerIDRef_ = redemptionNotionalTriggerNode.Attributes["href"].Value;
                    }
                    else
                    {
                        redemptionNotionalTrigger_ = new RedemptionNotionalTrigger(redemptionNotionalTriggerNode);
                    }
                }
                else
                {
                    redemptionNotionalTrigger_ = new RedemptionNotionalTrigger(redemptionNotionalTriggerNode);
                }
            }


            XmlNode autoCallRangeReturnTriggerNode = xmlNode.SelectSingleNode("autoCallRangeReturnTrigger");

            if (autoCallRangeReturnTriggerNode != null)
            {
                if (autoCallRangeReturnTriggerNode.Attributes["href"] != null || autoCallRangeReturnTriggerNode.Attributes["id"] != null)
                {
                    if (autoCallRangeReturnTriggerNode.Attributes["id"] != null)
                    {
                        autoCallRangeReturnTriggerIDRef_ = autoCallRangeReturnTriggerNode.Attributes["id"].Value;
                        AutoCallRangeReturnTrigger ob = new AutoCallRangeReturnTrigger(autoCallRangeReturnTriggerNode);
                        IDManager.SetID(autoCallRangeReturnTriggerIDRef_, ob);
                    }
                    else if (autoCallRangeReturnTriggerNode.Attributes["href"] != null)
                    {
                        autoCallRangeReturnTriggerIDRef_ = autoCallRangeReturnTriggerNode.Attributes["href"].Value;
                    }
                    else
                    {
                        autoCallRangeReturnTrigger_ = new AutoCallRangeReturnTrigger(autoCallRangeReturnTriggerNode);
                    }
                }
                else
                {
                    autoCallRangeReturnTrigger_ = new AutoCallRangeReturnTrigger(autoCallRangeReturnTriggerNode);
                }
            }


            XmlNode vanillaCouponTriggerNode = xmlNode.SelectSingleNode("vanillaCouponTrigger");

            if (vanillaCouponTriggerNode != null)
            {
                if (vanillaCouponTriggerNode.Attributes["href"] != null || vanillaCouponTriggerNode.Attributes["id"] != null)
                {
                    if (vanillaCouponTriggerNode.Attributes["id"] != null)
                    {
                        vanillaCouponTriggerIDRef_ = vanillaCouponTriggerNode.Attributes["id"].Value;
                        VanillaCouponTrigger ob = new VanillaCouponTrigger(vanillaCouponTriggerNode);
                        IDManager.SetID(vanillaCouponTriggerIDRef_, ob);
                    }
                    else if (vanillaCouponTriggerNode.Attributes["href"] != null)
                    {
                        vanillaCouponTriggerIDRef_ = vanillaCouponTriggerNode.Attributes["href"].Value;
                    }
                    else
                    {
                        vanillaCouponTrigger_ = new VanillaCouponTrigger(vanillaCouponTriggerNode);
                    }
                }
                else
                {
                    vanillaCouponTrigger_ = new VanillaCouponTrigger(vanillaCouponTriggerNode);
                }
            }


            XmlNode simpleEventCouponTriggerNode = xmlNode.SelectSingleNode("simpleEventCouponTrigger");

            if (simpleEventCouponTriggerNode != null)
            {
                if (simpleEventCouponTriggerNode.Attributes["href"] != null || simpleEventCouponTriggerNode.Attributes["id"] != null)
                {
                    if (simpleEventCouponTriggerNode.Attributes["id"] != null)
                    {
                        simpleEventCouponTriggerIDRef_ = simpleEventCouponTriggerNode.Attributes["id"].Value;
                        SimpleEventCouponTrigger ob = new SimpleEventCouponTrigger(simpleEventCouponTriggerNode);
                        IDManager.SetID(simpleEventCouponTriggerIDRef_, ob);
                    }
                    else if (simpleEventCouponTriggerNode.Attributes["href"] != null)
                    {
                        simpleEventCouponTriggerIDRef_ = simpleEventCouponTriggerNode.Attributes["href"].Value;
                    }
                    else
                    {
                        simpleEventCouponTrigger_ = new SimpleEventCouponTrigger(simpleEventCouponTriggerNode);
                    }
                }
                else
                {
                    simpleEventCouponTrigger_ = new SimpleEventCouponTrigger(simpleEventCouponTriggerNode);
                }
            }


            XmlNode postCalculationNode = xmlNode.SelectSingleNode("postCalculation");

            if (postCalculationNode != null)
            {
                if (postCalculationNode.Attributes["href"] != null || postCalculationNode.Attributes["id"] != null)
                {
                    if (postCalculationNode.Attributes["id"] != null)
                    {
                        postCalculationIDRef_ = postCalculationNode.Attributes["id"].Value;
                        PostCalculation ob = new PostCalculation(postCalculationNode);
                        IDManager.SetID(postCalculationIDRef_, ob);
                    }
                    else if (postCalculationNode.Attributes["href"] != null)
                    {
                        postCalculationIDRef_ = postCalculationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        postCalculation_ = new PostCalculation(postCalculationNode);
                    }
                }
                else
                {
                    postCalculation_ = new PostCalculation(postCalculationNode);
                }
            }
        }
        public EventCalculationInfo(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode preConditionEventNode = xmlNode.SelectSingleNode("preConditionEvent");

            if (preConditionEventNode != null)
            {
                if (preConditionEventNode.Attributes["href"] != null || preConditionEventNode.Attributes["id"] != null)
                {
                    if (preConditionEventNode.Attributes["id"] != null)
                    {
                        preConditionEventIDRef_ = preConditionEventNode.Attributes["id"].Value;
                        PreConditionEvent ob = new PreConditionEvent(preConditionEventNode);
                        IDManager.SetID(preConditionEventIDRef_, ob);
                    }
                    else if (preConditionEventNode.Attributes["href"] != null)
                    {
                        preConditionEventIDRef_ = preConditionEventNode.Attributes["href"].Value;
                    }
                    else
                    {
                        preConditionEvent_ = new PreConditionEvent(preConditionEventNode);
                    }
                }
                else
                {
                    preConditionEvent_ = new PreConditionEvent(preConditionEventNode);
                }
            }


            XmlNodeList eventCalculationNodeList = xmlNode.SelectNodes("eventCalculation");

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


            XmlNode jointSimpleCalculationNode = xmlNode.SelectSingleNode("jointSimpleCalculation");

            if (jointSimpleCalculationNode != null)
            {
                if (jointSimpleCalculationNode.Attributes["href"] != null || jointSimpleCalculationNode.Attributes["id"] != null)
                {
                    if (jointSimpleCalculationNode.Attributes["id"] != null)
                    {
                        jointSimpleCalculationIDRef_ = jointSimpleCalculationNode.Attributes["id"].Value;
                        JointSimpleCalculation ob = new JointSimpleCalculation(jointSimpleCalculationNode);
                        IDManager.SetID(jointSimpleCalculationIDRef_, ob);
                    }
                    else if (jointSimpleCalculationNode.Attributes["href"] != null)
                    {
                        jointSimpleCalculationIDRef_ = jointSimpleCalculationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        jointSimpleCalculation_ = new JointSimpleCalculation(jointSimpleCalculationNode);
                    }
                }
                else
                {
                    jointSimpleCalculation_ = new JointSimpleCalculation(jointSimpleCalculationNode);
                }
            }


            XmlNode pastEventOccNode = xmlNode.SelectSingleNode("pastEventOcc");

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


            XmlNode refVariable_eventOccNode = xmlNode.SelectSingleNode("refVariable_eventOcc");

            if (refVariable_eventOccNode != null)
            {
                if (refVariable_eventOccNode.Attributes["href"] != null || refVariable_eventOccNode.Attributes["id"] != null)
                {
                    if (refVariable_eventOccNode.Attributes["id"] != null)
                    {
                        refVariable_eventOccIDRef_ = refVariable_eventOccNode.Attributes["id"].Value;
                        RefVariable_eventOcc ob = new RefVariable_eventOcc(refVariable_eventOccNode);
                        IDManager.SetID(refVariable_eventOccIDRef_, ob);
                    }
                    else if (refVariable_eventOccNode.Attributes["href"] != null)
                    {
                        refVariable_eventOccIDRef_ = refVariable_eventOccNode.Attributes["href"].Value;
                    }
                    else
                    {
                        refVariable_eventOcc_ = new RefVariable_eventOcc(refVariable_eventOccNode);
                    }
                }
                else
                {
                    refVariable_eventOcc_ = new RefVariable_eventOcc(refVariable_eventOccNode);
                }
            }
        }
 public EventCalculationInfo(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode preConditionEventNode = xmlNode.SelectSingleNode("preConditionEvent");
     
     if (preConditionEventNode != null)
     {
         if (preConditionEventNode.Attributes["href"] != null || preConditionEventNode.Attributes["id"] != null) 
         {
             if (preConditionEventNode.Attributes["id"] != null) 
             {
                 preConditionEventIDRef_ = preConditionEventNode.Attributes["id"].Value;
                 PreConditionEvent ob = new PreConditionEvent(preConditionEventNode);
                 IDManager.SetID(preConditionEventIDRef_, ob);
             }
             else if (preConditionEventNode.Attributes["href"] != null)
             {
                 preConditionEventIDRef_ = preConditionEventNode.Attributes["href"].Value;
             }
             else
             {
                 preConditionEvent_ = new PreConditionEvent(preConditionEventNode);
             }
         }
         else
         {
             preConditionEvent_ = new PreConditionEvent(preConditionEventNode);
         }
     }
     
 
     XmlNodeList eventCalculationNodeList = xmlNode.SelectNodes("eventCalculation");
     
     if (eventCalculationNodeList != null)
     {
         this.eventCalculation_ = new List<EventCalculation>();
         foreach (XmlNode item in eventCalculationNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     eventCalculationIDRef_ = item.Attributes["id"].Value;
                     eventCalculation_.Add(new EventCalculation(item));
                     IDManager.SetID(eventCalculationIDRef_, eventCalculation_[eventCalculation_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     eventCalculationIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 eventCalculation_.Add(new EventCalculation(item));
                 }
             }
             else
             {
                 eventCalculation_.Add(new EventCalculation(item));
             }
         }
     }
     
 
     XmlNode jointSimpleCalculationNode = xmlNode.SelectSingleNode("jointSimpleCalculation");
     
     if (jointSimpleCalculationNode != null)
     {
         if (jointSimpleCalculationNode.Attributes["href"] != null || jointSimpleCalculationNode.Attributes["id"] != null) 
         {
             if (jointSimpleCalculationNode.Attributes["id"] != null) 
             {
                 jointSimpleCalculationIDRef_ = jointSimpleCalculationNode.Attributes["id"].Value;
                 JointSimpleCalculation ob = new JointSimpleCalculation(jointSimpleCalculationNode);
                 IDManager.SetID(jointSimpleCalculationIDRef_, ob);
             }
             else if (jointSimpleCalculationNode.Attributes["href"] != null)
             {
                 jointSimpleCalculationIDRef_ = jointSimpleCalculationNode.Attributes["href"].Value;
             }
             else
             {
                 jointSimpleCalculation_ = new JointSimpleCalculation(jointSimpleCalculationNode);
             }
         }
         else
         {
             jointSimpleCalculation_ = new JointSimpleCalculation(jointSimpleCalculationNode);
         }
     }
     
 
     XmlNode pastEventOccNode = xmlNode.SelectSingleNode("pastEventOcc");
     
     if (pastEventOccNode != null)
     {
         if (pastEventOccNode.Attributes["href"] != null || pastEventOccNode.Attributes["id"] != null) 
         {
             if (pastEventOccNode.Attributes["id"] != null) 
             {
                 pastEventOccIDRef_ = pastEventOccNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(pastEventOccNode);
                 IDManager.SetID(pastEventOccIDRef_, ob);
             }
             else if (pastEventOccNode.Attributes["href"] != null)
             {
                 pastEventOccIDRef_ = pastEventOccNode.Attributes["href"].Value;
             }
             else
             {
                 pastEventOcc_ = new XsdTypeBoolean(pastEventOccNode);
             }
         }
         else
         {
             pastEventOcc_ = new XsdTypeBoolean(pastEventOccNode);
         }
     }
     
 
     XmlNode refVariable_eventOccNode = xmlNode.SelectSingleNode("refVariable_eventOcc");
     
     if (refVariable_eventOccNode != null)
     {
         if (refVariable_eventOccNode.Attributes["href"] != null || refVariable_eventOccNode.Attributes["id"] != null) 
         {
             if (refVariable_eventOccNode.Attributes["id"] != null) 
             {
                 refVariable_eventOccIDRef_ = refVariable_eventOccNode.Attributes["id"].Value;
                 RefVariable_eventOcc ob = new RefVariable_eventOcc(refVariable_eventOccNode);
                 IDManager.SetID(refVariable_eventOccIDRef_, ob);
             }
             else if (refVariable_eventOccNode.Attributes["href"] != null)
             {
                 refVariable_eventOccIDRef_ = refVariable_eventOccNode.Attributes["href"].Value;
             }
             else
             {
                 refVariable_eventOcc_ = new RefVariable_eventOcc(refVariable_eventOccNode);
             }
         }
         else
         {
             refVariable_eventOcc_ = new RefVariable_eventOcc(refVariable_eventOccNode);
         }
     }
     
 
 }
 public EventCalculation(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode nameNode = xmlNode.SelectSingleNode("name");
     
     if (nameNode != null)
     {
         if (nameNode.Attributes["href"] != null || nameNode.Attributes["id"] != null) 
         {
             if (nameNode.Attributes["id"] != null) 
             {
                 nameIDRef_ = nameNode.Attributes["id"].Value;
                 XsdTypeToken ob = new XsdTypeToken(nameNode);
                 IDManager.SetID(nameIDRef_, ob);
             }
             else if (nameNode.Attributes["href"] != null)
             {
                 nameIDRef_ = nameNode.Attributes["href"].Value;
             }
             else
             {
                 name_ = new XsdTypeToken(nameNode);
             }
         }
         else
         {
             name_ = new XsdTypeToken(nameNode);
         }
     }
     
 
     XmlNode typeNode = xmlNode.SelectSingleNode("type");
     
     if (typeNode != null)
     {
         if (typeNode.Attributes["href"] != null || typeNode.Attributes["id"] != null) 
         {
             if (typeNode.Attributes["id"] != null) 
             {
                 typeIDRef_ = typeNode.Attributes["id"].Value;
                 XsdTypeToken ob = new XsdTypeToken(typeNode);
                 IDManager.SetID(typeIDRef_, ob);
             }
             else if (typeNode.Attributes["href"] != null)
             {
                 typeIDRef_ = typeNode.Attributes["href"].Value;
             }
             else
             {
                 type_ = new XsdTypeToken(typeNode);
             }
         }
         else
         {
             type_ = new XsdTypeToken(typeNode);
         }
     }
     
 
     XmlNode preConditionEventNode = xmlNode.SelectSingleNode("preConditionEvent");
     
     if (preConditionEventNode != null)
     {
         if (preConditionEventNode.Attributes["href"] != null || preConditionEventNode.Attributes["id"] != null) 
         {
             if (preConditionEventNode.Attributes["id"] != null) 
             {
                 preConditionEventIDRef_ = preConditionEventNode.Attributes["id"].Value;
                 PreConditionEvent ob = new PreConditionEvent(preConditionEventNode);
                 IDManager.SetID(preConditionEventIDRef_, ob);
             }
             else if (preConditionEventNode.Attributes["href"] != null)
             {
                 preConditionEventIDRef_ = preConditionEventNode.Attributes["href"].Value;
             }
             else
             {
                 preConditionEvent_ = new PreConditionEvent(preConditionEventNode);
             }
         }
         else
         {
             preConditionEvent_ = new PreConditionEvent(preConditionEventNode);
         }
     }
     
 
     XmlNode upperBarrierEventCalNode = xmlNode.SelectSingleNode("upperBarrierEventCal");
     
     if (upperBarrierEventCalNode != null)
     {
         if (upperBarrierEventCalNode.Attributes["href"] != null || upperBarrierEventCalNode.Attributes["id"] != null) 
         {
             if (upperBarrierEventCalNode.Attributes["id"] != null) 
             {
                 upperBarrierEventCalIDRef_ = upperBarrierEventCalNode.Attributes["id"].Value;
                 UpperBarrierEventCal ob = new UpperBarrierEventCal(upperBarrierEventCalNode);
                 IDManager.SetID(upperBarrierEventCalIDRef_, ob);
             }
             else if (upperBarrierEventCalNode.Attributes["href"] != null)
             {
                 upperBarrierEventCalIDRef_ = upperBarrierEventCalNode.Attributes["href"].Value;
             }
             else
             {
                 upperBarrierEventCal_ = new UpperBarrierEventCal(upperBarrierEventCalNode);
             }
         }
         else
         {
             upperBarrierEventCal_ = new UpperBarrierEventCal(upperBarrierEventCalNode);
         }
     }
     
 
     XmlNode lowerBarrierEventCalNode = xmlNode.SelectSingleNode("lowerBarrierEventCal");
     
     if (lowerBarrierEventCalNode != null)
     {
         if (lowerBarrierEventCalNode.Attributes["href"] != null || lowerBarrierEventCalNode.Attributes["id"] != null) 
         {
             if (lowerBarrierEventCalNode.Attributes["id"] != null) 
             {
                 lowerBarrierEventCalIDRef_ = lowerBarrierEventCalNode.Attributes["id"].Value;
                 LowerBarrierEventCal ob = new LowerBarrierEventCal(lowerBarrierEventCalNode);
                 IDManager.SetID(lowerBarrierEventCalIDRef_, ob);
             }
             else if (lowerBarrierEventCalNode.Attributes["href"] != null)
             {
                 lowerBarrierEventCalIDRef_ = lowerBarrierEventCalNode.Attributes["href"].Value;
             }
             else
             {
                 lowerBarrierEventCal_ = new LowerBarrierEventCal(lowerBarrierEventCalNode);
             }
         }
         else
         {
             lowerBarrierEventCal_ = new LowerBarrierEventCal(lowerBarrierEventCalNode);
         }
     }
     
 
     XmlNode dualBarrierEventCalNode = xmlNode.SelectSingleNode("dualBarrierEventCal");
     
     if (dualBarrierEventCalNode != null)
     {
         if (dualBarrierEventCalNode.Attributes["href"] != null || dualBarrierEventCalNode.Attributes["id"] != null) 
         {
             if (dualBarrierEventCalNode.Attributes["id"] != null) 
             {
                 dualBarrierEventCalIDRef_ = dualBarrierEventCalNode.Attributes["id"].Value;
                 DualBarrierEventCal ob = new DualBarrierEventCal(dualBarrierEventCalNode);
                 IDManager.SetID(dualBarrierEventCalIDRef_, ob);
             }
             else if (dualBarrierEventCalNode.Attributes["href"] != null)
             {
                 dualBarrierEventCalIDRef_ = dualBarrierEventCalNode.Attributes["href"].Value;
             }
             else
             {
                 dualBarrierEventCal_ = new DualBarrierEventCal(dualBarrierEventCalNode);
             }
         }
         else
         {
             dualBarrierEventCal_ = new DualBarrierEventCal(dualBarrierEventCalNode);
         }
     }
     
 
     XmlNode simpleRangeEventCalNode = xmlNode.SelectSingleNode("simpleRangeEventCal");
     
     if (simpleRangeEventCalNode != null)
     {
         if (simpleRangeEventCalNode.Attributes["href"] != null || simpleRangeEventCalNode.Attributes["id"] != null) 
         {
             if (simpleRangeEventCalNode.Attributes["id"] != null) 
             {
                 simpleRangeEventCalIDRef_ = simpleRangeEventCalNode.Attributes["id"].Value;
                 SimpleRangeEventCal ob = new SimpleRangeEventCal(simpleRangeEventCalNode);
                 IDManager.SetID(simpleRangeEventCalIDRef_, ob);
             }
             else if (simpleRangeEventCalNode.Attributes["href"] != null)
             {
                 simpleRangeEventCalIDRef_ = simpleRangeEventCalNode.Attributes["href"].Value;
             }
             else
             {
                 simpleRangeEventCal_ = new SimpleRangeEventCal(simpleRangeEventCalNode);
             }
         }
         else
         {
             simpleRangeEventCal_ = new SimpleRangeEventCal(simpleRangeEventCalNode);
         }
     }
     
 
     XmlNode referenceEventCalNode = xmlNode.SelectSingleNode("referenceEventCal");
     
     if (referenceEventCalNode != null)
     {
         if (referenceEventCalNode.Attributes["href"] != null || referenceEventCalNode.Attributes["id"] != null) 
         {
             if (referenceEventCalNode.Attributes["id"] != null) 
             {
                 referenceEventCalIDRef_ = referenceEventCalNode.Attributes["id"].Value;
                 ReferenceEventCal ob = new ReferenceEventCal(referenceEventCalNode);
                 IDManager.SetID(referenceEventCalIDRef_, ob);
             }
             else if (referenceEventCalNode.Attributes["href"] != null)
             {
                 referenceEventCalIDRef_ = referenceEventCalNode.Attributes["href"].Value;
             }
             else
             {
                 referenceEventCal_ = new ReferenceEventCal(referenceEventCalNode);
             }
         }
         else
         {
             referenceEventCal_ = new ReferenceEventCal(referenceEventCalNode);
         }
     }
     
 
     XmlNode pastEventOccNode = xmlNode.SelectSingleNode("pastEventOcc");
     
     if (pastEventOccNode != null)
     {
         if (pastEventOccNode.Attributes["href"] != null || pastEventOccNode.Attributes["id"] != null) 
         {
             if (pastEventOccNode.Attributes["id"] != null) 
             {
                 pastEventOccIDRef_ = pastEventOccNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(pastEventOccNode);
                 IDManager.SetID(pastEventOccIDRef_, ob);
             }
             else if (pastEventOccNode.Attributes["href"] != null)
             {
                 pastEventOccIDRef_ = pastEventOccNode.Attributes["href"].Value;
             }
             else
             {
                 pastEventOcc_ = new XsdTypeBoolean(pastEventOccNode);
             }
         }
         else
         {
             pastEventOcc_ = new XsdTypeBoolean(pastEventOccNode);
         }
     }
     
 
     XmlNode refVariable_eventOccNode = xmlNode.SelectSingleNode("refVariable_eventOcc");
     
     if (refVariable_eventOccNode != null)
     {
         if (refVariable_eventOccNode.Attributes["href"] != null || refVariable_eventOccNode.Attributes["id"] != null) 
         {
             if (refVariable_eventOccNode.Attributes["id"] != null) 
             {
                 refVariable_eventOccIDRef_ = refVariable_eventOccNode.Attributes["id"].Value;
                 RefVariable_eventOcc ob = new RefVariable_eventOcc(refVariable_eventOccNode);
                 IDManager.SetID(refVariable_eventOccIDRef_, ob);
             }
             else if (refVariable_eventOccNode.Attributes["href"] != null)
             {
                 refVariable_eventOccIDRef_ = refVariable_eventOccNode.Attributes["href"].Value;
             }
             else
             {
                 refVariable_eventOcc_ = new RefVariable_eventOcc(refVariable_eventOccNode);
             }
         }
         else
         {
             refVariable_eventOcc_ = new RefVariable_eventOcc(refVariable_eventOccNode);
         }
     }
     
 
 }
        public EventCalculation(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode nameNode = xmlNode.SelectSingleNode("name");

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


            XmlNode typeNode = xmlNode.SelectSingleNode("type");

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


            XmlNode preConditionEventNode = xmlNode.SelectSingleNode("preConditionEvent");

            if (preConditionEventNode != null)
            {
                if (preConditionEventNode.Attributes["href"] != null || preConditionEventNode.Attributes["id"] != null)
                {
                    if (preConditionEventNode.Attributes["id"] != null)
                    {
                        preConditionEventIDRef_ = preConditionEventNode.Attributes["id"].Value;
                        PreConditionEvent ob = new PreConditionEvent(preConditionEventNode);
                        IDManager.SetID(preConditionEventIDRef_, ob);
                    }
                    else if (preConditionEventNode.Attributes["href"] != null)
                    {
                        preConditionEventIDRef_ = preConditionEventNode.Attributes["href"].Value;
                    }
                    else
                    {
                        preConditionEvent_ = new PreConditionEvent(preConditionEventNode);
                    }
                }
                else
                {
                    preConditionEvent_ = new PreConditionEvent(preConditionEventNode);
                }
            }


            XmlNode upperBarrierEventCalNode = xmlNode.SelectSingleNode("upperBarrierEventCal");

            if (upperBarrierEventCalNode != null)
            {
                if (upperBarrierEventCalNode.Attributes["href"] != null || upperBarrierEventCalNode.Attributes["id"] != null)
                {
                    if (upperBarrierEventCalNode.Attributes["id"] != null)
                    {
                        upperBarrierEventCalIDRef_ = upperBarrierEventCalNode.Attributes["id"].Value;
                        UpperBarrierEventCal ob = new UpperBarrierEventCal(upperBarrierEventCalNode);
                        IDManager.SetID(upperBarrierEventCalIDRef_, ob);
                    }
                    else if (upperBarrierEventCalNode.Attributes["href"] != null)
                    {
                        upperBarrierEventCalIDRef_ = upperBarrierEventCalNode.Attributes["href"].Value;
                    }
                    else
                    {
                        upperBarrierEventCal_ = new UpperBarrierEventCal(upperBarrierEventCalNode);
                    }
                }
                else
                {
                    upperBarrierEventCal_ = new UpperBarrierEventCal(upperBarrierEventCalNode);
                }
            }


            XmlNode lowerBarrierEventCalNode = xmlNode.SelectSingleNode("lowerBarrierEventCal");

            if (lowerBarrierEventCalNode != null)
            {
                if (lowerBarrierEventCalNode.Attributes["href"] != null || lowerBarrierEventCalNode.Attributes["id"] != null)
                {
                    if (lowerBarrierEventCalNode.Attributes["id"] != null)
                    {
                        lowerBarrierEventCalIDRef_ = lowerBarrierEventCalNode.Attributes["id"].Value;
                        LowerBarrierEventCal ob = new LowerBarrierEventCal(lowerBarrierEventCalNode);
                        IDManager.SetID(lowerBarrierEventCalIDRef_, ob);
                    }
                    else if (lowerBarrierEventCalNode.Attributes["href"] != null)
                    {
                        lowerBarrierEventCalIDRef_ = lowerBarrierEventCalNode.Attributes["href"].Value;
                    }
                    else
                    {
                        lowerBarrierEventCal_ = new LowerBarrierEventCal(lowerBarrierEventCalNode);
                    }
                }
                else
                {
                    lowerBarrierEventCal_ = new LowerBarrierEventCal(lowerBarrierEventCalNode);
                }
            }


            XmlNode dualBarrierEventCalNode = xmlNode.SelectSingleNode("dualBarrierEventCal");

            if (dualBarrierEventCalNode != null)
            {
                if (dualBarrierEventCalNode.Attributes["href"] != null || dualBarrierEventCalNode.Attributes["id"] != null)
                {
                    if (dualBarrierEventCalNode.Attributes["id"] != null)
                    {
                        dualBarrierEventCalIDRef_ = dualBarrierEventCalNode.Attributes["id"].Value;
                        DualBarrierEventCal ob = new DualBarrierEventCal(dualBarrierEventCalNode);
                        IDManager.SetID(dualBarrierEventCalIDRef_, ob);
                    }
                    else if (dualBarrierEventCalNode.Attributes["href"] != null)
                    {
                        dualBarrierEventCalIDRef_ = dualBarrierEventCalNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dualBarrierEventCal_ = new DualBarrierEventCal(dualBarrierEventCalNode);
                    }
                }
                else
                {
                    dualBarrierEventCal_ = new DualBarrierEventCal(dualBarrierEventCalNode);
                }
            }


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

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


            XmlNode referenceEventCalNode = xmlNode.SelectSingleNode("referenceEventCal");

            if (referenceEventCalNode != null)
            {
                if (referenceEventCalNode.Attributes["href"] != null || referenceEventCalNode.Attributes["id"] != null)
                {
                    if (referenceEventCalNode.Attributes["id"] != null)
                    {
                        referenceEventCalIDRef_ = referenceEventCalNode.Attributes["id"].Value;
                        ReferenceEventCal ob = new ReferenceEventCal(referenceEventCalNode);
                        IDManager.SetID(referenceEventCalIDRef_, ob);
                    }
                    else if (referenceEventCalNode.Attributes["href"] != null)
                    {
                        referenceEventCalIDRef_ = referenceEventCalNode.Attributes["href"].Value;
                    }
                    else
                    {
                        referenceEventCal_ = new ReferenceEventCal(referenceEventCalNode);
                    }
                }
                else
                {
                    referenceEventCal_ = new ReferenceEventCal(referenceEventCalNode);
                }
            }


            XmlNode pastEventOccNode = xmlNode.SelectSingleNode("pastEventOcc");

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


            XmlNode refVariable_eventOccNode = xmlNode.SelectSingleNode("refVariable_eventOcc");

            if (refVariable_eventOccNode != null)
            {
                if (refVariable_eventOccNode.Attributes["href"] != null || refVariable_eventOccNode.Attributes["id"] != null)
                {
                    if (refVariable_eventOccNode.Attributes["id"] != null)
                    {
                        refVariable_eventOccIDRef_ = refVariable_eventOccNode.Attributes["id"].Value;
                        RefVariable_eventOcc ob = new RefVariable_eventOcc(refVariable_eventOccNode);
                        IDManager.SetID(refVariable_eventOccIDRef_, ob);
                    }
                    else if (refVariable_eventOccNode.Attributes["href"] != null)
                    {
                        refVariable_eventOccIDRef_ = refVariable_eventOccNode.Attributes["href"].Value;
                    }
                    else
                    {
                        refVariable_eventOcc_ = new RefVariable_eventOcc(refVariable_eventOccNode);
                    }
                }
                else
                {
                    refVariable_eventOcc_ = new RefVariable_eventOcc(refVariable_eventOccNode);
                }
            }
        }
 public EventTrigger(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode typeNode = xmlNode.SelectSingleNode("type");
     
     if (typeNode != null)
     {
         if (typeNode.Attributes["href"] != null || typeNode.Attributes["id"] != null) 
         {
             if (typeNode.Attributes["id"] != null) 
             {
                 typeIDRef_ = typeNode.Attributes["id"].Value;
                 XsdTypeToken ob = new XsdTypeToken(typeNode);
                 IDManager.SetID(typeIDRef_, ob);
             }
             else if (typeNode.Attributes["href"] != null)
             {
                 typeIDRef_ = typeNode.Attributes["href"].Value;
             }
             else
             {
                 type_ = new XsdTypeToken(typeNode);
             }
         }
         else
         {
             type_ = new XsdTypeToken(typeNode);
         }
     }
     
 
     XmlNode eventDateNode = xmlNode.SelectSingleNode("eventDate");
     
     if (eventDateNode != null)
     {
         if (eventDateNode.Attributes["href"] != null || eventDateNode.Attributes["id"] != null) 
         {
             if (eventDateNode.Attributes["id"] != null) 
             {
                 eventDateIDRef_ = eventDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(eventDateNode);
                 IDManager.SetID(eventDateIDRef_, ob);
             }
             else if (eventDateNode.Attributes["href"] != null)
             {
                 eventDateIDRef_ = eventDateNode.Attributes["href"].Value;
             }
             else
             {
                 eventDate_ = new XsdTypeDate(eventDateNode);
             }
         }
         else
         {
             eventDate_ = new XsdTypeDate(eventDateNode);
         }
     }
     
 
     XmlNode autoTerminationTriggerNode = xmlNode.SelectSingleNode("autoTerminationTrigger");
     
     if (autoTerminationTriggerNode != null)
     {
         if (autoTerminationTriggerNode.Attributes["href"] != null || autoTerminationTriggerNode.Attributes["id"] != null) 
         {
             if (autoTerminationTriggerNode.Attributes["id"] != null) 
             {
                 autoTerminationTriggerIDRef_ = autoTerminationTriggerNode.Attributes["id"].Value;
                 AutoTerminationTrigger ob = new AutoTerminationTrigger(autoTerminationTriggerNode);
                 IDManager.SetID(autoTerminationTriggerIDRef_, ob);
             }
             else if (autoTerminationTriggerNode.Attributes["href"] != null)
             {
                 autoTerminationTriggerIDRef_ = autoTerminationTriggerNode.Attributes["href"].Value;
             }
             else
             {
                 autoTerminationTrigger_ = new AutoTerminationTrigger(autoTerminationTriggerNode);
             }
         }
         else
         {
             autoTerminationTrigger_ = new AutoTerminationTrigger(autoTerminationTriggerNode);
         }
     }
     
 
     XmlNode preEventCalculationNode = xmlNode.SelectSingleNode("preEventCalculation");
     
     if (preEventCalculationNode != null)
     {
         if (preEventCalculationNode.Attributes["href"] != null || preEventCalculationNode.Attributes["id"] != null) 
         {
             if (preEventCalculationNode.Attributes["id"] != null) 
             {
                 preEventCalculationIDRef_ = preEventCalculationNode.Attributes["id"].Value;
                 PreEventCalculation ob = new PreEventCalculation(preEventCalculationNode);
                 IDManager.SetID(preEventCalculationIDRef_, ob);
             }
             else if (preEventCalculationNode.Attributes["href"] != null)
             {
                 preEventCalculationIDRef_ = preEventCalculationNode.Attributes["href"].Value;
             }
             else
             {
                 preEventCalculation_ = new PreEventCalculation(preEventCalculationNode);
             }
         }
         else
         {
             preEventCalculation_ = new PreEventCalculation(preEventCalculationNode);
         }
     }
     
 
     XmlNode preConditionEventNode = xmlNode.SelectSingleNode("preConditionEvent");
     
     if (preConditionEventNode != null)
     {
         if (preConditionEventNode.Attributes["href"] != null || preConditionEventNode.Attributes["id"] != null) 
         {
             if (preConditionEventNode.Attributes["id"] != null) 
             {
                 preConditionEventIDRef_ = preConditionEventNode.Attributes["id"].Value;
                 PreConditionEvent ob = new PreConditionEvent(preConditionEventNode);
                 IDManager.SetID(preConditionEventIDRef_, ob);
             }
             else if (preConditionEventNode.Attributes["href"] != null)
             {
                 preConditionEventIDRef_ = preConditionEventNode.Attributes["href"].Value;
             }
             else
             {
                 preConditionEvent_ = new PreConditionEvent(preConditionEventNode);
             }
         }
         else
         {
             preConditionEvent_ = new PreConditionEvent(preConditionEventNode);
         }
     }
     
 
     XmlNode autoCallConstReturnTriggerNode = xmlNode.SelectSingleNode("autoCallConstReturnTrigger");
     
     if (autoCallConstReturnTriggerNode != null)
     {
         if (autoCallConstReturnTriggerNode.Attributes["href"] != null || autoCallConstReturnTriggerNode.Attributes["id"] != null) 
         {
             if (autoCallConstReturnTriggerNode.Attributes["id"] != null) 
             {
                 autoCallConstReturnTriggerIDRef_ = autoCallConstReturnTriggerNode.Attributes["id"].Value;
                 AutoCallConstReturnTrigger ob = new AutoCallConstReturnTrigger(autoCallConstReturnTriggerNode);
                 IDManager.SetID(autoCallConstReturnTriggerIDRef_, ob);
             }
             else if (autoCallConstReturnTriggerNode.Attributes["href"] != null)
             {
                 autoCallConstReturnTriggerIDRef_ = autoCallConstReturnTriggerNode.Attributes["href"].Value;
             }
             else
             {
                 autoCallConstReturnTrigger_ = new AutoCallConstReturnTrigger(autoCallConstReturnTriggerNode);
             }
         }
         else
         {
             autoCallConstReturnTrigger_ = new AutoCallConstReturnTrigger(autoCallConstReturnTriggerNode);
         }
     }
     
 
     XmlNode simpleRangeConstReturnTriggerNode = xmlNode.SelectSingleNode("simpleRangeConstReturnTrigger");
     
     if (simpleRangeConstReturnTriggerNode != null)
     {
         if (simpleRangeConstReturnTriggerNode.Attributes["href"] != null || simpleRangeConstReturnTriggerNode.Attributes["id"] != null) 
         {
             if (simpleRangeConstReturnTriggerNode.Attributes["id"] != null) 
             {
                 simpleRangeConstReturnTriggerIDRef_ = simpleRangeConstReturnTriggerNode.Attributes["id"].Value;
                 SimpleRangeConstReturnTrigger ob = new SimpleRangeConstReturnTrigger(simpleRangeConstReturnTriggerNode);
                 IDManager.SetID(simpleRangeConstReturnTriggerIDRef_, ob);
             }
             else if (simpleRangeConstReturnTriggerNode.Attributes["href"] != null)
             {
                 simpleRangeConstReturnTriggerIDRef_ = simpleRangeConstReturnTriggerNode.Attributes["href"].Value;
             }
             else
             {
                 simpleRangeConstReturnTrigger_ = new SimpleRangeConstReturnTrigger(simpleRangeConstReturnTriggerNode);
             }
         }
         else
         {
             simpleRangeConstReturnTrigger_ = new SimpleRangeConstReturnTrigger(simpleRangeConstReturnTriggerNode);
         }
     }
     
 
     XmlNode simpleRangeRateTriggerNode = xmlNode.SelectSingleNode("simpleRangeRateTrigger");
     
     if (simpleRangeRateTriggerNode != null)
     {
         if (simpleRangeRateTriggerNode.Attributes["href"] != null || simpleRangeRateTriggerNode.Attributes["id"] != null) 
         {
             if (simpleRangeRateTriggerNode.Attributes["id"] != null) 
             {
                 simpleRangeRateTriggerIDRef_ = simpleRangeRateTriggerNode.Attributes["id"].Value;
                 SimpleRangeRateTrigger ob = new SimpleRangeRateTrigger(simpleRangeRateTriggerNode);
                 IDManager.SetID(simpleRangeRateTriggerIDRef_, ob);
             }
             else if (simpleRangeRateTriggerNode.Attributes["href"] != null)
             {
                 simpleRangeRateTriggerIDRef_ = simpleRangeRateTriggerNode.Attributes["href"].Value;
             }
             else
             {
                 simpleRangeRateTrigger_ = new SimpleRangeRateTrigger(simpleRangeRateTriggerNode);
             }
         }
         else
         {
             simpleRangeRateTrigger_ = new SimpleRangeRateTrigger(simpleRangeRateTriggerNode);
         }
     }
     
 
     XmlNode simpleRangeAccrualRateTriggerNode = xmlNode.SelectSingleNode("simpleRangeAccrualRateTrigger");
     
     if (simpleRangeAccrualRateTriggerNode != null)
     {
         if (simpleRangeAccrualRateTriggerNode.Attributes["href"] != null || simpleRangeAccrualRateTriggerNode.Attributes["id"] != null) 
         {
             if (simpleRangeAccrualRateTriggerNode.Attributes["id"] != null) 
             {
                 simpleRangeAccrualRateTriggerIDRef_ = simpleRangeAccrualRateTriggerNode.Attributes["id"].Value;
                 SimpleRangeAccrualRateTrigger ob = new SimpleRangeAccrualRateTrigger(simpleRangeAccrualRateTriggerNode);
                 IDManager.SetID(simpleRangeAccrualRateTriggerIDRef_, ob);
             }
             else if (simpleRangeAccrualRateTriggerNode.Attributes["href"] != null)
             {
                 simpleRangeAccrualRateTriggerIDRef_ = simpleRangeAccrualRateTriggerNode.Attributes["href"].Value;
             }
             else
             {
                 simpleRangeAccrualRateTrigger_ = new SimpleRangeAccrualRateTrigger(simpleRangeAccrualRateTriggerNode);
             }
         }
         else
         {
             simpleRangeAccrualRateTrigger_ = new SimpleRangeAccrualRateTrigger(simpleRangeAccrualRateTriggerNode);
         }
     }
     
 
     XmlNode fixedRateTriggerNode = xmlNode.SelectSingleNode("fixedRateTrigger");
     
     if (fixedRateTriggerNode != null)
     {
         if (fixedRateTriggerNode.Attributes["href"] != null || fixedRateTriggerNode.Attributes["id"] != null) 
         {
             if (fixedRateTriggerNode.Attributes["id"] != null) 
             {
                 fixedRateTriggerIDRef_ = fixedRateTriggerNode.Attributes["id"].Value;
                 FixedRateTrigger ob = new FixedRateTrigger(fixedRateTriggerNode);
                 IDManager.SetID(fixedRateTriggerIDRef_, ob);
             }
             else if (fixedRateTriggerNode.Attributes["href"] != null)
             {
                 fixedRateTriggerIDRef_ = fixedRateTriggerNode.Attributes["href"].Value;
             }
             else
             {
                 fixedRateTrigger_ = new FixedRateTrigger(fixedRateTriggerNode);
             }
         }
         else
         {
             fixedRateTrigger_ = new FixedRateTrigger(fixedRateTriggerNode);
         }
     }
     
 
     XmlNode vanillaRateTriggerNode = xmlNode.SelectSingleNode("vanillaRateTrigger");
     
     if (vanillaRateTriggerNode != null)
     {
         if (vanillaRateTriggerNode.Attributes["href"] != null || vanillaRateTriggerNode.Attributes["id"] != null) 
         {
             if (vanillaRateTriggerNode.Attributes["id"] != null) 
             {
                 vanillaRateTriggerIDRef_ = vanillaRateTriggerNode.Attributes["id"].Value;
                 VanillaRateTrigger ob = new VanillaRateTrigger(vanillaRateTriggerNode);
                 IDManager.SetID(vanillaRateTriggerIDRef_, ob);
             }
             else if (vanillaRateTriggerNode.Attributes["href"] != null)
             {
                 vanillaRateTriggerIDRef_ = vanillaRateTriggerNode.Attributes["href"].Value;
             }
             else
             {
                 vanillaRateTrigger_ = new VanillaRateTrigger(vanillaRateTriggerNode);
             }
         }
         else
         {
             vanillaRateTrigger_ = new VanillaRateTrigger(vanillaRateTriggerNode);
         }
     }
     
 
     XmlNode redemptionNotionalTriggerNode = xmlNode.SelectSingleNode("redemptionNotionalTrigger");
     
     if (redemptionNotionalTriggerNode != null)
     {
         if (redemptionNotionalTriggerNode.Attributes["href"] != null || redemptionNotionalTriggerNode.Attributes["id"] != null) 
         {
             if (redemptionNotionalTriggerNode.Attributes["id"] != null) 
             {
                 redemptionNotionalTriggerIDRef_ = redemptionNotionalTriggerNode.Attributes["id"].Value;
                 RedemptionNotionalTrigger ob = new RedemptionNotionalTrigger(redemptionNotionalTriggerNode);
                 IDManager.SetID(redemptionNotionalTriggerIDRef_, ob);
             }
             else if (redemptionNotionalTriggerNode.Attributes["href"] != null)
             {
                 redemptionNotionalTriggerIDRef_ = redemptionNotionalTriggerNode.Attributes["href"].Value;
             }
             else
             {
                 redemptionNotionalTrigger_ = new RedemptionNotionalTrigger(redemptionNotionalTriggerNode);
             }
         }
         else
         {
             redemptionNotionalTrigger_ = new RedemptionNotionalTrigger(redemptionNotionalTriggerNode);
         }
     }
     
 
     XmlNode autoCallRangeReturnTriggerNode = xmlNode.SelectSingleNode("autoCallRangeReturnTrigger");
     
     if (autoCallRangeReturnTriggerNode != null)
     {
         if (autoCallRangeReturnTriggerNode.Attributes["href"] != null || autoCallRangeReturnTriggerNode.Attributes["id"] != null) 
         {
             if (autoCallRangeReturnTriggerNode.Attributes["id"] != null) 
             {
                 autoCallRangeReturnTriggerIDRef_ = autoCallRangeReturnTriggerNode.Attributes["id"].Value;
                 AutoCallRangeReturnTrigger ob = new AutoCallRangeReturnTrigger(autoCallRangeReturnTriggerNode);
                 IDManager.SetID(autoCallRangeReturnTriggerIDRef_, ob);
             }
             else if (autoCallRangeReturnTriggerNode.Attributes["href"] != null)
             {
                 autoCallRangeReturnTriggerIDRef_ = autoCallRangeReturnTriggerNode.Attributes["href"].Value;
             }
             else
             {
                 autoCallRangeReturnTrigger_ = new AutoCallRangeReturnTrigger(autoCallRangeReturnTriggerNode);
             }
         }
         else
         {
             autoCallRangeReturnTrigger_ = new AutoCallRangeReturnTrigger(autoCallRangeReturnTriggerNode);
         }
     }
     
 
     XmlNode vanillaCouponTriggerNode = xmlNode.SelectSingleNode("vanillaCouponTrigger");
     
     if (vanillaCouponTriggerNode != null)
     {
         if (vanillaCouponTriggerNode.Attributes["href"] != null || vanillaCouponTriggerNode.Attributes["id"] != null) 
         {
             if (vanillaCouponTriggerNode.Attributes["id"] != null) 
             {
                 vanillaCouponTriggerIDRef_ = vanillaCouponTriggerNode.Attributes["id"].Value;
                 VanillaCouponTrigger ob = new VanillaCouponTrigger(vanillaCouponTriggerNode);
                 IDManager.SetID(vanillaCouponTriggerIDRef_, ob);
             }
             else if (vanillaCouponTriggerNode.Attributes["href"] != null)
             {
                 vanillaCouponTriggerIDRef_ = vanillaCouponTriggerNode.Attributes["href"].Value;
             }
             else
             {
                 vanillaCouponTrigger_ = new VanillaCouponTrigger(vanillaCouponTriggerNode);
             }
         }
         else
         {
             vanillaCouponTrigger_ = new VanillaCouponTrigger(vanillaCouponTriggerNode);
         }
     }
     
 
     XmlNode simpleEventCouponTriggerNode = xmlNode.SelectSingleNode("simpleEventCouponTrigger");
     
     if (simpleEventCouponTriggerNode != null)
     {
         if (simpleEventCouponTriggerNode.Attributes["href"] != null || simpleEventCouponTriggerNode.Attributes["id"] != null) 
         {
             if (simpleEventCouponTriggerNode.Attributes["id"] != null) 
             {
                 simpleEventCouponTriggerIDRef_ = simpleEventCouponTriggerNode.Attributes["id"].Value;
                 SimpleEventCouponTrigger ob = new SimpleEventCouponTrigger(simpleEventCouponTriggerNode);
                 IDManager.SetID(simpleEventCouponTriggerIDRef_, ob);
             }
             else if (simpleEventCouponTriggerNode.Attributes["href"] != null)
             {
                 simpleEventCouponTriggerIDRef_ = simpleEventCouponTriggerNode.Attributes["href"].Value;
             }
             else
             {
                 simpleEventCouponTrigger_ = new SimpleEventCouponTrigger(simpleEventCouponTriggerNode);
             }
         }
         else
         {
             simpleEventCouponTrigger_ = new SimpleEventCouponTrigger(simpleEventCouponTriggerNode);
         }
     }
     
 
     XmlNode postCalculationNode = xmlNode.SelectSingleNode("postCalculation");
     
     if (postCalculationNode != null)
     {
         if (postCalculationNode.Attributes["href"] != null || postCalculationNode.Attributes["id"] != null) 
         {
             if (postCalculationNode.Attributes["id"] != null) 
             {
                 postCalculationIDRef_ = postCalculationNode.Attributes["id"].Value;
                 PostCalculation ob = new PostCalculation(postCalculationNode);
                 IDManager.SetID(postCalculationIDRef_, ob);
             }
             else if (postCalculationNode.Attributes["href"] != null)
             {
                 postCalculationIDRef_ = postCalculationNode.Attributes["href"].Value;
             }
             else
             {
                 postCalculation_ = new PostCalculation(postCalculationNode);
             }
         }
         else
         {
             postCalculation_ = new PostCalculation(postCalculationNode);
         }
     }
     
 
 }